Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3967577imj; Tue, 12 Feb 2019 07:40:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IbOgH9/GKA3VMEcGdSBNHqKUjdBwjZN8spFvJ3Qbe+H2gNYsZUt8E8EBqoj4eUevKyRazO9 X-Received: by 2002:a63:3703:: with SMTP id e3mr4157465pga.348.1549986013276; Tue, 12 Feb 2019 07:40:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549986013; cv=none; d=google.com; s=arc-20160816; b=oYWELBfgCzflNV+JON9bPLIYtWfnYZnzS6Q8MulgHXnXrzsgq/dn/NXU7cJ8HyU5k1 0HI0P3J70PU9aghyr74Ya1twVWXx+ER+K2yLwoyCDONU1QphRKmEYqo7DqeugHNuBZwP GwA1bULNL0JWu4B3uUOoGCQJOvwQktrzuDNncfbZGKwdBgQer9VF83FBwRsWOA1D6yu3 U1+ZM85VcRX4j0HTY9OFhnew0UjepzFGWKW2xf9NFFx34Z1+JBYORU2Zr2cI+go2eB7H 13xp3XJn4QA8RmEvhJMRyHkiKZFrTvJuuzaDAV38xMhC2/2reBDso5cFFagjNtOZnBOV 1dxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=dqKP5jCdHNCnlHlYxKAx1pG/zhpl5D1jBXLTUcd/iUA=; b=l5fVvPG1uswyZKRF/DJvIsnCpyf1CyIL8hdRq8RVYRA/Fj6b3YduQH3N+oI3LgmRhw ngMzp+8xvNTaF9GyVG04NbRXcDEMjtRMHAooQApOOVJ19x+tod1/lnCSqiX/d+sF41Tv ocLCEWQ3QSBGGfQ3moKht0/0yFSK4Xg9P0QA9CMHobrx/Ri10Vrj+Fsf5Z24faJUGrLC 9mlBEJ+0hvRX6c2+lqNhTEq/CU9kuhu1BOaVLoYyZTUXzsmDWIH9dCtGj3E9CJW83ikL mLyKZIEDhA09HTOLEDJleYxN0Y88qocsHqKOOD1v2ecSvj1y1SpFw49/Q3dtFsi9KS+h V4PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=iDEqlXG6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30si11841062ple.287.2019.02.12.07.39.57; Tue, 12 Feb 2019 07:40:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=iDEqlXG6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730481AbfBLPjs (ORCPT + 99 others); Tue, 12 Feb 2019 10:39:48 -0500 Received: from smtprelay.synopsys.com ([198.182.60.111]:60756 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730263AbfBLPjr (ORCPT ); Tue, 12 Feb 2019 10:39:47 -0500 Received: from mailhost.synopsys.com (dc2-mailhost2.synopsys.com [10.12.135.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtprelay.synopsys.com (Postfix) with ESMTPS id 9696110C02CB; Tue, 12 Feb 2019 07:39:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1549985987; bh=jOb5suQ02ImrbAMWOcehfu6GPe+rY+M7dslxhLE/G+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iDEqlXG6V/Dr1tQLNKwYNf40Q9QsOoCJ+eusLagBlmM/zo3K3wls/dBgFwWo3jkUq g0YaCk60DAwUMkZDPWod6Y+T15H9LRsttF/VgIV/io4sPbyznruJg7RcyfFBBxzams nhw1CVlp8YiBgs3HWXbA9WqMgKQbjRT8l1P6zsBbIsfwfSQh3LsKqR8yZU6IaCx0iF XR9J4yC+NRoSXEQRqv6Qv3MdSLVY0IN/KmO2hZ7j2gP2Yg2mTxncod5gALpCp6zqn0 s0aICNuJTwMwBJDEt7T3qcMkY6LvfWiJSuIKTRLpzcP7VdZuuSpPTeOP8EgH8h9sqq sxTzdPMA0qvNQ== Received: from paltsev-e7480.internal.synopsys.com (unknown [10.121.8.62]) by mailhost.synopsys.com (Postfix) with ESMTP id D6E46A0090; Tue, 12 Feb 2019 15:39:45 +0000 (UTC) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org, Vineet Gupta Cc: linux-kernel@vger.kernel.org, Alexey Brodkin , Corentin Labbe , khilman@baylibre.com, Eugeniy Paltsev Subject: [PATCH 2/2] ARC: enable uboot support unconditionally Date: Tue, 12 Feb 2019 18:39:32 +0300 Message-Id: <20190212153932.28371-3-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20190212153932.28371-1-Eugeniy.Paltsev@synopsys.com> References: <20190212153932.28371-1-Eugeniy.Paltsev@synopsys.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After reworking U-boot args handling code and adding paranoid arguments check we can eliminate CONFIG_ARC_UBOOT_SUPPORT and enable uboot support unconditionally. For JTAG case we can assume that core registers will come up reset value of 0 or in worst case we rely on user passing '-on=clear_regs' to Metaware debugger. Signed-off-by: Eugeniy Paltsev --- arch/arc/Kconfig | 12 ------------ arch/arc/configs/nps_defconfig | 1 - arch/arc/configs/vdk_hs38_defconfig | 1 - arch/arc/configs/vdk_hs38_smp_defconfig | 2 -- arch/arc/kernel/head.S | 2 -- arch/arc/kernel/setup.c | 2 -- 6 files changed, 20 deletions(-) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 376366a7db81..f9534417b201 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -191,7 +191,6 @@ config NR_CPUS config ARC_SMP_HALT_ON_RESET bool "Enable Halt-on-reset boot mode" - default y if ARC_UBOOT_SUPPORT help In SMP configuration cores can be configured as Halt-on-reset or they could all start at same time. For Halt-on-reset, non @@ -515,17 +514,6 @@ config ARC_DBG_TLB_PARANOIA endif -config ARC_UBOOT_SUPPORT - bool "Support uboot arg Handling" - help - ARC Linux by default checks for uboot provided args as pointers to - external cmdline or DTB. This however breaks in absence of uboot, - when booting from Metaware debugger directly, as the registers are - not zeroed out on reset by mdb and/or ARCv2 based cores. The bogus - registers look like uboot args to kernel which then chokes. - So only enable the uboot arg checking/processing if users are sure - of uboot being in play. - config ARC_BUILTIN_DTB_NAME string "Built in DTB" help diff --git a/arch/arc/configs/nps_defconfig b/arch/arc/configs/nps_defconfig index 6e84060e7c90..621f59407d76 100644 --- a/arch/arc/configs/nps_defconfig +++ b/arch/arc/configs/nps_defconfig @@ -31,7 +31,6 @@ CONFIG_ARC_CACHE_LINE_SHIFT=5 # CONFIG_ARC_HAS_LLSC is not set CONFIG_ARC_KVADDR_SIZE=402 CONFIG_ARC_EMUL_UNALIGNED=y -CONFIG_ARC_UBOOT_SUPPORT=y CONFIG_PREEMPT=y CONFIG_NET=y CONFIG_UNIX=y diff --git a/arch/arc/configs/vdk_hs38_defconfig b/arch/arc/configs/vdk_hs38_defconfig index 1e59a2e9c602..e447ace6fa1c 100644 --- a/arch/arc/configs/vdk_hs38_defconfig +++ b/arch/arc/configs/vdk_hs38_defconfig @@ -13,7 +13,6 @@ CONFIG_PARTITION_ADVANCED=y CONFIG_ARC_PLAT_AXS10X=y CONFIG_AXS103=y CONFIG_ISA_ARCV2=y -CONFIG_ARC_UBOOT_SUPPORT=y CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38" CONFIG_PREEMPT=y CONFIG_NET=y diff --git a/arch/arc/configs/vdk_hs38_smp_defconfig b/arch/arc/configs/vdk_hs38_smp_defconfig index b5c3f6c54b03..c82cdb10aaf4 100644 --- a/arch/arc/configs/vdk_hs38_smp_defconfig +++ b/arch/arc/configs/vdk_hs38_smp_defconfig @@ -15,8 +15,6 @@ CONFIG_AXS103=y CONFIG_ISA_ARCV2=y CONFIG_SMP=y # CONFIG_ARC_TIMERS_64BIT is not set -# CONFIG_ARC_SMP_HALT_ON_RESET is not set -CONFIG_ARC_UBOOT_SUPPORT=y CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp" CONFIG_PREEMPT=y CONFIG_NET=y diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S index fccea361e896..4b0deaff001c 100644 --- a/arch/arc/kernel/head.S +++ b/arch/arc/kernel/head.S @@ -90,7 +90,6 @@ ENTRY(stext) st.ab 0, [r5, 4] 1: -#ifdef CONFIG_ARC_UBOOT_SUPPORT ; Uboot - kernel ABI ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 ; r1 = magic number (always zero as of now) @@ -99,7 +98,6 @@ ENTRY(stext) st r0, [@uboot_tag] st r1, [@uboot_magic] st r2, [@uboot_arg] -#endif ; setup "current" tsk and optionally cache it in dedicated r25 mov r9, @init_task diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 84d394a37e79..fff946b0ab4f 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -490,7 +490,6 @@ void __init handle_uboot_args(void) bool use_embedded_dtb = true; bool append_cmdline = false; -#ifdef CONFIG_ARC_UBOOT_SUPPORT /* check that we know this tag */ if (uboot_tag != UBOOT_TAG_NONE && uboot_tag != UBOOT_TAG_CMDLINE && @@ -521,7 +520,6 @@ void __init handle_uboot_args(void) append_cmdline = true; ignore_uboot_args: -#endif if (use_embedded_dtb) { machine_desc = setup_machine_fdt(__dtb_start); -- 2.14.5