Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4092915imm; Tue, 25 Sep 2018 11:10:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV635qJkeX+8epjXrC93glbs1qmiRuyr94TkUZ3IsjUFRMN2R2bl2qZVaMLAVzmuCrEUOF2cz X-Received: by 2002:a62:50c3:: with SMTP id g64-v6mr2279794pfj.244.1537899048057; Tue, 25 Sep 2018 11:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537899048; cv=none; d=google.com; s=arc-20160816; b=nwbD/w2o1oP4++x/7UDy5GZPtfSgnKFIr6q1Hj6/lBhxS+Vqq+xDRRnTGYoX3Q4Fnd HwBp27r9jxRJMgJVqnqnkcR0rfVwF5xtvFWWuMS839CHHLkfRn+RJtdwOrgYcu7qKeKN kdnkHALHXc48dPbQhSJivo5qaMTSmYftyVjX98SQ7XzNJKd/zUCnF5uN6coTIS6TFp6L GtrfMH65tiUX+LevhgeuOfufL3VqiSMG/ubJwUCESF/OT1WvPwqjvNnzTn6WEQsSVv93 w/lYivEld/35C509YjEWNNdudR0PqGi+EN/OvMi52eDTVkWCAdoI6g7N7eKWG9LpS8xO PAJw== 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=Qpq8xhJhRVyPIhybIrRVbsiL98w7WDObH988kQk9jIk=; b=DFn0CFJSNqXqMggIvJJ62VvocgNqTwJ/vFjSvWbRM51xMndwQipWwDsVB33F78zCPe 1wOWu9AeFcpCektvhpNCpaTNRf9WrPaRI76YJNcrtDrMBhvpcsLFluCuYsbWH+mCd+bQ cCripzxjdcpyV2976lXYmL7CuU0MV1e4sKliVJomBHgQCwvGHoDSxvmqSRv0LJW+UcFA FPHUao6fSmTy5HIiN9rtq3/vekyUEhJBoNH/II6G7mGQBFSMr7WiCALKf3cVaInXwU/b utfmi5qefIFXbgy0Co2iu7PigZgPaZxGvQNs2rxdiQnwxa/M9m1+x6agA2LwWazRyQNd 0S6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lyH5kQl0; 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 j15-v6si2981658pgt.297.2018.09.25.11.10.32; Tue, 25 Sep 2018 11:10:48 -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=lyH5kQl0; 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 S1727471AbeIZARl (ORCPT + 99 others); Tue, 25 Sep 2018 20:17:41 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34518 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727448AbeIZARj (ORCPT ); Tue, 25 Sep 2018 20:17:39 -0400 Received: by mail-wr1-f66.google.com with SMTP id t15so16417205wrx.1 for ; Tue, 25 Sep 2018 11:08:56 -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=Qpq8xhJhRVyPIhybIrRVbsiL98w7WDObH988kQk9jIk=; b=lyH5kQl0MtYSQ0e0ZZ+Aw+pOZoJ05xEGN105fykxTjUCsXt905xiZczKKpj0eTnj0i fl8DyIDY6xwMIj7ThYO523uNwUskC4HcfyZL3Qee58dw70MEHj4p+zFM/0PmYIS29kEC 78/oUC948cBKaA99QqyEt3QOy7VKw6xWXE1xzeH6zMfuRaYMv5arvoYJJJmwgeloHjCl a/r3Jl4itW9o3modo6t6Ca67XaP47Wzr6AptZ4eq2Vh/w80b8s+UH95r1YkQqGTihTqo VFNUvPhQazUwnd/cAZfTreFSVw9KiJgiK66fdV1oQMhvjP7gyM0gdtHZUslPIFdUzNuj jt2w== 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=Qpq8xhJhRVyPIhybIrRVbsiL98w7WDObH988kQk9jIk=; b=uWSyfUDeotQTmmyZPSapfU/9UUQAPz2c2Yr/m+Y7y4P9odXvPd0mv8Xmr+TBdS/kJV 31IX48Oz9lz9rcMXiEhAEbXJOQGgGiX+asVkSZbUhhratmvn0jpNWAprTdLEMxS0cCbM SEBsrxbqWjKv6Y5qkGl7jIWFKF5Z1lhPAnXdxL29nKjVUa2uIOURaMBXSD3zF3Zlr5mP P30wsKYpYwVmhJkPKeKbJLDaDCYlQBD0SNZVRyqD9OrT1uZt5iswZ74m9TH8Ohx7c571 6p9RKABEpS7+El0ZLXAO3PHBKKfV11WCYxBaJaAZHMG2tXxIZjyPTLuOuLBH+qhxRqlo 69HQ== X-Gm-Message-State: ABuFfoibqFOUO0XcVNfVTxW1/AIbvg6ylVXoRhovy3/M+Tj2ISZONNbs kepdcBOVqvmIJ32uzCQrsC0= X-Received: by 2002:adf:ac13:: with SMTP id v19-v6mr2077035wrc.135.1537898935836; Tue, 25 Sep 2018 11:08:55 -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.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 11:08:55 -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 4/4] MIPS: Octeon: Remove special handling of CONFIG_MIPS_ELF_APPENDED_DTB=y Date: Tue, 25 Sep 2018 21:08:25 +0300 Message-Id: <20180925180825.24659-5-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 The ELF appended dtb can be accessed now via 'fw_passed_dtb'. Since raw appended dtb is accessed via that variable too, this now effectively allows to boot with CONFIG_MIPS_RAW_APPENDED_DTB=y on Octeon. 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/cavium-octeon/setup.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index a8034d0dcade..3c26054ce72b 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c @@ -1156,7 +1156,6 @@ void __init prom_free_prom_memory(void) void __init octeon_fill_mac_addresses(void); int octeon_prune_device_tree(void); -extern const char __appended_dtb; extern const char __dtb_octeon_3xxx_begin; extern const char __dtb_octeon_68xx_begin; void __init device_tree_init(void) @@ -1165,15 +1164,12 @@ void __init device_tree_init(void) bool do_prune; bool fill_mac; -#ifdef CONFIG_MIPS_ELF_APPENDED_DTB - if (!fdt_check_header(&__appended_dtb)) { - fdt = &__appended_dtb; + if (fw_passed_dtb) { + fdt = (void *)fw_passed_dtb; do_prune = false; fill_mac = true; pr_info("Using appended Device Tree.\n"); - } else -#endif - if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) { + } else if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) { fdt = phys_to_virt(octeon_bootinfo->fdt_addr); if (fdt_check_header(fdt)) panic("Corrupt Device Tree passed to kernel."); -- 2.19.0