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
cb349152
Commit
cb349152
authored
Feb 03, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Add ndelay.
parent
c98a2447
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+10
-0
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sparc_ksyms.c
+1
-0
include/asm-sparc/delay.h
include/asm-sparc/delay.h
+1
-0
include/asm-sparc64/delay.h
include/asm-sparc64/delay.h
+14
-0
No files found.
arch/sparc/kernel/entry.S
View file @
cb349152
...
...
@@ -1808,6 +1808,15 @@ C_LABEL(fpload):
retl
nop
.
globl
C_LABEL
(
ndelay
)
C_LABEL
(
ndelay
):
save
%
sp
,
-
REGWIN_SZ
,
%
sp
mov
%
i0
,
%
o0
call
.
umul
mov
5
,
%
o1
ba
delay_continue
nop
.
globl
C_LABEL
(
udelay
)
C_LABEL
(
udelay
):
save
%
sp
,
-
REGWIN_SZ
,
%
sp
...
...
@@ -1815,6 +1824,7 @@ C_LABEL(udelay):
sethi
%
hi
(
0x10c6
),
%
o1
call
.
umul
or
%
o1
,
%
lo
(
0x10c6
),
%
o1
delay_continue
:
#ifndef CONFIG_SMP
sethi
%
hi
(
C_LABEL
(
loops_per_jiffy
)),
%
o3
call
.
umul
...
...
arch/sparc/kernel/sparc_ksyms.c
View file @
cb349152
...
...
@@ -151,6 +151,7 @@ EXPORT_SYMBOL(__cpu_logical_map);
#endif
EXPORT_SYMBOL
(
udelay
);
EXPORT_SYMBOL
(
ndelay
);
EXPORT_SYMBOL
(
mostek_lock
);
EXPORT_SYMBOL
(
mstk48t02_regs
);
#if CONFIG_SUN_AUXIO
...
...
include/asm-sparc/delay.h
View file @
cb349152
...
...
@@ -21,5 +21,6 @@ extern __inline__ void __delay(unsigned long loops)
/* This is too messy with inline asm on the Sparc. */
extern
void
udelay
(
unsigned
long
usecs
);
extern
void
ndelay
(
unsigned
long
usecs
);
#endif
/* defined(__SPARC_DELAY_H) */
include/asm-sparc64/delay.h
View file @
cb349152
...
...
@@ -45,6 +45,19 @@ static __inline__ void __udelay(unsigned long usecs, unsigned long lps)
__delay
(
usecs
*
HZ
);
}
extern
__inline__
void
__ndelay
(
unsigned
long
usecs
,
unsigned
long
lps
)
{
usecs
*=
0x0000000000000005UL
;
/* 2**32 / 10000 */
__asm__
__volatile__
(
" mulx %1, %2, %0
\n
"
" srlx %0, 32, %0
\n
"
:
"=r"
(
usecs
)
:
"r"
(
usecs
),
"r"
(
lps
));
__delay
(
usecs
*
HZ
);
}
#ifdef CONFIG_SMP
#define __udelay_val cpu_data[smp_processor_id()].udelay_val
#else
...
...
@@ -52,6 +65,7 @@ static __inline__ void __udelay(unsigned long usecs, unsigned long lps)
#endif
#define udelay(usecs) __udelay((usecs),__udelay_val)
#define ndelay(usecs) __ndelay((usecs),__udelay_val)
#endif
/* !__ASSEMBLY__ */
...
...
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