On Tue, 2009-05-26 at 12:59 -0500, Nathan Fontenot wrote: > This patch updates the output from /proc/ppc64/lparcfg to display the > processor virtualization resource allocations for a shared processor > partition.
> @@ -267,6 +281,28 @@ > seq_printf(m, "capped=%d\n", ppp_data.capped); > seq_printf(m, "unallocated_capacity=%lld\n", > ppp_data.unallocated_entitlement); > + > + /* The last bits of information returned from h_get_ppp are only > + * valid if the ibm,partition-performance-parameters-level > + * property is >= 1. > + */ > + root = of_find_node_by_path("/"); > + if (root) { > + perf_level = of_get_property(root, > + "ibm,partition-performance-parameters-level", > + NULL); What if there is no such property? > + if (*perf_level >= 1) { > + seq_printf(m, > + "physical_procs_allocated_to_virtualization=%d\n", > + ppp_data.phys_platform_procs); > + seq_printf(m, "max_proc_capacity_available=%d\n", > + ppp_data.max_proc_cap_avail); > + seq_printf(m, "entitled_proc_capacity_available=%d\n", > + ppp_data.entitled_proc_cap_avail); > + } > + > + of_node_put(root); > + } cheers
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev