From patchwork Mon Jul 25 03:01:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shen Canquan X-Patchwork-Id: 1003742 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6P31rKx028404 for ; Mon, 25 Jul 2011 03:01:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752528Ab1GYDBu (ORCPT ); Sun, 24 Jul 2011 23:01:50 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:60313 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272Ab1GYDBt (ORCPT ); Sun, 24 Jul 2011 23:01:49 -0400 Received: from huawei.com (szxga03-in [172.24.2.9]) by szxga03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LOV00HUKCEPYR@szxga03-in.huawei.com> for linux-acpi@vger.kernel.org; Mon, 25 Jul 2011 11:01:38 +0800 (CST) Received: from szxrg02-dlp.huawei.com ([172.24.2.119]) by szxga03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LOV005EACEEDP@szxga03-in.huawei.com> for linux-acpi@vger.kernel.org; Mon, 25 Jul 2011 11:01:37 +0800 (CST) Received: from 172.24.2.119 (EHLO szxeml206-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.1.9-GA FastPath queued) with ESMTP id ACO36881; Mon, 25 Jul 2011 11:01:37 +0800 (CST) Received: from SZXEML405-HUB.china.huawei.com (10.82.67.60) by szxeml206-edg.china.huawei.com (172.24.2.58) with Microsoft SMTP Server (TLS) id 14.1.270.1; Mon, 25 Jul 2011 11:01:36 +0800 Received: from SZXEML527-MBS.china.huawei.com ([169.254.6.129]) by szxeml405-hub.china.huawei.com ([169.254.211.222]) with mapi id 14.01.0270.001; Mon, 25 Jul 2011 11:01:36 +0800 Date: Mon, 25 Jul 2011 03:01:36 +0000 From: Shen Canquan Subject: [Patch 1/1] Hot cpu remove patch X-Originating-IP: [10.166.80.171] To: "linux-acpi@vger.kernel.org" Message-id: MIME-version: 1.0 Content-type: text/plain; charset=iso-2022-jp Content-language: zh-CN Content-transfer-encoding: 7BIT Accept-Language: zh-CN, en-US Thread-topic: [Patch 1/1] Hot cpu remove patch Thread-index: AcxKdyqOP1yoWUahRQCQly4TKQWJHw== X-MS-Has-Attach: X-MS-TNEF-Correlator: X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 25 Jul 2011 03:01:54 +0000 (UTC) Hello? Recently, I test the cpu hot add and remove function. It is ok for cpu hot add. but it is failure on cpu hot remove . If I modify the source code(Please see the following patch content). It is successful on cpu hot remove. patch content: */ Jason.shen 2011-07-25 --- 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 --- linux-2.6.39.3_modify/drivers/acpi/processor_driver.c 2011-07-25 09:11:51.000000000 +0800 +++ linux-2.6.39.3/drivers/acpi/processor_driver.c 2011-07-09 14:16:06.000000000 +0800 @@ -677,11 +677,6 @@ "Driver data is NULL, dropping EJECT\n"); return; } - /*The alternative way of modify is add the following code: - kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); - */ - /*async execute the acip_bus_hot_remove_device*/ - acpi_os_hotplug_execute(acpi_bus_hot_remove_device, handle); break; default: ACPI_DEBUG_PRINT((ACPI_DB_INFO, diff -u -r linux-2.6.39.3_modify/drivers/acpi/scan.c linux-2.6.39.3/drivers/acpi/scan.c --- linux-2.6.39.3_modify/drivers/acpi/scan.c 2011-07-20 15:28:52.000000000 +0800 +++ linux-2.6.39.3/drivers/acpi/scan.c 2011-07-09 14:16:06.000000000 +0800 @@ -83,7 +83,7 @@ } static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); - void acpi_bus_hot_remove_device(void *context) +static void acpi_bus_hot_remove_device(void *context) { struct acpi_device *device; acpi_handle handle = context; diff -u -r linux-2.6.39.3_modify/include/acpi/acpi_bus.h linux-2.6.39.3/include/acpi/acpi_bus.h --- linux-2.6.39.3_modify/include/acpi/acpi_bus.h 2011-07-20 15:30:04.000000000 +0800 +++ linux-2.6.39.3/include/acpi/acpi_bus.h 2011-07-09 14:16:06.000000000 +0800 @@ -342,7 +342,7 @@ const struct acpi_device_id *ids); int acpi_create_dir(struct acpi_device *); void acpi_remove_dir(struct acpi_device *); -void acpi_bus_hot_remove_device(void *context); + /* * Bind physical devices with ACPI devices