Skip to content

Commit 5898fc0

Browse files
SiFiveHollandPaul Walmsley
authored andcommitted
riscv: mm: Define MAX_POSSIBLE_PHYSMEM_BITS for zsmalloc
This definition is used by zsmalloc to optimize memory allocation. On riscv64, it is the same as MAX_PHYSMEM_BITS from asm/sparsemem.h, but that definition depends on CONFIG_SPARSEMEM. The correct definition is already provided for riscv32. Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paul Walmsley <[email protected]>
1 parent 223bfc4 commit 5898fc0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/include/asm/pgtable-64.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ typedef struct {
6969

7070
#define PTRS_PER_PMD (PAGE_SIZE / sizeof(pmd_t))
7171

72+
#define MAX_POSSIBLE_PHYSMEM_BITS 56
73+
7274
/*
7375
* rv64 PTE format:
7476
* | 63 | 62 61 | 60 54 | 53 10 | 9 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0

0 commit comments

Comments
 (0)