All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "irqchip/mips-gic: Fix local interrupts" has been added to the 4.9-stable tree
@ 2018-04-25 16:01 ` gregkh
  0 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2018-04-25 16:01 UTC (permalink / raw)
  To: amit.pundir, gregkh, jason, linux-mips, marc.zyngier,
	marcin.nowakowski, paul.burton, tglx
  Cc: stable-commits


This is a note to let you know that I've just added the patch titled

    irqchip/mips-gic: Fix local interrupts

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     irqchip-mips-gic-fix-local-interrupts.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Patch "irqchip/mips-gic: Fix local interrupts" has been added to the 4.9-stable tree
@ 2018-04-25 16:01 ` gregkh
  0 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2018-04-25 16:01 UTC (permalink / raw)
  To: amit.pundir, gregkh, jason, linux-mips, marc.zyngier,
	marcin.nowakowski, paul.burton, tglx
  Cc: stable-commits


This is a note to let you know that I've just added the patch titled

    irqchip/mips-gic: Fix local interrupts

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     irqchip-mips-gic-fix-local-interrupts.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Patch "irqchip/mips-gic: Fix local interrupts" has been added to the 4.9-stable tree
  2018-04-25 16:01 ` gregkh
  (?)
@ 2018-04-26 10:05 ` Amit Pundir
  2018-04-26 12:57   ` Greg Kroah-Hartman
  -1 siblings, 1 reply; 5+ messages in thread
From: Amit Pundir @ 2018-04-26 10:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: jason, linux-mips, marc.zyngier, Marcin Nowakowski, Paul Burton,
	Thomas Gleixner, stable-commits

Hi Greg,

Please drop this patch. It was NACKed on stable before
https://www.spinics.net/lists/stable/msg170768.html. Thanks.

Regards,
Amit Pundir

On 25 April 2018 at 21:31,  <gregkh@linuxfoundation.org> wrote:
>
> This is a note to let you know that I've just added the patch titled
>
>     irqchip/mips-gic: Fix local interrupts
>
> to the 4.9-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
>      irqchip-mips-gic-fix-local-interrupts.patch
> and it can be found in the queue-4.9 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
>
>
> From 4cfffcfa5106492f5785924ce2e9af49f075999b Mon Sep 17 00:00:00 2001
> From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
> Date: Wed, 25 Jan 2017 15:08:25 +0100
> Subject: irqchip/mips-gic: Fix local interrupts
>
> From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
>
> commit 4cfffcfa5106492f5785924ce2e9af49f075999b upstream.
>
> Some local interrupts are not initialised properly at the moment and
> cannot be used since the domain's alloc method is never called for them.
>
> This has been observed earlier and partially fixed in commit
> e875bd66dfb ("irqchip/mips-gic: Fix local interrupts"), but that change
> still relied on the interrupt to be requested by an external driver (eg.
> drivers/clocksource/mips-gic-timer.c).
>
> This does however not solve the issue for interrupts that are not
> referenced by any driver through the device tree and results in
> request_irq() calls returning -ENOSYS. It can be observed when attempting
> to use perf tool to access hardware performance counters.
>
> Fix this by explicitly calling irq_create_fwspec_mapping() for local
> interrupts.
>
> Fixes: e875bd66dfb ("irqchip/mips-gic: Fix local interrupts")
> Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
> Cc: Paul Burton <paul.burton@imgtec.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: linux-mips@linux-mips.org
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Amit Pundir <amit.pundir@linaro.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> ---
>  drivers/irqchip/irq-mips-gic.c |   29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> --- a/drivers/irqchip/irq-mips-gic.c
> +++ b/drivers/irqchip/irq-mips-gic.c
> @@ -969,6 +969,34 @@ static struct irq_domain_ops gic_ipi_dom
>         .match = gic_ipi_domain_match,
>  };
>
> +static void __init gic_map_single_int(struct device_node *node,
> +                                     unsigned int irq)
> +{
> +       unsigned int linux_irq;
> +       struct irq_fwspec local_int_fwspec = {
> +               .fwnode         = &node->fwnode,
> +               .param_count    = 3,
> +               .param          = {
> +                       [0]     = GIC_LOCAL,
> +                       [1]     = irq,
> +                       [2]     = IRQ_TYPE_NONE,
> +               },
> +       };
> +
> +       if (!gic_local_irq_is_routable(irq))
> +               return;
> +
> +       linux_irq = irq_create_fwspec_mapping(&local_int_fwspec);
> +       WARN_ON(!linux_irq);
> +}
> +
> +static void __init gic_map_interrupts(struct device_node *node)
> +{
> +       gic_map_single_int(node, GIC_LOCAL_INT_TIMER);
> +       gic_map_single_int(node, GIC_LOCAL_INT_PERFCTR);
> +       gic_map_single_int(node, GIC_LOCAL_INT_FDC);
> +}
> +
>  static void __init __gic_init(unsigned long gic_base_addr,
>                               unsigned long gic_addrspace_size,
>                               unsigned int cpu_vec, unsigned int irqbase,
> @@ -1069,6 +1097,7 @@ static void __init __gic_init(unsigned l
>
>         bitmap_copy(ipi_available, ipi_resrv, GIC_MAX_INTRS);
>         gic_basic_init();
> +       gic_map_interrupts(node);
>  }
>
>  void __init gic_init(unsigned long gic_base_addr,
>
>
> Patches currently in stable-queue which might be from marcin.nowakowski@imgtec.com are
>
> queue-4.9/irqchip-mips-gic-fix-local-interrupts.patch
> queue-4.9/mips-fix-mem-x-y-commandline-processing.patch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Patch "irqchip/mips-gic: Fix local interrupts" has been added to the 4.9-stable tree
  2018-04-26 10:05 ` Amit Pundir
@ 2018-04-26 12:57   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-26 12:57 UTC (permalink / raw)
  To: Amit Pundir
  Cc: jason, linux-mips, marc.zyngier, Marcin Nowakowski, Paul Burton,
	Thomas Gleixner, stable-commits

On Thu, Apr 26, 2018 at 03:35:20PM +0530, Amit Pundir wrote:
> Hi Greg,
> 
> Please drop this patch. It was NACKed on stable before
> https://www.spinics.net/lists/stable/msg170768.html. Thanks.

Sorry about that, now dropped.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Patch "irqchip/mips-gic: Fix local interrupts" has been added to the 4.9-stable tree
@ 2017-05-09  9:41 gregkh
  0 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2017-05-09  9:41 UTC (permalink / raw)
  To: marcin.nowakowski, gregkh, jason, marc.zyngier, paul.burton, tglx
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    irqchip/mips-gic: Fix local interrupts

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     irqchip-mips-gic-fix-local-interrupts.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 4cfffcfa5106492f5785924ce2e9af49f075999b Mon Sep 17 00:00:00 2001
From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Date: Wed, 25 Jan 2017 15:08:25 +0100
Subject: irqchip/mips-gic: Fix local interrupts

From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>

commit 4cfffcfa5106492f5785924ce2e9af49f075999b upstream.

Some local interrupts are not initialised properly at the moment and
cannot be used since the domain's alloc method is never called for them.

This has been observed earlier and partially fixed in commit
e875bd66dfb ("irqchip/mips-gic: Fix local interrupts"), but that change
still relied on the interrupt to be requested by an external driver (eg.
drivers/clocksource/mips-gic-timer.c).

This does however not solve the issue for interrupts that are not
referenced by any driver through the device tree and results in
request_irq() calls returning -ENOSYS. It can be observed when attempting
to use perf tool to access hardware performance counters.

Fix this by explicitly calling irq_create_fwspec_mapping() for local
interrupts.

Fixes: e875bd66dfb ("irqchip/mips-gic: Fix local interrupts")
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-mips@linux-mips.org
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/irqchip/irq-mips-gic.c |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -968,6 +968,34 @@ static struct irq_domain_ops gic_ipi_dom
 	.match = gic_ipi_domain_match,
 };
 
+static void __init gic_map_single_int(struct device_node *node,
+				      unsigned int irq)
+{
+	unsigned int linux_irq;
+	struct irq_fwspec local_int_fwspec = {
+		.fwnode         = &node->fwnode,
+		.param_count    = 3,
+		.param          = {
+			[0]     = GIC_LOCAL,
+			[1]     = irq,
+			[2]     = IRQ_TYPE_NONE,
+		},
+	};
+
+	if (!gic_local_irq_is_routable(irq))
+		return;
+
+	linux_irq = irq_create_fwspec_mapping(&local_int_fwspec);
+	WARN_ON(!linux_irq);
+}
+
+static void __init gic_map_interrupts(struct device_node *node)
+{
+	gic_map_single_int(node, GIC_LOCAL_INT_TIMER);
+	gic_map_single_int(node, GIC_LOCAL_INT_PERFCTR);
+	gic_map_single_int(node, GIC_LOCAL_INT_FDC);
+}
+
 static void __init __gic_init(unsigned long gic_base_addr,
 			      unsigned long gic_addrspace_size,
 			      unsigned int cpu_vec, unsigned int irqbase,
@@ -1067,6 +1095,7 @@ static void __init __gic_init(unsigned l
 	}
 
 	gic_basic_init();
+	gic_map_interrupts(node);
 }
 
 void __init gic_init(unsigned long gic_base_addr,


Patches currently in stable-queue which might be from marcin.nowakowski@imgtec.com are

queue-4.9/irqchip-mips-gic-fix-local-interrupts.patch

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-26 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 16:01 Patch "irqchip/mips-gic: Fix local interrupts" has been added to the 4.9-stable tree gregkh
2018-04-25 16:01 ` gregkh
2018-04-26 10:05 ` Amit Pundir
2018-04-26 12:57   ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2017-05-09  9:41 gregkh

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.