WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN][POWERPC] Add Function to completely

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN][POWERPC] Add Function to completely flush the I-Cache for a processor
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:34:28 +0000
Delivery-date: Wed, 13 Dec 2006 09:36:00 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 1c996041fcde13648b5447241ae2b34d885ff429
# Parent  24fd597879823265b4144f09a71128d9c636dc22
[XEN][POWERPC] Add Function to completely flush the I-Cache for a processor
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/powerpc64/ppc970.c |   27 +++++++++++++++++++++++++++
 xen/include/asm-powerpc/cache.h     |    1 +
 2 files changed, 28 insertions(+)

diff -r 24fd59787982 -r 1c996041fcde xen/arch/powerpc/powerpc64/ppc970.c
--- a/xen/arch/powerpc/powerpc64/ppc970.c       Mon Oct 02 11:06:10 2006 -0400
+++ b/xen/arch/powerpc/powerpc64/ppc970.c       Mon Oct 02 11:07:54 2006 -0400
@@ -39,10 +39,37 @@ struct cpu_caches cpu_caches = {
     .dline_size = 0x80,
     .log_dline_size = 7,
     .dlines_per_page = PAGE_SIZE >> 7,
+    .isize = (64 << 10),        /* 64 KiB */
     .iline_size = 0x80,
     .log_iline_size = 7,
     .ilines_per_page = PAGE_SIZE >> 7,
 };
+
+
+void cpu_flush_icache(void)
+{
+    union hid1 hid1;
+    ulong flags;
+    ulong ra;
+
+    local_irq_save(flags);
+
+    /* uses special processor mode that forces a real address match */
+    hid1.word = mfhid1();
+    hid1.bits.en_icbi = 1;
+    mthid1(hid1.word);
+
+    for (ra = 0; ra < cpu_caches.isize; ra += cpu_caches.iline_size)
+        icbi(ra);
+
+    sync();
+
+    hid1.bits.en_icbi = 0;
+    mthid1(hid1.word);
+
+    local_irq_save(flags);
+}
+
 
 struct rma_settings {
     int log;
diff -r 24fd59787982 -r 1c996041fcde xen/include/asm-powerpc/cache.h
--- a/xen/include/asm-powerpc/cache.h   Mon Oct 02 11:06:10 2006 -0400
+++ b/xen/include/asm-powerpc/cache.h   Mon Oct 02 11:07:54 2006 -0400
@@ -70,4 +70,5 @@ struct cpu_caches {
     u32 ilines_per_page;
 };
 extern struct cpu_caches cpu_caches;
+extern void cpu_flush_icache(void);
 #endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN][POWERPC] Add Function to completely flush the I-Cache for a processor, Xen patchbot-unstable <=