#include "xe_guc_submit.h"
#include "xe_guc_tlb_inval.h"
#include "xe_map.h"
+#include "xe_page_reclaim.h"
#include "xe_pm.h"
#include "xe_sleep.h"
#include "xe_sriov_vf.h"
ret = xe_guc_pagefault_handler(guc, payload, adj_len);
break;
case XE_GUC_ACTION_TLB_INVALIDATION_DONE:
- case XE_GUC_ACTION_PAGE_RECLAMATION_DONE:
- /*
- * Page reclamation is an extension of TLB invalidation. Both
- * operations share the same seqno and fence. When either
- * action completes, we need to signal the corresponding
- * fence. Since the handling logic (lookup fence by seqno,
- * fence signalling) is identical, we use the same handler
- * for both G2H events.
- */
ret = xe_guc_tlb_inval_done_handler(guc, payload, adj_len);
break;
+ case XE_GUC_ACTION_PAGE_RECLAMATION_DONE:
+ ret = xe_guc_page_reclaim_done_handler(guc, payload, adj_len);
+ break;
case XE_GUC_ACTION_GUC2PF_RELAY_FROM_VF:
ret = xe_guc_relay_process_guc2pf(&guc->relay, hxg, hxg_len);
break;
ret = xe_guc_pagefault_handler(guc, payload, adj_len);
break;
case XE_GUC_ACTION_TLB_INVALIDATION_DONE:
- case XE_GUC_ACTION_PAGE_RECLAMATION_DONE:
- /*
- * Seqno and fence handling of page reclamation and TLB
- * invalidation is identical, so we can use the same handler
- * for both actions.
- */
__g2h_release_space(ct, len);
ret = xe_guc_tlb_inval_done_handler(guc, payload, adj_len);
break;
+ case XE_GUC_ACTION_PAGE_RECLAMATION_DONE:
+ __g2h_release_space(ct, len);
+ ret = xe_guc_page_reclaim_done_handler(guc, payload, adj_len);
+ break;
default:
xe_gt_warn(gt, "NOT_POSSIBLE\n");
}
#include "xe_page_reclaim.h"
#include "xe_gt_stats.h"
+#include "xe_guc_tlb_inval.h"
#include "xe_macros.h"
#include "xe_pat.h"
#include "xe_sa.h"
return page ? 0 : -ENOMEM;
}
+
+/**
+ * xe_guc_page_reclaim_done_handler() - Page reclaim done handler
+ * @guc: guc
+ * @msg: message indicating page reclamation done
+ * @len: length of message
+ *
+ * Page reclamation is an extension of TLB invalidation. Both
+ * operations share the same seqno and fence. When either
+ * action completes, we need to signal the corresponding
+ * fence. Since the handling logic is currently identical, this
+ * function delegates to the TLB invalidation handler.
+ *
+ * Return: 0 on success, -EPROTO for malformed messages.
+ */
+int xe_guc_page_reclaim_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
+{
+ return xe_guc_tlb_inval_done_handler(guc, msg, len);
+}