From patchwork Thu Jul 31 14:28:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 4656631 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 1321D9F32F for ; Thu, 31 Jul 2014 14:31:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 274D420149 for ; Thu, 31 Jul 2014 14:31:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57F2C20109 for ; Thu, 31 Jul 2014 14:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722AbaGaObL (ORCPT ); Thu, 31 Jul 2014 10:31:11 -0400 Received: from mga01.intel.com ([192.55.52.88]:20742 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbaGaObK (ORCPT ); Thu, 31 Jul 2014 10:31:10 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 31 Jul 2014 07:31:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,772,1400050800"; d="scan'208";a="578247956" Received: from lantianyu-ws.sh.intel.com (HELO localhost) ([10.239.37.18]) by fmsmga002.fm.intel.com with ESMTP; 31 Jul 2014 07:31:08 -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 V2] ACPI/Processor: Make acpi_cpu_soft_notify() process CPU FROZEN events Date: Thu, 31 Jul 2014 22:28:50 +0800 Message-Id: <1406816930-22138-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 CPU hotplug happens during S2RAM and CPU notify event will be CPU_XXX_FROZEN. acpi_cpu_soft_notify() ignores to check these events. This also may make acpi_cpu_soft_notify() fall into sleep during CPU_DYING/STARTING_FROZEN events which don't allow callbacks to sleep. This patch is to fix it. Signed-off-by: Lan Tianyu --- Change since v1: unmark CPU_TASKS_FROZEN for all cpu events. drivers/acpi/processor_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 4fcbd67..d9f7158 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -120,6 +120,7 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb, unsigned int cpu = (unsigned long)hcpu; struct acpi_processor *pr = per_cpu(processors, cpu); struct acpi_device *device; + action &= ~CPU_TASKS_FROZEN; /* * CPU_STARTING and CPU_DYING must not sleep. Return here since