From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] powerpc/lib: fix unsafe register handling in wait_ticks
Date: Wed, 10 Apr 2013 16:11:40 -0400 [thread overview]
Message-ID: <20130410201140.GF9914@bill-the-cat> (raw)
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>
reply other threads:[~2013-04-10 20:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130410201140.GF9914@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox