Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3362969pxu; Mon, 30 Nov 2020 01:02:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJza+Fi2jBreopWdZw1EpHbZiCEQyMlghukN/ytNWg2oMFRMgTUISOyHPwAwWUUNTgDhze0m X-Received: by 2002:a17:906:17d1:: with SMTP id u17mr19380106eje.6.1606726943451; Mon, 30 Nov 2020 01:02:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606726943; cv=none; d=google.com; s=arc-20160816; b=omUYMyCnNoKXgBrVJ+AwPcpTARrhGPOVehr5LbV3Uo3c0Vl1aifd7Tih+cB+qQZoUD 9Ct1Zjf2MlAnVHCJu7hMpBkZaVe8U+e4Bd8Mk0pHFrKyYjg6WHfC4THswX2uNuYeqIs5 6TLokE2Vv1Yqup4vi4WJJv7d2pXFhNFTvorLf77x5TxtGDQ00u6Aqn7IlnZZMksX5aTQ zbyPgmTNSiKQFb4CMTcoQMl9SlpwRoFhQWx2c1EAaYXT+kXd5ScIR4HUQ+OuR0tfPZUK LH2ycahADWNpR9WTPD/Vegzz1uQVE+ftiuUxWMAO2UNWSIA3yTEE7uE5rNrVE/BhhGFJ 1aJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HQIuJhPsbQ+EL2PuonIQgIaiM+xv4MMYN+gYu/KvNA8=; b=HITP1IYR7N63ZDfxPxI3Q+dGAvwgH/379dmytNlxR8HMLeqYwEuTaJmyMB8iXAnh8w zNH2OOB08ArNPQkldXJoJyrgzGPrcp4vTSTQPkF7WPsk+FIa5K6xOm7mkNYF7Rcp+kgQ URaoC4YaFnNnNWuT1sNKvLZ3vS4ClaAOmVAMNh0SXeHB//zVah+or4hYxj91lQszPta2 Sv0xI1WSE7PybA+EhrDDhcGn2lu9+Q+XQmLxxUqdZAZAx2Q8l+2izuZKMJJ7/gaLxIFh Y9A5t9z9zikH70hRuXINAmx4aslKuPBlwmTrm0PLACnuWJXivkxIUgpFoQ0E9Eih+g/h oLRw== ARC-Authentication-Results: i=1; mx.google.com; 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 n18si9942332ejk.69.2020.11.30.01.02.00; Mon, 30 Nov 2020 01:02:23 -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; 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 S1726578AbgK3I6b (ORCPT + 99 others); Mon, 30 Nov 2020 03:58:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbgK3I6b (ORCPT ); Mon, 30 Nov 2020 03:58:31 -0500 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B7DC0613D3 for ; Mon, 30 Nov 2020 00:57:50 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by baptiste.telenet-ops.be with bizsmtp id yYxl2300R4C55Sk01YxloH; Mon, 30 Nov 2020 09:57:48 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kjf0D-006v1U-7H; Mon, 30 Nov 2020 09:57:45 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1kjf0C-006wyu-PQ; Mon, 30 Nov 2020 09:57:44 +0100 From: Geert Uytterhoeven To: Stephen Rothwell , Michael Turquette , Stephen Boyd , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras Cc: Gareth Williams , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2] clk: renesas: r9a06g032: Drop __packed for portability Date: Mon, 30 Nov 2020 09:57:43 +0100 Message-Id: <20201130085743.1656317-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=y (e.g. PowerPC allyesconfig), the following warnings are produced: WARNING: 136 bad relocations c000000000616be3 R_PPC64_UADDR64 .rodata+0x00000000000cf338 c000000000616bfe R_PPC64_UADDR64 .rodata+0x00000000000cf370 ... Fix this by dropping the __packed attribute from the r9a06g032_clkdesc definition, trading a small size increase for portability. 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). 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(-) 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; +}; #define I_GATE(_clk, _rst, _rdy, _midle, _scon, _mirack, _mistat) \ { .gate = _clk, .reset = _rst, \ -- 2.25.1