Received: by 10.213.65.68 with SMTP id h4csp639428imn; Fri, 6 Apr 2018 06:35:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+i/tFZl8q8rfXN6c2acsD69DaUWe0SQirVZehRCdjhNp+VT14odUm73SNAV6e4oovfsN/y X-Received: by 2002:a17:902:322:: with SMTP id 31-v6mr27537135pld.122.1523021745207; Fri, 06 Apr 2018 06:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523021745; cv=none; d=google.com; s=arc-20160816; b=vxUAFWVcaI3WJzjDkKO9PvDqjWpIrHmX8q4s+FTkKOIW/FvVw51ds6bLDZ0Ku3oeb5 j8lG6ofCpunGXTSv2m0x1DxviCTzYXUHIxNoIcBQ3PBOYD5aCLeoeRX7pUeyvnPD7+iP Dn9ZlzscZC2rZGuyCG6RnBKTiJWZsXExy9pX9Sk83x20ni4B0lYmtYExs3PYUffEK0zA HC6w7gavGNq3CjmZPnZIg1IWGmipEpLgzfibyAqKzIg2MiVDIAM6vdLsvPHJHXUC7sqG F0yOOQjBdoO0n3TwOjn5gLGQdcxxMqNsO0dPm8K2dQUCnYgsdCyV1qvoHlL1omt4Bh2u 8aTQ== 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=AfYYSxMPe+oOi4q7gsBML3eVKhfy/STrMxWRLRzy9Qs=; b=TdgbB8iFLcWFOW/ZG9HoFRjR+JrJdJf8hsPZwCUX+hhoepDivzBalpT7zObkm45HB7 wMRBPM64EBumriWI5c65A8Dh+tHRxqoDafTRcQG6YrQrR/J1G0Crep9OIMVTG9NyL2D/ 3ZK98ythr8yyRerC6imUGP2OPY32XYUbkGWQu57/69ybbH9Vw+aR3awh225oPEciAoyB 7NxRb7WR52SXoTTDBb0A1+0ju33rzJWCRt2ThbKCS/F/jIqF8cPK1uroHBSIYfRI2k1L euntaDJDkynpZVsWONmAV0q4qJMRKeGHI1XE9MWYp+uWUcR9jxF8Hwr6HH5jwW4T0pnW c45A== 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 w128si7129652pgb.460.2018.04.06.06.35.30; Fri, 06 Apr 2018 06:35:45 -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 S1755569AbeDFNdV (ORCPT + 99 others); Fri, 6 Apr 2018 09:33:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57834 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755538AbeDFNdR (ORCPT ); Fri, 6 Apr 2018 09:33:17 -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 AC556CE4; Fri, 6 Apr 2018 13:33:16 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , "Jason A . Donenfeld" , Grant Grundler , Michael Davidson , Greg Hackmann , Thomas Gleixner , Andrew Morton , Linus Torvalds , Nathan Chancellor Subject: [PATCH 4.9 021/102] jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp Date: Fri, 6 Apr 2018 15:23:02 +0200 Message-Id: <20180406084334.615818639@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 7c30f352c852bae2715ad65ac4a38ca9af7d7696 upstream. jiffies_64 is defined in kernel/time/timer.c with ____cacheline_aligned_in_smp, however this macro is not part of the declaration of jiffies and jiffies_64 in jiffies.h. As a result clang generates the following warning: kernel/time/timer.c:57:26: error: section does not match previous declaration [-Werror,-Wsection] __visible u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES; ^ include/linux/cache.h:39:36: note: expanded from macro '__cacheline_aligned_in_smp' ^ include/linux/cache.h:34:4: note: expanded from macro '__cacheline_aligned' __section__(".data..cacheline_aligned"))) ^ include/linux/jiffies.h:77:12: note: previous attribute is here extern u64 __jiffy_data jiffies_64; ^ include/linux/jiffies.h:70:38: note: expanded from macro '__jiffy_data' Link: http://lkml.kernel.org/r/20170403190200.70273-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Cc: "Jason A . Donenfeld" Cc: Grant Grundler Cc: Michael Davidson Cc: Greg Hackmann Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Cc: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- include/linux/jiffies.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -1,6 +1,7 @@ #ifndef _LINUX_JIFFIES_H #define _LINUX_JIFFIES_H +#include #include #include #include @@ -63,19 +64,13 @@ 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) -/* some arch's have a small-data section that can be accessed register-relative - * but that can only take up to, say, 4-byte variables. jiffies being part of - * an 8-byte variable may not be correctly accessed unless we force the issue - */ -#define __jiffy_data __attribute__((section(".data"))) - /* * 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 __jiffy_data jiffies_64; -extern unsigned long volatile __jiffy_data jiffies; +extern u64 __cacheline_aligned_in_smp jiffies_64; +extern unsigned long volatile __cacheline_aligned_in_smp jiffies; #if (BITS_PER_LONG < 64) u64 get_jiffies_64(void);