Date: Mon, 19 Oct 2015 12:33:09 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289579 - head/sys/ofed/include/linux Message-ID: <201510191233.t9JCX9o9081422@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <dillon@backplane.com> * 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_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510191233.t9JCX9o9081422>