mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: eranian@google.com, dsahern@gmail.com, fweisbec@gmail.com,
	mingo@kernel.org, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, adrian.hunter@intel.com, jolsa@redhat.com,
	namhyung@kernel.org, hpa@zytor.com, acme@redhat.com, bp@suse.de
Subject: [tip:perf/urgent] tools: Copy lib/ hweight.c from the kernel sources
Date: Fri, 10 Jul 2015 01:15:07 -0700	[thread overview]
Message-ID: <tip-oyqx541o7apa2cskjhcxi6nx@git.kernel.org> (raw)

Commit-ID:  0aefc3590afcc9ecbe173fc01fccbda0869d2f0a
Gitweb:     http://git.kernel.org/tip/0aefc3590afcc9ecbe173fc01fccbda0869d2f0a
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Thu, 9 Jul 2015 16:27:25 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 9 Jul 2015 16:29:56 -0300

tools: Copy lib/hweight.c from the kernel sources

Instead of accessing it directly, as it uses EXPORT_SYMBOL, that has
no meaning in tools/perf and because we removed the stubs for it, i.e.
we removed the tools/include/linux/export.h file.

This fixes the build for the detached tarball sources cases and removes
one more source of entanglement with the kernel sources.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-oyqx541o7apa2cskjhcxi6nx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 {lib => tools/lib}/hweight.c       | 5 -----
 tools/perf/MANIFEST                | 2 +-
 tools/perf/util/Build              | 2 +-
 tools/perf/util/python-ext-sources | 2 +-
 4 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/lib/hweight.c b/tools/lib/hweight.c
similarity index 92%
copy from lib/hweight.c
copy to tools/lib/hweight.c
index 9a5c1f2..0b859b8 100644
--- a/lib/hweight.c
+++ b/tools/lib/hweight.c
@@ -1,4 +1,3 @@
-#include <linux/export.h>
 #include <linux/bitops.h>
 #include <asm/types.h>
 
@@ -24,7 +23,6 @@ unsigned int __sw_hweight32(unsigned int w)
 	return (res + (res >> 16)) & 0x000000FF;
 #endif
 }
-EXPORT_SYMBOL(__sw_hweight32);
 
 unsigned int __sw_hweight16(unsigned int w)
 {
@@ -33,7 +31,6 @@ unsigned int __sw_hweight16(unsigned int w)
 	res = (res + (res >> 4)) & 0x0F0F;
 	return (res + (res >> 8)) & 0x00FF;
 }
-EXPORT_SYMBOL(__sw_hweight16);
 
 unsigned int __sw_hweight8(unsigned int w)
 {
@@ -41,7 +38,6 @@ unsigned int __sw_hweight8(unsigned int w)
 	res = (res & 0x33) + ((res >> 2) & 0x33);
 	return (res + (res >> 4)) & 0x0F;
 }
-EXPORT_SYMBOL(__sw_hweight8);
 
 unsigned long __sw_hweight64(__u64 w)
 {
@@ -64,4 +60,3 @@ unsigned long __sw_hweight64(__u64 w)
 #endif
 #endif
 }
-EXPORT_SYMBOL(__sw_hweight64);
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index 09dc0aa..d01a0aa 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -18,6 +18,7 @@ tools/arch/x86/include/asm/atomic.h
 tools/arch/x86/include/asm/rmwcc.h
 tools/lib/traceevent
 tools/lib/api
+tools/lib/hweight.c
 tools/lib/rbtree.c
 tools/lib/symbol/kallsyms.c
 tools/lib/symbol/kallsyms.h
@@ -57,7 +58,6 @@ include/linux/perf_event.h
 include/linux/list.h
 include/linux/hash.h
 include/linux/stringify.h
-lib/hweight.c
 include/linux/swab.h
 arch/*/include/asm/unistd*.h
 arch/*/include/uapi/asm/unistd*.h
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 601d114..d2d318c 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -143,6 +143,6 @@ $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
 	$(call rule_mkdir)
 	$(call if_changed_dep,cc_o_c)
 
-$(OUTPUT)util/hweight.o: ../../lib/hweight.c FORCE
+$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
 	$(call rule_mkdir)
 	$(call if_changed_dep,cc_o_c)
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index de05e04..0766d98 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -10,7 +10,7 @@ util/ctype.c
 util/evlist.c
 util/evsel.c
 util/cpumap.c
-../../lib/hweight.c
+../lib/hweight.c
 util/thread_map.c
 util/util.c
 util/xyarray.c

                 reply	other threads:[~2015-07-10  8:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=tip-oyqx541o7apa2cskjhcxi6nx@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®