Skip to content

Commit

Permalink
i386: Expose IOAPIC register definitions even if CONFIG_X86_IO_APIC i…
Browse files Browse the repository at this point in the history
…s not set

KVM reuses the IOAPIC register definitions, and needs them even if the
host is not compiled with IOAPIC support.  Move the #ifdef below so that only
the IOAPIC variables and functions are protected, and the register definitions
are available to all.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Oct 13, 2007
1 parent 752097c commit 81fe96b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/asm-x86/io_apic_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
* Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
*/

#ifdef CONFIG_X86_IO_APIC

/*
* The structure of the IO-APIC:
*/
Expand Down Expand Up @@ -55,12 +53,6 @@ union IO_APIC_reg_03 {
} __attribute__ ((packed)) bits;
};

/*
* # of IO-APICs and # of IRQ routing registers
*/
extern int nr_ioapics;
extern int nr_ioapic_registers[MAX_IO_APICS];

enum ioapic_irq_destination_types {
dest_Fixed = 0,
dest_LowestPrio = 1,
Expand Down Expand Up @@ -100,6 +92,14 @@ struct IO_APIC_route_entry {

} __attribute__ ((packed));

#ifdef CONFIG_X86_IO_APIC

/*
* # of IO-APICs and # of IRQ routing registers
*/
extern int nr_ioapics;
extern int nr_ioapic_registers[MAX_IO_APICS];

/*
* MP-BIOS irq configuration table structures:
*/
Expand Down

0 comments on commit 81fe96b

Please sign in to comment.