Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2881133pxb; Mon, 19 Apr 2021 16:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2g+TeiQuuvTbz0hjCOeRWv7bhGDOwEMPo/nVGBgGEsYiLH9YK/hQ0TYKYCeFi0UBKbkjs X-Received: by 2002:a05:6402:35c8:: with SMTP id z8mr4027009edc.210.1618876659414; Mon, 19 Apr 2021 16:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618876659; cv=none; d=google.com; s=arc-20160816; b=p4zGsuiYesBYmnDmNg+xtoPPn/eOJbmLyFJZ2R2mIyQ4liknKh8A32dBmOMV1CmVU0 pY1uXjZhO69lhkTD9mIL+CzdR8tmHlfX1k2u40NM7sNvwhW3VcuwwV8C26bWkM08mnh9 Ghn33GtfGIdRxLE2HFGMRAf9hGHTeKf4oc7D5YmuvRFdxaM7UhMHsjNOXaRNzoYwORmy 3KrpCCWpOOMTUlSwX4koNkPnoX88Qe1qBvZeseyV1q0LC1aosTlJimS22sxVuA6OdIAX vv6KIt0zJ30T6C3SuVSX8BF16y2IquD3wljAgPN44BolznNSvi8gUAaZLom5g4wW3tiO o+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=Tvkr+mPSZ+ps5DppAGK1+r+Pdo4K4oVliDzSpuZeEcw=; b=G4g5rZc5kGDAzvbxrdNP9xtw/4hTZ3F2/oN3WSCENHVn/5vhQ3RNbJ9t4AmwsLoKVT OgqA6rdoqOte9qbSuLQXObbAUoo6gW0BftOrS3cuA3vKBgVv8z/c5EpyP8avkILJQL/I 1JCbD5XNj+o++o/vluMnirt3imKa7sSSF02MccgIloI7j1DYU+4Zvp61pMtp09IRnQt9 zesu5GIimvRqOS6/y/rdIRbtDpgca/U+nc5E5l6NY+p7maokB+Aqfnjk3AGy8H7BDHPd mr/E2BO5YGwHuFJNAL6fUvXG/Mys6S36B27B3MmXRD9AySbUw2qfJl2z+Uj7CoqMqb7V zeJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kepstin.ca header.s=google header.b=CtItF8OT; 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=pass (p=NONE sp=REJECT dis=NONE) header.from=kepstin.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si11430732edc.579.2021.04.19.16.57.16; Mon, 19 Apr 2021 16:57:39 -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=pass header.i=@kepstin.ca header.s=google header.b=CtItF8OT; 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=pass (p=NONE sp=REJECT dis=NONE) header.from=kepstin.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231302AbhDSXwu (ORCPT + 99 others); Mon, 19 Apr 2021 19:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbhDSXwr (ORCPT ); Mon, 19 Apr 2021 19:52:47 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0A79C061763 for ; Mon, 19 Apr 2021 16:52:13 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id a18so3738033qtj.10 for ; Mon, 19 Apr 2021 16:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kepstin.ca; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=Tvkr+mPSZ+ps5DppAGK1+r+Pdo4K4oVliDzSpuZeEcw=; b=CtItF8OToAHckxW4i9k8/+6ccOS+08mGOUvPXACScNE6B4Yei80WiWMj5Z50jJFjFF 8KY3c1N+x+iIqe9M2Qm0AddKOZwF9SeUUNYdTji6732Wx0cyfspfvtECD5WAxvzhlQeg 5gNThYBrSKuVUsxgjVac03LIJuO2eilwxkQE4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Tvkr+mPSZ+ps5DppAGK1+r+Pdo4K4oVliDzSpuZeEcw=; b=pxKbTUkJX7k+EutSQrGkfsnT8TZzrITahaQfvAQo8pk6GilpnZK6yVmvihNG9QGGsH lOkyuygCMWnjnUPXhSNvLHVntyDEUPO+yW884C4K9WearFiEFTVzCLiVXVHlTVVSpKKi 3cII/Dv1zb2wIrALwh7I9DVrDWU02rcJm92UI6kd9VRboKty3Q53tPWPAukIgy5/6iWu iXjQYktRQDlEm2C+BKI4vYBan+uB+M2/xi+DnnDKHKv5UsiXjUc0kPgpfbzuCcVQolBB zKzLs6D6redJsLovPgMwdZLQQDKe78Z3ky/A2nJc/Qb0BJlWz7x1ASb/+tJwnozBZPqG iCZw== X-Gm-Message-State: AOAM5307y2cvuckg/ot+NChiO0ykxnZKA/EAZ+7VX75fToAD2l5YAu1e 6RR2FUW4ZQKXxSp57EyZECEFUA== X-Received: by 2002:a05:622a:6:: with SMTP id x6mr14131824qtw.1.1618876332119; Mon, 19 Apr 2021 16:52:12 -0700 (PDT) Received: from [192.168.1.161] (dhcp-108-168-125-232.cable.user.start.ca. [108.168.125.232]) by smtp.gmail.com with ESMTPSA id u11sm9934891qta.91.2021.04.19.16.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 16:52:11 -0700 (PDT) Message-ID: Subject: Re: [PATCH v2] tools/power turbostat: Fix RAPL summary collection on AMD processors From: calvin.walton@kepstin.ca To: Terry Bowman , lenb@kernel.org, yu.c.chen@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, bp@suse.de Cc: wei.huang2@amd.com Date: Mon, 19 Apr 2021 19:52:09 -0400 In-Reply-To: <20210419195812.147710-1-terry.bowman@amd.com> References: <20210419195812.147710-1-terry.bowman@amd.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-04-19 at 14:58 -0500, Terry Bowman wrote: @@ -3281,7 +3326,7 @@ static int update_msr_sum(struct thread_data *t, struct core_data *c, struct pkg                         continue;                 ret = get_msr(cpu, offset, &msr_cur);                 if (ret) { -                       fprintf(outf, "Can not update msr(0x%x)\n", offset); +                       fprintf(outf, "Can not update msr(0x%lx)\n", offset); This gives a warning when compiled on 32-bit, since turbostat is compiled with -D_FILE_OFFSET_BITS=64: turbostat.c: In function 'update_msr_sum': turbostat.c:3329:42: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'off_t' {aka 'long long int'} [-Wformat=] 3329 | fprintf(outf, "Can not update msr(0x%lx)\n", offset); | ~~^ ~~~~~~ | | | | | off_t {aka long long int} | long unsigned int | %llx Easiest fix is probably to cast to (long long int) and use the %llx format specifier. That should be valid with i686, x32, and amd64 userspace. Everything else looks fine as far as I can tell, so feel free to add a Reviewed-by: Calvin Walton once you've fixed that warning. --