linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lauraa@codeaurora.org (Laura Abbott)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 2/4] arm64: Treat handle_arch_irq as a function pointer
Date: Mon,  2 Jun 2014 13:57:36 -0700	[thread overview]
Message-ID: <1401742658-11841-3-git-send-email-lauraa@codeaurora.org> (raw)
In-Reply-To: <1401742658-11841-1-git-send-email-lauraa@codeaurora.org>


handle_arch_irq isn't actually text, it's just a function
pointer. It doesn't need to be stored in the text section
and doing so causes problems if we ever want to make the
kernel text readonly. Move it to the data section.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
---
 arch/arm64/kernel/entry.S | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 39ac630..7c8ea1f 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -139,7 +139,8 @@ tsk	.req	x28		// current thread_info
  * Interrupt handling.
  */
 	.macro	irq_handler
-	ldr	x1, handle_arch_irq
+	ldr	x1, =handle_arch_irq
+	ldr	x1, [x1]
 	mov	x0, sp
 	blr	x1
 	.endm
@@ -678,5 +679,8 @@ ENTRY(sys_rt_sigreturn_wrapper)
 	b	sys_rt_sigreturn
 ENDPROC(sys_rt_sigreturn_wrapper)
 
-ENTRY(handle_arch_irq)
+	.data
+	.globl handle_arch_irq
+	.align 4
+handle_arch_irq:
 	.quad	0
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

  parent reply	other threads:[~2014-06-02 20:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 20:57 [PATCHv2 0/4] Page protections for arm64 Laura Abbott
2014-06-02 20:57 ` [PATCHv2 1/4] arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support Laura Abbott
2014-06-03 15:22   ` Will Deacon
2014-06-03 15:31     ` Steve Capper
2014-06-03 15:37       ` Will Deacon
2014-06-03 16:04         ` Steve Capper
2014-06-04  0:56     ` Laura Abbott
2014-06-04 18:00       ` Will Deacon
2014-06-02 20:57 ` Laura Abbott [this message]
2014-06-03  9:13   ` [PATCHv2 2/4] arm64: Treat handle_arch_irq as a function pointer Mark Rutland
2014-06-03  9:36     ` Ard Biesheuvel
2014-06-02 20:57 ` [PATCHv2 3/4] arm64: Switch to ldr for loading the stub vectors Laura Abbott
2014-06-03 15:22   ` Will Deacon
2014-06-02 20:57 ` [PATCHv2 4/4] arm64: add better page protections to arm64 Laura Abbott
2014-06-03 16:04   ` Steve Capper

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=1401742658-11841-3-git-send-email-lauraa@codeaurora.org \
    --to=lauraa@codeaurora.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).