summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert r227538, since it doesn't compile with clang at all (it doesn'tdim2011-11-174-66/+2
| | | | | | | | | | | allow the built-in operations to be redefined, at least not without excessive force). Instead, just disable LLVM's support for atomic operations for now. Nothing in either clang or the tablegen tools currently depends on it. This still allows users of head built before r198344 to upgrade to top-of-head seamlessly.
* Change the way how "not implemented" AHCI channels handled. Instead ofmav2011-11-171-5/+6
| | | | | | | | | | completely skipping them, create ahcich devices for them to allocate unit numbers, but mark them as disabled to prevent driver probe and attach. Last time some BIOSes tend to report unused channels as "not implemented". This change makes ahcichX devices numbering consistent, independently of connected disks. It makes per-channel driver hints usable and CAM devices wiring possible on such systems.
* Some cleanup:brueffer2011-11-171-6/+10
| | | | | | - Start sentences on new lines - Mark up sysctl variables - Use %d in sysctl variables to denote the index, as we do in other manpages
* Wire the kernel text RWX, rather than RX. We're not quite readymarcel2011-11-171-1/+1
| | | | | | for having kernel text non-writable, because we still need to apply relocations. On top of that, the PBVM page table has all pages marked as RWX, so it's an inconsistency to begin with.
* Use a global __pure2 function instead of a global register variable fornwhitehorn2011-11-173-6/+23
| | | | | curthread, like on x86 and sparc64. This makes the kernel somewhat more clang friendly, which doesn't support global register variables.
* Add an extra invariant here which was useful on 64-bit CPUs.nwhitehorn2011-11-171-0/+2
|
* - be more precise about the unit of measurementeadler2011-11-171-1/+1
| | | | | | Submitted by: Oliver Pinter <oliver.pntr@gmail.com> Approved by: jhb MFC after: 3 days
* Do pmap update only on active CPUs.jchandra2011-11-171-98/+64
| | | | | | | | | | | | | | | The pmap update_page/invalidate_page/invalidate_all operations has to be done only on active cpus. In the simplest case, if the process is not active on any other CPUs, we can just do the operation on the current CPU. This change replaces the call to smp_rendezvous() for these operations with smp_rendezvous_cpus() in case there more than one active CPU, or with a direct function call if there is just one active CPU. This change give significant performance increase in fork/exec benchmarks on XLR/XLS/XLP with 32 cpus. Reviewed by: alc
* Fix typo.kib2011-11-171-2/+2
| | | | | Submitted by: arundel MFC after: 3 days
* Bring in support for netmap, a framework for very efficient packetluigi2011-11-1719-0/+7507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I/O from userspace, capable of line rate at 10G, see http://info.iet.unipi.it/~luigi/netmap/ At this time I am bringing in only the generic code (sys/dev/netmap/ plus two headers under sys/net/), and some sample applications in tools/tools/netmap. There is also a manpage in share/man/man4 [1] In order to make use of the framework you need to build a kernel with "device netmap", and patch individual drivers with the code that you can find in sys/dev/netmap/head.diff The file will go away as the relevant pieces are committed to the various device drivers, which should happen in a few days after talking to the driver maintainers. Netmap support is available at the moment for Intel 10G and 1G cards (ixgbe, em/lem/igb), and for the Realtek 1G card ("re"). I have partial patches for "bge" and am starting to work on "cxgbe". Hopefully changes are trivial enough so interested third parties can submit their patches. Interested people can contact me for advice on how to add netmap support to specific devices. CREDITS: Netmap has been developed by Luigi Rizzo and other collaborators at the Universita` di Pisa, and supported by EU project CHANGE (http://www.change-project.eu/) The code is distributed under a BSD Copyright. [1] In my opinion is a bad idea to have all manpage in one directory. We should place kernel documentation in the same dir that contains the code, which would make it much simpler to keep doc and code in sync, reduce the clutter in share/man/ and incidentally is the policy used for all of userspace code. Makefiles and doc tools can be trivially adjusted to find the manpages in the relevant subdirs.
* Add DTS for the Freescale P2020DS.raj2011-11-171-0/+754
| | | | Obtained from: Freescale
* Quirk all of ALCOR's mass storage devices instead ofhselasky2011-11-172-4/+3
| | | | | | | quirking individual devices. Submitted by: Dmitry Luhtionov MFC after: 1 week
* Eliminate end-of-line white space.alc2011-11-171-2/+2
|
* Pass CVWAIT flags to kernel, this should handledavidxu2011-11-171-3/+2
| | | | | | | | | timeout correctly for pthread_cond_timedwait when it uses kernel-based condition variable. PR: 162403 Submitted by: jilles MFC after: 3 days
* Upgrade to BIND 9.8.1-P1 to address the following DDOS bug:dougb2011-11-174-18/+21
| | | | | | | | | | | | | | | | | | | | Recursive name servers are failing with an assertion: INSIST(! dns_rdataset_isassociated(sigrdataset)) At this time it is not thought that authoritative-only servers are affected, but information about this bug is evolving rapidly. Because it may be possible to trigger this bug even on networks that do not allow untrusted users to access the recursive name servers (perhaps via specially crafted e-mail messages, and/or malicious web sites) it is recommended that ALL operators of recursive name servers upgrade immediately. For more information see: https://www.isc.org/software/bind/advisories/cve-2011-tbd which will be updated as more information becomes available. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313
* Disable PCIe ASPM (Active State Power Management) for allyongari2011-11-162-1/+22
| | | | | | | | | controllers. More and more RealTek controllers started to implement EEE feature. Vendor driver seems to load a kind of firmware for EEE with additional PHY fixups. It is known that the EEE feature may need ASPM support. Unfortunately there is no documentation for EEE of the controller so enabling ASPM may cause more problems.
* Add missing driver lock in SIOCSIFCAP handler.yongari2011-11-161-1/+3
|
* Add preliminary support for RTL8411 PCIe Gigabit ethernet withyongari2011-11-162-0/+3
| | | | | | integrated card reader. H/W donated by: RealTek Semiconductor Corp.
* Add helpful clarification text. While not strictly necessary, theseimp2011-11-161-3/+5
| | | | | few words make this man page much easier to understand without re-reading prior parts of the man page.
* Constify arguments for locking KPIs where possible.pjd2011-11-1617-92/+95
| | | | | | | This enables locking consumers to pass their own structures around as const and be able to assert locks embedded into those structures. Reviewed by: ed, kib, jhb
* Add preliminary support for RTL8402 PCIe FastEthernet withyongari2011-11-162-0/+3
| | | | | | integrated card reader. H/W donated by: RealTek Semiconductor Corp.
* Copy over the ASM_DECLARE_FUNCTION_SIZE macro from linux64.h. This macroandreast2011-11-161-0/+19
| | | | | | | | | | | | | | | | | | | | | declares the proper size of a function. Without this macro recent GNU as will complain about with: 'Error: .size expression for main does not evaluate to a constant.' Up to now we produce this: .L.main: .... .size main, .-main With the macro defined the output is this: .L.main: .... .size main,.-.L.main This affects only the 64-bit compiler. Tested with world and kernel on both, 32 and 64-bit powerpc.
* Enable 64bit DMA addressing support for all msk(4) controllers.yongari2011-11-162-67/+177
| | | | | | | | | | | | | | | | | | | | | | | Unnecessarily complex LE format used on Marvell controller was main reason not to enable 64bit DMA addressing in driver. If high 32bit address of DMA address of TX/RX buffer is changed, driver has to generate a new LE. In TX path, driver will keep track of lastly used high 32bit address of DMA address and generate a new LE whenever it sees high address change in the DMA address. In RX path, driver will always use two LEs to specify 64bit DMA address of RX buffer. If the high 32bit address of DMA address of RX buffer is the same as previous DMA address of RX buffer, driver does not have to use two LEs but driver will use two LEs for simplicity in RX ring management. One of draw back for switching to 64bit DMA addressing is that the large amount of LEs are used to specify 64bit DMA address such that number of available LEs for TX/RX buffers are considerably reduced. To mitigate the issue, increase number of available LEs from 256 to 384 for TX and from 256 to 512 for RX. For 32bit architectures, msk(4) does not use 64bit DMA addressing to save resources. Tested by: das
* Constify stack argument for functions that don't modify it.pjd2011-11-163-25/+26
| | | | Reviewed by: ed, kib, jhb
* Fix make universe.pjd2011-11-161-1/+1
|
* The sys/sysctl.h header is needed when MFI_DEBUG is defined.kib2011-11-161-0/+1
| | | | Nod from: jhb
* Fix build, use %d for int value formatting.kib2011-11-161-1/+1
|
* Add the sfxge(4) device driver, providing support for 10Gb Ethernet adaptersphilip2011-11-1650-0/+38419
| | | | | | | | | | | | | | based on Solarflare SFC9000 family controllers. The driver supports jumbo frames, transmit/receive checksum offload, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, and Receive Side Scaling (RSS) using MSI-X interrupts. This work was sponsored by Solarflare Communications, Inc. My sincere thanks to Ben Hutchings for doing a lot of the hard work! Sponsored by: Solarflare Communications, Inc. MFC after: 3 weeks
* Refactor the code that performs physically contiguous memory allocation,alc2011-11-166-116/+231
| | | | | | | | | | | | | | | | | | | | | | | | yielding a new public interface, vm_page_alloc_contig(). This new function addresses some of the limitations of the current interfaces, contigmalloc() and kmem_alloc_contig(). For example, the physically contiguous memory that is allocated with those interfaces can only be allocated to the kernel vm object and must be mapped into the kernel virtual address space. It also provides functionality that vm_phys_alloc_contig() doesn't, such as wiring the returned pages. Moreover, unlike that function, it respects the low water marks on the paging queues and wakes up the page daemon when necessary. That said, at present, this new function can't be applied to all types of vm objects. However, that restriction will be eliminated in the coming weeks. From a design standpoint, this change also addresses an inconsistency between vm_phys_alloc_contig() and the other vm_phys_alloc*() functions. Specifically, vm_phys_alloc_contig() manipulated vm_page fields that other functions in vm/vm_phys.c didn't. Moreover, vm_phys_alloc_contig() knew about vnodes and reservations. Now, vm_page_alloc_contig() is responsible for these things. Reviewed by: kib Discussed with: jhb
* Add single-message MSI support to mfi(4). It is disabled by default butjhb2011-11-165-10/+28
| | | | | | | | can be enabled via the hw.mfi.msi tunable. Many mfi(4) controllers also support MSI-X, but in testing it seems that many adapters do not work with MSI-X but do work with MSI. MFC after: 2 weeks
* Handle invalid large values for getdirentries(2) data buffer size.pho2011-11-161-22/+35
| | | | | | | In collaboration with: kib Reviewed by: des Reported by: The iknowthis syscall fuzzer. MFC after: 1 week
* Was chasing down a failure to load f/w on a 2400. It turns out that the cardmjacob2011-11-162-11/+58
| | | | | | is actually broken, or needs a BIOS upgrade for 64 bit loads, but this uncovered a couple of misplaced opcode definitions and some missing continual mbox command cases, so might as well update them here.
* The maximum TSO frame size should be:bz2011-11-161-1/+1
| | | | | | | | | | | | maximum IP datagram size (65535 bytes) + Ethernet header size (14 bytes) + 2 * VLAN tag size (4 bytes) [1]. [1] We need to multiply by 2 to account for the double VLAN tag provision added in IEEE 802.1ad. Submitted by: David Somayajulu (david.somayajulu qlogic.com) MFC after: 4 days
* Modify the new NFS client so that nfs_fsync() only calls ncl_flush()rmacklem2011-11-151-0/+10
| | | | | | | | | for regular files. Since other file types don't write into the buffer cache, calling ncl_flush() is almost a no-op. However, it does clear the NMODIFIED flag and this shouldn't be done by nfs_fsync() for directories. MFC after: 2 weeks
* Some brands of XHCI controllers needs more time to reset.hselasky2011-11-151-3/+3
| | | | | Reported by: Jan Henrik Sylvester MFC after: 1 week
* Set the MTU of an path to an approriate value if the interface MTUtuexen2011-11-151-16/+26
| | | | | | can't be determined. MFC after: 3 days.
* Define curthread as an inline function that loads the thread pointermarius2011-11-151-0/+10
| | | | | | | | directly from g7, the pcpu pointer. This guarantees correct behavior when the thread migrates to a different CPU. Commit message stolen from r205431. Additional testing by Peter Jeremy. MFC after: 3 days
* LLVM uses atomic operations, which are not supported on i386 and GCCdim2011-11-152-0/+60
| | | | | | | | | | | emits calls for them, rather than expanding them inline. Older FreeBSD versions compile for i386 by default and as such we end up with unresolved symbols when we build LLVM's TableGen utility as a build tool on them. Add the functions that GCC emits here, but don't bother to make them atomic. Such is not needed. Submitted by: marcel MFC after: 1 week
* As it turns out, r186347 actually is insufficient to avoid the use of themarius2011-11-157-51/+52
| | | | | | | | | | | | | | | | | | | | | | | | | curthread-accessing part of mtx_{,un}lock(9) when using a r210623-style curthread implementation on sparc64, crashing the kernel in its early cycles as PCPU isn't set up, yet (and can't be set up as OFW is one of the things we need for that, which leads to a chicken-and-egg problem). What happens is that due to the fact that the idea of r210623 actually is to allow the compiler to cache invocations of curthread, it factors out obtaining curthread needed for both mtx_lock(9) and mtx_unlock(9) to before the branch based on kobj_mutex_inited when compiling the kernel without the debugging options. So change kobj_class_compile_static(9) to just never acquire kobj_mtx, effectively restricting it to its documented use, and add a kobj_init_static(9) for initializing objects using a class compiled with the former and that also avoids using mutex(9) (and malloc(9)). Also assert in both of these functions that they are used in their intended way only. While at it, inline kobj_register_method() and kobj_unregister_method() as there wasn't much point for factoring them out in the first place and so that a reader of the code has to figure out the locking for fewer functions missing a KOBJ_ASSERT. Tested on powerpc{,64} by andreast. Reviewed by: nwhitehorn (earlier version), jhb MFC after: 3 days
* Further automate production release generation by naming files the rightnwhitehorn2011-11-152-0/+15
| | | | | | things and generating checksums. MFC after: 1 week
* - add support for Titan VScom PCIex-800Headler2011-11-151-0/+12
| | | | | | | PR: kern/124128 Submitted by: Maxim Frolov <maxim.frolov.07@gmail.com> (original) Approved by: jhb MFC after: 1 week
* - add support for Broadcom 802.11bg/EDGE/GPRS CardBus (Serial)eadler2011-11-151-1/+2
| | | | | | | | | - correct mislabeling of 0x432214e4 device PR: kern/119606 Submitted by: Joe Greco <jgreco@ns.sol.net> Approved by: jhb MFC after: 1 week
* Add netcat (nc) to /rescue.des2011-11-151-1/+1
| | | | MFC after: 3 weeks
* Update the device pager interface, while keeping the compatibilitykib2011-11-153-75/+175
| | | | | | | | | | | | | | | | | | | | | | | | layer for old KPI and KBI. New interface should be used together with d_mmap_single cdevsw method. Device pager can be allocated with the cdev_pager_allocate(9) function, which takes struct cdev_pager_ops, containing constructor/destructor and page fault handler methods supplied by driver. Constructor and destructor, called at the pager allocation and deallocation time, allow the driver to handle per-object private data. The pager handler is called to handle page fault on the vm map entry backed by the driver pager. Driver shall return either the vm_page_t which should be mapped, or error code (which does not cause kernel panic anymore). The page handler interface has a placeholder to specify the access mode causing the fault, but currently PROT_READ is always passed there. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month
* Remove the condition that is always true.kib2011-11-151-1/+1
| | | | | Submitted by: alc MFC after: 1 week
* On some laptops it is important to re-open /dev/psm after resume. moused(8)glebius2011-11-151-0/+4
| | | | | was capable to do this upon SIGHUP for more than a decade. Automate this via rc.resume in default installation.
* Removed extra PRELE() call.pho2011-11-151-2/+0
| | | | MFC after: 1 week
* KNFobrien2011-11-151-16/+17
|
* Improve the chances of matching an outputted string with the line of code.obrien2011-11-155-129/+161
|
* A regression test to ensure that arc4random returns different sequencesdas2011-11-152-1/+91
| | | | in parent and child processes after a fork.
OpenPOWER on IntegriCloud