s390/hwcaps: make sie capability regular hwcap
Commit 7f16d7e787
("s390: show virtualization support in /proc/cpuinfo")
introduced special handling for sie capability, saying this should not be
exposed via hwcaps, without giving a reason.
However this leads to an inconsistent /proc/cpuinfo features line
where all features except the sie capability are also present in
hwcaps. I really don't see a reason to not add that to hwcaps - it
might be quite pointless, but at least this way it is possible to get
rid of some special handling.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
98ac9169e5
commit
7e82523f25
|
@ -114,6 +114,7 @@ enum {
|
||||||
HWCAP_NR_VXRS_PDE2 = 19,
|
HWCAP_NR_VXRS_PDE2 = 19,
|
||||||
HWCAP_NR_NNPA = 20,
|
HWCAP_NR_NNPA = 20,
|
||||||
HWCAP_NR_PCI_MIO = 21,
|
HWCAP_NR_PCI_MIO = 21,
|
||||||
|
HWCAP_NR_SIE = 22,
|
||||||
HWCAP_NR_MAX
|
HWCAP_NR_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,14 +141,7 @@ enum {
|
||||||
#define HWCAP_VXRS_PDE2 BIT(HWCAP_NR_VXRS_PDE2)
|
#define HWCAP_VXRS_PDE2 BIT(HWCAP_NR_VXRS_PDE2)
|
||||||
#define HWCAP_NNPA BIT(HWCAP_NR_NNPA)
|
#define HWCAP_NNPA BIT(HWCAP_NR_NNPA)
|
||||||
#define HWCAP_PCI_MIO BIT(HWCAP_NR_PCI_MIO)
|
#define HWCAP_PCI_MIO BIT(HWCAP_NR_PCI_MIO)
|
||||||
|
#define HWCAP_SIE BIT(HWCAP_NR_SIE)
|
||||||
enum {
|
|
||||||
HWCAP_INT_NR_SIE = 0,
|
|
||||||
HWCAP_INT_NR_MAX
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Internal bits, not exposed via elf */
|
|
||||||
#define HWCAP_INT_SIE BIT(HWCAP_INT_NR_SIE)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are used to set parameters in the core dumps.
|
* These are used to set parameters in the core dumps.
|
||||||
|
@ -243,10 +237,6 @@ struct arch_elf_state {
|
||||||
extern unsigned long elf_hwcap;
|
extern unsigned long elf_hwcap;
|
||||||
#define ELF_HWCAP (elf_hwcap)
|
#define ELF_HWCAP (elf_hwcap)
|
||||||
|
|
||||||
/* Internal hardware capabilities, not exposed via elf */
|
|
||||||
|
|
||||||
extern unsigned long int_hwcap;
|
|
||||||
|
|
||||||
/* This yields a string that ld.so will use to load implementation
|
/* This yields a string that ld.so will use to load implementation
|
||||||
specific libraries for optimization. This is more specific in
|
specific libraries for optimization. This is more specific in
|
||||||
intent than poking at uname or /proc/cpuinfo.
|
intent than poking at uname or /proc/cpuinfo.
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
unsigned long __read_mostly elf_hwcap;
|
unsigned long __read_mostly elf_hwcap;
|
||||||
char elf_platform[ELF_PLATFORM_SIZE];
|
char elf_platform[ELF_PLATFORM_SIZE];
|
||||||
|
|
||||||
unsigned long int_hwcap;
|
|
||||||
|
|
||||||
struct cpu_info {
|
struct cpu_info {
|
||||||
unsigned int cpu_mhz_dynamic;
|
unsigned int cpu_mhz_dynamic;
|
||||||
unsigned int cpu_mhz_static;
|
unsigned int cpu_mhz_static;
|
||||||
|
@ -142,14 +140,11 @@ static void show_cpu_summary(struct seq_file *m, void *v)
|
||||||
[HWCAP_NR_VXRS_PDE2] = "vxp2",
|
[HWCAP_NR_VXRS_PDE2] = "vxp2",
|
||||||
[HWCAP_NR_NNPA] = "nnpa",
|
[HWCAP_NR_NNPA] = "nnpa",
|
||||||
[HWCAP_NR_PCI_MIO] = "pcimio",
|
[HWCAP_NR_PCI_MIO] = "pcimio",
|
||||||
};
|
[HWCAP_NR_SIE] = "sie",
|
||||||
static const char * const int_hwcap_str[] = {
|
|
||||||
[HWCAP_INT_NR_SIE] = "sie",
|
|
||||||
};
|
};
|
||||||
int i, cpu;
|
int i, cpu;
|
||||||
|
|
||||||
BUILD_BUG_ON(ARRAY_SIZE(hwcap_str) != HWCAP_NR_MAX);
|
BUILD_BUG_ON(ARRAY_SIZE(hwcap_str) != HWCAP_NR_MAX);
|
||||||
BUILD_BUG_ON(ARRAY_SIZE(int_hwcap_str) != HWCAP_INT_NR_MAX);
|
|
||||||
seq_printf(m, "vendor_id : IBM/S390\n"
|
seq_printf(m, "vendor_id : IBM/S390\n"
|
||||||
"# processors : %i\n"
|
"# processors : %i\n"
|
||||||
"bogomips per cpu: %lu.%02lu\n",
|
"bogomips per cpu: %lu.%02lu\n",
|
||||||
|
@ -160,9 +155,6 @@ static void show_cpu_summary(struct seq_file *m, void *v)
|
||||||
for (i = 0; i < ARRAY_SIZE(hwcap_str); i++)
|
for (i = 0; i < ARRAY_SIZE(hwcap_str); i++)
|
||||||
if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
|
if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
|
||||||
seq_printf(m, "%s ", hwcap_str[i]);
|
seq_printf(m, "%s ", hwcap_str[i]);
|
||||||
for (i = 0; i < ARRAY_SIZE(int_hwcap_str); i++)
|
|
||||||
if (int_hwcap_str[i] && (int_hwcap & (1UL << i)))
|
|
||||||
seq_printf(m, "%s ", int_hwcap_str[i]);
|
|
||||||
seq_puts(m, "\n");
|
seq_puts(m, "\n");
|
||||||
show_facilities(m);
|
show_facilities(m);
|
||||||
show_cacheinfo(m);
|
show_cacheinfo(m);
|
||||||
|
@ -257,7 +249,7 @@ static int __init setup_hwcaps(void)
|
||||||
|
|
||||||
/* virtualization support */
|
/* virtualization support */
|
||||||
if (sclp.has_sief2)
|
if (sclp.has_sief2)
|
||||||
int_hwcap |= HWCAP_INT_SIE;
|
elf_hwcap |= HWCAP_SIE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue