linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/5] tools, perf: Fix up for x86 UAPI disintegration
@ 2012-10-19 16:55 David Howells
  2012-10-19 16:56 ` [PATCH 1/5] tools: Define a Makefile function to do subdir processing David Howells
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: David Howells @ 2012-10-19 16:55 UTC (permalink / raw)
  To: mingo, tglx, acme
  Cc: dhowells, davem, torvalds, paulus, linux-arch, linux-kernel, x86


Here are some potential fix ups for perf and other tools.  They need to be
applied on top of the x86 UAPI disintegration patch.

There are five patches:

 (1) Use a makefile $(call ...) function in tools/Makefile to make it easier
     to deal with.

     [NOTE!  I think the rule for selftests_install is wrong since it attempts
      to discard '_clean' from the end of the target name instead of
      '_install']

 (2) Fix handling of O= with a relative path when doing something like:

	make tools/perf O=foo

     from the top-level directory in the kernel source tree for all tools.

 (3) Make perf work for x86 by adding -I flags and changing long #includes
     with "../../include" in them into short <asm/foo.h> type things.

Now there are two patches that I'm not sure whether you want.  There are three
header files with bits used by perf that are not in the UAPI.  If these are
disintegrated then perf does not need to look in any KAPI headers at all and
the -I flag pointing there can be dropped after the first of these patches.

 (4) UAPI disintegrate asm/svm.h and asm/vmx.h.

 (5) UAPI disintegrate asm/perf_regs.h and convert a "../../include" style
     path into <asm/perf_regs.h>.

I'm not sure whether these should be exported to userspace, though this commit:

	commit 26bf264e871a4b9a8ac09c21a2b518e7f23830d5
	Author: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
	Date:   Mon Sep 17 16:31:13 2012 +0800
	KVM: x86: Export svm/vmx exit code and vector code to userspace

suggests that at least the first two should be - though since it didn't modify
Kbuild, this was not effective.

I haven't tried building perf for other arches at this time.

David
---
David Howells (5):
      x86: UAPI Disintegrate asm/perf_regs.h
      x86: Disintegrate asm/svm.h and asm/vmx.h to produce UAPI components for perf
      perf: Make perf build for x86 with UAPI disintegration applied
      tools: Honour the O= flag when tool build called from a higher Makefile
      tools: Define a Makefile function to do subdir processing


 Makefile                                |    6 +
 arch/x86/include/asm/perf_regs.h        |   33 --------
 arch/x86/include/asm/svm.h              |  133 -------------------------------
 arch/x86/include/asm/vmx.h              |   87 --------------------
 arch/x86/include/uapi/asm/perf_regs.h   |   33 ++++++++
 arch/x86/include/uapi/asm/svm.h         |  131 +++++++++++++++++++++++++++++++
 arch/x86/include/uapi/asm/vmx.h         |  108 +++++++++++++++++++++++++
 tools/Makefile                          |   24 +++---
 tools/perf/Makefile                     |   15 +++
 tools/perf/arch/x86/include/perf_regs.h |    2 
 tools/perf/builtin-kvm.c                |    6 +
 tools/perf/perf.h                       |   16 +---
 tools/scripts/Makefile.include          |   18 ++++
 13 files changed, 329 insertions(+), 283 deletions(-)
 delete mode 100644 arch/x86/include/asm/perf_regs.h
 create mode 100644 arch/x86/include/uapi/asm/perf_regs.h
 create mode 100644 arch/x86/include/uapi/asm/svm.h
 create mode 100644 arch/x86/include/uapi/asm/vmx.h


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-10-26  6:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-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-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 ` [PATCH 5/5] x86: UAPI Disintegrate asm/perf_regs.h David Howells
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-26  4:33     ` Namhyung Kim
2012-10-26  6:04       ` Namhyung Kim

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).