Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
9d58f302
Commit
9d58f302
authored
Sep 23, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Glue again after removal of BUILD_BUG().
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
495515b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
25 deletions
+32
-25
include/asm-mips/io.h
include/asm-mips/io.h
+32
-25
No files found.
include/asm-mips/io.h
View file @
9d58f302
...
@@ -387,11 +387,11 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \
...
@@ -387,11 +387,11 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \
\
\
__val = pfx##ioswab##bwlq(val); \
__val = pfx##ioswab##bwlq(val); \
\
\
if (sizeof(type) != sizeof(u64)) {
\
/* Really, we want this to be atomic */
\
*__addr = __val;
\
BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long));
\
slow;
\
\
} else
\
*__addr = __val;
\
BUILD_BUG();
\
slow;
\
} \
} \
\
\
static inline type pfx##in##bwlq##p(unsigned long port) \
static inline type pfx##in##bwlq##p(unsigned long port) \
...
@@ -402,13 +402,10 @@ static inline type pfx##in##bwlq##p(unsigned long port) \
...
@@ -402,13 +402,10 @@ static inline type pfx##in##bwlq##p(unsigned long port) \
port = __swizzle_addr_##bwlq(port); \
port = __swizzle_addr_##bwlq(port); \
__addr = (void *)(mips_io_port_base + port); \
__addr = (void *)(mips_io_port_base + port); \
\
\
if (sizeof(type) != sizeof(u64)) { \
BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
__val = *__addr; \
\
slow; \
__val = *__addr; \
} else { \
slow; \
__val = 0; \
BUILD_BUG(); \
} \
\
\
return pfx##ioswab##bwlq(__val); \
return pfx##ioswab##bwlq(__val); \
}
}
...
@@ -417,28 +414,36 @@ static inline type pfx##in##bwlq##p(unsigned long port) \
...
@@ -417,28 +414,36 @@ static inline type pfx##in##bwlq##p(unsigned long port) \
\
\
__BUILD_MEMORY_SINGLE(bus, bwlq, type, 1)
__BUILD_MEMORY_SINGLE(bus, bwlq, type, 1)
#define __BUILD_IOPORT_PFX(bus, bwlq, type) \
#define BUILDIO_MEM(bwlq, type) \
\
__BUILD_IOPORT_SINGLE(bus, bwlq, type, ,) \
__BUILD_IOPORT_SINGLE(bus, bwlq, type, _p, SLOW_DOWN_IO)
#define BUILDIO(bwlq, type) \
\
\
__BUILD_MEMORY_PFX(__raw_, bwlq, type) \
__BUILD_MEMORY_PFX(__raw_, bwlq, type) \
__BUILD_MEMORY_PFX(, bwlq, type) \
__BUILD_MEMORY_PFX(, bwlq, type) \
__BUILD_MEMORY_PFX(mem_, bwlq, type) \
__BUILD_MEMORY_PFX(mem_, bwlq, type) \
__BUILD_IOPORT_PFX(, bwlq, type) \
__BUILD_IOPORT_PFX(mem_, bwlq, type)
BUILDIO_MEM
(
b
,
u8
)
BUILDIO_MEM
(
w
,
u16
)
BUILDIO_MEM
(
l
,
u32
)
BUILDIO_MEM
(
q
,
u64
)
#define __BUILD_IOPORT_PFX(bus, bwlq, type) \
__BUILD_IOPORT_SINGLE(bus, bwlq, type, ,) \
__BUILD_IOPORT_SINGLE(bus, bwlq, type, _p, SLOW_DOWN_IO)
#define BUILDIO_IOPORT(bwlq, type) \
__BUILD_IOPORT_PFX(, bwlq, type) \
__BUILD_IOPORT_PFX(mem_, bwlq, type)
BUILDIO_IOPORT
(
b
,
u8
)
BUILDIO_IOPORT
(
w
,
u16
)
BUILDIO_IOPORT
(
l
,
u32
)
#ifdef CONFIG_64BIT
BUILDIO_IOPORT
(
q
,
u64
)
#endif
#define __BUILDIO(bwlq, type) \
#define __BUILDIO(bwlq, type) \
\
\
__BUILD_MEMORY_SINGLE(____raw_, bwlq, type, 0)
__BUILD_MEMORY_SINGLE(____raw_, bwlq, type, 0)
BUILDIO
(
b
,
u8
)
BUILDIO
(
w
,
u16
)
BUILDIO
(
l
,
u32
)
BUILDIO
(
q
,
u64
)
__BUILDIO
(
q
,
u64
)
__BUILDIO
(
q
,
u64
)
#define readb_relaxed readb
#define readb_relaxed readb
...
@@ -508,7 +513,9 @@ __BUILD_IOPORT_STRING(bwlq, type)
...
@@ -508,7 +513,9 @@ __BUILD_IOPORT_STRING(bwlq, type)
BUILDSTRING
(
b
,
u8
)
BUILDSTRING
(
b
,
u8
)
BUILDSTRING
(
w
,
u16
)
BUILDSTRING
(
w
,
u16
)
BUILDSTRING
(
l
,
u32
)
BUILDSTRING
(
l
,
u32
)
#ifdef CONFIG_64BIT
BUILDSTRING
(
q
,
u64
)
BUILDSTRING
(
q
,
u64
)
#endif
/* Depends on MIPS II instruction set */
/* Depends on MIPS II instruction set */
...
...
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