Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23805
b: refs/heads/master
c: 681558f
h: refs/heads/master
i:
  23803: 864d86c
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Mar 25, 2006
1 parent ba1c29f commit 484b3a3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 86ebcea899ff01274c1e8e15bf1d1f1cf5fac471
refs/heads/master: 681558fdb5848f0a6dc248108f0f7323f7380857
47 changes: 25 additions & 22 deletions trunk/arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <linux/cpufreq.h>
#include <linux/dmi.h>
#include <linux/dma-mapping.h>
#include <linux/ctype.h>

#include <asm/mtrr.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -270,6 +271,13 @@ static void __init probe_roms(void)
}
}

/* Check for full argument with no trailing characters */
static int fullarg(char *p, char *arg)
{
int l = strlen(arg);
return !memcmp(p, arg, l) && (p[l] == 0 || isspace(p[l]));
}

static __init void parse_cmdline_early (char ** cmdline_p)
{
char c = ' ', *to = command_line, *from = COMMAND_LINE;
Expand All @@ -293,63 +301,58 @@ static __init void parse_cmdline_early (char ** cmdline_p)
#endif
#ifdef CONFIG_ACPI
/* "acpi=off" disables both ACPI table parsing and interpreter init */
if (!memcmp(from, "acpi=off", 8))
if (fullarg(from,"acpi=off"))
disable_acpi();

if (!memcmp(from, "acpi=force", 10)) {
if (fullarg(from, "acpi=force")) {
/* add later when we do DMI horrors: */
acpi_force = 1;
acpi_disabled = 0;
}

/* acpi=ht just means: do ACPI MADT parsing
at bootup, but don't enable the full ACPI interpreter */
if (!memcmp(from, "acpi=ht", 7)) {
if (fullarg(from, "acpi=ht")) {
if (!acpi_force)
disable_acpi();
acpi_ht = 1;
}
else if (!memcmp(from, "pci=noacpi", 10))
else if (fullarg(from, "pci=noacpi"))
acpi_disable_pci();
else if (!memcmp(from, "acpi=noirq", 10))
else if (fullarg(from, "acpi=noirq"))
acpi_noirq_set();

else if (!memcmp(from, "acpi_sci=edge", 13))
else if (fullarg(from, "acpi_sci=edge"))
acpi_sci_flags.trigger = 1;
else if (!memcmp(from, "acpi_sci=level", 14))
else if (fullarg(from, "acpi_sci=level"))
acpi_sci_flags.trigger = 3;
else if (!memcmp(from, "acpi_sci=high", 13))
else if (fullarg(from, "acpi_sci=high"))
acpi_sci_flags.polarity = 1;
else if (!memcmp(from, "acpi_sci=low", 12))
else if (fullarg(from, "acpi_sci=low"))
acpi_sci_flags.polarity = 3;

/* acpi=strict disables out-of-spec workarounds */
else if (!memcmp(from, "acpi=strict", 11)) {
else if (fullarg(from, "acpi=strict")) {
acpi_strict = 1;
}
#ifdef CONFIG_X86_IO_APIC
else if (!memcmp(from, "acpi_skip_timer_override", 24))
else if (fullarg(from, "acpi_skip_timer_override"))
acpi_skip_timer_override = 1;
#endif
#endif

if (!memcmp(from, "disable_timer_pin_1", 19))
if (fullarg(from, "disable_timer_pin_1"))
disable_timer_pin_1 = 1;
if (!memcmp(from, "enable_timer_pin_1", 18))
if (fullarg(from, "enable_timer_pin_1"))
disable_timer_pin_1 = -1;

if (!memcmp(from, "nolapic", 7) ||
!memcmp(from, "disableapic", 11))
if (fullarg(from, "nolapic") || fullarg(from, "disableapic"))
disable_apic = 1;

/* Don't confuse with noapictimer */
if (!memcmp(from, "noapic", 6) &&
(from[6] == ' ' || from[6] == 0))
if (fullarg(from, "noapic"))
skip_ioapic_setup = 1;

/* Make sure to not confuse with apic= */
if (!memcmp(from, "apic", 4) &&
(from[4] == ' ' || from[4] == 0)) {
if (fullarg(from,"apic")) {
skip_ioapic_setup = 0;
ioapic_force = 1;
}
Expand Down Expand Up @@ -388,7 +391,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
iommu_setup(from+6);
}

if (!memcmp(from,"oops=panic", 10))
if (fullarg(from,"oops=panic"))
panic_on_oops = 1;

if (!memcmp(from, "noexec=", 7))
Expand Down

0 comments on commit 484b3a3

Please sign in to comment.