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/ia64/kernel/iosapic.c | |
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/ia64/kernel/iosapic.c')
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 166e0d839fa0..f92cef47bf86 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -329,7 +329,7 @@ unmask_irq (unsigned int irq) | |||
329 | } | 329 | } |
330 | 330 | ||
331 | 331 | ||
332 | static void | 332 | static int |
333 | iosapic_set_affinity(unsigned int irq, const struct cpumask *mask) | 333 | iosapic_set_affinity(unsigned int irq, const struct cpumask *mask) |
334 | { | 334 | { |
335 | #ifdef CONFIG_SMP | 335 | #ifdef CONFIG_SMP |
@@ -343,15 +343,15 @@ iosapic_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
343 | 343 | ||
344 | cpu = cpumask_first_and(cpu_online_mask, mask); | 344 | cpu = cpumask_first_and(cpu_online_mask, mask); |
345 | if (cpu >= nr_cpu_ids) | 345 | if (cpu >= nr_cpu_ids) |
346 | return; | 346 | return -1; |
347 | 347 | ||
348 | if (irq_prepare_move(irq, cpu)) | 348 | if (irq_prepare_move(irq, cpu)) |
349 | return; | 349 | return -1; |
350 | 350 | ||
351 | dest = cpu_physical_id(cpu); | 351 | dest = cpu_physical_id(cpu); |
352 | 352 | ||
353 | if (!iosapic_intr_info[irq].count) | 353 | if (!iosapic_intr_info[irq].count) |
354 | return; /* not an IOSAPIC interrupt */ | 354 | return -1; /* not an IOSAPIC interrupt */ |
355 | 355 | ||
356 | set_irq_affinity_info(irq, dest, redir); | 356 | set_irq_affinity_info(irq, dest, redir); |
357 | 357 | ||
@@ -376,7 +376,9 @@ iosapic_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
376 | iosapic_write(iosapic, IOSAPIC_RTE_HIGH(rte_index), high32); | 376 | iosapic_write(iosapic, IOSAPIC_RTE_HIGH(rte_index), high32); |
377 | iosapic_write(iosapic, IOSAPIC_RTE_LOW(rte_index), low32); | 377 | iosapic_write(iosapic, IOSAPIC_RTE_LOW(rte_index), low32); |
378 | } | 378 | } |
379 | |||
379 | #endif | 380 | #endif |
381 | return 0; | ||
380 | } | 382 | } |
381 | 383 | ||
382 | /* | 384 | /* |