From: Joel Fernandes <joelf@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "André Hentschel" <nerv@dawncrow.de>,
"Jonathan Austin" <jonathan.austin@arm.com>,
"Nicolas Pitre" <nico@linaro.org>,
linux-kernel@vger.kernel.org,
"Santosh Shilimkar" <santosh.shilimkar@ti.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC] ARM: kernel: irq: Simplify allocation of stack frame
Date: Sun, 6 Oct 2013 23:56:57 -0500 [thread overview]
Message-ID: <52523F19.9080104@ti.com> (raw)
In-Reply-To: <20131006224150.GA25647@n2100.arm.linux.org.uk>
On 10/06/2013 05:41 PM, Russell King - ARM Linux wrote:
> On Sun, Oct 06, 2013 at 05:30:47PM -0500, Joel Fernandes wrote:
>> On receiving IRQ exception in SVC mode, all the SVC mode registers are saved
>> onto the stack very early on.
>>
>> The stack frame allocation code for IRQ entry during SVC mode (svc_entry) is
>> hard to read as 4-less is allocated initially only to be allocated later
>> implicity using the mov r3, [sp, #-4]! instruction. We make code easier to read
>> by allocating the 4 bytes on the stack frame in the beginning itself and remove
>> all instances where 4 bytes is adjusted.
>
> You omit to say that this results in saving one additional register
Ok, I will add this detail to the commit message.
> unnecessarily in the stmia. We could use a stmib there instead which
> would avoid that issue while keeping the rest of the change.
But stmib is not available in THUMB mode, so this will break the THUMB builds.
usr_entry does something similar:
ARM( stmib sp, {r1 - r12} )
THUMB( stmia sp, {r0 - r12} )
Let me know your suggestions about using ARM/THUMB macros or stmia for both
cases. Thanks.
Regards,
-Joel
next prev parent reply other threads:[~2013-10-07 4:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-06 22:30 [RFC] ARM: kernel: irq: Simplify allocation of stack frame Joel Fernandes
2013-10-06 22:41 ` Russell King - ARM Linux
2013-10-07 4:56 ` Joel Fernandes [this message]
2013-10-07 16:28 ` Joel Fernandes
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=52523F19.9080104@ti.com \
--to=joelf@ti.com \
--cc=jonathan.austin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nerv@dawncrow.de \
--cc=nico@linaro.org \
--cc=santosh.shilimkar@ti.com \
/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).