Author: hselasky Date: Mon Oct 19 12:33:09 2015 New Revision: 289579 URL: https://svnweb.freebsd.org/changeset/base/289579
Log: Merge LinuxKPI changes from DragonflyBSD: - Implement more Linux kernel functions. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/mm.h Modified: head/sys/ofed/include/linux/mm.h ============================================================================== --- head/sys/ofed/include/linux/mm.h Mon Oct 19 12:26:38 2015 (r289578) +++ head/sys/ofed/include/linux/mm.h Mon Oct 19 12:33:09 2015 (r289579) @@ -2,7 +2,9 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * Copyright (c) 2015 Matthew Dillon <[email protected]> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -84,4 +86,24 @@ io_remap_pfn_range(struct vm_area_struct return (0); } +static inline unsigned long +vma_pages(struct vm_area_struct *vma) +{ + return ((vma->vm_end - vma->vm_start) >> PAGE_SHIFT); +} + +#define offset_in_page(off) ((off) & (PAGE_SIZE - 1)) + +static inline void +set_page_dirty(struct vm_page *page) +{ + vm_page_dirty(page); +} + +static inline void +get_page(struct vm_page *page) +{ + vm_page_hold(page); +} + #endif /* _LINUX_MM_H_ */ _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
