* [PATCH] arm64: fix !CONFIG_COMPAT build failures
@ 2014-04-05 14:25 Mark Salter
2014-04-06 22:27 ` Catalin Marinas
0 siblings, 1 reply; 3+ messages in thread
From: Mark Salter @ 2014-04-05 14:25 UTC (permalink / raw)
To: linux-arm-kernel
Recent arm64 builds using CONFIG_ARM64_64K_PAGES are failing with:
arch/arm64/kernel/perf_regs.c: In function ?perf_reg_abi?:
arch/arm64/kernel/perf_regs.c:41:2: error: implicit declaration of function ?is_compat_thread?
arch/arm64/kernel/perf_event.c:1398:2: error: unknown type name ?compat_uptr_t?
This is due to some recent arm64 perf commits with compat support:
commit 23c7d70d55c6d9:
ARM64: perf: add support for frame pointer unwinding in compat mode
commit 2ee0d7fd36a3f8:
ARM64: perf: add support for perf registers API
Those patches make the arm64 kernel unbuildable if CONFIG_COMPAT is not
defined and CONFIG_ARM64_64K_PAGES depends on !CONFIG_COMPAT. This patch
allows the arm64 kernel to build with and without CONFIG_COMPAT.
Signed-off-by: Mark Salter <msalter@redhat.com>
---
arch/arm64/kernel/perf_event.c | 4 ++++
arch/arm64/kernel/perf_regs.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index e868c72..baf5afb 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -1386,6 +1386,7 @@ user_backtrace(struct frame_tail __user *tail,
return buftail.fp;
}
+#ifdef CONFIG_COMPAT
/*
* The registers we're interested in are at the end of the variable
* length saved register structure. The fp points at the end of this
@@ -1430,6 +1431,7 @@ compat_user_backtrace(struct compat_frame_tail __user *tail,
return (struct compat_frame_tail __user *)compat_ptr(buftail.fp) - 1;
}
+#endif /* CONFIG_COMPAT */
void perf_callchain_user(struct perf_callchain_entry *entry,
struct pt_regs *regs)
@@ -1451,6 +1453,7 @@ void perf_callchain_user(struct perf_callchain_entry *entry,
tail && !((unsigned long)tail & 0xf))
tail = user_backtrace(tail, entry);
} else {
+#ifdef CONFIG_COMPAT
/* AARCH32 compat mode */
struct compat_frame_tail __user *tail;
@@ -1459,6 +1462,7 @@ void perf_callchain_user(struct perf_callchain_entry *entry,
while ((entry->nr < PERF_MAX_STACK_DEPTH) &&
tail && !((unsigned long)tail & 0x3))
tail = compat_user_backtrace(tail, entry);
+#endif
}
}
diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c
index f2d6f0a..422ebd6 100644
--- a/arch/arm64/kernel/perf_regs.c
+++ b/arch/arm64/kernel/perf_regs.c
@@ -2,6 +2,8 @@
#include <linux/kernel.h>
#include <linux/perf_event.h>
#include <linux/bug.h>
+
+#include <asm/compat.h>
#include <asm/perf_regs.h>
#include <asm/ptrace.h>
--
1.8.5.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] arm64: fix !CONFIG_COMPAT build failures
2014-04-05 14:25 [PATCH] arm64: fix !CONFIG_COMPAT build failures Mark Salter
@ 2014-04-06 22:27 ` Catalin Marinas
2014-04-07 8:04 ` Jean Pihet
0 siblings, 1 reply; 3+ messages in thread
From: Catalin Marinas @ 2014-04-06 22:27 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Apr 05, 2014 at 03:25:49PM +0100, Mark Salter wrote:
> Recent arm64 builds using CONFIG_ARM64_64K_PAGES are failing with:
>
> arch/arm64/kernel/perf_regs.c: In function ?perf_reg_abi?:
> arch/arm64/kernel/perf_regs.c:41:2: error: implicit declaration of function ?is_compat_thread?
>
> arch/arm64/kernel/perf_event.c:1398:2: error: unknown type name ?compat_uptr_t?
>
> This is due to some recent arm64 perf commits with compat support:
>
> commit 23c7d70d55c6d9:
> ARM64: perf: add support for frame pointer unwinding in compat mode
>
> commit 2ee0d7fd36a3f8:
> ARM64: perf: add support for perf registers API
>
> Those patches make the arm64 kernel unbuildable if CONFIG_COMPAT is not
> defined and CONFIG_ARM64_64K_PAGES depends on !CONFIG_COMPAT. This patch
> allows the arm64 kernel to build with and without CONFIG_COMPAT.
>
> Signed-off-by: Mark Salter <msalter@redhat.com>
Thanks. Applied.
--
Catalin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arm64: fix !CONFIG_COMPAT build failures
2014-04-06 22:27 ` Catalin Marinas
@ 2014-04-07 8:04 ` Jean Pihet
0 siblings, 0 replies; 3+ messages in thread
From: Jean Pihet @ 2014-04-07 8:04 UTC (permalink / raw)
To: linux-arm-kernel
On 7 April 2014 00:27, Catalin Marinas <catalin.marinas@arm.com> wrote:
> On Sat, Apr 05, 2014 at 03:25:49PM +0100, Mark Salter wrote:
>> Recent arm64 builds using CONFIG_ARM64_64K_PAGES are failing with:
>>
>> arch/arm64/kernel/perf_regs.c: In function 'perf_reg_abi':
>> arch/arm64/kernel/perf_regs.c:41:2: error: implicit declaration of function 'is_compat_thread'
>>
>> arch/arm64/kernel/perf_event.c:1398:2: error: unknown type name 'compat_uptr_t'
>>
>> This is due to some recent arm64 perf commits with compat support:
>>
>> commit 23c7d70d55c6d9:
>> ARM64: perf: add support for frame pointer unwinding in compat mode
>>
>> commit 2ee0d7fd36a3f8:
>> ARM64: perf: add support for perf registers API
>>
>> Those patches make the arm64 kernel unbuildable if CONFIG_COMPAT is not
>> defined and CONFIG_ARM64_64K_PAGES depends on !CONFIG_COMPAT. This patch
>> allows the arm64 kernel to build with and without CONFIG_COMPAT.
>>
>> Signed-off-by: Mark Salter <msalter@redhat.com>
>
> Thanks. Applied.
Thanks for tracking the problem!
Jean
>
> --
> Catalin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-07 8:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-05 14:25 [PATCH] arm64: fix !CONFIG_COMPAT build failures Mark Salter
2014-04-06 22:27 ` Catalin Marinas
2014-04-07 8:04 ` Jean Pihet
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).