Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2287279imm; Mon, 28 May 2018 05:26:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrwjR6Hq4TcRU0Cz90G1DUbXQA2/AIzr3Ad96sQyWDIKtvpJytzBfpQm0Y0yBH1X538vR+F X-Received: by 2002:a63:7b1e:: with SMTP id w30-v6mr10465560pgc.249.1527510385681; Mon, 28 May 2018 05:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527510385; cv=none; d=google.com; s=arc-20160816; b=wNlkpUwBhE4yAQUK9e9BIxGSMbX7hhfZmXLKybKFbHDXDFl77iiSWowfW/vX0fkRhY 4wLlrSrrsj9ClSbOoWax0ZdplFS/OV8G4EWixi0JdjK38m0aoxalZYhLuEXzALMK1gpC G1vzQ/TnzosHxE77LqEUrkp0Fa28W0Ew6V8tKI90ywwrmY7hP1Z4DEziWFPWJhKHuw1Q wncz9DKDhP2CWjleLrYk6AQrcJMMKJiWlA7Q1tBc1cJztGAkLtzznUzKEmNfkgcbPlwQ Pbozos2JVZP1Hh8salSLZEo+2WqwnLZgiASfWxEUSmib9P/QP5Yo8SLmFHia3c08AKsH vsaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=VgEYQq4NLgEOz1iiQD4S5GULaejPdIYZsbT9h0OisGo=; b=TpA3rzjkwoJO7cvgYXD2ezAOvl7Zd/w37QZOzozh8rY4e9+jBdVIXJwzxg0lUIfnWY uT1+Z9Oe+J6x2r2bt0+1AoxzpHxy+RrnouzjQ0ZkHhNq8259kW2bGhqxEDKL1LtiaoSe DRuR0rVPwf2vHGTbDhVORr5rn8UMWGDR7+NhvezPVCGoV1ZxLq6ziGVKQrtoHG1PIxNM xzHcwmcSyi8MXPToHfl1kikqHN3QFSRpAITJK142uL8JXrz3VhiSua2pm8ngH+1kiybj +ZD8oq5hrbTwNKJbb1dH8R5zxkDJqdmJQby5XgCqLohV0COFOEYgFkXgE8gdT3sHT2Ii 1Xyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2XpKz574; 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 b3-v6si29752007plc.14.2018.05.28.05.26.11; Mon, 28 May 2018 05:26:25 -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=@kernel.org header.s=default header.b=2XpKz574; 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 S1423502AbeE1MZb (ORCPT + 99 others); Mon, 28 May 2018 08:25:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:48772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164835AbeE1LBL (ORCPT ); Mon, 28 May 2018 07:01:11 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 984062087E; Mon, 28 May 2018 11:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505271; bh=p8pRWyWaJiIX03H8id3/Bgt4j0UtOY93kz/xua0DbH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2XpKz574Xi6eC1MgQw+u+uUnje0xNYmg5JQrT2K52AfWoeeIHkCB2h2+4QddDmWrP VE3M5WZCOce2hemmpdEnkXdoMqAj94WW1bibj6BlIk3+uudXI5uUevXRyRttw87Uko Pk43BHrehZPXKxfaX9ipRdvM9q5aerXWPI8lph4c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ivan Gorinov , Thomas Gleixner , Mark Rutland , Rob Herring , Sasha Levin Subject: [PATCH 4.14 437/496] x86/devicetree: Initialize device tree before using it Date: Mon, 28 May 2018 12:03:42 +0200 Message-Id: <20180528100338.242904608@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ivan Gorinov [ Upstream commit 628df9dc5ad886b0a9b33c75a7b09710eb859ca1 ] 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 Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/devicetree.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -276,14 +277,15 @@ static void __init x86_flattree_get_conf 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); }