Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp73893pxh; Thu, 7 Apr 2022 14:23:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT94Olf5uTOZ2uj7G/Yem6LIqXnAtneo4Wc1VAxb6STIzUJBsNA7z/6kEwJWh3jsOgunIU X-Received: by 2002:a17:903:32c6:b0:156:b76e:4b98 with SMTP id i6-20020a17090332c600b00156b76e4b98mr15662387plr.40.1649366597615; Thu, 07 Apr 2022 14:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649366597; cv=none; d=google.com; s=arc-20160816; b=F937r+15T7IHscF5Xm6w6G3ZQf2U/M8b4tocwm3UyoijFYf3or6/AX44Xg1NLqCYPW l40MwDfG3HUnoVtO1zV3WeSxOqIjBIMGtT8JH660C7+UZzDx658W+tIxmgOtUI/xZ/VB 4t/wwOUGq/hlgbQE9tbFlQ83TjOuw46r8UgupFnqRrfqS570S1Y0vbeIqM/b+QP+UrZA TL70jV3lQf1rZAPpHf4zwS3aaGV4lBMbF0FzLnq++IyRrSgwBTegLQ1v6NCJSPWcpFQQ uJjyzsXQrHesgQLWyNF4T8SBDx0eUTy6ze7RB1YxIFt9Mw2i6mdt+6SHHQsnsRHrhEqS r1lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=8ZnVJ2Hl1CuTicEZ2/tJHdVroDqiEe5TIBQB3r+r9VI=; b=UCnwS6NRI15Vn9QMum4L8FSRRF4YH0AtQUcAq7GRVDRmMOgIXvZSQ6LQaYhTZVNCT1 ciwjjvXs9hbK4vYywqHimpEyS0f2E1boktfT/yrhKq+vVoACO87EozK/nA+4bNe4mITh fGTlj93Q66aQcHK+dw514gp+NL/AnoewVAZ7bkNNa2wfTl0ExKEudLIzu0yTrcYoVXhR yOPReEGPrcUJxfx0W439OC18+7o2ljuXY6tjSKIOa6GoL7Wv07cmlsEqPlGxHzecMKIr l0YD9Sb0tZiTWdT6bAMHW5F9ToKgYV4vriav+9vr/C1Ia9/WTwTTyeHdkDhy6VWZ1rT3 7bjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fzDXd6sZ; 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 p12-20020a17090a74cc00b001c6841aa3e2si2926843pjl.37.2022.04.07.14.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 14:23: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=fzDXd6sZ; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 29AC42D57B1; Thu, 7 Apr 2022 13:13:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240354AbiDGTRY (ORCPT + 99 others); Thu, 7 Apr 2022 15:17:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347115AbiDGTQ3 (ORCPT ); Thu, 7 Apr 2022 15:16:29 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5988B23F9CB; Thu, 7 Apr 2022 12:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649358868; x=1680894868; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=EpuU9FnJFmOX+BA1Irm1YxgXVJdK5TXoe/7lCiqp/zk=; b=fzDXd6sZNwydbYFLaIluNQIXkc3fT1qQ3RuZNsgIh13Sm43Uw+3srB8C TIXRzvOhWGSAsqfePpelCftAQqGaT3s8Z7ySu4/65V58zHyVv8PRHY3bT 3qsQDtEDl474zmkbXHcFgmMQ1l3LAYA5MKvG4uzLSwtg0t/fFc0HOqPg+ iY2FIB0o/z9taV/B3t8UcIpDKQQA3mKdJaCmHeo/u5tRQ5tJZWIFWJfOH U+rWbflyLiuzQRqe/DW04VdEWH24BTuHQ6L6UTyvc1+Fwe5bFQifO1oG5 knn4o9jhZ3m2xZll6/rRBtf9GMxtSV6LnB5DfrzNviuL7oEOrdSICSski A==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="260255390" X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="260255390" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 12:14:19 -0700 X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="571193735" Received: from coffy.sc.intel.com ([10.3.79.166]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 12:14:19 -0700 From: Jithu Joseph 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 v2 10/10] trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations Date: Thu, 7 Apr 2022 12:13:47 -0700 Message-Id: <20220407191347.9681-11-jithu.joseph@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220407191347.9681-1-jithu.joseph@intel.com> References: <20220407191347.9681-1-jithu.joseph@intel.com> X-Spam-Status: No, score=-2.0 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, URIBL_BLOCKED autolearn=no 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 From: Tony Luck Add tracing support which may be useful for debugging systems that fail to complete In Field Scan tests. Signed-off-by: Tony Luck Signed-off-by: Jithu Joseph --- drivers/platform/x86/intel/ifs/runtest.c | 5 ++++ include/trace/events/intel_ifs.h | 38 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 include/trace/events/intel_ifs.h diff --git a/drivers/platform/x86/intel/ifs/runtest.c b/drivers/platform/x86/intel/ifs/runtest.c index f9c98d84183f..b9fac2ac7107 100644 --- a/drivers/platform/x86/intel/ifs/runtest.c +++ b/drivers/platform/x86/intel/ifs/runtest.c @@ -10,6 +10,9 @@ #include "ifs.h" +#define CREATE_TRACE_POINTS +#include + bool ifs_disabled; static int ifs_retry_set(const char *val, const struct kernel_param *kp); @@ -204,6 +207,8 @@ static void ifs_work_func(struct work_struct *work) rdmsrl(MSR_SCAN_STATUS, status.data); + trace_ifs_status(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..0611f370cb37 --- /dev/null +++ b/include/trace/events/intel_ifs.h @@ -0,0 +1,38 @@ +/* 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(union ifs_scan activate, union ifs_status status), + + TP_ARGS(activate, status), + + TP_STRUCT__entry( + __field( u64, status ) + __field( u8, start ) + __field( u8, stop ) + ), + + TP_fast_assign( + __entry->start = activate.start; + __entry->stop = activate.stop; + __entry->status = status.data; + ), + + TP_printk("start: %.2x, stop: %.2x, status: %llx", + __entry->start, + __entry->stop, + __entry->status) +); + +#endif /* _TRACE_IFS_H */ + +/* This part must be outside protection */ +#include -- 2.17.1