Re: + mm-make-folio_pte_batch-available-outside-of-mm-memoryc.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

> The patch titled
>     Subject: mm: make folio_pte_batch available outside of mm/memory.c
> has been added to the -mm mm-unstable branch.  Its filename is
>     mm-make-folio_pte_batch-available-outside-of-mm-memoryc.patch

We got a build issue on NOMMU platform. Can you add the below fix?

>From 1f106e7bb72e4957d106f9f9d080599a630cb135 Mon Sep 17 00:00:00 2001
From: Barry Song <v-songbaohua@xxxxxxxx>
Date: Wed, 28 Feb 2024 13:16:17 +1300
Subject: [PATCH] 
 mm-make-folio_pte_batch-available-outside-of-mm-memoryc-fix.patch

Fix build on NOMMU platforms
    In file included from .../mm/nommu.c:43:
    .../mm/internal.h: In function '__pte_batch_clear_ignored':
    .../mm/internal.h:98:23: error: implicit declaration of function 'pte_mkclean'; did you mean 'page_mkclean'? [-Werror=implicit-function-declaration]
       98 |                 pte = pte_mkclean(pte);
          |                       ^~~~~~~~~~~
          |                       page_mkclean

Reported-by: SeongJae Park <sj@xxxxxxxxxx>
Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx>
---
 mm/internal.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/internal.h b/mm/internal.h
index fa9e2f7db506..4e57680b74e1 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -83,6 +83,8 @@ static inline void *folio_raw_mapping(struct folio *folio)
 	return (void *)(mapping & ~PAGE_MAPPING_FLAGS);
 }
 
+#ifdef CONFIG_MMU
+
 /* Flags for folio_pte_batch(). */
 typedef int __bitwise fpb_t;
 
@@ -172,6 +174,7 @@ static inline int folio_pte_batch(struct folio *folio, unsigned long addr,
 
 	return min(ptep - start_ptep, max_nr);
 }
+#endif /* CONFIG_MMU */
 
 void __acct_reclaim_writeback(pg_data_t *pgdat, struct folio *folio,
 						int nr_throttled);
-- 
2.34.1





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux