From patchwork Mon Apr 22 08:47:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13637943 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 B8D96C10F15 for ; Mon, 22 Apr 2024 08:47:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4EC0A6B009E; Mon, 22 Apr 2024 04:47:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C2E16B009F; Mon, 22 Apr 2024 04:47:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 363AA6B00A0; Mon, 22 Apr 2024 04:47:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1823E6B009E for ; Mon, 22 Apr 2024 04:47:52 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C23171C0707 for ; Mon, 22 Apr 2024 08:47:51 +0000 (UTC) X-FDA: 82036539942.01.41B6681 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id 49555100006 for ; Mon, 22 Apr 2024 08:47:50 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Mps6aHrb; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713775670; 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=re0M5P5/SqrXTut5ZFqWws3v/3aGFoOhg3MkAMHXQLM=; b=iui0WzcI+A1NDWy+ybGYj3aSmbyc7p1Vyz/NvwtTv0WNI37T84ke+a4oCkyDtTwC58yNg4 pQBPnay7PLZKjYLbdJVJB8U+A18U79BeSw74Ew+0BIK7OZ7igHa0loIG3DbDUcbYUvhXoc cUrx76+B1tsvMA+if8aBdtuiKPWijgc= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Mps6aHrb; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713775670; a=rsa-sha256; cv=none; b=UCe1H5z6Xhs0VXCmbw+j6cAm9CteJb/QDj3GGxx+2sji+2QIiAbepTFd7MUcwLTsRmIFrk WZU7+ONJ71PrPnlKzpjqgb9cOmnbl/52D2Ku/XDjNQ8vRT+0muHKgXyPGKYypyAfBKa8Ky 2S/xr9BrizEHhPGny299UBuhipgeYPI= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 296EB60D32; Mon, 22 Apr 2024 08:47:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24DACC3277B; Mon, 22 Apr 2024 08:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713775669; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mps6aHrb6AV3oyZl5FmE+MfwgISX2oKniz00n73cWPu8M38bphHsNqTfQijby4bMh I8s7vmc5ajRK4JIpr5iBWaNBz04iwyWpipy7y5HC6V4I/DOInX+0dmc1xHzMV8vP6d SAIkRF3xAit5Hjhbf/wdCcT3+Bxk4ZHwq4AXY22A270Ocxxd7L/iPoPlXuCCUS9B1v HRuTA3LRRGxR2hMjbwnJ8palU3umjclGLu8ZSedMuy2V8vamJEYEa/l9xd8JJEcD0C CW+EUs/cOAJg4BVftrSx3urpNYaYPI5lz+fF9RdQQCwpiy73NrybWs6ZQcHjku8Hc+ IWeFpdB8IJ2Sw== From: Mike Rapoport To: linux-kernel@vger.kernel.org Cc: Alexandre Ghiti , Andrew Morton , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Donald Dutile , Eric Chanudet , Heiko Carstens , Helge Deller , Huacai Chen , Kent Overstreet , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Michael Ellerman , Mike Rapoport , Nadav Amit , Palmer Dabbelt , Peter Zijlstra , Rick Edgecombe , Russell King , Sam Ravnborg , Song Liu , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Will Deacon , bpf@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: [PATCH v5 02/15] mips: module: rename MODULE_START to MODULES_VADDR Date: Mon, 22 Apr 2024 11:47:10 +0300 Message-ID: <20240422084717.3602332-2-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240422084717.3602332-1-rppt@kernel.org> References: <20240422084717.3602332-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 49555100006 X-Rspam-User: X-Stat-Signature: 5c7nb6ixqi7pocbni38sqzf6wus8s9p8 X-HE-Tag: 1713775670-969946 X-HE-Meta: U2FsdGVkX1+eqcFoyCkSyQ9i+aPTThTSRcQzMzj0RS3lhIMYMtDNC0NnDu2+TueAk/vrTxEVd/OdYg84UzuaD+9uTCTooyjpbCwh5qmYAckp/NzTjNIOgPmiwbvLeZ/2aXdj6BJO7LE2bkSMlcZG76+XItxasqouJRGrb48NIn//Ftbx5J/iTlbmN//khnxz+ieYkJsNezjypXwRiYtek+OGadSRGH+onu00eEpbAfYjCz2N/psQH9FiercxxUxHiuch0VFFZfQoWBB8P/e+qs6b/2yYXW9ry+Odgu9K/kpPoY8N1cQ6skqXvf8DLzVIAjMW2yXueEZfwyTB0KovrVnNEgh0gVzMQwx3kAozXYwyIj3T2sVH3sKkgVSwckrAGnajJy7ShZqG2B1nd9yeBTqsaMyKAEqSkGL1lgnw54VxTYGKnQ/jRJV2yb7J/zU0J7Y8H7zZcgbD3PPttNpziVkppnfuPg+pmU3h+4ognPRrjZ6QiV+bMtliWeRTv7hVYLjWDhQN0lHI65EYIo5NodWA6yI2AcKt/HFY0q7O7D6ixPiBMeGCAgjiXFFSYSna18eU6AqhidXJDjQUiQwcLM0rfBtXSM/sFYuv1kI/FZjRpV9lucNsWyfmdaVSqE5c1xtezvWDfbllg1t+JHNTm2d9+V3j5BteOzgUGRBRAqawHBUjSdtBCr6FVRL19An7p4U92XcnyMfpY0bmnrXLiGerkR7CFBjIw8JI06bIP8ipHRe19x9mccPtgc6eKjRinBdF1wTi4+PxtUSBhSnGPJBQ7ztcWTT7IngRzsIuSYWBUnZifsUUsdZAqMzQPocXG8TvGyN9hasllBXBT45kRA9zTzftOlo3yRJKGuzhx+Y6Fot+X+wyFX4lRxc3PEUuuIY8YmbKmVQqC95iG2lPVJfd6LM8AhdL61CdE2RZpL7F4tqYi2MhfojTSRYRcwwhaYpde6kxLy4MAJsxdsB xclD7blU eMHK4chMi6YItC9wvmF3ezP7xnM79/yMRl/XHhpf7SbW1EXIy6f6JAgcO2lMX2O4bQc7KZ6RuKcdcuqg= 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: From: "Mike Rapoport (IBM)" and MODULE_END to MODULES_END to match other architectures that define custom address space for modules. Signed-off-by: Mike Rapoport (IBM) --- arch/mips/include/asm/pgtable-64.h | 4 ++-- arch/mips/kernel/module.c | 4 ++-- arch/mips/mm/fault.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 20ca48c1b606..c0109aff223b 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h @@ -147,8 +147,8 @@ #if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \ VMALLOC_START != CKSSEG /* Load modules into 32bit-compatible segment. */ -#define MODULE_START CKSSEG -#define MODULE_END (FIXADDR_START-2*PAGE_SIZE) +#define MODULES_VADDR CKSSEG +#define MODULES_END (FIXADDR_START-2*PAGE_SIZE) #endif #define pte_ERROR(e) \ diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index 7b2fbaa9cac5..9a6c96014904 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c @@ -31,10 +31,10 @@ struct mips_hi16 { static LIST_HEAD(dbe_list); static DEFINE_SPINLOCK(dbe_lock); -#ifdef MODULE_START +#ifdef MODULES_VADDR void *module_alloc(unsigned long size) { - return __vmalloc_node_range(size, 1, MODULE_START, MODULE_END, + return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, GFP_KERNEL, PAGE_KERNEL, 0, NUMA_NO_NODE, __builtin_return_address(0)); } diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index aaa9a242ebba..37fedeaca2e9 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c @@ -83,8 +83,8 @@ static void __do_page_fault(struct pt_regs *regs, unsigned long write, if (unlikely(address >= VMALLOC_START && address <= VMALLOC_END)) goto VMALLOC_FAULT_TARGET; -#ifdef MODULE_START - if (unlikely(address >= MODULE_START && address < MODULE_END)) +#ifdef MODULES_VADDR + if (unlikely(address >= MODULES_VADDR && address < MODULES_END)) goto VMALLOC_FAULT_TARGET; #endif