| aba59ce1 | 17-Apr-2024 |
Iwona Winiarska <[email protected]> |
peci: aspeed: Clear clock_divider value before setting it
PECI clock divider is programmed on 10:8 bits of PECI Control register. Before setting a new value, clear bits read from hardware.
Reviewed
peci: aspeed: Clear clock_divider value before setting it
PECI clock divider is programmed on 10:8 bits of PECI Control register. Before setting a new value, clear bits read from hardware.
Reviewed-by: Billy Tsai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Iwona Winiarska <[email protected]>
show more ...
|
| e6faf2b7 | 19-Feb-2024 |
Ricardo B. Marliere <[email protected]> |
peci: constify the struct device_type usage
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the peci_controller_t
peci: constify the struct device_type usage
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the peci_controller_type and peci_device_type variables to be constant structures as well, placing it into read-only memory which can not be modified at runtime.
Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: "Ricardo B. Marliere" <[email protected]> Reviewed-by: Iwona Winiarska <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Iwona Winiarska <[email protected]>
show more ...
|
| 1c11289b | 05-Jul-2022 |
Iwona Winiarska <[email protected]> |
peci: cpu: Fix use-after-free in adev_release()
When auxiliary_device_add() returns an error, auxiliary_device_uninit() is called, which causes refcount for device to be decremented and .release cal
peci: cpu: Fix use-after-free in adev_release()
When auxiliary_device_add() returns an error, auxiliary_device_uninit() is called, which causes refcount for device to be decremented and .release callback will be triggered.
Because adev_release() re-calls auxiliary_device_uninit(), it will cause use-after-free: [ 1269.455172] WARNING: CPU: 0 PID: 14267 at lib/refcount.c:28 refcount_warn_saturate+0x110/0x15 [ 1269.464007] refcount_t: underflow; use-after-free.
Reported-by: Jianglei Nie <[email protected]> Signed-off-by: Iwona Winiarska <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| 6b8145b0 | 08-Feb-2022 |
Iwona Winiarska <[email protected]> |
peci: Add support for PECI device drivers
Add support for PECI device drivers, which unlike PECI controller drivers are actually able to provide functionalities to userspace.
Also, extend peci_requ
peci: Add support for PECI device drivers
Add support for PECI device drivers, which unlike PECI controller drivers are actually able to provide functionalities to userspace.
Also, extend peci_request API to allow querying more details about PECI device (e.g. model/family), that's going to be used to find a compatible peci_driver.
Reviewed-by: Pierre-Louis Bossart <[email protected]> Acked-by: Joel Stanley <[email protected]> Signed-off-by: Iwona Winiarska <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| 42bed52b | 08-Feb-2022 |
Iwona Winiarska <[email protected]> |
peci: Add sysfs interface for PECI bus
PECI devices may not be discoverable at the time when PECI controller is being added (e.g. BMC can boot up when the Host system is still in S5). Since we curre
peci: Add sysfs interface for PECI bus
PECI devices may not be discoverable at the time when PECI controller is being added (e.g. BMC can boot up when the Host system is still in S5). Since we currently don't have the capabilities to figure out the Host system state inside the PECI subsystem itself, we have to rely on userspace to do it for us.
In the future, PECI subsystem may be expanded with mechanisms that allow us to avoid depending on userspace interaction (e.g. CPU presence could be detected using GPIO, and the information on whether it's discoverable could be obtained over IPMI). Unfortunately, those methods may ultimately not be available (support will vary from platform to platform), which means that we still need platform independent method triggered by userspace.
Acked-by: Joel Stanley <[email protected]> Signed-off-by: Iwona Winiarska <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| 52857e68 | 08-Feb-2022 |
Iwona Winiarska <[email protected]> |
peci: Add device detection
Since PECI devices are discoverable, we can dynamically detect devices that are actually available in the system.
This change complements the earlier implementation by re
peci: Add device detection
Since PECI devices are discoverable, we can dynamically detect devices that are actually available in the system.
This change complements the earlier implementation by rescanning PECI bus to detect available devices. For this purpose, it also introduces the minimal API for PECI requests.
Reviewed-by: Pierre-Louis Bossart <[email protected]> Acked-by: Joel Stanley <[email protected]> Signed-off-by: Iwona Winiarska <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|