public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm 0/8] PM patches for 2.6.27
@ 2008-07-09 23:52 Rafael J. Wysocki
  2008-07-09 23:55 ` [PATCH -mm 1/8] PM: Add new PM_EVENT codes for runtime power transitions Rafael J. Wysocki
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-09 23:52 UTC (permalink / raw)
  To: Andrew Morton; +Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list

Hi Andrew,

The following eight patches are related to power management and IMO they
would be nice to have in 2.6.27.

The patches are on top of linux-next-20080709.

Please add to -mm.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 1/8] PM: Add new PM_EVENT codes for runtime power transitions
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
@ 2008-07-09 23:55 ` Rafael J. Wysocki
  2008-07-10 11:34   ` Pavel Machek
  2008-07-09 23:58 ` [PATCH -mm 2/8] AHCI: Speed-up resume Rafael J. Wysocki
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-09 23:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list, Alan Stern

From: Alan Stern <stern@rowland.harvard.edu>
Subject: PM: Add new PM_EVENT codes for runtime power transitions

This patch (as1112) adds some new PM_EVENT_* codes for use by kernel
subsystems.  They describe runtime power-state transitions of the sort
already implemented by the USB subsystem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---

 include/linux/pm.h |   39 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 36 insertions(+), 3 deletions(-)

Index: linux-next/include/linux/pm.h
===================================================================
--- linux-next.orig/include/linux/pm.h
+++ linux-next/include/linux/pm.h
@@ -245,6 +245,21 @@ struct pm_ext_ops {
  * RECOVER	Creation of a hibernation image or restoration of the main
  *		memory contents from a hibernation image has failed, call
  *		->thaw() and ->complete() for all devices.
+ *
+ * The following PM_EVENT_ messages are defined for internal use by
+ * kernel subsystems.  They are never issued by the PM core.
+ *
+ * USER_SUSPEND		Manual selective suspend was issued by userspace.
+ *
+ * USER_RESUME		Manual selective resume was issued by userspace.
+ *
+ * REMOTE_WAKEUP	Remote-wakeup request was received from the device.
+ *
+ * AUTO_SUSPEND		Automatic (device idle) runtime suspend was
+ *			initiated by the subsystem.
+ *
+ * AUTO_RESUME		Automatic (device needed) runtime resume was
+ *			requested by a driver.
  */
 
 #define PM_EVENT_ON		0x0000
@@ -256,9 +271,18 @@ struct pm_ext_ops {
 #define PM_EVENT_THAW		0x0020
 #define PM_EVENT_RESTORE	0x0040
 #define PM_EVENT_RECOVER	0x0080
+#define PM_EVENT_USER		0x0100
+#define PM_EVENT_REMOTE		0x0200
+#define PM_EVENT_AUTO		0x0400
+
+#define PM_EVENT_SLEEP		(PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
+#define PM_EVENT_USER_SUSPEND	(PM_EVENT_USER | PM_EVENT_SUSPEND)
+#define PM_EVENT_USER_RESUME	(PM_EVENT_USER | PM_EVENT_RESUME)
+#define PM_EVENT_REMOTE_WAKEUP	(PM_EVENT_REMOTE | PM_EVENT_RESUME)
+#define PM_EVENT_AUTO_SUSPEND	(PM_EVENT_AUTO | PM_EVENT_SUSPEND)
+#define PM_EVENT_AUTO_RESUME	(PM_EVENT_AUTO | PM_EVENT_RESUME)
 
-#define PM_EVENT_SLEEP	(PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
-
+#define PMSG_ON		((struct pm_message){ .event = PM_EVENT_ON, })
 #define PMSG_FREEZE	((struct pm_message){ .event = PM_EVENT_FREEZE, })
 #define PMSG_QUIESCE	((struct pm_message){ .event = PM_EVENT_QUIESCE, })
 #define PMSG_SUSPEND	((struct pm_message){ .event = PM_EVENT_SUSPEND, })
@@ -267,7 +291,16 @@ struct pm_ext_ops {
 #define PMSG_THAW	((struct pm_message){ .event = PM_EVENT_THAW, })
 #define PMSG_RESTORE	((struct pm_message){ .event = PM_EVENT_RESTORE, })
 #define PMSG_RECOVER	((struct pm_message){ .event = PM_EVENT_RECOVER, })
-#define PMSG_ON		((struct pm_message){ .event = PM_EVENT_ON, })
+#define PMSG_USER_SUSPEND	((struct pm_messge) \
+					{ .event = PM_EVENT_USER_SUSPEND, })
+#define PMSG_USER_RESUME	((struct pm_messge) \
+					{ .event = PM_EVENT_USER_RESUME, })
+#define PMSG_REMOTE_RESUME	((struct pm_messge) \
+					{ .event = PM_EVENT_REMOTE_RESUME, })
+#define PMSG_AUTO_SUSPEND	((struct pm_messge) \
+					{ .event = PM_EVENT_AUTO_SUSPEND, })
+#define PMSG_AUTO_RESUME		((struct pm_messge) \
+					{ .event = PM_EVENT_AUTO_RESUME, })
 
 /**
  * Device power management states


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 2/8] AHCI: Speed-up resume
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
  2008-07-09 23:55 ` [PATCH -mm 1/8] PM: Add new PM_EVENT codes for runtime power transitions Rafael J. Wysocki
@ 2008-07-09 23:58 ` Rafael J. Wysocki
  2008-07-10 11:34   ` Pavel Machek
  2008-07-10  0:00 ` [PATCH -mm 3/8] Hibernation: Simplify memory bitmap Rafael J. Wysocki
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-09 23:58 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list, Tejun Heo,
	Zhang Rui, Jeff Garzik

From: Zhang Rui <rui.zhang@intel.com>
Subject: AHCI: Speed-up resume

During resume, sleep 1 second to wait for the HBA reset
to finish is a waste of time.

According to the AHCI 1.2 spec,
We should poll the HOST_CTL register,
and return error if the host reset is not
finished within 1 second.

Test results show that the HBA reset can be done quickly(in usecs).
And this patch may save nearly 1 second during resume.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
--
 drivers/ata/ahci.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-next/drivers/ata/ahci.c
===================================================================
--- linux-next.orig/drivers/ata/ahci.c
+++ linux-next/drivers/ata/ahci.c
@@ -1142,12 +1142,15 @@ static int ahci_reset_controller(struct 
 			readl(mmio + HOST_CTL); /* flush */
 		}
 
-		/* reset must complete within 1 second, or
+		/*
+		 * to perform host reset, OS should set HOST_RESET
+		 * and poll until this bit is read to be "0".
+		 * reset must complete within 1 second, or
 		 * the hardware should be considered fried.
 		 */
-		ssleep(1);
+		tmp = ata_wait_register(mmio + HOST_CTL, HOST_RESET,
+					HOST_RESET, 10, 1000);
 
-		tmp = readl(mmio + HOST_CTL);
 		if (tmp & HOST_RESET) {
 			dev_printk(KERN_ERR, host->dev,
 				   "controller reset failed (0x%x)\n", tmp);


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 3/8] Hibernation: Simplify memory bitmap
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
  2008-07-09 23:55 ` [PATCH -mm 1/8] PM: Add new PM_EVENT codes for runtime power transitions Rafael J. Wysocki
  2008-07-09 23:58 ` [PATCH -mm 2/8] AHCI: Speed-up resume Rafael J. Wysocki
@ 2008-07-10  0:00 ` Rafael J. Wysocki
  2008-07-10 11:34   ` Pavel Machek
  2008-07-10  0:01 ` [PATCH -mm 4/8] serio: Speed-up resume Rafael J. Wysocki
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-10  0:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list, Akinobu Mita

From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: Hibernation: Simplify memory bitmap

This patch simplifies the memory bitmap manipulations.

- remove the member size in struct bm_block

It is not necessary for struct bm_block to have the number of bit chunks
that can be calculated by using end_pfn and start_pfn.

- use find_next_bit() for memory_bm_next_pfn

No need to invent the bitmap library only for the memory bitmap.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 kernel/power/snapshot.c |   88 +++++++++++-------------------------------------
 1 file changed, 21 insertions(+), 67 deletions(-)

Index: linux-next/kernel/power/snapshot.c
===================================================================
--- linux-next.orig/kernel/power/snapshot.c
+++ linux-next/kernel/power/snapshot.c
@@ -205,8 +205,7 @@ static void chain_free(struct chain_allo
  *	objects.  The main list's elements are of type struct zone_bitmap
  *	and each of them corresonds to one zone.  For each zone bitmap
  *	object there is a list of objects of type struct bm_block that
- *	represent each blocks of bit chunks in which information is
- *	stored.
+ *	represent each blocks of bitmap in which information is stored.
  *
  *	struct memory_bitmap contains a pointer to the main list of zone
  *	bitmap objects, a struct bm_position used for browsing the bitmap,
@@ -224,26 +223,27 @@ static void chain_free(struct chain_allo
  *	pfns that correspond to the start and end of the represented zone.
  *
  *	struct bm_block contains a pointer to the memory page in which
- *	information is stored (in the form of a block of bit chunks
- *	of type unsigned long each).  It also contains the pfns that
- *	correspond to the start and end of the represented memory area and
- *	the number of bit chunks in the block.
+ *	information is stored (in the form of a block of bitmap)
+ *	It also contains the pfns that correspond to the start and end of
+ *	the represented memory area.
  */
 
 #define BM_END_OF_MAP	(~0UL)
 
-#define BM_CHUNKS_PER_BLOCK	(PAGE_SIZE / sizeof(long))
-#define BM_BITS_PER_CHUNK	(sizeof(long) << 3)
 #define BM_BITS_PER_BLOCK	(PAGE_SIZE << 3)
 
 struct bm_block {
 	struct bm_block *next;		/* next element of the list */
 	unsigned long start_pfn;	/* pfn represented by the first bit */
 	unsigned long end_pfn;	/* pfn represented by the last bit plus 1 */
-	unsigned int size;	/* number of bit chunks */
-	unsigned long *data;	/* chunks of bits representing pages */
+	unsigned long *data;	/* bitmap representing pages */
 };
 
+static inline unsigned long bm_block_bits(struct bm_block *bb)
+{
+	return bb->end_pfn - bb->start_pfn;
+}
+
 struct zone_bitmap {
 	struct zone_bitmap *next;	/* next element of the list */
 	unsigned long start_pfn;	/* minimal pfn in this zone */
@@ -257,7 +257,6 @@ struct zone_bitmap {
 struct bm_position {
 	struct zone_bitmap *zone_bm;
 	struct bm_block *block;
-	int chunk;
 	int bit;
 };
 
@@ -272,12 +271,6 @@ struct memory_bitmap {
 
 /* Functions that operate on memory bitmaps */
 
-static inline void memory_bm_reset_chunk(struct memory_bitmap *bm)
-{
-	bm->cur.chunk = 0;
-	bm->cur.bit = -1;
-}
-
 static void memory_bm_position_reset(struct memory_bitmap *bm)
 {
 	struct zone_bitmap *zone_bm;
@@ -285,7 +278,7 @@ static void memory_bm_position_reset(str
 	zone_bm = bm->zone_bm_list;
 	bm->cur.zone_bm = zone_bm;
 	bm->cur.block = zone_bm->bm_blocks;
-	memory_bm_reset_chunk(bm);
+	bm->cur.bit = 0;
 }
 
 static void memory_bm_free(struct memory_bitmap *bm, int clear_nosave_free);
@@ -394,12 +387,10 @@ memory_bm_create(struct memory_bitmap *b
 			bb->start_pfn = pfn;
 			if (nr >= BM_BITS_PER_BLOCK) {
 				pfn += BM_BITS_PER_BLOCK;
-				bb->size = BM_CHUNKS_PER_BLOCK;
 				nr -= BM_BITS_PER_BLOCK;
 			} else {
 				/* This is executed only once in the loop */
 				pfn += nr;
-				bb->size = DIV_ROUND_UP(nr, BM_BITS_PER_CHUNK);
 			}
 			bb->end_pfn = pfn;
 			bb = bb->next;
@@ -478,8 +469,8 @@ static int memory_bm_find_bit(struct mem
 	}
 	zone_bm->cur_block = bb;
 	pfn -= bb->start_pfn;
-	*bit_nr = pfn % BM_BITS_PER_CHUNK;
-	*addr = bb->data + pfn / BM_BITS_PER_CHUNK;
+	*bit_nr = pfn;
+	*addr = bb->data;
 	return 0;
 }
 
@@ -528,36 +519,6 @@ static int memory_bm_test_bit(struct mem
 	return test_bit(bit, addr);
 }
 
-/* Two auxiliary functions for memory_bm_next_pfn */
-
-/* Find the first set bit in the given chunk, if there is one */
-
-static inline int next_bit_in_chunk(int bit, unsigned long *chunk_p)
-{
-	bit++;
-	while (bit < BM_BITS_PER_CHUNK) {
-		if (test_bit(bit, chunk_p))
-			return bit;
-
-		bit++;
-	}
-	return -1;
-}
-
-/* Find a chunk containing some bits set in given block of bits */
-
-static inline int next_chunk_in_block(int n, struct bm_block *bb)
-{
-	n++;
-	while (n < bb->size) {
-		if (bb->data[n])
-			return n;
-
-		n++;
-	}
-	return -1;
-}
-
 /**
  *	memory_bm_next_pfn - find the pfn that corresponds to the next set bit
  *	in the bitmap @bm.  If the pfn cannot be found, BM_END_OF_MAP is
@@ -571,40 +532,33 @@ static unsigned long memory_bm_next_pfn(
 {
 	struct zone_bitmap *zone_bm;
 	struct bm_block *bb;
-	int chunk;
 	int bit;
 
 	do {
 		bb = bm->cur.block;
 		do {
-			chunk = bm->cur.chunk;
 			bit = bm->cur.bit;
-			do {
-				bit = next_bit_in_chunk(bit, bb->data + chunk);
-				if (bit >= 0)
-					goto Return_pfn;
-
-				chunk = next_chunk_in_block(chunk, bb);
-				bit = -1;
-			} while (chunk >= 0);
+			bit = find_next_bit(bb->data, bm_block_bits(bb), bit);
+			if (bit < bm_block_bits(bb))
+				goto Return_pfn;
+
 			bb = bb->next;
 			bm->cur.block = bb;
-			memory_bm_reset_chunk(bm);
+			bm->cur.bit = 0;
 		} while (bb);
 		zone_bm = bm->cur.zone_bm->next;
 		if (zone_bm) {
 			bm->cur.zone_bm = zone_bm;
 			bm->cur.block = zone_bm->bm_blocks;
-			memory_bm_reset_chunk(bm);
+			bm->cur.bit = 0;
 		}
 	} while (zone_bm);
 	memory_bm_position_reset(bm);
 	return BM_END_OF_MAP;
 
  Return_pfn:
-	bm->cur.chunk = chunk;
-	bm->cur.bit = bit;
-	return bb->start_pfn + chunk * BM_BITS_PER_CHUNK + bit;
+	bm->cur.bit = bit + 1;
+	return bb->start_pfn + bit;
 }
 
 /**


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 4/8] serio: Speed-up resume
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
                   ` (2 preceding siblings ...)
  2008-07-10  0:00 ` [PATCH -mm 3/8] Hibernation: Simplify memory bitmap Rafael J. Wysocki
@ 2008-07-10  0:01 ` Rafael J. Wysocki
  2008-07-10 11:35   ` Pavel Machek
  2008-07-10  0:03 ` [PATCH -mm 5/8] Introduce new interface schedule_work_on Rafael J. Wysocki
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-10  0:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list, Shaohua Li,
	Len Brown, Dmitry Torokhov

From: Shaohua Li <shaohua.li@intel.com>
Subject: serio: Speed-up resume

serio_resume will call into psmouse_extensions(). In my test, the
routine is very slow, it blocks resume about 1 sec. Below patch (move
resume to kseriod, just like boot time probe) cures the issue in my
test, and seems no side effect. I'm no familiar with serio driver, so
please check. 

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Len Brown <lenb@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/input/serio/serio.c |   33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

Index: linux-next/drivers/input/serio/serio.c
===================================================================
--- linux-next.orig/drivers/input/serio/serio.c
+++ linux-next/drivers/input/serio/serio.c
@@ -163,6 +163,7 @@ enum serio_event_type {
 	SERIO_RECONNECT_PORT,
 	SERIO_REGISTER_PORT,
 	SERIO_ATTACH_DRIVER,
+	SERIO_RESUME_PORT,
 };
 
 struct serio_event {
@@ -287,6 +288,13 @@ static struct serio_event *serio_get_eve
 	return event;
 }
 
+#ifdef CONFIG_PM
+static void serio_resume_port(struct device *dev);
+#else
+static inline void serio_resume_port(struct device *dev)
+{
+}
+#endif /* CONFIG_PM */
 static void serio_handle_event(void)
 {
 	struct serio_event *event;
@@ -319,6 +327,10 @@ static void serio_handle_event(void)
 				serio_attach_driver(event->object);
 				break;
 
+			case SERIO_RESUME_PORT:
+				serio_resume_port(event->object);
+				break;
+
 			default:
 				break;
 		}
@@ -925,21 +937,26 @@ static int serio_suspend(struct device *
 	return 0;
 }
 
-static int serio_resume(struct device *dev)
+static void serio_resume_port(struct device *dev)
 {
 	struct serio *serio = to_serio_port(dev);
 
-	if (dev->power.power_state.event != PM_EVENT_ON &&
-	    serio_reconnect_driver(serio)) {
-		/*
-		 * Driver re-probing can take a while, so better let kseriod
-		 * deal with it.
-		 */
-		serio_rescan(serio);
+	if (serio_reconnect_driver(serio)) {
+		serio_disconnect_port(serio);
+		serio_find_driver(serio);
 	}
 
 	dev->power.power_state = PMSG_ON;
+}
 
+static int serio_resume(struct device *dev)
+{
+	/*
+	 * Driver reconnect can take a while, so better let kseriod
+	 * deal with it.
+	 */
+	if (dev->power.power_state.event != PM_EVENT_ON)
+		serio_queue_event(dev, NULL, SERIO_RESUME_PORT);
 	return 0;
 }
 #endif /* CONFIG_PM */


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 5/8] Introduce new interface schedule_work_on
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
                   ` (3 preceding siblings ...)
  2008-07-10  0:01 ` [PATCH -mm 4/8] serio: Speed-up resume Rafael J. Wysocki
@ 2008-07-10  0:03 ` Rafael J. Wysocki
  2008-07-10 11:36   ` Pavel Machek
  2008-07-10  0:04 ` [PATCH -mm 6/8] Schedule sysrq poweroff on boot cpu Rafael J. Wysocki
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-10  0:03 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list, Zhang Rui,
	Rus

From: Zhang Rui <rui.zhang@intel.com>
Subject: Introduce new interface schedule_work_on

This interface allows adding a job on a specific cpu.

Although a work struct on a cpu will be scheduled to other cpu if the cpu dies,
there is a recursion if a work task tries to offline the cpu it's running on.
we need to schedule the task to a specific cpu in this case.
http://bugzilla.kernel.org/show_bug.cgi?id=10897

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Rus <harbour@sfinx.od.ua>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 include/linux/workqueue.h |    3 +++
 kernel/workqueue.c        |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

Index: linux-2.6/include/linux/workqueue.h
===================================================================
--- linux-2.6.orig/include/linux/workqueue.h	2007-05-04 10:57:08.000000000 +0800
+++ linux-2.6/include/linux/workqueue.h	2008-07-04 10:03:21.000000000 +0800
@@ -179,6 +179,8 @@
 extern void destroy_workqueue(struct workqueue_struct *wq);
 
 extern int queue_work(struct workqueue_struct *wq, struct work_struct *work);
+extern int queue_work_on(int cpu, struct workqueue_struct *wq,
+			struct work_struct *work);
 extern int queue_delayed_work(struct workqueue_struct *wq,
 			struct delayed_work *work, unsigned long delay);
 extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
@@ -188,6 +190,7 @@
 extern void flush_scheduled_work(void);
 
 extern int schedule_work(struct work_struct *work);
+extern int schedule_work_on(int cpu, struct work_struct *work);
 extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay);
 extern int schedule_delayed_work_on(int cpu, struct delayed_work *work,
 					unsigned long delay);
Index: linux-2.6/kernel/workqueue.c
===================================================================
--- linux-2.6.orig/kernel/workqueue.c	2007-05-04 10:57:08.000000000 +0800
+++ linux-2.6/kernel/workqueue.c	2008-07-04 10:05:01.000000000 +0800
@@ -175,6 +175,32 @@
 }
 EXPORT_SYMBOL_GPL(queue_work);
 
+/**
+ * queue_work_on - queue work on specific cpu
+ * @cpu: CPU number to execute work on
+ * @wq: workqueue to use
+ * @work: work to queue
+ *
+ * Returns 0 if @work was already on a queue, non-zero otherwise.
+ *
+ * We queue the work to a specific CPU
+ */
+int
+queue_work_on(int cpu, struct workqueue_struct *wq, struct work_struct *work)
+{
+	int ret = 0;
+
+	if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work))) {
+		BUG_ON(!list_empty(&work->entry));
+		preempt_disable();
+		__queue_work(wq_per_cpu(wq, cpu), work);
+		preempt_enable();
+		ret = 1;
+	}
+	return ret;
+}
+EXPORT_SYMBOL_GPL(queue_work_on);
+
 static void delayed_work_timer_fn(unsigned long __data)
 {
 	struct delayed_work *dwork = (struct delayed_work *)__data;
@@ -553,6 +579,19 @@
 }
 EXPORT_SYMBOL(schedule_work);
 
+/*
+ * schedule_work_on - put work task on a specific cpu
+ * @cpu: cpu to put the work task on
+ * @work: job to be done
+ *
+ * This puts a job on a specific cpu
+ */
+int schedule_work_on(int cpu, struct work_struct *work)
+{
+	return queue_work_on(cpu, keventd_wq, work);
+}
+EXPORT_SYMBOL(schedule_work_on);
+
 /**
  * schedule_delayed_work - put work task in global workqueue after delay
  * @dwork: job to be done


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/




^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 6/8] Schedule sysrq poweroff on boot cpu
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
                   ` (4 preceding siblings ...)
  2008-07-10  0:03 ` [PATCH -mm 5/8] Introduce new interface schedule_work_on Rafael J. Wysocki
@ 2008-07-10  0:04 ` Rafael J. Wysocki
  2008-07-10 11:36   ` Pavel Machek
  2008-07-10  0:05 ` [PATCH -mm 7/8] ACPI hibernation: Utilize hardware signature Rafael J. Wysocki
  2008-07-10  0:07 ` [PATCH -mm 8/8] ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering Rafael J. Wysocki
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-10  0:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list, Zhang Rui,
	Rus

From: Zhang Rui <rui.zhang@intel.com>
Subject: Schedule sysrq poweroff on boot cpu

schedule sysrq poweroff on boot cpu.

sysrq poweroff needs to disable nonboot cpus, and we need to run this
on boot cpu to avoid any recursion.
http://bugzilla.kernel.org/show_bug.cgi?id=10897

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
tested-by: Rus <harbour@sfinx.od.ua>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 kernel/power/poweroff.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/power/poweroff.c
===================================================================
--- linux-2.6.orig/kernel/power/poweroff.c	2008-06-30 16:01:35.000000000 +0800
+++ linux-2.6/kernel/power/poweroff.c	2008-07-03 10:50:05.000000000 +0800
@@ -25,7 +25,8 @@
 
 static void handle_poweroff(int key, struct tty_struct *tty)
 {
-	schedule_work(&poweroff_work);
+	/* run sysrq poweroff on boot cpu */
+	schedule_work_on(first_cpu(cpu_online_map), &poweroff_work);
 }
 
 static struct sysrq_key_op	sysrq_poweroff_op = {






^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 7/8] ACPI hibernation: Utilize hardware signature
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
                   ` (5 preceding siblings ...)
  2008-07-10  0:04 ` [PATCH -mm 6/8] Schedule sysrq poweroff on boot cpu Rafael J. Wysocki
@ 2008-07-10  0:05 ` Rafael J. Wysocki
  2008-07-10  8:34   ` Pavel Machek
  2008-07-10  0:07 ` [PATCH -mm 8/8] ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering Rafael J. Wysocki
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-10  0:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list, Shaohua Li,
	Andi Kleen

From: Shaohua Li <shaohua.li@intel.com>
Subject: ACPI hibernation: Utilize hardware signature

ACPI defines a hardware signature.  BIOS calculates the signature
according to hardware configure and if hardware changes while
hibernated, the signature will change.  In that case, S4 resume
should fail.

Still, there may be systems on which this mechanism does not work
correctly, so it is better to provide a workaround for them.  For
this reason, add a new switch to the acpi_sleep= command line
argument allowing one to disable hardware signature checking.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 Documentation/kernel-parameters.txt |    4 +++-
 arch/x86/kernel/acpi/sleep.c        |    2 ++
 drivers/acpi/sleep/main.c           |   22 ++++++++++++++++++++++
 include/linux/acpi.h                |    1 +
 4 files changed, 28 insertions(+), 1 deletion(-)

Index: linux-next/drivers/acpi/sleep/main.c
===================================================================
--- linux-next.orig/drivers/acpi/sleep/main.c
+++ linux-next/drivers/acpi/sleep/main.c
@@ -283,6 +283,15 @@ static struct platform_suspend_ops acpi_
 #endif /* CONFIG_SUSPEND */
 
 #ifdef CONFIG_HIBERNATION
+static unsigned long s4_hardware_signature;
+static struct acpi_table_facs *facs;
+static bool nosigcheck;
+
+void __init acpi_no_s4_hw_signature(void)
+{
+	nosigcheck = true;
+}
+
 static int acpi_hibernation_begin(void)
 {
 	acpi_target_sleep_state = ACPI_STATE_S4;
@@ -316,6 +325,12 @@ static void acpi_hibernation_leave(void)
 	acpi_enable();
 	/* Reprogram control registers and execute _BFS */
 	acpi_leave_sleep_state_prep(ACPI_STATE_S4);
+	/* Check the hardware signature */
+	if (facs && s4_hardware_signature != facs->hardware_signature) {
+		printk(KERN_EMERG "ACPI: Hardware changed while hibernated, "
+			"cannot resume!\n");
+		panic("ACPI S4 hardware signature mismatch");
+	}
 }
 
 static void acpi_pm_enable_gpes(void)
@@ -544,6 +559,13 @@ int __init acpi_sleep_init(void)
 			&acpi_hibernation_ops_old : &acpi_hibernation_ops);
 		sleep_states[ACPI_STATE_S4] = 1;
 		printk(" S4");
+		if (!nosigcheck) {
+			acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
+				(struct acpi_table_header **)&facs);
+			if (facs)
+				s4_hardware_signature =
+					facs->hardware_signature;
+		}
 	}
 #endif
 	status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b);
Index: linux-next/Documentation/kernel-parameters.txt
===================================================================
--- linux-next.orig/Documentation/kernel-parameters.txt
+++ linux-next/Documentation/kernel-parameters.txt
@@ -147,10 +147,12 @@ and is between 256 and 4096 characters. 
 			default: 0
 
 	acpi_sleep=	[HW,ACPI] Sleep options
-			Format: { s3_bios, s3_mode, s3_beep, old_ordering }
+			Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, old_ordering }
 			See Documentation/power/video.txt for s3_bios and s3_mode.
 			s3_beep is for debugging; it makes the PC's speaker beep
 			as soon as the kernel's real-mode entry point is called.
+			s4_nohwsig prevents ACPI hardware signature from being
+			used during resume from hibernation.
 			old_ordering causes the ACPI 1.0 ordering of the _PTS
 			control method, wrt putting devices into low power
 			states, to be enforced (the ACPI 2.0 ordering of _PTS is
Index: linux-next/arch/x86/kernel/acpi/sleep.c
===================================================================
--- linux-next.orig/arch/x86/kernel/acpi/sleep.c
+++ linux-next/arch/x86/kernel/acpi/sleep.c
@@ -142,6 +142,8 @@ static int __init acpi_sleep_setup(char 
 			acpi_realmode_flags |= 2;
 		if (strncmp(str, "s3_beep", 7) == 0)
 			acpi_realmode_flags |= 4;
+		if (strncmp(str, "s4_nohwsig", 10) == 0)
+			acpi_no_s4_hw_signature();
 		if (strncmp(str, "old_ordering", 12) == 0)
 			acpi_old_suspend_ordering();
 		str = strchr(str, ',');
Index: linux-next/include/linux/acpi.h
===================================================================
--- linux-next.orig/include/linux/acpi.h
+++ linux-next/include/linux/acpi.h
@@ -236,6 +236,7 @@ int acpi_check_mem_region(resource_size_
 		      const char *name);
 
 #ifdef CONFIG_PM_SLEEP
+void __init acpi_no_s4_hw_signature(void);
 void __init acpi_old_suspend_ordering(void);
 #endif /* CONFIG_PM_SLEEP */
 #else	/* CONFIG_ACPI */


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH -mm 8/8] ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering
  2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
                   ` (6 preceding siblings ...)
  2008-07-10  0:05 ` [PATCH -mm 7/8] ACPI hibernation: Utilize hardware signature Rafael J. Wysocki
@ 2008-07-10  0:07 ` Rafael J. Wysocki
  2008-07-10 11:37   ` Pavel Machek
  7 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2008-07-10  0:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: ACPI Devel Maling List, LKML, Pavel Machek, pm list,
	Carlos Corbacho, Andi Kleen

From: Carlos Corbacho <carlos@strangeworlds.co.uk>
Subject: ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering

There are a few BIOS' that we know of already that need to use the
ACPI 1.0 suspend order. This appears to be only be a small minority of
mostly nVidia based systems.

Based on observation of Windows behaviour, it's clear that Windows is
also doing maintaining its own list of broken hardware that needs this
workaround.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---

 drivers/acpi/sleep/main.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)


Index: linux-next/drivers/acpi/sleep/main.c
===================================================================
--- linux-next.orig/drivers/acpi/sleep/main.c
+++ linux-next/drivers/acpi/sleep/main.c
@@ -280,6 +280,24 @@ static struct platform_suspend_ops acpi_
 	.end = acpi_pm_end,
 	.recover = acpi_pm_finish,
 };
+
+static int __init init_old_suspend_ordering(const struct dmi_system_id *d)
+{
+	old_suspend_ordering = true;
+	return 0;
+}
+
+static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
+	{
+	.callback = init_old_suspend_ordering,
+	.ident = "Abit KN9 (nForce4 variant)",
+	.matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"),
+		DMI_MATCH(DMI_BOARD_NAME, "KN9 Series(NF-CK804)"),
+		},
+	},
+	{},
+};
 #endif /* CONFIG_SUSPEND */
 
 #ifdef CONFIG_HIBERNATION
@@ -531,6 +549,8 @@ int __init acpi_sleep_init(void)
 	u8 type_a, type_b;
 #ifdef CONFIG_SUSPEND
 	int i = 0;
+
+	dmi_check_system(acpisleep_dmi_table);
 #endif
 
 	if (acpi_disabled)


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 7/8] ACPI hibernation: Utilize hardware signature
  2008-07-10  0:05 ` [PATCH -mm 7/8] ACPI hibernation: Utilize hardware signature Rafael J. Wysocki
@ 2008-07-10  8:34   ` Pavel Machek
  0 siblings, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2008-07-10  8:34 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list, Shaohua Li,
	Andi Kleen


> Subject: ACPI hibernation: Utilize hardware signature
> 
> ACPI defines a hardware signature.  BIOS calculates the signature
> according to hardware configure and if hardware changes while
> hibernated, the signature will change.  In that case, S4 resume
> should fail.
> 
> Still, there may be systems on which this mechanism does not work
> correctly, so it is better to provide a workaround for them.  For
> this reason, add a new switch to the acpi_sleep= command line
> argument allowing one to disable hardware signature checking.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 1/8] PM: Add new PM_EVENT codes for runtime power transitions
  2008-07-09 23:55 ` [PATCH -mm 1/8] PM: Add new PM_EVENT codes for runtime power transitions Rafael J. Wysocki
@ 2008-07-10 11:34   ` Pavel Machek
  0 siblings, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2008-07-10 11:34 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list, Alan Stern

On Thu 2008-07-10 01:55:33, Rafael J. Wysocki wrote:
> From: Alan Stern <stern@rowland.harvard.edu>
> Subject: PM: Add new PM_EVENT codes for runtime power transitions
> 
> This patch (as1112) adds some new PM_EVENT_* codes for use by kernel
> subsystems.  They describe runtime power-state transitions of the sort
> already implemented by the USB subsystem.
> 
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 2/8] AHCI: Speed-up resume
  2008-07-09 23:58 ` [PATCH -mm 2/8] AHCI: Speed-up resume Rafael J. Wysocki
@ 2008-07-10 11:34   ` Pavel Machek
  0 siblings, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2008-07-10 11:34 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list, Tejun Heo,
	Zhang Rui, Jeff Garzik

On Thu 2008-07-10 01:58:48, Rafael J. Wysocki wrote:
> From: Zhang Rui <rui.zhang@intel.com>
> Subject: AHCI: Speed-up resume
> 
> During resume, sleep 1 second to wait for the HBA reset
> to finish is a waste of time.
> 
> According to the AHCI 1.2 spec,
> We should poll the HOST_CTL register,
> and return error if the host reset is not
> finished within 1 second.
> 
> Test results show that the HBA reset can be done quickly(in usecs).
> And this patch may save nearly 1 second during resume.
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Acked-by: Tejun Heo <tj@kernel.org>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 3/8] Hibernation: Simplify memory bitmap
  2008-07-10  0:00 ` [PATCH -mm 3/8] Hibernation: Simplify memory bitmap Rafael J. Wysocki
@ 2008-07-10 11:34   ` Pavel Machek
  0 siblings, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2008-07-10 11:34 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list,
	Akinobu Mita

On Thu 2008-07-10 02:00:54, Rafael J. Wysocki wrote:
> From: Akinobu Mita <akinobu.mita@gmail.com>
> Subject: Hibernation: Simplify memory bitmap
> 
> This patch simplifies the memory bitmap manipulations.
> 
> - remove the member size in struct bm_block
> 
> It is not necessary for struct bm_block to have the number of bit chunks
> that can be calculated by using end_pfn and start_pfn.
> 
> - use find_next_bit() for memory_bm_next_pfn
> 
> No need to invent the bitmap library only for the memory bitmap.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 4/8] serio: Speed-up resume
  2008-07-10  0:01 ` [PATCH -mm 4/8] serio: Speed-up resume Rafael J. Wysocki
@ 2008-07-10 11:35   ` Pavel Machek
  2008-07-10 15:11     ` Dmitry Torokhov
  0 siblings, 1 reply; 18+ messages in thread
From: Pavel Machek @ 2008-07-10 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list, Shaohua Li,
	Len Brown, Dmitry Torokhov, jikos

On Thu 2008-07-10 02:01:55, Rafael J. Wysocki wrote:
> From: Shaohua Li <shaohua.li@intel.com>
> Subject: serio: Speed-up resume
> 
> serio_resume will call into psmouse_extensions(). In my test, the
> routine is very slow, it blocks resume about 1 sec. Below patch (move
> resume to kseriod, just like boot time probe) cures the issue in my
> test, and seems no side effect. I'm no familiar with serio driver, so
> please check. 
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> Acked-by: Len Brown <lenb@kernel.org>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Cc: Jiri Kosina <jikos@suse.cz>

ACK from me, but I'm not a serio expert.
								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 5/8] Introduce new interface schedule_work_on
  2008-07-10  0:03 ` [PATCH -mm 5/8] Introduce new interface schedule_work_on Rafael J. Wysocki
@ 2008-07-10 11:36   ` Pavel Machek
  0 siblings, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2008-07-10 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list, Zhang Rui,
	Rus

On Thu 2008-07-10 02:03:26, Rafael J. Wysocki wrote:
> From: Zhang Rui <rui.zhang@intel.com>
> Subject: Introduce new interface schedule_work_on
> 
> This interface allows adding a job on a specific cpu.
> 
> Although a work struct on a cpu will be scheduled to other cpu if the cpu dies,
> there is a recursion if a work task tries to offline the cpu it's running on.
> we need to schedule the task to a specific cpu in this case.
> http://bugzilla.kernel.org/show_bug.cgi?id=10897
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Tested-by: Rus <harbour@sfinx.od.ua>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 6/8] Schedule sysrq poweroff on boot cpu
  2008-07-10  0:04 ` [PATCH -mm 6/8] Schedule sysrq poweroff on boot cpu Rafael J. Wysocki
@ 2008-07-10 11:36   ` Pavel Machek
  0 siblings, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2008-07-10 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list, Zhang Rui,
	Rus

On Thu 2008-07-10 02:04:24, Rafael J. Wysocki wrote:
> From: Zhang Rui <rui.zhang@intel.com>
> Subject: Schedule sysrq poweroff on boot cpu
> 
> schedule sysrq poweroff on boot cpu.
> 
> sysrq poweroff needs to disable nonboot cpus, and we need to run this
> on boot cpu to avoid any recursion.
> http://bugzilla.kernel.org/show_bug.cgi?id=10897
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> tested-by: Rus <harbour@sfinx.od.ua>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 8/8] ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering
  2008-07-10  0:07 ` [PATCH -mm 8/8] ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering Rafael J. Wysocki
@ 2008-07-10 11:37   ` Pavel Machek
  0 siblings, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2008-07-10 11:37 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andrew Morton, ACPI Devel Maling List, LKML, pm list,
	Carlos Corbacho, Andi Kleen

On Thu 2008-07-10 02:07:02, Rafael J. Wysocki wrote:
> From: Carlos Corbacho <carlos@strangeworlds.co.uk>
> Subject: ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering
> 
> There are a few BIOS' that we know of already that need to use the
> ACPI 1.0 suspend order. This appears to be only be a small minority of
> mostly nVidia based systems.
> 
> Based on observation of Windows behaviour, it's clear that Windows is
> also doing maintaining its own list of broken hardware that needs this
> workaround.
> 
> Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH -mm 4/8] serio: Speed-up resume
  2008-07-10 11:35   ` Pavel Machek
@ 2008-07-10 15:11     ` Dmitry Torokhov
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Torokhov @ 2008-07-10 15:11 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Rafael J. Wysocki, Andrew Morton, ACPI Devel Maling List, LKML,
	pm list, Shaohua Li, Len Brown, jikos

On Thu, Jul 10, 2008 at 01:35:35PM +0200, Pavel Machek wrote:
> On Thu 2008-07-10 02:01:55, Rafael J. Wysocki wrote:
> > From: Shaohua Li <shaohua.li@intel.com>
> > Subject: serio: Speed-up resume
> > 
> > serio_resume will call into psmouse_extensions(). In my test, the
> > routine is very slow, it blocks resume about 1 sec. Below patch (move
> > resume to kseriod, just like boot time probe) cures the issue in my
> > test, and seems no side effect. I'm no familiar with serio driver, so
> > please check. 
> > 
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > Acked-by: Len Brown <lenb@kernel.org>
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Cc: Jiri Kosina <jikos@suse.cz>
> 
> ACK from me, but I'm not a serio expert.
> 								Pavel

I think the patch makes sense, maybe it will even help with resume in
general when we fail to resume for some reason and then when they reload
drivers after the system is fully up it magically starts workign again.
It is in my 'master' branch from which Andrew is pulling into -mm. I
will let it sit there for a bit though.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-07-10 15:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-09 23:52 [PATCH -mm 0/8] PM patches for 2.6.27 Rafael J. Wysocki
2008-07-09 23:55 ` [PATCH -mm 1/8] PM: Add new PM_EVENT codes for runtime power transitions Rafael J. Wysocki
2008-07-10 11:34   ` Pavel Machek
2008-07-09 23:58 ` [PATCH -mm 2/8] AHCI: Speed-up resume Rafael J. Wysocki
2008-07-10 11:34   ` Pavel Machek
2008-07-10  0:00 ` [PATCH -mm 3/8] Hibernation: Simplify memory bitmap Rafael J. Wysocki
2008-07-10 11:34   ` Pavel Machek
2008-07-10  0:01 ` [PATCH -mm 4/8] serio: Speed-up resume Rafael J. Wysocki
2008-07-10 11:35   ` Pavel Machek
2008-07-10 15:11     ` Dmitry Torokhov
2008-07-10  0:03 ` [PATCH -mm 5/8] Introduce new interface schedule_work_on Rafael J. Wysocki
2008-07-10 11:36   ` Pavel Machek
2008-07-10  0:04 ` [PATCH -mm 6/8] Schedule sysrq poweroff on boot cpu Rafael J. Wysocki
2008-07-10 11:36   ` Pavel Machek
2008-07-10  0:05 ` [PATCH -mm 7/8] ACPI hibernation: Utilize hardware signature Rafael J. Wysocki
2008-07-10  8:34   ` Pavel Machek
2008-07-10  0:07 ` [PATCH -mm 8/8] ACPI PM: Add DMI quirk list for ACPI 1.0 suspend ordering Rafael J. Wysocki
2008-07-10 11:37   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox