linux_dsm_epyc7002/drivers/misc/habanalabs
Oded Gabbay f8c8c7d5f1 habanalabs: add device reset support
This patch adds support for doing various on-the-fly reset of Goya.

The driver supports two types of resets:
1. soft-reset
2. hard-reset

Soft-reset is done when the device detects a timeout of a command
submission that was given to the device. The soft-reset process only resets
the engines that are relevant for the submission of compute jobs, i.e. the
DMA channels, the TPCs and the MME. The purpose is to bring the device as
fast as possible to a working state.

Hard-reset is done in several cases:
1. After soft-reset is done but the device is not responding
2. When fatal errors occur inside the device, e.g. ECC error
3. When the driver is removed

Hard-reset performs a reset of the entire chip except for the PCI
controller and the PLLs. It is a much longer process then soft-reset but it
helps to recover the device without the need to reboot the Host.

After hard-reset, the driver will restore the max power attribute and in
case of manual power management, the frequencies that were set.

This patch also adds two entries to the sysfs, which allows the root user
to initiate a soft or hard reset.

Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-18 09:46:45 +01:00
..
goya habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
include habanalabs: add event queue and interrupts 2019-02-18 09:46:45 +01:00
asid.c habanalabs: add context and ASID modules 2019-02-18 09:46:44 +01:00
command_buffer.c habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
context.c habanalabs: add context and ASID modules 2019-02-18 09:46:44 +01:00
device.c habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
habanalabs_drv.c habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
habanalabs_ioctl.c habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
habanalabs.h habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
hw_queue.c habanalabs: add h/w queues module 2019-02-18 09:46:45 +01:00
hwmon.c habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
irq.c habanalabs: add device reset support 2019-02-18 09:46:45 +01:00
Kconfig
Makefile habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00
sysfs.c habanalabs: add device reset support 2019-02-18 09:46:45 +01:00