mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Kay Sievers <kay@vrfy.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	systemd-devel@lists.freedesktop.org
Subject: udev: New default rule for autoloading kernel modules matching CPU modalias
Date: Sat, 20 Jul 2013 12:56:54 +0200	[thread overview]
Message-ID: <1623844.aKWlCHQqy1@vostro.rjw.lan> (raw)

Hi Kay,

After a recent change present in 3.11-rc1 there is a driver, called processor,
that can be bound to the CPU devices whose sysfs directories are located under
/sys/devices/system/cpu/.  A side effect of this is that, after the driver has
been bound to those devices, the kernel adds DRIVER=processor to ENV for CPU
uevents and they don't match the default rule for autoloading modules matching
MODALIAS:

DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"

any more.  However, there are some modules whose module aliases match specific
CPU features through the modalias string and those modules should be loaded
automatically if a compatible CPU is present.  Yet, with the processor driver
bound to the CPU devices the above rule is not sufficient for that, so we need
a new default udev rule allowing those modules to be autoloaded even if the
CPU devices have drivers.

On my test systems I added the following rule for that:

ACTION="add", SUBSYSTEM=="cpu", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"

in a separate file, but I'm not a udev expert, so I guess it may be done in a
better way.

Can you please consider adding such a rule to the default set of udev rules?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

             reply	other threads:[~2013-07-20 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-20 10:56 Rafael J. Wysocki [this message]
2013-07-20 11:00 ` Rafael J. Wysocki
2013-07-20 11:47 ` Kay Sievers
2013-07-20 12:34   ` Kay Sievers
2013-07-20 20:42     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1623844.aKWlCHQqy1@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=kay@vrfy.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=systemd-devel@lists.freedesktop.org \
    --cc=tim.c.chen@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®