Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbcD1UmC (ORCPT ); Thu, 28 Apr 2016 16:42:02 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:58091 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752388AbcD1Ul5 (ORCPT ); Thu, 28 Apr 2016 16:41:57 -0400 From: Arnd Bergmann To: Bjorn Helgaas Cc: Tomasz Nowicki , Jayachandran C , linux-arm-kernel@lists.infradead.org, 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: Thu, 28 Apr 2016 22:40:35 +0200 Message-ID: <5813591.CkzahFEfSl@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160428201439.GD25125@localhost> References: <1460740008-19489-1-git-send-email-tn@semihalf.com> <8950494.UV8UrWiFbx@wuerfel> <20160428201439.GD25125@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:jzgba1j3Z2qoAs4406vwi++R2RsB4Eu4R2c9ofq3ieGClvTeBQn 31p35JFFlWWgLASleJD6qfSRkW8BgsQMhcmbHdTEtEy8GiZki92HFdsuGbeKs7W1hXO4R/g e/izA1nhclQgf8eNIYKxJ6OFIGPWxS2n8ZflkZQQWml2Tz9bNoNZLZbuSESOOZUnHLlBAR2 QJ4v7Z21j6YMRk7oNrQJw== X-UI-Out-Filterresults: notjunk:1;V01:K0:dysopoEgDiQ=:YLln7vaL7hn7ye1FGRNc0B TjL0TZJB9/iWp+WnGffWLBFrPaMfcngvIdrH8yKZ/RTkHPWPwR9ScQZG26HVq7U9HqNsXe+YU h2TgjAHfoaHRGtUcvWQtnFcnXR3BwwbnLqkEXK0hD7p/hZkSOX3IyZllW59q/AT/Y4jZWVSd6 /btjfRZdoG/IaIYmJJ3nsUv/Xlxc00LYV4ldGuYm7X1PzOEtTZVH4+ZCBse/aOMnN3P/1CceQ JZHReOg9liE1IPRytNtnOB2+ayqeNLGoD+KdofHbXohe/5SSsGIry1V8CNt7MkZ7o1iYDAYSv 9Ecu+uO0Ju0K+b52HUEod2VN3fDXdRdTgf46NsQFKuC5RQostDE6PFm7nDPLCv0ZZiyItibXj RLnhWEvXdScMnfmAQEy6lvCdLTnPspx24VQe81xYUFu6DrXkCDoX+RcA/O5/H9ukEHOqJxHSP pexNACIbLw7XVYajDoyn4j3sSDId7mrj3JY0ry+CvwHWD8YdPI+0mRSAU6kkA4nkmf0ViFi/U KK7EyD3DEUFXYznot47JsSfEQsE+V17eMrHSpZQm6qtqUxXI3KoT5QcJZlhD4lcRtOBvX9VHR Eru3VH/oI3HA/CZm3dp9ZpTDCqE92PyqwwfQVQIzBjNFpypxZng3sr4Ug+d0+57qR3d68auc+ 5eLjjZZ90No7tHXyh0oQmGcg8grPxoEyNTDh3ciJqCyHk+QZVzT8HIOrxzbc1rI1mD2aNjoxm 7DLEBqOPCKOZ0Pvg Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1815 Lines: 35 On Thursday 28 April 2016 15:14:39 Bjorn Helgaas wrote: > On Thu, Apr 21, 2016 at 11:36:53AM +0200, Arnd Bergmann wrote: > > On Thursday 21 April 2016 11:28:15 Tomasz Nowicki wrote: > > > On 19.04.2016 15:06, Arnd Bergmann wrote: > > > > On Monday 18 April 2016 21:31:54 Tomasz Nowicki wrote: > > > >> > > > >> Basically the whole content of pci-thunder-ecam.c and pci-thunder-pem.c. > > > >> > > > >> pci-thunder-ecam.c contains config space accessors. Similar for > > > >> pci-thunder-pem.c but it also has extra init call (it is now called > > > >> thunder_pem_init) which finds and maps related registers. > > > > > > > > They seem to do much more than just override the accessors, they actually > > > > change the contents of the config space as well. Is that really necessary > > > > on ACPI based systems as well? > > > > > > Yes, the pci-thunder-ecam.c accessors are meant to emulate config space > > > capabilities. They are necessary to synthesize EA capabilities (fixed > > > PCI BARs), it wont work without this, for ACPI boot as well. > > > > Why is that? I thought the BARs never get reassigned when using ACPI, > > In general, there's no reason we can't reassign BARs, whether we're > using DT, ACPI, or whatever. In many cases, systems with ACPI also > assign all the BARs in firmware, and Linux doesn't reassign them > unless it needs to. But that's just a coincidence. There's no > requirement that Linux leave BARs as firmware programmed them. I'm thought I've seen systems in which the ACPI BIOS assumes that certain PCI devices never move around, because it pokes the registers from AML, and changing them would require never using the same device through ACPI. It's likely that this is against some standard, but that won't help you if you have to deal with the system anyway. Arnd