Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4899233iob; Mon, 9 May 2022 04:24:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf/zuRbTUdQ4vny9st34U/xZHsa223n5u/dwfXRvOKssXN88EMcmc/vYOEvgOxIpNiGuYl X-Received: by 2002:a05:6a00:1352:b0:510:4c0e:d230 with SMTP id k18-20020a056a00135200b005104c0ed230mr16007727pfu.79.1652095457469; Mon, 09 May 2022 04:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652095457; cv=none; d=google.com; s=arc-20160816; b=HJ60HrSxnP+z326rt6TWE/MV0g8W0imJTSAhbbYB1JtGCKxnCN9Y4JXvE4SB740+3F xbtKMU0ITUYWUqyzKodUnW5ZrMEgXS/+J4EcTLQWUpFdubVyH1dx0xJ/xTYHFUGLlIY+ 2YlRFFnj31TnfXBYnrUOUResVE+ysvC0DUVsjy17gLyRufaCp3fXaEWEdgCg4Cqbnavz pyys6oWCCjKu6eVSeqV/IYv98GXNs4HbnQYMOVliqQIBNRpcdLybiRDoOc97y9aW01YF SLpIzm4j5/FHIiTiv294YBeLEVYeyvdnmqFs5QPJ6vTc0gvzx/LTnhtywDe7/fRmNDMW +Tqg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HCKcdkcjuUIO/Ju/P+T8iNlL914UKpb1XcNbrYdenxA=; b=gxCx2T/idB2QbtQ74FGXZ8f4KNpBVUSsy8WGyRJwSZVgf/IGk+qFrIF7uYAR4NtS5U xqmpq/XOVT5W+tjBONR/rsQ60Rci3hxqkXc1OT03p7pOQ8RTAZi8rLknnqRdO1ODCo/s 5HWjFYlhOh/+h1YHldmCHARAmGLCwGlnH9XXQghHbFwJxG3X2EZAs+pWY7U3GxSalVLg sOkQg19liqPy6smlrztyYi5vB1emdrgqX9ZdqFuvBm84cTsWQ56fxCweY7DXtkhQ8ens oLAOQAXXPeWMLcY23YWiHn9lrm12LfY45/sGJeeCOiCcXr9oIgxQgPtjJfs7sSdlugEk 5WpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hfqt2tET; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s24-20020a639258000000b003c5eccad2d4si14102083pgn.578.2022.05.09.04.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 04:24:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hfqt2tET; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B2181F0DC0; Mon, 9 May 2022 03:32:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445001AbiEFW7B (ORCPT + 99 others); Fri, 6 May 2022 18:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444825AbiEFW6G (ORCPT ); Fri, 6 May 2022 18:58:06 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C547FF4; Fri, 6 May 2022 15:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651877662; x=1683413662; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UrSGBxwCGvd9hm8lvSEMIixJeqTEhSZoyFHz3/ZwcIQ=; b=hfqt2tETYzDZgjxVeNF83Y2YRU4daMiLuHlD8wbO0ESC35fJWaeZty7p GZfeZOUXwmTmKjuIZkaTo2bzCpSFPEk/AoZlcxGWbxaGedf6GGiCDK5mv zcWi17BChl518EPjJT3dbf94G+4WZX1xuUAAgVMbSKPasPL0VnH2PxI5T 1R492SgI7zm3R8DwKvzjgTWOZUnoiwFXW+eV/C7QPYGxEduQT6cBDrGI+ JT30AUFX6Oy/ofLG9gjVEOn1RJabbzE4rdHU9OAMdPYSYrSeLALZOSnaB wrsvLilZ+XtxpRKjTMuhQtOqN1jtEsS43+JQgyPT5i2PHgxLY77jDz/4U g==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="256080805" X-IronPort-AV: E=Sophos;i="5.91,205,1647327600"; d="scan'208";a="256080805" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2022 15:54:21 -0700 X-IronPort-AV: E=Sophos;i="5.91,205,1647327600"; d="scan'208";a="695383647" Received: from agluck-desk3.sc.intel.com ([172.25.222.78]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2022 15:54:21 -0700 From: Tony Luck To: hdegoede@redhat.com, markgross@kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, corbet@lwn.net, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, jithu.joseph@intel.com, ashok.raj@intel.com, tony.luck@intel.com, rostedt@goodmis.org, dan.j.williams@intel.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, platform-driver-x86@vger.kernel.org, patches@lists.linux.dev, ravi.v.shankar@intel.com Subject: [PATCH v7 10/12] trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations Date: Fri, 6 May 2022 15:54:08 -0700 Message-Id: <20220506225410.1652287-11-tony.luck@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220506225410.1652287-1-tony.luck@intel.com> References: <20220506014035.1173578-1-tony.luck@intel.com> <20220506225410.1652287-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add tracing support which may be useful for debugging systems that fail to complete In Field Scan tests. Acked-by: Steven Rostedt (Google) Reviewed-by: Dan Williams Signed-off-by: Tony Luck Acked-by: Hans de Goede Reviewed-off-by: Greg Kroah-Hartman --- MAINTAINERS | 1 + drivers/platform/x86/intel/ifs/runtest.c | 5 +++ include/trace/events/intel_ifs.h | 41 ++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 include/trace/events/intel_ifs.h diff --git a/MAINTAINERS b/MAINTAINERS index bb0c4ff25942..6864fa039974 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9868,6 +9868,7 @@ R: Ashok Raj R: Tony Luck S: Maintained F: drivers/platform/x86/intel/ifs +F: include/trace/events/intel_ifs.h INTEL INTEGRATED SENSOR HUB DRIVER M: Srinivas Pandruvada diff --git a/drivers/platform/x86/intel/ifs/runtest.c b/drivers/platform/x86/intel/ifs/runtest.c index 7efcce35e0e9..b2ca2bb4501f 100644 --- a/drivers/platform/x86/intel/ifs/runtest.c +++ b/drivers/platform/x86/intel/ifs/runtest.c @@ -17,6 +17,9 @@ * core will update results of the test. */ +#define CREATE_TRACE_POINTS +#include + /* Max retries on the same chunk */ #define MAX_IFS_RETRIES 5 @@ -191,6 +194,8 @@ static void ifs_test_core(int cpu, struct device *dev) status.data = msrvals[1]; + trace_ifs_status(cpu, activate, status); + /* Some cases can be retried, give up for others */ if (!can_restart(status)) break; diff --git a/include/trace/events/intel_ifs.h b/include/trace/events/intel_ifs.h new file mode 100644 index 000000000000..d7353024016c --- /dev/null +++ b/include/trace/events/intel_ifs.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM intel_ifs + +#if !defined(_TRACE_IFS_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_IFS_H + +#include +#include + +TRACE_EVENT(ifs_status, + + TP_PROTO(int cpu, union ifs_scan activate, union ifs_status status), + + TP_ARGS(cpu, activate, status), + + TP_STRUCT__entry( + __field( u64, status ) + __field( int, cpu ) + __field( u8, start ) + __field( u8, stop ) + ), + + TP_fast_assign( + __entry->cpu = cpu; + __entry->start = activate.start; + __entry->stop = activate.stop; + __entry->status = status.data; + ), + + TP_printk("cpu: %d, start: %.2x, stop: %.2x, status: %llx", + __entry->cpu, + __entry->start, + __entry->stop, + __entry->status) +); + +#endif /* _TRACE_IFS_H */ + +/* This part must be outside protection */ +#include -- 2.35.1