* [patch 0/2] spmi: Interrupt cleanups and API change preparation
@ 2015-07-13 20:52 Thomas Gleixner
2015-07-13 20:52 ` [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove Thomas Gleixner
2015-07-13 20:52 ` [patch 2/2] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
0 siblings, 2 replies; 7+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:52 UTC (permalink / raw)
To: LKML; +Cc: Greg Kroah-Hartman, Jiang Liu
The following patch series contains the following changes:
- Consolidation of chained interrupt handler setup/removal
- Switch to functions which avoid a redundant interrupt
descriptor lookup
- Preparation of interrupt flow handlers for the 'irq' argument
removal
The series has no dependencies and is also available as a git branch
for your convenience:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/sh
If you want me to carry the patches in the irq/core branch of tip,
please let me know.
Thanks,
tglx
^ permalink raw reply [flat|nested] 7+ messages in thread* [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove 2015-07-13 20:52 [patch 0/2] spmi: Interrupt cleanups and API change preparation Thomas Gleixner @ 2015-07-13 20:52 ` Thomas Gleixner 2015-07-27 16:00 ` [tip:irq/core] " tip-bot for Thomas Gleixner 2015-07-29 8:17 ` tip-bot for Thomas Gleixner 2015-07-13 20:52 ` [patch 2/2] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner 1 sibling, 2 replies; 7+ messages in thread From: Thomas Gleixner @ 2015-07-13 20:52 UTC (permalink / raw) To: LKML; +Cc: Greg Kroah-Hartman, Jiang Liu, Russell King, Julia Lawall [-- Attachment #1: spmi-pmic_arb-Consolidate-chained-IRQ-handler-instal.patch --] [-- Type: text/plain, Size: 1734 bytes --] Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/spmi/spmi-pmic-arb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) Index: tip/drivers/spmi/spmi-pmic-arb.c =================================================================== --- tip.orig/drivers/spmi/spmi-pmic-arb.c +++ tip/drivers/spmi/spmi-pmic-arb.c @@ -928,8 +928,7 @@ static int spmi_pmic_arb_probe(struct pl goto err_put_ctrl; } - irq_set_handler_data(pa->irq, pa); - irq_set_chained_handler(pa->irq, pmic_arb_chained_irq); + irq_set_chained_handler_and_data(pa->irq, pmic_arb_chained_irq, pa); err = spmi_controller_add(ctrl); if (err) @@ -938,8 +937,7 @@ static int spmi_pmic_arb_probe(struct pl return 0; err_domain_remove: - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); err_put_ctrl: spmi_controller_put(ctrl); @@ -951,8 +949,7 @@ static int spmi_pmic_arb_remove(struct p struct spmi_controller *ctrl = platform_get_drvdata(pdev); struct spmi_pmic_arb_dev *pa = spmi_controller_get_drvdata(ctrl); spmi_controller_remove(ctrl); - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); spmi_controller_put(ctrl); return 0; ^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip:irq/core] spmi/pmic_arb: Consolidate chained IRQ handler install/remove 2015-07-13 20:52 ` [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove Thomas Gleixner @ 2015-07-27 16:00 ` tip-bot for Thomas Gleixner 2015-07-29 8:17 ` tip-bot for Thomas Gleixner 1 sibling, 0 replies; 7+ messages in thread From: tip-bot for Thomas Gleixner @ 2015-07-27 16:00 UTC (permalink / raw) To: linux-tip-commits Cc: tglx, hpa, Julia.Lawall, jiang.liu, rmk+kernel, mingo, linux-kernel, gregkh Commit-ID: aab1b9ef7542e30f65116fe098ee36c5e522f7d1 Gitweb: http://git.kernel.org/tip/aab1b9ef7542e30f65116fe098ee36c5e522f7d1 Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Mon, 13 Jul 2015 20:52:24 +0000 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Mon, 27 Jul 2015 13:36:39 +0200 spmi/pmic_arb: Consolidate chained IRQ handler install/remove Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiang Liu <jiang.liu@linux.intel.com> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Link: http://lkml.kernel.org/r/20150713151750.831790045@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- drivers/spmi/spmi-pmic-arb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index d7119db..db2aac1 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -928,8 +928,7 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) goto err_put_ctrl; } - irq_set_handler_data(pa->irq, pa); - irq_set_chained_handler(pa->irq, pmic_arb_chained_irq); + irq_set_chained_handler_and_data(pa->irq, pmic_arb_chained_irq, pa); err = spmi_controller_add(ctrl); if (err) @@ -938,8 +937,7 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) return 0; err_domain_remove: - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); err_put_ctrl: spmi_controller_put(ctrl); @@ -951,8 +949,7 @@ static int spmi_pmic_arb_remove(struct platform_device *pdev) struct spmi_controller *ctrl = platform_get_drvdata(pdev); struct spmi_pmic_arb_dev *pa = spmi_controller_get_drvdata(ctrl); spmi_controller_remove(ctrl); - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); spmi_controller_put(ctrl); return 0; ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:irq/core] spmi/pmic_arb: Consolidate chained IRQ handler install/remove 2015-07-13 20:52 ` [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove Thomas Gleixner 2015-07-27 16:00 ` [tip:irq/core] " tip-bot for Thomas Gleixner @ 2015-07-29 8:17 ` tip-bot for Thomas Gleixner 1 sibling, 0 replies; 7+ messages in thread From: tip-bot for Thomas Gleixner @ 2015-07-29 8:17 UTC (permalink / raw) To: linux-tip-commits Cc: Julia.Lawall, tglx, linux-kernel, gregkh, hpa, jiang.liu, rmk+kernel, mingo Commit-ID: fb68ba6d0b06cf287e9081d60f705501c52124f6 Gitweb: http://git.kernel.org/tip/fb68ba6d0b06cf287e9081d60f705501c52124f6 Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Mon, 13 Jul 2015 20:52:24 +0000 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Wed, 29 Jul 2015 10:08:10 +0200 spmi/pmic_arb: Consolidate chained IRQ handler install/remove Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiang Liu <jiang.liu@linux.intel.com> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Link: http://lkml.kernel.org/r/20150713151750.831790045@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> --- drivers/spmi/spmi-pmic-arb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index d7119db..db2aac1 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -928,8 +928,7 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) goto err_put_ctrl; } - irq_set_handler_data(pa->irq, pa); - irq_set_chained_handler(pa->irq, pmic_arb_chained_irq); + irq_set_chained_handler_and_data(pa->irq, pmic_arb_chained_irq, pa); err = spmi_controller_add(ctrl); if (err) @@ -938,8 +937,7 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) return 0; err_domain_remove: - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); err_put_ctrl: spmi_controller_put(ctrl); @@ -951,8 +949,7 @@ static int spmi_pmic_arb_remove(struct platform_device *pdev) struct spmi_controller *ctrl = platform_get_drvdata(pdev); struct spmi_pmic_arb_dev *pa = spmi_controller_get_drvdata(ctrl); spmi_controller_remove(ctrl); - irq_set_chained_handler(pa->irq, NULL); - irq_set_handler_data(pa->irq, NULL); + irq_set_chained_handler_and_data(pa->irq, NULL, NULL); irq_domain_remove(pa->domain); spmi_controller_put(ctrl); return 0; ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [patch 2/2] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc 2015-07-13 20:52 [patch 0/2] spmi: Interrupt cleanups and API change preparation Thomas Gleixner 2015-07-13 20:52 ` [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove Thomas Gleixner @ 2015-07-13 20:52 ` Thomas Gleixner 2015-07-27 16:01 ` [tip:irq/core] " tip-bot for Jiang Liu 2015-07-29 8:18 ` tip-bot for Jiang Liu 1 sibling, 2 replies; 7+ messages in thread From: Thomas Gleixner @ 2015-07-13 20:52 UTC (permalink / raw) To: LKML; +Cc: Greg Kroah-Hartman, Jiang Liu [-- Attachment #1: spmi-Use-irq_desc_get_xxx-to-avoid-redundant-lookup-.patch --] [-- Type: text/plain, Size: 1069 bytes --] From: Jiang Liu <jiang.liu@linux.intel.com> Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- drivers/spmi/spmi-pmic-arb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: tip/drivers/spmi/spmi-pmic-arb.c =================================================================== --- tip.orig/drivers/spmi/spmi-pmic-arb.c +++ tip/drivers/spmi/spmi-pmic-arb.c @@ -453,8 +453,8 @@ static void periph_interrupt(struct spmi static void pmic_arb_chained_irq(unsigned int irq, struct irq_desc *desc) { - struct spmi_pmic_arb_dev *pa = irq_get_handler_data(irq); - struct irq_chip *chip = irq_get_chip(irq); + struct spmi_pmic_arb_dev *pa = irq_desc_get_handler_data(desc); + struct irq_chip *chip = irq_desc_get_chip(desc); void __iomem *intr = pa->intr; int first = pa->min_apid >> 5; int last = pa->max_apid >> 5; ^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip:irq/core] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc 2015-07-13 20:52 ` [patch 2/2] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner @ 2015-07-27 16:01 ` tip-bot for Jiang Liu 2015-07-29 8:18 ` tip-bot for Jiang Liu 1 sibling, 0 replies; 7+ messages in thread From: tip-bot for Jiang Liu @ 2015-07-27 16:01 UTC (permalink / raw) To: linux-tip-commits; +Cc: tglx, hpa, mingo, jiang.liu, linux-kernel, gregkh Commit-ID: 61947039b3185378e60002e2224b89bfd1fb0785 Gitweb: http://git.kernel.org/tip/61947039b3185378e60002e2224b89bfd1fb0785 Author: Jiang Liu <jiang.liu@linux.intel.com> AuthorDate: Mon, 13 Jul 2015 20:52:25 +0000 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Mon, 27 Jul 2015 13:36:39 +0200 spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: http://lkml.kernel.org/r/20150713151750.915477120@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- drivers/spmi/spmi-pmic-arb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index db2aac1..4839484 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -453,8 +453,8 @@ static void periph_interrupt(struct spmi_pmic_arb_dev *pa, u8 apid) static void pmic_arb_chained_irq(unsigned int irq, struct irq_desc *desc) { - struct spmi_pmic_arb_dev *pa = irq_get_handler_data(irq); - struct irq_chip *chip = irq_get_chip(irq); + struct spmi_pmic_arb_dev *pa = irq_desc_get_handler_data(desc); + struct irq_chip *chip = irq_desc_get_chip(desc); void __iomem *intr = pa->intr; int first = pa->min_apid >> 5; int last = pa->max_apid >> 5; ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [tip:irq/core] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc 2015-07-13 20:52 ` [patch 2/2] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner 2015-07-27 16:01 ` [tip:irq/core] " tip-bot for Jiang Liu @ 2015-07-29 8:18 ` tip-bot for Jiang Liu 1 sibling, 0 replies; 7+ messages in thread From: tip-bot for Jiang Liu @ 2015-07-29 8:18 UTC (permalink / raw) To: linux-tip-commits; +Cc: tglx, hpa, mingo, linux-kernel, jiang.liu, gregkh Commit-ID: 7fe88f3c00e7bfa44421681640fab3a9fadfef3b Gitweb: http://git.kernel.org/tip/7fe88f3c00e7bfa44421681640fab3a9fadfef3b Author: Jiang Liu <jiang.liu@linux.intel.com> AuthorDate: Mon, 13 Jul 2015 20:52:25 +0000 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Wed, 29 Jul 2015 10:08:10 +0200 spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: http://lkml.kernel.org/r/20150713151750.915477120@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> --- drivers/spmi/spmi-pmic-arb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index db2aac1..4839484 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -453,8 +453,8 @@ static void periph_interrupt(struct spmi_pmic_arb_dev *pa, u8 apid) static void pmic_arb_chained_irq(unsigned int irq, struct irq_desc *desc) { - struct spmi_pmic_arb_dev *pa = irq_get_handler_data(irq); - struct irq_chip *chip = irq_get_chip(irq); + struct spmi_pmic_arb_dev *pa = irq_desc_get_handler_data(desc); + struct irq_chip *chip = irq_desc_get_chip(desc); void __iomem *intr = pa->intr; int first = pa->min_apid >> 5; int last = pa->max_apid >> 5; ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-29 8:19 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-07-13 20:52 [patch 0/2] spmi: Interrupt cleanups and API change preparation Thomas Gleixner 2015-07-13 20:52 ` [patch 1/2] spmi/pmic_arb: Consolidate chained IRQ handler install/remove Thomas Gleixner 2015-07-27 16:00 ` [tip:irq/core] " tip-bot for Thomas Gleixner 2015-07-29 8:17 ` tip-bot for Thomas Gleixner 2015-07-13 20:52 ` [patch 2/2] spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner 2015-07-27 16:01 ` [tip:irq/core] " tip-bot for Jiang Liu 2015-07-29 8:18 ` tip-bot for Jiang Liu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox