* [PATCH] mips: Fix build if PERF_EVENTS is configured
@ 2015-04-08 20:29 Guenter Roeck
2015-04-09 0:09 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2015-04-08 20:29 UTC (permalink / raw)
To: Ralf Baechle
Cc: linux-mips, linux-kernel, Guenter Roeck, Andy Lutomirski,
David Daney
mips builds fail in -next as follows if PERF_EVENTS is configured.
kernel/built-in.o: In function `perf_sample_regs_user':
kernel/events/core.c:4828: undefined reference to `perf_get_regs_user'
The problem is caused by commit 3478e32c1545 ("MIPS: Add user stack and
registers to perf.") in combination with commit 88a7c26af8da ("perf:
Move task_pt_regs sampling into arch code"), which introduces
perf_get_regs_user().
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: David Daney <david.daney@cavium.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
Compile tested only.
arch/mips/kernel/perf_regs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/mips/kernel/perf_regs.c b/arch/mips/kernel/perf_regs.c
index 0451c4b..5b04454 100644
--- a/arch/mips/kernel/perf_regs.c
+++ b/arch/mips/kernel/perf_regs.c
@@ -58,3 +58,11 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
return (s64)v; /* Sign extend if 32-bit. */
}
+
+void perf_get_regs_user(struct perf_regs *regs_user,
+ struct pt_regs *regs,
+ struct pt_regs *regs_user_copy)
+{
+ regs_user->regs = task_pt_regs(current);
+ regs_user->abi = perf_reg_abi(current);
+}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] mips: Fix build if PERF_EVENTS is configured
2015-04-08 20:29 [PATCH] mips: Fix build if PERF_EVENTS is configured Guenter Roeck
@ 2015-04-09 0:09 ` Ralf Baechle
2015-04-09 3:40 ` Guenter Roeck
0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2015-04-09 0:09 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-mips, linux-kernel, Andy Lutomirski, David Daney
On Wed, Apr 08, 2015 at 01:29:52PM -0700, Guenter Roeck wrote:
> mips builds fail in -next as follows if PERF_EVENTS is configured.
>
> kernel/built-in.o: In function `perf_sample_regs_user':
> kernel/events/core.c:4828: undefined reference to `perf_get_regs_user'
>
> The problem is caused by commit 3478e32c1545 ("MIPS: Add user stack and
> registers to perf.") in combination with commit 88a7c26af8da ("perf:
> Move task_pt_regs sampling into arch code"), which introduces
> perf_get_regs_user().
>
> Cc: Andy Lutomirski <luto@amacapital.net>
> Cc: David Daney <david.daney@cavium.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
I've already applied the same change locally but due to patch ordering
constraints I'm considering to temporarily pull this patch until the
perf stuff and the remainder of the MIPS changes are in 4.1 or so.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mips: Fix build if PERF_EVENTS is configured
2015-04-09 0:09 ` Ralf Baechle
@ 2015-04-09 3:40 ` Guenter Roeck
2015-04-10 14:05 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2015-04-09 3:40 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, linux-kernel, Andy Lutomirski, David Daney
On 04/08/2015 05:09 PM, Ralf Baechle wrote:
> On Wed, Apr 08, 2015 at 01:29:52PM -0700, Guenter Roeck wrote:
>
>> mips builds fail in -next as follows if PERF_EVENTS is configured.
>>
>> kernel/built-in.o: In function `perf_sample_regs_user':
>> kernel/events/core.c:4828: undefined reference to `perf_get_regs_user'
>>
>> The problem is caused by commit 3478e32c1545 ("MIPS: Add user stack and
>> registers to perf.") in combination with commit 88a7c26af8da ("perf:
>> Move task_pt_regs sampling into arch code"), which introduces
>> perf_get_regs_user().
>>
>> Cc: Andy Lutomirski <luto@amacapital.net>
>> Cc: David Daney <david.daney@cavium.com>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>
> I've already applied the same change locally but due to patch ordering
> constraints I'm considering to temporarily pull this patch until the
> perf stuff and the remainder of the MIPS changes are in 4.1 or so.
>
Hi Ralf,
Does it hurt to have the function if 88a7c26af8da is not in the tree ?
Sure, you'll get a smatch and/or sparse warning, but I would consider that
to be less severe than build failures.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mips: Fix build if PERF_EVENTS is configured
2015-04-09 3:40 ` Guenter Roeck
@ 2015-04-10 14:05 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2015-04-10 14:05 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-mips, linux-kernel, Andy Lutomirski, David Daney
On Wed, Apr 08, 2015 at 08:40:08PM -0700, Guenter Roeck wrote:
> >>kernel/events/core.c:4828: undefined reference to `perf_get_regs_user'
> >>
> >>The problem is caused by commit 3478e32c1545 ("MIPS: Add user stack and
> >>registers to perf.") in combination with commit 88a7c26af8da ("perf:
> >>Move task_pt_regs sampling into arch code"), which introduces
> >>perf_get_regs_user().
> >>
> >>Cc: Andy Lutomirski <luto@amacapital.net>
> >>Cc: David Daney <david.daney@cavium.com>
> >>Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> >
> >I've already applied the same change locally but due to patch ordering
> >constraints I'm considering to temporarily pull this patch until the
> >perf stuff and the remainder of the MIPS changes are in 4.1 or so.
> >
> Hi Ralf,
>
> Does it hurt to have the function if 88a7c26af8da is not in the tree ?
> Sure, you'll get a smatch and/or sparse warning, but I would consider that
> to be less severe than build failures.
There are other dependencies between the pending MIPS perf patches, the
remainder of the pending MIPS patches and upstream perf patches for 4.1
and all in all I've decided it's too much headache and I should rather wait.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-10 14:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 20:29 [PATCH] mips: Fix build if PERF_EVENTS is configured Guenter Roeck
2015-04-09 0:09 ` Ralf Baechle
2015-04-09 3:40 ` Guenter Roeck
2015-04-10 14:05 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox