diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-09-17 04:25:47 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-09-17 12:50:53 -0400 |
commit | 69f24d1784b631b81a54eb57c49bf46536dd2382 (patch) | |
tree | 93c05469adbeb6bd24ab06b11d5f906a879e2c11 /arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h | |
parent | ff522058bd717506b2fa066fa564657f2b86477e (diff) |
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/
Diffstat (limited to 'arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h')
-rw-r--r-- | arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h index 65e9c856390d..4cec06d133db 100644 --- a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H | 9 | #ifndef __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H |
10 | #define __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H | 10 | #define __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H |
11 | 11 | ||
12 | #include <asm/cpu.h> | ||
13 | |||
12 | /* | 14 | /* |
13 | * IP28 only comes with R10000 family processors all using the same config | 15 | * IP28 only comes with R10000 family processors all using the same config |
14 | */ | 16 | */ |