1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * drivers/auth_ctl/qos_ctrl.h 4 * 5 * Copyright (c) 2022 Huawei Device Co., Ltd. 6 * 7 */ 8 9 #ifndef __QOS_CTRL_H 10 #define __QOS_CTRL_H 11 12 #include "../../kernel/sched/sched.h" 13 14 #include <linux/sched/qos_ctrl.h> 15 16 /* qos level interval between user space and kernel space */ 17 #define QOS_LEVEL_INTERVAL 1 18 19 /* min qos level used in kernel space, begin index for LOOP */ 20 #define QOS_POLICY_MIN_LEVEL (NO_QOS + QOS_LEVEL_INTERVAL) 21 22 struct qos_policy_item { 23 int nice; 24 int latency_nice; 25 int uclamp_min; 26 int uclamp_max; 27 int rt_sched_priority; 28 }; 29 30 struct qos_policy_map { 31 rwlock_t lock; 32 bool initialized; 33 unsigned int policy_flag; 34 struct qos_policy_item levels[NR_QOS]; 35 }; 36 37 int __init init_qos_ctrl(void); 38 39 #endif /* __OQS_CTRL_H */ 40 41