]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
MIPS: Optimize current_cpu_type() for better code.
authorRalf Baechle <ralf@linux-mips.org>
Tue, 17 Sep 2013 08:25:47 +0000 (10:25 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 17 Sep 2013 16:50:53 +0000 (18:50 +0200)
commit69f24d1784b631b81a54eb57c49bf46536dd2382
tree93c05469adbeb6bd24ab06b11d5f906a879e2c11
parentff522058bd717506b2fa066fa564657f2b86477e
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/
19 files changed:
arch/mips/cavium-octeon/csrc-octeon.c
arch/mips/dec/prom/init.c
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/cpu-type.h [new file with mode: 0644]
arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h
arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h
arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/idle.c
arch/mips/kernel/time.c
arch/mips/kernel/traps.c
arch/mips/mm/c-octeon.c
arch/mips/mm/c-r4k.c
arch/mips/mm/dma-default.c
arch/mips/mm/page.c
arch/mips/mm/sc-mips.c
arch/mips/mm/tlb-r4k.c
arch/mips/mm/tlbex.c
arch/mips/oprofile/common.c