From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA362C64E8A for ; Mon, 30 Nov 2020 17:22:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F33B20789 for ; Mon, 30 Nov 2020 17:22:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AUR6o0FV"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TGw3iJHv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F33B20789 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID:Subject:To:From: Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=BrtAi2S1CoNpVxuyhiKtKKFgg1Gi7+RMrTHOUI2qiXg=; b=AUR6o0FVWNfRZoIZSuHH2ZHbg p7E3niqJtsaWC1o6/keDBkAojGUuvPMKWWnwDmmHU/0aq2ZiAuDBGxQNIYG6Len496lh4npgbyljm /j+QPZMChw0IAArn8+ZLqmjbXDVX3MF9nKA48MrIKJF1ODPqx/uMRvuZ/54unqZ0Syw+BqCygl+B5 ETjhIFbQAotCyt2mtsmTumsmldprmZXT0nNYRGRxiASik8trvHTQ1oMZVNi0icxRpF54u/puu6pNX H4nWOjzMQy8WGHoMLQyxeU06Nj395f1dAHmN/k3iV3JT9SrmMog9wpzd9JEvLz8Cd+7uI1Wu32a9t 0qsZtSMnQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjmrK-0000U6-Ih; Mon, 30 Nov 2020 17:21:06 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjmrE-0000Sp-Ky; Mon, 30 Nov 2020 17:21:01 +0000 Received: from localhost (129.sub-72-107-112.myvzw.com [72.107.112.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E7372074A; Mon, 30 Nov 2020 17:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606756859; bh=CbyJZAykpCyvjLTpCkzzfJ9pt8bGnYt3xwR2qqUfoI0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=TGw3iJHvgbb+g7diOKMOugr/nuC73+5xTFsD9rPkDlD83W1yHAv7Z9v4H3q8I+h2c xfiTLITVOpwfI8mn+Ad8xB8BJQI4zSsYIJBr4W2mHE1j1LovJTR5pfq9Lf1A6rY2iM aagN+CcdLl1BicBBB0tVOwQNrEZ9ea5LezYWYgRc= Date: Mon, 30 Nov 2020 11:20:58 -0600 From: Bjorn Helgaas To: David Laight Subject: Re: [PATCH v6 4/5] PCI: vmd: Update type of the __iomem pointers Message-ID: <20201130172058.GA1088391@bjorn-Precision-5520> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <81f4ddc2f0524b4b80c8a0bfa2df57fe@AcuMS.aculab.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_122100_851886_32D11F9F X-CRM114-Status: GOOD ( 19.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 'Krzysztof =?utf-8?Q?Wilczy=C5=84ski'?= , Heiko Stuebner , "linux-pci@vger.kernel.org" , Shawn Lin , Paul Mackerras , Thomas Petazzoni , Jonathan Chocron , Toan Le , Will Deacon , Rob Herring , Lorenzo Pieralisi , Michal Simek , "linux-rockchip@lists.infradead.org" , "bcm-kernel-feedback-list@broadcom.com" , Jonathan Derrick , Ray Jui , Florian Fainelli , "linux-rpi-kernel@lists.infradead.org" , Jonathan Cameron , Bjorn Helgaas , "linux-arm-kernel@lists.infradead.org" , Scott Branden , Zhou Wang , Robert Richter , "linuxppc-dev@lists.ozlabs.org" , Nicolas Saenz Julienne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 30, 2020 at 09:06:56AM +0000, David Laight wrote: > From: Krzysztof Wilczynski > > Sent: 29 November 2020 23:08 > > > > Use "void __iomem" instead "char __iomem" pointer type when working with > > the accessor functions (with names like readb() or writel(), etc.) to > > better match a given accessor function signature where commonly the > > address pointing to an I/O memory region would be a "void __iomem" > > pointer. > > ISTM that is heading in the wrong direction. > > I think (form the variable names etc) that these are pointers > to specific registers. > > So what you ought to have is a type for that register block. > Typically this is actually a structure - to give some type > checking that the offsets are being used with the correct > base address. In this case, "cfgbar" is not really a pointer to a register; it's the address of memory-mapped config space. The VMD hardware turns accesses to that space into PCI config transactions on its secondary side. xgene_pcie_get_cfg_base() and brcm_pcie_map_conf() are similar situations and use "void *". Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel