S390-HWBKPT: Prepare s390 for hardware breakpoint
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Mahesh Salgaonkar
Prepare the s390 code for HW Breakpoint infrastructure patches by including relevant constant definitions and function declarations.
Why split this? Especially it would be nice to have function declarations and the functions in the same patch :)
arch/s390/include/asm/hw_breakpoint.h line 5
Quoted 10 lines
Index:
linux-2.6-tip/arch/s390/include/asm/hw_breakpoint.h
===================================================================arch/s390/include/asm/hw_breakpoint.h new file +5
-0@@ -0,0 +1,65 @@ +*/ +#ifndef _S390_HW_BREAKPOINT_H +#define _S390_HW_BREAKPOINT_H + +#ifdef __KERNEL__
This header isn't exported, so the ifdef seems to be unnecessary.
arch/s390/include/asm/hw_breakpoint.h line 6
Quoted 1 line
arch/s390/include/asm/hw_breakpoint.h new file +1
-0+#define __ARCH_HW_BREAKPOINT_H
Seems to be unnecessary as well.
arch/s390/include/asm/hw_breakpoint.h line 15
Quoted 9 lines
arch/s390/include/asm/hw_breakpoint.h new file +9
-0+extern int hw_breakpoint_exceptions_notify (struct notifier_block *unused, +unsigned long val,void *data); + +int arch_install_hw_breakpoint (struct perf_event *bp); +void arch_uninstall_hw_breakpoint (struct perf_event *bp); +void hw_breakpoint_pmu_read (struct perf_event *bp); +void hw_breakpoint_pmu_unthrottle (struct perf_event *bp); + +extern void arch_fill_perf_breakpoint (struct perf_event *bp);
At least this function doesn't exist in your second patch.
kernel/hw_breakpoint.c line 35
Quoted 11 lines
Index:
linux-2.6-tip/kernel/hw_breakpoint.c
===================================================================kernel/hw_breakpoint.c +3
-0@@ -30,6 +30,9 @@* This file contains the arch-independent routines. */ +#ifdef CONFIG_S390 +#include <asm/bitsperlong.h> +#endif
Please don't add CONFIG_S390 ifdefs in common code, unless it cannot be avoided. Why is this needed?
Quoted 3 lines
kernel/hw_breakpoint.c +0
-0#include <linux/irqflags.h> #include <linux/kallsyms.h> #include <linux/notifier.h>
Quoted 7 lines · Heiko Carstens
Quoted 2 lines · Mahesh Salgaonkar
Prepare the s390 code for HW Breakpoint infrastructure patches by including relevant constant definitions and function declarations.
Why split this? Especially it would be nice to have function declarations and the functions in the same patch :)
Sure, will merge the first 2 patches.
Quoted 17 lines
arch/s390/include/asm/hw_breakpoint.h line 5
Quoted 10 lines
Index:
linux-2.6-tip/arch/s390/include/asm/hw_breakpoint.h
===================================================================arch/s390/include/asm/hw_breakpoint.h new file +5
-0@@ -0,0 +1,65 @@ +*/ +#ifndef _S390_HW_BREAKPOINT_H +#define _S390_HW_BREAKPOINT_H + +#ifdef __KERNEL__This header isn't exported, so the ifdef seems to be unnecessary.
arch/s390/include/asm/hw_breakpoint.h line 6
Quoted 1 line
arch/s390/include/asm/hw_breakpoint.h new file +1
-0+#define __ARCH_HW_BREAKPOINT_HSeems to be unnecessary as well.
Quoted 12 lines
arch/s390/include/asm/hw_breakpoint.h line 15
Quoted 9 lines
arch/s390/include/asm/hw_breakpoint.h new file +9
-0+extern int hw_breakpoint_exceptions_notify (struct notifier_block *unused, +unsigned long val,void *data); + +int arch_install_hw_breakpoint (struct perf_event *bp); +void arch_uninstall_hw_breakpoint (struct perf_event *bp); +void hw_breakpoint_pmu_read (struct perf_event *bp); +void hw_breakpoint_pmu_unthrottle (struct perf_event *bp); + +extern void arch_fill_perf_breakpoint (struct perf_event *bp);At least this function doesn't exist in your second patch.
Will remove it.
Quoted 8 lines
Quoted 8 lines
Index:
linux-2.6-tip/kernel/hw_breakpoint.c
===================================================================kernel/hw_breakpoint.c +0
-0@@ -30,6 +30,9 @@* This file contains the arch-independent routines. */
Quoted 8 lines
kernel/hw_breakpoint.c line 35
Quoted 3 lines
kernel/hw_breakpoint.c +3
-0+#ifdef CONFIG_S390 +#include <asm/bitsperlong.h> +#endif Please don't add
CONFIG_S390ifdefs in common code, unless it cannot be avoided. Why is this needed?Quoted 1 line
kernel/hw_breakpoint.c +0
-0#include <linux/irqflags.h>
This was included to avoid compilation errors. The 'asm/irqflags.h' included from 'linux/irqflags' uses "BITS_PER_LONG" #def which is declared in 'asm/bitsperlong.h'.
Quoted 2 lines
Quoted 2 lines
kernel/hw_breakpoint.c +0
-0#include <linux/kallsyms.h> #include <linux/notifier.h>