Files
linux/kernel
Abhilash Kesavan 3861f0b0f1 ANDROID: sched/walt: Fix divide by zero error in cpufreq notifier
On systems using ACPI cpufreq, at boot-time only CPU0 max_freq has been
populated when load_scale_factor/capacity recomputation is triggered on
all possible cpus. This leads to the following divide by zero panic when
rq->max_freq for any cpu other than CPU0 is accessed:

[    4.827597]  divide error: 0000 [#1] PREEMPT SMP
[    4.827604]  [<ffffffff862ad88e>] ? notifier_call_chain+0x37/0x57
[    4.827607]  [<ffffffff862adaf3>] ? __blocking_notifier_call_chain+0x46/0x5c
[    4.827611]  [<ffffffff8684b9f4>] ? cpufreq_set_policy+0xa6/0x2dc
[    4.827614]  [<ffffffff869e4d55>] ? cpufreq_init_policy+0xba/0xde
[    4.827617]  [<ffffffff8684bd4c>] ? cpufreq_update_policy+0x122/0x122
[    4.827620]  [<ffffffff8684c51c>] ? cpufreq_online+0x5a7/0x64e
[    4.827623]  [<ffffffff8684c63b>] ? cpufreq_add_dev+0x78/0xed
[    4.827627]  [<ffffffff866ce412>] ? subsys_interface_register+0xd6/0x117
[    4.827630]  [<ffffffff8684b410>] ? cpufreq_register_driver+0x168/0x2b2
[    4.827632]  [<ffffffff8684b410>] ? cpufreq_register_driver+0x168/0x2b2
[    4.827636]  [<ffffffff86f83b2e>] ? cpufreq_gov_dbs_init+0xc/0xc
[    4.827639]  [<ffffffff86f83d43>] ? acpi_cpufreq_init+0x215/0x282
[    4.827641]  [<ffffffff86f83b2e>] ? cpufreq_gov_dbs_init+0xc/0xc
[    4.827645]  [<ffffffff8620046e>] ? do_one_initcall+0x9c/0x12e
[    4.827649]  [<ffffffff86f3d058>] ? kernel_init_freeable+0x190/0x22b
[    4.827651]  [<ffffffff869e59d9>] ? rest_init+0x7c/0x7c
[    4.827653]  [<ffffffff869e59e3>] ? kernel_init+0xa/0xf3
[    4.827656]  [<ffffffff869ed482>] ? ret_from_fork+0x22/0x30

On ACPI based systems, for CPUs with uninitialized rq->max_freq skip the
re-calculation.

Reference discussion on a similar issue here:
https://www.spinics.net/lists/arm-kernel/msg557612.html

Change-Id: I5025e3f6db671e9e72369f85708d3b0482d5dad2
Signed-off-by: Abhilash Kesavan <abhilash.kesavan@intel.com>
2017-10-27 16:04:52 +00:00
..
2017-10-12 22:31:24 +02:00
2017-01-31 13:55:27 -08:00
2017-10-12 22:31:24 +02:00
2017-09-02 07:07:53 +02:00
2017-10-12 22:31:24 +02:00
2017-10-23 09:35:27 +02:00
2017-10-12 22:31:24 +02:00
2015-04-11 22:27:55 -04:00
2015-11-19 17:51:48 +01:00
2016-01-22 18:04:28 -05:00
2016-04-04 09:46:47 -04:00
2014-08-08 15:57:18 -07:00
2017-08-11 13:55:02 -07:00
2017-08-07 14:21:32 -07:00
2017-10-12 22:31:24 +02:00
2015-04-12 21:03:31 +02:00
2015-11-23 09:44:58 +01:00
2016-02-16 13:04:58 -05:00
2017-05-20 14:28:40 +02:00
2017-07-05 14:40:24 +02:00
2017-08-24 17:12:21 -07:00
2015-01-17 10:02:23 +13:00
2016-03-01 20:36:56 +01:00
2017-10-05 10:37:37 +02:00
2016-10-07 18:46:30 -07:00
2016-09-22 20:00:36 -05:00