aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/efi.c2
-rw-r--r--arch/i386/kernel/setup.c22
2 files changed, 18 insertions, 6 deletions
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index aeabb4196861..7ec6cfa01fb3 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -543,7 +543,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
543 if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) > 543 if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >
544 0x100000000ULL) 544 0x100000000ULL)
545 continue; 545 continue;
546 res = alloc_bootmem_low(sizeof(struct resource)); 546 res = kzalloc(sizeof(struct resource), GFP_ATOMIC);
547 switch (md->type) { 547 switch (md->type) {
548 case EFI_RESERVED_TYPE: 548 case EFI_RESERVED_TYPE:
549 res->name = "Reserved Memory"; 549 res->name = "Reserved Memory";
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