linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: Add Cortex A5 proc info
Date: Thu, 19 May 2011 17:08:19 +0100	[thread overview]
Message-ID: <20110519160819.GD2431@arm.com> (raw)
In-Reply-To: <1305819084.17656.63.camel@hornet.cambridge.arm.com>

On Thu, May 19, 2011 at 04:31:24PM +0100, Pawel Moll wrote:
> > Please can you do the same for the __v7_proc_info struct? 
> 
> Yeah, I could if we want to... The thing is that the macro will have to
> take full ID and mask value then. And a name for the structure. So extra
> 3 parameters. Not a big deal I suppose.

Optionally, you could just omit the label and mask/match words from the
macro.  Those are always at the start, so we don't need to cunningly
insert them in the middle of the macro expansion.

By definition, they will be different per expansion, too.  So it makes
less sense to have these in the macro definition itself.

Similarly, you could just leave the .size directive out of the macro
to avoid having to generlise it -- after all, it's not generalised
for the other proc_info definitions so this makes the situation no
worse.

> 
> > On top of that, I think you should take optional, additional HWCAPs as
> > arguments to the macro which get ORd with the base v7 HWCAPs. 
> 
> Em, the "optional" bit here is a problem. I can't just do
> 
> #define INFO(_a, _extra_hwcaps...) \
> 	.long HWCAP | _extra_hwcaps;
> 
> 
> Because the output would be ".long HWCAP | ;" when no _extra_hwcaps are
> given... Unless I'm missing some preprocessor trick? :-)

You could use an assembler macro instead.

.macro blarg insert_hwcaps=0
	/* blah */
	.long HWCAP_ALICE | HWCAP_BOB | HWCAP_CHARLIE | ( \insert_hwcaps )
	/* blah */
.endm

As an added bonus, this could substantially reduce the diffstat, because
assembler macro definitions can have multiple lines, so you don't need
all that awful semicolon-backslash line continuation stuff.

Not everyone likes assembler macros, though...

> 
> > This might be useful for A15 where we have integer division.
> 
> What HWCAP would this be? I've checked Catalin's repo and the only
> difference I've spotted between A9 and A15 proc info were the mmu
> flags...

You could invent one, if none is defined yet.  You probably want to
check with Catalin or Will.

---Dave

  reply	other threads:[~2011-05-19 16:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 16:49 [PATCH] arm: Add Cortex A5 proc_info Pawel Moll
2011-05-18  9:47 ` Pawel Moll
2011-05-18 10:53   ` Dave Martin
2011-05-18 12:06     ` Pawel Moll
2011-05-18 16:44       ` [PATCH v2] arm: Add Cortex A5 proc info Pawel Moll
2011-05-19 14:10         ` Will Deacon
2011-05-19 15:31           ` Pawel Moll
2011-05-19 16:08             ` Dave Martin [this message]
2011-05-20  9:14               ` Will Deacon
2011-05-20 11:51               ` Pawel Moll
2011-05-20 13:39                 ` [PATCH v3 1/2] arm: Convert v7 proc infos into a common macro Pawel Moll
2011-05-20 13:39                   ` [PATCH v3 2/2] arm: Add Cortex A5 proc info Pawel Moll
2011-05-20 14:32                     ` Will Deacon
2011-05-20 14:31                   ` [PATCH v3 1/2] arm: Convert v7 proc infos into a common macro Will Deacon

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=20110519160819.GD2431@arm.com \
    --to=dave.martin@linaro.org \
    --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).