[PATCH v5 3/5] powerpc: perf: Use perf_arch_instruction_pointer()

Colton Lewis posted 5 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH v5 3/5] powerpc: perf: Use perf_arch_instruction_pointer()
Posted by Colton Lewis 2 months, 1 week ago
Make sure powerpc uses the arch-specific function now that those have
been reorganized.

Signed-off-by: Colton Lewis <coltonlewis@google.com>
---
 arch/powerpc/perf/callchain.c    | 2 +-
 arch/powerpc/perf/callchain_32.c | 2 +-
 arch/powerpc/perf/callchain_64.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
index 6b4434dd0ff3..26aa26482c9a 100644
--- a/arch/powerpc/perf/callchain.c
+++ b/arch/powerpc/perf/callchain.c
@@ -51,7 +51,7 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
 
 	lr = regs->link;
 	sp = regs->gpr[1];
-	perf_callchain_store(entry, perf_instruction_pointer(regs));
+	perf_callchain_store(entry, perf_arch_instruction_pointer(regs));
 
 	if (!validate_sp(sp, current))
 		return;
diff --git a/arch/powerpc/perf/callchain_32.c b/arch/powerpc/perf/callchain_32.c
index ea8cfe3806dc..ddcc2d8aa64a 100644
--- a/arch/powerpc/perf/callchain_32.c
+++ b/arch/powerpc/perf/callchain_32.c
@@ -139,7 +139,7 @@ void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
 	long level = 0;
 	unsigned int __user *fp, *uregs;
 
-	next_ip = perf_instruction_pointer(regs);
+	next_ip = perf_arch_instruction_pointer(regs);
 	lr = regs->link;
 	sp = regs->gpr[1];
 	perf_callchain_store(entry, next_ip);
diff --git a/arch/powerpc/perf/callchain_64.c b/arch/powerpc/perf/callchain_64.c
index 488e8a21a11e..115d1c105e8a 100644
--- a/arch/powerpc/perf/callchain_64.c
+++ b/arch/powerpc/perf/callchain_64.c
@@ -74,7 +74,7 @@ void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry,
 	struct signal_frame_64 __user *sigframe;
 	unsigned long __user *fp, *uregs;
 
-	next_ip = perf_instruction_pointer(regs);
+	next_ip = perf_arch_instruction_pointer(regs);
 	lr = regs->link;
 	sp = regs->gpr[1];
 	perf_callchain_store(entry, next_ip);
-- 
2.46.0.792.g87dc391469-goog
Re: [PATCH v5 3/5] powerpc: perf: Use perf_arch_instruction_pointer()
Posted by Madhavan Srinivasan 1 month, 2 weeks ago

On 9/20/24 11:17 PM, Colton Lewis wrote:
> Make sure powerpc uses the arch-specific function now that those have
> been reorganized.
>

Changes looks fine to me.
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>

 
> Signed-off-by: Colton Lewis <coltonlewis@google.com>
> ---
>  arch/powerpc/perf/callchain.c    | 2 +-
>  arch/powerpc/perf/callchain_32.c | 2 +-
>  arch/powerpc/perf/callchain_64.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
> index 6b4434dd0ff3..26aa26482c9a 100644
> --- a/arch/powerpc/perf/callchain.c
> +++ b/arch/powerpc/perf/callchain.c
> @@ -51,7 +51,7 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
>  
>  	lr = regs->link;
>  	sp = regs->gpr[1];
> -	perf_callchain_store(entry, perf_instruction_pointer(regs));
> +	perf_callchain_store(entry, perf_arch_instruction_pointer(regs));
>  
>  	if (!validate_sp(sp, current))
>  		return;
> diff --git a/arch/powerpc/perf/callchain_32.c b/arch/powerpc/perf/callchain_32.c
> index ea8cfe3806dc..ddcc2d8aa64a 100644
> --- a/arch/powerpc/perf/callchain_32.c
> +++ b/arch/powerpc/perf/callchain_32.c
> @@ -139,7 +139,7 @@ void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
>  	long level = 0;
>  	unsigned int __user *fp, *uregs;
>  
> -	next_ip = perf_instruction_pointer(regs);
> +	next_ip = perf_arch_instruction_pointer(regs);
>  	lr = regs->link;
>  	sp = regs->gpr[1];
>  	perf_callchain_store(entry, next_ip);
> diff --git a/arch/powerpc/perf/callchain_64.c b/arch/powerpc/perf/callchain_64.c
> index 488e8a21a11e..115d1c105e8a 100644
> --- a/arch/powerpc/perf/callchain_64.c
> +++ b/arch/powerpc/perf/callchain_64.c
> @@ -74,7 +74,7 @@ void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry,
>  	struct signal_frame_64 __user *sigframe;
>  	unsigned long __user *fp, *uregs;
>  
> -	next_ip = perf_instruction_pointer(regs);
> +	next_ip = perf_arch_instruction_pointer(regs);
>  	lr = regs->link;
>  	sp = regs->gpr[1];
>  	perf_callchain_store(entry, next_ip);