Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4092303imm; Tue, 25 Sep 2018 11:10:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Wn+PR4y8kyfBjwAoOe4MiY7/t98p4ChvUO3uiJuBzbnenf8p5IH1mYMyKbvlkycn+aCUe X-Received: by 2002:a62:9042:: with SMTP id a63-v6mr2355032pfe.52.1537899014235; Tue, 25 Sep 2018 11:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537899014; cv=none; d=google.com; s=arc-20160816; b=idEG8ZSyUuCXtG8xrC2mc5zF3FrEzjAvvkzs2unRZHJ673s+g84hEmjIuAzovXu/4h A/VhUKMIy/fl5F0Dx25yWKyOMsVN88oCTRSLNn4vIZM5Reuu4ePzpm34S10D+4XDFXlv x2nUha6ipZY/30D0Dg+ZG44MaLdwQ/t8pCazDk4691O7F8koRucCkLHX8+dOzgd+hGEW r8tllbWVsIceryMurNPwDqLVnBLqN2sX3gOED05xZ9IVJDOy7WjQKErNT0Y6I6ZWKr+D af4mvDZCmD5/b3EYqg1SG9MPqQ5AjyZO+aJeuufhelO4QQ/vMgb+eWEimeOj7rgZPs92 XDTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QcsiSHC0IriMHLUqwataqDFFhjE03MSei2N5kMdLovo=; b=zQywtRRVMY4YQ8BTWMJjE7qkt0CcbUmUMi0LG+VQlPX5uB/xsJKcWz8IwBwGo2RGA+ 3PIY7QqzjbHpaGwVMrWn0bLSP5gOyy8rCcSNxRuNzflZVG4eIfWNiv3CYTF5M0EE3/rq fjfC2QwhX0GT+plfbCVb1y+2Ob62YsrBo1uKmWzFX1A0kmWd6+pQ3V6EapDCSbWwj8Jq 9Pzj0LJ9SFhDteCBkUQV5ue9nfoxgfjae0Fs5+Br0IVRcqofJRV2RuORXUI3y1eaFw20 aDfPzC3V0NXoolpQo+N0+r/VyEa12RjHAC+yybFY80cXFqvEDXcCPyg5vuS+EKlfzr9y VoFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ILilAhzm; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d40-v6si3028024pla.217.2018.09.25.11.09.58; Tue, 25 Sep 2018 11:10:14 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=ILilAhzm; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727417AbeIZARf (ORCPT + 99 others); Tue, 25 Sep 2018 20:17:35 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50339 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbeIZARf (ORCPT ); Tue, 25 Sep 2018 20:17:35 -0400 Received: by mail-wm1-f66.google.com with SMTP id s12-v6so14443778wmc.0 for ; Tue, 25 Sep 2018 11:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QcsiSHC0IriMHLUqwataqDFFhjE03MSei2N5kMdLovo=; b=ILilAhzmHg3sw6pL13xeTdJOGIsluDxAm3sABWjPa7BWKiLJU5oUSkgnRSzSF+yjtV THXQQ4a77+AWvPdjc07c0LI9BQhvumu64ew4clbmLy2nKg7KQHdfPJBWO5mfw4OtDV6l KcujJ3S1cBd/GGc8faJ3dZmWgJ91Xy+OLjahjqyJGB3FWjwuhzIRgvpzTHmfnnaZBbKc R69d/m2qrGS9RcmVFZOdcNiVHFDHw5BZyA5/EczB9FVGgHNYVIsCpLctBZTs/GkQNI+5 ezcW8DCcBvdI9PJ3k+GNGyYtBoF1LL7ZIBmasxdaLFjLJjZKIeB+KXKEP0kob0Eu9v8o 7v4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QcsiSHC0IriMHLUqwataqDFFhjE03MSei2N5kMdLovo=; b=CYWbfb8PoA0zESXmZq0WQIOMgGR8A89AktmHjkh/HX1NTtC7XBNpHjbTeUXKJKd9Nk 62OOf05H0SRqu7S1uMPfDhDyFhjNptJdklpKpu5tIHPutzeJ+s3m2qORay9kv8tEL3p2 Qc33qIUrBssc4Bya7O7/JbTzL9hH0jrksB+qvfCsF8JTYIY8uJ9KXCdrnA0OI5y6Rl9I lUpoIAZSDIpSG0kF2hK6ywEAjiEdKH8zd+r3i0F1TZz9zFlyFrz1kaBAKmG4RMIgC88l ed8buFpa5lI9qYa/Ah2we+46KXjHgMIL6JBi7vonRoRzKlTEQHazxg+qqy0cX2hbpR3M CpdA== X-Gm-Message-State: ABuFfoi89aQ25F31+zkW884cVN3+TiXWydRJ7dIZ1ofq+vMRfUVsTMmG qqDtADeFMNScSRQe30nDGpU= X-Received: by 2002:a1c:7f93:: with SMTP id a141-v6mr1732086wmd.45.1537898931422; Tue, 25 Sep 2018 11:08:51 -0700 (PDT) Received: from laptop.localdomain ([37.122.159.87]) by smtp.gmail.com with ESMTPSA id v6-v6sm2755827wro.66.2018.09.25.11.08.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 11:08:51 -0700 (PDT) From: Yasha Cherikovsky To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@linux-mips.org Cc: Yasha Cherikovsky , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] MIPS/head: Store ELF appended dtb in a global variable too Date: Tue, 25 Sep 2018 21:08:23 +0300 Message-Id: <20180925180825.24659-3-yasha.che3@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180925180825.24659-1-yasha.che3@gmail.com> References: <20180925180825.24659-1-yasha.che3@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 15f37e158892 ("MIPS: store the appended dtb address in a variable"), in kernels with MIPS_RAW_APPENDED_DTB=y, the early boot code detects the dtb and stores it in the 'fw_passed_dtb' variable. However, the dtb is not stored in 'fw_passed_dtb' in kernels with MIPS_ELF_APPENDED_DTB=y. Under MIPS_ELF_APPENDED_DTB=y, the dtb is also located in the __appended_dtb section, so we just need to update the #ifdef. This will allow to access the dtb in a more uniform way. Fixes: 15f37e158892 ("MIPS: store the appended dtb address in a variable") Signed-off-by: Yasha Cherikovsky Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org --- arch/mips/kernel/head.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index fef2f61c5394..351d40fe0859 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -94,7 +94,9 @@ NESTED(kernel_entry, 16, sp) # kernel entry point 0: #ifdef CONFIG_USE_OF -#ifdef CONFIG_MIPS_RAW_APPENDED_DTB +#if defined(CONFIG_MIPS_RAW_APPENDED_DTB) || \ + defined(CONFIG_MIPS_ELF_APPENDED_DTB) + PTR_LA t2, __appended_dtb #ifdef CONFIG_CPU_BIG_ENDIAN @@ -104,7 +106,7 @@ NESTED(kernel_entry, 16, sp) # kernel entry point #endif /* !CONFIG_CPU_BIG_ENDIAN */ lw t0, (t2) beq t0, t1, dtb_found -#endif /* CONFIG_MIPS_RAW_APPENDED_DTB */ +#endif /* CONFIG_MIPS_RAW_APPENDED_DTB || CONFIG_MIPS_ELF_APPENDED_DTB */ li t1, -2 move t2, a1 beq a0, t1, dtb_found -- 2.19.0