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] [PATCH] add machine info to /proc/cpuinfo & change platform

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH] add machine info to /proc/cpuinfo & change platform to "Xen"
From: Jerone Young <jyoung5@xxxxxxxxxx>
Date: Mon, 12 Mar 2007 18:04:49 -0500
Cc: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 12 Mar 2007 16:03:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1172790591.5204.9.camel@basalt>
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>
Organization: IBM
References: <1172784468.5637.3.camel@thinkpad> <1172790591.5204.9.camel@basalt>
Reply-to: jyoung5@xxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
The output of /proc/cpuinfo from this patch looks like the following:

[root@leaf7 ~]# cat /proc/cpuinfo 
processor       : 0
cpu             : PPC970, altivec supported
clock           : 1600.000000MHz
revision        : 2.2 (pvr 0039 0202)

processor       : 1
cpu             : PPC970, altivec supported
clock           : 1600.000000MHz
revision        : 2.2 (pvr 0039 0202)

timebase        : 199838713
platform        : Xen
machine         : CHRP IBM,8842-21X


Looks nice doesn't it :-) notice you see the machine type... ready for
the tree.



On Thu, 2007-03-01 at 17:09 -0600, Hollis Blanchard wrote:
> On Thu, 2007-03-01 at 15:27 -0600, Jerone Young wrote:
> > This patch adds machine information to /proc/cpuinfo as well as
> > changes the platform for "Xen-Maple" to Xen.
> 
> Jimi, this is the patch I was talking about.
> 
> Jerone, can you please paste cpuinfo from a system with this patch
> applied? Also, see below.
> 
> > diff -r 3e512eaf2a6f arch/powerpc/platforms/xen/setup.c
> > --- a/arch/powerpc/platforms/xen/setup.c        Thu Mar 01 10:27:39
> > 2007 -0600
> > +++ b/arch/powerpc/platforms/xen/setup.c        Thu Mar 01 14:27:23
> > 2007 -0600
> > @@ -39,6 +39,18 @@ extern struct machdep_calls mach_maple_m
> >  extern struct machdep_calls mach_maple_md;
> >  extern void maple_pci_init(void);
> > 
> > +static void xen_show_cpuinfo(struct seq_file *m)
> > +{
> > +       struct device_node *root;
> > +       const char *model = "";
> > +
> > +       root = of_find_node_by_path("/");
> > +       if (root)
> > +               model = get_property(root, "model", NULL);
> > +       seq_printf(m, "machine\t\t: CHRP %s\n", model);
> > +       of_node_put(root);
> > +}
> 
> Why CHRP? I don't think that should be there (think about PA Semi),
> except *maybe* if the system actually is CHRP.
> 
> >  int direct_remap_pfn_range(struct vm_area_struct *vma,
> >                 unsigned long address, 
> >                 unsigned long mfn,
> > @@ -272,9 +284,10 @@ void xen_machine_crash_shutdown(struct p
> >  #endif
> > 
> >  define_machine(xen) {
> > -       .name                   = "Xen-Maple",
> > +       .name                   = "Xen",
> >         .probe                  = xen_probe,
> >         .setup_arch             = xen_setup_arch,
> > +       .show_cpuinfo           = xen_show_cpuinfo,
> >         .init_early             = xen_init_early,
> >  #ifdef CONFIG_SHARE_MPIC
> >         .init_IRQ               = xen_maple_init_IRQ, 
> 


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