All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] arm64: Treat handle_arch_irq as a function pointer
Date: Tue, 22 Apr 2014 11:48:06 +0100	[thread overview]
Message-ID: <20140422104806.GA8389@arm.com> (raw)
In-Reply-To: <1397782023-28114-3-git-send-email-lauraa@codeaurora.org>

On Fri, Apr 18, 2014 at 01:47:02AM +0100, Laura Abbott wrote:
> 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.
> 
> Change-Id: I682ff82f5c8c429129dd81bbcc91571f278c62e2
> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> ---
>  arch/arm64/kernel/entry.S | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 39ac630..5051f30 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,6 @@ ENTRY(sys_rt_sigreturn_wrapper)
>  	b	sys_rt_sigreturn
>  ENDPROC(sys_rt_sigreturn_wrapper)
>  
> +.data
>  ENTRY(handle_arch_irq)

Probably worth dropping the ENTRY directive if we're putting this in .data
and using an explicit .align instead.

Will

  reply	other threads:[~2014-04-22 10:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18  0:47 [PATCH 0/3] Page protections for arm64 Laura Abbott
2014-04-18  0:47 ` [PATCH 1/3] arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support Laura Abbott
2014-05-02 14:07   ` Steve Capper
2014-05-02 15:30     ` Will Deacon
2014-05-06 17:53       ` Laura Abbott
2014-04-18  0:47 ` [PATCH 2/3] arm64: Treat handle_arch_irq as a function pointer Laura Abbott
2014-04-22 10:48   ` Will Deacon [this message]
2014-04-18  0:47 ` [PATCH 3/3] arm64: WIP: add better page protections to arm64 Laura Abbott

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=20140422104806.GA8389@arm.com \
    --to=will.deacon@arm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.