Patch Upstream: hw_breakpoints, powerpc: Fix CONFIG_HAVE_HW_BREAKPOINT off-case in ptrace_set_debugreg()
Quoted 18 lines · James Bottomley
commit:
925f83c085e1bb08435556c5b4844a60de002e31
From: Frederic Weisbecker <[email protected]>
Date: Fri, 6 May 2011 01:53:18 +0200
Subject: [PATCH]hw_breakpoints, powerpc: FixCONFIG_HAVE_HW_BREAKPOINT
off-case inptrace_set_debugreg()We make use of
ptrace_get_breakpoints()/ptrace_put_breakpoints()to protectptrace_set_debugreg()even ifCONFIG_HAVE_HW_BREAKPOINTif off. However in this case, these APIs are not implemented.To fix this, push the protection down inside the relevant ifdef. Best would be to export the code inside
CONFIG_HAVE_HW_BREAKPOINTinto a standalone function to cleanup the ifdefury there and call the breakpoint ref API inside. But as it is more invasive, this should be rather made in an -rc1.Fixes this build error:
Quoted 7 lines
arch/powerpc/kernel/ptrace.c:1594: error: implicit declaration of function 'ptrace_get_breakpoints' make[2]: ***Reported-by Ingo Molnar <[email protected]>Signed-off-by Frederic Weisbecker <[email protected]>Cc LPPC <[email protected]>Cc Prasad <[email protected]>Cc v2.6.33.. <[email protected]>
This patch applied after I tweaked it to the .38-stable tree, but it doesn't apply at all to 2.6.33-stable. If someone wants to see it there, please send a backported patch to [email protected].