From patchwork Sat Nov 28 01:28:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 11937375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 017A2C63798 for ; Sat, 28 Nov 2020 01:56:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A29B42224C for ; Sat, 28 Nov 2020 01:56:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="rUZMICqI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730916AbgK1Bmf (ORCPT ); Fri, 27 Nov 2020 20:42:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730194AbgK1BmS (ORCPT ); Fri, 27 Nov 2020 20:42:18 -0500 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6E36C0613D3; Fri, 27 Nov 2020 17:28:27 -0800 (PST) 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 4CjYm52j5Hz9s1l; Sat, 28 Nov 2020 12:28:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1606526904; bh=pizqWbx6kpcLHzpqpXf5UA/FRNefEUnZ0fLu0XqqZds=; h=Date:From:To:Cc:Subject:From; b=rUZMICqIkh9bteswcTjhiv3kijzQks3QgHUeEEd4HGX0WQz0cxguPHfQPWwPGmRuf C6PdreWjq9uaLYKYrvkv1EAnBUHVobo0SO0EVtjnGReL7pdgv2Lk2e0/34wzhicHvB fjMfnyasaDArAXSRgzTm/uKoS1TUJJqU7k0/nRiKZXfjeAS4HJIX2tHhRUoTq2+RAU NdiUWZneTnEmbcjcV8+SowD+xi4/W9mM8GCe3x5jVeVwT+3sRT0ozQ1OnfudQ5dYs+ cOE+SBu2Kdt0oBLbIuqF4YJeEJXeNIrIS3gnvBwGsystqYvHA04TPN0PvaKfQQShtV 23YK7YKH4F/tA== Date: Sat, 28 Nov 2020 12:28:19 +1100 From: Stephen Rothwell To: Michael Ellerman Cc: PowerPC , Nicholas Piggin , Daniel Axtens , Joel Stanley , Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Yisen Zhuang , Salil Mehta , "David S. Miller" , Jakub Kicinski , , , , Subject: [PATCH] powerpc: fix the allyesconfig build Message-ID: <20201128122819.32187696@canb.auug.org.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org There are 2 drivers that have arrays of packed structures that contain pointers that end up at unaligned offsets. These produce warnings in the PowerPC allyesconfig build like this: WARNING: 148 bad relocations c00000000e56510b R_PPC64_UADDR64 .rodata+0x0000000001c72378 c00000000e565126 R_PPC64_UADDR64 .rodata+0x0000000001c723c0 They are not drivers that are used on PowerPC (I assume), so mark them to not be built on PPC64 when CONFIG_RELOCATABLE is enabled. Cc: Geert Uytterhoeven Cc: Michael Turquette Cc: Stephen Boyd Cc: Yisen Zhuang Cc: Salil Mehta Cc: David S. Miller Cc: Jakub Kicinski Cc: Nicholas Piggin Cc: Daniel Axtens Cc: Joel Stanley Signed-off-by: Stephen Rothwell --- drivers/clk/renesas/Kconfig | 4 ++++ drivers/net/ethernet/hisilicon/Kconfig | 4 ++++ 2 files changed, 8 insertions(+) It might be easiest to put this through the PowerPC (fixes?) tree, if people woulf just sned ACKs, please? diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig index 18915d668a30..53f24a0cad7a 100644 --- a/drivers/clk/renesas/Kconfig +++ b/drivers/clk/renesas/Kconfig @@ -151,6 +151,10 @@ config CLK_R8A779A0 select CLK_RENESAS_CPG_MSSR config CLK_R9A06G032 + # PPC64 RELOCATABLE kernels cannot handle relocations to + # unaligned locations that are produced by the array of + # packed structures in this driver. + depends on !(PPC64 && RELOCATABLE) bool "Renesas R9A06G032 clock driver" help This is a driver for R9A06G032 clocks diff --git a/drivers/net/ethernet/hisilicon/Kconfig b/drivers/net/ethernet/hisilicon/Kconfig index 44f9279cdde1..bf47e504b365 100644 --- a/drivers/net/ethernet/hisilicon/Kconfig +++ b/drivers/net/ethernet/hisilicon/Kconfig @@ -102,6 +102,10 @@ config HNS3_HCLGE tristate "Hisilicon HNS3 HCLGE Acceleration Engine & Compatibility Layer Support" default m depends on PCI_MSI + # PPC64 RELOCATABLE kernels cannot handle relocations to + # unaligned locations that are produced by the array of + # packed structures in this driver. + depends on !(PPC64 && RELOCATABLE) help This selects the HNS3_HCLGE network acceleration engine & its hardware compatibility layer. The engine would be used in Hisilicon hip08 family of