[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XenPPC] [xenppc-unstable] [ppc] be explicit on how many pages the DART table is



# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 987eeb2da8c3a5089d03f65cd17541d542dd5e7e
# Parent  b86b2ee902d5f316f0fc2e62eff0a2dba508306e
[ppc] be explicit on how many pages the DART table is

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/arch/ppc/dart.h    |    4 ++--
 xen/arch/ppc/dart_u3.c |    4 ++--
 xen/arch/ppc/dart_u4.c |   14 +++++++-------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff -r b86b2ee902d5 -r 987eeb2da8c3 xen/arch/ppc/dart.h
--- a/xen/arch/ppc/dart.h       Sun Jun 25 15:55:21 2006 -0400
+++ b/xen/arch/ppc/dart.h       Sun Jun 25 16:08:39 2006 -0400
@@ -29,8 +29,8 @@ struct dart_ops {
     void (*do_inv_entry)(ulong pg);
 };
 
-extern struct dart_ops *u3_init(ulong base, ulong table, ulong tpgs);
-extern struct dart_ops *u4_init(ulong base, ulong table, ulong tpgs);
+extern struct dart_ops *u3_init(ulong base, ulong table, ulong dart_pages);
+extern struct dart_ops *u4_init(ulong base, ulong table, ulong dart_pages);
 
 #endif /* _DART_H */
 
diff -r b86b2ee902d5 -r 987eeb2da8c3 xen/arch/ppc/dart_u3.c
--- a/xen/arch/ppc/dart_u3.c    Sun Jun 25 15:55:21 2006 -0400
+++ b/xen/arch/ppc/dart_u3.c    Sun Jun 25 16:08:39 2006 -0400
@@ -86,7 +86,7 @@ static struct dart_ops u3_ops = {
     .do_inv_entry = u3_inv_entry,
 };
 
-struct dart_ops *u3_init(ulong base, ulong table, ulong tpgs)
+struct dart_ops *u3_init(ulong base, ulong table, ulong dart_pages)
 {
     union dart_ctl dc;
 
@@ -95,7 +95,7 @@ struct dart_ops *u3_init(ulong base, ulo
     dc.dc_word = 0;
 
     dc.reg.dc_base = table >> PAGE_SHIFT;
-    dc.reg.dc_size = 1 << tpgs;
+    dc.reg.dc_size = dart_pages;
     dc.reg.dc_enable = 1;
 
 
diff -r b86b2ee902d5 -r 987eeb2da8c3 xen/arch/ppc/dart_u4.c
--- a/xen/arch/ppc/dart_u4.c    Sun Jun 25 15:55:21 2006 -0400
+++ b/xen/arch/ppc/dart_u4.c    Sun Jun 25 16:08:39 2006 -0400
@@ -146,7 +146,7 @@ static struct dart_ops u4_ops = {
     .do_inv_entry = u4_inv_entry,
 };
 
-struct dart_ops *u4_init(ulong base, ulong table, ulong tpgs)
+struct dart_ops *u4_init(ulong base, ulong table, ulong dart_pages)
 {
     union dart_base db;
     union dart_size ds;
@@ -158,13 +158,13 @@ struct dart_ops *u4_init(ulong base, ulo
     db.db_bits.db_dartbase = table >> PAGE_SHIFT;
 
     ds.ds_word = 0;
-    ds.ds_bits.ds_dartsize = tpgs;
+    ds.ds_bits.ds_dartsize = dart_pages;
 
-    dc.dc_word = 0;
-    dc.dc_bits.dc_darten = 1;
-
-    /* make sure its disabled */
-    out_32(&dart->d_dartcntl.dc_word, 0);
+    dc.dc_word = in_32(&dart->d_dartcntl.dc_word);
+    if (dc.dc_bits.dc_darten == 1) {
+        panic("%s: dart is already enabled: 0x%x\n", __func__, dc.dc_word);
+    }
+    dc.dc_bits.dc_darten = 1;   /* enable it */
 
     printk("Initializing DART Model U4: ctl: 0x%x base: 0x%x size: 0x%x\n",
            dc.dc_word, db.db_word, ds.ds_word);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.