diff options
author | Andrew Morton <akpm@osdl.org> | 2006-10-02 20:24:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 22:46:18 -0400 |
commit | 0e4a523fa3981f20c3887803cebef1ad2948a0d4 (patch) | |
tree | 406456f432fc066eb330a28cea58fc843116e298 /arch/x86_64 | |
parent | 829d464e60151a525c7ba57e7acfc4fc297f7069 (diff) |
[PATCH] revert "insert IOAPIC(s) and Local APIC into resource map"
Commit 54dbc0c9ebefb38840c6b07fa6eabaeb96c921f5 is causing various
people's machines to fail to map PCI resources.
Revert it in preparation for addressing the show-APICs-in-/proc/iomem
requirement in a different manner.
Cc: Aaron Durbin <adurbin@google.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/apic.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 135ff25e6b44..6472e321cad7 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/kernel_stat.h> | 25 | #include <linux/kernel_stat.h> |
26 | #include <linux/sysdev.h> | 26 | #include <linux/sysdev.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/ioport.h> | ||
29 | 28 | ||
30 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
31 | #include <asm/smp.h> | 30 | #include <asm/smp.h> |
@@ -46,11 +45,6 @@ int apic_calibrate_pmtmr __initdata; | |||
46 | 45 | ||
47 | int disable_apic_timer __initdata; | 46 | int disable_apic_timer __initdata; |
48 | 47 | ||
49 | static struct resource lapic_resource = { | ||
50 | .name = "Local APIC", | ||
51 | .flags = IORESOURCE_MEM | IORESOURCE_BUSY, | ||
52 | }; | ||
53 | |||
54 | /* | 48 | /* |
55 | * cpu_mask that denotes the CPUs that needs timer interrupt coming in as | 49 | * cpu_mask that denotes the CPUs that needs timer interrupt coming in as |
56 | * IPIs in place of local APIC timers | 50 | * IPIs in place of local APIC timers |
@@ -591,40 +585,6 @@ static int __init detect_init_APIC (void) | |||
591 | return 0; | 585 | return 0; |
592 | } | 586 | } |
593 | 587 | ||
594 | #ifdef CONFIG_X86_IO_APIC | ||
595 | static struct resource * __init ioapic_setup_resources(void) | ||
596 | { | ||
597 | #define IOAPIC_RESOURCE_NAME_SIZE 11 | ||
598 | unsigned long n; | ||
599 | struct resource *res; | ||
600 | char *mem; | ||
601 | int i; | ||
602 | |||
603 | if (nr_ioapics <= 0) | ||
604 | return NULL; | ||
605 | |||
606 | n = IOAPIC_RESOURCE_NAME_SIZE + sizeof(struct resource); | ||
607 | n *= nr_ioapics; | ||
608 | |||
609 | res = alloc_bootmem(n); | ||
610 | |||
611 | if (!res) | ||
612 | return NULL; | ||
613 | |||
614 | memset(res, 0, n); | ||
615 | mem = (void *)&res[nr_ioapics]; | ||
616 | |||
617 | for (i = 0; i < nr_ioapics; i++) { | ||
618 | res[i].name = mem; | ||
619 | res[i].flags = IORESOURCE_MEM | IORESOURCE_BUSY; | ||
620 | snprintf(mem, IOAPIC_RESOURCE_NAME_SIZE, "IOAPIC %u", i); | ||
621 | mem += IOAPIC_RESOURCE_NAME_SIZE; | ||
622 | } | ||
623 | |||
624 | return res; | ||
625 | } | ||
626 | #endif | ||
627 | |||
628 | void __init init_apic_mappings(void) | 588 | void __init init_apic_mappings(void) |
629 | { | 589 | { |
630 | unsigned long apic_phys; | 590 | unsigned long apic_phys; |
@@ -644,11 +604,6 @@ void __init init_apic_mappings(void) | |||
644 | apic_mapped = 1; | 604 | apic_mapped = 1; |
645 | apic_printk(APIC_VERBOSE,"mapped APIC to %16lx (%16lx)\n", APIC_BASE, apic_phys); | 605 | apic_printk(APIC_VERBOSE,"mapped APIC to %16lx (%16lx)\n", APIC_BASE, apic_phys); |
646 | 606 | ||
647 | /* Put local APIC into the resource map. */ | ||
648 | lapic_resource.start = apic_phys; | ||
649 | lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1; | ||
650 | insert_resource(&iomem_resource, &lapic_resource); | ||
651 | |||
652 | /* | 607 | /* |
653 | * Fetch the APIC ID of the BSP in case we have a | 608 | * Fetch the APIC ID of the BSP in case we have a |
654 | * default configuration (or the MP table is broken). | 609 | * default configuration (or the MP table is broken). |
@@ -658,9 +613,7 @@ void __init init_apic_mappings(void) | |||
658 | { | 613 | { |
659 | unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0; | 614 | unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0; |
660 | int i; | 615 | int i; |
661 | struct resource *ioapic_res; | ||
662 | 616 | ||
663 | ioapic_res = ioapic_setup_resources(); | ||
664 | for (i = 0; i < nr_ioapics; i++) { | 617 | for (i = 0; i < nr_ioapics; i++) { |
665 | if (smp_found_config) { | 618 | if (smp_found_config) { |
666 | ioapic_phys = mp_ioapics[i].mpc_apicaddr; | 619 | ioapic_phys = mp_ioapics[i].mpc_apicaddr; |
@@ -672,13 +625,6 @@ void __init init_apic_mappings(void) | |||
672 | apic_printk(APIC_VERBOSE,"mapped IOAPIC to %016lx (%016lx)\n", | 625 | apic_printk(APIC_VERBOSE,"mapped IOAPIC to %016lx (%016lx)\n", |
673 | __fix_to_virt(idx), ioapic_phys); | 626 | __fix_to_virt(idx), ioapic_phys); |
674 | idx++; | 627 | idx++; |
675 | |||
676 | if (ioapic_res) { | ||
677 | ioapic_res->start = ioapic_phys; | ||
678 | ioapic_res->end = ioapic_phys + (4 * 1024) - 1; | ||
679 | insert_resource(&iomem_resource, ioapic_res); | ||
680 | ioapic_res++; | ||
681 | } | ||
682 | } | 628 | } |
683 | } | 629 | } |
684 | } | 630 | } |