ANDROID: irq/proc: use active cpus for allowed irq affinity
With the introduction of pause, irqs should avoid paused cpus. Previously, when userspace set the irq affinity, it was only filtered toward online cpus. A cpu can be paused but online, and irqs should avoid. Check the cpu_active_mask instead of the online mask when writing the irq affinity, such that the subset of cpus allowed doesn't include inactive cpus. Bug: 161210528 Change-Id: I359a452cc97ad58ad85e9613a29d144ffcd51567 Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
This commit is contained in:

committed by
Todd Kjos

parent
ecd1443038
commit
d9ffca8412
@@ -157,9 +157,9 @@ static ssize_t write_irq_affinity(int type, struct file *file,
|
||||
/*
|
||||
* Do not allow disabling IRQs completely - it's a too easy
|
||||
* way to make the system unusable accidentally :-) At least
|
||||
* one online CPU still has to be targeted.
|
||||
* one active CPU still has to be targeted.
|
||||
*/
|
||||
if (!cpumask_intersects(new_value, cpu_online_mask)) {
|
||||
if (!cpumask_intersects(new_value, cpu_active_mask)) {
|
||||
/*
|
||||
* Special case for empty set - allow the architecture code
|
||||
* to set default SMP affinity.
|
||||
|
Reference in New Issue
Block a user