From: "Rémi Denis-Courmont" <remi@remlab.net>
To: catalin.marinas@arm.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: mark.rutland@arm.com, james.morse@arm.com, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] arm64: clean up trampoline vector loads
Date: Thu, 19 Mar 2020 11:14:05 +0200 [thread overview]
Message-ID: <20200319091407.51449-1-remi@remlab.net> (raw)
In-Reply-To: <1938400.7m7sAWtiY1@basile.remlab.net>
From: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
This switches from custom instruction patterns to the regular large
memory model sequence with ADRP and LDR. In doing so, the ADD
instruction can be eliminated in the SDEI handler, and the code no
longer assumes that the trampoline vectors and the vectors address both
start on a page boundary.
Signed-off-by: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
---
arch/arm64/kernel/entry.S | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index e5d4e30ee242..24f828739696 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -805,9 +805,9 @@ alternative_else_nop_endif
2:
tramp_map_kernel x30
#ifdef CONFIG_RANDOMIZE_BASE
- adr x30, tramp_vectors + PAGE_SIZE
+ adrp x30, tramp_vectors + PAGE_SIZE
alternative_insn isb, nop, ARM64_WORKAROUND_QCOM_FALKOR_E1003
- ldr x30, [x30]
+ ldr x30, [x30, #:lo12:__entry_tramp_data_start]
#else
ldr x30, =vectors
#endif
@@ -953,9 +953,8 @@ SYM_CODE_START(__sdei_asm_entry_trampoline)
1: str x4, [x1, #(SDEI_EVENT_INTREGS + S_ORIG_ADDR_LIMIT)]
#ifdef CONFIG_RANDOMIZE_BASE
- adr x4, tramp_vectors + PAGE_SIZE
- add x4, x4, #:lo12:__sdei_asm_trampoline_next_handler
- ldr x4, [x4]
+ adrp x4, tramp_vectors + PAGE_SIZE
+ ldr x4, [x4, #:lo12:__sdei_asm_trampoline_next_handler]
#else
ldr x4, =__sdei_asm_handler
#endif
--
2.26.0.rc2
next prev parent reply other threads:[~2020-03-19 9:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 9:12 [PATCHv3 0/3] clean up KPTI / SDEI trampoline data alignment Rémi Denis-Courmont
2020-03-19 9:14 ` Rémi Denis-Courmont [this message]
2020-03-23 12:07 ` [PATCH 1/3] arm64: clean up trampoline vector loads Mark Rutland
2020-03-23 12:08 ` Rémi Denis-Courmont
2020-03-23 12:14 ` Mark Rutland
2020-03-23 19:04 ` Catalin Marinas
2020-03-23 20:42 ` Rémi Denis-Courmont
2020-03-24 10:37 ` Catalin Marinas
2020-03-24 10:52 ` Mark Rutland
2020-03-24 11:23 ` Catalin Marinas
2020-03-19 9:14 ` [PATCH 2/3] arm64/sdei: gather trampolines' .rodata Rémi Denis-Courmont
2020-03-19 9:14 ` [PATCH 3/3] arm64: reduce trampoline data alignment Rémi Denis-Courmont
2020-03-21 13:41 ` Catalin Marinas
2020-03-23 11:58 ` Mark Rutland
2020-03-19 18:37 ` [PATCHv3 0/3] clean up KPTI / SDEI " Will Deacon
2020-03-20 16:54 ` Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2020-03-16 12:40 [PATCH 1/3] arm64: clean up trampoline vector loads Rémi Denis-Courmont
2020-03-17 22:30 ` Will Deacon
2020-03-18 17:57 ` Catalin Marinas
2020-03-18 18:06 ` Catalin Marinas
2020-03-18 18:29 ` Rémi Denis-Courmont
2020-03-18 19:48 ` Remi Denis-Courmont
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=20200319091407.51449-1-remi@remlab.net \
--to=remi@remlab.net \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.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
all inboxes | Powered by JetHome®