LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RFC] sh: dreamcast: Handle virq offset in cascaded IRQ demux
@ 2023-07-09 13:10 Geert Uytterhoeven
  2023-07-12  5:17 ` John Paul Adrian Glaubitz
  2023-07-13  6:56 ` John Paul Adrian Glaubitz
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-07-09 13:10 UTC (permalink / raw
  To: Sergey Shtylyov, John Paul Adrian Glaubitz, Yoshinori Sato,
	Rich Felker
  Cc: linux-sh, linux-kernel, Geert Uytterhoeven

Take into account the virq offset when translating cascaded interrupts.

Fixes: a8ac2961148e8c72 ("sh: Avoid using IRQ0 on SH3 and SH4")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
 arch/sh/boards/mach-dreamcast/irq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c
index cc06e4cdb4cdf9b7..4e5fb59481a26747 100644
--- a/arch/sh/boards/mach-dreamcast/irq.c
+++ b/arch/sh/boards/mach-dreamcast/irq.c
@@ -108,13 +108,13 @@ int systemasic_irq_demux(int irq)
 	__u32 j, bit;
 
 	switch (irq) {
-	case 13:
+	case 16 + 13:
 		level = 0;
 		break;
-	case 11:
+	case 16 + 11:
 		level = 1;
 		break;
-	case  9:
+	case 16 + 9:
 		level = 2;
 		break;
 	default:
-- 
2.34.1


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

* Re: [PATCH] [RFC] sh: dreamcast: Handle virq offset in cascaded IRQ demux
  2023-07-09 13:10 [PATCH] [RFC] sh: dreamcast: Handle virq offset in cascaded IRQ demux Geert Uytterhoeven
@ 2023-07-12  5:17 ` John Paul Adrian Glaubitz
  2023-07-13  6:56 ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 3+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-12  5:17 UTC (permalink / raw
  To: Geert Uytterhoeven, Sergey Shtylyov, Yoshinori Sato, Rich Felker
  Cc: linux-sh, linux-kernel

On Sun, 2023-07-09 at 15:10 +0200, Geert Uytterhoeven wrote:
> Take into account the virq offset when translating cascaded interrupts.
> 
> Fixes: a8ac2961148e8c72 ("sh: Avoid using IRQ0 on SH3 and SH4")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
>  arch/sh/boards/mach-dreamcast/irq.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c
> index cc06e4cdb4cdf9b7..4e5fb59481a26747 100644
> --- a/arch/sh/boards/mach-dreamcast/irq.c
> +++ b/arch/sh/boards/mach-dreamcast/irq.c
> @@ -108,13 +108,13 @@ int systemasic_irq_demux(int irq)
>  	__u32 j, bit;
>  
>  	switch (irq) {
> -	case 13:
> +	case 16 + 13:
>  		level = 0;
>  		break;
> -	case 11:
> +	case 16 + 11:
>  		level = 1;
>  		break;
> -	case  9:
> +	case 16 + 9:
>  		level = 2;
>  		break;
>  	default:

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH] [RFC] sh: dreamcast: Handle virq offset in cascaded IRQ demux
  2023-07-09 13:10 [PATCH] [RFC] sh: dreamcast: Handle virq offset in cascaded IRQ demux Geert Uytterhoeven
  2023-07-12  5:17 ` John Paul Adrian Glaubitz
@ 2023-07-13  6:56 ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 3+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-07-13  6:56 UTC (permalink / raw
  To: Geert Uytterhoeven, Sergey Shtylyov, Yoshinori Sato, Rich Felker
  Cc: linux-sh, linux-kernel

On Sun, 2023-07-09 at 15:10 +0200, Geert Uytterhoeven wrote:
> Take into account the virq offset when translating cascaded interrupts.
> 
> Fixes: a8ac2961148e8c72 ("sh: Avoid using IRQ0 on SH3 and SH4")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Compile-tested only.
> ---
>  arch/sh/boards/mach-dreamcast/irq.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c
> index cc06e4cdb4cdf9b7..4e5fb59481a26747 100644
> --- a/arch/sh/boards/mach-dreamcast/irq.c
> +++ b/arch/sh/boards/mach-dreamcast/irq.c
> @@ -108,13 +108,13 @@ int systemasic_irq_demux(int irq)
>  	__u32 j, bit;
>  
>  	switch (irq) {
> -	case 13:
> +	case 16 + 13:
>  		level = 0;
>  		break;
> -	case 11:
> +	case 16 + 11:
>  		level = 1;
>  		break;
> -	case  9:
> +	case 16 + 9:
>  		level = 2;
>  		break;
>  	default:

Applied to my for-linus branch.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

end of thread, other threads:[~2023-07-13  6:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-09 13:10 [PATCH] [RFC] sh: dreamcast: Handle virq offset in cascaded IRQ demux Geert Uytterhoeven
2023-07-12  5:17 ` John Paul Adrian Glaubitz
2023-07-13  6:56 ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).