From: Gabriel Paubert <paubert@iram.es>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] [POWERPC] ppc32: Fix errata for 603 CPUs
Date: Mon, 21 Apr 2008 22:19:59 +0200 [thread overview]
Message-ID: <20080421201959.GA2281@iram.es> (raw)
In-Reply-To: <Pine.LNX.4.64.0804211457010.8003@blarg.am.freescale.net>
On Mon, Apr 21, 2008 at 02:57:47PM -0500, Kumar Gala wrote:
> 603 CPUs have the same issue that some 750 CPUs have in that they can crash
> in funny ways if a store from an FPU register instruction is executed on a
> register that has never been initialized since power on. This patch fixes
> it by making sure all FP registers have been properly initialized at kernel
> boot.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>
> Paul, I've put this into my powerpc-next tree since its a pretty trivial
> patch.
>
> - k
>
> arch/powerpc/kernel/cpu_setup_6xx.S | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S
> index f1ee0b3..4a1c3cd 100644
> --- a/arch/powerpc/kernel/cpu_setup_6xx.S
> +++ b/arch/powerpc/kernel/cpu_setup_6xx.S
> @@ -17,7 +17,14 @@
> #include <asm/cache.h>
>
> _GLOBAL(__setup_cpu_603)
> - b setup_common_caches
> + mflr r4
> +BEGIN_FTR_SECTION
> + bl __init_fpu_registers
> +END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE)
> + bl __init_fpu_registers
I don't understand that code.
What does the second bl __init_fpu_regiters do?
As I understand it, the first one is conditional on the presence
of an FPU (reasonable). But the secone one makes no sense.
Finally wouldn't it be simpler to initialize the FPU on all CPU
that have it?
> + bl setup_common_caches
> + mtlr r4
> + blr
You can use tail call elimination and save one instruction there :-)
Regards,
Gabriel
next prev parent reply other threads:[~2008-04-21 20:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 19:57 [PATCH] [POWERPC] ppc32: Fix errata for 603 CPUs Kumar Gala
2008-04-21 20:19 ` Gabriel Paubert [this message]
2008-04-21 20:25 ` Kumar Gala
2008-04-21 21:22 ` Benjamin Herrenschmidt
2008-04-21 22:04 ` Kumar Gala
2008-04-21 22:12 ` Benjamin Herrenschmidt
2008-04-21 22:31 ` Kumar Gala
2008-04-21 22:39 ` Benjamin Herrenschmidt
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=20080421201959.GA2281@iram.es \
--to=paubert@iram.es \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).