[PATCH 1/3] powerpc: copy preempt.h into arch/include/asm

Christophe Leroy christophe.leroy at csgroup.eu
Wed Dec 4 06:47:55 AEDT 2024



Le 03/12/2024 à 15:00, Shrikanth Hegde a écrit :
> 
> 
> On 12/2/24 23:47, Christophe Leroy wrote:
>>
>>
>> Le 02/12/2024 à 15:05, Shrikanth Hegde a écrit :
>>>
>>>
>>> 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.
>>
>> I think it is better to keep series minimal and consistent. If you 
>> have a futur plan, no problem, keep it future and do everything at 
>> once unless it is heavy and better done in two steps.
>>
>> As we say in French, a lot of water will have flowed under the bridge 
>> by then.
>>
>> I'm sure there will be a lot of discussion when you do that and maybe 
>> at the end you will end up with something completely different than 
>> what you have in mind at the moment.
>>
> 
> ok.
> 
>>>
>>>
>>>> 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 */
>>
>> Yes exactly.
>>
>>
> 
> Should I send v2 with this and using DYNAMIC_KEY?


Yes you can do that, but I guess it is not urgent as it requires the 
lazy patches to be merged first and spend some time in linux-next ?

Christophe


More information about the Linuxppc-dev mailing list