Message ID | 4fcb0d08a2b372431c41e04312742dc9e41e1be4.1688908186.git.geert+renesas@glider.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4452211vqx; Sun, 9 Jul 2023 06:44:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlGDfg5KDJQxqO7RUJi0m3VAOUb8f5TbOcswma6j4hJQm0VbLHuJeR34eGB0I3N/Uva1B0jS X-Received: by 2002:a17:906:100e:b0:993:e2ba:a7b0 with SMTP id 14-20020a170906100e00b00993e2baa7b0mr4910494ejm.24.1688910243516; Sun, 09 Jul 2023 06:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688910243; cv=none; d=google.com; s=arc-20160816; b=azmJs5oJOC6H+oeJft/OMgPKWYjVDynUZIuy1mZIZ98ZYoK5SrFOQrP7UtwHxn2DgE zTk1k+P1Hl2PxP3SejGzsCtMpDZe9cYast+/zEfvYt9TyMSd9IvCxxtUMwgvvV9AXgfa eeHZPyZNqqClz+U7tyu5Q3ZUjgCkndQAOtb5kk6xNu83CSaH1EDpJRlzXF4ugdAlfUxn F1UtAFq5kF+SZsLaB+SLQXRaSl1zbQDMfFn6QIe3YIRLCdI1XokbYoyqN20MxVOJa7tR VhTTV6/mRdtC69t1VKtDRWXxBr7s650S8f0HQEgceyQegOJ5q65sl93CY28DEVh9TQ7O syow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6gS60aEgQ9GL4d2m9hHkoTPcQCJbyodPh49A75NqSjs=; fh=RYtDMKSzaVfGFR7MRxRXaJg+V6vgfAHrRlcFTX/NTDs=; b=YbmS02nm2Oc4nPBa/s5QTNIV+ZmjhwHQocMaR7dNtfSYXRUTX1utVNpI1mSOzE1YyB vJeiHHmgzMN9XxwJR9aE186KbS8En/l+oKx4SubaMoj5qKQ6PefIQVBo1ZD4BFJShszx sT9Jtwt3A/7IEgobiOi9y78dnau+3cRrEzvNAlywV/Rixx8vKwshu3kHQEQntweSvx/Y 4ho9BLRSiPfFjnkSoa3OkUmWeBDqKGc1eiMKukX6Ryv2QFaGEJUjPvK+wBJqIrFi1OgQ DzSL0bfaVuc4W9x5DsUGhG9sNxayPlJ+hWCG9gsYo99dEe5tYyPiHvGEPea+itfVRWLo Feyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a170906118b00b00993116b01f9si5842373eja.120.2023.07.09.06.43.40; Sun, 09 Jul 2023 06:44:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjGINKc (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Sun, 9 Jul 2023 09:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbjGINK3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 9 Jul 2023 09:10:29 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB5181AB for <linux-kernel@vger.kernel.org>; Sun, 9 Jul 2023 06:10:27 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5bb:109a:ec27:6093]) by albert.telenet-ops.be with bizsmtp id K1AQ2A0051ycx4f061AQW7; Sun, 09 Jul 2023 15:10:25 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qIUB9-000xGt-3T; Sun, 09 Jul 2023 15:10:24 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qIUBE-003a1C-Cm; Sun, 09 Jul 2023 15:10:24 +0200 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Sergey Shtylyov <s.shtylyov@omp.ru>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org> Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH] [RFC] sh: highlander: Handle virq offset in cascaded IRL demux Date: Sun, 9 Jul 2023 15:10:23 +0200 Message-Id: <4fcb0d08a2b372431c41e04312742dc9e41e1be4.1688908186.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770950747381096704?= X-GMAIL-MSGID: =?utf-8?q?1770950747381096704?= |
Series |
[RFC] sh: highlander: Handle virq offset in cascaded IRL demux
|
|
Commit Message
Geert Uytterhoeven
July 9, 2023, 1:10 p.m. UTC
Take into account the virq offset when translating cascaded IRL
interrupts.
Fixes: a8ac2961148e8c72 ("sh: Avoid using IRQ0 on SH3 and SH4")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only, but the fix is identical to the fix for rts7751r2d.
---
arch/sh/boards/mach-highlander/setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Sun, 2023-07-09 at 15:10 +0200, Geert Uytterhoeven wrote: > Take into account the virq offset when translating cascaded IRL > interrupts. > > Fixes: a8ac2961148e8c72 ("sh: Avoid using IRQ0 on SH3 and SH4") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > Compile-tested only, but the fix is identical to the fix for rts7751r2d. > --- > arch/sh/boards/mach-highlander/setup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c > index 533393d779c2b97f..a821a1b155473d93 100644 > --- a/arch/sh/boards/mach-highlander/setup.c > +++ b/arch/sh/boards/mach-highlander/setup.c > @@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL]; > > static int highlander_irq_demux(int irq) > { > - if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq]) > + if (irq >= 16 + HL_NR_IRL || irq < 16 || !irl2irq[irq - 16]) > return irq; > > - return irl2irq[irq]; > + return irl2irq[irq - 16]; > } > > static void __init highlander_init_irq(void) Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
On Sun, 2023-07-09 at 15:10 +0200, Geert Uytterhoeven wrote: > Take into account the virq offset when translating cascaded IRL > interrupts. > > Fixes: a8ac2961148e8c72 ("sh: Avoid using IRQ0 on SH3 and SH4") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > Compile-tested only, but the fix is identical to the fix for rts7751r2d. > --- > arch/sh/boards/mach-highlander/setup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c > index 533393d779c2b97f..a821a1b155473d93 100644 > --- a/arch/sh/boards/mach-highlander/setup.c > +++ b/arch/sh/boards/mach-highlander/setup.c > @@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL]; > > static int highlander_irq_demux(int irq) > { > - if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq]) > + if (irq >= 16 + HL_NR_IRL || irq < 16 || !irl2irq[irq - 16]) > return irq; > > - return irl2irq[irq]; > + return irl2irq[irq - 16]; > } > > static void __init highlander_init_irq(void) Applied to my for-linus branch. Thanks, Adrian
On Sun, 2023-07-09 at 15:10 +0200, Geert Uytterhoeven wrote: > Take into account the virq offset when translating cascaded IRL > interrupts. > > Fixes: a8ac2961148e8c72 ("sh: Avoid using IRQ0 on SH3 and SH4") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > Compile-tested only, but the fix is identical to the fix for rts7751r2d. > --- > arch/sh/boards/mach-highlander/setup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c > index 533393d779c2b97f..a821a1b155473d93 100644 > --- a/arch/sh/boards/mach-highlander/setup.c > +++ b/arch/sh/boards/mach-highlander/setup.c > @@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL]; > > static int highlander_irq_demux(int irq) > { > - if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq]) > + if (irq >= 16 + HL_NR_IRL || irq < 16 || !irl2irq[irq - 16]) > return irq; > > - return irl2irq[irq]; > + return irl2irq[irq - 16]; > } > > static void __init highlander_init_irq(void) Applied to my for-linus branch. Thanks, Adrian
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index 533393d779c2b97f..a821a1b155473d93 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c @@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL]; static int highlander_irq_demux(int irq) { - if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq]) + if (irq >= 16 + HL_NR_IRL || irq < 16 || !irl2irq[irq - 16]) return irq; - return irl2irq[irq]; + return irl2irq[irq - 16]; } static void __init highlander_init_irq(void)