hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/arch/x86/kernel/itmt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * itmt.c: Support Intel Turbo Boost Max Technology 3.0
34 *
45 * (C) Copyright 2016 Intel Corporation
56 * Author: Tim Chen <tim.c.chen@linux.intel.com>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; version 2
10
- * of the License.
117 *
128 * On platforms supporting Intel Turbo Boost Max Technology 3.0, (ITMT),
139 * the maximum turbo frequencies of some cores in a CPU package may be
....@@ -43,8 +39,7 @@
4339 unsigned int __read_mostly sysctl_sched_itmt_enabled;
4440
4541 static int sched_itmt_update_handler(struct ctl_table *table, int write,
46
- void __user *buffer, size_t *lenp,
47
- loff_t *ppos)
42
+ void *buffer, size_t *lenp, loff_t *ppos)
4843 {
4944 unsigned int old_sysctl;
5045 int ret;
....@@ -69,8 +64,6 @@
6964 return ret;
7065 }
7166
72
-static unsigned int zero;
73
-static unsigned int one = 1;
7467 static struct ctl_table itmt_kern_table[] = {
7568 {
7669 .procname = "sched_itmt_enabled",
....@@ -78,8 +71,8 @@
7871 .maxlen = sizeof(unsigned int),
7972 .mode = 0644,
8073 .proc_handler = sched_itmt_update_handler,
81
- .extra1 = &zero,
82
- .extra2 = &one,
74
+ .extra1 = SYSCTL_ZERO,
75
+ .extra2 = SYSCTL_ONE,
8376 },
8477 {}
8578 };