From patchwork Sun May 5 16:06:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13654464 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 3345AC4345F for ; Sun, 5 May 2024 16:07:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB1706B0087; Sun, 5 May 2024 12:07:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A61606B0088; Sun, 5 May 2024 12:07:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9032C6B0089; Sun, 5 May 2024 12:07:19 -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 6EC046B0087 for ; Sun, 5 May 2024 12:07:19 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0CDD9C0353 for ; Sun, 5 May 2024 16:07:19 +0000 (UTC) X-FDA: 82084821798.12.4F7AA62 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf14.hostedemail.com (Postfix) with ESMTP id A433B100008 for ; Sun, 5 May 2024 16:07:16 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QWa5fX+V; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.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=1714925237; 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=CQbOLQSZ8O3zWf5YDGl5/ElEbTza5uHhikP0ZMJiLb/i6FlbVBrfhFwHRPoxfFCFZYVxpF +iPsKKVdSfC5+UsmD0bRaiy+er1/WLLSSZ5ZvnO0xr9Zb25yKxV1sw/mTP/qO4zumv/Z8z XWHV2ipKGAvBgJFHh9xiX1gb+n1NTg8= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QWa5fX+V; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.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=1714925237; a=rsa-sha256; cv=none; b=hjj+yGNLE/mGV8ss/rUZf3sVw4nGRf4JnEC3ZJElE1B35/mZqlaNTcqg9fOCZaBJ/bM0Gy uuA5vOOE9eyXPmSIvTb7xmPSkYr/NnNG7odBKcrPL+OnCOe1zy1UNvHynwAX2Zpjz40m4l G9qzfLdhZIGMQk7znkHQ0dNcq9Cx2RQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B697CCE0AB2; Sun, 5 May 2024 16:07:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA2B9C4AF66; Sun, 5 May 2024 16:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714925232; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QWa5fX+V89TTOP2GlOwvt4twcfdvHMMVPziSmieuPgSBPhWUfbisumxwPB1HxUlJC SghRc/O2IWhq+5uAIL19kBNECjN8Eixj0O+M//1MOzKPjdGEP8/j+8gjwWBR7/8Vtv i7T8kC3S32Mwv38l3PPjKsuGj9NwQptUrFC7qD4hlKFuj2gsb7BzQBL9P1Qxlab7zw t8bDt0pLdKBWzzFTEBo2OuKTmEqM7tos601oUB0a7RFNS6UWZeZpUR1839V3e6YHkl zJMtmY6L2ynGW1NwTp+wFQaP7cjkH15KVcoDbS6MIsORkgjuPaM+IhnyDgczaJyRYq dq0jDZ+sJ6Etw== 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 , Liviu Dudau , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Michael Ellerman , Mike Rapoport , Nadav Amit , Palmer Dabbelt , Peter Zijlstra , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , 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 RESEND v8 02/16] mips: module: rename MODULE_START to MODULES_VADDR Date: Sun, 5 May 2024 19:06:14 +0300 Message-ID: <20240505160628.2323363-3-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240505160628.2323363-1-rppt@kernel.org> References: <20240505160628.2323363-1-rppt@kernel.org> MIME-Version: 1.0 X-Stat-Signature: ytmh8gw14atrtuo5rd358fs688qpdbqi X-Rspamd-Queue-Id: A433B100008 X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1714925236-224198 X-HE-Meta: U2FsdGVkX19HMktiR6gbU5lrC180chbk0k2Z8rT6o9HiJ6zCmguntlXmZfC3J+4PYrBrpGjzF6jpCBRYSHjHbnODFt0Ua8ff2eZiWAluBi3zaF7UUs/nnpLdQwq5ja41d0NvsPJMhMA4SM/vOgn780zpCsAxrAJxyzrqSnFQUOmsUiV0XbYstI6tYQDkHQ7gthToF6Oi5ugSpndT5Wpd7JzFM3WQKSVYM4zAiRsbiwtDhVBZT3hRMh63tiULTK7KdsVQR0bA8t/IWTcVobKD74yGgsSBSNs9Y+K3nyPf2GN9SPJIn1qGFZ1NykQmtlIHBV4dSikBmGvX/uHSaOQyqQlA4+8B1unKCP08ZFHmOMD/SGrMikAJ366GVkPXBONZ6F0ggV6K/g+PakdCqX6kCl2ivn59e/r5lAR9SwOYGMe+jnPqllZgiuw6GKPsVfesy9gOZSSczAV9XZQkBXFcaKz8Z6qZTvSSEby1DJRFs+iicUkPicqTbDoUn58LR1UoTdPjTvOXiAPocd2v8nSi4IwIZjWK9+gpsD9osmYEhFPcnjTr6Q9VLTDAmjzH8ivVfJHfVy4CfggMR1Rtwp7zCrQBUiEOa422Dfn668XC5xS8Lz86Fep8HgcQtrdddK4ui02rrOwPvt6MIGb3ewJMX81tFE5fDBoiT5MQdFEm2Fi/RC94Izj8ic4scoKoJesxOf4s+NFvrXjmIneKbMiB0v4NHOstV6tJ8mHBwdIKdFmpW24/ueIE23MGmNc2XZHLMWbbL9W1R8Tdmn94yPRjzhHNE5pTXp5S1ZUOHFudatXCWW4nrG3H3rpRJQV+N/3WYW1YYKA18aJSAOzlEefd2XBtcXiiJMKka9NoT4zd2kD42B8sQFjAPlCVDD8jLqjNklDCuihtMiqjCs4Twk8QVq6CySXk+rdVaQXU46cpfScfnVBKQeec3tmtNhJwrXp4qUPwrDv+0DgyUS25Grc a0fauyEx /Brk0U6nuqpx+H3ATM15jVM4uSyDZHZXqWPJz0NKNA/7FRMOIezYzxOzC2mCCJUgDWGfm9AHIF2ivsKHpIXW2cvjtuvpr21XA9y4VUZKG0jpdoReRHCJwksEekz0RSSLD8jVlPxgfCxCPr3kjZlLlBl9JqLfPA0iILMuA3c3114kU8aYTSp0RziVdSh6Mc0rk6DWfDUeEt3RfZbBL76Pfcr+mU8kNgaFfr96N4WLV4avys3LwtzSlb6WB0RwMB7gXg2zP4kSXmwDWW6TsHMgbsyr5D0k5RsLqg35mS4cuPNikauYvHaVCGhAMcMROYaH7gRHXoKvqE3qjUXWN27XyXa5NSYmK48fb70Yqi549nHYX7qMAE1GP9dX6ygzsFOp0MxpeVu2xTvvl/FzcimtZdc8aAN9MiznOwiQFMFpkBTX5bE1fYcC6Ql/d9g== 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