Skip to content

Commit

Permalink
Merge pull request #23 from GeriGeriGeriGeri/patch-1
Browse files Browse the repository at this point in the history
Dual socket motherboard patch
  • Loading branch information
kevinlekiller authored May 9, 2020
2 parents f35dfb3 + 78a9826 commit 3986dc9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions amdctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,14 @@ void getCpuInfo() {
if (cpuModel == -1 || !cpuFamily || !cores) {
error("Could not find CPU family or model!");
}

// dual cpu or quad cpu motherboard patch.
int testcores=(int)sysconf(_SC_NPROCESSORS_CONF);
if(testcores>cores){
printf("Multi-CPU motherboard detected: CPU has %d cores, but there is a total %d cores in %d CPU sockets\n", cores, testcores, testcores/cores);
cores=testcores;
}

}

void checkFamily() {
Expand Down

0 comments on commit 3986dc9

Please sign in to comment.