interactive: disable idle notifier

PD#SWPL-569

Problem:
Randomly encountered the phenomenon of kernel panic restart
(add_timer_on) from [<c09acdfc>] (slack_timer_resched+0xa8/0xdc)
(slack_timer_resched) from [<c09ae2f0>] (cpufreq_interactive_start+0xac/0x234)
(cpufreq_interactive_start) from [<c09a8168>] (cpufreq_start_governor+0x68/0xa4)
(cpufreq_start_governor) from [<c09a9e9c>] (cpufreq_online+0x4f8/0x794)
(cpufreq_online) from [<c09aa150>] (cpuhp_cpufreq_online+0x18/0x20)
(cpuhp_cpufreq_online) from [<c03231b8>] (cpuhp_invoke_callback+0xa8/0x638)
(cpuhp_invoke_callback) from [<c0323898>] (cpuhp_up_callbacks+0x34/0xe8)
(cpuhp_up_callbacks) from [<c0324774>] (cpuhp_thread_fun+0x13c/0x14c)
(cpuhp_thread_fun) from [<c034ab64>] (smpboot_thread_fn+0x1a8/0x32c)
(smpboot_thread_fn) from [<c0346428>] (kthread+0x124/0x140)
(kthread) from [<c03089d0>] (ret_from_fork+0x14/0x24)


Solution:
disable idle notifier for interactive

Verify:
verified by p212

Change-Id: I412dab961f04bea439d5a26564268289fc4b3940
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
This commit is contained in:
Jianxin Pan
2018-10-15 21:07:36 +08:00
parent 0f59b37c5e
commit 73d8a197e2

View File

@@ -471,7 +471,7 @@ static void cpufreq_interactive_update(struct interactive_cpu *icpu)
eval_target_freq(icpu);
slack_timer_resched(icpu, smp_processor_id(), true);
}
#ifndef CONFIG_AMLOGIC_MODIFY
static void cpufreq_interactive_idle_end(void)
{
struct interactive_cpu *icpu = &per_cpu(interactive_cpu,
@@ -491,7 +491,7 @@ static void cpufreq_interactive_idle_end(void)
up_read(&icpu->enable_sem);
}
#endif
static void cpufreq_interactive_get_policy_info(struct cpufreq_policy *policy,
unsigned int *pmax_freq,
u64 *phvt, u64 *pfvt)
@@ -1011,7 +1011,7 @@ static struct kobj_type interactive_tunables_ktype = {
.default_attrs = interactive_attributes,
.sysfs_ops = &governor_sysfs_ops,
};
#ifndef CONFIG_AMLOGIC_MODIFY
static int cpufreq_interactive_idle_notifier(struct notifier_block *nb,
unsigned long val, void *data)
{
@@ -1024,7 +1024,7 @@ static int cpufreq_interactive_idle_notifier(struct notifier_block *nb,
static struct notifier_block cpufreq_interactive_idle_nb = {
.notifier_call = cpufreq_interactive_idle_notifier,
};
#endif
/* Interactive Governor callbacks */
struct interactive_governor {
struct cpufreq_governor gov;
@@ -1242,7 +1242,9 @@ int cpufreq_interactive_init(struct cpufreq_policy *policy)
/* One time initialization for governor */
if (!interactive_gov.usage_count++) {
#ifndef CONFIG_AMLOGIC_MODIFY
idle_notifier_register(&cpufreq_interactive_idle_nb);
#endif
cpufreq_register_notifier(&cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
}
@@ -1276,7 +1278,9 @@ void cpufreq_interactive_exit(struct cpufreq_policy *policy)
if (!--interactive_gov.usage_count) {
cpufreq_unregister_notifier(&cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
#ifndef CONFIG_AMLOGIC_MODIFY
idle_notifier_unregister(&cpufreq_interactive_idle_nb);
#endif
}
count = gov_attr_set_put(&tunables->attr_set, &ipolicy->tunables_hook);