Date: Thu, 27 Jul 2006 09:16:20 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 102538 for review Message-ID: <200607270916.k6R9GKw5055418@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102538 Change 102538 by gonzo@gonzo_hq on 2006/07/27 09:15:56 o Replace AMD64 in defines' names with MIPS o Threw away(temporary) MIPS_BUS_SPACE_IO part of bus_space_rw routines. o BUS_SPACE_MAXADDR is 32 bits long Affected files ... .. //depot/projects/mips2/src/sys/mips/include/bus.h#3 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/bus.h#3 (text+ko) ==== @@ -101,8 +101,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _AMD64_BUS_H_ -#define _AMD64_BUS_H_ +#ifndef _MIPS_BUS_H_ +#define _MIPS_BUS_H_ #include <machine/_bus.h> #include <machine/cpufunc.h> @@ -110,15 +110,15 @@ /* * 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 */ -#define AMD64_BUS_SPACE_MEM 1 /* space is mem space */ +#define MIPS_BUS_SPACE_IO 0 /* space is i/o space */ +#define MIPS_BUS_SPACE_MEM 1 /* space is mem space */ #define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF #define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF #define BUS_SPACE_MAXSIZE 0xFFFFFFFF #define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF #define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFULL +#define BUS_SPACE_MAXADDR 0xFFFFFFFF #define BUS_SPACE_UNRESTRICTED (~0) @@ -214,36 +214,21 @@ bus_space_read_1(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t offset) { -#if 0 - if (tag == AMD64_BUS_SPACE_IO) - return (inb(handle + offset)); return (*(volatile u_int8_t *)(handle + offset)); -#endif - return (0); } static __inline u_int16_t bus_space_read_2(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t offset) { -#if 0 - if (tag == AMD64_BUS_SPACE_IO) - return (inw(handle + offset)); return (*(volatile u_int16_t *)(handle + offset)); -#endif - return (0); } static __inline u_int32_t bus_space_read_4(bus_space_tag_t tag, bus_space_handle_t handle, bus_size_t offset) { -#if 0 - if (tag == AMD64_BUS_SPACE_IO) - return (inl(handle + offset)); return (*(volatile u_int32_t *)(handle + offset)); -#endif - return (0); } #if 0 /* Cause a link error for bus_space_read_8 */ @@ -274,7 +259,7 @@ bus_size_t offset, u_int8_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) insb(bsh + offset, addr, count); else { #ifdef __GNUCLIKE_ASM @@ -296,7 +281,7 @@ bus_size_t offset, u_int16_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) insw(bsh + offset, addr, count); else { #ifdef __GNUCLIKE_ASM @@ -318,7 +303,7 @@ bus_size_t offset, u_int32_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) insl(bsh + offset, addr, count); else { #ifdef __GNUCLIKE_ASM @@ -365,7 +350,7 @@ bus_size_t offset, u_int8_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { int _port_ = bsh + offset; #ifdef __GNUCLIKE_ASM __asm __volatile(" \n\ @@ -398,7 +383,7 @@ bus_size_t offset, u_int16_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { int _port_ = bsh + offset; #ifdef __GNUCLIKE_ASM __asm __volatile(" \n\ @@ -431,7 +416,7 @@ bus_size_t offset, u_int32_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { int _port_ = bsh + offset; #ifdef __GNUCLIKE_ASM __asm __volatile(" \n\ @@ -485,7 +470,7 @@ bus_size_t offset, u_int8_t value) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) outb(bsh + offset, value); else *(volatile u_int8_t *)(bsh + offset) = value; @@ -497,7 +482,7 @@ bus_size_t offset, u_int16_t value) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) outw(bsh + offset, value); else *(volatile u_int16_t *)(bsh + offset) = value; @@ -509,7 +494,7 @@ bus_size_t offset, u_int32_t value) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) outl(bsh + offset, value); else *(volatile u_int32_t *)(bsh + offset) = value; @@ -547,7 +532,7 @@ bus_size_t offset, const u_int8_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) outsb(bsh + offset, addr, count); else { #ifdef __GNUCLIKE_ASM @@ -569,7 +554,7 @@ bus_size_t offset, const u_int16_t *addr, size_t count) { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) outsw(bsh + offset, addr, count); else { #ifdef __GNUCLIKE_ASM @@ -592,7 +577,7 @@ { #if 0 - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) outsl(bsh + offset, addr, count); else { #ifdef __GNUCLIKE_ASM @@ -641,7 +626,7 @@ { #if 0 - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { int _port_ = bsh + offset; #ifdef __GNUCLIKE_ASM __asm __volatile(" \n\ @@ -675,7 +660,7 @@ { #if 0 - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { int _port_ = bsh + offset; #ifdef __GNUCLIKE_ASM __asm __volatile(" \n\ @@ -709,7 +694,7 @@ { #if 0 - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { int _port_ = bsh + offset; #ifdef __GNUCLIKE_ASM __asm __volatile(" \n\ @@ -767,7 +752,7 @@ #if 0 bus_space_handle_t addr = bsh + offset; - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) while (count--) outb(addr, value); else @@ -783,7 +768,7 @@ #if 0 bus_space_handle_t addr = bsh + offset; - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) while (count--) outw(addr, value); else @@ -799,7 +784,7 @@ #if 0 bus_space_handle_t addr = bsh + offset; - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) while (count--) outl(addr, value); else @@ -837,7 +822,7 @@ #if 0 bus_space_handle_t addr = bsh + offset; - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) for (; count != 0; count--, addr++) outb(addr, value); else @@ -853,7 +838,7 @@ #if 0 bus_space_handle_t addr = bsh + offset; - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) for (; count != 0; count--, addr += 2) outw(addr, value); else @@ -869,7 +854,7 @@ #if 0 bus_space_handle_t addr = bsh + offset; - if (tag == AMD64_BUS_SPACE_IO) + if (tag == MIPS_BUS_SPACE_IO) for (; count != 0; count--, addr += 4) outl(addr, value); else @@ -914,7 +899,7 @@ bus_space_handle_t addr1 = bsh1 + off1; bus_space_handle_t addr2 = bsh2 + off2; - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { if (addr1 >= addr2) { /* src after dest: copy forward */ for (; count != 0; count--, addr1++, addr2++) @@ -951,7 +936,7 @@ bus_space_handle_t addr1 = bsh1 + off1; bus_space_handle_t addr2 = bsh2 + off2; - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { if (addr1 >= addr2) { /* src after dest: copy forward */ for (; count != 0; count--, addr1 += 2, addr2 += 2) @@ -988,7 +973,7 @@ bus_space_handle_t addr1 = bsh1 + off1; bus_space_handle_t addr2 = bsh2 + off2; - if (tag == AMD64_BUS_SPACE_IO) { + if (tag == MIPS_BUS_SPACE_IO) { if (addr1 >= addr2) { /* src after dest: copy forward */ for (; count != 0; count--, addr1 += 4, addr2 += 4) @@ -1125,4 +1110,4 @@ #define bus_space_copy_region_stream_4(t, h1, o1, h2, o2, c) \ bus_space_copy_region_4((t), (h1), (o1), (h2), (o2), (c)) -#endif /* _AMD64_BUS_H_ */ +#endif /* _MIPS_BUS_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607270916.k6R9GKw5055418>