diff options
| author | Yinghai Lu <[email protected]> | 2009-04-27 17:59:53 -0700 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2009-04-28 12:21:16 +0200 |
| commit | 57b150cce8e004ddd36330490a68bfb59b7271e9 (patch) | |
| tree | f337b08b6cd9bbe165c709a7e5159b0d6d779238 /include | |
| parent | d5dedd4507d307eb3f35f21b6e16f336fdc0d82a (diff) | |
irq: only update affinity if ->set_affinity() is sucessfull
irq_set_affinity() and move_masked_irq() try to assign affinity
before calling chip set_affinity(). Some archs are assigning it
in ->set_affinity() again.
We do something like:
cpumask_cpy(desc->affinity, mask);
desc->chip->set_affinity(mask);
But in the failure path, affinity should not be touched - otherwise
we'll end up with a different affinity mask despite the failure to
migrate the IRQ.
So try to update the afffinity only if set_affinity returns with 0.
Also call irq_set_thread_affinity accordingly.
v2: update after "irq, x86: Remove IRQ_DISABLED check in process context IRQ move"
v3: according to Ingo, change set_affinity() in irq_chip should return int.
v4: update comments by removing moving irq_desc code.
[ Impact: fix /proc/irq/*/smp_affinity setting corner case bug ]
Signed-off-by: Yinghai Lu <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Suresh Siddha <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Rusty Russell <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions