From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: axp-list@redhat.com
Cc: linux-alpha@vger.rutgers.edu
Subject: [patch] L1_CACHE_BYTES on ev6 (2.4.0x)
Date: Mon, 31 Jul 2000 20:09:22 +0400 [thread overview]
Message-ID: <20000731200922.A2054@jurassic.park.msu.ru> (raw)
Currently L1_CACHE_BYTES is defined as 32 for ev6. Increasing this
to 64 (as it should be) broke networking.
Most probably the reason is in the entry.S:
ret_from_sys_call:
cmovne $26,0,$19 /* $19 = 0 => non-restartable */
ldl $3,TASK_PROCESSOR($8)
lda $4,softirq_state
sll $3,5,$3
^^^^^^^^^^^^^^^
addq $3,$4,$4
ldq $4,0($4)
...
sizeof(struct softirq_state) hardcoded to 32 here, although
it depends on SMP_CACHE_BYTES (see include/linux/interrupt.h).
Could someone try this patch on ev6 SMP boxes?
Ivan.
diff -ur 2.4.0t5/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- 2.4.0t5/arch/alpha/kernel/entry.S Tue Jul 25 09:46:40 2000
+++ linux/arch/alpha/kernel/entry.S Mon Jul 31 17:40:30 2000
@@ -6,6 +6,7 @@
#include <linux/config.h>
#include <asm/system.h>
+#include <asm/cache.h>
#define SIGCHLD 20
@@ -577,7 +578,7 @@
cmovne $26,0,$19 /* $19 = 0 => non-restartable */
ldl $3,TASK_PROCESSOR($8)
lda $4,softirq_state
- sll $3,5,$3
+ sll $3,L1_CACHE_SHIFT,$3
addq $3,$4,$4
ldq $4,0($4)
sll $4,32,$3
diff -ur 2.4.0t5/include/asm-alpha/cache.h linux/include/asm-alpha/cache.h
--- 2.4.0t5/include/asm-alpha/cache.h Thu Jun 22 09:30:59 2000
+++ linux/include/asm-alpha/cache.h Mon Jul 31 17:51:11 2000
@@ -8,12 +8,14 @@
/* Bytes per L1 (data) cache line. */
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_EV6)
-# define L1_CACHE_BYTES 32 /* should be 64, but networking dies */
+# define L1_CACHE_BYTES 64
+# define L1_CACHE_SHIFT 6
#else
/* Both EV4 and EV5 are write-through, read-allocate,
direct-mapped, physical.
*/
# define L1_CACHE_BYTES 32
+# define L1_CACHE_SHIFT 5
#endif
#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
next reply other threads:[~2000-07-31 16:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-31 16:09 Ivan Kokshaysky [this message]
2000-08-01 12:42 ` [patch] L1_CACHE_BYTES on ev6 (2.4.0x) Martin Frey
2000-08-01 14:04 ` Ivan Kokshaysky
2000-08-10 1:54 ` [patch] write hint for clearing pages werner
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox