genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value
authorJiang Liu <liuj97@gmail.com>
Fri, 30 Mar 2012 15:11:33 +0000 (23:11 +0800)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:00 +0000 (19:15 +0100)
commit63d87a656e7a532552bac95f20680cd61b50a106
treeb7a0588c59a5f9816f6c06e2ced0deea7cf42f70
parentd3e342cb72da275145ff4a9bb57d42d05fddfcb5
genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value

BugLink: http://bugs.launchpad.net/bugs/981162

commit f5cb92ac82d06cb583c1f66666314c5c0a4d7913 upstream.

irq_move_masked_irq() checks the return code of
chip->irq_set_affinity() only for 0, but IRQ_SET_MASK_OK_NOCOPY is
also a valid return code, which is there to avoid a redundant copy of
the cpumask. But in case of IRQ_SET_MASK_OK_NOCOPY we not only avoid
the redundant copy, we also fail to adjust the thread affinity of an
eventually threaded interrupt handler.

Handle IRQ_SET_MASK_OK (==0) and IRQ_SET_MASK_OK_NOCOPY(==1) return
values correctly by checking the valid return values seperately.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Keping Chen <chenkeping@huawei.com>
Link: http://lkml.kernel.org/r/1333120296-13563-2-git-send-email-jiang.liu@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
kernel/irq/migration.c