1. 21 1月, 2023 1 次提交
  2. 22 9月, 2022 1 次提交
  3. 01 9月, 2022 1 次提交
  4. 26 7月, 2022 2 次提交
    • A
      intel_idle: make SPR C1 and C1E be independent · 1548fac4
      Artem Bityutskiy 提交于
      This patch partially reverts the changes made by the following commit:
      
      da0e58c0 intel_idle: add 'preferred_cstates' module argument
      
      As that commit describes, on early Sapphire Rapids Xeon platforms the C1 and
      C1E states were mutually exclusive, so that users could only have either C1 and
      C6, or C1E and C6.
      
      However, Intel firmware engineers managed to remove this limitation and make C1
      and C1E to be completely independent, just like on previous Xeon platforms.
      
      Therefore, this patch:
       * Removes commentary describing the old, and now non-existing SPR C1E
         limitation.
       * Marks SPR C1E as available by default.
       * Removes the 'preferred_cstates' parameter handling for SPR. Both C1 and
         C1E will be available regardless of 'preferred_cstates' value.
      
      We expect that all SPR systems are shipping with new firmware, which includes
      the C1/C1E improvement.
      
      Cc: v5.18+ <stable@vger.kernel.org> # v5.18+
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1548fac4
    • W
      intel_idle: Fix false positive RCU splats due to incorrect hardirqs state · d295ad34
      Waiman Long 提交于
      Commit 32d4fd57 ("cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE")
      uses raw_local_irq_enable/local_irq_disable() around call to
      __intel_idle() in intel_idle_irq().
      
      With interrupt enabled, timer tick interrupt can happen and a
      subsequently call to __do_softirq() may change the lockdep hardirqs state
      of a debug kernel back to 'on'. This will result in a mismatch between
      the cpu hardirqs state (off) and the lockdep hardirqs state (on) causing
      a number of false positive "WARNING: suspicious RCU usage" splats.
      
      Fix that by using local_irq_disable() to disable interrupt in
      intel_idle_irq().
      
      Fixes: 32d4fd57 ("cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE")
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Cc: 5.16+ <stable@vger.kernel.org> # 5.16+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d295ad34
  5. 20 7月, 2022 1 次提交
  6. 27 6月, 2022 1 次提交
  7. 09 6月, 2022 1 次提交
  8. 28 4月, 2022 3 次提交
    • Z
      intel_idle: Add AlderLake support · d1cf8bbf
      Zhang Rui 提交于
      Similar to SPR, the C1 and C1E states on ADL are mutually exclusive.
      Only one of them can be enabled at a time.
      
      But contrast to SPR, which usually has a strong latency requirement
      as a Xeon processor, C1E is preferred on ADL for better energy
      efficiency.
      
      Add custom C-state tables for ADL with both C1 and C1E, and
      
       1. Enable the "C1E promotion" bit in MSR_IA32_POWER_CTL and mark C1
          with the CPUIDLE_FLAG_UNUSABLE flag, so C1 is not available by
          default.
      
       2. Add support for the "preferred_cstates" module parameter, so that
          users can choose to use C1 instead of C1E by booting with
          "intel_idle.preferred_cstates=2".
      
      Separate custom C-state tables are introduced for the ADL mobile and
      desktop processors, because of the exit latency differences between
      these two variants, especially with respect to PC10.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      [ rjw: Changelog edits, code rearrangement ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d1cf8bbf
    • A
      intel_idle: Fix SPR C6 optimization · 7eac3bd3
      Artem Bityutskiy 提交于
      The Sapphire Rapids (SPR) C6 optimization was added to the end of the
      'spr_idle_state_table_update()' function. However, the function has a
      'return' which may happen before the optimization has a chance to run.
      And this may prevent the optimization from happening.
      
      This is an unlikely scenario, but possible if user boots with, say,
      the 'intel_idle.preferred_cstates=6' kernel boot option.
      
      This patch fixes the issue by eliminating the problematic 'return'
      statement.
      
      Fixes: 3a9cf77b ("intel_idle: add core C6 optimization for SPR")
      Suggested-by: NJan Beulich <jbeulich@suse.com>
      Reported-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      [ rjw: Minor changelog edits ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7eac3bd3
    • A
      intel_idle: Fix the 'preferred_cstates' module parameter · 39c184a6
      Artem Bityutskiy 提交于
      Problem description.
      
      When user boots kernel up with the 'intel_idle.preferred_cstates=4' option,
      we enable C1E and disable C1 states on Sapphire Rapids Xeon (SPR). In order
      for C1E to work on SPR, we have to enable the C1E promotion bit on all
      CPUs.  However, we enable it only on one CPU.
      
      Fix description.
      
      The 'intel_idle' driver already has the infrastructure for disabling C1E
      promotion on every CPU. This patch uses the same infrastructure for
      enabling C1E promotion on every CPU. It changes the boolean
      'disable_promotion_to_c1e' variable to a tri-state 'c1e_promotion'
      variable.
      
      Tested on a 2-socket SPR system. I verified the following combinations:
      
       * C1E promotion enabled and disabled in BIOS.
       * Booted with and without the 'intel_idle.preferred_cstates=4' kernel
         argument.
      
      In all 4 cases C1E promotion was correctly set on all CPUs.
      
      Also tested on an old Broadwell system, just to make sure it does not cause
      a regression. C1E promotion was correctly disabled on that system, both C1
      and C1E were exposed (as expected).
      
      Fixes: da0e58c0 ("intel_idle: add 'preferred_cstates' module argument")
      Reported-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      [ rjw: Minor changelog edits ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      39c184a6
  9. 17 3月, 2022 2 次提交
  10. 05 3月, 2022 3 次提交
    • A
      intel_idle: add core C6 optimization for SPR · 3a9cf77b
      Artem Bityutskiy 提交于
      Add a Sapphire Rapids Xeon C6 optimization, similar to what we have for Sky Lake
      Xeon: if package C6 is disabled, adjust C6 exit latency and target residency to
      match core C6 values, instead of using the default package C6 values.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3a9cf77b
    • A
      intel_idle: add 'preferred_cstates' module argument · da0e58c0
      Artem Bityutskiy 提交于
      On Sapphire Rapids Xeon (SPR) the C1 and C1E states are basically mutually
      exclusive - only one of them can be enabled. By default, 'intel_idle' driver
      enables C1 and disables C1E. However, some users prefer to use C1E instead of
      C1, because it saves more energy.
      
      This patch adds a new module parameter ('preferred_cstates') for enabling C1E
      and disabling C1. Here is the idea behind it.
      
      1. This option has effect only for "mutually exclusive" C-states like C1 and
         C1E on SPR.
      2. It does not have any effect on independent C-states, which do not require
         other C-states to be disabled (most states on most platforms as of today).
      3. For mutually exclusive C-states, the 'intel_idle' driver always has a
         reasonable default, such as enabling C1 on SPR by default. On other
         platforms, the default may be different.
      4. Users can override the default using the 'preferred_cstates' parameter.
      5. The parameter accepts the preferred C-states bit-mask, similarly to the
         existing 'states_off' parameter.
      6. This parameter is not limited to C1/C1E, and leaves room for supporting
         other mutually exclusive C-states, if they come in the future.
      
      Today 'intel_idle' can only be compiled-in, which means that on SPR, in order
      to disable C1 and enable C1E, users should boot with the following kernel
      argument: intel_idle.preferred_cstates=4
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      da0e58c0
    • A
      intel_idle: add SPR support · 9edf3c0f
      Artem Bityutskiy 提交于
      Add Sapphire Rapids Xeon support.
      
      Up until very recently, the C1 and C1E C-states were independent, but this
      has changed in some new chips, including Sapphire Rapids Xeon (SPR). In these
      chips the C1 and C1E states cannot be enabled at the same time. The "C1E
      promotion" bit in 'MSR_IA32_POWER_CTL' also has its semantics changed a bit.
      
      Here are the C1, C1E, and "C1E promotion" bit rules on Xeons before SPR.
      
      1. If C1E promotion bit is disabled.
         a. C1  requests end up with C1  C-state.
         b. C1E requests end up with C1E C-state.
      2. If C1E promotion bit is enabled.
         a. C1  requests end up with C1E C-state.
         b. C1E requests end up with C1E C-state.
      
      Here are the C1, C1E, and "C1E promotion" bit rules on Sapphire Rapids Xeon.
      1. If C1E promotion bit is disabled.
         a. C1  requests end up with C1 C-state.
         b. C1E requests end up with C1 C-state.
      2. If C1E promotion bit is enabled.
         a. C1  requests end up with C1E C-state.
         b. C1E requests end up with C1E C-state.
      
      Before SPR Xeon, the 'intel_idle' driver was disabling C1E promotion and was
      exposing C1 and C1E as independent C-states. But on SPR, C1 and C1E cannot be
      enabled at the same time.
      
      This patch adds both C1 and C1E states. However, C1E is marked as with the
      "CPUIDLE_FLAG_UNUSABLE" flag, which means that in won't be registered by
      default. The C1E promotion bit will be cleared, which means that by default
      only C1 and C6 will be registered on SPR.
      
      The next patch will add an option for enabling C1E and disabling C1 on SPR.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9edf3c0f
  11. 25 9月, 2021 1 次提交
    • A
      intel_idle: enable interrupts before C1 on Xeons · c227233a
      Artem Bityutskiy 提交于
      Enable local interrupts before requesting C1 on the last two generations
      of Intel Xeon platforms: Sky Lake, Cascade Lake, Cooper Lake, Ice Lake.
      This decreases average C1 interrupt latency by about 5-10%, as measured
      with the 'wult' tool.
      
      The '->enter()' function of the driver enters C-states with local
      interrupts disabled by executing the 'monitor' and 'mwait' pair of
      instructions. If an interrupt happens, the CPU exits the C-state and
      continues executing instructions after 'mwait'. It does not jump to
      the interrupt handler, because local interrupts are disabled. The
      cpuidle subsystem enables interrupts a bit later, after doing some
      housekeeping.
      
      With this patch, we enable local interrupts before requesting C1. In
      this case, if the CPU wakes up because of an interrupt, it will jump
      to the interrupt handler right away. The cpuidle housekeeping will be
      done after the pending interrupt(s) are handled.
      
      Enabling interrupts before entering a C-state has measurable impact
      for faster C-states, like C1. Deeper, but slower C-states like C6 do
      not really benefit from this sort of change, because their latency is
      a lot higher comparing to the delay added by cpuidle housekeeping.
      
      This change was also tested with cyclictest and dbench. In case of Ice
      Lake, the average cyclictest latency decreased by 5.1%, and the average
      'dbench' throughput increased by about 0.8%. Both tests were run for 4
      hours with only C1 enabled (all other idle states, including 'POLL',
      were disabled). CPU frequency was pinned to HFM, and uncore frequency
      was pinned to the maximum value. The other platforms had similar
      single-digit percentage improvements.
      
      It is worth noting that this patch affects 'cpuidle' statistics a tiny
      bit.  Before this patch, C1 residency did not include the interrupt
      handling time, but with this patch, it will include it. This is similar
      to what happens in case of the 'POLL' state, which also runs with
      interrupts enabled.
      Suggested-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c227233a
  12. 09 6月, 2021 1 次提交
    • C
      intel_idle: Adjust the SKX C6 parameters if PC6 is disabled · 64233338
      Chen Yu 提交于
      Because cpuidle assumes worst-case C-state parameters, PC6 parameters
      are used for describing C6, which is worst-case for requesting CC6.
      When PC6 is enabled, this is appropriate. But if PC6 is disabled
      in the BIOS, the exit latency and target residency should be adjusted
      accordingly.
      
      Exit latency:
      Previously the C6 exit latency was measured as the PC6 exit latency.
      With PC6 disabled, the C6 exit latency should be the one of CC6.
      
      Target residency:
      With PC6 disabled, the idle duration within [CC6, PC6) would make the
      idle governor choose C1E over C6. This would cause low energy-efficiency.
      We should lower the bar to request C6 when PC6 is disabled.
      
      To fill this gap, check if PC6 is disabled in the BIOS in the
      MSR_PKG_CST_CONFIG_CONTROL(0xe2) register. If so, use the CC6 exit latency
      for C6 and set target_residency to 3 times of the new exit latency. [This
      is consistent with how intel_idle driver uses _CST to calculate the
      target_residency.] As a result, the OS would be more likely to choose C6
      over C1E when PC6 is disabled, which is reasonable, because if C6 is
      enabled, it implies that the user cares about energy, so choosing C6 more
      frequently makes sense.
      
      The new CC6 exit latency of 92us was measured with wult[1] on SKX via NIC
      wakeup as the 99.99th percentile. Also CLX and CPX both have the same CPU
      model number as SkX, but their CC6 exit latencies are similar to the SKX
      one, 96us and 89us respectively, so reuse the SKX value for them.
      
      There is a concern that it might be better to use a more generic approach
      instead of optimizing every platform. However, if the required code
      complexity and different PC6 bit interpretation on different platforms
      are taken into account, tuning the code per platform seems to be an
      acceptable tradeoff.
      
      Link: https://intel.github.io/wult/ # [1]
      Suggested-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NChen Yu <yu.c.chen@intel.com>
      Reviewed-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      [ rjw: Subject and changelog edits ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      64233338
  13. 09 4月, 2021 1 次提交
  14. 19 3月, 2021 1 次提交
  15. 22 1月, 2021 1 次提交
  16. 31 12月, 2020 1 次提交
    • A
      intel_idle: add SnowRidge C-state table · 9cf93f05
      Artem Bityutskiy 提交于
      Add C-state table for the SnowRidge SoC which is found on Intel Jacobsville
      platforms.
      
      The following has been changed.
      
       1. C1E latency changed from 10us to 15us. It was measured using the
          open source "wult" tool (the "nic" method, 15us is the 99.99th
          percentile).
      
       2. C1E power break even changed from 20us to 25us, which may result
          in less C1E residency in some workloads.
      
       3. C6 latency changed from 50us to 130us. Measured the same way as C1E.
      
      The C6 C-state is supported only by some SnowRidge revisions, so add a C-state
      table commentary about this.
      
      On SnowRidge, C6 support is enumerated via the usual mechanism: "mwait" leaf of
      the "cpuid" instruction. The 'intel_idle' driver does check this leaf, so even
      though C6 is present in the table, the driver will only use it if the CPU does
      support it.
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9cf93f05
  17. 03 12月, 2020 1 次提交
  18. 24 11月, 2020 1 次提交
  19. 28 10月, 2020 1 次提交
    • C
      intel_idle: Fix max_cstate for processor models without C-state tables · 4e0ba557
      Chen Yu 提交于
      Currently intel_idle driver gets the c-state information from ACPI
      _CST if the processor model is not recognized by it. However the
      c-state in _CST starts with index 1 which is different from the
      index in intel_idle driver's internal c-state table.
      
      While intel_idle_max_cstate_reached() was previously introduced to
      deal with intel_idle driver's internal c-state table, re-using
      this function directly on _CST is incorrect.
      
      Fix this by subtracting 1 from the index when checking max_cstate
      in the _CST case.
      
      For example, append intel_idle.max_cstate=1 in boot command line,
      Before the patch:
      grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
      POLL
      After the patch:
      grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name
      /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
      /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1_ACPI
      
      Fixes: 18734958 ("intel_idle: Use ACPI _CST for processor models without C-state tables")
      Reported-by: NPengfei Xu <pengfei.xu@intel.com>
      Cc: 5.6+ <stable@vger.kernel.org> # 5.6+
      Signed-off-by: NChen Yu <yu.c.chen@intel.com>
      [ rjw: Changelog edits ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4e0ba557
  20. 16 10月, 2020 2 次提交
    • M
      intel_idle: Ignore _CST if control cannot be taken from the platform · 75af76d0
      Mel Gorman 提交于
      e6d4f08a ("intel_idle: Use ACPI _CST on server systems") avoids
      enabling c-states that have been disabled by the platform with the
      exception of C1E.
      
      Unfortunately, BIOS implementations are not always consistent in terms
      of how capabilities are advertised and control cannot always be handed
      over. If control cannot be handed over then intel_idle reports that "ACPI
      _CST not found or not usable" but does not clear acpi_state_table.count
      meaning the information is still partially used.
      
      This patch ignores ACPI information if CST control cannot be requested from
      the platform. This was only observed on a number of Haswell platforms that
      had identical CPUs but not identical BIOS versions.  While this problem
      may be rare overall, 24 separate test cases bisected to this specific
      commit across 4 separate test machines and is worth addressing. If the
      situation occurs, the kernel behaves as it did before commit e6d4f08a
      and uses any c-states that are discovered.
      
      The affected test cases were all ones that involved a small number of
      processes -- exec microbenchmark, pipe microbenchmark, git test suite,
      netperf, tbench with one client and system call microbenchmark. Each
      case benefits from being able to use turboboost which is prevented if the
      lower c-states are unavailable. This may mask real regressions specific
      to older hardware so it is worth addressing.
      
      C-state status before and after the patch
      
      5.9.0-vanilla            POLL     latency:0      disabled:0 default:enabled
      5.9.0-vanilla            C1       latency:2      disabled:0 default:enabled
      5.9.0-vanilla            C1E      latency:10     disabled:0 default:enabled
      5.9.0-vanilla            C3       latency:33     disabled:1 default:disabled
      5.9.0-vanilla            C6       latency:133    disabled:1 default:disabled
      5.9.0-ignore-cst-v1r1    POLL     latency:0      disabled:0 default:enabled
      5.9.0-ignore-cst-v1r1    C1       latency:2      disabled:0 default:enabled
      5.9.0-ignore-cst-v1r1    C1E      latency:10     disabled:0 default:enabled
      5.9.0-ignore-cst-v1r1    C3       latency:33     disabled:0 default:enabled
      5.9.0-ignore-cst-v1r1    C6       latency:133    disabled:0 default:enabled
      
      Patch enables C3/C6.
      
      Netperf UDP_STREAM
      
      netperf-udp
                                            5.5.0                  5.9.0
                                          vanilla        ignore-cst-v1r1
      Hmean     send-64         193.41 (   0.00%)      226.54 *  17.13%*
      Hmean     send-128        392.16 (   0.00%)      450.54 *  14.89%*
      Hmean     send-256        769.94 (   0.00%)      881.85 *  14.53%*
      Hmean     send-1024      2994.21 (   0.00%)     3468.95 *  15.85%*
      Hmean     send-2048      5725.60 (   0.00%)     6628.99 *  15.78%*
      Hmean     send-3312      8468.36 (   0.00%)    10288.02 *  21.49%*
      Hmean     send-4096     10135.46 (   0.00%)    12387.57 *  22.22%*
      Hmean     send-8192     17142.07 (   0.00%)    19748.11 *  15.20%*
      Hmean     send-16384    28539.71 (   0.00%)    30084.45 *   5.41%*
      
      Fixes: e6d4f08a ("intel_idle: Use ACPI _CST on server systems")
      Signed-off-by: NMel Gorman <mgorman@techsingularity.net>
      Cc: 5.6+ <stable@vger.kernel.org> # 5.6+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      75af76d0
    • A
      intel_idle: mention assumption that WBINVD is not needed · 8bb2e2a8
      Alexander Monakov 提交于
      Intel SDM does not explicitly say that entering a C-state via MWAIT will
      implicitly flush CPU caches as appropriate for that C-state. However,
      documentation for individual Intel CPU generations does mention this
      behavior.
      
      Since intel_idle binds to any Intel CPU with MWAIT, list this assumption
      of MWAIT behavior.
      
      In passing, reword opening comment to make it clear that the driver can
      load on any old and future Intel CPU with MWAIT.
      Signed-off-by: NAlexander Monakov <amonakov@ispras.ru>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8bb2e2a8
  21. 26 8月, 2020 1 次提交
  22. 30 7月, 2020 2 次提交
    • C
      intel_idle: Customize IceLake server support · a472ad2b
      Chen Yu 提交于
      On ICX platform, the C1E auto-promotion is enabled by default.
      As a result, the CPU might fall into C1E more offen than previous
      platforms. Besides, the C1E is not exposed to sysfs on ICX, which
      is inconsistent with previous server platforms.
      
      So disable C1E auto-promotion and expose C1E as a separate idle
      state, so the C1E and C6 can be disabled via sysfs when necessary.
      
      Beside C1 and C1E, the exit latency of C6 was measured
      by a dedicated tool. However the exit latency(41us) exposed
      by _CST is much smaller than the one we measured(128us). This
      is probably due to the _CST uses the exit latency when woken
      up from PC0+C6, rather than PC6+C6 when C6 was measured. Choose
      the latter as we need the longest latency in theory.
      Reported-by: Nkernel test robot <lkp@intel.com>
      Tested-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Acked-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Reviewed-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NChen Yu <yu.c.chen@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a472ad2b
    • N
      cpuidle: change enter_s2idle() prototype · efe97112
      Neal Liu 提交于
      Control Flow Integrity(CFI) is a security mechanism that disallows
      changes to the original control flow graph of a compiled binary,
      making it significantly harder to perform such attacks.
      
      init_state_node() assign same function callback to different
      function pointer declarations.
      
      static int init_state_node(struct cpuidle_state *idle_state,
                                 const struct of_device_id *matches,
                                 struct device_node *state_node) { ...
              idle_state->enter = match_id->data; ...
              idle_state->enter_s2idle = match_id->data; }
      
      Function declarations:
      
      struct cpuidle_state { ...
              int (*enter) (struct cpuidle_device *dev,
                            struct cpuidle_driver *drv,
                            int index);
      
              void (*enter_s2idle) (struct cpuidle_device *dev,
                                    struct cpuidle_driver *drv,
                                    int index); };
      
      In this case, either enter() or enter_s2idle() would cause CFI check
      failed since they use same callee.
      
      Align function prototype of enter() since it needs return value for
      some use cases. The return value of enter_s2idle() is no
      need currently.
      Signed-off-by: NNeal Liu <neal.liu@mediatek.com>
      Reviewed-by: NSami Tolvanen <samitolvanen@google.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      efe97112
  23. 17 7月, 2020 1 次提交
  24. 29 6月, 2020 1 次提交
    • R
      intel_idle: Eliminate redundant static variable · dab20177
      Rafael J. Wysocki 提交于
      The value of the lapic_timer_always_reliable static variable in
      the intel_idle driver reflects the boot_cpu_has(X86_FEATURE_ARAT)
      value and so it also reflects the static_cpu_has(X86_FEATURE_ARAT)
      value.
      
      Hence, the lapic_timer_always_reliable check in intel_idle() is
      redundant and apart from this lapic_timer_always_reliable is only
      used in two places in which boot_cpu_has(X86_FEATURE_ARAT) can be
      used directly.
      
      Eliminate the lapic_timer_always_reliable variable in accordance
      with the above observations.
      
      No intentional functional impact.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dab20177
  25. 25 3月, 2020 1 次提交
  26. 12 2月, 2020 7 次提交