aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/setup.c')
-rw-r--r--arch/i386/kernel/setup.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 2d8782960f41..d313a11acafa 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1288,7 +1288,7 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
1288 struct resource *res; 1288 struct resource *res;
1289 if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) 1289 if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL)
1290 continue; 1290 continue;
1291 res = alloc_bootmem_low(sizeof(struct resource)); 1291 res = kzalloc(sizeof(struct resource), GFP_ATOMIC);
1292 switch (e820.map[i].type) { 1292 switch (e820.map[i].type) {
1293 case E820_RAM: res->name = "System RAM"; break; 1293 case E820_RAM: res->name = "System RAM"; break;
1294 case E820_ACPI: res->name = "ACPI Tables"; break; 1294 case E820_ACPI: res->name = "ACPI Tables"; break;
@@ -1316,13 +1316,15 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
1316 1316
1317/* 1317/*
1318 * Request address space for all standard resources 1318 * Request address space for all standard resources
1319 *
1320 * This is called just before pcibios_assign_resources(), which is also
1321 * an fs_initcall, but is linked in later (in arch/i386/pci/i386.c).
1319 */ 1322 */
1320static void __init register_memory(void) 1323static int __init request_standard_resources(void)
1321{ 1324{
1322 unsigned long gapstart, gapsize, round; 1325 int i;
1323 unsigned long long last;
1324 int i;
1325 1326
1327 printk("Setting up standard PCI resources\n");
1326 if (efi_enabled) 1328 if (efi_enabled)
1327 efi_initialize_iomem_resources(&code_resource, &data_resource); 1329 efi_initialize_iomem_resources(&code_resource, &data_resource);
1328 else 1330 else
@@ -1334,6 +1336,16 @@ static void __init register_memory(void)
1334 /* request I/O space for devices used on all i[345]86 PCs */ 1336 /* request I/O space for devices used on all i[345]86 PCs */
1335 for (i = 0; i < STANDARD_IO_RESOURCES; i++) 1337 for (i = 0; i < STANDARD_IO_RESOURCES; i++)
1336 request_resource(&ioport_resource, &standard_io_resources[i]); 1338 request_resource(&ioport_resource, &standard_io_resources[i]);
1339 return 0;
1340}
1341
1342fs_initcall(request_standard_resources);
1343
1344static void __init register_memory(void)
1345{
1346 unsigned long gapstart, gapsize, round;
1347 unsigned long long last;
1348 int i;
1337 1349
1338 /* 1350 /*
1339 * Search for the bigest gap in the low 32 bits of the e820 1351 * Search for the bigest gap in the low 32 bits of the e820