diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2015-02-19 06:22:02 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-07-22 03:58:02 -0400 |
commit | 8f00b3e28f73e712a2f82a15f66acd852f60e3ba (patch) | |
tree | 52fe46682c01970f8750a32dead49d7861b91e6c /arch/s390/kernel/processor.c | |
parent | 7d0c502040a23a5924d3021651cf5326c8694a77 (diff) |
s390/module: enable generic CPU feature modalias using s390 ELF hwcaps
Add support for the generic CPU feature modalias implementation that wires
up optional CPU features to udev-based module autoprobing.
The <asm/cpufeature.h> file provides definitions to map CPU features to
s390 ELF hardware capabilities.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/processor.c')
-rw-r--r-- | arch/s390/kernel/processor.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index dc488e13b7e3..e6e077ae3990 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c | |||
@@ -41,6 +41,15 @@ void cpu_init(void) | |||
41 | } | 41 | } |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * cpu_have_feature - Test CPU features on module initialization | ||
45 | */ | ||
46 | int cpu_have_feature(unsigned int num) | ||
47 | { | ||
48 | return elf_hwcap & (1UL << num); | ||
49 | } | ||
50 | EXPORT_SYMBOL(cpu_have_feature); | ||
51 | |||
52 | /* | ||
44 | * show_cpuinfo - Get information on one CPU for use by procfs. | 53 | * show_cpuinfo - Get information on one CPU for use by procfs. |
45 | */ | 54 | */ |
46 | static int show_cpuinfo(struct seq_file *m, void *v) | 55 | static int show_cpuinfo(struct seq_file *m, void *v) |