summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2005-04-04 09:47:07 +0000
committerEgbert Eich <eich@suse.de>2005-04-04 09:47:07 +0000
commit231c00e8fba91b580ec3e2703dd1ceacf13a6624 (patch)
tree34a91e827bf9667ad074a40a35e981b17abdc7a2
parent55dc930a180553c08d8546cc2078451c20e34934 (diff)
When not using dlopen ia64 needs an extra cache flush to ensure the icache
is coherent when modules are loaded (Alex Williamson).
-rw-r--r--hw/xfree86/common/compiler.h2
-rw-r--r--hw/xfree86/loader/elfloader.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 164bcb01f..31b1ea37c 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -478,7 +478,7 @@ __ustw (unsigned long r5, unsigned short * r11)
# ifndef __INTEL_COMPILER
# define ia64_flush_cache(Addr) \
__asm__ __volatile__ ( \
- "fc %0;;;" \
+ "fc.i %0;;;" \
"sync.i;;;" \
"mf;;;" \
"srlz.i;;;" \
diff --git a/hw/xfree86/loader/elfloader.c b/hw/xfree86/loader/elfloader.c
index 44e248266..aa96fa08d 100644
--- a/hw/xfree86/loader/elfloader.c
+++ b/hw/xfree86/loader/elfloader.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.3 2004/10/30 20:33:43 alanc Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.4 2004/11/09 15:58:41 ajax Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.61tsi Exp $ */
/*
@@ -2799,6 +2799,14 @@ ELFCollectSections(ELFModulePtr elffile, int pass, int *totalsize,
mprotect( (char *)elffile->lsection[j].saddr - round,
SecSize(i) + round, PROT_READ | PROT_WRITE | PROT_EXEC);
}
+#ifdef __ia64__
+ {
+ int k;
+ for (k = 0; k < SecSize(i); k += 32)
+ ia64_flush_cache(elffile->lsection[j].saddr+k);
+ ia64_flush_cache(elffile->lsection[j].saddr+SecSize(i)-1);
+ }
+#endif
break;
#endif
case SHT_SYMTAB: