MIPS: Optimize current_cpu_type() for better code.

o Move current_cpu_type() to a separate header file
 o #ifdefing on supported CPU types lets modern GCC know that certain
   code in callers may be discarded ideally turning current_cpu_type() into
   a function returning a constant.
 o Use current_cpu_type() rather than direct access to struct cpuinfo_mips.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5833/
This commit is contained in:
Ralf Baechle
2013-09-17 10:25:47 +02:00
parent ff522058bd
commit 69f24d1784
19 changed files with 236 additions and 19 deletions

View File

@@ -9,6 +9,8 @@
#ifndef __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H
#define __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H
#include <asm/cpu.h>
/*
* IP28 only comes with R10000 family processors all using the same config
*/