Re: [PATCH V6 05/13] perf: Generic intel uncore support
From: Yan, Zheng
Date: Tue Jul 24 2012 - 02:00:01 EST
[...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/