mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
x86/apic/32: Avoid bogus LDR warnings
commitfe6f85ca12upstream. The removal of the LDR initialization in the bigsmp_32 APIC code unearthed a problem in setup_local_APIC(). The code checks unconditionally for a mismatch of the logical APIC id by comparing the early APIC id which was initialized in get_smp_config() with the actual LDR value in the APIC. Due to the removal of the bogus LDR initialization the check now can trigger on bigsmp_32 APIC systems emitting a warning for every booting CPU. This is of course a false positive because the APIC is not using logical destination mode. Restrict the check and the possibly resulting fixup to systems which are actually using the APIC in logical destination mode. [ tglx: Massaged changelog and added Cc stable ] Fixes:bae3a8d330("x86/apic: Do not initialize LDR and DFR for bigsmp") Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/666d8f91-b5a8-1afd-7add-821e72a35f03@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1f76565c1d
commit
dcc0bed1d3
@@ -1573,9 +1573,6 @@ static void setup_local_APIC(void)
|
|||||||
{
|
{
|
||||||
int cpu = smp_processor_id();
|
int cpu = smp_processor_id();
|
||||||
unsigned int value;
|
unsigned int value;
|
||||||
#ifdef CONFIG_X86_32
|
|
||||||
int logical_apicid, ldr_apicid;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if (disable_apic) {
|
if (disable_apic) {
|
||||||
@@ -1616,16 +1613,21 @@ static void setup_local_APIC(void)
|
|||||||
apic->init_apic_ldr();
|
apic->init_apic_ldr();
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
/*
|
if (apic->dest_logical) {
|
||||||
* APIC LDR is initialized. If logical_apicid mapping was
|
int logical_apicid, ldr_apicid;
|
||||||
* initialized during get_smp_config(), make sure it matches the
|
|
||||||
* actual value.
|
/*
|
||||||
*/
|
* APIC LDR is initialized. If logical_apicid mapping was
|
||||||
logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu);
|
* initialized during get_smp_config(), make sure it matches
|
||||||
ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
|
* the actual value.
|
||||||
WARN_ON(logical_apicid != BAD_APICID && logical_apicid != ldr_apicid);
|
*/
|
||||||
/* always use the value from LDR */
|
logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu);
|
||||||
early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid;
|
ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
|
||||||
|
if (logical_apicid != BAD_APICID)
|
||||||
|
WARN_ON(logical_apicid != ldr_apicid);
|
||||||
|
/* Always use the value from LDR. */
|
||||||
|
early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user