Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Box <david.e.box@linux.intel.com>
To: "Michael J. Ruhl" <michael.j.ruhl@intel.com>
Cc: platform-driver-x86@vger.kernel.org,
	intel-xe@lists.freedesktop.org,  hansg@kernel.org,
	ilpo.jarvinen@linux.intel.com, matthew.brost@intel.com,
	 rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com,
	airlied@gmail.com,  simona@ffwll.ch, anoop.c.vijay@intel.com,
	badal.nilawar@intel.com,  matthew.d.roper@intel.com,
	james.ausmus@intel.com
Subject: Re: [PATCH v20 02/19] platform/x86/intel/pmt: Use the pre-populated header info for crashlog
Date: Fri, 20 Nov 2026 10:48:39 -0800	[thread overview]
Message-ID: <awCVscE42LSfgCol@debox1-desk4> (raw)
In-Reply-To: <20261120021929.473553-23-michael.j.ruhl@intel.com>

On Thu, Nov 19, 2026 at 06:19:32PM -0800, Michael J. Ruhl wrote:
> Crashlog reads discovery data directly from the discovery table.
> 
> For parents that provide a read_discovery callback, this data may
> not be readable with this method.
> 
> Update to use the pre-populated discovery data (disc_header), rather
> than reading directly (disc_table) for probe.
> 
> Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
> ---
>  drivers/platform/x86/intel/pmt/crashlog.c | 24 +++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/pmt/crashlog.c b/drivers/platform/x86/intel/pmt/crashlog.c
> index d7018b495217..e2af09732dd6 100644
> --- a/drivers/platform/x86/intel/pmt/crashlog.c
> +++ b/drivers/platform/x86/intel/pmt/crashlog.c
> @@ -27,10 +27,10 @@
>  #define CRASH_TYPE_OOBMSM	1
>  
>  /* Crashlog Discovery Header */
> -#define CONTROL_OFFSET		0x0
> -#define GUID_OFFSET		0x4
> -#define BASE_OFFSET		0x8
> -#define SIZE_OFFSET		0xC
> +#define ACCESS_IDX		0
> +#define GUID_IDX		1
> +#define BASE_IDX		2
> +#define SIZE_IDX		3
>  #define GET_ACCESS(v)		((v) & GENMASK(3, 0))
>  #define GET_TYPE(v)		(((v) & GENMASK(7, 4)) >> 4)
>  #define GET_VERSION(v)		(((v) & GENMASK(19, 16)) >> 16)
> @@ -208,10 +208,10 @@ static int pmt_crashlog_disabled(struct crashlog_entry *crashlog, bool *state)
>  
>  static bool pmt_crashlog_supported(struct intel_pmt_entry *entry, u32 *crash_type, u32 *version)
>  {
> -	u32 discovery_header = readl(entry->disc_table + CONTROL_OFFSET);
> +	u32 *disc_header = entry->disc_header;
>  
> -	*crash_type = GET_TYPE(discovery_header);
> -	*version = GET_VERSION(discovery_header);
> +	*crash_type = GET_TYPE(disc_header[ACCESS_IDX]);
> +	*version = GET_VERSION(disc_header[ACCESS_IDX]);
>  
>  	/*
>  	 * Currently we only recognize OOBMSM (type 1) and version 0 or 2
> @@ -608,15 +608,15 @@ static int pmt_crashlog_pre_decode(struct intel_vsec_device *ivdev,
>  static int pmt_crashlog_header_decode(struct intel_pmt_entry *entry,
>  				      struct device *dev)
>  {
> -	void __iomem *disc_table = entry->disc_table;
>  	struct intel_pmt_header *header = &entry->header;
> +	u32 *disc_header = entry->disc_header;
>  
> -	header->access_type = GET_ACCESS(readl(disc_table));
> -	header->guid = readl(disc_table + GUID_OFFSET);
> -	header->base_offset = readl(disc_table + BASE_OFFSET);
> +	header->access_type = GET_ACCESS(disc_header[ACCESS_IDX]);
> +	header->guid = disc_header[GUID_IDX];
> +	header->base_offset = disc_header[BASE_IDX];
>  
>  	/* Size is measured in DWORDS, but accessor returns bytes */
> -	header->size = GET_SIZE(readl(disc_table + SIZE_OFFSET));
> +	header->size = GET_SIZE(disc_header[SIZE_IDX]);
>  
>  	return 0;
>  }
> -- 
> 2.43.0
> 
> 
Reviewed-by: David E. Box <david.e.box@linux.intel.com>

  reply	other threads:[~2026-11-20 18:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  2:19 [PATCH v20 00/19] Crescent Island PMT support Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 01/19] platform/x86/intel/pmt: Introduce a callback for discovery data Michael J. Ruhl
2026-11-20 18:46   ` David Box
2026-11-20  2:19 ` [PATCH v20 02/19] platform/x86/intel/pmt: Use the pre-populated header info for crashlog Michael J. Ruhl
2026-11-20 18:48   ` David Box [this message]
2026-11-20  2:19 ` [PATCH v20 03/19] drm/xe/vsec: VSEC requires soc-remapper Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 04/19] drm/xe/vsec: Do not register BMG PMT for VF Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 05/19] drm/xe/vsec: Correct locking order Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 06/19] drm/xe/vsec: Use correct pm state get Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 07/19] drm/xe/vsec: Add DOC text for VSEC Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 08/19] drm/xe/vsec: Support possible hotplug exit Michael J. Ruhl
2026-11-20  2:30   ` sashiko-bot
2026-11-20  2:19 ` [PATCH v20 09/19] drm/xe/vsec: Refactor BattleMage PMT defines Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 10/19] drm/xe/vsec: Update VSEC probe order Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 11/19] drm/xe/vsec: Add base_offset to allow for more flexibilty Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 12/19] drm/xe/vsec: Support Crescent Island PMT Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 13/19] drm/xe/vsec: Crescent Island PMT decode Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 14/19] drm/xe/vsec: Crescent Island PMT callbacks Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 15/19] drm/xe/vsec: Support late bind fw information Michael J. Ruhl
2026-11-20  2:44   ` sashiko-bot
2026-11-20  2:19 ` [PATCH v20 16/19] drm/xe/vsec: Add PMT GUID internal access Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 17/19] drm/xe/vsec: Update PMT " Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 18/19] drm/xe/vsec: Refactor platform check Michael J. Ruhl
2026-11-20  2:19 ` [PATCH v20 19/19] drm/xe/vsec: Support survivability mode for CRI Michael J. Ruhl
2026-11-20  5:31 ` ✗ CI.checkpatch: warning for Crescent Island PMT support (rev21) Patchwork
2026-11-20  5:33 ` ✓ CI.KUnit: success " Patchwork
2026-11-20  6:09 ` ✓ Xe.CI.BAT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awCVscE42LSfgCol@debox1-desk4 \
    --to=david.e.box@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=anoop.c.vijay@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=james.ausmus@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=michael.j.ruhl@intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox