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
c461783b
Commit
c461783b
authored
Mar 10, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Drop unused NEW_LOCK spinlock code and clean up unneeded test
in kernel unwinder.
parent
96fd6d6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
60 deletions
+1
-60
arch/ia64/kernel/unwind.c
arch/ia64/kernel/unwind.c
+0
-5
include/asm-ia64/spinlock.h
include/asm-ia64/spinlock.h
+1
-55
No files found.
arch/ia64/kernel/unwind.c
View file @
c461783b
...
...
@@ -318,11 +318,6 @@ unw_access_gr (struct unw_frame_info *info, int regnum, unsigned long *val, char
}
}
else
{
/* access a scratch register */
if
(
!
info
->
pt
)
{
UNW_DPRINT
(
0
,
"unwind.%s: no pt-regs; cannot access r%d
\n
"
,
__FUNCTION__
,
regnum
);
return
-
1
;
}
pt
=
get_scratch_regs
(
info
);
addr
=
(
unsigned
long
*
)
(
pt
+
pt_regs_off
(
regnum
));
if
(
info
->
pri_unat_loc
)
...
...
include/asm-ia64/spinlock.h
View file @
c461783b
...
...
@@ -2,7 +2,7 @@
#define _ASM_IA64_SPINLOCK_H
/*
* Copyright (C) 1998-200
2
Hewlett-Packard Co
* Copyright (C) 1998-200
3
Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
* Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
*
...
...
@@ -15,58 +15,6 @@
#include <asm/bitops.h>
#include <asm/atomic.h>
#undef NEW_LOCK
#ifdef NEW_LOCK
typedef
struct
{
volatile
unsigned
int
lock
;
}
spinlock_t
;
#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
#define spin_lock_init(x) ((x)->lock = 0)
/*
* Streamlined test_and_set_bit(0, (x)). We use test-and-test-and-set
* rather than a simple xchg to avoid writing the cache-line when
* there is contention.
*/
#define _raw_spin_lock(x) \
{ \
register char *addr __asm__ ("r31") = (char *) &(x)->lock; \
\
__asm__ __volatile__ ( \
"mov r30=1\n" \
"mov ar.ccv=r0\n" \
";;\n" \
"cmpxchg4.acq r30=[%0],r30,ar.ccv\n" \
";;\n" \
"cmp.ne p15,p0=r30,r0\n" \
"(p15) br.call.spnt.few b7=ia64_spinlock_contention\n" \
";;\n" \
"1:\n"
/* force a new bundle */
\
:: "r"(addr) \
: "ar.ccv", "ar.pfs", "b7", "p15", "r28", "r29", "r30", "memory"); \
}
#define _raw_spin_trylock(x) \
({ \
register long result; \
\
__asm__ __volatile__ ( \
"mov ar.ccv=r0\n" \
";;\n" \
"cmpxchg4.acq %0=[%2],%1,ar.ccv\n" \
: "=r"(result) : "r"(1), "r"(&(x)->lock) : "ar.ccv", "memory"); \
(result == 0); \
})
#define spin_is_locked(x) ((x)->lock != 0)
#define _raw_spin_unlock(x) do { barrier(); ((spinlock_t *) x)->lock = 0;} while (0)
#define spin_unlock_wait(x) do { barrier(); } while ((x)->lock)
#else
/* !NEW_LOCK */
typedef
struct
{
volatile
unsigned
int
lock
;
}
spinlock_t
;
...
...
@@ -123,8 +71,6 @@ do { \
#define _raw_spin_trylock(x) (cmpxchg_acq(&(x)->lock, 0, 1) == 0)
#define spin_unlock_wait(x) do { barrier(); } while ((x)->lock)
#endif
/* !NEW_LOCK */
typedef
struct
{
volatile
int
read_counter
:
31
;
volatile
int
write_lock
:
1
;
...
...
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