powerpc/perf: Consolidate perf_callchain_user_[64|32]()

perf_callchain_user_64() and perf_callchain_user_32() are nearly
identical. Consolidate into one function with thin wrappers.

Suggested-by: Nicholas Piggin <[email protected]>
Signed-off-by: Michal Suchanek <[email protected]>
[mpe: Adapt to copy_from_user_nofault(), minor formatting]
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
3 files changed