Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1435217yba; Sat, 6 Apr 2019 12:12:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbHa4e0+euGxk4ihvv7CuF6oX4/4ul3Ge+Fks+Hd+I7U+e4wqfTm244N3Tgy9ojbxCMq8x X-Received: by 2002:a63:e850:: with SMTP id a16mr18437845pgk.195.1554577949643; Sat, 06 Apr 2019 12:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554577949; cv=none; d=google.com; s=arc-20160816; b=veOxp22ivXs+0+daV6D4Xn6Lpc0qCg761oPRZ2Ygiebafoe0fpk37yDy1ot2SniKg2 ti78f+pjLhNq0SZ0VMnfEFNKe0azyIYfoeAEAQRB8AVenQP++WwgZW7QosByYw01BG6h xqIFBLkA+blkFdf9dZkp1SDA7XAqmHeOFo5uui2CJbt5XhmpTjqiQCcfy1uU58nQ9jd6 BkXVHM7ZiwqAwSsQ7DDE2rsx8P+xam9otvV9830jFDv4Dl5idzdHNK4gsy5PangIXwGd XrBDxvaOFzPyGMqDhWMTPl277rjFSSZItnbXveuHlLpBcmqvDgzwYCJe7XULCZfclFIm TWqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8U7TO11hrin3ZlLHK08vql9UURN0Wwx8gVI+6XXGJVw=; b=G7gS06P0w8tgt+2a5pGcSYQ0hKeNYTmFpE7/QqFLaegsvEdBhoqntZALDup7Vo7lv+ ueMrgp/aZxwrSPQCVR/fm2xOze+dFwLZwm5Ke6TfJKKMerAKwcZGehuxJvojn01v9ay0 7LNmLY3YcZoz5562fFloT/JPsCTpDhVE2eS8fkO1ULfvtgIdNpk9uL8V/Qe4eAatlUVP 9buaPymGUlGi0tCg8RcE3htJxkQnH9xNbGxXxSEReXGgANc5W1EBeT+MDsKfuVEQFbiO xCSaHmp+ZJp+/jVlZXleDGUIuFh5w/DpER4ON0wXGAIRvjTud3pGCkVxg+LYn5gqOAIN JswA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a3Il4whT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s71si22330249pgs.561.2019.04.06.12.12.14; Sat, 06 Apr 2019 12:12:29 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a3Il4whT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726606AbfDFTLl (ORCPT + 99 others); Sat, 6 Apr 2019 15:11:41 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33323 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbfDFTLk (ORCPT ); Sat, 6 Apr 2019 15:11:40 -0400 Received: by mail-pg1-f196.google.com with SMTP id k19so4889425pgh.0; Sat, 06 Apr 2019 12:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8U7TO11hrin3ZlLHK08vql9UURN0Wwx8gVI+6XXGJVw=; b=a3Il4whTRmVFTNqgm3TPEYNspxlqnuZBsL/u8oqLUVhBsVC6Z0JgEXKHStTjGypuLu K2vAibsgv6EW5r1wftz3nxFdCZ7Ga9WVobrokvs6y7alVjMlawaUGVqLDJm599c/avHe 7+RimrlLkS2u2awGlTQM3G6gG6RDaeULPWwMieTD2DwYBHBiKLfsxI3640AYYkrOPHsI wGDZ8Sck0p0WoMxxT4CzgQGIhsR0Y49sdEYnOMrWquo+Rw74tG+BdNjBmxjKpHYYQNjg xh/eCiqFYJ9EE7iBYUJo0srdQSC2j9TRi0YGL31qm9v7++C64gCHotZYER9o4UD85yCA t9aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8U7TO11hrin3ZlLHK08vql9UURN0Wwx8gVI+6XXGJVw=; b=l818BUJb3CHgrSttab0Icvh6RoDWdjviPPc88vrDn/nTYWxBUEU52NSVYA7B+8rlCt YoPk+gul+bExiKPGlY0JndbXKrXvwBc9Rl4T4SyF0dYp3Q4fNotiaXeeAxRFv/zG/rWL fp5v2CtPHnLrjj3XWpeilorT+RBfr/DJGsDyc96YOroRSZ10d2rLAa2ocsB6z1lu6ZMN Cp9BiG/0MpKdgB30xx+fTxWCFFEFw7H2etPJp/KrgPE65kP2G4m7ua74lZp9dgun/y7d n3RjdMV/MgOuqQApJ86J1AhlKA9GZgG6B4kTzfwvd0Rm0uPys/QaBezuZ8RCPjIcucdu 04Ng== X-Gm-Message-State: APjAAAUHA9/rnjxlfGrojH0nAP0wT39DZqhOTCJInvJZmXkT2xFHE5/y hhHkdceqETjkDSl83uiFbixF8a91RZ5UmfgcOug= X-Received: by 2002:a62:2587:: with SMTP id l129mr20318896pfl.151.1554577900133; Sat, 06 Apr 2019 12:11:40 -0700 (PDT) MIME-Version: 1.0 References: <20190401180505.6621-1-evgreen@chromium.org> <20190405071455.GA30194@raj-desk2.iind.intel.com> In-Reply-To: From: Andy Shevchenko Date: Sat, 6 Apr 2019 22:11:29 +0300 Message-ID: Subject: Re: [PATCH] platform/x86: intel_pmc_core: Report slp_s0 residency range To: Evan Green Cc: Rajneesh Bhardwaj , Rajat Jain , Furquan Shaikh , Ravi Chandra Sadineni , Vishwanath Somayaji , Andy Shevchenko , LKML , Platform Driver , Darren Hart Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 5, 2019 at 8:52 PM Evan Green wrote: > On Fri, Apr 5, 2019 at 12:28 AM Rajneesh Bhardwaj > wrote: > > On Mon, Apr 01, 2019 at 11:05:04AM -0700, Evan Green wrote: > > This register is a 32 bit register untill ICL generation and a recent patch > > from Rajat fixed the overflow https://patchwork.kernel.org/patch/10816103/ > > already so i am not sure how this will help userspace. I think the userspace > > can still take care of any overflow concerns based on the information > > available about this register in EDS so i feel exposing a new debugfs entry > > just for the sake of knowing range is probably not needed. > > So you don't anticipate reusing this driver for other models where the > factor of 100 might change, or the counter might be a different width? > We can hardcode the multiply in usermode in order to detect when we've > exceeded the 4.9 day rollover range, but it seemed brittle, and would > break if this hardware implementation detail ever changed. No user space component should ever rely on debugfs interface. -- With Best Regards, Andy Shevchenko