Received: by 10.213.65.68 with SMTP id h4csp721146imn; Fri, 6 Apr 2018 07:50:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx48izorXXGKIj9H/f8QyDNkgMUZMUlrYPQOk7Pgm18RN3e4mdcApx/3GuZusASxDUgV4PJBa X-Received: by 10.101.102.3 with SMTP id w3mr17508654pgv.200.1523026252188; Fri, 06 Apr 2018 07:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523026252; cv=none; d=google.com; s=arc-20160816; b=e7upohDV7/7gbo6ThtZEfwJszGvjnFrxL94M5LDP6gR2hIJWKsQ5oUXyIDUaP4xRw5 PvF1HH5LSz4E8Vvo2wXmeByCbS2Uqf/i5c+A6Ot6gc5wgN4C4iX4jyRAHvbo+fwsevxW D17MW7PH+mJ5bahYNuWEI3myw0wCHAF++xRVrOUvZidvt4l6tr/NfyCnXt4A5JOVjbky 19wJeu+HXb4HK9APWIHweBJutu57HHPRHuxsVmUfy2f3iBil4Kv5GNxqgLIgnCENQSPA zzqhdf0IxwdAHPPA1SveShAsfr0/JbLLq0ABpu96qCFG5W8taGFw6LgNB9vE6H1FenwP z1BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Y+uZInbBzrW0rU9aNBiOe0wXQ8B+yIk/1RiFUEFT4jY=; b=SqiHE+QQ/pFUc5qVWRGmgYh4SZ1qurkhKTiuaHkj3UmaJ9pTUfUbc4D+MSmpwqXv8a biT3UhA5eKZlJy6ZgwAqunqHY1AnRLjbbZ8a85sO0Mtn0Nkar9LY+Tl1E/YsARAdLisD hsy5ol0KJuq7eWLDPJbcFe0XKNBMCo1ic2oxEpNwKshR1NXqKEPvVdZIcM3viOUAUM72 fbHteGamCl4aHg9hRYisioRIkuwpsjl44EDh7MMviWMz4n5h5DgTLOLokvuD4JoDd1lo t319jBIpvuOUZVEJ2AYzsbibUndjITWv6RUAAlPv4dDel25KAwMBhMEZ9krljwOme6pc bShw== 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 1si7107180pgf.512.2018.04.06.07.50.38; Fri, 06 Apr 2018 07:50:52 -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 S1755650AbeDFOtD (ORCPT + 99 others); Fri, 6 Apr 2018 10:49:03 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57854 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755560AbeDFNdU (ORCPT ); Fri, 6 Apr 2018 09:33:20 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7CA05CD0; Fri, 6 Apr 2018 13:33:19 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Guenter Roeck , David Howells , Sudip Mukherjee , Andrew Morton , Linus Torvalds Subject: [PATCH 4.9 022/102] frv: declare jiffies to be located in the .data section Date: Fri, 6 Apr 2018 15:23:03 +0200 Message-Id: <20180406084334.731628831@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084331.507038179@linuxfoundation.org> References: <20180406084331.507038179@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthias Kaehlcke commit 60b0a8c3d2480f3b57282b47b7cae7ee71c48635 upstream. Commit 7c30f352c852 ("jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp") removed a section specification from the jiffies declaration that caused conflicts on some platforms. Unfortunately this change broke the build for frv: kernel/built-in.o: In function `__do_softirq': (.text+0x6460): relocation truncated to fit: R_FRV_GPREL12 against symbol `jiffies' defined in *ABS* section in .tmp_vmlinux1 kernel/built-in.o: In function `__do_softirq': (.text+0x6574): relocation truncated to fit: R_FRV_GPREL12 against symbol `jiffies' defined in *ABS* section in .tmp_vmlinux1 kernel/built-in.o: In function `pwq_activate_delayed_work': workqueue.c:(.text+0x15b9c): relocation truncated to fit: R_FRV_GPREL12 against symbol `jiffies' defined in *ABS* section in .tmp_vmlinux1 ... Add __jiffy_arch_data to the declaration of jiffies and use it on frv to include the section specification. For all other platforms __jiffy_arch_data (currently) has no effect. Fixes: 7c30f352c852 ("jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp") Link: http://lkml.kernel.org/r/20170516221333.177280-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Reported-by: Guenter Roeck Tested-by: Guenter Roeck Reviewed-by: David Howells Cc: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- arch/frv/include/asm/timex.h | 6 ++++++ include/linux/jiffies.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) --- a/arch/frv/include/asm/timex.h +++ b/arch/frv/include/asm/timex.h @@ -16,5 +16,11 @@ static inline cycles_t get_cycles(void) #define vxtime_lock() do {} while (0) #define vxtime_unlock() do {} while (0) +/* This attribute is used in include/linux/jiffies.h alongside with + * __cacheline_aligned_in_smp. It is assumed that __cacheline_aligned_in_smp + * for frv does not contain another section specification. + */ +#define __jiffy_arch_data __attribute__((__section__(".data"))) + #endif --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -64,13 +64,17 @@ extern int register_refined_jiffies(long /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) +#ifndef __jiffy_arch_data +#define __jiffy_arch_data +#endif + /* * The 64-bit value is not atomic - you MUST NOT read it * without sampling the sequence number in jiffies_lock. * get_jiffies_64() will do this for you as appropriate. */ extern u64 __cacheline_aligned_in_smp jiffies_64; -extern unsigned long volatile __cacheline_aligned_in_smp jiffies; +extern unsigned long volatile __cacheline_aligned_in_smp __jiffy_arch_data jiffies; #if (BITS_PER_LONG < 64) u64 get_jiffies_64(void);