Re: [PATCH] MIPS: Add 1074K CPU support explicitly.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 17 Jan 2014, Steven J. Hill wrote:

> From: "Steven J. Hill" <Steven.Hill@xxxxxxxxxx>
> 
> The 1074K is a multiprocessing coherent processing system (CPS) based
> on modified 74K cores. This patch makes the 1074K an actual unique
> CPU type, instead of a 74K derivative, which it is not.
> 
> Signed-off-by: Steven J. Hill <Steven.Hill@xxxxxxxxxx>
> Reviewed-by: Leonid Yegoshin <Leonid.Yegoshin@xxxxxxxxxx>
> ---
[...]
> diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
> index 13b549a..7184363 100644
> --- a/arch/mips/mm/c-r4k.c
> +++ b/arch/mips/mm/c-r4k.c
> @@ -1106,9 +1106,10 @@ static void probe_pcache(void)
>  	case CPU_34K:
>  	case CPU_74K:
>  	case CPU_1004K:
> +	case CPU_1074K:
>  	case CPU_INTERAPTIV:
>  	case CPU_PROAPTIV:
> -		if (current_cpu_type() == CPU_74K)
> +		if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K))
>  			alias_74k_erratum(c);
>  		if ((read_c0_config7() & (1 << 16))) {
>  			/* effectively physically indexed dcache,

 Hmm, wouldn't it make sense to avoid the repeated condition check and 
make it:

	case CPU_74K:
	case CPU_1074K:
		alias_74k_erratum(c);
		/* Fall through. */
	case CPU_M14KC:
	case CPU_M14KEC:
	case CPU_24K:
	case CPU_34K:
 	case CPU_INTERAPTIV:
 	case CPU_PROAPTIV:
 		if ((read_c0_config7() & (1 << 16))) {
 			/* effectively physically indexed dcache,
	
or suchlike instead?  Also why `c->cputype == CPU_74K' rather than 
`current_cpu_type() == CPU_74K'?

  Maciej


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux