Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push 2023 07 29 #573

Merged
merged 6 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/filter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@


cat $1| rs -c, -C, -T | grep "$2" | rs -c, -C, -T > $3

15 changes: 11 additions & 4 deletions src/cpucounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6911,6 +6911,11 @@ void ServerUncorePMUs::initRegisterLocations(const PCM * pcm)
PCM_PCICFG_QPI_INIT(2, SPR);
PCM_PCICFG_QPI_INIT(3, SPR);

PCM_PCICFG_M3UPI_INIT(0, SPR);
PCM_PCICFG_M3UPI_INIT(1, SPR);
PCM_PCICFG_M3UPI_INIT(2, SPR);
PCM_PCICFG_M3UPI_INIT(3, SPR);

PCM_PCICFG_M2M_INIT(0, SERVER)
PCM_PCICFG_M2M_INIT(1, SERVER)
PCM_PCICFG_M2M_INIT(2, SERVER)
Expand Down Expand Up @@ -7303,8 +7308,10 @@ void ServerUncorePMUs::initDirect(uint32 socket_, const PCM * pcm)
}
for (auto& handle : m3upiHandles)
{
if (cpu_model == PCM::ICX)
switch (cpu_model)
{
case PCM::ICX:
case PCM::SPR:
m3upiPMUs.push_back(
UncorePMU(
std::make_shared<PCICFGRegister32>(handle, ICX_M3UPI_PCI_PMON_BOX_CTL_ADDR),
Expand All @@ -7318,9 +7325,9 @@ void ServerUncorePMUs::initDirect(uint32 socket_, const PCM * pcm)
std::make_shared<PCICFGRegister64>(handle, ICX_M3UPI_PCI_PMON_CTR3_ADDR)
)
);
}
else
{
break;

default:
m3upiPMUs.push_back(
UncorePMU(
std::make_shared<PCICFGRegister32>(handle, M3UPI_PCI_PMON_BOX_CTL_ADDR),
Expand Down
9 changes: 9 additions & 0 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,15 @@ constexpr auto ICX_M3UPI_PORT0_REGISTER_FUNC_ADDR = (1);
constexpr auto ICX_M3UPI_PORT1_REGISTER_FUNC_ADDR = (1);
constexpr auto ICX_M3UPI_PORT2_REGISTER_FUNC_ADDR = (1);

constexpr auto SPR_M3UPI_PORT0_REGISTER_DEV_ADDR = 5;
constexpr auto SPR_M3UPI_PORT1_REGISTER_DEV_ADDR = 6;
constexpr auto SPR_M3UPI_PORT2_REGISTER_DEV_ADDR = 7;
constexpr auto SPR_M3UPI_PORT3_REGISTER_DEV_ADDR = 8;
constexpr auto SPR_M3UPI_PORT0_REGISTER_FUNC_ADDR = 1;
constexpr auto SPR_M3UPI_PORT1_REGISTER_FUNC_ADDR = 1;
constexpr auto SPR_M3UPI_PORT2_REGISTER_FUNC_ADDR = 1;
constexpr auto SPR_M3UPI_PORT3_REGISTER_FUNC_ADDR = 1;

#define SKX_M2M_0_REGISTER_DEV_ADDR (8)
#define SKX_M2M_0_REGISTER_FUNC_ADDR (0)
#define SKX_M2M_1_REGISTER_DEV_ADDR (9)
Expand Down