Message ID | b10988a38406b5a6ceae79c30d3dd65d3e5b40ab.1711377230.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92C2AC54E64 for <linux-mm@archiver.kernel.org>; Mon, 25 Mar 2024 14:56:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 258016B0098; Mon, 25 Mar 2024 10:56:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E0066B0099; Mon, 25 Mar 2024 10:56:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A7E86B009A; Mon, 25 Mar 2024 10:56:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EEA776B0098 for <linux-mm@kvack.org>; Mon, 25 Mar 2024 10:56:40 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C91C01A06B0 for <linux-mm@kvack.org>; Mon, 25 Mar 2024 14:56:40 +0000 (UTC) X-FDA: 81935862960.04.D61E823 Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by imf03.hostedemail.com (Postfix) with ESMTP id C39C52001B for <linux-mm@kvack.org>; Mon, 25 Mar 2024 14:56:38 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.236.30 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711378598; 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; bh=qZ5KCYPj4SMvT/HBTq5bq8L6nreeyk6uwD9/N46B+Gs=; b=Oq0RY2SdnZyB0C/Wk8RNgZ8U+xY2ydEvthe3yv7g2133mxAJ4IFNoC+8QZwClZuFruDylH mYKm4PzFwC5FY5+4zsRzkG1AO7cgC4XQ/bVYfuxDZOCXFjDL/F09lKCTgnSZsQJuLeh+Px kMUSLhOQ6xSaiegiV88tZRXBa0spGGU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711378598; a=rsa-sha256; cv=none; b=KcSKer0HvlN34HBOWyA4JyU1zQgvNuyiDfviym40xr9/u+SprSXHrF36BfeO1w1TQmjLMc lMLSWfI7PEuvFTAo/r/L3QsRc5xQqTsnllAZDiQuVv7Lu09L349zb3NmfhFHEZIsFlLIUK gT8pOBnLRG7UHZ+o/GmsZOLyVa8Emps= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.236.30 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4V3GGT3g45z9snj; Mon, 25 Mar 2024 15:56:17 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CGKskKphEDJv; Mon, 25 Mar 2024 15:56:17 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4V3GGK5rj0z9scH; Mon, 25 Mar 2024 15:56:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C557B8B765; Mon, 25 Mar 2024 15:56:09 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id sXq_S5qTELHS; Mon, 25 Mar 2024 15:56:09 +0100 (CET) Received: from PO20335.idsi0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A4DC88B76E; Mon, 25 Mar 2024 15:56:09 +0100 (CET) From: Christophe Leroy <christophe.leroy@csgroup.eu> To: Andrew Morton <akpm@linux-foundation.org>, Jason Gunthorpe <jgg@nvidia.com>, Peter Xu <peterx@redhat.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH 6/8] powerpc/8xx: Fix size given to set_huge_pte_at() Date: Mon, 25 Mar 2024 15:55:59 +0100 Message-ID: <b10988a38406b5a6ceae79c30d3dd65d3e5b40ab.1711377230.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <cover.1711377230.git.christophe.leroy@csgroup.eu> References: <cover.1711377230.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1711378567; l=902; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=Lt4RxvANgRMdtDBAVPsx//g2luBxg6RgUDKkYHSTyhY=; b=c9gTmd1HGEGsfYiLHRnhana1OzLTL6trd8ka61OZyKCy5KH57OasGxcAO+/VSMoNQJJQ2bs+v xysdBK83WZFAJyRPxyzJLps05TlJdfoMccQzAAXNNuMiV2r8FUxHCkC X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Stat-Signature: 53fz9i9pnmizyi4zkhw366edgprnkjaa X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C39C52001B X-Rspam-User: X-HE-Tag: 1711378598-77340 X-HE-Meta: U2FsdGVkX1/FGFlCJbSP6mPMASJJqCtZ6KnA2cJD/4wpnes+zs7yo4ZHMFLfJSEG/xxtJtI2xR34b6nS/ap9MqB0kqaYL5W46CMlsXHmawTwQJsMJwIzIPliR6a2peidRASdLg6iZEnWcxljcNuUenNemau1IthtYGY6f7nAp0+DiMD8PH78IGAWSZJKfJDXbrcwjTQesHd9wHzoGRg8E6vFCoGDHYypnbROvRgCRBhlmLTdtXR0BTW8L19ex/90HYRT9L72qQ0GdDY2c2n1BHKQZf0GJ9hyLInchv3QQSWPh+A7Kf+ERZaBUNiEOWuJOI0aGXILWZdbpHTW8nj7Mtz2FnQ32F+Jn48MJF6AzgPsl7uFNBoHZh5JpWRI/iu9JGGVdJ8KOF2XzUtxK7IeWLQuaJckW02fkegCpUfIGvUzEYdGxCSvhKG77QfCWjWLBlHfXLj5RaVTStfC1PBA7yPApbj+C6aauEMXiljGAZ6TVPcntX5EqmLnqX2oRJ/vq8y4nn2OL51pakZSaLVO52i8nUrwhqwCFKFTcqvHtj3tH8phISNa42mHXTegxmU6xnC1VcZzMQ6kb1hyphAHRBEkkSHBvDk++kF0s+z7Mzcjn1fOEmQExQ4ThX1OQWO9n029iKi6UCsaOGdq77AmuFuwvp8HdsHtsJa2L3CWEaDF534MLdzIbrLOjBCBIu8hD4GfUdQ0G9I4eWZ8w0WKss/pkJleqv0ernQYDDTHzkRErqnmWlnYYfRn15YboAcNoR6LxnOfOoP+esIRwEvJTpEmuQMCohlAX8WOAMfq4cPwVXzqyR6Sq38+QYUoUTxJt4kFRaoteHZsiNQhh1Oe+7Az/S0Pq6BEPqwu2PR+tkY= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Reimplement huge pages without hugepd on powerpc 8xx
|
expand
|
diff --git a/arch/powerpc/mm/nohash/8xx.c b/arch/powerpc/mm/nohash/8xx.c index 6be6421086ed..70b4d807fda5 100644 --- a/arch/powerpc/mm/nohash/8xx.c +++ b/arch/powerpc/mm/nohash/8xx.c @@ -94,7 +94,8 @@ static int __ref __early_map_kernel_hugepage(unsigned long va, phys_addr_t pa, return -EINVAL; set_huge_pte_at(&init_mm, va, ptep, - pte_mkhuge(pfn_pte(pa >> PAGE_SHIFT, prot)), psize); + pte_mkhuge(pfn_pte(pa >> PAGE_SHIFT, prot)), + 1UL << mmu_psize_to_shift(psize)); return 0; }
set_huge_pte_at() expects the real page size, not the psize which is the index of the page definition in table mmu_psize_defs[] Fixes: 935d4f0c6dc8 ("mm: hugetlb: add huge page size param to set_huge_pte_at()") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- arch/powerpc/mm/nohash/8xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)