summaryrefslogtreecommitdiff
path: root/include/linux/string.h
diff options
context:
space:
mode:
authorMats Kärrman <[email protected]>2013-04-09 17:10:59 +0200
committerTom Rini <[email protected]>2013-04-10 10:31:02 -0400
commitfac150e83f403933e9ffc9d01f858c4a6313874e (patch)
treebb4ba2875fd12abdc370040eb79af5f1125407be /include/linux/string.h
parent645b271a6039e79b368f027a5624dc0820441733 (diff)
powerpc/lib: fix unsafe register handling in wait_ticks
If watchdog is enabled, the arch/powerpc/lib/ticks.S::wait_ticks() function calls the function specified by the WATCHDOG_RESET macro. The wait_ticks function depends on the registers r0, r6 and r7 being preserved however that is not guaranteed, e.g. if the reset function is a C function this will probably overwrite r0 and cause an endless loop. The following patch changes to using r14+r15 instead of r6+r7 (to resemble what would have been generated by a C compiler) and saves all necessary registers on the stack. The patch has been tested on a custom MPC5125 based machine using the 512x powerpc architecture. Signed-off-by: Mats Karrman <[email protected]> Cc: Wolfgang Denk <[email protected]> Acked-by: Joakim Tjernlund <[email protected]> Tested-by: Stefan Roese <[email protected]>
Diffstat (limited to 'include/linux/string.h')
0 files changed, 0 insertions, 0 deletions