Skip to content
  • Matthias Kaehlcke's avatar
    jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp · 7c30f352
    Matthias Kaehlcke authored
    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: default avatarMatthias Kaehlcke <mka@chromium.org>
    Cc: "Jason A . Donenfeld" <Jason@zx2c4.com>
    Cc: Grant Grundler <grundler@chromium.org>
    Cc: Michael Davidson <md@google.com>
    Cc: Greg Hackmann <ghackmann@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    7c30f352