diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-02-15 05:54:03 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-16 03:36:58 -0500 |
commit | 3bd25d0fa3ed588a6735b815cb0c146c23888ace (patch) | |
tree | e2d3e2f4bccc519d712e0efb6ae674b0f86551e3 /arch/x86/kernel/io_apic.c | |
parent | 88d0f550d71493cd975a11a03c166211b2f3bd32 (diff) |
x86: pre init pirq_entries[]
Impact: cleanup
set default value early - this allows the removal of a number
of dynamic initialization codepaths, and an #ifdef.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic.c')
-rw-r--r-- | arch/x86/kernel/io_apic.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index 0b7cde3da48b..a89878e08a42 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -813,8 +813,9 @@ static void clear_IO_APIC (void) | |||
813 | */ | 813 | */ |
814 | 814 | ||
815 | #define MAX_PIRQS 8 | 815 | #define MAX_PIRQS 8 |
816 | static int pirq_entries [MAX_PIRQS]; | 816 | static int pirq_entries[MAX_PIRQS] = { |
817 | static int pirqs_enabled; | 817 | [0 ... MAX_PIRQS - 1] = -1 |
818 | }; | ||
818 | 819 | ||
819 | static int __init ioapic_pirq_setup(char *str) | 820 | static int __init ioapic_pirq_setup(char *str) |
820 | { | 821 | { |
@@ -823,10 +824,6 @@ static int __init ioapic_pirq_setup(char *str) | |||
823 | 824 | ||
824 | get_options(str, ARRAY_SIZE(ints), ints); | 825 | get_options(str, ARRAY_SIZE(ints), ints); |
825 | 826 | ||
826 | for (i = 0; i < MAX_PIRQS; i++) | ||
827 | pirq_entries[i] = -1; | ||
828 | |||
829 | pirqs_enabled = 1; | ||
830 | apic_printk(APIC_VERBOSE, KERN_INFO | 827 | apic_printk(APIC_VERBOSE, KERN_INFO |
831 | "PIRQ redirection, working around broken MP-BIOS.\n"); | 828 | "PIRQ redirection, working around broken MP-BIOS.\n"); |
832 | max = MAX_PIRQS; | 829 | max = MAX_PIRQS; |
@@ -1976,13 +1973,6 @@ void __init enable_IO_APIC(void) | |||
1976 | int apic; | 1973 | int apic; |
1977 | unsigned long flags; | 1974 | unsigned long flags; |
1978 | 1975 | ||
1979 | #ifdef CONFIG_X86_32 | ||
1980 | int i; | ||
1981 | if (!pirqs_enabled) | ||
1982 | for (i = 0; i < MAX_PIRQS; i++) | ||
1983 | pirq_entries[i] = -1; | ||
1984 | #endif | ||
1985 | |||
1986 | /* | 1976 | /* |
1987 | * The number of IO-APIC IRQ registers (== #pins): | 1977 | * The number of IO-APIC IRQ registers (== #pins): |
1988 | */ | 1978 | */ |