On 11/27/24 12:07, Christophe Leroy wrote:
Le 25/11/2024 à 05:22, Shrikanth Hegde a écrit :
PowerPC uses asm-generic preempt definitions as of now.
Copy that into arch/asm so that arch specific changes can be done.
This would help the next patch for enabling dynamic preemption.
The reason I want the content instead was to allow future patches where I thought of making preempt count per paca for ppc64 atleast. generic code assumes it is per thread. If this change is to be done at that point, that is fair too. I am okay with it.
Instead of copying all the content of asm-generic version, can you just create a receptacle for your new macros, that will include asm- generic/ preempt.h ?
Look at arch/powerpc/include/asm/percpu.h for exemple.
You mean something like below right?
#ifndef __ASM_POWERPC_PREEMPT_H
#define __ASM_POWERPC_PREEMPT_H
#include <asm-generic/preempt.h>
#if defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY)
DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
#endif
#endif /* __ASM_POWERPC_PREEMPT_H */