diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-25 20:58:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:10:52 -0400 |
commit | bdba0e700c86fa2f152b1fe37b001c9e9c65d2b7 (patch) | |
tree | cec86d977bd2bf6d6aef0ef540682402e6b17568 | |
parent | ccb4defa71744f086822950d8fa64a17c4e6eb04 (diff) |
x86: move reserve_standard_io_resources back to setup.c
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/setup.c | 33 | ||||
-rw-r--r-- | arch/x86/kernel/setup_percpu.c | 32 |
2 files changed, 33 insertions, 32 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 75d35401a8c7..62647b04fab5 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -458,6 +458,39 @@ void __init reserve_crashkernel(void) | |||
458 | } | 458 | } |
459 | #endif | 459 | #endif |
460 | 460 | ||
461 | static struct resource standard_io_resources[] = { | ||
462 | { .name = "dma1", .start = 0x00, .end = 0x1f, | ||
463 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
464 | { .name = "pic1", .start = 0x20, .end = 0x21, | ||
465 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
466 | { .name = "timer0", .start = 0x40, .end = 0x43, | ||
467 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
468 | { .name = "timer1", .start = 0x50, .end = 0x53, | ||
469 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
470 | { .name = "keyboard", .start = 0x60, .end = 0x60, | ||
471 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
472 | { .name = "keyboard", .start = 0x64, .end = 0x64, | ||
473 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
474 | { .name = "dma page reg", .start = 0x80, .end = 0x8f, | ||
475 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
476 | { .name = "pic2", .start = 0xa0, .end = 0xa1, | ||
477 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
478 | { .name = "dma2", .start = 0xc0, .end = 0xdf, | ||
479 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
480 | { .name = "fpu", .start = 0xf0, .end = 0xff, | ||
481 | .flags = IORESOURCE_BUSY | IORESOURCE_IO } | ||
482 | }; | ||
483 | |||
484 | void __init reserve_standard_io_resources(void) | ||
485 | { | ||
486 | int i; | ||
487 | |||
488 | /* request I/O space for devices used on all i[345]86 PCs */ | ||
489 | for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++) | ||
490 | request_resource(&ioport_resource, &standard_io_resources[i]); | ||
491 | |||
492 | } | ||
493 | |||
461 | /* | 494 | /* |
462 | * Determine if we were loaded by an EFI loader. If so, then we have also been | 495 | * Determine if we were loaded by an EFI loader. If so, then we have also been |
463 | * passed the efi memmap, systab, etc., so we should use these data structures | 496 | * passed the efi memmap, systab, etc., so we should use these data structures |
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index a3a19ab0edef..ccf329dc81be 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -387,38 +387,6 @@ EXPORT_SYMBOL(node_to_cpumask); | |||
387 | 387 | ||
388 | #endif /* X86_64_NUMA */ | 388 | #endif /* X86_64_NUMA */ |
389 | 389 | ||
390 | static struct resource standard_io_resources[] = { | ||
391 | { .name = "dma1", .start = 0x00, .end = 0x1f, | ||
392 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
393 | { .name = "pic1", .start = 0x20, .end = 0x21, | ||
394 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
395 | { .name = "timer0", .start = 0x40, .end = 0x43, | ||
396 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
397 | { .name = "timer1", .start = 0x50, .end = 0x53, | ||
398 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
399 | { .name = "keyboard", .start = 0x60, .end = 0x60, | ||
400 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
401 | { .name = "keyboard", .start = 0x64, .end = 0x64, | ||
402 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
403 | { .name = "dma page reg", .start = 0x80, .end = 0x8f, | ||
404 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
405 | { .name = "pic2", .start = 0xa0, .end = 0xa1, | ||
406 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
407 | { .name = "dma2", .start = 0xc0, .end = 0xdf, | ||
408 | .flags = IORESOURCE_BUSY | IORESOURCE_IO }, | ||
409 | { .name = "fpu", .start = 0xf0, .end = 0xff, | ||
410 | .flags = IORESOURCE_BUSY | IORESOURCE_IO } | ||
411 | }; | ||
412 | |||
413 | void __init reserve_standard_io_resources(void) | ||
414 | { | ||
415 | int i; | ||
416 | |||
417 | /* request I/O space for devices used on all i[345]86 PCs */ | ||
418 | for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++) | ||
419 | request_resource(&ioport_resource, &standard_io_resources[i]); | ||
420 | |||
421 | } | ||
422 | 390 | ||
423 | #ifdef CONFIG_PROC_VMCORE | 391 | #ifdef CONFIG_PROC_VMCORE |
424 | /* elfcorehdr= specifies the location of elf core header | 392 | /* elfcorehdr= specifies the location of elf core header |