From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id E9A376B02C3 for ; Thu, 22 Feb 2018 07:15:58 -0500 (EST) Received: by mail-wr0-f197.google.com with SMTP id w102so3459294wrb.21 for ; Thu, 22 Feb 2018 04:15:58 -0800 (PST) Received: from mout.gmx.net (mout.gmx.net. [212.227.15.19]) by mx.google.com with ESMTPS id 93si1758771wrh.194.2018.02.22.04.15.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 04:15:57 -0800 (PST) From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Subject: [PATCH 5/5] powerpc/mm/32: Remove the reserved memory hack Date: Thu, 22 Feb 2018 13:15:16 +0100 Message-Id: <20180222121516.23415-6-j.neuschaefer@gmx.net> In-Reply-To: <20180222121516.23415-1-j.neuschaefer@gmx.net> References: <20180222121516.23415-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, Michael Ellerman , linux-mm@kvack.org, Joel Stanley , Christophe LEROY , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Benjamin Herrenschmidt , Paul Mackerras , "Aneesh Kumar K.V" , Balbir Singh , Guenter Roeck This hack, introduced in commit c5df7f775148 ("powerpc: allow ioremap within reserved memory regions") is now unnecessary. Signed-off-by: Jonathan NeuschA?fer --- arch/powerpc/mm/init_32.c | 5 ----- arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/pgtable_32.c | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 6419b33ca309..326240177fa6 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -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; diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h index 57fbc554c785..c4c0a09a7775 100644 --- a/arch/powerpc/mm/mmu_decl.h +++ b/arch/powerpc/mm/mmu_decl.h @@ -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; diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index d54e1a9c1c99..a89eb3b898cd 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -146,8 +146,7 @@ __ioremap_caller(phys_addr_t addr, unsigned long size, unsigned long flags, /* * Don't allow anybody to remap normal RAM that we're using. */ - if (page_is_ram(__phys_to_pfn(p)) && - !(__allow_ioremap_reserved && memblock_is_region_reserved(p, size))) { + if (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; -- 2.16.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org