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
c0630ba1
Commit
c0630ba1
authored
Feb 18, 2003
by
Alan Cox
Committed by
Andy Grover
Feb 18, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ndelay() for x86
The implementation is not ideal. Thats something to tidy up.
parent
8b18caf4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
arch/i386/kernel/i386_ksyms.c
arch/i386/kernel/i386_ksyms.c
+1
-0
arch/i386/lib/delay.c
arch/i386/lib/delay.c
+5
-0
include/asm-i386/delay.h
include/asm-i386/delay.h
+6
-0
No files found.
arch/i386/kernel/i386_ksyms.c
View file @
c0630ba1
...
...
@@ -104,6 +104,7 @@ EXPORT_SYMBOL_NOVERS(__up_wakeup);
/* Networking helper routines. */
EXPORT_SYMBOL
(
csum_partial_copy_generic
);
/* Delay loops */
EXPORT_SYMBOL
(
__ndelay
);
EXPORT_SYMBOL
(
__udelay
);
EXPORT_SYMBOL
(
__delay
);
EXPORT_SYMBOL
(
__const_udelay
);
...
...
arch/i386/lib/delay.c
View file @
c0630ba1
...
...
@@ -41,3 +41,8 @@ void __udelay(unsigned long usecs)
{
__const_udelay
(
usecs
*
0x000010c6
);
/* 2**32 / 1000000 */
}
void
__ndelay
(
unsigned
long
nsecs
)
{
__const_udelay
(
nsecs
*
0x00005
);
/* 2**32 / 1000000000 (rounded up) */
}
include/asm-i386/delay.h
View file @
c0630ba1
...
...
@@ -8,13 +8,19 @@
*/
extern
void
__bad_udelay
(
void
);
extern
void
__bad_ndelay
(
void
);
extern
void
__udelay
(
unsigned
long
usecs
);
extern
void
__ndelay
(
unsigned
long
nsecs
);
extern
void
__const_udelay
(
unsigned
long
usecs
);
extern
void
__delay
(
unsigned
long
loops
);
#define udelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
__udelay(n))
#define ndelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
__ndelay(n))
#endif
/* defined(_I386_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