Skip to content
  1. Apr 05, 2022
  2. Apr 04, 2022
    • Akihiko Odaki's avatar
      Revert "ACPI: processor: idle: Only flush cache on entering C3" · dfbba251
      Akihiko Odaki authored
      
      
      Revert commit 87ebbb8c ("ACPI: processor: idle: Only flush cache
      on entering C3") that broke the assumptions of the acpi_idle_play_dead()
      callers.
      
      Namely, the CPU cache must always be flushed in acpi_idle_play_dead(),
      regardless of the target C-state that is going to be requested, because
      this is likely to be part of a CPU offline procedure or preparation for
      entering a system-wide sleep state and the lack of synchronization
      between the CPU cache and RAM may lead to problems going forward, for
      example when the CPU is brought back online.
      
      In particular, it breaks resume from suspend-to-RAM on Lenovo ThinkPad
      C13 which fails occasionally until the problematic commit is reverted.
      
      Signed-off-by: default avatarAkihiko Odaki <akihiko.odaki@gmail.com>
      [ rjw: Changelog ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dfbba251
  3. Mar 25, 2022
  4. Mar 22, 2022
  5. Mar 17, 2022
  6. Mar 16, 2022
  7. Mar 11, 2022
  8. Mar 10, 2022
  9. Mar 09, 2022
    • Darren Hart's avatar
      ACPI/APEI: Limit printable size of BERT table data · 3f8dec11
      Darren Hart authored
      
      
      Platforms with large BERT table data can trigger soft lockup errors
      while attempting to print the entire BERT table data to the console at
      boot:
      
        watchdog: BUG: soft lockup - CPU#160 stuck for 23s! [swapper/0:1]
      
      Observed on Ampere Altra systems with a single BERT record of ~250KB.
      
      The original bert driver appears to have assumed relatively small table
      data. Since it is impractical to reassemble large table data from
      interwoven console messages, and the table data is available in
      
        /sys/firmware/acpi/tables/data/BERT
      
      limit the size for tables printed to the console to 1024 (for no reason
      other than it seemed like a good place to kick off the discussion, would
      appreciate feedback from existing users in terms of what size would
      maintain their current usage model).
      
      Alternatively, we could make printing a CONFIG option, use the
      bert_disable boot arg (or something similar), or use a debug log level.
      However, all those solutions require extra steps or change the existing
      behavior for small table data. Limiting the size preserves existing
      behavior on existing platforms with small table data, and eliminates the
      soft lockups for platforms with large table data, while still making it
      available.
      
      Signed-off-by: default avatarDarren Hart <darren@os.amperecomputing.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3f8dec11
  10. Mar 08, 2022
  11. Mar 07, 2022
  12. Mar 03, 2022
  13. Mar 02, 2022
  14. Mar 01, 2022
  15. Feb 25, 2022
    • Maximilian Luz's avatar
      ACPI: battery: Add device HID and quirk for Microsoft Surface Go 3 · 7dacee0b
      Maximilian Luz authored
      
      
      For some reason, the Microsoft Surface Go 3 uses the standard ACPI
      interface for battery information, but does not use the standard PNP0C0A
      HID. Instead it uses MSHW0146 as identifier. Add that ID to the driver
      as this seems to work well.
      
      Additionally, the power state is not updated immediately after the AC
      has been (un-)plugged, so add the respective quirk for that.
      
      Signed-off-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7dacee0b
    • Srinivas Pandruvada's avatar
      ACPI: fan: Add additional attributes for fine grain control · f1197343
      Srinivas Pandruvada authored
      
      
      Add additional attributes, which helps in implementing algorithm in
      the user space to optimize fan control. These attributes are presented
      in the same directory as the existing performance state attributes.
      
      Additional attributes:
      
      1. Support of fine grain control
      Publish support of presence of fine grain control so that fan speed
      can be tuned correctly. This attribute is called "fine_grain_control".
      
      2. fan speed
      Publish the actual fan rpm in sysfs. Knowing fan rpm is helpful to
      reduce noise level and use passive control instead. Also fan performance
      may not be same over time, so the same control value may not be enough
      to run the fan at a speed. So a feedback value of speed is helpful. This
      sysfs attribute is called "fan_speed_rpm".
      
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f1197343
    • Srinivas Pandruvada's avatar
      ACPI: fan: Properly handle fine grain control · bea2d986
      Srinivas Pandruvada authored
      
      
      When _FIF object specifies support for fine grain control, then fan speed
      can be set from 0 to 100% with the recommended minimum "step size" via
      _FSL object. Here the control value doesn't need to match any value from
      _FPS object.
      
      Currently we have a simple solution implemented which just pick maximum
      control value from _FPS to display the actual state, but this is not
      optimal when there is a big window between two control values in
      _FPS. Also there is no way to set to any speed which doesn't match
      control values in _FPS. The system firmware can start the fan at speed
      which doesn't match any control value.
      
      To support fine grain control (when supported) via thermal sysfs:
      - cooling device max state is not _FPS state count but it will be
      100 / _FIF.step_size
      Step size can be from 1 to 9.
      - cooling device current state is _FST.control / _FIF.step_size
      - cooling device set state will set the control value
      cdev.curr_state * _FIF.step_size plus any adjustment for 100%.
      By the spec, when control value do not sum to 100% because of
      _FIF.step_size, OSPM may select an appropriate ending Level increment
      to reach 100%.
      
      There is no rounding during calculation. For example if step size
      is 6:
      thermal sysfs cooling device max_state = 100/6 = 16
      So user can set any value from 0-16.
      
      If the system boots with a _FST.control which is not multiples
      of step_size, the thermal sysfs cur_state will be based on the
      range. For example for step size = 6:
      _FST.control	thermal sysfs cur_state
      ------------------------------------------------
      0-5		0
      6-11		1
      ..
      ..
      90-95		15
      96-100		16
      
      While setting the _FST.control, the compensation will be at
      the last step for cur_state = 16, which will set the _FST.control
      to 100.
      
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bea2d986
    • Srinivas Pandruvada's avatar
      ACPI: fan: Optimize struct acpi_fan_fif · d445571f
      Srinivas Pandruvada authored
      
      
      We don't need u64 to store the information about _FIF. There are two
      booleans (fine_grain_ctrl and low_speed_notification) and one field
      step_size which can take value from 1-9. There are no internal users
      of revision field. So convert all fields to u8, by not directly
      extracting the _FIF info the struct. Use an intermediate buffer to
      extract and assign.
      
      This will help to do u32 math using these fields. No functional
      changes are expected.
      
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d445571f
    • Srinivas Pandruvada's avatar
      ACPI: fan: Separate file for attributes creation · 00ae053a
      Srinivas Pandruvada authored
      
      
      Move the functionality of creation of sysfs attributes under acpi device
      to a new file fan_attr.c. This cleans up the core fan code, which just
      use thermal sysfs interface. The original fan.c is renamed to
      fan_core.c.
      
      No functional changes are expected.
      
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      00ae053a
    • Srinivas Pandruvada's avatar
      ACPI: fan: Fix error reporting to user space · 9ddb00a2
      Srinivas Pandruvada authored
      
      
      When user get/set cur_state fails, it should be some negative error
      value instead of whatever returned by acpi_evaluate_object() or from
      acpi_execute_simple_method(). The return value from these apis is
      some positive values greater than 0. For example if AE_NOT_FOUND
      is returned it will be "5".
      
      In other ACPI drivers, -ENODEV is returned when ACPI_FAILURE(status)
      is true. Do the same thing here for thermal sysfs callbacks for
      get and set for failures.
      
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9ddb00a2
  16. Feb 21, 2022
  17. Feb 18, 2022
Loading