[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48e364e5-47d8-4d12-a77d-a3f42996a7d3@linux.ibm.com>
Date: Thu, 18 Sep 2025 12:27:53 +0530
From: Mukesh Kumar Chaurasiya <mkchauras@...ux.ibm.com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>,
Mukesh Kumar Chaurasiya <mchauras@...ux.ibm.com>
Cc: maddy@...ux.ibm.com, mpe@...erman.id.au, npiggin@...il.com,
christophe.leroy@...roup.eu, oleg@...hat.com, kees@...nel.org,
luto@...capital.net, wad@...omium.org, deller@....de, ldv@...ace.io,
macro@...am.me.uk, charlie@...osinc.com, akpm@...ux-foundation.org,
bigeasy@...utronix.de, ankur.a.arora@...cle.com, naveen@...nel.org,
thomas.weissschuh@...utronix.de, Jason@...c4.com, peterz@...radead.org,
tglx@...utronix.de, namcao@...utronix.de, kan.liang@...ux.intel.com,
mingo@...nel.org, oliver.upton@...ux.dev, mark.barnett@....com,
atrajeev@...ux.vnet.ibm.com, rppt@...nel.org, coltonlewis@...gle.com,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC V2 8/8] powerpc: Enable Generic Entry/Exit for syscalls.
On 9/9/25 12:24 PM, Shrikanth Hegde wrote:
>
>
> On 9/9/25 2:32 AM, Mukesh Kumar Chaurasiya wrote:
>> Enable the syscall entry and exit path from generic framework.
>>
>> Signed-off-by: Mukesh Kumar Chaurasiya <mchauras@...ux.ibm.com>
>> ---
>
> Hi Mukesh.
> Thanks for working on this and getting it to better shape.
>
>> arch/powerpc/Kconfig | 1 +
>> arch/powerpc/include/asm/entry-common.h | 2 +-
>> arch/powerpc/kernel/interrupt.c | 135 +++++++----------------
>> arch/powerpc/kernel/ptrace/ptrace.c | 141 ------------------------
>> arch/powerpc/kernel/signal.c | 10 +-
>> arch/powerpc/kernel/syscall.c | 119 +-------------------
>> 6 files changed, 49 insertions(+), 359 deletions(-)
>>
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index e0c51d7b5638d..e67294a72e4d4 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -199,6 +199,7 @@ config PPC
>> select GENERIC_CPU_AUTOPROBE
>> select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
>> select GENERIC_EARLY_IOREMAP
>> + select GENERIC_ENTRY
>> select GENERIC_GETTIMEOFDAY
>> select GENERIC_IDLE_POLL_SETUP
>> select GENERIC_IOREMAP
>> diff --git a/arch/powerpc/include/asm/entry-common.h
>> b/arch/powerpc/include/asm/entry-common.h
>> index d3f4a12aeafca..8fb74e6aa9560 100644
>> --- a/arch/powerpc/include/asm/entry-common.h
>> +++ b/arch/powerpc/include/asm/entry-common.h
>> @@ -3,7 +3,7
>
> There could be some of the configs we need to take care while enabling
> generic entry. Since powerpc
> didn't have it earlier, there could areas which needs cleanup. One for
> example dynamic preemption.
> There could be more. Do some git history checks and see.
>
> Issue with dynamic preemption:
>
> ld:
> kernel/entry/common.o:/home/shrikanth/sched_tip/kernel/entry/common.c:161:
> multiple definition of `sk_dynamic_irqentry_exit_cond_resched';
> arch/powerpc/kernel/interrupt.o:/home/shrikanth/sched_tip/arch/powerpc/kernel/interrupt.c:29:
> first defined here
>
> Below diff helps to fix and changing preemption modes help. Also
> verified preempt lazy works too.
>
> ---
> diff --git a/arch/powerpc/kernel/interrupt.c
> b/arch/powerpc/kernel/interrupt.c
> index 642e22527f9d..e1e0f0da4165 100644
> --- a/arch/powerpc/kernel/interrupt.c
> +++ b/arch/powerpc/kernel/interrupt.c
> @@ -25,10 +25,6 @@
> unsigned long global_dbcr0[NR_CPUS];
> #endif
>
> -#if defined(CONFIG_PREEMPT_DYNAMIC)
> -DEFINE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
> -#endif
> -
> #ifdef CONFIG_PPC_BOOK3S_64
> DEFINE_STATIC_KEY_FALSE(interrupt_exit_not_reentrant);
> static inline bool exit_must_hard_disable(void)
>
>
> ----
> Though ideal thing is move them to sched/core instead of being in
> generic code. Like below.
> https://lore.kernel.org/all/20250716094745.2232041-1-sshegde@linux.ibm.com/
>
>
Sure.
Powered by blists - more mailing lists