Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30518894rwd; Thu, 6 Jul 2023 07:06:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFaiN7hKrowv6ZKtNDHsK36TbXWR6IsYg6RhRnJ8AvPa1rzPnU8KuAmR8u1ESx8aCaQ+X+u X-Received: by 2002:a17:902:a411:b0:1b5:26d4:517d with SMTP id p17-20020a170902a41100b001b526d4517dmr1637150plq.29.1688652388955; Thu, 06 Jul 2023 07:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688652388; cv=none; d=google.com; s=arc-20160816; b=DU7C0r7GdUAUjw20Df1+jDdgUUH2kdfroFXCdytF/3RwqExoOLFgg1aka76Cgn+gJS sFYAiqUzCMb0iBO5fTn5muN17oHw9QmJR53Zf75u2Jbpez38ns//NEtLv2d0cpS93zAh B2nRAeL5zZJS2HiygoVDHD8qkhxSvJ0aDpk5QhBqOww1fw0ytgmGg4fjziQuvJDCijkg x8ggLQI6O5Z67Sa6V6AeBMk8/Mgd7ierZCrCxhx90D4UJTTwKJZcTQLuiC83EEEMZV6N fC8t2JY+FR5MfYA75H2kHcFhoKjStJUu/sZtbBJiGsDBbKJoIGwqez53g7+/I5UFcXJW 5Z0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=rKNYED9XyY5SwRKFYSR/HIiOOBN/fMIFJ6ZcCyCG9Z0=; fh=63EAzm6Yy8zy+fjAX8yH0OhWlMxPRN8ZvrgDk7CsXfo=; b=epaB12k2OYRkgvzzQAWOhXpz6DdEv4xpt/5ErfxDejPubnR1hwWuBOwzY5/XQCMQvY XmkcdCLEwjvPG/wSC2geK+PzQ5SFq7ee16RF2ig/D1kCvrj0KI8RhS3odB6SXQ1EUk3F uj0HAzEtGLEnG4De7557IYwfDbxx+zup/ergUVZAju1ge0zMmKuOTqdqK4UJC7Lw3qIF oehd2idsOMn0hCdmkIbnaroqFHTv0s/nljprX7imh6bGwpS7PoP6wwvRzd0527dtax0l RO3enn1wM6O4iGp1rsjB/enPlTjq7lUx2Pr9PXxKcC/tLDbGWm7cd7mZHocMOYMB+gB2 VnRg== 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 x18-20020a170902ec9200b001b8c6662081si987835plg.375.2023.07.06.07.06.13; Thu, 06 Jul 2023 07:06:28 -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 S232655AbjGFOCG convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Jul 2023 10:02:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232844AbjGFOCA (ORCPT ); Thu, 6 Jul 2023 10:02:00 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 092C61FC6; Thu, 6 Jul 2023 07:01:56 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qHPYI-000OJj-If; Thu, 06 Jul 2023 16:01:46 +0200 Received: from p57bd990e.dip0.t-ipconnect.de ([87.189.153.14] helo=[192.168.178.81]) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qHPYI-000JBU-BM; Thu, 06 Jul 2023 16:01:46 +0200 Message-ID: <544f02b696a0a1554efe63f799754f3e5fbfecdc.camel@physik.fu-berlin.de> Subject: Re: [PATCH] sh: Avoid using IRQ0 on SH3 and SH4 From: John Paul Adrian Glaubitz To: Guenter Roeck , Sergey Shtylyov Cc: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 06 Jul 2023 16:01:45 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.3 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 87.189.153.14 X-ZEDAT-Hint: PO X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, 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 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? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913