From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v7 4/6] drm/xe/cper: Handle CPER allocations in atomic context
Date: Fri, 27 Nov 2026 13:33:35 -0500 [thread overview]
Message-ID: <awnM_6w4MFY6XK1q@intel.com> (raw)
In-Reply-To: <sashiko-outbox-236990@kernel.org>
On Fri, Nov 27, 2026 at 09:37:41AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] drm/xe/cper: commit message contradicts GFP_NOWAIT use in
> cper_emit_sw_err()
I addressed this with a change in the commit msg while pushing it to drm-xe-next
Thanks for the patches and reviews.
> --
>
> commit fa3585155a74f119f9e4b51f2fac71fc5b12420d
> Author: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>
> drm/xe/cper: Handle CPER allocations in atomic context
>
> This commit adds a gfp_t parameter to cper_record_emit() and updates
> cper_emit_sw_err() to allocate software CPER messages and records with
> GFP_NOWAIT instead of GFP_KERNEL.
>
> > diff --git a/drivers/gpu/drm/xe/xe_cper.c b/drivers/gpu/drm/xe/xe_cper.c
> > index 9161f2b52e9ba..10a4085d47f0a 100644
> > --- a/drivers/gpu/drm/xe/xe_cper.c
> > +++ b/drivers/gpu/drm/xe/xe_cper.c
> > @@ -183,7 +183,7 @@ static void cper_init_section_desc(struct xe_device *xe, u8 severity,
> > static void cper_record_emit(struct xe_device *xe, u8 severity,
> > const guid_t *notification_type,
> > const struct xe_cper_intel_hdr *ihdr,
> > - const void *einfo, u32 einfo_len)
> > + const void *einfo, u32 einfo_len, gfp_t gfp)
> > {
> > struct cper_section_descriptor *sdesc;
> > struct xe_cper_nonstd_record *rec;
> > @@ -191,7 +191,7 @@ static void cper_record_emit(struct xe_device *xe, u8 severity,
> > u32 total_len;
> >
> > total_len = sizeof(struct xe_cper_nonstd_record) + einfo_len;
> > - rec = kzalloc(total_len, GFP_KERNEL);
> > + rec = kzalloc(total_len, gfp);
> > if (!rec)
> > return;
> >
> > @@ -477,7 +477,7 @@ void xe_cper_emit_counter(struct xe_device *xe, int cper_sev, enum xe_sigid sigi
> > entries[i].einfo_size, &ihdr);
> >
> > cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_GPU_ERROR, &ihdr,
> > - entries[i].einfo, entries[i].einfo_size);
> > + entries[i].einfo, entries[i].einfo_size, GFP_KERNEL);
> > }
> >
> > free_info_arr(info_arr, num_entries);
> > @@ -511,7 +511,8 @@ static void cper_emit_sw_err(struct xe_device *xe, int cper_sev, enum xe_sigid s
> > char *msg;
> > size_t msg_len;
> >
> > - msg = kvasprintf(GFP_KERNEL, vaf->fmt, *vaf->va);
> > + /* TODO: Handle xe_log_* helper function for atomic context */
> > + msg = kvasprintf(GFP_NOWAIT, vaf->fmt, *vaf->va);
> > if (!msg)
> > xe_warn(xe, "Failed to allocate CPER message\n");
> >
> > @@ -525,7 +526,8 @@ static void cper_emit_sw_err(struct xe_device *xe, int cper_sev, enum xe_sigid s
> > timestamp = ktime_get_real_ns();
> >
> > cper_init_intel_hdr(xe, &error_class, timestamp, sigid, 1, msg_len, &ihdr);
> > - cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_DRV_ERROR, &ihdr, msg, msg_len);
> > + cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_DRV_ERROR, &ihdr, msg, msg_len,
> > + GFP_NOWAIT);
> > kfree(msg);
> > }
>
> [Severity: Medium]
> Does the commit message match the changes in this patch?
>
> The commit message says it adds a GFP argument to xe_cper_emit() and
> introduces xe_log_*_atomic() helpers so callers can use GFP_KERNEL or
> GFP_ATOMIC "without relying on a single GFP_NOWAIT allocation policy".
> The code instead adds the gfp_t parameter to cper_record_emit(), uses a
> single GFP_NOWAIT policy in cper_emit_sw_err(), and leaves atomic
> xe_log_*() helpers as a TODO comment.
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20261127092914.2176025-8-mallesh.koujalagi@intel.com?part=4
next prev parent reply other threads:[~2026-11-27 18:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 9:29 [PATCH v7 0/6] drm/xe/cper: Software (driver-detected) CPER error reporting Mallesh Koujalagi
2026-11-27 9:29 ` [PATCH v7 1/6] drm/xe/cper: Add software CPER emission entry point Mallesh Koujalagi
2026-11-27 9:29 ` [PATCH v7 2/6] drm/xe/cper: Prepare CPER headers for software errors Mallesh Koujalagi
2026-11-27 9:29 ` [PATCH v7 3/6] drm/xe/cper: Emit software CPER records Mallesh Koujalagi
2026-11-27 9:29 ` [PATCH v7 4/6] drm/xe/cper: Handle CPER allocations in atomic context Mallesh Koujalagi
2026-11-27 9:37 ` sashiko-bot
2026-11-27 10:25 ` Mallesh, Koujalagi
2026-11-27 18:33 ` Rodrigo Vivi [this message]
2026-11-27 17:28 ` Nilawar, Badal
2026-11-27 9:29 ` [PATCH v7 5/6] drm/xe/log: Add software CPER information to KUnit output Mallesh Koujalagi
2026-11-27 9:29 ` [PATCH v7 6/6] drm/xe/log: Test software CPER emission parameters Mallesh Koujalagi
2026-11-27 9:38 ` ✓ CI.KUnit: success for drm/xe/cper: Software (driver-detected) CPER error reporting (rev7) Patchwork
2026-11-27 10:19 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-28 1:16 ` ✓ Xe.CI.FULL: " 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=awnM_6w4MFY6XK1q@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.