Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751683AbcDUJiV (ORCPT ); Thu, 21 Apr 2016 05:38:21 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:54242 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbcDUJiT (ORCPT ); Thu, 21 Apr 2016 05:38:19 -0400 From: Arnd Bergmann To: Tomasz Nowicki Cc: Jayachandran C , linux-arm-kernel@lists.infradead.org, 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: Thu, 21 Apr 2016 11:36:53 +0200 Message-ID: <8950494.UV8UrWiFbx@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <57189D2F.9070802@semihalf.com> References: <1460740008-19489-1-git-send-email-tn@semihalf.com> <3830999.dF71UWYsBP@wuerfel> <57189D2F.9070802@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:PQd4TsywBEva4oz8Cj3iAVDTX4U8JO3a8rBY1HMp3SE2W/+xGxq Nxi6e7rMaG7NxFUaufz8bid4s8Pwls8hmuVYzjjQ+VZsej5S6iG686Hm3s1skEr/UOi258F 6vv9C9rGQmHmZhEbytyNLEefS212+uQxfWxdK/Y2xzKcW7PdAhc6JhfoKFvbNWG2Az/4uIV rkyeDRcgpL8P7lDg7z+ag== X-UI-Out-Filterresults: notjunk:1;V01:K0:azIAhAKYeXg=:3GFSpkwIw+UdfsZ6cFgq4D 7wL57tH6iONULwIoBk15CCH74gJ/g9HJXPPf656pJZWS8Lm0Vln8+IN8oqObH956ROIYqqWrA 7Te0L3sYO1e1Ps0RGRP7p+A4CRIPxN0txK9mGbO2Tg8uGzqqnc0z+w4YrqsjUQFPFagEig+mx c9bkSrclLYgC670F/easm7r6BPJPmJUAvl/y0MupI9FRz1RkWRt8oNCgAP0IE9R/KjvaDreCa E5yZgCv22F/D5fzyWdYKg82UBJnDKSkkjd4NXC2hOHCPptHfjLtk3v7MoTo9dNy6IV3LVGyan RPxSQ9N218DtyfTYCi8+0CN7GH4GWJ2cMZ1VXd7tKJO092t28JETIfVJgdQIkCwp8FN1+69W9 LLiJ8grRsEj32F2mnpgBeqRTYQpXKO+XVSkdW9ljuipnYKXdIiQ9jy6hhg0kza4s44iNAl/1T 2P/Wz1gyir62kNVb+CBj6iKPWQUpvN1raA9kw06IekMUlXHv741r6Epndac+bvdx+caBjYnrr lZ1b9pZODlZNfghuVAAyVKXkhRjYYDevfVNCpSoGeaeY+QaqBFM0VF70SUh/Jnc77zRY2Up8s v6aCKUbEWxzywTgPcnSh4DFwKDS5A9Ddo1H1gICEiSwHAnst0RRYwTPrM4xCc2Zq42pEufgx0 Ry63omRl+wxW9eI6I+zSCGfOxDWJ5QB6YIbua8PR3JtVoZiv6nQsq6VkocjVSUpVGSGSogN4g S+e4KfZaEO2jZwLp Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1733 Lines: 37 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, so I'm surprised it's actually needed. Maybe I misunderstood what you mean by fixed PCI BARs. > > Another idea: how about moving all of this logic into ACPI and calling > > some AML method to access the config space if the devices are that > > far out of spec. > > Do you mean Linux specific way to call non-standard config space > accessors? Then non-standard accessors are going to AML methods which > are called from common code which handles quirks via unified API ? What I really meant was a standardized way to do handle hardware that is in some way or another not compliant with PNP0A08: We could have a different hardware ID for this and let all the first-generation ARM servers and also anything else using ACPI with nonstandard PCI use the same method across operating systems. Arnd