Skip to content

Commit 94f160a

Browse files
committed
link 1 does not have own speed register only on QPI
Change-Id: I4756d8d645ca043da5d6bb0588fd82e91cf08af5
1 parent d6d3596 commit 94f160a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cpucounters.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9485,7 +9485,7 @@ uint64 ServerUncorePMUs::computeQPISpeed(const uint32 core_nr, const int cpumode
94859485
qpi_speed.resize(getNumQPIPorts());
94869486

94879487
auto getSpeed = [&] (size_t i) {
9488-
if (i == 1) return 0ULL; // link 1 should have the same speed as link 0, skip it
9488+
if (PCM::hasUPI(cpumodel) == false && i == 1) return 0ULL; // link 1 should have the same speed as link 0, skip it
94899489
uint64 result = 0;
94909490
if (PCM::hasUPI(cpumodel) == false && i < XPIRegisterLocation.size())
94919491
{
@@ -9571,7 +9571,7 @@ uint64 ServerUncorePMUs::computeQPISpeed(const uint32 core_nr, const int cpumode
95719571
getSpeedsAsync.push_back(std::async(std::launch::async, getSpeed, i));
95729572
}
95739573
for (size_t i = 0; i < getNumQPIPorts(); ++i) {
9574-
qpi_speed[i] = (i==1)? qpi_speed[0] : getSpeedsAsync[i].get(); // link 1 does not have own speed register, it runs with the speed of link 0
9574+
qpi_speed[i] = (PCM::hasUPI(cpumodel) == false && i==1)? qpi_speed[0] : getSpeedsAsync[i].get(); // link 1 does not have own speed register, it runs with the speed of link 0
95759575
}
95769576
if (PCM::hasUPI(cpumodel))
95779577
{

0 commit comments

Comments
 (0)