| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This lays the groundwork for CPU population-dependent fan control
|
|
|
|
| |
If the devation is less than zero, treat as an absolute minimum RPM value
|
|
|
|
|
|
|
| |
Installs into bin instead of sbin per guidelines.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I452171c4661228d903fe0570342be630cb0dbbd9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each zone object's hosted interfaces' properties can be configured to be
persisted or not at compile time. Those properties configured to be
persisted are set to be persisted after the initial value is set. When
this value doesnt change on a system, there's no need to persist it
since the initial value is compiled into the fan control application per
zone. Once this value is changed and therefore persisted, upon a
application restart, initially the value would be what's compiled in
until its configured again to be persisted and then restored.
Tested:
Current property always set to what's persisted between restarts
Nothing persisted when Current property doesnt change from default
Change-Id: I93109730796af2058ecab0e78e612b7919886b33
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add functions to set and get persisted properties on a zone by the
interface and property name. When a property exists, it is persisted
each time it is updated.
Tested:
Current property is added and persisted.
When Current property not added, it is not persisted.
Change-Id: I2540c3673affcda871c9342cad44e85a4510d756
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Before updating the current mode, verify that the mode provided by the
end-user is in the list of modes that are supported.
Tested:
Only supported modes can be set as the current mode
Change-Id: Ie21839b6bf7245756fedf417e143c28bc9da32f1
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When restoring the persisted current mode, initially set the current
mode to what's already provided. When no interface is defined within the
zone yaml, a default value of "Default" is already set on the
Control.ThermalMode interface. If an interface is provided on the zone
yaml, and the Current property is initialized to a value, use this value
initially upon restoring. During the restore, this value could change to
what was persisted.
Tested:
Current mode is set correctly upon initialization & restore
Change-Id: I0fae247303903d85e95fc044c96fc1809df2fa03
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always set the current thermal control mode in uppercase to handle case
insensitive modes given since it would be something possibly set by the
end-user.
Tested:
Current mode always set in uppercase
Change-Id: Ie159de24f5f9b4dd5651a9411f7b176501c4846a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Add missed python variable initialization causing srcrev bump fail
Failed srcrev bump:
https://gerrit.openbmc-project.xyz/18414
Change-Id: I0d7d4647abe3c2f46cabfebf6be5ab500641f504
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Interfaces can optionally be defined on each zone to include setting
properties under those interfaces when fan control initializes the zone.
Setting the property values here allows them to be initialized to a
default value or set of values.
Change-Id: I75d51a05caa9e5662a0608d285fd388acc8593e2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Properties hosted by a zone object need the ability to be set upon zone
initialization. This adds support to allow the zone configuration yaml
to contain what properties to set and with what values on a zone. The
parser updates to generate what uses this framework is in a followup
commit.
Change-Id: I9fd93746cc097f05869400451daff03cf3ef89b7
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Use the defaults in the pkg check where the default error message is
sufficient to identify which package is missing.
Change-Id: Id750ce7c0fb89f94c0da53868f695ac161475674
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
A zone's object path is set when the zone is created and available to be
used instead of determining the zone's object path each time.
Change-Id: Iddfebd1545bb49054d95f8c19a71b2fbf9c2f592
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a service attribute that can be optionally defined on a group
denoting what service is hosting the group members. Initially, defining
a service name generates the group member(s) to be zone objects only.
This service attribute will be enhanced to specifically note what
service provides the group members and allow for a better trigger for
properties on zone objects instead of generating a blank signal match.
Tested:
Blank signal match generated for group members in events used
Change-Id: I483fcf6a5e210e5d70bc9d5c4c0dee15524b01b9
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each time the current mode property changes, handle the event similarly
to other event signal triggers substituting with a null message. When
the handler receives a null message, the property's value that triggered
the event is retrieved whether from the zone object or from dbus.
Tested:
Triggered the use of alternative events based on thermal control
mode property state
Change-Id: Ibc663c3721c331393250bd32bda0d45cf0214f12
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Properties on the zone object require their event data to be stored for
retrieval when their value changes, which allows the use of the current
event handlers to update the cached value and trigger the event actions.
When any event is initialized, any signals where the match string is
empty performs a lookup for each group member to determine if they are
on the zone object. Each member found to be on the zone object is then
stored with the that event's data.
Tested:
Verified event data is stored for members on the zone object
Verified event initialization correctly accesses zone object
member's event data
Change-Id: Id34f60eb12330428eeb1041de4e9bd1a4a686f21
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
When the Current mode property changes, the persisted value is updated.
Change-Id: I319fbe2afb8112f7425dc0a1d765fe8f1c408bae
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
When the fan control zone is created, the current mode property is
restored from persistent storage. If the persistent storage file does
not exist or fails to be read, the current mode property is set to
default.
Change-Id: I5ba699f9b6683aea4f39444eace8c7d19a22c92d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Add the ability to save the current mode property value to
persisted storage.
Change-Id: I354fce7c11a61871a49c9b205dc79ee598f8b1c8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When in control mode, the thermal control interface and mode property
are added to each zone object. The object path for each zone consists of
the configured object path plus the zone number.
Ex) /xyz/openbmc_project/control/thermal/0
Tested:
After fan control is started in control mode, dbus interface exists
Change-Id: I88578a7e0eb7c730ffaa4cfc10989e280dc1d46d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add fan control's default dbus busname and object path to use or what's
provided thru configure. The fan control manager requests the busname
after all the zones are created.
Tested:
Found the requested busname for a zone in the busctl list
Change-Id: I8ee1e9e4094dcec958e8ae81ad4299357b8f792d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the removal of the custom timer implementation our libfan has
nothing but a single header file. Since we have no object code left we
do not need a library to contain this code since the header is directly
included where needed.
Tested:
Built and run through unit tests.
Change-Id: I139b83ab979ead88cfd4c180ba8847a29c6407e2
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the custom timer implementation and moves to the
sdeventplus utility. Functionally this should make no change
Tested:
Built and run through the unit test suite.
Change-Id: Ib7ee90d489d5db72496aaaca91c3cf5490ad47d6
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the use alternate events action, the ability to generate an event
type is required within the parser. This action requires two separate
lists of events to be generated and to generate the event code, it was
necessary to add what code is generated for each section that comprises
an event to the parser directly.
Tested:
Updated events yaml with an event to use the alternate events action
Verified the generated code builds and runs on wspoon
Change-Id: I2078610222b0ae0f7fdbcf348e5c9ff02c4108b6
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The alternate events action uses a group of properties to determine
whether a default set of events should be used or an alternate set of
events should be used. When any of the members of the group do not match
the given property state, the default set of events are used. Once all
members of the group match the given state, the alternate set of events
are used. Each time the events used are to change, the current set of
events are removed prior to loading the replacement set of events.
Tested:
Used the 'WaterCooled' property to trigger using the default or
alternate floor speed events.
Verified fan control memory usage doesnt grow by doing multiple
event switching.
Change-Id: Ib8a4b835bf370894c572ccfa8fdc5a4479ef570f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Use of auto in a function parameter list is supported in c++17 but
gcc8 requires enabling concepts TS support. We don't require a
template anyway - just be explicit here and avoid the need for
-fconcepts until such a time that other concepts TS features are
required.
Change-Id: Iec6205a2e4da41aeb5840dd9942778ba0f373842
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
This code is not compiled during the unit test run. The issue was
noticed trying to integrate into a real openbmc build.
Change-Id: I30b7afaf722b1a14e5ac3d5e93e13b59db48be7a
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
This was relying on sdbusplus to provide a transitive include for
<cassert>. Since we are directly using the assert() call we should
include <cassert> ourselves.
Change-Id: I095af26c7a589ab337facc6ac2d0c4983a0f0c2c
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a service is cached, each interface it hosts is added to a list. In
the case where an object path given to fan control is never found, a
service lookup is performed on this path causing its given interface to
be added. This fixes that interface from continuously being added in the
case that the object path is attempted to be accessed continuously from
dbus.
Resolves openbmc/phosphor-fan-presence#12
Tested:
Added & removed events containing object paths that dont exist,
interface list remains the same size.
Change-Id: Id034e7829566979c196cb9901cbea287ddab78d4
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
We need to use the std::get() interface instead of the mapbox .get()
member interface for variant compatibility.
Change-Id: I6c7843ea0cb765332457273867b5df6b78ca72a2
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
| |
Change-Id: I5ab5adcc22f044b3cf0955082061c67f2a281307
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want to copy the object out of the container we are iterating
over.
Tested:
Built and run through unit tests.
Change-Id: I68b041f98e1c6a6a9dbc59448b629e1d22ba62c9
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each event could have multiple signals associated and when the event is
removed, all of those signals should also be removed. This ensures no
dangling signals remain after an event is removed from be processed by
fan control
Tested:
The total number of signals subscribed are reduced by the same
number of signals of a removed event
Change-Id: I651f70dbe6aed9c7eef06aff4eac9eae7ad89d77
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces a layer of indirection since the function can be called
directly instead of indirectly accessing it with the lambda. It also
makes the instantiation more flexible since it can match callbacks with
extra arguments.
Tested:
Built and run through unit tests.
Change-Id: I5317203fa70c027c5e774ed6192952058e35bd81
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
Tested:
Built and ran through unit tests.
Change-Id: I9a98d9a3eaee47885b18b642ffd01a38a864dd02
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Anything adding a timer uses roughly the same process of building the
event data and timer from the event group, actions, and timer config. We
can adjust the method to do this for all callers.
Tested:
Builds and passes unit tests.
Change-Id: I4013ff2f7bff65095a6e1db7075bc013da374f51
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is confusing to read some of the type definitions that deal with
timers when Timer could mean a timer instantiation or a set of timer
configuration parameters. This change disambiguates the two types.
Tested:
Built and run through unit tests.
Change-Id: I9dd6b47886747d56a86b6a50eb9a74a331d0a1fe
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed for a future commit that removes the local
phosphor::util::Timer implementation.
Tested:
Built and run through unit tests.
Change-Id: I8ea3399fec8761055d4a0d94fb9ea91fd34040ea
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
This change is mostly focused around plumbing the sdeventplus::Event
object everywhere and using the member functions provided for the event.
No migration to the timer utility is performed yet.
Change-Id: I912ab82bc081239d3b7c3cf7c5caca6742ef9c87
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
| |
Add libtool artifact to gitignore.
Change-Id: Ie283f97cc0d714be89ebed420f439322cda653b1
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Using an exit status of -1 everywhere leads to the status being
converted to 255 when output to a calling application. While this does
signify an error it has a reserved meaning for exit status out of range.
Lets use a valid general exit status of 1 instead.
Change-Id: I326701c78985e34c430c258fe31d9e910da10405
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
We are missing flags for compiling against dependencies used in
libfan.
Change-Id: I62addac0d153be194171acee77ec7a32a503b85c
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
| |
Update configure.ac to choose the c++17 standard
Change-Id: I9c7bba8ae28101e95eb969dd1d1ae01f37cd3e48
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The libfan_la_CXXFLAGS was incorrectly defined as empty by a typo, fix
it.
Then specify gcc-ar gcc-ranlib for link time optimization, otherwise the
static library will get link error.
Tested: Verify the build is OK in CI, local build, and SDK build.
Resolves openbmc/phosphor-fan-presence#11
Change-Id: I17c83b9927a796f8928a71688c1640d1a602a108
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Per openbmc/openbmc#3364, adding -flto to CXX flags
in order to reduce overall library and binary sizes.
Ref: https://gcc.gnu.org/wiki/LinkTimeOptimization
Change-Id: I3ee31a15fc0ded4308aa9d00a11b41bc62eb9799
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
| |
When the SdBusError exception was added, all sdbusplus::bus::call
function use required this exception be handled appropriately in each
case where it could occur. These changes are the result of handling the
possibility of this exception correctly within the fan applications.
Change-Id: I6ecef3008412b299a4fedbb13716f656cfbf1a90
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Partly resolves openbmc/openbmc 2905
Tested: static_assert only
Change-Id: I0cabc8d84c763af924d067880417c9a11bcfde58
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Iee7a92941638d2b147eef2f0e85f9c90f638003c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
| |
The getService function is no longer used and is not necessary with the
getService function within sdbusplus.hpp
Tested: N/A
Change-Id: Ifad8ec1efb64508923d4f5c42bef318f0b03124c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
The getInvService function is no longer used and is not necessary with
the getService function within sdbusplus.hpp
Tested: N/A
Change-Id: Ibb2d55ef5be1852ae8ebd3dac32d66518d5d705c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|