diff options
| author | Alexandre Ghiti <[email protected]> | 2022-12-01 13:51:28 +0000 |
|---|---|---|
| committer | Palmer Dabbelt <[email protected]> | 2022-12-13 06:38:18 +0000 |
| commit | 71fc3621efc38ace9640ee6a0db3300900689592 (patch) | |
| tree | 8fc90cb764c35cdc0ba1fc107cb1dc2e8073df6b /tools/perf/scripts/python/flamegraph.py | |
| parent | riscv: Apply a static assert to riscv_isa_ext_id (diff) | |
| download | kernel-71fc3621efc38ace9640ee6a0db3300900689592.tar.gz kernel-71fc3621efc38ace9640ee6a0db3300900689592.zip | |
riscv: Fix P4D_SHIFT definition for 3-level page table mode
RISC-V kernels support 3,4,5-level page tables at runtime by folding
upper levels.
In case of a 3-level page table, PGDIR is folded into P4D which in turn
is folded into PUD: PGDIR_SHIFT value is correctly set to the same value
as PUD_SHIFT, but P4D_SHIFT is not, then any use of P4D_SHIFT will access
invalid address bits (all set to 1).
Fix this by dynamically defining P4D_SHIFT value, like we already do for
PGDIR_SHIFT.
Fixes: d10efa21a937 ("riscv: mm: Control p4d's folding by pgtable_l5_enabled")
Signed-off-by: Alexandre Ghiti <[email protected]>
Reviewed-by: Palmer Dabbelt <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
