lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Mar 2007 17:33:15 -0700
From:	Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Larry Finger <larry.finger@...inger.net>,
	LKML <linux-kernel@...r.kernel.org>,
	Len Brown <len.brown@...el.com>, linux-acpi@...r.kernel.org
Subject: Re: 2.6.21-rc4-mm1 - problem with cpuidle routine

On Wed, Mar 21, 2007 at 01:38:15PM -0700, Andrew Morton wrote:
> On Wed, 21 Mar 2007 13:49:58 -0500
> Larry Finger <larry.finger@...inger.net> wrote:
> 
> > When I configure 'CPU Idle PM Support' on my HP dv2125nr notebook with a Turion X64 X2 processor and
> > X86_64 architecture selected, the computer freezes on bootup. I have included a portion the
> > configuration file and part of /var/log/boot.msg for my working system. Please let me know if
> > further info from my system is required. I would be happy to test any patches, etc.
> > 
> > Larry
> > 
> > ==============================================================
> > 
> > The console log ends with the following entries:
> > 
> > ACPI: Processor [CPU0] (supports 8 throttling states)
> > ACPI: Processor [CPU1] (supports 8 throttling states)
> > cpuidle: driver acpi_idle failed to attach to cpu 0
> > cpuidle: driver acpi_idle failed to attach to cpu 0
> > cpuidle: using driver acpi_idle
> > Loading thermal
> > 
> > At this point, the system hangs.
> > 
> > =================================================
> > 
> > The beginning section of my .config is as follows:
> > 
> 
> Thanks.   Cc's added..

Patch below resolves this issue.


Patch for cpuidle boot hang reported by Larry Finger here.
http://www.ussg.iu.edu/hypermail/linux/kernel/0703.2/2025.html

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>

Index: new/drivers/cpuidle/cpuidle.c
===================================================================
--- new.orig/drivers/cpuidle/cpuidle.c	2007-03-21 14:25:11.000000000 -0800
+++ new/drivers/cpuidle/cpuidle.c	2007-03-21 14:25:33.000000000 -0800
@@ -119,6 +119,7 @@
 
 	dev = &per_cpu(cpuidle_devices, cpu);
 
+	dev->cpu = cpu;
 	mutex_lock(&cpuidle_lock);
 	if (cpu_is_offline(cpu)) {
 		mutex_unlock(&cpuidle_lock);
@@ -129,15 +130,26 @@
 		mutex_unlock(&cpuidle_lock);
 		return 0;
 	}
-	dev->status |= CPUIDLE_STATUS_DETECTED;
-	list_add(&dev->device_list, &cpuidle_detected_devices);
-	cpuidle_add_sysfs(sys_dev);
-	if (cpuidle_curr_driver)
-		cpuidle_attach_driver(dev);
-	if (cpuidle_curr_governor)
-		cpuidle_attach_governor(dev);
+	if (cpuidle_curr_driver) {
+		if (cpuidle_attach_driver(dev))
+			goto err_ret;
+	}
+		
+	if (cpuidle_curr_governor) {
+		if (cpuidle_attach_governor(dev)) {
+			cpuidle_detach_driver(dev);
+			goto err_ret;
+		}
+	}
+
 	if (cpuidle_device_can_idle(dev))
 		cpuidle_install_idle_handler();
+
+	list_add(&dev->device_list, &cpuidle_detected_devices);
+	cpuidle_add_sysfs(sys_dev);
+	dev->status |= CPUIDLE_STATUS_DETECTED;
+
+err_ret:
 	mutex_unlock(&cpuidle_lock);
 
 	return 0;
Index: new/drivers/cpuidle/driver.c
===================================================================
--- new.orig/drivers/cpuidle/driver.c	2007-03-21 14:25:15.000000000 -0800
+++ new/drivers/cpuidle/driver.c	2007-03-21 14:25:53.000000000 -0800
@@ -37,7 +37,7 @@
 	ret = cpuidle_curr_driver->init(dev);
 	if (ret) {
 		module_put(cpuidle_curr_driver->owner);
-		printk(KERN_ERROR "cpuidle: driver %s failed to attach to cpu %d\n",
+		printk(KERN_INFO "cpuidle: driver %s failed to attach to cpu %d\n",
 			cpuidle_curr_driver->name, dev->cpu);
 	} else {
 		if (dev->status & CPUIDLE_STATUS_GOVERNOR_ATTACHED)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ