[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1441513421-8092-2-git-send-email-yangyingliang@huawei.com>
Date: Sun, 6 Sep 2015 12:23:38 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
CC: Yang Yingliang <yangyingliang@...wei.com>,
Jiang Liu <jiang.liu@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Marc Zyngier" <marc.zyngier@....com>,
Mark Rutland <mark.rutland@....com>,
"Will Deacon" <will.deacon@....com>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Hanjun Guo <hanjun.guo@...aro.org>
Subject: [RFC PATCH v1 1/4] genirq: Introduce irq_settings_set_move_pcntxt() helper
It's expected to use the helper when interrupt can be moved
in process.
Cc: Jiang Liu <jiang.liu@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Will Deacon <will.deacon@....com>
Cc: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Hanjun Guo <hanjun.guo@...aro.org>
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
include/linux/irq.h | 1 +
kernel/irq/irqdesc.c | 12 ++++++++++++
kernel/irq/settings.h | 5 +++++
3 files changed, 18 insertions(+)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 6f8b340..f4ecfb9 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -514,6 +514,7 @@ static inline void irq_set_chip_and_handler(unsigned int irq, struct irq_chip *c
}
extern int irq_set_percpu_devid(unsigned int irq);
+extern int irq_set_move_pcntxt(unsigned int irq);
extern void
__irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 0a2a4b6..c036a1a 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -580,6 +580,18 @@ int irq_set_percpu_devid(unsigned int irq)
return 0;
}
+int irq_set_move_pcntxt(unsigned int irq)
+{
+ struct irq_desc *desc = irq_to_desc(irq);
+
+ if (!desc)
+ return -EINVAL;
+
+ irq_settings_set_move_pcntxt(desc);
+
+ return 0;
+}
+
void kstat_incr_irq_this_cpu(unsigned int irq)
{
kstat_incr_irqs_this_cpu(irq_to_desc(irq));
diff --git a/kernel/irq/settings.h b/kernel/irq/settings.h
index 3320b84..ea58bc2 100644
--- a/kernel/irq/settings.h
+++ b/kernel/irq/settings.h
@@ -135,6 +135,11 @@ static inline void irq_settings_set_noprobe(struct irq_desc *desc)
desc->status_use_accessors |= _IRQ_NOPROBE;
}
+static inline void irq_settings_set_move_pcntxt(struct irq_desc *desc)
+{
+ desc->status_use_accessors |= _IRQ_MOVE_PCNTXT;
+}
+
static inline bool irq_settings_can_move_pcntxt(struct irq_desc *desc)
{
return desc->status_use_accessors & _IRQ_MOVE_PCNTXT;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists