Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] cpufreq: return EEXIST instead of EBUSY for second registering
@ 2013-09-19  4:05 Yinghai Lu
  2013-09-19  4:08 ` Viresh Kumar
  0 siblings, 1 reply; 10+ messages in thread
From: Yinghai Lu @ 2013-09-19  4:05 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: cpufreq, linux-pm, linux-kernel, Yinghai Lu

System that cpu support intel_pstate, acpi_cpufreq fail to
load, and udev keep trying until trace get filled up and
kernel crash.

The root cause is driver return ret from cpufreq_register_driver
and when some other driver take over before, it would return
EBUSY, then udev will keep trying...

cpufreq_register_driver should return EEXIST instead.
then system could boot without appending intel_pstate=disable
and still use intel_pstate.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/cpufreq/cpufreq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-2.6.orig/drivers/cpufreq/cpufreq.c
+++ linux-2.6/drivers/cpufreq/cpufreq.c
@@ -2104,7 +2104,7 @@ int cpufreq_register_driver(struct cpufr
 	write_lock_irqsave(&cpufreq_driver_lock, flags);
 	if (cpufreq_driver) {
 		write_unlock_irqrestore(&cpufreq_driver_lock, flags);
-		return -EBUSY;
+		return -EEXIST;
 	}
 	cpufreq_driver = driver_data;
 	write_unlock_irqrestore(&cpufreq_driver_lock, flags);

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

end of thread, other threads:[~2013-09-20 20:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-19  4:05 [PATCH] cpufreq: return EEXIST instead of EBUSY for second registering Yinghai Lu
2013-09-19  4:08 ` Viresh Kumar
2013-09-19 22:37   ` Rafael J. Wysocki
2013-09-20  1:31     ` Yinghai Lu
2013-09-20  4:23       ` Viresh Kumar
2013-09-20  5:30         ` Yinghai Lu
2013-09-20 13:30           ` Rafael J. Wysocki
2013-09-20 17:12             ` Yinghai Lu
2013-09-20 19:30               ` Yinghai Lu
2013-09-20 20:16                 ` Rafael J. Wysocki

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