powerpc/mm: Make some of the PGTABLE_RANGE dependency explicit
slice array size and slice mask size depend on PGTABLE_RANGE. Reviewed-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
f033d659c3
commit
78f1dbde9f
@@ -15,6 +15,13 @@
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
/*
|
||||
* This is necessary to get the definition of PGTABLE_RANGE which we
|
||||
* need for various slices related matters. Note that this isn't the
|
||||
* complete pgtable.h but only a portion of it.
|
||||
*/
|
||||
#include <asm/pgtable-ppc64.h>
|
||||
|
||||
/*
|
||||
* Segment table
|
||||
*/
|
||||
@@ -414,6 +421,8 @@ extern void slb_set_size(u16 size);
|
||||
srdi rx,rx,VSID_BITS_##size; /* extract 2^VSID_BITS bit */ \
|
||||
add rt,rt,rx
|
||||
|
||||
/* 4 bits per slice and we have one slice per 1TB */
|
||||
#define SLICE_ARRAY_SIZE (PGTABLE_RANGE >> 41)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@@ -458,11 +467,7 @@ typedef struct {
|
||||
|
||||
#ifdef CONFIG_PPC_MM_SLICES
|
||||
u64 low_slices_psize; /* SLB page size encodings */
|
||||
/*
|
||||
* Right now we support 64TB and 4 bits for each
|
||||
* 1TB slice we need 32 bytes for 64TB.
|
||||
*/
|
||||
unsigned char high_slices_psize[32]; /* 4 bits per slice for now */
|
||||
unsigned char high_slices_psize[SLICE_ARRAY_SIZE];
|
||||
#else
|
||||
u16 sllp; /* SLB page size encoding */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user