Re: [PATCH v3] x86: move cacheinfo sysfs to generic cacheinfo infrastructure

Borislav Petkov
2015-03-05T08:18:13Z

On Wed, Mar 04, 2015 at 01:27:20PM +0100, Borislav Petkov wrote:
> Applied, thanks guys.

Ok, we forgot to add the same check in the cpu_has_topoext case in
__cache_amd_cpumap_setup() and my F15h exploded this morning:

---
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 54e43d58e714..8008bc2dd2d0 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -820,9 +820,13 @@ static int __cache_amd_cpumap_setup(unsigned int cpu, int index,

for_each_online_cpu(i) {
this_cpu_ci = get_cpu_cacheinfo(i);
+ if (!this_cpu_ci->info_list)
+ continue;
+
apicid = cpu_data(i).apicid;
if ((apicid < first) || (apicid > last))
continue;
+
this_leaf = this_cpu_ci->info_list + index;

for_each_online_cpu(sibling) {
---

I've folded the above into your patch.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--