diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/kernel/setup.c | 2 | ||||
| -rw-r--r-- | arch/x86/pci/i386.c | 17 | ||||
| -rw-r--r-- | arch/x86/pci/irq.c | 11 | ||||
| -rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 4 |
4 files changed, 20 insertions, 14 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 95a32746fbf9..21c6746338af 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -769,6 +769,8 @@ void __init setup_arch(char **cmdline_p) | |||
| 769 | 769 | ||
| 770 | x86_init.oem.arch_setup(); | 770 | x86_init.oem.arch_setup(); |
| 771 | 771 | ||
| 772 | resource_alloc_from_bottom = 0; | ||
| 773 | iomem_resource.end = (1ULL << boot_cpu_data.x86_phys_bits) - 1; | ||
| 772 | setup_memory_map(); | 774 | setup_memory_map(); |
| 773 | parse_setup_data(); | 775 | parse_setup_data(); |
| 774 | /* update the e820_saved too */ | 776 | /* update the e820_saved too */ |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 55253095be84..826140af3c3c 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
| @@ -65,16 +65,21 @@ pcibios_align_resource(void *data, const struct resource *res, | |||
| 65 | resource_size_t size, resource_size_t align) | 65 | resource_size_t size, resource_size_t align) |
| 66 | { | 66 | { |
| 67 | struct pci_dev *dev = data; | 67 | struct pci_dev *dev = data; |
| 68 | resource_size_t start = res->start; | 68 | resource_size_t start = round_down(res->end - size + 1, align); |
| 69 | 69 | ||
| 70 | if (res->flags & IORESOURCE_IO) { | 70 | if (res->flags & IORESOURCE_IO) { |
| 71 | if (skip_isa_ioresource_align(dev)) | 71 | |
| 72 | return start; | 72 | /* |
| 73 | if (start & 0x300) | 73 | * If we're avoiding ISA aliases, the largest contiguous I/O |
| 74 | start = (start + 0x3ff) & ~0x3ff; | 74 | * port space is 256 bytes. Clearing bits 9 and 10 preserves |
| 75 | * all 256-byte and smaller alignments, so the result will | ||
| 76 | * still be correctly aligned. | ||
| 77 | */ | ||
| 78 | if (!skip_isa_ioresource_align(dev)) | ||
| 79 | start &= ~0x300; | ||
| 75 | } else if (res->flags & IORESOURCE_MEM) { | 80 | } else if (res->flags & IORESOURCE_MEM) { |
| 76 | if (start < BIOS_END) | 81 | if (start < BIOS_END) |
| 77 | start = BIOS_END; | 82 | start = res->end; /* fail; no space */ |
| 78 | } | 83 | } |
| 79 | return start; | 84 | return start; |
| 80 | } | 85 | } |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index f547ee05f715..9f9bfb705cf9 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
| @@ -584,27 +584,28 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route | |||
| 584 | case PCI_DEVICE_ID_INTEL_ICH9_3: | 584 | case PCI_DEVICE_ID_INTEL_ICH9_3: |
| 585 | case PCI_DEVICE_ID_INTEL_ICH9_4: | 585 | case PCI_DEVICE_ID_INTEL_ICH9_4: |
| 586 | case PCI_DEVICE_ID_INTEL_ICH9_5: | 586 | case PCI_DEVICE_ID_INTEL_ICH9_5: |
| 587 | case PCI_DEVICE_ID_INTEL_TOLAPAI_0: | 587 | case PCI_DEVICE_ID_INTEL_EP80579_0: |
| 588 | case PCI_DEVICE_ID_INTEL_ICH10_0: | 588 | case PCI_DEVICE_ID_INTEL_ICH10_0: |
| 589 | case PCI_DEVICE_ID_INTEL_ICH10_1: | 589 | case PCI_DEVICE_ID_INTEL_ICH10_1: |
| 590 | case PCI_DEVICE_ID_INTEL_ICH10_2: | 590 | case PCI_DEVICE_ID_INTEL_ICH10_2: |
| 591 | case PCI_DEVICE_ID_INTEL_ICH10_3: | 591 | case PCI_DEVICE_ID_INTEL_ICH10_3: |
| 592 | case PCI_DEVICE_ID_INTEL_PATSBURG_LPC: | ||
| 592 | r->name = "PIIX/ICH"; | 593 | r->name = "PIIX/ICH"; |
| 593 | r->get = pirq_piix_get; | 594 | r->get = pirq_piix_get; |
| 594 | r->set = pirq_piix_set; | 595 | r->set = pirq_piix_set; |
| 595 | return 1; | 596 | return 1; |
| 596 | } | 597 | } |
| 597 | 598 | ||
| 598 | if ((device >= PCI_DEVICE_ID_INTEL_PCH_LPC_MIN) && | 599 | if ((device >= PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MIN) && |
| 599 | (device <= PCI_DEVICE_ID_INTEL_PCH_LPC_MAX)) { | 600 | (device <= PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MAX)) { |
| 600 | r->name = "PIIX/ICH"; | 601 | r->name = "PIIX/ICH"; |
| 601 | r->get = pirq_piix_get; | 602 | r->get = pirq_piix_get; |
| 602 | r->set = pirq_piix_set; | 603 | r->set = pirq_piix_set; |
| 603 | return 1; | 604 | return 1; |
| 604 | } | 605 | } |
| 605 | 606 | ||
| 606 | if ((device >= PCI_DEVICE_ID_INTEL_CPT_LPC_MIN) && | 607 | if ((device >= PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN) && |
| 607 | (device <= PCI_DEVICE_ID_INTEL_CPT_LPC_MAX)) { | 608 | (device <= PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX)) { |
| 608 | r->name = "PIIX/ICH"; | 609 | r->name = "PIIX/ICH"; |
| 609 | r->get = pirq_piix_get; | 610 | r->get = pirq_piix_get; |
| 610 | r->set = pirq_piix_set; | 611 | r->set = pirq_piix_set; |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index a918553ebc75..e282886616a0 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
| @@ -65,7 +65,6 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, | |||
| 65 | int end, u64 addr) | 65 | int end, u64 addr) |
| 66 | { | 66 | { |
| 67 | struct pci_mmcfg_region *new; | 67 | struct pci_mmcfg_region *new; |
| 68 | int num_buses; | ||
| 69 | struct resource *res; | 68 | struct resource *res; |
| 70 | 69 | ||
| 71 | if (addr == 0) | 70 | if (addr == 0) |
| @@ -82,10 +81,9 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, | |||
| 82 | 81 | ||
| 83 | list_add_sorted(new); | 82 | list_add_sorted(new); |
| 84 | 83 | ||
| 85 | num_buses = end - start + 1; | ||
| 86 | res = &new->res; | 84 | res = &new->res; |
| 87 | res->start = addr + PCI_MMCFG_BUS_OFFSET(start); | 85 | res->start = addr + PCI_MMCFG_BUS_OFFSET(start); |
| 88 | res->end = addr + PCI_MMCFG_BUS_OFFSET(num_buses) - 1; | 86 | res->end = addr + PCI_MMCFG_BUS_OFFSET(end + 1) - 1; |
| 89 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 87 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
| 90 | snprintf(new->name, PCI_MMCFG_RESOURCE_NAME_LEN, | 88 | snprintf(new->name, PCI_MMCFG_RESOURCE_NAME_LEN, |
| 91 | "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end); | 89 | "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end); |
