ia64/xen-unstable

changeset 12910:776efe262006

[POWERPC][XEN] /chosen/cpu is an instance not a package

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Mon Sep 18 17:47:10 2006 -0400 (2006-09-18)
parents 223470316756
children 8cb0d0eea355
files xen/arch/powerpc/boot_of.c
line diff
     1.1 --- a/xen/arch/powerpc/boot_of.c	Wed Nov 29 14:16:36 2006 -0600
     1.2 +++ b/xen/arch/powerpc/boot_of.c	Mon Sep 18 17:47:10 2006 -0400
     1.3 @@ -957,8 +957,9 @@ static void boot_of_module(ulong r3, ulo
     1.4  
     1.5  static int __init boot_of_cpus(void)
     1.6  {
     1.7 -    int cpus_node;
     1.8 -    int cpu_node, bootcpu_node, logical;
     1.9 +    int cpus_node, cpu_node;
    1.10 +    int bootcpu_instance, bootcpu_node;
    1.11 +    int logical;
    1.12      int result;
    1.13      s32 cpuid;
    1.14      u32 cpu_clock[2];
    1.15 @@ -967,9 +968,13 @@ static int __init boot_of_cpus(void)
    1.16      /* Look up which CPU we are running on right now and get all info
    1.17       * from there */
    1.18      result = of_getprop(bof_chosen, "cpu",
    1.19 -                        &bootcpu_node, sizeof (bootcpu_node));
    1.20 +                        &bootcpu_instance, sizeof (bootcpu_instance));
    1.21      if (result == OF_FAILURE)
    1.22 -        of_panic("Failed to look up boot cpu\n");
    1.23 +        of_panic("Failed to look up boot cpu instance\n");
    1.24 +
    1.25 +    bootcpu_node = of_instance_to_package(bootcpu_instance);
    1.26 +    if (result == OF_FAILURE)
    1.27 +        of_panic("Failed to look up boot cpu package\n");
    1.28  
    1.29      cpu_node = bootcpu_node;
    1.30