Re: [PATCH RESEND v4 1/9] MIPS: Loongson: Add basic Loongson-1A CPU support

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

 



On Thu, May 19, 2016 at 09:38:26AM +0800, Binbin Zhou wrote:

> --- a/arch/mips/kernel/cpu-probe.c
> +++ b/arch/mips/kernel/cpu-probe.c
> @@ -1497,8 +1497,12 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
>  		c->cputype = CPU_LOONGSON1;
>  
>  		switch (c->processor_id & PRID_REV_MASK) {
> -		case PRID_REV_LOONGSON1B:
> +		case PRID_REV_LOONGSON1A_1B:
> +#ifdef CONFIG_CPU_LOONGSON1A
> +			__cpu_name[cpu] = "Loongson 1A";
> +#else
>  			__cpu_name[cpu] = "Loongson 1B";
> +#endif

Is there no way to distinguish between Loongson 1A and 1B at runtime for
example by looking at the version number or similar?

> --- a/arch/mips/loongson32/common/setup.c
> +++ b/arch/mips/loongson32/common/setup.c
> @@ -21,8 +21,12 @@ const char *get_system_type(void)
>  	unsigned int processor_id = (&current_cpu_data)->processor_id;
>  
>  	switch (processor_id & PRID_REV_MASK) {
> -	case PRID_REV_LOONGSON1B:
> +	case PRID_REV_LOONGSON1A_1B:
> +#ifdef CONFIG_CPU_LOONGSON1A
> +		return "LOONGSON LS1A";
> +#else
>  		return "LOONGSON LS1B";
> +#endif
>  	default:
>  		return "LOONGSON (unknown)";
>  	}

Ditto.

  Ralf




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

  Powered by Linux