aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed/include/linux/linux_compat.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC 294366:John Baldwin2016-01-231-1/+1
| | | | | | | | | | | | | | | | | Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0. If a driver's Linux mmap callback passed vm_page_prot through unchanged, then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx value 0 is to the mapping. On x86, VM_MEMATTR_DEFAULT is the PAT value for write-back (WB) which is 6, while 0 maps to the PAT value for uncacheable (UC). Thus, any mmap request that did not explicitly set page_prot was tried to map memory as UC triggering the warning in sg_pager_getpages(). Sponsored by: Chelsio Communications Notes: svn path=/stable/9/; revision=294636
* MFC 287440:John Baldwin2015-09-111-25/+20
| | | | | | | | | | | | | | | | | | Currently the Linux character device mmap handling only supports mmap operations that map a single page that has an associated vm_page_t. This does not permit mapping larger regions (such as a PCI memory BAR) and it does not permit mapping addresses beyond the top of RAM (such as a 64-bit BAR located above the top of RAM). Instead of using a single OBJT_DEVICE object and passing the physaddr via the offset as a hack, create a new sglist and OBJT_SG object for each mmap request. The requested memory attribute is applied to the object thus affecting all pages mapped by the request. Sponsored by: Chelsio Notes: svn path=/stable/9/; revision=287637
* MFC r285088:Hans Petter Selasky2015-07-211-1/+18
| | | | | | | | | | | | | Fix broken implementation of "kvasprintf()" function by adding missing kmalloc() call. Make function global instead of static inline to fix compiler warnings about passing variable argument lists to inline functions. Sponsored by: Mellanox Technologies Requested by: markj @ Notes: svn path=/stable/9/; revision=285757
* MFC r277396, r278681, r278865, r278924, r279205, r280208,Hans Petter Selasky2015-05-051-7/+189
| | | | | | | | | | | | | | | | | | | | | | | | r280210, r280764 and r280768: Update the Linux compatibility layer: - Add more functions. - Add some missing includes which are needed when the header files are not included in a particular order. - The kasprintf() function cannot be inlined due to using a variable number of arguments. Move it to a C-file. - Fix problems about 32-bit ticks wraparound and unsigned long conversion. Jiffies or ticks in FreeBSD have integer type and are not long. - Add missing "order_base_2()" macro. - Fix BUILD_BUG_ON() macro. - Declare a missing symbol which is needed when compiling without -O2 - Clean up header file inclusions in the linux/completion.h, linux/in.h and linux/fs.h header files. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=282514
* MFC r280211:Hans Petter Selasky2015-03-251-2/+2
| | | | | | | | | Add missing void pointer argument to SYSINIT() functions. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=280543
* MFC r276749:Hans Petter Selasky2015-01-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | Fixes and updates for the Linux compatibility layer: - Remove unsupported "bus" field from "struct pci_dev". - Fix logic inside "pci_enable_msix()" when the number of allocated interrupts are less than the number of available interrupts. - Update header files included from "list.h". - Ensure that "idr_destroy()" removes all entries before destroying the IDR root node(s). - Set the "device->release" function so that we don't leak memory at device destruction. - Use FreeBSD's "log()" function for certain debug printouts. - Put parenthesis around arguments inside the min, max, min_t and max_t macros. - Make sure we don't leak file descriptors by dropping the extra file reference counts done by the FreeBSD kernel when calling falloc() and fget_unlocked(). Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=277140
* MFC r254122, r254123, r256116, r255970, r247671, r269861, r268314, r256269,Hans Petter Selasky2014-10-301-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | r255969, r256179, r230135, r254121, r255932, r255972, r255973, r256281, r256470, r257867, r259608, r269862, r271127, r272407, r257864, r256682, r258276, r254734, r247675, r254735 and r272683: Hardware driver update from Mellanox Technologies, including: - improved performance - better stability - new features - bugfixes Supported HCAs: - ConnectX-2 - ConnectX-3 - ConnectX-3 Pro NOTE: - TSO feature needs r271946, which is not yet merged. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=273864
* MFC 251617:John Baldwin2013-06-201-1/+4
| | | | | | | | | | | | Store a reference to the vnode associated with a file descriptor in the linux_file structure and use it instead of directly accessing td_fpop when destroying the linux_file structure. The td_fpop pointer is not valid when a cdevpriv destructor is run, and the type-specific close method has already been called, so f_vnode may not be valid (and the vnode might have been recycled without our own reference). Notes: svn path=/stable/9/; revision=252041
* MFC r239303:Hans Petter Selasky2012-10-011-1/+0
| | | | | | | Streamline use of cdevpriv and correct some corner cases. Notes: svn path=/stable/9/; revision=241088
* Add the fo_chown and fo_chmod methods to struct fileops and use themKonstantin Belousov2011-08-161-1/+3
| | | | | | | | | | | | | to implement fchown(2) and fchmod(2) support for several file types that previously lacked it. Add MAC entries for chown/chmod done on posix shared memory and (old) in-kernel posix semaphores. Based on the submission by: glebius Reviewed by: rwatson Approved by: re (bz) Notes: svn path=/head/; revision=224914
* - Merge in OFED 1.5.3 from projects/ofed/headJeff Roberson2011-03-211-0/+695
Notes: svn path=/head/; revision=219820