All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] MIPS: Loongson-3: Fix BRIDGE irq delivery problem" failed to apply to 4.19-stable tree
@ 2018-11-11  2:00 gregkh
  2018-11-12  2:55 ` Huacai Chen
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2018-11-11  2:00 UTC (permalink / raw)
  To: chenhc, chenhuacai, jhogan, paul.burton, ralf, wuzhangjin, zhangfx; +Cc: stable


The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From 360fe725f8849aaddc53475fef5d4a0c439b05ae Mon Sep 17 00:00:00 2001
From: Huacai Chen <chenhc@lemote.com>
Date: Wed, 5 Sep 2018 17:33:09 +0800
Subject: [PATCH] MIPS: Loongson-3: Fix BRIDGE irq delivery problem

After commit e509bd7da149dc349160 ("genirq: Allow migration of chained
interrupts by installing default action") Loongson-3 fails at here:

setup_irq(LOONGSON_HT1_IRQ, &cascade_irqaction);

This is because both chained_action and cascade_irqaction don't have
IRQF_SHARED flag. This will cause Loongson-3 resume fails because HPET
timer interrupt can't be delivered during S3. So we set the irqchip of
the chained irq to loongson_irq_chip which doesn't disable the chained
irq in CP0.Status.

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20434/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: Huacai Chen <chenhuacai@gmail.com>

diff --git a/arch/mips/include/asm/mach-loongson64/irq.h b/arch/mips/include/asm/mach-loongson64/irq.h
index 3644b68c0ccc..be9f727a9328 100644
--- a/arch/mips/include/asm/mach-loongson64/irq.h
+++ b/arch/mips/include/asm/mach-loongson64/irq.h
@@ -10,7 +10,7 @@
 #define MIPS_CPU_IRQ_BASE 56
 
 #define LOONGSON_UART_IRQ   (MIPS_CPU_IRQ_BASE + 2) /* UART */
-#define LOONGSON_HT1_IRQ    (MIPS_CPU_IRQ_BASE + 3) /* HT1 */
+#define LOONGSON_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 3) /* CASCADE */
 #define LOONGSON_TIMER_IRQ  (MIPS_CPU_IRQ_BASE + 7) /* CPU Timer */
 
 #define LOONGSON_HT1_CFG_BASE		loongson_sysconf.ht_control_base
diff --git a/arch/mips/loongson64/loongson-3/irq.c b/arch/mips/loongson64/loongson-3/irq.c
index 2e115ab66a00..5605061f5f98 100644
--- a/arch/mips/loongson64/loongson-3/irq.c
+++ b/arch/mips/loongson64/loongson-3/irq.c
@@ -96,12 +96,6 @@ void mach_irq_dispatch(unsigned int pending)
 	}
 }
 
-static struct irqaction cascade_irqaction = {
-	.handler = no_action,
-	.flags = IRQF_NO_SUSPEND,
-	.name = "cascade",
-};
-
 static inline void mask_loongson_irq(struct irq_data *d) { }
 static inline void unmask_loongson_irq(struct irq_data *d) { }
 
@@ -147,11 +141,10 @@ void __init mach_init_irq(void)
 
 	irq_set_chip_and_handler(LOONGSON_UART_IRQ,
 			&loongson_irq_chip, handle_percpu_irq);
+	irq_set_chip_and_handler(LOONGSON_BRIDGE_IRQ,
+			&loongson_irq_chip, handle_percpu_irq);
 
-	/* setup HT1 irq */
-	setup_irq(LOONGSON_HT1_IRQ, &cascade_irqaction);
-
-	set_c0_status(STATUSF_IP2 | STATUSF_IP6);
+	set_c0_status(STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP6);
 }
 
 #ifdef CONFIG_HOTPLUG_CPU

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

* Re: FAILED: patch "[PATCH] MIPS: Loongson-3: Fix BRIDGE irq delivery problem" failed to apply to 4.19-stable tree
  2018-11-11  2:00 FAILED: patch "[PATCH] MIPS: Loongson-3: Fix BRIDGE irq delivery problem" failed to apply to 4.19-stable tree gregkh
@ 2018-11-12  2:55 ` Huacai Chen
  2018-11-17 15:15   ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Huacai Chen @ 2018-11-12  2:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: James Hogan, Paul Burton, Ralf Baechle, wu zhangjin, zhangfx, stable

Hi, Greg, this patche depend on another patch which I have forgotten
to add a Cc: stable line.
Commit d06f8a2f1befb5a3d0aa660ab1c05e9b74445 ("MIPS: Loongson-3: Fix
CPU UART irq delivery problem").

Huacai

On Sun, Nov 11, 2018 at 11:27 AM <gregkh@linuxfoundation.org> wrote:
>
>
> The patch below does not apply to the 4.19-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> From 360fe725f8849aaddc53475fef5d4a0c439b05ae Mon Sep 17 00:00:00 2001
> From: Huacai Chen <chenhc@lemote.com>
> Date: Wed, 5 Sep 2018 17:33:09 +0800
> Subject: [PATCH] MIPS: Loongson-3: Fix BRIDGE irq delivery problem
>
> After commit e509bd7da149dc349160 ("genirq: Allow migration of chained
> interrupts by installing default action") Loongson-3 fails at here:
>
> setup_irq(LOONGSON_HT1_IRQ, &cascade_irqaction);
>
> This is because both chained_action and cascade_irqaction don't have
> IRQF_SHARED flag. This will cause Loongson-3 resume fails because HPET
> timer interrupt can't be delivered during S3. So we set the irqchip of
> the chained irq to loongson_irq_chip which doesn't disable the chained
> irq in CP0.Status.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> Signed-off-by: Paul Burton <paul.burton@mips.com>
> Patchwork: https://patchwork.linux-mips.org/patch/20434/
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: James Hogan <jhogan@kernel.org>
> Cc: linux-mips@linux-mips.org
> Cc: Fuxin Zhang <zhangfx@lemote.com>
> Cc: Zhangjin Wu <wuzhangjin@gmail.com>
> Cc: Huacai Chen <chenhuacai@gmail.com>
>
> diff --git a/arch/mips/include/asm/mach-loongson64/irq.h b/arch/mips/include/asm/mach-loongson64/irq.h
> index 3644b68c0ccc..be9f727a9328 100644
> --- a/arch/mips/include/asm/mach-loongson64/irq.h
> +++ b/arch/mips/include/asm/mach-loongson64/irq.h
> @@ -10,7 +10,7 @@
>  #define MIPS_CPU_IRQ_BASE 56
>
>  #define LOONGSON_UART_IRQ   (MIPS_CPU_IRQ_BASE + 2) /* UART */
> -#define LOONGSON_HT1_IRQ    (MIPS_CPU_IRQ_BASE + 3) /* HT1 */
> +#define LOONGSON_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 3) /* CASCADE */
>  #define LOONGSON_TIMER_IRQ  (MIPS_CPU_IRQ_BASE + 7) /* CPU Timer */
>
>  #define LOONGSON_HT1_CFG_BASE          loongson_sysconf.ht_control_base
> diff --git a/arch/mips/loongson64/loongson-3/irq.c b/arch/mips/loongson64/loongson-3/irq.c
> index 2e115ab66a00..5605061f5f98 100644
> --- a/arch/mips/loongson64/loongson-3/irq.c
> +++ b/arch/mips/loongson64/loongson-3/irq.c
> @@ -96,12 +96,6 @@ void mach_irq_dispatch(unsigned int pending)
>         }
>  }
>
> -static struct irqaction cascade_irqaction = {
> -       .handler = no_action,
> -       .flags = IRQF_NO_SUSPEND,
> -       .name = "cascade",
> -};
> -
>  static inline void mask_loongson_irq(struct irq_data *d) { }
>  static inline void unmask_loongson_irq(struct irq_data *d) { }
>
> @@ -147,11 +141,10 @@ void __init mach_init_irq(void)
>
>         irq_set_chip_and_handler(LOONGSON_UART_IRQ,
>                         &loongson_irq_chip, handle_percpu_irq);
> +       irq_set_chip_and_handler(LOONGSON_BRIDGE_IRQ,
> +                       &loongson_irq_chip, handle_percpu_irq);
>
> -       /* setup HT1 irq */
> -       setup_irq(LOONGSON_HT1_IRQ, &cascade_irqaction);
> -
> -       set_c0_status(STATUSF_IP2 | STATUSF_IP6);
> +       set_c0_status(STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP6);
>  }
>
>  #ifdef CONFIG_HOTPLUG_CPU
>

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

* Re: FAILED: patch "[PATCH] MIPS: Loongson-3: Fix BRIDGE irq delivery problem" failed to apply to 4.19-stable tree
  2018-11-12  2:55 ` Huacai Chen
@ 2018-11-17 15:15   ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2018-11-17 15:15 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Greg Kroah-Hartman, James Hogan, Paul Burton, Ralf Baechle,
	wu zhangjin, zhangfx, stable

On Mon, Nov 12, 2018 at 10:55:47AM +0800, Huacai Chen wrote:
>Hi, Greg, this patche depend on another patch which I have forgotten
>to add a Cc: stable line.
>Commit d06f8a2f1befb5a3d0aa660ab1c05e9b74445 ("MIPS: Loongson-3: Fix
>CPU UART irq delivery problem").

Queued both patches to the 4.4, 4.9, 4.14, 4.18 and 4.19 stable trees.
It looks like there are more dependencies required for 3.18. Thank you.

--
Thanks,
Sasha

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

end of thread, other threads:[~2018-11-18  1:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-11  2:00 FAILED: patch "[PATCH] MIPS: Loongson-3: Fix BRIDGE irq delivery problem" failed to apply to 4.19-stable tree gregkh
2018-11-12  2:55 ` Huacai Chen
2018-11-17 15:15   ` Sasha Levin

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.