From b08ecac5b716e9ccf5cb8b3ce883444097eafd0c Mon Sep 17 00:00:00 2001 From: Neal Sidhwaney Date: Wed, 31 Aug 2022 01:25:55 -0700 Subject: [PATCH] Do not disable interrupts when building topology --- src/MacMSRDriver/PcmMsr/PcmMsr.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/MacMSRDriver/PcmMsr/PcmMsr.cpp b/src/MacMSRDriver/PcmMsr/PcmMsr.cpp index 61678add..35f8781a 100644 --- a/src/MacMSRDriver/PcmMsr/PcmMsr.cpp +++ b/src/MacMSRDriver/PcmMsr/PcmMsr.cpp @@ -18,6 +18,12 @@ asm volatile ("cpuid" : "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (func1), "c extern "C" { extern void mp_rendezvous_no_intrs(void (*func)(void *), void *arg); + extern void mp_rendezvous(void (*setup_func)(void *), + void (*action_func)(void *), + void (*teardown_func)(void *), + void *arg); + + extern int cpu_number(void); } @@ -184,7 +190,10 @@ IOReturn PcmMsrDriverClassName::buildTopology(topologyEntry* odata, uint32_t inp return kIOReturnNoMemory; } - mp_rendezvous_no_intrs(cpuGetTopoData, (void*)topologies); + mp_rendezvous(nullptr, + cpuGetTopoData, + nullptr, + (void*)topologies); for(uint32_t i = 0; i < num_cores && i < input_num_cores; i++) {