* [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store
@ 2024-10-01 10:08 Michal Suchanek
2024-10-01 10:08 ` [PATCH 2/2] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static Michal Suchanek
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Michal Suchanek @ 2024-10-01 10:08 UTC (permalink / raw)
To: linuxppc-dev
Cc: Michal Suchanek, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Naveen N Rao, Madhavan Srinivasan,
Gustavo A. R. Silva, Paul Mackerras, linux-kernel
There is no modular user of analyze_instr, and the latter two are only
used by sstep itself.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
arch/powerpc/lib/sstep.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index e65f3fb68d06..a0557b0d9a24 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -863,7 +863,6 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
break;
}
}
-EXPORT_SYMBOL_GPL(emulate_vsx_load);
NOKPROBE_SYMBOL(emulate_vsx_load);
void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
@@ -955,7 +954,6 @@ void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg,
break;
}
}
-EXPORT_SYMBOL_GPL(emulate_vsx_store);
NOKPROBE_SYMBOL(emulate_vsx_store);
static nokprobe_inline int do_vsx_load(struct instruction_op *op,
@@ -3172,7 +3170,6 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
op->val = SRR1_PROGTRAP;
return 0;
}
-EXPORT_SYMBOL_GPL(analyse_instr);
NOKPROBE_SYMBOL(analyse_instr);
/*
--
2.46.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/2] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static 2024-10-01 10:08 [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Michal Suchanek @ 2024-10-01 10:08 ` Michal Suchanek 2024-10-01 12:08 ` [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Christophe Leroy 2024-10-01 12:29 ` Paul Mackerras 2 siblings, 0 replies; 7+ messages in thread From: Michal Suchanek @ 2024-10-01 10:08 UTC (permalink / raw) To: linuxppc-dev Cc: Michal Suchanek, Michael Ellerman, Nicholas Piggin, Christophe Leroy, Naveen N Rao, Madhavan Srinivasan, Gustavo A. R. Silva, Paul Mackerras, linux-kernel These functions are not used outside of sstep.c Fixes: 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code") Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- arch/powerpc/include/asm/sstep.h | 5 ----- arch/powerpc/lib/sstep.c | 10 ++++------ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/include/asm/sstep.h b/arch/powerpc/include/asm/sstep.h index 50950deedb87..e3d0e714ff28 100644 --- a/arch/powerpc/include/asm/sstep.h +++ b/arch/powerpc/include/asm/sstep.h @@ -173,9 +173,4 @@ int emulate_step(struct pt_regs *regs, ppc_inst_t instr); */ extern int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op); -extern void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, - const void *mem, bool cross_endian); -extern void emulate_vsx_store(struct instruction_op *op, - const union vsx_reg *reg, void *mem, - bool cross_endian); extern int emulate_dcbz(unsigned long ea, struct pt_regs *regs); diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index a0557b0d9a24..877123896c2e 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c @@ -780,8 +780,8 @@ static nokprobe_inline int emulate_stq(struct pt_regs *regs, unsigned long ea, #endif /* __powerpc64 */ #ifdef CONFIG_VSX -void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, - const void *mem, bool rev) +static nokprobe_inline void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, + const void *mem, bool rev) { int size, read_size; int i, j; @@ -863,10 +863,9 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, break; } } -NOKPROBE_SYMBOL(emulate_vsx_load); -void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, - void *mem, bool rev) +static nokprobe_inline void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, + void *mem, bool rev) { int size, write_size; int i, j; @@ -954,7 +953,6 @@ void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, break; } } -NOKPROBE_SYMBOL(emulate_vsx_store); static nokprobe_inline int do_vsx_load(struct instruction_op *op, unsigned long ea, struct pt_regs *regs, -- 2.46.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store 2024-10-01 10:08 [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Michal Suchanek 2024-10-01 10:08 ` [PATCH 2/2] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static Michal Suchanek @ 2024-10-01 12:08 ` Christophe Leroy 2024-10-01 12:59 ` Michal Suchánek 2024-10-01 12:29 ` Paul Mackerras 2 siblings, 1 reply; 7+ messages in thread From: Christophe Leroy @ 2024-10-01 12:08 UTC (permalink / raw) To: Michal Suchanek, linuxppc-dev Cc: Michael Ellerman, Nicholas Piggin, Naveen N Rao, Madhavan Srinivasan, Gustavo A. R. Silva, Paul Mackerras, linux-kernel Le 01/10/2024 à 12:08, Michal Suchanek a écrit : > There is no modular user of analyze_instr, and the latter two are only > used by sstep itself. analyze_instr() is used in arch/powerpc/kvm/emulate_loadstore.c which can be a module as far as I can see in Makefile: common-objs-y += powerpc.o emulate_loadstore.o kvm-book3s_64-module-objs := \ $(common-objs-y) \ book3s.o \ book3s_rtas.o \ $(kvm-book3s_64-objs-y) kvm-objs-$(CONFIG_KVM_BOOK3S_64) := $(kvm-book3s_64-module-objs) config KVM_BOOK3S_64 tristate "KVM support for PowerPC book3s_64 processors" > > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > --- > arch/powerpc/lib/sstep.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c > index e65f3fb68d06..a0557b0d9a24 100644 > --- a/arch/powerpc/lib/sstep.c > +++ b/arch/powerpc/lib/sstep.c > @@ -863,7 +863,6 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, > break; > } > } > -EXPORT_SYMBOL_GPL(emulate_vsx_load); > NOKPROBE_SYMBOL(emulate_vsx_load); > > void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, > @@ -955,7 +954,6 @@ void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, > break; > } > } > -EXPORT_SYMBOL_GPL(emulate_vsx_store); > NOKPROBE_SYMBOL(emulate_vsx_store); > > static nokprobe_inline int do_vsx_load(struct instruction_op *op, > @@ -3172,7 +3170,6 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, > op->val = SRR1_PROGTRAP; > return 0; > } > -EXPORT_SYMBOL_GPL(analyse_instr); > NOKPROBE_SYMBOL(analyse_instr); > > /* ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store 2024-10-01 12:08 ` [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Christophe Leroy @ 2024-10-01 12:59 ` Michal Suchánek 0 siblings, 0 replies; 7+ messages in thread From: Michal Suchánek @ 2024-10-01 12:59 UTC (permalink / raw) To: Christophe Leroy Cc: linuxppc-dev, Michael Ellerman, Nicholas Piggin, Naveen N Rao, Madhavan Srinivasan, Gustavo A. R. Silva, Paul Mackerras, linux-kernel On Tue, Oct 01, 2024 at 02:08:18PM +0200, Christophe Leroy wrote: > > > Le 01/10/2024 à 12:08, Michal Suchanek a écrit : > > There is no modular user of analyze_instr, and the latter two are only > > used by sstep itself. > > analyze_instr() is used in arch/powerpc/kvm/emulate_loadstore.c which can be > a module as far as I can see in Makefile: > > common-objs-y += powerpc.o emulate_loadstore.o > > kvm-book3s_64-module-objs := \ > $(common-objs-y) \ > book3s.o \ > book3s_rtas.o \ > $(kvm-book3s_64-objs-y) > > kvm-objs-$(CONFIG_KVM_BOOK3S_64) := $(kvm-book3s_64-module-objs) > > config KVM_BOOK3S_64 > tristate "KVM support for PowerPC book3s_64 processors" Indeed, missed that it can be modular thruogh this indirection. Thanks Michal > > > > > > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > > --- > > arch/powerpc/lib/sstep.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c > > index e65f3fb68d06..a0557b0d9a24 100644 > > --- a/arch/powerpc/lib/sstep.c > > +++ b/arch/powerpc/lib/sstep.c > > @@ -863,7 +863,6 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, > > break; > > } > > } > > -EXPORT_SYMBOL_GPL(emulate_vsx_load); > > NOKPROBE_SYMBOL(emulate_vsx_load); > > void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, > > @@ -955,7 +954,6 @@ void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, > > break; > > } > > } > > -EXPORT_SYMBOL_GPL(emulate_vsx_store); > > NOKPROBE_SYMBOL(emulate_vsx_store); > > static nokprobe_inline int do_vsx_load(struct instruction_op *op, > > @@ -3172,7 +3170,6 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, > > op->val = SRR1_PROGTRAP; > > return 0; > > } > > -EXPORT_SYMBOL_GPL(analyse_instr); > > NOKPROBE_SYMBOL(analyse_instr); > > /* ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store 2024-10-01 10:08 [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Michal Suchanek 2024-10-01 10:08 ` [PATCH 2/2] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static Michal Suchanek 2024-10-01 12:08 ` [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Christophe Leroy @ 2024-10-01 12:29 ` Paul Mackerras 2024-10-01 13:03 ` [PATCH] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static Michal Suchanek 2 siblings, 1 reply; 7+ messages in thread From: Paul Mackerras @ 2024-10-01 12:29 UTC (permalink / raw) To: Michal Suchanek Cc: linuxppc-dev, Michael Ellerman, Nicholas Piggin, Christophe Leroy, Naveen N Rao, Madhavan Srinivasan, Gustavo A. R. Silva, linux-kernel On Tue, Oct 01, 2024 at 12:08:47PM +0200, Michal Suchanek wrote: > There is no modular user of analyze_instr, and the latter two are only > used by sstep itself. As far as I can see, analyze_instr is still used in arch/powerpc/kvm/emulate_loadstore.c, and that can be included in a module, e.g., when CONFIG_KVM_BOOK3S_64 = m. Or am I missing something? Paul. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static 2024-10-01 12:29 ` Paul Mackerras @ 2024-10-01 13:03 ` Michal Suchanek 2024-11-17 12:09 ` Michael Ellerman 0 siblings, 1 reply; 7+ messages in thread From: Michal Suchanek @ 2024-10-01 13:03 UTC (permalink / raw) To: linuxppc-dev Cc: Michal Suchanek, Michael Ellerman, Nicholas Piggin, Christophe Leroy, Naveen N Rao, Madhavan Srinivasan, Gustavo A. R. Silva, Paul Mackerras, linux-kernel These functions are not used outside of sstep.c Fixes: 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code") Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- arch/powerpc/include/asm/sstep.h | 5 ----- arch/powerpc/lib/sstep.c | 12 ++++-------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/include/asm/sstep.h b/arch/powerpc/include/asm/sstep.h index 50950deedb87..e3d0e714ff28 100644 --- a/arch/powerpc/include/asm/sstep.h +++ b/arch/powerpc/include/asm/sstep.h @@ -173,9 +173,4 @@ int emulate_step(struct pt_regs *regs, ppc_inst_t instr); */ extern int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op); -extern void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, - const void *mem, bool cross_endian); -extern void emulate_vsx_store(struct instruction_op *op, - const union vsx_reg *reg, void *mem, - bool cross_endian); extern int emulate_dcbz(unsigned long ea, struct pt_regs *regs); diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index e65f3fb68d06..ac3ee19531d8 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c @@ -780,8 +780,8 @@ static nokprobe_inline int emulate_stq(struct pt_regs *regs, unsigned long ea, #endif /* __powerpc64 */ #ifdef CONFIG_VSX -void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, - const void *mem, bool rev) +static nokprobe_inline void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, + const void *mem, bool rev) { int size, read_size; int i, j; @@ -863,11 +863,9 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, break; } } -EXPORT_SYMBOL_GPL(emulate_vsx_load); -NOKPROBE_SYMBOL(emulate_vsx_load); -void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, - void *mem, bool rev) +static nokprobe_inline void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, + void *mem, bool rev) { int size, write_size; int i, j; @@ -955,8 +953,6 @@ void emulate_vsx_store(struct instruction_op *op, const union vsx_reg *reg, break; } } -EXPORT_SYMBOL_GPL(emulate_vsx_store); -NOKPROBE_SYMBOL(emulate_vsx_store); static nokprobe_inline int do_vsx_load(struct instruction_op *op, unsigned long ea, struct pt_regs *regs, -- 2.46.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static 2024-10-01 13:03 ` [PATCH] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static Michal Suchanek @ 2024-11-17 12:09 ` Michael Ellerman 0 siblings, 0 replies; 7+ messages in thread From: Michael Ellerman @ 2024-11-17 12:09 UTC (permalink / raw) To: linuxppc-dev, Michal Suchanek Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy, Naveen N Rao, Madhavan Srinivasan, Gustavo A. R. Silva, Paul Mackerras, linux-kernel On Tue, 01 Oct 2024 15:03:49 +0200, Michal Suchanek wrote: > These functions are not used outside of sstep.c > > Applied to powerpc/next. [1/1] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static https://git.kernel.org/powerpc/c/a26c4dbb3d9c1821cb0fc11cb2dbc32d5bf3463b cheers ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-11-17 12:25 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-01 10:08 [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Michal Suchanek 2024-10-01 10:08 ` [PATCH 2/2] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static Michal Suchanek 2024-10-01 12:08 ` [PATCH 1/2] powerpc/sstep: Unexport analyze_instr, emulate_vsx_load, emulate_vsx_store Christophe Leroy 2024-10-01 12:59 ` Michal Suchánek 2024-10-01 12:29 ` Paul Mackerras 2024-10-01 13:03 ` [PATCH] powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static Michal Suchanek 2024-11-17 12:09 ` Michael Ellerman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox