mirror of
https://github.com/torvalds/linux.git
synced 2026-04-20 07:43:57 -04:00
Under some circumstances, firmware in the QAT devices could become unresponsive. The Heartbeat feature provides a mechanism to detect unresponsive devices. The QAT FW periodically writes to memory a set of counters that allow to detect the liveness of a device. This patch adds logic to enable the reporting of those counters, analyze them and report if a device is alive or not. In particular this adds (1) heartbeat enabling, reading and detection logic (2) reporting of heartbeat status and configuration via debugfs (3) documentation for the newly created sysfs entries (4) configuration of FW settings related to heartbeat, e.g. tick period (5) logic to convert time in ms (provided by the user) to clock ticks This patch introduces a new folder in debugfs called heartbeat with the following attributes: - status - queries_sent - queries_failed - config All attributes except config are reading only. In particular: - `status` file returns 0 when device is operational and -1 otherwise. - `queries_sent` returns the total number of heartbeat queries sent. - `queries_failed` returns the total number of heartbeat queries failed. - `config` allows to adjust the frequency at which the firmware writes counters to memory. This period is given in milliseconds and it is fixed for GEN4 devices. Signed-off-by: Damian Muszynski <damian.muszynski@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
53 lines
2.0 KiB
C
53 lines
2.0 KiB
C
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) */
|
|
/* Copyright(c) 2014 - 2020 Intel Corporation */
|
|
#ifndef ADF_CFG_STRINGS_H_
|
|
#define ADF_CFG_STRINGS_H_
|
|
|
|
#define ADF_GENERAL_SEC "GENERAL"
|
|
#define ADF_KERNEL_SEC "KERNEL"
|
|
#define ADF_ACCEL_SEC "Accelerator"
|
|
#define ADF_NUM_CY "NumberCyInstances"
|
|
#define ADF_NUM_DC "NumberDcInstances"
|
|
#define ADF_RING_SYM_SIZE "NumConcurrentSymRequests"
|
|
#define ADF_RING_ASYM_SIZE "NumConcurrentAsymRequests"
|
|
#define ADF_RING_DC_SIZE "NumConcurrentRequests"
|
|
#define ADF_RING_ASYM_TX "RingAsymTx"
|
|
#define ADF_RING_SYM_TX "RingSymTx"
|
|
#define ADF_RING_ASYM_RX "RingAsymRx"
|
|
#define ADF_RING_SYM_RX "RingSymRx"
|
|
#define ADF_RING_DC_TX "RingTx"
|
|
#define ADF_RING_DC_RX "RingRx"
|
|
#define ADF_ETRMGR_BANK "Bank"
|
|
#define ADF_RING_SYM_BANK_NUM "BankSymNumber"
|
|
#define ADF_RING_ASYM_BANK_NUM "BankAsymNumber"
|
|
#define ADF_RING_DC_BANK_NUM "BankDcNumber"
|
|
#define ADF_CY "Cy"
|
|
#define ADF_DC "Dc"
|
|
#define ADF_CFG_DC "dc"
|
|
#define ADF_CFG_CY "sym;asym"
|
|
#define ADF_CFG_SYM "sym"
|
|
#define ADF_CFG_ASYM "asym"
|
|
#define ADF_CFG_ASYM_SYM "asym;sym"
|
|
#define ADF_CFG_ASYM_DC "asym;dc"
|
|
#define ADF_CFG_DC_ASYM "dc;asym"
|
|
#define ADF_CFG_SYM_DC "sym;dc"
|
|
#define ADF_CFG_DC_SYM "dc;sym"
|
|
#define ADF_SERVICES_ENABLED "ServicesEnabled"
|
|
#define ADF_PM_IDLE_SUPPORT "PmIdleSupport"
|
|
#define ADF_ETRMGR_COALESCING_ENABLED "InterruptCoalescingEnabled"
|
|
#define ADF_ETRMGR_COALESCING_ENABLED_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_COALESCING_ENABLED
|
|
#define ADF_ETRMGR_COALESCE_TIMER "InterruptCoalescingTimerNs"
|
|
#define ADF_ETRMGR_COALESCE_TIMER_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_COALESCE_TIMER
|
|
#define ADF_ETRMGR_COALESCING_MSG_ENABLED "InterruptCoalescingNumResponses"
|
|
#define ADF_ETRMGR_COALESCING_MSG_ENABLED_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_COALESCING_MSG_ENABLED
|
|
#define ADF_ETRMGR_CORE_AFFINITY "CoreAffinity"
|
|
#define ADF_ETRMGR_CORE_AFFINITY_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_CORE_AFFINITY
|
|
#define ADF_ACCEL_STR "Accelerator%d"
|
|
#define ADF_HEARTBEAT_TIMER "HeartbeatTimer"
|
|
|
|
#endif
|