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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ABEBECAAD4 for ; Sat, 3 Sep 2022 12:36:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F6C88015B; Sat, 3 Sep 2022 08:36:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A62D8015A; Sat, 3 Sep 2022 08:36:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26DDF8015B; Sat, 3 Sep 2022 08:36:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1012D80120 for ; Sat, 3 Sep 2022 08:36:55 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3685E120676 for ; Sat, 3 Sep 2022 12:36:54 +0000 (UTC) X-FDA: 79870723548.18.FB2A655 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by imf20.hostedemail.com (Postfix) with ESMTP id 605721C006F for ; Sat, 3 Sep 2022 12:36:53 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4MKZ6965QTz4xP5; Sat, 3 Sep 2022 22:36:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1662208609; bh=sV4tSD2O5B+7vvBsY7HHNYSNCdbCB+qWBUs/2RoVWaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BPlEt8k5/4vwHFQY1pkFy+K0H9beeIwyhPUUaz41PKRmRGuPHXivfNeiQZq+JRdGe w4VvT7zL1XYW5ASA/0I9R0zZseF9D/UhMVGtFrVpw0HS6bXc2qodofL793wdqiOXWz PehY1OS/GQbBfVmR7YN5FSzTU0lPTeEjNaCTIh44wWipynW5Y/foayX7X/ig47HOzJ 67MU6jItDvlHUFs/4ZZIqueYBHlK3LruaUlpTXpgebSJ+c6otse9+qYqAYvbgtalc+ UTPcB7BciOSo1S0QQpyrNUjhewZjKTtjB0bMVcfY1xaB4QovpNd5aUyLZjw4mBHF/D Jf92syGdkQ7Ew== From: Michael Ellerman To: Cc: , , Subject: [PATCH 2/2] powerpc/mm/64s: Drop p4d_leaf() Date: Sat, 3 Sep 2022 22:36:40 +1000 Message-Id: <20220903123640.719846-2-mpe@ellerman.id.au> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220903123640.719846-1-mpe@ellerman.id.au> References: <20220903123640.719846-1-mpe@ellerman.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=BPlEt8k5; spf=pass (imf20.hostedemail.com: domain of michael@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=michael@ellerman.id.au; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662208613; a=rsa-sha256; cv=none; b=sMuG89e1opwaCi48M+nsY/HzIjQsWn9Q3ZgslADHGiHiTx/o+rE9KKR3bzH0SY+VBP0anO /J/+5xfxkLO+Shujhypkgx/Dq+vPOj7ldZYYdyM7nFacScEAUx9J68mpc6rDTIkZZ9hsYS Sol42Bb+KrmVPpv+tRUjHZR4ocdsj9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662208613; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=sV4tSD2O5B+7vvBsY7HHNYSNCdbCB+qWBUs/2RoVWaM=; b=0yee1Iy6/f3A7L32CvzIWcUeg/j5kAS1VPLCOCc/qObIUqQT5defpwtSjSqe9XEO8acinM 9PX59LSmcR85S0eH9aGGhvIjFpzy0ZXTe9swpFr0+oQoFgX5S9WcQ9VVVZyY1QeSFluXGL ifCa53Etoq89FSWNtVPTxb7TOeuTMCc= X-Stat-Signature: qras1ta8fz8u35fzbie7w8js17f5ogri X-Rspamd-Queue-Id: 605721C006F X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=BPlEt8k5; spf=pass (imf20.hostedemail.com: domain of michael@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=michael@ellerman.id.au; dmarc=none X-Rspamd-Server: rspam07 X-HE-Tag: 1662208613-593636 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000643, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Because 64-bit Book3S uses pgtable-nop4d.h, the P4D is folded into the PGD. So P4D entries are actually PGD entries, or vice versa. The other way to think of it is that the P4D is a single entry page table below the PGD. Zero bits of the address are needed to index into the P4D, therefore a P4D entry maps the same size address space as a PGD entry. As explained in the previous commit, there are no huge page sizes supported directly at the PGD level on 64-bit Book3S, so there are also no huge page sizes supported at the P4D level. Therefore p4d_is_leaf() can never be true, so drop the definition and fallback to the default implementation that always returns false. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/book3s/64/pgtable.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 486902aff040..057254063e88 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -1459,12 +1459,5 @@ static inline bool pud_is_leaf(pud_t pud) return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PTE)); } -#define p4d_is_leaf p4d_is_leaf -#define p4d_leaf p4d_is_leaf -static inline bool p4d_is_leaf(p4d_t p4d) -{ - return !!(p4d_raw(p4d) & cpu_to_be64(_PAGE_PTE)); -} - #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */ -- 2.37.2 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 E1373ECAAD4 for ; Sat, 3 Sep 2022 12:37:36 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MKZ72759mz3bXG for ; Sat, 3 Sep 2022 22:37:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=BPlEt8k5; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4MKZ6D6XxSz2xJL for ; Sat, 3 Sep 2022 22:36:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=BPlEt8k5; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4MKZ6965QTz4xP5; Sat, 3 Sep 2022 22:36:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1662208609; bh=sV4tSD2O5B+7vvBsY7HHNYSNCdbCB+qWBUs/2RoVWaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BPlEt8k5/4vwHFQY1pkFy+K0H9beeIwyhPUUaz41PKRmRGuPHXivfNeiQZq+JRdGe w4VvT7zL1XYW5ASA/0I9R0zZseF9D/UhMVGtFrVpw0HS6bXc2qodofL793wdqiOXWz PehY1OS/GQbBfVmR7YN5FSzTU0lPTeEjNaCTIh44wWipynW5Y/foayX7X/ig47HOzJ 67MU6jItDvlHUFs/4ZZIqueYBHlK3LruaUlpTXpgebSJ+c6otse9+qYqAYvbgtalc+ UTPcB7BciOSo1S0QQpyrNUjhewZjKTtjB0bMVcfY1xaB4QovpNd5aUyLZjw4mBHF/D Jf92syGdkQ7Ew== From: Michael Ellerman To: Subject: [PATCH 2/2] powerpc/mm/64s: Drop p4d_leaf() Date: Sat, 3 Sep 2022 22:36:40 +1000 Message-Id: <20220903123640.719846-2-mpe@ellerman.id.au> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220903123640.719846-1-mpe@ellerman.id.au> References: <20220903123640.719846-1-mpe@ellerman.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mm@kvack.org, aneesh.kumar@linux.ibm.com, mike.kravetz@oracle.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Because 64-bit Book3S uses pgtable-nop4d.h, the P4D is folded into the PGD. So P4D entries are actually PGD entries, or vice versa. The other way to think of it is that the P4D is a single entry page table below the PGD. Zero bits of the address are needed to index into the P4D, therefore a P4D entry maps the same size address space as a PGD entry. As explained in the previous commit, there are no huge page sizes supported directly at the PGD level on 64-bit Book3S, so there are also no huge page sizes supported at the P4D level. Therefore p4d_is_leaf() can never be true, so drop the definition and fallback to the default implementation that always returns false. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/book3s/64/pgtable.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 486902aff040..057254063e88 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -1459,12 +1459,5 @@ static inline bool pud_is_leaf(pud_t pud) return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PTE)); } -#define p4d_is_leaf p4d_is_leaf -#define p4d_leaf p4d_is_leaf -static inline bool p4d_is_leaf(p4d_t p4d) -{ - return !!(p4d_raw(p4d) & cpu_to_be64(_PAGE_PTE)); -} - #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */ -- 2.37.2