changeset 16377:243f6f5d0bb9

Make MTRR setup work on AMD64 and simplify some #ifdefs
author reimar
date Sat, 03 Sep 2005 19:17:28 +0000
parents 71180d64e6cc
children 430ca60471ba
files libdha/mtrr.c
diffstat 1 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libdha/mtrr.c	Sat Sep 03 19:10:43 2005 +0000
+++ b/libdha/mtrr.c	Sat Sep 03 19:17:28 2005 +0000
@@ -23,7 +23,6 @@
 #endif
 #endif
 
-#if defined( __i386__ )
 int	mtrr_set_type(unsigned base,unsigned size,int type)
 {
 #ifdef linux
@@ -50,8 +49,7 @@
 	return wr_len == strlen(sout) ? 0 : EPERM;
     }
     return ENOSYS;
-#elif defined (__NetBSD__)
-#if __NetBSD_Version__ > 105240000
+#elif defined (__i386__ ) && defined (__NetBSD__) && __NetBSD_Version__ > 105240000
     struct mtrr *mtrrp;
     int n;
 
@@ -72,14 +70,4 @@
     /* NetBSD prior to 1.5Y doesn't have MTRR support */
     return ENOSYS;
 #endif
-#else
-#warning Please port MTRR stuff!!!
-    return ENOSYS;
-#endif
 }
-#else
-int	mtrr_set_type(unsigned base,unsigned size,int type)
-{
-    return ENOSYS;
-}
-#endif