All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] powerpc/lib: fix unsafe register handling in wait_ticks
@ 2013-04-10 20:11 Tom Rini
  0 siblings, 0 replies; only message in thread
From: Tom Rini @ 2013-04-10 20:11 UTC (permalink / raw)
  To: u-boot

On Tue, Apr 09, 2013 at 05:10:59PM +0200, Mats K??rrman wrote:

> 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 <mats.karrman@tritech.se>
> Cc: Wolfgang Denk <wd@denx.de>
> Acked-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
> Tested-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130410/3bd8eb24/attachment.pgp>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-10 20:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10 20:11 [U-Boot] [PATCH 1/1] powerpc/lib: fix unsafe register handling in wait_ticks Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.