mips: Fix build if PERF_EVENTS is configured
PATCH 1/1 mips: Fix build if PERF_EVENTS is configured
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().
---
Compile tested only.
arch/mips/kernel/perf_regs.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/mips/kernel/perf_regs.c +8 -0
@@ -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); +}
Signature · 1 line
2.1.0
Quoted 5 lines · Guenter Roeck
mips builds fail in -next as follows if
PERF_EVENTSis configured.
kernel/built-in.o: In function `perf_sample_regs_user':kernel/events/core.c:4828: undefined reference to `perf_get_regs_user'
Quoted 8 lines
The problem is caused by commit
3478e32c1545("MIPS: Add user stack and registers to perf.") in combination with commit88a7c26af8da("perf:
Movetask_pt_regssampling into arch code"), which introducesperf_get_regs_user().Cc Andy Lutomirski <[email protected]>Cc David Daney <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
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
Quoted 12 lines · Ralf Baechle
Quoted 10 lines · Guenter Roeck
mips builds fail in -next as follows if
PERF_EVENTSis 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 commit88a7c26af8da("perf:
Movetask_pt_regssampling into arch code"), which introducesperf_get_regs_user().
Quoted 8 lines
Quoted 3 lines
Cc Andy Lutomirski <[email protected]>Cc David Daney <[email protected]>Signed-off-by Guenter Roeck <[email protected]>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
Quoted 15 lines · Guenter Roeck
Quoted 7 lines
Quoted 7 lines
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 commit88a7c26af8da("perf:
Movetask_pt_regssampling into arch code"), which introducesperf_get_regs_user().Quoted 8 lines
Quoted 3 lines
Cc Andy Lutomirski <[email protected]>Cc David Daney <[email protected]>Signed-off-by Guenter Roeck <[email protected]>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.
Quoted 5 lines
Hi Ralf,
Does it hurt to have the function if
88a7c26af8dais 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