aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/nvidia_info.h
blob: 9e07a27fdee39cdb0225be5355afc9bdc6f6dd95 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef __LITMUS_NVIDIA_H
#define __LITMUS_NVIDIA_H

#include <linux/interrupt.h>


#include <litmus/litmus_softirq.h>


//#define NV_DEVICE_NUM NR_LITMUS_SOFTIRQD
#define NV_DEVICE_NUM CONFIG_NV_DEVICE_NUM

int init_nvidia_info(void);

int is_nvidia_func(void* func_addr);

void dump_nvidia_info(const struct tasklet_struct *t);


// Returns the Nvidia device # associated with provided tasklet and work_struct.
u32 get_tasklet_nv_device_num(const struct tasklet_struct *t);
u32 get_work_nv_device_num(const struct work_struct *t);


int init_nv_device_reg(void);
//int get_nv_device_id(struct task_struct* owner);


int reg_nv_device(int reg_device_id, int register_device);

struct task_struct* get_nv_device_owner(u32 target_device_id);

void lock_nv_registry(u32 reg_device_id, unsigned long* flags);
void unlock_nv_registry(u32 reg_device_id, unsigned long* flags);

void increment_nv_int_count(u32 device);

#endif