Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2070256pxb; Wed, 9 Feb 2022 10:13:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwt9V+0CISVumuFonHQ+RpMabIX54Iu/4l6FZ9EtEuwIYTV8CylDXDqHtmo0qcY4iTZL0Z0 X-Received: by 2002:a17:90b:4b88:: with SMTP id lr8mr4749367pjb.166.1644430438976; Wed, 09 Feb 2022 10:13:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644430438; cv=none; d=google.com; s=arc-20160816; b=svj+4aAlMLqujXpz8QOj/4OlJjCqTJpih5232LODoqQXQobfkr7PqsBQoAMaKLajFA R6BDylRbUmpCbVJuJ3yQg2Vlx+Ibkug2crT64Th4TJS0sRwwROlG9ENltcwsgfgUmtZC c4nG0o+waXQ9rdPio278GP3UQBmmOBx+gy5Y+Hif+fPgvGYmiefJuYYzwillvZJTV5xU swLubc8bcrhePBew5tn8jdbyPR+JcB56slLCobjPADAnlVn1D5Qr+IN7WSyfhOYcnlhh UPO+oanDLoKRooKK46UxOlALcbMXDJVLOb4rAI1n9EyoOsqzyJv2fdu+w1AxTjfdw4zt XNRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=tk3Alo7UZG0Ywzvj/gmsrVLB0AIShbp62ohIiKAxQIA=; b=TkjYJA2ncSJDirK/9EsPrOorLMTaW0LcoPc7X5Gu+g7i5oI21yFjZRqXZyT+sC7sb+ Cj5m2sUq5VnSpdbIPkHR6/MavduMe6XhTPcibp/LJLOVF7Kqwe3+vmeaIWL41zzYuAwH LfEvNqXcZlPjvY9kdmp//tyvfMuqyCEALIWcSBlxn1Hgdhz5sjoBTBAz4Gp6FxUtglh4 sOIt5jXlEdXAoUXG07JRfXSW+NkJ9vnA+2sk7WT7Gpz4CXg+W2dp5Zhe762kvHBkKEXQ 1nUmw1cSRQOwaU6qTidCY5vzLPNnws0NvxyBrRbt2YgOZMUpjp5oh+rptz1ErYAQ/f3v VhkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si17580245pfu.149.2022.02.09.10.13.45; Wed, 09 Feb 2022 10:13:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236458AbiBIQDH (ORCPT + 99 others); Wed, 9 Feb 2022 11:03:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236455AbiBIQDE (ORCPT ); Wed, 9 Feb 2022 11:03:04 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8995C05CB82 for ; Wed, 9 Feb 2022 08:03:05 -0800 (PST) Received: from mail-wm1-f44.google.com ([209.85.128.44]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MZCOl-1nmGTJ08sz-00VAKE; Wed, 09 Feb 2022 17:03:04 +0100 Received: by mail-wm1-f44.google.com with SMTP id j5-20020a05600c1c0500b0034d2e956aadso1934394wms.4; Wed, 09 Feb 2022 08:03:03 -0800 (PST) X-Gm-Message-State: AOAM530akN/TDGCXa5H0nGdasan9Ro+71bb/LQDY1pnVcYUhawDwHwb9 gq6rLjysbFb+UNGjvsAnhAHnYvcYyLQaK9OqEeg= X-Received: by 2002:a1c:f309:: with SMTP id q9mr3200865wmq.173.1644422583536; Wed, 09 Feb 2022 08:03:03 -0800 (PST) MIME-Version: 1.0 References: <20211218165258.16716-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20211218165258.16716-3-prabhakar.mahadev-lad.rj@bp.renesas.com> <042a2183-3f04-088c-1861-656de870337d@gmail.com> <7c47ce67-88ee-9cba-3356-a530b0d3e657@gmail.com> In-Reply-To: <7c47ce67-88ee-9cba-3356-a530b0d3e657@gmail.com> From: Arnd Bergmann Date: Wed, 9 Feb 2022 17:02:47 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] i2c: sh_mobile: Use platform_get_irq_optional() to get the interrupt To: Sergei Shtylyov Cc: Arnd Bergmann , Geert Uytterhoeven , Lad Prabhakar , Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list , Chris Brandt , Wolfram Sang , Linux I2C , linux-rpi-kernel , Linux ARM , Linux Kernel Mailing List , Linux-Renesas , Prabhakar , Linux-sh list Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:oOnrIzxPcdoamCYqgJO/oc+l7Sjc2zyhd85HLNkgXcpsHQkF/b5 RQh6FcYRuouqCm/fB4eenwPLcJvQbZTwxqZyA2xQ23XoSWQfp5eMgeAT9BO9Y7fiL2itSCJ i8k1NyxUoTjzMc7H8usXDRkXVBOPXWi53tNF5LopqmentlqSKiOr6vVxu9DM6CUoOdqOAUI eSQQ0eg3GmWVBtrz5tLYg== X-UI-Out-Filterresults: notjunk:1;V03:K0:y9HNKS2aIsc=:sf7z5ZBl7hPth9pwAT5VeT L9/Aq0bvqPBv6PUKl9OnsRFs1JNbUKfKCY8x88j5XLJITbSrC2nOM9zYxVHInzjj2BB6sHDfS So8+r37jxPhLAtUJp5oJ0oMbA/9007XIRZq6i9TWK9IPzZQOdq19hdF8vbBrnf5eUX0AzzIur Z7fK3iX/c3AY0Nt30rLthNQEELeHQL3FgzklpUlGRI6C5pEMzH2NYsW7LiJ206qM7VWPDKWBU J2UiVWzUxxdKM6QMEpOUnx8CqO7ilJE6NCP7Mf1cKL2PtH2HHsp4UTgLhT7OH8FkKlB83+Xlv HF6XR76NV8IaNDaMhfqyjltYmZYEz1ieeFHKmLlOYMtp0yGaC7+zyJwZrYX4rMbgYh0DMyTVk 15muLCo/tUhx4Cs84i7s2z1mmIXjs7ydxiesxeYtZs4NPhQnqJBGF30ng6MBN1BabCMMDLTgV OiQDjF601PkNRBBTejnuSIrjOM5aVjtH/FZR/XeVQVq6xyYC77UzC3NwVs/JaZewl7dxXSUr0 PG1R+JVwj7Ho2SVvNMRftyYdkEvpDKgai6PfoHOB3o2k1sLfmVw6vbMdd0zEvKcV8H0CBu2nl Ei4l8NUhUyoyAhtAdyqnVCstM5oNthrbkWH7QphbqMHtv5f8kTEl0Ig+bXEWN5leljhyN/FLe vzM9gkVEQyevgLsqG4UVwVXWMVl3B9VPuqEyaGklCBZ777Ki2Ka/L6wfdXEHgso9UcHZpW3lh Gr8e61uArRuPAKvD0Y23JSw93VVEULV5ZDQlFXVMiLSaXlBnBaq1ZPODp/GNE3kJjiqnSDr3l 2xpPwtM7TP364g00qjHF9Tbj4sVXs5lNQ3wKUuX8/4l9wfCQ/4= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Wed, Feb 9, 2022 at 4:48 PM Sergei Shtylyov wrote: > On 2/9/22 6:18 PM, Arnd Bergmann wrote: > >>> since 2009 after 1e1030dccb10 ("sh: nmi_debug support."). On a > >> > >> Mhm... this commit changes the SH3 code while SH778x are SH4A, no? > > > > This code is shared between both: > > > > arch/sh/kernel/cpu/sh4/Makefile:common-y += $(addprefix > > ../sh3/, entry.o ex.o) > > Ah, quite convoluted! :-) > So you mean thet broke the delivery of EVT 0x200 when mucking with NMI? Yes, exactly: If I read this right, the added code: + shlr2 r4 + shlr r4 + 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? + bt 10f gets the vector (0x200 for this device), shifts it five bits to 0x10, and subtracts 0x10, then branches to do_IRQ if the interrupt number is non-zero, otherwise it goes through the exception_handling_table. Arnd