From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: rjw@sisk.pl,
"linuxppc-dev@lists.ozlabs.org list"
<linuxppc-dev@lists.ozlabs.org>,
Zhao Chenhui <chenhui.zhao@freescale.com>,
"linux-kernel@vger.kernel.org list"
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] cpu: export cpu hotplug disable/enable functions as global functions
Date: Wed, 08 Aug 2012 11:43:22 +0530 [thread overview]
Message-ID: <50220382.4010405@linux.vnet.ibm.com> (raw)
In-Reply-To: <B4FC7F5E-EA8F-4FCA-B206-353FE4481DCE@kernel.crashing.org>
On 08/07/2012 11:21 PM, Kumar Gala wrote:
>
> On Aug 7, 2012, at 3:43 AM, Zhao Chenhui wrote:
>
>> The cpufreq driver of mpc85xx will disable/enable cpu hotplug temporarily.
>> Therefore, the related functions should be exported.
>>
>> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
>> ---
>> include/linux/cpu.h | 4 ++++
>> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> Rafael, Srivatsa,
>
> Wanted to get your ack on export these functions for direct calling by arch code.
>
Why not just use get_online_cpus()/put_online_cpus()?
In the case of suspend/resume/hibernation, we had introduced these CPU hotplug disable
functions because we would end up doing CPU hotplug ourselves, further down the path.
So if we did a get_online_cpus(), we would end up deadlocking ourselves. Whereas, the
patch 4/4 looks like a straightforward case of wanting to simply disable CPU hotplug..
I don't see where you are doing CPU hotplug yourself in the path. So IMO, just
get/put_online_cpus() should do.
Regards,
Srivatsa S. Bhat
>
>>
>> diff --git a/include/linux/cpu.h b/include/linux/cpu.h
>> index ce7a074..df8f73d 100644
>> --- a/include/linux/cpu.h
>> +++ b/include/linux/cpu.h
>> @@ -146,6 +146,8 @@ void notify_cpu_starting(unsigned int cpu);
>> extern void cpu_maps_update_begin(void);
>> extern void cpu_maps_update_done(void);
>>
>> +extern void cpu_hotplug_disable_before_freeze(void);
>> +extern void cpu_hotplug_enable_after_thaw(void);
>> #else /* CONFIG_SMP */
>>
>> #define cpu_notifier(fn, pri) do { (void)(fn); } while (0)
>> @@ -167,6 +169,8 @@ static inline void cpu_maps_update_done(void)
>> {
>> }
>>
>> +static inline void cpu_hotplug_disable_before_freeze(void) {}
>> +static inline void cpu_hotplug_enable_after_thaw(void) {}
>> #endif /* CONFIG_SMP */
>> extern struct bus_type cpu_subsys;
>>
>> --
>> 1.6.4.1
>>
>
WARNING: multiple messages have this Message-ID (diff)
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: rjw@sisk.pl, Zhao Chenhui <chenhui.zhao@freescale.com>,
"linuxppc-dev@lists.ozlabs.org list"
<linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org list"
<linux-kernel@vger.kernel.org>, Li Yang <leoli@freescale.com>
Subject: Re: [PATCH 3/4] cpu: export cpu hotplug disable/enable functions as global functions
Date: Wed, 08 Aug 2012 11:43:22 +0530 [thread overview]
Message-ID: <50220382.4010405@linux.vnet.ibm.com> (raw)
In-Reply-To: <B4FC7F5E-EA8F-4FCA-B206-353FE4481DCE@kernel.crashing.org>
On 08/07/2012 11:21 PM, Kumar Gala wrote:
>
> On Aug 7, 2012, at 3:43 AM, Zhao Chenhui wrote:
>
>> The cpufreq driver of mpc85xx will disable/enable cpu hotplug temporarily.
>> Therefore, the related functions should be exported.
>>
>> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
>> ---
>> include/linux/cpu.h | 4 ++++
>> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> Rafael, Srivatsa,
>
> Wanted to get your ack on export these functions for direct calling by arch code.
>
Why not just use get_online_cpus()/put_online_cpus()?
In the case of suspend/resume/hibernation, we had introduced these CPU hotplug disable
functions because we would end up doing CPU hotplug ourselves, further down the path.
So if we did a get_online_cpus(), we would end up deadlocking ourselves. Whereas, the
patch 4/4 looks like a straightforward case of wanting to simply disable CPU hotplug..
I don't see where you are doing CPU hotplug yourself in the path. So IMO, just
get/put_online_cpus() should do.
Regards,
Srivatsa S. Bhat
>
>>
>> diff --git a/include/linux/cpu.h b/include/linux/cpu.h
>> index ce7a074..df8f73d 100644
>> --- a/include/linux/cpu.h
>> +++ b/include/linux/cpu.h
>> @@ -146,6 +146,8 @@ void notify_cpu_starting(unsigned int cpu);
>> extern void cpu_maps_update_begin(void);
>> extern void cpu_maps_update_done(void);
>>
>> +extern void cpu_hotplug_disable_before_freeze(void);
>> +extern void cpu_hotplug_enable_after_thaw(void);
>> #else /* CONFIG_SMP */
>>
>> #define cpu_notifier(fn, pri) do { (void)(fn); } while (0)
>> @@ -167,6 +169,8 @@ static inline void cpu_maps_update_done(void)
>> {
>> }
>>
>> +static inline void cpu_hotplug_disable_before_freeze(void) {}
>> +static inline void cpu_hotplug_enable_after_thaw(void) {}
>> #endif /* CONFIG_SMP */
>> extern struct bus_type cpu_subsys;
>>
>> --
>> 1.6.4.1
>>
>
next prev parent reply other threads:[~2012-08-08 6:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 8:43 [PATCH 1/4] powerpc/85xx: add sleep and deep sleep support Zhao Chenhui
2012-08-07 8:43 ` Zhao Chenhui
2012-08-07 8:43 ` [PATCH 2/4] fsl_pmc: Add API to enable device as wakeup event source Zhao Chenhui
2012-08-07 8:43 ` Zhao Chenhui
2012-08-11 13:19 ` Tabi Timur-B04825
2012-08-11 13:19 ` Tabi Timur-B04825
2012-08-14 9:58 ` Zhao Chenhui
2012-08-14 9:58 ` Zhao Chenhui
2012-08-14 10:01 ` Zhao Chenhui
2012-08-14 10:01 ` Zhao Chenhui
2012-08-14 12:27 ` Tabi Timur-B04825
2012-08-14 12:27 ` Tabi Timur-B04825
2012-08-07 8:43 ` [PATCH 3/4] cpu: export cpu hotplug disable/enable functions as global functions Zhao Chenhui
2012-08-07 8:43 ` Zhao Chenhui
2012-08-07 17:51 ` Kumar Gala
2012-08-07 17:51 ` Kumar Gala
2012-08-08 6:13 ` Srivatsa S. Bhat [this message]
2012-08-08 6:13 ` Srivatsa S. Bhat
2012-08-08 7:11 ` Zhao Chenhui
2012-08-08 7:11 ` Zhao Chenhui
2012-08-10 9:41 ` Zhao Chenhui
2012-08-10 9:41 ` Zhao Chenhui
2012-08-07 8:43 ` [PATCH 4/4] powerpc/85xx: add support to JOG feature using cpufreq interface Zhao Chenhui
2012-08-07 8:43 ` Zhao Chenhui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50220382.4010405@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=chenhui.zhao@freescale.com \
--cc=galak@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.