- char c = ' ', *to = command_line, *from = COMMAND_LINE;
- int len = 0;
-
- /* Save unparsed command line copy for /proc/cmdline */
- memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
- saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
-
- for (;;) {
- if (c != ' ')
- goto next_char;
-
-#ifdef CONFIG_SMP
- /*
- * If the BIOS enumerates physical processors before logical,
- * maxcpus=N at enumeration-time can be used to disable HT.
- */
- else if (!memcmp(from, "maxcpus=", 8)) {
- extern unsigned int maxcpus;
-
- maxcpus = simple_strtoul(from + 8, NULL, 0);
- }
-#endif
-#ifdef CONFIG_ACPI_BOOT
- /* "acpi=off" disables both ACPI table parsing and interpreter init */
- if (!memcmp(from, "acpi=off", 8))
- disable_acpi();
-
- if (!memcmp(from, "acpi=force", 10)) {
- /* 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 (!acpi_force) */
- disable_acpi();
- acpi_ht = 1;
- }
- else if (!memcmp(from, "pci=noacpi", 10))
- acpi_disable_pci();
- else if (!memcmp(from, "acpi=noirq", 10))
- acpi_noirq_set();
-
- else if (!memcmp(from, "acpi_sci=edge", 13))
- acpi_sci_flags.trigger = 1;
- else if (!memcmp(from, "acpi_sci=level", 14))
- acpi_sci_flags.trigger = 3;
- else if (!memcmp(from, "acpi_sci=high", 13))
- acpi_sci_flags.polarity = 1;
- else if (!memcmp(from, "acpi_sci=low", 12))
- acpi_sci_flags.polarity = 3;
-
- /* acpi=strict disables out-of-spec workarounds */
- else if (!memcmp(from, "acpi=strict", 11)) {
- acpi_strict = 1;
- }
-#endif
-
- if (!memcmp(from, "nolapic", 7) ||
- !memcmp(from, "disableapic", 11))
- disable_apic = 1;
-
- if (!memcmp(from, "noapic", 6))
- skip_ioapic_setup = 1;
-
- if (!memcmp(from, "apic", 4)) {
- skip_ioapic_setup = 0;
- ioapic_force = 1;
- }
-
- if (!memcmp(from, "mem=", 4))
- parse_memopt(from+4, &from);
-
-#ifdef CONFIG_DISCONTIGMEM
- if (!memcmp(from, "numa=", 5))
- numa_setup(from+5);
-#endif
-
-#ifdef CONFIG_GART_IOMMU
- if (!memcmp(from,"iommu=",6)) {
- iommu_setup(from+6);
- }
-#endif
-
- if (!memcmp(from,"oops=panic", 10))
- panic_on_oops = 1;
-
- next_char:
- c = *(from++);
- if (!c)
- break;
- if (COMMAND_LINE_SIZE <= ++len)
- break;
- *(to++) = c;
- }
- *to = '\0';
- *cmdline_p = command_line;