Deleted Added
sdiff udiff text old ( 10249:6bbb7ae309ac ) new ( 10395:77b9f96786c1 )
full compact
1/*
2 * Copyright (c) 2013-2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 67 unchanged lines hidden (view full) ---

76 auto entry = std::make_pair(domain_id, d);
77 bool new_elem = domains.insert(entry).second;
78 fatal_if(!new_elem, "DVFS: Domain %s with ID %d does not have a "\
79 "unique ID.\n", d->name(), domain_id);
80
81 // Create a dedicated event slot per known domain ID
82 UpdateEvent *event = &updatePerfLevelEvents[domain_id];
83 event->domainIDToSet = d->domainID();
84 }
85 UpdateEvent::dvfsHandler = this;
86}
87
88DVFSHandler *DVFSHandler::UpdateEvent::dvfsHandler;
89
90bool
91DVFSHandler::validDomainID(DomainID domain_id) const
92{
93 assert(isEnabled());
94 // This is ensure that the domain id as requested by the software is
95 // availabe in the handler.
96 if (domains.find(domain_id) != domains.end())
97 return true;

--- 83 unchanged lines hidden (view full) ---

181 arrayParamOut(os, "domain_ids", domain_ids);
182 arrayParamOut(os, "perf_levels", perf_levels);
183 arrayParamOut(os, "whens", whens);
184}
185
186void
187DVFSHandler::unserialize(Checkpoint *cp, const std::string &section)
188{
189 UNSERIALIZE_SCALAR(enableHandler);
190
191 // Reconstruct the map of domain IDs and their scheduled events
192 std::vector<DomainID> domain_ids;
193 std::vector<PerfLevel> perf_levels;
194 std::vector<Tick> whens;
195 arrayParamIn(cp, section, "domain_ids", domain_ids);
196 arrayParamIn(cp, section, "perf_levels", perf_levels);
197 arrayParamIn(cp, section, "whens", whens);
198

--- 18 unchanged lines hidden ---