Re: Question about enabling ACPI power meter capping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/27/24 20:02, Shinji Nomoto (Fujitsu) wrote:
Hi there, We are planning to support ACPI power meter capping in our machines we are manufacturing, so I have a question regarding the capping code in the acpi_power_meter driver.
For the capping feature to be enabled in the current code, the following conditions for the setup_attrs function in drivers/hwmon/acpi_power_meter.c must be properly satisfied:

          if (resource->caps.flags & POWER_METER_CAN_CAP) { // Condition 1
                  if (!can_cap_in_hardware()) { // Condition 2
                          dev_warn(&resource->acpi_dev->dev,
                                   "Ignoring unsafe software power cap!\n");
                          goto skip_unsafe_cap;
                  }

* Condition 1
The capabilities bit3 (indicates that the power meter supports notifications when the hardware limit is enforced) of the ACPI _PMC object is set to 1.

* Condition 2
The then statement is skipped if any of the following conditions are met:
+ The module parameter force_cap_on is 1 The Manufacturer string of the
+ DMI System Information information has "IBM" embedded

After checking the ACPI specifications, I understand that there is no problem as long as condition 1 is met.
It seems like it would be better to enable the capping feature as long as condition 1 is met. So, can we remove the condition 2?
I would appreciate your opinions on whether condition 2 is necessary.


The problem here is that it is impossible to prove that the condition is
_not_ necessary. The existence of a specification does not guarantee
that implementations follow it.

On top of that, driver is completely out of date, and only minimal changes
should be made to it. I would suggest to add your system to pm_dmi_table.

Guenter





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux