Skip to content

Commit

Permalink
Do not disable interrupts when building topology
Browse files Browse the repository at this point in the history
  • Loading branch information
nealsid committed Aug 31, 2022
1 parent 3aa0827 commit 8c0fcff
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/MacMSRDriver/PcmMsr/PcmMsr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -180,8 +186,12 @@ IOReturn PcmMsrDriverClassName::writeMSR(pcm_msr_data_t* idata){
return ret;
}

IOReturn PcmMsrDriverClassName::buildTopology(topologyEntry* odata, uint32_t input_num_cores){
mp_rendezvous_no_intrs(cpuGetTopoData, (void*)topologies);
IOReturn PcmMsrDriverClassName::buildTopology(topologyEntry* odata, uint32_t input_num_cores)
{
mp_rendezvous(nullptr,
cpuGetTopoData,
nullptr,
(void*)topologies);
for(uint32_t i = 0; i < num_cores && i < input_num_cores; i++)
{
odata[i].core_id = topologies[i].core_id;
Expand Down

0 comments on commit 8c0fcff

Please sign in to comment.