<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.openanolis.cn/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.openanolis.cn/"
          
          maintainer="service@openanolis.org"
>

    <bug>
          <bug_id>9256</bug_id>
          
          <creation_ts>2024-05-30 12:56:11 +0000</creation_ts>
          <short_desc>Intel: Backport TPMI based RAPL PMU support for next Intel Xeon Granite Rapids (GNR)</short_desc>
          <delta_ts>2024-05-30 13:12:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>ANCK</classification>
          <product>ANCK 6.6 Dev</product>
          <component>X86</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3-Medium</priority>
          <bug_severity>S3-normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="yunyings">yunying.sun</reporter>
          <assigned_to name="Guanjun">guanjun</assigned_to>
          <cc>artie.ding</cc>
    
    
    <cc>dy01893908</cc>
    
    
    <cc>renyu.zj</cc>
          
          <qa_contact name="shuming">qingming.su</qa_contact>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28693</commentid>
    <comment_count>0</comment_count>
    <who name="yunyings">yunying.sun</who>
    <bug_when>2024-05-30 12:56:11 +0000</bug_when>
    <thetext>RAPL energy counter MSRs are exposed via perf PMU. But this is done by separate code which is not part of RAPL framework, and it cannot be reused by other RAPL Interface drivers like TPMI RAPL.

Introduce two new APIs for PMU support in RAPL framework. This allows TPMI RAPL PMU support and also makes it possible for future cleanups of MSR RAPL PMU code.

Commits from mainline kernel v6.10-rc1:
963a9ad3c589 powercap: intel_rapl_tpmi: Enable PMU support
575024a8aa7c powercap: intel_rapl: Introduce APIs for PMU support
72b8b94155d9 powercap: intel_rapl: Sort header files

Note that to make RAPL PMU work, TPMI must be enabled in kernel with configs like below:
CONFIG_INTEL_SPEED_SELECT_TPMI=m
CONFIG_INTEL_UNCORE_FREQ_CONTROL_TPMI=m
CONFIG_INTEL_TPMI=m
CONFIG_INTEL_RAPL_TPMI=m</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28694</commentid>
    <comment_count>1</comment_count>
    <who name="小龙">yongchao</who>
    <bug_when>2024-05-30 13:12:37 +0000</bug_when>
    <thetext>The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3293</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>