xref: /linux/drivers/crypto/intel/qat/qat_common/adf_kpt.h (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright(c) 2026 Intel Corporation */
3 #ifndef ADF_KPT_H_
4 #define ADF_KPT_H_
5 
6 #include <linux/types.h>
7 
8 #define GET_KPT_CFG_DATA(accel_dev) (&(accel_dev)->hw_device->kpt_data)
9 #define GET_KPT_USER_DATA(accel_dev) (&(accel_dev)->hw_device->kpt_data.user_input)
10 
11 struct adf_accel_dev;
12 
13 struct adf_kpt_interface_data {
14 	bool enable;
15 	bool swk_shared;
16 	unsigned int swk_cnt_per_fn;
17 	unsigned int swk_cnt_per_pasid;
18 	unsigned int swk_max_ttl;
19 };
20 
21 struct adf_kpt_hw_data {
22 	unsigned int max_swk_cnt_per_fn_pasid;
23 	unsigned int max_swk_ttl;
24 	struct adf_kpt_interface_data user_input;
25 };
26 
27 int adf_enable_kpt(struct adf_accel_dev *accel_dev);
28 
29 #endif /* ADF_KPT_H_ */
30