[PATCH] ARM: perf: ensure counter delta is limited to 32-bits

Will Deacon will.deacon at arm.com
Fri Jul 2 11:36:22 EDT 2010


> > diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
> > index c457686..de12536 100644
> > --- a/arch/arm/kernel/perf_event.c
> > +++ b/arch/arm/kernel/perf_event.c
> > @@ -201,7 +201,7 @@ armpmu_event_update(struct perf_event *event,
> >  {
> >         int shift = 64 - 32;
> >         s64 prev_raw_count, new_raw_count;
> > -       s64 delta;
> > +       u64 delta;
> >
> >  again:
> >         prev_raw_count = atomic64_read(&hwc->prev_count);
> >
> >
> > What do you think?
> Yes, that looks good to me.
> 
> Acked-by: Jamie Iles <jamie.iles at picochip.com>

Thanks. I'll submit this to the patch system with an updated
description and your ack.

Will





More information about the linux-arm-kernel mailing list