aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/nvidia_info.h
blob: 580728051d4efced328ed87ebeecfa6c7e90c3d3 (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
39
40
41
42
43
44
45
#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
#define NV_MAX_SIMULT_USERS CONFIG_NV_MAX_SIMULT_USERS

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 *t);

struct task_struct* get_nv_max_device_owner(u32 target_device_id);
//int is_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);

#ifdef CONFIG_LITMUS_PAI_SOFTIRQD
void pai_check_priority_increase(struct task_struct *t, int reg_device_id);
void pai_check_priority_decrease(struct task_struct *t, int reg_device_id);
#endif

//void increment_nv_int_count(u32 device);

#endif