hw-breakpoint fix
Ingo,
Please pull the perf/urgent branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
perf/urgent
Thanks,
Frederic
---
Mahesh Salgaonkar (1):
perf: Make bp_len type to u64 generic across the arch
include/linux/hw_breakpoint.h | 2 +- include/linux/perf_event.h | 6 ++---- kernel/hw_breakpoint.c | 2 +- kernel/perf_event.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-)
---
commit cd757645fbdc34a8343c04bb0e74e06fccc2cb10
Author: Mahesh Salgaonkar <[email protected]> Date: Sat Jan 30 10:25:18 2010 +0530
perf: Make bp_len type to u64 generic across the arch
Change 'bp_len' type to __u64 to make it work across archs as the s390 architecture watch point length can be upto 2^64.
reference:
http://lkml.org/lkml/2010/1/25/212
This is an ABI change that is not backward compatible with the previous hardware breakpoint info layout integrated in this development cycle, a rebuilt of perf tools is necessary for versions based on 2.6.33-rc1 - 2.6.33-rc6 to work with a kernel based on this patch.
LKML-Reference: <[email protected]>
include/linux/hw_breakpoint.h +1 -1
@@ -44,7 +44,7 @@ static inline int hw_breakpoint_type(struct perf_event *bp)return bp->attr.bp_type; } -static inline int hw_breakpoint_len (struct perf_event *bp) +static inline unsigned long hw_breakpoint_len (struct perf_event *bp) {return bp->attr.bp_len; }
include/linux/perf_event.h +2 -4
@@ -211,11 +211,9 @@ struct perf_event_attr {__u32 wakeup_watermark;/* bytes before wakeup */ }; -__u32 __reserved_2; - -__u64 bp_addr;__u32 bp_type; -__u32 bp_len; +__u64 bp_addr; +__u64 bp_len; };/*
kernel/hw_breakpoint.c +1 -1
@@ -360,8 +360,8 @@ EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);int modify_user_hw_breakpoint (struct perf_event *bp,struct perf_event_attr *attr) {u64 old_addr = bp->attr.bp_addr; +u64 old_len = bp->attr.bp_len;int old_type = bp->attr.bp_type; -int old_len = bp->attr.bp_len;int err =0 ;perf_event_disable (bp);
kernel/perf_event.c +1 -1
@@ -4580,7 +4580,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,if (attr->type >=PERF_TYPE_MAX )return -EINVAL ; -if (attr->__reserved_1 || attr->__reserved_2) +if (attr->__reserved_1)return -EINVAL ;if (attr->sample_type & ~(PERF_SAMPLE_MAX -1 ))
Hi Ingo,
Will this patch be pushed in to Linux tree? This patch contains ABI chnage w.r.t hardware breakpoint info layout and needs to go in .33
Thanks,
-Mahesh.
Quoted 108 lines · Frederic Weisbecker
Ingo,
Please pull the perf/urgent branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
perf/urgentThanks,
Frederic
---Mahesh Salgaonkar (1):
perf: Makebp_lentype to u64 generic across the archinclude/linux/hw_breakpoint.h | 2 +- include/linux/perf_event.h | 6 ++---- kernel/hw_breakpoint.c | 2 +- kernel/perf_event.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-)---
commitcd757645fbdc34a8343c04bb0e74e06fccc2cb10Author: Mahesh Salgaonkar<[email protected]> Date: Sat Jan 30 10:25:18 2010 +0530perf: Make
bp_lentype to u64 generic across the archChange '
bp_len' type to__u64to make it work across archs as the s390 architecture watch point length can be upto 2^64.reference:
http://lkml.org/lkml/2010/1/25/212This is an ABI change that is not backward compatible with the previous hardware breakpoint info layout integrated in this development cycle, a rebuilt of perf tools is necessary for versions based on 2.6.33-rc1 - 2.6.33-rc6 to work with a kernel based on this patch.
Signed-off-by Mahesh Salgaonkar<[email protected]>Acked-by Peter Zijlstra<[email protected]>Cc Ananth N Mavinakayanahalli<[email protected]>Cc "K. Prasad"<[email protected]>Cc Maneesh Soni<[email protected]>Cc Heiko Carstens<[email protected]>Cc Martin<[email protected]>LKML-Reference:<[email protected]>
Signed-off-by Frederic Weisbecker<[email protected]>include/linux/hw_breakpoint.h +1
-1@@ -44,7 +44,7 @@ static inline int hw_breakpoint_type(struct perf_event *bp)return bp->attr.bp_type; } -static inline int hw_breakpoint_len (struct perf_event *bp) +static inline unsigned long hw_breakpoint_len (struct perf_event *bp) {return bp->attr.bp_len; }include/linux/perf_event.h +2
-4@@ -211,11 +211,9 @@ struct perf_event_attr {__u32 wakeup_watermark;/* bytes before wakeup */ }; -__u32 __reserved_2; - -__u64 bp_addr;__u32 bp_type; -__u32 bp_len; +__u64 bp_addr; +__u64 bp_len; };/* kernel/hw_breakpoint.c +1
-1@@ -360,8 +360,8 @@ EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);int modify_user_hw_breakpoint (struct perf_event *bp,struct perf_event_attr *attr) {u64 old_addr = bp->attr.bp_addr; +u64 old_len = bp->attr.bp_len;int old_type = bp->attr.bp_type; -int old_len = bp->attr.bp_len;int err =0 ;perf_event_disable (bp);kernel/perf_event.c +1
-1@@ -4580,7 +4580,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,if (attr->type>=PERF_TYPE_MAX )return -EINVAL ; -if (attr->__reserved_1 || attr->__reserved_2) +if (attr->__reserved_1)return -EINVAL ;if (attr->sample_type& ~(PERF_SAMPLE_MAX -1 ))
Quoted 7 lines · Mahesh Jagannath Salgaonkar
Hi Ingo,
Will this patch be pushed in to Linux tree? This patch contains ABI chnage w.r.t hardware breakpoint info layout and needs to go in .33
Thanks,
-Mahesh.
It is in the tip:perf/urgent branch, which means Ingo will likely send a pull request soon with this patch inside.
Thanks.