Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1394516
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jon Hunter <jonathanh@nvidia.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH V3 01/17] irqchip/gic: Don't unnecessarily write the IRQ configuration |
| Date | Wed, 04 May 2016 18:30:02 +0200 |
| Message-ID | <rv7Qu-7ql-33@gated-at.bofh.it> (permalink) |
| References | <rv7Qt-7ql-3@gated-at.bofh.it> |
| X-PGP-Universal | processed; by hqnvupgp07.nvidia.com on Wed, 04 May 2016 09:24:45 -0700 |
| X-Mailer | git-send-email 2.1.4 |
| X-Nvconfidentiality | public |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 35 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Kevin Hilman <khilman@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Grygorii Strashko <grygorii.strashko@ti.com>, Lars-Peter Clausen <lars@metafoo.de>, Linus Walleij <linus.walleij@linaro.org>, <linux-tegra@vger.kernel.org>, <linux-omap@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Jon Hunter <jonathanh@nvidia.com> |
| X-Original-Date | Wed, 4 May 2016 17:25:14 +0100 |
| X-Original-Message-ID | <1462379130-11742-2-git-send-email-jonathanh@nvidia.com> |
| X-Original-References | <1462379130-11742-1-git-send-email-jonathanh@nvidia.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1394516 |
Show key headers only | View raw
If the interrupt configuration matches the current configuration, then don't bother writing the configuration again. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> --- drivers/irqchip/irq-gic-common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c index f174ce0ca361..ffff5a45f1e3 100644 --- a/drivers/irqchip/irq-gic-common.c +++ b/drivers/irqchip/irq-gic-common.c @@ -50,13 +50,17 @@ int gic_configure_irq(unsigned int irq, unsigned int type, else if (type & IRQ_TYPE_EDGE_BOTH) val |= confmask; + /* If the current configuration is the same, then we are done */ + if (val == oldval) + return 0; + /* * Write back the new configuration, and possibly re-enable - * the interrupt. If we tried to write a new configuration and failed, + * the interrupt. If we fail to write a new configuration, * return an error. */ writel_relaxed(val, base + GIC_DIST_CONFIG + confoff); - if (readl_relaxed(base + GIC_DIST_CONFIG + confoff) != val && val != oldval) + if (readl_relaxed(base + GIC_DIST_CONFIG + confoff) != val) ret = -EINVAL; if (sync_access) -- 2.1.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH V3 01/17] irqchip/gic: Don't unnecessarily write the IRQ configuration Jon Hunter <jonathanh@nvidia.com> - 2016-05-04 18:30 +0200
csiph-web