From ac679a6e0fccab0e30ea04c97a3a0713b8b722ae Mon Sep 17 00:00:00 2001 From: Yury Norov Date: Sun, 1 Mar 2026 20:11:58 -0500 Subject: [PATCH] drm/xe: switch xe_pagefault_queue_init() to using bitmap_weighted_or() The function calls bitmap_or() immediately followed by bitmap_weight(). Switch to using the dedicated bitmap_weighted_or() and save one bitmap traverse. Reviewed-by: Matthew Brost Reviewed-by: Aleksandr Loktionov Reviewed-by: Jacob Keller Signed-off-by: Yury Norov --- drivers/gpu/drm/xe/xe_pagefault.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_pagefault.c b/drivers/gpu/drm/xe/xe_pagefault.c index 6bee53d6ffc3..c4ce3cfe2164 100644 --- a/drivers/gpu/drm/xe/xe_pagefault.c +++ b/drivers/gpu/drm/xe/xe_pagefault.c @@ -285,10 +285,9 @@ static int xe_pagefault_queue_init(struct xe_device *xe, xe_dss_mask_t all_dss; int num_dss, num_eus; - bitmap_or(all_dss, gt->fuse_topo.g_dss_mask, + num_dss = bitmap_weighted_or(all_dss, gt->fuse_topo.g_dss_mask, gt->fuse_topo.c_dss_mask, XE_MAX_DSS_FUSE_BITS); - num_dss = bitmap_weight(all_dss, XE_MAX_DSS_FUSE_BITS); num_eus = bitmap_weight(gt->fuse_topo.eu_mask_per_dss, XE_MAX_EU_FUSE_BITS) * num_dss;