From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/4] wire up CPU features to udev based module loading
Date: Thu, 7 Nov 2013 18:17:33 +0100 [thread overview]
Message-ID: <1383844657-17487-1-git-send-email-ard.biesheuvel@linaro.org> (raw)
This series implements automatic module loading based on optional CPU features,
and tries to do so in a generic way. Currently, 32 feature bits are supported,
and how they map to actual CPU features is entirely up to the architecture.
There is some GCC attribute foo in here which people may object to, so any
suggestions on how to implement this in a cleaner way are more than welcome.
Typical usage would look like this:
static struct cpu_feature mod_cpu_feature[] = {
{ HWCAP_NEON },
{}
};
MODULE_DEVICE_TABLE(cpu, mod_cpu_feature);
where (on the ARM arch) the module in question would be loaded automatically if
a NEON-capable CPU is detected (and advertised).
Ard Biesheuvel (4):
x86: move arch_cpu_uevent() to generic code
cpu: advertise CPU features over udev in a generic way
scripts/mod: add generic CPU features as module alias
arm64: advertise CPU features using module aliases
arch/arm64/Kconfig | 3 +++
arch/arm64/kernel/setup.c | 2 ++
arch/x86/kernel/cpu/match.c | 11 -----------
drivers/base/cpu.c | 39 ++++++++++++++++++++++++++++++++++++++-
include/linux/cpu.h | 1 -
include/linux/mod_devicetable.h | 11 +++++++++++
scripts/mod/devicetable-offsets.c | 3 +++
scripts/mod/file2alias.c | 10 ++++++++++
8 files changed, 67 insertions(+), 13 deletions(-)
--
1.8.3.2
next reply other threads:[~2013-11-07 17:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 17:17 Ard Biesheuvel [this message]
2013-11-07 17:17 ` [RFC PATCH 1/4] x86: move arch_cpu_uevent() to generic code Ard Biesheuvel
2013-11-07 17:17 ` [RFC PATCH 2/4] cpu: advertise CPU features over udev in a generic way Ard Biesheuvel
2013-11-07 19:33 ` Dave Martin
2013-11-07 20:00 ` Ard Biesheuvel
2013-11-07 20:55 ` Ard Biesheuvel
2013-11-07 17:17 ` [RFC PATCH 3/4] scripts/mod: add generic CPU features as module alias Ard Biesheuvel
2013-11-07 17:17 ` [RFC PATCH 4/4] arm64: advertise CPU features using module aliases Ard Biesheuvel
2013-11-07 21:09 ` [RFC PATCH 0/4] wire up CPU features to udev based module loading H. Peter Anvin
2013-11-07 21:39 ` Andi Kleen
2013-11-07 22:15 ` Ard Biesheuvel
2013-11-07 22:30 ` Andi Kleen
2013-11-08 15:09 ` H. Peter Anvin
2013-11-07 22:49 ` H. Peter Anvin
2013-11-08 10:20 ` Ard
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=1383844657-17487-1-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).