Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp913329lqh; Sun, 5 May 2024 07:27:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4KLgkBqi4GwAQ20VpxysCP5jnr3KUmRx06kG5PkSuCNmbGZl8IMFGksiYrA2bUTEMmJdgQbjOyfe4rktpdeVUEBMHQQ04Hi1BXP6Lww== X-Google-Smtp-Source: AGHT+IFE2WaHRYK1urW6HmMtuSAEC1Z1PwfS2sc9nMXP0gD1DT1BviepN15svfxiMgYfmgJR5m8T X-Received: by 2002:a17:90b:2288:b0:2ac:93e8:7dd5 with SMTP id kx8-20020a17090b228800b002ac93e87dd5mr7619699pjb.0.1714919245853; Sun, 05 May 2024 07:27:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714919245; cv=pass; d=google.com; s=arc-20160816; b=UKONESQc/EVe7r+YFzjItXRFrYB5jKHE5tZnYx5gXKEb7CdBJrPcKa4SZn2B5q/8qA wta5Z+ikKy2u644s4Rza7oxgj9lECk9icXZfDuRZHyRemdGihEjoFj7iKU+nqVPgfMDP jaRHvvIvHoJiAvW7gmmSwLNPSatz3ENvbIuWGUSEfKGuVcAojyRC4JCnAWgiuHVnzTVY 7kK9EZtQ8iOGE9OuWdGKw/nGlRofNoRS1ECrNG3XDBmFb4wb82ujjH2ELxsL7gWsVYZ1 JeIRXzRGy2UfukdRiGETHk5fs82to4tMpeKMyfBG/gS+JhmBAVtlZdY+jpNb1VNVA3aE 0v/Q== 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=fFGi6fZLqF2Ebq3HA4qhVUTzOkQ7CLvxmZVQiCBTuZIZHkMHXAnc6gjaEVpS5gfmhL TWVrbtIaEion8zq2m8Hb+7FfKtghEA2+5Z8XKLdzbaXYJBLMYg6yt4pyH5BKU89PlRaW 3G705pTOSuaQGASgj5JBWNgcLw7JwWT/xsY5CpAZ9NzS7li19+fvJTMyl9kXc2/Qfnm3 lj8AbdIkYa9EmpcGjPiAPlpGJuPwVQt8SxX8/tPyQrQvBsARVuEk70RByNSaSlkRpXNg nJ33TN1iehs7wW4HxX8jlmJ6QNu+Qxdya0j5hXO2sb+IsWywekvgcJ32VN6i0z44YGel 3tmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mYafZXb+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169002-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gz9-20020a17090b0ec900b002aaceb4203bsi4193885pjb.49.2024.05.05.07.27.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 07:27:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169002-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mYafZXb+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169002-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169002-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 76010281955 for ; Sun, 5 May 2024 14:27:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B6FE2C6A3; Sun, 5 May 2024 14:26:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mYafZXb+" 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 3D0FB28389; Sun, 5 May 2024 14:26:45 +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=1714919206; cv=none; b=f4RNpRT5MqxRdDLbWZBTW5XrFfy7cLkceY1/P+xZt5206ss6NgRYUD9AIgyaEKK0Evzi1wqNXXjiNGhMvS3mERoaz2yP+5lP4HDLQAfxKe0k8YV8ES+CCjsjBmlLWAURBsZSeMDx+GGKzGMwJkn2yZmlgEgPchdQcjx9EQUXcP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714919206; c=relaxed/simple; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YUcP++I+OJ8FMqjHKWNaE3hvqp1NZIozij8wOBeonYLcArO+UM6CHDPDJ1fejbPNexnFGgCs4lvtQpzDAHeeU3WxxorvbodrnViJah77uDG/upOhI4IAp17gIVvz+DGXDDCMEiqKZfOWOWxSnCUVZlkNVXpLmukEPnB/NH1Yx3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mYafZXb+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64D9DC4AF18; Sun, 5 May 2024 14:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714919205; bh=DCxnhfiOCuZ1vbHkz6N1kzg5vD2Mqvj8bCN8VHj/6O4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mYafZXb+TjzYX9WOn5mklYaDb7dJnUSNc24adBjqmsO4Ag5WEgJjuidQ2NL9UYDTP 1LuO1cqjHf8Nh5dmB8++Zo0xiUMrGLJ9M8hCzooo/h0AkOLVjxiu6bF5NOZeQCjH1f T+Fh5gV5BACp2ML9bo2WV3xh/dzZUoZcK3lVV10D81C0uEhbRNkPHUUmgvf2p+O3Yw RA4Ob+Ut+3nLrtltx16rJAegZH/JngdEQb8Gdmt3PAnUSDC6qtgsus9DKIUuUhQaie sKqI6aGHZqWoPHUtkPm/mnDvpdMEcTryUwzWxeUyh+enmCdmQvd+DshDDG4LkvIUAS FbuR6GrrPxveA== 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 v8 02/17] mips: module: rename MODULE_START to MODULES_VADDR Date: Sun, 5 May 2024 17:25:45 +0300 Message-ID: <20240505142600.2322517-3-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240505142600.2322517-1-rppt@kernel.org> References: <20240505142600.2322517-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