diff options
author | Arthur Jones <arthur.jones@qlogic.com> | 2007-05-10 15:10:49 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-05-14 16:22:42 -0400 |
commit | 8f140b407f3be04e7202be9aa0cfef3006d14c9f (patch) | |
tree | 34f308cacd261f03cc3e490a187df369f0bac7f3 /drivers/infiniband/hw/ipath/ipath_intr.c | |
parent | 26c6bc7b812b4157ba929035e467c0f4dd165916 (diff) |
IB/ipath: Shadow the gpio_mask register
Once upon a time, GPIO interrupts were rare. But then a chip bug in
the waldo series forced the use of a GPIO interrupt to signal packet
reception. This greatly increased the frequency of GPIO interrupts
which have the gpio_mask bits set on the waldo chips. Other bits in
the gpio_status register are used for I2C clock and data lines, these
bits are usually on. An "unlikely" annotation leftover from the old
days was improperly applied to these bits, and an unnecessary chip
mmio read was being accessed in the interrupt fast path on waldo.
Remove the stagnant unlikely annotation in the interrupt handler and
keep a shadow copy of the gpio_mask register to avoid the slow mmio
read when testing for interruptable GPIO bits.
Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_intr.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_intr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index 45d033169c6e..a90d3b5699c4 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c | |||
@@ -1056,7 +1056,7 @@ irqreturn_t ipath_intr(int irq, void *data) | |||
1056 | gpiostatus &= ~(1 << IPATH_GPIO_PORT0_BIT); | 1056 | gpiostatus &= ~(1 << IPATH_GPIO_PORT0_BIT); |
1057 | chk0rcv = 1; | 1057 | chk0rcv = 1; |
1058 | } | 1058 | } |
1059 | if (unlikely(gpiostatus)) { | 1059 | if (gpiostatus) { |
1060 | /* | 1060 | /* |
1061 | * Some unexpected bits remain. If they could have | 1061 | * Some unexpected bits remain. If they could have |
1062 | * caused the interrupt, complain and clear. | 1062 | * caused the interrupt, complain and clear. |
@@ -1065,9 +1065,8 @@ irqreturn_t ipath_intr(int irq, void *data) | |||
1065 | * GPIO interrupts, possibly on a "three strikes" | 1065 | * GPIO interrupts, possibly on a "three strikes" |
1066 | * basis. | 1066 | * basis. |
1067 | */ | 1067 | */ |
1068 | u32 mask; | 1068 | const u32 mask = (u32) dd->ipath_gpio_mask; |
1069 | mask = ipath_read_kreg32( | 1069 | |
1070 | dd, dd->ipath_kregs->kr_gpio_mask); | ||
1071 | if (mask & gpiostatus) { | 1070 | if (mask & gpiostatus) { |
1072 | ipath_dbg("Unexpected GPIO IRQ bits %x\n", | 1071 | ipath_dbg("Unexpected GPIO IRQ bits %x\n", |
1073 | gpiostatus & mask); | 1072 | gpiostatus & mask); |