Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34163025rwd; Sun, 9 Jul 2023 06:25:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHf8AQlHdRdSYFIIkOePs8Pa/xjfBhVvPze0OthigBYSrQ30zwAmlpasisLG5HQETUwo3hv X-Received: by 2002:a05:6a00:189b:b0:64d:46b2:9a58 with SMTP id x27-20020a056a00189b00b0064d46b29a58mr13687124pfh.26.1688909123879; Sun, 09 Jul 2023 06:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688909123; cv=none; d=google.com; s=arc-20160816; b=GwkUz9UwZdScV+33G3TIN6v9lPm++6HDDjHcskEZOqF4DFQvMminLBD1UnH1nj08jG J8n4dYZsYpykZWXHnJaqjFhfjKxr0ul2vSGKsLtLmhjF+mpSJPFF77PZaGY8UFtC69dM a7tQYxiOodzWORGj1ulFxA0sVrKwbomBlzWiEMuV/CEXuhPz2QCmKaV0+mwRt/eUr7s1 uIc2KpL8FrQ37T+e5IF2uwESEjlcnqQ4VNGioKpI1RYfOCyX9FWVxyIgalQ91ZHow0Zr 1nHk6AlESvDPVedscyBmDB9wyBpjAkSUL0PojaINDhy5qm3LxQbXHO9RCYQzP7UMabmi h0fQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay37-20020a056a00302500b00677a07fe4afsi7317517pfb.49.2023.07.09.06.25.05; Sun, 09 Jul 2023 06:25:23 -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 S229450AbjGINKb (ORCPT + 99 others); Sun, 9 Jul 2023 09:10:31 -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 ); 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 ; 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 ) 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 ) id 1qIUBE-003a1C-Cm; Sun, 09 Jul 2023 15:10:24 +0200 From: Geert Uytterhoeven To: Sergey Shtylyov , John Paul Adrian Glaubitz , Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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) -- 2.34.1