From patchwork Fri Apr 26 08:28:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13644224 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 30FB7C04FFE for ; Fri, 26 Apr 2024 08:29:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B864D6B009A; Fri, 26 Apr 2024 04:29:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B0E0E6B009B; Fri, 26 Apr 2024 04:29:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 961776B009C; Fri, 26 Apr 2024 04:29:44 -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 765EE6B009A for ; Fri, 26 Apr 2024 04:29:44 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 23F14A216C for ; Fri, 26 Apr 2024 08:29:44 +0000 (UTC) X-FDA: 82051009488.23.6CFF419 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf11.hostedemail.com (Postfix) with ESMTP id C9EEB4000E for ; Fri, 26 Apr 2024 08:29:41 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mJ85BCEt; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 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=1714120182; 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=0iUpsgAYDlmupm7Q+PIVrmFR5Ze3/f/h3DDb4lFkXSjbZUjd1n5X8uvoSi825s0rT8+lmS ACWTHgXM0mVOyicK7MnjSdf3bePMYh5SG4crEG4T4oAO/gizWEstcYAI6yDTusgA9bkexo wa6HT0Ql6aBzORWIDaj/SeF95CYXHjY= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mJ85BCEt; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714120182; a=rsa-sha256; cv=none; b=fmrGvr0IG0xKn7hj6PqCrleHPG8KH1MiGJfmAfA6IczAO8+cCqYflu7WNSDRGq1oAOshKc OMejZ3yO9OrT018GENHCXouR9j3fzppJDCpVMnnqkn8igTJn/rn0bni+VQKWlJbODG+n4h L75RNBOLqqYdLH921ygkjfUZwSxACKU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 84B0ECE1800; Fri, 26 Apr 2024 08:29:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2679DC113CD; Fri, 26 Apr 2024 08:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714120176; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mJ85BCEtXn9eC/rmnQOAFLqtOnqZnrIZhj7bfmRPi7oxShQXrtP4Uo5HR8nSbD8vo gPsy+y4atIh2HMiSUwxm9ruLsRzgF8GKd0SQITa9LSTNZ3s1l6VFdUmjWVa18XNtDm wmndfdYM2HWsi1NxgEkL3Yi/2Wd3TbOQELwu5rL+6f7WiXzzXzTM2B5ch4q1YZRsjH iSzijG4ahNzTFxxFNb1voatba0/dKnlSX0rJtmZQwKsejOJeAysUtuMBrUvR1kI8G2 77cQ1XEqmgjSmkLajSNAy9YWclmvvuVxCBhH0De74z5sFFxkmJLPXuTC6q2ljZFp/S FiiZiNa8VahbQ== 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 v6 02/16] mips: module: rename MODULE_START to MODULES_VADDR Date: Fri, 26 Apr 2024 11:28:40 +0300 Message-ID: <20240426082854.7355-3-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240426082854.7355-1-rppt@kernel.org> References: <20240426082854.7355-1-rppt@kernel.org> MIME-Version: 1.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gyyEtZiK+tc1OuwCNdujl nwxUiHot PbMA3Nx6AdxEDqC3J2/zaehOfRwV//7U9Ckd4/NtDK3QMdpB646Y6tRVRC9yjCQMLr+y8lI+Aip6JuIu9FP2gK501MJq4iNL7r68anvSzGpjzlahewrVn2Mxf2S6U5KkQOBiTnTzigY1Xw8nHLOEKOehIUMpyX+BypJ5fm2gVCo4xz9SczDK1t5mbyv0lN3EfR0/9S3IkAw5+TaiVmTY0chpTfrq+x/+jJ+YbGGtqd16MWVMief/NTGULC9K9oulZVCbbTBZrz9pShWygMYzkSccXZBWx6izxZRLyGOKwMpWrxps4CZsm3ojDgmt4Lu8AFUrqRVK9ikgl9scv0UitgrRE4wFfbOVUYZBRI2vo5GpPeM8MvMXf/ZPjxtNFCp5nt+5E1cJEm04N+z4/WwCYwDMSPVoX7FdRyWpXCbSgFrSfvT0QMSA94JzhgA== 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