modpost error fix

Post Reply
belegdol
Posts: 13
Joined: Sat Sep 07, 2019 2:44 am
languages_spoken: english
ODROIDs: hc1
Has thanked: 3 times
Been thanked: 0
Contact:

modpost error fix

Post by belegdol »

I had to add one more patch to get the 6.1 kernel to compile on armbian:

Code: Select all

diff --git a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
index a193584f9..8d8f31ad3 100644
--- a/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
+++ b/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
@@ -2490,10 +2490,10 @@ void kbasep_os_process_page_usage_update(struct kbase_context *kctx, int pages)
 	if (mm) {
 		atomic_add(pages, &kctx->nonmapped_pages);
 #ifdef SPLIT_RSS_COUNTING
-		add_mm_counter(mm, MM_FILEPAGES, pages);
+		atomic_long_add(pages, &mm->rss_stat.count[MM_FILEPAGES]);
 #else
 		spin_lock(&mm->page_table_lock);
-		add_mm_counter(mm, MM_FILEPAGES, pages);
+		atomic_long_add(pages, &mm->rss_stat.count[MM_FILEPAGES]);
 		spin_unlock(&mm->page_table_lock);
 #endif
 	}
@@ -2518,10 +2518,10 @@ static void kbasep_os_process_page_usage_drain(struct kbase_context *kctx)
 
 	pages = atomic_xchg(&kctx->nonmapped_pages, 0);
 #ifdef SPLIT_RSS_COUNTING
-	add_mm_counter(mm, MM_FILEPAGES, -pages);
+	atomic_long_add(-pages, &mm->rss_stat.count[MM_FILEPAGES]);
 #else
 	spin_lock(&mm->page_table_lock);
-	add_mm_counter(mm, MM_FILEPAGES, -pages);
+	atomic_long_add(-pages, &mm->rss_stat.count[MM_FILEPAGES]);
 	spin_unlock(&mm->page_table_lock);
 #endif
 }

mdrjr
Site Admin
Posts: 11935
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 4 times
Been thanked: 102 times
Contact:

Re: modpost error fix

Post by mdrjr »

Hello!
Thank you for this patch!

Do you want to send a PR or should I just pick it ?

Btw, what compiler you are using? I build the kernel just fine on Ubuntu 22.04 (gcc 11.2)

belegdol
Posts: 13
Joined: Sat Sep 07, 2019 2:44 am
languages_spoken: english
ODROIDs: hc1
Has thanked: 3 times
Been thanked: 0
Contact:

Re: modpost error fix

Post by belegdol »

Please feel free to patch it. I got the fix from https://github.com/EasyNetDev/mali-midgard. As for the compiler, I am compiling on Ubuntu 22.04 as well. Maybe armbian kernel config is slightly different which is causing these issues?

mdrjr
Site Admin
Posts: 11935
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 4 times
Been thanked: 102 times
Contact:

Re: modpost error fix

Post by mdrjr »

Probably as my defconfig didn't got that error.

Merged. https://github.com/hardkernel/linux/com ... a4d87cd86d
These users thanked the author mdrjr for the post:
belegdol (Wed Sep 20, 2023 5:17 am)

Post Reply

Return to “Linux Kernel 6.1 Development Party”

Who is online

Users browsing this forum: No registered users and 1 guest