+ paravirt-interrupts-subarch-cleanup.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     paravirt: interrupts subarch cleanup

has been added to the -mm tree.  Its filename is

     paravirt-interrupts-subarch-cleanup.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: paravirt: interrupts subarch cleanup
From: Zachary Amsden <zach@xxxxxxxxxx>

A brave attempt to be rid of an unnecessary subarch hook and clean things up a
bit.  First, all subarches use IRQ-2 as a cascade IRQ.  So do that in the
common code.  Second, there is no need for a pre_intr_init_hook.  We can set
up the interrupt gates at any time, as this doesn't touch any real hardware,
just the processor gates.  Now the subarch code still needs to setup the
appropriate irq descriptors, fill in any custom interrupt gates, and
initialize controllers, but it can do that all at once.

This removes the need for a pre_intr_init_hook.  The fpu_irq change is a nop -
it just looks nicer.

Signed-off-by: Zachary Amsden <zach@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxx>
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/i8259.c          |   26 ++++++++++++++++++------
 arch/i386/mach-default/setup.c    |   30 +++-------------------------
 arch/i386/mach-visws/setup.c      |    9 --------
 arch/i386/mach-visws/visws_apic.c |    7 ------
 arch/i386/mach-voyager/setup.c    |   13 ------------
 include/asm-i386/arch_hooks.h     |    1 
 6 files changed, 26 insertions(+), 60 deletions(-)

diff -puN arch/i386/kernel/i8259.c~paravirt-interrupts-subarch-cleanup arch/i386/kernel/i8259.c
--- a/arch/i386/kernel/i8259.c~paravirt-interrupts-subarch-cleanup
+++ a/arch/i386/kernel/i8259.c
@@ -350,7 +350,18 @@ static irqreturn_t math_error_irq(int cp
  * New motherboards sometimes make IRQ 13 be a PCI interrupt,
  * so allow interrupt sharing.
  */
-static struct irqaction fpu_irq = { math_error_irq, 0, CPU_MASK_NONE, "fpu", NULL, NULL };
+static struct irqaction fpu_irq = {
+	.handler =	math_error_irq,
+	.name =		"fpu"
+};
+
+/*
+ * Most legacy systems want to cascade IRQ2 to slave PIC
+ */
+static struct irqaction cascade_action = {
+	.handler = 	no_action,
+	.name =		"cascade",
+};
 
 void __init init_ISA_irqs (void)
 {
@@ -385,9 +396,6 @@ void __init init_IRQ(void)
 {
 	int i;
 
-	/* all the set up before the call gates are initialised */
-	pre_intr_init_hook();
-
 	/*
 	 * Cover the whole vector space, no vector can escape
 	 * us. (some of these will be overridden and become
@@ -401,10 +409,16 @@ void __init init_IRQ(void)
 			set_intr_gate(vector, interrupt[i]);
 	}
 
-	/* setup after call gates are initialised (usually add in
-	 * the architecture specific gates)
+	/*
+	 * setup after interrupt gates are initialised (usually add in
+	 * the architecture specific gates) and initialize controllers
 	 */
 	intr_init_hook();
+#ifdef CONFIG_X86_LOCAL_APIC
+	apic_intr_init();
+#endif
+	if (!acpi_ioapic)
+		setup_irq(2, &cascade_action);
 
 	/*
 	 * Set the clock to HZ Hz, we already have a valid
diff -puN arch/i386/mach-default/setup.c~paravirt-interrupts-subarch-cleanup arch/i386/mach-default/setup.c
--- a/arch/i386/mach-default/setup.c~paravirt-interrupts-subarch-cleanup
+++ a/arch/i386/mach-default/setup.c
@@ -18,24 +18,6 @@
 
 int no_broadcast=DEFAULT_SEND_IPI;
 
-/**
- * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
- *
- * Description:
- *	Perform any necessary interrupt initialisation prior to setting up
- *	the "ordinary" interrupt call gates.  For legacy reasons, the ISA
- *	interrupts should be initialised here if the machine emulates a PC
- *	in any way.
- **/
-void __init pre_intr_init_hook(void)
-{
-	init_ISA_irqs();
-}
-
-/*
- * IRQ2 is cascade interrupt to second interrupt controller
- */
-static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
 
 /**
  * intr_init_hook - post gate setup interrupt initialisation
@@ -43,17 +25,13 @@ static struct irqaction irq2 = { no_acti
  * Description:
  *	Fill in any interrupts that may have been left out by the general
  *	init_IRQ() routine.  interrupts having to do with the machine rather
- *	than the devices on the I/O bus (like APIC interrupts in intel MP
- *	systems) are started here.
+ *	than the devices on the I/O bus are started here.  For legacy reasons,
+ *	the ISA interrupts should be initialised here if the machine emulates
+ *	a PC in any way.
  **/
 void __init intr_init_hook(void)
 {
-#ifdef CONFIG_X86_LOCAL_APIC
-	apic_intr_init();
-#endif
-
-	if (!acpi_ioapic)
-		setup_irq(2, &irq2);
+	init_ISA_irqs();
 }
 
 /**
diff -puN arch/i386/mach-visws/setup.c~paravirt-interrupts-subarch-cleanup arch/i386/mach-visws/setup.c
--- a/arch/i386/mach-visws/setup.c~paravirt-interrupts-subarch-cleanup
+++ a/arch/i386/mach-visws/setup.c
@@ -96,16 +96,9 @@ void __init visws_get_board_type_and_rev
 		"unknown")), visws_board_rev);
 }
 
-void __init pre_intr_init_hook(void)
-{
-	init_VISWS_APIC_irqs();
-}
-
 void __init intr_init_hook(void)
 {
-#ifdef CONFIG_X86_LOCAL_APIC
-	apic_intr_init();
-#endif
+	init_VISWS_APIC_irqs();
 }
 
 void __init pre_setup_arch_hook()
diff -puN arch/i386/mach-visws/visws_apic.c~paravirt-interrupts-subarch-cleanup arch/i386/mach-visws/visws_apic.c
--- a/arch/i386/mach-visws/visws_apic.c~paravirt-interrupts-subarch-cleanup
+++ a/arch/i386/mach-visws/visws_apic.c
@@ -261,12 +261,6 @@ static struct irqaction master_action = 
 	.name =		"PIIX4-8259",
 };
 
-static struct irqaction cascade_action = {
-	.handler = 	no_action,
-	.name =		"cascade",
-};
-
-
 void init_VISWS_APIC_irqs(void)
 {
 	int i;
@@ -297,5 +291,4 @@ void init_VISWS_APIC_irqs(void)
 	}
 
 	setup_irq(CO_IRQ_8259, &master_action);
-	setup_irq(2, &cascade_action);
 }
diff -puN arch/i386/mach-voyager/setup.c~paravirt-interrupts-subarch-cleanup arch/i386/mach-voyager/setup.c
--- a/arch/i386/mach-voyager/setup.c~paravirt-interrupts-subarch-cleanup
+++ a/arch/i386/mach-voyager/setup.c
@@ -10,23 +10,12 @@
 #include <asm/io.h>
 #include <asm/setup.h>
 
-void __init pre_intr_init_hook(void)
-{
-	init_ISA_irqs();
-}
-
-/*
- * IRQ2 is cascade interrupt to second interrupt controller
- */
-static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
-
 void __init intr_init_hook(void)
 {
+	init_ISA_irqs();
 #ifdef CONFIG_SMP
 	smp_intr_init();
 #endif
-
-	setup_irq(2, &irq2);
 }
 
 void __init pre_setup_arch_hook(void)
diff -puN include/asm-i386/arch_hooks.h~paravirt-interrupts-subarch-cleanup include/asm-i386/arch_hooks.h
--- a/include/asm-i386/arch_hooks.h~paravirt-interrupts-subarch-cleanup
+++ a/include/asm-i386/arch_hooks.h
@@ -18,7 +18,6 @@ extern irqreturn_t timer_interrupt(int i
 
 /* these are the defined hooks */
 extern void intr_init_hook(void);
-extern void pre_intr_init_hook(void);
 extern void pre_setup_arch_hook(void);
 extern void trap_init_hook(void);
 extern void time_init_hook(void);
_

Patches currently in -mm which might be from zach@xxxxxxxxxx are

fix-potential-interrupts-during-alternative-patching-was.patch
i386-pda-basic-definitions-for-i386-pda.patch
i386-pda-initialize-the-per-cpu-data-area.patch
i386-pda-use-%gs-as-the-pda-base-segment-in-the-kernel.patch
i386-pda-fix-places-where-using-%gs-changes-the-usermode-abi.patch
i386-pda-update-sys_vm86-to-cope-with-changed-pt_regs-and-%gs-usage.patch
i386-pda-implement-smp_processor_id-with-the-pda.patch
i386-pda-implement-current-with-the-pda.patch
paravirt-skip-timer-works.patch
paravirt-skip-timer-works-tidy.patch
paravirt-interrupts-subarch-cleanup.patch
paravirt-fix-missing-pte-update.patch
paravirt-fix-bad-mmu-names.patch
paravirt-mmu-header-movement.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux