From patchwork Thu Dec 19 16:44:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Brodsky X-Patchwork-Id: 13915295 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 EFD88E77184 for ; Thu, 19 Dec 2024 16:46:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 880186B009D; Thu, 19 Dec 2024 11:46:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 80A5C6B009E; Thu, 19 Dec 2024 11:46:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 683606B009F; Thu, 19 Dec 2024 11:46:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3B1746B009D for ; Thu, 19 Dec 2024 11:46:47 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 030311A177E for ; Thu, 19 Dec 2024 16:46:46 +0000 (UTC) X-FDA: 82912286058.01.E8B6346 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf26.hostedemail.com (Postfix) with ESMTP id 22FD3140004 for ; Thu, 19 Dec 2024 16:46:19 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of kevin.brodsky@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=kevin.brodsky@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734626782; 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=t3fKHZ/NfJbP47FxINHB8YXuPoD7xscOU0RHBymSX5Y=; b=cSqtClpyJ1s8r7ClIy7ypdlj6sRMDZiyOAtuBzXnTHUHdm425WADPlwJBpEnLzwwpc24dH 8QYT75TU9rJzYD9Q1SnnPVTiCds35u0dprOLJME7s6pLUOtGzyVb8GE6dZa22au3Q1fRU8 HKSi2tAE0S3som227WoO4MvBCsvVRt0= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of kevin.brodsky@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=kevin.brodsky@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734626782; a=rsa-sha256; cv=none; b=P+1i8aJAU8Lx8PCufKjWOlbZrOv1dM/B2u5A0hvd8HOxUdQsCVNCxrvIL7fvOKrPrf1GL0 nXi8N3XZIRdI71QhgpxH2kSsJlN7mUi/WJodWFUcaYisjckWM/Hadu/YLQ4PynizzXDr8T jlXe0X/Usf/jlgW5m8fc9N/MbTM5zww= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BC7B11480; Thu, 19 Dec 2024 08:47:12 -0800 (PST) Received: from e123572-lin.arm.com (e123572-lin.cambridge.arm.com [10.1.194.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BB7743F58B; Thu, 19 Dec 2024 08:46:40 -0800 (PST) From: Kevin Brodsky To: linux-mm@kvack.org Cc: Kevin Brodsky , Andrew Morton , Catalin Marinas , Dave Hansen , Linus Walleij , Andy Lutomirski , Peter Zijlstra , "Mike Rapoport (IBM)" , Ryan Roberts , Thomas Gleixner , Will Deacon , Matthew Wilcox , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, loongarch@lists.linux.dev, x86@kernel.org Subject: [PATCH 08/10] ARM: mm: Rename PGD helpers Date: Thu, 19 Dec 2024 16:44:23 +0000 Message-ID: <20241219164425.2277022-9-kevin.brodsky@arm.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219164425.2277022-1-kevin.brodsky@arm.com> References: <20241219164425.2277022-1-kevin.brodsky@arm.com> MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Stat-Signature: fkbkzzgq3zza5ayaudn3ka7e1dm4dyjh X-Rspamd-Queue-Id: 22FD3140004 X-Rspam-User: X-HE-Tag: 1734626779-324386 X-HE-Meta: U2FsdGVkX19kuh9I+ZICsRTWAet3kTjlpnUuJ+dy0DJzlw9mUaLrcGqfu1qJNWPtq+Nhlaa5MI4G3W/oXchLo0eVH1lyVYqZaTEXCbjrZz5zl4YdcWmXffgNMkyNuLsT0Zk4hCwB/PHxKV9csro2WtTG3AmUDqMMCMzsKr3vebeZNR0+P5qc39v9ulL36jWptgriGBIhSl4U4ZEBaCnhv7qvgi+YPY+vu5B1e7DLR21gJnAOMMnA2JlzHZXWTv5xh4+1PMUZDyitR3GiVp/c11OIkHNH0tqrZX//SVnUQRURme7SbypYDBoGMUXx395c8MC59Ab04EZ4+GNcK5Tbme9EEjkU+1V1TBkEPZhyxh3F99x5Av799cnMOHaiEN32h/GuRm3mfsvvpa1L0B2+W3648CAWDIJJbl8w0u+TK4XPpBzYEfADLz9DmpKHZDzZCmU9xQxJceLqIXuM7PZOPn382N4Yr8DSu8Uxw+k0IQ2s4m+FyHpDV9v+5Tr++TO3urdC2vPmOEcZ4AMGRpeh2OAcQpVZZ4P01ziQIh0iZFgPBoD0dqZsTt3hhtWYk4HGxUNj/nKEHgqlt3XdOIOKpoExM+uW/d54wInJ0OGE3jumRuYoGCiLmU9PyzsXxkZueLxcTNl/4cePBDCa9IP8xSaLwbqt+QPBz7DjXJtKqYKYLCE4emB1DJFtrKwPmUROwHEfnAHYFLTJPAxhjBr2KPm9W+tRRjg+wMsjITwUszNZ3/xOZ5CX6DE7neLUChK0i68EIIUMh9cZQueHiOKEYTyFaR788we3uya2i2ABl+/n0ok9xstuONuXz571OQwcb9vTOh13YqZ0zg6FREn3f2yyWCykZ/l4jBp0i5q/y3EAiebQf4/0BNarDvZTOw6R/qtlx0TPiyCfTsmbvBOLuBip036SiDqI4e5gvQ3oRf6vd2T/S+or9+RktsDVhfOPxF5OYCtPa4LZbj5oqR7 WKYncmaB /lFs53CLCG71+w9iyvEYHf0l2YjaLd3+H0/tspggv2rjWrwGk6GYA2YTDwXt2bfxMVN14BAXy02fUIemJWlUGGUxKQX6IAr9rDVhpBGljGByQOL+/Nz68XnaHbhtyEJWCXRr6lejsKR00osTmgsguPZOYW872dwdlL2DPumMgTUKDJNk5kyNsisHg/O2ZwqLnDsQ+QjTeOE6BmjYJ9tL01chpqEBHIocHn9nVM+FF0TrorkMjN3T3GeYIIA== 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: List-Subscribe: List-Unsubscribe: Generic implementations of __pgd_alloc and __pgd_free are about to be introduced. Rename the macros in arch/arm/mm/pgd.c to avoid clashes. While we're at it, also pass down the mm as argument to those helpers, as it will be needed to call the generic __pgd_{alloc,free}. Signed-off-by: Kevin Brodsky --- arch/arm/mm/pgd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index f8e9bc58a84f..2a1077747758 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c @@ -17,11 +17,11 @@ #include "mm.h" #ifdef CONFIG_ARM_LPAE -#define __pgd_alloc() kmalloc_array(PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL) -#define __pgd_free(pgd) kfree(pgd) +#define _pgd_alloc(mm) kmalloc_array(PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL) +#define _pgd_free(mm, pgd) kfree(pgd) #else -#define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2) -#define __pgd_free(pgd) free_pages((unsigned long)pgd, 2) +#define _pgd_alloc(mm) (pgd_t *)__get_free_pages(GFP_KERNEL, 2) +#define _pgd_free(mm, pgd) free_pages((unsigned long)pgd, 2) #endif /* @@ -35,7 +35,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) pmd_t *new_pmd, *init_pmd; pte_t *new_pte, *init_pte; - new_pgd = __pgd_alloc(); + new_pgd = _pgd_alloc(mm); if (!new_pgd) goto no_pgd; @@ -134,7 +134,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) no_pud: p4d_free(mm, new_p4d); no_p4d: - __pgd_free(new_pgd); + _pgd_free(mm, new_pgd); no_pgd: return NULL; } @@ -207,5 +207,5 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd_base) p4d_free(mm, p4d); } #endif - __pgd_free(pgd_base); + _pgd_free(mm, pgd_base); }