Date: Wed, 14 May 2003 12:59:45 -0700 (PDT) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 31183 for review Message-ID: <200305141959.h4EJxjoj053684@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=31183 Change 31183 by jmallett@jmallett_dalek on 2003/05/14 12:59:33 Use vm_offset_t, not 'unsigned' for the MIPS_foo_TO_bar macros. Add XKSEG definition. Might be good to redo this header with Modern Times in mind, at least the addr bits. Affected files ... .. //depot/projects/mips/sys/mips/include/cpuregs.h#8 edit Differences ... ==== //depot/projects/mips/sys/mips/include/cpuregs.h#8 (text+ko) ==== @@ -76,6 +76,7 @@ */ #define MIPS_KUSEG_START 0x0 +#define MIPS_XKSEG_START 0xc000000000000000 #define MIPS_KSEG0_START 0xffffffff80000000 #define MIPS_KSEG1_START 0xffffffffa0000000 #define MIPS_KSEG2_START 0xffffffffc0000000 @@ -84,16 +85,14 @@ #define MIPS_PHYS_MASK 0x000000001fffffff -#define MIPS_KSEG0_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG0(x) ((unsigned)(x) | MIPS_KSEG0_START) -#define MIPS_KSEG1_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG1(x) ((unsigned)(x) | MIPS_KSEG1_START) -#define MIPS_KSEG2_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK) -#define MIPS_PHYS_TO_KSEG2(x) ((unsigned)(x) | MIPS_KSEG2_START) +#define MIPS_KSEG0_TO_PHYS(x) ((vm_offset_t)(x) & MIPS_PHYS_MASK) +#define MIPS_PHYS_TO_KSEG0(x) ((vm_offset_t)(x) | MIPS_KSEG0_START) +#define MIPS_KSEG1_TO_PHYS(x) ((vm_offset_t)(x) & MIPS_PHYS_MASK) +#define MIPS_PHYS_TO_KSEG1(x) ((vm_offset_t)(x) | MIPS_KSEG1_START) /* Map virtual address to index in mips3 r4k virtually-indexed cache */ #define MIPS3_VA_TO_CINDEX(x) \ - ((unsigned)(x) & 0xffffff | MIPS_KSEG0_START) + ((vm_offset_t)(x) & 0xffffff | MIPS_KSEG0_START) #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305141959.h4EJxjoj053684>