Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3126214imm; Fri, 19 Oct 2018 05:40:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV60GN5gEFz1BNPm5doXXDux52C6NMiK8IUlc9wcc2fZGkb9M+EKxu6V3JSRHU062SiqlRMpp X-Received: by 2002:a62:1693:: with SMTP id 141-v6mr26364637pfw.183.1539952823357; Fri, 19 Oct 2018 05:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539952823; cv=none; d=google.com; s=arc-20160816; b=RgnLaQ+66wAu47ORoARcZu4tYo7wK1opeEufTddZ51AgKQzaVGULr2ZXMDbKYmdHGR /gz/a074PA4lS88cVfBTNAxWMS+B1qYPk7xp4yvRg+IC4WBky2jKLH/4cZaBB2AIZG+j wgIECOZPBJ5pkIueNlYSDEsmw2x50YPpgXUkEbyLOUMdwcwphdj4Qvoh56HQfUDOwXCD D9wiNmhC8iH0RDs8p4YqCk3Xqt8STGBsZz5SXUeyO16vNyiDRtDe+lBrkRhfdntWo1IV Hitn0zY8qU7YCOmZbq5UfIqlK/122yCrSVCZY/zpPWmfFaePH0JHzP7lvAHfmNbJS9qt fnuw== 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=RpIHd6By5nuAJPsoG56U/syqFR6s+RFeCrjWGSEZvMc=; b=0HbRnemk/+cIMVn7C9qKKX/7CYxJ11cfIX2DkUiggjRbqUH8RSKJpkTeAPtytunq/1 zVrdQSV3x7/A5QPgoUHbBcUgLT2O670t3r7kSHN9TdXdLusvBqhER02pwdoVq0s+coch 7DE72mFsexXCImD4ncp/N2txcqf7QV5phetKfN8A6CpINYSdaqx8Czw3WP/basxs45qN WXoLWe3igIeBjvVJE+D7tsSO6CqpUiE3UCsE6l6R+1eBBj4IePs1hDzZ+IDn33lVeoYA LNYLvKe2xgxy0fCeDVSnYridlFJwNGyt4zOwxsvOAHZhemQtMyxOHxQOAKdFV1ztYfh0 kheQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m12ZUazy; 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 a7-v6si24522618pga.322.2018.10.19.05.40.07; Fri, 19 Oct 2018 05:40:23 -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=m12ZUazy; 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 S1727510AbeJSUpb (ORCPT + 99 others); Fri, 19 Oct 2018 16:45:31 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33571 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727199AbeJSUpb (ORCPT ); Fri, 19 Oct 2018 16:45:31 -0400 Received: by mail-qk1-f196.google.com with SMTP id 84-v6so20870031qkf.0; Fri, 19 Oct 2018 05:39:33 -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=RpIHd6By5nuAJPsoG56U/syqFR6s+RFeCrjWGSEZvMc=; b=m12ZUazyaMBuK2fQtv041WpzQfisEh+ObllKfI5xhzSRLyKOuPpJaB+8/b9MiQ630m d5KL1PiDX62IPmB9WkA3FVnSpEemhdlgDDRUV5oSExvPqEuabHyqduRo19gi1ru/GoRv KoAgyQnQrw2NudizYMOHI7vv9nZb1fNX3+1cMG9pfYs4sC/7x/f/YMrHZHHsULk7Bn2g cTcVy4LQh3TopOpYtQ2M8GLlJL5ffhcJFEQGDOvmfueMYS+ZfVBe2WmtnnFgpP6ku8qr gc194YqkcCRu0iwV3WBjp091+0ik8dlJieBqYHvmogOZoEq1hPNAFjxVwWGXxRVF69kh RJrg== 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=RpIHd6By5nuAJPsoG56U/syqFR6s+RFeCrjWGSEZvMc=; b=NuC98oDd4hqCUDtk7jeNGZjsKem8s8j5bJ/wKecehMYJNQfkmz/eBk6byOGj8MsMK0 dX0CX0WoLG/duwmCMF9wxCQxC11fSBgopAGHPqCt1m3EX32JnOa4qfe6UM4IF9tKkeO5 YiZirNHlhrVcxczMC3Ki8L4Lr1a45L1VGZt548ypKQsIDFtXm/KeITwEOUfnwGUWZufN AdN82x8k77z5o93weEi0ZzRQyOsw7CkltmCjxvDFRfknVocaPSZFjVcrplh1bGo7c7qI +c14p0t15l4PPkUUHG4fnoc38Z0J89dhOTqDLDBq6LsjWoaZnYCWuvPwlPX4+Q7H8lt9 7wnQ== X-Gm-Message-State: ABuFfoiTuRROsBXfNuFoko68QRlFlAW2APvn8DnGLkwLcecJqZguEH/V pyum30SCye5tc70uC08a34ISfXfsy/5/5rJDCzaUGsrx X-Received: by 2002:ae9:f40b:: with SMTP id y11-v6mr33525409qkl.137.1539952773168; Fri, 19 Oct 2018 05:39: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: <20181006065113.669-4-rajneesh.bhardwaj@linux.intel.com> From: Andy Shevchenko Date: Fri, 19 Oct 2018 15:39:22 +0300 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 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. > 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