aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/bus.h322
-rw-r--r--sys/amd64/include/bus_memio.h31
-rw-r--r--sys/amd64/include/bus_pio.h31
3 files changed, 42 insertions, 342 deletions
diff --git a/sys/amd64/include/bus.h b/sys/amd64/include/bus.h
index 41431736237bf..b1a91a27b2d11 100644
--- a/sys/amd64/include/bus.h
+++ b/sys/amd64/include/bus.h
@@ -108,15 +108,6 @@
#include <machine/cpufunc.h>
/*
- * To remain compatible with NetBSD's interface, default to both memio and
- * pio when neither of them is defined.
- */
-#if !defined(_AMD64_BUS_PIO_H_) && !defined(_AMD64_BUS_MEMIO_H_)
-#define _AMD64_BUS_PIO_H_
-#define _AMD64_BUS_MEMIO_H_
-#endif
-
-/*
* Values for the amd64 bus space tag, not to be used directly by MI code.
*/
#define AMD64_BUS_SPACE_IO 0 /* space is i/o space */
@@ -204,8 +195,6 @@ bus_space_free(bus_space_tag_t t __unused, bus_space_handle_t bsh __unused,
}
-#if defined(_AMD64_BUS_PIO_H_) || defined(_AMD64_BUS_MEMIO_H_)
-
/*
* Read a 1, 2, 4, or 8 byte quantity from bus space
* described by tag/handle/offset.
@@ -226,45 +215,30 @@ static __inline u_int8_t
bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t handle,
bus_size_t offset)
{
-#if defined (_AMD64_BUS_PIO_H_)
-#if defined (_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
return (inb(handle + offset));
-#endif
-#if defined (_AMD64_BUS_MEMIO_H_)
return (*(volatile u_int8_t *)(handle + offset));
-#endif
}
static __inline u_int16_t
bus_space_read_2(bus_space_tag_t tag, bus_space_handle_t handle,
bus_size_t offset)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
return (inw(handle + offset));
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
return (*(volatile u_int16_t *)(handle + offset));
-#endif
}
static __inline u_int32_t
bus_space_read_4(bus_space_tag_t tag, bus_space_handle_t handle,
bus_size_t offset)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
return (inl(handle + offset));
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
return (*(volatile u_int32_t *)(handle + offset));
-#endif
}
#if 0 /* Cause a link error for bus_space_read_8 */
@@ -294,17 +268,10 @@ static __inline void
bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int8_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
insb(bsh + offset, addr, count);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ else {
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
@@ -316,24 +283,16 @@ bus_space_read_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
"%eax", "memory");
#endif
}
-#endif
}
static __inline void
bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int16_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
insw(bsh + offset, addr, count);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ else {
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
@@ -345,24 +304,16 @@ bus_space_read_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
"%eax", "memory");
#endif
}
-#endif
}
static __inline void
bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int32_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
insl(bsh + offset, addr, count);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ else {
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
@@ -374,7 +325,6 @@ bus_space_read_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
"%eax", "memory");
#endif
}
-#endif
}
#if 0 /* Cause a link error for bus_space_read_multi_8 */
@@ -406,11 +356,8 @@ static __inline void
bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int8_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+
+ if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -423,13 +370,7 @@ bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
"0" (addr), "1" (count), "2" (_port_) :
"%eax", "memory", "cc");
#endif
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
bus_space_handle_t _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -441,18 +382,14 @@ bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
"memory", "cc");
#endif
}
-#endif
}
static __inline void
bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int16_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+
+ if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -465,13 +402,7 @@ bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
"0" (addr), "1" (count), "2" (_port_) :
"%eax", "memory", "cc");
#endif
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
bus_space_handle_t _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -483,18 +414,14 @@ bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
"memory", "cc");
#endif
}
-#endif
}
static __inline void
bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int32_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+
+ if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -507,13 +434,7 @@ bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
"0" (addr), "1" (count), "2" (_port_) :
"%eax", "memory", "cc");
#endif
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
bus_space_handle_t _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -525,7 +446,6 @@ bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
"memory", "cc");
#endif
}
-#endif
}
#if 0 /* Cause a link error for bus_space_read_region_8 */
@@ -553,54 +473,33 @@ static __inline void
bus_space_write_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int8_t value)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
outb(bsh + offset, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
*(volatile u_int8_t *)(bsh + offset) = value;
-#endif
}
static __inline void
bus_space_write_2(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int16_t value)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
outw(bsh + offset, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
*(volatile u_int16_t *)(bsh + offset) = value;
-#endif
}
static __inline void
bus_space_write_4(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int32_t value)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
outl(bsh + offset, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
*(volatile u_int32_t *)(bsh + offset) = value;
-#endif
}
#if 0 /* Cause a link error for bus_space_write_8 */
@@ -633,17 +532,10 @@ static __inline void
bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int8_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
outsb(bsh + offset, addr, count);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ else {
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
@@ -655,24 +547,16 @@ bus_space_write_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
"%eax", "memory", "cc");
#endif
}
-#endif
}
static __inline void
bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int16_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
outsw(bsh + offset, addr, count);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ else {
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
@@ -684,24 +568,16 @@ bus_space_write_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
"%eax", "memory", "cc");
#endif
}
-#endif
}
static __inline void
bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int32_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
+
if (tag == AMD64_BUS_SPACE_IO)
-#endif
outsl(bsh + offset, addr, count);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ else {
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
cld \n\
@@ -713,7 +589,6 @@ bus_space_write_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
"%eax", "memory", "cc");
#endif
}
-#endif
}
#if 0 /* Cause a link error for bus_space_write_multi_8 */
@@ -746,11 +621,8 @@ static __inline void
bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int8_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+
+ if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -763,13 +635,7 @@ bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
"0" (_port_), "1" (addr), "2" (count) :
"%eax", "memory", "cc");
#endif
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
bus_space_handle_t _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -781,18 +647,14 @@ bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
"memory", "cc");
#endif
}
-#endif
}
static __inline void
bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int16_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+
+ if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -805,13 +667,7 @@ bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
"0" (_port_), "1" (addr), "2" (count) :
"%eax", "memory", "cc");
#endif
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
bus_space_handle_t _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -823,18 +679,14 @@ bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
"memory", "cc");
#endif
}
-#endif
}
static __inline void
bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, const u_int32_t *addr, size_t count)
{
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+
+ if (tag == AMD64_BUS_SPACE_IO) {
int _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -847,13 +699,7 @@ bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
"0" (_port_), "1" (addr), "2" (count) :
"%eax", "memory", "cc");
#endif
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
bus_space_handle_t _port_ = bsh + offset;
#ifdef __GNUCLIKE_ASM
__asm __volatile(" \n\
@@ -865,7 +711,6 @@ bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
"memory", "cc");
#endif
}
-#endif
}
#if 0 /* Cause a link error for bus_space_write_region_8 */
@@ -897,20 +742,12 @@ bus_space_set_multi_1(bus_space_tag_t tag, bus_space_handle_t bsh,
{
bus_space_handle_t addr = bsh + offset;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
if (tag == AMD64_BUS_SPACE_IO)
-#endif
while (count--)
outb(addr, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
while (count--)
*(volatile u_int8_t *)(addr) = value;
-#endif
}
static __inline void
@@ -919,20 +756,12 @@ bus_space_set_multi_2(bus_space_tag_t tag, bus_space_handle_t bsh,
{
bus_space_handle_t addr = bsh + offset;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
if (tag == AMD64_BUS_SPACE_IO)
-#endif
while (count--)
outw(addr, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
while (count--)
*(volatile u_int16_t *)(addr) = value;
-#endif
}
static __inline void
@@ -941,20 +770,12 @@ bus_space_set_multi_4(bus_space_tag_t tag, bus_space_handle_t bsh,
{
bus_space_handle_t addr = bsh + offset;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
if (tag == AMD64_BUS_SPACE_IO)
-#endif
while (count--)
outl(addr, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
while (count--)
*(volatile u_int32_t *)(addr) = value;
-#endif
}
#if 0 /* Cause a link error for bus_space_set_multi_8 */
@@ -985,20 +806,12 @@ bus_space_set_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
{
bus_space_handle_t addr = bsh + offset;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
if (tag == AMD64_BUS_SPACE_IO)
-#endif
for (; count != 0; count--, addr++)
outb(addr, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
for (; count != 0; count--, addr++)
*(volatile u_int8_t *)(addr) = value;
-#endif
}
static __inline void
@@ -1007,20 +820,12 @@ bus_space_set_region_2(bus_space_tag_t tag, bus_space_handle_t bsh,
{
bus_space_handle_t addr = bsh + offset;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
if (tag == AMD64_BUS_SPACE_IO)
-#endif
for (; count != 0; count--, addr += 2)
outw(addr, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
for (; count != 0; count--, addr += 2)
*(volatile u_int16_t *)(addr) = value;
-#endif
}
static __inline void
@@ -1029,20 +834,12 @@ bus_space_set_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
{
bus_space_handle_t addr = bsh + offset;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
if (tag == AMD64_BUS_SPACE_IO)
-#endif
for (; count != 0; count--, addr += 4)
outl(addr, value);
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
else
-#endif
for (; count != 0; count--, addr += 4)
*(volatile u_int32_t *)(addr) = value;
-#endif
}
#if 0 /* Cause a link error for bus_space_set_region_8 */
@@ -1080,11 +877,7 @@ bus_space_copy_region_1(bus_space_tag_t tag, bus_space_handle_t bsh1,
bus_space_handle_t addr1 = bsh1 + off1;
bus_space_handle_t addr2 = bsh2 + off2;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+ if (tag == AMD64_BUS_SPACE_IO) {
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; count != 0; count--, addr1++, addr2++)
@@ -1095,13 +888,7 @@ bus_space_copy_region_1(bus_space_tag_t tag, bus_space_handle_t bsh1,
count != 0; count--, addr1--, addr2--)
outb(addr2, inb(addr1));
}
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; count != 0; count--, addr1++, addr2++)
@@ -1115,7 +902,6 @@ bus_space_copy_region_1(bus_space_tag_t tag, bus_space_handle_t bsh1,
*(volatile u_int8_t *)(addr1);
}
}
-#endif
}
static __inline void
@@ -1126,11 +912,7 @@ bus_space_copy_region_2(bus_space_tag_t tag, bus_space_handle_t bsh1,
bus_space_handle_t addr1 = bsh1 + off1;
bus_space_handle_t addr2 = bsh2 + off2;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+ if (tag == AMD64_BUS_SPACE_IO) {
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; count != 0; count--, addr1 += 2, addr2 += 2)
@@ -1141,13 +923,7 @@ bus_space_copy_region_2(bus_space_tag_t tag, bus_space_handle_t bsh1,
count != 0; count--, addr1 -= 2, addr2 -= 2)
outw(addr2, inw(addr1));
}
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; count != 0; count--, addr1 += 2, addr2 += 2)
@@ -1161,7 +937,6 @@ bus_space_copy_region_2(bus_space_tag_t tag, bus_space_handle_t bsh1,
*(volatile u_int16_t *)(addr1);
}
}
-#endif
}
static __inline void
@@ -1172,11 +947,7 @@ bus_space_copy_region_4(bus_space_tag_t tag, bus_space_handle_t bsh1,
bus_space_handle_t addr1 = bsh1 + off1;
bus_space_handle_t addr2 = bsh2 + off2;
-#if defined(_AMD64_BUS_PIO_H_)
-#if defined(_AMD64_BUS_MEMIO_H_)
- if (tag == AMD64_BUS_SPACE_IO)
-#endif
- {
+ if (tag == AMD64_BUS_SPACE_IO) {
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; count != 0; count--, addr1 += 4, addr2 += 4)
@@ -1187,13 +958,7 @@ bus_space_copy_region_4(bus_space_tag_t tag, bus_space_handle_t bsh1,
count != 0; count--, addr1 -= 4, addr2 -= 4)
outl(addr2, inl(addr1));
}
- }
-#endif
-#if defined(_AMD64_BUS_MEMIO_H_)
-#if defined(_AMD64_BUS_PIO_H_)
- else
-#endif
- {
+ } else {
if (addr1 >= addr2) {
/* src after dest: copy forward */
for (; count != 0; count--, addr1 += 4, addr2 += 4)
@@ -1207,11 +972,8 @@ bus_space_copy_region_4(bus_space_tag_t tag, bus_space_handle_t bsh1,
*(volatile u_int32_t *)(addr1);
}
}
-#endif
}
-#endif /* defined(_AMD64_BUS_PIO_H_) || defined(_AMD64_MEM_IO_H_) */
-
#if 0 /* Cause a link error for bus_space_copy_8 */
#define bus_space_copy_region_8 !!! bus_space_copy_region_8 unimplemented !!!
#endif
diff --git a/sys/amd64/include/bus_memio.h b/sys/amd64/include/bus_memio.h
deleted file mode 100644
index 6a0d4f8a95dc9..0000000000000
--- a/sys/amd64/include/bus_memio.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*-
- * Copyright (c) 1997 Justin Gibbs.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification, immediately at the beginning of the file.
- * 2. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _AMD64_BUS_MEMIO_H_
-#define _AMD64_BUS_MEMIO_H_
-#endif /* _AMD64_BUS_MEMIO_H_ */
diff --git a/sys/amd64/include/bus_pio.h b/sys/amd64/include/bus_pio.h
deleted file mode 100644
index 2044adf076370..0000000000000
--- a/sys/amd64/include/bus_pio.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*-
- * Copyright (c) 1997 Justin Gibbs.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification, immediately at the beginning of the file.
- * 2. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _AMD64_BUS_PIO_H_
-#define _AMD64_BUS_PIO_H_
-#endif /* _AMD64_BUS_PIO_H_ */