Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/xe/pt: Warn on 0 level before going to next lower level
Date: Mon, 18 Mar 2024 16:41:37 -0400	[thread overview]
Message-ID: <ZfinAR6OlL7OzrbU@intel.com> (raw)
In-Reply-To: <20240318173744.6301-1-nirmoy.das@intel.com>

On Mon, Mar 18, 2024 at 06:37:44PM +0100, Nirmoy Das wrote:
> This should happen so add a warn_on to be more paranoid.

should or should not?

> 
> Cc: Matthew Auld <matthew.auld@intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_pt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
> index 7f54bc3e389d..d6794f65d6c1 100644
> --- a/drivers/gpu/drm/xe/xe_pt.c
> +++ b/drivers/gpu/drm/xe/xe_pt.c
> @@ -731,6 +731,7 @@ static int xe_pt_zap_ptes_entry(struct xe_ptw *parent, pgoff_t offset,
>  	pgoff_t end_offset;
>  
>  	XE_WARN_ON(!*child);
> +	XE_WARN_ON(!level);
>  	XE_WARN_ON(!level && xe_child->is_compact);
>  
>  	/*
> @@ -1396,6 +1397,7 @@ static int xe_pt_stage_unbind_entry(struct xe_ptw *parent, pgoff_t offset,
>  	struct xe_pt *xe_child = container_of(*child, typeof(*xe_child), base);
>  
>  	XE_WARN_ON(!*child);
> +	XE_WARN_ON(!level);
>  	XE_WARN_ON(!level && xe_child->is_compact);
>  
>  	xe_pt_check_kill(addr, next, level - 1, xe_child, action, walk);
> -- 
> 2.42.0
> 

  reply	other threads:[~2024-03-18 20:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 17:37 [PATCH] drm/xe/pt: Warn on 0 level before going to next lower level Nirmoy Das
2024-03-18 20:41 ` Rodrigo Vivi [this message]
2024-03-19  9:25   ` Matthew Auld
2024-03-19  9:36     ` Nirmoy Das
2024-03-18 23:31 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-18 23:31 ` ✓ CI.checkpatch: " Patchwork
2024-03-18 23:32 ` ✓ CI.KUnit: " Patchwork
2024-03-18 23:43 ` ✓ CI.Build: " Patchwork
2024-03-18 23:45 ` ✓ CI.Hooks: " Patchwork
2024-03-18 23:47 ` ✓ CI.checksparse: " Patchwork
2024-03-19  0:08 ` ✓ 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=ZfinAR6OlL7OzrbU@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=nirmoy.das@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