summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Further reduce diffs with OpenBSD's arc4random. The main functionaldas2011-11-151-33/+30
| | | | | | | | | | | | | | | | change here is to ensure that when a process forks after arc4random is seeded, the parent and child don't observe the same random sequence. OpenBSD's fix introduces some additional overhead in the form of a getpid() call. This could be improved upon, e.g., by setting a flag in fork(), if it proves to be a problem. This was discussed with secteam (simon, csjp, rwatson) in 2008, shortly prior to my going out of town and forgetting all about it. The conclusion was that the problem with forks is worrisome, but it doesn't appear to have introduced an actual vulnerability for any known programs. The only significant remaining difference between our arc4random and OpenBSD's is in how we seed the generator in arc4_stir().
* Sync the style, comments, and variable names of arc4random.c withdas2011-11-151-39/+33
| | | | | | | | | | OpenBSD's version (r1.22). While some of our style changes were indeed small improvements, being able to easily track functionality changes in OpenBSD seems more useful. Also fix style bugs in the FreeBSD-specific parts of this file. No functional changes, as verified with md5.
* Reformat comment to be more readable in standard Xterm.obrien2011-11-151-13/+18
| | | | (while I'm here, wrap other long lines)
* Move the setting of the default value for nm_wcommitsize tormacklem2011-11-151-1/+4
| | | | | | | | | | | | | | before the nfs_decode_args() call in the new NFS client, so that a specfied command line value won't be overwritten. Also, modify the calculation for small values of desiredvnodes to avoid an unusually large value or a divide by zero crash. It seems that the default value for nm_wcommitsize is very conservative and may need to change at some time. PR: kern/159351 Submitted by: onwahe at gmail.com (earlier version) Reviewed by: jhb MFC after: 2 weeks
* Re-apply r227466 to generate hardware notes for mps(4) and mvs(4), the issuesbrueffer2011-11-141-0/+4
| | | | | | | | were fixes. Thanks to: gjb, manolis Pointy hat ++: brueffer MFC after: 3 days
* Remove list nesting in the hardware notes section, thus making it compatible ↵brueffer2011-11-141-8/+8
| | | | | | | | with the hardware notes generation script. MFC after: 3 days
* Clarify hw.ti.%d.dac tunable.yongari2011-11-141-1/+1
|
* Document newly introduced a loader tunable and sysctl variables.yongari2011-11-141-1/+88
|
* Overhaul bus_dma(9) usage in driver:yongari2011-11-142-403/+604
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't use a single big DMA block for all rings. Create separate DMA area for each ring instead. Currently the following DMA areas are created: Event ring, standard RX ring, jumbo RX ring, RX return ring, hardware MAC statistics and producer/consumer status area. For Tigon II, mini RX ring and TX ring are additionally created. - Added missing bus_dmamap_sync(9) in various TX/RX paths. - TX ring is no longer created for Tigon 1 such that it saves more resources on Tigon 1. - Data sheet is not clear about alignment requirement of each ring so use 32 bytes alignment for normal DMA area but use 64 bytes alignment for jumbo RX ring where the extended RX descriptor size is 64 bytes. - For each TX/RX buffers use separate DMA tag(e.g. the size of a DMA segment, total size of DMA segments etc). - Tigon allows separate DMA area for event producer, RX return producer and TX consumer which is really cool feature. This means TX and RX path could be independently run in parallel. However ti(4) uses a single driver lock so it's meaningless to have separate DMA area for these producer/consumer such that this change creates a single status DMA area. - It seems Tigon has no limits on DMA address space and I also don't see any problem with that but old comments in driver indicates there could be issues on descriptors being located in 64bit region. Introduce a tunable, dev.ti.%d.dac, to disable using 64bit DMA in driver. The default is 0 which means it would use full 64bit DMA. If there are DMA issues, users can disable it by setting the tunable to 0. - Do not increase watchdog timer in ti_txeof(). Previously driver increased the watchdog timer whenever there are queued TX frames. - When stat ticks is set to 0, skip processing ti_stats_update(), avoiding bus_dmamap_sync(9) and updating if_collisions counter. - MTU does not include FCS bytes, replace it with ETHER_VLAN_ENCAP_LEN. With these changes, ti(4) should work on PAE environments. Many thanks to Jay Borkenhagen for remote hardware access.
* - add my co-mentorsrm2011-11-141-0/+2
| | | | Approved by: novel (mentor)
* Temporary revert r227009 to fix freeze on UP systems without PREEMPTION.mav2011-11-141-27/+12
| | | | | | | | | | | Before r215687, if some withered geom or provider could not be destroyed, g_event thread went to sleep for 0.1s before retrying. After that change it is just restarting immediately. r227009 made orphaned (withered) provider to not detach immediately, but only after context switch. That made loop inside g_event thread infinite on UP systems without PREEMPTION. To address original problem with possible dead lock addressed by r227009 we have to fix r215687 change first, that needs some time to think and test.
* Export sysctl node for various interrupt moderation parameters andyongari2011-11-141-14/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | have administrators control them. ti(4) provides a character device to control various other features of driver via ioctls but users had to write their own code to manipulate these parameters. It seems some default values for these parameters are not optimal on today's system but leave it as it was and let administrators change them. The following parameters could be changed: dev.ti.%d.rx_coal_ticks dev.ti.%d.rx_max_coal_bds dev.ti.%d.tx_coal_ticks dev.ti.%d.tx_max_coal_bds dev.ti.%d.tx_buf_ratio dev.ti.%d.stat_ticks The interface has to be brought down and up again before a change takes effect. ti(4) controller supports hardware MAC counters with additional DMA statistics. So it's doable to export these counters via sysctl interface. Unfortunately, these counters are cumulative such that driver have to either send an explicit clear command to controller after extracting them or have to maintain internal counters to get actual changes. Neither look good to me so counters were not exported via sysctl.
* Add DTS for the Freescale P1020RDB.marcel2011-11-141-0/+627
|
* Finish making 'wcommitsize' an NFS client mount option.jhb2011-11-144-2/+31
| | | | | Reviewed by: rmacklem MFC after: 1 week
* Add DTS for the Freescale P3041DS.marcel2011-11-141-0/+753
|
* It's bad idea to allocate large memory, 4KB, from stack.yongari2011-11-142-29/+35
| | | | | | | Pre-allocate the memory in device attach time. While I'm here remove unnecessary reassignment of error variable as it was already initialized. Also added a missing driver lock in TIIOCSETTRACE handler.
* Sync with the old NFS client: Remove an obsolete comment.jhb2011-11-141-2/+0
|
* Remove a few bits of FreeBSD 2.x compatibility code.rmh2011-11-143-10/+3
| | | | Approved by: kib (mentor)
* - Split out a kern_posix_fadvise() from the posix_fadvise() system call sojhb2011-11-143-37/+39
| | | | | | | it can be used by in-kernel consumers. - Make kern_posix_fallocate() public. - Use kern_posix_fadvise() and kern_posix_fallocate() to implement the freebsd32 wrappers for the two system calls.
* mdoc fix for r227499.andre2011-11-141-1/+2
| | | | Reported by: brueffer
* Remove mention of ss_fltsz and ss_fltsz_local which were retired in r226447.andre2011-11-141-18/+1
|
* Note the ip_len bug fixed in r226105 in the BUGS section.andre2011-11-141-1/+7
|
* Import upstream changesets for the output of the "zpool" command:mm2011-11-141-4/+41
| | | | | | | | | | | | 952 separate intent logs should be obvious in 'zpool iostat' output 1337 `zpool status -D' should tell if there are no DDT entries References: https://www.illumos.org/issues/952 https://www.illumos.org/issues/1337 Obtained from: Illumos (issues 952, 1337; changesets 13384, 13432) MFC after: 1 week
* Constify args to copyiniov and copyinuio.alfred2011-11-142-4/+4
|
* Since NFSv4 byte range locking only works for regular files,rmacklem2011-11-141-0/+2
| | | | | | add a sanity check for the vnode type to the NFSv4 client. MFC after: 2 weeks
* Move the assignment of default values for some mount optionsrmacklem2011-11-131-3/+9
| | | | | | | to before the nfs_decode_args() call in the new NFS client, so they don't overwrite the value specified on the command line. MFC after: 2 weeks
* - new sentence should start on new line.eadler2011-11-131-2/+2
| | | | | | PR: bin/146541 Submitted by: bjk Approved by: bjk
* Hide some more macros that will break C++ when compiling in C++ mode.theraven2011-11-131-1/+3
| | | | Approved by: dim (mentor)
* - fix duplicate "a a" in some commentseadler2011-11-138-8/+8
| | | | | | Submitted by: eadler Approved by: simon MFC after: 3 days
* - add "check" option to MD5 and friends to compare files against known hash.eadler2011-11-132-8/+40
| | | | | | | | | PR: bin/146541 Submitted by: eadler Reviewed by: jhell@dataix.net Approved by: secteam (cperciva) Approved by: cperciva MFC after: 3 weeks
* The spec says that FILE must be defined in wchar.h, but it wasn't. Ittheraven2011-11-132-20/+28
| | | | | | | is now. Also hide some macros in C++ mode that will break C++ namespaced calls. Approved by: dim (mentor)
* Don't copy uninitialized memory. Also simplify the comparisontuexen2011-11-131-15/+5
| | | | | | of interface names. MFC after: 3 days.
* To limit amount of the kernel memory allocated, and to optimize thekib2011-11-131-3/+63
| | | | | | | | | | | | | | | | | | | iteration over the fdsets, kern_select() limits the length of the fdsets copied in by the last valid file descriptor index. If any bit is set in a mask above the limit, current implementation ignores the filedescriptor, instead of returning EBADF. Fix the issue by scanning the tails of fdset before entering the select loop and returning EBADF if any bit above last valid filedescriptor index is set. The performance impact of the additional check is only imposed on the (somewhat) buggy applications that pass bad file descriptors to select(2) or pselect(2). PR: kern/155606, kern/162379 Discussed with: cognet, glebius Tested by: andreast (powerpc, all 64/32bit ABI combinations, big-endian), marius (sparc64, big-endian) MFC after: 2 weeks
* Fix spelling of extract.alfred2011-11-131-2/+2
| | | | Pointed out by: gcooper
* Utilize shell's IFS instead of forking ~6 processes toalfred2011-11-131-48/+70
| | | | | | | | handle splitting input files on a '|'. This greatly reduces the time taken to process several databases during the update process. Additionally add some more debug logging.
OpenPOWER on IntegriCloud