Re: Q: acpi-cpufreq module auto-loading after processor driver change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, June 06, 2013 04:09:47 PM Greg Kroah-Hartman wrote:
> On Fri, Jun 07, 2013 at 12:44:44AM +0200, Rafael J. Wysocki wrote:
> > So far I have verified that topology_init() is executed before acpi_init()
> > (which appears to be pure coincidence, but oh well), so even the *ordering*
> > is the same as before.  The only difference is that the device in question
> > now has a driver bound to it and it didn't before (the driver was bound to
> > something else).
> > 
> > Hmm. I suspect udev just thinks "ok, I have found a driver for that device,
> > so I don't need to look for one any more" and that's why it doesn't load
> > acpi_cpufreq.  If that's the case, is there any way to make it load all
> > matching modules anyway?
> 
> udev should call modprobe with an alias for the device which _should_
> try to load all modules that match the alias.  So take a look at kmod to
> see if something is odd there.

Interesting.

If I add ACPI device aliases to acpi-cpufreq, like in the appended patch,
it *is* loaded automatically even if it isn't present in the initramfs.

Well, those aliases actually make more sense that the x86cpu ones, because the
ACPI processor objects are required for the driver to work, so I think I'll
just apply this patch, but quite frankly that makes me feel a bit uneasy.

Thanks,
Rafael


Index: linux-pm/drivers/cpufreq/acpi-cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/acpi-cpufreq.c
+++ linux-pm/drivers/cpufreq/acpi-cpufreq.c
@@ -1034,4 +1034,11 @@ static const struct x86_cpu_id acpi_cpuf
 };
 MODULE_DEVICE_TABLE(x86cpu, acpi_cpufreq_ids);
 
+static const struct acpi_device_id processor_device_ids[] = {
+	{ACPI_PROCESSOR_OBJECT_HID, 0},
+	{ACPI_PROCESSOR_DEVICE_HID, 0},
+	{"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, processor_device_ids);
+
 MODULE_ALIAS("acpi");

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux