提交 3bd25d0f 编写于 作者: Y Yinghai Lu 提交者: Ingo Molnar

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: NYinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 88d0f550
...@@ -813,8 +813,9 @@ static void clear_IO_APIC (void) ...@@ -813,8 +813,9 @@ static void clear_IO_APIC (void)
*/ */
#define MAX_PIRQS 8 #define MAX_PIRQS 8
static int pirq_entries [MAX_PIRQS]; static int pirq_entries[MAX_PIRQS] = {
static int pirqs_enabled; [0 ... MAX_PIRQS - 1] = -1
};
static int __init ioapic_pirq_setup(char *str) static int __init ioapic_pirq_setup(char *str)
{ {
...@@ -823,10 +824,6 @@ static int __init ioapic_pirq_setup(char *str) ...@@ -823,10 +824,6 @@ static int __init ioapic_pirq_setup(char *str)
get_options(str, ARRAY_SIZE(ints), ints); get_options(str, ARRAY_SIZE(ints), ints);
for (i = 0; i < MAX_PIRQS; i++)
pirq_entries[i] = -1;
pirqs_enabled = 1;
apic_printk(APIC_VERBOSE, KERN_INFO apic_printk(APIC_VERBOSE, KERN_INFO
"PIRQ redirection, working around broken MP-BIOS.\n"); "PIRQ redirection, working around broken MP-BIOS.\n");
max = MAX_PIRQS; max = MAX_PIRQS;
...@@ -1976,13 +1973,6 @@ void __init enable_IO_APIC(void) ...@@ -1976,13 +1973,6 @@ void __init enable_IO_APIC(void)
int apic; int apic;
unsigned long flags; unsigned long flags;
#ifdef CONFIG_X86_32
int i;
if (!pirqs_enabled)
for (i = 0; i < MAX_PIRQS; i++)
pirq_entries[i] = -1;
#endif
/* /*
* The number of IO-APIC IRQ registers (== #pins): * The number of IO-APIC IRQ registers (== #pins):
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册