From: David Gibson <david@gibson.dropbear.id.au>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: Anton Blanchard <anton@samba.org>,
Paul Mackerras <paulus@samba.org>,
linux-kernel@vger.kernel.org, linuxppc64-dev@lists.linuxppc.org
Subject: POWER5 erratum workaround
Date: Thu, 29 Apr 2004 11:49:59 +1000 [thread overview]
Message-ID: <20040429014959.GA18309@zax> (raw)
Linus, please apply:
Early POWER5 revisions (<DD2.1) have a problem requiring slbie
instructions to be repeated under some circumstances. The patch below
adds a workaround (patch made by Anton Blanchard).
Index: working-2.6/arch/ppc64/kernel/entry.S
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/entry.S 2004-04-20 11:04:31.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/entry.S 2004-04-28 14:30:30.069407648 +1000
@@ -311,6 +311,7 @@
beq 2f /* if yes, don't slbie it */
oris r6,r6,0x0800 /* set C (class) bit */
slbie r6
+ slbie r6 /* Workaround POWER5 < DD2.1 issue */
2:
END_FTR_SECTION_IFSET(CPU_FTR_SLB)
clrrdi r7,r8,THREAD_SHIFT /* base of new stack */
Index: working-2.6/arch/ppc64/kernel/stab.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/stab.c 2004-03-12 10:35:23.000000000 +1100
+++ working-2.6/arch/ppc64/kernel/stab.c 2004-04-28 14:33:48.446331536 +1000
@@ -474,14 +474,14 @@
void flush_slb(struct task_struct *tsk, struct mm_struct *mm)
{
unsigned long offset = __get_cpu_var(stab_cache_ptr);
+ union {
+ unsigned long word0;
+ slb_dword0 data;
+ } esid_data;
+
if (offset <= NR_STAB_CACHE_ENTRIES) {
int i;
- union {
- unsigned long word0;
- slb_dword0 data;
- } esid_data;
-
asm volatile("isync" : : : "memory");
for (i = 0; i < offset; i++) {
esid_data.word0 = 0;
@@ -493,6 +493,17 @@
asm volatile("isync; slbia; isync" : : : "memory");
}
+ /* Workaround POWER5 < DD2.1 issue */
+ if (offset == 1 || offset > NR_STAB_CACHE_ENTRIES) {
+ /*
+ * flush segment in EEH region, we dont normally access
+ * addresses in this region.
+ */
+ esid_data.word0 = 0;
+ esid_data.data.esid = EEH_REGION_ID;
+ asm volatile("slbie %0" : : "r" (esid_data));
+ }
+
__get_cpu_var(stab_cache_ptr) = 0;
preload_slb(tsk, mm);
--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
reply other threads:[~2004-04-29 1:54 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=20040429014959.GA18309@zax \
--to=david@gibson.dropbear.id.au \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=paulus@samba.org \
--cc=torvalds@osdl.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