linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Nicholas Piggin <npiggin@gmail.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: Alan Modra <amodra@gmail.com>
Subject: Re: [RFC PATCH 3/7] powerpc/64: provide a helper macro to load r2 with the kernel TOC
Date: Wed, 21 Sep 2022 16:52:02 +0000	[thread overview]
Message-ID: <1e68b172-fbc5-835d-f91e-0f256acfe4c7@csgroup.eu> (raw)
In-Reply-To: <20220919140149.4018927-4-npiggin@gmail.com>



Le 19/09/2022 à 16:01, Nicholas Piggin a écrit :
> A later change stops the kernel using r2 and loads it with a poison
> value.  Provide a PACATOC loading abstraction which can hide this
> detail.
> 
> XXX: 64e, KVM, ftrace not entirely done
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   arch/powerpc/include/asm/ppc_asm.h             |  3 +++
>   arch/powerpc/kernel/exceptions-64e.S           |  4 ++--
>   arch/powerpc/kernel/exceptions-64s.S           |  6 +++---
>   arch/powerpc/kernel/head_64.S                  |  4 ++--
>   arch/powerpc/kernel/interrupt_64.S             | 12 ++++++------
>   arch/powerpc/kernel/optprobes_head.S           |  2 +-
>   arch/powerpc/kernel/trace/ftrace_mprofile.S    |  4 ++--
>   arch/powerpc/platforms/powernv/opal-wrappers.S |  2 +-
>   8 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
> index 520c4c9caf7f..c0848303151c 100644
> --- a/arch/powerpc/include/asm/ppc_asm.h
> +++ b/arch/powerpc/include/asm/ppc_asm.h
> @@ -374,6 +374,9 @@ GLUE(.,name):
>   
>   #ifdef __powerpc64__
>   
> +#define LOAD_PACA_TOC()				\
> +	ld	r2,PACATOC(r13)
> +

Wouldn't it be better as a GAS macro ?

  reply	other threads:[~2022-09-21 16:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 14:01 [RFC PATCH 0/7] powerpc: first hack at pcrel addressing Nicholas Piggin
2022-09-19 14:01 ` [RFC PATCH 1/7] powerpc: use 16-bit immediate for STACK_FRAME_REGS_MARKER Nicholas Piggin
2022-09-21 16:49   ` Christophe Leroy
2022-09-23  7:32     ` Michael Ellerman
2022-09-23  7:35       ` Christophe Leroy
2022-09-19 14:01 ` [RFC PATCH 2/7] powerpc/64: abstract asm global variable declaration and access Nicholas Piggin
2022-09-21 16:51   ` Christophe Leroy
2022-09-19 14:01 ` [RFC PATCH 3/7] powerpc/64: provide a helper macro to load r2 with the kernel TOC Nicholas Piggin
2022-09-21 16:52   ` Christophe Leroy [this message]
2022-09-19 14:01 ` [RFC PATCH 4/7] powerpc: add CFUNC assembly label annotation Nicholas Piggin
2022-09-19 14:01 ` [RFC PATCH 5/7] powerpc/64s: update generic cpu option name and compiler flags Nicholas Piggin
2022-09-20 22:16   ` Segher Boessenkool
2022-09-21  1:01     ` Nicholas Piggin
2022-09-21 15:22       ` Segher Boessenkool
2022-09-23  7:22         ` Nicholas Piggin
2022-09-19 14:01 ` [RFC PATCH 6/7] powerpc/64s: POWER10 CPU Kconfig build option Nicholas Piggin
2022-09-19 14:01 ` [RFC PATCH 7/7] powerpc/64s: Add option to build vmlinux with pcrel addressing Nicholas Piggin

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=1e68b172-fbc5-835d-f91e-0f256acfe4c7@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=amodra@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.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).