From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932676AbcKHWgq (ORCPT ); Tue, 8 Nov 2016 17:36:46 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:54942 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932588AbcKHWgn (ORCPT ); Tue, 8 Nov 2016 17:36:43 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Will Deacon , John Garry , mark.rutland@arm.com, catalin.marinas@arm.com, gabriele.paoloni@huawei.com, linux-pci@vger.kernel.org, liviu.dudau@arm.com, linuxarm@huawei.com, lorenzo.pieralisi@arm.com, minyard@acm.org, xuwei5@hisilicon.com, linux-serial@vger.kernel.org, benh@kernel.crashing.org, devicetree@vger.kernel.org, zhichang.yuan02@gmail.com, olof@lixom.net, robh+dt@kernel.org, bhelgaas@google.com, kantyzc@163.com, linux-kernel@vger.kernel.org, "zhichang.yuan" , zourongrong@gmail.com Subject: Re: [PATCH V5 1/3] ARM64 LPC: Indirect ISA port IO introduced Date: Tue, 08 Nov 2016 23:35:27 +0100 Message-ID: <2479288.4UmF9SBrq1@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161108164948.GG20591@arm.com> References: <1478576829-112707-1-git-send-email-yuanzhichang@hisilicon.com> <8adfe182-4939-479d-6013-25ec40021b20@huawei.com> <20161108164948.GG20591@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:UNUAM7UYtURjUkwS1KmcbAnSsYVdD1b9V4rGyyIpZ9qC/6p5nwy r6HD7+96r9Bjuo039ZP1MBw1n3Jgq14prmZ9ELrCH54+4VVOa4Y2vkjCarx2nRIDdz/DP8f m2Bb3uInu5DOMjGENEmh39FDhTd9LELHjP8k9npwq3xRc/pwFwJoCLBc2joGAJk2n786E5c Y+gLe1YhRv6o2GmQSNi5w== X-UI-Out-Filterresults: notjunk:1;V01:K0:EihuIS8TaSI=:/5MtCW9QVxVPwe47QXtnCO aOSglNLjAJgJ7ZlGk8xeQ9WqRpJG6pOeHfSZagW0QKCN6wYcZvke4PTficSw5hDUP4Rod1Q1m KqyYBe8la2I1Xl7tWR1w40XlKOvMxpXDaAPkyVKc8iBrecolN2Aukz3IoFyXoJ99z55qTeGTK yjic7INzbSEBgkMvU8gZprz4wiqmoJhmo6PACvoWHe66bVR2tdUgDgUpykm+czJkLcGA2UGzl ThDu1g4RZpNeMo4pvG6qvthdoUF2cA4Thln4k6cJb2UVWxEbvDAoeTcugZVPDlietLxuPb1ye AGmMb7Emtb2yTJJBo+nhqw6fYmQ63Zx/dsMAeO2aqry5Cbpp9Zf5l/bO76MnFtkewzurlbQGM VXfvJRuIDA/PQZUfjOMZVsfvwxM/HWcyK+kjteBoRnCAsJVrSD5LJE6OPJlQXpvYKRNsfynQI E6RhpJqqHzxTHIZ1LnbyHOEaocWot8kPCyFpYJerZ+bnJS9CSGKTQeLHedzY6lZjK+C//SQC8 U9Qjcu3QH353ebGJAGLV4YwdN/fGiXDxq6Zpmnn6+GjA+/ux+co75wT7iZXb3j/MtFJuwJqzG IkJ3L5cVbr+iYwaUdxgpnFXuqAyyx1qdrCLwHISlSnYveE53t69oOOzO4qUHJpU+toLqkc9T/ Y6aBa7G8ejMjmImfdzGlC39xn+WA5kYb0rkbBWwd7QEzNKQxOKT8FlSztCVVilf+vO4/LZBJv 0Hx3l7ivus+YA5Mp Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, November 8, 2016 4:49:49 PM CET Will Deacon wrote: > On Tue, Nov 08, 2016 at 04:33:44PM +0000, John Garry wrote: > > On 08/11/2016 16:12, Will Deacon wrote: > > >On Tue, Nov 08, 2016 at 11:47:07AM +0800, zhichang.yuan wrote: > > >Is there no way to make this slightly more generic, so that it can be > > >re-used elsewhere? For example, if struct extio_ops was common, then > > >you could have the singleton (which maybe should be an interval tree?), > > >type definition, setter function and the BUILD_EXTIO invocations > > >somewhere generic, rather than squirelled away in the arch backend. > > > > > The concern would be that some architecture which uses generic higher-level > > ISA accessor ops, but have IO space, could be affected. > > You're already adding a Kconfig symbol for this stuff, so you can keep > that if you don't want it on other architectures. I'm just arguing that > plumbing drivers directly into arch code via arm64_set_extops is not > something I'm particularly fond of, especially when it looks like it > could be avoided with a small amount of effort. Agreed, I initially suggested putting this into arch/arm64/, but there isn't really a reason why it couldn't just live in lib/ with the header file bits moved to include/asm-generic/io.h which we already use. Arnd