Message ID | efa3cff65f71cf492702e835250667cb976b9e6d.1728954719.git.ritesh.list@gmail.com (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 176F4CFC501 for <linux-mm@archiver.kernel.org>; Tue, 15 Oct 2024 01:34:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A142E6B009D; Mon, 14 Oct 2024 21:34:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CA346B009E; Mon, 14 Oct 2024 21:34:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 816B76B009F; Mon, 14 Oct 2024 21:34:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 61B196B009D for <linux-mm@kvack.org>; Mon, 14 Oct 2024 21:34:24 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 93592120402 for <linux-mm@kvack.org>; Tue, 15 Oct 2024 01:34:16 +0000 (UTC) X-FDA: 82674116238.23.8E90E54 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by imf04.hostedemail.com (Postfix) with ESMTP id 4B16F40003 for <linux-mm@kvack.org>; Tue, 15 Oct 2024 01:34:13 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=C27JJMw+; spf=pass (imf04.hostedemail.com: domain of ritesh.list@gmail.com designates 209.85.210.172 as permitted sender) smtp.mailfrom=ritesh.list@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728955919; 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=oTnklaF1aF0bTWeWldi91Sj9bwNgHQZw6gVAVQdUYd0=; b=JYB3B4h1AAeiUaB/hPedWo0pXbekIzwudXIxQEUP7F6yAlr3qkNKBNiaHTgxBj7gkwofhM rYI/DTMtVTEZtxbwbXQwMTHuqNFEZGvkfRtMJktxS8sQ/ImHo2fiyA2O87/2MEjcOexSPI pb/a2LfLtAL8g0cennaM33Vx0E9zOoI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728955919; a=rsa-sha256; cv=none; b=vQfOQsox9Xh27ej0InYHnsvoO6PqquVs49W0ffHBa8HZXwG8u5C+UoI/uRcJI2L0zkg1Ms lljMNo6z33H9OXb+BVrE9KCq6xEgmg51hmirqQ4gyUauyUj9yIbe/5lCz9taivT6c5K0Qm PSwYkXVUMCvLccLuWKshLnDy/mr8860= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=C27JJMw+; spf=pass (imf04.hostedemail.com: domain of ritesh.list@gmail.com designates 209.85.210.172 as permitted sender) smtp.mailfrom=ritesh.list@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-71e625b00bcso1366310b3a.3 for <linux-mm@kvack.org>; Mon, 14 Oct 2024 18:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728956061; x=1729560861; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oTnklaF1aF0bTWeWldi91Sj9bwNgHQZw6gVAVQdUYd0=; b=C27JJMw+q6oHdzyeZbNKqwG5WmNN2Bl2iuey7qYLZD7aZU21azXief2QQ96w8uWjp/ 8SUKArVh8NCQpyDMAKTR9SaFOdexlDAcjRQwqR1Jd+2LhFbCKehn/2sIUxDrSQkb/mZu 9oYcqHoPjNbbxxNYz4Do1pd5E7nQ3v18KarO4JCR0LZYQClePLq/jsY0i5O4oGesnyMc yb2c1YluCPfA5rZ7KR5EIHbvwSG40u/5751I118DtCK+U2cdoR/k+1ZPp5gOCsZs/gYK 4pat53bNxJ84qQVqM12yDyEf+bhgZqMhi/7D1UWvjs/H3qaCkS/1G1sV62Hwd4I4mCwA HrAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728956061; x=1729560861; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oTnklaF1aF0bTWeWldi91Sj9bwNgHQZw6gVAVQdUYd0=; b=TTVR2AGtoQqhEk3O0p8hKq3zpPp/+PvazkyB1bFPxTg6DNQiE/8OITZezPVdL4vdqI DQTL6M8me6Gj68eYxt5j8xydcAYwwrfcn1SJo6FOt7DVtHS9cMuop75uyst7RU4OOcGD yhf81bJfWdMyMI8KUE/UxbrDvHKa9vAKEbFYR76bV4a55dqr8wN8k3YHNtGV60DCsQtW nRxWFIYqEc3az26pegB0nUqEd3tmo5gYP2CZnnuxoUfVAWvLelVdGvhGQ1pSzYS88qc5 Z5QVHgZ/FOQ+tQ1YjWXTljarmxMY/8ewZaj8BU1M+RlqRKLtHkSB0uu3ujbG7X9TwPNL PqCw== X-Forwarded-Encrypted: i=1; AJvYcCXsHuxqafNGIOor7abq2eB+L51b/oP2eZA1gDeDPjEuMq4TNtUjy+UZO6jLqpZRG4oPKXB0yD1kaA==@kvack.org X-Gm-Message-State: AOJu0Yxz92q1gHF1cpfuaxm1mikEyFB2Gdho5M7Xvpu7vLznA0Vl/qZF 5wzHm3IphMs4idVsxY0mu0uafAzWZwVqcNqaG20vy+OZueYHAnuBg93Ipg== X-Google-Smtp-Source: AGHT+IFT6UGlq+wYgtgPhE6bzO8Rllrurc9EHvyW/SZWzz7xpV6AjzAWDpsP/H6dyEXrivEMXbEKOw== X-Received: by 2002:a05:6a20:cfa4:b0:1d2:e92f:2f48 with SMTP id adf61e73a8af0-1d8bcfa7ef1mr19096796637.40.1728956061028; Mon, 14 Oct 2024 18:34:21 -0700 (PDT) Received: from dw-tp.. ([171.76.80.151]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e77508562sm189349b3a.186.2024.10.14.18.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 18:34:20 -0700 (PDT) From: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com> To: linuxppc-dev@lists.ozlabs.org Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org, Marco Elver <elver@google.com>, Alexander Potapenko <glider@google.com>, Heiko Carstens <hca@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Madhavan Srinivasan <maddy@linux.ibm.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Hari Bathini <hbathini@linux.ibm.com>, "Aneesh Kumar K . V" <aneesh.kumar@kernel.org>, Donet Tom <donettom@linux.vnet.ibm.com>, Pavithra Prakash <pavrampu@linux.vnet.ibm.com>, LKML <linux-kernel@vger.kernel.org>, "Ritesh Harjani (IBM)" <ritesh.list@gmail.com> Subject: [RFC RESEND v2 07/13] book3s64/hash: Refactor hash__kernel_map_pages() function Date: Tue, 15 Oct 2024 07:03:30 +0530 Message-ID: <efa3cff65f71cf492702e835250667cb976b9e6d.1728954719.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <cover.1728954719.git.ritesh.list@gmail.com> References: <cover.1728954719.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 4B16F40003 X-Stat-Signature: j6ejw3odk3tuxkungf8xohmptssqpcbs X-HE-Tag: 1728956053-608510 X-HE-Meta: U2FsdGVkX18FdIPXFjevjW43DbVav0kj+c/6K2YW0co+wh8XL/jc/6dWXzDFabdP3gEmNN/+A48Ya8NXyuqAdy0zP/Ins4xyGodgnlLHblz3G8cvjgKRxI3riul0qkPTk/JitLeeDQr9nVqGXIhyLfbxXq7ApS2xfpl5xGukFA6U3Bq2tA3UrCQ4EU5tHQROReDtOxF9bEPOE4oVJIA1tRPSxbbL1BGgcmfx5lPd3bgbE3Sam2rOGqazPdFRsuNQ/4SaH+gAF0wH2EGKY1FksiAyffsO2hREp+jwjbJ1cBR6BHOi/kVyxw74gDwkCmlGfccw+GPsCuAN00DNw2a7+1G3Q7kyNGIiEcrhjdFt4i7jnGy70wUhn+dDDC/JUENmQxifKSr8ZAhDUEAp5ir4/xzjmgSJDFItGAO5hrtBEld7G6HtcYyO0ujrYp64hMyYAYPfutcMAhl1DdpbE3QJz04lcGgZ4E6ur1viOfIJrFmkOVEbPtKrneOBXwkDLO6FdNb36axjd69xWQ7Ty/AiW91pQQYVmUVcdiQmlZ9u613IDbS/QdUmZwV+PZVwxPq07OqcL0J8lK2YLOWVc+5s+qUNs3wfQBK/Vb4bXfnxVrItfwSuq6731rDPMV0Tvpjpp8fkbILJqm1p2Egf70s21yy3DvUG+mD7U7/cOgO7nirW7bxuVzChigq4pQZTksQ87AmLp849CcmW92HWqVkWqAljV3gKOUL1LHHtp/OK8fzoIYoEYmcdwM93I69rQTLQl621DgWV7xsDK0gfmzV4twUdrC0Mm0L/uNZ74V5TBrotqY1brL3roCfGUTOop83xR0p1LgJJYXDP7nV2r3cetgVQf2TGbba7WL8q8/lbus7AzRXYI61e+TvOjcC+U1Q16jl2/cRhN7PhtgPsXjEUPS9JCMcSm7RNXrsXieEz9t48HWH+HBGTbl98jNMa2kvOmVLgXgkoIVqgE2e6Prm KvO5CRX6 8cTce1UWw8z6ehTJUb9XssBsXtzxjgcQV1awU59KL3Vokh1y3WWy7QAzMCtaR4HZFXD/A0CQFPdVpQFss6roFbkhOK/I6IOajUJO2LJh11zLW7hgLKxSF5DjjlGTxP3Dhag5TksBtQjsnLPyxxNvlwTl/C8sGfIyJ9Jy04S0FaAwqYsI3SRY6te8Nu004oc3MdMzrYGfoXJEAIZPzIB1Bb0MsYFLCInyDbX9m8ZwGBpnM8z/qI+H2qm87viKqeVjodvJ9CAS3Y0cvtD7Wihm2pqI9MCxHClxMUwYmkr8/4q5L2WakGyxv5k8+qfNHAoxSec2oxFG80P6PTnSq32vD0E+srQ== 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 |
powerpc/kfence: Improve kfence support
|
expand
|
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c index 030c120d1399..da9b089c8e8b 100644 --- a/arch/powerpc/mm/book3s64/hash_utils.c +++ b/arch/powerpc/mm/book3s64/hash_utils.c @@ -349,7 +349,8 @@ static inline void hash_debug_pagealloc_add_slot(phys_addr_t paddr, int slot) linear_map_hash_slots[paddr >> PAGE_SHIFT] = slot | 0x80; } -int hash__kernel_map_pages(struct page *page, int numpages, int enable) +static int hash_debug_pagealloc_map_pages(struct page *page, int numpages, + int enable) { unsigned long flags, vaddr, lmi; int i; @@ -368,6 +369,12 @@ int hash__kernel_map_pages(struct page *page, int numpages, int enable) local_irq_restore(flags); return 0; } + +int hash__kernel_map_pages(struct page *page, int numpages, int enable) +{ + return hash_debug_pagealloc_map_pages(page, numpages, enable); +} + #else /* CONFIG_DEBUG_PAGEALLOC */ int hash__kernel_map_pages(struct page *page, int numpages, int enable)
This refactors hash__kernel_map_pages() function to call hash_debug_pagealloc_map_pages(). This will come useful when we will add kfence support. No functionality changes in this patch. Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> --- arch/powerpc/mm/book3s64/hash_utils.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)