]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: mm: Define MAX_POSSIBLE_PHYSMEM_BITS for zsmalloc
authorSamuel Holland <samuel.holland@sifive.com>
Wed, 15 Oct 2025 23:33:24 +0000 (16:33 -0700)
committerPaul Walmsley <pjw@kernel.org>
Sat, 18 Oct 2025 04:00:29 +0000 (22:00 -0600)
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 <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20251015233327.3885003-1-samuel.holland@sifive.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/include/asm/pgtable-64.h

index 1018d2216901332ec73a086d114cc3d168e83a9e..6e789fa58514c7dd11ef9c87050a3fa10fd4908d 100644 (file)
@@ -69,6 +69,8 @@ typedef struct {
 
 #define PTRS_PER_PMD    (PAGE_SIZE / sizeof(pmd_t))
 
+#define MAX_POSSIBLE_PHYSMEM_BITS 56
+
 /*
  * rv64 PTE format:
  * | 63 | 62 61 | 60 54 | 53  10 | 9             8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0