XenevaOS
Loading...
Searching...
No Matches
mm_types.h
Go to the documentation of this file.
1/*
2 * DCL mm_types.h -- the folio shape drm's GEM paths need, nothing else.
3 *
4 * DCL has no page cache; struct page lives in pagemap.h for the tty side.
5 * drm_gem.c/drm_gem_shmem_helper.c batch and mark folios of shmem-backed
6 * GEM imports, which vkms never exercises at runtime today, so the helpers
7 * answer honestly-but-blandly: an order-0 folio of one page that is never
8 * dirty, never pmd-mappable, and needs no writeback. page_folio() is a
9 * cast because DCL pages are not compound.
10 */
11#ifndef _LINUX_MM_TYPES_H
12#define _LINUX_MM_TYPES_H
13
14#include <linux/types.h>
15
16struct folio {
17 unsigned long flags;
18};
19
20struct page;
21
22static inline struct folio *page_folio(const struct page *p)
23{
24 return (struct folio *)(void *)p;
25}
26
27static inline struct page *folio_file_page(struct folio *folio, unsigned long idx)
28{
29 (void)idx;
30 return (struct page *)(void *)folio;
31}
32
33static inline unsigned int folio_nr_pages(const struct folio *folio)
34{
35 (void)folio;
36 return 1;
37}
38
39static inline unsigned long folio_pfn(const struct folio *folio)
40{
41 (void)folio;
42 return 0;
43}
44
45static inline bool folio_test_pmd_mappable(const struct folio *folio)
46{
47 (void)folio;
48 return false;
49}
50
51static inline int folio_mark_dirty(struct folio *folio)
52{
53 (void)folio;
54 return 0;
55}
56
57static inline void folio_mark_accessed(struct folio *folio)
58{
59 (void)folio;
60}
61
62static inline void folio_put(struct folio *folio)
63{
64 (void)folio;
65}
66
67#endif /* _LINUX_MM_TYPES_H */
Definition mm_types.h:16
unsigned long flags
Definition mm_types.h:17
Definition pagemap.h:38