Messages in this thread |  | | | Date | Tue, 24 Jul 2012 14:00:02 +0800 | | From | "Yan, Zheng" <> | | Subject | Re: [PATCH V6 05/13] perf: Generic intel uncore support |
| |
[...snip...] >> + >> +static int __init intel_uncore_init(void) >> +{ >> + int ret; >> + >> + if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) >> + return -ENODEV; >> + >> + ret = uncore_cpu_init(); >> + if (ret) >> + goto fail; >> + >> + uncore_pmus_register(); >> + return 0; >> +fail: >> + return ret; >> +} >> +device_initcall(intel_uncore_init); > > > You cannot use device_initcall() here. Otherwise you're subject > to linker ordering issues between intel_uncore_init() and the > perf_event_sysfs_init() initcall. You need the perf_event sysfs > support to be enabled BEFORE you init the uncore otherwise you > won't see the uncore sysfs entries. Given how perf now relies on > sysfs to parse the event, this is a showstopper.
I think the ordering makes no matter. perf_event_sysfs_init() checks PMUs that were registered previously and allocates sysfs entries for them.
Regards Yan, Zheng
|  |