Enable MTRR usage on AMD64, and use DELAY() instead of rolling our own
udelay code. Submitted by: Jung-uk Kim <jkim@niksun.com>main
parent
fd62869a0f
commit
d78db7c930
|
@ -84,6 +84,8 @@
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define __REALLY_HAVE_MTRR (__HAVE_MTRR) && (__FreeBSD_version >= 460000)
|
#define __REALLY_HAVE_MTRR (__HAVE_MTRR) && (__FreeBSD_version >= 460000)
|
||||||
|
#elif defined(__amd64__)
|
||||||
|
#define __REALLY_HAVE_MTRR (__HAVE_MTRR)
|
||||||
#else
|
#else
|
||||||
#define __REALLY_HAVE_MTRR 0
|
#define __REALLY_HAVE_MTRR 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -204,15 +206,7 @@ do { \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define DRM_UDELAY( udelay ) \
|
#define DRM_UDELAY(udelay) DELAY(udelay)
|
||||||
do { \
|
|
||||||
struct timeval tv1, tv2; \
|
|
||||||
microtime(&tv1); \
|
|
||||||
do { \
|
|
||||||
microtime(&tv2); \
|
|
||||||
} \
|
|
||||||
while (((tv2.tv_sec-tv1.tv_sec)*1000000 + tv2.tv_usec - tv1.tv_usec) < udelay ); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define DRM_GETSAREA() \
|
#define DRM_GETSAREA() \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -84,6 +84,8 @@
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define __REALLY_HAVE_MTRR (__HAVE_MTRR) && (__FreeBSD_version >= 460000)
|
#define __REALLY_HAVE_MTRR (__HAVE_MTRR) && (__FreeBSD_version >= 460000)
|
||||||
|
#elif defined(__amd64__)
|
||||||
|
#define __REALLY_HAVE_MTRR (__HAVE_MTRR)
|
||||||
#else
|
#else
|
||||||
#define __REALLY_HAVE_MTRR 0
|
#define __REALLY_HAVE_MTRR 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -204,15 +206,7 @@ do { \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define DRM_UDELAY( udelay ) \
|
#define DRM_UDELAY(udelay) DELAY(udelay)
|
||||||
do { \
|
|
||||||
struct timeval tv1, tv2; \
|
|
||||||
microtime(&tv1); \
|
|
||||||
do { \
|
|
||||||
microtime(&tv2); \
|
|
||||||
} \
|
|
||||||
while (((tv2.tv_sec-tv1.tv_sec)*1000000 + tv2.tv_usec - tv1.tv_usec) < udelay ); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define DRM_GETSAREA() \
|
#define DRM_GETSAREA() \
|
||||||
do { \
|
do { \
|
||||||
|
|
Loading…
Reference in New Issue