History log of /openbmc/dbus-sensors/src/ (Results 176 – 200 of 601)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
f343b8ac12-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

IntrusionSensorMain: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id608284524e19c777cd44b1bd9593740345dd483

8908b3cf12-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

IntelCPUSensorMain: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I5c1f41665c06fb6e1ed961334425659cf8738563

a180833012-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

HwmonTempMain: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: If1e75f992fbb1f1729102003a06859db2bca94c9

77636ecb12-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

FanMain: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ia52bce48d0f2212b99e8f62918b3765465066994

08cb50c512-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

ExternalSensorMain: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I93928a18fc8b12c842b9622fa7382847760fb2c8

72f322f412-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

ExitAirTempSensor: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I9d536105564c725ee29c34ef0162cca6172daa43

d8c293a315-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

Code style fixes for clang-tidy

CI ended up complaining about these in unrelated patches that happened
to touch the same files; rather than clutter up those patches with
completely tangential change

Code style fixes for clang-tidy

CI ended up complaining about these in unrelated patches that happened
to touch the same files; rather than clutter up those patches with
completely tangential changes, let's handle them separately.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ic5bed1d618380e2ebcf33804e11336b6a0a27b1b

show more ...

9148f38212-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

ADCSensorMain: Replace iterator pairs with structured bindings

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I0be360189981675aa8e20ef8935fb6dd4d9341c6

e8b97ee312-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

PSUSensorMain: Drop vestigial type string from baseConfig

It had been a std::pair<>, but the first element of the pair (a string
of the sensor's type) wasn't ever used anywhere.

Signed-off-by: Zev

PSUSensorMain: Drop vestigial type string from baseConfig

It had been a std::pair<>, but the first element of the pair (a string
of the sensor's type) wasn't ever used anywhere.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I69441b09ef4fc24ec4f4784207394e044bc6e7c9

show more ...

214d971712-Aug-2022 Zev Weiss <zev@bewilderbeest.net>

Refactor PropertiesChanged handler setup

Most sensor daemons had pretty much the same duplicated open-coded
pattern for setting up PropertiesChanged signal matches; introduce a
helper function to re

Refactor PropertiesChanged handler setup

Most sensor daemons had pretty much the same duplicated open-coded
pattern for setting up PropertiesChanged signal matches; introduce a
helper function to reduce the duplication and make things more readable.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I803a21eea2f6d7fc71b50d54bb8fd57a104f3349

show more ...

255da6b428-Jul-2022 Thu Nguyen <thu@os.amperecomputing.com>

cpusensor: Change cpusensor to intelcpusensor

cpusensor class is specifically used for Intel CPU. The name of this
class and the build option should be changed to reflect with their
role.
The patch

cpusensor: Change cpusensor to intelcpusensor

cpusensor class is specifically used for Intel CPU. The name of this
class and the build option should be changed to reflect with their
role.
The patch set https://gerrit.openbmc.org/c/openbmc/openbmc/+/56096 is
required to prevent the build error in openbmc source.

Tested:
1. No build error.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I1f941fffa10222cdac908fd763dccc866ba0e8a6

show more ...

0fe0229421-Jul-2022 chaul.ampere <chaul@amperecomputing.com>

NVMeBasicContext: Catch FileHandle out-of-range exception

In execBasicQuery, when the i2c bus path of the nvme sensor
does not exist, it still does file handling and causes FileHandle
class to throw

NVMeBasicContext: Catch FileHandle out-of-range exception

In execBasicQuery, when the i2c bus path of the nvme sensor
does not exist, it still does file handling and causes FileHandle
class to throw out-of-range exception and terminate the service.
This leads to coredump for the system which is undesirable.

This commit adds a try catch to this action of handle i2c bus path,
which will log an error message and return when it fails to open
the i2c bus path.

Signed-off-by: chaul.ampere <chaul@amperecomputing.com>
Change-Id: Ice1d363a6149607bd149b89f70f2a23812df999d

show more ...

5170fe6303-Aug-2022 Josh Lehan <krellan@google.com>

tachsensor: Similar fixes from HwmonTempSensor

Ported the substance of the changes from here to TachSensor:
https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/56019

The goal is to provide similar

tachsensor: Similar fixes from HwmonTempSensor

Ported the substance of the changes from here to TachSensor:
https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/56019

The goal is to provide similar fixes to I/O and buffering, catching up
to similar changes made recently in HwmonTempSensor.

Tested: Fan RPM now shows up correctly on my machine again.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I49c539e3713e9d02d4584f305e4ced6d4b2ba572

show more ...

1ff2e66902-Aug-2022 Justin Ledford <justinledford@google.com>

psusensor: remove unused fd

After enabling io-uring in [0], the underlying file is managed by the
random_access_file and the raw file descriptor is no longer used.

[0] https://gerrit.openbmc.org/c/

psusensor: remove unused fd

After enabling io-uring in [0], the underlying file is managed by the
random_access_file and the raw file descriptor is no longer used.

[0] https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/46918

Signed-off-by: Justin Ledford <justinledford@google.com>
Change-Id: Ie896f62d75ea9a461179ef807775a25bf517420a

show more ...

88cb29d208-May-2022 Zev Weiss <zev@bewilderbeest.net>

Utils: add optional callback for power state changes

Some systems require sensors to be instantiated and destroyed on host
power state transitions; this plumbing provides infrastructure for
dbus-sen

Utils: add optional callback for power state changes

Some systems require sensors to be instantiated and destroyed on host
power state transitions; this plumbing provides infrastructure for
dbus-sensors daemons to be notified on power state changes so they can
respond appropriately.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I2fc24c91e6d62bb3da71928ef0761760cc90e75f

show more ...

d1c8f44329-Jul-2022 Zev Weiss <zev@bewilderbeest.net>

hwmontempsensor: Simplify I/O and buffering

We can avoid the complexity and additional allocations of
boost::asio::streambuf by just using a simple fixed-size inline array as
the HwmonTempSensor rea

hwmontempsensor: Simplify I/O and buffering

We can avoid the complexity and additional allocations of
boost::asio::streambuf by just using a simple fixed-size inline array as
the HwmonTempSensor read buffer.

While the underlying cause of the issue remains unknown at present, this
also seems to resolve a use-after-free bug that could occur with the
existing buffering scheme (https://github.com/openbmc/dbus-sensors/issues/20).

Based on a WIP patch by @edtanous:
https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/55041

Tested: on romed8hm3, hwmontempsensor provides appropriate readings on
dbus as it did prior to this patch. In combination with the debug
patches in https://github.com/openbmc/dbus-sensors/issues/20, an ASAN
build did not report any problems while repeatedly rebuilding sensors.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7f0ab63fc398b8c938592f38f137174187c5e438

show more ...

92f8f51522-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ieb6587e32446a758676f67d9c868289cc02e50bf

show more ...

3cbd5a1418-Jul-2022 Andrew Jeffery <andrew@aj.id.au>

NVMeBasicContext: Properly cleanup resources, allowing destruction

nvmesensor was terminating with an uncaught exception, e.g:

Jun 03 04:52:09 bmc nvmesensor[507]: terminate called after throwi

NVMeBasicContext: Properly cleanup resources, allowing destruction

nvmesensor was terminating with an uncaught exception, e.g:

Jun 03 04:52:09 bmc nvmesensor[507]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
Jun 03 04:52:09 bmc nvmesensor[507]: what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.FileExists: File exists

This would occur whenever entity-manager published a configuration for a
new drive in the system. The implementation of nvmesensor isn't the
smartest, and it tries to just scrap all NVMeContexts it knows of, along
with their NVMeSensor instances, and reconstruct them all from newly
captured entity-manager configuration data.

The problem lies in the fact that the NVMeContexts were not getting
destructed due embedding of std::shared_ptrs obtained via
shared_from_this() into async callback lambda captures whose context was
owned by the NVMeContext implementation.

Switch to capturing `this` via weak_from_this() in callback lambdas to
prevent the circular references. By doing so we are able to successfully
destruct the NVMeContext derivative instances via the clear() method on
the context map.

However, there's more to the story, as the NVMeSensors owned by a given
context are asynchronously iterated for polling purposes. To make sure
we don't have races from unbounded latency on asynchronous destruction
of NVMeSensors, we order the std::jthread and async stream member
variables of NVMeBasicContext such that destruction of the streams exits
the IO thread due to read() or write() syscall failures on the pipes.
The use of std::jthread ensures we join() to complete the cleanup prior
to returning from the NVMeBasicContext destructor.

Preventing active polling of NVMeSensor instances ensures their
destruction when clearing the NVMe context map, opening the path for
successful (re-)construction of NVMeSensor DBus objects for the
published sensor configurations.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I63d0e7eb3318c209b08551072a3cb7279da21269

show more ...

a4d2768c19-Jul-2022 Zev Weiss <zev@bewilderbeest.net>

Factor out getPowerState() helper function

This same pattern had been open-coded in many of the sensor daemons;
let's reduce the duplication a bit.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>

Factor out getPowerState() helper function

This same pattern had been open-coded in many of the sensor daemons;
let's reduce the duplication a bit.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I8556af30fdcd53cdf06e5a4911f9152d3265c7af

show more ...

afd1504318-Jul-2022 Zev Weiss <zev@bewilderbeest.net>

Use SensorBaseConfigMap where applicable

If we've got a more concise, descriptive name for it, we might as well
use it.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id2f1bd8f983b4e0c

Use SensorBaseConfigMap where applicable

If we've got a more concise, descriptive name for it, we might as well
use it.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id2f1bd8f983b4e0c2ca24b24c9fc9b875f4191f5

show more ...

1a14302818-Jul-2022 Andrew Jeffery <andrew@aj.id.au>

NVMeBasicContext: Adjust buffer size for query errors

The ioctl() response buffer was only being resized if the result wasn't
an error. Make sure we resize the buffer in all cases, to the size of
th

NVMeBasicContext: Adjust buffer size for query errors

The ioctl() response buffer was only being resized if the result wasn't
an error. Make sure we resize the buffer in all cases, to the size of
the response on success and to 0 on error.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I972611a117c093bc0b5c0c1775e7a1a1d3503437

show more ...

16966b5515-Sep-2021 Ed Tanous <edtanous@google.com>

Enable an io-uring build

There exists a bug where calls that we previously thought were
non-blocking, actually do block when used with hwmon or filesystem fds.
This causes high latencies on the dbus

Enable an io-uring build

There exists a bug where calls that we previously thought were
non-blocking, actually do block when used with hwmon or filesystem fds.
This causes high latencies on the dbus interfaces when lots of sensors
are used in a single daemon, as is the case in PSUSensor.

This patchset moves the PSUSensor code over to using io-uring, through
boost asio, using the random_access_file class. This helps with
performance in a number of ways, the largest of which being that sensor
reads are no longer blocking.

Tested:

Booted the sensor system on Tyan S7106; dbus-monitor shows sensors
scanning normally.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I654eafcfab5a24b65b89c204ab43d81c7ae064cf

show more ...

2049bd2609-Jul-2022 Ed Tanous <edtanous@google.com>

Clang-tidy-14 fixes

Do as the robot commands. All changes made automatically by tidy.

Tested: (Thanks Zhikui)
Downloaded and run on system. Sensors scan normally.

Signed-off-by: Ed Tanous <edtan

Clang-tidy-14 fixes

Do as the robot commands. All changes made automatically by tidy.

Tested: (Thanks Zhikui)
Downloaded and run on system. Sensors scan normally.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I752f37c9e7a95aa3be8e6980ba6e4b2b48b3395a

show more ...

bd206a7909-Jul-2022 Ed Tanous <edtanous@google.com>

Remove unused lexical_cast header

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: If3ab888cfb705f7cc1e6f878c64e5f5467a8e82d

b429f31d27-Jun-2022 Ed Tanous <edtanous@google.com>

Fix clang-tidy 14 issues

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Idb76ae375eff9a143497942013d94ca3b3252495

12345678910>>...25