4 * Declarations for Reverse Mapping functions in mm/rmap.c
5 * Its structures are declared within that file.
8 #include <linux/config.h>
9 #include <linux/linkage.h>
11 #define rmap_lock(page) \
12 bit_spin_lock(PG_maplock, (unsigned long *)&(page)->flags)
13 #define rmap_unlock(page) \
14 bit_spin_unlock(PG_maplock, (unsigned long *)&(page)->flags)
19 struct pte_chain *pte_chain_alloc(int gfp_flags);
20 void __pte_chain_free(struct pte_chain *pte_chain);
22 static inline void pte_chain_free(struct pte_chain *pte_chain)
25 __pte_chain_free(pte_chain);
28 struct pte_chain * fastcall
29 page_add_rmap(struct page *, pte_t *, struct pte_chain *);
30 void fastcall page_remove_rmap(struct page *, pte_t *);
33 * Called from mm/vmscan.c to handle paging out
35 int fastcall page_referenced(struct page *);
36 int fastcall try_to_unmap(struct page *);
38 #else /* !CONFIG_MMU */
40 #define page_referenced(page) TestClearPageReferenced(page)
41 #define try_to_unmap(page) SWAP_FAIL
43 #endif /* CONFIG_MMU */
46 * Return values of try_to_unmap
48 #define SWAP_SUCCESS 0
52 #endif /* _LINUX_RMAP_H */