lkml.org 
[lkml]   [2012]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2012-07-24 08:41    [from the cache]
©2003-2011 Jasper Spaans