From patchwork Thu Jul 31 09:20:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 4654421 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D74D59F2B8 for ; Thu, 31 Jul 2014 09:22:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 17722200FF for ; Thu, 31 Jul 2014 09:22:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4EE0B201BF for ; Thu, 31 Jul 2014 09:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932265AbaGaJWm (ORCPT ); Thu, 31 Jul 2014 05:22:42 -0400 Received: from mga11.intel.com ([192.55.52.93]:29248 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932262AbaGaJWl (ORCPT ); Thu, 31 Jul 2014 05:22:41 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 31 Jul 2014 02:22:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,771,1400050800"; d="scan'208";a="569866355" Received: from lantianyu-ws.sh.intel.com (HELO localhost) ([10.239.37.18]) by fmsmga001.fm.intel.com with ESMTP; 31 Jul 2014 02:22:39 -0700 From: Lan Tianyu To: rjw@rjwysocki.net, lenb@kernel.org Cc: Lan Tianyu , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI/Processor: Add CPU_STARTING_FROZEN check in the acpi_cpu_soft_notify() Date: Thu, 31 Jul 2014 17:20:26 +0800 Message-Id: <1406798426-16483-1-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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))