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
86e72865
Commit
86e72865
authored
Feb 18, 2003
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ALPHA] Implement ndelay.
parent
0b38ba77
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
21 deletions
+27
-21
arch/alpha/kernel/alpha_ksyms.c
arch/alpha/kernel/alpha_ksyms.c
+0
-4
arch/alpha/lib/udelay.c
arch/alpha/lib/udelay.c
+24
-16
include/asm-alpha/delay.h
include/asm-alpha/delay.h
+3
-1
No files found.
arch/alpha/kernel/alpha_ksyms.c
View file @
86e72865
...
...
@@ -119,10 +119,6 @@ EXPORT_SYMBOL(__constant_c_memset);
EXPORT_SYMBOL
(
copy_page
);
EXPORT_SYMBOL
(
clear_page
);
EXPORT_SYMBOL
(
__delay
);
EXPORT_SYMBOL
(
__udelay
);
EXPORT_SYMBOL
(
udelay
);
EXPORT_SYMBOL
(
__direct_map_base
);
EXPORT_SYMBOL
(
__direct_map_size
);
...
...
arch/alpha/lib/udelay.c
View file @
86e72865
#include <linux/config.h>
#include <linux/sched.h>
/* for udelay's use of smp_processor_id */
#include <asm/param.h>
#include <asm/smp.h>
#include <linux/delay.h>
/*
* Copyright (C) 1993, 2000 Linus Torvalds
*
* Delay routines, using a pre-computed "loops_per_jiffy" value.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
/* for udelay's use of smp_processor_id */
#include <asm/param.h>
#include <asm/smp.h>
#include <linux/delay.h>
/*
* Use only for very small delays (< 1 msec).
*
...
...
@@ -18,7 +19,8 @@
* a 1GHz box, that's about 2 seconds.
*/
void
__delay
(
int
loops
)
void
__delay
(
int
loops
)
{
int
tmp
;
__asm__
__volatile__
(
...
...
@@ -30,18 +32,24 @@ void __delay(int loops)
:
"=&r"
(
tmp
),
"=r"
(
loops
)
:
"1"
(
loops
));
}
void
__udelay
(
unsigned
long
usecs
,
unsigned
long
lpj
)
#ifdef CONFIG_SMP
#define LPJ cpu_data[smp_processor_id()].loops_per_jiffy
#else
#define LPJ loops_per_jiffy
#endif
void
udelay
(
unsigned
long
usecs
)
{
usecs
*=
(((
unsigned
long
)
HZ
<<
32
)
/
1000000
)
*
lpj
;
usecs
*=
(((
unsigned
long
)
HZ
<<
32
)
/
1000000
)
*
LPJ
;
__delay
((
long
)
usecs
>>
32
);
}
EXPORT_SYMBOL
(
udelay
);
void
udelay
(
unsigned
long
usecs
)
void
ndelay
(
unsigned
long
nsecs
)
{
#ifdef CONFIG_SMP
__udelay
(
usecs
,
cpu_data
[
smp_processor_id
()].
loops_per_jiffy
);
#else
__udelay
(
usecs
,
loops_per_jiffy
);
#endif
nsecs
*=
(((
unsigned
long
)
HZ
<<
32
)
/
1000000000
)
*
LPJ
;
__delay
((
long
)
nsecs
>>
32
);
}
EXPORT_SYMBOL
(
ndelay
);
include/asm-alpha/delay.h
View file @
86e72865
...
...
@@ -2,7 +2,9 @@
#define __ALPHA_DELAY_H
extern
void
__delay
(
int
loops
);
extern
void
__udelay
(
unsigned
long
usecs
,
unsigned
long
lpj
);
extern
void
udelay
(
unsigned
long
usecs
);
extern
void
ndelay
(
unsigned
long
nsecs
);
#define ndelay ndelay
#endif
/* defined(__ALPHA_DELAY_H) */
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