• Zhang Rui's avatar
    intel_rapl: Fix module autoloading issue · abcfaeb3
    Zhang Rui authored
    intel_rapl driver used to have a list of cpuids, which is used to
    1. check if the processor support RAPL MSRs
    2. do some cpu model specific setting
    3. module autoloading
    
    Now, the cpu model specific setting are moved to intel_rapl_common.c as
    part of the common code, because the setup is also needed by RAPL MMIO
    interface on those platforms.
    But removing the cpuid list from intel_rapl MSR interface driver results
    in that the driver can not be loaded automatically.
    
    Maintaining another copy of the cpuid list in intel_rapl_msr.c does not make
    sense because it increases the complexity when enabling RAPL support on a
    new cpu model.
    
    Fix the problem by creating an "intel_rapl_msr" platform device in the
    common code, and make RAPL MSR interface driver (intel_rapl_msr.c) probe the
    platform device directly.
    Reviewed-by: default avatarPandruvada, Srinivas <srinivas.pandruvada@intel.com>
    Tested-by: default avatarPandruvada, Srinivas <srinivas.pandruvada@intel.com>
    Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    abcfaeb3
intel_rapl_msr.c 4.64 KB