From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752590AbcHIJVt (ORCPT ); Tue, 9 Aug 2016 05:21:49 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:64339 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbcHIJVq (ORCPT ); Tue, 9 Aug 2016 05:21:46 -0400 Subject: Re: [RFC PATCH V5 0/5] ECAM quirks handling for ARM64 platforms To: Tomasz Nowicki , , , , , , References: <1470661541-26270-1-git-send-email-tn@semihalf.com> CC: , , , , , , , , , , , , , , , , , , , , , , Linuxarm From: Dongdong Liu Message-ID: <57A9A06A.30907@huawei.com> Date: Tue, 9 Aug 2016 17:20:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1470661541-26270-1-git-send-email-tn@semihalf.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.61.21.156] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090206.57A9A077.0067,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 5905a1690aa526ca5f62da4f2c77e621 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ÔÚ 2016/8/8 21:05, Tomasz Nowicki дµÀ: > Quirk handling relies on an idea of matching MCFG OEM ID, TABLE ID and > revision (the ones from standard header of MCFG table). > > Static array is used to keep quirk entries. Each entry consists of > mentioned MCFG IDs along with custom pci_ops structure and initialization call. > > As an example, the last patch presents quirk handling mechanism usage for > ThunderX PEM driver. > > v4 -> v5 > - rebase against v4.8-rc1 > - rework to exact MCFG OEM ID, TABLE ID, rev match > - use memcmp instead of strncmp > - no substring match > - fix typos and dmesg message > > Tomasz Nowicki (5): > PCI: Embed pci_ecam_ops in pci_config_window structure > PCI/ACPI: Move ACPI ECAM mapping to generic MCFG driver > PCI: Check platform specific ECAM quirks > ARM64/PCI: Start using quirks handling for ACPI based PCI host > controller > PCI: thunder-pem: Support quirky configuration space access for ACPI > based PCI host controller > > arch/arm64/kernel/pci.c | 42 +---------------- > drivers/acpi/pci_mcfg.c | 40 ++++++++++++++++ > drivers/pci/ecam.c | 6 +-- > drivers/pci/host/Makefile | 1 + > drivers/pci/host/mcfg-quirks.c | 93 ++++++++++++++++++++++++++++++++++++ > drivers/pci/host/mcfg-quirks.h | 24 ++++++++++ > drivers/pci/host/pci-thunder-pem.c | 96 ++++++++++++++++++++++++++++++++------ > include/linux/pci-acpi.h | 5 ++ > include/linux/pci-ecam.h | 2 +- > 9 files changed, 252 insertions(+), 57 deletions(-) > create mode 100644 drivers/pci/host/mcfg-quirks.c > create mode 100644 drivers/pci/host/mcfg-quirks.h > Based on the patchset, tested on HiSilicon D03 board with intel 82599 net card. It worked OK. Tested-by: Dongdong Liu Thanks Dongdong