Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4327665pxu; Tue, 1 Dec 2020 02:07:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCDFKalvQtzACf2EKink2vd6H5+8NK1iuBPlVjhwnuOlT+RwGxH9Zm3Z3api1/qYhlgkQi X-Received: by 2002:a17:906:3a4e:: with SMTP id a14mr2278437ejf.140.1606817269288; Tue, 01 Dec 2020 02:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606817269; cv=none; d=google.com; s=arc-20160816; b=lrE323HsgsjME+nd9PpTVfpRLcdlqo4y6F43svJ/EZIs13Peo5Q0X2pU22DEjIcBQR Xlmtu2oRnKKSFP8lACXQqhCGr0PvVunQoCV/75BjWLDWZI8SpAeJ7XV7yXC4GRf+ywrR o/fZewWVScGm5fqUGr/NOgTZz/I9hGXr78H9wLOhbyJIY5xr2QyEeiFr4hjR/nv4iZQi y5YqYLzzYI1efY14/v/BOVwpxPGPXel38aNZaU2vdxVnzNS2x8QlThzUr9dXtCWCzV3p hf/oUI/RgBDBuXmIoS1WjavmE0+XuhZralC550JDlKcFj0hwi9+ALIcscL6d08vxJdJR TBnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Kps38mFEbEIanWeXrdvL8Z2Wbgj45fwPUzAQCelt38E=; b=v+3Ne0Bgs4fvVCTwp4JE4eZ/R6Nyz6niVcgyJ55PZmrgCtwjO90pLNUf4LNgU9iKIM +IJQWUAwdm8RYrgzhPhAdepLewNwcf251wcwcjsxp+LpqPCOnkq6pW9hw4+gwXNg6/1I 8RQbPydDgp/EgCiV1h+s8tME0XSZAx/0q2y5vLeeeX0vWUii2cHN0oZ4XR7oRkVVFKLJ d1kVDP79LjQ4jI004kEm6eDUxv1syCUXUI9D/8J/v5NEqtp8P+K0a9Ar01+R2AhpKq7r HBLuoFbwhNxWdNQP+RGsQaGlvdS/fc9eUWTMeEaaXLkE3fC9/pj+1SdZXpI3WfQFj7l9 R2zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=IHjAgsfE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c23si841720edj.524.2020.12.01.02.07.25; Tue, 01 Dec 2020 02:07:49 -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=@canb.auug.org.au header.s=201702 header.b=IHjAgsfE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729572AbgLAKEA (ORCPT + 99 others); Tue, 1 Dec 2020 05:04:00 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:57979 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgLAKEA (ORCPT ); Tue, 1 Dec 2020 05:04:00 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Cld2r6g3fz9sVq; Tue, 1 Dec 2020 21:03:16 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1606816997; bh=FjlfdSawU3ve6xceGaXc0QUrfyKru3+HxazOT6mqyKY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IHjAgsfE79WFoxv6HT962TApwskmVwbg+TFoy4P2amGUPldXPj7dEfM9nw3ZY9obF 6mv9vDBWM37rVBi+54ouahzhn1+Q34Ksg15gbui959tLFvSVNcUPtIZlilSTAiFohj IcHZNSm35vYFtawWC4FXpdJMm9m3IAi63A3pchrKKhC4v9beRrKFQ+NdiNNOrR9zVN N2udVtB8YtgPnBPY91MYCCsEIsZnEkZu30wmmskANsb7NMk2hZn8Fx/jcb9+xjRuKR 6Pbd0kclOvdE10i7wstCH2KKjfh5QA5TVwcWDvtaFoYMc8dIMoqAHDLF62d0twCFqI zKH07q16tc6oA== Date: Tue, 1 Dec 2020 21:03:15 +1100 From: Stephen Rothwell To: Geert Uytterhoeven Cc: Michael Turquette , Stephen Boyd , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Gareth Williams , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] clk: renesas: r9a06g032: Drop __packed for portability Message-ID: <20201201210315.45a73673@canb.auug.org.au> In-Reply-To: <20201130085743.1656317-1-geert+renesas@glider.be> References: <20201130085743.1656317-1-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/x=8K5Ql==6p6MPT1Tt8f7jL"; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/x=8K5Ql==6p6MPT1Tt8f7jL Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Geert, On Mon, 30 Nov 2020 09:57:43 +0100 Geert Uytterhoeven wrote: > > The R9A06G032 clock driver uses an array of packed structures to reduce > kernel size. However, this array contains pointers, which are no longer > aligned naturally, and cannot be relocated on PPC64. Hence when > compile-testing this driver on PPC64 with CONFIG_RELOCATABLE=3Dy (e.g. > PowerPC allyesconfig), the following warnings are produced: >=20 > WARNING: 136 bad relocations > c000000000616be3 R_PPC64_UADDR64 .rodata+0x00000000000cf338 > c000000000616bfe R_PPC64_UADDR64 .rodata+0x00000000000cf370 > ... >=20 > Fix this by dropping the __packed attribute from the r9a06g032_clkdesc > definition, trading a small size increase for portability. >=20 > This increases the 156-entry clock table by 1 byte per entry, but due to > the compiler generating more efficient code for unpacked accesses, the > net size increase is only 76 bytes (gcc 9.3.0 on arm32). >=20 > Reported-by: Stephen Rothwell > Fixes: 4c3d88526eba2143 ("clk: renesas: Renesas R9A06G032 clock driver") > Signed-off-by: Geert Uytterhoeven > --- > v2: > - Fix authorship. > --- > drivers/clk/renesas/r9a06g032-clocks.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas= /r9a06g032-clocks.c > index d900f6bf53d0b944..892e91b92f2c80f5 100644 > --- a/drivers/clk/renesas/r9a06g032-clocks.c > +++ b/drivers/clk/renesas/r9a06g032-clocks.c > @@ -55,7 +55,7 @@ struct r9a06g032_clkdesc { > u16 sel, g1, r1, g2, r2; > } dual; > }; > -} __packed; > +}; > =20 > #define I_GATE(_clk, _rst, _rdy, _midle, _scon, _mirack, _mistat) \ > { .gate =3D _clk, .reset =3D _rst, \ > --=20 > 2.25.1 >=20 Tested-by: Stephen Rothwell # PowerPC allyesconfig b= uild --=20 Cheers, Stephen Rothwell --Sig_/x=8K5Ql==6p6MPT1Tt8f7jL Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAl/GFOQACgkQAVBC80lX 0Gx20wgAi6BiXoJObYe8V+LMkb6ZXfIlTf41CHmeVC6NHNznore2v1594BTP0Zgf gTyOp2mkrn+sKaunxMzoZt3aEwtKkSUs0t5ksN7WIS/Ilnp6RDqtUr3hk5L+Ig0H M6GBg+78RiPDvAgF5xjxGTaDh5SCtB1MFNqGy+Yf1pe+p6JZtpBqhaXDLv+cvHSV 45Fj1RLJ23HYERQ/PUBPHwHI3hVco5EI5eEDuaXEJWGCtsAfWXsj3AYIylx3Emyp zYlfxgr5ZVEKsTY8DJBgVvn5K85hjFIy7ljRx+3kByQh6IyPpWWUDoPAS5TfepCj YvgHxHtnnei5Urke1xFol0P0jasF2A== =A+fg -----END PGP SIGNATURE----- --Sig_/x=8K5Ql==6p6MPT1Tt8f7jL--