From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ARM: fiq: Refactor {get,set}_fiq_regs() for Thumb-2
Date: Thu, 7 Apr 2011 15:29:32 +0100 [thread overview]
Message-ID: <BANLkTikesVqvVQvxbFihEE2woHirvnX79A@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1104071503340.1147@localhost6.localdomain6>
On Thu, Apr 7, 2011 at 3:24 PM, Frank Hofmann <frank.hofmann@tomtom.com> wrote:
> On Thu, 7 Apr 2011, Dave Martin wrote:
>
>> On Thu, Apr 7, 2011 at 12:35 PM, Frank Hofmann <frank.hofmann@tomtom.com>
>> wrote:
>>>
>>> On Thu, 7 Apr 2011, Dave Martin wrote:
>>>
>>> [ ... ]
>>>>
>>>> Well, I'm not hoping for the assembly to be inlined, *just* the C
>>>> wrapper. ?Since the C wrapper is trivial, I prefer to avoid emitting a
>>>> function body for this.
>>>
>>> _That_ specific bit is what isn't going to happen; it's a separate
>>> compilation unit, it needs to be callable from places not known at
>>> compile
>>> nor link time, and the function isn't "static". The "inline" is
>>> meaningless
>>> here.
>>
>> The wrapper functions _are_ static:
>>
>> +static inline void set_fiq_regs(struct pt_regs const *regs)
>> +{
>> + ? ? ? __set_fiq_regs(®s->ARM_r8);
>> +}
>> +
>> +static inline void get_fiq_regs(struct pt_regs *regs)
>> +{
>> + ? ? ? __get_fiq_regs(®s->ARM_r8);
>> +}
>
> Ah ok ... now I get that bit, sorry <facepalm> - I had a patch mixup ...
> You're right. When in the header these are fine.
>
> Thx for the coding style pointer :)
>
>
>> IIUC, <arm/assembler.h> establishes the standard environment for .S
>> files for arm, which includes <asm/ptrace.h>. ?kernel/entry-header.S
>> gets those bit definitions by the same route, for example.
Argh, that's me repeating the same typo I had in the patch... yes, it
should be <asm/assembler.h>
>
> You're sure ? Sorry for being nitpicky there. "arm" vs. "asm", single
> character typo.
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/arm/kernel/entry-header.S;h=051166c2a932cfed1620bb3a5612383ffff12149;hb=HEAD#l4
>
> says:
>
> 4 #include <asm/assembler.h>
>
> "grep -r arm/assembler.h" on my tree comes out empty.
>
> Besides, without <linux/linkage.h> the ENTRY/ENDPROC aren't defined; where
> does your environment pick them up from ? <asm/assembler.h> doesn't include
> it.
Yup. <linux/linkage.h> is definitley needed too.
>
>>
>>>
>>>
>>> [ ... ]
>>>>
>>>> Does that answer your concerns?
>>>
>>> I agree with you that this should be assembly, no arguing it's better to
>>> nip
>>> gcc's optimizer escapades in the bud ...
>>>
>>> The urgency I don't get, though; this code still looks a bit "hot".
>>
>> Well, I didn't say it was urgent... ?What do you mean by "hot"?
>
> Not perfect ;-)
Ah, well that was perfectly true ;)
Take a look at the v2 I posted to the list this morning ... I believe
it fixes all those issues.
Cheers
---Dave
next prev parent reply other threads:[~2011-04-07 14:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.19600.1302086322.1534.linux-arm-kernel@lists.infradead.org>
[not found] ` <alpine.DEB.2.00.1104061208310.15572@localhost6.localdomain6>
2011-04-07 10:02 ` [RFC PATCH] ARM: fiq: Refactor {get,set}_fiq_regs() for Thumb-2 Dave Martin
2011-04-07 11:35 ` Frank Hofmann
2011-04-07 13:58 ` Dave Martin
2011-04-07 14:24 ` Frank Hofmann
2011-04-07 14:29 ` Dave Martin [this message]
2011-04-07 22:28 ` Russell King - ARM Linux
2011-04-08 10:03 ` Dave Martin
2011-04-08 14:20 ` Frank Hofmann
2011-04-06 10:29 Dave Martin
2011-04-06 10:55 ` Dave Martin
2011-04-06 17:37 ` Nicolas Pitre
2011-04-07 9:36 ` Dave Martin
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=BANLkTikesVqvVQvxbFihEE2woHirvnX79A@mail.gmail.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).