Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp692325pxb; Sat, 6 Mar 2021 13:39:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFO52DDi9wLBXjaTCTTSW11qY2oDawWKF/jeWuaVaEfA9Bgg24SDjF320tkq1ekQO7QQjs X-Received: by 2002:aa7:de82:: with SMTP id j2mr15422067edv.313.1615066764986; Sat, 06 Mar 2021 13:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615066764; cv=none; d=google.com; s=arc-20160816; b=P5nZEqCvRMbONjJ1fZzTq74Mqe86/1L54MQUdwZH6YA0LW+40+s/zbolC3Egi7rRjW zc92ZWSw9F3ztBlOZX1dfB8gmDAZ8smtdd1iE0PBDGOYdQqCijAPHsNv/Lu4FhcmoD7f YiJlUmWmAeTPRSiP/cksf8x7DjoakzWsjpusKJU7MOOxBFcUX2857VxsH29mSDZw3W/a ZFYkhn5OY16sbpG9a9oVFiAGyXi+b+XI7lDwXVC69DbAz1u8ttXPxU4g4je+Nmoy51SP 93OsYPEMbt7uLiweu+lbucQLke9CMg+9K5Ux1YCd6WxEFPS0D4EUGWv802XEnbMpIHOU 4fkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7A0VOvCfl+U06ZpaUEf3bWRU7A3XrmarnXWCSLAZIa8=; b=XRH/qa13nMBnr+7+lXkZeN8PTPs3SRwo1/rUtoxC4br7x8DLKJYp3YREA0nsydUfsK LUU4Kz+SmqLwB+uq1C6n5S0y5AeQMf+WVGWGdq55x2mTN2LLd9QtKxRY3hqlltfU9me3 Y/K/L/TS2NHV6vUs7mRZht31xiEDT08+AJXT0vUNFKbDe6CajuX8FHgghUjip7jDuveR jmgvJai4PLF3PYuvscw2nrAVZNQOoFIjNj4VLq7Bm0MFCrVc5Jgj8S3mvWqReNPZVolm Lefn3vP+poicChAx+oWk1lC6kLI8rCr2BK9vtPf9zB/tKIrvlxzPgpKthT/jnlJCAW8T 1J9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="iEd2cL/E"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si4029909eds.493.2021.03.06.13.39.02; Sat, 06 Mar 2021 13:39:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="iEd2cL/E"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229759AbhCFVfg (ORCPT + 99 others); Sat, 6 Mar 2021 16:35:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:48120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbhCFVff (ORCPT ); Sat, 6 Mar 2021 16:35:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 18850650C9; Sat, 6 Mar 2021 21:35:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615066535; bh=7A0VOvCfl+U06ZpaUEf3bWRU7A3XrmarnXWCSLAZIa8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iEd2cL/EcpOfzk5qqnv2vAS9AQ96X87gITqP0XNsJnmwB6B4qSjekqrlRyJG5lGk+ f0pYzSEud0YZoLAn8iYkKOQUur+uYCxBKD4mBdDMPsXvhw3RyAtDUVNTNm+mPhGifF yEkC/16w0Yuf45Sw6we1fGRyRxfATAYzf4OG3DH6fyNHl/9tD1G3oPQRmM5H17Qol0 UFh0XWgLemnBoHSt2fYePOm23TzHKwJM60rifWtQximb28s0zvPPrvhGJiYAZOeyPj v0Yr6BkjGCmlBZeNCLJTfr1E0Q4S5WG6/mgsD/azXnN2rOyJxNdSxPjz0DknBqt3wW yiL2I5YPicePA== Received: by mail-ej1-f47.google.com with SMTP id p8so11765729ejb.10; Sat, 06 Mar 2021 13:35:35 -0800 (PST) X-Gm-Message-State: AOAM533p0X0qV/1sOG7AApUDENslkWG5hwNsL4ciIKvo44NucoLj5h0c MhMJtffrPawEK5nX4tHnIudN6DO7M2ME26Mffw== X-Received: by 2002:a17:906:d153:: with SMTP id br19mr8111116ejb.360.1615066533691; Sat, 06 Mar 2021 13:35:33 -0800 (PST) MIME-Version: 1.0 References: <20210303193305.924384-1-paul@crapouillou.net> <20210306084513.GA5453@alpha.franken.de> In-Reply-To: <20210306084513.GA5453@alpha.franken.de> From: Rob Herring Date: Sat, 6 Mar 2021 14:35:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] MIPS: boot/compressed: Copy DTB to aligned address To: Thomas Bogendoerfer Cc: Paul Cercueil , od@zcrc.me, "open list:MIPS" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 6, 2021 at 1:45 AM Thomas Bogendoerfer wrote: > > On Wed, Mar 03, 2021 at 02:37:55PM -0600, Rob Herring wrote: > > On Wed, Mar 3, 2021 at 1:33 PM Paul Cercueil wrote: > > > > > > Since 5.12-rc1, the Device Tree blob must now be properly aligned. > > > > I had checked the other built-in cases as microblaze broke too, but > > missed some of the many ways MIPS can have a dtb. Appended and > > built-in DTBs were supposed to be temporary. :( > > and a fdt can also be provided by firmware. And according to spec > there is no aligmnet requirement. So this whole change will break > then. What was the reason for the whole churn ? There was a long discussion on devicetree-compiler list a few months ago. In summary, a while back libfdt switched to accessors from raw pointer accesses to avoid any possible unaligned accesses (is MIPS always okay with unaligned accesses?). This was determined to be a performance regression and an overkill as the DT structure itself should always be naturally aligned if the dtb is 64-bit aligned. I think 32-bit aligned has some possible misaligned accesses. As part of this, a dtb alignment check was added. So worst case, we could disable that if need be. Rob