Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755473AbcDLAen (ORCPT ); Mon, 11 Apr 2016 20:34:43 -0400 Received: from mail-bl2on0058.outbound.protection.outlook.com ([65.55.169.58]:55982 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753998AbcDLAem (ORCPT ); Mon, 11 Apr 2016 20:34:42 -0400 Authentication-Results: broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=none action=none header.from=caviumnetworks.com; Message-ID: <570C429A.6090006@caviumnetworks.com> Date: Mon, 11 Apr 2016 17:34:34 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Jayachandran C CC: Bjorn Helgaas , Tomasz Nowicki , , Arnd Bergmann , Will Deacon , Catalin Marinas , Hanjun Guo , Lorenzo Pieralisi , , , Stefano Stabellini , , Marcin Wojtas , , , , , , , , , , Jon Masters Subject: Re: [PATCH v2 3/4] PCI: generic, thunder: update to use generic ECAM API References: <1460414707-19153-1-git-send-email-jchandra@broadcom.com> <1460414707-19153-4-git-send-email-jchandra@broadcom.com> In-Reply-To: <1460414707-19153-4-git-send-email-jchandra@broadcom.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: DM2PR07CA0012.namprd07.prod.outlook.com (10.141.52.140) To CY1PR07MB2133.namprd07.prod.outlook.com (10.164.112.11) X-MS-Office365-Filtering-Correlation-Id: 4236703a-9df1-4320-129a-08d3626a3a8e X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2133;2:iDFKy9re9vh19rLUMXTvtE7onQ/juKK5awKjnO0NPBKD3Vpq5ROQBT7WQfKLadjbJsjBl/w9Sl1yLpxlSaJkc7zjju1VhSYHhZJtl/JEYyaOnAzIQ/IhLTKXj4b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vMli69/33d1qy7+RzeCsRhmgxUPSi5pXEHEyWv8wTdT2yWD15apMDhTHQ0+1yJNJK7I8Z46RgyqOM5IXJrGXA5VA6IyOKcaUOVfaLOayHThqXC0ylUdzeMgTO7m1XSURVGSqAqdyPYVW+hIfFCinHOvSStC2ioEbSRFDwQzdYPwGko= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:CY1PR07MB2133;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2133; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2133;4:gvvtcdLA+XLTL4LzF/gFbZ1G+kL6nq/JI5oiF8lXtRmnyCJmigUqqBJ5R/QePJQttyTim0pqe0SKmVECd9xfgE9FwaVFCi4J9s6wIxXLcp/GZ1LyGYkzwwXexIhkqcwLWkV5xg0hBceDowFtf0AEjKXgcW9aXFF7GiAuIMXckZKCAR9AlAvCJAumeGVgv0dv3WX/N6wyvF/X32zZ72S9eaS6NEUb6whj2BCQZoKzakZE6juPRlJgKVOTy7ofxTt7Head0BSI3AcCtdxk4zpHP0kbPwg/sWuGSFF/78iPM8SG9A/WPHU6+UtEMoB2HQdA4R67KALxAqAMtTSIRObRuR+WgZpbUgK7znoaU/k435hIVm4xu3y13QkoBBn4XhEL X-Forefront-PRVS: 0910AAF391 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(24454002)(377454003)(4001350100001)(42186005)(53416004)(50466002)(66066001)(65956001)(110136002)(189998001)(47776003)(23756003)(2906002)(5004730100002)(59896002)(33656002)(81166005)(36756003)(92566002)(19580395003)(80316001)(19580405001)(65816999)(586003)(6116002)(77096005)(3846002)(54356999)(76176999)(50986999)(87266999)(5008740100001)(83506001)(230700001)(4326007)(1096002)(2950100001)(15650500001)(3076002)(41533002)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2133;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;CY1PR07MB2133;23:27KBjKVtXeEFWkUNqiO+qkU3EYSbbXtF0LdgaXg?= =?iso-8859-1?Q?R4OiPLUdRfREuKgXlVkHrK05d7x6yLaYEXg1ftXmmRXfsKUh8XaBIbiam0?= =?iso-8859-1?Q?GPacKhobrwbkVaiwbW3N8DdThPXJIxbIny6PwT5oiuyzT/0+m7wEqvmlqQ?= =?iso-8859-1?Q?0ua/ZZuRjCVwh5JdQ+c1RibJ/iDkvZ13dymlkBi7YyusJBnkR3By13ALpj?= =?iso-8859-1?Q?/I/Pa8Fyl5OKV7zy20xJcYzKNx1TKaajgcVx3YdLL7DW7PsdrA3QPTGU4u?= =?iso-8859-1?Q?5MA3wM8DMCBVXXP8iCOPgDVK8W5C343eXeTRGb33Tonb0QzQW2nbZUY/xX?= =?iso-8859-1?Q?K5pRWOdXUKRip5gXpv9zw8ECeptRAZazs2xE+1383Up0fwgZzgdLHYW/0C?= =?iso-8859-1?Q?DNqKIQjGZfc0gWT3xr6YOXokwv/F7j1O9Iz3mfz+Os2Ry6Oe7M3+Q7sIvc?= =?iso-8859-1?Q?khdOilEAAKEuyHhv4U11BqZSV48HAR+NT9lQIbABbdM4AlxEVAcs9yYufH?= =?iso-8859-1?Q?QDcoA9iLfSF8f9SZBIgtyrcY9dtmVA2DCHRoaBSIY4NKXxueRpaQTM0sLL?= =?iso-8859-1?Q?gwazvatF9Qw29U9XsbGfUAXXBDwPtgqr2KmVS0c56crAHVsQ1kA2WrsayF?= =?iso-8859-1?Q?cysu8KTuee924aYL5iKPHqd0QeERoocOdvktjucAfkZupckXGVeYsDs5M8?= =?iso-8859-1?Q?E3q3eZc2duh7KHrWgEJA66einnaY5QlEuJG4TqpiYFqgKJC9LUB8ttdeZM?= =?iso-8859-1?Q?K1sFBGsE4ZSiRF+OJqvjn7jcSwnttFh5NlkNJUdTi7NAUAQPAOhYZnsGjG?= =?iso-8859-1?Q?NY5qV5Z/CZQpxj3z6pzQBcLlBOGTrFxlIvbb1Sah8JXjx+n7woXDsMfQtv?= =?iso-8859-1?Q?1OiXZcfLtBEqyPvxWZ8nG+ff5SAzudp43+FoW5QarLcwqXsPPthrTjJpEH?= =?iso-8859-1?Q?cYBvoRyDyQMKuChse7YWmUFdevusP3gBWpUYJfB6MXjvvsQi2Ett3XWHmI?= =?iso-8859-1?Q?1aG8VPzcc5OZnR5k+dwI0d+drhlJ2jjS45XYK3t+LsvnQr/BLQe5EDVXzh?= =?iso-8859-1?Q?9J57dpHn9DOTbPRD/neDEHeVmJrwSJWOOD1uHJNvVjMVBa0ZU6vG7HfRaN?= =?iso-8859-1?Q?xrJAavVofAqd71LHyfZqoca6DrcU3fQWP0M9l8eQEcL802/GQWa3V0MFqs?= =?iso-8859-1?Q?FaK5WF/8UT1?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2133;5:8Jg0izuZCbU7EFy4tVPj9ueaUQ16qOL4OPs5IV2GF5o/N8LpcGLw2AabzxHo99J2WnWGHZadZbk0IIzg2gxMGs0tlAchirovioIgvohH7XdveV5UCZqe0do00JJLDL4q9Euh20LvwKrDTmhtFsWThA==;24:h++LbpRldFrukJSpLeWx3EDC8+tBWAFnwcCV1ZJUTKMWv4Uf+8Kn0YFq1a2HQK7qA3DP92Lc85Ql2MOskOq9RI7E9bhiweAM2yyBzMSMNYo= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2016 00:34:35.9691 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2133 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1815 Lines: 44 On 04/11/2016 03:45 PM, Jayachandran C wrote: > Use functions provided by drivers/pci/ecam.h for mapping the config > space in drivers/pci/host/pci-host-common.c, and update its users to > use 'struct pci_config_window' and 'struct pci_generic_ecam_ops' > > The changes are mostly to use 'struct pci_config_window' in place of > 'struct gen_pci'. Some of the fields of gen_pci were only used > temporarily and can be eliminated by using local variables or function > arguments, these are not carried over to struct pci_config_window. > > pci-thunder-ecam.c and pci-thunder-pem.c are the only users of the > pci_host_common_probe function and the gen_pci structure, these have > been updated to use the new API as well. > > The patch does not introduce any functional changes other than a very > minor one: with the new code, on 64-bit platforms, we do just a single > ioremap for the whole config space. > > Signed-off-by: Jayachandran C Tested-by: David Daney However, ... > --- > drivers/pci/ecam.h | 5 ++ > drivers/pci/host/Kconfig | 1 + > drivers/pci/host/pci-host-common.c | 121 ++++++++++++++++-------------------- > drivers/pci/host/pci-host-common.h | 47 -------------- > drivers/pci/host/pci-host-generic.c | 50 +++------------ > drivers/pci/host/pci-thunder-ecam.c | 37 +++-------- > drivers/pci/host/pci-thunder-pem.c | 53 +++++----------- ... The patch conflicts with a bug-fix patch I just sent to pci-thunder-pem.c, so there will be a race to see who gets in first. Also, I don't know if it would make sense to split out the pci-thunder-* changes to a separate patch. > 7 files changed, 93 insertions(+), 221 deletions(-) > delete mode 100644 drivers/pci/host/pci-host-common.h > [...]