| From: "Mike Rapoport (Microsoft)" <rppt@kernel.org> |
| Subject: csky/mm: fix build errors cause by folio flags changes |
| Date: Wed, 15 Oct 2025 09:47:59 +0300 |
| |
| 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. |
| |
| Link: https://lkml.kernel.org/r/20251015064759.2993842-1-rppt@kernel.org |
| Fixes: 53fbef56e07d ("mm: introduce memdesc_flags_t") |
| Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> |
| Acked-by: Guo Ren <guoren@kernel.org> |
| Cc: Matthew Wilcox (Oracle) <willy@infradead.org> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| arch/csky/abiv2/cacheflush.c | 2 +- |
| arch/csky/abiv2/inc/abi/cacheflush.h | 4 ++-- |
| 2 files changed, 3 insertions(+), 3 deletions(-) |
| |
| --- a/arch/csky/abiv2/cacheflush.c~csky-mm-fix-build-errors-cause-by-folio-flags-changes |
| +++ a/arch/csky/abiv2/cacheflush.c |
| @@ -21,7 +21,7 @@ void update_mmu_cache_range(struct vm_fa |
| |
| 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); |
| --- a/arch/csky/abiv2/inc/abi/cacheflush.h~csky-mm-fix-build-errors-cause-by-folio-flags-changes |
| +++ a/arch/csky/abiv2/inc/abi/cacheflush.h |
| @@ -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 |
| |
| _ |