]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ARC: enable uboot support unconditionally
authorEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Thu, 14 Feb 2019 15:07:45 +0000 (18:07 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1839376
commit 493a2f812446e92bcb1e69a77381b4d39808d730 upstream.

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.

Cc: stable@vger.kernel.org
Tested-by: Corentin LABBE <clabbe@baylibre.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arc/Kconfig
arch/arc/configs/nps_defconfig
arch/arc/configs/vdk_hs38_defconfig
arch/arc/configs/vdk_hs38_smp_defconfig
arch/arc/kernel/head.S
arch/arc/kernel/setup.c

index 180bc0aebf7976442d5a5a5ac374564182bbcca4..c390da7926c905fcaeeeddced1984b019912efc7 100644 (file)
@@ -197,7 +197,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
@@ -545,18 +544,6 @@ config ARC_DBG_TLB_PARANOIA
 
 endif
 
-config ARC_UBOOT_SUPPORT
-       bool "Support uboot arg Handling"
-       default n
-       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
index 9121c6ba15d0d7226f5e5d7dd61e548d5e0fde2c..57eeb4e251684295669bf7f20bfe7656b1a64f9d 100644 (file)
@@ -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
index 4587c9af5afee5fafc32bcf8b576cc044b70ca2d..be978e6395659916a3f5dfbf4a440967aaf35990 100644 (file)
@@ -14,7 +14,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
index 1855aa995bc98a677bf9a04d74b6ce87a61945c7..f82234a742861e2ae1b596eade58199e534cf6f8 100644 (file)
@@ -16,8 +16,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
index 208bf2c9e7b0d98b97e1778addd3bfea3e3424ce..a72bbda2f7aad0099860ef3f5e99af12722defae 100644 (file)
@@ -100,7 +100,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)
@@ -109,7 +108,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
index c216c49785f5a2aec3d844f8a44c08009b14eb57..e501c929940227016adfc6ae38843de6a17473d4 100644 (file)
@@ -493,7 +493,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 &&
@@ -525,7 +524,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);