Re: [PATCH v2 07/11] drm/xe/xe_ras: Add structures and commands for Uncorrectable Core Compute Errors

Raag Jadav
2026-04-01T06:25:24Z

On Tue, Mar 31, 2026 at 09:44:10PM +0530, Tauro, Riana wrote:
> On 3/4/2026 10:02 PM, Raag Jadav wrote:
> > On Mon, Mar 02, 2026 at 03:52:02PM +0530, Riana Tauro wrote:
> > > Add the sysctrl commands and response structures for Uncorrectable
> > > Core Compute errors.
> > ...
> >
> > > +static inline const char *severity_to_str(struct xe_device *xe, u32 severity)
> > > +{
> > > + if (severity >= XE_RAS_SEVERITY_MAX)
> > > + return "Unknown Severity";
> > > +
> > > + return xe_ras_severities[severity];
> > Rather,
> >
> > return sev < XE_RAS_SEV_MAX ? xe_ras_severities[sev] : "Unknown";
> I can make this change
> >
> > and since this should ideally never happen, I'd also add a
> >
> > xe_assert(xe, sev < XE_RAS_SEV_MAX);
> This is only used in debug builds.

Exactly, we need a splat on out of spec behaviours in debug builds.

Raag

> Won't be useful anyway..
>
> Thanks
> Riana
> > > +}
> > > +
> > > +static inline const char *comp_to_str(struct xe_device *xe, u32 comp)
> > > +{
> > > + if (comp >= XE_RAS_COMPONENT_MAX)
> > > + return "Unknown Component";
> > > +
> > > + return xe_ras_components[comp];
> > Ditto.
> >
> > Raag
> >
> > > +}