s390 patches for 3.4 merge window part 2
Subsystems (4)
Hi Linus,
please pull from 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus
to receive some minor improvements and one additional feature for the 3.4 merge window: Hendrik added perf support for the s390 CPU counters.
Ben Hutchings (1):
[S390] Remove unncessary export of arch_pick_mmap_layout
Hendrik Brueckner (1):
[S390] perf: add support for s390x CPU counters
Jan Glauber (2):
[S390] qdio: log all adapter characteristics
[S390] oprofile: Allow multiple users of the measurement alert interrupt
Martin Schwidefsky (1):
[S390] register cpu devices for SMP=n
arch/s390/Kconfig | 1 + arch/s390/include/asm/cpu_mf.h | 95 +++++ arch/s390/include/asm/irq.h | 2 + arch/s390/include/asm/perf_event.h | 12 +- arch/s390/kernel/Makefile | 1 + arch/s390/kernel/irq.c | 23 ++ arch/s390/kernel/perf_cpum_cf.c | 690 ++++++++++++++++++++++++++++++++++++ arch/s390/kernel/perf_event.c | 125 +++++++ arch/s390/mm/mmap.c | 2 - arch/s390/oprofile/hwsampler.c | 52 ++-- drivers/s390/cio/qdio_main.c | 1 - drivers/s390/cio/qdio_setup.c | 3 +- 12 files changed, 971 insertions(+), 36 deletions(-) create mode 100644 arch/s390/include/asm/cpu_mf.h create mode 100644 arch/s390/kernel/perf_cpum_cf.c create mode 100644 arch/s390/kernel/perf_event.c
arch/s390/Kconfig +1 -0
@@ -64,6 +64,7 @@ config ARCH_SUPPORTS_DEBUG_PAGEALLOC config S390 def_bool y select USE_GENERIC_SMP_HELPERS if SMP + select GENERIC_CPU_DEVICES if !SMP select HAVE_SYSCALL_WRAPPERS select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_TRACE_MCOUNT_TEST
arch/s390/include/asm/cpu_mf.h new file +95 -0
95 lines not on this page · raw message
arch/s390/include/asm/irq.h +2 -0
@@ -45,5 +45,7 @@ int register_external_interrupt(u16 code, ext_int_handler_t handler);int unregister_external_interrupt (u16 code,ext_int_handler_t handler);void service_subclass_irq_register (void );void service_subclass_irq_unregister (void ); +void measurement_alert_subclass_register (void ); +void measurement_alert_subclass_unregister (void );#endif /* _ASM_IRQ_H */
arch/s390/include/asm/perf_event.h +10 -2
@@ -1,8 +1,16 @@/* * Performance event support - s390 specific definitions. * -* Copyright 2009 Martin Schwidefsky, IBM Corporation. +* Copyright IBM Corp. 2009, 2012 +* Author(s): Martin Schwidefsky <[email protected]> +* Hendrik Brueckner <[email protected]> */ -/* Empty, just to avoid compiling error */ +#include <asm/cpu_mf.h> +/* CPU-measurement counter facility */ +#define PERF_CPUM_CF_MAX_CTR 160 + +/* Per-CPU flags for PMU states */ +#define PMU_F_RESERVED 0x1000 +#define PMU_F_ENABLED 0x2000
arch/s390/kernel/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o obj-$(CONFIG_CRASH_DUMP) += crash_dump.o +obj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_cpum_cf.o # Kexec part S390_KEXEC_OBJS := machine_kexec.o crash.o
arch/s390/kernel/irq.c +23 -0
@@ -255,3 +255,26 @@ void service_subclass_irq_unregister(void)spin_unlock (&sc_irq_lock); }EXPORT_SYMBOL (service_subclass_irq_unregister); + +static DEFINE_SPINLOCK (ma_subclass_lock); +static int ma_subclass_refcount; + +void measurement_alert_subclass_register (void ) +{ +spin_lock (&ma_subclass_lock); +if (!ma_subclass_refcount) +ctl_set_bit (0 ,5 ); + ma_subclass_refcount++; +spin_unlock (&ma_subclass_lock); +} +EXPORT_SYMBOL (measurement_alert_subclass_register); + +void measurement_alert_subclass_unregister (void ) +{ +spin_lock (&ma_subclass_lock); + ma_subclass_refcount--; +if (!ma_subclass_refcount) +ctl_clear_bit (0 ,5 ); +spin_unlock (&ma_subclass_lock); +} +EXPORT_SYMBOL (measurement_alert_subclass_unregister);
arch/s390/kernel/perf_cpum_cf.c new file +690 -0
690 lines not on this page · raw message
arch/s390/kernel/perf_event.c new file +125 -0
125 lines not on this page · raw message
arch/s390/mm/mmap.c +0 -2
@@ -100,7 +100,6 @@ void arch_pick_mmap_layout(struct mm_struct *mm) mm->unmap_area = arch_unmap_area_topdown; } } -EXPORT_SYMBOL_GPL (arch_pick_mmap_layout);#else
@@ -175,6 +174,5 @@ void arch_pick_mmap_layout(struct mm_struct *mm) mm->unmap_area = arch_unmap_area_topdown; } } -EXPORT_SYMBOL_GPL (arch_pick_mmap_layout);#endif
arch/s390/oprofile/hwsampler.c +22 -30
113 lines not on this page · raw message
drivers/s390/cio/qdio_main.c +0 -1
@@ -1458,7 +1458,6 @@ int qdio_establish(struct qdio_initialize *init_data) }qdio_setup_ssqd_info (irq_ptr); -DBF_EVENT ("qib ac:%4x" , irq_ptr->qib.ac);qdio_detect_hsicq (irq_ptr);
drivers/s390/cio/qdio_setup.c +2 -1
@@ -311,7 +311,8 @@ void qdio_setup_ssqd_info(struct qdio_irq *irq_ptr)check_and_setup_qebsm (irq_ptr, qdioac, irq_ptr->ssqd_desc.sch_token);process_ac_flags (irq_ptr, qdioac); -DBF_EVENT ("qdioac:%4x" , qdioac); +DBF_EVENT ("ac 1:%2x 2:%4x" , qdioac, irq_ptr->ssqd_desc.qdioac2); +DBF_EVENT ("3:%4x qib:%4x" , irq_ptr->ssqd_desc.qdioac3, irq_ptr->qib.ac); }void qdio_release_memory (struct qdio_irq *irq_ptr)