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

Re: [XenPPC] Location to hook setting ppc_md.enable_pmcs for xen

To: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
Subject: Re: [XenPPC] Location to hook setting ppc_md.enable_pmcs for xen
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Tue, 27 Mar 2007 07:29:28 -0400
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 27 Mar 2007 04:28:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4608F8A1.3040904@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>
References: <4608F8A1.3040904@xxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx

On Mar 27, 2007, at 6:57 AM, Christian Ehrhardt wrote:

How does the inclusion of the code in the subdir platform/xen work in xenppc-linux - Does it replace the bare metal code in platform/ pseries or does it "extend" it in any way?

Please go with option (b). Until we actually merge with upstream we try to keep non-xen code changes to a minimum. It means duplicating some code, but that is ok.



Xen has has at least a completely own define_machine section there so I assume "replace".
The issue is that I ask myself if I should add something like:
a) in function "pSeries_setup_arch" of "arch/powerpc/platforms/ pseries/setup.c"
    ...
+   if (?XEN?)
+       ppc_md.enable_pmcs = pseries_xen_enable_pmcs;
m   else if (firmware_has_feature(FW_FEATURE_LPAR))
        ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
    else
        ppc_md.enable_pmcs = power4_enable_pmcs;
    ...

or

b) go to the xen path and do this in function "xen_setup_arch" of "arch/powerpc/platforms/xen/setup.c"
with something like this:
    ...
        xen_setup_smp();
    #endif

+        ppc_md.enable_pmcs = pseries_xen_enable_pmcs;

        printk(KERN_INFO "Using Xen idle loop\n");
    ...

According to the Makefile of "arch/powerpc/plattforms" both are build anyway. As far as I read it in the code the platform is detected at boot time and the appropriate ppc_md structure gets selected which should be the only xen structure in our case. This would argue for variant b) to implement it in "arch/powerpc/ platforms/xen/*" Can someone with more experience in that area please send an ack for b) or correct me?

--

Grüsse / regards, Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385
Ehrhardt@xxxxxxxxxxxxxxxxxxx
Ehrhardt@xxxxxxxxxx

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


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


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

<Prev in Thread] Current Thread [Next in Thread>