From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754809AbdCQAY1 (ORCPT ); Thu, 16 Mar 2017 20:24:27 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36525 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753482AbdCQAY0 (ORCPT ); Thu, 16 Mar 2017 20:24:26 -0400 From: Michael Davidson To: Michal Marek , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Herbert Xu , "David S. Miller" , Shaohua Li Cc: Alexander Potapenko , Dmitry Vyukov , Matthias Kaehlcke , x86@kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-raid@vger.kernel.org, Michael Davidson Subject: [PATCH 3/7] x86, LLVM: suppress clang warnings about unaligned accesses Date: Thu, 16 Mar 2017 17:15:16 -0700 Message-Id: <20170317001520.85223-4-md@google.com> X-Mailer: git-send-email 2.12.0.367.g23dc2f6d3c-goog In-Reply-To: <20170317001520.85223-1-md@google.com> References: <20170317001520.85223-1-md@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Suppress clang warnings about potential unaliged accesses to members in packed structs. This gets rid of almost 10,000 warnings about accesses to the ring 0 stack pointer in the TSS. Signed-off-by: Michael Davidson --- arch/x86/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 894a8d18bf97..7f21703c475d 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -128,6 +128,11 @@ endif KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args) endif +ifeq ($(cc-name),clang) +# Suppress clang warnings about potential unaligned accesses. +KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) +endif + ifdef CONFIG_X86_X32 x32_ld_ok := $(call try-run,\ /bin/echo -e '1: .quad 1b' | \ -- 2.12.0.367.g23dc2f6d3c-goog