Message ID | 0cb8ddcccdcf61ea06ab4d92aacd770c16cc0f2c.1729271995.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 61CE5D3DEA0 for <linux-mm@archiver.kernel.org>; Fri, 18 Oct 2024 17:30:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E76886B009F; Fri, 18 Oct 2024 13:30:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E260F6B00A0; Fri, 18 Oct 2024 13:30:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C9F886B00A1; Fri, 18 Oct 2024 13:30:54 -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 A9A4D6B009F for <linux-mm@kvack.org>; Fri, 18 Oct 2024 13:30:54 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 4540FC17A1 for <linux-mm@kvack.org>; Fri, 18 Oct 2024 17:30:41 +0000 (UTC) X-FDA: 82687412808.06.FFD08C5 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by imf14.hostedemail.com (Postfix) with ESMTP id A73EC100015 for <linux-mm@kvack.org>; Fri, 18 Oct 2024 17:30:39 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kmgd64rx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf14.hostedemail.com: domain of ritesh.list@gmail.com designates 209.85.210.170 as permitted sender) smtp.mailfrom=ritesh.list@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729272533; a=rsa-sha256; cv=none; b=dzScKGgQZl5Vshy4hBt4EFjnoY0Wz6Nr4wT+EmEZ8K9cbWdbSa0dtGV5M2CK9B/cQRBV27 rAcpsp3IIEpSef+y/0OruZ3MhpVd00SsDVZ78jBlzRD+7DmQC/CEKRcjPahBNBE7KuPmI4 WjgmHetsSz9J6t8e0R+/OxuUYhvTR8o= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kmgd64rx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf14.hostedemail.com: domain of ritesh.list@gmail.com designates 209.85.210.170 as permitted sender) smtp.mailfrom=ritesh.list@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729272533; 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=/yT2xkfY2cuEcnEiccNoddLAZz1lOngFGOhNqKs9rtU=; b=79pFUHrmKogvi5krKa+8FvhL8nLXKygxhr6wHnlN1AMXtdYjPNHf8vXBDlq3yIWbrLteex osEQ/11F9T6CIby4VWWWIVvQ5iUFdE/xP67hNFRP6CxZ+tegtvQSF9RSAlsP5qhrPfc9xv 8nWyvYVV2DG8uH4G3WBVzG3uFN0tE1Y= Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-71e4244fdc6so1725752b3a.0 for <linux-mm@kvack.org>; Fri, 18 Oct 2024 10:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729272651; x=1729877451; 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=/yT2xkfY2cuEcnEiccNoddLAZz1lOngFGOhNqKs9rtU=; b=kmgd64rxMy1OnXdOG00WRjmnWn9edYjP7Q6kEx2E2Am0xxFK1s7kuxvQR1lvu4G/rS zBTt0quCOA0W+1XpXmFLb577a1xq/tijMCcsGb9sGafLwuGYhBkZXMMrW2fb2r1fKRGY fFuJlrOOqidYMIuuF+05uElNUyISqopANwx8ztgdF0golsRTuNdt01Vztc2eimXl26zc 9ciCGkYq2OYFqdVzRg8MBSokeEScJGDQ8Kpp9VRr/donSHlv8nRTgdEuaZghNsrPXHzP tVZi8jUpBs127bUJP/wiq4nULgq4vAwL1wBQweWI3H0VwWggix03SkIqHHWKlnk1kPsB xXjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729272651; x=1729877451; 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=/yT2xkfY2cuEcnEiccNoddLAZz1lOngFGOhNqKs9rtU=; b=gZD6S5ikW0QPuEjFKHs006hz4db5DimjnNPsuRpi/SOWAvLAJsEZpZ8GgYqs2+RijC 2vOfg1s/ZVCCqBUj64Aosi7bOu3O0egXFDo4WIbOPWwWDceAvIZSXNNjTmnrU02k+GDr dhos4HaIybKsFU3D6kYItcYwYSzDbayXceeWXyGzqBXy/psjOBaXqiM/JGRj46IK6g8n S7XFOtBsLwoe9wcpDTEoOaEEzCYDWTTxzZp5DlUf0eWnRkfUJzI428Ugv/zfiCrpSZ+y NcRfyClxRT7mtrPTZ7/aFcqyUiPsw12TUfJ6n5ePNrOFht0xbm8jwzLZIYsOj6JeVNej FscQ== X-Forwarded-Encrypted: i=1; AJvYcCWnqxV1E2cLajnvBw5Qv6WhLdMHOHFpz64dp/brl4eqHj8+QQoZ33B3OZawbygMQlFahTezgmM6Qg==@kvack.org X-Gm-Message-State: AOJu0YzeFv8Xq+WNWqgySdf4na3Nn0vY2d2/Oyofj/eTJdOawe+50COC 2HTxGEKuJPmHP1zTTfksTfvIqTN8P4fCB1ZHSS8U4zTAZ2CIBZaz X-Google-Smtp-Source: AGHT+IHW0pQgponGx/gVpoZ4bowEpREiydwVrhTTv3Smj0fSfHzFmSnPLW4FIXTVD3Eg6sTX/fZl5A== X-Received: by 2002:a05:6a21:3a96:b0:1d8:fcf2:9ce2 with SMTP id adf61e73a8af0-1d92c57db72mr3781064637.44.1729272651290; Fri, 18 Oct 2024 10:30:51 -0700 (PDT) Received: from dw-tp.ibmuc.com ([171.76.80.151]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ea3311f51sm1725242b3a.36.2024.10.18.10.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 10:30:50 -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: [PATCH v3 06/12] book3s64/hash: Refactor hash__kernel_map_pages() function Date: Fri, 18 Oct 2024 22:59:47 +0530 Message-ID: <0cb8ddcccdcf61ea06ab4d92aacd770c16cc0f2c.1729271995.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <cover.1729271995.git.ritesh.list@gmail.com> References: <cover.1729271995.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content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sWbCAlE+NJpINa/pUe841ewMC+paveqGDnZtp4VVf i5Wod59J orX1tiQ/s0RKAE90afXqbK8FeLb+XMpPwNBwj+nF3H6BeZWwH/bELkSxYiuW+dICFZjo71kz3kWk2F17n3tb9BEUQ3SY6IngDjA7Z6GCc5ZahRPb3NZg2DlB0Efpr2s4zNR/et7far+W/Pnw5qhcMIpP0x7m98yDGrxHA2Xkq8i/K/S8hWOk8wIQSgJQ/oO2n9T7xkIRm5X12OtTCa1+PITU49k/2BO56Sp9ekrhSCyNTsuB/6UPVKEqCDr5agaLjdshx6ADqXwOdi/ob0ZEanw5cV3+/KOed0irMGWaxnR0o99o6f6MBkKKYjRaNTBquptn0A6T25+X+zCikfKamf20kcw== 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 (mainly Hash)
|
expand
|
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c index 0b63acf62d1d..ab50bb33a390 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(-)