Re: [PATCH 1/1] PM: Add arch_suspend_disable_nonboot_cpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/21/2010 04:27 PM, Rafael J. Wysocki wrote:
> On Sunday 21 February 2010, Brian King wrote:
>> On 02/21/2010 04:08 PM, Rafael J. Wysocki wrote:
>>> I'm not a big fan of __attribute__ ((weak)), though.  While we already use that
>>> in the suspend code, I'm not particularly comfortable with it.
>>>
>>> Have you considered any alternative approaches?
>>
>> I suppose another option would be to implement this similar to how
>> arch_free_page and arch_alloc_page do. Something like this:
>>
>> #ifndef CONFIG_HAVE_ARCH_SUSPEND_CPUS
>> static inline int arch_suspend_disable_nonboot_cpus(void)
>> {
>> 	return disable_nonboot_cpus();
>> }
>>
>> static inline void arch_suspend_enable_nonboot_cpus(void)
>> {
>> 	return enable_nonboot_cpus()'
>> }
>> #else
>> extern int arch_suspend_disable_nonboot_cpus(void);
>> extern void arch_suspend_enable_nonboot_cpus(void);
>> #endif
>>
>> I figured I would just be consistent with arch_suspend_disable_irqs /
>> arch_suspend_enable_irqs.
> 
> I just think that doing arch_suspend_[enable|disable]_irqs() this way was
> a mistake.

Do you prefer the example above? I can send an updated patch. If not,
any other suggestions you might have as to the way you would like this
done would be greatly appreciated.

Thanks,

Brian

-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux