public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86/intel/pmt: Ignore uninitialized entries
@ 2023-04-13  1:29 David E. Box
  2023-04-13 10:13 ` Ilpo Järvinen
  0 siblings, 1 reply; 3+ messages in thread
From: David E. Box @ 2023-04-13  1:29 UTC (permalink / raw)
  To: david.e.box, hdegoede, markgross; +Cc: platform-driver-x86, linux-kernel

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;

base-commit: 5b309e80f457ebb41770e0122766825a78cfc11b
prerequisite-patch-id: a3bf21940fa02eb2f3adb4bd2d3a93df14df077a
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86/intel/pmt: Ignore uninitialized entries
  2023-04-13  1:29 [PATCH] platform/x86/intel/pmt: Ignore uninitialized entries David E. Box
@ 2023-04-13 10:13 ` Ilpo Järvinen
  2023-04-17 10:13   ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2023-04-13 10:13 UTC (permalink / raw)
  To: David E. Box; +Cc: hdegoede, markgross, platform-driver-x86, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

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>


-- 
 i.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86/intel/pmt: Ignore uninitialized entries
  2023-04-13 10:13 ` Ilpo Järvinen
@ 2023-04-17 10:13   ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2023-04-17 10:13 UTC (permalink / raw)
  To: Ilpo Järvinen, David E. Box
  Cc: markgross, platform-driver-x86, linux-kernel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-17 10:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13  1:29 [PATCH] platform/x86/intel/pmt: Ignore uninitialized entries David E. Box
2023-04-13 10:13 ` Ilpo Järvinen
2023-04-17 10:13   ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox