forked from OnePlus-5-T/4.14-kernel-oneplus-msm8998
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
7d0c502
commit 8f00b3e
Showing
4 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Module interface for CPU features | ||
* | ||
* Copyright IBM Corp. 2015 | ||
* Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | ||
*/ | ||
|
||
#ifndef __ASM_S390_CPUFEATURE_H | ||
#define __ASM_S390_CPUFEATURE_H | ||
|
||
#include <asm/elf.h> | ||
|
||
/* Hardware features on Linux on z Systems are indicated by facility bits that | ||
* are mapped to the so-called machine flags. Particular machine flags are | ||
* then used to define ELF hardware capabilities; most notably hardware flags | ||
* that are essential for user space / glibc. | ||
* | ||
* Restrict the set of exposed CPU features to ELF hardware capabilities for | ||
* now. Additional machine flags can be indicated by values larger than | ||
* MAX_ELF_HWCAP_FEATURES. | ||
*/ | ||
#define MAX_ELF_HWCAP_FEATURES (8 * sizeof(elf_hwcap)) | ||
#define MAX_CPU_FEATURES MAX_ELF_HWCAP_FEATURES | ||
|
||
#define cpu_feature(feat) ilog2(HWCAP_S390_ ## feat) | ||
|
||
int cpu_have_feature(unsigned int nr); | ||
|
||
#endif /* __ASM_S390_CPUFEATURE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters