From patchwork Thu Nov 23 15:26:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 168985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp526057vqx; Thu, 23 Nov 2023 07:28:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5mdWXwKWVHssF7MggNPR8SFuhWSB/lwyaoKdGNisJdXefPmQdv0qIr+8DRaTX4HGPK34P X-Received: by 2002:a17:90b:1b10:b0:285:266f:3e03 with SMTP id nu16-20020a17090b1b1000b00285266f3e03mr6517318pjb.38.1700753292212; Thu, 23 Nov 2023 07:28:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700753292; cv=none; d=google.com; s=arc-20160816; b=JsYlMRCF/rky5ElsoJqVWwoFf8q1p/FDLd1zBVFKwnwR/nYGojauKFqOfmEyfbIyhs RYqdpC0l+YDAwF2BoNpaakLJcsUvBERAn1EEpOzciqLyIUVhAcVhYKVAFXdzay+6gFEH FrV/2ZvyE75xrSgWxwcnQs426uJ0llfTzHOLQ0CWGfIwrQThNj1ToJlz7wwSS9RrcNJv OKL1/OV0MwqyP3Lw/k/xAeDOrzb1lTGLPtyBiJPvDEBPCpUjp6F+tTqeRdaQ0DAuO3pN 76bGFggQC5TgP4fBpbPXETfKtSWWdvRIXEoUcJy4OxmB9svr8Rsu5KbBbhn3GR3A+XUX 7pzg== 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=22UkH/VsvM/P25MHxqZG6eZIA2B9fnAMWMn2BJhw7p8=; fh=t1bsw/gEI8w3DN7ouBpAewoQyybWh2yxEgAHixB9Iis=; b=WTx4k9C1gf9V31O8d1PDdtAByGzYP5YzI02MFUZR6J0Gt35wwks5Sx6iBrvi9/khLt RUZ/zXYDHv5OXjCkQtUvivbEyl6I4qcxnSTB6BdcjbVrSGrNnZ3utD/BEbYZl7oiSDEr 3Bg4eBp4Q8YQRw42/sDF1PPjSQqse4Hm8eeZxBva6G3OoLTPPuhszKYncFk97wSz5rEl EGOqVaGw8Hk4BRqh/qYRqLKflpW1zLnAb59x97c6tQouoO7TSlafhKs2WrBnwE+A9Gt1 9tFGMqkBz30o8KRnTGFppufhcnMLCGQ5xxBAKB5B2/GINBWkUhjwTSzP/oYHUBjo5xS4 S27Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jLxMMcO6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id lb11-20020a17090b4a4b00b00276df8c5b83si1597881pjb.143.2023.11.23.07.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:28:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jLxMMcO6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id A0D6E81C9A67; Thu, 23 Nov 2023 07:27:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346142AbjKWP13 (ORCPT + 99 others); Thu, 23 Nov 2023 10:27:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346148AbjKWP1C (ORCPT ); Thu, 23 Nov 2023 10:27:02 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04DFDD67; Thu, 23 Nov 2023 07:27:05 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 53EE22000E; Thu, 23 Nov 2023 15:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700753224; 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=22UkH/VsvM/P25MHxqZG6eZIA2B9fnAMWMn2BJhw7p8=; b=jLxMMcO6+lQpKEgcBnITR2WLAJfR7Ice2WvgslFwIpzA+Z2Oly+YnElyf7+oo4EDYz7Cmu +y7vxP8J0a3URXBSgWh9uumQDlePvfJ9400tDznsi0K5nIxiPXzwdvKtU6I8cG23OaQc40 ytlR9QoH1ZTm621aERMcb/qq6MMHkXs/PgsnpNm4AMQJZ9sn7PemN1fleuZrW9H87R59p6 msdi7g4309v9m1uxgJQHCGqCg9X/NruM6jtmWYf6YDhnn+Z067SeinReGP1eUyQpdyUcSA o3utQh/Xz5NWXUgZcFUBA09TaJTmE1/bsoRouOzJe9kvpkd4Yq7otYnVlKyD0g== 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_Lebr?= =?utf-8?q?un?= , Thomas Petazzoni Subject: [PATCH v2 12/21] MIPS: Get rid of CONFIG_NO_EXCEPT_FILL Date: Thu, 23 Nov 2023 16:26:29 +0100 Message-ID: <20231123152639.561231-13-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231123152639.561231-1-gregory.clement@bootlin.com> References: <20231123152639.561231-1-gregory.clement@bootlin.com> MIME-Version: 1.0 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:27:43 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783369084006395302 X-GMAIL-MSGID: 1783369084006395302 From: Jiaxun Yang NO_EXCEPT_FILL is used to indicate platform that does not need to reserve ebase memory at start of kernel. This is true for all R2+ platform as they allocate ebase memory on fly, and also true for any platform that does not load kernel at start of physical memory. Get rid this Kconfig symbol by use macro to detect conditions above. 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 f7fa4f231c6c6..484cd8e926bed 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -149,7 +149,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 @@ -243,7 +242,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 @@ -287,7 +285,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 @@ -423,7 +420,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 @@ -472,7 +468,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 @@ -1155,9 +1150,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..4af53b1628f57 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) && \ + ((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