Hi Paul, On Sat, 10 Aug 2013 13:46:15 +1000 Paul Mackerras <pau...@samba.org> wrote: > > +static void traverse_siblings_chip_id(int cpu, int add, int chipid)
Again, the "add is a boolean. > +{ > + const struct cpumask *mask; > + struct device_node *np; > + int i, plen; > + const int *prop; > + > + mask = add ? cpu_online_mask : cpu_present_mask; > + for_each_cpu(i, mask) { > + np = of_get_cpu_node(i, NULL); > + if (!np) > + continue; > + prop = of_get_property(np, "ibm,chip-id", &plen); > + if (prop && plen == sizeof(int) && *prop == chipid) { ^^^^^ You should be using of_read_number(), I think. > static void traverse_core_siblings(int cpu, int add) > { > - struct device_node *l2_cache; > + struct device_node *l2_cache, *np; > const struct cpumask *mask; > - int i; > + int i, chip, plen; > + const int *prop; > + > + /* First see if we have ibm,chip-id properties in cpu nodes */ > + np = of_get_cpu_node(cpu, NULL); > + if (np) { > + chip = -1; > + prop = of_get_property(np, "ibm,chip-id", &plen); > + if (prop && plen == sizeof(int)) > + chip = *(int *)prop; Here as well. -- Cheers, Stephen Rothwell s...@canb.auug.org.au
pgpMsT6pk8KlA.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev