Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2681110imm; Thu, 16 Aug 2018 13:46:55 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyhjM8FHz/dzIVUjBzwfAXraXtqATGf9EugOYWd9ycVhSNGv6BKdg/etAjl7LIfRUJ0pk1V X-Received: by 2002:a62:404e:: with SMTP id n75-v6mr33663784pfa.232.1534452415580; Thu, 16 Aug 2018 13:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534452415; cv=none; d=google.com; s=arc-20160816; b=nn2UqtBBFtaHuRVL7evRPeSiVJo3Q7Gq106C7X8WMS2BZV0b9SlR+z5Cf9NVQAzosR pg+oi7OvaajVB3MkVx4cGkzcIGNsaF8sVtF9/YZDR4AtEbQCJ/tjX2sglPJ+OUy0JP5x Qqrz1hJ4pDcQNZR7RyRpdq6zvBBGPH8ZvadlioCFuIRjSwaYn9QFpZjAUbcGp7NT8Vu8 w81UvP6kym0AVaEtY72MkQP4eF+pn8kjTdu8xhhhIo6SZtKoBnlw8//SStO48vSudrnQ sMGq6PxzNQg1IPesAEY1yY511NEWB2CVUZFCyhHW9IbJ6oTuI3IaE3OV2g+24KWyUE+z WQhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=4q9j4JtV67AQL0n/M1QbotjxDQcFVJ+6Jg4RkxnpAlk=; b=DxwA4kknTbg1jEBU8hBBip3DZlAYXEHBHmVxDbHajqa+QKwK3CzK781I2gz/IAtxUq /mOmlQfbotHk4uqTIJN8s2peCWAWbDOk+8YtGnmhnG3ktS75M4IQThKCJ4wbM5jVHtLt A0ec0nG9TuZjZlea+i/bv0lTsQDodBWUmJlanVZjIW1J1OeCkhaPkuFf7dTb/jP4Q6v+ JSgbevNy4cMgbcJy5ftJtMXMBLHbFRr7mBSH5P0xjA+3rF0jg9Cku0iakzYxUvvKeFtr 838EwGRzu5fpW0P+k0GaIBVWfCTKojC6Qn9jFp71RHSSa6oRCCEFbB0tWNlhZhxmZpuA URbQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o188-v6si231734pfo.236.2018.08.16.13.46.40; Thu, 16 Aug 2018 13:46:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbeHPXps (ORCPT + 99 others); Thu, 16 Aug 2018 19:45:48 -0400 Received: from mga01.intel.com ([192.55.52.88]:28061 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725888AbeHPXpr (ORCPT ); Thu, 16 Aug 2018 19:45:47 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2018 13:45:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,248,1531810800"; d="scan'208";a="66771492" Received: from agluck-desk.sc.intel.com (HELO agluck-desk) ([10.3.52.160]) by orsmga006.jf.intel.com with ESMTP; 16 Aug 2018 13:45:10 -0700 Date: Thu, 16 Aug 2018 13:45:07 -0700 From: "Luck, Tony" To: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, Jayachandran C , Sinan Kaya , Tomasz Nowicki , Lorenzo Pieralisi , Arnd Bergmann , Boris Brezillon , Miquel Raynal Subject: how to fix acpi_pci_root_remap_iospace? Message-ID: <20180816204506.GA21144@agluck-desk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bjorn, Back in commit: 0a70abb38062 ("PCI/ACPI: Support I/O resources when parsing host bridge resources") we added acpi_pci_root_remap_iospace(). On ia64 this was a no-op because ia64 didn't define PCI_IOBASE, so the entire body of the function was skipped. But in the current merge window commit: 0bbf47eab469 ("ia64: use asm-generic/io.h") ended up defining PCI_IOBASE for us, and now we die horribly in early boot with: kernel BUG at lib/ioremap.c:72! Is PCI_IOBASE the right thing to check for to decide whether acpi_pci_root_remap_iospace() needs to do anything? The ugly fix would be: diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 7433035ded95..de06377de13b 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -741,7 +741,7 @@ static void acpi_pci_root_validate_resources(struct device *dev, static void acpi_pci_root_remap_iospace(struct fwnode_handle *fwnode, struct resource_entry *entry) { -#ifdef PCI_IOBASE +#if defined(PCI_IOBASE) && !defined(CONFIG_IA64) struct resource *res = entry->res; resource_size_t cpu_addr = res->start; resource_size_t pci_addr = cpu_addr - entry->offset; or we can do some other juggling with defines to get the same outcome. -Tony