mali-driver: change the WARN info [1/1]
authorDezhi Kong <dezhi.kong@amlogic.com>
Mon, 1 Feb 2021 10:52:00 +0000 (18:52 +0800)
committerDezhi Kong <dezhi.kong@amlogic.com>
Thu, 4 Feb 2021 11:03:18 +0000 (19:03 +0800)
PD#SWPL-42494

Problem:
two may debug info result in crash reboot

Solution:
change the WARN_ON TO WARN_ONCE

Verify:
ah212

Change-Id: Ie5941ab1465f1196efb128295b5a6a90b6f423e8
Signed-off-by: Dezhi Kong <dezhi.kong@amlogic.com>
dvalin/kernel/drivers/gpu/arm/midgard/mmu/mali_kbase_mmu.c

index db27832bf2516e35950c752fbf6fd2dfb5054d7a..c2c7c4b419422b830f83d7637861f5aacee78993 100644 (file)
@@ -1415,7 +1415,15 @@ int kbase_mmu_insert_pages_no_flush(struct kbase_device *kbdev,
                                 * should be performed with
                                 * kbase_mmu_update_pages()
                                 */
-                               WARN_ON((*target & 1UL) != 0);
+                               WARN_ONCE((*target & 1UL) != 0,
+                                         "vindex=0x%x, count=%d, pgd=0x%pa, "
+                                         "insert_vpfn=0x%llx, start_vpfn=0x%llx, "
+                                         "nr=%d, remain=%d, group_id=%d, "
+                                         "is_huge_head(*phys)=%d\n",
+                                         vindex, count, &pgd,
+                                         insert_vpfn, start_vpfn,
+                                         (u32)nr, (u32)remain, group_id,
+                                         is_huge_head(*phys));
 
                                *target = kbase_mmu_create_ate(kbdev,
                                        phys[i], flags, cur_level, group_id);