Re: [PATCH v5 0/3] EDAC: Add Xilinx XilSEM error monitoring driver

From: Yazen Ghannam

Date: Wed Nov 25 2026 - 10:50:16 EST


On Sun, Nov 22, 2026 at 07:35:21AM +0530, Rama devi Veggalam wrote:
> Add a driver for XilSEM (Xilinx Soft Error Mitigation) on Versal and
> Versal NET devices. XilSEM runs as part of the Platform Loader and
> Manager (PLM) on the PMC and monitors Configuration RAM (CRAM) and the
> NoC Programming Interface (NPI) for correctable and uncorrectable
> errors. The driver reports these errors to the EDAC core and provides
> sysfs attributes to control scans, inject CRAM errors and read status.
> It is a separate driver, matched through a single "xlnx,xilsem"
> compatible, because XilSEM is common to Versal and Versal NET. Only
> monolithic devices are supported.
>
> Note on CE reporting after a bitstream reload:
> The PLM clears the XilSEM RTCA, including the CE count, when a new
> bitstream is loaded. The driver reads the CE count to find the CEs that
> are new since its last report, and takes a count below the saved one as
> a reload. A reload is not detected if the count has already reached or
> passed the saved value when the callback runs, so the CEs up to the
> saved value are not reported, and the EDAC CE count is too low by that
> number. No CE is reported that did not happen. The RTCA does not
> indicate that a reload happened. A complete fix needs a reload counter
> in the RTCA, added in the XilSEM and PLM source, which the driver can
> compare. This driver is not changed for it.
>
> Note on xlnx_unregister_event():
> xsem_edac_remove() unregisters the event and then frees its state, which
> is the normal sequence for an event manager client. It is only safe if
> xlnx_unregister_event() does not return while a callback is still
> running on another CPU, and the event manager does not guarantee that
> today: it walks its callback list from the SGI handler without RCU or a
> lock. The missing wait belongs in the event manager, where one fix
> covers every client, so this driver is not changed. A fix in the event
> manager is planned. Until it lands, unbinding the driver while error
> events are being raised is not safe. The probe path is not affected,
> because the event is registered as the last step of probe.
>
> This series contains:
> - A new devicetree binding for the "xlnx,xilsem" compatible.
> - The firmware (EEMI) interface and the XilSEM error event node IDs
> and masks.
> - The EDAC driver, with its sysfs ABI documentation in the same patch.
>
> Changes in v5:
> - Moved the XilSEM binding out of the Versal DDRMC EDAC yaml into its
> own xilsem yaml, with a single "xlnx,xilsem" compatible.
> - Moved the driver out of versal_edac.c into a separate xilsem_edac
> driver.
> - Limited support to monolithic devices and documented it in the binding
> and ABI.
> - Added the xlnx_unregister_event() and CE reload notes above.
> - Added the L: linux-edac entry to MAINTAINERS.
>
> Rama devi Veggalam (3):
> dt-bindings: edac: Add Xilinx XilSEM
> firmware: xilinx: Add XilSEM firmware interface
> edac: Add Xilinx XilSEM error monitoring driver
>

Hi Rama,

Did you look into the "platform driver" idea?

If so, how did it compare to this DT solution?

Thanks,
Yazen