From: tip-bot for Gerlando Falauto <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, moinejf@free.fr,
jgunthorpe@obsidianresearch.com, arnd@arndb.de,
Holger.Brunck@keymile.com, thomas.petazzoni@free-electrons.com,
kernel@wantstofly.org, linux@arm.linux.org.uk,
simon@sequanux.org, ezequiel.garcia@free-electrons.com,
tglx@linutronix.de, joravec@drewtech.com,
maxime.ripard@free-electrons.com, rob@landley.net,
nico@fluxnic.net, linux-kernel@vger.kernel.org,
ben-linux@fluff.org, hpa@zytor.com, grant.likely@linaro.org,
jason@lakedaemon.net, gerlando.falauto@keymile.com,
gregory.clement@free-electrons.com,
sebastian.hesselbarth@gmail.com, rob.herring@calxeda.com,
andrew@lunn.ch
Subject: [tip:irq/core] genirq: Generic chip: Handle separate mask registers
Date: Wed, 29 May 2013 02:17:16 -0700 [thread overview]
Message-ID: <tip-af80b0fed67261dcba2ce2406db1d553d07cbe75@git.kernel.org> (raw)
In-Reply-To: <20130506142539.152569748@linutronix.de>
Commit-ID: af80b0fed67261dcba2ce2406db1d553d07cbe75
Gitweb: http://git.kernel.org/tip/af80b0fed67261dcba2ce2406db1d553d07cbe75
Author: Gerlando Falauto <gerlando.falauto@keymile.com>
AuthorDate: Mon, 6 May 2013 14:30:21 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 29 May 2013 10:57:10 +0200
genirq: Generic chip: Handle separate mask registers
There are cases where all irq_chip_type instances have separate mask
registers, making a shared mask register cache unsuitable for the
purpose.
Introduce a new flag IRQ_GC_MASK_CACHE_PER_TYPE. If set, point the per
chip mask pointer to the per chip private mask cache instead.
[ tglx: Simplified code, renamed flag and massaged changelog ]
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Joey Oravec <joravec@drewtech.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Holger Brunck <Holger.Brunck@keymile.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Simon Guinot <simon@sequanux.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Rob Landley <rob@landley.net>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: http://lkml.kernel.org/r/20130506142539.152569748@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/irq.h | 2 ++
kernel/irq/generic-chip.c | 17 ++++++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 38709a3..7f1f015 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -704,10 +704,12 @@ struct irq_chip_generic {
* @IRQ_GC_INIT_NESTED_LOCK: Set the lock class of the irqs to nested for
* irq chips which need to call irq_set_wake() on
* the parent irq. Usually GPIO implementations
+ * @IRQ_GC_MASK_CACHE_PER_TYPE: Mask cache is chip type private
*/
enum irq_gc_flags {
IRQ_GC_INIT_MASK_CACHE = 1 << 0,
IRQ_GC_INIT_NESTED_LOCK = 1 << 1,
+ IRQ_GC_MASK_CACHE_PER_TYPE = 1 << 2,
};
/* Generic chip callback functions */
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 113d9eb..da2a941 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -241,18 +241,21 @@ void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk,
{
struct irq_chip_type *ct = gc->chip_types;
unsigned int i;
+ u32 *mskptr = &gc->mask_cache, mskreg = ct->regs.mask;
raw_spin_lock(&gc_lock);
list_add_tail(&gc->list, &gc_list);
raw_spin_unlock(&gc_lock);
- /* Init mask cache ? */
- if (flags & IRQ_GC_INIT_MASK_CACHE)
- gc->mask_cache = irq_reg_readl(gc->reg_base + ct->regs.mask);
-
- /* Initialize mask cache pointer */
- for (i = 0; i < gc->num_ct; i++)
- ct[i].mask_cache = &gc->mask_cache;
+ for (i = 0; i < gc->num_ct; i++) {
+ if (flags & IRQ_GC_MASK_CACHE_PER_TYPE) {
+ mskptr = &ct[i].mask_cache_priv;
+ mskreg = ct[i].regs.mask;
+ }
+ ct[i].mask_cache = mskptr;
+ if (flags & IRQ_GC_INIT_MASK_CACHE)
+ *mskptr = irq_reg_readl(gc->reg_base + mskreg);
+ }
for (i = gc->irq_base; msk; msk >>= 1, i++) {
if (!(msk & 0x01))
next prev parent reply other threads:[~2013-05-29 9:18 UTC|newest]
Thread overview: 177+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 18:25 [PATCH] irqchip: add support for Marvell Orion SoCs Sebastian Hesselbarth
2013-05-02 18:25 ` Sebastian Hesselbarth
2013-05-02 18:25 ` Sebastian Hesselbarth
2013-05-02 18:33 ` Sebastian Hesselbarth
2013-05-02 18:33 ` Sebastian Hesselbarth
2013-05-02 18:33 ` Sebastian Hesselbarth
2013-05-02 18:45 ` Russell King - ARM Linux
2013-05-02 18:45 ` Russell King - ARM Linux
2013-05-02 18:54 ` Sebastian Hesselbarth
2013-05-02 18:54 ` Sebastian Hesselbarth
2013-05-02 18:56 ` Russell King - ARM Linux
2013-05-02 18:56 ` Russell King - ARM Linux
2013-05-02 19:04 ` Sebastian Hesselbarth
2013-05-02 19:04 ` Sebastian Hesselbarth
2013-05-02 18:53 ` Jason Gunthorpe
2013-05-02 18:53 ` Jason Gunthorpe
2013-05-02 18:53 ` Jason Gunthorpe
2013-05-02 19:05 ` Sebastian Hesselbarth
2013-05-02 19:05 ` Sebastian Hesselbarth
2013-05-02 19:35 ` Jason Gunthorpe
2013-05-02 19:35 ` Jason Gunthorpe
2013-05-02 19:48 ` Sebastian Hesselbarth
2013-05-02 19:48 ` Sebastian Hesselbarth
2013-05-02 20:02 ` Andrew Lunn
2013-05-02 20:02 ` Andrew Lunn
2013-05-02 20:08 ` Gregory CLEMENT
2013-05-02 20:08 ` Gregory CLEMENT
2013-05-04 17:58 ` Jason Cooper
2013-05-04 17:58 ` Jason Cooper
2013-05-04 17:58 ` Jason Cooper
2013-05-02 19:11 ` Arnd Bergmann
2013-05-02 19:11 ` Arnd Bergmann
2013-05-02 19:34 ` Sebastian Hesselbarth
2013-05-02 19:34 ` Sebastian Hesselbarth
2013-05-02 19:37 ` Jason Gunthorpe
2013-05-02 19:37 ` Jason Gunthorpe
2013-05-02 19:39 ` Sebastian Hesselbarth
2013-05-02 19:39 ` Sebastian Hesselbarth
2013-05-02 19:22 ` Jason Cooper
2013-05-02 19:22 ` Jason Cooper
2013-05-02 19:22 ` Jason Cooper
2013-05-02 21:34 ` Thomas Gleixner
2013-05-02 21:34 ` Thomas Gleixner
2013-05-02 21:56 ` Sebastian Hesselbarth
2013-05-02 21:56 ` Sebastian Hesselbarth
2013-05-02 22:09 ` Arnd Bergmann
2013-05-02 22:09 ` Arnd Bergmann
2013-05-02 22:37 ` Sebastian Hesselbarth
2013-05-02 22:37 ` Sebastian Hesselbarth
2013-05-04 18:12 ` Jason Cooper
2013-05-04 18:12 ` Jason Cooper
2013-05-04 18:12 ` Jason Cooper
2013-05-02 23:48 ` [PATCH v2 0/5] ARM: orion: add orion irqchip driver Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-02 23:48 ` [PATCH v2 1/5] irqchip: add support for Marvell Orion SoCs Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-03 12:55 ` Russell King - ARM Linux
2013-05-03 12:55 ` Russell King - ARM Linux
2013-05-03 13:13 ` Sebastian Hesselbarth
2013-05-03 13:13 ` Sebastian Hesselbarth
2013-05-03 14:09 ` Thomas Gleixner
2013-05-03 14:09 ` Thomas Gleixner
2013-05-03 21:50 ` [RFC patch 0/8] genirq: Support for irq domains in generic irq chip Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` [RFC patch 1/8] genirq: generic chip: Remove the local cur_regs() function Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-27 13:38 ` Grant Likely
2013-05-27 13:38 ` Grant Likely
2013-05-03 21:50 ` [RFC patch 2/8] genirq: generic chip: Add support for per chip type mask cache Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` [RFC patch 3/8] genirq: generic chip: Handle separate mask registers Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` [RFC patch 4/8] genirq: generic chip: Cache per irq bit mask Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 22:24 ` Russell King - ARM Linux
2013-05-03 22:24 ` Russell King - ARM Linux
2013-05-03 22:39 ` Thomas Gleixner
2013-05-03 22:39 ` Thomas Gleixner
2013-05-03 21:50 ` [RFC patch 5/8] genirq: Add a mask calculation function Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 21:50 ` [RFC patch 6/8] genirq: Split out code in generic chip Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-27 13:45 ` Grant Likely
2013-05-27 13:45 ` Grant Likely
2013-05-03 21:50 ` [RFC patch 7/8] genirq: generic chip: Add linear irq domain support Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-03 22:23 ` Russell King - ARM Linux
2013-05-03 22:23 ` Russell King - ARM Linux
2013-05-03 22:38 ` Thomas Gleixner
2013-05-03 22:38 ` Thomas Gleixner
2013-05-04 2:30 ` Sebastian Hesselbarth
2013-05-04 2:30 ` Sebastian Hesselbarth
2013-05-04 8:04 ` Thomas Gleixner
2013-05-04 8:04 ` Thomas Gleixner
2013-05-06 12:32 ` [RFC patch 7/8] fixup 1/2: " Sebastian Hesselbarth
2013-05-06 12:32 ` Sebastian Hesselbarth
2013-05-06 12:32 ` [RFC patch 7/8] fixup 2/2: " Sebastian Hesselbarth
2013-05-06 12:32 ` Sebastian Hesselbarth
2013-05-06 13:31 ` Thomas Gleixner
2013-05-06 13:31 ` Thomas Gleixner
2013-05-06 13:25 ` [RFC patch 7/8] fixup 1/2: " Thomas Gleixner
2013-05-06 13:25 ` Thomas Gleixner
2013-05-03 21:50 ` [RFC patch 8/8] irqchip: sun4i: Convert to generic irq chip Thomas Gleixner
2013-05-03 21:50 ` Thomas Gleixner
2013-05-04 2:37 ` Sebastian Hesselbarth
2013-05-04 2:37 ` Sebastian Hesselbarth
2013-05-06 9:48 ` [RFC patch 0/8] genirq: Support for irq domains in " Uwe Kleine-König
2013-05-06 9:48 ` Uwe Kleine-König
2013-05-06 14:30 ` [patch 0/8] genirq: Support for irq domains in generic irq chip - V2 Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-06 14:30 ` [patch 1/8] genirq: generic chip: Remove the local cur_regs() function Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-29 9:14 ` [tip:irq/core] genirq: Generic " tip-bot for Gerlando Falauto
2013-05-06 14:30 ` [patch 2/8] genirq: generic chip: Add support for per chip type mask cache Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-29 9:16 ` [tip:irq/core] genirq: Generic " tip-bot for Gerlando Falauto
2013-05-06 14:30 ` [patch 3/8] genirq: generic chip: Handle separate mask registers Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-29 9:17 ` tip-bot for Gerlando Falauto [this message]
2013-05-06 14:30 ` [patch 4/8] genirq: generic chip: Cache per irq bit mask Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-29 9:18 ` [tip:irq/core] genirq: Generic " tip-bot for Thomas Gleixner
2013-05-06 14:30 ` [patch 5/8] genirq: Add a mask calculation function Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-29 9:19 ` [tip:irq/core] genirq: irqchip: " tip-bot for Thomas Gleixner
2013-05-06 14:30 ` [patch 6/8] genirq: Split out code in generic chip Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-29 9:21 ` [tip:irq/core] genirq: Generic chip: Split out code into separate functions tip-bot for Thomas Gleixner
2013-05-06 14:30 ` [patch 7/8] genirq: generic chip: Add linear irq domain support Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-29 2:22 ` Grant Likely
2013-05-29 2:22 ` Grant Likely
2013-05-29 8:23 ` Thomas Gleixner
2013-05-29 8:23 ` Thomas Gleixner
2013-05-29 9:22 ` [tip:irq/core] genirq: Generic " tip-bot for Thomas Gleixner
2013-05-06 14:30 ` [patch 8/8] irqchip: sun4i: Convert to generic irq chip Thomas Gleixner
2013-05-06 14:30 ` Thomas Gleixner
2013-05-06 15:18 ` Rob Herring
2013-05-06 15:18 ` Rob Herring
2013-05-12 14:05 ` [PATCH] irq-sun4i: Fix trivial build errors Maxime Ripard
2013-05-12 14:05 ` Maxime Ripard
2013-05-12 14:08 ` [patch 8/8] irqchip: sun4i: Convert to generic irq chip Maxime Ripard
2013-05-12 14:08 ` Maxime Ripard
2013-05-12 14:14 ` Maxime Ripard
2013-05-12 14:14 ` Maxime Ripard
2013-05-13 10:57 ` [patch 0/8] genirq: Support for irq domains in generic irq chip - V2 Gerlando Falauto
2013-05-13 12:01 ` Thomas Gleixner
2013-10-01 15:27 ` Gerlando Falauto
2013-10-01 15:27 ` Gerlando Falauto
2013-05-02 23:48 ` [PATCH v2 2/5] ARM: dove: add DT parsing for legacy mv643xx_eth Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-03 5:06 ` Andrew Lunn
2013-05-03 5:06 ` Andrew Lunn
2013-05-03 5:06 ` Andrew Lunn
2013-05-03 9:58 ` Sebastian Hesselbarth
2013-05-03 9:58 ` Sebastian Hesselbarth
2013-05-04 18:29 ` Jason Cooper
2013-05-04 18:29 ` Jason Cooper
2013-05-04 18:29 ` Jason Cooper
[not found] ` <20130504182935.GO31290-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2013-05-04 19:37 ` Florian Fainelli
2013-05-02 23:48 ` [PATCH v2 3/5] ARM: dove: add DT parsing for legacy timer Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-02 23:48 ` [PATCH v2 4/5] ARM: dove: move DT boards to orion irqchip driver Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
2013-05-02 23:48 ` [PATCH v2 5/5] ARM: dove: add DT nodes for irqchip conversion Sebastian Hesselbarth
2013-05-02 23:48 ` Sebastian Hesselbarth
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=tip-af80b0fed67261dcba2ce2406db1d553d07cbe75@git.kernel.org \
--to=tipbot@zytor.com \
--cc=Holger.Brunck@keymile.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=ben-linux@fluff.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=gerlando.falauto@keymile.com \
--cc=grant.likely@linaro.org \
--cc=gregory.clement@free-electrons.com \
--cc=hpa@zytor.com \
--cc=jason@lakedaemon.net \
--cc=jgunthorpe@obsidianresearch.com \
--cc=joravec@drewtech.com \
--cc=kernel@wantstofly.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=maxime.ripard@free-electrons.com \
--cc=mingo@kernel.org \
--cc=moinejf@free.fr \
--cc=nico@fluxnic.net \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=sebastian.hesselbarth@gmail.com \
--cc=simon@sequanux.org \
--cc=tglx@linutronix.de \
--cc=thomas.petazzoni@free-electrons.com \
/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.