aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorWu Zhangjin <wuzhangjin@gmail.com>2010-12-25 15:42:37 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-03-31 12:17:12 -0400
commitd7b12056bc9cbd7f0c0ae5bc52f2b049d48c4314 (patch)
treefe2253512a792611d83ad6fc4965744d3b0e5561 /arch/mips
parent1bc021e815659190c31b19acead70d4e96516bf1 (diff)
MIPS: Use current_cpu_type() instead of c->cputype
If current_cpu_type() is pre-defined in cpu-feature-overrides.h, This may save about 10k for the compressed kernel image(vmlinuz). Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1901/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm63xx/cpu.c3
-rw-r--r--arch/mips/kernel/spram.c3
-rw-r--r--arch/mips/mm/tlbex.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/arch/mips/bcm63xx/cpu.c b/arch/mips/bcm63xx/cpu.c
index 1b1b8a89959b..fd4e76c00a42 100644
--- a/arch/mips/bcm63xx/cpu.c
+++ b/arch/mips/bcm63xx/cpu.c
@@ -299,14 +299,13 @@ static unsigned int detect_memory_size(void)
299void __init bcm63xx_cpu_init(void) 299void __init bcm63xx_cpu_init(void)
300{ 300{
301 unsigned int tmp; 301 unsigned int tmp;
302 struct cpuinfo_mips *c = &current_cpu_data;
303 unsigned int cpu = smp_processor_id(); 302 unsigned int cpu = smp_processor_id();
304 u32 chipid_reg; 303 u32 chipid_reg;
305 304
306 /* soc registers location depends on cpu type */ 305 /* soc registers location depends on cpu type */
307 chipid_reg = 0; 306 chipid_reg = 0;
308 307
309 switch (c->cputype) { 308 switch (current_cpu_type()) {
310 case CPU_BMIPS3300: 309 case CPU_BMIPS3300:
311 if ((read_c0_prid() & PRID_IMP_MASK) != PRID_IMP_BMIPS3300_ALT) 310 if ((read_c0_prid() & PRID_IMP_MASK) != PRID_IMP_BMIPS3300_ALT)
312 __cpu_name[cpu] = "Broadcom BCM6338"; 311 __cpu_name[cpu] = "Broadcom BCM6338";
diff --git a/arch/mips/kernel/spram.c b/arch/mips/kernel/spram.c
index f9a693a6aaa7..67f2495def1c 100644
--- a/arch/mips/kernel/spram.c
+++ b/arch/mips/kernel/spram.c
@@ -197,10 +197,9 @@ static void probe_spram(char *type,
197} 197}
198void spram_config(void) 198void spram_config(void)
199{ 199{
200 struct cpuinfo_mips *c = &current_cpu_data;
201 unsigned int config0; 200 unsigned int config0;
202 201
203 switch (c->cputype) { 202 switch (current_cpu_type()) {
204 case CPU_24K: 203 case CPU_24K:
205 case CPU_34K: 204 case CPU_34K:
206 case CPU_74K: 205 case CPU_74K:
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index be407d5ccc4e..6e5c9fda72c9 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -624,7 +624,7 @@ static void build_tlb_write_entry(u32 **p, struct uasm_label **l,
624 624
625 default: 625 default:
626 panic("No TLB refill handler yet (CPU type: %d)", 626 panic("No TLB refill handler yet (CPU type: %d)",
627 current_cpu_data.cputype); 627 current_cpu_type());
628 break; 628 break;
629 } 629 }
630} 630}