From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/8] ARM: make xscale iwmmxt code multiplatform aware
Date: Fri, 27 Feb 2015 20:20:47 +0100 [thread overview]
Message-ID: <8633095.JZKP2JGaT3@wuerfel> (raw)
In-Reply-To: <CAL_JsqJyhKQQ-9SdFkWu_Z1MKzHfxUtDjEPrDg=hYm3rnbsrFQ@mail.gmail.com>
On Friday 27 February 2015 11:53:47 Rob Herring wrote:
> > diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
> > index 819777d0e91f..7bc66e22afd7 100644
> > --- a/arch/arm/include/asm/cputype.h
> > +++ b/arch/arm/include/asm/cputype.h
> > @@ -228,10 +228,33 @@ static inline int cpu_is_xsc3(void)
> > }
> > #endif
> >
> > -#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
> > +#if !defined(CONFIG_CPU_XSCALE)
>
> You could use IS_ENABLED here.
We use #ifdef for the same thing in the rest of the file, so I
kept the coding style.
I could convert all three here and the PJ4, but the others
wouldn't work because they require some other macros to be
defined.
I think I'd rather keep it this way for consistency, unless Russell
prefers it to be changed to
static inline int cpu_is_xscale(void)
{
unsigned int id;
if (!IS_ENABLED(CONFIG_XSCALE))
return 0;
id = read_cpuid_id() & 0xffffe000;
if ((id == 0x69052000) || (id == 0x69054000))
return 1;
return 0;
}
> > @@ -152,6 +153,11 @@ static int __init xscale_cp0_init(void)
> > {
> > u32 cp_access;
> >
> > + /* do not attempt to probe iwmmxt on non-xscale family CPUs */
> > + if (IS_ENABLED(CONFIG_ARCH_MULTIPLATFORM) &&
>
> Do you really need this condition?
>
> > + !(cpu_is_xscale() || cpu_is_xsc3() || cpu_is_mohawk()))
> > + return 0;
> > +
No, it was just an optimization for the other (non-multi) platforms to
avoid reading the cpuid. I'll just drop it.
Arnd
next prev parent reply other threads:[~2015-02-27 19:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 13:29 [PATCH 0/8] ARM: MMP multiplatform support Arnd Bergmann
2015-02-27 13:29 ` [PATCH 1/8] mtd: nand: pxa3xx: disable DMA support on MMP Arnd Bergmann
2015-02-27 13:29 ` [PATCH 2/8] clk: mmp: stop using platform headers Arnd Bergmann
2015-02-27 13:29 ` [PATCH 3/8] ARM: make xscale iwmmxt code multiplatform aware Arnd Bergmann
2015-02-27 17:53 ` Rob Herring
2015-02-27 19:20 ` Arnd Bergmann [this message]
2015-03-04 14:12 ` Robert Jarzmik
2015-03-04 14:38 ` Arnd Bergmann
2015-03-04 17:30 ` Robert Jarzmik
2015-03-09 17:37 ` Russell King - ARM Linux
2015-03-13 16:50 ` Arnd Bergmann
2015-03-13 16:56 ` [PATCH v2] " Arnd Bergmann
2015-02-27 13:29 ` [PATCH 4/8] ARM: mohawk: allow building with MMU disabled Arnd Bergmann
2015-02-27 13:29 ` [PATCH 5/8] ARM: mmp: remove remaining legacy pxa-dma support Arnd Bergmann
2015-02-27 13:30 ` Arnd Bergmann
2015-02-27 13:31 ` [PATCH 6/8] ARM: mmp: make all header files local Arnd Bergmann
2015-02-27 13:31 ` [PATCH 7/8] ARM: mmp: make plat-pxa build standalone Arnd Bergmann
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=8633095.JZKP2JGaT3@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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.