x86: IO-APIC cleanup
PATCH 7/11 x86: IO-APIC cleanup
Remove unused and pointless bits from IO-APIC handling code. Move whatever possible into .init.*, and some data items into .data.read_mostly. Adjust some types.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/apic.c +0 -1
@@ -355,7 +355,6 @@ void disable_local_APIC(void) } } -extern int ioapic_ack_new;/* * This is to verify that we're looking at a real local APIC. * Check these against your board if the CPUs aren't getting
xen/arch/x86/i8259.c +1 -1
@@ -129,7 +129,7 @@ static unsigned int cached_irq_mask = 0x* this 'mixed mode' IRQ handling costs nothing because it's only used * at IRQ setup time. */ -unsigned long io_apic_irqs; +unsigned int __read_mostly io_apic_irqs;void disable_8259A_irq (unsigned int irq) {
xen/arch/x86/io_apic.c +7 -13
@@ -44,13 +44,14 @@ static struct { int pin, apic; } ioapic_static DEFINE_SPINLOCK (ioapic_lock);bool_t __read_mostly skip_ioapic_setup; +bool_t __read_mostly ioapic_ack_new =1 ;#ifndef sis_apic_bug/* * Is the SiS APIC rmw bug present? * -1 = don't know, 0 = no, 1 = yes */ -int sis_apic_bug =-1 ; +s8 __read_mostly sis_apic_bug =-1 ;#endif /*
@@ -76,7 +77,7 @@ int __read_mostly nr_ioapics;static struct irq_pin_list {int apic, pin;unsigned int next; -} *irq_2_pin; +} *__read_mostly irq_2_pin;static unsigned int irq_2_pin_free_entry;
@@ -1191,7 +1192,7 @@ static void /*__init*/ __print_IO_APIC(vreturn ; } -void print_IO_APIC (void ) +static void __init print_IO_APIC (void ) {if (apic_verbosity !=APIC_QUIET )__print_IO_APIC ();
@@ -1321,7 +1322,6 @@ void disable_IO_APIC(void)* by Matt Domsch <[email protected]> Tue Dec 21 12:25:05 CST 1999 */ -#ifndef CONFIG_X86_NUMAQ static void __init setup_ioapic_ids_from_mpc (void ) {union IO_APIC_reg_00 reg_00;
@@ -1428,9 +1428,6 @@ static void __init setup_ioapic_ids_fromapic_printk (APIC_VERBOSE ," ok.\n" ); } } -#else -static void __init setup_ioapic_ids_from_mpc (void ) { } -#endif /* * There is a nasty bug in some older SMP boards, their mptable lies
@@ -1546,8 +1543,7 @@ static unsigned int startup_level_ioapicreturn 0 ;/* don't check for pending */ } -int __read_mostly ioapic_ack_new =1 ; -static void setup_ioapic_ack (char *s) +static void __init setup_ioapic_ack (char *s) {if ( !strcmp (s,"old" ) ) ioapic_ack_new =0 ;
@@ -1716,9 +1712,7 @@ static void disable_edge_ioapic_irq(unsi { } -static void end_edge_ioapic_irq (unsigned int irq) - { - } +#define end_edge_ioapic_irq disable_edge_ioapic_irq/* * Level and edge triggered IO-APIC interrupts need different handling,
@@ -1820,7 +1814,7 @@ static void ack_lapic_irq(unsigned int iack_APIC_irq (); } -static void end_lapic_irq (unsigned int irq) {/* nothing */ } +#define end_lapic_irq end_edge_ioapic_irqstatic hw_irq_controller lapic_irq_type = { .typename ="local-APIC-edge" ,
xen/arch/x86/irq.c +0 -1
@@ -1092,7 +1092,6 @@ int pirq_guest_unmask(struct domain *d)return 0 ; } -extern int ioapic_ack_new;static int pirq_acktype (struct domain *d,int pirq) {struct irq_desc *desc;
xen/include/asm-x86/io_apic.h +2 -1
@@ -169,7 +169,7 @@ static inline void io_apic_eoi(unsigned* Older SiS APIC requires we rewrite the index regiser */ #ifdef __i386__ -extern int sis_apic_bug; +extern s8 sis_apic_bug;#else #define sis_apic_bug 0#endif
@@ -184,6 +184,7 @@ static inline void io_apic_modify(unsign/* 1 if "noapic" boot option passed */ extern bool_t skip_ioapic_setup; +extern s8 ioapic_ack_new;#ifdef CONFIG_ACPI_BOOT extern int io_apic_get_unique_id (int ioapic,int apic_id);
xen/include/asm-x86/irq.h +1 -2
@@ -99,10 +99,9 @@ int i8259A_resume(void);void setup_IO_APIC (void );void disable_IO_APIC (void ); -void print_IO_APIC (void );void setup_ioapic_dest (void ); -extern unsigned long io_apic_irqs; +extern unsigned int io_apic_irqs; DECLARE_PER_CPU(unsigned int, irq_count);
Remove unused and pointless bits from IO-APIC handling code. Move whatever possible into .init.*, and some data items into .data.read_mostly. Adjust some types.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/apic.c +0 -1
@@ -355,7 +355,6 @@ void disable_local_APIC(void) } } -extern int ioapic_ack_new;/* * This is to verify that we're looking at a real local APIC. * Check these against your board if the CPUs aren't getting
xen/arch/x86/i8259.c +1 -1
@@ -129,7 +129,7 @@ static unsigned int cached_irq_mask = 0x* this 'mixed mode' IRQ handling costs nothing because it's only used * at IRQ setup time. */ -unsigned long io_apic_irqs; +unsigned int __read_mostly io_apic_irqs;void disable_8259A_irq (unsigned int irq) {
xen/arch/x86/io_apic.c +7 -13
@@ -44,13 +44,14 @@ static struct { int pin, apic; } ioapic_static DEFINE_SPINLOCK (ioapic_lock);bool_t __read_mostly skip_ioapic_setup; +bool_t __read_mostly ioapic_ack_new =1 ;#ifndef sis_apic_bug/* * Is the SiS APIC rmw bug present? * -1 = don't know, 0 = no, 1 = yes */ -int sis_apic_bug =-1 ; +s8 __read_mostly sis_apic_bug =-1 ;#endif /*
@@ -76,7 +77,7 @@ int __read_mostly nr_ioapics;static struct irq_pin_list {int apic, pin;unsigned int next; -} *irq_2_pin; +} *__read_mostly irq_2_pin;static unsigned int irq_2_pin_free_entry;
@@ -1191,7 +1192,7 @@ static void /*__init*/ __print_IO_APIC(vreturn ; } -void print_IO_APIC (void ) +static void __init print_IO_APIC (void ) {if (apic_verbosity !=APIC_QUIET )__print_IO_APIC ();
@@ -1321,7 +1322,6 @@ void disable_IO_APIC(void)* by Matt Domsch <[email protected]> Tue Dec 21 12:25:05 CST 1999 */ -#ifndef CONFIG_X86_NUMAQ static void __init setup_ioapic_ids_from_mpc (void ) {union IO_APIC_reg_00 reg_00;
@@ -1428,9 +1428,6 @@ static void __init setup_ioapic_ids_fromapic_printk (APIC_VERBOSE ," ok.\n" ); } } -#else -static void __init setup_ioapic_ids_from_mpc (void ) { } -#endif /* * There is a nasty bug in some older SMP boards, their mptable lies
@@ -1546,8 +1543,7 @@ static unsigned int startup_level_ioapicreturn 0 ;/* don't check for pending */ } -int __read_mostly ioapic_ack_new =1 ; -static void setup_ioapic_ack (char *s) +static void __init setup_ioapic_ack (char *s) {if ( !strcmp (s,"old" ) ) ioapic_ack_new =0 ;
@@ -1716,9 +1712,7 @@ static void disable_edge_ioapic_irq(unsi { } -static void end_edge_ioapic_irq (unsigned int irq) - { - } +#define end_edge_ioapic_irq disable_edge_ioapic_irq/* * Level and edge triggered IO-APIC interrupts need different handling,
@@ -1820,7 +1814,7 @@ static void ack_lapic_irq(unsigned int iack_APIC_irq (); } -static void end_lapic_irq (unsigned int irq) {/* nothing */ } +#define end_lapic_irq end_edge_ioapic_irqstatic hw_irq_controller lapic_irq_type = { .typename ="local-APIC-edge" ,
xen/arch/x86/irq.c +0 -1
@@ -1092,7 +1092,6 @@ int pirq_guest_unmask(struct domain *d)return 0 ; } -extern int ioapic_ack_new;static int pirq_acktype (struct domain *d,int pirq) {struct irq_desc *desc;
xen/include/asm-x86/io_apic.h +2 -1
@@ -169,7 +169,7 @@ static inline void io_apic_eoi(unsigned* Older SiS APIC requires we rewrite the index regiser */ #ifdef __i386__ -extern int sis_apic_bug; +extern s8 sis_apic_bug;#else #define sis_apic_bug 0#endif
@@ -184,6 +184,7 @@ static inline void io_apic_modify(unsign/* 1 if "noapic" boot option passed */ extern bool_t skip_ioapic_setup; +extern s8 ioapic_ack_new;#ifdef CONFIG_ACPI_BOOT extern int io_apic_get_unique_id (int ioapic,int apic_id);
xen/include/asm-x86/irq.h +1 -2
@@ -99,10 +99,9 @@ int i8259A_resume(void);void setup_IO_APIC (void );void disable_IO_APIC (void ); -void print_IO_APIC (void );void setup_ioapic_dest (void ); -extern unsigned long io_apic_irqs; +extern unsigned int io_apic_irqs; DECLARE_PER_CPU(unsigned int, irq_count);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel