Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp7015126ybf; Fri, 6 Mar 2020 08:44:36 -0800 (PST) X-Google-Smtp-Source: ADFU+vtl22ibMnWllwVMszouSxHohYItQNOksDuGXNBMyMGREjUY6bR6BwHw0hQpnLW3PWZK2i6a X-Received: by 2002:a9d:2f05:: with SMTP id h5mr3354138otb.316.1583513076361; Fri, 06 Mar 2020 08:44:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583513076; cv=none; d=google.com; s=arc-20160816; b=fBpiTK8asyS+vJs0GoFZl7ZvUrmCrsuZONXuyB9Xdn8+pRFRU1i0Ind3dvBg1Z6iRf PRycRSxJ/WhB3X4XvO14QT+mUh+618mYp8as+e8Btij2IftIHzTM97r0dHK834Py4PsS Xn/lgF3nnxnSU06IvlvC7Sq3vGqRwzKOA6CYsmZITtZCCvRoM1W8c1rCxbtAKX36dCmG TTiR7+YEVY622CodA800QJLkRy6MIfufo/Wd4GEbHyvENEXdagoMGY80I02jLDYEnpMU 3wBEkYNFyy1HCZWzAj97bnoZUKqXSztYsLL5u0PgoXqJQgR/V562qH3sk2cz8K2Tx1f8 snaA== 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:from:references:cc:to:subject; bh=LVN3NmZ1JzoJgfW6+eDn+fMv3PzkwJzQ+6uD/RIOjew=; b=EsM0cBLgerCs4v3t9JSQD93v3TsmnOD2XWmYQgu9bB+wMv63Qrm4QYcGiy37QrNe2S 0FQ7s3+52jMIjHn73+61/0ARK1aWRLKJ45ra5UDgK9FHB5pmFdUJERyoh8QtMyolZAWy F5V4f5bmM+3+qAcHKNjT5q8Fmyque2DY1a3wqAfGwPwtKOYAnUQuXjBbkrH7x/8/zWTj n5smWhtBdPVOy21WQuD/ZD7IL0vTlYlB0n9efFbP8hzuku9ccGn2L2PDRc1wkrdco7ew iJBTxbQZ4SZ1hhWmeTkUfXzDtayKh9DdTQy7PwoHh8+IQPfQZOtdCg+a50/uSVgoPSD0 HTMg== 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 l15si1644220oic.220.2020.03.06.08.44.23; Fri, 06 Mar 2020 08:44:36 -0800 (PST) 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 S1726259AbgCFQnt (ORCPT + 99 others); Fri, 6 Mar 2020 11:43:49 -0500 Received: from lhrrgout.huawei.com ([185.176.76.210]:2516 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726099AbgCFQnt (ORCPT ); Fri, 6 Mar 2020 11:43:49 -0500 Received: from LHREML711-CAH.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 16B078550CAB53C01BB0; Fri, 6 Mar 2020 16:43:48 +0000 (GMT) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by LHREML711-CAH.china.huawei.com (10.201.108.34) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 6 Mar 2020 16:43:47 +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; Fri, 6 Mar 2020 16:43:47 +0000 Subject: Re: About commit "io: change inX() to have their own IO barrier overrides" To: Arnd Bergmann CC: Sinan Kaya , "xuwei (O)" , "Bjorn Helgaas" , "linux-kernel@vger.kernel.org" , Jiaxun Yang , linux-arch , Linux ARM , Will Deacon , Catalin Marinas 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> From: John Garry Message-ID: <15e7158d-184d-9591-89a6-cd6b10ef054d@huawei.com> Date: Fri, 6 Mar 2020 16:43:46 +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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.45] X-ClientProxiedBy: lhreml716-chm.china.huawei.com (10.201.108.67) 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: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. Thanks, John