[PATCH 4.15 10/72] x86/platform/uv/BAU: Add APIC idt entry

2018-04-06 Thread Greg Kroah-Hartman
4.15-stable review patch.  If anyone has any objections, please let me know.

--

From: Andrew Banman 

commit 151ad17fbe5e56afa59709f41980508672c777ce upstream.

BAU uses the old alloc_initr_gate90 method to setup its interrupt. This
fails silently as the BAU vector is in the range of APIC vectors that are
registered to the spurious interrupt handler. As a consequence BAU
broadcasts are not handled, and the broadcast source CPU hangs.

Update BAU to use new idt structure.

Fixes: dc20b2d52653 ("x86/idt: Move interrupt gate initialization to IDT code")
Signed-off-by: Andrew Banman 
Signed-off-by: Thomas Gleixner 
Acked-by: Mike Travis 
Cc: Dimitri Sivanich 
Cc: Russ Anderson 
Cc: sta...@vger.kernel.org
Cc: "H. Peter Anvin" 
Link: 
https://lkml.kernel.org/r/1522188546-196177-1-git-send-email-aban...@hpe.com
Signed-off-by: Greg Kroah-Hartman 

---
 arch/x86/include/asm/hw_irq.h |1 +
 arch/x86/kernel/idt.c |3 +++
 arch/x86/platform/uv/tlb_uv.c |2 --
 3 files changed, 4 insertions(+), 2 deletions(-)

--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -36,6 +36,7 @@ extern asmlinkage void kvm_posted_intr_w
 extern asmlinkage void kvm_posted_intr_nested_ipi(void);
 extern asmlinkage void error_interrupt(void);
 extern asmlinkage void irq_work_interrupt(void);
+extern asmlinkage void uv_bau_message_intr1(void);
 
 extern asmlinkage void spurious_interrupt(void);
 extern asmlinkage void thermal_interrupt(void);
--- a/arch/x86/kernel/idt.c
+++ b/arch/x86/kernel/idt.c
@@ -140,6 +140,9 @@ static const __initconst struct idt_data
 # ifdef CONFIG_IRQ_WORK
INTG(IRQ_WORK_VECTOR,   irq_work_interrupt),
 # endif
+#ifdef CONFIG_X86_UV
+   INTG(UV_BAU_MESSAGE,uv_bau_message_intr1),
+#endif
INTG(SPURIOUS_APIC_VECTOR,  spurious_interrupt),
INTG(ERROR_APIC_VECTOR, error_interrupt),
 #endif
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -2254,8 +2254,6 @@ static int __init uv_bau_init(void)
init_uvhub(uvhub, vector, uv_base_pnode);
}
 
-   alloc_intr_gate(vector, uv_bau_message_intr1);
-
for_each_possible_blade(uvhub) {
if (uv_blade_nr_possible_cpus(uvhub)) {
unsigned long val;




[PATCH 4.15 10/72] x86/platform/uv/BAU: Add APIC idt entry

2018-04-06 Thread Greg Kroah-Hartman
4.15-stable review patch.  If anyone has any objections, please let me know.

--

From: Andrew Banman 

commit 151ad17fbe5e56afa59709f41980508672c777ce upstream.

BAU uses the old alloc_initr_gate90 method to setup its interrupt. This
fails silently as the BAU vector is in the range of APIC vectors that are
registered to the spurious interrupt handler. As a consequence BAU
broadcasts are not handled, and the broadcast source CPU hangs.

Update BAU to use new idt structure.

Fixes: dc20b2d52653 ("x86/idt: Move interrupt gate initialization to IDT code")
Signed-off-by: Andrew Banman 
Signed-off-by: Thomas Gleixner 
Acked-by: Mike Travis 
Cc: Dimitri Sivanich 
Cc: Russ Anderson 
Cc: sta...@vger.kernel.org
Cc: "H. Peter Anvin" 
Link: 
https://lkml.kernel.org/r/1522188546-196177-1-git-send-email-aban...@hpe.com
Signed-off-by: Greg Kroah-Hartman 

---
 arch/x86/include/asm/hw_irq.h |1 +
 arch/x86/kernel/idt.c |3 +++
 arch/x86/platform/uv/tlb_uv.c |2 --
 3 files changed, 4 insertions(+), 2 deletions(-)

--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -36,6 +36,7 @@ extern asmlinkage void kvm_posted_intr_w
 extern asmlinkage void kvm_posted_intr_nested_ipi(void);
 extern asmlinkage void error_interrupt(void);
 extern asmlinkage void irq_work_interrupt(void);
+extern asmlinkage void uv_bau_message_intr1(void);
 
 extern asmlinkage void spurious_interrupt(void);
 extern asmlinkage void thermal_interrupt(void);
--- a/arch/x86/kernel/idt.c
+++ b/arch/x86/kernel/idt.c
@@ -140,6 +140,9 @@ static const __initconst struct idt_data
 # ifdef CONFIG_IRQ_WORK
INTG(IRQ_WORK_VECTOR,   irq_work_interrupt),
 # endif
+#ifdef CONFIG_X86_UV
+   INTG(UV_BAU_MESSAGE,uv_bau_message_intr1),
+#endif
INTG(SPURIOUS_APIC_VECTOR,  spurious_interrupt),
INTG(ERROR_APIC_VECTOR, error_interrupt),
 #endif
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -2254,8 +2254,6 @@ static int __init uv_bau_init(void)
init_uvhub(uvhub, vector, uv_base_pnode);
}
 
-   alloc_intr_gate(vector, uv_bau_message_intr1);
-
for_each_possible_blade(uvhub) {
if (uv_blade_nr_possible_cpus(uvhub)) {
unsigned long val;