Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
x86/PCI: compute Address Space length rather than using _LEN
x86/PCI: never allocate PCI MMIO resources below BIOS_END

+5 -38
+2 -38
arch/x86/pci/acpi.c
··· 121 121 return AE_OK; 122 122 } 123 123 124 - static void 125 - align_resource(struct acpi_device *bridge, struct resource *res) 126 - { 127 - int align = (res->flags & IORESOURCE_MEM) ? 16 : 4; 128 - 129 - /* 130 - * Host bridge windows are not BARs, but the decoders on the PCI side 131 - * that claim this address space have starting alignment and length 132 - * constraints, so fix any obvious BIOS goofs. 133 - */ 134 - if (!IS_ALIGNED(res->start, align)) { 135 - dev_printk(KERN_DEBUG, &bridge->dev, 136 - "host bridge window %pR invalid; " 137 - "aligning start to %d-byte boundary\n", res, align); 138 - res->start &= ~(align - 1); 139 - } 140 - if (!IS_ALIGNED(res->end + 1, align)) { 141 - dev_printk(KERN_DEBUG, &bridge->dev, 142 - "host bridge window %pR invalid; " 143 - "aligning end to %d-byte boundary\n", res, align); 144 - res->end = ALIGN(res->end, align) - 1; 145 - } 146 - } 147 - 148 124 static acpi_status 149 125 setup_resource(struct acpi_resource *acpi_res, void *data) 150 126 { ··· 130 154 acpi_status status; 131 155 unsigned long flags; 132 156 struct resource *root, *conflict; 133 - u64 start, end, max_len; 157 + u64 start, end; 134 158 135 159 status = resource_to_addr(acpi_res, &addr); 136 160 if (!ACPI_SUCCESS(status)) ··· 147 171 } else 148 172 return AE_OK; 149 173 150 - max_len = addr.maximum - addr.minimum + 1; 151 - if (addr.address_length > max_len) { 152 - dev_printk(KERN_DEBUG, &info->bridge->dev, 153 - "host bridge window length %#llx doesn't fit in " 154 - "%#llx-%#llx, trimming\n", 155 - (unsigned long long) addr.address_length, 156 - (unsigned long long) addr.minimum, 157 - (unsigned long long) addr.maximum); 158 - addr.address_length = max_len; 159 - } 160 - 161 174 start = addr.minimum + addr.translation_offset; 162 - end = start + addr.address_length - 1; 175 + end = addr.maximum + addr.translation_offset; 163 176 164 177 res = &info->res[info->res_num]; 165 178 res->name = info->name; ··· 156 191 res->start = start; 157 192 res->end = end; 158 193 res->child = NULL; 159 - align_resource(info->bridge, res); 160 194 161 195 if (!pci_use_crs) { 162 196 dev_printk(KERN_DEBUG, &info->bridge->dev,
+3
arch/x86/pci/i386.c
··· 72 72 return start; 73 73 if (start & 0x300) 74 74 start = (start + 0x3ff) & ~0x3ff; 75 + } else if (res->flags & IORESOURCE_MEM) { 76 + if (start < BIOS_END) 77 + start = BIOS_END; 75 78 } 76 79 return start; 77 80 }