mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
perf/urgent fixes:
User visible: - Fix misplaced check for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT in the auxtrace code, which made 'perf record' fail straight away in some architectures, even when auxtrace wasn't involved. (Adrian Hunter) Developer stuff: - Really allow to specify custom CC, AR or LD (Alexey Brodkin) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVpnm5AAoJENZQFvNTUqpAwFYP/RkuHUpessvcueUR+xXAr6WR ANvg8rl7Wgn3hsZbH+1Hwg+BoBobR3IkmPqXBbgCvoquRm8+ozC+1GV03ng2lIRE e/IHDbp6Pq5xlTHgQlEUVWwrb7qutTUiO3+dxuVBGjyQfHwTm69R/3NCMpmAf4bl 9f6VYT9SG6YAdUe5+upQX4vrS8RRAAv5G7T1hOY3b3lNXUb2ex0ZtwP2feZ5m98y fQqRNJ8JB7os2iOt22mpAykCtVWrix1HMkEe2/alFvElnlVUjZj+ZCCO8m6/1NT4 gQboneLobAdhEqBiUXmQ1VflKnDOp7k65uktsJZqIR91qcshT7qVO7IX3TccmI9L MTXOcLrKNA7hMu55FVRLhsw0hQOmED1hEgIokhU0vHIiTUqtmoYAajsccrDGwUXr 0HnMsoPISgGMBKktBwTl3Yn6Jb09BnuFB9G4awig3oHucKwZ/WVySjfyPTemMcTP 2a0zVO3aAy6+orbfSG7e1sUSuvRs+Qer8p9MmyFlcITMTJpEOvHD4jca2DOvdRX1 8mCS2Jf+Vn8OiOo6O80DlAIpVpGVYPsvCu6UQ6nS8gx8XUYvDQ1zQBcs/LJCBh5A Le2hMIi07FLAhA8cmaNN/ZHhcjWx/iXRI4HhTQc46+gfsQhc7pywzppKQ7big3e5 ANJwXKq6m+yb9oflWSXR =fP9H -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix misplaced check for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT in the auxtrace code, which made 'perf record' fail straight away in some architectures, even when auxtrace wasn't involved. (Adrian Hunter) - Really allow to specify custom CC, AR or LD (Alexey Brodkin) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
a6acd6a411
2 changed files with 21 additions and 8 deletions
|
@ -109,9 +109,22 @@ $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD
|
|||
$(Q)$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
|
||||
$(Q)touch $(OUTPUT)PERF-VERSION-FILE
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD ?= $(CROSS_COMPILE)ld
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
# Makefiles suck: This macro sets a default value of $(2) for the
|
||||
# variable named by $(1), unless the variable has been set by
|
||||
# environment or command line. This is necessary for CC and AR
|
||||
# because make sets default values, so the simpler ?= approach
|
||||
# won't work as expected.
|
||||
define allow-override
|
||||
$(if $(or $(findstring environment,$(origin $(1))),\
|
||||
$(findstring command line,$(origin $(1)))),,\
|
||||
$(eval $(1) = $(2)))
|
||||
endef
|
||||
|
||||
# Allow setting CC and AR and LD, or setting CROSS_COMPILE as a prefix.
|
||||
$(call allow-override,CC,$(CROSS_COMPILE)gcc)
|
||||
$(call allow-override,AR,$(CROSS_COMPILE)ar)
|
||||
$(call allow-override,LD,$(CROSS_COMPILE)ld)
|
||||
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
|
||||
RM = rm -f
|
||||
|
|
|
@ -53,11 +53,6 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
|
|||
{
|
||||
struct perf_event_mmap_page *pc = userpg;
|
||||
|
||||
#if BITS_PER_LONG != 64 && !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
|
||||
pr_err("Cannot use AUX area tracing mmaps\n");
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
WARN_ONCE(mm->base, "Uninitialized auxtrace_mmap\n");
|
||||
|
||||
mm->userpg = userpg;
|
||||
|
@ -73,6 +68,11 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if BITS_PER_LONG != 64 && !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
|
||||
pr_err("Cannot use AUX area tracing mmaps\n");
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
pc->aux_offset = mp->offset;
|
||||
pc->aux_size = mp->len;
|
||||
|
||||
|
|
Loading…
Reference in a new issue