All of
 help / color / mirror / Atom feed
From: tip-bot for Matthias Kaehlcke <>
Subject: [tip:x86/urgent] x86/boot: Disable the address-of-packed-member compiler warning
Date: Fri, 28 Jul 2017 00:38:42 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Commit-ID:  20c6c189045539d29f4854d92b7ea9c329e1edfc
Author:     Matthias Kaehlcke <>
AuthorDate: Tue, 25 Jul 2017 14:50:53 -0700
Committer:  Ingo Molnar <>
CommitDate: Fri, 28 Jul 2017 08:39:08 +0200

x86/boot: Disable the address-of-packed-member compiler warning

The clang warning 'address-of-packed-member' is disabled for the general
kernel code, also disable it for the x86 boot code.

This suppresses a bunch of warnings like this when building with clang:

./arch/x86/include/asm/processor.h:535:30: warning: taking address of
  packed member 'sp0' of class or structure 'x86_hw_tss' may result in an
  unaligned pointer value [-Waddress-of-packed-member]
    return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
./arch/x86/include/asm/percpu.h:391:59: note: expanded from macro
    #define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
./arch/x86/include/asm/percpu.h:228:16: note: expanded from macro
    : "p" (&(var)));

Signed-off-by: Matthias Kaehlcke <>
Cc: Doug Anderson <>
Cc: Linus Torvalds <>
Cc: Masahiro Yamada <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Signed-off-by: Ingo Molnar <>
 arch/x86/boot/compressed/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 2c860ad..8a95827 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -34,6 +34,7 @@ KBUILD_CFLAGS += $(cflags-y)
 KBUILD_CFLAGS += -mno-mmx -mno-sse
 KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
 KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
+KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)

      reply	other threads:[~2017-07-28  7:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 21:50 [PATCH] x86/boot/compressed: Disable address-of-packed-member warning Matthias Kaehlcke
2017-07-28  7:38 ` tip-bot for Matthias Kaehlcke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [tip:x86/urgent] x86/boot: Disable the address-of-packed-member compiler warning' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.