Received: by 10.223.185.116 with SMTP id b49csp6072559wrg; Thu, 8 Mar 2018 01:05:20 -0800 (PST) X-Google-Smtp-Source: AG47ELuy29YOS4nO7FWkNTqyE5FUmiwD1zcw9/s5PVimjsTZqytslWKRpJXbTRpxlrveB6HIJqMK X-Received: by 10.98.141.65 with SMTP id z62mr25753020pfd.129.1520499920334; Thu, 08 Mar 2018 01:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520499920; cv=none; d=google.com; s=arc-20160816; b=dFf6flUJf16ccscNivZIkPpymyq0Es3sODPhAb278Or6RCcrDkvU/jDK3yn4i4kiOG X1Ikoe6OsywWqddSxWRVK6A4LhFEISWkTAGLhkPIaj/kZk4Au0qZBXXTKhRXbfcY2Fvg U0BcKF/3g/HrI2GJxY5nbO+2qcB3AlANTvH5qheEBxFb8ytb+enb0soTiFGL+ul/Hju0 eaPUtxa34UQE0sg9E4ih8g6OdVBDVDdGRW0chizvHFGFNlkmLzkpUgbBrqQcBt0os9Xk dsV1FJK8xNiUbyZbxQGEsfN+6cR6WgWVX4Lokz2Sp8u/3KfIGTIN7Thnjtp2hHgqcQFi YHqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=NnMTWA4xCthhi1oVW8LaR1AGg8OKPxLrNUajUsBFKQM=; b=EpunGpEJJtfXRkf4X7ouuWokG+pdZL3KATGIdqQrikfrakwCG6dR4nT1BhzRdIUrzd r71WmcVMRXm834PpOTf4/ttrHlP8DfDKwddkC4zvRwQlDOik/KscTuqDW8wmzmD94inE hi8VTcS6AcTXPdsl7HJtLcr1YvCGfLFbksAUF0H0psa1oEr/k4YaJDi4H8GKokUJ9U3n GKPCrSeox+rwbhGlRfUqDSRHoTilVrCkwUTdpnzAI8aS76ReBMI0TQx7BMvgIxuZoMFT Qg8hTc6tCjMzPZPdql8idg+Q7gTxMPbxebOuemOU3B+SEOAqlHVNWAcH2IBPJRZzA1Gp v/NQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w61-v6si14431491plb.733.2018.03.08.01.05.06; Thu, 08 Mar 2018 01:05:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934576AbeCHJEF (ORCPT + 99 others); Thu, 8 Mar 2018 04:04:05 -0500 Received: from terminus.zytor.com ([198.137.202.136]:48541 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbeCHJD7 (ORCPT ); Thu, 8 Mar 2018 04:03:59 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w2893nHL019933; Thu, 8 Mar 2018 01:03:49 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w2893m9b019930; Thu, 8 Mar 2018 01:03:48 -0800 Date: Thu, 8 Mar 2018 01:03:48 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Ivan Gorinov Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, ivan.gorinov@intel.com, tglx@linutronix.de, mark.rutland@arm.com, robh+dt@kernel.org, mingo@kernel.org Reply-To: mingo@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, ivan.gorinov@intel.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/devicetree: Initialize device tree before using it Git-Commit-ID: 628df9dc5ad886b0a9b33c75a7b09710eb859ca1 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 628df9dc5ad886b0a9b33c75a7b09710eb859ca1 Gitweb: https://git.kernel.org/tip/628df9dc5ad886b0a9b33c75a7b09710eb859ca1 Author: Ivan Gorinov AuthorDate: Wed, 7 Mar 2018 11:46:29 -0800 Committer: Thomas Gleixner CommitDate: Thu, 8 Mar 2018 09:59:53 +0100 x86/devicetree: Initialize device tree before using it Commit 08d53aa58cb1 added CRC32 calculation in early_init_dt_verify() and checking in late initcall of_fdt_raw_init(), making early_init_dt_verify() mandatory. The required call to early_init_dt_verify() was not added to the x86-specific implementation, causing failure to create the sysfs entry in of_fdt_raw_init(). Fixes: 08d53aa58cb1 ("of/fdt: export fdt blob as /sys/firmware/fdt") Signed-off-by: Ivan Gorinov Signed-off-by: Thomas Gleixner Cc: Mark Rutland Cc: Rob Herring Link: https://lkml.kernel.org/r/c8c7e941efc63b5d25ebf9b6350b0f3df38f6098.1520450752.git.ivan.gorinov@intel.com --- arch/x86/kernel/devicetree.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 25de5f6ca997..63d2ebc21825 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -270,14 +271,15 @@ static void __init x86_flattree_get_config(void) map_len = max(PAGE_SIZE - (initial_dtb & ~PAGE_MASK), (u64)128); - initial_boot_params = dt = early_memremap(initial_dtb, map_len); - size = of_get_flat_dt_size(); + dt = early_memremap(initial_dtb, map_len); + size = fdt_totalsize(dt); if (map_len < size) { early_memunmap(dt, map_len); - initial_boot_params = dt = early_memremap(initial_dtb, size); + dt = early_memremap(initial_dtb, size); map_len = size; } + early_init_dt_verify(dt); unflatten_and_copy_device_tree(); early_memunmap(dt, map_len); }