Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d548a928
Commit
d548a928
authored
Feb 24, 2004
by
Ben Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPARC64: Fix debug spinlocks to not trash random memory with > 4 cpus's (or sparse cpu's).
parent
da57b2aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
arch/sparc64/lib/debuglocks.c
arch/sparc64/lib/debuglocks.c
+6
-3
include/asm-sparc64/spinlock.h
include/asm-sparc64/spinlock.h
+2
-1
No files found.
arch/sparc64/lib/debuglocks.c
View file @
d548a928
...
...
@@ -35,14 +35,17 @@ static inline void show_read (char *str, rwlock_t *lock, unsigned long caller)
static
inline
void
show_write
(
char
*
str
,
rwlock_t
*
lock
,
unsigned
long
caller
)
{
int
cpu
=
smp_processor_id
();
int
i
;
printk
(
"%s(%p) CPU#%d stuck at %08x
\n
"
,
str
,
lock
,
cpu
,
(
unsigned
int
)
caller
);
printk
(
"Writer: PC(%08x):CPU(%x)
\n
"
,
lock
->
writer_pc
,
lock
->
writer_cpu
);
printk
(
"Readers: 0[%08x] 1[%08x] 2[%08x] 4[%08x]
\n
"
,
lock
->
reader_pc
[
0
],
lock
->
reader_pc
[
1
],
lock
->
reader_pc
[
2
],
lock
->
reader_pc
[
3
]);
printk
(
"Readers:"
);
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
if
(
lock
->
reader_pc
[
i
])
printk
(
" %d[%08x]"
,
i
,
lock
->
reader_pc
[
i
]);
printk
(
"
\n
"
);
}
#undef INIT_STUCK
...
...
include/asm-sparc64/spinlock.h
View file @
d548a928
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment