[PATCH] tile: remove MAP_CACHE_xxx support in mem.c

Chris Metcalf cmetcalf at tilera.com
Tue May 21 20:40:50 UTC 2013


These flags support functionality in mmap() that has not been
pushed back to the community, and which may or may not eventually
end up being the final community model.  In the interim, having
these flags unconditionally present for "#ifdef TILE" just means
that the TILE build breaks if using the community versions of
the kernel and glibc, so just revert the code until such time
as it may end up in the community.

Signed-off-by: Chris Metcalf <cmetcalf at tilera.com>
---
 mem.c |   42 ------------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/mem.c b/mem.c
index b767f1b..ef273c7 100644
--- a/mem.c
+++ b/mem.c
@@ -168,47 +168,9 @@ static const struct xlat mmap_flags[] = {
 #ifdef MAP_NOCORE
 	{ MAP_NOCORE,	"MAP_NOCORE"	},
 #endif
-#ifdef TILE
-	{ MAP_CACHE_NO_LOCAL, "MAP_CACHE_NO_LOCAL" },
-	{ MAP_CACHE_NO_L2, "MAP_CACHE_NO_L2" },
-	{ MAP_CACHE_NO_L1, "MAP_CACHE_NO_L1" },
-#endif
 	{ 0,		NULL		},
 };
 
-#ifdef TILE
-static int
-addtileflags(long flags)
-{
-	long home = flags & _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
-	flags &= ~_MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
-
-	if (flags & _MAP_CACHE_INCOHERENT) {
-		flags &= ~_MAP_CACHE_INCOHERENT;
-		if (home == MAP_CACHE_HOME_NONE) {
-			tprints("|MAP_CACHE_INCOHERENT");
-			return flags;
-		}
-		tprints("|_MAP_CACHE_INCOHERENT");
-	}
-
-	switch (home) {
-	case 0:	break;
-	case MAP_CACHE_HOME_HERE: tprints("|MAP_CACHE_HOME_HERE"); break;
-	case MAP_CACHE_HOME_NONE: tprints("|MAP_CACHE_HOME_NONE"); break;
-	case MAP_CACHE_HOME_SINGLE: tprints("|MAP_CACHE_HOME_SINGLE"); break;
-	case MAP_CACHE_HOME_TASK: tprints("|MAP_CACHE_HOME_TASK"); break;
-	case MAP_CACHE_HOME_HASH: tprints("|MAP_CACHE_HOME_HASH"); break;
-	default:
-		tprintf("|MAP_CACHE_HOME(%ld)",
-			(home >> _MAP_CACHE_HOME_SHIFT) );
-		break;
-	}
-
-	return flags;
-}
-#endif
-
 static int
 print_mmap(struct tcb *tcp, long *u_arg, unsigned long long offset)
 {
@@ -226,11 +188,7 @@ print_mmap(struct tcb *tcp, long *u_arg, unsigned long long offset)
 		/* flags */
 #ifdef MAP_TYPE
 		printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
-# ifdef TILE
-		addflags(mmap_flags, addtileflags(u_arg[3] & ~MAP_TYPE));
-# else
 		addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
-# endif
 #else
 		printflags(mmap_flags, u_arg[3], "MAP_???");
 #endif
-- 
1.7.10.3





More information about the Strace-devel mailing list