registers.h (d98793b5d4256faae76177178456214f55bc7083) | registers.h (8e50d392652f20616a136165dff516b86baf5e49) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#ifndef _IDXD_REGISTERS_H_ 4#define _IDXD_REGISTERS_H_ 5 6/* PCI Config */ 7#define PCI_DEVICE_ID_INTEL_DSA_SPR0 0x0b25 8 --- 322 unchanged lines hidden (view full) --- 331 u16 wq_state:2; 332 333 /* bytes 28-31 */ 334 u32 rsvd8; 335 }; 336 u32 bits[8]; 337} __packed; 338 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#ifndef _IDXD_REGISTERS_H_ 4#define _IDXD_REGISTERS_H_ 5 6/* PCI Config */ 7#define PCI_DEVICE_ID_INTEL_DSA_SPR0 0x0b25 8 --- 322 unchanged lines hidden (view full) --- 331 u16 wq_state:2; 332 333 /* bytes 28-31 */ 334 u32 rsvd8; 335 }; 336 u32 bits[8]; 337} __packed; 338 |
339#define WQCFG_PASID_IDX 2 340 |
|
339/* 340 * This macro calculates the offset into the WQCFG register 341 * idxd - struct idxd * 342 * n - wq id 343 * ofs - the index of the 32b dword for the config register 344 * 345 * The WQCFG register block is divided into groups per each wq. The n index 346 * allows us to move to the register group that's for that particular wq. 347 * Each register is 32bits. The ofs gives us the number of register to access. 348 */ 349#define WQCFG_OFFSET(_idxd_dev, n, ofs) \ 350({\ 351 typeof(_idxd_dev) __idxd_dev = (_idxd_dev); \ 352 (__idxd_dev)->wqcfg_offset + (n) * (__idxd_dev)->wqcfg_size + sizeof(u32) * (ofs); \ 353}) 354 355#define WQCFG_STRIDES(_idxd_dev) ((_idxd_dev)->wqcfg_size / sizeof(u32)) 356 357#endif | 341/* 342 * This macro calculates the offset into the WQCFG register 343 * idxd - struct idxd * 344 * n - wq id 345 * ofs - the index of the 32b dword for the config register 346 * 347 * The WQCFG register block is divided into groups per each wq. The n index 348 * allows us to move to the register group that's for that particular wq. 349 * Each register is 32bits. The ofs gives us the number of register to access. 350 */ 351#define WQCFG_OFFSET(_idxd_dev, n, ofs) \ 352({\ 353 typeof(_idxd_dev) __idxd_dev = (_idxd_dev); \ 354 (__idxd_dev)->wqcfg_offset + (n) * (__idxd_dev)->wqcfg_size + sizeof(u32) * (ofs); \ 355}) 356 357#define WQCFG_STRIDES(_idxd_dev) ((_idxd_dev)->wqcfg_size / sizeof(u32)) 358 359#endif |