diff options
| author | Horms <horms@verge.net.au> | 2006-03-23 17:27:12 -0500 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2006-03-23 17:27:12 -0500 |
| commit | a5b00bb4fe60796c791238cf5653b82110031c93 (patch) | |
| tree | 05938f68e51ad465e7ff76f05945210523061c1b /arch/ia64/kernel/setup.c | |
| parent | 39e18de810049e836390830174a248ad241b156a (diff) | |
IA64: Use early_parm to handle mvec_name and nomca
I'm not sure of the worthiness of this idea, so please consider it an RFC.
Its key merits are:
* Reuse existing infrastructure
* Greatly tightens up the parsing of nomca
* Greatly simplifies the parsing of machvec
Addition cleanup (moving setup_mvec() to machvec.c) by Ken Chen.
Signed-Off-By: Horms <horms@verge.net.au>
Signed-Off-By: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/setup.c')
| -rw-r--r-- | arch/ia64/kernel/setup.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index eb0793628b8a..fc860778fa41 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
| @@ -389,6 +389,14 @@ check_for_logical_procs (void) | |||
| 389 | } | 389 | } |
| 390 | #endif | 390 | #endif |
| 391 | 391 | ||
| 392 | static __initdata int nomca; | ||
| 393 | static __init int setup_nomca(char *s) | ||
| 394 | { | ||
| 395 | nomca = 1; | ||
| 396 | return 0; | ||
| 397 | } | ||
| 398 | early_param("nomca", setup_nomca); | ||
| 399 | |||
| 392 | void __init | 400 | void __init |
| 393 | setup_arch (char **cmdline_p) | 401 | setup_arch (char **cmdline_p) |
| 394 | { | 402 | { |
| @@ -402,35 +410,15 @@ setup_arch (char **cmdline_p) | |||
| 402 | efi_init(); | 410 | efi_init(); |
| 403 | io_port_init(); | 411 | io_port_init(); |
| 404 | 412 | ||
| 413 | parse_early_param(); | ||
| 414 | |||
| 405 | #ifdef CONFIG_IA64_GENERIC | 415 | #ifdef CONFIG_IA64_GENERIC |
| 406 | { | 416 | machvec_init(NULL); |
| 407 | const char *mvec_name = strstr (*cmdline_p, "machvec="); | ||
| 408 | char str[64]; | ||
| 409 | |||
| 410 | if (mvec_name) { | ||
| 411 | const char *end; | ||
| 412 | size_t len; | ||
| 413 | |||
| 414 | mvec_name += 8; | ||
| 415 | end = strchr (mvec_name, ' '); | ||
| 416 | if (end) | ||
| 417 | len = end - mvec_name; | ||
| 418 | else | ||
| 419 | len = strlen (mvec_name); | ||
| 420 | len = min(len, sizeof (str) - 1); | ||
| 421 | strncpy (str, mvec_name, len); | ||
| 422 | str[len] = '\0'; | ||
| 423 | mvec_name = str; | ||
| 424 | } else | ||
| 425 | mvec_name = acpi_get_sysname(); | ||
| 426 | machvec_init(mvec_name); | ||
| 427 | } | ||
| 428 | #endif | 417 | #endif |
| 429 | 418 | ||
| 430 | if (early_console_setup(*cmdline_p) == 0) | 419 | if (early_console_setup(*cmdline_p) == 0) |
| 431 | mark_bsp_online(); | 420 | mark_bsp_online(); |
| 432 | 421 | ||
| 433 | parse_early_param(); | ||
| 434 | #ifdef CONFIG_ACPI | 422 | #ifdef CONFIG_ACPI |
| 435 | /* Initialize the ACPI boot-time table parser */ | 423 | /* Initialize the ACPI boot-time table parser */ |
| 436 | acpi_table_init(); | 424 | acpi_table_init(); |
| @@ -493,7 +481,7 @@ setup_arch (char **cmdline_p) | |||
| 493 | #endif | 481 | #endif |
| 494 | 482 | ||
| 495 | /* enable IA-64 Machine Check Abort Handling unless disabled */ | 483 | /* enable IA-64 Machine Check Abort Handling unless disabled */ |
| 496 | if (!strstr(saved_command_line, "nomca")) | 484 | if (!nomca) |
| 497 | ia64_mca_init(); | 485 | ia64_mca_init(); |
| 498 | 486 | ||
| 499 | platform_setup(cmdline_p); | 487 | platform_setup(cmdline_p); |
