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
3f4fb108
Commit
3f4fb108
authored
Jun 08, 2017
by
Helge Deller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parisc: Don't hardcode PSW values in gsc_*() functions
Signed-off-by:
Helge Deller
<
deller@gmx.de
>
parent
b752c7b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
arch/parisc/include/asm/io.h
arch/parisc/include/asm/io.h
+8
-8
No files found.
arch/parisc/include/asm/io.h
View file @
3f4fb108
...
@@ -34,10 +34,10 @@ static inline unsigned char gsc_readb(unsigned long addr)
...
@@ -34,10 +34,10 @@ static inline unsigned char gsc_readb(unsigned long addr)
unsigned
char
ret
;
unsigned
char
ret
;
__asm__
__volatile__
(
__asm__
__volatile__
(
" rsm
2
,%0
\n
"
" rsm
%3
,%0
\n
"
" ldbx 0(%2),%1
\n
"
" ldbx 0(%2),%1
\n
"
" mtsm %0
\n
"
" mtsm %0
\n
"
:
"=&r"
(
flags
),
"=r"
(
ret
)
:
"r"
(
addr
)
);
:
"=&r"
(
flags
),
"=r"
(
ret
)
:
"r"
(
addr
)
,
"i"
(
PSW_SM_D
)
);
return
ret
;
return
ret
;
}
}
...
@@ -48,10 +48,10 @@ static inline unsigned short gsc_readw(unsigned long addr)
...
@@ -48,10 +48,10 @@ static inline unsigned short gsc_readw(unsigned long addr)
unsigned
short
ret
;
unsigned
short
ret
;
__asm__
__volatile__
(
__asm__
__volatile__
(
" rsm
2
,%0
\n
"
" rsm
%3
,%0
\n
"
" ldhx 0(%2),%1
\n
"
" ldhx 0(%2),%1
\n
"
" mtsm %0
\n
"
" mtsm %0
\n
"
:
"=&r"
(
flags
),
"=r"
(
ret
)
:
"r"
(
addr
)
);
:
"=&r"
(
flags
),
"=r"
(
ret
)
:
"r"
(
addr
)
,
"i"
(
PSW_SM_D
)
);
return
ret
;
return
ret
;
}
}
...
@@ -87,20 +87,20 @@ static inline void gsc_writeb(unsigned char val, unsigned long addr)
...
@@ -87,20 +87,20 @@ static inline void gsc_writeb(unsigned char val, unsigned long addr)
{
{
long
flags
;
long
flags
;
__asm__
__volatile__
(
__asm__
__volatile__
(
" rsm
2
,%0
\n
"
" rsm
%3
,%0
\n
"
" stbs %1,0(%2)
\n
"
" stbs %1,0(%2)
\n
"
" mtsm %0
\n
"
" mtsm %0
\n
"
:
"=&r"
(
flags
)
:
"r"
(
val
),
"r"
(
addr
)
);
:
"=&r"
(
flags
)
:
"r"
(
val
),
"r"
(
addr
)
,
"i"
(
PSW_SM_D
)
);
}
}
static
inline
void
gsc_writew
(
unsigned
short
val
,
unsigned
long
addr
)
static
inline
void
gsc_writew
(
unsigned
short
val
,
unsigned
long
addr
)
{
{
long
flags
;
long
flags
;
__asm__
__volatile__
(
__asm__
__volatile__
(
" rsm
2
,%0
\n
"
" rsm
%3
,%0
\n
"
" sths %1,0(%2)
\n
"
" sths %1,0(%2)
\n
"
" mtsm %0
\n
"
" mtsm %0
\n
"
:
"=&r"
(
flags
)
:
"r"
(
val
),
"r"
(
addr
)
);
:
"=&r"
(
flags
)
:
"r"
(
val
),
"r"
(
addr
)
,
"i"
(
PSW_SM_D
)
);
}
}
static
inline
void
gsc_writel
(
unsigned
int
val
,
unsigned
long
addr
)
static
inline
void
gsc_writel
(
unsigned
int
val
,
unsigned
long
addr
)
...
...
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