From patchwork Mon Apr 22 09:44:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13638118 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 0E728C10F15 for ; Mon, 22 Apr 2024 09:45:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 786416B00BC; Mon, 22 Apr 2024 05:45:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 70FC76B00BD; Mon, 22 Apr 2024 05:45:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B03D6B00BE; Mon, 22 Apr 2024 05:45:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 38E246B00BC for ; Mon, 22 Apr 2024 05:45:23 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AB0964071B for ; Mon, 22 Apr 2024 09:45:22 +0000 (UTC) X-FDA: 82036684884.19.EEAEB25 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf03.hostedemail.com (Postfix) with ESMTP id 0759520013 for ; Mon, 22 Apr 2024 09:45:20 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QZee716i; spf=pass (imf03.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713779121; a=rsa-sha256; cv=none; b=aaARrccpjY4mnkeXrh9GIbSloMP8tHp9J18NHOLb6ywwtidzT0kyOzLUhLzWieft0iW0/f oiKO59DFs44OeRIJjKkfaiMxy2kkhymWB9hIRBrYU2k4fiKmyPFHz03P1Apn2MwnKdy5WN wbkGza/lhPUrqicm2MP3dK5kk+nmpR4= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QZee716i; spf=pass (imf03.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713779121; 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=udNWH0Lvzaq2iSEoVP3QKpsbVAFFPT4vfPTWenZJGCC51tKtjveNCIptXKyGHz8knlGB0r MOBNg3FQx0bQ02jgDbc2GUHiVFao1wHVkP53wrRaVyqVIcaTHctIgHVPZhhOGx25qj9VOU NgqnCuUajoYmaS9Mz5pgZie2y/dJy14= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 325E460D42; Mon, 22 Apr 2024 09:45:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 979B2C32782; Mon, 22 Apr 2024 09:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713779119; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QZee716i2NvTHrefcf/oQGlTDn2j+EcgYjKiWPeAYh0vQkdq4nSVaACsF3xiVgZio 83P5gGlciq/2esGsMsLCWXYJLDEFgqpwq8GbJzpQQ2zmW5Do/piiuEqScInvgtvolx n/mzauoUoCxB4q2uI2+7+cSednMvfUk7JJXizOtWKkMUSD543th6GhVontSQoUqmHH 7H3Q6WZxtcAEvhk4LnEiCyk/2v5MOyO/JHts5qVF6EnwUgqQ9WuMVLm5YxSWtns6vF PlMSZFG0ZyMgxzsIkA0nytKifWCJoeuvPvyhQisTQRSdMp/pBO9jcf7E3CfVZXhiuX DkI6aakNO0BKA== 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 12:44:23 +0300 Message-ID: <20240422094436.3625171-3-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240422094436.3625171-1-rppt@kernel.org> References: <20240422094436.3625171-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 0759520013 X-Stat-Signature: ofxmii13ffiezrp47ucn4x9x3na9facu X-Rspam-User: X-HE-Tag: 1713779120-690416 X-HE-Meta: U2FsdGVkX1/ITut1RgkOpOcPF9+h0yss1JOF4vZbJuEYxqgaEkBc+Q2nSWQN+LmHngA4qJxN+lvXex8npvTS7PRyXT38MtQq73UgAFSdEOy0tJ4IOoOBKSSq2lN28jMPfzvKW/lPq+krdPbt91qScqvccCrv3CeAcOTkon9jxM+iL45+nCYY2os6FRpQ/HYHj/ZdsDlrtdwheOCkkqerkq5TusgboGaVt4b1N+mbQF+OpnPBns3YeGQhBF7UUKuh/89W6fS/RcHldUGFkFFLsBHF2zbxguNVBVLsiiV7DnAAPLyRhvtBGilHUkMaq147ubgDO6X9MqfAgVTJVaHvzt5pkQjZZ1eAJ9pV6d4y7wc5L51xdrkJoNDEO6JMXKHdrj22JRnumwNq7YfOaMPuKtZSTOL8YMS3eMTKCta4mNk/Y2Xn+qCoDzMhz4EjTUPXk9k+juohjDS+98f6imLLbWuzbMtEscNguGspMnTx/aS3QPoRPK8tue09XZmi5aCDU+/2RE68682OvB19UC+yA4i5Dw8HB/BppQCOUDKiavesVh7KpszZjrOz4SCi3+xgG0t5EZ7+v8x65VjkJhxgh+7GGGO3ONDvNzudquZK+xuQaWIEgv8U7c+o98SJ9uzLrZzTC04tKemRi7/alW3fyb/oL5TQbCNjrM03y5hJxskOWrRTpsRn2koBVeohCLa3qudj+/SzPjiZ93FTO0PZNiPYcWPmpDyuFaPzWfO5Pm4dro0I+0upg4EJIp5da/l2iUmRjTbsI+o0sMexUyatmB9tS/WUwvBrF2kbbm2hAIJ3ByroCIfyrRwuzBWUSsnpo30PuBAfZhSar0cRPM8DKVimBU3qC/6Mqyv7wm3XU3Zcg4Kkopurb/CfqcdhPO61yUTOGeVydvktpfKcW8LurkVOSfNQXEtHbKxhKa+aF55FG3lRzbNm8oKwLJ2aDudsGhFhX1rUfunA6f6/kfD RCexXWVe ogLFxddKxLe7XAHuah0DWgrmL6qh0NBcgPyRE9ot5odwxTbw4lma1Ydz011Y41T8O0KFTl42p299753RBqTy7ZO/pSa3wVICC3neodhA1RtzPX1WfR1X/PWc8bqhIFVSI6bMMvi+TAZVl1Pu6ozRC1i0v1iZSF9xudjlu+pn3N6UyKNlLcD4ygY89C+P535VzXVRV0OGYk00jx87bgdSjn836VvuOifCQ4CWcAevEUYPwhk9mPczTIRgbLbg1cU+L0YOgtnpQd3TDx+cQ7KPqAV9MpvmpxpOEk504O210oz9zuLr/asTNcw1WVgW7Ny06cmLxz+1zHeDpgHtBi+NIU4y5CORv+5kJsD5kF0850F/E5fk= 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