Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335568 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-02-16 16:50 +0100 |
| Last post | 2016-02-19 00:20 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 1/5] MIPS: jz4740: remove broken irq_to_gpio() call Arnd Bergmann <arnd@arndb.de> - 2016-02-16 16:50 +0100
Re: [PATCH v2 1/5] MIPS: jz4740: remove broken irq_to_gpio() call Ralf Baechle <ralf@linux-mips.org> - 2016-02-16 17:10 +0100
Re: [PATCH v2 1/5] MIPS: jz4740: remove broken irq_to_gpio() call Linus Walleij <linus.walleij@linaro.org> - 2016-02-19 00:20 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-02-16 16:50 +0100 |
| Subject | [PATCH v2 1/5] MIPS: jz4740: remove broken irq_to_gpio() call |
| Message-ID | <r2Q30-1iJ-7@gated-at.bofh.it> |
gpiolib has removed the irq_to_gpio() API several years ago,
but the global header still provided a non-working stub.
With a MIPS-wide change to use the generic header file, the jz4740
platform is now using the wrong stub implementation of irq_to_gpio(),
which cannot work.
This uses an open-coded implementation in the only line it
is used in.
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: <stable@vger.kernel.org> # v4.3+
Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h").
---
arch/mips/jz4740/gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c
index 8c6d76c9b2d6..d9907e57e9b9 100644
--- a/arch/mips/jz4740/gpio.c
+++ b/arch/mips/jz4740/gpio.c
@@ -270,7 +270,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask)
}
EXPORT_SYMBOL(jz_gpio_port_get_value);
-#define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f)
+#define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f)
static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq)
{
--
2.7.0
[toc] | [next] | [standalone]
| From | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Date | 2016-02-16 17:10 +0100 |
| Message-ID | <r2Qmo-1Is-43@gated-at.bofh.it> |
| In reply to | #1335568 |
On Tue, Feb 16, 2016 at 04:40:34PM +0100, Arnd Bergmann wrote:
> Date: Tue, 16 Feb 2016 16:40:34 +0100
> From: Arnd Bergmann <arnd@arndb.de>
> To: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann <arnd@arndb.de>,
> Russell King <rmk+kernel@arm.linux.org.uk>, Bjorn Helgaas
> <bhelgaas@google.com>, Alexandre Courbot <gnurou@gmail.com>,
> linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter
> Clausen <lars@metafoo.de>, Ralf Baechle <ralf@linux-mips.org>,
> linux-mips@linux-mips.org, "# v4 . 3+" <stable@vger.kernel.org>, Alban
> Bedel <albeu@free.fr>, Thomas Gleixner <tglx@linutronix.de>, Paul Burton
> <paul.burton@imgtec.com>
> Subject: [PATCH v2 1/5] MIPS: jz4740: remove broken irq_to_gpio() call
>
> gpiolib has removed the irq_to_gpio() API several years ago,
> but the global header still provided a non-working stub.
>
> With a MIPS-wide change to use the generic header file, the jz4740
> platform is now using the wrong stub implementation of irq_to_gpio(),
> which cannot work.
>
> This uses an open-coded implementation in the only line it
> is used in.
>
> Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: <stable@vger.kernel.org> # v4.3+
> Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h").
> ---
> arch/mips/jz4740/gpio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c
> index 8c6d76c9b2d6..d9907e57e9b9 100644
> --- a/arch/mips/jz4740/gpio.c
> +++ b/arch/mips/jz4740/gpio.c
> @@ -270,7 +270,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask)
> }
> EXPORT_SYMBOL(jz_gpio_port_get_value);
>
> -#define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f)
> +#define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f)
>
> static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq)
> {
I've already committed an identical fix locally.
Ralf
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-02-19 00:20 +0100 |
| Message-ID | <r3G1z-4rC-1@gated-at.bofh.it> |
| In reply to | #1335593 |
On Tue, Feb 16, 2016 at 5:06 PM, Ralf Baechle <ralf@linux-mips.org> wrote:
>> -#define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f)
>> +#define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f)
>>
>> static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq)
>> {
>
> I've already committed an identical fix locally.
>
> Ralf
I took that fix out of linux-next and applied to the GPIO tree so I can apply
the rest of the patches without build problems. If you keep it
around without changing it, git should cope I guess.
Yours,
Linus Walleij
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web