On 11/25/2026 12:02 PM, Rodrigo Vivi wrote:
From: Aravind Iddamsetty <[email protected]> Add a retired-pages node type to drm-ras so drivers can report the memory pages they have taken out of service, with two operations: - get-retired-pages: dump one entry per page with its address, size and status (retired, pending or failed). The dump is flagged with NLM_F_DUMP_INTR if the list changes while it is read. - get-retired-pages-info: return the maximum number of pages that can be retired. v3 (Rodrigo+LLM): - Split the drm-ras core from the xe user. - Flatten the page attributes and name the node type retired-pages instead of retired-resources, avoiding the over-wrapping anti-pattern pointed out by Jakub: the type-specific nest and the resource-type enum are gone. - Use uint for address, size and max-pages, no pad (Jakub). - Start the status enum at 1. - Move max-pages to its own do operation instead of a leading dump entry. - Set NLM_F_DUMP_INTR from a driver generation counter. - Report unknown node IDs with NL_SET_BAD_ATTR. - Removed deprecated Assisted-by tag. v4 (Rodrigo+LLM): - Check the dump consistency once a page message is filled (Sashiko), and on the final NLMSG_DONE (local Sashiko), so NLM_F_DUMP_INTR is not lost. - Make the error-counter operations reject other node types (Sashiko). - Hold a node reference in the new handlers (local Sashiko). - Rebase on the telemetry node type, moving the type check of its handlers into drm_ras_node_get(). v5 (Rodrigo+LLM): - Split the node and callback checks in the clear-error-counter doit, and write the new handlers like the error-counter ones, with put_node labels and an inline dump loop, for consistency (Riana). - Drop node-id from the dump entries (Riana). Cc: Jakub Kicinski <[email protected]> Cc: Riana Tauro <[email protected]> Cc: Raag Jadav <[email protected]> Cc: Zack McKevitt <[email protected]> Cc: Jeff Hugo <[email protected]> Signed-off-by: Aravind Iddamsetty <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
The type check in drm_ras_node_get() looks good to me. Acked-by: Zack McKevitt <[email protected]>
