Received: by 10.223.185.116 with SMTP id b49csp2842807wrg; Mon, 5 Mar 2018 09:32:11 -0800 (PST) X-Google-Smtp-Source: AG47ELs+T+FxlPkXMIXsi0paB550oEIycTao/OB6KP8v5t75QC/PLR5U06h8MAFjCJcTmCh1cGxf X-Received: by 10.101.81.135 with SMTP id h7mr13085846pgq.121.1520271131401; Mon, 05 Mar 2018 09:32:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520271131; cv=none; d=google.com; s=arc-20160816; b=FiXCYiRrsZOtStRoT5bZ+lGJd5O8O/ARB/8fpwNo2NBoXquU2g4Ca8PQane9VWXQ3+ a3bXa6ytCRudl0Z3h6VOBblox3nNLyHy1Umyc5HUlI3x65JhSsKFvShte6hUFYGiWe7m uZJqSQEbzDMu9PNOTrm4ECOSA3OINj/iTpGpaaYvXJCO8KePW9RQsQ2baxO1ZYZKAlyL kfbR34ena0DfNj9TdHQUdMFBc98INhWF1tXZi8rHw25axitkcscqKq3ZdWowgh/vGh/v Dyt3+Ahuz0HYTZhW5X4vNbP9o0sl4UWfCQXLc0UPHVlOR8NvJyvUMRg5TCWFYA+7VO6N r0oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=OyzO5JYGvU0DXLCL4I4mYpbffJKqLUovWVRM7sYN0ow=; b=raZV4GXNTO/vsxmAB2BxDILrU1nOE/F8Hea+UGzMZ4920LyuFDUF89Mt2suJJ+S9nS jXkKiWDQHEMK6f6KeOsNbH3fR9SJFE0vZJ1j5jpQdXoA2+AKN47dDiCqt/fZEGmv5oB+ fCmHxn4j6nW/0D0hX3plMt+JW3pCJWP/DXnq6yoDQr4CwUe9X16HF70S/AZKnuJZI6el HvPLzpj5w83q2QRup6WWWE7eOa/CwFOx3xqspRAWCHiAaZoa8pXA8il+cQxIBFIskhVK GfS4OgNfUpTDrgCUfmVSl9ixjKfpLpqNqkGF7Kgy/VkX/ztFVOoir30149ojo6rDRy/o Y2Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@boundarydevices-com.20150623.gappssmtp.com header.s=20150623 header.b=Xx0VuIAS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13-v6si9483879plq.823.2018.03.05.09.31.56; Mon, 05 Mar 2018 09:32:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@boundarydevices-com.20150623.gappssmtp.com header.s=20150623 header.b=Xx0VuIAS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752480AbeCERa7 (ORCPT + 99 others); Mon, 5 Mar 2018 12:30:59 -0500 Received: from mail-oi0-f50.google.com ([209.85.218.50]:36881 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751838AbeCERa5 (ORCPT ); Mon, 5 Mar 2018 12:30:57 -0500 Received: by mail-oi0-f50.google.com with SMTP id f186so12651502oig.4 for ; Mon, 05 Mar 2018 09:30:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OyzO5JYGvU0DXLCL4I4mYpbffJKqLUovWVRM7sYN0ow=; b=Xx0VuIAST27Aawh3wQ5h/YN3va6I1fL0qUQwbMGX+0/I3ywlYttiYJE2VIMKj4UYNC 7yj/Ddb8Mj5PyobELej0n2tp26WXaksTwuLzhdxHO2EjTxE9pHONY2NtKibaK0xFN6FG IuDMF4wh4P8Xge8CwCpl67yiZs/XDrlDBLH50HUBd9FfIy296aSeS8lbIc3LUEWY2Q9u JwUY1pSvsR41a4upRpytuTiLDcun0viK6Ry6zrRU8UuCW3hjvxsOjgCOXkz0c3ikwvRJ QAkz+UfAWc/0wXFt5T/L4F9KxKDnPoV/JddZDRUWx1euuuiPuZWkTiclIId1FEd3zSUe 7vDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OyzO5JYGvU0DXLCL4I4mYpbffJKqLUovWVRM7sYN0ow=; b=hoMuSqTuvCrv5PPOdl1zsxgOFBC1Oq6VfEPQTkJhujp4n2TWSI9EOllGr/g8lvpvdk g67xYqOp5MghnEcppBnXoZwYFd2J1VcO+EwwYpA9QRYiN1fTh1ZYwmyI8nJXsXoxcgvd vIp99DMTF3VfCJhPopQaZlv7L6v8uv4/Qkkp7n8xEDSCQV1teV3XlxXotT+GYvt8i2+E LVkc0qE/AG4npWk3nxJqWHVTeRfcMjCKZofptPB9mOy6ljK36Ey3l72j9JLZiOvbuyfI bzOy7HBA+mdp4Rl5u5rqWwYOmAyzD5NXQo7eOHemKFTJa398AATKl3ykE7+26+cdZfkZ GC6A== X-Gm-Message-State: AElRT7GLDG57w8dE6ctu3HbEdO6lGt2R3tjD8TME13BkakPEVQbBrC/q JAbF3Wl5XGucsa3TCTCZa4ITq2Uw X-Received: by 10.202.81.150 with SMTP id f144mr10243823oib.7.1520271056259; Mon, 05 Mar 2018 09:30:56 -0800 (PST) Received: from [192.169.0.206] (wsip-98-189-142-135.oc.oc.cox.net. [98.189.142.135]) by smtp.googlemail.com with ESMTPSA id y17sm7405755oty.4.2018.03.05.09.30.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 09:30:55 -0800 (PST) Subject: Re: lost interrupts when running sabrelite images (v4.15+) in qemu To: Guenter Roeck Cc: Fugang Duan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180303163236.GA29514@roeck-us.net> <88917ab4-ade0-dcfc-e81a-eeaa8a4d15b8@boundarydevices.com> <2801dae5-1334-a127-d36c-244d35e71222@roeck-us.net> From: Troy Kisky Message-ID: <5c5ffdea-7702-c989-0fdb-60803c8e59ab@boundarydevices.com> Date: Mon, 5 Mar 2018 09:30:55 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/3/2018 1:12 PM, Guenter Roeck wrote: > On 03/03/2018 12:48 PM, Guenter Roeck wrote: >> On 03/03/2018 11:07 AM, Troy Kisky wrote: >>> On 3/3/2018 8:32 AM, Guenter Roeck wrote: >>>> Hi, >>>> >>>> since v4.15, I get the following runtime warning when running sabrelite images >>>> in qemu. >>>> >>>> irq 65: nobody cared (try booting with the "irqpoll" option) >>>> ... >>>> handlers: >>>> [<26292474>] fec_pps_interrupt >>>> Disabling IRQ #65 >>>> fec 2188000.ethernet (unnamed net_device) (uninitialized): MDIO read timeout >>>> >>>> Bisect points to commit 4ad1ceec05e491 ("net: fec: Let fec_ptp have its >>>> own interrupt routine"). Analysis shows that platform_irq_count() >>>> returns 2, which is reduced to 1 by fec_enet_get_irq_cnt(). >>>> If I let fec_enet_get_irq_cnt() return 2, the problem is gone. >>>> Reverting commit 4ad1ceec05e491 also fixes the problem. >>>> >>>> Bisect log is attached. >>>> >>> >>> Sounds like you found a bug with qemu. I just booted sabrelite over nfs fine. >>> My interrupts look like this. >>> >>> >>>   64:      98767          0          0          0     GIC-0 150 Level     2188000.ethernet >>>   65:          0          0          0          0     GIC-0 151 Level     2188000.ethernet >>> ___________ >>> Irq 65 is only for ptp interrrupts now. If qemu is signaling an tx/rx frame interrupt on 65, >>> then qemu is wrong. Of course, I've never used qemu so feel free to ignore me if I make no sense. >>> >> >> Thanks for checking with real hardware. >> >> This is what I see (with your patch reverted): >> >>   64:          0     GIC-0 150 Level     2188000.ethernet >>   65:         64     GIC-0 151 Level     2188000.ethernet >> >> Looking into the qemu source, I see: >> >> #define FSL_IMX6_ENET_MAC_1588_IRQ 118 >> #define FSL_IMX6_ENET_MAC_IRQ 119 >> >> FSL_IMX6_ENET_MAC_IRQ is then connected to fec interrupt index 0, and FSL_IMX6_ENET_MAC_1588_IRQ >> is connected to fec interrupt index 1. >> >> This may suggest that the defines are reversed. I'll see what happens if I swap them. >> > > Confirmed. If I swap the above defines, everything works fine. At the same time, > the modified qemu works with older kernels. > > Thanks a lot for the hint, and sorry for the noise. > > Guenter > It definitely was not noise. I bet it helps people searching the mailing list in the future. Thanks for posting the resolution. BR Troy