Re: [RFC 3/8] powerpc/slb: Define macros for the bolted slots
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-07-22 09:32:23
On Tue, 2015-07-21 at 12:28 +0530, Anshuman Khandual wrote:
quoted hunk ↗ jump to hunk
From: "khandual@linux.vnet.ibm.com" <redacted> This patch defines macros for all the three bolted SLB slots. This also renames the 'create_shadowed_slb' function as 'new_shadowed_slb'. Signed-off-by: Anshuman Khandual <redacted> --- arch/powerpc/mm/slb.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 3842a54..cbeaaa2 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c@@ -25,6 +25,9 @@ #include <asm/udbg.h> #include <asm/code-patching.h> +#define SLOT_KLINR 0 /* kernel linear map (0xc00000000) */
Call it LINEAR_SLOT ?
+#define SLOT_KVIRT 1 /* kernel virtual map (0xd00000000) */
VMALLOC_SLOT
+#define SLOT_KSTACK 2 /* kernel stack map (0xf00000000) */
KSTACK_SLOT And the comment is wrong, it's not 0xf00.., that's the vmemmap. I know we're inconsistent about FOO_SLOT vs SLOT_FOO at times, but I think in this case it reads better as FOO_SLOT. Actually even better, make it an enum? cheers