6ad74d9f | 01-Mar-2022 |
Matt Spinler <spinler@us.ibm.com> |
adc: Only process CPUReq sensors when CPUs change
The adcsensor application watches for the Present property to change on CPUs so that it can check if any ADC sensors that have the 'CPURequired' con
adc: Only process CPUReq sensors when CPUs change
The adcsensor application watches for the Present property to change on CPUs so that it can check if any ADC sensors that have the 'CPURequired' configuration field need changes.
However, in this case it was also deleting and recreating non-CPU related sensors, such as ones that measure the RTC battery voltage. This is a problem because if that sensor is below threshold, it will behave as if the threshold were newly asserted by emitting propertiesChanged signals on the threshold alarm properties as well as emitting the ThresholdAsserted signals again.
Fix this by changing the code to only process sensors that have the CPURequired field when handling CPU presence changes.
Tested: Check D-Bus signals when CPU presence changes versus when a threshold configuration property changes and see the expected handling.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I8f00726e71c85e70203a5cb6ee5dd99b4fe9e9c1
show more ...
|
6f379ce9 | 23-Feb-2022 |
Tim Chao <Tim.Chao@quantatw.com> |
dbus-sensors: Add new psu sensor labels and sensor type
The new type ADS7830 psu sensor is used in our machine. Add ADS7830 sensor labels and type to dbus-sensor.
Tested:Combined with related drive
dbus-sensors: Add new psu sensor labels and sensor type
The new type ADS7830 psu sensor is used in our machine. Add ADS7830 sensor labels and type to dbus-sensor.
Tested:Combined with related driver and entity-manager changes; sensors properly show up in IPMI sensors. Tested on Quanta S6Q platform.
Signed-off-by: Tim Chao <Tim.Chao@quantatw.com> Change-Id: I90979d1c9b74e2e704f42e946a343aeb537a8bb6
show more ...
|
5cf66dfc | 21-Dec-2021 |
linchuyuan <linchuyuan@google.com> |
Add support for flex bmr490
https: //flex.com/-/media/Project/Flex/BrandSite/technology/power/power_modules/Digital_DCDC/Flex-TS---BMR490_19-04-15.pdf Change-Id: I4b1fc3eee1a8b33b99b1b07b1886ce6ceb6
Add support for flex bmr490
https: //flex.com/-/media/Project/Flex/BrandSite/technology/power/power_modules/Digital_DCDC/Flex-TS---BMR490_19-04-15.pdf Change-Id: I4b1fc3eee1a8b33b99b1b07b1886ce6ceb630999 Signed-off-by: linchuyuan <linchuyuan@google.com>
show more ...
|
9f3a74ed | 06-Jan-2022 |
Jayashree Dhanapal <jayashree-d@hcl.com> |
Fix for hwmontemp sensor to avoid invoking same sensor
Refactored the code by constructing a map to store the sensor bus & address as key and sensor information as value. Instead of iterating sensor
Fix for hwmontemp sensor to avoid invoking same sensor
Refactored the code by constructing a map to store the sensor bus & address as key and sensor information as value. Instead of iterating sensor configuration for every hwmon path, this will make the code efficient by configuring sensor details before iterating hwmon paths.
Moreover, once a sensor name is found and all the sensor names under each config is constructed, then, sensor config from the configMap is removed. Therefore, this will avoid invoking a constructor for same sensor under different hwmon paths.
Tested: Tested in Facebook YosemiteV2 platform and verified the hwmontemp sensors.
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com> Change-Id: Iae06b2e1d4245e2f455b1366924694a55d3b0a05
show more ...
|
27cac0be | 18-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Remove unused debug variable in NvmeSensorMain
This variable was unused, as clang correctly points out. Remove it.
Tested: Code complies. No-op change.
Signed-off-by: Ed Tanous <edtanous@google.
Remove unused debug variable in NvmeSensorMain
This variable was unused, as clang correctly points out. Remove it.
Tested: Code complies. No-op change.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7d10edb2e9f2b5c7d1757ae78459287bab3e8aec
show more ...
|
86d83010 | 18-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Remove pessimizing std::move
As clang-tidy points out, the object that this std::move is operating on is already an rvalue, so calling std::move on it is redundant.
Tested: trivial change.
Signed-
Remove pessimizing std::move
As clang-tidy points out, the object that this std::move is operating on is already an rvalue, so calling std::move on it is redundant.
Tested: trivial change.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Idd4efa6a65c8f125ccf6fe58262a09908aae2e74
show more ...
|
76b2bc7d | 18-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Fix lifetime bug
Capturing a shared_ptr by reference does not keep it alive for the lifetime of the callback, as was clearly the intent on this line. This leads to use after free bugs.
Make the on
Fix lifetime bug
Capturing a shared_ptr by reference does not keep it alive for the lifetime of the callback, as was clearly the intent on this line. This leads to use after free bugs.
Make the one character change to capture this RAII object by value, not reference.
Tested: Don't have NVMe drives to test with at the moment, but this should be trivial.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I5c81f0bd287f3ea3e3a77f3589718201733be32f
show more ...
|
7d6b77d0 | 10-Feb-2022 |
Khang Kieu <khangk@google.com> |
sensors: Fix typo in PSUSensorMain ISL69225
Fixed the typo in this review https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/51074 for mistaking ISL'69225' for '68225'
Tested: sensor list
sensors: Fix typo in PSUSensorMain ISL69225
Fixed the typo in this review https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/51074 for mistaking ISL'69225' for '68225'
Tested: sensor list shows ISL69225 in PSUSensor Signed-off-by: Khang Kieu <khangk@google.com> Change-Id: I2fafd524f9f5ab8e481290cb2325d40717a87822
show more ...
|
73030639 | 14-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Enable cppcoreguidelines-avoid-goto checks
We've been pretty good about this one, the only usages seem to be in nvme sensor and added recently. To move to more RAII compliant containers, this commi
Enable cppcoreguidelines-avoid-goto checks
We've been pretty good about this one, the only usages seem to be in nvme sensor and added recently. To move to more RAII compliant containers, this commit creates a FileHandle class, which accepts either a file path and a mode, or a direct file handle, to be handled via RAII. Ideally we wouldn't have to create this ourselves, and could rely on some library, but the alternatives all have compromises that are worse.
boost::asio::random_access_file requires iouring to be enabled, and isn't available until boost 0.78, which we haven't rebased to yet. https://www.boost.org/doc/libs/develop/doc/html/boost_asio/reference/random_access_file.html Once available, this is what I would hope that a bunch of the nvme stuff evolves into to be much simpler.
boost::iostream::file_descriptor requires linking against boost::iostream, which would bloat our binary size for a lot of things we don't use. There is a file_descriptor.cpp that we could compile directly to solve this, but the existing yocto boost project (nor any other distro project) installs these files for use, which would complicate this solution
std::fstream doesn't allow direct access to the file handle, which would be required for streaming operations.
https://www.boost.org/doc/libs/1_35_0/libs/iostreams/doc/installation.html https://www.boost.org/doc/libs/1_78_0/libs/iostreams/doc/classes/file_descriptor.html#file_descriptor
A very similar class exists within ipmid here: https://github.com/openbmc/phosphor-host-ipmid/blob/master/user_channel/file.hpp
This class differs in a couple minor ways, in that it throws exceptions on open failures (similar to the boost classes), accepts the input by std::filesystem::path, instead of string, and supports std::move, which is required for the pipe usage.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I8be2419783e41e8f529030bb3d05c2e7aa890307
show more ...
|
99c4409a | 14-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Enable cppcoreguidelines-pro-type-vararg check
We only had one usage of printf in the code that was in violation of this rule, so replace it with iostreams, and enable the check.
Signed-off-by: Ed
Enable cppcoreguidelines-pro-type-vararg check
We only had one usage of printf in the code that was in violation of this rule, so replace it with iostreams, and enable the check.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie62165b599a996f34893aa5a3f8d1f6e6cbaf903
show more ...
|
17551b8b | 26-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Remove isValidLevel()
Every usage of isValidLevel is done after the levels have been parsed and are already known to be correct. Checking that Level is valid is wasteful, and in some cases, is alre
Remove isValidLevel()
Every usage of isValidLevel is done after the levels have been parsed and are already known to be correct. Checking that Level is valid is wasteful, and in some cases, is already checked by getThresholdInterface, which can already bounds check this.
This check is not needed.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I1d03c1c66ae37ca86a48175ec9c739c2d3966662
show more ...
|
51ad6674 | 08-Feb-2022 |
Khang Kieu <khangk@google.com> |
sensors: Add support for ISL69225 sensor for dbus-sensors
Add sensor ISL69225 to `sensorTypes` and `pmbusNames`
Tested: Was able to create ISL69225 devices Signed-off-by: Khang Kieu <khangk@google.
sensors: Add support for ISL69225 sensor for dbus-sensors
Add sensor ISL69225 to `sensorTypes` and `pmbusNames`
Tested: Was able to create ISL69225 devices Signed-off-by: Khang Kieu <khangk@google.com> Change-Id: I2f3121baab7cf85261bfd57e33a54328eec5ce57
show more ...
|
3928741a | 04-Feb-2022 |
Andrei Kartashev <a.kartashev@yadro.com> |
sensors: don't pass excess conn handler
We don't need to pass connection handler to setInitialProperties method since it already part of the sensor class.
Tested: no changes in behaviour. Signed-of
sensors: don't pass excess conn handler
We don't need to pass connection handler to setInitialProperties method since it already part of the sensor class.
Tested: no changes in behaviour. Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com> Change-Id: Icaaccbeaf14e22648a6a1bce381f0f0a606b0ddd
show more ...
|
c8fed20b | 12-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Rearrange thresholds to be pair based
It was pointed out in another review that the way the dbus interfaces are set up, they are all pair-wise, with a positive and negative end of the interface. Th
Rearrange thresholds to be pair based
It was pointed out in another review that the way the dbus interfaces are set up, they are all pair-wise, with a positive and negative end of the interface. This changes the data structures to match that reality, inventing a "ThresholdDefinition" object. This reduces the code, and allows us to promote the level definitions up to a higher scope in the structure.
This greatly simplifies the thresProp structure to remove a number of elements that were redundant, and allows adding new thresholds easier in the future.
Tested: Tested on Vegman system; Thresholds work as designed.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic9d5ba8282f78fe928689cb7fbd98d575a570200
show more ...
|
74cffa88 | 25-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Fix clang-tidy header check
Apparently our exclusion of the linux headers covered up some issues in our own headers, and was erroneously ignoring all headers, not just the linux headers.
Apparently
Fix clang-tidy header check
Apparently our exclusion of the linux headers covered up some issues in our own headers, and was erroneously ignoring all headers, not just the linux headers.
Apparently this now detects recursion quite a bit, so disable that check for the moment, as well as the special member variables checks. Also, disable some cert checks that are duplicates of bugprone-reserved-identifier, because of the aformentioned ignored linux headers
All other changes are done automatically.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie640495146dbe155a85d8a9e81be78539137a88b
show more ...
|
30eb03f3 | 26-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Remove redundant empty check
Checking a vector for empty, then immediately iterating it doesn't change anything. An empty vector will just return immediately.
Tested: No-OP
Signed-off-by: Ed Tano
Remove redundant empty check
Checking a vector for empty, then immediately iterating it doesn't change anything. An empty vector will just return immediately.
Tested: No-OP
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ibf8b3e5c6481bbd17d24b9b5a43320ebac4b79f4
show more ...
|
f69fbf99 | 14-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Consistently use std::pair<double, double> limits
There are a number of places in tach sensor where we jump from having a pair of doubles, so having a pair of ints, then back. All sensors take this
Consistently use std::pair<double, double> limits
There are a number of places in tach sensor where we jump from having a pair of doubles, so having a pair of ints, then back. All sensors take this as a double, so we should be consistent, even if tachsensor is only expected to have integer units.
This was flagged by clang-tidy as part of the bugprone-misplaced-widening-cast check.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iee1439f3af2bf8c15dc33f91c63859c5d1b776ca
show more ...
|
62fd8073 | 19-Jan-2022 |
Rashmica Gupta <rashmica.g@gmail.com> |
thresholds: Fix typo in interface name
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Change-Id: I784296f04a0a89cb38ced5769e29b0f177153c09 |
d2208a90 | 14-Jan-2022 |
Rashmica Gupta <rashmica.g@gmail.com> |
thresholds: Make variable naming and type the same
So what constitutes a severity value and a level is consistent across the code.
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Change-Id: Ie
thresholds: Make variable naming and type the same
So what constitutes a severity value and a level is consistent across the code.
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Change-Id: Ie1af1b9b9b207339ca12235f04b95dc2a1e16979
show more ...
|
a771f6a7 | 14-Jan-2022 |
Ed Tanous <edtanous@google.com> |
Enable cppcoreguidelines-init-variables
We try to enforce this rule, but clearly the robot can do a better job. Enable the rule, and for init of all variables that clang-tidy finds in error.
Signed
Enable cppcoreguidelines-init-variables
We try to enforce this rule, but clearly the robot can do a better job. Enable the rule, and for init of all variables that clang-tidy finds in error.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Icf64bc51b3180de29f7e92fa5c5f636e6b1462a6
show more ...
|
091c92c0 | 11-Jan-2022 |
Jayashree Dhanapal <jayashree-d@hcl.com> |
Add Softshutdown and Hardshutdown threshold interface
Added threshold interfaces like Softshutdown and Hardshutdown interfaces in dbus-sensors. This is similiar to warning and critical threshold int
Add Softshutdown and Hardshutdown threshold interface
Added threshold interfaces like Softshutdown and Hardshutdown interfaces in dbus-sensors. This is similiar to warning and critical threshold interfaces.
To enable this Softshutdown and Hardshutdown interfaces, need to set the Severity level in EM config. Severity value as 2 for Softshutdown and Severity value as 3 for Hardshutdown.
TESTED: Tested on Facebook YosemiteV2 hardware. Verified the Hardshutdown and Softshutdown interfaces are created and displaying in dbus objects.
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com> Change-Id: Ic9a6e719a8343321f894bc031688a17a3ed7fd67
show more ...
|
3ec41c53 | 10-Dec-2021 |
Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com> |
Add reporting of Relative Humidity for Hwmon
By checking for IIO devies of in_humidityrelative_input or in_humidityrelative_raw we add to the reading of those devices too. Also the units for "Percen
Add reporting of Relative Humidity for Hwmon
By checking for IIO devies of in_humidityrelative_input or in_humidityrelative_raw we add to the reading of those devices too. Also the units for "Percent" now have become overloaded, as humidity is "Percent" Relative Humidity and not a a Utilization. I believe Utilization should NOT be a "Percent" but a fraction from 0 to 1.
Tested: on Rainier's Blyth and Everest's Storm King Op Panels busctl introspect --no-pager xyz.openbmc_project.HwmonTempSensor \ /xyz/openbmc_project/sensors/humidity/Relative_Humidity Results consistent with location of the systems.
Signed-off-by: Bruce Mitchell <bruce.mitchell@linux.vnet.ibm.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I62c2464177542e7a2234f277be30d4fa4a849381
show more ...
|
4786334f | 14-Dec-2021 |
Potin Lai <potin.lai@quantatw.com> |
HwmonTempSensor: add HDC1080
1. add HDC1080 to sensor type list 2. re-sort sensor type list
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I2a3054d39232c27bf0c4429db973df116f376b08 |
5667808a | 04-Jan-2022 |
Jayashree Dhanapal <jayashree-d@hcl.com> |
Move threshold interfaces to common function
Threshold Hardshutdown and Softshutdown interfaces needs to be created for sensors. Therefore, created a common function called getInterface() to access
Move threshold interfaces to common function
Threshold Hardshutdown and Softshutdown interfaces needs to be created for sensors. Therefore, created a common function called getInterface() to access all the threshold interfaces from all the sensors source file and removed hasCriticalInterface(), hasWarningInterface() functions.
Moreover, threshold interfaces from all the sensor constructor has been refactored to avoid duplicating functions.
TESTED: Tested on Facebook YosemiteV2 hardware. Verified that the Warning and Critical interfaces are created and displaying in dbus objects.
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com> Change-Id: I9c7d049c7d4445d7199bf63d8e729838990880e9
show more ...
|
3c969f65 | 07-Jan-2022 |
Matt Spinler <spinler@us.ibm.com> |
hwmontemp: Remove trace for unmatched hwmon file
This trace occurred when there was a temp*_input file that didn't have an entity-manager configuration used by hwmontempsensor.
Remove it since ther
hwmontemp: Remove trace for unmatched hwmon file
This trace occurred when there was a temp*_input file that didn't have an entity-manager configuration used by hwmontempsensor.
Remove it since there are valid cases for this, such as * PSUSensor or some other application monitors that temperature. * That temperature doesn't need to be monitored.
An alternative could be to make it a debug trace.
Tested: No longer see statements like the following the journal: failed to find match for 9-004d
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Idaeb84f755ce0760071ccb1e17a8fad2dc8059c3
show more ...
|