All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tauro, Riana" <riana.tauro@intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v1] drm/xe/ras: Distinguish between detailed and aggregate counters
Date: Mon, 23 Nov 2026 13:47:07 +0530	[thread overview]
Message-ID: <7ff7a5d5-a29f-4e9c-bdad-64023cbac3a4@intel.com> (raw)
In-Reply-To: <awPzSlWM4ZiZtGBN@black.igk.intel.com>


On 23-11-2026 13:33, Raag Jadav wrote:
> On Mon, Nov 23, 2026 at 12:16:24PM +0530, Tauro, Riana wrote:
>> On 02-11-2026 14:34, Raag Jadav wrote:
>>> xe_ras_get_counter_response() only logs counter value, severity and
>>> component. Also log the type of counter for easier debugging.
>>>
>>> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
>>> ---
>>>    drivers/gpu/drm/xe/xe_ras.c | 9 +++++++--
>>>    1 file changed, 7 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
>>> index 2c01c183d02b..381ea19a8b4a 100644
>>> --- a/drivers/gpu/drm/xe/xe_ras.c
>>> +++ b/drivers/gpu/drm/xe/xe_ras.c
>>> @@ -772,7 +772,9 @@ int xe_ras_get_counter_response(struct xe_device *xe, const struct xe_ras_error_
>>>    {
>>>    	struct xe_ras_get_counter_request request = {0};
>>>    	struct xe_sysctrl_mailbox_command command = {0};
>>> +	const struct xe_ras_error_product product = {0};
>>>    	struct xe_ras_error_common *common;
>>> +	bool detailed;
>>>    	size_t rlen;
>>>    	int ret;
>>> @@ -798,8 +800,11 @@ int xe_ras_get_counter_response(struct xe_device *xe, const struct xe_ras_error_
>>>    	common = &response->counter.common;
>>> -	xe_dbg(xe, "[RAS]: get counter %u for %s %s\n", response->value,
>>> -	       comp_to_str(common->component), sev_to_str(common->severity));
>>> +	BUILD_BUG_ON(sizeof(*counter) != sizeof(counter->common) + sizeof(counter->product));
>> Why do we need this? This is already common+product and passed by caller.
> Can you guarantee that counter layout will remain unchanged forever?

That would be applicable for all structs and fields.  This is not 
checking response. Seems unnecessary.

Thanks
Riana

>
> Raag
>
>>> +	detailed = memcmp(&response->counter.product, &product, sizeof(product));
>>> +
>>> +	xe_dbg(xe, "[RAS]: get %s counter %u for %s %s\n", detailed ? "detailed" : "aggregate",
>>> +	       response->value, comp_to_str(common->component), sev_to_str(common->severity));
>>>    	return 0;
>>>    }

      reply	other threads:[~2026-11-23  8:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  9:04 [PATCH v1] drm/xe/ras: Distinguish between detailed and aggregate counters Raag Jadav
2026-11-02  9:32 ` ✓ CI.KUnit: success for " Patchwork
2026-11-02 10:06 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-11-02 10:37 ` ✗ Xe.CI.FULL: " Patchwork
2026-11-03  6:16 ` ✓ CI.KUnit: success for drm/xe/ras: Distinguish between detailed and aggregate counters (rev2) Patchwork
2026-11-03  6:49 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-03 11:55 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-23  6:46 ` [PATCH v1] drm/xe/ras: Distinguish between detailed and aggregate counters Tauro, Riana
2026-11-23  8:03   ` Raag Jadav
2026-11-23  8:17     ` Tauro, Riana [this message]

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=7ff7a5d5-a29f-4e9c-bdad-64023cbac3a4@intel.com \
    --to=riana.tauro@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=raag.jadav@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.