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
589ba3d8
Commit
589ba3d8
authored
Jan 14, 2003
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ALPHA] Expose shifts in virt_to_phys to the compiler.
parent
24485ae2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/asm-alpha/io.h
include/asm-alpha/io.h
+5
-5
No files found.
include/asm-alpha/io.h
View file @
589ba3d8
...
...
@@ -65,13 +65,13 @@ static inline void * phys_to_virt(unsigned long address)
#else
static
inline
unsigned
long
virt_to_phys
(
void
*
address
)
{
unsigned
long
phys
;
unsigned
long
phys
=
(
unsigned
long
)
address
;
__asm__
(
"sll %1, 63-40, %0
\n
"
"sra %0, 63-40, %0
\n
"
:
"=r"
(
phys
)
:
"r"
(
address
));
/* Sign-extend from bit 41. */
phys
<<=
(
64
-
41
);
phys
=
(
long
)
phys
>>
(
64
-
41
);
/* Crop to the physical address width of the processor. */
phys
&=
(
1ul
<<
hwrpb
->
pa_bits
)
-
1
;
return
phys
;
...
...
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