All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabor Juhos <juhosg@openwrt.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH v3 4/4] MIPS: ath79: don't override CPU ASE features
Date: Tue, 14 Aug 2012 14:29:45 +0200	[thread overview]
Message-ID: <502A44B9.6010708@openwrt.org> (raw)
In-Reply-To: <20120814095923.GD28466@linux-mips.org>

2012.08.14. 11:59 keltezéssel, Ralf Baechle írta:
> 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.

Ok, I will keep these lines.

> 
>>  #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.

The AR71xx/AR724x/AR913x/AR933x SoCs are using the 24Kc core, but the AR934x
SoCs are using 74K. The ath79 platform code can support all of these SoCs within
a single kernel, so removing the definition seems to be the right thing.
Although it would be possible to optimize things if only the 24K or the 74K
based SoCs are selected, but that would require ugly ifdef statements.

> 
>> -#define cpu_has_mipsmt		0
> 
> Neither implements the MT ASE, so best leave these defined to 0.

Ok.

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

I will send an updated patch. Thank you for the review!

-Gabor

      reply	other threads:[~2012-08-14 12:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 16:01 [PATCH v3 0/4] MIPS: ath79: various fixes Gabor Juhos
2012-08-04 16:01 ` [PATCH v3 1/4] MIPS: ath79: fix number of GPIO lines for AR724[12] Gabor Juhos
2012-08-14  9:25   ` Ralf Baechle
2012-08-14 11:58     ` Gabor Juhos
2012-08-04 16:01 ` [PATCH v3 2/4] MIPS: ath79: use correct IRQ number for the OHCI controller on AR7240 Gabor Juhos
2012-08-14  9:25   ` Ralf Baechle
2012-08-14 12:01     ` Gabor Juhos
2012-08-04 16:01 ` [PATCH v3 3/4] MIPS: ath79: select HAVE_CLK Gabor Juhos
2012-08-14  9:26   ` Ralf Baechle
2012-08-14 12:28     ` Gabor Juhos
2012-08-04 16:01 ` [PATCH v3 4/4] MIPS: ath79: don't override CPU ASE features Gabor Juhos
2012-08-14  9:59   ` Ralf Baechle
2012-08-14 12:29     ` Gabor Juhos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502A44B9.6010708@openwrt.org \
    --to=juhosg@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.