summaryrefslogtreecommitdiff
path: root/drivers/trusty/trusty-sched-share-api.h
blob: 412704a6fbe890f665588913a90cf126dd41411e (plain)
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
/* SPDX-License-Identifier: MIT */
/*
 * Copyright (c) 2022 Google, Inc.
 *
 * This header file contains the definitions of APIs, used for the
 * registration/unregistration of shared-memory used for the
 * exchange of info between the Linux Trusty-Driver and the Trusty-Kernel.
 */
#ifndef _TRUSTY_SCHED_SHARE_API_H_
#define _TRUSTY_SCHED_SHARE_API_H_

#include <linux/device.h>

struct trusty_sched_share_state;

int trusty_alloc_sched_share(struct device *device,
		struct trusty_sched_share_state **state);
void trusty_register_sched_share(struct device *device,
		struct trusty_sched_share_state *sched_share_state);
void trusty_unregister_sched_share(struct trusty_sched_share_state *sched_share_state);
void trusty_free_sched_share(struct trusty_sched_share_state *sched_share_state);

int trusty_get_requested_nice(unsigned int cpu_num, struct trusty_sched_share_state *tcpu_state);
int trusty_set_actual_nice(unsigned int cpu_num, struct trusty_sched_share_state *tcpu_state,
		int nice);

#endif /* _TRUSTY_SCHED_SHARE_API_H_ */