From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] irqchip: orion: clear bridge cause register on init
Date: Fri, 24 Jan 2014 18:41:37 -0300 [thread overview]
Message-ID: <20140124211528.GA14012@localhost> (raw)
In-Reply-To: <1390516686-2224-2-git-send-email-sebastian.hesselbarth@gmail.com>
On Thu, Jan 23, 2014 at 11:38:04PM +0100, Sebastian Hesselbarth wrote:
> It is good practice to mask and clear pending irqs on init. We already
> mask all irqs, so also clear the bridge irq cause register.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Gregory Clement <gregory.clement@free-electrons.com>
> Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> ---
> drivers/irqchip/irq-orion.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
> index e51d40031884..4137c3d15284 100644
> --- a/drivers/irqchip/irq-orion.c
> +++ b/drivers/irqchip/irq-orion.c
> @@ -180,8 +180,9 @@ static int __init orion_bridge_irq_init(struct device_node *np,
> gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
> gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
>
> - /* mask all interrupts */
> + /* mask and clear all interrupts */
> writel(0, gc->reg_base + ORION_BRIDGE_IRQ_MASK);
> + writel(0, gc->reg_base + ORION_BRIDGE_IRQ_CAUSE);
>
This looks a bit bogus to me, now that we are clearing the cause upon
irq_startup(). Don't have a strong opinion, it's just that I fail to see
why we'd want or need this change...
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@free-electrons.com>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] irqchip: orion: clear bridge cause register on init
Date: Fri, 24 Jan 2014 18:41:37 -0300 [thread overview]
Message-ID: <20140124211528.GA14012@localhost> (raw)
In-Reply-To: <1390516686-2224-2-git-send-email-sebastian.hesselbarth@gmail.com>
On Thu, Jan 23, 2014 at 11:38:04PM +0100, Sebastian Hesselbarth wrote:
> It is good practice to mask and clear pending irqs on init. We already
> mask all irqs, so also clear the bridge irq cause register.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Gregory Clement <gregory.clement@free-electrons.com>
> Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/irqchip/irq-orion.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
> index e51d40031884..4137c3d15284 100644
> --- a/drivers/irqchip/irq-orion.c
> +++ b/drivers/irqchip/irq-orion.c
> @@ -180,8 +180,9 @@ static int __init orion_bridge_irq_init(struct device_node *np,
> gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
> gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
>
> - /* mask all interrupts */
> + /* mask and clear all interrupts */
> writel(0, gc->reg_base + ORION_BRIDGE_IRQ_MASK);
> + writel(0, gc->reg_base + ORION_BRIDGE_IRQ_CAUSE);
>
This looks a bit bogus to me, now that we are clearing the cause upon
irq_startup(). Don't have a strong opinion, it's just that I fail to see
why we'd want or need this change...
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-01-24 21:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 22:38 [PATCH 0/3] irqchip: orion: bridge irq fixes for v3.14-rc1 Sebastian Hesselbarth
2014-01-23 22:38 ` Sebastian Hesselbarth
2014-01-23 22:38 ` [PATCH 1/3] irqchip: orion: clear bridge cause register on init Sebastian Hesselbarth
2014-01-23 22:38 ` Sebastian Hesselbarth
2014-01-24 21:41 ` Ezequiel Garcia [this message]
2014-01-24 21:41 ` Ezequiel Garcia
2014-01-23 22:38 ` [PATCH 2/3] irqchip: orion: use handle_edge_irq on bridge irqs Sebastian Hesselbarth
2014-01-23 22:38 ` Sebastian Hesselbarth
2014-01-23 22:38 ` [PATCH 3/3] irqchip: orion: clear stale interrupts in irq_enable Sebastian Hesselbarth
2014-01-23 22:38 ` Sebastian Hesselbarth
2014-01-23 22:52 ` Jason Gunthorpe
2014-01-23 22:52 ` Jason Gunthorpe
2014-01-23 23:05 ` Sebastian Hesselbarth
2014-01-23 23:05 ` Sebastian Hesselbarth
2014-01-24 10:55 ` Russell King - ARM Linux
2014-01-24 10:55 ` Russell King - ARM Linux
2014-01-23 23:10 ` [PATCH v2 3/3] irqchip: orion: clear stale interrupts in irq_startup Sebastian Hesselbarth
2014-01-23 23:10 ` Sebastian Hesselbarth
2014-02-05 4:54 ` [PATCH 0/3] irqchip: orion: bridge irq fixes for v3.14-rc1 Jason Cooper
2014-02-05 4:54 ` Jason Cooper
2014-02-06 17:10 ` Ezequiel Garcia
2014-02-06 17:10 ` Ezequiel Garcia
2014-02-06 18:05 ` Jason Cooper
2014-02-06 18:05 ` Jason Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140124211528.GA14012@localhost \
--to=ezequiel.garcia@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.