Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp880607ybm; Tue, 21 May 2019 05:16:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3LXyCDdEGjUZb/6QiVJLRXa9h6EOcrGWjyNFTPgLk+CPAIoViRRg4x7hyudQAO/5BaXrF X-Received: by 2002:a62:1846:: with SMTP id 67mr68025570pfy.33.1558440997711; Tue, 21 May 2019 05:16:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558440997; cv=none; d=google.com; s=arc-20160816; b=q1JB8vyDa6WzxPwfDvoeiRclnXygr+3IvVRNasPgvuSaaJvvL3vVm0/YzcpiWvKvQR eP4v00PTiAzWSOCVyWdVVLwzM4j7ydWxiE5WLDHhN0Q/42nRoxfZif5ZCclcH9uCEjtY lBNRBxfYY29kuHvoSbNvjvAVIaI2ZSqUKGdna8Q0a+71zn7FTDFGqLcw6RbqZ3AdhVwl yk+BMZ5Wqld2Zgo1VkKD61eaqGz9GLhio5RRhyPuqHU2soHbx/pd2hTZn+vdde4d8yVK al9GEda1Dt4LeQiZmQGjN1TxJGrmzRh6A9vwm2i3o7Ae5pNvnp6qlnXmevQY4b+4HBHK F7Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=8p0LNhPn4w6Kb3CDv++NwPztCDmnMNa8Hs6VKrnJKf0=; b=QwmWvvQCVxUk6DNEdBO8pKvztm74LzlxhL1/1bQGdFiNZNDvSe4XGoIJw4tsreGJ+t qqJyHolBP67a/DKdm4RYJNL/bUFRKt1KRTnho6JFdy3nDJcZOPx84g7iD3fWOqa3lFFq JVGzigqFBB59NeB655NcvZ+WxzKbe00ff39zTWfJDXXv5Tl+JI6zHsFLul3W6Ba0We/V hFwEgKB+yEel92pU326/MGplvrsAutpa/nbtr0Rlst6Qku5iI7k79y2+DYwBsSyGZVR4 U86pxWdjx3SZ4u29qnUGkd9wWcATz5mpuVgI/To3skjGwtOoA4VL9xz6d0hZ5PJmVZpJ crxA== 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 63si21403028ple.154.2019.05.21.05.16.21; Tue, 21 May 2019 05:16:37 -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; 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 S1728005AbfEUMPO (ORCPT + 99 others); Tue, 21 May 2019 08:15:14 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:57554 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbfEUMPN (ORCPT ); Tue, 21 May 2019 08:15:13 -0400 Received: from ezekiel.suse.cz (prva10-snat226-2.provo.novell.com [137.65.226.36]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Tue, 21 May 2019 06:15:04 -0600 Date: Tue, 21 May 2019 14:14:56 +0200 From: Petr Tesarik To: Nicolas Saenz Julienne Cc: Oliver Neukum , stefan.wahren@i2se.com, Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Eric Anholt , mbrugger@suse.de, viresh.kumar@linaro.org, rjw@rjwysocki.net, sboyd@kernel.org, linux-rpi-kernel@lists.infradead.org, ssuloev@orpaltech.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mturquette@baylibre.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb Message-ID: <20190521141456.46f6d4a7@ezekiel.suse.cz> In-Reply-To: <46004f242c2618a185445630580116c772455613.camel@suse.de> References: <20190520104708.11980-1-nsaenzjulienne@suse.de> <20190520104708.11980-4-nsaenzjulienne@suse.de> <1558356237.12672.3.camel@suse.com> <46004f242c2618a185445630580116c772455613.camel@suse.de> Organization: SUSE Linux X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/v4zFxgx_udbNpFsK480f9ms"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/v4zFxgx_udbNpFsK480f9ms Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 21 May 2019 13:39:31 +0200 Nicolas Saenz Julienne wrote: > Hi Oliver, thanks for the review. >=20 > On Mon, 2019-05-20 at 14:43 +0200, Oliver Neukum wrote: > > On Mo, 2019-05-20 at 12:47 +0200, Nicolas Saenz Julienne wrote: =20 > > > + * For more information on the firmware interface check: > > > + * https://github.com/raspberrypi/firmware/wiki/Mailbox-property-int= erface > > > + */ > > > +struct bcm2835_firmware_prop { > > > + u32 id; > > > + u32 val; > > > + u32 disable_turbo; > > > +} __packed; =20 > >=20 > > Hi, > >=20 > > technically we are not in arch and those fields have a defined > > endianness. > > =20 >=20 > Well I set it as packed since it's 'sent' through a memory mapped firmware > interface. Hence the need for the structure format to be fixed. So I gues= sed > we're safer with it, as I'm not 100% sure what the different compilers are > going to do with it (although it's very likely it'll stay the same). BTW = this > will be built both for arm & arm64. I believe that's not the point Oliver was trying to make. You should use __le32 instead of u32. That's because u32 means "host byte order" and this code is not located under arch/, so host endianness is unknown, but the mailbox interface requires little-endian. It's nit-picking, and that's why Oliver writes 'technically'; there is probably no way this firmware interface could be used on a big-endian CPU... Petr T --Sig_/v4zFxgx_udbNpFsK480f9ms Content-Type: application/pgp-signature Content-Description: Digitální podpis OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEHl2YIZkIo5VO2MxYqlA7ya4PR6cFAlzj68AACgkQqlA7ya4P R6f62AgAz0n5U8DxFLjG8+/3CYeQR5ZyeBY4k4i59x0CtEHzdc/KpzHUMeMk4UY4 CX0BTMxH8rszNyr01dpGqYDlRUJTZg+WCs+V9N8ZWDafcI9+ZFoZPTOAZumw4o5g q7Y4Gpip+ygMHVSrds+uFQkJtinN7eiyr16GR8TLsb55TjYwiaodn4iNRiR3o+Od qhUwScebGj4vjjru+U0XyYUGUaL22vuKXx8j15aSEO+FB7qYCxs6QbhF33wLvP9T V7BUmamRLwoNqL1YPgj9RSC73PHPQpWKSCvwi2HcK4eUdwC3GNtfLwId+0ocxqwg pFEsVHZTqhV18UWpMD/Pnb5Z39zFRQ== =z3QT -----END PGP SIGNATURE----- --Sig_/v4zFxgx_udbNpFsK480f9ms--