diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-04-27 20:59:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-28 06:21:16 -0400 |
commit | d5dedd4507d307eb3f35f21b6e16f336fdc0d82a (patch) | |
tree | 2c31b00395bde49ec4c5a415b081daaec44d3dab /arch/sparc | |
parent | fcef5911c7ea89b80d5bfc727f402f37c9eefd57 (diff) |
irq: change ->set_affinity() to return status
according to Ingo, change set_affinity() in irq_chip should return int,
because that way we can handle failure cases in a much cleaner way, in
the genirq layer.
v2: fix two typos
[ Impact: extend API ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-arch@vger.kernel.org
LKML-Reference: <49F654E9.4070809@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 5deabe921a47..e5e78f9cfc95 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -318,10 +318,12 @@ static void sun4u_irq_enable(unsigned int virt_irq) | |||
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
321 | static void sun4u_set_affinity(unsigned int virt_irq, | 321 | static int sun4u_set_affinity(unsigned int virt_irq, |
322 | const struct cpumask *mask) | 322 | const struct cpumask *mask) |
323 | { | 323 | { |
324 | sun4u_irq_enable(virt_irq); | 324 | sun4u_irq_enable(virt_irq); |
325 | |||
326 | return 0; | ||
325 | } | 327 | } |
326 | 328 | ||
327 | /* Don't do anything. The desc->status check for IRQ_DISABLED in | 329 | /* Don't do anything. The desc->status check for IRQ_DISABLED in |
@@ -377,7 +379,7 @@ static void sun4v_irq_enable(unsigned int virt_irq) | |||
377 | ino, err); | 379 | ino, err); |
378 | } | 380 | } |
379 | 381 | ||
380 | static void sun4v_set_affinity(unsigned int virt_irq, | 382 | static int sun4v_set_affinity(unsigned int virt_irq, |
381 | const struct cpumask *mask) | 383 | const struct cpumask *mask) |
382 | { | 384 | { |
383 | unsigned int ino = virt_irq_table[virt_irq].dev_ino; | 385 | unsigned int ino = virt_irq_table[virt_irq].dev_ino; |
@@ -388,6 +390,8 @@ static void sun4v_set_affinity(unsigned int virt_irq, | |||
388 | if (err != HV_EOK) | 390 | if (err != HV_EOK) |
389 | printk(KERN_ERR "sun4v_intr_settarget(%x,%lu): " | 391 | printk(KERN_ERR "sun4v_intr_settarget(%x,%lu): " |
390 | "err(%d)\n", ino, cpuid, err); | 392 | "err(%d)\n", ino, cpuid, err); |
393 | |||
394 | return 0; | ||
391 | } | 395 | } |
392 | 396 | ||
393 | static void sun4v_irq_disable(unsigned int virt_irq) | 397 | static void sun4v_irq_disable(unsigned int virt_irq) |
@@ -445,7 +449,7 @@ static void sun4v_virq_enable(unsigned int virt_irq) | |||
445 | dev_handle, dev_ino, err); | 449 | dev_handle, dev_ino, err); |
446 | } | 450 | } |
447 | 451 | ||
448 | static void sun4v_virt_set_affinity(unsigned int virt_irq, | 452 | static int sun4v_virt_set_affinity(unsigned int virt_irq, |
449 | const struct cpumask *mask) | 453 | const struct cpumask *mask) |
450 | { | 454 | { |
451 | unsigned long cpuid, dev_handle, dev_ino; | 455 | unsigned long cpuid, dev_handle, dev_ino; |
@@ -461,6 +465,8 @@ static void sun4v_virt_set_affinity(unsigned int virt_irq, | |||
461 | printk(KERN_ERR "sun4v_vintr_set_target(%lx,%lx,%lu): " | 465 | printk(KERN_ERR "sun4v_vintr_set_target(%lx,%lx,%lu): " |
462 | "err(%d)\n", | 466 | "err(%d)\n", |
463 | dev_handle, dev_ino, cpuid, err); | 467 | dev_handle, dev_ino, cpuid, err); |
468 | |||
469 | return 0; | ||
464 | } | 470 | } |
465 | 471 | ||
466 | static void sun4v_virq_disable(unsigned int virt_irq) | 472 | static void sun4v_virq_disable(unsigned int virt_irq) |