linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lan Tianyu <tianyu.lan@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Chen,
	Gong" <gong.chen@linux.intel.com>
Subject: Re: [PATCH] ACPI/Processor: Add CPU_STARTING_FROZEN check in the acpi_cpu_soft_notify()
Date: Fri, 01 Aug 2014 10:51:46 +0800	[thread overview]
Message-ID: <53DB00C2.2040500@intel.com> (raw)
In-Reply-To: <1560513.OlLhy0HTTU@vostro.rjw.lan>

On 2014年08月01日 05:20, Rafael J. Wysocki wrote:
> On Thursday, July 31, 2014 05:20:26 PM Lan Tianyu wrote:
>> The callback of CPU_STARTING event can't sleep and so acpi_cpu_soft_notify()
>> return directly when CPU_STARTING event is triggered. But cpu hotplug also
>> happens during S2RAM. The action will become CPU_STARTING_FROZEN. This
>> patch is to fix missing check the frozen event.
>>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> 
> There is work to restructure the handling of CPU_TASKS_FROZEN under way
> and Chen Gong is driving it.  That's likely to conflict with the last
> two patches from you.  Can you please coordinate with Gong?

Hi Rafael:

Thanks for reminder. I just checked Chen Gong's patchset "Gloabl CPU
Hot-plug flag _FROZEN Clean up". There is no conflict between our
patches. Gong's patch is to remove the following macro.

CPU_ONLINE_FROZEN
CPU_UP_PREPARE_FROZEN
CPU_UP_CANCELED_FROZEN
CPU_DOWN_PREPARE_FROZEN
CPU_DOWN_FAILED_FROZEN
CPU_DEAD_FROZEN
CPU_DYING_FROZEN
CPU_STARTING_FROZEN

CPU_TASKS_FROZEN is still available and the CPU events during S2RAM
are still (CPU_xxx | CPU_TASKS_FROZEN).

BTW, this is a bug fix from my opinion and it should be backported to
stable tree.

> 
> Rafael
> 
> 
>> ---
>>  drivers/acpi/processor_driver.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
>> index 4fcbd67..66e2249 100644
>> --- a/drivers/acpi/processor_driver.c
>> +++ b/drivers/acpi/processor_driver.c
>> @@ -125,7 +125,7 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
>>  	 * CPU_STARTING and CPU_DYING must not sleep. Return here since
>>  	 * acpi_bus_get_device() may sleep.
>>  	 */
>> -	if (action == CPU_STARTING || action == CPU_DYING)
>> +	if ((action & ~CPU_TASKS_FROZEN) == CPU_STARTING || action == CPU_DYING)
>>  		return NOTIFY_DONE;
>>  
>>  	if (!pr || acpi_bus_get_device(pr->handle, &device))
>>
> 


-- 
Best regards
Tianyu Lan

  reply	other threads:[~2014-08-01  2:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31  9:20 [PATCH] ACPI/Processor: Add CPU_STARTING_FROZEN check in the acpi_cpu_soft_notify() Lan Tianyu
2014-07-31 21:20 ` Rafael J. Wysocki
2014-08-01  2:51   ` Lan Tianyu [this message]
2014-08-06  1:30     ` Rafael J. Wysocki
2014-08-06  3:02       ` Lan Tianyu
2014-08-06 19:11         ` Rafael J. Wysocki

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=53DB00C2.2040500@intel.com \
    --to=tianyu.lan@intel.com \
    --cc=gong.chen@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).