Subject: Re: [PATCH] Make cpu hotplug driver lock part of ppc_md

From: Nathan Fontenot <[email-masked]>
Date: Tue, 12 Jan 2010 13:34:39 -0600

Benjamin Herrenschmidt wrote:
>> The intention of the cpu_hotplug_driver_locks to add additional serialization
>> during cpu hotplug operations.  For pseries this is used during DLPAR of cpu
>> operations so that cpu hotplug actions cannot be initiated whiloe a DLPAR
>> operation is in flight.  For example, during DLPAR add we take the lock while
>> acquiring the cpu from firmware and updating the device tree with the new
>> cpu information, after which we hotplug add the cpu to the system.  
>>
>> There is nothing harmless about taking the lock on all platforms, I was just
>> trying to avoid taking the lock if the additional serialization is not needed.
>>
>>> If so, you could just make the mutex available to all powerpc code, and
>>> rename it, and then we wouldn't need all this jiggery pokery just to
>>> take & release a lock.
>> I can make the lock available to all powerpc code and not go through the
>> ppc_md struct, it makes no difference to me personally.  Of course this would
>> make all that fun pokery jiggery go away :)
> 
> Yeah, Michael is right, just make it global to powerpc, it should make
> things simpler.

Sounds good, I'll get a patch out to do this.

-Nathan