Skip to contentSkip to conversation

x86/apic: Justification for disabling IO APIC before Local APIC

PATCH In review Fenghua Yu 3 participants 4 messages Dec 5, 2013 x86

lore
Share & tools
lore

Fenghua Yu

author
#0 lore raw

PATCH 1/1 x86/apic: Justification for disabling IO APIC before Local APIC

From: Fenghua Yu <[email protected]>

Since erratum AVR31 in "Intel Atom Processor C2000 Product Family Specification Update" is published, I add a justification comment for disabling IO APIC before Local APIC (commit 522e6646).

---
 arch/x86/kernel/reboot.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/x86/kernel/reboot.c +11 -0
index da3c599..c752cb4 100644
@@ -558,6 +558,17 @@ void native_machine_shutdown(void)
 {
 	/* Stop the cpus and apics */
 #ifdef CONFIG_X86_IO_APIC
+	/*
+	 * Disabling IO APIC before local APIC is a workaround for
+	 * erratum AVR31 in "Intel Atom Processor C2000 Product Family
+	 * Specification Update". In this situation, interrupts that target
+	 * a Logical Processor whose Local APIC is either in the process of
+	 * being hardware disabled or software disabled are neither delivered
+	 * nor discarded. When this erratum occurs, the processor may hang.
+	 *
+	 * Even without the erratum, it still makes sense to quiet IO APIC
+	 * before disabling Local APIC.
+	 */
 	disable_IO_APIC();
 #endif
 
Signature · 1 line
1.8.1.2
#1 lore raw

[tip:x86/urgent] x86/apic, doc: Justification for disabling IO APIC before Local APIC

x86/apic, doc: Justification for disabling IO APIC before Local APIC
Commit-ID:  2885432aaf15c1b7e65c787bfe7c5fec428296f0
Gitweb:     http://git.kernel.org/tip/2885432aaf15c1b7e65c787bfe7c5fec428296f0
Author:     Fenghua Yu <[email protected]>
AuthorDate: Wed, 4 Dec 2013 16:07:49 -0800
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Wed, 4 Dec 2013 19:33:21 -0800

x86/apic, doc: Justification for disabling IO APIC before Local APIC

Since erratum AVR31 in "Intel Atom Processor C2000 Product Family Specification Update" is now published, I added a justification comment for disabling IO APIC before Local APIC, as changed in commit:

522e66464467 x86/apic: Disable I/O APIC before shutdown of the local APIC

---
 arch/x86/kernel/reboot.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/x86/kernel/reboot.c +11 -0
index da3c599..c752cb4 100644
@@ -558,6 +558,17 @@ void native_machine_shutdown(void)
 {
 	/* Stop the cpus and apics */
 #ifdef CONFIG_X86_IO_APIC
+	/*
+	 * Disabling IO APIC before local APIC is a workaround for
+	 * erratum AVR31 in "Intel Atom Processor C2000 Product Family
+	 * Specification Update". In this situation, interrupts that target
+	 * a Logical Processor whose Local APIC is either in the process of
+	 * being hardware disabled or software disabled are neither delivered
+	 * nor discarded. When this erratum occurs, the processor may hang.
+	 *
+	 * Even without the erratum, it still makes sense to quiet IO APIC
+	 * before disabling Local APIC.
+	 */
 	disable_IO_APIC();
 #endif
 
#2 lore raw
In reply to Fenghua Yu
Quoted 22 lines · Fenghua Yu

From: Fenghua Yu <[email protected]>

Since erratum AVR31 in "Intel Atom Processor C2000 Product Family Specification Update" is published, I add a justification comment for disabling IO APIC before Local APIC (commit 522e6646).

---
 arch/x86/kernel/reboot.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/x86/kernel/reboot.c +3 -0
index da3c599..c752cb4 100644
@@ -558,6 +558,17 @@ void native_machine_shutdown(void)
 {
 	/* Stop the cpus and apics */
 #ifdef CONFIG_X86_IO_APIC
+	/*
+	 * Disabling IO APIC before local APIC is a workaround for
+	 * erratum AVR31 in "Intel Atom Processor C2000 Product Family

arch/x86/kernel/reboot.c void native_machine_shutdown(void) · line 573

Quoted 10 lines
arch/x86/kernel/reboot.c +8 -0
+	 * Specification Update". In this situation, interrupts that target
+	 * a Logical Processor whose Local APIC is either in the process of
+	 * being hardware disabled or software disabled are neither delivered
+	 * nor discarded. When this erratum occurs, the processor may hang.
+	 *
+	 * Even without the erratum, it still makes sense to quiet IO APIC
+	 * before disabling Local APIC.
+	 */
 	disable_IO_APIC();
 #endif

Looks good to me, except that patch titles should start with verbs, i.e. something like:

x86/apic/doc: Add justification for disabling IO APIC before Local APIC

Which makes for a much more fluid reading of shortlogs etc.

Unless you sentences without verbs.

          ^-------------------------------------------like

;-)

Thanks,

Ingo

#3 lore raw
Quoted 22 lines

From: Ingo Molnar [mailto:[email protected]] On Behalf Of Ingo Molnar
Sent: Thursday, December 05, 2013 12:55 AM

Quoted 6 lines · Fenghua Yu

From: Fenghua Yu <[email protected]>

Since erratum AVR31 in "Intel Atom Processor C2000 Product Family Specification Update" is published, I add a justification comment for disabling IO APIC before Local APIC (commit 522e6646).

Looks good to me, except that patch titles should start with verbs, i.e. something like:

x86/apic/doc: Add justification for disabling IO APIC before Local
APIC

Which makes for a much more fluid reading of shortlogs etc.

Quoted 8 lines

Unless you sentences without verbs.

          ^-------------------------------------------like

;-)

Thanks,

Ingo

Thank you very much for your comment, Ingo.

-Fenghua