mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: qat - add pm_status debugfs file
QAT devices implement a mechanism that allows them to go autonomously to a low power state depending on the load. Expose power management info by providing the "pm_status" file under debugfs. This includes PM state, PM event log, PM event counters, PM HW CSRs, per-resource type constrain counters and per-domain power gating status specific to the QAT device. This information is retrieved from (1) the FW by means of ICP_QAT_FW_PM_INFO command, (2) CSRs and (3) counters collected by the device driver. In addition, add logic to keep track and report power management event interrupts and acks/nacks sent to FW to allow/prevent state transitions. Signed-off-by: Lucas Segarra Fernandez <lucas.segarra.fernandez@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
756762decc
commit
e079231676
@@ -291,6 +291,18 @@ struct adf_dc_data {
|
||||
dma_addr_t ovf_buff_p;
|
||||
};
|
||||
|
||||
struct adf_pm {
|
||||
struct dentry *debugfs_pm_status;
|
||||
bool present;
|
||||
int idle_irq_counters;
|
||||
int throttle_irq_counters;
|
||||
int fw_irq_counters;
|
||||
int host_ack_counter;
|
||||
int host_nack_counter;
|
||||
ssize_t (*print_pm_status)(struct adf_accel_dev *accel_dev,
|
||||
char __user *buf, size_t count, loff_t *pos);
|
||||
};
|
||||
|
||||
struct adf_accel_dev {
|
||||
struct adf_etr_data *transport;
|
||||
struct adf_hw_device_data *hw_device;
|
||||
@@ -298,6 +310,7 @@ struct adf_accel_dev {
|
||||
struct adf_fw_loader_data *fw_loader;
|
||||
struct adf_admin_comms *admin;
|
||||
struct adf_dc_data *dc_data;
|
||||
struct adf_pm power_management;
|
||||
struct list_head crypto_list;
|
||||
struct list_head compression_list;
|
||||
unsigned long status;
|
||||
|
||||
Reference in New Issue
Block a user