From: Jungseok Lee <jungseoklee85@gmail.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
Will Deacon <Will.Deacon@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dave P Martin <Dave.Martin@arm.com>,
James Morse <James.Morse@arm.com>
Subject: Re: [RFC PATCH 1/3] arm64: entry: Remove unnecessary calculation for S_SP in EL1h
Date: Tue, 8 Sep 2015 00:51:04 +0900 [thread overview]
Message-ID: <9A8464CF-B1F4-4CB1-A04C-37EE8F10EE29@gmail.com> (raw)
In-Reply-To: <20150907145646.GB13786@leverpostej>
On Sep 7, 2015, at 11:56 PM, Mark Rutland wrote:
Hi Mark,
> On Fri, Sep 04, 2015 at 03:23:05PM +0100, Jungseok Lee wrote:
>> Under EL1h, S_SP data is not seen in kernel_exit. Thus, x21 calculation
>> is not needed in kernel_entry. Currently, S_SP information is vaild only
>> when sp_el0 is used.
>
> I don't think this is true. The generic BUG implementation will grab the
> saved SP from the pt_regs, and with this change we'll report whatever
> happened to be in x21 instead.
>
>> Signed-off-by: Jungseok Lee <jungseoklee85@gmail.com>
>> ---
>> arch/arm64/kernel/entry.S | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
>> index e163518..d23ca0d 100644
>> --- a/arch/arm64/kernel/entry.S
>> +++ b/arch/arm64/kernel/entry.S
>> @@ -91,8 +91,6 @@
>> get_thread_info tsk // Ensure MDSCR_EL1.SS is clear,
>> ldr x19, [tsk, #TI_FLAGS] // since we can unmask debug
>> disable_step_tsk x19, x20 // exceptions when scheduling.
>> - .else
>> - add x21, sp, #S_FRAME_SIZE
>> .endif
>> mrs x22, elr_el1
>> mrs x23, spsr_el1
>
> Immediately after this we do:
>
> stp lr, x21, [sp, #S_LR]
>
> To store the LR and SP to the pt_regs which bug_handler would use.
>
> Am I missing smoething?
No, You're right. As James mentioned, x21 is used in do_sp_pc_abort.
Thanks for the comment.
Best Regards
Jungseok Lee
next prev parent reply other threads:[~2015-09-07 15:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 14:23 [RFC PATCH 0/3] Implement IRQ stack on ARM64 Jungseok Lee
2015-09-04 14:23 ` [RFC PATCH 1/3] arm64: entry: Remove unnecessary calculation for S_SP in EL1h Jungseok Lee
2015-09-07 14:48 ` James Morse
2015-09-07 14:56 ` Mark Rutland
2015-09-07 15:51 ` Jungseok Lee [this message]
2015-09-04 14:23 ` [RFC PATCH 2/3] arm64: Introduce IRQ stack Jungseok Lee
2015-09-04 17:12 ` Alexnader Kuleshov
2015-09-07 14:08 ` Jungseok Lee
2015-09-07 14:48 ` James Morse
2015-09-08 14:28 ` Jungseok Lee
2015-09-04 14:23 ` [RFC PATCH 3/3] arm64: Reduce kernel stack size when using " Jungseok Lee
2015-09-07 14:33 ` [RFC PATCH 0/3] Implement IRQ stack on ARM64 James Morse
2015-09-07 14:36 ` [PATCH] arm64: kernel: Use a separate stack for irq interrupts James Morse
2015-09-07 15:48 ` Jungseok Lee
2015-09-07 16:06 ` James Morse
2015-09-07 16:34 ` Jungseok Lee
2015-09-08 1:45 ` AKASHI Takahiro
2015-09-08 6:44 ` AKASHI Takahiro
2015-09-08 14:59 ` Jungseok Lee
2015-09-08 7:51 ` AKASHI Takahiro
2015-09-08 14:54 ` Jungseok Lee
2015-09-08 16:47 ` James Morse
2015-09-09 13:22 ` Jungseok Lee
2015-09-09 18:13 ` James Morse
2015-09-10 23:30 ` Jungseok Lee
2015-09-07 15:42 ` [RFC PATCH 0/3] Implement IRQ stack on ARM64 Jungseok Lee
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=9A8464CF-B1F4-4CB1-A04C-37EE8F10EE29@gmail.com \
--to=jungseoklee85@gmail.com \
--cc=Catalin.Marinas@arm.com \
--cc=Dave.Martin@arm.com \
--cc=James.Morse@arm.com \
--cc=Will.Deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.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
all inboxes | Powered by JetHome®