From: eric.y.miao@gmail.com (Eric Miao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/10] [ARM] pxa: clean code in hardware.h
Date: Wed, 5 May 2010 14:00:56 +0800 [thread overview]
Message-ID: <s2hf17812d71005042300j923959b3z6bd8227570510623@mail.gmail.com> (raw)
In-Reply-To: <s2g771cded01004290118s896bc1e6r2479e6446fd1e981@mail.gmail.com>
On Thu, Apr 29, 2010 at 4:18 PM, Haojian Zhuang
<haojian.zhuang@gmail.com> wrote:
> From 214c0dd2536c7eb55359bb46deb9b1126e1af822 Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@marvell.com>
> Date: Fri, 12 Mar 2010 08:53:47 -0500
> Subject: [PATCH] [ARM] pxa: clean code in hardware.h
>
> Avoid too much conditional compilation in hardware.h.
>
Mmm.... this avoids the trivial optimization of each CPU being
compiled in or not.
> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
> ---
> ?arch/arm/mach-pxa/include/mach/hardware.h | ? 27 ++++++---------------------
> ?1 files changed, 6 insertions(+), 21 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/include/mach/hardware.h
> b/arch/arm/mach-pxa/include/mach/hardware.h
> index 3d8d8cb..6694643 100644
> --- a/arch/arm/mach-pxa/include/mach/hardware.h
> +++ b/arch/arm/mach-pxa/include/mach/hardware.h
> @@ -148,63 +148,48 @@
> ?#define __cpu_is_pxa27x(id) ? ?(0)
> ?#endif
>
> -#ifdef CONFIG_CPU_PXA300
> +#ifdef CONFIG_PXA3xx
> ?#define __cpu_is_pxa300(id) ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ?({ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ? ? ? ? ?unsigned int _id = (id) >> 4 & 0xfff; ? \
> ? ? ? ? ? ? ? ?_id == 0x688; ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ? })
> -#else
> -#define __cpu_is_pxa300(id) ? ?(0)
> -#endif
>
> -#ifdef CONFIG_CPU_PXA310
> ?#define __cpu_is_pxa310(id) ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ?({ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ? ? ? ? ?unsigned int _id = (id) >> 4 & 0xfff; ? \
> ? ? ? ? ? ? ? ?_id == 0x689; ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ? })
> -#else
> -#define __cpu_is_pxa310(id) ? ?(0)
> -#endif
>
> -#ifdef CONFIG_CPU_PXA320
> ?#define __cpu_is_pxa320(id) ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ?({ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ? ? ? ? ?unsigned int _id = (id) >> 4 & 0xfff; ? \
> ? ? ? ? ? ? ? ?_id == 0x603 || _id == 0x682; ? ? ? ? ? \
> ? ? ? ? })
> -#else
> -#define __cpu_is_pxa320(id) ? ?(0)
> -#endif
>
> -#ifdef CONFIG_CPU_PXA930
> ?#define __cpu_is_pxa930(id) ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ?({ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ? ? ? ? ?unsigned int _id = (id) >> 4 & 0xfff; ? \
> ? ? ? ? ? ? ? ?_id == 0x683; ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ? })
> -#else
> -#define __cpu_is_pxa930(id) ? ?(0)
> -#endif
>
> -#ifdef CONFIG_CPU_PXA935
> ?#define __cpu_is_pxa935(id) ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ?({ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ? ? ? ? ?unsigned int _id = (id) >> 4 & 0xfff; ? \
> ? ? ? ? ? ? ? ?_id == 0x693; ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ? })
> -#else
> -#define __cpu_is_pxa935(id) ? ?(0)
> -#endif
>
> -#ifdef CONFIG_CPU_PXA950
> ?#define __cpu_is_pxa950(id) ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ?({ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ? ? ? ? ?unsigned int _id = (id) >> 4 & 0xfff; ? \
> ? ? ? ? ? ? ? ?_id == 0x697; ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ? })
> ?#else
> +#define __cpu_is_pxa300(id) ? ?(0)
> +#define __cpu_is_pxa310(id) ? ?(0)
> +#define __cpu_is_pxa320(id) ? ?(0)
> +#define __cpu_is_pxa930(id) ? ?(0)
> +#define __cpu_is_pxa935(id) ? ?(0)
> ?#define __cpu_is_pxa950(id) ? ?(0)
> ?#endif
>
> --
> 1.5.6.5
>
prev parent reply other threads:[~2010-05-05 6:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 8:18 [PATCH 06/10] [ARM] pxa: clean code in hardware.h Haojian Zhuang
2010-05-05 6:00 ` Eric Miao [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=s2hf17812d71005042300j923959b3z6bd8227570510623@mail.gmail.com \
--to=eric.y.miao@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).