Skip to content

Commit

Permalink
x86: apic - unify disableapic and nolapic setup handlers
Browse files Browse the repository at this point in the history
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Aug 19, 2008
1 parent 79af9be commit 789fa73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1737,13 +1737,20 @@ static int __init parse_lapic(char *arg)
}
early_param("lapic", parse_lapic);

static int __init parse_nolapic(char *arg)
static int __init setup_disableapic(char *arg)
{
disable_apic = 1;
setup_clear_cpu_cap(X86_FEATURE_APIC);
return 0;
}
early_param("nolapic", parse_nolapic);
early_param("disableapic", setup_disableapic);

/* same as disableapic, for compatibility */
static int __init setup_nolapic(char *arg)
{
return setup_disableapic(arg);
}
early_param("nolapic", setup_nolapic);

static int __init parse_disable_apic_timer(char *arg)
{
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,7 @@ early_param("nox2apic", setup_nox2apic);
/*
* APIC command line parameters
*/
static __init int setup_disableapic(char *str)
static int __init setup_disableapic(char *arg)
{
disable_apic = 1;
setup_clear_cpu_cap(X86_FEATURE_APIC);
Expand All @@ -1768,9 +1768,9 @@ static __init int setup_disableapic(char *str)
early_param("disableapic", setup_disableapic);

/* same as disableapic, for compatibility */
static __init int setup_nolapic(char *str)
static int __init setup_nolapic(char *arg)
{
return setup_disableapic(str);
return setup_disableapic(arg);
}
early_param("nolapic", setup_nolapic);

Expand Down

0 comments on commit 789fa73

Please sign in to comment.