]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
MIPS: Always record SEGBITS in cpu_data.vmbits
authorMaciej W. Rozycki <macro@orcam.me.uk>
Fri, 27 Mar 2026 18:57:18 +0000 (18:57 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 1 Apr 2026 19:53:50 +0000 (21:53 +0200)
commit8374c2cb83b95b3c92f129fd56527225c20a058c
tree98ca4eca5687b1acb96b7e3aac0c0a4faf1b05f7
parentec8bf18814915460d9c617b556bf024efef26613
MIPS: Always record SEGBITS in cpu_data.vmbits

With a 32-bit kernel running on 64-bit MIPS hardware the hardcoded value
of `cpu_vmbits' only records the size of compatibility useg and does not
reflect the size of native xuseg or the complete range of values allowed
in the VPN2 field of TLB entries.

An upcoming change will need the actual VPN2 value range permitted even
in 32-bit kernel configurations, so always include the `vmbits' member
in `struct cpuinfo_mips' and probe for SEGBITS when running on 64-bit
hardware and resorting to the currently hardcoded value of 31 on 32-bit
processors.  No functional change for users of `cpu_vmbits'.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/cpu-info.h
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/cpu-r3k-probe.c