idxd.h (448c3de8ac8353fc4447738ae3c56c4eb6c2131d) | idxd.h (6e7f3ee97bbe2c7d7a53b7dbd7a08a579e03c8c9) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#ifndef _IDXD_H_ 4#define _IDXD_H_ 5 6#include <linux/sbitmap.h> 7#include <linux/dmaengine.h> 8#include <linux/percpu-rwsem.h> --- 402 unchanged lines hidden (view full) --- 411 412static inline bool is_idxd_wq_dmaengine(struct idxd_wq *wq) 413{ 414 if (wq->type == IDXD_WQT_KERNEL && strcmp(wq->name, "dmaengine") == 0) 415 return true; 416 return false; 417} 418 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */ 3#ifndef _IDXD_H_ 4#define _IDXD_H_ 5 6#include <linux/sbitmap.h> 7#include <linux/dmaengine.h> 8#include <linux/percpu-rwsem.h> --- 402 unchanged lines hidden (view full) --- 411 412static inline bool is_idxd_wq_dmaengine(struct idxd_wq *wq) 413{ 414 if (wq->type == IDXD_WQT_KERNEL && strcmp(wq->name, "dmaengine") == 0) 415 return true; 416 return false; 417} 418 |
419static inline bool is_idxd_wq_cdev(struct idxd_wq *wq) | 419static inline bool is_idxd_wq_user(struct idxd_wq *wq) |
420{ 421 return wq->type == IDXD_WQT_USER; 422} 423 | 420{ 421 return wq->type == IDXD_WQT_USER; 422} 423 |
424static inline bool is_idxd_wq_kernel(struct idxd_wq *wq) 425{ 426 return wq->type == IDXD_WQT_KERNEL; 427} 428 |
|
424static inline bool wq_dedicated(struct idxd_wq *wq) 425{ 426 return test_bit(WQ_FLAG_DEDICATED, &wq->flags); 427} 428 429static inline bool wq_shared(struct idxd_wq *wq) 430{ 431 return !test_bit(WQ_FLAG_DEDICATED, &wq->flags); --- 47 unchanged lines hidden (view full) --- 479 480int __must_check __idxd_driver_register(struct idxd_device_driver *idxd_drv, 481 struct module *module, const char *mod_name); 482#define idxd_driver_register(driver) \ 483 __idxd_driver_register(driver, THIS_MODULE, KBUILD_MODNAME) 484 485void idxd_driver_unregister(struct idxd_device_driver *idxd_drv); 486 | 429static inline bool wq_dedicated(struct idxd_wq *wq) 430{ 431 return test_bit(WQ_FLAG_DEDICATED, &wq->flags); 432} 433 434static inline bool wq_shared(struct idxd_wq *wq) 435{ 436 return !test_bit(WQ_FLAG_DEDICATED, &wq->flags); --- 47 unchanged lines hidden (view full) --- 484 485int __must_check __idxd_driver_register(struct idxd_device_driver *idxd_drv, 486 struct module *module, const char *mod_name); 487#define idxd_driver_register(driver) \ 488 __idxd_driver_register(driver, THIS_MODULE, KBUILD_MODNAME) 489 490void idxd_driver_unregister(struct idxd_device_driver *idxd_drv); 491 |
492#define module_idxd_driver(__idxd_driver) \ 493 module_driver(__idxd_driver, idxd_driver_register, idxd_driver_unregister) 494 |
|
487int idxd_register_bus_type(void); 488void idxd_unregister_bus_type(void); 489int idxd_register_devices(struct idxd_device *idxd); 490void idxd_unregister_devices(struct idxd_device *idxd); 491int idxd_register_driver(void); 492void idxd_unregister_driver(void); 493void idxd_wqs_quiesce(struct idxd_device *idxd); 494 --- 91 unchanged lines hidden --- | 495int idxd_register_bus_type(void); 496void idxd_unregister_bus_type(void); 497int idxd_register_devices(struct idxd_device *idxd); 498void idxd_unregister_devices(struct idxd_device *idxd); 499int idxd_register_driver(void); 500void idxd_unregister_driver(void); 501void idxd_wqs_quiesce(struct idxd_device *idxd); 502 --- 91 unchanged lines hidden --- |