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
Kirill Smelkov
linux
Commits
50c7146f
Commit
50c7146f
authored
Jul 22, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Uninline _raw_spin_lock too, saves ~30K in defconfig image.
parent
84e47b6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sparc64_ksyms.c
+1
-0
arch/sparc64/lib/splock.S
arch/sparc64/lib/splock.S
+12
-0
include/asm-sparc64/spinlock.h
include/asm-sparc64/spinlock.h
+2
-16
No files found.
arch/sparc64/kernel/sparc64_ksyms.c
View file @
50c7146f
...
...
@@ -135,6 +135,7 @@ EXPORT_SYMBOL(__write_lock);
EXPORT_SYMBOL
(
__write_unlock
);
EXPORT_SYMBOL
(
__write_trylock
);
/* Out of line spin-locking implementation. */
EXPORT_SYMBOL
(
_raw_spin_lock
);
EXPORT_SYMBOL
(
_raw_spin_lock_flags
);
#endif
...
...
arch/sparc64/lib/splock.S
View file @
50c7146f
...
...
@@ -6,6 +6,18 @@
.
text
.
align
64
.
globl
_raw_spin_lock
_raw_spin_lock
:
/
*
%
o0
=
lock_ptr
*/
1
:
ldstub
[%
o0
],
%
g7
brnz
,
pn
%
g7
,
2
f
membar
#
StoreLoad
|
#
StoreStore
retl
nop
2
:
ldub
[%
o0
],
%
g7
brnz
,
pt
%
g7
,
2
b
membar
#
LoadLoad
ba
,
a
,
pt
%
xcc
,
1
b
.
globl
_raw_spin_lock_flags
_raw_spin_lock_flags
:
/
*
%
o0
=
lock_ptr
,
%
o1
=
irq_flags
*/
1
:
ldstub
[%
o0
],
%
g7
...
...
include/asm-sparc64/spinlock.h
View file @
50c7146f
...
...
@@ -41,22 +41,8 @@ typedef unsigned char spinlock_t;
do { membar("#LoadLoad"); \
} while(*((volatile unsigned char *)lock))
static
__inline__
void
_raw_spin_lock
(
spinlock_t
*
lock
)
{
__asm__
__volatile__
(
"1: ldstub [%0], %%g7
\n
"
" brnz,pn %%g7, 2f
\n
"
" membar #StoreLoad | #StoreStore
\n
"
" .subsection 2
\n
"
"2: ldub [%0], %%g7
\n
"
" brnz,pt %%g7, 2b
\n
"
" membar #LoadLoad
\n
"
" b,a,pt %%xcc, 1b
\n
"
" .previous
\n
"
:
/* no outputs */
:
"r"
(
lock
)
:
"g7"
,
"memory"
);
}
/* arch/sparc64/lib/spinlock.S */
extern
void
_raw_spin_lock
(
spinlock_t
*
lock
);
static
__inline__
int
_raw_spin_trylock
(
spinlock_t
*
lock
)
{
...
...
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