Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751157AbcDPHdb (ORCPT ); Sat, 16 Apr 2016 03:33:31 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:50104 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbcDPHd2 (ORCPT ); Sat, 16 Apr 2016 03:33:28 -0400 From: Arnd Bergmann To: Jayachandran C Cc: linux-arm-kernel@lists.infradead.org, Tomasz Nowicki , Bjorn Helgaas , Will Deacon , Catalin Marinas , rafael@kernel.org, Hanjun Guo , Lorenzo Pieralisi , Sinan Kaya , jiang.liu@linux.intel.com, Jon Masters , linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, Liviu.Dudau@arm.com, David Daney , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, Wangyijing , Marcin Wojtas Subject: Re: [PATCH V6 08/13] PCI: generic, thunder: update to use generic ECAM API Date: Sat, 16 Apr 2016 09:31:59 +0200 Message-ID: <4240660.NqlPcXaV7N@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1460740008-19489-1-git-send-email-tn@semihalf.com> <5110401.mGEq6IVFz2@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:s9x5kmD8hzkKM/JP7O6ELb990+aETcV9iMtcU+4DwiHrqiN59Cg 3xS5uC1adnI5yjePDxrQG8EHTXEnKObe/MbXlh6dEYE9wr8zxgmXXPceFYxJxGjunrhMDEU IePrOVNTBLi0O/jr+R3A7FM9BqhL3/NccXMx899pIa0/sfy1Y0vMdAzjRtFCHckVfGD9iMz 75B9y6Tl9qORxyRhQDn1Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:6r/xamOrf2o=:ByDY7xK/JNfV7hA5T7MT9n CjUTW6vxd42junBUdzytQvhIkg0ICmANegqq67Sw2RDzcnbgH/MaPeask9jO7Hb4DgqmMF0J1 vuYfsxQZz8a6S9C65OtGlaLbEFCq1BZugcqQIEz7e8QPOMdKDlwn11tsrgAgRRt4WY2oRqCFz ccNN0695H538ha6+6eABnjHXcsUBZ/RR+jtacm2gH9glMx4KAMuvHWvptQx5HT2T59Lrc7d8W VY5+NZOLo5u+sjm7RKktzL+WpeyPOPJEjTuMQkD9FWMGKhpTfq7Ks7MmhjBFpOIuWcHFmbiGu kvrlb0ZA6Yc54jmm5Dlp7F+tC2sGcbyNR46XfWWKtoCaEaQiAMe6EOSfuL2RKBvcLlWWMnloz YQIiBMWsAcyjCQTbAn6kPWb3r+HAR/pJ2yyFKkXK8Ka+7EzbcRz9hR8IrnVD642X+KFnc1gAN AL0zqqeuwwEF0aAC2bPlhXjVYUHFbM5cunVHdcMg7XKThSxh+N4iMnKKQvvMj+paJxfU3B4HV t2qQFMXSn8cFSemvZzXgT1dr55MowJ2eIKeHX9mCoKXQ/7Esn5o0YjzUk77wTeAyOyNlRNlub brnve92vFm+jmowJ9bXpSgliEf8tXRaQ2JgQiB+4Rx0SD8arTuWv1RQhELRnCS1VcuXeOUT97 Sk4dPreZ/gxs58SQXK00Jma3+Q2Hkp3GSobOjtlNwKWiSdIrU8/9u7fMyh3OfhrYNiVSacQRu J6sUuPqT965CvdEH Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1612 Lines: 35 On Saturday 16 April 2016 12:50:13 Jayachandran C wrote: > > > > I still think it would be better to keep the loadable PCI host drivers > > separate from the ACPI PCI infrastructure. There are a number of > > simplifications that we want to do to the DT based drivers in the long > > run, so it's better if that code is not shared at this level. Abstracting > > out the ECAM code is fine, but at that point you should be able to just > > call it from the ACPI layer. > > The issue is not with this patch (in my opinion). This patch is just > re-arranging how thunder specific data is maintained. Earlier it was > a container_of gen_pci, now it is ->priv of pci_config_window. > > I can see the issue in patches 12 and 13 of this patchset which adds > ACPI fixups into the thunder OF driver. Right, I commented on this one, because it seems to rearrange the code in order to do the later one. > The simple approach when doing modular PCI drivers would be to make > pci-thunder-*.c like pci-host-common.c, to be compiled in if configured. > The fie will contain all the Thunder quirks and can export > pci_thunder_ecam_ops. I would argue that we should not export anything from drivers/pci/host, those should really be standalone drivers that do not interact with other subsystems. How much code would you need to duplicate from thunder-ecam to have the same functionality available in ACPI? My expectation is that it's not really that much more compared to the code you need for sharing a single implementation, but you get a lower complexity here, which makes it easier to understand and to rework. Arnd