diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2011-05-18 19:31:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-20 07:41:02 -0400 |
commit | 8f18c9711ed31c257d4f00a094b2fdbe72a741da (patch) | |
tree | d6a68835e26df4f4eb802e36b54fa719cadd075e | |
parent | c040aaeb86f66e956e147ce5f238d28308e06109 (diff) |
x86, ioapic: Consolidate mp_ioapic_routing[] into 'struct ioapic'
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: daniel.blueman@gmail.com
Link: http://lkml.kernel.org/r/20110518233158.089978277@sbsiddha-MOBL3.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index b7dd2338502d..9488dcff7aec 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -89,6 +89,7 @@ static struct ioapic { | |||
89 | struct mpc_ioapic mp_config; | 89 | struct mpc_ioapic mp_config; |
90 | /* IO APIC gsi routing info */ | 90 | /* IO APIC gsi routing info */ |
91 | struct mp_ioapic_gsi gsi_config; | 91 | struct mp_ioapic_gsi gsi_config; |
92 | DECLARE_BITMAP(pin_programmed, MP_MAX_IOAPIC_PIN + 1); | ||
92 | } ioapics[MAX_IO_APICS]; | 93 | } ioapics[MAX_IO_APICS]; |
93 | 94 | ||
94 | #define mpc_ioapic_ver(id) ioapics[id].mp_config.apicver | 95 | #define mpc_ioapic_ver(id) ioapics[id].mp_config.apicver |
@@ -1356,10 +1357,6 @@ static void setup_ioapic_irq(int apic_id, int pin, unsigned int irq, | |||
1356 | ioapic_write_entry(apic_id, pin, entry); | 1357 | ioapic_write_entry(apic_id, pin, entry); |
1357 | } | 1358 | } |
1358 | 1359 | ||
1359 | static struct { | ||
1360 | DECLARE_BITMAP(pin_programmed, MP_MAX_IOAPIC_PIN + 1); | ||
1361 | } mp_ioapic_routing[MAX_IO_APICS]; | ||
1362 | |||
1363 | static bool __init io_apic_pin_not_connected(int idx, int apic_id, int pin) | 1360 | static bool __init io_apic_pin_not_connected(int idx, int apic_id, int pin) |
1364 | { | 1361 | { |
1365 | if (idx != -1) | 1362 | if (idx != -1) |
@@ -3540,14 +3537,14 @@ int io_apic_setup_irq_pin_once(unsigned int irq, int node, | |||
3540 | int ret; | 3537 | int ret; |
3541 | 3538 | ||
3542 | /* Avoid redundant programming */ | 3539 | /* Avoid redundant programming */ |
3543 | if (test_bit(pin, mp_ioapic_routing[id].pin_programmed)) { | 3540 | if (test_bit(pin, ioapics[id].pin_programmed)) { |
3544 | pr_debug("Pin %d-%d already programmed\n", | 3541 | pr_debug("Pin %d-%d already programmed\n", |
3545 | mpc_ioapic_id(id), pin); | 3542 | mpc_ioapic_id(id), pin); |
3546 | return 0; | 3543 | return 0; |
3547 | } | 3544 | } |
3548 | ret = io_apic_setup_irq_pin(irq, node, attr); | 3545 | ret = io_apic_setup_irq_pin(irq, node, attr); |
3549 | if (!ret) | 3546 | if (!ret) |
3550 | set_bit(pin, mp_ioapic_routing[id].pin_programmed); | 3547 | set_bit(pin, ioapics[id].pin_programmed); |
3551 | return ret; | 3548 | return ret; |
3552 | } | 3549 | } |
3553 | 3550 | ||