[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: IO-APIC cleanup
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxxxx> # Date 1299688138 0 # Node ID ba1685bc3ebfeecda9a77e87e2bdce3c06cfa225 # Parent cf165e83b8e3abe3a44bfd7e67825cc3e3d98111 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 <jbeulich@xxxxxxxxxx> --- diff -r cf165e83b8e3 -r ba1685bc3ebf xen/arch/x86/apic.c --- a/xen/arch/x86/apic.c Wed Mar 09 16:23:41 2011 +0000 +++ b/xen/arch/x86/apic.c Wed Mar 09 16:28:58 2011 +0000 @@ -355,7 +355,6 @@ } } -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 diff -r cf165e83b8e3 -r ba1685bc3ebf xen/arch/x86/i8259.c --- a/xen/arch/x86/i8259.c Wed Mar 09 16:23:41 2011 +0000 +++ b/xen/arch/x86/i8259.c Wed Mar 09 16:28:58 2011 +0000 @@ -129,7 +129,7 @@ * 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) { diff -r cf165e83b8e3 -r ba1685bc3ebf xen/arch/x86/io_apic.c --- a/xen/arch/x86/io_apic.c Wed Mar 09 16:23:41 2011 +0000 +++ b/xen/arch/x86/io_apic.c Wed Mar 09 16:28:58 2011 +0000 @@ -44,13 +44,14 @@ 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 @@ 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 @@ return; } -void print_IO_APIC(void) +static void __init print_IO_APIC(void) { if (apic_verbosity != APIC_QUIET) __print_IO_APIC(); @@ -1321,7 +1322,6 @@ * by Matt Domsch <Matt_Domsch@xxxxxxxx> 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 @@ apic_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 @@ return 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 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 @@ ack_APIC_irq(); } -static void end_lapic_irq(unsigned int irq) { /* nothing */ } +#define end_lapic_irq end_edge_ioapic_irq static hw_irq_controller lapic_irq_type = { .typename = "local-APIC-edge", diff -r cf165e83b8e3 -r ba1685bc3ebf xen/arch/x86/irq.c --- a/xen/arch/x86/irq.c Wed Mar 09 16:23:41 2011 +0000 +++ b/xen/arch/x86/irq.c Wed Mar 09 16:28:58 2011 +0000 @@ -1092,7 +1092,6 @@ return 0; } -extern int ioapic_ack_new; static int pirq_acktype(struct domain *d, int pirq) { struct irq_desc *desc; diff -r cf165e83b8e3 -r ba1685bc3ebf xen/include/asm-x86/io_apic.h --- a/xen/include/asm-x86/io_apic.h Wed Mar 09 16:23:41 2011 +0000 +++ b/xen/include/asm-x86/io_apic.h Wed Mar 09 16:28:58 2011 +0000 @@ -169,7 +169,7 @@ * 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 @@ /* 1 if "noapic" boot option passed */ extern bool_t skip_ioapic_setup; +extern bool_t ioapic_ack_new; #ifdef CONFIG_ACPI_BOOT extern int io_apic_get_unique_id (int ioapic, int apic_id); diff -r cf165e83b8e3 -r ba1685bc3ebf xen/include/asm-x86/irq.h --- a/xen/include/asm-x86/irq.h Wed Mar 09 16:23:41 2011 +0000 +++ b/xen/include/asm-x86/irq.h Wed Mar 09 16:28:58 2011 +0000 @@ -99,10 +99,9 @@ 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-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |