powerpc/mm/32: Remove the reserved memory hack
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Wed, 28 Mar 2018 00:25:44 +0000 (02:25 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 31 Mar 2018 13:47:44 +0000 (00:47 +1100)
This hack, introduced in commit c5df7f775148 ("powerpc: allow ioremap
within reserved memory regions") is now unnecessary.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/init_32.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/pgtable_32.c

index a2bf6965d04fc6b5bd35cee84dfc1f8ccf9ac124..3e59e5d64b014d11b2d542e6eddc48b6a93e1b3b 100644 (file)
@@ -88,11 +88,6 @@ void MMU_init(void);
 int __map_without_bats;
 int __map_without_ltlbs;
 
-/*
- * This tells the system to allow ioremapping memory marked as reserved.
- */
-int __allow_ioremap_reserved;
-
 /* max amount of low RAM to map in */
 unsigned long __max_low_memory = MAX_LOW_MEM;
 
index 57fbc554c78589f4e076ccfe647a2bb6ebd9011a..c4c0a09a77752273d1b763663bcea112c343b2e8 100644 (file)
@@ -98,7 +98,6 @@ extern void setbat(int index, unsigned long virt, phys_addr_t phys,
                   unsigned int size, pgprot_t prot);
 
 extern int __map_without_bats;
-extern int __allow_ioremap_reserved;
 extern unsigned int rtas_data, rtas_size;
 
 struct hash_pte;
index 6668ecc041ad98e444e459b3125027e5c44c5353..120a49bfb9c645b83d2deb6a635a922f9af9f62a 100644 (file)
@@ -148,8 +148,7 @@ __ioremap_caller(phys_addr_t addr, unsigned long size, unsigned long flags,
         * mem_init() sets high_memory so only do the check after that.
         */
        if (slab_is_available() && (p < virt_to_phys(high_memory)) &&
-           page_is_ram(__phys_to_pfn(p)) &&
-           !(__allow_ioremap_reserved && memblock_is_region_reserved(p, size))) {
+           page_is_ram(__phys_to_pfn(p))) {
                printk("__ioremap(): phys addr 0x%llx is RAM lr %ps\n",
                       (unsigned long long)p, __builtin_return_address(0));
                return NULL;