diff options
| author | Ben Collins <bcollins@debian.org> | 2004-02-24 09:28:21 -0500 |
|---|---|---|
| committer | Ben Collins <bcollins@debian.org> | 2004-02-24 09:28:21 -0500 |
| commit | d548a928a963e41ce9af9bfd73f0b2ffbabd3b43 (patch) | |
| tree | c0a8fe0c678292b6468abeabdd732fc663c5328f /include | |
| parent | da57b2aa0cda1845ad06712c937184cd938fb36e (diff) | |
SPARC64: Fix debug spinlocks to not trash random memory with > 4 cpus's (or sparse cpu's).
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-sparc64/spinlock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index 201472fc01bc..8387816e4ac2 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h @@ -7,6 +7,7 @@ #define __SPARC64_SPINLOCK_H #include <linux/config.h> +#include <linux/threads.h> /* For NR_CPUS */ #ifndef __ASSEMBLY__ @@ -131,7 +132,7 @@ extern int __write_trylock(rwlock_t *); typedef struct { unsigned long lock; unsigned int writer_pc, writer_cpu; - unsigned int reader_pc[4]; + unsigned int reader_pc[NR_CPUS]; } rwlock_t; #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0, 0xff, { 0, 0, 0, 0 } } #define rwlock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; } while(0) |
