From patchwork Thu Apr 11 16:00:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13626212 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 C484FC001CC for ; Thu, 11 Apr 2024 16:02:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5BF1C6B009C; Thu, 11 Apr 2024 12:02:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 56F066B009D; Thu, 11 Apr 2024 12:02:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 437306B009E; Thu, 11 Apr 2024 12:02:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 21A486B009C for ; Thu, 11 Apr 2024 12:02:10 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id AD89D1A0C1E for ; Thu, 11 Apr 2024 16:02:09 +0000 (UTC) X-FDA: 81997717578.19.AAAC4F6 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf30.hostedemail.com (Postfix) with ESMTP id 01FE880014 for ; Thu, 11 Apr 2024 16:02:07 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NfH8FrZf; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.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=1712851328; 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=NGSHBEEZqfsbREUsf16YrrMCrVyYVzwx8iwSD5gdYoiEmKg++Ao8rlnypNezyVfQ01vCQw kqY4Vp7NF886ZVevupJv/P+o5RvrjKQSTcbUbBubS3hKSmPlGuJL/vhhsX1r0/x/PWktRf tv6rr/LUKUBCn3TXJOwA3XJ15OQksD8= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NfH8FrZf; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.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=1712851328; a=rsa-sha256; cv=none; b=OeV5JURwZD/iTuyBO9GQEOejq1EngPYz1iidCLp9ye1A8K0acPQh9oJImg3tOcU12/kOY1 u7EN4WMCq3RQQd59kuaKktozrRTX/5E4HxEwCv0d2wqc+3Jpm/ONBVXWaz0JJuVxyU4nR4 R/qQCxCGppgl8M+6yEidu3vef25bk0s= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E06FB62086; Thu, 11 Apr 2024 16:02:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD818C072AA; Thu, 11 Apr 2024 16:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712851326; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NfH8FrZfx6KTdQHMDBqFA0awdLTnfCC8URxYegGQF8hCwDboCaMl+tyhSbnU6IDNR n3HGeSJWcDj0jhabeWwh/q2RuOWpOr5b2ecWjNBh6rH1HqC56qbnlIHnI/mVBB1CTy osJABaN0BaNQW9hhvchseCLymwubWuOlUGYCo9faqQ8gKkVD8ukphe/Z0Z4XdbZj9c eyXeHcsu2/RREpt5R1Qq6DGhQ3itdRECk73VHKEuLm1NLU739ZeDLw2f3vHi4od7IE C3MaeStbEeNBCR4P+ktIC+cjcMwLCUxuSq4oi9esfLn+GBcGlQ0qpgzpF2/HCEdSD/ ydZpjtFRm0u1A== 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 , Michael Ellerman , Mike Rapoport , Nadav Amit , Palmer Dabbelt , Puranjay Mohan , Rick Edgecombe , Russell King , 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 v4 02/15] mips: module: rename MODULE_START to MODULES_VADDR Date: Thu, 11 Apr 2024 19:00:38 +0300 Message-ID: <20240411160051.2093261-3-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240411160051.2093261-1-rppt@kernel.org> References: <20240411160051.2093261-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam09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jc/pk1MoFb9TXqt vd2bv0A1 jCtmWcNBv+biNLtxzocxmXU3QJtu7AYWPom710gYgiCBbUqSEeQStFRPW1R9ou6g4zqqNyAthKlH2pah5sPdkvsNl4T9xeOArqdXOLhksxs/uyWPT/P0UBoot7ChN5RGH1/VrKiJJ3z5+erj/FTHaoptPrF8WtkIj5yox+xCMpP/0HhGABKnIzxQuBsiLSSWgg5RnO6dXF0A8t0JcVGLYo6MDO/uDSFTgBeMoEE++bCFt5stBUk56Q0IBaDftPye+D+LZiSoHby/X/H+LnxfyrWCzkQdCoJd3OVPkPCyk+ir2Ldsc3C/txjVF46/YBNUuvy7TNtGSdn+URB+Xj3QM9AgprTdsIGzzXUSmPpx/f2EtUgM= 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