Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4700370imd; Tue, 30 Oct 2018 06:14:56 -0700 (PDT) X-Google-Smtp-Source: AJdET5epwt01C0DU4GLyEu2DDBsce+tNkzFxuP03EFgjVguW/7Z0iKBkCsWS4TC+K5P4/RBdJ3j4 X-Received: by 2002:a17:902:e089:: with SMTP id cb9-v6mr18202319plb.196.1540905296159; Tue, 30 Oct 2018 06:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540905296; cv=none; d=google.com; s=arc-20160816; b=rMFu05gXFuHTokGLX5KVVikllUV27Bj6jgm+Lq4Ku1XHioAtKqIwt9SNfROujfbX0a 4YMMHXGQ+jQe7BPGXGBQkOuAYL9NLiJr5qY4dXaxF3VFvrArJoq/wn/MDfFXTUzPt6+C fnIK3WZakpi0hXiiltTCxDlnV69rjDEvxiXNllrgP+7eQW/1wUrENLdZPCuqgX1pBSds koMR1rUpzjvw+lIKEbtSMYtaY3wlqCZ6KY+/j1WdkUYonm7W1I8BSEOBwLIVp32C07BT A5I8pR+HJPzlvVpWvHFxyBAx9/aFEiGHdisf2jiSeaVBL3Wwcyz7uNEhelaSjR27Fcxp FmFw== 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=xWJjXJVwAptVkm5YP9dkz6BlJrXAb8LonUsQbKVNbUc=; b=u0YFGK/UpXBPCfEvkENGBpsRUyvGE91nJ2AiJUkqKVwQik5GCagN2yhJEFMNDwrvCo x/jqaSLoVWKVvVl1fE0sfB2aGe8fVNf1W7utvYNZfv5DdH1OpIhQyQfeLHKzQzWKSkCg 0/ZIL71Hf8yV6r+D5m/6wcxegt9UROePdRWSg+T4LBq4nkGwJXqsZG8uqNrzw3/xaM5G 5ctu9zE6D9QdFanbf/VROUCgipFgpQ2S0gmdf6zrenZtUa5O03hruFasFcp6wIeqZLLg JQiBB8/iVTQiOSsJcFGcxoGBmuy7N1SL2d/QhOXZWc/hDvDprc1gHgSVtQqS26Mrz/mW PFMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q7sO3c9f; 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 j7-v6si23182521pgj.532.2018.10.30.06.14.37; Tue, 30 Oct 2018 06:14:56 -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=Q7sO3c9f; 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 S1728004AbeJ3WF6 (ORCPT + 99 others); Tue, 30 Oct 2018 18:05:58 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:43560 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727798AbeJ3WF5 (ORCPT ); Tue, 30 Oct 2018 18:05:57 -0400 Received: by mail-qt1-f195.google.com with SMTP id q41-v6so13290371qtq.10; Tue, 30 Oct 2018 06:12:34 -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=xWJjXJVwAptVkm5YP9dkz6BlJrXAb8LonUsQbKVNbUc=; b=Q7sO3c9fdvBBFOf/wtjKn6SAHnoM+i45kvYsi1l3wlr+GZxTahlqPz942/TXpkfrac gk/cy3CFdG11J7R1gh9cnVPl8tbzh6ffNmTF81Xt5XY6ZfU8jUr8inuWOMiE0hmZQvG3 LrJUevzPrBlXe0qHtAh/RP6OR5zzNxsrD52lGoz0QScRp7K5t4qEMOPiiVG4XXukWdsT ir8XCdfAbVR+kK6GisP+LFEFoJh9o7W7gUjqKwTmsDqSb/AjamXFAUWFbgaxegHlTTay UfU+Ihl409wWNGoTb5X5pI8t0WO6wG7ceYBrPKYtnun/bBrl45rcUYhHs93yrF+RqRzz UoCg== 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=xWJjXJVwAptVkm5YP9dkz6BlJrXAb8LonUsQbKVNbUc=; b=GU4tICaIMe9TJcGI9eD88VhW6XzP1rGqNBgTMkdsr+ftfLtInN6SY8/Q4w5UL4MAs7 wRuWyQWlsLvwLJaIBVuoVeESeVsp14nyghKwraVKkn6kyJuyMziujIkP7rt30QCy/q6l qMGqbvVu4CvjblLxOPIGF3QHtbBKuEKL0NbCP3FBcBLHMgOpgi1rGX6Qtjk1KxFE7f1M mpdusuEa7CBcduWoq1EMQqUJ66ioDanULO4jNQ1dvsfM8wgW5UV3oxl10JnzCuk64dyh TVQHoBVD0eu/qzJjpEBa5Yu+Z390bDGO59cqUH1P5YhBinLD0F0nnbzdTc+PE48eRPX9 tlXg== X-Gm-Message-State: AGRZ1gLfVloVl0ZUaT9ZhOrr0TSvCYo1St3Sm1afH3LQ/ETS5pASREyJ ovCBDUrTugZ6Dm+exvcAwV0G+hkqbAh7Qkwup0E= X-Received: by 2002:aed:3b4b:: with SMTP id q11-v6mr2106368qte.229.1540905153499; Tue, 30 Oct 2018 06:12:33 -0700 (PDT) MIME-Version: 1.0 References: <20181006065113.669-1-rajneesh.bhardwaj@linux.intel.com> <20181006065113.669-4-rajneesh.bhardwaj@linux.intel.com> In-Reply-To: From: Andy Shevchenko Date: Tue, 30 Oct 2018 15:12:22 +0200 Message-ID: Subject: Re: [PATCH v2 4/4] platform/x86: intel_telemetry: report debugfs failure To: rajneesh.bhardwaj@linux.intel.com Cc: Platform Driver , Darren Hart , Andy Shevchenko , Linux Kernel Mailing List , Rajneesh Bhardwaj , matt.turner@intel.com, "Brown, Len" , Souvik Kumar Chakravarty , Sathyanarayanan Kuppuswamy 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 Tue, Oct 30, 2018 at 9:41 AM Bhardwaj, Rajneesh wrote: > > > > On 19-Oct-18 6:09 PM, Andy Shevchenko wrote: > > On Sat, Oct 6, 2018 at 9:54 AM Rajneesh Bhardwaj > > wrote: > >> On some Goldmont based systems such as ASRock J3455M the BIOS may not > >> enable the IPC1 device that provides access to the PMC and PUNIT. In > >> such scenarios, the IOSS and PSS resources from the platform device can > >> not be obtained and result in a invalid telemetry_plt_config which is an > >> internal data structure that holds platform config and is maintained by > >> the telemetry platform driver. > >> > >> This is also applicable to the platforms where the BIOS supports IPC1 > >> device under debug configurations but IPC1 is disabled by user or the > >> policy. > >> > >> This change allows user to know the reason for not seeing entries under > >> /sys/kernel/debug/telemetry/* when there is no apparent failure at boot. > >> > > Pushed to my review and testing queue, thanks! > > > > P.S. I appended one more patch against this file, please check if it's okay. > > Thank you Andy. I will check it when Infradead is online. You may check our mirror on GH: https://github.com/dvhart/linux-pdx86 > > > > >> Cc: Matt Turner > >> Cc: Len Brown > >> Cc: Souvik Kumar Chakravarty > >> Cc: Kuppuswamy Sathyanarayanan > >> > >> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198779 > >> Acked-by: Matt Turner > >> Signed-off-by: Rajneesh Bhardwaj > >> --- > >> Changes in v2: > >> * Removed print and out label both as suggested by Andy. > >> * changed to pr_info. > >> * Other minor style fixes. > >> > >> > >> drivers/platform/x86/intel_telemetry_debugfs.c | 8 ++++++-- > >> 1 file changed, 6 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c > >> index ffd0474b0531..1423fa8710fd 100644 > >> --- a/drivers/platform/x86/intel_telemetry_debugfs.c > >> +++ b/drivers/platform/x86/intel_telemetry_debugfs.c > >> @@ -951,12 +951,16 @@ static int __init telemetry_debugfs_init(void) > >> debugfs_conf = (struct telemetry_debugfs_conf *)id->driver_data; > >> > >> err = telemetry_pltconfig_valid(); > >> - if (err < 0) > >> + if (err < 0) { > >> + pr_info("Invalid pltconfig, ensure IPC1 device is enabled in BIOS\n"); > >> return -ENODEV; > >> + } > >> > >> err = telemetry_debugfs_check_evts(); > >> - if (err < 0) > >> + if (err < 0) { > >> + pr_info("telemetry_debugfs_check_evts failed\n"); > >> return -EINVAL; > >> + } > >> > >> register_pm_notifier(&pm_notifier); > >> > >> -- > >> 2.17.1 > >> > > > -- With Best Regards, Andy Shevchenko