Commit e647e6b5 authored by Markos Chandras's avatar Markos Chandras Committed by Ralf Baechle

MIPS: cpu: Add new cpu option for Hardware Table Walker.

Moreover, report hardware page table walker support as 'htw' in the ASE
list of /proc/cpuinfo, if the core implements this feature.
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7334/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 03a58777
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
#ifndef cpu_has_eva #ifndef cpu_has_eva
#define cpu_has_eva (cpu_data[0].options & MIPS_CPU_EVA) #define cpu_has_eva (cpu_data[0].options & MIPS_CPU_EVA)
#endif #endif
#ifndef cpu_has_htw
#define cpu_has_htw (cpu_data[0].options & MIPS_CPU_HTW)
#endif
/* /*
* For the moment we don't consider R6000 and R8000 so we can assume that * For the moment we don't consider R6000 and R8000 so we can assume that
......
...@@ -365,6 +365,7 @@ enum cpu_type_enum { ...@@ -365,6 +365,7 @@ enum cpu_type_enum {
#define MIPS_CPU_TLBINV 0x02000000ull /* CPU supports TLBINV/F */ #define MIPS_CPU_TLBINV 0x02000000ull /* CPU supports TLBINV/F */
#define MIPS_CPU_SEGMENTS 0x04000000ull /* CPU supports Segmentation Control registers */ #define MIPS_CPU_SEGMENTS 0x04000000ull /* CPU supports Segmentation Control registers */
#define MIPS_CPU_EVA 0x80000000ull /* CPU supports Enhanced Virtual Addressing */ #define MIPS_CPU_EVA 0x80000000ull /* CPU supports Enhanced Virtual Addressing */
#define MIPS_CPU_HTW 0x100000000ull /* CPU support Hardware Page Table Walker */
/* /*
* CPU ASE encodings * CPU ASE encodings
......
...@@ -113,6 +113,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -113,6 +113,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
if (cpu_has_vz) seq_printf(m, "%s", " vz"); if (cpu_has_vz) seq_printf(m, "%s", " vz");
if (cpu_has_msa) seq_printf(m, "%s", " msa"); if (cpu_has_msa) seq_printf(m, "%s", " msa");
if (cpu_has_eva) seq_printf(m, "%s", " eva"); if (cpu_has_eva) seq_printf(m, "%s", " eva");
if (cpu_has_htw) seq_printf(m, "%s", " htw");
seq_printf(m, "\n"); seq_printf(m, "\n");
if (cpu_has_mmips) { if (cpu_has_mmips) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment