From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752661AbbEJHHQ (ORCPT ); Sun, 10 May 2015 03:07:16 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44752 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752367AbbEJHHM (ORCPT ); Sun, 10 May 2015 03:07:12 -0400 Date: Sun, 10 May 2015 00:06:57 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: acme@redhat.com, jolsa@redhat.com, fweisbec@gmail.com, tglx@linutronix.de, namhyung@kernel.org, eranian@google.com, dzickus@redhat.com, hpa@zytor.com, adrian.hunter@intel.com, dsahern@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org, bp@suse.de Reply-To: acme@redhat.com, fweisbec@gmail.com, jolsa@redhat.com, tglx@linutronix.de, dzickus@redhat.com, namhyung@kernel.org, eranian@google.com, hpa@zytor.com, adrian.hunter@intel.com, dsahern@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org, bp@suse.de To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools: Adopt asm-generic/barrier.h Git-Commit-ID: c6e39db1d0284ff573f171b6754837d39b8a358d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c6e39db1d0284ff573f171b6754837d39b8a358d Gitweb: http://git.kernel.org/tip/c6e39db1d0284ff573f171b6754837d39b8a358d Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 7 May 2015 17:04:06 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 8 May 2015 16:05:04 -0300 tools: Adopt asm-generic/barrier.h >>From the kernel's include/asm-generic/barrier.h, will be used by the sh barrier.h implementation. Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Don Zickus Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-emjznw0rjsmfyx2wfixss1gv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/asm-generic/barrier.h | 44 +++++++++++++++++++++++++++++++++++++ tools/perf/MANIFEST | 1 + 2 files changed, 45 insertions(+) diff --git a/tools/include/asm-generic/barrier.h b/tools/include/asm-generic/barrier.h new file mode 100644 index 0000000..47b9339 --- /dev/null +++ b/tools/include/asm-generic/barrier.h @@ -0,0 +1,44 @@ +/* + * Copied from the kernel sources to tools/perf/: + * + * Generic barrier definitions, originally based on MN10300 definitions. + * + * It should be possible to use these on really simple architectures, + * but it serves more as a starting point for new ports. + * + * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public Licence + * as published by the Free Software Foundation; either version + * 2 of the Licence, or (at your option) any later version. + */ +#ifndef __TOOLS_LINUX_ASM_GENERIC_BARRIER_H +#define __TOOLS_LINUX_ASM_GENERIC_BARRIER_H + +#ifndef __ASSEMBLY__ + +#include + +/* + * Force strict CPU ordering. And yes, this is required on UP too when we're + * talking to devices. + * + * Fall back to compiler barriers if nothing better is provided. + */ + +#ifndef mb +#define mb() barrier() +#endif + +#ifndef rmb +#define rmb() mb() +#endif + +#ifndef wmb +#define wmb() mb() +#endif + +#endif /* !__ASSEMBLY__ */ +#endif /* __TOOLS_LINUX_ASM_GENERIC_BARRIER_H */ diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST index 00754af..ac62caf 100644 --- a/tools/perf/MANIFEST +++ b/tools/perf/MANIFEST @@ -11,6 +11,7 @@ tools/lib/symbol/kallsyms.h tools/lib/util/find_next_bit.c tools/include/asm/barrier.h tools/include/asm/bug.h +tools/include/asm-generic/barrier.h tools/include/asm-generic/bitops/arch_hweight.h tools/include/asm-generic/bitops/atomic.h tools/include/asm-generic/bitops/const_hweight.h