[PATCH] powerpc: Make doorbell check preemption safe

Shreyas B Prabhu shreyas at linux.vnet.ibm.com
Thu Jun 4 16:45:12 AEST 2015



On Wednesday 20 May 2015 06:30 AM, Michael Neuling wrote:
> On Wed, 2015-05-20 at 00:30 +0530, Shreyas B. Prabhu wrote:
>> Doorbell can be used to cause ipi on cpus which are sibling threads on
>> the same core. So icp_native_cause_ipi checks if the destination cpu
>> is a sibling thread of the current cpu and uses doorbell in such cases.
>>
>> But while running with CONFIG_PREEMPT=y, since this section is
>> preemtible, we can run into issues if after we check if the destination
>> cpu is a sibling cpu, the task gets migrated from a sibling cpu to a
>> cpu on another core.
>>
>> Fix this by using get_cpu()/ put_cpu()
> 
> Thanks.  Looks good and it's boots for me.
> 
> Signed-off-by: Michael Neuling <mikey at neuling.org>
> 
mikey, Thanks!


mpe, if this looks ok, can you please pick it up?



More information about the Linuxppc-dev mailing list