From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 015/196] PM: Acquire device locks on suspend
Date: Thu, 24 Jan 2008 23:09:13 -0800 [thread overview]
Message-ID: <1201245134-4876-15-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20080125071127.GA4860@kroah.com>
From: Rafael J. Wysocki <rjw@sisk.pl>
This patch reorganizes the way suspend and resume notifications are
sent to drivers. The major changes are that now the PM core acquires
every device semaphore before calling the methods, and calls to
device_add() during suspends will fail, while calls to device_del()
during suspends will block.
It also provides a way to safely remove a suspended device with the
help of the PM core, by using the device_pm_schedule_removal() callback
introduced specifically for this purpose, and updates two drivers (msr
and cpuid) that need to use it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/cpuid.c | 6 +-
arch/x86/kernel/msr.c | 6 +-
drivers/base/core.c | 65 +++++-
drivers/base/power/main.c | 502 +++++++++++++++++++++++++++++---------------
drivers/base/power/power.h | 12 +
include/linux/device.h | 8 +
6 files changed, 413 insertions(+), 186 deletions(-)
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 05c9936..d387c77 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -157,15 +157,15 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
switch (action) {
case CPU_UP_PREPARE:
- case CPU_UP_PREPARE_FROZEN:
err = cpuid_device_create(cpu);
break;
case CPU_UP_CANCELED:
- case CPU_UP_CANCELED_FROZEN:
case CPU_DEAD:
- case CPU_DEAD_FROZEN:
cpuid_device_destroy(cpu);
break;
+ case CPU_UP_CANCELED_FROZEN:
+ destroy_suspended_device(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
+ break;
}
return err ? NOTIFY_BAD : NOTIFY_OK;
}
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index ee6eba4..21f6e3c 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -155,15 +155,15 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
switch (action) {
case CPU_UP_PREPARE:
- case CPU_UP_PREPARE_FROZEN:
err = msr_device_create(cpu);
break;
case CPU_UP_CANCELED:
- case CPU_UP_CANCELED_FROZEN:
case CPU_DEAD:
- case CPU_DEAD_FROZEN:
msr_device_destroy(cpu);
break;
+ case CPU_UP_CANCELED_FROZEN:
+ destroy_suspended_device(msr_class, MKDEV(MSR_MAJOR, cpu));
+ break;
}
return err ? NOTIFY_BAD : NOTIFY_OK;
}
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 2683eac..ce6b64c 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -726,11 +726,20 @@ int device_add(struct device *dev)
{
struct device *parent = NULL;
struct class_interface *class_intf;
- int error = -EINVAL;
+ int error;
+
+ error = pm_sleep_lock();
+ if (error) {
+ dev_warn(dev, "Suspicious %s during suspend\n", __FUNCTION__);
+ dump_stack();
+ return error;
+ }
dev = get_device(dev);
- if (!dev || !strlen(dev->bus_id))
+ if (!dev || !strlen(dev->bus_id)) {
+ error = -EINVAL;
goto Error;
+ }
pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id);
@@ -795,6 +804,7 @@ int device_add(struct device *dev)
}
Done:
put_device(dev);
+ pm_sleep_unlock();
return error;
BusError:
device_pm_remove(dev);
@@ -905,6 +915,7 @@ void device_del(struct device * dev)
struct device * parent = dev->parent;
struct class_interface *class_intf;
+ device_pm_remove(dev);
if (parent)
klist_del(&dev->knode_parent);
if (MAJOR(dev->devt))
@@ -981,7 +992,6 @@ void device_del(struct device * dev)
if (dev->bus)
blocking_notifier_call_chain(&dev->bus->bus_notifier,
BUS_NOTIFY_DEL_DEVICE, dev);
- device_pm_remove(dev);
kobject_uevent(&dev->kobj, KOBJ_REMOVE);
kobject_del(&dev->kobj);
if (parent)
@@ -1156,14 +1166,11 @@ error:
EXPORT_SYMBOL_GPL(device_create);
/**
- * device_destroy - removes a device that was created with device_create()
+ * find_device - finds a device that was created with device_create()
* @class: pointer to the struct class that this device was registered with
* @devt: the dev_t of the device that was previously registered
- *
- * This call unregisters and cleans up a device that was created with a
- * call to device_create().
*/
-void device_destroy(struct class *class, dev_t devt)
+static struct device *find_device(struct class *class, dev_t devt)
{
struct device *dev = NULL;
struct device *dev_tmp;
@@ -1176,12 +1183,54 @@ void device_destroy(struct class *class, dev_t devt)
}
}
up(&class->sem);
+ return dev;
+}
+/**
+ * device_destroy - removes a device that was created with device_create()
+ * @class: pointer to the struct class that this device was registered with
+ * @devt: the dev_t of the device that was previously registered
+ *
+ * This call unregisters and cleans up a device that was created with a
+ * call to device_create().
+ */
+void device_destroy(struct class *class, dev_t devt)
+{
+ struct device *dev;
+
+ dev = find_device(class, devt);
if (dev)
device_unregister(dev);
}
EXPORT_SYMBOL_GPL(device_destroy);
+#ifdef CONFIG_PM_SLEEP
+/**
+ * destroy_suspended_device - asks the PM core to remove a suspended device
+ * @class: pointer to the struct class that this device was registered with
+ * @devt: the dev_t of the device that was previously registered
+ *
+ * This call notifies the PM core of the necessity to unregister a suspended
+ * device created with a call to device_create() (devices cannot be
+ * unregistered directly while suspended, since the PM core holds their
+ * semaphores at that time).
+ *
+ * It can only be called within the scope of a system sleep transition. In
+ * practice this means it has to be directly or indirectly invoked either by
+ * a suspend or resume method, or by the PM core (e.g. via
+ * disable_nonboot_cpus() or enable_nonboot_cpus()).
+ */
+void destroy_suspended_device(struct class *class, dev_t devt)
+{
+ struct device *dev;
+
+ dev = find_device(class, devt);
+ if (dev)
+ device_pm_schedule_removal(dev);
+}
+EXPORT_SYMBOL_GPL(destroy_suspended_device);
+#endif /* CONFIG_PM_SLEEP */
+
/**
* device_rename - renames a device
* @dev: the pointer to the struct device to be renamed
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 691ffb6..200ed5f 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -24,20 +24,45 @@
#include <linux/mutex.h>
#include <linux/pm.h>
#include <linux/resume-trace.h>
+#include <linux/rwsem.h>
#include "../base.h"
#include "power.h"
+/*
+ * The entries in the dpm_active list are in a depth first order, simply
+ * because children are guaranteed to be discovered after parents, and
+ * are inserted at the back of the list on discovery.
+ *
+ * All the other lists are kept in the same order, for consistency.
+ * However the lists aren't always traversed in the same order.
+ * Semaphores must be acquired from the top (i.e., front) down
+ * and released in the opposite order. Devices must be suspended
+ * from the bottom (i.e., end) up and resumed in the opposite order.
+ * That way no parent will be suspended while it still has an active
+ * child.
+ *
+ * Since device_pm_add() may be called with a device semaphore held,
+ * we must never try to acquire a device semaphore while holding
+ * dpm_list_mutex.
+ */
+
LIST_HEAD(dpm_active);
+static LIST_HEAD(dpm_locked);
static LIST_HEAD(dpm_off);
static LIST_HEAD(dpm_off_irq);
+static LIST_HEAD(dpm_destroy);
-static DEFINE_MUTEX(dpm_mtx);
static DEFINE_MUTEX(dpm_list_mtx);
-int (*platform_enable_wakeup)(struct device *dev, int is_on);
+static DECLARE_RWSEM(pm_sleep_rwsem);
+int (*platform_enable_wakeup)(struct device *dev, int is_on);
+/**
+ * device_pm_add - add a device to the list of active devices
+ * @dev: Device to be added to the list
+ */
void device_pm_add(struct device *dev)
{
pr_debug("PM: Adding info for %s:%s\n",
@@ -48,8 +73,36 @@ void device_pm_add(struct device *dev)
mutex_unlock(&dpm_list_mtx);
}
+/**
+ * device_pm_remove - remove a device from the list of active devices
+ * @dev: Device to be removed from the list
+ *
+ * This function also removes the device's PM-related sysfs attributes.
+ */
void device_pm_remove(struct device *dev)
{
+ /*
+ * If this function is called during a suspend, it will be blocked,
+ * because we're holding the device's semaphore at that time, which may
+ * lead to a deadlock. In that case we want to print a warning.
+ * However, it may also be called by unregister_dropped_devices() with
+ * the device's semaphore released, in which case the warning should
+ * not be printed.
+ */
+ if (down_trylock(&dev->sem)) {
+ if (down_read_trylock(&pm_sleep_rwsem)) {
+ /* No suspend in progress, wait on dev->sem */
+ down(&dev->sem);
+ up_read(&pm_sleep_rwsem);
+ } else {
+ /* Suspend in progress, we may deadlock */
+ dev_warn(dev, "Suspicious %s during suspend\n",
+ __FUNCTION__);
+ dump_stack();
+ /* The user has been warned ... */
+ down(&dev->sem);
+ }
+ }
pr_debug("PM: Removing info for %s:%s\n",
dev->bus ? dev->bus->name : "No Bus",
kobject_name(&dev->kobj));
@@ -57,25 +110,124 @@ void device_pm_remove(struct device *dev)
dpm_sysfs_remove(dev);
list_del_init(&dev->power.entry);
mutex_unlock(&dpm_list_mtx);
+ up(&dev->sem);
+}
+
+/**
+ * device_pm_schedule_removal - schedule the removal of a suspended device
+ * @dev: Device to destroy
+ *
+ * Moves the device to the dpm_destroy list for further processing by
+ * unregister_dropped_devices().
+ */
+void device_pm_schedule_removal(struct device *dev)
+{
+ pr_debug("PM: Preparing for removal: %s:%s\n",
+ dev->bus ? dev->bus->name : "No Bus",
+ kobject_name(&dev->kobj));
+ mutex_lock(&dpm_list_mtx);
+ list_move_tail(&dev->power.entry, &dpm_destroy);
+ mutex_unlock(&dpm_list_mtx);
+}
+
+/**
+ * pm_sleep_lock - mutual exclusion for registration and suspend
+ *
+ * Returns 0 if no suspend is underway and device registration
+ * may proceed, otherwise -EBUSY.
+ */
+int pm_sleep_lock(void)
+{
+ if (down_read_trylock(&pm_sleep_rwsem))
+ return 0;
+
+ return -EBUSY;
+}
+
+/**
+ * pm_sleep_unlock - mutual exclusion for registration and suspend
+ *
+ * This routine undoes the effect of device_pm_add_lock
+ * when a device's registration is complete.
+ */
+void pm_sleep_unlock(void)
+{
+ up_read(&pm_sleep_rwsem);
}
/*------------------------- Resume routines -------------------------*/
/**
- * resume_device - Restore state for one device.
+ * resume_device_early - Power on one device (early resume).
* @dev: Device.
*
+ * Must be called with interrupts disabled.
*/
-
-static int resume_device(struct device * dev)
+static int resume_device_early(struct device *dev)
{
int error = 0;
TRACE_DEVICE(dev);
TRACE_RESUME(0);
- down(&dev->sem);
+ if (dev->bus && dev->bus->resume_early) {
+ dev_dbg(dev, "EARLY resume\n");
+ error = dev->bus->resume_early(dev);
+ }
+
+ TRACE_RESUME(error);
+ return error;
+}
+
+/**
+ * dpm_power_up - Power on all regular (non-sysdev) devices.
+ *
+ * Walk the dpm_off_irq list and power each device up. This
+ * is used for devices that required they be powered down with
+ * interrupts disabled. As devices are powered on, they are moved
+ * to the dpm_off list.
+ *
+ * Must be called with interrupts disabled and only one CPU running.
+ */
+static void dpm_power_up(void)
+{
+
+ while (!list_empty(&dpm_off_irq)) {
+ struct list_head *entry = dpm_off_irq.next;
+ struct device *dev = to_device(entry);
+
+ list_move_tail(entry, &dpm_off);
+ resume_device_early(dev);
+ }
+}
+
+/**
+ * device_power_up - Turn on all devices that need special attention.
+ *
+ * Power on system devices, then devices that required we shut them down
+ * with interrupts disabled.
+ *
+ * Must be called with interrupts disabled.
+ */
+void device_power_up(void)
+{
+ sysdev_resume();
+ dpm_power_up();
+}
+EXPORT_SYMBOL_GPL(device_power_up);
+
+/**
+ * resume_device - Restore state for one device.
+ * @dev: Device.
+ *
+ */
+static int resume_device(struct device *dev)
+{
+ int error = 0;
+
+ TRACE_DEVICE(dev);
+ TRACE_RESUME(0);
if (dev->bus && dev->bus->resume) {
dev_dbg(dev,"resuming\n");
@@ -92,126 +244,94 @@ static int resume_device(struct device * dev)
error = dev->class->resume(dev);
}
- up(&dev->sem);
-
TRACE_RESUME(error);
return error;
}
-
-static int resume_device_early(struct device * dev)
-{
- int error = 0;
-
- TRACE_DEVICE(dev);
- TRACE_RESUME(0);
- if (dev->bus && dev->bus->resume_early) {
- dev_dbg(dev,"EARLY resume\n");
- error = dev->bus->resume_early(dev);
- }
- TRACE_RESUME(error);
- return error;
-}
-
-/*
- * Resume the devices that have either not gone through
- * the late suspend, or that did go through it but also
- * went through the early resume
+/**
+ * dpm_resume - Resume every device.
+ *
+ * Resume the devices that have either not gone through
+ * the late suspend, or that did go through it but also
+ * went through the early resume.
+ *
+ * Take devices from the dpm_off_list, resume them,
+ * and put them on the dpm_locked list.
*/
static void dpm_resume(void)
{
mutex_lock(&dpm_list_mtx);
while(!list_empty(&dpm_off)) {
- struct list_head * entry = dpm_off.next;
- struct device * dev = to_device(entry);
-
- get_device(dev);
- list_move_tail(entry, &dpm_active);
+ struct list_head *entry = dpm_off.next;
+ struct device *dev = to_device(entry);
+ list_move_tail(entry, &dpm_locked);
mutex_unlock(&dpm_list_mtx);
resume_device(dev);
mutex_lock(&dpm_list_mtx);
- put_device(dev);
}
mutex_unlock(&dpm_list_mtx);
}
-
/**
- * device_resume - Restore state of each device in system.
+ * unlock_all_devices - Release each device's semaphore
*
- * Walk the dpm_off list, remove each entry, resume the device,
- * then add it to the dpm_active list.
+ * Go through the dpm_off list. Put each device on the dpm_active
+ * list and unlock it.
*/
-
-void device_resume(void)
+static void unlock_all_devices(void)
{
- might_sleep();
- mutex_lock(&dpm_mtx);
- dpm_resume();
- mutex_unlock(&dpm_mtx);
-}
-
-EXPORT_SYMBOL_GPL(device_resume);
+ mutex_lock(&dpm_list_mtx);
+ while (!list_empty(&dpm_locked)) {
+ struct list_head *entry = dpm_locked.prev;
+ struct device *dev = to_device(entry);
+ list_move(entry, &dpm_active);
+ up(&dev->sem);
+ }
+ mutex_unlock(&dpm_list_mtx);
+}
/**
- * dpm_power_up - Power on some devices.
- *
- * Walk the dpm_off_irq list and power each device up. This
- * is used for devices that required they be powered down with
- * interrupts disabled. As devices are powered on, they are moved
- * to the dpm_active list.
+ * unregister_dropped_devices - Unregister devices scheduled for removal
*
- * Interrupts must be disabled when calling this.
+ * Unregister all devices on the dpm_destroy list.
*/
-
-static void dpm_power_up(void)
+static void unregister_dropped_devices(void)
{
- while(!list_empty(&dpm_off_irq)) {
- struct list_head * entry = dpm_off_irq.next;
- struct device * dev = to_device(entry);
+ mutex_lock(&dpm_list_mtx);
+ while (!list_empty(&dpm_destroy)) {
+ struct list_head *entry = dpm_destroy.next;
+ struct device *dev = to_device(entry);
- list_move_tail(entry, &dpm_off);
- resume_device_early(dev);
+ up(&dev->sem);
+ mutex_unlock(&dpm_list_mtx);
+ /* This also removes the device from the list */
+ device_unregister(dev);
+ mutex_lock(&dpm_list_mtx);
}
+ mutex_unlock(&dpm_list_mtx);
}
-
/**
- * device_power_up - Turn on all devices that need special attention.
+ * device_resume - Restore state of each device in system.
*
- * Power on system devices then devices that required we shut them down
- * with interrupts disabled.
- * Called with interrupts disabled.
+ * Resume all the devices, unlock them all, and allow new
+ * devices to be registered once again.
*/
-
-void device_power_up(void)
+void device_resume(void)
{
- sysdev_resume();
- dpm_power_up();
+ might_sleep();
+ dpm_resume();
+ unlock_all_devices();
+ unregister_dropped_devices();
+ up_write(&pm_sleep_rwsem);
}
-
-EXPORT_SYMBOL_GPL(device_power_up);
+EXPORT_SYMBOL_GPL(device_resume);
/*------------------------- Suspend routines -------------------------*/
-/*
- * The entries in the dpm_active list are in a depth first order, simply
- * because children are guaranteed to be discovered after parents, and
- * are inserted at the back of the list on discovery.
- *
- * All list on the suspend path are done in reverse order, so we operate
- * on the leaves of the device tree (or forests, depending on how you want
- * to look at it ;) first. As nodes are removed from the back of the list,
- * they are inserted into the front of their destintation lists.
- *
- * Things are the reverse on the resume path - iterations are done in
- * forward order, and nodes are inserted at the back of their destination
- * lists. This way, the ancestors will be accessed before their descendents.
- */
-
static inline char *suspend_verb(u32 event)
{
switch (event) {
@@ -222,7 +342,6 @@ static inline char *suspend_verb(u32 event)
}
}
-
static void
suspend_device_dbg(struct device *dev, pm_message_t state, char *info)
{
@@ -232,16 +351,73 @@ suspend_device_dbg(struct device *dev, pm_message_t state, char *info)
}
/**
- * suspend_device - Save state of one device.
+ * suspend_device_late - Shut down one device (late suspend).
* @dev: Device.
* @state: Power state device is entering.
+ *
+ * This is called with interrupts off and only a single CPU running.
*/
+static int suspend_device_late(struct device *dev, pm_message_t state)
+{
+ int error = 0;
-static int suspend_device(struct device * dev, pm_message_t state)
+ if (dev->bus && dev->bus->suspend_late) {
+ suspend_device_dbg(dev, state, "LATE ");
+ error = dev->bus->suspend_late(dev, state);
+ suspend_report_result(dev->bus->suspend_late, error);
+ }
+ return error;
+}
+
+/**
+ * device_power_down - Shut down special devices.
+ * @state: Power state to enter.
+ *
+ * Power down devices that require interrupts to be disabled
+ * and move them from the dpm_off list to the dpm_off_irq list.
+ * Then power down system devices.
+ *
+ * Must be called with interrupts disabled and only one CPU running.
+ */
+int device_power_down(pm_message_t state)
+{
+ int error = 0;
+
+ while (!list_empty(&dpm_off)) {
+ struct list_head *entry = dpm_off.prev;
+ struct device *dev = to_device(entry);
+
+ list_del_init(&dev->power.entry);
+ error = suspend_device_late(dev, state);
+ if (error) {
+ printk(KERN_ERR "Could not power down device %s: "
+ "error %d\n",
+ kobject_name(&dev->kobj), error);
+ if (list_empty(&dev->power.entry))
+ list_add(&dev->power.entry, &dpm_off);
+ break;
+ }
+ if (list_empty(&dev->power.entry))
+ list_add(&dev->power.entry, &dpm_off_irq);
+ }
+
+ if (!error)
+ error = sysdev_suspend(state);
+ if (error)
+ dpm_power_up();
+ return error;
+}
+EXPORT_SYMBOL_GPL(device_power_down);
+
+/**
+ * suspend_device - Save state of one device.
+ * @dev: Device.
+ * @state: Power state device is entering.
+ */
+int suspend_device(struct device *dev, pm_message_t state)
{
int error = 0;
- down(&dev->sem);
if (dev->power.power_state.event) {
dev_dbg(dev, "PM: suspend %d-->%d\n",
dev->power.power_state.event, state.event);
@@ -264,123 +440,105 @@ static int suspend_device(struct device * dev, pm_message_t state)
error = dev->bus->suspend(dev, state);
suspend_report_result(dev->bus->suspend, error);
}
- up(&dev->sem);
- return error;
-}
-
-
-/*
- * This is called with interrupts off, only a single CPU
- * running. We can't acquire a mutex or semaphore (and we don't
- * need the protection)
- */
-static int suspend_device_late(struct device *dev, pm_message_t state)
-{
- int error = 0;
-
- if (dev->bus && dev->bus->suspend_late) {
- suspend_device_dbg(dev, state, "LATE ");
- error = dev->bus->suspend_late(dev, state);
- suspend_report_result(dev->bus->suspend_late, error);
- }
return error;
}
/**
- * device_suspend - Save state and stop all devices in system.
- * @state: Power state to put each device in.
+ * dpm_suspend - Suspend every device.
+ * @state: Power state to put each device in.
*
- * Walk the dpm_active list, call ->suspend() for each device, and move
- * it to the dpm_off list.
+ * Walk the dpm_locked list. Suspend each device and move it
+ * to the dpm_off list.
*
* (For historical reasons, if it returns -EAGAIN, that used to mean
* that the device would be called again with interrupts disabled.
* These days, we use the "suspend_late()" callback for that, so we
* print a warning and consider it an error).
- *
- * If we get a different error, try and back out.
- *
- * If we hit a failure with any of the devices, call device_resume()
- * above to bring the suspended devices back to life.
- *
*/
-
-int device_suspend(pm_message_t state)
+static int dpm_suspend(pm_message_t state)
{
int error = 0;
- might_sleep();
- mutex_lock(&dpm_mtx);
mutex_lock(&dpm_list_mtx);
- while (!list_empty(&dpm_active) && error == 0) {
- struct list_head * entry = dpm_active.prev;
- struct device * dev = to_device(entry);
+ while (!list_empty(&dpm_locked)) {
+ struct list_head *entry = dpm_locked.prev;
+ struct device *dev = to_device(entry);
- get_device(dev);
+ list_del_init(&dev->power.entry);
mutex_unlock(&dpm_list_mtx);
-
error = suspend_device(dev, state);
-
- mutex_lock(&dpm_list_mtx);
-
- /* Check if the device got removed */
- if (!list_empty(&dev->power.entry)) {
- /* Move it to the dpm_off list */
- if (!error)
- list_move(&dev->power.entry, &dpm_off);
- }
- if (error)
+ if (error) {
printk(KERN_ERR "Could not suspend device %s: "
- "error %d%s\n",
- kobject_name(&dev->kobj), error,
- error == -EAGAIN ? " (please convert to suspend_late)" : "");
- put_device(dev);
+ "error %d%s\n",
+ kobject_name(&dev->kobj),
+ error,
+ (error == -EAGAIN ?
+ " (please convert to suspend_late)" :
+ ""));
+ mutex_lock(&dpm_list_mtx);
+ if (list_empty(&dev->power.entry))
+ list_add(&dev->power.entry, &dpm_locked);
+ mutex_unlock(&dpm_list_mtx);
+ break;
+ }
+ mutex_lock(&dpm_list_mtx);
+ if (list_empty(&dev->power.entry))
+ list_add(&dev->power.entry, &dpm_off);
}
mutex_unlock(&dpm_list_mtx);
- if (error)
- dpm_resume();
- mutex_unlock(&dpm_mtx);
return error;
}
-EXPORT_SYMBOL_GPL(device_suspend);
-
/**
- * device_power_down - Shut down special devices.
- * @state: Power state to enter.
+ * lock_all_devices - Acquire every device's semaphore
*
- * Walk the dpm_off_irq list, calling ->power_down() for each device that
- * couldn't power down the device with interrupts enabled. When we're
- * done, power down system devices.
+ * Go through the dpm_active list. Carefully lock each device's
+ * semaphore and put it in on the dpm_locked list.
*/
-
-int device_power_down(pm_message_t state)
+static void lock_all_devices(void)
{
- int error = 0;
- struct device * dev;
+ mutex_lock(&dpm_list_mtx);
+ while (!list_empty(&dpm_active)) {
+ struct list_head *entry = dpm_active.next;
+ struct device *dev = to_device(entry);
- while (!list_empty(&dpm_off)) {
- struct list_head * entry = dpm_off.prev;
+ /* Required locking order is dev->sem first,
+ * then dpm_list_mutex. Hence this awkward code.
+ */
+ get_device(dev);
+ mutex_unlock(&dpm_list_mtx);
+ down(&dev->sem);
+ mutex_lock(&dpm_list_mtx);
- dev = to_device(entry);
- error = suspend_device_late(dev, state);
- if (error)
- goto Error;
- list_move(&dev->power.entry, &dpm_off_irq);
+ if (list_empty(entry))
+ up(&dev->sem); /* Device was removed */
+ else
+ list_move_tail(entry, &dpm_locked);
+ put_device(dev);
}
+ mutex_unlock(&dpm_list_mtx);
+}
+
+/**
+ * device_suspend - Save state and stop all devices in system.
+ *
+ * Prevent new devices from being registered, then lock all devices
+ * and suspend them.
+ */
+int device_suspend(pm_message_t state)
+{
+ int error;
- error = sysdev_suspend(state);
- Done:
+ might_sleep();
+ down_write(&pm_sleep_rwsem);
+ lock_all_devices();
+ error = dpm_suspend(state);
+ if (error)
+ device_resume();
return error;
- Error:
- printk(KERN_ERR "Could not power down device %s: "
- "error %d\n", kobject_name(&dev->kobj), error);
- dpm_power_up();
- goto Done;
}
-
-EXPORT_SYMBOL_GPL(device_power_down);
+EXPORT_SYMBOL_GPL(device_suspend);
void __suspend_report_result(const char *function, void *fn, int ret)
{
diff --git a/drivers/base/power/power.h b/drivers/base/power/power.h
index 379da4e..10c2084 100644
--- a/drivers/base/power/power.h
+++ b/drivers/base/power/power.h
@@ -20,6 +20,9 @@ static inline struct device *to_device(struct list_head *entry)
extern void device_pm_add(struct device *);
extern void device_pm_remove(struct device *);
+extern void device_pm_schedule_removal(struct device *);
+extern int pm_sleep_lock(void);
+extern void pm_sleep_unlock(void);
#else /* CONFIG_PM_SLEEP */
@@ -32,6 +35,15 @@ static inline void device_pm_remove(struct device *dev)
{
}
+static inline int pm_sleep_lock(void)
+{
+ return 0;
+}
+
+static inline void pm_sleep_unlock(void)
+{
+}
+
#endif
#ifdef CONFIG_PM
diff --git a/include/linux/device.h b/include/linux/device.h
index 2e15822..cf4ae5c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -521,6 +521,14 @@ extern struct device *device_create(struct class *cls, struct device *parent,
dev_t devt, const char *fmt, ...)
__attribute__((format(printf,4,5)));
extern void device_destroy(struct class *cls, dev_t devt);
+#ifdef CONFIG_PM_SLEEP
+extern void destroy_suspended_device(struct class *cls, dev_t devt);
+#else /* !CONFIG_PM_SLEEP */
+static inline void destroy_suspended_device(struct class *cls, dev_t devt)
+{
+ device_destroy(cls, devt);
+}
+#endif /* !CONFIG_PM_SLEEP */
/*
* Platform "fixup" functions - allow the platform to have their say
--
1.5.3.8
next prev parent reply other threads:[~2008-01-25 7:18 UTC|newest]
Thread overview: 272+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-25 7:11 [GIT PATCH] driver core patches against 2.6.24 Greg KH
2008-01-25 7:08 ` [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 002/196] Chinese: rephrase English introduction in HOWTO Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 004/196] Chinese: add translation of SubmittingPatches Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 005/196] Chinese: add translation of SubmittingDrivers Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 006/196] Chinese: add translation of oops-tracing.txt Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 007/196] Chinese: add translation of stable_kernel_rules.txt Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 008/196] Chinese: add translation of volatile-considered-harmful.txt Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 009/196] Chinese: add translation of sparse.txt Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 010/196] Chinese: add translation of Codingstyle Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 011/196] sysfs: Fix a copy-n-paste typo in comment Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 012/196] nozomi driver Greg Kroah-Hartman
2008-01-25 8:31 ` Jan Engelhardt
2008-01-25 11:56 ` Stefan Richter
2008-01-25 12:44 ` [PATCH 012/196 ver2] " Frank Seidel
2008-01-25 18:55 ` Greg KH
2008-01-25 19:33 ` Frank Seidel
2008-01-25 19:43 ` Greg KH
2008-01-25 20:14 ` Frank Seidel
2008-01-25 20:13 ` Frank Seidel
2008-01-25 12:44 ` [PATCH 012/196] " Frank Seidel
2008-01-25 13:21 ` Jan Engelhardt
2008-01-25 17:02 ` Valdis.Kletnieks
2008-01-25 7:09 ` [PATCH 013/196] Documentation: Replace obsolete "driverfs" with "sysfs" Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 014/196] kobject: remove incorrect comment in kobject_rename Greg Kroah-Hartman
2008-01-25 7:09 ` Greg Kroah-Hartman [this message]
2008-01-25 7:09 ` [PATCH 016/196] kref: add kref_set() Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 017/196] aoechr: Convert from class_device to device Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 018/196] coda: convert struct class_device to struct device Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 019/196] DMA: Convert from class_device to device for DMA engine Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 020/196] IDE: Convert from class_device to device for ide-tape Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 021/196] ISDN: Convert from class_device to device for ISDN capi Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 022/196] adb: Convert from class_device to device Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 023/196] MCP_UCB1200: " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 024/196] mtd: Convert from class_device to device for MTD/mtdchar Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 025/196] paride: Convert from class_device to device for block/paride Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 026/196] pktcdvd: Convert from class_device to device for block/pktcdvd Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 027/196] tifm: Convert from class_device to device for TI flash media Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 028/196] cosa: Convert from class_device to device for cosa sync driver Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 029/196] ecryptfs: clean up attribute mess Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 030/196] driver core: Make the dev_*() family of macros in device.h complete Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 031/196] sysfs: create optimal relative symlink targets Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 032/196] sysfs: remove SPIN_LOCK_UNLOCKED Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 033/196] kobject: convert ibmasm to use kref, not kobject Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 034/196] kobject: convert hvc_console " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 035/196] kobject: convert hvcs " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 036/196] kobject: convert icom " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 037/196] kobject: fix up kobject_set_name to use kvasprintf Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 038/196] kobject: make kobject_cleanup be static Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 039/196] kobject: add kobject_init_ng function Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 040/196] kobject: add kobject_add_ng function Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 041/196] kobject: add kobject_init_and_add function Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 042/196] kobject: remove struct kobj_type from struct kset Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 043/196] kobject: remove kobj_set_kset_s as no one is using it anymore Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 044/196] kset: add kset_create_and_add function Greg Kroah-Hartman
2008-01-25 9:09 ` Dave Young
2008-01-25 17:51 ` Greg KH
2008-01-25 7:09 ` [PATCH 045/196] kobject: add kobject_create_and_add function Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 046/196] kobject: get rid of kobject_add_dir Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 047/196] kobject: get rid of kobject_kset_add_dir Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 048/196] kobject: convert fuse to use kobject_create Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 049/196] kobject: convert securityfs " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 050/196] kobject: convert debugfs " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 051/196] kobject: convert configfs " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 052/196] kset: convert ecryptfs to use kset_create Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 053/196] kobject: convert main fs kobject to use kobject_create Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 054/196] kset: convert gfs2 to use kset_create Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 055/196] kset: convert gfs2 dlm " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 056/196] kset: convert " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 057/196] kset: convert pci hotplug to use kset_create_and_add Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 058/196] kset: remove decl_subsys_name Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 059/196] kset: convert kernel_subsys to use kset_create Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 060/196] kset: convert drivers/base/bus.c " Greg Kroah-Hartman
2008-01-25 7:09 ` [PATCH 061/196] kset: convert drivers/base/class.c " Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 062/196] kset: convert drivers/base/firmware.c " Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 063/196] kset: convert /sys/devices " Greg Kroah-Hartman
2008-01-26 3:40 ` Olof Johansson
2008-01-26 5:24 ` Greg KH
2008-01-26 17:36 ` Olof Johansson
2008-01-25 7:10 ` [PATCH 064/196] kobject: convert /sys/hypervisor to use kobject_create Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 065/196] kobject: convert s390 hypervisor " Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 066/196] kset: convert /sys/devices/system to use kset_create Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 067/196] kset: convert slub " Greg Kroah-Hartman
2008-01-25 18:16 ` Christoph Lameter
2008-01-25 7:10 ` [PATCH 068/196] kset: move /sys/slab to /sys/kernel/slab Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 069/196] kset: convert /sys/module to use kset_create Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 070/196] kset: convert /sys/power " Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 071/196] kset: convert struct bus_device->devices " Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 072/196] kset: convert struct bus_device->drivers " Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 073/196] Driver Core: add kobj_attribute handling Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 074/196] Driver Core: switch all dynamic ksets to kobj_sysfs_ops Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 075/196] fix struct user_info export's sysfs interaction Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 076/196] ecryptfs: remove version_str file from sysfs Greg Kroah-Hartman
2008-01-25 8:25 ` Jeff Garzik
2008-01-25 17:54 ` Greg KH
2008-01-25 19:14 ` Michael Halcrow
2008-01-25 22:04 ` Jeff Garzik
2008-01-25 7:10 ` [PATCH 077/196] efivars: make new_var and del_var binary sysfs files Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 078/196] kobject: convert efivars to kobj_attr interface Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 079/196] firmware: export firmware_kset so that people can use that instead of the braindead firmware_register interface Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 080/196] kset: convert efivars to use kset_create for the efi subsystem Greg Kroah-Hartman
2008-01-25 7:10 ` [PATCH 081/196] kset: convert efivars to use kset_create for the vars sub-subsystem Greg Kroah-Hartman
2008-01-25 7:27 ` [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO Greg Kroah-Hartman
2008-01-25 7:27 ` [PATCH 002/196] Chinese: rephrase English introduction in HOWTO Greg Kroah-Hartman
2008-01-25 7:27 ` [PATCH 004/196] Chinese: add translation of SubmittingPatches Greg Kroah-Hartman
2008-01-25 7:28 ` [PATCH 080/196] kset: convert efivars to use kset_create for the efi subsystem Greg Kroah-Hartman
2008-01-25 7:28 ` [PATCH 081/196] kset: convert efivars to use kset_create for the vars sub-subsystem Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 080/196] kset: convert efivars to use kset_create for the efi subsystem Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 081/196] kset: convert efivars to use kset_create for the vars sub-subsystem Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 082/196] kobject: convert arm/mach-omap1/pm.c to kobj_attr interface Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 083/196] kobject: convert pseries/power.c " Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 084/196] kobject: convert s390 ipl.c " Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 085/196] kset: convert s390 ipl.c to use kset_create Greg Kroah-Hartman
2008-01-25 12:20 ` Heiko Carstens
2008-01-25 17:48 ` Greg KH
2008-01-25 23:11 ` Heiko Carstens
2008-01-26 5:33 ` Greg KH
2008-01-25 7:31 ` [PATCH 086/196] kobject: convert parisc/pdc_stable to kobj_attr interface Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 087/196] kset: convert parisc/pdc_stable.c to use kset_create Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 088/196] Driver Core: kill subsys_attribute and default sysfs ops Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 089/196] kset: convert edd to use kset_create Greg Kroah-Hartman
2008-01-25 7:31 ` [PATCH 090/196] kobject: convert /sys/firmware/acpi/ to use kobject_create Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 091/196] firmware: remove firmware_(un)register() Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 092/196] firmware: change firmware_kset to firmware_kobj Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 093/196] kset: convert ocfs2 to use kset_create Greg Kroah-Hartman
2008-01-25 20:38 ` Mark Fasheh
2008-01-25 7:32 ` [PATCH 094/196] kset: convert block_subsys " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 095/196] kset: remove decl_subsys macro Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 096/196] kobject: convert kernel_kset to be a kobject Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 097/196] kobject: remove subsystem_(un)register functions Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 098/196] kobject: clean up rpadlpar horrid sysfs abuse Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 099/196] kobject: convert ecryptfs to use kobject_create Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 100/196] kobject: convert efivars " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 101/196] kobject: convert parisc/pdc_stable " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 102/196] driver core: clean up shutdown.c Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 103/196] driver core: clean up device_shutdown Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 104/196] driver core: make /sys/power a kobject Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 105/196] kobject: grab the kset reference in kobject_add, not kobject_init Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 106/196] kobject: clean up debugging messages Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 107/196] UIO: fix kobject usage Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 108/196] Kobject: change net/bridge to use kobject_create_and_add Greg Kroah-Hartman
2008-01-25 16:19 ` Stephen Hemminger
2008-01-25 17:45 ` Greg KH
2008-01-28 22:09 ` Jan Engelhardt
2008-01-28 23:10 ` Greg KH
2008-01-25 7:32 ` [PATCH 109/196] Kobject: change GFS2 to use kobject_init_and_add Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 110/196] Kobject: change drivers/infiniband " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 111/196] Kobject: change drivers/firmware/edd.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 112/196] Kobject: change drivers/firmware/efivars.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 113/196] Kobject: change drivers/cpufreq/cpufreq.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 114/196] Kobject: change drivers/edac " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 115/196] Kobject: change drivers/cpuidle/sysfs.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 116/196] Kobject: change drivers/pci/hotplug/pci_hotplug_core.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 117/196] Kobject: change drivers/base/sys.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 118/196] Kobject: change arch/x86/kernel/cpu/intel_cacheinfo.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 119/196] Kobject: change drivers/acpi/system.c to use kobject_create_and_add Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 120/196] Kobject: change drivers/block/pktcdvd.c to use kobject_init_and_add Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 121/196] Kobject: change arch/sh/kernel/cpu/sh4/sq.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 122/196] Kobject: change drivers/net/ibmveth.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 123/196] Kobject: change drivers/parisc/pdc_stable.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 124/196] Kobject: change arch/ia64/kernel/topology.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 125/196] Kobject: change drivers/md/md.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 126/196] Kobject: change arch/x86/kernel/cpu/mcheck/mce_amd_64.c to use kobject_create_and_add Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 127/196] Kobject: change arch/x86/kernel/cpu/mcheck/mce_amd_64.c to use kobject_init_and_add Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 128/196] Kobject: the cris iop_fw_load.c code is broken Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 129/196] Kobject: convert drivers/base/class.c to use kobject_init/add_ng() Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 130/196] Kobject: convert drivers/base/core.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 131/196] Kobject: convert drivers/net/iseries_veth.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 132/196] Kobject: convert fs/char_dev.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 133/196] Kobject: convert kernel/params.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 134/196] Kobject: convert kernel/user.c " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 135/196] Kobject: convert mm/slub.c " Greg Kroah-Hartman
2008-01-25 18:17 ` Christoph Lameter
2008-01-25 7:32 ` [PATCH 136/196] Kobject: convert net/bridge/br_if.c " Greg Kroah-Hartman
2008-01-25 16:20 ` Stephen Hemminger
2008-01-25 7:32 ` [PATCH 137/196] driver core: remove owner field from struct bus_type Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 138/196] driver core: add way to get to bus kset Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 139/196] driver core: add way to get to bus device klist Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 140/196] driver core: remove fields from struct bus_type Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 141/196] USB: use proper call to driver_create_file Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 142/196] PCMCIA: " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 143/196] PCI: " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 144/196] PCI: remove foolish code from pci-driver.c Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 145/196] driver core: Introduce default attribute groups Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 146/196] netiucv: Use device_driver " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 147/196] zfcp: " Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 148/196] Infiniband: make ipath driver use default driver groups Greg Kroah-Hartman
2008-01-25 21:51 ` Roland Dreier
2008-01-25 22:11 ` Roland Dreier
2008-01-25 22:23 ` Greg KH
2008-01-25 7:32 ` [PATCH 149/196] Driver: add driver_add_kobj for looney iseries_veth driver Greg Kroah-Hartman
2008-01-25 7:32 ` [PATCH 150/196] Driver core: move the driver specific module code into the driver core Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 151/196] Driver core: move the static kobject out of struct driver Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 152/196] Driver core: clean up debugging messages Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 153/196] Kobject: change drivers/base/bus to use kobject_init_and_add Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 154/196] Driver core: fix race in __device_release_driver Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 155/196] Driver core: fix class glue dir cleanup logic Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 156/196] sysfs: fix /sys/module/*/holders after sysfs logic change Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 157/196] Kobject: drop child->parent ref at unregistration Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 158/196] Driver core: convert block from raw kobjects to core devices Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 159/196] Kobject: convert block/elevator.c to use kobject_init/add_ng() Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 160/196] Kobject: convert block/ll_rw_blk.c " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 161/196] Kobject: convert drivers/md/md.c " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 162/196] Kobject: convert kernel/module.c " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 163/196] Kobject: remove kobject_add() as no one uses it anymore Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 164/196] Kobject: rename kobject_add_ng() to kobject_add() Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 165/196] Kobject: remove kobject_init() as no one uses it anymore Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 166/196] Kobject: rename kobject_init_ng() to kobject_init() Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 167/196] Kobject: remove kobject_register() Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 168/196] Kset: remove kset_add function Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 169/196] Kobject: auto-cleanup on final unref Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 170/196] Modules: remove unneeded release function Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 171/196] Kobject: convert arch/* from kobject_unregister() to kobject_put() Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 172/196] Kobject: convert drivers/* " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 173/196] Kobject: convert fs/* " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 174/196] Kobject: convert remaining " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 175/196] Kobject: remove kobject_unregister() as no one uses it anymore Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 176/196] Driver core: change sysdev classes to use dynamic kobject names Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 177/196] kobject: remove old, outdated documentation Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 178/196] kobject: update the kobject/kset documentation Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 179/196] kobject: add sample code for how to use kobjects in a simple manner Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 180/196] kobject: add sample code for how to use ksets/ktypes/kobjects Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 181/196] Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __init Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 182/196] sysfs: make SYSFS_DEPRECATED depend on SYSFS Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 183/196] driver core: fix build with SYSFS=n Greg Kroah-Hartman
2008-01-25 22:25 ` Ingo Molnar
2008-01-25 22:33 ` Andrew Morton
2008-01-25 22:38 ` Greg KH
2008-01-25 22:57 ` Ingo Molnar
2008-01-25 23:10 ` Greg KH
2008-01-25 23:18 ` Ingo Molnar
2008-01-25 23:27 ` Harvey Harrison
2008-01-25 7:33 ` [PATCH 184/196] Driver Core: constify the name passed to platform_device_register_simple Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 185/196] UIO: constify function pointer tables Greg Kroah-Hartman
2008-01-25 10:01 ` Hans-Jürgen Koch
2008-01-25 7:33 ` [PATCH 186/196] Driver core: Cleanup get_device_parent() in device_add() and device_move() Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 187/196] Driver Core: add class iteration api Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 188/196] ieee1394: use " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 189/196] power supply : " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 190/196] rtc: " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 191/196] scsi: " Greg Kroah-Hartman
2008-01-25 14:55 ` James Bottomley
2008-01-25 7:33 ` [PATCH 192/196] spi: " Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 193/196] Driver core: fix coding style issues in device.h Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 194/196] Kobject: fix coding style issues in kobject.h Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 195/196] Kobject: fix coding style issues in kobject c files Greg Kroah-Hartman
2008-01-25 7:33 ` [PATCH 196/196] Driver core: coding style fixes Greg Kroah-Hartman
2008-01-25 18:44 ` [GIT PATCH] driver core patches against 2.6.24 Linus Torvalds
2008-01-25 18:52 ` Greg KH
2008-01-25 19:11 ` Linus Torvalds
2008-01-25 19:16 ` Greg KH
2008-01-25 19:27 ` Greg KH
2008-01-25 19:56 ` Jeremy Fitzhardinge
2008-01-25 21:20 ` Jon Masters
2008-01-25 21:49 ` Linus Torvalds
2008-01-25 21:58 ` Jeremy Fitzhardinge
2008-01-25 22:26 ` Peter Zijlstra
2008-01-26 0:05 ` Ingo Molnar
2008-01-26 0:27 ` Peter Zijlstra
2008-01-26 0:40 ` Jon Masters
2008-01-26 3:24 ` Valdis.Kletnieks
2008-01-28 8:26 ` Helge Hafting
2008-01-26 6:31 ` Arjan van de Ven
2008-01-25 19:42 ` Greg KH
2008-01-25 20:23 ` Linus Torvalds
2008-01-25 20:28 ` Greg KH
2008-01-26 4:50 ` Rusty Russell
2008-01-26 5:35 ` Greg KH
2008-01-26 9:19 ` Rusty Russell
2008-01-27 6:42 ` Linus Torvalds
2008-01-29 5:49 ` Rusty Russell
2008-01-25 21:11 ` Jon Masters
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=1201245134-4876-15-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=stern@rowland.harvard.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox