From patchwork Tue Aug 6 10:11:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yasuaki Ishimatsu X-Patchwork-Id: 2839298 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E074ABF535 for ; Tue, 6 Aug 2013 10:11:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B8FD0201E7 for ; Tue, 6 Aug 2013 10:11:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14A91201C0 for ; Tue, 6 Aug 2013 10:11:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755669Ab3HFKLc (ORCPT ); Tue, 6 Aug 2013 06:11:32 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:41610 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755618Ab3HFKLb (ORCPT ); Tue, 6 Aug 2013 06:11:31 -0400 Received: from m4.gw.fujitsu.co.jp (unknown [10.0.50.74]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 6B05B3EE081; Tue, 6 Aug 2013 19:11:30 +0900 (JST) Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 5C00B45DE4F; Tue, 6 Aug 2013 19:11:30 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 4695245DE4E; Tue, 6 Aug 2013 19:11:30 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 36A241DB8037; Tue, 6 Aug 2013 19:11:30 +0900 (JST) Received: from g01jpfmpwkw02.exch.g01.fujitsu.local (g01jpfmpwkw02.exch.g01.fujitsu.local [10.0.193.56]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id E7DA21DB802F; Tue, 6 Aug 2013 19:11:29 +0900 (JST) Received: from localhost.localdomain (localhost [127.0.0.1]) by g01jpfmpwkw02.exch.g01.fujitsu.local (Postfix) with ESMTP id DB8593286BE; Tue, 6 Aug 2013 19:11:29 +0900 (JST) Received: from g01jpexchkw37.g01.fujitsu.local (unknown [10.0.193.4]) by g01jpfmpwkw02.exch.g01.fujitsu.local (Postfix) with ESMTP id 37C6D328470; Tue, 6 Aug 2013 19:11:29 +0900 (JST) Received: from [127.0.0.1] (10.124.101.84) by g01jpexchkw37.g01.fujitsu.local (10.0.193.67) with Microsoft SMTP Server id 14.2.309.2; Tue, 6 Aug 2013 19:11:28 +0900 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.0.1 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20120718-3 Message-ID: <5200CBBF.1090904@jp.fujitsu.com> Date: Tue, 6 Aug 2013 19:11:11 +0900 From: Yasuaki Ishimatsu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: , CC: , Subject: [PATCH] ACPI, cpu hotplug: move try_offline_node() after acpi_unmap_lsapic() X-SecurityPolicyCheck-GC: OK by FENCE-Mail Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 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 try_offline_node() checks that all cpus related with removed node have been removed by using cpu_present_bits. If all cpus related with removed node have been removed, try_offline_node() clears the node information. But try_offline_node() called from acpi_processor_remove() never clears the node information. For disabling cpu_present_bits, acpi_unmap_lsapic() need be called. But acpi_unmap_lsapic() is called after try_offline_node() runs. So when try_offline_node() runs, the cpu's cpu_present_bits is always set. This patch moves try_offline_node() after acpi_unmap_lsapic(). Signed-off-by: Yasuaki Ishimatsu Acked-by: Toshi Kani Tested-by: Gu Zheng --- drivers/acpi/acpi_processor.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index fd6c51c..5a74a9c 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -451,7 +451,6 @@ static void acpi_processor_remove(struct acpi_device *device) /* Clean up. */ per_cpu(processor_device_array, pr->id) = NULL; per_cpu(processors, pr->id) = NULL; - try_offline_node(cpu_to_node(pr->id)); /* Remove the CPU. */ get_online_cpus(); @@ -459,6 +458,8 @@ static void acpi_processor_remove(struct acpi_device *device) acpi_unmap_lsapic(pr->id); put_online_cpus(); + try_offline_node(cpu_to_node(pr->id)); + out: free_cpumask_var(pr->throttling.shared_cpu_map); kfree(pr);