summaryrefslogtreecommitdiffstats
path: root/sys/x86/x86/nexus.c
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2010-12-20 16:39:43 +0000
committertijl <tijl@FreeBSD.org>2010-12-20 16:39:43 +0000
commit0f810ef0a25b4d64ffe05b47b5dfd30d73167b71 (patch)
tree1dae55b03b0d7f2f5c78986fe19e42d381f09774 /sys/x86/x86/nexus.c
parent17886985855b2679e5479ecc5effa42d979bd3ac (diff)
downloadFreeBSD-src-0f810ef0a25b4d64ffe05b47b5dfd30d73167b71.zip
FreeBSD-src-0f810ef0a25b4d64ffe05b47b5dfd30d73167b71.tar.gz
Merge amd64 and i386 bus.h and move the resulting header to x86. Replace
the original amd64 and i386 headers with stubs. Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere. Reviewed by: imp (previous version), jhb Approved by: kib (mentor)
Diffstat (limited to 'sys/x86/x86/nexus.c')
-rw-r--r--sys/x86/x86/nexus.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c
index 8ed2c35..fa2aded 100644
--- a/sys/x86/x86/nexus.c
+++ b/sys/x86/x86/nexus.c
@@ -84,14 +84,6 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/rtprio.h>
-#ifdef __amd64__
-#define BUS_SPACE_IO AMD64_BUS_SPACE_IO
-#define BUS_SPACE_MEM AMD64_BUS_SPACE_MEM
-#else
-#define BUS_SPACE_IO I386_BUS_SPACE_IO
-#define BUS_SPACE_MEM I386_BUS_SPACE_MEM
-#endif
-
#define ELF_KERN_STR ("elf"__XSTRING(__ELF_WORD_SIZE)" kernel")
static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device");
@@ -425,7 +417,7 @@ nexus_activate_resource(device_t bus, device_t child, int type, int rid,
switch (type) {
case SYS_RES_IOPORT:
#ifdef PC98
- error = i386_bus_space_handle_alloc(I386_BUS_SPACE_IO,
+ error = i386_bus_space_handle_alloc(X86_BUS_SPACE_IO,
rman_get_start(r), rman_get_size(r), &bh);
if (error)
return (error);
@@ -433,18 +425,18 @@ nexus_activate_resource(device_t bus, device_t child, int type, int rid,
#else
rman_set_bushandle(r, rman_get_start(r));
#endif
- rman_set_bustag(r, BUS_SPACE_IO);
+ rman_set_bustag(r, X86_BUS_SPACE_IO);
break;
case SYS_RES_MEMORY:
#ifdef PC98
- error = i386_bus_space_handle_alloc(I386_BUS_SPACE_MEM,
+ error = i386_bus_space_handle_alloc(X86_BUS_SPACE_MEM,
rman_get_start(r), rman_get_size(r), &bh);
if (error)
return (error);
#endif
vaddr = pmap_mapdev(rman_get_start(r), rman_get_size(r));
rman_set_virtual(r, vaddr);
- rman_set_bustag(r, BUS_SPACE_MEM);
+ rman_set_bustag(r, X86_BUS_SPACE_MEM);
#ifdef PC98
/* PC-98: the type of bus_space_handle_t is the structure. */
bh->bsh_base = (bus_addr_t) vaddr;
OpenPOWER on IntegriCloud