Re: [PATCH v4 7/7] drm/xe/sysctrl: Report 'System Controller event' error using SIGID

Michal Wajdeczko <[email protected]>
Newsgroups org.freedesktop.lists.intel-xe
Message-ID <[email protected]>

On 8/20/2026 12:16 PM, Mallesh Koujalagi wrote:
> Report 'System Controller event' error using xe_log() helpers.
> 
> Signed-off-by: Mallesh Koujalagi <[email protected]>
> ---
>  drivers/gpu/drm/xe/xe_sysctrl_event.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_event.c b/drivers/gpu/drm/xe/xe_sysctrl_event.c
> index da395148ee9d..29d6fedd95d9 100644
> --- a/drivers/gpu/drm/xe/xe_sysctrl_event.c
> +++ b/drivers/gpu/drm/xe/xe_sysctrl_event.c
> @@ -4,6 +4,7 @@
>   */
>  
>  #include "xe_device.h"
> +#include "xe_log.h"

wrong order?

>  #include "xe_irq.h"
>  #include "xe_printk.h"
>  #include "xe_ras.h"
> @@ -25,23 +26,26 @@ static void get_pending_event(struct xe_sysctrl *sc, struct xe_sysctrl_mailbox_c
>  
>  		ret = xe_sysctrl_send_command(sc, command, &len);
>  		if (ret) {
> -			xe_err(xe, "sysctrl: failed to get pending event %d\n", ret);
> +			xe_log_err(xe, SYSCTRL, ret, "Failed to get pending event\n");
>  			return;
>  		}
>  
>  		if (len != sizeof(*response)) {
> -			xe_err(xe, "sysctrl: unexpected event response length %zu (expected %zu)\n",
> -			       len, sizeof(*response));
> +			xe_log_err(xe, SYSCTRL, -EMSGSIZE,
> +				   "Unexpected event response length %zu (expected %zu)\n",
> +				   len, sizeof(*response));
>  			return;
>  		}
>  
>  		if (response->event == XE_SYSCTRL_EVENT_THRESHOLD_CROSSED)
>  			xe_ras_counter_threshold_crossed(xe, response);
>  		else
> -			xe_warn(xe, "sysctrl: unexpected event %#x\n", response->event);
> +			xe_log_err_info(xe, SYSCTRL, -EPROTO,
> +					"Unexpected event %#x\n", response->event);
>  
>  		if (!--count) {
> -			xe_err(xe, "sysctrl: event flooding\n");
> +			xe_log_err(xe, SYSCTRL, -EOVERFLOW,

maybe

	#define	ENOTEMPTY	39	/* Directory not empty */
or
	#define	EXFULL		54	/* Exchange full */

> +				   "Event flooding: response count=%u\n", response->count);

and something like:

	"Ignored #u events due to flooding\n

>  			return;
>  		}
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.