OSDN Git Service

MIPS: kernel: proc: add CPU option reporting
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 14 Oct 2021 05:40:18 +0000 (22:40 -0700)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sun, 24 Oct 2021 15:20:39 +0000 (17:20 +0200)
commit626bfa03729959ea9917181fb3d8ffaa1594d02a
treeadce20ad4779df9e3e659ad39c9c55bb109b5a84
parent1ad964ae1a91501d259fa2df403d9e983c8b61e0
MIPS: kernel: proc: add CPU option reporting

Many MIPS CPUs have optional CPU features which are not activated for
all CPU cores. Print the CPU options, which are implemented in the core,
in /proc/cpuinfo. This makes it possible to see which features are
supported and which are not supported. This should cover all standard
MIPS extensions. Before, it only printed information about the main MIPS
ASEs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Changes from original patch[0]:
- Remove cpu_has_6k_cache and cpu_has_8k_cache due to commit 6ce91ba8589a
  ("MIPS: Remove cpu_has_6k_cache and cpu_has_8k_cache in cpu_cache_init()")
- Add new options: mac2008_only, ftlbparex, gsexcex, mmid, mm_sysad,
  mm_full
- Use seq_puts instead of seq_printf as suggested by checkpatch
- Minor commit message reword

[0]: https://lore.kernel.org/linux-mips/20181223225224.23042-1-hauke@hauke-m.de/

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/proc.c