Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5639478imu; Mon, 26 Nov 2018 03:22:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vw6VBuic7HRqgoi2gHTneu8HDHA4eAnr6afk2p6s3FADUUQzhKR3WOCFktQUMu0I+fJOBw X-Received: by 2002:a17:902:b18b:: with SMTP id s11mr11430079plr.56.1543231353816; Mon, 26 Nov 2018 03:22:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543231353; cv=none; d=google.com; s=arc-20160816; b=i0kks6m/ivHKw3PHGPhpLEJagZ6VyKgBk/hDX/tyJdCoAAd0lCH0pL6TS9SA4ElEvU yXOCUwWeiZut3QkPr7yIBz9yJG0D49P0MtO9qt5rm2Pb/mBRTgSDiWsIIaPRRmWdywwK FKij48pSwUbFjf3inP5AzSzfINB3sNiGoywDaHfnk1xc201ysWljPwua3FUT4BBM3voh 2XB6zelK1rjFe0DpUxkRhlTGOeDY/hDKsi0RPocbzWmira/HDu2Lbsor3bbaVs+7nLy2 /h2IVotzp/R7fW1hcp4nLwZCQcjDnMoXiRjVyJKtQZEEmVwbqnL2hSJp93Q282/AlKHT +lhA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IqWC0UYmEFgNVMoEBHiWUaU87UvXD2sj/lUYGJkl02Y=; b=OCI3pILl1IV58t+kAoX0bRI156rGG9eSS2uDll2hBlA9zn9Ao7NFB0MCe0Bpztpzh0 Qr7JebAilUTa2cuXDHJ6RvNREnKM/SF2CLdOkiCc/Wq2dtvOoaS52qQny0swg1/xhXcz KwnYq1bHCCMiiLVReDGOtw8MXoGia/RCtEc8LdqWyBsf+rdun/El7aBZzAQt2CJFPdJ4 gaRBJXkEZWNKkhtK8dAeWI64FP3PetJjHPoHE6a+9r35H3D5thDMKReqXJcB8/gtdY5a VsPjn8EZzuWqrpgAPffcxuTRXdJe9024Ok4TxNRFsg9Q0TR55NF1J8R/aLO0nkdIL5bM cZyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GakQd23d; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si62316261pgq.535.2018.11.26.03.22.13; Mon, 26 Nov 2018 03:22:33 -0800 (PST) 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=@kernel.org header.s=default header.b=GakQd23d; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729118AbeKZVvs (ORCPT + 99 others); Mon, 26 Nov 2018 16:51:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:33068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729097AbeKZVvr (ORCPT ); Mon, 26 Nov 2018 16:51:47 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B952121104; Mon, 26 Nov 2018 10:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229883; bh=0x5bHCRQY2D8jCwK+ciBkWc9xNrDkuYv6x6aFsxZeRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GakQd23df/a5CihZBNb22wrOWvigXiESRgCYTnPsc5hOafOC9rl4tNSK2UduI/1J0 50RO1LleyFHsP+C/IyEn0fMDMq7h3xO7spRCi0F9lk8uwyYctmGRR23kYmqY3MX3hX Kh525F4m/AnRP92cwHgxg+av+FoM1553Gt72D4Ug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matt Turner , Len Brown , Souvik Kumar Chakravarty , Kuppuswamy Sathyanarayanan , Rajneesh Bhardwaj , Andy Shevchenko , Sasha Levin Subject: [PATCH 4.9 07/46] platform/x86: intel_telemetry: report debugfs failure Date: Mon, 26 Nov 2018 11:50:56 +0100 Message-Id: <20181126105046.594759682@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105045.447291262@linuxfoundation.org> References: <20181126105045.447291262@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 8d98b1ef368feeb7720b8b9b6f3bd93f2ad892bc ] 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. 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 Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- 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 ef29f18b1951..4069433a0ec6 100644 --- a/drivers/platform/x86/intel_telemetry_debugfs.c +++ b/drivers/platform/x86/intel_telemetry_debugfs.c @@ -953,12 +953,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; + } #ifdef CONFIG_PM_SLEEP -- 2.17.1