From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932489AbdA0Jlq (ORCPT ); Fri, 27 Jan 2017 04:41:46 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:48494 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932453AbdA0Jlm (ORCPT ); Fri, 27 Jan 2017 04:41:42 -0500 Date: Fri, 27 Jan 2017 10:41:33 +0100 From: Maxime Ripard To: Icenowy Zheng Cc: Srinivas Kandagatla , Rob Herring , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, devicetree@vger.kernel.org, Chen-Yu Tsai Subject: Re: [PATCH 1/2] nvmem: sunxi-sid: add support for H3 and A64's SID controller Message-ID: <20170127094133.ewuf5uo6lb3vhf6k@lukather> References: <20170127122705.R0b4EAKp@smtp3o.mail.yandex.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kjuvtndbi3h5hhz2" Content-Disposition: inline In-Reply-To: <20170127122705.R0b4EAKp@smtp3o.mail.yandex.net> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kjuvtndbi3h5hhz2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 27, 2017 at 05:26:59PM +0800, Icenowy Zheng wrote: > > > +Example for sun8i-h3:=20 > > > + sid@01c14000 {=20 > > > + compatible =3D "allwinner,sun8i-h3-sid";=20 > > > + /*=20 > > > + * The length of SID on H3 is 0x100 bytes, add the value offset=20 > > > + * 0x200, so the total length should be 0x300.=20 > > > + */=20 > > > + reg =3D <0x01c14000 0x300>;=20 > > > > No, it should be the size of the memory region used and documented for= =20 > > that device, ie 1kB (0x400) in the H3 case, just like any other reg=20 > > property.=20 >=20 > So bind the SID size with compatible? If needed, yes. > > > - randomness =3D kzalloc(sizeof(u8) * (size), GFP_KERNEL);=20 > > > + randomness_size =3D max(size, SUNXI_SID_MAX_RANDOMNESS_SIZE);=20 > > > + randomness =3D kzalloc(sizeof(u8) * (randomness_size), GFP_KERNEL);= =20 > > > > Why is that change needed?=20 >=20 > On my H3/H2+ only 2 words after the first 4 words is not zero. >=20 > I don't feel like add so many 0s to randomness. As far as I know, filling the entropy pool with zeros does no harm, it just doesn't do anything either. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --kjuvtndbi3h5hhz2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYixXIAAoJEBx+YmzsjxAgDv4QAK+/N0IiMuinjQaS0NNnwFtg iGTs0HULkrn492m276C+6MqneXaMyyMfyxpgRxeO8n+AzuJxjJ+J6WiHVZzTIuJx tMiiuv0J13Yffpccc+tc/q0lnQOP0fNhn7Tt/a0GNmlWldUb6YmWy/p/pn6As4Of gWfNt7CVRSMpLSFk01gNK3B/F7qX+DtMaHKpeU2+aZmJJFtAO7nKVzt5qRGtGnlJ Oyx0pD+P/m9MKIYZ2Go8wl9VdKKyuBVvYLBl2XZS9FOzjs9LfZZondljxSJPFxl5 2/5giimUc7UgRLtZPf7CbosIsKMY/EZ6v4i65GVTVwqF5hVZj2os+tBEAmKMr+gx qa78mpWAvCWYl+Y08HHFBrzbfYYwcgWDm1qwoByOw4vq+e3XPQpSZayI8UTcRkLt CIvTAWLgnwe1rIzBF8d5HXR8W2RhxR3XKEQQ0td1JmM8ZDJD5MH0z9Wbuu0dn47X GoyITdlRqPQTklPeaHjuyKUJYyeX2rPz5Bl4rdNC2qVOYDZKJLqRUdw8XBz2INUC yWQFkjUbZVpIRMmCAfkKj6mhrInDGwGpR3mXc7ViBopcbae8tIx4xuwhEDvHPNNr l/ERj0sSdB9/A3bh1Uf0xll/bgDye+QlalXv2Lu8frnwUT9F3+1uSscQUZOHIsJb dpVBW1UdN+nc9DOlZp75 =YlhR -----END PGP SIGNATURE----- --kjuvtndbi3h5hhz2--