Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp955272lqh; Sun, 5 May 2024 09:07:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJz/O1K0AWEhx4J2wPOwS3pwaVRKBbBQuZW+/xn8PuWwOPXT7zlXyLxkEdD0kw67tmYFgxfow0UGlDeUay66ef4Dw3Oce8AhHJNX7JmQ== X-Google-Smtp-Source: AGHT+IGc3h7AxHl7+3Ck5M45piL/5fSjAfYHLlyhoCtRxI7bYP6IQnlVn57xk+ZZeBK0ZOgKjsJy X-Received: by 2002:a05:6214:da8:b0:6a0:ab58:7f52 with SMTP id h8-20020a0562140da800b006a0ab587f52mr10608645qvh.37.1714925271100; Sun, 05 May 2024 09:07:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714925270; cv=pass; d=google.com; s=arc-20160816; b=oqLX1x27ZrFTgd4bBYuaDZ8WKt9xaatny8gTuO0FW2UdTZakg2cdWhh6Aoyyl8KbSu KkBfEdg35k3Gfr89waEWAQj94wjghBl32rHHbX5aJ8ge1MGHSCB/zaSaFABGrI/ksQyB adb/hj2wm9LkRQl74VN890dWoXDQllimlsJjxMquEjUfxGSVmbPR2EO4+rsN8TjGpNZW QR87bOZHw9rYzOjYCl1k/qz/TemxDhseNLao5JEWkOp3/xtVeMRyITDgiODkHr5mpHaW 8alFmWRzH4+UQC999bW2b/c4vbAqP/QJZkDA6bDs/erjpfELEWTtV6fZ9lPrgTqMU52w nkRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=re0M5P5/SqrXTut5ZFqWws3v/3aGFoOhg3MkAMHXQLM=; fh=Hur1Ox4UVY8CJ+UkFvS1tjjuIJbfjIxUd04pOdDk42c=; b=tp8/KnStaOUCdVfDQNYYcT+XaJ1SJOkphk2RMeDkpsRB5cW632VQgpLtG1DRuUV28z PF2b7BFH30XHwfFNEZj0zt9Q6SOJvh6S5hwRc8oWsUPa5en56NKDh/lxTLXzHcA7Ef2A PGu8vXX7AmOJoRwdJQ6DbkLI8srIGvJEa1utMQ8tiHnj3xFgQqyWimt9LQHTG/9TXpDx MupTxaf49x1Tx0jsBnYobawjTeEypxGGW2t2h6WkVdOlRTMB/3c8UBTKC1sCAJwyQWyv AINPCdhvvCnJ0+qO/zyBMpfNFjcgFBEfPzUxrb9XDuxN3CoFQInu8KCF2i3zbJqD+2vG xbWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QWa5fX+V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169038-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r5-20020ad45765000000b006a0ce29d738si7569056qvx.77.2024.05.05.09.07.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 09:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QWa5fX+V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169038-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169038-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 84B461C20A28 for ; Sun, 5 May 2024 16:07:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6701240877; Sun, 5 May 2024 16:07:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QWa5fX+V" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 637B3E54C; Sun, 5 May 2024 16:07:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714925232; cv=none; b=l726DnZ+JQWZyB4yPnZNFlKje5fJbARNAh0pyNBlJDqxu5v4wPwP2BMNDU63HmQf9/FuY+JuVpdFtbhqKw4cJ7EuI9lHvZ29nZS5aC/n78pmqUs/iZhADsUDByJac2Ce06LgBGh/62z/10wq/PzB4vHWu3PNzyP03B121afcCCs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714925232; c=relaxed/simple; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n0v1jZG/Q4z4G4R8T0SrnpJPTUJe6nfIWVKcs4QXsBE8UUOPt9DWBYmiDp5fXngKQKzywHvh+nyz0jUNcK/cmgeUCqsnOGOuG+0uxz3OJuz+/X48H6cPRvKoacVTF4fWGad1klIv1cqvJch9LvoNMsG8bAW7FJnO3F2KJQuOpUQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QWa5fX+V; arc=none smtp.client-ip=10.30.226.201 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?q?Bj=C3=B6rn=20T=C3=B6pel?= , 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=20Mathieu-Daud=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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 -- 2.43.0