Re: [PATCH 3/8] irq: make set_affinity to return status -v2

From: Ingo Molnar
Date: Thu Apr 16 2009 - 05:09:44 EST



* Yinghai Lu <yinghai@xxxxxxxxxx> wrote:

> Impact: prepare to use it to keep affinity consistent
>
> according to Ingo, change set_affinity() in irq_chip to return int.
>
> v2: fix two typo
>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
>
> ---
> arch/alpha/kernel/sys_dp264.c | 8 +++-
> arch/alpha/kernel/sys_titan.c | 4 +-
> arch/arm/common/gic.c | 4 +-
> arch/cris/arch-v32/kernel/irq.c | 4 +-
> arch/ia64/hp/sim/hpsim_irq.c | 3 +
> arch/ia64/kernel/iosapic.c | 10 +++--
> arch/ia64/kernel/msi_ia64.c | 16 +++++---
> arch/ia64/sn/kernel/irq.c | 4 +-
> arch/ia64/sn/kernel/msi_sn.c | 8 ++--
> arch/mips/cavium-octeon/octeon-irq.c | 8 +++-
> arch/mips/include/asm/irq.h | 2 -
> arch/mips/kernel/irq-gic.c | 5 +-
> arch/mips/mti-malta/malta-smtc.c | 4 +-
> arch/mips/sibyte/bcm1480/irq.c | 8 ++--
> arch/mips/sibyte/sb1250/irq.c | 8 ++--
> arch/parisc/kernel/irq.c | 6 ++-
> arch/powerpc/platforms/pseries/xics.c | 12 +++---
> arch/powerpc/sysdev/mpic.c | 4 +-
> arch/sparc/kernel/irq_64.c | 12 ++++--
> arch/x86/kernel/apic/io_apic.c | 64 +++++++++++++++++++++-------------
> drivers/parisc/iosapic.c | 6 ++-
> drivers/xen/events.c | 12 +++---
> include/linux/irq.h | 2 -
> 23 files changed, 140 insertions(+), 74 deletions(-)

Yeah, this patch looks _much_ nicer than the open-coded cpumask-copy
lines. It makes it really apparent which architectures can fail the
affinity setting and which not.

This is proper layered design - the previous patch was open-coding
implementation details into the affinity-setting handlers and was
thus obfuscating the code and was making it harder to maintain.

There is one omission: this should be Cc:-ed to
linux-arch@xxxxxxxxxxxxxxx, because it affects all architectures.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/