All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shen Canquan <shencanquan@huawei.com>
To: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: [Patch 1/1] Hot cpu remove patch
Date: Mon, 25 Jul 2011 03:01:36 +0000	[thread overview]
Message-ID: <F1F5DF04259F1B4A82BD6BDE1C479F7452C78F@szxeml527-mbs.china.huawei.com> (raw)

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:
 
--- 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
                                               
 */
 
 
Jason.shen
2011-07-25

             reply	other threads:[~2011-07-25  3:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25  3:01 Shen Canquan [this message]
2011-07-25 12:04 [Patch 1/1] Hot cpu remove patch Shen Canquan

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=F1F5DF04259F1B4A82BD6BDE1C479F7452C78F@szxeml527-mbs.china.huawei.com \
    --to=shencanquan@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.