aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/kernel/cpu-probe.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index c7b7eb24e277..aa86250844ca 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -291,6 +291,12 @@ static inline int cpu_has_confreg(void)
291#endif 291#endif
292} 292}
293 293
294static inline void set_elf_platform(int cpu, const char *plat)
295{
296 if (cpu == 0)
297 __elf_platform = plat;
298}
299
294/* 300/*
295 * Get the FPU Implementation/Revision. 301 * Get the FPU Implementation/Revision.
296 */ 302 */
@@ -956,14 +962,12 @@ static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu)
956 c->cputype = CPU_CAVIUM_OCTEON_PLUS; 962 c->cputype = CPU_CAVIUM_OCTEON_PLUS;
957 __cpu_name[cpu] = "Cavium Octeon+"; 963 __cpu_name[cpu] = "Cavium Octeon+";
958platform: 964platform:
959 if (cpu == 0) 965 set_elf_platform(cpu, "octeon");
960 __elf_platform = "octeon";
961 break; 966 break;
962 case PRID_IMP_CAVIUM_CN63XX: 967 case PRID_IMP_CAVIUM_CN63XX:
963 c->cputype = CPU_CAVIUM_OCTEON2; 968 c->cputype = CPU_CAVIUM_OCTEON2;
964 __cpu_name[cpu] = "Cavium Octeon II"; 969 __cpu_name[cpu] = "Cavium Octeon II";
965 if (cpu == 0) 970 set_elf_platform(cpu, "octeon2");
966 __elf_platform = "octeon2";
967 break; 971 break;
968 default: 972 default:
969 printk(KERN_INFO "Unknown Octeon chip!\n"); 973 printk(KERN_INFO "Unknown Octeon chip!\n");