2022-03-04 20:35:53

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH v1 1/4] powerpc: Cleanup asm-prototypes.c

Last call to sys_swapcontext() from ASM was removed by
commit fbcee2ebe8ed ("powerpc/32: Always save non volatile GPRs at
syscall entry")

sys_debug_setcontext() prototype not needed anymore since
commit f3675644e172 ("powerpc/syscalls: signal_{32, 64} - switch
to SYSCALL_DEFINE")

sys_switch_endian() prototype not needed anymore since
commit 81dac8177862 ("powerpc/64: Make sys_switch_endian() traceable")

_mount() prototype is already in asm/ftrace.h

Signed-off-by: Christophe Leroy <[email protected]>
---
arch/powerpc/include/asm/asm-prototypes.h | 7 -------
1 file changed, 7 deletions(-)

diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index 41b8a1e1144a..4fd79207fd41 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -57,12 +57,7 @@ int enter_vmx_ops(void);
void *exit_vmx_ops(void *dest);

/* signals, syscalls and interrupts */
-long sys_swapcontext(struct ucontext __user *old_ctx,
- struct ucontext __user *new_ctx,
- long ctx_size);
#ifdef CONFIG_PPC32
-long sys_debug_setcontext(struct ucontext __user *ctx,
- int ndbg, struct sig_dbg_op __user *dbg);
int
ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
struct __kernel_old_timeval __user *tvp);
@@ -81,7 +76,6 @@ unsigned long interrupt_exit_kernel_restart(struct pt_regs *regs);

long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
u32 len_high, u32 len_low);
-long sys_switch_endian(void);

/* prom_init (OpenFirmware) */
unsigned long __init prom_init(unsigned long r3, unsigned long r4,
@@ -102,7 +96,6 @@ extern int __cmpdi2(s64, s64);
extern int __ucmpdi2(u64, u64);

/* tracing */
-void _mcount(void);
unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip,
unsigned long sp);

--
2.34.1


2022-03-08 16:15:14

by Christophe Leroy

[permalink] [raw]
Subject: Re: [PATCH v1 1/4] powerpc: Cleanup asm-prototypes.c

Hi Michael,

Le 04/03/2022 à 18:04, Christophe Leroy a écrit :
> Last call to sys_swapcontext() from ASM was removed by
> commit fbcee2ebe8ed ("powerpc/32: Always save non volatile GPRs at
> syscall entry")
>
> sys_debug_setcontext() prototype not needed anymore since
> commit f3675644e172 ("powerpc/syscalls: signal_{32, 64} - switch
> to SYSCALL_DEFINE")
>
> sys_switch_endian() prototype not needed anymore since
> commit 81dac8177862 ("powerpc/64: Make sys_switch_endian() traceable")
>
> _mount() prototype is already in asm/ftrace.h
>
> Signed-off-by: Christophe Leroy <[email protected]>
> ---

I see this series in next-test branch.

Can you #include <asm/ftrace.h> in asm/asm-prototypes.h so that
_mcount() still gets versionned.

If you prefer I can resend the series.

Thanks
Christophe

> arch/powerpc/include/asm/asm-prototypes.h | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
> index 41b8a1e1144a..4fd79207fd41 100644
> --- a/arch/powerpc/include/asm/asm-prototypes.h
> +++ b/arch/powerpc/include/asm/asm-prototypes.h
> @@ -57,12 +57,7 @@ int enter_vmx_ops(void);
> void *exit_vmx_ops(void *dest);
>
> /* signals, syscalls and interrupts */
> -long sys_swapcontext(struct ucontext __user *old_ctx,
> - struct ucontext __user *new_ctx,
> - long ctx_size);
> #ifdef CONFIG_PPC32
> -long sys_debug_setcontext(struct ucontext __user *ctx,
> - int ndbg, struct sig_dbg_op __user *dbg);
> int
> ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
> struct __kernel_old_timeval __user *tvp);
> @@ -81,7 +76,6 @@ unsigned long interrupt_exit_kernel_restart(struct pt_regs *regs);
>
> long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
> u32 len_high, u32 len_low);
> -long sys_switch_endian(void);
>
> /* prom_init (OpenFirmware) */
> unsigned long __init prom_init(unsigned long r3, unsigned long r4,
> @@ -102,7 +96,6 @@ extern int __cmpdi2(s64, s64);
> extern int __ucmpdi2(u64, u64);
>
> /* tracing */
> -void _mcount(void);
> unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip,
> unsigned long sp);
>

2022-03-08 17:18:26

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 1/4] powerpc: Cleanup asm-prototypes.c

Christophe Leroy <[email protected]> writes:
> Le 04/03/2022 à 18:04, Christophe Leroy a écrit :
>> Last call to sys_swapcontext() from ASM was removed by
>> commit fbcee2ebe8ed ("powerpc/32: Always save non volatile GPRs at
>> syscall entry")
>>
>> sys_debug_setcontext() prototype not needed anymore since
>> commit f3675644e172 ("powerpc/syscalls: signal_{32, 64} - switch
>> to SYSCALL_DEFINE")
>>
>> sys_switch_endian() prototype not needed anymore since
>> commit 81dac8177862 ("powerpc/64: Make sys_switch_endian() traceable")
>>
>> _mount() prototype is already in asm/ftrace.h
>>
>> Signed-off-by: Christophe Leroy <[email protected]>
>> ---
>
> I see this series in next-test branch.
>
> Can you #include <asm/ftrace.h> in asm/asm-prototypes.h so that
> _mcount() still gets versionned.

I just left the existing _mcount() prototype in asm-prototypes.h.

I've run that through some build tests, and want to push it for
tomorrow's next, so I'd rather not change it now.

Send me a follow-up patch to add the include of ftrace.h and drop the
_mcount() prototype.

cheers

2022-03-12 14:04:50

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 1/4] powerpc: Cleanup asm-prototypes.c

On Fri, 4 Mar 2022 18:04:02 +0100, Christophe Leroy wrote:
> Last call to sys_swapcontext() from ASM was removed by
> commit fbcee2ebe8ed ("powerpc/32: Always save non volatile GPRs at
> syscall entry")
>
> sys_debug_setcontext() prototype not needed anymore since
> commit f3675644e172 ("powerpc/syscalls: signal_{32, 64} - switch
> to SYSCALL_DEFINE")
>
> [...]

Applied to powerpc/next.

[1/4] powerpc: Cleanup asm-prototypes.c
https://git.kernel.org/powerpc/c/e86debbbb5f89c2575110cfdce89d1820577aa94
[2/4] powerpc/smp: Declare current_set static
https://git.kernel.org/powerpc/c/e15c703be48edc3b2f96b66d4f548dc88b44266c
[3/4] powerpc/kexec: Declare kexec_paca static
https://git.kernel.org/powerpc/c/a4abd55a2490fd6407ddb6810e41f64ebd66d3af
[4/4] powerpc: Move C prototypes out of asm-prototypes.h
https://git.kernel.org/powerpc/c/76222808fc253cb9ea66c3e0e8d1946933f25b70

cheers