Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4761670rdb; Tue, 12 Dec 2023 08:36:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHfIzovJrcvBGH7ZeN/ge3jbSjbpDJlrnztz0QVjWjgkC7p2af16sSbky+2Q2Leg8YBC0x X-Received: by 2002:a17:903:28d:b0:1d0:c229:a00d with SMTP id j13-20020a170903028d00b001d0c229a00dmr7041468plr.34.1702399019562; Tue, 12 Dec 2023 08:36:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702399019; cv=none; d=google.com; s=arc-20160816; b=Zm+XzPGBrq0H6D5Qf/ksfLQBFx/+mHAsZjst675gkmlyuMZf+Sztg7lK/9FEG6/5Ic K1nVTvrSw0y0tWqGzAnhZzv8bQogHY1dnFj3RcX1uODsPJ4AN4Wvsb/mkQEE54YdQd/7 vaIbUJbVOoUcyOw0DsU1igNS/ffKqpjtFXhKBJdywirRnMxsVsTw9QGqs1zOFVS+SVDh /GdoFrYV0bdwWOGK0iw9XWjw/vZdxdlnwA8zFV4yUxEkSi6KHbbI/GpQUKlQ+le/lUz/ tgLbd34+sD8sVMZQlyJ+Un+QBevacxrk/3TcseBxW25K8IrDm3xvb/7h/AxBj7jIOO7B 5v5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xbVhFI1ZSGx1syULTaPHmMoUG7Z8rPeb2O8T42Bf6J0=; fh=t1bsw/gEI8w3DN7ouBpAewoQyybWh2yxEgAHixB9Iis=; b=lOiwbVvEFJ1ZvGo0a4s9reCQ2FEPkIMc9a2nvhE9FMZ1FWUsLdo1V6Ae6vtvHmk1Bz qqCx/yXE3UlFBc5GLGYI8wp7jvXBJJSlzSF3hGZnmEPESVU2gOkB4Yfv9BW4SF9AI9lJ q+OoaJzVcZ5xMEV8L+kFXxl5pbnKak03eEwd3c2yKRq5nqf/54TwzsywTqusV/mI1l6q jrlM2BQ+MgKbtsy7xn3v704gT3zTOXcwFdFifXw7XFkSpMuTJOkHcLwpbnFOzviEn921 2HZiLPb2alKSbnvEZSue++rHPYtnO69zyob+n4tdVlPQwO+z9gwpH+qwtNp3GO3BeXt5 TQSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="Bl13/Lkl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id z12-20020a1709028f8c00b001cfb7ef2badsi7749740plo.155.2023.12.12.08.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 08:36:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="Bl13/Lkl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 994C3801B894; Tue, 12 Dec 2023 08:36:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376610AbjLLQgX (ORCPT + 99 others); Tue, 12 Dec 2023 11:36:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235061AbjLLQfc (ORCPT ); Tue, 12 Dec 2023 11:35:32 -0500 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1435610B; Tue, 12 Dec 2023 08:35:35 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 876196000A; Tue, 12 Dec 2023 16:35:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702398934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xbVhFI1ZSGx1syULTaPHmMoUG7Z8rPeb2O8T42Bf6J0=; b=Bl13/LklFdMlZCq+xi34hEBNI5XOCfoKecmZRoJXC0V5Zv+kC/4dg46+mSjU8SyCDtxHVz Z7RK4V2/JNx2nRT0EL69glSn0cYryHwTptJOcVKlVCyJzhLqqo4U4+JmVXuWVsGUtrQuVi 9D7SJCJwZ1QYsYP8A93mIk3ZkHzyu9B1aE77yRtuVtOJA9zxh10NXzRBGfylvxOLOq9VNA BDNOmIlYgacBoH0iwJZiYQXz4GH4Ls/oko06JFt7cnSIACm7/KhBs89msQTT70im/Zb40V gj42J1SlWOdHfbKofcofYWordNIeTKdJLtBJlJ+bCaDUixbNyAugpGF9U0XBMA== From: Gregory CLEMENT To: Paul Burton , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Jiaxun Yang , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?UTF-8?q?Th=C3=A9o=20Lebrun?= , Thomas Petazzoni Subject: [PATCH v5 12/22] MIPS: Get rid of CONFIG_NO_EXCEPT_FILL Date: Tue, 12 Dec 2023 17:34:44 +0100 Message-ID: <20231212163459.1923041-13-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231212163459.1923041-1-gregory.clement@bootlin.com> References: <20231212163459.1923041-1-gregory.clement@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: gregory.clement@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Dec 2023 08:36:56 -0800 (PST) From: Jiaxun Yang NO_EXCEPT_FILL is employed to signal the platform that there is no requirement to reserve EBASE memory at the beginning of the kernel. This holds true for all R2+ platforms, as they dynamically allocate ebase memory. It is also applicable to any platform that doesn't load the kernel at the start of physical memory. Eliminate this Kconfig symbol by employing a macro to identify the mentioned conditions. gc: use KSEG0 only for 32 bit configuration Signed-off-by: Jiaxun Yang --- arch/mips/Kconfig | 8 -------- arch/mips/kernel/head.S | 7 +++++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 518376d578b70..59bc956859292 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -150,7 +150,6 @@ config MIPS_GENERIC_KERNEL select MIPS_CPU_SCACHE select MIPS_GIC select MIPS_L1_CACHE_SHIFT_7 - select NO_EXCEPT_FILL select PCI_DRIVERS_GENERIC select SMP_UP if SMP select SWAP_IO_SPACE @@ -244,7 +243,6 @@ config BMIPS_GENERIC select ARCH_HAS_RESET_CONTROLLER select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL select BOOT_RAW - select NO_EXCEPT_FILL select USE_OF select CEVT_R4K select CSRC_R4K @@ -288,7 +286,6 @@ config BCM47XX select HAVE_PCI select IRQ_MIPS_CPU select SYS_HAS_CPU_MIPS32_R1 - select NO_EXCEPT_FILL select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_MIPS16 @@ -424,7 +421,6 @@ config LANTIQ select IRQ_MIPS_CPU select CEVT_R4K select CSRC_R4K - select NO_EXCEPT_FILL select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R2 select SYS_SUPPORTS_BIG_ENDIAN @@ -474,7 +470,6 @@ config MACH_LOONGSON64 select ISA select I8259 select IRQ_MIPS_CPU - select NO_EXCEPT_FILL select NR_CPUS_DEFAULT_64 select USE_GENERIC_EARLY_PRINTK_8250 select PCI_DRIVERS_GENERIC @@ -1157,9 +1152,6 @@ config PCI_GT64XXX_PCI0 config PCI_XTALK_BRIDGE bool -config NO_EXCEPT_FILL - bool - config MIPS_SPRAM bool diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index b825ed4476c70..51a0ad49ac388 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -59,10 +59,13 @@ #endif .endm -#ifndef CONFIG_NO_EXCEPT_FILL +#if (MIPS_ISA_REV < 2) && \ + ((!defined( CONFIG_64BIT) && (VMLINUX_LOAD_ADDRESS == KSEG0)) || \ + (VMLINUX_LOAD_ADDRESS == CKSEG0)) /* * Reserved space for exception handlers. - * Necessary for machines which link their kernels at KSEG0. + * Necessary for machines which link their kernels at KSEG0 + * and incapable of moving ebase. */ .fill 0x400 #endif -- 2.42.0