Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4391588iob; Sun, 8 May 2022 11:10:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBqYq/frbiOJY2yb24wHoeE95KUGidipt74lclzjEtJoey2C6xVzSfQyIfgMqcNIn82z8y X-Received: by 2002:a65:5245:0:b0:39c:ce49:e97d with SMTP id q5-20020a655245000000b0039cce49e97dmr10350077pgp.301.1652033412703; Sun, 08 May 2022 11:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652033412; cv=none; d=google.com; s=arc-20160816; b=SrFHoWjbQK2L5pWZwIBlB90jbvCtltft6+BOeHP1hsOLuuRAqfA5rotycwVLeeZK2a AFZM8ggwJ6gw5JWiDarHS4WdEkGNCeMwPxEJ9wYaOFXo92dmIrqigpMWSZErFgBvJ0g4 HYZBpyf0JNa1Exhkbh986D35jH2DsUr4OYWK+OyVnP//psA3ZXup8yFzpWBAUNSxWDcM 2WfJx4bQRCe7UFU9xzQvLcr+Q5H8HTPp1rOyyPOhspU8ji3MRFFvbfJKWaeOeufCFHg0 ja5YLAOIJzrJ6y575Q+evbKn7DPzlnGG/tp8OZzImWc7ffJm2E65wl6vCcZ2r2gFtk1K NUVQ== 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=MgJlmKI+CobYAFhgbaxXsszJJ7Ia2deJ5holZNV6ksw=; b=poPWuUXPXcBXYCPKvqiWlKDtp51LIynOKSCsYe/EwDm2G+VygheolZFkwbsxb8ZRMF fhzct9i0Ico/wgFG1dgzTIGStpEW5DwuUknvZ999nD5Eh9UfrE9pVygSDRRRR+VPOLAU 5JAQG37wmeeeJLsb7r+5IG7UwN2SRRxOir3tMr7Bvqqm5KIRIw6w4moFj2PuA/AiaV8s jtKPF5cUBBU8CyWoe0ZeuM1XnbmjRsjwoXvg6Z9BCYSNwXBqgURVPkUJ0ZLPpGvZPyq3 py8+S3GkQ4mGkfd8fyiox6G5k3WQDhPysp0i3yp0YyH299nyaCQTt9nG9/Ob3QLDfzbX BDrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a7DOMJeT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh4-20020a17090b4ac400b001d26ee86442si14082039pjb.93.2022.05.08.11.09.33; Sun, 08 May 2022 11:10:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a7DOMJeT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345707AbiEFBoz (ORCPT + 99 others); Thu, 5 May 2022 21:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388011AbiEFBob (ORCPT ); Thu, 5 May 2022 21:44:31 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BE665DBFA; Thu, 5 May 2022 18:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651801250; x=1683337250; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cOpo1cxKQZOorn/YwjgOZeIpxyqd7qk0J0cuvEnrJsw=; b=a7DOMJeTK3bZEomwmbb54Ni+cDf/5VRyGO8GVivUZ0H8C6reRyPOvyEY n6Sa2xNhxpuR7PrZaZuFUuwSztUJG9j6oKpW6tk+vACoK1hbm/gJgV0yP zQ3eUpoiJTM0OYsCrPk4Q225Q3QmHRE+3kRqX6U13vORbfB4dckk1AL70 dc0fZRrAN0aDYF5z2DdED5CIaGbrsH1mXvTjRdvYmFwz1YkOTv4c+ng+h NV+upbUZA0EktLbeZnrUZAVJe8CkClPczaVSCXQBuwHhD4E8FEY6MoR8U cziekBkU26qtanYx4eKA23mtu+x5vXWlUqbn4ZH8REKaDpC7cWgreVKns w==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="293519440" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="293519440" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 18:40:48 -0700 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="537645059" Received: from agluck-desk3.sc.intel.com ([172.25.222.78]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 18:40:47 -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 v6 10/11] trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations Date: Thu, 5 May 2022 18:40:34 -0700 Message-Id: <20220506014035.1173578-11-tony.luck@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220506014035.1173578-1-tony.luck@intel.com> References: <20220428153849.295779-1-tony.luck@intel.com> <20220506014035.1173578-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 fd3f5f3f31e5..cd25817ceda0 100644 --- a/drivers/platform/x86/intel/ifs/runtest.c +++ b/drivers/platform/x86/intel/ifs/runtest.c @@ -19,6 +19,9 @@ struct workqueue_struct *ifs_wq; static bool scan_enabled = true; +#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