Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30690581rwd; Thu, 6 Jul 2023 09:17:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlG6F8L6BgkmS3XXSceMs+/BpsKQgaUNVWNLg+Y/KQ5rawXko7dqVHFlYAMT7kl+Qe9SPk/e X-Received: by 2002:a17:90a:f412:b0:262:e629:f545 with SMTP id ch18-20020a17090af41200b00262e629f545mr1863150pjb.1.1688660266850; Thu, 06 Jul 2023 09:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688660266; cv=none; d=google.com; s=arc-20160816; b=mkJX/1biy0CPSy8wOxbRJjjmfsg+VrTZzybhhERPG1D/JAIK6txi6eHqK1OnF1wz9y 8ebJh5VDdEinhDN+1TKd2KbGjgNhOi8jWiRy9GQOEt4gbqRggLnweZ/XhrXjIntyYy3M 1OUdK7wQGRYAw5shLT1dhPpCXPydcdYmgXwyLYhSp7h04L9xSKJWdXbZBKag6DI4mFLC jtb+/jcOIcx2imt5F/xew5/VtVJNOEta+43r7Qe1sGaLBjLde57+jFLZA3TBdX/kYkd5 DAc/ntViJ7q0E4LUkqdge2QOkPZFB02dKEvGLVseqSI4Q6Ozv+Bt0njdLKahjUThO4/F xxcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:sender:dkim-signature; bh=XS3AYn/Urh4POCl4JCkwBluH3GYvtH7tWih91PK10Vc=; fh=LSy5RDcJ0ahxMCdGLjF/gXPpdUxdQcPQI8qeBNb12gI=; b=nZTwEkrdOPmNWdwsehrCdcnfm5w7xdoxOKjhy3VgYnjG+HNBzS0s9OKHEZJaqXo2Gd mFRPtHpwvTbPWYH1BJ9DCxtscmGIMvm0y4DwYK4EErbxr0cWWath3/yShQQHf9sSjKMY 3l3OUthz1op6jNZtzZv/7A/ZLGy58PwX2k+XkhtYe1HaFis3obn2iV5dSeVib2b3Vdr4 Zczi8l9EebHE38DcV3viDoeiQp9TQHdEm5PdVicT+Y7BanoAZBMc8rXOeOVU5Oskd0P1 kxpdiQoSfIx9nuLt+DvpBMAqEnjzeSQ2V7rIYFHoSRRkTJYILXghMKcmU3lGkE4dEaZF Azdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Bhn8+khT; 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 u35-20020a634563000000b0055ae207577csi1767591pgk.650.2023.07.06.09.17.26; Thu, 06 Jul 2023 09:17:46 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Bhn8+khT; 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 S232821AbjGFPwL (ORCPT + 99 others); Thu, 6 Jul 2023 11:52:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232807AbjGFPwI (ORCPT ); Thu, 6 Jul 2023 11:52:08 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2904C26A3; Thu, 6 Jul 2023 08:51:37 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-c2cf4e61bc6so1012419276.3; Thu, 06 Jul 2023 08:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688658692; x=1691250692; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=XS3AYn/Urh4POCl4JCkwBluH3GYvtH7tWih91PK10Vc=; b=Bhn8+khTIUcJ10Lj6P7mYeup7qsLYwY790fj3y8Bn0/NRq0LVyGl2YcbKac7iyuIvI ro+Xvl9IHdFiw5jKWuPyPvfWryrAOrKJ7UWhp4AOFoWgSDLqcst7yiekXg25USlzOrxI uTjGhWccGCPLkG03ZBExObekqy63JRDQVmqUi2qBhuxnMzpKXaM88lZZE3G2/ogEtfUS P2mBG12tX2iOuCgIA0TnbrLBRyN9J3uueVjoEMXS8ySGTcjJLVABJ/cgJ6iogQB4kOqE Ao8zlnexRuW7B+8bYDcNhFCRtytKOYDWrLRxv/Vlb9s+/ctr9fQAF/Pyimmd7UChNQcu s8Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688658692; x=1691250692; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XS3AYn/Urh4POCl4JCkwBluH3GYvtH7tWih91PK10Vc=; b=TA4ou8WYmqg/ZUSSj9rXIhOmnBaR/gmJqAz9PLCE1l2jM+hmq1LTtvJaxNlHb/otkI UVtZl5AdJYN3xdQHgXp+kagsaxaL/tKvlzuLr7tpPkWfgaljwpoDw3eFCL5UK+1aD5RI 3JfCUBjkUp5e56Tc44UGDLcrkK/uf+CLY6l754GEQbTP3ypQ9VV6nbJwBoMWlsTGgEJz KgFqIpjN2OBy3J4dXWLsogxHaidaIT4rNnW47i5Clz6vG4mKHxl6k6RM4QzLCFC8KipX Tqvd1YiSjYKSb+fKnYH2kuPtkMZwpRyWuOepSqF5Ty0xv5K67jMb5vdIj6yiWAyTrqPX nshg== X-Gm-Message-State: ABy/qLaxmT4/VnqL1FbhBOS5KbWlaQi0RdGBGsmVVlCAMmNpCA3HLfQj W99aPdqKxnhAnjsIQtOfxKk= X-Received: by 2002:a25:a106:0:b0:c4d:6a23:37a with SMTP id z6-20020a25a106000000b00c4d6a23037amr3379337ybh.32.1688658692430; Thu, 06 Jul 2023 08:51:32 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 205-20020a2506d6000000b00c5cac376dffsm400441ybg.22.2023.07.06.08.51.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jul 2023 08:51:32 -0700 (PDT) Sender: Guenter Roeck Message-ID: <7b7c8cfe-2bcf-8980-fe66-fe3efae03845@roeck-us.net> Date: Thu, 6 Jul 2023 08:51:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: John Paul Adrian Glaubitz , Sergey Shtylyov Cc: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org References: <544f02b696a0a1554efe63f799754f3e5fbfecdc.camel@physik.fu-berlin.de> From: Guenter Roeck Subject: Re: [PATCH] sh: Avoid using IRQ0 on SH3 and SH4 In-Reply-To: <544f02b696a0a1554efe63f799754f3e5fbfecdc.camel@physik.fu-berlin.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 On 7/6/23 07:01, John Paul Adrian Glaubitz wrote: > Hi Guenter! > > On Thu, 2023-07-06 at 06:57 -0700, Guenter Roeck wrote: >> On Thu, Jun 01, 2023 at 11:22:17PM +0300, Sergey Shtylyov wrote: >>> IRQ0 is no longer returned by platform_get_irq() and its ilk -- they now >>> return -EINVAL instead. However, the kernel code supporting SH3/4-based >>> SoCs still maps the IRQ #s starting at 0 -- modify that code to start the >>> IRQ #s from 16 instead. >>> >>> The patch should mostly affect the AP-SH4A-3A/AP-SH4AD-0A boards as they >>> indeed are using IRQ0 for the SMSC911x compatible Ethernet chip. >>> >> >> Unfortunately it also affects all sh4 emulations in qemu, and results in >> boot stalls with those. There isn't a relevant log to attach because there >> is no error message - booting just stalls until the emulation is aborted. >> >> Reverting this patch fixes the problem. >> >> Bisect log is attached for reference. Note that bisect requires applying >> commit 7497840d462c ("sh: Provide unxlate_dev_mem_ptr() in asm/io.h"), >> which is also the reason why the problem was not observed earlier since >> it was hiding behind a build failure. > > Interesting. My naive understanding was that IRQ0 is no longer usable in the > kernel as Sergey claimed. Was that not correct? > I have no idea. All I know is that all my sh4 qemu emulations hang during boot after this patch is applied. I don't have CONFIG_SMSC911X enabled in my builds. I also don't see any error messages from failed IRQ requests after reverting this patch. Guenter