Skip to contentSkip to conversation

csky/mm: fix build errors cause by folio flags changes

PATCH In review Mike Rapoport 3 participants 4 messages Oct 15, 2025 – Oct 16, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 csky/mm: fix build errors cause by folio flags changes

From: "Mike Rapoport (Microsoft)" <[email protected]>

Kernel compilation on csky fails because csky was not updated during conversion of folio flags to memdesc_flags_t:

arch/csky/abiv2/inc/abi/cacheflush.h: In function 'flush_dcache_folio':
arch/csky/abiv2/inc/abi/cacheflush.h:23:39: error: passing argument 2 of 'const_test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]

   23 |         if (test_bit(PG_dcache_clean, &folio->flags))
      |                                       ^~~~~~~~~~~~~
      |                                       |
      |                                       memdesc_flags_t *

include/linux/bitops.h:47:24: note: in definition of macro 'bitop'
47 | const##op(nr, addr) : op(nr, addr))
| ^~~~
arch/csky/abiv2/inc/abi/cacheflush.h:23:13: note: in expansion of macro 'test_bit'
23 | if (test_bit(PG_dcache_clean, &folio->flags))

      |             ^~~~~~~~

Update references of folio->flags in arch/csky.

Fixes 53fbef56e07d ("mm: introduce memdesc_flags_t")
---
 arch/csky/abiv2/cacheflush.c         | 2 +-
 arch/csky/abiv2/inc/abi/cacheflush.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/csky/abiv2/cacheflush.c +1 -1
index 876028b1083f..064b0f0f95ca 100644
@@ -21,7 +21,7 @@ void update_mmu_cache_range(struct vm_fault *vmf, struct vm_area_struct *vma,
 
 	folio = page_folio(pfn_to_page(pfn));
 
-	if (test_and_set_bit(PG_dcache_clean, &folio->flags))
+	if (test_and_set_bit(PG_dcache_clean, &folio->flags.f))
 		return;
 
 	icache_inv_range(address, address + nr*PAGE_SIZE);
arch/csky/abiv2/inc/abi/cacheflush.h +2 -2
index 6513ac5d2578..da51a0f02391 100644
@@ -20,8 +20,8 @@
 
 static inline void flush_dcache_folio(struct folio *folio)
 {
-	if (test_bit(PG_dcache_clean, &folio->flags))
-		clear_bit(PG_dcache_clean, &folio->flags);
+	if (test_bit(PG_dcache_clean, &folio->flags.f))
+		clear_bit(PG_dcache_clean, &folio->flags.f);
 }
 #define flush_dcache_folio flush_dcache_folio
 

base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787

Signature · 1 line
2.50.1
maintainer Acked-by on v1 1/1
#1 lore raw

Thanks for the fixup. If you want to go through your tree, please add the tag:

Quoted 61 lines · Mike Rapoport

From: "Mike Rapoport (Microsoft)" <[email protected]>

Kernel compilation on csky fails because csky was not updated during conversion of folio flags to memdesc_flags_t:

arch/csky/abiv2/inc/abi/cacheflush.h: In function 'flush_dcache_folio':
arch/csky/abiv2/inc/abi/cacheflush.h:23:39: error: passing argument 2 of 'const_test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]

   23 |         if (test_bit(PG_dcache_clean, &folio->flags))
      |                                       ^~~~~~~~~~~~~
      |                                       |
      |                                       memdesc_flags_t *

include/linux/bitops.h:47:24: note: in definition of macro 'bitop'
47 | const##op(nr, addr) : op(nr, addr))
| ^~~~
arch/csky/abiv2/inc/abi/cacheflush.h:23:13: note: in expansion of macro 'test_bit'
23 | if (test_bit(PG_dcache_clean, &folio->flags))

      |             ^~~~~~~~

Update references of folio->flags in arch/csky.

Fixes 53fbef56e07d ("mm: introduce memdesc_flags_t")
---
 arch/csky/abiv2/cacheflush.c         | 2 +-
 arch/csky/abiv2/inc/abi/cacheflush.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/csky/abiv2/cacheflush.c +1 -1
index 876028b1083f..064b0f0f95ca 100644
@@ -21,7 +21,7 @@ void update_mmu_cache_range(struct vm_fault *vmf, struct vm_area_struct *vma,
 
        folio = page_folio(pfn_to_page(pfn));
 
-       if (test_and_set_bit(PG_dcache_clean, &folio->flags))
+       if (test_and_set_bit(PG_dcache_clean, &folio->flags.f))
                return;
 
        icache_inv_range(address, address + nr*PAGE_SIZE);
arch/csky/abiv2/inc/abi/cacheflush.h +2 -2
index 6513ac5d2578..da51a0f02391 100644
@@ -20,8 +20,8 @@
 
 static inline void flush_dcache_folio(struct folio *folio)
 {
-       if (test_bit(PG_dcache_clean, &folio->flags))
-               clear_bit(PG_dcache_clean, &folio->flags);
+       if (test_bit(PG_dcache_clean, &folio->flags.f))
+               clear_bit(PG_dcache_clean, &folio->flags.f);
 }
 #define flush_dcache_folio flush_dcache_folio
 

base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787 --
2.50.1

Signature · 2 lines
Best Regards
 Guo Ren
maintainer
#3 lore raw
Quoted 6 lines · Matthew Wilcox
Quoted 2 lines · Guo Ren

Thanks for the fixup. If you want to go through your tree, please add the tag:

Why haven't you merged the original patch from October 6th?

Sorry, I didn't pick that patch up and just replied to the acked-by.

I'll investigate it tonight.

Quoted 3 lines

Message-Id: <[email protected]>

Signature · 2 lines
Best Regards
 Guo Ren