From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF904C4321E for ; Fri, 25 Nov 2022 10:12:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 9DDA2C433D6; Fri, 25 Nov 2022 10:12:55 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id CB4C0C43470; Fri, 25 Nov 2022 10:12:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org CB4C0C43470 Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f48.google.com with SMTP id t1so3069488wmi.4; Fri, 25 Nov 2022 02:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=hRQplXnMXO/j/dCZjN3HfCgc8e7q8b/J3KcgZO8A6M4=; b=fMOeP9nCS5t+pZle+lEPgvncKlBVKQJrYeRlsw13Iv6caTMJUK83conG0f2KvRuWJK IudkWYY+HdY7/T1DnVgqrmlMxBO6MfrXLts0XY1ZasHwwH25oA/NmwHjwl3vH5JLEqvc atr679e3hHVSW61APP2EGpUobDeW00V6SqrD8iosN+awnFUTMFXs7yTaNFBfF1sFcjZP y9tpo0c5Et1QHlPeji29wT3CNpR5m7L20kVhcjBuG0S17+5HzRAQVHs1anZxNt6zClAm rZqQCUp3GyWLim3ZWK6Fvhf1B76ZPSMX2dAdbwyko+C8VZK1OTB2kzKAO06KbMiLSFGq LVLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hRQplXnMXO/j/dCZjN3HfCgc8e7q8b/J3KcgZO8A6M4=; b=Yulf1QZdJOVxMAY1jauGMpI2HwDB7oRXaLJYVbrl63fgXZv+pu2eG8TVgBlQjY0Qjt 6sBswAQD11huMHffD3+JjcvtWHoToK+RYnjjpQInSG2WV+ts65wqehKEzPa8FQQT+twd PpRZHIDMCKYiJMPgHXjA/GqcYoUFp0wHr516d3ts81+2zPWVKoYtSMwUB2G3gSwmtoqR PxGB4bA/ewIx4e09NiTwEyedmDnW49vp6RLeSrc/NsGG1a1Ghuw/QKx/7rYqT59W1gkc bhGnUSC1yCFiY+FdPXCU6tC+GW9sA8CuXNM3xod95MsO2Ee1RCGNOrN0UV5Wur8pM4tZ qilg== X-Gm-Message-State: ANoB5pnzM+eZOUXdt8zaNuLxvBFKd/pB+LDN/pdZpUJAmuSbJyZzmJIp S2tMGGFzrwEg9Kp7NUREoxA= X-Google-Smtp-Source: AA0mqf4SkxGZvAfDpVzz5RjSY7y/fdsN4OmHKyI0bdV7W2ZZpPr1g53i3cpPReq+Ti5SOPBvN55ukg== X-Received: by 2002:a05:600c:a15:b0:3cf:7126:1fd0 with SMTP id z21-20020a05600c0a1500b003cf71261fd0mr25606681wmp.14.1669371169559; Fri, 25 Nov 2022 02:12:49 -0800 (PST) Received: from orome (p200300e41f201d00f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f20:1d00:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id r6-20020a05600c458600b003cfd4a50d5asm8944926wmo.34.2022.11.25.02.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 02:12:49 -0800 (PST) Date: Fri, 25 Nov 2022 11:12:47 +0100 From: Thierry Reding To: Arnd Bergmann List-Id: Cc: arm@kernel.org, soc@kernel.org, Jon Hunter , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [GIT PULL v2 2/7] firmware: tegra: Changes for v6.2-rc1 Message-ID: References: <20221121171239.2041835-1-thierry.reding@gmail.com> <20221121171239.2041835-2-thierry.reding@gmail.com> <374ae4ef-2f57-4737-95af-b1bdfdb03740@app.fastmail.com> <6476b823-b47c-461c-b948-752e2671015f@app.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dtq8rxI/m1Pzd9kE" Content-Disposition: inline In-Reply-To: <6476b823-b47c-461c-b948-752e2671015f@app.fastmail.com> User-Agent: Mutt/2.2.9 (2022-11-12) --dtq8rxI/m1Pzd9kE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 23, 2022 at 02:23:36PM +0100, Arnd Bergmann wrote: > On Wed, Nov 23, 2022, at 12:33, Thierry Reding wrote: > > On Tue, Nov 22, 2022 at 10:25:50PM +0100, Arnd Bergmann wrote: > >> On Mon, Nov 21, 2022, at 18:12, Thierry Reding wrote: > >> > firmware: tegra: bpmp: Do not support big-endian > >>=20 > >> I pulled the branch, but I think this patch is inconsistent with > >> our normal approach: Since all ARMv7 and ARMv8 processors can > >> run with both big-endian and little-endian kernels, we normally > >> try to keep drivers portable between both ways, even though we > >> don't expect anyone to actually want a big-endian kernel any > >> more. Changing portable code to nonportable code doesn't seem > >> helpful here. > > > > The only reason I dropped this is because the driver is in itself > > inconsistent. Parts of it use byte-swapping for 32-bit values and other > > parts don't. I was originally going to fix big-endian support but it > > would've required changes to the BPMP ABI header to avoid sparse > > warnings in lots of places, then these ABI changes would've needed to > > trickle up to the canonical source, etc. All of that didn't seem worth > > the effort if we couldn't even test this in any way. So the easiest fix > > was to stop pretending and drop the partial support. >=20 > Right >=20 > >> On the other hand, there are already examples of important > >> drivers that are fundamentally incompatible with big-endian > >> mode, notably drivers/efi/, which is required on a lot of > >> machines. > >>=20 > >> You don't have to revert this patch, but it would be helpful > >> to mark code that is explicitly unportable with a 'depends > >> on !CPU_BIG_ENDIAN' line in Kconfig. If you agree, I can > >> add that. > > > > Yes, feel free to add that. >=20 > Added this commit to the soc/drivers branch now: >=20 > commit 4ddb1bf1a83783cebdb174b0efaf62f63ad64e0b > Author: Arnd Bergmann > Date: Wed Nov 23 14:21:16 2022 +0100 >=20 > tegra: mark BPMP driver as little-endian only > =20 > The BPMP firmware driver never worked on big-endian kernels, and > cannot easily be made portable. Add a dependency to make this clear > in case anyone ever wants to try a big-endian kernel on this hardware. > =20 > Link: https://lore.kernel.org/linux-arm-kernel/Y34FCQ3xTmcjqKRT@orome/ > Signed-off-by: Arnd Bergmann >=20 > diff --git a/drivers/firmware/tegra/Kconfig b/drivers/firmware/tegra/Kcon= fig > index 1c8ba1f47c7c..cde1ab8bd9d1 100644 > --- a/drivers/firmware/tegra/Kconfig > +++ b/drivers/firmware/tegra/Kconfig > @@ -14,6 +14,7 @@ config TEGRA_IVC > config TEGRA_BPMP > bool "Tegra BPMP driver" > depends on ARCH_TEGRA && TEGRA_HSP_MBOX && TEGRA_IVC > + depends on !CPU_BIG_ENDIAN > help > BPMP (Boot and Power Management Processor) is designed to off-loading > the PM functions which include clock/DVFS/thermal/power from the CPU. Sounds good, thanks. Thierry --dtq8rxI/m1Pzd9kE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmOAlR4ACgkQ3SOs138+ s6Fb5xAAoHyriQLf9Zt60TezBoZcJ0d1vzc0fW5d78b9KVOQSWrp3nh0R8HfOlJz iDQ4/hJvuSEbLVJHNA25Llo9OYwJHqtDpV+tNdJrjeX5IRZ522vv0xYSUWPF9zxE aqSU6xnthj9N7iA2PzMaWo/P0Io+K1YNJWw+6iTWODhQna31rn5aXNz0x6KBKYRm er0yzSMGdwxAA7tpYDF5232T/oV3zdD89NS0vHPfHTezSe/9gsd6EBdr5te/dKFA voqCG6Z1jL8TpMvJK7aJbkjDXAbhqaXEFnk5teFW8gYM8okuI6J8FpTmJUP93M8I O4HPmdyp9xKUh8BC+ELBHdDvzdrbY2oplBMIcVAz/OHyrLaVLahQ5+eJhloXGF50 bjElUbIIPO9Cq1LgEgmPLm1uThfT0v7Vwx6z0FDcjOE6pLbvcudtvDLtXC+l808L jTecsl4H8cSKy8c/7IEqn86XPZb5gmAlr1PXyzv9KzEubG/IRVxvatkbeifdZNw4 zesg8l7SyO5YJjvDHenTPw6mAx5O1GasLnYp/1PBYYCECV6PczZqKGBJu7uN75Sc JWkgg4zLsOIWMnlIFgxtTdosZWqs74+WtnXNFbhEKuDMt/mtT4TJT+WAhVd39J8E FxvRzYrJyskJmO9d4qqkhvwgQorxo/4xrtlV1F+sYTlDAEOcJTs= =MHQ+ -----END PGP SIGNATURE----- --dtq8rxI/m1Pzd9kE--