aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@gmail.com>2018-03-18 01:47:05 -0700
committerMarat Dukhan <maratek@gmail.com>2018-03-18 01:47:10 -0700
commit90883359aa0b14851291022de85850bd3d9fed60 (patch)
tree8e6feeb35cb29bafc478f851d09078abef45e485 /src
parent843584527c4c28b514ce67b04c79cad91876b000 (diff)
downloadcpuinfo-90883359aa0b14851291022de85850bd3d9fed60.tar.gz
Fix bug in initialization of processor->cache pointers on Mach
Diffstat (limited to 'src')
-rw-r--r--src/x86/mach/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/x86/mach/init.c b/src/x86/mach/init.c
index 0f0201e..a319d18 100644
--- a/src/x86/mach/init.c
+++ b/src/x86/mach/init.c
@@ -231,7 +231,7 @@ void cpuinfo_x86_mach_init(void) {
};
}
for (uint32_t t = 0; t < mach_topology.threads; t++) {
- processors[t].cache.l2 = &l2[t / threads_per_l1];
+ processors[t].cache.l2 = &l2[t / threads_per_l2];
}
}
@@ -255,7 +255,7 @@ void cpuinfo_x86_mach_init(void) {
};
}
for (uint32_t t = 0; t < mach_topology.threads; t++) {
- processors[t].cache.l3 = &l3[t / threads_per_l1];
+ processors[t].cache.l3 = &l3[t / threads_per_l3];
}
}
@@ -279,7 +279,7 @@ void cpuinfo_x86_mach_init(void) {
};
}
for (uint32_t t = 0; t < mach_topology.threads; t++) {
- processors[t].cache.l4 = &l4[t / threads_per_l1];
+ processors[t].cache.l4 = &l4[t / threads_per_l4];
}
}