Messages in this thread | | | Subject | Re: [PATCH 2/5] perf: generic intel uncore support | From | Peter Zijlstra <> | Date | Tue, 03 Apr 2012 00:24:39 +0200 |
| |
On Sun, 2012-04-01 at 11:11 +0800, Yan, Zheng wrote: > > >> +static int __init uncore_type_init(struct intel_uncore_type *type) > >> +{ > >> + struct intel_uncore_pmu *pmus; > >> + struct attribute_group *events_group; > >> + struct attribute **attrs; > >> + int i, j; > >> + > >> + pmus = kzalloc(sizeof(*pmus) * type->num_boxes, GFP_KERNEL); > >> + if (!pmus) > >> + return -ENOMEM; > > > > Hmm, but if you have a pmu per number of boxes, then what do you need > > that pmu->box reference for? > > Type->num_boxes is number of boxes within one physical cpu. pmu->box_hash > is needed because there can be several physical cpus in a system.
Ah, indeed.
| |