mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
MIPS: cpu-features: Enable octeon_cache by cpu_type
[ Upstream commitf641519409
] cpu_has_octeon_cache was tied to 0 for generic cpu-features, whith this generic kernel built for octeon CPU won't boot. Just enable this flag by cpu_type. It won't hurt orther platforms because compiler will eliminate the code path on other processors. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Stable-dep-of:5487a7b606
("MIPS: cpu-features: Use boot_cpu_type for CPU type based features") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bd40db75ff
commit
6f3f42d10f
1 changed files with 18 additions and 1 deletions
|
@ -124,7 +124,24 @@
|
|||
#define cpu_has_tx39_cache __opt(MIPS_CPU_TX39_CACHE)
|
||||
#endif
|
||||
#ifndef cpu_has_octeon_cache
|
||||
#define cpu_has_octeon_cache 0
|
||||
#define cpu_has_octeon_cache \
|
||||
({ \
|
||||
int __res; \
|
||||
\
|
||||
switch (current_cpu_type()) { \
|
||||
case CPU_CAVIUM_OCTEON: \
|
||||
case CPU_CAVIUM_OCTEON_PLUS: \
|
||||
case CPU_CAVIUM_OCTEON2: \
|
||||
case CPU_CAVIUM_OCTEON3: \
|
||||
__res = 1; \
|
||||
break; \
|
||||
\
|
||||
default: \
|
||||
__res = 0; \
|
||||
} \
|
||||
\
|
||||
__res; \
|
||||
})
|
||||
#endif
|
||||
/* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */
|
||||
#ifndef cpu_has_fpu
|
||||
|
|
Loading…
Add table
Reference in a new issue