From 8091c1f8ea2374695c105591179b1269fb5f2fbb Mon Sep 17 00:00:00 2001 From: Andreas Ruprecht Date: Wed, 20 Aug 2014 10:16:01 +0200 Subject: x86/apic/uv: Remove unnecessary #ifdef In the file x2apic_uv_x.c, some code is compiled conditionally depending on CONFIG_SMP. However, the file is only built, if CONFIG_X86_UV is enabled. CONFIG_X86_UV depends on CONFIG_NUMA, which itself depends on CONFIG_SMP, so the #ifdef will always evaluate to true, if the file is compiled. Thus, it is unnecessary and can be removed. Signed-off-by: Andreas Ruprecht Cc: David Rientjes Cc: Dimitri Sivanich Cc: Hedi Berriche Cc: Linus Torvalds Cc: Mike Travis Cc: Russ Anderson Link: http://lkml.kernel.org/r/1408522561-23389-1-git-send-email-rupran@einserver.de Signed-off-by: Ingo Molnar diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 293b41d..2f1b5e0 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -204,7 +204,6 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second); static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip) { -#ifdef CONFIG_SMP unsigned long val; int pnode; @@ -223,7 +222,6 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip) uv_write_global_mmr64(pnode, UVH_IPI_INT, val); atomic_set(&init_deasserted, 1); -#endif return 0; } -- cgit v0.10.2 From d286c3af48e3ad187fc52a0060c71b0844f234ff Mon Sep 17 00:00:00 2001 From: Rakib Mullick Date: Fri, 19 Sep 2014 01:22:15 +0600 Subject: x86/mce: Avoid showing repetitive message from intel_init_thermal() intel_init_thermal() is called from a) at the time of system initializing and b) at the time of system resume to initialize thermal monitoring. In case when thermal monitoring is handled by SMI, we get to know it via printk(). Currently it gives the message at both cases, but its okay if we get it only once and no need to get the same message at every time system resumes. So, limit showing this message only at system boot time by avoid showing at system resume and reduce abusing kernel log buffer. Signed-off-by: Rakib Mullick Cc: Borislav Petkov Cc: Tony Luck Link: http://lkml.kernel.org/r/1411068135.5121.10.camel@localhost.localdomain Signed-off-by: Ingo Molnar diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 36a1bb6..1af51b1 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -498,8 +498,8 @@ void intel_init_thermal(struct cpuinfo_x86 *c) if ((l & MSR_IA32_MISC_ENABLE_TM1) && (h & APIC_DM_SMI)) { - printk(KERN_DEBUG - "CPU%d: Thermal monitoring handled by SMI\n", cpu); + if (system_state == SYSTEM_BOOTING) + printk(KERN_DEBUG "CPU%d: Thermal monitoring handled by SMI\n", cpu); return; } -- cgit v0.10.2 From f12c1f9002d27374fd205f6e692891116ca22272 Mon Sep 17 00:00:00 2001 From: Andy Lutomirski Date: Wed, 30 Jul 2014 14:59:49 -0700 Subject: x86/vdso: Fix vdso2c's special_pages[] error checking Stephen Rothwell's compiler did something amazing: it unrolled a loop, discovered that one iteration of that loop contained an always-true test, and emitted a warning that will IMO only serve to convince people to disable the warning. That bogus warning caused me to wonder what prompted such an absurdity from his compiler, and I discovered that the code in question was, in fact, completely wrong -- I was looking things up in the wrong array. This affects 3.16 as well, but the only effect is to screw up the error checking a bit. vdso2c's output is unaffected. Reported-by: Stephen Rothwell Signed-off-by: Andy Lutomirski Signed-off-by: Andrew Morton Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Linus Torvalds Link: http://lkml.kernel.org/r/53d96ad5.80ywqrbs33ZBCQej%25akpm@linux-foundation.org Signed-off-by: Ingo Molnar diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h index fd57829..0224987 100644 --- a/arch/x86/vdso/vdso2c.h +++ b/arch/x86/vdso/vdso2c.h @@ -109,16 +109,18 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len, /* Validate mapping addresses. */ for (i = 0; i < sizeof(special_pages) / sizeof(special_pages[0]); i++) { - if (!syms[i]) + INT_BITS symval = syms[special_pages[i]]; + + if (!symval) continue; /* The mapping isn't used; ignore it. */ - if (syms[i] % 4096) + if (symval % 4096) fail("%s must be a multiple of 4096\n", required_syms[i].name); - if (syms[sym_vvar_start] > syms[i] + 4096) - fail("%s underruns begin_vvar\n", + if (symval + 4096 < syms[sym_vvar_start]) + fail("%s underruns vvar_start\n", required_syms[i].name); - if (syms[i] + 4096 > 0) + if (symval + 4096 > 0) fail("%s is on the wrong side of the vdso text\n", required_syms[i].name); } -- cgit v0.10.2