aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed/include
Commit message (Collapse)AuthorAgeFilesLines
* MFC r328623:Hans Petter Selasky2018-02-011-1/+1
| | | | | | | | | Properly implement the cond_resched() function macro in the LinuxKPI. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=328657
* MFC r325533:Hans Petter Selasky2017-11-171-1/+1
| | | | | | | | | | | Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard to the "dev" argument. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Notes: svn path=/stable/9/; revision=325938
* MFC r289577:Hans Petter Selasky2017-08-142-3/+9
| | | | | | | | | | Merge LinuxKPI changes from DragonflyBSD: - Map more Linux compiler related defines to FreeBSD ones. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322502
* MFC r292537 and r314878:Hans Petter Selasky2017-08-141-0/+17
| | | | | | | | | Implement ACCESS_ONCE(), WRITE_ONCE() and READ_ONCE(). Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322501
* MFC r321782:Hans Petter Selasky2017-08-071-1/+0
| | | | | | | | | | | Remove some dead statistics related code and a structure field from the mlx4en driver which is used by its Linux counterpart, but not under FreeBSD. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322166
* MFC r321772:Hans Petter Selasky2017-08-071-1/+1
| | | | | | | | | | | Fix broken usage of the mlx4_read_clock() function: - return value has too small width - cycle_t is unsigned and cannot be less than zero Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322163
* MFC r313555:Hans Petter Selasky2017-05-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=318537
* MFC r313556:Hans Petter Selasky2017-05-191-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=318534
* MFC r306451:Hans Petter Selasky2016-10-101-9/+20
| | | | | | | | | | | The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX are not bitmasks. Fix return value of pci_resource_flags() to reflect this change. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=306951
* MFC r294520:Hans Petter Selasky2016-04-072-22/+22
| | | | | | | | | | | | | | | LinuxKPI atomic fixes: - Fix implementation of atomic_add_unless(). The atomic_cmpset_int() function returns a boolean and not the previous value of the atomic variable. - The atomic counters should be signed according to Linux. - Some minor cosmetics and styling while at it. Reviewed by: alfred @ Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=297659
* MFC r297444:Hans Petter Selasky2016-04-071-2/+2
| | | | | | | | | Fix bugs in currently unused bit searching loop. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=297657
* 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 r292989:Hans Petter Selasky2016-01-121-2/+6
| | | | | | | | Handle when filedescriptors are closed before initialized. An early fdclose() call can cause fget_unlocked() to fail. Notes: svn path=/stable/9/; revision=293737
* MFC r290003:Hans Petter Selasky2015-12-141-1/+18
| | | | | | | | | | Add support for binding IRQs to CPUs in the LinuxKPI. The new function added is for BSD only and does not exist in Linux. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=292193
* MFC r283612, r290710, r291694, r291699 and r291793:Hans Petter Selasky2015-12-114-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | - Add SIOCGI2C ioctl support to the driver. Would work only on ConnectX-3 with fresh firmware. The low level code is based on code provided by Mellanox. - Fix print formatting compile warnings for Sparc64 and PowerPC platforms. - Updated the mlx4 and mlxen drivers to the latest version, v2.1.6: - Added support for dumping the SFP EEPROM content to dmesg. - Fixed handling of network interface capability IOCTLs. - Fixed race when loading and unloading the mlxen driver by applying appropriate locking. - Removed two unused C-files. - Convert the mlxen driver to use the BUSDMA(9) APIs instead of vtophys() when loading mbufs for transmission and reception. While at it all pointer arithmetic and cast qualifier issues were fixed, mostly related to transmission and reception. - Fix i386 build WITH_OFED=YES. Remove some redundant KASSERTs. Sponsored by: Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D4283 Differential Revision: https://reviews.freebsd.org/D4284 Notes: svn path=/stable/9/; revision=292115
* MFC r291693:Hans Petter Selasky2015-12-111-0/+19
| | | | | | | | | | | Add some structures and defines which will be used when decoding small form factor, SFF, standards compliant ethernet EEPROMs. Obtained from: Linux Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=292109
* MFC r291690:Hans Petter Selasky2015-12-111-4/+0
| | | | | | | | | | Remove incorrect defines. The proper version of these macros is defined in linux/etherdevice.h. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=292108
* MFC 287440:John Baldwin2015-09-112-25/+22
| | | | | | | | | | | | | | | | | | 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-212-16/+19
| | | | | | | | | | | | | 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-0520-176/+347
| | | | | | | | | | | | | | | | | | | | | | | | 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 r279587:Hans Petter Selasky2015-03-071-0/+2
| | | | | | | | | | Define PTR_ALIGN() macro which will be needed coming Mellanox driver releases. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=279736
* MFC r279584:Hans Petter Selasky2015-03-072-4/+17
| | | | | | | | | | | | | | | | | | | | | | Updates for the Mellanox ethernet driver > List of fixes: * use correct format for GID printouts * double array indexing * spelling in printouts * void pointer arithmetic * allow more receive rings * correct maximum number of transmit rings * use "const" instead of "static" for constants * check for invalid VLAN tags * check for lack of IRQ resources > Added more hardware specific defines > Added more verbose printouts of firmware status codes Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=279734
* MFC r278866:Hans Petter Selasky2015-03-071-0/+40
| | | | | | | | | | Define standard formatting strings to print GIDs in a separate header file. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=279733
* MFC r276749:Hans Petter Selasky2015-01-136-36/+84
| | | | | | | | | | | | | | | | | | | | | | 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 r276879:Hans Petter Selasky2015-01-131-1/+1
| | | | | | | | | | Don't mask the IP-address when doing multicast IP over infiniband. PR: 196631 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=277138
* Merge r276744:Craig Rodrigues2015-01-062-0/+4
| | | | | | | | | | | | | | | | Use CURVNET macros inside inet_get_local_port_range() function. Without this fix, a kernel with VIMAGE + Infiniband will panic on bootup. Certain necessary #include statements require LIST_HEAD. Add these includes to ofed/include/linux/list.h, because LIST_HEAD is specifically overridden in this file. PR: 191468 Differential Revision: D1279 Reviewed by: hselasky Notes: svn path=/stable/9/; revision=276745
* MFC r275636:Hans Petter Selasky2014-12-121-2/+2
| | | | | | | | | Move OFED init a bit earlier so that PXE boot works. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=275725
* MFC r273135 and r273867:Hans Petter Selasky2014-10-3014-140/+236
| | | | | | | | | | | | | | | | | | | | | | | | Update the OFED Linux compatibility layer and Mellanox hardware driver(s): - Properly name an inclusion guard. - Fix compile warnings regarding unsigned enums. - Fix compile warning regarding unused variable. - Add two new sysctl nodes. - Remove all empty linux header files. - Make an error printout more verbose. - Use "mod_delayed_work()" instead of cancelling and starting a timeout. - Implement more Linux scatterlist functions. - Don't forget to add "options OFED" to the kernel configuration file before using infiniband. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=273868
* MFC r254122, r254123, r256116, r255970, r247671, r269861, r268314, r256269,Hans Petter Selasky2014-10-30114-616/+3478
| | | | | | | | | | | | | | | | | | | | | | | | | 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 r269859:Hans Petter Selasky2014-08-191-20/+64
| | | | | | | | | Fix for memory leak. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=270167
* MFC r268316:Hans Petter Selasky2014-08-121-3/+8
| | | | | | | | | | | | Fix OFED startup order: All SYSINIT()'s and modules should be loaded prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx" scripts. Else there can be a race configuring the interfaces via "/etc/rc.conf". Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=269863
* MFC r254120, r257862 and r267395:Hans Petter Selasky2014-06-161-6/+11
| | | | | | | | | | - Fix out of range shifting bug in bitops.h. - Make code a bit easier to read by adding parenthesis. Approved by: re, gjb @ Notes: svn path=/stable/9/; revision=267555
* MFC r253604: rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LASTAndriy Gapon2013-08-231-3/+3
| | | | Notes: svn path=/stable/9/; revision=254692
* MFC 253048,253423,253449,253653,253774,253785:John Baldwin2013-08-061-13/+16
| | | | | | | | | | | | | | | - Allow mlx4 devices to switch between Ethernet and Infiniband: - Fix sysfs attribute handling by using sysctl_handle_string() and properly handling trailing newlines in attribute values. - Remove check forbidding requests that would result in one port being set to Ethernet and the subsequent port being set to IB. - Avoid trashing IP fragments by correctly managing hardware checksumming. - Fix panics when downing or unloading the mlx4 driver. PR: kern/179999, kern/174213, kern/180430, kern/180791 Notes: svn path=/stable/9/; revision=254006
* MFC/backport core kernel and userspace parts of r237263 (TCP_OFFLOADNavdeep Parhar2013-07-034-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rework). MFC r237563, r239511, r243603, r245915, r245916, r245919, r245921, r245922, r245924, r245925, r245932, r245934 too. Build tested with make universe. r237263: - Updated TOE support in the kernel. ... r237563: Fix clang warning when compiling iw_cxgb. r239511: Correctly handle the case where an inp has already been dropped by the time the TOE driver reports that an active open failed. toe_connect_failed is supposed to handle this but it should be provided the inpcb instead of the tcpcb which may no longer be around. r243603: Make sure that tcp_timer_activate() correctly sees TCP_OFFLOAD (or not). r245915: Heed SO_NO_OFFLOAD. r245916: Teach toe_4tuple_check() to deal with IPv6 4-tuples too. r245919: Add TCP_OFFLOAD hook in syncache_respond for IPv6 too, just like the one that exists for IPv4. r245921: There is no need to call into the TOE driver twice in pru_rcvd (tod_rcvd and then tod_output right after that). r245922: Avoid NULL dereference in nd6_storelladdr when no mbuf is provided. It is called this way from a couple of places in the OFED code. (toecore calls it too but that's going to change shortly). r245924: Move lle_event to if_llatbl.h lle_event replaced arp_update_event after the ARP rewrite and ended up in if_ether.h simply because arp_update_event used to be there too. IPv6 neighbor discovery is going to grow lle_event support and this is a good time to move it to if_llatbl.h. The two in-tree consumers of this event - OFED and toecore - are not affected. r245925: Generate lle_event in the IPv6 neighbor discovery code too. r245932: Teach toe_l2_resolve to resolve IPv6 destinations too. r245934: Add checks for SO_NO_OFFLOAD in a couple of places that I missed earlier in r245915. Notes: svn path=/stable/9/; revision=252555
* MFC 251617:John Baldwin2013-06-202-1/+5
| | | | | | | | | | | | 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 r250374:Xin LI2013-05-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation, on Linux, cancel_delayed_work() does not do drain (flush_workqueue() in Linux terms) but instead returns true if the work was removed before it is run, or false otherwise. Simulate this by removing the taskqueue_drain() and return the value derived from taskqueue_cancel()'s return value. This would solve a witness warning caused by calling taskqueue_drain() with a non-sleepable lock held, like: taskqueue_drain with the following non-sleepable locks held: exclusive rw lle (lle) r = 0 (0xfffffe001450b410) locked @ /usr/src/sys/netinet/in.c:1484 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffff848d4f7690 kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffff848d4f7740 witness_warn() at witness_warn+0x4a8/frame 0xffffff848d4f7800 taskqueue_drain() at taskqueue_drain+0x3a/frame 0xffffff848d4f7840 set_timeout() at set_timeout+0x4a/frame 0xffffff848d4f7860 netevent_callback() at netevent_callback+0x16/frame 0xffffff848d4f7870 arpintr() at arpintr+0x9b5/frame 0xffffff848d4f7930 This do not affect kernel without OFED compiled in. Reported by: Garrett Cooper <yaneurabeya gmail com> Notes: svn path=/stable/9/; revision=250893
* MFC r227293 (by ed):Alexander Motin2013-04-052-2/+2
| | | | | | | | | Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. This means that their use is restricted to a single C file. Notes: svn path=/stable/9/; revision=249132
* MFC r242841:Xin LI2012-12-031-1/+1
| | | | | | | | Use %s when calling make_dev with a string pointer. This makes clang happy. Notes: svn path=/stable/9/; revision=243814
* MFC r242933:Dimitry Andric2012-11-211-4/+6
| | | | | | | | | | | | | | | | | | | Redo r242842, now actually fixing the warnings, as follows: - In sys/ofed/drivers/infiniband/core/cma.c, an enum struct member is interpreted as an int, so cast it to an int. - In sys/ofed/drivers/infiniband/core/ud_header.c, initialize the packet_length variable in ib_ud_header_init(), to prevent undefined behaviour. - In sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c, call rdma_notify() with the correct enum type and value. - In sys/ofed/include/linux/pci.h, change the PCI_DEVICE and PCI_VDEVICE macros to use C99 struct initializers, so additional members can be overridden. Reviewed by: delphij, Garrett Cooper <yanegomi@gmail.com> Notes: svn path=/stable/9/; revision=243375
* Merge r240680 from head:Gavin Atkinson2012-10-241-2/+2
| | | | | | | | | | | | | | | | | | Align the PCI Express #defines with the style used for the PCI-X #defines. This has the advantage that it makes the names more compact, and also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g In this MFC, #defines have been added for the old names to assist out-of-tree drivers. Notes: svn path=/stable/9/; revision=242015
* 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
* MFC r239065:Konstantin Belousov2012-09-081-0/+1
| | | | | | | | Stop including vm_param.h into vm_page.h. Include vm_param.h explicitely for the kernel code which needs it. Notes: svn path=/stable/9/; revision=240238
* MFC 233040,233198,233870,234183:John Baldwin2012-08-274-4/+6
| | | | | | | | | | | | | | | | Add OFED and the associated options and drivers to x86 LINT builds: - Fix build with INET6 disabled. - Fix build of OFED bits with debugging options enabled. - Fix build on i386. - Mark 'sdp' as requiring 'inet'. - Always include "opt_inet.h" and "opt_inet6.h" and modify the IB driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options to determine what should be enabled during a module build. - Fix the mlxen(4) driver and the core IB code to compile without if INET is disabled (including when both INET and INET6 are disabled). Notes: svn path=/stable/9/; revision=239748
* MFC 233547:John Baldwin2012-04-122-2/+2
| | | | | | | | | Use VM_MEMATTR_UNCACHEABLE instead of VM_MEMATTR_UNCACHED for UC mappings. VM_MEMATTR_UNCACHED is actually the x86-specific UC- mode (where a WC MTRR can override the PAT setting). Notes: svn path=/stable/9/; revision=234181
* MFC r228443:Matthew D Fleming2011-12-311-0/+2
| | | | | | | Do not define bool/true/false if the symbols already exist. Notes: svn path=/stable/9/; revision=229157
* 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
* Commit the support for removing cpumask_t and replacing it directly withAttilio Rao2011-05-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno Notes: svn path=/projects/largeSMP/; revision=221499
* - Catch up to falloc() changes.Jeff Roberson2011-04-262-1/+3
| | | | | | | | - PHOLD() before using a task structure on the stack. - Fix a LOR between the sleepq lock and thread lock in _intr_drain(). Notes: svn path=/head/; revision=221055