powercap: idle_inject: Use higher resolution for idle injection
[linux-2.6-microblaze.git] / kernel / sysctl.c
index 1beca96..078950d 100644 (file)
@@ -125,9 +125,6 @@ static int sixty = 60;
 #endif
 
 static int __maybe_unused neg_one = -1;
-
-static int zero;
-static int __maybe_unused one = 1;
 static int __maybe_unused two = 2;
 static int __maybe_unused four = 4;
 static unsigned long zero_ul;
@@ -188,17 +185,17 @@ extern int no_unaligned_warning;
  * enum sysctl_writes_mode - supported sysctl write modes
  *
  * @SYSCTL_WRITES_LEGACY: each write syscall must fully contain the sysctl value
- *     to be written, and multiple writes on the same sysctl file descriptor
- *     will rewrite the sysctl value, regardless of file position. No warning
- *     is issued when the initial position is not 0.
+ *     to be written, and multiple writes on the same sysctl file descriptor
+ *     will rewrite the sysctl value, regardless of file position. No warning
+ *     is issued when the initial position is not 0.
  * @SYSCTL_WRITES_WARN: same as above but warn when the initial file position is
- *     not 0.
+ *     not 0.
  * @SYSCTL_WRITES_STRICT: writes to numeric sysctl entries must always be at
- *     file position 0 and the value must be fully contained in the buffer
- *     sent to the write syscall. If dealing with strings respect the file
- *     position, but restrict this to the max length of the buffer, anything
- *     passed the max lenght will be ignored. Multiple writes will append
- *     to the buffer.
+ *     file position 0 and the value must be fully contained in the buffer
+ *     sent to the write syscall. If dealing with strings respect the file
+ *     position, but restrict this to the max length of the buffer, anything
+ *     passed the max length will be ignored. Multiple writes will append
+ *     to the buffer.
  *
  * These write modes control how current file position affects the behavior of
  * updating sysctl values through the proc interface on each write.
@@ -385,8 +382,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = sysctl_schedstats,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif /* CONFIG_SCHEDSTATS */
 #endif /* CONFIG_SMP */
@@ -418,7 +415,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &one,
+               .extra1         = SYSCTL_ONE,
        },
        {
                .procname       = "numa_balancing",
@@ -426,8 +423,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = sysctl_numa_balancing,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif /* CONFIG_NUMA_BALANCING */
 #endif /* CONFIG_SCHED_DEBUG */
@@ -452,6 +449,22 @@ static struct ctl_table kern_table[] = {
                .mode           = 0644,
                .proc_handler   = sched_rr_handler,
        },
+#ifdef CONFIG_UCLAMP_TASK
+       {
+               .procname       = "sched_util_clamp_min",
+               .data           = &sysctl_sched_uclamp_util_min,
+               .maxlen         = sizeof(unsigned int),
+               .mode           = 0644,
+               .proc_handler   = sysctl_sched_uclamp_handler,
+       },
+       {
+               .procname       = "sched_util_clamp_max",
+               .data           = &sysctl_sched_uclamp_util_max,
+               .maxlen         = sizeof(unsigned int),
+               .mode           = 0644,
+               .proc_handler   = sysctl_sched_uclamp_handler,
+       },
+#endif
 #ifdef CONFIG_SCHED_AUTOGROUP
        {
                .procname       = "sched_autogroup_enabled",
@@ -459,8 +472,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_CFS_BANDWIDTH
@@ -470,7 +483,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &one,
+               .extra1         = SYSCTL_ONE,
        },
 #endif
 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
@@ -480,8 +493,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = sched_energy_aware_handler,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_PROVE_LOCKING
@@ -546,7 +559,7 @@ static struct ctl_table kern_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
                .extra1         = &neg_one,
-               .extra2         = &one,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_LATENCYTOP
@@ -680,8 +693,8 @@ static struct ctl_table kern_table[] = {
                .mode           = 0644,
                /* only handle a transition from default "0" to "1" */
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &one,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ONE,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_MODULES
@@ -699,8 +712,8 @@ static struct ctl_table kern_table[] = {
                .mode           = 0644,
                /* only handle a transition from default "0" to "1" */
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &one,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ONE,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_UEVENT_HELPER
@@ -859,7 +872,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &ten_thousand,
        },
        {
@@ -875,8 +888,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax_sysadmin,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "kptr_restrict",
@@ -884,7 +897,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax_sysadmin,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &two,
        },
 #endif
@@ -909,8 +922,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_watchdog,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "watchdog_thresh",
@@ -918,7 +931,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_watchdog_thresh,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &sixty,
        },
        {
@@ -927,8 +940,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = NMI_WATCHDOG_SYSCTL_PERM,
                .proc_handler   = proc_nmi_watchdog,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "watchdog_cpumask",
@@ -944,8 +957,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_soft_watchdog,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "softlockup_panic",
@@ -953,8 +966,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #ifdef CONFIG_SMP
        {
@@ -963,8 +976,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif /* CONFIG_SMP */
 #endif
@@ -975,8 +988,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #ifdef CONFIG_SMP
        {
@@ -985,8 +998,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif /* CONFIG_SMP */
 #endif
@@ -1099,8 +1112,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "hung_task_check_count",
@@ -1108,7 +1121,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "hung_task_timeout_secs",
@@ -1185,7 +1198,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(sysctl_perf_event_sample_rate),
                .mode           = 0644,
                .proc_handler   = perf_proc_update_handler,
-               .extra1         = &one,
+               .extra1         = SYSCTL_ONE,
        },
        {
                .procname       = "perf_cpu_time_max_percent",
@@ -1193,7 +1206,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(sysctl_perf_cpu_time_max_percent),
                .mode           = 0644,
                .proc_handler   = perf_cpu_time_max_percent_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &one_hundred,
        },
        {
@@ -1202,7 +1215,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(sysctl_perf_event_max_stack),
                .mode           = 0644,
                .proc_handler   = perf_event_max_stack_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &six_hundred_forty_kb,
        },
        {
@@ -1211,7 +1224,7 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(sysctl_perf_event_max_contexts_per_stack),
                .mode           = 0644,
                .proc_handler   = perf_event_max_stack_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &one_thousand,
        },
 #endif
@@ -1221,8 +1234,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
        {
@@ -1231,8 +1244,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = timer_migration_handler,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_BPF_SYSCALL
@@ -1243,8 +1256,8 @@ static struct ctl_table kern_table[] = {
                .mode           = 0644,
                /* only handle a transition from default "0" to "1" */
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &one,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ONE,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "bpf_stats_enabled",
@@ -1261,8 +1274,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(sysctl_panic_on_rcu_stall),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_STACKLEAK_RUNTIME_DISABLE
@@ -1272,8 +1285,8 @@ static struct ctl_table kern_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0600,
                .proc_handler   = stack_erasing_sysctl,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
        { }
@@ -1286,7 +1299,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_overcommit_memory),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &two,
        },
        {
@@ -1295,7 +1308,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_panic_on_oom),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &two,
        },
        {
@@ -1332,7 +1345,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "dirty_background_ratio",
@@ -1340,7 +1353,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(dirty_background_ratio),
                .mode           = 0644,
                .proc_handler   = dirty_background_ratio_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &one_hundred,
        },
        {
@@ -1357,7 +1370,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(vm_dirty_ratio),
                .mode           = 0644,
                .proc_handler   = dirty_ratio_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &one_hundred,
        },
        {
@@ -1381,7 +1394,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(dirty_expire_interval),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "dirtytime_expire_seconds",
@@ -1389,7 +1402,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(dirtytime_expire_interval),
                .mode           = 0644,
                .proc_handler   = dirtytime_interval_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "swappiness",
@@ -1397,7 +1410,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(vm_swappiness),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &one_hundred,
        },
 #ifdef CONFIG_HUGETLB_PAGE
@@ -1422,8 +1435,8 @@ static struct ctl_table vm_table[] = {
                .maxlen                 = sizeof(int),
                .mode                   = 0644,
                .proc_handler   = sysctl_vm_numa_stat_handler,
-               .extra1                 = &zero,
-               .extra2                 = &one,
+               .extra1                 = SYSCTL_ZERO,
+               .extra2                 = SYSCTL_ONE,
        },
 #endif
         {
@@ -1454,7 +1467,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = drop_caches_sysctl_handler,
-               .extra1         = &one,
+               .extra1         = SYSCTL_ONE,
                .extra2         = &four,
        },
 #ifdef CONFIG_COMPACTION
@@ -1480,8 +1493,8 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 
 #endif /* CONFIG_COMPACTION */
@@ -1491,7 +1504,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(min_free_kbytes),
                .mode           = 0644,
                .proc_handler   = min_free_kbytes_sysctl_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "watermark_boost_factor",
@@ -1499,7 +1512,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(watermark_boost_factor),
                .mode           = 0644,
                .proc_handler   = watermark_boost_factor_sysctl_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "watermark_scale_factor",
@@ -1507,7 +1520,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(watermark_scale_factor),
                .mode           = 0644,
                .proc_handler   = watermark_scale_factor_sysctl_handler,
-               .extra1         = &one,
+               .extra1         = SYSCTL_ONE,
                .extra2         = &one_thousand,
        },
        {
@@ -1516,7 +1529,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(percpu_pagelist_fraction),
                .mode           = 0644,
                .proc_handler   = percpu_pagelist_fraction_sysctl_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
 #ifdef CONFIG_MMU
        {
@@ -1525,7 +1538,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_max_map_count),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
 #else
        {
@@ -1534,7 +1547,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_nr_trim_pages),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
 #endif
        {
@@ -1550,7 +1563,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(block_dump),
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "vfs_cache_pressure",
@@ -1558,7 +1571,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_vfs_cache_pressure),
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
 #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
        {
@@ -1567,7 +1580,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_legacy_va_layout),
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
 #endif
 #ifdef CONFIG_NUMA
@@ -1577,7 +1590,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(node_reclaim_mode),
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
        {
                .procname       = "min_unmapped_ratio",
@@ -1585,7 +1598,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_min_unmapped_ratio),
                .mode           = 0644,
                .proc_handler   = sysctl_min_unmapped_ratio_sysctl_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &one_hundred,
        },
        {
@@ -1594,7 +1607,7 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_min_slab_ratio),
                .mode           = 0644,
                .proc_handler   = sysctl_min_slab_ratio_sysctl_handler,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &one_hundred,
        },
 #endif
@@ -1645,7 +1658,7 @@ static struct ctl_table vm_table[] = {
 #endif
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
        },
 #endif
 #ifdef CONFIG_HIGHMEM
@@ -1655,8 +1668,8 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(vm_highmem_is_dirtyable),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
 #ifdef CONFIG_MEMORY_FAILURE
@@ -1666,8 +1679,8 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_memory_failure_early_kill),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "memory_failure_recovery",
@@ -1675,8 +1688,8 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_memory_failure_recovery),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
        {
@@ -1722,8 +1735,8 @@ static struct ctl_table vm_table[] = {
                .maxlen         = sizeof(sysctl_unprivileged_userfaultfd),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
        { }
@@ -1859,8 +1872,8 @@ static struct ctl_table fs_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0600,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "protected_hardlinks",
@@ -1868,8 +1881,8 @@ static struct ctl_table fs_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0600,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        {
                .procname       = "protected_fifos",
@@ -1877,7 +1890,7 @@ static struct ctl_table fs_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0600,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &two,
        },
        {
@@ -1886,7 +1899,7 @@ static struct ctl_table fs_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0600,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &two,
        },
        {
@@ -1895,7 +1908,7 @@ static struct ctl_table fs_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax_coredump,
-               .extra1         = &zero,
+               .extra1         = SYSCTL_ZERO,
                .extra2         = &two,
        },
 #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
@@ -1932,7 +1945,7 @@ static struct ctl_table fs_table[] = {
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &one,
+               .extra1         = SYSCTL_ONE,
        },
        { }
 };
@@ -1954,8 +1967,8 @@ static struct ctl_table debug_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_kprobes_optimization_handler,
-               .extra1         = &zero,
-               .extra2         = &one,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
 #endif
        { }
@@ -3379,8 +3392,8 @@ int proc_do_static_key(struct ctl_table *table, int write,
                .data   = &val,
                .maxlen = sizeof(val),
                .mode   = table->mode,
-               .extra1 = &zero,
-               .extra2 = &one,
+               .extra1 = SYSCTL_ZERO,
+               .extra2 = SYSCTL_ONE,
        };
 
        if (write && !capable(CAP_SYS_ADMIN))