From patchwork Tue Nov 21 13:34:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 10068041 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E64860375 for ; Tue, 21 Nov 2017 13:34:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C28528AC9 for ; Tue, 21 Nov 2017 13:34:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1067728D91; Tue, 21 Nov 2017 13:34:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C5BF28AC9 for ; Tue, 21 Nov 2017 13:34:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751305AbdKUNet (ORCPT ); Tue, 21 Nov 2017 08:34:49 -0500 Received: from mail-by2nam01on0077.outbound.protection.outlook.com ([104.47.34.77]:2304 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751115AbdKUNer (ORCPT ); Tue, 21 Nov 2017 08:34:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=A8D9o1VLltMSCgpQikS8KSY4UhyQDQSQTZy2obnMkFQ=; b=G3Gzayoq8td1+EnQUF86ysztANHl0JYtRNgOSTqOGIulncupk467IaQZh5zHeMGJBtVIKpdtwfgx4S63U1CnyQmfmTxOVSJ7ycNZeVF6L3JPZWkUX6GB4VhOrEw7sobc8+ZkIphmb65uSOqip3h1iBDOqtR+BukN6JxB0hWVD+w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Christian.Koenig@amd.com; Received: from [IPv6:2a02:908:1251:7981:fcc0:d6fe:33e7:da04] (2a02:908:1251:7981:fcc0:d6fe:33e7:da04) by DM5PR12MB1308.namprd12.prod.outlook.com (10.168.238.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Tue, 21 Nov 2017 13:34:44 +0000 Subject: Re: [PATCH v9 4/5] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v5 To: Boris Ostrovsky , helgaas@kernel.org, linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org References: <20171018135821.3248-1-deathsimple@vodafone.de> <20171018135821.3248-5-deathsimple@vodafone.de> <26df0a78-8028-e42c-ce50-4cefe612a7e1@oracle.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <3443aad0-8c3b-b97e-685a-96b0866827be@amd.com> Date: Tue, 21 Nov 2017 14:34:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <26df0a78-8028-e42c-ce50-4cefe612a7e1@oracle.com> Content-Language: en-US X-Originating-IP: [2a02:908:1251:7981:fcc0:d6fe:33e7:da04] X-ClientProxiedBy: AM5PR0602CA0022.eurprd06.prod.outlook.com (10.175.46.160) To DM5PR12MB1308.namprd12.prod.outlook.com (10.168.238.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: badbe7f7-abd2-4ed9-12d6-08d530e4a163 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603258)(49563074); SRVR:DM5PR12MB1308; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1308; 3:SLPB/Xkhbvzqpz9qSJhXaw4zTPWUQNBmorVnGoH0nSj1l2ohZm8h3Y72X5YJSHkTt5YnFQgt2eXh+8hGJXTJM9x1TB0lLy4Ea1Z3HtyGPw+UQqTTbBeVD76AUJRkn8eW+LjTBcM3Vlu7Rg/baeZ7BIKDBf2bpIXd2hIy+mYOiC+y2yxRDKfyzJYnwCEF+2B8IfvJW5n04baFudWGc+QWqvF8sC4R752m3LV4+XkNUydxOQOv1/ICKo88pcdO6jM+; 25:IDYxVSAxMRatjskMFA4JOCBCfYgBBBk2osMh05UckDV8qaHa0w9yho0V1JLaFr+QGak/zKSHH+DrUCStywWUV5tVALNoprtq27U/ReyWgZI01EGHT30RedFdbaSDHBgWHHxwLU8bneLvjIW7TbAih20AijluSQjYeir1Rt4PTzve+zY5WMX5U2+XO3lRslnDUaiHRk00KzB+NiOXoLMLvodrico/B93AYPcE1VR+yHUIJw23Zi10vf49iqB1onuoFYvl32jc0Ot8mn7XdOhAFdZ4tsM4YgGQ8hD/SmR8oS7ePIitdDP1zlbBb2E+Vsg/0/3iCQvSuI1OnvMBjwYR4A==; 31:qwCRKwnUWbH3IIC/UaCKQ7gLsAp5RZ5FvoIViQcQSZ1iD9v54Kz2ga40eCEjiXpedNB/eU8bKUOl+91c70zW82hqS9OjCCSgq5oTNWrEkWCSY1V2S+nL1Tp+TENqOvZalsQen4omgkK5pwRU6JNu228oxdL0kjX1lFNsLrLZZ6MmoM+tzBgOxMwsIo/4H0ccrf+fjaiZse3J9V3hDcYnuBtI6zUCCNFZsc6njGCDOIg= X-MS-TrafficTypeDiagnostic: DM5PR12MB1308: X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1308; 20:kg4rcm0lT3vZ55hohC+nSEcclc8Pl6N0uL+9hy0q71qnDmZaec4+KvXt9zbL3DIfUOGOCFgJFavpY6jOJmrUpZmJch55+v9EpmzxEPpad8VRfqY1rh5vzl32cHMz8nC+bCdZUUCkSIfWVT9IbslHpp3hebUIk4S5LNE8MEZYKp4VJA7lawzhFamnO3XdGPkEtzj8H8PPOer2wxTONX7u+dhbz3zdRyV4kfGjxRDVKuuCANyW4tFYA1imexqv7yuO4CqhmOj3MwSWlFgmUR4mmKMhNT1Ojm9aq1PynatqUhILMNDQWRXRUcXF+xeq1eIvxvTiVM1uKNwsHQ6fi4phk8faRYyu1pIZ0VGC4c9WeKOO2AIkaWJLzxLHbAatHAu/sqPgu9if6RWxngSYsKvJ9k1mHRL1Z+d/9VmbMSeTQvG88aSKL3h+3Fx3cW4Ztj0ZhfwhxMUPcjx8jMGUt3zliwxiDJnXZwFaKmHuD9nbi4PJwbXtdqYj+wLZGbPuZuyq; 4:0o9Eca7wmToerRjkJ5zjsQBvggJLByNO5tFP8R4G8PN2QU3P/2KOJhkAfKb1NkR4BNbc5bylN07geheK1bTt27KeBNA+C9nC4eSRzJC3HnaGyKrSYhT1MCwqDDdCaJzxaLxFNwBZdfDNFDugwcUioSJkyPQXH/QtOBpLnlbMdZetRx3XWaIFwnml8vLA++AhyES40/iEvXz/uiR503mKhU+RxeGw7M+rS5New61mUn35weM/MbboPU2GPgYFGcdqxStZTxmiXQnYSjm5WNUWKw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(102415395)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231022)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1308; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1308; X-Forefront-PRVS: 049897979A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(199003)(51914003)(189002)(24454002)(53936002)(50986999)(54356999)(84326002)(478600001)(93886005)(6246003)(81166006)(4610100001)(37036004)(229853002)(2906002)(4810100001)(2950100002)(58126008)(16586007)(568964002)(8676002)(76176999)(65956001)(81156014)(65806001)(25786009)(65826007)(6666003)(6486002)(316002)(5660300001)(83506002)(86362001)(72206003)(36756003)(68736007)(1706002)(189998001)(2476003)(31696002)(5890100001)(31686004)(53546010)(8936002)(105586002)(33646002)(52396003)(305945005)(97736004)(106356001)(6116002)(101416001)(7736002)(64126003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1308; H:[IPv6:2a02:908:1251:7981:fcc0:d6fe:33e7:da04]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR12MB1308; 23:EPi7famU4CvkNeFUoHY54m6OSyon7PJyaYQAVSVSO?= =?us-ascii?Q?QTRMcBJJaBVc9pCAnZdonr70Ctb3rvYRVZ1CgjZEpwy0xOW0MbiNQYOhKh4X?= =?us-ascii?Q?OQiYPztN49tqu5ay0WU1mCcfyw+nIcStiSz/YWRzH6j3MTqGFzfbQ4YExTfe?= =?us-ascii?Q?/zjcaxTdsSNsF+KpzEvYhVfl44XQozWkxN1mnsyiYA4Z/iHR/Hwt2iJk3mqR?= =?us-ascii?Q?iLmEaevGz9kkU11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FfI780t6D85LYHHG3esYKSZk6QbS77rbENMck9Gpvh2PvjMVfAWHMPKpTffT4SOkVB7MQhMQbzTK7weKJhkv8M5igRqhjYNmMSJlXGjO0RV4rD0ul/hq9G1hR3blLXq1SA0bq8/DgWF0aNXpN9lKjYJ6PfDTGNKt6Y9u9h42h2PMXk7GfEc47I3FNxFw/mKtWFNgIkcHITMatQ1pQ2OWIJ8ExWe88Ggs6rgo2b SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1308; 20:0lwzhdQfIXBuPy1oT7sU0D1yXqPqbqTlkNc5nYHtOIi1umU/5owkuqZ9yQT0tewSMDsoE5ikuagCnaYI/ftGEVY68qQoqGUQAizBQvum+7pCAsdNdcNK8OU3vwt0G2qDT+Z6m191MYgGyoa/QxSARYbJ4qICjPXjgoLNDRfOO2Dv9O6fOpDOkRqiPzqErTnJPCoVRR+obPTVad4QbEBO0Q8DRUzIuglPd6xifSoLdqa0dL8HKXeekK+LdowV9h61 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2017 13:34:44.9375 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: badbe7f7-abd2-4ed9-12d6-08d530e4a163 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1308 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Boris, attached are two patches. The first one is a trivial fix for the infinite loop issue, it now correctly aborts the fixup when it can't find address space for the root window. The second is a workaround for your board. It simply checks if there is exactly one Processor Function to apply this fix on. Both are based on linus current master branch. Please test if they fix your issue. Thanks for the help, Christian. Am 20.11.2017 um 17:33 schrieb Boris Ostrovsky: > On 11/20/2017 11:07 AM, Christian König wrote: >> Am 20.11.2017 um 16:51 schrieb Boris Ostrovsky: >>> (and then it breaks differently as a Xen guest --- we hung on the last >>> pci_read_config_dword(), I haven't looked at this at all yet) >> Hui? How does this fix applies to a Xen guest in the first place? >> >> Please provide the output of "lspci -nn" and explain further what is >> your config with Xen. >> >> > > This is dom0. > > -bash-4.1# lspci -nn > 00:00.0 Host bridge [0600]: ATI Technologies Inc RD890 Northbridge only > dual slot (2x16) PCI-e GFX Hydra part [1002:5a10] (rev 02) > 00:00.2 Generic system peripheral [0806]: ATI Technologies Inc Device > [1002:5a23] > 00:0d.0 PCI bridge [0604]: ATI Technologies Inc RD890 PCI to PCI bridge > (external gfx1 port B) [1002:5a1e] > 00:11.0 SATA controller [0106]: ATI Technologies Inc SB700/SB800 SATA > Controller [AHCI mode] [1002:4391] > 00:12.0 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB > OHCI0 Controller [1002:4397] > 00:12.1 USB Controller [0c03]: ATI Technologies Inc SB700 USB OHCI1 > Controller [1002:4398] > 00:12.2 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB EHCI > Controller [1002:4396] > 00:13.0 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB > OHCI0 Controller [1002:4397] > 00:13.1 USB Controller [0c03]: ATI Technologies Inc SB700 USB OHCI1 > Controller [1002:4398] > 00:13.2 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB EHCI > Controller [1002:4396] > 00:14.0 SMBus [0c05]: ATI Technologies Inc SBx00 SMBus Controller > [1002:4385] (rev 3d) > 00:14.3 ISA bridge [0601]: ATI Technologies Inc SB700/SB800 LPC host > controller [1002:439d] > 00:14.4 PCI bridge [0604]: ATI Technologies Inc SBx00 PCI to PCI Bridge > [1002:4384] > 00:14.5 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB > OHCI2 Controller [1002:4399] > 00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1600] > 00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1601] > 00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1602] > 00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1603] > 00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1604] > 00:18.5 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1605] > 00:19.0 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1600] > 00:19.1 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1601] > 00:19.2 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1602] > 00:19.3 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1603] > 00:19.4 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1604] > 00:19.5 Host bridge [0600]: Advanced Micro Devices [AMD] Device [1022:1605] > 01:04.0 VGA compatible controller [0300]: Matrox Graphics, Inc. MGA > G200eW WPCM450 [102b:0532] (rev 0a) > 02:00.0 Ethernet controller [0200]: Intel Corporation 82576 Gigabit > Network Connection [8086:10c9] (rev 01) > 02:00.1 Ethernet controller [0200]: Intel Corporation 82576 Gigabit > Network Connection [8086:10c9] (rev 01) > -bash-4.1# > > > -boris From 2dc4461ba8ec1eb54a49e1e166de9a554556e572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 21 Nov 2017 11:08:33 +0100 Subject: [PATCH 2/2] x86/PCI: only enable a 64bit BAR on single socket AMD Family 15h systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we have a multi socket system each CPU core needs the same setup. Since this is tricky to do in the fixup code disable enabling a 64bit BAR on multi socket systems for now. Signed-off-by: Christian König --- arch/x86/pci/fixup.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index 5328e86f73eb..8f86060f5cf6 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -665,6 +665,16 @@ static void pci_amd_enable_64bit_bar(struct pci_dev *dev) unsigned i; u32 base, limit, high; struct resource *res, *conflict; + struct pci_dev *other; + + /* Check that we are the only device of that type */ + other = pci_get_device(dev->vendor, dev->device, NULL); + if (other != dev || + (other = pci_get_device(dev->vendor, dev->device, other))) { + /* This is a multi socket system, don't touch it for now */ + pci_dev_put(other); + return; + } for (i = 0; i < 8; i++) { pci_read_config_dword(dev, AMD_141b_MMIO_BASE(i), &base); @@ -719,10 +729,10 @@ static void pci_amd_enable_64bit_bar(struct pci_dev *dev) pci_bus_add_resource(dev->bus, res, 0); } -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x1401, pci_amd_enable_64bit_bar); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x141b, pci_amd_enable_64bit_bar); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x1571, pci_amd_enable_64bit_bar); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x15b1, pci_amd_enable_64bit_bar); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x1601, pci_amd_enable_64bit_bar); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1401, pci_amd_enable_64bit_bar); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x141b, pci_amd_enable_64bit_bar); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1571, pci_amd_enable_64bit_bar); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15b1, pci_amd_enable_64bit_bar); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1601, pci_amd_enable_64bit_bar); #endif -- 2.11.0