diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-07 10:02:20 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:07 -0500 |
commit | 3b8249e759c701c4a82f99d957be651a7657bf6f (patch) | |
tree | f758675da3bb37282eefd50e57456d09b208b452 /include/linux/irq.h | |
parent | 569bda8df11effa03e618729293c7961696abb10 (diff) |
genirq: Do not copy affinity before set
While rumaging through arch code I found that there are a few
workarounds which deal with the fact that the initial affinity setting
from request_irq() copies the mask into irq_data->affinity before the
chip code is called. In the normal path we unconditionally copy the
mask when the chip code returns 0.
Copy after the code is called and add a return code
IRQ_SET_MASK_OK_NOCOPY for the chip functions, which prevents the
copy. That way we see the real mask when the chip function decided to
truncate it further as some arches do. IRQ_SET_MASK_OK is 0, which is
the current behaviour.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index e9f847d56c4d..f5e900309d21 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -85,6 +85,17 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
85 | # define IRQ_NO_BALANCING_MASK IRQ_NO_BALANCING | 85 | # define IRQ_NO_BALANCING_MASK IRQ_NO_BALANCING |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | /* | ||
89 | * Return value for chip->irq_set_affinity() | ||
90 | * | ||
91 | * IRQ_SET_MASK_OK - OK, core updates irq_data.affinity | ||
92 | * IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity | ||
93 | */ | ||
94 | enum { | ||
95 | IRQ_SET_MASK_OK = 0, | ||
96 | IRQ_SET_MASK_OK_NOCOPY, | ||
97 | }; | ||
98 | |||
88 | struct msi_desc; | 99 | struct msi_desc; |
89 | 100 | ||
90 | /** | 101 | /** |