linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Daniel Axtens <dja@axtens.net>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	kasan-dev@googlegroups.com, linux-mm@kvack.org
Subject: [PATCH v7 06/11] powerpc/32: make KVIRT_TOP dependant on FIXMAP_START
Date: Mon, 25 Feb 2019 13:48:41 +0000 (UTC)	[thread overview]
Message-ID: <be8f68bbfc608d9edba17d74971e33c24294db39.1551098214.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <cover.1551098214.git.christophe.leroy@c-s.fr>

When we add KASAN shadow area, KVIRT_TOP can't be anymore fixed
at 0xfe000000.

This patch uses FIXADDR_START to define KVIRT_TOP.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/include/asm/book3s/32/pgtable.h | 2 +-
 arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +-
 arch/powerpc/mm/init_32.c                    | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
index aa8406b8f7ba..008e6237a1b2 100644
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
@@ -142,7 +142,7 @@ static inline bool pte_user(pte_t pte)
 #ifdef CONFIG_HIGHMEM
 #define KVIRT_TOP	PKMAP_BASE
 #else
-#define KVIRT_TOP	(0xfe000000UL)	/* for now, could be FIXMAP_BASE ? */
+#define KVIRT_TOP	FIXADDR_START
 #endif
 
 /*
diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
index bed433358260..6c4acd842a3e 100644
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
@@ -72,7 +72,7 @@ extern int icache_44x_need_flush;
 #ifdef CONFIG_HIGHMEM
 #define KVIRT_TOP	PKMAP_BASE
 #else
-#define KVIRT_TOP	(0xfe000000UL)	/* for now, could be FIXMAP_BASE ? */
+#define KVIRT_TOP	FIXADDR_START
 #endif
 
 /*
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 41a3513cadc9..c077ab1a63ea 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -34,6 +34,7 @@
 #include <linux/slab.h>
 #include <linux/hugetlb.h>
 
+#include <asm/fixmap.h>
 #include <asm/pgalloc.h>
 #include <asm/prom.h>
 #include <asm/io.h>
-- 
2.13.3


  parent reply	other threads:[~2019-02-25 13:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 13:48 [PATCH v7 00/11] KASAN for powerpc/32 Christophe Leroy
2019-02-25 13:48 ` [PATCH v7 01/11] powerpc/32: Move early_init() in a separate file Christophe Leroy
2019-02-25 13:48 ` [PATCH v7 02/11] powerpc: prepare string/mem functions for KASAN Christophe Leroy
2019-02-25 22:47   ` kbuild test robot
2019-02-25 13:48 ` [PATCH v7 03/11] powerpc/prom_init: don't use string functions from lib/ Christophe Leroy
2019-02-25 13:48 ` [PATCH v7 04/11] powerpc/mm: don't use direct assignation during early boot Christophe Leroy
2019-02-25 13:48 ` [PATCH v7 05/11] powerpc/32: use memset() instead of memset_io() to zero BSS Christophe Leroy
2019-02-25 13:48 ` Christophe Leroy [this message]
2019-02-26  3:30   ` [PATCH v7 06/11] powerpc/32: make KVIRT_TOP dependant on FIXMAP_START kbuild test robot
2019-02-25 13:48 ` [PATCH v7 07/11] powerpc/32: prepare shadow area for KASAN Christophe Leroy
2019-02-26  5:12   ` Daniel Axtens
2019-02-25 13:48 ` [PATCH v7 08/11] powerpc: disable KASAN instrumentation on early/critical files Christophe Leroy
2019-02-25 13:48 ` [PATCH v7 09/11] powerpc/32: Add KASAN support Christophe Leroy
2019-02-25 13:48 ` [PATCH v7 10/11] powerpc/32s: move hash code patching out of MMU_init_hw() Christophe Leroy
2019-02-25 13:48 ` [PATCH v7 11/11] powerpc/32s: set up an early static hash table for KASAN Christophe Leroy
2019-02-25 18:24 ` [PATCH v7 00/11] KASAN for powerpc/32 Christophe Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be8f68bbfc608d9edba17d74971e33c24294db39.1551098214.git.christophe.leroy@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=benh@kernel.crashing.org \
    --cc=dja@axtens.net \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox