@@ -963,9 +963,10 @@ void __init e820_reserve_resources(void)
* pci device BAR resource and insert them later in
* pcibios_resource_survey()
*/
- if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) {
- if (e820.map[i].type != E820_PRAM)
- res->flags |= IORESOURCE_BUSY;
+ if (((e820.map[i].type != E820_RESERVED) &&
+ (e820.map[i].type != E820_PRAM)) ||
+ res->start < (1ULL<<20)) {
+ res->flags |= IORESOURCE_BUSY;
insert_resource(&iomem_resource, res);
}
res++;
@@ -9,23 +9,6 @@
#include <asm/page_types.h>
#include <asm/setup.h>
-void __init reserve_pmem(void)
-{
- int i;
-
- for (i = 0; i < e820.nr_map; i++) {
- struct e820entry *ei = &e820.map[i];
-
- if (ei->type != E820_PRAM)
- continue;
-
- memblock_reserve(ei->addr, ei->addr + ei->size);
- max_pfn_mapped = init_memory_mapping(
- ei->addr < 1UL << 32 ? 1UL << 32 : ei->addr,
- ei->addr + ei->size);
- }
-}
-
static __init void register_pmem_device(struct resource *res)
{
struct platform_device *pdev;
@@ -1158,8 +1158,6 @@ void __init setup_arch(char **cmdline_p)
early_acpi_boot_init();
- reserve_pmem();
-
initmem_init();
dma_contiguous_reserve(max_pfn_mapped << PAGE_SHIFT);