From patchwork Tue Jun 16 16:55:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 6619091 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B7C069F40A for ; Tue, 16 Jun 2015 16:56:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B8328207D0 for ; Tue, 16 Jun 2015 16:56:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6245207EB for ; Tue, 16 Jun 2015 16:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756251AbbFPQ4L (ORCPT ); Tue, 16 Jun 2015 12:56:11 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:36562 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332AbbFPQzw (ORCPT ); Tue, 16 Jun 2015 12:55:52 -0400 Received: by igbiq7 with SMTP id iq7so47472230igb.1 for ; Tue, 16 Jun 2015 09:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=y1D0X0grlxg3UCPnI3ECpdcHNud/gPl0VvimFRbnPuo=; b=QNrKW1PcgkMO7SJV2PgB692qEXevV8ntwL9xgEGv+qZCK8Og0SZlH5Kk5InJW8S1Kz wf1rnQzrwPtARo3/lhMAVBC+SQxOM2UWd09gqRdpbHvUpl8eEke25LNmaqYytZp9NpoZ sbCcuR5AfPO2YiOJVzxFZuJG3xMIqJOV7sSjWUFQ9JURy9JIqSn2YUxAWQt9dwkTXLPb zgpMuQFnc+BkcWDjAG78ev9FEOnjDiHPhj6cNijbZynUFXQlYm7YgVpDSORvWCY6hjnr Ep1uwMYgXJlmWr7YSmzz0QiIFtZmSthOaBMrj/rPgcxk6CEpoZelfPJVqA3mdXW+QjL8 kEkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=y1D0X0grlxg3UCPnI3ECpdcHNud/gPl0VvimFRbnPuo=; b=RhYRT8hy1P20eGSJ/p29Ayh/4R8d+3bVHXa2wK2tPqnXIjwgKNZOF5IRMDvwAEuG1Q NQremZ6XEVrjMEbnSAMkkQ9xLUbGoGRxQTvuxheqB00rCSB9Uy1z7m19ycYZHQ+nvbxM ZwoB70cH/7l7Vz0QBCcWNjRSEPSCrsCj6i0q45EeSCs9o+q9GIyeRjslvx8I+1qlQEOs EdFdGr9E743vSikYA3K67r5Edxctpz4VuNjVkpCSk/WuDHb8U3ArlYZ8F/rCU3omNQQs QEMLmYeX5LUN9Bl5DzI63ZLTOLJmwkKW7TSQjvASxdzhUQsvKb6VdrcYjTJxuiHPYeZ1 Tqvw== X-Gm-Message-State: ALoCoQkTP6FlsUxfnJgd1CfIEUb4GO0DSnTss1vEi9c2LgVk44XKhzSv+aTOtjlSaJ7LFtqcAjd5 X-Received: by 10.43.96.5 with SMTP id ce5mr3912201icc.96.1434473752056; Tue, 16 Jun 2015 09:55:52 -0700 (PDT) Received: from localhost ([69.71.1.1]) by mx.google.com with ESMTPSA id fm3sm10241478igb.1.2015.06.16.09.55.51 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 16 Jun 2015 09:55:51 -0700 (PDT) Subject: [PATCH 2/2] x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Takashi Iwai , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , dayer3@gmail.com, "H. Peter Anvin" , Thomas Gleixner , Yinghai Lu Date: Tue, 16 Jun 2015 11:55:50 -0500 Message-ID: <20150616165550.9306.58789.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20150616165033.9306.78046.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20150616165033.9306.78046.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We enable _CRS on all systems from 2008 and later. On older systems, we ignore _CRS and assume the whole physical address space (excluding RAM and other devices) is available for PCI devices, but on systems that support physical address spaces larger than 4GB, it's doubtful that the area above 4GB is really available for PCI. After d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible"), we try to use that space above 4GB *first*, so we're more likely to put a device there. Several people have reported sound problems related to putting a device above 4GB. This could happen with any device; I assume it's more likely for sound devices because the BIOS is more likely to leave them unassigned. Keep _CRS enabled even on pre-2008 systems if they support physical address space larger than 4GB. Fixes: d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible") Reported-by: dayer Link: https://bugzilla.kernel.org/show_bug.cgi?id=99221 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=907092 Signed-off-by: Bjorn Helgaas --- arch/x86/pci/acpi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index d8e2258..2ae7ce2 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -132,8 +132,10 @@ void __init pci_acpi_crs_quirks(void) { int year; - if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) - pci_use_crs = false; + if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) { + if (iomem_resource.end <= 0xffffffff) + pci_use_crs = false; + } dmi_check_system(pci_crs_quirks);