linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: mingo@kernel.org, tglx@linutronix.de, acme@ghostprotocols.net
Cc: dhowells@redhat.com, davem@davemloft.net,
	torvalds@linux-foundation.org, paulus@samba.org,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org
Subject: [PATCH 5/5] x86: UAPI Disintegrate asm/perf_regs.h
Date: Fri, 19 Oct 2012 17:56:41 +0100	[thread overview]
Message-ID: <20121019165641.23037.59790.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20121019165558.23037.40181.stgit@warthog.procyon.org.uk>

Disintegrate x86's asm/perf_regs.h for UAPI.  This just entails moving it to
the uapi directory.

With this, the #inclusion in perf's perf_regs.h can use <asm/perf_regs.h>.

If this actually wants posting to userspace, then it will need a headers-y
line adding to the Kbuild file.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 arch/x86/include/asm/perf_regs.h        |   33 -------------------------------
 arch/x86/include/uapi/asm/perf_regs.h   |   33 +++++++++++++++++++++++++++++++
 tools/perf/arch/x86/include/perf_regs.h |    2 +-
 3 files changed, 34 insertions(+), 34 deletions(-)
 delete mode 100644 arch/x86/include/asm/perf_regs.h
 create mode 100644 arch/x86/include/uapi/asm/perf_regs.h

diff --git a/arch/x86/include/asm/perf_regs.h b/arch/x86/include/asm/perf_regs.h
deleted file mode 100644
index 3f2207b..0000000
--- a/arch/x86/include/asm/perf_regs.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _ASM_X86_PERF_REGS_H
-#define _ASM_X86_PERF_REGS_H
-
-enum perf_event_x86_regs {
-	PERF_REG_X86_AX,
-	PERF_REG_X86_BX,
-	PERF_REG_X86_CX,
-	PERF_REG_X86_DX,
-	PERF_REG_X86_SI,
-	PERF_REG_X86_DI,
-	PERF_REG_X86_BP,
-	PERF_REG_X86_SP,
-	PERF_REG_X86_IP,
-	PERF_REG_X86_FLAGS,
-	PERF_REG_X86_CS,
-	PERF_REG_X86_SS,
-	PERF_REG_X86_DS,
-	PERF_REG_X86_ES,
-	PERF_REG_X86_FS,
-	PERF_REG_X86_GS,
-	PERF_REG_X86_R8,
-	PERF_REG_X86_R9,
-	PERF_REG_X86_R10,
-	PERF_REG_X86_R11,
-	PERF_REG_X86_R12,
-	PERF_REG_X86_R13,
-	PERF_REG_X86_R14,
-	PERF_REG_X86_R15,
-
-	PERF_REG_X86_32_MAX = PERF_REG_X86_GS + 1,
-	PERF_REG_X86_64_MAX = PERF_REG_X86_R15 + 1,
-};
-#endif /* _ASM_X86_PERF_REGS_H */
diff --git a/arch/x86/include/uapi/asm/perf_regs.h b/arch/x86/include/uapi/asm/perf_regs.h
new file mode 100644
index 0000000..3f2207b
--- /dev/null
+++ b/arch/x86/include/uapi/asm/perf_regs.h
@@ -0,0 +1,33 @@
+#ifndef _ASM_X86_PERF_REGS_H
+#define _ASM_X86_PERF_REGS_H
+
+enum perf_event_x86_regs {
+	PERF_REG_X86_AX,
+	PERF_REG_X86_BX,
+	PERF_REG_X86_CX,
+	PERF_REG_X86_DX,
+	PERF_REG_X86_SI,
+	PERF_REG_X86_DI,
+	PERF_REG_X86_BP,
+	PERF_REG_X86_SP,
+	PERF_REG_X86_IP,
+	PERF_REG_X86_FLAGS,
+	PERF_REG_X86_CS,
+	PERF_REG_X86_SS,
+	PERF_REG_X86_DS,
+	PERF_REG_X86_ES,
+	PERF_REG_X86_FS,
+	PERF_REG_X86_GS,
+	PERF_REG_X86_R8,
+	PERF_REG_X86_R9,
+	PERF_REG_X86_R10,
+	PERF_REG_X86_R11,
+	PERF_REG_X86_R12,
+	PERF_REG_X86_R13,
+	PERF_REG_X86_R14,
+	PERF_REG_X86_R15,
+
+	PERF_REG_X86_32_MAX = PERF_REG_X86_GS + 1,
+	PERF_REG_X86_64_MAX = PERF_REG_X86_R15 + 1,
+};
+#endif /* _ASM_X86_PERF_REGS_H */
diff --git a/tools/perf/arch/x86/include/perf_regs.h b/tools/perf/arch/x86/include/perf_regs.h
index 46fc9f1..7fcdcdb 100644
--- a/tools/perf/arch/x86/include/perf_regs.h
+++ b/tools/perf/arch/x86/include/perf_regs.h
@@ -3,7 +3,7 @@
 
 #include <stdlib.h>
 #include "../../util/types.h"
-#include "../../../../../arch/x86/include/asm/perf_regs.h"
+#include <asm/perf_regs.h>
 
 #ifndef ARCH_X86_64
 #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1)

  parent reply	other threads:[~2012-10-19 16:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 16:55 [RFC][PATCH 0/5] tools, perf: Fix up for x86 UAPI disintegration David Howells
2012-10-19 16:56 ` [PATCH 1/5] tools: Define a Makefile function to do subdir processing David Howells
2012-10-19 16:56 ` [PATCH 2/5] tools: Honour the O= flag when tool build called from a higher Makefile David Howells
2012-10-19 16:56   ` David Howells
2012-10-26  5:34   ` Namhyung Kim
2012-10-19 16:56 ` [PATCH 3/5] perf: Make perf build for x86 with UAPI disintegration applied David Howells
2012-10-19 16:56   ` David Howells
2012-10-26  5:49   ` Namhyung Kim
2012-10-19 16:56 ` [PATCH 4/5] x86: Disintegrate asm/svm.h and asm/vmx.h to produce UAPI components for perf David Howells
2012-10-19 16:56   ` David Howells
2012-10-19 16:56 ` David Howells [this message]
2012-10-24 18:43 ` [RFC][PATCH 0/5] tools, perf: Fix up for x86 UAPI disintegration Arnaldo Carvalho de Melo
2012-10-24 19:46   ` Borislav Petkov
2012-10-25  7:57   ` David Howells
2012-10-25  7:57     ` David Howells
2012-10-26  4:33     ` Namhyung Kim
2012-10-26  6:04       ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121019165641.23037.59790.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=acme@ghostprotocols.net \
    --cc=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).