Linux kernel source tree
Go to file
Song Shuai 2c8b096a57 riscv: correct pt_level name via pgtable_l5/4_enabled
commit e59e5e2754 upstream.

The pt_level uses CONFIG_PGTABLE_LEVELS to display page table names.
But if page mode is downgraded from kernel cmdline or restricted by
the hardware in 64BIT, it will give a wrong name.

Like, using no4lvl for sv39, ptdump named the 1G-mapping as "PUD"
that should be "PGD":

0xffffffd840000000-0xffffffd900000000    0x00000000c0000000         3G PUD     D A G . . W R V

So select "P4D/PUD" or "PGD" via pgtable_l5/4_enabled to correct it.

Fixes: e8a62cc26d ("riscv: Implement sv48 support")
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Song Shuai <suagrfillet@gmail.com>
Link: https://lore.kernel.org/r/20230712115740.943324-1-suagrfillet@gmail.com
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230830044129.11481-3-palmer@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:20:13 +00:00
arch riscv: correct pt_level name via pgtable_l5/4_enabled 2023-11-28 17:20:13 +00:00
block
certs
crypto
Documentation
drivers dm-verity: don't use blocking calls from tasklets 2023-11-28 17:20:12 +00:00
fs NFSD: Update nfsd_cache_append() to use xdr_stream 2023-11-28 17:20:12 +00:00
include net: ethtool: Fix documentation of ethtool_sprintf() 2023-11-28 17:20:11 +00:00
init
io_uring
ipc
kernel swiotlb: fix out-of-bounds TLB allocations with CONFIG_SWIOTLB_DYNAMIC 2023-11-28 17:20:13 +00:00
lib
LICENSES
mm parisc: fix mmap_base calculation when stack grows upwards 2023-11-28 17:20:08 +00:00
net Revert ncsi: Propagate carrier gain/loss events to the NCSI controller 2023-11-28 17:20:10 +00:00
rust
samples
scripts
security
sound ALSA: hda/realtek: Add quirks for HP Laptops 2023-11-28 17:20:10 +00:00
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.