Question about enabling ACPI power meter capping

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

 



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.

By the way, I investigated the past background and found the following article, but I was unable to properly understand the reasoning behind it.
https://lore.kernel.org/linux-acpi/20101124232159.GX14383@xxxxxxxxxxxxxxxxxxxxxx/

Best regards,
Shinji





[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