]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Nov 2020 20:20:08 +0000 (21:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Nov 2020 20:20:08 +0000 (21:20 +0100)
added patches:
cpufreq-introduce-cpufreq_driver_test_flags.patch

queue-5.9/cpufreq-introduce-cpufreq_driver_test_flags.patch [new file with mode: 0644]
queue-5.9/series

diff --git a/queue-5.9/cpufreq-introduce-cpufreq_driver_test_flags.patch b/queue-5.9/cpufreq-introduce-cpufreq_driver_test_flags.patch
new file mode 100644 (file)
index 0000000..032c31d
--- /dev/null
@@ -0,0 +1,55 @@
+From a62f68f5ca53ab61cba2f0a410d0add7a6d54a52 Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Fri, 23 Oct 2020 17:35:46 +0200
+Subject: cpufreq: Introduce cpufreq_driver_test_flags()
+
+From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+
+commit a62f68f5ca53ab61cba2f0a410d0add7a6d54a52 upstream.
+
+Add a helper function to test the flags of the cpufreq driver in use
+againt a given flags mask.
+
+In particular, this will be needed to test the
+CPUFREQ_NEED_UPDATE_LIMITS cpufreq driver flag in the schedutil
+governor.
+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/cpufreq/cpufreq.c |   12 ++++++++++++
+ include/linux/cpufreq.h   |    1 +
+ 2 files changed, 13 insertions(+)
+
+--- a/drivers/cpufreq/cpufreq.c
++++ b/drivers/cpufreq/cpufreq.c
+@@ -1904,6 +1904,18 @@ void cpufreq_resume(void)
+ }
+ /**
++ * cpufreq_driver_test_flags - Test cpufreq driver's flags against given ones.
++ * @flags: Flags to test against the current cpufreq driver's flags.
++ *
++ * Assumes that the driver is there, so callers must ensure that this is the
++ * case.
++ */
++bool cpufreq_driver_test_flags(u16 flags)
++{
++      return !!(cpufreq_driver->flags & flags);
++}
++
++/**
+  *    cpufreq_get_current_driver - return current driver's name
+  *
+  *    Return the name string of the currently loaded cpufreq driver
+--- a/include/linux/cpufreq.h
++++ b/include/linux/cpufreq.h
+@@ -428,6 +428,7 @@ struct cpufreq_driver {
+ int cpufreq_register_driver(struct cpufreq_driver *driver_data);
+ int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
++bool cpufreq_driver_test_flags(u16 flags);
+ const char *cpufreq_get_current_driver(void);
+ void *cpufreq_get_driver_data(void);
index 3f973b7a8b7427b22ecc584e1d06581e0286f60b..239ea3fdc89b9527de249b5635cb08779ac3ff23 100644 (file)
@@ -382,6 +382,7 @@ staging-fieldbus-anybuss-jump-to-correct-label-in-an-error-path.patch
 staging-comedi-cb_pcidas-allow-2-channel-commands-for-ao-subdevice.patch
 staging-octeon-repair-fixed-link-support.patch
 staging-octeon-drop-on-uncorrectable-alignment-or-fcs-error.patch
+cpufreq-introduce-cpufreq_driver_test_flags.patch
 cpufreq-schedutil-always-call-driver-if-cpufreq_need_update_limits-is-set.patch
 vhost_vdpa-return-efault-if-copy_from_user-fails.patch
 vdpa-mlx5-fix-error-return-in-map_direct_mr.patch