cpufreq: return EEXIST instead of EBUSY for second registering
PATCH 1/1 cpufreq: return EEXIST instead of EBUSY for second registering
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.
--- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq.c +1 -1
@@ -2104,7 +2104,7 @@ int cpufreq_register_driver(struct cpufrwrite_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);
Quoted 8 lines · Yinghai Lu
System that cpu support
intel_pstate,acpi_cpufreqfail to load, and udev keep trying until trace get filled up and kernel crash.The root cause is driver return ret from
cpufreq_register_driverand when some other driver take over before, it would return EBUSY, then udev will keep trying...
Quoted 5 lines
cpufreq_register_drivershould return EEXIST instead. then system could boot without appending intel_pstate=disable and still useintel_pstate.Signed-off-by Yinghai Lu <[email protected]>
Rafael J. Wysocki
AppliedQuoted 9 lines · Viresh Kumar
Quoted 8 lines · Yinghai Lu
System that cpu support
intel_pstate,acpi_cpufreqfail to load, and udev keep trying until trace get filled up and kernel crash.The root cause is driver return ret from
cpufreq_register_driverand when some other driver take over before, it would return EBUSY, then udev will keep trying...
Quoted 7 lines
Quoted 5 lines
cpufreq_register_drivershould return EEXIST instead. then system could boot without appending intel_pstate=disable and still useintel_pstate.Signed-off-by Yinghai Lu <[email protected]>Acked-by Viresh Kumar <[email protected]>
Applied, thanks!
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Quoted 14 lines · Rafael J. Wysocki
Quoted 13 lines · Viresh Kumar
Quoted 12 lines · Yinghai Lu
System that cpu support
intel_pstate,acpi_cpufreqfail to load, and udev keep trying until trace get filled up and kernel crash.The root cause is driver return ret from
cpufreq_register_driverand when some other driver take over before, it would return EBUSY, then udev will keep trying...
cpufreq_register_drivershould return EEXIST instead. then system could boot without appending intel_pstate=disable and still useintel_pstate.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Yinghai Lu <[email protected]>Acked-by Viresh Kumar <[email protected]>Applied, thanks!
Sorry, looks like this one is not enough.
please let me know if you prefer me send addon patch or revised one.
Thanks
Yinghai
Viresh Kumar
maintainerQuoted 4 lines · Yinghai Lu
Sorry, looks like this one is not enough.
please let me know if you prefer me send addon patch or revised one.
Atleast you can let us know what the problem is? And then we can decide on that.. But anyway, you can send a new patch based over latest linux-next (which will have your original patch), and then leave it onto Rafael to merge it or have two patches.. (though I am quite sure he will not drop anything now, unless its too screwed.., at worst he might revert it..)..
Quoted 6 lines · Viresh Kumar
Quoted 4 lines · Yinghai Lu
Sorry, looks like this one is not enough.
please let me know if you prefer me send addon patch or revised one.
Quoted 6 lines
Atleast you can let us know what the problem is? And then we can decide on that.. But anyway, you can send a new patch based over latest linux-next (which will have your original patch), and then leave it onto Rafael to merge it or have two patches.. (though I am quite sure he will not drop anything now, unless its too screwed.., at worst he might revert it..)..
looks like the crash is intermittent..., so i thought that patch fixed the problem.
but later I found other suspicious print out.
please check new one:
https://patchwork.kernel.org/patch/2915181/
Thanks
Yinghai
Quoted 3 lines · Yinghai Lu
Quoted 2 lines · Viresh Kumar
Quoted 1 line · Yinghai Lu
Sorry, looks like this one is not enough.
Well, I've already applied this one and it makes sense to me anyway.
Quoted 10 lines
Quoted 9 lines
Quoted 2 lines
please let me know if you prefer me send addon patch or revised one.
Atleast you can let us know what the problem is? And then we can decide on that.. But anyway, you can send a new patch based over latest linux-next (which will have your original patch), and then leave it onto Rafael to merge it or have two patches.. (though I am quite sure he will not drop anything now, unless its too screwed.., at worst he might revert it..)..
Quoted 3 lines
looks like the crash is intermittent..., so i thought that patch fixed the problem.
but later I found other suspicious print out.
So, does it mean that the $subject patch fixes the issue for you to some extent, but more changes are necessary to make it go away completely?
Quoted 3 lines
please check new one:
I see.
I *think* we can just drop the module requesting stuff entirely, because it doesn't seem to work anyway and udev is handling this for us.
Thanks,
Rafael
Quoted 6 lines · Rafael J. Wysocki
Quoted 3 lines · Yinghai Lu
Quoted 2 lines · Viresh Kumar
Quoted 1 line · Yinghai Lu
Sorry, looks like this one is not enough.
Well, I've already applied this one and it makes sense to me anyway.
you can keep that.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 3 lines
please let me know if you prefer me send addon patch or revised one.
Atleast you can let us know what the problem is? And then we can decide on that.. But anyway, you can send a new patch based over latest linux-next (which will have your original patch), and then leave it onto Rafael to merge it or have two patches.. (though I am quite sure he will not drop anything now, unless its too screwed.., at worst he might revert it..)..
Quoted 6 lines
Quoted 3 lines
looks like the crash is intermittent..., so i thought that patch fixed the problem.
but later I found other suspicious print out.So, does it mean that the $subject patch fixes the issue for you to some extent, but more changes are necessary to make it go away completely?
yes.
Quoted 9 lines
Quoted 4 lines
please check new one:
I see.
I *think* we can just drop the module requesting stuff entirely, because it doesn't seem to work anyway and udev is handling this for us.
looks some nehalem/westmere based system may need it when they have several SSDTs. will double check that.
Thanks
Yinghai
Quoted 4 lines · Yinghai Lu
Quoted 3 lines
I *think* we can just drop the module requesting stuff entirely, because it doesn't seem to work anyway and udev is handling this for us.
Yes. looks like acpi_processor_load_module() is not needed. udev will do the work.
Quoted 7 lines · Yinghai Lu
Quoted 4 lines · Yinghai Lu
Quoted 3 lines
I *think* we can just drop the module requesting stuff entirely, because it doesn't seem to work anyway and udev is handling this for us.
Yes. looks like
acpi_processor_load_module()is not needed. udev will do the work.
OK, I'll cut a patch to drop that stuff.
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.