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-ppc-devel

[XenPPC] [pushed] [ppc] make the oftree is global so init drivers can do

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [pushed] [ppc] make the oftree is global so init drivers can do their own discovery via __init
From: jimix@xxxxxxxxxxxxxx
Date: Fri, 19 May 2006 13:09:23 -0400
Delivery-date: Fri, 19 May 2006 10:08:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
changeset:   10374:da465f243e12aec3f019624a5b98fef245f4d9d9
tag:         tip
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Fri May 19 13:08:58 2006 -0400
files:       xen/arch/ppc/boot_of.c xen/arch/ppc/domain_build.c 
xen/arch/ppc/external.c xen/arch/ppc/mpic_init.c xen/arch/ppc/mpic_init.h 
xen/arch/ppc/setup.c
description:
[ppc] make the oftree is global so init drivers can do their own discovery via 
__init


diff -r 2b09feae5f887eec534f9f4b12649c139504cfee -r 
da465f243e12aec3f019624a5b98fef245f4d9d9 xen/arch/ppc/boot_of.c
--- a/xen/arch/ppc/boot_of.c    Fri May 19 13:07:49 2006 -0400
+++ b/xen/arch/ppc/boot_of.c    Fri May 19 13:08:58 2006 -0400
@@ -738,7 +738,14 @@ static void __init boot_of_fix_maple(voi
     const char *ranges = "ranges";
     u32 isa_ranges[3];
     const u32 isa_test[] = { 0x00000001, 0xf4000000, 0x00010000 };
-    const u32 isa_fixed[] = { 0x1, 0x0, 0x0, 0x0, 0x0, 0x00010000 };
+    const u32 isa_fixed[] = {
+        0x00000001,
+        0x00000000,
+        0x00000000, /* 0xf4000000, matt says this */
+        0x00000000,
+        0x00000000,
+        0x00010000
+    };
 
     isa = of_finddevice("/ht@0/isa@4");
     if (isa != OF_FAILURE) {
diff -r 2b09feae5f887eec534f9f4b12649c139504cfee -r 
da465f243e12aec3f019624a5b98fef245f4d9d9 xen/arch/ppc/domain_build.c
--- a/xen/arch/ppc/domain_build.c       Fri May 19 13:07:49 2006 -0400
+++ b/xen/arch/ppc/domain_build.c       Fri May 19 13:08:58 2006 -0400
@@ -26,10 +26,7 @@
 #include <xen/compile.h>
 #include <asm/processor.h>
 #include <asm/papr.h>
-
-extern ulong oftree;
-extern ulong oftree_len;
-extern int ofd_dom0_fixup(struct domain *d, ulong oftree, start_info_t *si, 
ulong dst);
+#include "oftree.h"
 
 /* opt_dom0_mem: memory allocated to domain 0. */
 
diff -r 2b09feae5f887eec534f9f4b12649c139504cfee -r 
da465f243e12aec3f019624a5b98fef245f4d9d9 xen/arch/ppc/external.c
--- a/xen/arch/ppc/external.c   Fri May 19 13:07:49 2006 -0400
+++ b/xen/arch/ppc/external.c   Fri May 19 13:08:58 2006 -0400
@@ -170,9 +170,9 @@ static struct hw_interrupt_type xen_irq 
     .set_affinity = xen_set_affinity,
 };
 
-void init_IRQ(unsigned long oftree)
-{
-    hc_irq = xen_mpic_init(oftree, &xen_irq);
+void init_IRQ(void)
+{
+    hc_irq = xen_mpic_init(&xen_irq);
 }
 
 void ack_APIC_irq(void) {
diff -r 2b09feae5f887eec534f9f4b12649c139504cfee -r 
da465f243e12aec3f019624a5b98fef245f4d9d9 xen/arch/ppc/mpic_init.c
--- a/xen/arch/ppc/mpic_init.c  Fri May 19 13:07:49 2006 -0400
+++ b/xen/arch/ppc/mpic_init.c  Fri May 19 13:08:58 2006 -0400
@@ -6,6 +6,7 @@
 #include <public/of-devtree.h>
 #include <asm/mpic.h>
 #include "mpic_init.h"
+#include "oftree.h"
 
 #undef DEBUG
 #undef NOSERIAL
@@ -288,15 +289,15 @@ static int find_mpic_canonical_probe(voi
     return -1;
 }
 
-static int find_mpic(unsigned long oftree)
+static int find_mpic(void)
 {
     void *oft_p;
     int rc;
 
-    opic_addr = (unsigned long) -1;
+    opic_addr = (unsigned long)-1;
     opic_flags = 0;
 
-    oft_p = (void *) oftree;
+    oft_p = (void *)oftree;
     rc = find_mpic_simple_probe(oft_p);
 
     if (rc < 0) {
@@ -309,8 +310,7 @@ static int find_mpic(unsigned long oftre
 
 static struct hw_interrupt_type hc_irq;
 
-struct hw_interrupt_type *xen_mpic_init(
-    unsigned long oftree, struct hw_interrupt_type *xen_irq)
+struct hw_interrupt_type *xen_mpic_init(struct hw_interrupt_type *xen_irq)
 {
     unsigned int isu_size;
     unsigned int irq_offset;
@@ -332,7 +332,7 @@ struct hw_interrupt_type *xen_mpic_init(
     senses = NULL;
     senses_count = 0;
 
-    if (find_mpic(oftree)) {
+    if (find_mpic()) {
         printk("%s: ERROR: Could not find open pic.\n", __func__);
         return NULL;
     }
diff -r 2b09feae5f887eec534f9f4b12649c139504cfee -r 
da465f243e12aec3f019624a5b98fef245f4d9d9 xen/arch/ppc/mpic_init.h
--- a/xen/arch/ppc/mpic_init.h  Fri May 19 13:07:49 2006 -0400
+++ b/xen/arch/ppc/mpic_init.h  Fri May 19 13:08:58 2006 -0400
@@ -2,7 +2,7 @@
 #define _MPIC_INIT_H
 
 extern struct hw_interrupt_type *xen_mpic_init(
-    unsigned long oftree, struct hw_interrupt_type *xen_irq);
+    struct hw_interrupt_type *xen_irq);
 
 extern int xen_mpic_get_irq(struct cpu_user_regs *regs);
 
diff -r 2b09feae5f887eec534f9f4b12649c139504cfee -r 
da465f243e12aec3f019624a5b98fef245f4d9d9 xen/arch/ppc/setup.c
--- a/xen/arch/ppc/setup.c      Fri May 19 13:07:49 2006 -0400
+++ b/xen/arch/ppc/setup.c      Fri May 19 13:08:58 2006 -0400
@@ -54,7 +54,6 @@ unsigned long wait_init_idle;
 unsigned long wait_init_idle;
 unsigned int timebase_freq;
 ulong oftree;
-ulong oftree_end;
 ulong oftree_len;
 
 cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly;
@@ -158,6 +157,7 @@ static void __init __start_xen(multiboot
     ulong heap_size = 0;
     ulong bytes = 0;
     ulong freemem = (ulong)_end;
+    ulong oftree_end;
 
     memcpy(0, exception_vectors, exception_vectors_end - exception_vectors);
     synchronize_caches(0, exception_vectors_end - exception_vectors);



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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [pushed] [ppc] make the oftree is global so init drivers can do their own discovery via __init, jimix <=