Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6075327imm; Wed, 12 Sep 2018 16:12:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYY7TM4bBP9xb5EnpgFwqwU9wwXNaKIiUQBQUKrGIlp+JuCULWGWFchRTDzUoqW6YKKlpHK X-Received: by 2002:a63:8f17:: with SMTP id n23-v6mr2712722pgd.131.1536793937246; Wed, 12 Sep 2018 16:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536793937; cv=none; d=google.com; s=arc-20160816; b=WqLXx2VV4kbf9zZ/5bV3IZ1BDeqegE4LT2NvWazDqa5MKFdAhmurGzJNDGcYzq9fVu SN4TC+HyrIm58TtXELydIWGNJq5KlsbFmwqoTBgDXpm85MgzelEXuyeQ8Bpr0ApmvATE JdiYUWLLPgNcx4m17WhR9mW8yydc6uzX+Q7YZTNRRU2DHecM2YEoUCTIpuj6ujmB3h/b BxVRKFpAcd7cim7eCZDwbIn1JfNL2cy6h8ATfIp3YJQGuGC2GZcZIihrG6eHR0HnFUXZ OUH38/Q6Kf/BkQWKcPfX7vU4tjzaRNULxVIAnT8SriBboimrPPIu3yMGjOS3KX3ekkBd IXkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=T8MFBCyWOA2MdRkBMtquwyQsFmTJwzCLxVNIGji+piw=; b=1H2SPSy4jR6hL0PXZz+mI44cHEyFzrJDXR9EtCS2qtG4U18H9mNlqSVHKx3dJhTlGX gSGmr/G5zbQrc3ao2pyXUBJ2BKvKPomW5yNCpcgwmd0cbcsGC+Wb+FHm284i9ae7iKuJ 8T0UtbrbPJgFVDvmYr/dumEoI8ksJtYD/4rsJxOUK+nBnWdDasNBoay8MlBpyrwOmuHo 4cnu+yTR53Pt+TErJh37HMacCHtaLDM0tc7Vh2APGQ9jcwqyXBO/MYXmr8eVBSobrzFe 2Kj3i89aFXExRx4igc+2SjrZuraD53doK4O/lOo0zJ85LT8+/63hMYW7liAI5yVNvLdH LvgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@armlinux.org.uk header.s=pandora-2014 header.b="c46G/2mp"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11-v6si2331959pfk.81.2018.09.12.16.12.02; Wed, 12 Sep 2018 16:12:17 -0700 (PDT) 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=neutral (body hash did not verify) header.i=@armlinux.org.uk header.s=pandora-2014 header.b="c46G/2mp"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727670AbeIMERu (ORCPT + 99 others); Thu, 13 Sep 2018 00:17:50 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:57628 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbeIMERt (ORCPT ); Thu, 13 Sep 2018 00:17:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Zs9yXh4E72VTbWRc7k7YA9oLVP1vM34WmaYbsPLQbpc=; b=c46G/2mpBNPHveeGFZzQSHg7s bcHpEDu122D0EvTQnVpQKdCMirTKd66KKqUOKTm0STha61LCqYcVnY9tWbQw7E7QUorBEIMkxANq/ MK+wf++b5gTL/VO/JvGao1e6voiQmZtB+cC6DjOFJIQ5sCtmW35sAN6uhjhM4ieQeBWos=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:38876) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1g0EHf-0007F2-IO; Thu, 13 Sep 2018 00:10:55 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1g0EHc-0000sE-TL; Thu, 13 Sep 2018 00:10:52 +0100 Date: Thu, 13 Sep 2018 00:10:51 +0100 From: Russell King - ARM Linux To: Baruch Siach Cc: Jan =?iso-8859-1?Q?Kundr=E1t?= , Thomas Petazzoni , Lorenzo Pieralisi , Jason Cooper , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Subject: Re: [BISECTED] Regression: Solidrun Clearfog Base won't boot since "PCI: mvebu: Only remap I/O space if configured" Message-ID: <20180912231050.GX30658@n2100.armlinux.org.uk> References: <61fdfd69-2bb6-478c-b0d5-69d8744adae3@cesnet.cz> <87zhwm4kl6.fsf@tkos.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zhwm4kl6.fsf@tkos.co.il> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 12, 2018 at 09:49:41PM +0300, Baruch Siach wrote: > I reproduced the same Oops on Clearfog Base without any taint: > > [ 1.476401] Internal error: Oops - undefined instruction: 0 [#1] SMP ARM ... > [ 1.855954] Code: e2844004 e5972000 e3520000 0affffee (e7f001f2) That is a BUG(). Please turn on verbose bug reporting to get more information about the cause. There are two possibilities: BUG_ON(addr >= end); and BUG_ON(!pte_none(*pte)); It's probably the latter - the region is probably already mapped, that being the PCI IO region. The original driver was setup to call pci_ioremap_io() as the very last thing - and as the driver is non-removable, we were guaranteed to never tear down this mapping (which is sensible, it's published to userspace.) However, the current code calls pci_ioremap_io() much earlier, in a path where probe failures can occur. This breaks pci_ioremap_io()'s requirements - it must not be called more than once. So: ee1604381a37 ("PCI: mvebu: Only remap I/O space if configured") is basically incorrect - pci_ioremap_io() needs to move back to a place where it is only called in a path which will never fail. However, looking at the generic host bits, I'm not sure such a place exists in the new effort to make stuff more generic. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up According to speedtest.net: 13Mbps down 490kbps up