From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64E5FC48BD5 for ; Tue, 25 Jun 2019 22:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40DE82085A for ; Tue, 25 Jun 2019 22:29:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbfFYW3e (ORCPT ); Tue, 25 Jun 2019 18:29:34 -0400 Received: from smtprelay0161.hostedemail.com ([216.40.44.161]:55295 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726077AbfFYW3d (ORCPT ); Tue, 25 Jun 2019 18:29:33 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 294F1100E86C4; Tue, 25 Jun 2019 22:29:32 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: part49_6fe907977cd1a X-Filterd-Recvd-Size: 3628 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA; Tue, 25 Jun 2019 22:29:28 +0000 (UTC) Message-ID: <1336988f46fb7ffda925ab86a6e4d5437cfdb275.camel@perches.com> Subject: Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs From: Joe Perches To: Nick Desaulniers , Peter Zijlstra Cc: "Gustavo A. R. Silva" , Miguel Ojeda , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Borislav Petkov , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Kan Liang , linux-kernel , Kees Cook , Shawn Landden , Nathan Chancellor , Luc Van Oostenryck , Chandler Carruth Date: Tue, 25 Jun 2019 15:29:27 -0700 In-Reply-To: References: <20190624161913.GA32270@embeddedor> <20190624193123.GI3436@hirez.programming.kicks-ass.net> <20190624203737.GL3436@hirez.programming.kicks-ass.net> <3dc75cd4-9a8d-f454-b5fb-64c3e6d1f416@embeddedor.com> <20190625071846.GN3436@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.5-0ubuntu0.18.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-06-25 at 11:15 -0700, Nick Desaulniers wrote: > Unreleased versions of Clang built from source can; the latest release > of Clang-8 doesn't have asm goto support required for > CONFIG_JUMP_LABEL. Things can get complicated based on which kernel > tree/branch (mainline, -next, stable), arch, and configs, but I think > we just have a few long tail bugs left. At some point, when clang generically compiles the kernel, I believe it'd be good to remove the various bits that are unusual like CONFIG_CC_HAS_ASM_GOTO in Makefile and the scripts/clang-version.sh and the like. This could help when compiling a specific .config on different systems. Maybe add the equivalent compiler-gcc.h #define below even before the removals (whatever minor/patchlevel appropriate) --- include/linux/compiler-clang.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index 333a6695a918..b46aece0f9ca 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -5,6 +5,14 @@ /* Compiler specific definitions for Clang compiler */ +#define CLANG_VERSION (__clang_major__ * 10000 \ + + __clang_minor__ * 100 \ + + __clang_patchlevel__) + +#if CLANG_VERSION < 90000 +# error Sorry, your compiler is too old - please upgrade it. +#endif + #define uninitialized_var(x) x = *(&(x)) /* same as gcc, this was present in clang-2.6 so we can assume it works