diff options
Diffstat (limited to 'kernel/arch/s390/kernel/processor.c')
-rw-r--r-- | kernel/arch/s390/kernel/processor.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/arch/s390/kernel/processor.c b/kernel/arch/s390/kernel/processor.c index dc488e13b..7ce00e7a7 100644 --- a/kernel/arch/s390/kernel/processor.c +++ b/kernel/arch/s390/kernel/processor.c @@ -11,6 +11,7 @@ #include <linux/seq_file.h> #include <linux/delay.h> #include <linux/cpu.h> +#include <asm/diag.h> #include <asm/elf.h> #include <asm/lowcore.h> #include <asm/param.h> @@ -20,8 +21,10 @@ static DEFINE_PER_CPU(struct cpuid, cpu_id); void notrace cpu_relax(void) { - if (!smp_cpu_mtid && MACHINE_HAS_DIAG44) + if (!smp_cpu_mtid && MACHINE_HAS_DIAG44) { + diag_stat_inc(DIAG_STAT_X044); asm volatile("diag 0,0,0x44"); + } barrier(); } EXPORT_SYMBOL(cpu_relax); @@ -41,6 +44,15 @@ void cpu_init(void) } /* + * cpu_have_feature - Test CPU features on module initialization + */ +int cpu_have_feature(unsigned int num) +{ + return elf_hwcap & (1UL << num); +} +EXPORT_SYMBOL(cpu_have_feature); + +/* * show_cpuinfo - Get information on one CPU for use by procfs. */ static int show_cpuinfo(struct seq_file *m, void *v) |