From patchwork Fri Feb 4 19:58:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12735517 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAD28C433FE for ; Fri, 4 Feb 2022 19:59:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D1CD86B008C; Fri, 4 Feb 2022 14:59:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B792C6B0095; Fri, 4 Feb 2022 14:59:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8424E6B0095; Fri, 4 Feb 2022 14:59:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id E20BF6B0087 for ; Fri, 4 Feb 2022 14:59:05 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A99F596F01 for ; Fri, 4 Feb 2022 19:59:05 +0000 (UTC) X-FDA: 79106161050.11.F5BFC44 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 494DD180003 for ; Fri, 4 Feb 2022 19:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=4LhiUb2YL8mECv8XTDZL8CGh0I12b+7YaoyPvJgbat8=; b=uoxQ8XePDAxD5eIOshL/zh9+ds rbcAE5b6NeLwDbv0w9Ds894HhP+diifs99OW9x5AvTBzdic3K/Sc5JwBUIDm4BJiEWXfknmFR3YBH Z9NH7dIwnYXmk3Blt6du5vXnKIjyCD7uwsZ9IPcudMIY8SeYF7xIKWs4MZKPX22iYHJCP2CkvAdvH +nuo2kwUsD+4Hb7frq9e7lwJDMSxbDH/4h4WF5kaFHHR3SQXRh1IRQHqWM49V2wFN0I/tdczaU/kH EzSdIA2LsNxmejkwEFB6tlPkgxa8wRUHVy3KFZ+a+HS99txIwGmcG2g6CYkbJzO2cg0Kj1OMMjeZ3 fxd+oegg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nG4jX-007LnI-OQ; Fri, 04 Feb 2022 19:59:03 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH 41/75] hexagon: Add pmd_pfn() Date: Fri, 4 Feb 2022 19:58:18 +0000 Message-Id: <20220204195852.1751729-42-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220204195852.1751729-1-willy@infradead.org> References: <20220204195852.1751729-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 494DD180003 X-Stat-Signature: k4qmrwpsi11wpqpjaps8htzneewzmzwr Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=uoxQ8XeP; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspam-User: nil X-HE-Tag: 1644004745-743548 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: I need to use this function in common code, so define it for hexagon. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Mike Rapoport --- arch/hexagon/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 18cd6ea9ab23..87e96463ccd6 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h @@ -235,10 +235,11 @@ static inline int pmd_bad(pmd_t pmd) return 0; } +#define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT) /* * pmd_page - converts a PMD entry to a page pointer */ -#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) +#define pmd_page(pmd) (pfn_to_page(pmd_pfn(pmd))) /** * pte_none - check if pte is mapped