* [PATCH] arch/x86: Don't try to poke disabled/non-existent APIC
@ 2016-10-22 2:18 ` ville.syrjala
0 siblings, 0 replies; 4+ messages in thread
From: ville.syrjala @ 2016-10-22 2:18 UTC (permalink / raw)
To: linux-kernel
Cc: stable, Ingo Molnar, H. Peter Anvin, x86, Prarit Bhargava,
Peter Zijlstra, Len Brown, Borislav Petkov, Andi Kleen,
Jiri Olsa, Juergen Gross, dyoung, Eric Biederman, kexec,
Thomas Gleixner, Ville Syrjälä
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Apparently trying to poke a disabled or non-existent APIC
leads to a box that doesn't even boot. Let's not do that.
No real clue if this is the right fix, but at least my
P3 machine boots again.
Cc: stable@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: dyoung@redhat.com
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: kexec@lists.infradead.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 2a51fe083eba ("arch/x86: Handle non enumerated CPU after physical hotplug")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
arch/x86/kernel/smpboot.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 951f093a96fe..42f5eb7b4f6c 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void)
/* No boot processor was found in mptable or ACPI MADT */
if (!num_processors) {
- int apicid = boot_cpu_physical_apicid;
- int cpu = hard_smp_processor_id();
+ if (boot_cpu_has(X86_FEATURE_APIC)) {
+ int apicid = boot_cpu_physical_apicid;
+ int cpu = hard_smp_processor_id();
- pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
+ pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
- /* Make sure boot cpu is enumerated */
- if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
- apic->apic_id_valid(apicid))
- generic_processor_info(apicid, boot_cpu_apic_version);
+ /* Make sure boot cpu is enumerated */
+ if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
+ apic->apic_id_valid(apicid))
+ generic_processor_info(apicid, boot_cpu_apic_version);
+ }
if (!num_processors)
num_processors = 1;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] arch/x86: Don't try to poke disabled/non-existent APIC
@ 2016-10-22 2:18 ` ville.syrjala
0 siblings, 0 replies; 4+ messages in thread
From: ville.syrjala @ 2016-10-22 2:18 UTC (permalink / raw)
To: linux-kernel
Cc: Prarit Bhargava, Len Brown, Andi Kleen, Juergen Gross,
Peter Zijlstra, dyoung, x86, kexec, stable, Ingo Molnar,
Eric Biederman, H. Peter Anvin, Thomas Gleixner, Borislav Petkov,
Jiri Olsa, Ville Syrjälä
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Apparently trying to poke a disabled or non-existent APIC
leads to a box that doesn't even boot. Let's not do that.
No real clue if this is the right fix, but at least my
P3 machine boots again.
Cc: stable@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: dyoung@redhat.com
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: kexec@lists.infradead.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 2a51fe083eba ("arch/x86: Handle non enumerated CPU after physical hotplug")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
arch/x86/kernel/smpboot.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 951f093a96fe..42f5eb7b4f6c 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void)
/* No boot processor was found in mptable or ACPI MADT */
if (!num_processors) {
- int apicid = boot_cpu_physical_apicid;
- int cpu = hard_smp_processor_id();
+ if (boot_cpu_has(X86_FEATURE_APIC)) {
+ int apicid = boot_cpu_physical_apicid;
+ int cpu = hard_smp_processor_id();
- pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
+ pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
- /* Make sure boot cpu is enumerated */
- if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
- apic->apic_id_valid(apicid))
- generic_processor_info(apicid, boot_cpu_apic_version);
+ /* Make sure boot cpu is enumerated */
+ if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
+ apic->apic_id_valid(apicid))
+ generic_processor_info(apicid, boot_cpu_apic_version);
+ }
if (!num_processors)
num_processors = 1;
--
2.7.4
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arch/x86: Don't try to poke disabled/non-existent APIC
2016-10-22 2:18 ` ville.syrjala
@ 2016-10-25 18:32 ` Prarit Bhargava
-1 siblings, 0 replies; 4+ messages in thread
From: Prarit Bhargava @ 2016-10-25 18:32 UTC (permalink / raw)
To: ville.syrjala, linux-kernel
Cc: stable, Ingo Molnar, H. Peter Anvin, x86, Peter Zijlstra,
Len Brown, Borislav Petkov, Andi Kleen, Jiri Olsa, Juergen Gross,
dyoung, Eric Biederman, kexec, Thomas Gleixner
On 10/21/2016 10:18 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Apparently trying to poke a disabled or non-existent APIC
> leads to a box that doesn't even boot. Let's not do that.
>
> No real clue if this is the right fix, but at least my
> P3 machine boots again.
>
> Cc: stable@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> Cc: Prarit Bhargava <prarit@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: dyoung@redhat.com
> Cc: Eric Biederman <ebiederm@xmission.com>
> Cc: kexec@lists.infradead.org
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Fixes: 2a51fe083eba ("arch/x86: Handle non enumerated CPU after physical hotplug")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> arch/x86/kernel/smpboot.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 951f093a96fe..42f5eb7b4f6c 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void)
>
> /* No boot processor was found in mptable or ACPI MADT */
> if (!num_processors) {
> - int apicid = boot_cpu_physical_apicid;
> - int cpu = hard_smp_processor_id();
> + if (boot_cpu_has(X86_FEATURE_APIC)) {
It looks okay to gate on X86_FEATURE_APIC, but not sure if it should be
cpu_has(&cpu_data(0), X86_FEATURE_APIC)
since smp_store_boot_cpu_info() was already called.
tglx?
P.
> + int apicid = boot_cpu_physical_apicid;
> + int cpu = hard_smp_processor_id();
>
> - pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
> + pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
>
> - /* Make sure boot cpu is enumerated */
> - if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
> - apic->apic_id_valid(apicid))
> - generic_processor_info(apicid, boot_cpu_apic_version);
> + /* Make sure boot cpu is enumerated */
> + if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
> + apic->apic_id_valid(apicid))
> + generic_processor_info(apicid, boot_cpu_apic_version);
> + }
>
> if (!num_processors)
> num_processors = 1;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arch/x86: Don't try to poke disabled/non-existent APIC
@ 2016-10-25 18:32 ` Prarit Bhargava
0 siblings, 0 replies; 4+ messages in thread
From: Prarit Bhargava @ 2016-10-25 18:32 UTC (permalink / raw)
To: ville.syrjala, linux-kernel
Cc: Juergen Gross, Len Brown, Andi Kleen, Peter Zijlstra, dyoung,
x86, kexec, stable, Ingo Molnar, Eric Biederman, H. Peter Anvin,
Thomas Gleixner, Borislav Petkov, Jiri Olsa
On 10/21/2016 10:18 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Apparently trying to poke a disabled or non-existent APIC
> leads to a box that doesn't even boot. Let's not do that.
>
> No real clue if this is the right fix, but at least my
> P3 machine boots again.
>
> Cc: stable@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> Cc: Prarit Bhargava <prarit@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: dyoung@redhat.com
> Cc: Eric Biederman <ebiederm@xmission.com>
> Cc: kexec@lists.infradead.org
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Fixes: 2a51fe083eba ("arch/x86: Handle non enumerated CPU after physical hotplug")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> arch/x86/kernel/smpboot.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 951f093a96fe..42f5eb7b4f6c 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void)
>
> /* No boot processor was found in mptable or ACPI MADT */
> if (!num_processors) {
> - int apicid = boot_cpu_physical_apicid;
> - int cpu = hard_smp_processor_id();
> + if (boot_cpu_has(X86_FEATURE_APIC)) {
It looks okay to gate on X86_FEATURE_APIC, but not sure if it should be
cpu_has(&cpu_data(0), X86_FEATURE_APIC)
since smp_store_boot_cpu_info() was already called.
tglx?
P.
> + int apicid = boot_cpu_physical_apicid;
> + int cpu = hard_smp_processor_id();
>
> - pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
> + pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
>
> - /* Make sure boot cpu is enumerated */
> - if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
> - apic->apic_id_valid(apicid))
> - generic_processor_info(apicid, boot_cpu_apic_version);
> + /* Make sure boot cpu is enumerated */
> + if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
> + apic->apic_id_valid(apicid))
> + generic_processor_info(apicid, boot_cpu_apic_version);
> + }
>
> if (!num_processors)
> num_processors = 1;
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-25 18:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22 2:18 [PATCH] arch/x86: Don't try to poke disabled/non-existent APIC ville.syrjala
2016-10-22 2:18 ` ville.syrjala
2016-10-25 18:32 ` Prarit Bhargava
2016-10-25 18:32 ` Prarit Bhargava
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.