Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755577AbZLKJkI (ORCPT ); Fri, 11 Dec 2009 04:40:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755087AbZLKJkB (ORCPT ); Fri, 11 Dec 2009 04:40:01 -0500 Received: from mail2.picochip.com ([82.111.145.34]:35864 "EHLO thurne.picochip.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754927AbZLKJju (ORCPT ); Fri, 11 Dec 2009 04:39:50 -0500 From: Jamie Iles To: linux-kernel@vger.kernel.org Cc: Jamie Iles , Russell King , Peter Zijlstra Subject: [PATCH 1/2] perf tools: allow building for ARM Date: Fri, 11 Dec 2009 09:20:59 +0000 Message-Id: <1260523260-15694-1-git-send-email-jamie.iles@picochip.com> X-Mailer: git-send-email 1.6.5.4 X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (thurne.picochip.com [172.17.0.105]); Fri, 11 Dec 2009 09:19:50 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 37 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") #endif +#ifdef __arm__ +#include "../../arch/arm/include/asm/unistd.h" +#define rmb() asm volatile("":::"memory") +#define cpu_relax() asm volatile("":::"memory") +#endif + #include #include #include -- 1.6.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/