PATCH: apply some patches from my CM kernel (that came from CAF, not CM)
/include/linux/cpufreq.h
blob:0814d0f1227dffd16792e503c98dbc8a8dc72e89 -> blob:f5778743255fba36478f7dd47315e8891cc5e33c
--- include/linux/cpufreq.h
+++ include/linux/cpufreq.h
@@ -32,8 +32,6 @@
#define CPUFREQ_TRANSITION_NOTIFIER (0)
#define CPUFREQ_POLICY_NOTIFIER (1)
-#define __MP_DECISION_PATCH__
-
#ifdef CONFIG_CPU_FREQ
int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
@@ -58,6 +56,10 @@ static inline int cpufreq_unregister_not
#define CPUFREQ_POLICY_POWERSAVE (1)
#define CPUFREQ_POLICY_PERFORMANCE (2)
+/* Minimum frequency cutoff to notify the userspace about cpu utilization
+ * changes */
+#define MIN_CPU_UTIL_NOTIFY 40
+
/* Frequency values here are CPU kHz so that hardware which doesn't run
* with some frequencies can complain without having to guess what per
* cent / per mille means.
@@ -98,9 +100,7 @@ struct cpufreq_policy {
unsigned int max; /* in kHz */
unsigned int cur; /* in kHz, only needed if cpufreq
* governors are used */
-#if defined(__MP_DECISION_PATCH__)
- unsigned int utils; /* in %, CPU utilization */
-#endif
+ unsigned int util; /* CPU utilization at max frequency */
unsigned int policy; /* see above */
struct cpufreq_governor *governor; /* see below */
@@ -259,14 +259,9 @@ int cpufreq_register_driver(struct cpufr
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
-#if defined(__MP_DECISION_PATCH__)
void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);
void cpufreq_notify_utilization(struct cpufreq_policy *policy,
unsigned int load);
-#else
-void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state);
-#endif
-
static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max)
{