Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3413631ybf; Tue, 3 Mar 2020 05:39:13 -0800 (PST) X-Google-Smtp-Source: ADFU+vsJ4GF80cdgKNS9lZTXZ7BUDWjORAop/LMPpIfzgNvbN9t4wl1MmAzAYVV/gTOWZcMopn1g X-Received: by 2002:a9d:7c81:: with SMTP id q1mr3305520otn.112.1583242753374; Tue, 03 Mar 2020 05:39:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583242753; cv=none; d=google.com; s=arc-20160816; b=qBUU615uxKPQkOjRU6pd5oTF4/T7uSmWSLnA4Zewn0pIU/Im/b8613Iy4+Udkji7VF Kyymy8VjsL15w0zlLurWUpNu47N75pViSdWD1LBYOuF2pBhRrfOtoUDpQdkA1hw5rDgb l/+Rl5M2xiBSNMcmuFO91Bc1Op13r6IoEDkgNsHXsixL9GltK3dBieLNlSLkxSzZNBw/ /pte8FFjhevhMp8icgHzuspbo8Ty9jeFq2R03Ioqe5DXV7w1tf0ZnVuKbmB6nVcnAIa4 +LFPXwfFkHX/ADvAGZrSM3WMytAIyNey0xa9bc6fiSJYauLtRl24LgL8g5Ux21f/1PYV xkBA== 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=w6l47pFWYujF4ptB1s28UIfv9SGaYV9SkISYMKoO3wU=; b=txhGBOQb6L2bD3NliyClg6ncojbzaGb5xxQfnHivlpFbM0dCws0qoabjltIkUd8sfI Rk0e4cieOOQs6QBKEemlH5U2yYfFEmnNPNCJQK/vGhqMe2sk+ze4ZKxACYRQwapxfyRU H3UCo5Hiexn5KjX5Af5EK5vREeCQES7LDVDfBxwEhxlY1j8VlRZDNqTvQgKzx3xbiIqY LdZCVMMB0U3OYF9PIojwBkE+6rrv5TsUxBafusOB8hUvvILX/Nd0puGp/HE6PxKe5Xze sz+89t0FGRSh6qOWSjOQru6PjyJePXfPbNI9qd5CHCq/6qHWeTl+LU1oPeQCGmsJ+Kbi HTMw== 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 l6si8090815oti.249.2020.03.03.05.39.01; Tue, 03 Mar 2020 05:39:13 -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 S1728552AbgCCNSY (ORCPT + 99 others); Tue, 3 Mar 2020 08:18:24 -0500 Received: from lhrrgout.huawei.com ([185.176.76.210]:2504 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727901AbgCCNSY (ORCPT ); Tue, 3 Mar 2020 08:18:24 -0500 Received: from lhreml702-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id A3C06456DF2344B7B802; Tue, 3 Mar 2020 13:18:22 +0000 (GMT) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by lhreml702-cah.china.huawei.com (10.201.108.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 3 Mar 2020 13:18:21 +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; Tue, 3 Mar 2020 13:18:22 +0000 Subject: Re: About commit "io: change inX() to have their own IO barrier overrides" To: Sinan Kaya , Arnd Bergmann CC: "xuwei (O)" , Bjorn Helgaas , "linux-kernel@vger.kernel.org" , Jiaxun Yang , linux-arch References: <2e80d7bc-32a0-cc40-00a9-8a383a1966c2@huawei.com> <8207cd51-5b94-2f15-de9f-d85c9c385bca@huawei.com> <6115fa56-a471-1e9f-edbb-e643fa4e7e11@kernel.org> From: John Garry Message-ID: <7c955142-1fcb-d99e-69e4-1e0d3d9eb8c3@huawei.com> Date: Tue, 3 Mar 2020 13:18:21 +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: <6115fa56-a471-1e9f-edbb-e643fa4e7e11@kernel.org> 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: lhreml725-chm.china.huawei.com (10.201.108.76) 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 + linux-arch For background, see https://lore.kernel.org/lkml/2e80d7bc-32a0-cc40-00a9-8a383a1966c2@huawei.com/ >> >> So today only ARM64 uses it for this relevant code, above. But maybe >> others in future will want to use it - any arch without native IO port >> access is a candidate. > > I'm looking at Arnd here for help. > >> >>> >>> As long as the expectations are set, I see no reason why it shouldn't >>> but, I'll let Arnd comment on it too. >> >> ok, so it looks reasonable consider replicating your change for ***, above. To be clear, I would make this change in lib/logic_pio.c since __io_pbr() can be overridden per-arch: #define BUILD_LOGIC_IO(bw, type) type logic_in##bw(unsigned long addr) { type ret = (type)~0; if (addr < MMIO_UPPER_LIMIT) { - ret = read##bw(PCI_IOBASE + addr); + __io_pbr(); + ret = __raw_read##bw(PCI_IOBASE + addr); + __io_pbr(); } else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { struct logic_pio_hwaddr *entry = find_io_range(addr); ... (forgetting leX_to_cpu for the moment) > > Arnd is the maintainer here. We should consult first. ok, fine. > I believe there is also a linux-arch mailing list. Going there with this > question makes sense IMO. Cheers, John