[lkml]   [2009]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 1/2] perf tools: allow building for ARM
    Add definitions of rmb() and cpu_relax() and include the ARM unistd.h
    header. The kernel uses different definitions for rmb() depending on
    the arch revision and whether the system is SMP or not. The lowest common
    denominator is a compiler memory barrier so use that.

    Signed-off-by: Jamie Iles <>
    Cc: Russell King <>
    Cc: Peter Zijlstra <>
    tools/perf/perf.h | 6 ++++++
    1 files changed, 6 insertions(+), 0 deletions(-)

    diff --git a/tools/perf/perf.h b/tools/perf/perf.h
    index 454d5d5..4b8eac6 100644
    --- a/tools/perf/perf.h
    +++ b/tools/perf/perf.h
    @@ -59,6 +59,12 @@
    #define cpu_relax() asm volatile ("hint @pause" ::: "memory")

    +#ifdef __arm__
    +#include "../../arch/arm/include/asm/unistd.h"
    +#define rmb() asm volatile("":::"memory")
    +#define cpu_relax() asm volatile("":::"memory")
    #include <time.h>
    #include <unistd.h>
    #include <sys/types.h>

     \ /
      Last update: 2009-12-11 10:43    [W:0.019 / U:4.576 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site