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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F6B4C433EF for ; Wed, 27 Apr 2022 17:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: Message-Id:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TxPK5SnMtZWZQh3LWbcAxWGeRJT21VbnmOJFQ+SabPo=; b=ne6ZcPEP9F5w3S gyGj38c1/OOvYd0COXMPAbT4w05vq8rlfWT08ZbvRsWmIQdYwOOKdoacuijd/j6aroyVieJtNHVP+ p2hRvPCMnZYxXcgp6jlU6rnDeRW/mqlNgbKCxAZM+Dy1130zIxrHV5iWisXkAnjdm/BpGVJQViOhF t9T55ZXaT6YOr6kLCLPVpy/Ul3FgqgsLd5u4T9rnmndQ3Xn9TUj7LqfVyGKcrIOFuKx/BQ2kqZbsG H9SQZalMYH/QD8BeXjf9U1M/4iyYod3dIV2MhwrfLpvpNgF2luyPjYPLxU9Iav8PZqbB+GSWqHEwT kcV9f9gmSbgcOwYvnQsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njlNC-002dBm-Tw; Wed, 27 Apr 2022 17:22:43 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njlBb-002YM4-J1 for linux-arm-kernel@lists.infradead.org; Wed, 27 Apr 2022 17:10:44 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 418E761E04; Wed, 27 Apr 2022 17:10:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6550FC385A7; Wed, 27 Apr 2022 17:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1651079441; bh=l8saX0DCGAYsIkk1Ixkvp/bP+VE4XtuTAfKwaVWt6eE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=zU2f9OU9vNaGvbUQZABYEJIyDv0rbP4jQWq8LFn5FZq7Dw+LFamnG2tnxulkmfuml CKaNkOqoROiQdOY9ssBOvhnnTObaTy210EIDPYP7HrkfOYZ0T9VvTB26TOJMzdQh2m 1P9vBSidPcXS8wUWvWett4r2Tb3DlvNCcpvTz8zI= Date: Wed, 27 Apr 2022 10:10:40 -0700 From: Andrew Morton To: Kefeng Wang Cc: Catalin Marinas , Will Deacon , , , Subject: Re: [PATCH 1/4] mm: ioremap: Setup phys_addr of struct vm_struct Message-Id: <20220427101040.bd4532c8ef093b47b3dd9eb5@linux-foundation.org> In-Reply-To: <20220427121413.168468-2-wangkefeng.wang@huawei.com> References: <20220427121413.168468-1-wangkefeng.wang@huawei.com> <20220427121413.168468-2-wangkefeng.wang@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_101043_741216_6E7B283B X-CRM114-Status: GOOD ( 15.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Wed, 27 Apr 2022 20:14:10 +0800 Kefeng Wang wrote: > Show physical address in /proc/vmallocinfo. > > Signed-off-by: Kefeng Wang > --- > mm/ioremap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/ioremap.c b/mm/ioremap.c > index 5fe598ecd9b7..522ef899c35f 100644 > --- a/mm/ioremap.c > +++ b/mm/ioremap.c > @@ -32,6 +32,7 @@ void __iomem *ioremap_prot(phys_addr_t addr, size_t size, unsigned long prot) > if (!area) > return NULL; > vaddr = (unsigned long)area->addr; > + area->phys_addr = addr; > > if (ioremap_page_range(vaddr, vaddr + size, addr, __pgprot(prot))) { > free_vm_area(area); Acked-by: Andrew Morton I checked a bunch of arch-specific implementations of ioremap_prot() and they're already doing this. As far as I can tell, only csky and riscv actually use this file (CONFIG_GENERIC_IOREMAP=y). But you're ARM(?) so I'm wondering how come you're patching it? Someone should do s/addr/phys_addr/ in this function, like the rest of the world (sensibly) does. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel