Message ID | 20230413012922.1521377-1-david.e.box@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp721209vqo; Wed, 12 Apr 2023 18:43:31 -0700 (PDT) X-Google-Smtp-Source: AKy350ZyuR+AbPLOl0SVQeIckSlGmZNw2rkA5ul/qbTCeQJzdOaLDufQWUSqU0/Uv0WNxIh2nQtz X-Received: by 2002:a17:903:90d:b0:1a1:e93c:8937 with SMTP id ll13-20020a170903090d00b001a1e93c8937mr462872plb.35.1681350211184; Wed, 12 Apr 2023 18:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681350211; cv=none; d=google.com; s=arc-20160816; b=m3CCMbWUIAMZKOU2drp1BjHvJ4ofhMcewSbso1iOK0sI97W9kMlL6JQGkAXXfcWn/9 tRPgxNw4TO4KoFvzUJcuMNzrULdK9M9RxnYtKYQ8C7d1zQfIZuDP8KAoHmBpg8lXo8fb 1935o9lkVmMxp8SiGNd1ofT1mqZCHeU+k4xjvEDR7HPF2AdeYOC8pqyzqht3iA1nAkt0 +c2xD2E3r4SSsNRmFSjybDGU0QPj1/a2hKfLcnbYl0w2VsYjKzS3xV6zBtOdRsh+6441 A7SoKDKJi2fkwW5LcyN0gXQgNtmGN7ZuxKfSR593+U5jErmEyq8UxHDxpT8qbmKtrsyY xq4A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=aYXTc22tzi4UysIYaLVmEkU1ZNIaeUkn6Sb+nRjRuFA=; b=lifpXH+6JL7SYTj0vgGOj91Rgb+Ir0U5vkyoMG3j0KyGxTDCTnhmaTKQaVBPA+fcPR yoEQMz7k+lWPiNAOTXna5LL1S60pR69Fp/TrIW0i7h0k/6SqAx98me1JgQgqmxgGnCLS 8aWtoxA0akgTCUGPGIt6BWjEe6sbvsK1lT7s9tnsRoGyq6/1YpIo8dbDkt29dgYJQ0Os sCK9WLoInBWU/YAArjMYDNsLmjDVVNBwfRTYuknsxDlFccRiq6pGfH9M+ZRvpXY5mbUM 0XgtM+4kjFZPxzUtUo6B/FLyN69aRCTy3mm9v5I+/VmXRrsq6n1VrKTzOj4urfec1uwN FmJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QbjZ+Ewr; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg2-20020a17090326c200b001a664235870si683812plb.34.2023.04.12.18.43.19; Wed, 12 Apr 2023 18:43:31 -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=QbjZ+Ewr; 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 S229689AbjDMB3Z (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Wed, 12 Apr 2023 21:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjDMB3Y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Apr 2023 21:29:24 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 893D1121; Wed, 12 Apr 2023 18:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681349363; x=1712885363; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eiGf+YK8D5uXT76f7SsOIA1fFUZIqBbQIs663qB/YBM=; b=QbjZ+EwrWkn8LQukRDF7J8HTPIDK56mOCHYoquP8yctSGOgbDg8hAExO zxq4l6AbjV6VRI+EsXGEFijDX4/t5yysVp9DhHrns0brkqUz9B86AQfW0 ISiwpxTOlTooNH/TwyZ4azgzgdbZHTrQFQyq37cGBftTBnWtg9qa+WHQu wYyDhzZ3S8uSD9kbP9sOdNyuwN0j1WFRIfHChu8HXZVMTugdsSVsthEwK bvTcpklftYoaUvE+4o6jYAwGawFFokYK8oz7zUy+/hYh+5viUwMRt9jZk CrpqdCokY9Amem6CCmQeKoEV0npib5uG/UfLyL6S4OWyyftAaErNvDoNf Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="323684527" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="323684527" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 18:29:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="719613941" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="719613941" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 12 Apr 2023 18:29:23 -0700 Received: from debox1-desk4.intel.com (unknown [10.251.6.61]) by linux.intel.com (Postfix) with ESMTP id D7253580BEE; Wed, 12 Apr 2023 18:29:22 -0700 (PDT) From: "David E. Box" <david.e.box@linux.intel.com> To: david.e.box@linux.intel.com, hdegoede@redhat.com, markgross@kernel.org Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] platform/x86/intel/pmt: Ignore uninitialized entries Date: Wed, 12 Apr 2023 18:29:22 -0700 Message-Id: <20230413012922.1521377-1-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763023479268187265?= X-GMAIL-MSGID: =?utf-8?q?1763023479268187265?= |
Series |
platform/x86/intel/pmt: Ignore uninitialized entries
|
|
Commit Message
David E. Box
April 13, 2023, 1:29 a.m. UTC
On Intel Xeon, unused PMT regions will have uninitialized discovery headers
containing all 0xF. Instead of returning an error, just skip the region.
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
drivers/platform/x86/intel/pmt/telemetry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 5b309e80f457ebb41770e0122766825a78cfc11b
prerequisite-patch-id: a3bf21940fa02eb2f3adb4bd2d3a93df14df077a
Comments
On Wed, 12 Apr 2023, David E. Box wrote: > On Intel Xeon, unused PMT regions will have uninitialized discovery headers > containing all 0xF. Instead of returning an error, just skip the region. > > Signed-off-by: David E. Box <david.e.box@linux.intel.com> > --- > drivers/platform/x86/intel/pmt/telemetry.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/intel/pmt/telemetry.c b/drivers/platform/x86/intel/pmt/telemetry.c > index 71cdef42084a..39cbc87cc28a 100644 > --- a/drivers/platform/x86/intel/pmt/telemetry.c > +++ b/drivers/platform/x86/intel/pmt/telemetry.c > @@ -78,7 +78,7 @@ static int pmt_telem_header_decode(struct intel_pmt_entry *entry, > * reserved for future use. They have zero size. Do not fail > * probe for these. Just ignore them. > */ > - if (header->size == 0) > + if (header->size == 0 || header->access_type == 0xF) > return 1; > > return 0; Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Hi, On 4/13/23 12:13, Ilpo Järvinen wrote: > On Wed, 12 Apr 2023, David E. Box wrote: > >> On Intel Xeon, unused PMT regions will have uninitialized discovery headers >> containing all 0xF. Instead of returning an error, just skip the region. >> >> Signed-off-by: David E. Box <david.e.box@linux.intel.com> >> --- >> drivers/platform/x86/intel/pmt/telemetry.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/platform/x86/intel/pmt/telemetry.c b/drivers/platform/x86/intel/pmt/telemetry.c >> index 71cdef42084a..39cbc87cc28a 100644 >> --- a/drivers/platform/x86/intel/pmt/telemetry.c >> +++ b/drivers/platform/x86/intel/pmt/telemetry.c >> @@ -78,7 +78,7 @@ static int pmt_telem_header_decode(struct intel_pmt_entry *entry, >> * reserved for future use. They have zero size. Do not fail >> * probe for these. Just ignore them. >> */ >> - if (header->size == 0) >> + if (header->size == 0 || header->access_type == 0xF) >> return 1; >> >> return 0; > > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Thank you both for the patch + review, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans
diff --git a/drivers/platform/x86/intel/pmt/telemetry.c b/drivers/platform/x86/intel/pmt/telemetry.c index 71cdef42084a..39cbc87cc28a 100644 --- a/drivers/platform/x86/intel/pmt/telemetry.c +++ b/drivers/platform/x86/intel/pmt/telemetry.c @@ -78,7 +78,7 @@ static int pmt_telem_header_decode(struct intel_pmt_entry *entry, * reserved for future use. They have zero size. Do not fail * probe for these. Just ignore them. */ - if (header->size == 0) + if (header->size == 0 || header->access_type == 0xF) return 1; return 0;