From 2ef84d3b73a44dedeefee08672226e1bf9c6eb81 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Mon, 17 Nov 2025 11:29:04 +0100 Subject: [PATCH] uefi-loong64-6.18: rewrite patches against v6.18-rc6, no changes - this was actually pending back from v6.18-rc2 --- ...ignment-with-non-4KiB-kernel-page-si.patch | 8 ++--- ...guc-use-GUC_SIZE-SZ_4K-for-alignment.patch | 34 +++++++++---------- ...-use-4KiB-alignment-for-cursor-jumps.patch | 4 +-- ...-PAGE_SIZE-as-the-minimum-page-align.patch | 4 +-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/patch/kernel/archive/uefi-loong64-6.18/0001-drm-xe-bo-fix-alignment-with-non-4KiB-kernel-page-si.patch b/patch/kernel/archive/uefi-loong64-6.18/0001-drm-xe-bo-fix-alignment-with-non-4KiB-kernel-page-si.patch index 9d4ac50edf..c690085c7a 100644 --- a/patch/kernel/archive/uefi-loong64-6.18/0001-drm-xe-bo-fix-alignment-with-non-4KiB-kernel-page-si.patch +++ b/patch/kernel/archive/uefi-loong64-6.18/0001-drm-xe-bo-fix-alignment-with-non-4KiB-kernel-page-si.patch @@ -95,14 +95,14 @@ Co-developed-by: Shang Yatsen <429839446@qq.com> Signed-off-by: Shang Yatsen <429839446@qq.com> Signed-off-by: Mingcong Bai --- - drivers/gpu/drm/xe/xe_bo.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + drivers/gpu/drm/xe/xe_bo.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c index 111111111111..222222222222 100644 --- a/drivers/gpu/drm/xe/xe_bo.c +++ b/drivers/gpu/drm/xe/xe_bo.c -@@ -1841,9 +1841,9 @@ struct xe_bo *___xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo, +@@ -2129,9 +2129,9 @@ struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo, flags |= XE_BO_FLAG_INTERNAL_64K; alignment = align >> PAGE_SHIFT; } else { @@ -114,7 +114,7 @@ index 111111111111..222222222222 100644 } if (type == ttm_bo_type_device && aligned_size != size) -@@ -1868,7 +1868,7 @@ struct xe_bo *___xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo, +@@ -2155,7 +2155,7 @@ struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo, #endif INIT_LIST_HEAD(&bo->vram_userfault_link); diff --git a/patch/kernel/archive/uefi-loong64-6.18/0002-drm-xe-guc-use-GUC_SIZE-SZ_4K-for-alignment.patch b/patch/kernel/archive/uefi-loong64-6.18/0002-drm-xe-guc-use-GUC_SIZE-SZ_4K-for-alignment.patch index fcae7dff6b..bdaa8dc051 100644 --- a/patch/kernel/archive/uefi-loong64-6.18/0002-drm-xe-guc-use-GUC_SIZE-SZ_4K-for-alignment.patch +++ b/patch/kernel/archive/uefi-loong64-6.18/0002-drm-xe-guc-use-GUC_SIZE-SZ_4K-for-alignment.patch @@ -64,7 +64,7 @@ diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c index 111111111111..222222222222 100644 --- a/drivers/gpu/drm/xe/xe_guc.c +++ b/drivers/gpu/drm/xe/xe_guc.c -@@ -90,7 +90,7 @@ static u32 guc_ctl_feature_flags(struct xe_guc *guc) +@@ -95,7 +95,7 @@ static u32 guc_ctl_feature_flags(struct xe_guc *guc) static u32 guc_ctl_log_params_flags(struct xe_guc *guc) { @@ -73,7 +73,7 @@ index 111111111111..222222222222 100644 u32 flags; #if (((CRASH_BUFFER_SIZE) % SZ_1M) == 0) -@@ -143,7 +143,7 @@ static u32 guc_ctl_log_params_flags(struct xe_guc *guc) +@@ -140,7 +140,7 @@ static u32 guc_ctl_log_params_flags(struct xe_guc *guc) static u32 guc_ctl_ads_flags(struct xe_guc *guc) { @@ -100,7 +100,7 @@ diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c index 111111111111..222222222222 100644 --- a/drivers/gpu/drm/xe/xe_guc_ads.c +++ b/drivers/gpu/drm/xe/xe_guc_ads.c -@@ -143,17 +143,17 @@ static size_t guc_ads_regset_size(struct xe_guc_ads *ads) +@@ -144,17 +144,17 @@ static size_t guc_ads_regset_size(struct xe_guc_ads *ads) static size_t guc_ads_golden_lrc_size(struct xe_guc_ads *ads) { @@ -121,7 +121,7 @@ index 111111111111..222222222222 100644 } static size_t guc_ads_um_queues_size(struct xe_guc_ads *ads) -@@ -168,7 +168,7 @@ static size_t guc_ads_um_queues_size(struct xe_guc_ads *ads) +@@ -169,7 +169,7 @@ static size_t guc_ads_um_queues_size(struct xe_guc_ads *ads) static size_t guc_ads_private_data_size(struct xe_guc_ads *ads) { @@ -130,7 +130,7 @@ index 111111111111..222222222222 100644 } static size_t guc_ads_regset_offset(struct xe_guc_ads *ads) -@@ -183,7 +183,7 @@ static size_t guc_ads_golden_lrc_offset(struct xe_guc_ads *ads) +@@ -184,7 +184,7 @@ static size_t guc_ads_golden_lrc_offset(struct xe_guc_ads *ads) offset = guc_ads_regset_offset(ads) + guc_ads_regset_size(ads); @@ -139,7 +139,7 @@ index 111111111111..222222222222 100644 } static size_t guc_ads_waklv_offset(struct xe_guc_ads *ads) -@@ -193,7 +193,7 @@ static size_t guc_ads_waklv_offset(struct xe_guc_ads *ads) +@@ -194,7 +194,7 @@ static size_t guc_ads_waklv_offset(struct xe_guc_ads *ads) offset = guc_ads_golden_lrc_offset(ads) + guc_ads_golden_lrc_size(ads); @@ -148,7 +148,7 @@ index 111111111111..222222222222 100644 } static size_t guc_ads_capture_offset(struct xe_guc_ads *ads) -@@ -203,7 +203,7 @@ static size_t guc_ads_capture_offset(struct xe_guc_ads *ads) +@@ -204,7 +204,7 @@ static size_t guc_ads_capture_offset(struct xe_guc_ads *ads) offset = guc_ads_waklv_offset(ads) + guc_ads_waklv_size(ads); @@ -157,7 +157,7 @@ index 111111111111..222222222222 100644 } static size_t guc_ads_um_queues_offset(struct xe_guc_ads *ads) -@@ -213,7 +213,7 @@ static size_t guc_ads_um_queues_offset(struct xe_guc_ads *ads) +@@ -214,7 +214,7 @@ static size_t guc_ads_um_queues_offset(struct xe_guc_ads *ads) offset = guc_ads_capture_offset(ads) + guc_ads_capture_size(ads); @@ -166,7 +166,7 @@ index 111111111111..222222222222 100644 } static size_t guc_ads_private_data_offset(struct xe_guc_ads *ads) -@@ -223,7 +223,7 @@ static size_t guc_ads_private_data_offset(struct xe_guc_ads *ads) +@@ -224,7 +224,7 @@ static size_t guc_ads_private_data_offset(struct xe_guc_ads *ads) offset = guc_ads_um_queues_offset(ads) + guc_ads_um_queues_size(ads); @@ -175,7 +175,7 @@ index 111111111111..222222222222 100644 } static size_t guc_ads_size(struct xe_guc_ads *ads) -@@ -276,7 +276,7 @@ static size_t calculate_golden_lrc_size(struct xe_guc_ads *ads) +@@ -277,7 +277,7 @@ static size_t calculate_golden_lrc_size(struct xe_guc_ads *ads) continue; real_size = xe_gt_lrc_size(gt, class); @@ -184,7 +184,7 @@ index 111111111111..222222222222 100644 total_size += alloc_size; } -@@ -646,12 +646,12 @@ static int guc_capture_prep_lists(struct xe_guc_ads *ads) +@@ -628,12 +628,12 @@ static int guc_capture_prep_lists(struct xe_guc_ads *ads) offsetof(struct __guc_ads_blob, system_info)); /* first, set aside the first page for a capture_list with zero descriptors */ @@ -199,7 +199,7 @@ index 111111111111..222222222222 100644 /* * Populate capture list : at this point adps is already allocated and -@@ -715,10 +715,10 @@ static int guc_capture_prep_lists(struct xe_guc_ads *ads) +@@ -697,10 +697,10 @@ static int guc_capture_prep_lists(struct xe_guc_ads *ads) } } @@ -213,7 +213,7 @@ index 111111111111..222222222222 100644 } static void guc_mmio_regset_write_one(struct xe_guc_ads *ads, -@@ -966,7 +966,7 @@ static void guc_golden_lrc_populate(struct xe_guc_ads *ads) +@@ -948,7 +948,7 @@ static void guc_golden_lrc_populate(struct xe_guc_ads *ads) xe_gt_assert(gt, gt->default_lrc[class]); real_size = xe_gt_lrc_size(gt, class); @@ -259,8 +259,8 @@ diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c index 111111111111..222222222222 100644 --- a/drivers/gpu/drm/xe/xe_guc_ct.c +++ b/drivers/gpu/drm/xe/xe_guc_ct.c -@@ -214,7 +214,7 @@ int xe_guc_ct_init(struct xe_guc_ct *ct) - struct xe_bo *bo; +@@ -224,7 +224,7 @@ int xe_guc_ct_init_noalloc(struct xe_guc_ct *ct) + struct xe_gt *gt = ct_to_gt(ct); int err; - xe_gt_assert(gt, !(guc_ct_size() % PAGE_SIZE)); @@ -302,7 +302,7 @@ diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index 111111111111..222222222222 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c -@@ -1190,7 +1190,7 @@ int xe_guc_pc_start(struct xe_guc_pc *pc) +@@ -1239,7 +1239,7 @@ int xe_guc_pc_start(struct xe_guc_pc *pc) { struct xe_device *xe = pc_to_xe(pc); struct xe_gt *gt = pc_to_gt(pc); @@ -311,7 +311,7 @@ index 111111111111..222222222222 100644 unsigned int fw_ref; ktime_t earlier; int ret; -@@ -1318,7 +1318,7 @@ int xe_guc_pc_init(struct xe_guc_pc *pc) +@@ -1372,7 +1372,7 @@ int xe_guc_pc_init(struct xe_guc_pc *pc) struct xe_tile *tile = gt_to_tile(gt); struct xe_device *xe = gt_to_xe(gt); struct xe_bo *bo; diff --git a/patch/kernel/archive/uefi-loong64-6.18/0004-drm-xe-use-4KiB-alignment-for-cursor-jumps.patch b/patch/kernel/archive/uefi-loong64-6.18/0004-drm-xe-use-4KiB-alignment-for-cursor-jumps.patch index eb0f22d2e4..a4b8eb49ad 100644 --- a/patch/kernel/archive/uefi-loong64-6.18/0004-drm-xe-use-4KiB-alignment-for-cursor-jumps.patch +++ b/patch/kernel/archive/uefi-loong64-6.18/0004-drm-xe-use-4KiB-alignment-for-cursor-jumps.patch @@ -98,7 +98,7 @@ diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index 111111111111..222222222222 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c -@@ -592,7 +592,7 @@ static void emit_pte(struct xe_migrate *m, +@@ -617,7 +617,7 @@ static void emit_pte(struct xe_migrate *m, u64 addr, flags = 0; bool devmem = false; @@ -107,7 +107,7 @@ index 111111111111..222222222222 100644 if (is_vram) { if (vm->flags & XE_VM_FLAG_64K) { u64 va = cur_ofs * XE_PAGE_SIZE / 8; -@@ -613,7 +613,7 @@ static void emit_pte(struct xe_migrate *m, +@@ -638,7 +638,7 @@ static void emit_pte(struct xe_migrate *m, bb->cs[bb->len++] = lower_32_bits(addr); bb->cs[bb->len++] = upper_32_bits(addr); diff --git a/patch/kernel/archive/uefi-loong64-6.18/0005-drm-xe-query-use-PAGE_SIZE-as-the-minimum-page-align.patch b/patch/kernel/archive/uefi-loong64-6.18/0005-drm-xe-query-use-PAGE_SIZE-as-the-minimum-page-align.patch index a55a8ef73c..df676a3721 100644 --- a/patch/kernel/archive/uefi-loong64-6.18/0005-drm-xe-query-use-PAGE_SIZE-as-the-minimum-page-align.patch +++ b/patch/kernel/archive/uefi-loong64-6.18/0005-drm-xe-query-use-PAGE_SIZE-as-the-minimum-page-align.patch @@ -31,7 +31,7 @@ diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c index 111111111111..222222222222 100644 --- a/drivers/gpu/drm/xe/xe_query.c +++ b/drivers/gpu/drm/xe/xe_query.c -@@ -346,7 +346,7 @@ static int query_config(struct xe_device *xe, struct drm_xe_device_query *query) +@@ -345,7 +345,7 @@ static int query_config(struct xe_device *xe, struct drm_xe_device_query *query) config->info[DRM_XE_QUERY_CONFIG_FLAGS] |= DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY; config->info[DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT] = @@ -44,7 +44,7 @@ diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h index 111111111111..222222222222 100644 --- a/include/uapi/drm/xe_drm.h +++ b/include/uapi/drm/xe_drm.h -@@ -397,8 +397,11 @@ struct drm_xe_query_mem_regions { +@@ -403,8 +403,11 @@ struct drm_xe_query_mem_regions { * has low latency hint support * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR - Flag is set if the * device has CPU address mirroring support