Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2303583imc; Tue, 12 Mar 2019 10:59:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlXqpZ2ah+iSNL581LaTgiqBRc57Dzhak7L3iqHfzach6OZw1YpfP33+wmy8xQv5CZw8r4 X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11mr39877304plb.328.1552413581954; Tue, 12 Mar 2019 10:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552413581; cv=none; d=google.com; s=arc-20160816; b=OJ7IrKUOpYkPv9n2yCQEvZNXi3U43E84HhcJoX5RoYrEk37AT/hZLgNh0CqfQfWYkV KlEp08MyUQCYzk785RuBWkC5krJWeeMgl3u3XazgVgr0ovg7jAJVUMQWHVUnKJ7ewW2m Uw9xqd3K0mQFRAfjnqPl6wsUnIcoVgQ/2sC8YDFfM++6GaeVxSF+DWlfCkMLA8e85Bcx wfMfSKoEk/6CEv1Rn7FxNwIH1e+j1th1O2//hKryMKECUwMO2w9szP7UAcwq5QHma4ie TNGeHtSaQV7SaZrD5cCWScCprU0pwlCriFmb+j6ExWjQ3EOZtR3F52izXUx/Lin25Xpc TLeA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qq+FV1E5emFM3whV0TrQVjpb/HG7A1aD9WAxl32YL0g=; b=Y9VyIUuZCjRKvj0ezLQ8SwRRIxC/5xRPLfW0GJgEgAwC/iNdFmWNW6e8loym1xvUJg k9DMC5h9iTjYN4hQyiESJ5CGINSaMsqKqYVy6L1MKUobw3IUYU9g+vgegHzKxAGo95St GKk8R08MynXG2pQwdjKKnM+RDu6CkV/8Bk+9EPZOMMi/4XViOMkkS15UNk5cec+gOFP5 3XINnhe0vNLrV0QQc7c863PNsVsIThJYUgMRJCDjwKE8bau+Ob5PeZgJrXk7JjFKBhXR eK+8nSmRYaeqxee83ZK9dmP4zdNZQ31O9V12lxYcAs+80NHc4qiJiMmKhwpjmmjHgXIu qlMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CaZV4yh1; 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 d1si7666771pgv.580.2019.03.12.10.59.25; Tue, 12 Mar 2019 10:59:41 -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=pass header.i=@kernel.org header.s=default header.b=CaZV4yh1; 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 S1728563AbfCLR62 (ORCPT + 99 others); Tue, 12 Mar 2019 13:58:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:51030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728022AbfCLRNl (ORCPT ); Tue, 12 Mar 2019 13:13:41 -0400 Received: from localhost (unknown [104.133.8.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3AF7321741; Tue, 12 Mar 2019 17:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552410820; bh=pSHuXd5pFJAh3JI2ovhIZNezMe69/vs1dovexXVwLTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CaZV4yh1m6V+iTgxweCaxH1UgwIKNfHbbZGEFJcXvNSKT7KR1wMwy16PzlJ7ivYkM 5nrIXM9DCKBAjxIa/5SZydw0e5oPSdBrjcYTbkK2YyVnMpdUmySNRbNPmmFz6HyfrT 4GX1bBB5K2AxR4f4t92CyfCfwJlIQZl3sohbZwfE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Shishkin , Bjorn Helgaas Subject: [PATCH 4.20 153/171] x86/PCI: Fixup RTIT_BAR of Intel Denverton Trace Hub Date: Tue, 12 Mar 2019 10:08:53 -0700 Message-Id: <20190312170400.690758654@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190312170347.868927101@linuxfoundation.org> References: <20190312170347.868927101@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Shishkin commit 2e095ce7b6ecce2f3e2ff330527f12056ed1e1a1 upstream. On Denverton's integration of the Intel(R) Trace Hub (for a reference and overview see Documentation/trace/intel_th.rst) the reported size of one of its resources (RTIT_BAR) doesn't match its actual size, which leads to overlaps with other devices' resources. In practice, it overlaps with XHCI MMIO space, which results in the xhci driver bailing out after seeing its registers as 0xffffffff, and perceived disappearance of all USB devices: intel_th_pci 0000:00:1f.7: enabling device (0004 -> 0006) xhci_hcd 0000:00:15.0: xHCI host controller not responding, assume dead xhci_hcd 0000:00:15.0: xHC not responding in xhci_irq, assume controller is dead xhci_hcd 0000:00:15.0: HC died; cleaning up usb 1-1: USB disconnect, device number 2 For this reason, we need to resize the RTIT_BAR on Denverton to its actual size, which in this case is 4MB. The corresponding erratum is DNV36 at the link below: DNV36. Processor Host Root Complex May Incorrectly Route Memory Accesses to Intel® Trace Hub Problem: The Intel® Trace Hub RTIT_BAR (B0:D31:F7 offset 20h) is reported as a 2KB memory range. Due to this erratum, the processor Host Root Complex will forward addresses from RTIT_BAR to RTIT_BAR + 4MB -1 to Intel® Trace Hub. Implication: Devices assigned within the RTIT_BAR to RTIT_BAR + 4MB -1 space may not function correctly. Workaround: A BIOS code change has been identified and may be implemented as a workaround for this erratum. Status: No Fix. Note that 5118ccd34780 ("intel_th: pci: Add Denverton SOC support") updates the Trace Hub driver so it claims the Denverton device, but the resource overlap exists regardless of whether that driver is loaded or that commit is included. Link: https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/atom-c3000-family-spec-update.pdf Signed-off-by: Alexander Shishkin [bhelgaas: include erratum text, clarify relationship with 5118ccd34780] Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/x86/pci/fixup.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -635,6 +635,22 @@ static void quirk_no_aersid(struct pci_d DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_CLASS_BRIDGE_PCI, 8, quirk_no_aersid); +static void quirk_intel_th_dnv(struct pci_dev *dev) +{ + struct resource *r = &dev->resource[4]; + + /* + * Denverton reports 2k of RTIT_BAR (intel_th resource 4), which + * appears to be 4 MB in reality. + */ + if (r->end == r->start + 0x7ff) { + r->start = 0; + r->end = 0x3fffff; + r->flags |= IORESOURCE_UNSET; + } +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x19e1, quirk_intel_th_dnv); + #ifdef CONFIG_PHYS_ADDR_T_64BIT #define AMD_141b_MMIO_BASE(x) (0x80 + (x) * 0x8)