diff options
Diffstat (limited to 'arch/mips/mm/c-octeon.c')
| -rw-r--r-- | arch/mips/mm/c-octeon.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c index 729e7702b1de..c8efdb5b6ee0 100644 --- a/arch/mips/mm/c-octeon.c +++ b/arch/mips/mm/c-octeon.c @@ -19,6 +19,7 @@  #include <asm/bootinfo.h>  #include <asm/cacheops.h>  #include <asm/cpu-features.h> +#include <asm/cpu-type.h>  #include <asm/page.h>  #include <asm/pgtable.h>  #include <asm/r4kcache.h> @@ -186,9 +187,10 @@ static void probe_octeon(void)  	unsigned long dcache_size;  	unsigned int config1;  	struct cpuinfo_mips *c = ¤t_cpu_data; +	int cputype = current_cpu_type();  	config1 = read_c0_config1(); -	switch (c->cputype) { +	switch (cputype) {  	case CPU_CAVIUM_OCTEON:  	case CPU_CAVIUM_OCTEON_PLUS:  		c->icache.linesz = 2 << ((config1 >> 19) & 7); @@ -199,7 +201,7 @@ static void probe_octeon(void)  			c->icache.sets * c->icache.ways * c->icache.linesz;  		c->icache.waybit = ffs(icache_size / c->icache.ways) - 1;  		c->dcache.linesz = 128; -		if (c->cputype == CPU_CAVIUM_OCTEON_PLUS) +		if (cputype == CPU_CAVIUM_OCTEON_PLUS)  			c->dcache.sets = 2; /* CN5XXX has two Dcache sets */  		else  			c->dcache.sets = 1; /* CN3XXX has one Dcache set */  |