Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp708890ybh; Wed, 11 Mar 2020 09:14:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs69QKbntoX4BYx0rORQtyf3w27jkZNdA+dQqDnaPoi1YO1WZ6s7klao0cyui7C0IAK1iRs X-Received: by 2002:a9d:7e82:: with SMTP id m2mr3009073otp.300.1583943247641; Wed, 11 Mar 2020 09:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583943247; cv=none; d=google.com; s=arc-20160816; b=LL/54eVgLlTlmkBd/j9lnyxOha+L1Mt3dsY5pYKUwwTnLHVBzUCAgSqXdyy7E4UWGm gXDCpyre5jdISjW0u6ndv9yM8O1c/4bKJnLPMr02VhQzJJqLvZCKy6fU2QCW0y4e0ZqL gN0bVx44ednhFDjnUIcXuw3OOJsaZE1dwN0BggzTuOCA1T2t97ycUpzJG9519Hjh1hPu 8TIRl6foxR6DBINe/FQrD/TDzBL9GBUBBbU8OjES+klJUuWbhouPTaTa6RbECiTqm3xZ LMJP0YWHo0u+MYImAU2FZF4LMtkFKGU9FFYqj870Gdh3L1OH/EdBAlQ4yzyG7Y+wkWBj fxBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=Hub6SSRfPNiGp+a1TDq2UdkZZxdPrTsW4QDegb6b4dA=; b=OnW9H3jprLw4Ipwb/tpIPBOBcDanJBCGGtUM6uut1H6+43Ictom6wrKuXU6i0ZAb5D /hw0avOnnvtJ96+wxHhEjbWp1SDYHsIyl+zHaP9Ny7zjKTRXMeU5MTYKn5vQBbygsX7d 1vsbXTve8A1VCd0JyJvFy/ymmyJdSNjTZ28FBkFOnpCiUirUg8du6DdEZ23ApXkxgr3u tPG21K5eWTVxxx9naUOhQHCH24LBp3hie0KakGufi1t5hX/0rSeAg0c/d9kRHcV9XMM0 EVAxCzAvJx6kw+rYkcKOZpGZDSQ4CSWauHy/u9R2nqwQni84/YMCeghqzCDUakRjIlLh jfFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 48si1441385otv.320.2020.03.11.09.13.51; Wed, 11 Mar 2020 09:14:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730210AbgCKQND (ORCPT + 99 others); Wed, 11 Mar 2020 12:13:03 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2550 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730192AbgCKQNB (ORCPT ); Wed, 11 Mar 2020 12:13:01 -0400 Received: from LHREML710-CAH.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 2AB209834BBA91B04D59; Wed, 11 Mar 2020 16:13:00 +0000 (GMT) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by LHREML710-CAH.china.huawei.com (10.201.108.33) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 11 Mar 2020 16:12:59 +0000 Received: from [127.0.0.1] (10.202.226.45) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 11 Mar 2020 16:12:59 +0000 Subject: Re: About commit "io: change inX() to have their own IO barrier overrides" From: John Garry To: Arnd Bergmann CC: linux-arch , Catalin Marinas , Sinan Kaya , "linux-kernel@vger.kernel.org" , Jiaxun Yang , "xuwei (O)" , Bjorn Helgaas , Will Deacon , Linux ARM References: <2e80d7bc-32a0-cc40-00a9-8a383a1966c2@huawei.com> <8207cd51-5b94-2f15-de9f-d85c9c385bca@huawei.com> <6115fa56-a471-1e9f-edbb-e643fa4e7e11@kernel.org> <7c955142-1fcb-d99e-69e4-1e0d3d9eb8c3@huawei.com> <90af535f-00ef-c1e3-ec20-aae2bd2a0d88@kernel.org> <182a37c2-7437-b1bd-8b86-5c9ce2e29f00@huawei.com> <15e7158d-184d-9591-89a6-cd6b10ef054d@huawei.com> Message-ID: <96b407eb-f9cd-960c-02e5-5e2a4ece33d8@huawei.com> Date: Wed, 11 Mar 2020 16:12:58 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <15e7158d-184d-9591-89a6-cd6b10ef054d@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.202.226.45] X-ClientProxiedBy: lhreml735-chm.china.huawei.com (10.201.108.86) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03/2020 16:43, John Garry wrote: > On 06/03/2020 16:29, Arnd Bergmann wrote: >>> The idea is good, but it would be nice if we just somehow use a common >>> asm-generic io.h definition directly in logic_pio.c, like: >>> >>> asm-generic io.h: >>> >>> #ifndef __raw_inw // name? >>> #define __raw_inw __raw_inw >>> static inline u16 __raw_inw(unsigned long addr) >>> { >>>          u16 val; >>> >>>          __io_pbr(); >>>          val = __le16_to_cpu(__raw_readw(addr)); >>>          __io_par(val); >>>          return val; >>> } >>> #endif >>> >>> #include >>> >>> #ifndef inw >>> #define inw __raw_inw >>> #endif >> Yes, makes sense. Maybe __arch_inw() then? Not great either, but I think >> that's better than __raw_inw() because __raw_* would sound like it >> mirrors __raw_readl() that lacks the barriers and byteswaps. > > Right, I had the same concern. And maybe the "arch" prefix is > misleading. Just __inw could be ok, and hopefully not conflict with the > arch/arm/mach-* definitions. > I think that it hasn't been mentioned already, but it looks like the outX methods also need the same treatment, from a7851aa54c. thanks, John