Message ID | 20230503-virt-to-pfn-v6-4-rc1-v2-11-0948d38bddab@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 9B31AC7EE30 for <linux-arm-kernel@archiver.kernel.org>; Mon, 22 May 2023 07:02:17 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xp9XSZGz1rW5CxJ2P2/ZFB8ROAbLTUabnnAHIPK9Y3c=; b=o5K4DDLFSFlgt0 F3TPkVsyrrzxxPe6Bvj58NHpHqY78gzJMZcQ25AoTTkNsZRoHFEQ+HPOOVD4CqSgNa2nw5AJ5fWY3 FddOkRuaCzHPsbJXcgqe4NfGqAz8XbX48Jjs9+Fv+CPjQb8U8WVnCE5FSadVZDzyHqtDMgtoEdiz0 aM2I+aS6ncw1WyObXhfczQrCM8mzgD7kEsgKw0/YwZzBu+OfF6pSl5uogfE6KpEzo1LRqLuOMtEOn wQVIW+ArGIVJMetL8qRMh/JX8RyaUnTOnM8YcQsPEl3aMbO3KKKG8CyUR+mcOsrELVIEIKYoKPtME QaOifWbcM7TY1lwP5+Jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q0zYF-005Zts-29; Mon, 22 May 2023 07:01:51 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q0zXN-005ZNl-0E for linux-arm-kernel@bombadil.infradead.org; Mon, 22 May 2023 07:00:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=721W88MgL2sNJMPnk6EOnDreN0TGHiKcLljkK4k+Xz4=; b=ozTyYnE0WZkqlj+gubFYZ8e8cq 7fBRB8MY9zMzt7DQbZdEHIPKrMrD5JOuwP93euNjOgXzmDfkbTTTnzd33Pw+8Wgh1seQFIxVMQvng SjM9yhmugbyXXSVDyN64y72L6immr7Yb7BIqlsRwqDduGZM8vxShtvLc6n+vvY6XVl49F+rWG22Lu v1rECEONn88e2vKJYyTyJ75Ime4SZz5fLBFpb+aLb8BdSIABSPAxLHZ5Nk4GOHFrYtoT/bPWVFk80 JoWnqT87O2g11HlpIDFsjW09m1wlEDXWULxDQSqrNNexBz9smx91PGaXi0auwUgR7nY43L0hT+m/L ewwauEJg==; Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q0zXJ-001xct-0D for linux-arm-kernel@lists.infradead.org; Mon, 22 May 2023 07:00:55 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2af278ca45eso32455751fa.1 for <linux-arm-kernel@lists.infradead.org>; Mon, 22 May 2023 00:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684738851; x=1687330851; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=721W88MgL2sNJMPnk6EOnDreN0TGHiKcLljkK4k+Xz4=; b=XQtAW71u4fTNd1m3CoQ2jBdXD9/L9co0wiCGXKPV7VPHkFBkn2paLpq4u7Zun4vihP Jt89fVfIK/kqwIEhUG0rEaMiY9youfI2gwNHpVmFNoLUlHPTqMB+dSsLsyZ0Nud3GfbF dtwCWhOjSDsxmfy8EsojhF7c8s35Z8LE87tWI+GqyJFAAak2TwvLXaQdq7RckdkYTHnU 18kKgbLJk4GVeA4A4vRYQZN2Dj0n1wcSakUxJpXVVadQkTB4oxfQonCpFh8YOMyqM+LF 0rSyjSqVr+DzD+fnTYDbXV9mB2Zq6QefKszArXVUbAr8pzAQFYflvnoSfXBTu+vX7dJn HUmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684738851; x=1687330851; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=721W88MgL2sNJMPnk6EOnDreN0TGHiKcLljkK4k+Xz4=; b=TqPA0IVPCO+o2Ib8w4DCzI24P2UqffhPmVm7nmqoZxM74r4+OcUfjr3nETfdEgfkzm vIjBo902y+aI5khIqp2Okz7ZVgRw0CAu55yySv7JfPjaLhrap2YX7dhgBoNzqJiQYzkk +RpDMB3R8A7xgn1jXJU2Fm2GoHsXRDzhHcMnzDe75saJpJ0L6mjVlLKU3iuAirPClJ5x Z2kgprn8SX7W0x8oZOVtfKs6JwTMNGADjZy8LKiwAq/qHoLFiK7XmbBSXLCFhk8BEFJj l+xQV0OJ6peO0elMf/DGQHmuL07XfdyOfKLfBZohFRU8sQ5NK7WUxGlC0MgBT1JM0WoM /DuA== X-Gm-Message-State: AC+VfDzmwxeAcn6uQzdBh3l3o+hTjOFygx3yFVEW9powsJRFFTVBSGXb pPLR0N6mRw2qoT9Mlsx3IWZOCQ== X-Google-Smtp-Source: ACHHUZ5ydZUl5A6m9S8q9aK0NB+Gru9l4ALPwz/cspLv7wmn5Xxzg3mgI231HvvSe3EG+T/ALpu70Q== X-Received: by 2002:a2e:8e89:0:b0:2b0:259d:f670 with SMTP id z9-20020a2e8e89000000b002b0259df670mr453615ljk.4.1684738850979; Mon, 22 May 2023 00:00:50 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q4-20020a2e8744000000b002adb98fdf81sm1010187ljj.7.2023.05.22.00.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 00:00:50 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Mon, 22 May 2023 09:00:46 +0200 Subject: [PATCH v2 11/12] arm64: memory: Make virt_to_pfn() a static inline MIME-Version: 1.0 Message-Id: <20230503-virt-to-pfn-v6-4-rc1-v2-11-0948d38bddab@linaro.org> References: <20230503-virt-to-pfn-v6-4-rc1-v2-0-0948d38bddab@linaro.org> In-Reply-To: <20230503-virt-to-pfn-v6-4-rc1-v2-0-0948d38bddab@linaro.org> To: Andrew Morton <akpm@linux-foundation.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Vineet Gupta <vgupta@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, Greg Ungerer <gerg@linux-m68k.org> Cc: linux-mm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-snps-arc@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org> X-Mailer: b4 0.12.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_080053_980449_C1DE670B X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
arch: Make virt_to_pfn into a static inline
|
expand
|
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index c735afdf639b..4d85212b622e 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -331,6 +331,14 @@ static inline void *phys_to_virt(phys_addr_t x) return (void *)(__phys_to_virt(x)); } +/* Needed already here for resolving __phys_to_pfn() in virt_to_pfn() */ +#include <asm-generic/memory_model.h> + +static inline unsigned long virt_to_pfn(const void *kaddr) +{ + return __phys_to_pfn(virt_to_phys(kaddr)); +} + /* * Drivers should NOT use these either. */ @@ -339,7 +347,6 @@ static inline void *phys_to_virt(phys_addr_t x) #define __pa_nodebug(x) __virt_to_phys_nodebug((unsigned long)(x)) #define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x))) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) -#define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys((unsigned long)(x))) #define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x)) /*