linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ACPI patches for 2.6.25-rc7
@ 2008-03-26  5:13 Len Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Len Brown @ 2008-03-26  5:13 UTC (permalink / raw)
  To: linux-acpi

Here is the queue for 2.6.25-rc7

thanks,
-Len



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

* ACPI patches for 2.6.25-rc7
@ 2008-03-27  6:51 Len Brown
  2008-03-28 13:59 ` [patch] revert: "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0" Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Len Brown @ 2008-03-27  6:51 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, linux-acpi, linux-kernel, linux-pm

Hi Linus,

please pull from: 

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git release

Note that I generated the diffstat below with
git diff -b -M --stat linus..release

I've not used "-b" until now.  I added it because Julia's patch was simple,
but since it changed indenting of a couple of blocks its diffstat was otherwise large.

thanks!

-Len

ps. individual patches are available on linux-acpi@vger.kernel.org
and a consolidated plain patch is available here:
ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.25/acpi-release-20070126-2.6.25-rc7.diff.gz

 drivers/acpi/fan.c             |    2 --
 drivers/acpi/processor_core.c  |    2 --
 drivers/acpi/processor_idle.c  |    5 ++++-
 drivers/acpi/sbshc.c           |    1 -
 drivers/acpi/scan.c            |   16 +++++++++++-----
 drivers/acpi/video.c           |    2 --
 drivers/cpuidle/cpuidle.c      |    4 ++--
 drivers/cpuidle/sysfs.c        |   10 ++++++++--
 drivers/pnp/pnpacpi/rsparser.c |    8 ++++----
 include/linux/cpuidle.h        |    4 ++--
 10 files changed, 31 insertions(+), 23 deletions(-)

through these commits:

Alexey Starikovskiy (1):
      ACPI: SBS: remove typo from sbchc.c

Julia Lawall (1):
      ACPI: drivers/acpi: elide a non-zero test on a result that is never 0

Len Brown (1):
      pnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..."

Venki Pallipadi (2):
      ACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry
      cpuidle: fix 100% C0 statistics regression

Yi Yang (1):
      cpuidle: fix cpuidle time and usage overflow

Zhang Rui (1):
      ACPI: fix a regression of ACPI device driver autoloading

with this log:

commit 1192aeb957402b45f311895f124e4ca41206843c
Author: Julia Lawall <julia@diku.dk>
Date:   Thu Mar 27 01:48:22 2008 -0400

    ACPI: drivers/acpi: elide a non-zero test on a result that is never 0
    
    The function thermal_cooling_device_register always returns either a valid
    pointer or a value made with ERR_PTR, so a test for non-zero on the result
    will always succeed.
    
    The problem was found using the following semantic match.
    (http://www.emn.fr/x-info/coccinelle/)
    
    //<smpl>
    @a@
    expression E, E1;
    statement S,S1;
    position p;
    @@
    
    E = thermal_cooling_device_register(...)
    ... when != E = E1
    if@p (E) S else S1
    
    @n@
    position a.p;
    expression E,E1;
    statement S,S1;
    @@
    
    E = NULL
    ... when != E = E1
    if@p (E) S else S1
    
    @depends on !n@
    expression E;
    statement S,S1;
    position a.p;
    @@
    
    * if@p (E)
      S else S1
    //</smpl>
    
    Signed-off-by: Julia Lawall <julia@diku.dk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Len Brown <len.brown@intel.com>

commit 86d9fc1293aa9456677eab94e9fd2d3a10920548
Merge: 08dcf29... 8e92b66... 33fd7af... 7642d21... 5c9fcb5...
Author: Len Brown <len.brown@intel.com>
Date:   Wed Mar 26 22:50:09 2008 -0400

    Merge branches 'release', 'idle', 'redhat-bugzilla-436589', 'sbs' and 'video' into release

commit 33fd7afd66ffdc6addf1b085fe6403b6af532f8e
Author: Len Brown <len.brown@intel.com>
Date:   Wed Mar 26 13:29:32 2008 -0400

    pnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..."
    
    We have been printing these messages at KERN_ERR since 2.6.24,
    per http://bugzilla.kernel.org/show_bug.cgi?id=9535
    
    But KERN_ERR pops up on a console booted with "quiet"
    and causes users to get alarmed and file bugs
    about the message itself:
    https://bugzilla.redhat.com/show_bug.cgi?id=436589
    
    So reduce the severity of these messages to
    KERN_WARNING, which is not printed by "quiet".
    
    This message will still be seen without "quiet",
    but a lot of messages are printed in that mode
    and it will be less likely to cause undue alarm.
    
    We could go all the way to KERN_DEBUG, but this
    is a real warning after all, so it seems prudent
    not to require "debug" to see it.
    
    Signed-off-by: Len Brown <len.brown@intel.com>

commit 8e92b6605da989c0aa8ff7e33306f36f0efd957c
Author: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Date:   Fri Feb 29 10:24:32 2008 -0800

    cpuidle: fix 100% C0 statistics regression
    
    commit 9b12e18cdc1553de62d931e73443c806347cd974
    'ACPI: cpuidle: Support C1 idle time accounting'
    was implicated in a 100% C0 idle regression.
    http://bugzilla.kernel.org/show_bug.cgi?id=10076
    
    It pointed out a potential problem where the menu governor
    may get confused by the C-state residency time from poll
    idle or C1 idle, where this timing info is not accurate.
    This inaccuracy is due to interrupts being handled
    before we account for C-state exit.
    
    Do not mark TIME_VALID for CO poll state.
    Mark C1 time as valid only with the MWAIT (CSTATE_FFH) entry method.
    
    This makes governors use the timing information only when it is correct and
    eliminates any wrong policy decisions that may result from invalid timing
    information.
    
    Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
    Signed-off-by: Len Brown <len.brown@intel.com>

commit 8b78cf602fd3bd97c0080edd22fe8fd5d0fa7832
Author: Yi Yang <yi.y.yang@intel.com>
Date:   Mon Feb 25 08:46:12 2008 +0800

    cpuidle: fix cpuidle time and usage overflow
    
    cpuidle C-state sysfs node time and usage are very easy to overflow because
    they are all of unsigned int type, time will overflow within about two hours,
    usage will take longer time to overflow, but they are increasing for ever.
    
    This patch will convert them to unsigned long long.
    
    Signed-off-by: Yi Yang <yi.y.yang@intel.com>
    Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
    Signed-off-by: Len Brown <len.brown@intel.com>

commit 996520c1fdd2948addb629be56c9febf2967e02b
Author: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Date:   Mon Mar 24 14:24:10 2008 -0700

    ACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry
    
    This original patch
    http://ussg.iu.edu/hypermail/linux/kernel/0712.2/1451.html
    was intending to add acpi_unlazy_tlb() to acpi_idle_enter_bm(),
    which is used for C3 entry.
    
    But it was merged incorrectly as commmit
    
    bde6f5f59c2b2b48a7a849c129d5b48838fe77ee
    'x86: voluntary leave_mm before entering ACPI C3'
    
    so the call was instead added to acpi_idle_enter_simple()
    (which is C2 entry routine), probably due to identical
    context in that function.
    
    Move the call back to acpi_idle_enter_bm().
    
    Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
    Signed-off-by: Len Brown <len.brown@intel.com>

commit 5c9fcb5deef4d3a49798d76c48b726d2e3c7df72
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Thu Mar 20 16:40:32 2008 +0800

    ACPI: fix a regression of ACPI device driver autoloading
    
    commit 3620f2f2f39e7870cf1a4fb2e34063a142f28716 sets the cid of
    ACPI video/dock/bay device and leaves the hid empty.
    As a result, "modalias" should export the cid for
    devices which don't have a hid.
    
    ACPI Video driver is not autoloaded with
    commit 3620f2f2f39e7870cf1a4fb2e34063a142f28716 applied.
    "cat /sys/.../device:03(acpi video bus)/modalias" shows nothing.
    
    ACPI Video driver is autoloaded after revert that commit.
    "cat /sys/.../LNXVIDEO:0x/modalias" shows "acpi:LNXVIDEO:"
    
    ACPI Video driver is autoloaded with commit
    3620f2f2f39e7870cf1a4fb2e34063a142f28716 and this patch applied.
    "cat /sys/.../device:03(acpi video bus)/modalias"
    shows "acpi:LNXVIDEO:"
    
    Signed-off-by: Zhang Rui <rui.zhang@intel.com>
    Acked-by: Thomas Renninger <trenn@suse.de>
    Signed-off-by: Len Brown <len.brown@intel.com>

commit 7642d2113098f1270e9f9f0120f44d0035091636
Author: Alexey Starikovskiy <astarikovskiy@suse.de>
Date:   Thu Feb 28 19:17:39 2008 +0300

    ACPI: SBS: remove typo from sbchc.c
    
    Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
    Signed-off-by: Len Brown <len.brown@intel.com>

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

* [patch] revert: "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0"
  2008-03-27  6:51 ACPI patches for 2.6.25-rc7 Len Brown
@ 2008-03-28 13:59 ` Ingo Molnar
  2008-03-28 14:10   ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2008-03-28 13:59 UTC (permalink / raw)
  To: Len Brown
  Cc: Linus Torvalds, Andrew Morton, linux-acpi, linux-kernel, linux-pm,
	Julia Lawall


* Len Brown <lenb@kernel.org> wrote:

> I've not used "-b" until now.  I added it because Julia's patch was 
> simple, but since it changed indenting of a couple of blocks its 
> diffstat was otherwise large.

> Julia Lawall (1):
>       ACPI: drivers/acpi: elide a non-zero test on a result that is never 0

overnight randconfig qa on x86.git/latest triggered a bootup crash after 
just 7 iterations, which i bisected down to the commit above. Find the 
revert below.

Observation: the patch was just 3 days old when it went upstream and 
given that it touches 50 lines of code executed on most PC hardware 
during bootup so i dont think it was in the trivial category.

Even if the fix is right (which is does look to be at first sight), 
there's clearly some side-effect here and the whitespace changes mixed 
into the functional changes make it hard to validate this change.

now that i had a second look, one side-effect seems to be:

+		acpi_driver_data(device) = cdev;

this used to be executed before even with a NULL cdev and isnt executed 
now. (In any case, the revert below is the right thing to do i believe, 
the patch should have its clock reset and should restart its testing 
cycle at the tail of the development queue.)

	Ingo

---------------------->
Subject: revert "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0"
From: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 28 14:28:03 CET 2008

revert:

    ACPI: drivers/acpi: elide a non-zero test on a result that is never 0

as randconfig testing found that it causes a crash during bootup:

initcall 0x78878534 ran for 13 msecs: acpi_button_init+0x0/0x51()
Calling initcall 0x78878585: acpi_fan_init+0x0/0x2c()
BUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<782b8ad0>] acpi_fan_add+0x7d/0xfd
*pde = 00000000
Oops: 0000 [#1]
Modules linked in:

Pid: 1, comm: swapper Not tainted (2.6.25-rc7-sched-devel.git-x86-latest.git #14)
EIP: 0060:[<782b8ad0>] EFLAGS: 00010246 CPU: 0
EIP is at acpi_fan_add+0x7d/0xfd
EAX: b787c718 EBX: b787c400 ECX: b782ceb4 EDX: 00000007
ESI: 00000000 EDI: b787c6f4 EBP: b782cee0 ESP: b782cecc
 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Process swapper (pid: 1, ti=b782c000 task=b7846000 task.ti=b782c000)
Stack: b787c459 00000000 b787c400 78790888 b787c60c b782cef8 782b6fb8 ffffffda
       b787c60c 00000000 78790958 b782cf0c 783005d7 b787c60c 78790958 78790584
       b782cf1c 783007f6 b782cf28 00000000 b782cf40 782ffc4a 78790958 b794d558
Call Trace:
 [<782b6fb8>] ? acpi_device_probe+0x3e/0xdb
 [<783005d7>] ? driver_probe_device+0x82/0xfc
 [<783007f6>] ? __driver_attach+0x3a/0x70
 [<782ffc4a>] ? bus_for_each_dev+0x3e/0x60
 [<7830048c>] ? driver_attach+0x14/0x16
 [<783007bc>] ? __driver_attach+0x0/0x70
 [<7830006a>] ? bus_add_driver+0x9d/0x1b0
 [<783008c3>] ? driver_register+0x47/0xa3
 [<7813db00>] ? timespec_to_ktime+0x9/0xc
 [<782b7331>] ? acpi_bus_register_driver+0x3a/0x3c
 [<78878592>] ? acpi_fan_init+0xd/0x2c
 [<78863656>] ? kernel_init+0xac/0x1f9
 [<788635aa>] ? kernel_init+0x0/0x1f9
 [<78114563>] ? kernel_thread_helper+0x7/0x10
 =======================
Code: 6e 78 e8 57 44 e7 ff 58 e9 93 00 00 00 8b 55 f0 8d bb f4 02 00 00 80 4b 2d 10 8b 03 e8 87 cb ff ff 8d 83 18 03 00 00 80 63 2d ef <ff> 35 00 00 00 00 50 68 e8 9c 6e 78 e8 22 44 e7 ff b9 b6 9c 6e
EIP: [<782b8ad0>] acpi_fan_add+0x7d/0xfd SS:ESP 0068:b782cecc
---[ end trace 778e504de7e3b1e3 ]---
Kernel panic - not syncing: Attempted to kill init!

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/acpi/fan.c            |   34 ++++++++++++++++++----------------
 drivers/acpi/processor_core.c |   30 ++++++++++++++++--------------
 drivers/acpi/video.c          |   28 +++++++++++++++-------------
 3 files changed, 49 insertions(+), 43 deletions(-)

Index: linux-x86.q/drivers/acpi/fan.c
===================================================================
--- linux-x86.q.orig/drivers/acpi/fan.c
+++ linux-x86.q/drivers/acpi/fan.c
@@ -260,22 +260,24 @@ static int acpi_fan_add(struct acpi_devi
 		result = PTR_ERR(cdev);
 		goto end;
 	}
-	printk(KERN_INFO PREFIX
-		"%s is registered as cooling_device%d\n",
-		device->dev.bus_id, cdev->id);
-
-	acpi_driver_data(device) = cdev;
-	result = sysfs_create_link(&device->dev.kobj,
-				   &cdev->device.kobj,
-				   "thermal_cooling");
-	if (result)
-		return result;
-
-	result = sysfs_create_link(&cdev->device.kobj,
-				   &device->dev.kobj,
-				   "device");
-	if (result)
-		return result;
+	if (cdev) {
+		printk(KERN_INFO PREFIX
+			"%s is registered as cooling_device%d\n",
+			device->dev.bus_id, cdev->id);
+
+		acpi_driver_data(device) = cdev;
+		result = sysfs_create_link(&device->dev.kobj,
+					   &cdev->device.kobj,
+					   "thermal_cooling");
+		if (result)
+			return result;
+
+		result = sysfs_create_link(&cdev->device.kobj,
+					   &device->dev.kobj,
+					   "device");
+		if (result)
+			return result;
+	}
 
 	result = acpi_fan_add_fs(device);
 	if (result)
Index: linux-x86.q/drivers/acpi/processor_core.c
===================================================================
--- linux-x86.q.orig/drivers/acpi/processor_core.c
+++ linux-x86.q/drivers/acpi/processor_core.c
@@ -674,20 +674,22 @@ static int __cpuinit acpi_processor_star
 		result = PTR_ERR(pr->cdev);
 		goto end;
 	}
-	printk(KERN_INFO PREFIX
-		"%s is registered as cooling_device%d\n",
-		device->dev.bus_id, pr->cdev->id);
-
-	result = sysfs_create_link(&device->dev.kobj,
-				   &pr->cdev->device.kobj,
-				   "thermal_cooling");
-	if (result)
-		return result;
-	result = sysfs_create_link(&pr->cdev->device.kobj,
-				   &device->dev.kobj,
-				   "device");
-	if (result)
-		return result;
+	if (pr->cdev) {
+		printk(KERN_INFO PREFIX
+			"%s is registered as cooling_device%d\n",
+			device->dev.bus_id, pr->cdev->id);
+
+		result = sysfs_create_link(&device->dev.kobj,
+					   &pr->cdev->device.kobj,
+					   "thermal_cooling");
+		if (result)
+			return result;
+		result = sysfs_create_link(&pr->cdev->device.kobj,
+					   &device->dev.kobj,
+					   "device");
+		if (result)
+			return result;
+	}
 
 	if (pr->flags.throttling) {
 		printk(KERN_INFO PREFIX "%s [%s] (supports",
Index: linux-x86.q/drivers/acpi/video.c
===================================================================
--- linux-x86.q.orig/drivers/acpi/video.c
+++ linux-x86.q/drivers/acpi/video.c
@@ -734,19 +734,21 @@ static void acpi_video_device_find_cap(s
 		if (IS_ERR(device->cdev))
 			return;
 
-		printk(KERN_INFO PREFIX
-			"%s is registered as cooling_device%d\n",
-			device->dev->dev.bus_id, device->cdev->id);
-		result = sysfs_create_link(&device->dev->dev.kobj,
-				  &device->cdev->device.kobj,
-				  "thermal_cooling");
-		if (result)
-			printk(KERN_ERR PREFIX "Create sysfs link\n");
-		result = sysfs_create_link(&device->cdev->device.kobj,
-				  &device->dev->dev.kobj,
-				  "device");
-		if (result)
-			printk(KERN_ERR PREFIX "Create sysfs link\n");
+		if (device->cdev) {
+			printk(KERN_INFO PREFIX
+				"%s is registered as cooling_device%d\n",
+				device->dev->dev.bus_id, device->cdev->id);
+			result = sysfs_create_link(&device->dev->dev.kobj,
+					  &device->cdev->device.kobj,
+					  "thermal_cooling");
+			if (result)
+				printk(KERN_ERR PREFIX "Create sysfs link\n");
+			result = sysfs_create_link(&device->cdev->device.kobj,
+					  &device->dev->dev.kobj,
+					  "device");
+                        if (result)
+				printk(KERN_ERR PREFIX "Create sysfs link\n");
+		}
 	}
 	if (device->cap._DCS && device->cap._DSS){
 		static int count = 0;

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

* Re: [patch] revert: "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0"
  2008-03-28 13:59 ` [patch] revert: "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0" Ingo Molnar
@ 2008-03-28 14:10   ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2008-03-28 14:10 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Len Brown, Linus Torvalds, Andrew Morton, linux-acpi,
	linux-kernel, linux-pm, rui.zhang

Zhang Rui already found the problem with the patch.

The calling context has to cope with both the results of the normal
definition of the function and a definition in a header file that returns
a completely different kind of result.

Sorry for not having studied the issue more thoroughly in the beginning.

julia


On Fri, 28 Mar 2008, Ingo Molnar wrote:

>
> * Len Brown <lenb@kernel.org> wrote:
>
> > I've not used "-b" until now.  I added it because Julia's patch was
> > simple, but since it changed indenting of a couple of blocks its
> > diffstat was otherwise large.
>
> > Julia Lawall (1):
> >       ACPI: drivers/acpi: elide a non-zero test on a result that is never 0
>
> overnight randconfig qa on x86.git/latest triggered a bootup crash after
> just 7 iterations, which i bisected down to the commit above. Find the
> revert below.
>
> Observation: the patch was just 3 days old when it went upstream and
> given that it touches 50 lines of code executed on most PC hardware
> during bootup so i dont think it was in the trivial category.
>
> Even if the fix is right (which is does look to be at first sight),
> there's clearly some side-effect here and the whitespace changes mixed
> into the functional changes make it hard to validate this change.
>
> now that i had a second look, one side-effect seems to be:
>
> +		acpi_driver_data(device) = cdev;
>
> this used to be executed before even with a NULL cdev and isnt executed
> now. (In any case, the revert below is the right thing to do i believe,
> the patch should have its clock reset and should restart its testing
> cycle at the tail of the development queue.)
>
> 	Ingo
>
> ---------------------->
> Subject: revert "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0"
> From: Ingo Molnar <mingo@elte.hu>
> Date: Fri Mar 28 14:28:03 CET 2008
>
> revert:
>
>     ACPI: drivers/acpi: elide a non-zero test on a result that is never 0
>
> as randconfig testing found that it causes a crash during bootup:
>
> initcall 0x78878534 ran for 13 msecs: acpi_button_init+0x0/0x51()
> Calling initcall 0x78878585: acpi_fan_init+0x0/0x2c()
> BUG: unable to handle kernel NULL pointer dereference at 00000000
> IP: [<782b8ad0>] acpi_fan_add+0x7d/0xfd
> *pde = 00000000
> Oops: 0000 [#1]
> Modules linked in:
>
> Pid: 1, comm: swapper Not tainted (2.6.25-rc7-sched-devel.git-x86-latest.git #14)
> EIP: 0060:[<782b8ad0>] EFLAGS: 00010246 CPU: 0
> EIP is at acpi_fan_add+0x7d/0xfd
> EAX: b787c718 EBX: b787c400 ECX: b782ceb4 EDX: 00000007
> ESI: 00000000 EDI: b787c6f4 EBP: b782cee0 ESP: b782cecc
>  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
> Process swapper (pid: 1, ti=b782c000 task=b7846000 task.ti=b782c000)
> Stack: b787c459 00000000 b787c400 78790888 b787c60c b782cef8 782b6fb8 ffffffda
>        b787c60c 00000000 78790958 b782cf0c 783005d7 b787c60c 78790958 78790584
>        b782cf1c 783007f6 b782cf28 00000000 b782cf40 782ffc4a 78790958 b794d558
> Call Trace:
>  [<782b6fb8>] ? acpi_device_probe+0x3e/0xdb
>  [<783005d7>] ? driver_probe_device+0x82/0xfc
>  [<783007f6>] ? __driver_attach+0x3a/0x70
>  [<782ffc4a>] ? bus_for_each_dev+0x3e/0x60
>  [<7830048c>] ? driver_attach+0x14/0x16
>  [<783007bc>] ? __driver_attach+0x0/0x70
>  [<7830006a>] ? bus_add_driver+0x9d/0x1b0
>  [<783008c3>] ? driver_register+0x47/0xa3
>  [<7813db00>] ? timespec_to_ktime+0x9/0xc
>  [<782b7331>] ? acpi_bus_register_driver+0x3a/0x3c
>  [<78878592>] ? acpi_fan_init+0xd/0x2c
>  [<78863656>] ? kernel_init+0xac/0x1f9
>  [<788635aa>] ? kernel_init+0x0/0x1f9
>  [<78114563>] ? kernel_thread_helper+0x7/0x10
>  =======================
> Code: 6e 78 e8 57 44 e7 ff 58 e9 93 00 00 00 8b 55 f0 8d bb f4 02 00 00 80 4b 2d 10 8b 03 e8 87 cb ff ff 8d 83 18 03 00 00 80 63 2d ef <ff> 35 00 00 00 00 50 68 e8 9c 6e 78 e8 22 44 e7 ff b9 b6 9c 6e
> EIP: [<782b8ad0>] acpi_fan_add+0x7d/0xfd SS:ESP 0068:b782cecc
> ---[ end trace 778e504de7e3b1e3 ]---
> Kernel panic - not syncing: Attempted to kill init!
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  drivers/acpi/fan.c            |   34 ++++++++++++++++++----------------
>  drivers/acpi/processor_core.c |   30 ++++++++++++++++--------------
>  drivers/acpi/video.c          |   28 +++++++++++++++-------------
>  3 files changed, 49 insertions(+), 43 deletions(-)
>
> Index: linux-x86.q/drivers/acpi/fan.c
> ===================================================================
> --- linux-x86.q.orig/drivers/acpi/fan.c
> +++ linux-x86.q/drivers/acpi/fan.c
> @@ -260,22 +260,24 @@ static int acpi_fan_add(struct acpi_devi
>  		result = PTR_ERR(cdev);
>  		goto end;
>  	}
> -	printk(KERN_INFO PREFIX
> -		"%s is registered as cooling_device%d\n",
> -		device->dev.bus_id, cdev->id);
> -
> -	acpi_driver_data(device) = cdev;
> -	result = sysfs_create_link(&device->dev.kobj,
> -				   &cdev->device.kobj,
> -				   "thermal_cooling");
> -	if (result)
> -		return result;
> -
> -	result = sysfs_create_link(&cdev->device.kobj,
> -				   &device->dev.kobj,
> -				   "device");
> -	if (result)
> -		return result;
> +	if (cdev) {
> +		printk(KERN_INFO PREFIX
> +			"%s is registered as cooling_device%d\n",
> +			device->dev.bus_id, cdev->id);
> +
> +		acpi_driver_data(device) = cdev;
> +		result = sysfs_create_link(&device->dev.kobj,
> +					   &cdev->device.kobj,
> +					   "thermal_cooling");
> +		if (result)
> +			return result;
> +
> +		result = sysfs_create_link(&cdev->device.kobj,
> +					   &device->dev.kobj,
> +					   "device");
> +		if (result)
> +			return result;
> +	}
>
>  	result = acpi_fan_add_fs(device);
>  	if (result)
> Index: linux-x86.q/drivers/acpi/processor_core.c
> ===================================================================
> --- linux-x86.q.orig/drivers/acpi/processor_core.c
> +++ linux-x86.q/drivers/acpi/processor_core.c
> @@ -674,20 +674,22 @@ static int __cpuinit acpi_processor_star
>  		result = PTR_ERR(pr->cdev);
>  		goto end;
>  	}
> -	printk(KERN_INFO PREFIX
> -		"%s is registered as cooling_device%d\n",
> -		device->dev.bus_id, pr->cdev->id);
> -
> -	result = sysfs_create_link(&device->dev.kobj,
> -				   &pr->cdev->device.kobj,
> -				   "thermal_cooling");
> -	if (result)
> -		return result;
> -	result = sysfs_create_link(&pr->cdev->device.kobj,
> -				   &device->dev.kobj,
> -				   "device");
> -	if (result)
> -		return result;
> +	if (pr->cdev) {
> +		printk(KERN_INFO PREFIX
> +			"%s is registered as cooling_device%d\n",
> +			device->dev.bus_id, pr->cdev->id);
> +
> +		result = sysfs_create_link(&device->dev.kobj,
> +					   &pr->cdev->device.kobj,
> +					   "thermal_cooling");
> +		if (result)
> +			return result;
> +		result = sysfs_create_link(&pr->cdev->device.kobj,
> +					   &device->dev.kobj,
> +					   "device");
> +		if (result)
> +			return result;
> +	}
>
>  	if (pr->flags.throttling) {
>  		printk(KERN_INFO PREFIX "%s [%s] (supports",
> Index: linux-x86.q/drivers/acpi/video.c
> ===================================================================
> --- linux-x86.q.orig/drivers/acpi/video.c
> +++ linux-x86.q/drivers/acpi/video.c
> @@ -734,19 +734,21 @@ static void acpi_video_device_find_cap(s
>  		if (IS_ERR(device->cdev))
>  			return;
>
> -		printk(KERN_INFO PREFIX
> -			"%s is registered as cooling_device%d\n",
> -			device->dev->dev.bus_id, device->cdev->id);
> -		result = sysfs_create_link(&device->dev->dev.kobj,
> -				  &device->cdev->device.kobj,
> -				  "thermal_cooling");
> -		if (result)
> -			printk(KERN_ERR PREFIX "Create sysfs link\n");
> -		result = sysfs_create_link(&device->cdev->device.kobj,
> -				  &device->dev->dev.kobj,
> -				  "device");
> -		if (result)
> -			printk(KERN_ERR PREFIX "Create sysfs link\n");
> +		if (device->cdev) {
> +			printk(KERN_INFO PREFIX
> +				"%s is registered as cooling_device%d\n",
> +				device->dev->dev.bus_id, device->cdev->id);
> +			result = sysfs_create_link(&device->dev->dev.kobj,
> +					  &device->cdev->device.kobj,
> +					  "thermal_cooling");
> +			if (result)
> +				printk(KERN_ERR PREFIX "Create sysfs link\n");
> +			result = sysfs_create_link(&device->cdev->device.kobj,
> +					  &device->dev->dev.kobj,
> +					  "device");
> +                        if (result)
> +				printk(KERN_ERR PREFIX "Create sysfs link\n");
> +		}
>  	}
>  	if (device->cap._DCS && device->cap._DSS){
>  		static int count = 0;
>

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

end of thread, other threads:[~2008-03-28 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-27  6:51 ACPI patches for 2.6.25-rc7 Len Brown
2008-03-28 13:59 ` [patch] revert: "ACPI: drivers/acpi: elide a non-zero test on a result that is never 0" Ingo Molnar
2008-03-28 14:10   ` Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2008-03-26  5:13 ACPI patches for 2.6.25-rc7 Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).