Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2020803imm; Fri, 7 Sep 2018 09:35:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbipAYIsB86l01Mx4MF6ADNAuPWXv3ofxKUk9d0LLlp7z1vYXUt+BcpxygF0nKWHWa3icnk X-Received: by 2002:a65:49cc:: with SMTP id t12-v6mr9144691pgs.27.1536338148196; Fri, 07 Sep 2018 09:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536338148; cv=none; d=google.com; s=arc-20160816; b=Rec1jBg8qQTKy8GWN/jZvV4BGhTr7PFXCLdjM8ynskpJ28DVOpM1nXTNAsLLibAJHj 1Eeshf4kAhUILoRIKUHZ4HxhSMqA7GvNHvJneArX5jsLeDeCYqPfHfTePxGPQXSoRnAy S+b9cQBX8vhdFR5oM2GCJ7FB9Wt+6cHCqEG60Ows98CMyCbQ2y8RQwFzRC/wdq00vNLE 6toQ+L8/D+0noya66NBC/PaR0JkguvHHMnAfMjy9mI2R9EJDiTbRbCr42Ls+HnT4KWyg XRbHfnboE3FATjYt4cJy/HNVvP4iiWm/Ixkv/wKwc/sgRoag6EmV1NwqbGu/MMgK5xdG 9o8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id; bh=8NIwdzG66NWtKNkVnqV4eoIBMbWe3Xzwl8KGidfI7SM=; b=OPjc0JZB+z+al5yCpR/n7pZyLcdkALdJPlbQqLvZLQZY9m2BUy9EjqukteA3SQQXG8 rk3wx9oTm2GCBSOBbBBUVxFYAIn+58FWpGyCj5xuqLIcFpzfKO8thPAAbfoK9Dl/9lUO qZ8I3XLCsvoDwTm6b/eiDDNshLBfyJZRKVOtnpI8cdGeQTBk1zVqY8apiyfVdfAn63At w9Kl7CfpzIK+Yu3YGWGyxFZd/OQYy2Gfj92wDUH7zCQvYjnPGcaazA7/Wexnz7393C/8 I7a8/CLuxPPO0If74P2WZW0oi0/hF4hDoGLnGN65HrIsB2e4x4f1r+nGacHznyz6F1M2 r29A== 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 o11-v6si9740421pgf.71.2018.09.07.09.35.32; Fri, 07 Sep 2018 09:35:48 -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 S1728748AbeIGSIT (ORCPT + 99 others); Fri, 7 Sep 2018 14:08:19 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:31640 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbeIGSIT (ORCPT ); Fri, 7 Sep 2018 14:08:19 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 426JBr3J5vz9ttFR; Fri, 7 Sep 2018 15:27:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id KMJtAAw7skgD; Fri, 7 Sep 2018 15:27:16 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 426JBr2qx5z9ttFK; Fri, 7 Sep 2018 15:27:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 009048B94F; Fri, 7 Sep 2018 15:27:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id tfc2OqeVxfOo; Fri, 7 Sep 2018 15:27:19 +0200 (CEST) Received: from pc16082vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C0F7F8B94C; Fri, 7 Sep 2018 15:27:19 +0200 (CEST) Received: by pc16082vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 94706718AB; Fri, 7 Sep 2018 13:27:19 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH] perf: enum overflow in uapi/linux/perf_event.h To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 7 Sep 2018 13:27:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On PPC32, enums are 32 bits, so __PERF_SAMPLE_CALLCHAIN_EARLY is out of scope. The following sparse warning is encountered: CHECK arch/powerpc/kernel/process.c ./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) This patch changes it to a #define Fixes: 6cbc304f2f360 ("perf/x86/intel: Fix unwind errors from PEBS entries (mk-II)") Signed-off-by: Christophe Leroy --- include/uapi/linux/perf_event.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index eeb787b1c53c..27c7842bc86a 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -143,10 +143,10 @@ enum perf_event_sample_format { PERF_SAMPLE_PHYS_ADDR = 1U << 19, PERF_SAMPLE_MAX = 1U << 20, /* non-ABI */ - - __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, }; +#define __PERF_SAMPLE_CALLCHAIN_EARLY (1ULL << 63) + /* * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set * -- 2.13.3