at master 511 B view raw
1// SPDX-License-Identifier: GPL-2.0 2 3#include <linux/gfp.h> 4#include <linux/highmem.h> 5#include <linux/mm.h> 6 7struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order) 8{ 9 return alloc_pages(gfp_mask, order); 10} 11 12void *rust_helper_kmap_local_page(struct page *page) 13{ 14 return kmap_local_page(page); 15} 16 17void rust_helper_kunmap_local(const void *addr) 18{ 19 kunmap_local(addr); 20} 21 22#ifndef NODE_NOT_IN_PAGE_FLAGS 23int rust_helper_page_to_nid(const struct page *page) 24{ 25 return page_to_nid(page); 26} 27#endif