Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2118666ybt; Fri, 3 Jul 2020 01:02:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxdoxerVcmbZ91AixO9L48kqKzIxo+s5l2Gc2xGDmn4U+S2hVgctbaahzrAilvegICo2fd X-Received: by 2002:a50:ba8b:: with SMTP id x11mr40377257ede.201.1593763342799; Fri, 03 Jul 2020 01:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593763342; cv=none; d=google.com; s=arc-20160816; b=NM9mJO6RIkO1qbiAZEhd678sQv8+US+X1XrhHrkmscaLcMx+fDM8wu19Xvbjg1IvLL fjjy++Flqxum1GTLzYHt97GLMnddIqljZPleRdO+Ne832p4hg8yTPsunlXlWRNhtpXGE z1H7HGgsguvyqNTq4oi1rH+a7r1xSwV3AttsEJB47ll673F6vDSGQwx5LxRUPmBT9xus yoOdj+1kQfwxichsDvxBmOsqk160xBvZGe1AYxtRpEAPW7bUWjssSPDZE12MUurf/Zc6 tjSIKwvaTbEFqYOD29W09ZiJH0khZPYRrEQT66+ZulOcfwlPKlwYFcBVsFRHaIJbCEZ/ uAjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=oK9his7BX2zy8pN/vWTauVsFCG50lHQ+Vq82uTFwBmI=; b=USyEJFELu0DnWFcLZT5LSILMxFk42ApsF+ZbIjpVoYfHeBIGk16WTs774n9j08kGi7 7bAa6loAuVsxJfbT/+zh940GJXhSd1xjjTG5A6ZrQEQCMV5ItEXRXGtsKTk4Mq5RzE8b mmDBNIQsaPTqV+XOuriYp6DHKF9eOrppzvf0E6SYaSAfiMWdNyCLw45MEPPVdsRohjBR aDnKu+ErCv4qPUFizjuoALv1cm4suqpFbVPsJ9beuDCCI4Kg8FbJvqvhlow2oBTPPQGX e8haaC4h4Mp1pA9d9GGN9JM/1+f22GsudM6CyXgJX6I47s+IesjcFrkZixz80eXPtMu1 waHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=y38GxzHl; dkim=neutral (no key) header.i=@vger.kernel.org header.s=2020e header.b=A7eNjvET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w15si7565700edi.136.2020.07.03.01.01.59; Fri, 03 Jul 2020 01:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=y38GxzHl; dkim=neutral (no key) header.i=@vger.kernel.org header.s=2020e header.b=A7eNjvET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726347AbgGCIBd (ORCPT + 99 others); Fri, 3 Jul 2020 04:01:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbgGCIBa (ORCPT ); Fri, 3 Jul 2020 04:01:30 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0BEC08C5C1; Fri, 3 Jul 2020 01:01:30 -0700 (PDT) Date: Fri, 03 Jul 2020 08:01:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1593763288; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oK9his7BX2zy8pN/vWTauVsFCG50lHQ+Vq82uTFwBmI=; b=y38GxzHlE5YSCqaT9GeBOBq75n160FsiF1PCYGuN6UjgXDXpzM9CPOZ/AzzHqfLDYCt05S AvVN+xdza7TYDuth5LbOEsPz8JUVMdMqs38ahcZpRYyMop8jPwUA9LHN5ALVoo7KbKmGPO 7KZmDyn613gq7afn2CSSlQUvC4Gai7vxlqd49Ncls/C9GbsE3jaYyVXPJGVjafA5SomBAv x/I5oFCQJt+x68v+sFgLilm14n1MMyDKYFXPyDOv1fFlfSBTz6WWi8dzRt8o/+0cqd6fIw QbKYGBnWeorgp30KuhQ+46LNnDE5qWWimp1ObyR8tqlJoDRiSQ/Na+WTvKP5kA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1593763288; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oK9his7BX2zy8pN/vWTauVsFCG50lHQ+Vq82uTFwBmI=; b=A7eNjvETYcvOVXL3n5krZDndEx0/9IOiqG+g/xQBVsQHW2YWi7Q+6zb/uLSUPoefg08i8A qWf5/CryqKTmaDCw== From: "tip-bot2 for Wei Wang" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/x86: Fix variable types for LBR registers Cc: "Peter Zijlstra (Intel)" , Wei Wang , x86 , LKML In-Reply-To: <20200613080958.132489-2-like.xu@linux.intel.com> References: <20200613080958.132489-2-like.xu@linux.intel.com> MIME-Version: 1.0 Message-ID: <159376328837.4006.10960362738687676693.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: 3cb9d5464c1ceea86f6225089b2f7965989cf316 Gitweb: https://git.kernel.org/tip/3cb9d5464c1ceea86f6225089b2f7965989cf316 Author: Wei Wang AuthorDate: Sat, 13 Jun 2020 16:09:46 +08:00 Committer: Peter Zijlstra CommitterDate: Thu, 02 Jul 2020 15:51:45 +02:00 perf/x86: Fix variable types for LBR registers The MSR variable type can be 'unsigned int', which uses less memory than the longer 'unsigned long'. Fix 'struct x86_pmu' for that. The lbr_nr won't be a negative number, so make it 'unsigned int' as well. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Wei Wang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200613080958.132489-2-like.xu@linux.intel.com --- arch/x86/events/perf_event.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h index e17a3d8..eb37f6c 100644 --- a/arch/x86/events/perf_event.h +++ b/arch/x86/events/perf_event.h @@ -673,8 +673,8 @@ struct x86_pmu { /* * Intel LBR */ - unsigned long lbr_tos, lbr_from, lbr_to; /* MSR base regs */ - int lbr_nr; /* hardware stack size */ + unsigned int lbr_tos, lbr_from, lbr_to, + lbr_nr; /* LBR base regs and size */ u64 lbr_sel_mask; /* LBR_SELECT valid bits */ const int *lbr_sel_map; /* lbr_select mappings */ bool lbr_double_abort; /* duplicated lbr aborts */