kfd_priv.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. /*
  2. * Copyright 2014 Advanced Micro Devices, Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  18. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  19. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  20. * OTHER DEALINGS IN THE SOFTWARE.
  21. */
  22. #ifndef KFD_PRIV_H_INCLUDED
  23. #define KFD_PRIV_H_INCLUDED
  24. #include <linux/hashtable.h>
  25. #include <linux/mmu_notifier.h>
  26. #include <linux/mutex.h>
  27. #include <linux/types.h>
  28. #include <linux/atomic.h>
  29. #include <linux/workqueue.h>
  30. #include <linux/spinlock.h>
  31. #include <linux/kfd_ioctl.h>
  32. #include <kgd_kfd_interface.h>
  33. #define KFD_SYSFS_FILE_MODE 0444
  34. /*
  35. * When working with cp scheduler we should assign the HIQ manually or via
  36. * the radeon driver to a fixed hqd slot, here are the fixed HIQ hqd slot
  37. * definitions for Kaveri. In Kaveri only the first ME queues participates
  38. * in the cp scheduling taking that in mind we set the HIQ slot in the
  39. * second ME.
  40. */
  41. #define KFD_CIK_HIQ_PIPE 4
  42. #define KFD_CIK_HIQ_QUEUE 0
  43. /* GPU ID hash width in bits */
  44. #define KFD_GPU_ID_HASH_WIDTH 16
  45. /* Macro for allocating structures */
  46. #define kfd_alloc_struct(ptr_to_struct) \
  47. ((typeof(ptr_to_struct)) kzalloc(sizeof(*ptr_to_struct), GFP_KERNEL))
  48. /* Kernel module parameter to specify maximum number of supported processes */
  49. extern int max_num_of_processes;
  50. #define KFD_MAX_NUM_OF_PROCESSES_DEFAULT 32
  51. #define KFD_MAX_NUM_OF_PROCESSES 512
  52. /*
  53. * Kernel module parameter to specify maximum number of supported queues
  54. * per process
  55. */
  56. extern int max_num_of_queues_per_process;
  57. #define KFD_MAX_NUM_OF_QUEUES_PER_PROCESS_DEFAULT 128
  58. #define KFD_MAX_NUM_OF_QUEUES_PER_PROCESS 1024
  59. #define KFD_KERNEL_QUEUE_SIZE 2048
  60. /* Kernel module parameter to specify the scheduling policy */
  61. extern int sched_policy;
  62. /**
  63. * enum kfd_sched_policy
  64. *
  65. * @KFD_SCHED_POLICY_HWS: H/W scheduling policy known as command processor (cp)
  66. * scheduling. In this scheduling mode we're using the firmware code to
  67. * schedule the user mode queues and kernel queues such as HIQ and DIQ.
  68. * the HIQ queue is used as a special queue that dispatches the configuration
  69. * to the cp and the user mode queues list that are currently running.
  70. * the DIQ queue is a debugging queue that dispatches debugging commands to the
  71. * firmware.
  72. * in this scheduling mode user mode queues over subscription feature is
  73. * enabled.
  74. *
  75. * @KFD_SCHED_POLICY_HWS_NO_OVERSUBSCRIPTION: The same as above but the over
  76. * subscription feature disabled.
  77. *
  78. * @KFD_SCHED_POLICY_NO_HWS: no H/W scheduling policy is a mode which directly
  79. * set the command processor registers and sets the queues "manually". This
  80. * mode is used *ONLY* for debugging proposes.
  81. *
  82. */
  83. enum kfd_sched_policy {
  84. KFD_SCHED_POLICY_HWS = 0,
  85. KFD_SCHED_POLICY_HWS_NO_OVERSUBSCRIPTION,
  86. KFD_SCHED_POLICY_NO_HWS
  87. };
  88. enum cache_policy {
  89. cache_policy_coherent,
  90. cache_policy_noncoherent
  91. };
  92. struct kfd_device_info {
  93. unsigned int max_pasid_bits;
  94. size_t ih_ring_entry_size;
  95. uint16_t mqd_size_aligned;
  96. };
  97. struct kfd_dev {
  98. struct kgd_dev *kgd;
  99. const struct kfd_device_info *device_info;
  100. struct pci_dev *pdev;
  101. unsigned int id; /* topology stub index */
  102. phys_addr_t doorbell_base; /* Start of actual doorbells used by
  103. * KFD. It is aligned for mapping
  104. * into user mode
  105. */
  106. size_t doorbell_id_offset; /* Doorbell offset (from KFD doorbell
  107. * to HW doorbell, GFX reserved some
  108. * at the start)
  109. */
  110. size_t doorbell_process_limit; /* Number of processes we have doorbell
  111. * space for.
  112. */
  113. u32 __iomem *doorbell_kernel_ptr; /* This is a pointer for a doorbells
  114. * page used by kernel queue
  115. */
  116. struct kgd2kfd_shared_resources shared_resources;
  117. /* QCM Device instance */
  118. struct device_queue_manager *dqm;
  119. bool init_complete;
  120. };
  121. /* KGD2KFD callbacks */
  122. void kgd2kfd_exit(void);
  123. struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev);
  124. bool kgd2kfd_device_init(struct kfd_dev *kfd,
  125. const struct kgd2kfd_shared_resources *gpu_resources);
  126. void kgd2kfd_device_exit(struct kfd_dev *kfd);
  127. extern const struct kfd2kgd_calls *kfd2kgd;
  128. struct kfd_mem_obj {
  129. void *bo;
  130. uint64_t gpu_addr;
  131. uint32_t *cpu_ptr;
  132. };
  133. enum kfd_mempool {
  134. KFD_MEMPOOL_SYSTEM_CACHEABLE = 1,
  135. KFD_MEMPOOL_SYSTEM_WRITECOMBINE = 2,
  136. KFD_MEMPOOL_FRAMEBUFFER = 3,
  137. };
  138. /* Character device interface */
  139. int kfd_chardev_init(void);
  140. void kfd_chardev_exit(void);
  141. struct device *kfd_chardev(void);
  142. /**
  143. * enum kfd_preempt_type_filter
  144. *
  145. * @KFD_PREEMPT_TYPE_FILTER_SINGLE_QUEUE: Preempts single queue.
  146. *
  147. * @KFD_PRERMPT_TYPE_FILTER_ALL_QUEUES: Preempts all queues in the
  148. * running queues list.
  149. *
  150. * @KFD_PRERMPT_TYPE_FILTER_BY_PASID: Preempts queues that belongs to
  151. * specific process.
  152. *
  153. */
  154. enum kfd_preempt_type_filter {
  155. KFD_PREEMPT_TYPE_FILTER_SINGLE_QUEUE,
  156. KFD_PREEMPT_TYPE_FILTER_ALL_QUEUES,
  157. KFD_PREEMPT_TYPE_FILTER_BY_PASID
  158. };
  159. enum kfd_preempt_type {
  160. KFD_PREEMPT_TYPE_WAVEFRONT,
  161. KFD_PREEMPT_TYPE_WAVEFRONT_RESET
  162. };
  163. /**
  164. * enum kfd_queue_type
  165. *
  166. * @KFD_QUEUE_TYPE_COMPUTE: Regular user mode queue type.
  167. *
  168. * @KFD_QUEUE_TYPE_SDMA: Sdma user mode queue type.
  169. *
  170. * @KFD_QUEUE_TYPE_HIQ: HIQ queue type.
  171. *
  172. * @KFD_QUEUE_TYPE_DIQ: DIQ queue type.
  173. */
  174. enum kfd_queue_type {
  175. KFD_QUEUE_TYPE_COMPUTE,
  176. KFD_QUEUE_TYPE_SDMA,
  177. KFD_QUEUE_TYPE_HIQ,
  178. KFD_QUEUE_TYPE_DIQ
  179. };
  180. enum kfd_queue_format {
  181. KFD_QUEUE_FORMAT_PM4,
  182. KFD_QUEUE_FORMAT_AQL
  183. };
  184. /**
  185. * struct queue_properties
  186. *
  187. * @type: The queue type.
  188. *
  189. * @queue_id: Queue identifier.
  190. *
  191. * @queue_address: Queue ring buffer address.
  192. *
  193. * @queue_size: Queue ring buffer size.
  194. *
  195. * @priority: Defines the queue priority relative to other queues in the
  196. * process.
  197. * This is just an indication and HW scheduling may override the priority as
  198. * necessary while keeping the relative prioritization.
  199. * the priority granularity is from 0 to f which f is the highest priority.
  200. * currently all queues are initialized with the highest priority.
  201. *
  202. * @queue_percent: This field is partially implemented and currently a zero in
  203. * this field defines that the queue is non active.
  204. *
  205. * @read_ptr: User space address which points to the number of dwords the
  206. * cp read from the ring buffer. This field updates automatically by the H/W.
  207. *
  208. * @write_ptr: Defines the number of dwords written to the ring buffer.
  209. *
  210. * @doorbell_ptr: This field aim is to notify the H/W of new packet written to
  211. * the queue ring buffer. This field should be similar to write_ptr and the user
  212. * should update this field after he updated the write_ptr.
  213. *
  214. * @doorbell_off: The doorbell offset in the doorbell pci-bar.
  215. *
  216. * @is_interop: Defines if this is a interop queue. Interop queue means that the
  217. * queue can access both graphics and compute resources.
  218. *
  219. * @is_active: Defines if the queue is active or not.
  220. *
  221. * @vmid: If the scheduling mode is no cp scheduling the field defines the vmid
  222. * of the queue.
  223. *
  224. * This structure represents the queue properties for each queue no matter if
  225. * it's user mode or kernel mode queue.
  226. *
  227. */
  228. struct queue_properties {
  229. enum kfd_queue_type type;
  230. enum kfd_queue_format format;
  231. unsigned int queue_id;
  232. uint64_t queue_address;
  233. uint64_t queue_size;
  234. uint32_t priority;
  235. uint32_t queue_percent;
  236. uint32_t *read_ptr;
  237. uint32_t *write_ptr;
  238. uint32_t __iomem *doorbell_ptr;
  239. uint32_t doorbell_off;
  240. bool is_interop;
  241. bool is_active;
  242. /* Not relevant for user mode queues in cp scheduling */
  243. unsigned int vmid;
  244. };
  245. /**
  246. * struct queue
  247. *
  248. * @list: Queue linked list.
  249. *
  250. * @mqd: The queue MQD.
  251. *
  252. * @mqd_mem_obj: The MQD local gpu memory object.
  253. *
  254. * @gart_mqd_addr: The MQD gart mc address.
  255. *
  256. * @properties: The queue properties.
  257. *
  258. * @mec: Used only in no cp scheduling mode and identifies to micro engine id
  259. * that the queue should be execute on.
  260. *
  261. * @pipe: Used only in no cp scheduling mode and identifies the queue's pipe id.
  262. *
  263. * @queue: Used only in no cp scheduliong mode and identifies the queue's slot.
  264. *
  265. * @process: The kfd process that created this queue.
  266. *
  267. * @device: The kfd device that created this queue.
  268. *
  269. * This structure represents user mode compute queues.
  270. * It contains all the necessary data to handle such queues.
  271. *
  272. */
  273. struct queue {
  274. struct list_head list;
  275. void *mqd;
  276. struct kfd_mem_obj *mqd_mem_obj;
  277. uint64_t gart_mqd_addr;
  278. struct queue_properties properties;
  279. uint32_t mec;
  280. uint32_t pipe;
  281. uint32_t queue;
  282. struct kfd_process *process;
  283. struct kfd_dev *device;
  284. };
  285. /*
  286. * Please read the kfd_mqd_manager.h description.
  287. */
  288. enum KFD_MQD_TYPE {
  289. KFD_MQD_TYPE_CIK_COMPUTE = 0, /* for no cp scheduling */
  290. KFD_MQD_TYPE_CIK_HIQ, /* for hiq */
  291. KFD_MQD_TYPE_CIK_CP, /* for cp queues and diq */
  292. KFD_MQD_TYPE_CIK_SDMA, /* for sdma queues */
  293. KFD_MQD_TYPE_MAX
  294. };
  295. struct scheduling_resources {
  296. unsigned int vmid_mask;
  297. enum kfd_queue_type type;
  298. uint64_t queue_mask;
  299. uint64_t gws_mask;
  300. uint32_t oac_mask;
  301. uint32_t gds_heap_base;
  302. uint32_t gds_heap_size;
  303. };
  304. struct process_queue_manager {
  305. /* data */
  306. struct kfd_process *process;
  307. unsigned int num_concurrent_processes;
  308. struct list_head queues;
  309. unsigned long *queue_slot_bitmap;
  310. };
  311. struct qcm_process_device {
  312. /* The Device Queue Manager that owns this data */
  313. struct device_queue_manager *dqm;
  314. struct process_queue_manager *pqm;
  315. /* Device Queue Manager lock */
  316. struct mutex *lock;
  317. /* Queues list */
  318. struct list_head queues_list;
  319. struct list_head priv_queue_list;
  320. unsigned int queue_count;
  321. unsigned int vmid;
  322. bool is_debug;
  323. /*
  324. * All the memory management data should be here too
  325. */
  326. uint64_t gds_context_area;
  327. uint32_t sh_mem_config;
  328. uint32_t sh_mem_bases;
  329. uint32_t sh_mem_ape1_base;
  330. uint32_t sh_mem_ape1_limit;
  331. uint32_t page_table_base;
  332. uint32_t gds_size;
  333. uint32_t num_gws;
  334. uint32_t num_oac;
  335. };
  336. /* Data that is per-process-per device. */
  337. struct kfd_process_device {
  338. /*
  339. * List of all per-device data for a process.
  340. * Starts from kfd_process.per_device_data.
  341. */
  342. struct list_head per_device_list;
  343. /* The device that owns this data. */
  344. struct kfd_dev *dev;
  345. /* per-process-per device QCM data structure */
  346. struct qcm_process_device qpd;
  347. /*Apertures*/
  348. uint64_t lds_base;
  349. uint64_t lds_limit;
  350. uint64_t gpuvm_base;
  351. uint64_t gpuvm_limit;
  352. uint64_t scratch_base;
  353. uint64_t scratch_limit;
  354. /* Is this process/pasid bound to this device? (amd_iommu_bind_pasid) */
  355. bool bound;
  356. };
  357. #define qpd_to_pdd(x) container_of(x, struct kfd_process_device, qpd)
  358. /* Process data */
  359. struct kfd_process {
  360. /*
  361. * kfd_process are stored in an mm_struct*->kfd_process*
  362. * hash table (kfd_processes in kfd_process.c)
  363. */
  364. struct hlist_node kfd_processes;
  365. struct mm_struct *mm;
  366. struct mutex mutex;
  367. /*
  368. * In any process, the thread that started main() is the lead
  369. * thread and outlives the rest.
  370. * It is here because amd_iommu_bind_pasid wants a task_struct.
  371. */
  372. struct task_struct *lead_thread;
  373. /* We want to receive a notification when the mm_struct is destroyed */
  374. struct mmu_notifier mmu_notifier;
  375. /* Use for delayed freeing of kfd_process structure */
  376. struct rcu_head rcu;
  377. unsigned int pasid;
  378. /*
  379. * List of kfd_process_device structures,
  380. * one for each device the process is using.
  381. */
  382. struct list_head per_device_data;
  383. struct process_queue_manager pqm;
  384. /* The process's queues. */
  385. size_t queue_array_size;
  386. /* Size is queue_array_size, up to MAX_PROCESS_QUEUES. */
  387. struct kfd_queue **queues;
  388. unsigned long allocated_queue_bitmap[DIV_ROUND_UP(KFD_MAX_NUM_OF_QUEUES_PER_PROCESS, BITS_PER_LONG)];
  389. /*Is the user space process 32 bit?*/
  390. bool is_32bit_user_mode;
  391. };
  392. /**
  393. * Ioctl function type.
  394. *
  395. * \param filep pointer to file structure.
  396. * \param p amdkfd process pointer.
  397. * \param data pointer to arg that was copied from user.
  398. */
  399. typedef int amdkfd_ioctl_t(struct file *filep, struct kfd_process *p,
  400. void *data);
  401. struct amdkfd_ioctl_desc {
  402. unsigned int cmd;
  403. int flags;
  404. amdkfd_ioctl_t *func;
  405. unsigned int cmd_drv;
  406. const char *name;
  407. };
  408. void kfd_process_create_wq(void);
  409. void kfd_process_destroy_wq(void);
  410. struct kfd_process *kfd_create_process(const struct task_struct *);
  411. struct kfd_process *kfd_get_process(const struct task_struct *);
  412. struct kfd_process_device *kfd_bind_process_to_device(struct kfd_dev *dev,
  413. struct kfd_process *p);
  414. void kfd_unbind_process_from_device(struct kfd_dev *dev, unsigned int pasid);
  415. struct kfd_process_device *kfd_get_process_device_data(struct kfd_dev *dev,
  416. struct kfd_process *p,
  417. int create_pdd);
  418. /* Process device data iterator */
  419. struct kfd_process_device *kfd_get_first_process_device_data(struct kfd_process *p);
  420. struct kfd_process_device *kfd_get_next_process_device_data(struct kfd_process *p,
  421. struct kfd_process_device *pdd);
  422. bool kfd_has_process_device_data(struct kfd_process *p);
  423. /* PASIDs */
  424. int kfd_pasid_init(void);
  425. void kfd_pasid_exit(void);
  426. bool kfd_set_pasid_limit(unsigned int new_limit);
  427. unsigned int kfd_get_pasid_limit(void);
  428. unsigned int kfd_pasid_alloc(void);
  429. void kfd_pasid_free(unsigned int pasid);
  430. /* Doorbells */
  431. void kfd_doorbell_init(struct kfd_dev *kfd);
  432. int kfd_doorbell_mmap(struct kfd_process *process, struct vm_area_struct *vma);
  433. u32 __iomem *kfd_get_kernel_doorbell(struct kfd_dev *kfd,
  434. unsigned int *doorbell_off);
  435. void kfd_release_kernel_doorbell(struct kfd_dev *kfd, u32 __iomem *db_addr);
  436. u32 read_kernel_doorbell(u32 __iomem *db);
  437. void write_kernel_doorbell(u32 __iomem *db, u32 value);
  438. unsigned int kfd_queue_id_to_doorbell(struct kfd_dev *kfd,
  439. struct kfd_process *process,
  440. unsigned int queue_id);
  441. extern struct device *kfd_device;
  442. /* Topology */
  443. int kfd_topology_init(void);
  444. void kfd_topology_shutdown(void);
  445. int kfd_topology_add_device(struct kfd_dev *gpu);
  446. int kfd_topology_remove_device(struct kfd_dev *gpu);
  447. struct kfd_dev *kfd_device_by_id(uint32_t gpu_id);
  448. struct kfd_dev *kfd_device_by_pci_dev(const struct pci_dev *pdev);
  449. struct kfd_dev *kfd_topology_enum_kfd_devices(uint8_t idx);
  450. /* Interrupts */
  451. void kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry);
  452. /* Power Management */
  453. void kgd2kfd_suspend(struct kfd_dev *kfd);
  454. int kgd2kfd_resume(struct kfd_dev *kfd);
  455. /* amdkfd Apertures */
  456. int kfd_init_apertures(struct kfd_process *process);
  457. /* Queue Context Management */
  458. inline uint32_t lower_32(uint64_t x);
  459. inline uint32_t upper_32(uint64_t x);
  460. int init_queue(struct queue **q, struct queue_properties properties);
  461. void uninit_queue(struct queue *q);
  462. void print_queue_properties(struct queue_properties *q);
  463. void print_queue(struct queue *q);
  464. struct mqd_manager *mqd_manager_init(enum KFD_MQD_TYPE type,
  465. struct kfd_dev *dev);
  466. struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev);
  467. void device_queue_manager_uninit(struct device_queue_manager *dqm);
  468. struct kernel_queue *kernel_queue_init(struct kfd_dev *dev,
  469. enum kfd_queue_type type);
  470. void kernel_queue_uninit(struct kernel_queue *kq);
  471. /* Process Queue Manager */
  472. struct process_queue_node {
  473. struct queue *q;
  474. struct kernel_queue *kq;
  475. struct list_head process_queue_list;
  476. };
  477. int pqm_init(struct process_queue_manager *pqm, struct kfd_process *p);
  478. void pqm_uninit(struct process_queue_manager *pqm);
  479. int pqm_create_queue(struct process_queue_manager *pqm,
  480. struct kfd_dev *dev,
  481. struct file *f,
  482. struct queue_properties *properties,
  483. unsigned int flags,
  484. enum kfd_queue_type type,
  485. unsigned int *qid);
  486. int pqm_destroy_queue(struct process_queue_manager *pqm, unsigned int qid);
  487. int pqm_update_queue(struct process_queue_manager *pqm, unsigned int qid,
  488. struct queue_properties *p);
  489. /* Packet Manager */
  490. #define KFD_HIQ_TIMEOUT (500)
  491. #define KFD_FENCE_COMPLETED (100)
  492. #define KFD_FENCE_INIT (10)
  493. #define KFD_UNMAP_LATENCY (150)
  494. struct packet_manager {
  495. struct device_queue_manager *dqm;
  496. struct kernel_queue *priv_queue;
  497. struct mutex lock;
  498. bool allocated;
  499. struct kfd_mem_obj *ib_buffer_obj;
  500. };
  501. int pm_init(struct packet_manager *pm, struct device_queue_manager *dqm);
  502. void pm_uninit(struct packet_manager *pm);
  503. int pm_send_set_resources(struct packet_manager *pm,
  504. struct scheduling_resources *res);
  505. int pm_send_runlist(struct packet_manager *pm, struct list_head *dqm_queues);
  506. int pm_send_query_status(struct packet_manager *pm, uint64_t fence_address,
  507. uint32_t fence_value);
  508. int pm_send_unmap_queue(struct packet_manager *pm, enum kfd_queue_type type,
  509. enum kfd_preempt_type_filter mode,
  510. uint32_t filter_param, bool reset,
  511. unsigned int sdma_engine);
  512. void pm_release_ib(struct packet_manager *pm);
  513. uint64_t kfd_get_number_elems(struct kfd_dev *kfd);
  514. phys_addr_t kfd_get_process_doorbells(struct kfd_dev *dev,
  515. struct kfd_process *process);
  516. #endif