Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp156782imm; Wed, 12 Sep 2018 20:20:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYOtKfpxNPq4T4ogjiR3sdTb9/g7TudzK0A+VDBbFI4eOTupRKCbTpz4a4YCb9TxNKvyZ5V X-Received: by 2002:a63:7353:: with SMTP id d19-v6mr5038457pgn.281.1536808820665; Wed, 12 Sep 2018 20:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536808820; cv=none; d=google.com; s=arc-20160816; b=gkx1O6oYsPm0UzIAVbZUcVH2AQ1BoFgF3g61mnBvOvZ6pdH95VAXXTGN2CfiX0VfKg 2LIrnKhRLxJfYTyaG1mQ4GaFcC9e8AGtGllcfJ4mRTdABzTNFPH7kMJzYYWDPmbOplEt 6O9nTuPSpRDNFagwJ1mFOLM4obajl8ITW/NeViCmrp4jdY6cPiAcQxokRdzpfbBS4dUS 5YEPoh4LEl8crxyeSz0TqLXW/kXgpZs7T31kjNmjTWo7nmpS9R1CPAYmAKgjx+odGQD3 CepQkHV1ipuZEbiAQN+UZ0ceR2EpY2eGAKHLXJjikTSzTuSQ0qax/qkfWvfYpakomzP+ d4MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=34rlWTOciglKEJIjBm0wsSpABWZsyipcH6QGev2JNS8=; b=RBvL5a9/eaOLKKZG2czrml5uRWy3EiXlQnEQ+L2pHxeWF4Ps26IlNAN2c/wI4teXYe 9CFdQV2VbDkFGMPHu08UbqX3lM2R5iju79rQUWBlMJFJmsoppCeXKQInIv5DofMkns7t bkHGJqdgBvJl4e7IlS4UltvdLe2X/DpCsoYGwTTiSbON0EQ7B7qBr9zMmRi05uLoyK6w 9rM/1HSB2Z3+vzx9uPeN08A50hXSAAgvws92wFGyDN9E4RpQzmHG0x0fzcdoH7Mh8hl3 aCwhXss9GwEug1nu6l4eOSxHUAwuHPyoiR+kH9qoPt6dWdB6yf/rkjK86iY2TMfhjuNV 1tWA== ARC-Authentication-Results: i=1; mx.google.com; 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 i7-v6si2709448pgs.174.2018.09.12.20.20.05; Wed, 12 Sep 2018 20:20:20 -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; 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 S1726970AbeIMI13 (ORCPT + 99 others); Thu, 13 Sep 2018 04:27:29 -0400 Received: from guitar.tcltek.co.il ([192.115.133.116]:41632 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbeIMI13 (ORCPT ); Thu, 13 Sep 2018 04:27:29 -0400 Received: from tarshish (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id 2AB2A4402AF; Thu, 13 Sep 2018 06:19:55 +0300 (IDT) References: <61fdfd69-2bb6-478c-b0d5-69d8744adae3@cesnet.cz> <87zhwm4kl6.fsf@tkos.co.il> <20180912231050.GX30658@n2100.armlinux.org.uk> User-agent: mu4e 1.0; emacs 25.2.2 From: Baruch Siach To: Russell King - ARM Linux Cc: Jan =?utf-8?Q?Kundr=C3=A1t?= , 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" In-reply-to: <20180912231050.GX30658@n2100.armlinux.org.uk> Date: Thu, 13 Sep 2018 06:19:54 +0300 Message-ID: <87y3c63wyt.fsf@tkos.co.il> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Russell, Russell King - ARM Linux writes: > 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. That is the one. Enabling CONFIG_DEBUG_BUGVERBOSE shows: [ 1.481927] kernel BUG at lib/ioremap.c:72! [ 1.486118] Internal error: Oops - BUG: 0 [#1] SMP ARM [ 1.491269] CPU: 0 PID: 1246 Comm: kworker/0:2 Not tainted 4.19.0-rc3 #146 ... baruch > 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. -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -