From patchwork Sun Jul 9 13:10:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 117507 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4451262vqx; Sun, 9 Jul 2023 06:41:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHAFa+Ms8LcqczdaHdiDYUzdpM28QporlSk2KWRPSsvpMitqm//2/7GWtsM0LSVNwHgoTGc X-Received: by 2002:adf:e34b:0:b0:314:3344:326b with SMTP id n11-20020adfe34b000000b003143344326bmr10445053wrj.71.1688910116808; Sun, 09 Jul 2023 06:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688910116; cv=none; d=google.com; s=arc-20160816; b=VqpnS4YGQOI3GJ0j5bc36uI++IpuB/pwFhlsaK+MvT2nPtm4jc/4ifd5CsKFb9bZ78 2fy+peSTwcM9zhRy6EYc/QAJMlTDpOG/9GBiWCTktyGh81xHxnzwFVOe6H82DgDN4dQU 5Aa90ByaHAUZfcAxYZ/K/ATf/9Gn6bAy26kVHYQaRQ8EggwLqZ373QgCufyMlKw39odu SA/gGxaYOFoJJZaDotrwogkFgjGfA/JDLaqrniVe7AwaqVD3MoYFV5E22162IisuN0rU p6gysMENX3oiTEnRPqXyTe7UHr1Rd4Go/9X3ubInp1/i2gCB7NQndLUpo8DXFPECfFTb h1YA== 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=6HTkOLziHRbpse27POvxzkw69tAj2waKOKKkkONE9AQ=; fh=RYtDMKSzaVfGFR7MRxRXaJg+V6vgfAHrRlcFTX/NTDs=; b=AuISdqjdqLdmqOGw8Aoto/D8UUuZfE/xWHREB4aMIpScG8IqiTNrhZbN9RKKoksnEq F//IpLVJCixBaIhorr3J0/01L0SUuP56mnfhhprDOYxTB0PoDPh+YL7O+2hGrX1k6SSt raiiPpHiK0bKPthFQugWygITruziPP0jNjv7LVj/7370hvmbHtzJnqhc5bHXyX/c+otI fCOMb9ZnkuvjDF7paltRNd+/JaZ8g5FtQ9DWZ1gbtEBspNkOLSQFQJYU6OvBcrIrQxCy eGlgClmVstH8abM2KsdEN5EtVFqQXxS3v0oHSaPWEd3wJktqLKlm7NzIRKKOZdRWTyMH WkWw== 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 b11-20020aa7cd0b000000b0051d9246f95csi6202998edw.174.2023.07.09.06.41.33; Sun, 09 Jul 2023 06:41:56 -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 S231185AbjGINKx (ORCPT + 99 others); Sun, 9 Jul 2023 09:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231207AbjGINKw (ORCPT ); Sun, 9 Jul 2023 09:10:52 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64F08198 for ; Sun, 9 Jul 2023 06:10:47 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5bb:109a:ec27:6093]) by laurent.telenet-ops.be with bizsmtp id K1Al2A0031ycx4f011AlM6; Sun, 09 Jul 2023 15:10:45 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qIUBT-000xGz-PE; Sun, 09 Jul 2023 15:10:45 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qIUBZ-003a2j-40; Sun, 09 Jul 2023 15:10:45 +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: dreamcast: Handle virq offset in cascaded IRQ demux Date: Sun, 9 Jul 2023 15:10:43 +0200 Message-Id: <7d0cb246c9f1cd24bb1f637ec5cb67e799a4c3b8.1688908227.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770950614662791169?= X-GMAIL-MSGID: =?utf-8?q?1770950614662791169?= 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 Reviewed-by: John Paul Adrian Glaubitz --- 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: