linux-mips
[Top] [All Lists]

Re: [PATCH v3 4/4] MIPS: ath79: don't override CPU ASE features

To: Gabor Juhos <juhosg@openwrt.org>
Subject: Re: [PATCH v3 4/4] MIPS: ath79: don't override CPU ASE features
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 14 Aug 2012 11:59:23 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <1344096087-25044-5-git-send-email-juhosg@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1344096087-25044-1-git-send-email-juhosg@openwrt.org> <1344096087-25044-5-git-send-email-juhosg@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Aug 04, 2012 at 06:01:27PM +0200, Gabor Juhos wrote:

> The ath79 platform covers various SoCs which are based on
> the 24Kc and 74Kc cores. Currently various ASEs are disabled
> explicitely by the cpu-feature-overrides header, even those
> which are present in the 74Kc core.
> 
> The kernel is able to detect the available ASEs, so remove
> the overrides.
> 
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
> ---
>  arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h |    8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h 
> b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
> index 4476fa0..edbf23e 100644
> --- a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
> +++ b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
> @@ -32,19 +32,11 @@
>  #define cpu_has_ejtag                1
>  #define cpu_has_llsc         1
>  
> -#define cpu_has_mips16               1

Both 24K and 74K always implement MIPS16, so leave this defined to 1.

> -#define cpu_has_mdmx         0
> -#define cpu_has_mips3d               0

Neither the 24K nor he 74K implement MIPS-3D or MDMX, so best leave these
defined to 0.

> -#define cpu_has_smartmips    0

Neither the 24K nor he 74K implement SmartMIPS, so best leave this defined
to 0.

>  #define cpu_has_mips32r1     1
>  #define cpu_has_mips32r2     1
>  #define cpu_has_mips64r1     0
>  #define cpu_has_mips64r2     0
>  
> -#define cpu_has_dsp          0

24K has no DSP extension, 24KE has DSP extensions (version 1 afair).  74K
implements DSP ASE version 2.  So if you have a plain 24K (or 24Kc or
24Kf or other non-24KE based 24K variant), wire this to 0.  If you have
a 24KE family core then removing the definition is the right thing.

> -#define cpu_has_mipsmt               0

Neither implements the MT ASE, so best leave these defined to 0.

Generally, hardwire whatever you can.  This will make gcc eleminate lots
of dead code and result in a significantly smaller and also faster kernel.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>