| /linux/include/linux/ |
| H A D | page_ref.h | 29 extern void __page_ref_set(struct page *page, int v); 30 extern void __page_ref_mod(struct page *page, int v); 31 extern void __page_ref_mod_and_test(struct page *page, int v, int ret); 32 extern void __page_ref_mod_and_return(struct page *page, int v, int ret); 33 extern void __page_ref_mod_unless(struct page *page, int v, int u); 34 extern void __page_ref_freeze(struct page *page, int v, int ret); 35 extern void __page_ref_unfreeze(struct page *page, int v); 41 static inline void __page_ref_set(struct page *page, int v) in __page_ref_set() argument 44 static inline void __page_ref_mod(struct page *page, int v) in __page_ref_mod() argument 47 static inline void __page_ref_mod_and_test(struct page *page, int v, int ret) in __page_ref_mod_and_test() argument [all …]
|
| H A D | page-flags.h | 208 static __always_inline const struct page *page_fixed_fake_head(const struct page *page) in page_fixed_fake_head() argument 211 return page; in page_fixed_fake_head() 219 if (IS_ALIGNED((unsigned long)page, PAGE_SIZE) && in page_fixed_fake_head() 220 test_bit(PG_head, &page->flags.f)) { in page_fixed_fake_head() 226 unsigned long head = READ_ONCE(page[1].compound_head); in page_fixed_fake_head() 229 return (const struct page *)(head - 1); in page_fixed_fake_head() 231 return page; in page_fixed_fake_head() 234 static __always_inline bool page_count_writable(const struct page *page, int u) in page_count_writable() argument 260 if (atomic_read_acquire(&page->_refcount) == u) in page_count_writable() 263 return page_fixed_fake_head(page) == page; in page_count_writable() [all …]
|
| H A D | highmem-internal.h | 10 void *__kmap_local_page_prot(const struct page *page, pgprot_t prot); 35 void *kmap_high(struct page *page); 36 void kunmap_high(const struct page *page); 38 struct page *__kmap_to_page(void *addr); 40 static inline void *kmap(struct page *page) in kmap() argument 45 if (!PageHighMem(page)) in kmap() 46 addr = page_address(page); in kmap() 48 addr = kmap_high(page); in kmap() 53 static inline void kunmap(const struct page *page) in kunmap() argument 56 if (!PageHighMem(page)) in kunmap() [all …]
|
| H A D | highmem.h | 37 static inline void *kmap(struct page *page); 46 static inline void kunmap(const struct page *page); 54 static inline struct page *kmap_to_page(void *addr); 96 static inline void *kmap_local_page(const struct page *page); 179 static inline void *kmap_atomic(const struct page *page); 186 static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vma… in flush_anon_page() argument 202 static inline void clear_user_highpage(struct page *page, unsigned long vaddr) in clear_user_highpage() argument 204 void *addr = kmap_local_page(page); in clear_user_highpage() 205 clear_user_page(addr, vaddr, page); in clear_user_highpage() 231 clear_user_highpage(&folio->page, vaddr); in vma_alloc_zeroed_movable_folio() [all …]
|
| H A D | pageblock-flags.h | 82 struct page; 84 enum migratetype get_pfnblock_migratetype(const struct page *page, 86 bool get_pfnblock_bit(const struct page *page, unsigned long pfn, 88 void set_pfnblock_bit(const struct page *page, unsigned long pfn, 90 void clear_pfnblock_bit(const struct page *page, unsigned long pfn, 95 #define get_pageblock_skip(page) \ argument 96 get_pfnblock_bit(page, page_to_pfn(page), PB_compact_skip) 97 #define clear_pageblock_skip(page) \ argument 98 clear_pfnblock_bit(page, page_to_pfn(page), PB_compact_skip) 99 #define set_pageblock_skip(page) \ argument [all …]
|
| H A D | pgalloc_tag.h | 25 struct page *page; /* reference in page flags */ member 101 static inline bool get_page_tag_ref(struct page *page, union codetag_ref *ref, in get_page_tag_ref() argument 104 if (!page) in get_page_tag_ref() 110 idx = (page->flags.f >> alloc_tag_ref_offs) & in get_page_tag_ref() 113 handle->page = page; in get_page_tag_ref() 118 page_ext = page_ext_get(page); in get_page_tag_ref() 142 struct page *page = handle.page; in update_page_tag_ref() local 147 if (WARN_ON(!page || !ref)) in update_page_tag_ref() 153 old_flags = READ_ONCE(page->flags.f); in update_page_tag_ref() 157 } while (unlikely(!try_cmpxchg(&page->flags.f, &old_flags, flags))); in update_page_tag_ref() [all …]
|
| H A D | mm.h | 150 static inline void __mm_zero_struct_page(struct page *page) in __mm_zero_struct_page() argument 152 unsigned long *_pp = (void *)page; in __mm_zero_struct_page() 155 BUILD_BUG_ON(sizeof(struct page) & 7); in __mm_zero_struct_page() 156 BUILD_BUG_ON(sizeof(struct page) < 56); in __mm_zero_struct_page() 157 BUILD_BUG_ON(sizeof(struct page) > 96); in __mm_zero_struct_page() 159 switch (sizeof(struct page)) { in __mm_zero_struct_page() 186 #define mm_zero_struct_page(pp) ((void)memset((pp), 0, sizeof(struct page))) 214 bool page_range_contiguous(const struct page *page, unsigned long nr_pages); 216 static inline bool page_range_contiguous(const struct page *page, in page_range_contiguous() argument 241 const struct page *page) in folio_page_idx() argument [all …]
|
| /linux/mm/ |
| H A D | page_alloc.c | 218 static void __free_pages_ok(struct page *page, unsigned int order, 293 static bool page_contains_unaccepted(struct page *page, unsigned int order); 296 static bool __free_unaccepted(struct page *page); 337 static inline unsigned long *get_pageblock_bitmap(const struct page *page, in get_pageblock_bitmap() argument 343 return page_zone(page)->pageblock_flags; in get_pageblock_bitmap() 347 static inline int pfn_to_bitidx(const struct page *page, unsigned long pfn) in pfn_to_bitidx() argument 352 pfn = pfn - pageblock_start_pfn(page_zone(page)->zone_start_pfn); in pfn_to_bitidx() 363 get_pfnblock_bitmap_bitidx(const struct page *page, unsigned long pfn, in get_pfnblock_bitmap_bitidx() argument 375 VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn), page); in get_pfnblock_bitmap_bitidx() 377 bitmap = get_pageblock_bitmap(page, pfn); in get_pfnblock_bitmap_bitidx() [all …]
|
| H A D | balloon_compaction.c | 15 struct page *page) in balloon_page_enqueue_one() argument 23 BUG_ON(!trylock_page(page)); in balloon_page_enqueue_one() 24 balloon_page_insert(b_dev_info, page); in balloon_page_enqueue_one() 25 unlock_page(page); in balloon_page_enqueue_one() 27 inc_node_page_state(page, NR_BALLOON_PAGES); in balloon_page_enqueue_one() 44 struct page *page, *tmp; in balloon_page_list_enqueue() local 49 list_for_each_entry_safe(page, tmp, pages, lru) { in balloon_page_list_enqueue() 50 list_del(&page->lru); in balloon_page_list_enqueue() 51 balloon_page_enqueue_one(b_dev_info, page); in balloon_page_list_enqueue() 80 struct page *page, *tmp; in balloon_page_list_dequeue() local [all …]
|
| H A D | folio-compat.c | 13 void unlock_page(struct page *page) in unlock_page() argument 15 return folio_unlock(page_folio(page)); in unlock_page() 19 void end_page_writeback(struct page *page) in end_page_writeback() argument 21 return folio_end_writeback(page_folio(page)); in end_page_writeback() 25 void wait_on_page_writeback(struct page *page) in wait_on_page_writeback() argument 27 return folio_wait_writeback(page_folio(page)); in wait_on_page_writeback() 31 void mark_page_accessed(struct page *page) in mark_page_accessed() argument 33 folio_mark_accessed(page_folio(page)); in mark_page_accessed() 37 void set_page_writeback(struct page *page) in set_page_writeback() argument 39 folio_start_writeback(page_folio(page)); in set_page_writeback() [all …]
|
| H A D | debug_page_ref.c | 8 void __page_ref_set(struct page *page, int v) in __page_ref_set() argument 10 trace_page_ref_set(page, v); in __page_ref_set() 15 void __page_ref_mod(struct page *page, int v) in __page_ref_mod() argument 17 trace_page_ref_mod(page, v); in __page_ref_mod() 22 void __page_ref_mod_and_test(struct page *page, int v, int ret) in __page_ref_mod_and_test() argument 24 trace_page_ref_mod_and_test(page, v, ret); in __page_ref_mod_and_test() 29 void __page_ref_mod_and_return(struct page *page, int v, int ret) in __page_ref_mod_and_return() argument 31 trace_page_ref_mod_and_return(page, v, ret); in __page_ref_mod_and_return() 36 void __page_ref_mod_unless(struct page *page, int v, int u) in __page_ref_mod_unless() argument 38 trace_page_ref_mod_unless(page, v, u); in __page_ref_mod_unless() [all …]
|
| H A D | highmem.c | 64 static inline unsigned int get_pkmap_color(const struct page *page) in get_pkmap_color() argument 165 struct page *__kmap_to_page(void *vaddr) in __kmap_to_page() 204 struct page *page; in flush_all_zero_pkmaps() local 228 page = pte_page(ptent); in flush_all_zero_pkmaps() 231 set_page_address(page, NULL); in flush_all_zero_pkmaps() 245 static inline unsigned long map_new_virtual(struct page *page) in map_new_virtual() argument 250 unsigned int color = get_pkmap_color(page); in map_new_virtual() 282 if (page_address(page)) in map_new_virtual() 283 return (unsigned long)page_address(page); in map_new_virtual() 291 &(pkmap_page_table[last_pkmap_nr]), mk_pte(page, kmap_prot)); in map_new_virtual() [all …]
|
| /linux/include/trace/events/ |
| H A D | page_ref.h | 15 TP_PROTO(struct page *page, int v), 17 TP_ARGS(page, v), 30 __entry->pfn = page_to_pfn(page); 31 __entry->flags = page->flags.f; 32 __entry->count = page_ref_count(page); 33 __entry->mapcount = atomic_read(&page->_mapcount); 34 __entry->mapping = page->mapping; 35 __entry->mt = get_pageblock_migratetype(page); 49 TP_PROTO(struct page *page, int v), 51 TP_ARGS(page, v) [all …]
|
| H A D | cma.h | 13 TP_PROTO(const char *name, unsigned long pfn, const struct page *page, 16 TP_ARGS(name, pfn, page, count), 21 __field(const struct page *, page) 28 __entry->page = page; 35 __entry->page, 72 TP_PROTO(const char *name, unsigned long pfn, const struct page *page, 75 TP_ARGS(name, pfn, page, count, align, errorno), 80 __field(const struct page *, page) 89 __entry->page = page; 98 __entry->page, [all …]
|
| /linux/Documentation/trace/ |
| H A D | ring-buffer-design.rst | 40 - A page outside the ring buffer used solely (for the most part) 44 - a pointer to the page that the reader will use next 47 - a pointer to the page that will be written to next 50 - a pointer to the page with the last finished non-nested write. 110 At initialization a reader page is allocated for the reader that is not 114 to the same page. 116 The reader page is initialized to have its next pointer pointing to 117 the head page, and its previous pointer pointing to a page before 118 the head page. 120 The reader has its own page to use. At start up time, this page is [all …]
|
| /linux/mm/kmsan/ |
| H A D | shadow.c | 22 #define shadow_page_for(page) ((page)->kmsan_shadow) argument 24 #define origin_page_for(page) ((page)->kmsan_origin) argument 26 static void *shadow_ptr_for(struct page *page) in shadow_ptr_for() argument 28 return page_address(shadow_page_for(page)); in shadow_ptr_for() 31 static void *origin_ptr_for(struct page *page) in origin_ptr_for() argument 33 return page_address(origin_page_for(page)); in origin_ptr_for() 36 static bool page_has_metadata(struct page *page) in page_has_metadata() argument 38 return shadow_page_for(page) && origin_page_for(page); in page_has_metadata() 41 static void set_no_shadow_origin_page(struct page *page) in set_no_shadow_origin_page() argument 43 shadow_page_for(page) = NULL; in set_no_shadow_origin_page() [all …]
|
| /linux/arch/openrisc/include/asm/ |
| H A D | cacheflush.h | 24 extern void local_dcache_page_flush(struct page *page); 25 extern void local_icache_page_inv(struct page *page); 36 #define dcache_page_flush(page) local_dcache_page_flush(page) argument 37 #define icache_page_inv(page) local_icache_page_inv(page) argument 39 #define dcache_page_flush(page) local_dcache_page_flush(page) argument 40 #define icache_page_inv(page) smp_icache_page_inv(page) argument 41 extern void smp_icache_page_inv(struct page *page); 62 static inline void sync_icache_dcache(struct page *page) in sync_icache_dcache() argument 65 dcache_page_flush(page); in sync_icache_dcache() 66 icache_page_inv(page); in sync_icache_dcache() [all …]
|
| /linux/drivers/target/iscsi/ |
| H A D | iscsi_target_stat.c | 51 char *page) in iscsi_stat_instance_inst_show() argument 53 return snprintf(page, PAGE_SIZE, "%u\n", in iscsi_stat_instance_inst_show() 58 char *page) in iscsi_stat_instance_min_ver_show() argument 60 return snprintf(page, PAGE_SIZE, "%u\n", ISCSI_DRAFT20_VERSION); in iscsi_stat_instance_min_ver_show() 64 char *page) in iscsi_stat_instance_max_ver_show() argument 66 return snprintf(page, PAGE_SIZE, "%u\n", ISCSI_DRAFT20_VERSION); in iscsi_stat_instance_max_ver_show() 70 char *page) in iscsi_stat_instance_portals_show() argument 72 return snprintf(page, PAGE_SIZE, "%u\n", in iscsi_stat_instance_portals_show() 77 char *page) in iscsi_stat_instance_nodes_show() argument 79 return snprintf(page, PAGE_SIZE, "%u\n", ISCSI_INST_NUM_NODES); in iscsi_stat_instance_nodes_show() [all …]
|
| /linux/fs/ceph/ |
| H A D | crypto.h | 147 struct page *page, unsigned int len, 150 struct page *page, unsigned int len, 152 int ceph_fscrypt_decrypt_pages(struct inode *inode, struct page **page, 154 int ceph_fscrypt_decrypt_extents(struct inode *inode, struct page **page, 157 int ceph_fscrypt_encrypt_pages(struct inode *inode, struct page **page, u64 off, 160 static inline struct page *ceph_fscrypt_pagecache_page(struct page *page) in ceph_fscrypt_pagecache_page() argument 162 return fscrypt_is_bounce_page(page) ? fscrypt_pagecache_page(page) : page; in ceph_fscrypt_pagecache_page() 226 struct page *page, unsigned int len, in ceph_fscrypt_decrypt_block_inplace() argument 233 struct page *page, unsigned int len, in ceph_fscrypt_encrypt_block_inplace() argument 240 struct page **page, u64 off, in ceph_fscrypt_decrypt_pages() argument [all …]
|
| /linux/drivers/xen/ |
| H A D | balloon.c | 147 static void balloon_append(struct page *page) in balloon_append() argument 149 if (!PageOffline(page)) in balloon_append() 150 __SetPageOffline(page); in balloon_append() 153 if (PageHighMem(page)) { in balloon_append() 154 list_add_tail(&page->lru, &ballooned_pages); in balloon_append() 157 list_add(&page->lru, &ballooned_pages); in balloon_append() 160 inc_node_page_state(page, NR_BALLOON_PAGES); in balloon_append() 166 static struct page *balloon_retrieve(bool require_lowmem) in balloon_retrieve() 168 struct page *page; in balloon_retrieve() local 173 page = list_entry(ballooned_pages.next, struct page, lru); in balloon_retrieve() [all …]
|
| /linux/net/ceph/ |
| H A D | pagelist.c | 32 struct page *page = list_entry(pl->head.prev, struct page, lru); in ceph_pagelist_unmap_tail() local 33 kunmap(page); in ceph_pagelist_unmap_tail() 44 struct page *page = list_first_entry(&pl->head, struct page, in ceph_pagelist_release() local 46 list_del(&page->lru); in ceph_pagelist_release() 47 __free_page(page); in ceph_pagelist_release() 56 struct page *page; in ceph_pagelist_addpage() local 59 page = __page_cache_alloc(GFP_NOFS); in ceph_pagelist_addpage() 61 page = list_first_entry(&pl->free_list, struct page, lru); in ceph_pagelist_addpage() 62 list_del(&page->lru); in ceph_pagelist_addpage() 65 if (!page) in ceph_pagelist_addpage() [all …]
|
| /linux/drivers/nvme/target/ |
| H A D | configfs.c | 66 static ssize_t nvmet_addr_adrfam_show(struct config_item *item, char *page) in nvmet_addr_adrfam_show() argument 73 return snprintf(page, PAGE_SIZE, "%s\n", in nvmet_addr_adrfam_show() 77 return snprintf(page, PAGE_SIZE, "\n"); in nvmet_addr_adrfam_show() 81 const char *page, size_t count) in nvmet_addr_adrfam_store() argument 90 if (sysfs_streq(page, nvmet_addr_family[i].name)) in nvmet_addr_adrfam_store() 94 pr_err("Invalid value '%s' for adrfam\n", page); in nvmet_addr_adrfam_store() 105 char *page) in nvmet_addr_portid_show() argument 109 return snprintf(page, PAGE_SIZE, "%d\n", le16_to_cpu(portid)); in nvmet_addr_portid_show() 113 const char *page, size_t count) in nvmet_addr_portid_store() argument 118 if (kstrtou16(page, 0, &portid)) { in nvmet_addr_portid_store() [all …]
|
| /linux/drivers/target/ |
| H A D | target_core_stat.c | 48 static ssize_t target_stat_inst_show(struct config_item *item, char *page) in target_stat_inst_show() argument 52 return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); in target_stat_inst_show() 55 static ssize_t target_stat_indx_show(struct config_item *item, char *page) in target_stat_indx_show() argument 57 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->dev_index); in target_stat_indx_show() 60 static ssize_t target_stat_role_show(struct config_item *item, char *page) in target_stat_role_show() argument 62 return snprintf(page, PAGE_SIZE, "Target\n"); in target_stat_role_show() 65 static ssize_t target_stat_ports_show(struct config_item *item, char *page) in target_stat_ports_show() argument 67 return snprintf(page, PAGE_SIZE, "%u\n", to_stat_dev(item)->export_count); in target_stat_ports_show() 98 static ssize_t target_stat_tgt_inst_show(struct config_item *item, char *page) in target_stat_tgt_inst_show() argument 102 return snprintf(page, PAGE_SIZE, "%u\n", hba->hba_index); in target_stat_tgt_inst_show() [all …]
|
| /linux/arch/x86/include/asm/ |
| H A D | set_memory.h | 61 int set_pages_array_uc(struct page **pages, int addrinarray); 62 int set_pages_array_wc(struct page **pages, int addrinarray); 63 int set_pages_array_wb(struct page **pages, int addrinarray); 85 int set_pages_uc(struct page *page, int numpages); 86 int set_pages_wb(struct page *page, int numpages); 87 int set_pages_ro(struct page *page, int numpages); 88 int set_pages_rw(struct page *page, int numpages); 90 int set_direct_map_invalid_noflush(struct page *page); 91 int set_direct_map_default_noflush(struct page *page); 92 int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid); [all …]
|
| /linux/kernel/dma/ |
| H A D | direct.c | 34 static inline struct page *dma_direct_to_page(struct device *dev, in dma_direct_to_page() 99 static void __dma_direct_free_pages(struct device *dev, struct page *page, in __dma_direct_free_pages() argument 102 if (swiotlb_free(dev, page, size)) in __dma_direct_free_pages() 104 dma_free_contiguous(dev, page, size); in __dma_direct_free_pages() 107 static struct page *dma_direct_alloc_swiotlb(struct device *dev, size_t size) in dma_direct_alloc_swiotlb() 109 struct page *page = swiotlb_alloc(dev, size); in dma_direct_alloc_swiotlb() local 111 if (page && !dma_coherent_ok(dev, page_to_phys(page), size)) { in dma_direct_alloc_swiotlb() 112 swiotlb_free(dev, page, size); in dma_direct_alloc_swiotlb() 116 return page; in dma_direct_alloc_swiotlb() 119 static struct page *__dma_direct_alloc_pages(struct device *dev, size_t size, in __dma_direct_alloc_pages() [all …]
|