Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5549305pxb; Mon, 14 Feb 2022 01:34:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzWrgit7Tva4ckHDJxvRDW6qtlMYeSmjhHEPbQuCJ8ovGUktvj0UApVCb7iEGmvzX4rE0w X-Received: by 2002:a17:906:2744:: with SMTP id a4mr10581636ejd.510.1644831291946; Mon, 14 Feb 2022 01:34:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644831291; cv=none; d=google.com; s=arc-20160816; b=fNirL4lNZ9m1w8lzhbq84qE/+TBMk8XirGZ/BNu4vFw4jQKCAkg3Pkh3pKSjtgdCBZ FwzfUgB/ocY4C86nTiIzoOInVvI00LoBNcPCetoxX4fFupD3RNEYErWIHeXGywlIrSq+ MnKylzjOD/Bqx/kcHyr6A6wJkETSOAHFAKjptjMaO4z/9U3rLcC94lWb47JgTyEd83K+ NZxLW0oZxnatHTn3uVpAoKlo5YjdU4R8StbvZAsa5Juzzsn2DxXrXZoLNn682Gb5sJRM SFnFB/3v8QydW/+z0rE8RKmu9FJtvbyM/yIu6zog/AIDbPYanAVacFmBBTmpecmvDFRU UtWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :references:cc:to:from:subject:dkim-filter; bh=MgdiY4M1u+6KLZfP0wFDyq7LeWxMoriajQi8FfvcEIs=; b=l+EkIBUB4OzBP3sq1Srji4dOitTtpPWiOcIHEUo8E+G23/NxQoy1yvXAAFwP9FKKVx 9WV7IazYhSfBIYVx9uOhoIrkx59gCOhSeK/bZLD2tyAFDCBhp42B3RyUuO6hwyRA+pR5 Wo55rpLblXNNY++URkpk1V+1Zhs+FIroEmkh8q6C9As79qQs97t2ycaM10dalMIF7NR2 vxS9Ev37HKrxP7QYVcOxgPRe95o2RtUkIm5qphNAHUBJvOA5iVHpiITpIngiFrA7iPSJ 03I1yAXSyhSv7olv5brq6Cr/B8lXIr35/qvFTGBQgY1Jf1txFQYqX0GjB7poqqjRsXYm sFCQ== 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 h24si731542edq.260.2022.02.14.01.34.29; Mon, 14 Feb 2022 01:34:51 -0800 (PST) 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 S1353215AbiBKU3B (ORCPT + 93 others); Fri, 11 Feb 2022 15:29:01 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239383AbiBKU3A (ORCPT ); Fri, 11 Feb 2022 15:29:00 -0500 Received: from mxout03.lancloud.ru (mxout03.lancloud.ru [45.84.86.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52EC7B4; Fri, 11 Feb 2022 12:28:58 -0800 (PST) Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru CEFB320A8A29 Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [PATCH] sh: avoid using IRQ0 on SH3/4 From: Sergey Shtylyov To: Rich Felker , , CC: Yoshinori Sato References: <2f419ed2-66b8-4098-7cd3-0fe698d341c9@omp.ru> Organization: Open Mobile Platform Message-ID: <63f06bf0-fc7b-3c5c-8af9-5adfd7628354@omp.ru> Date: Fri, 11 Feb 2022 23:28:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <2f419ed2-66b8-4098-7cd3-0fe698d341c9@omp.ru> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham 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 On 2/11/22 11:15 PM, Sergey Shtylyov wrote: > Using IRQ0 by the platform devices is going to be disallowed soon (see [1]) > and the code supporting SH3/4 SoCs maps the IRQ #s starting at 0 -- modify > that code to start the IRQ #s from 16 instead. > > [1] https://lore.kernel.org/all/5e001ec1-d3f1-bcb8-7f30-a6301fd9930c@omp.ru/ > > Signed-off-by: Sergey Shtylyov > > --- > The patch is against Linus Torvalds' 'linux.git' repo. > > arch/sh/kernel/cpu/sh3/entry.S | 4 ++-- > include/linux/sh_intc.h | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > Index: linux/arch/sh/kernel/cpu/sh3/entry.S > =================================================================== > --- linux.orig/arch/sh/kernel/cpu/sh3/entry.S > +++ linux/arch/sh/kernel/cpu/sh3/entry.S > @@ -470,9 +470,9 @@ ENTRY(handle_interrupt) > mov r4, r0 ! save vector->jmp table offset for later > > shlr2 r4 ! vector to IRQ# conversion > - add #-0x10, r4 > > - cmp/pz r4 ! is it a valid IRQ? > + mov #0x10, r5 > + cmp/ge r5, r4 ! is it a valid IRQ? Maybe I should've used cmp/hs... my 1st try at SH assembly! :-) [...] MBR, Sergey