summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a function attribute called `__malloc_like', which informs gccdas2009-01-312-2/+4
| | | | | | | | | | | | | | that the annotated function returns a pointer that doesn't alias any extant pointer. This results in a 50%+ speedup in microbenchmarks such as the following: char *cp = malloc(1), *buf = malloc(BUF); for (i = 0; i < BUF; i++) buf[i] = *cp; In real programs, your mileage will vary. Note that gcc already performs this optimization automatically for any function called `malloc', `calloc', `strdup', or `strndup' unless -fno-builtins is used.
* After r186194 the *fs_strategy() functions always return 0.bz2009-01-312-4/+2
| | | | | | | | So we are no longer interested in the error returned from the *fs_doio() functions. With that we can remove the error variable as its value is unused now. Submitted by: Christoph Mallon christoph.mallon@gmx.de
* Remove unused local variables.bz2009-01-318-20/+2
| | | | | | Submitted by: Christoph Mallon christoph.mallon@gmx.de Reviewed by: kib MFC after: 2 weeks
* Remove unused local MACROs.bz2009-01-312-3/+0
| | | | | Submitted by: Christoph Mallon christoph.mallon@gmx.de MFC after: 2 weeks
* There is no need to initialize the variable here.bz2009-01-311-2/+0
| | | | | | Submitted by: Christoph Mallon christoph.mallon@gmx.de Reviewed by: kib (as part of a larger patch) MFC after: 2 weeks
* Coalesce two consecutive #ifdef IPSEC blocks.bz2009-01-311-4/+1
| | | | | | | Move the skip_ipsec: label below the goto as we can never have ipsecrt set if we get to that label so there is no need to check. MFC after: 2 weeks
* Change some movl's to mov's. Newer GAS no longer accept 'movl' instructionsobrien2009-01-3112-48/+48
| | | | | | for moving between a segment register and a 32-bit memory location. Looked at by: jhb
* Remove dead code from #if 0:bz2009-01-311-4/+0
| | | | | | we do not have an ipsrcchk_rt anywhere else. MFC after: 2 weeks
* Like with r185713 make sure to not leak a lock as rtalloc1(9) returnsbz2009-01-315-9/+10
| | | | | | | | | | | | | | a locked route. Thus we have to use RTFREE_LOCKED(9) to get it unlocked and rtfree(9)d rather than just rtfree(9)d. Since the PR was filed, new places with the same problem were added with new code. Also check that the rt is valid before freeing it either way there. PR: kern/129793 Submitted by: Dheeraj Reddy <dheeraj@ece.gatech.edu> MFC after: 2 weeks Committed from: Bugathon #6
* Fix a typo in a comment.trhodes2009-01-311-1/+1
|
* Fix bug in hint.hdac.X.config parsing.mav2009-01-311-2/+2
|
* Remove 4 entirely unsued ip6 variables.bz2009-01-303-16/+4
| | | | | | | | Leave then in struct vinet6 to not break the ABI with kernel modules but mark them for removal so we can do it in one batch when the time is right. MFC after: 1 month
* Use NULL rather than 0 when comparing pointers.bz2009-01-301-2/+2
| | | | MFC after: 2 weeks
* - Remove superfluous commentgabor2009-01-301-2/+0
| | | | | PR: docs/129400 Submitted by: Gavin Atkinson <gavin@freebsd.org>
* Increment total_bounced busdma stat as required.thompsa2009-01-301-0/+2
|
* setup default fixed rates for static turbo and 11n;sam2009-01-291-6/+22
| | | | the 11n rates are pure guess
* set ni_txparms for static turbo modesam2009-01-291-6/+11
|
* setup default rate set for static turbo modesam2009-01-291-0/+1
|
* Define NULL to be __null in a case of gnu c++. This makes sentinel attributerdivacky2009-01-291-0/+4
| | | | | | | | | | | | | | work ok in C++. Note that we enable this only for gcc 4.x for any value of x. The __null was introduced in gcc 4.1 (in fact it was commited 12 days after release of gcc 4.0) and as we have never released any version of FreeBSD with gcc 4.0 nor ports support gcc 4.0.x this is a safe check. Using __GNUC_PREREQ__ would require us to include cdefs.h in params.h so we just check __GNUC__. Approved by: kib (mentor) Tested by: exp build of ports (done by pav) Tested by: make universe (done by me)
* Make sure the cdev doesn't go away while the filesystem is still mounted.trasz2009-01-291-0/+3
| | | | | | | | Otherwise dev2udev() could return garbage. Reviewed by: kib Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation
* Use si_drv1 to hold the softc for the adb_mouse character device instead ofjhb2009-01-291-1/+2
| | | | | | using devclass_get_softc(). Tested by: nwhitehorn
* If a process is a zombie and we couldn't identify another useful state,rwatson2009-01-291-0/+2
| | | | | | | | print out the state as "zombine" in preference to "unknown" when ^T is pressed. MFC after: 3 days Sponsored by: Google, Inc.
* - Allocate apic vectors on a per-cpu basis. This allows us to allocatejeff2009-01-2912-154/+306
| | | | | | | | more irqs as we have more cpus. This is principally useful on systems with msi devices which may want many irqs per-cpu. Discussed with: jhb Sponsored by: Nokia
* Make adb_mouse use dev2unit() instead of minor().ed2009-01-291-1/+1
| | | | | A real fix would be to migrate it to si_drv0 to store the softc directly, but this is the quickest way to fix it right now.
* Add one more debug level.mav2009-01-281-2/+2
|
* Add hw.sdhci.debug sysctl to control debug level.mav2009-01-281-20/+23
|
* Improve mmc driver verbose logging.mav2009-01-281-12/+78
| | | | Make requests logging controllable by hw.mmc.debug sysctl.
* Use a different value for the initial control word for the FPU state forjhb2009-01-282-0/+6
| | | | | | | | 32-bit processes. The value matches the initial setting used by FreeBSD/i386. Otherwise, 32-bit binaries using floating point would use a slightly different initial state when run on FreeBSD/amd64. MFC after: 1 week
* Update ubtbcmfw2 (aka usb2_bluetooth_fw) driveremax2009-01-281-225/+207
| | | | Reviewed by: HPS
* Make ng_ubt2 (aka usb2_bluetooth_ng) driver only attach as "generic" driveremax2009-01-281-0/+3
| | | | Reviewed by: HPS
* Mark most often used sysctl's as MPSAFE.ed2009-01-284-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | After running a `make buildkernel', I noticed most of the Giant locks in sysctl are only caused by a very small amount of sysctl's: - sysctl.name2oid. This one is locked by SYSCTL_LOCK, just like sysctl.oidfmt. - kern.ident, kern.osrelease, kern.version, etc. These are just constant strings. - kern.arandom, used by the stack protector. It is already protected by arc4_mtx. I also saw the following sysctl's show up. Not as often as the ones above, but still quite often: - security.jail.jailed. Also mark security.jail.list as MPSAFE. They don't need locking or already use allprison_lock. - kern.devname, used by devname(3), ttyname(3), etc. This seems to reduce Giant locking inside sysctl by ~75% in my primitive test setup.
* Use the correct field name for the size of the sierra_id. While thisimp2009-01-281-1/+1
| | | | | | is the same size as id, and is unlikely to change, it seems better to use the correct field here. There's no difference in the generated code.
* Convert the global mutex protecting the directory lookup name cache from ajhb2009-01-281-46/+81
| | | | | | | mutex to a reader/writer lock. Lookup operations first grab a read lock and perform the lookup. If the operation results in a need to modify the cache, then it tries to do an upgrade. If that fails, it drops the read lock, obtains a write lock, and redoes the lookup.
* Mark cd9660 MPSAFE and add support for using shared vnode locks duringjhb2009-01-284-50/+114
| | | | | | | | | | | | | | | | | | | | | | pathname lookups. - Remove 'i_offset' and 'i_ino' from the ISO node structure and replace them with local variables in the lookup routine instead. - Cache a copy of 'i_diroff' for use during a lookup in a local variable. - Save a copy of the found directory entry in a malloc'd buffer after a successfull lookup before getting the vnode. This allows us to release the buffer holding the directory block before calling vget() which otherwise resulted in a LOR between "bufwait" and the vnode lock. - Use an inlined version of vn_vget_ino() to handle races with .. lookups. I had to inline the code here since cd9660 uses an internal vget routine to save a disk I/O that would otherwise re-read the directory block. - Honor the requested locking flags during lookups to allow for shared locking. - Honor the requested locking flags passed to VFS_ROOT() and VFS_VGET() similar to UFS. - Don't make every ISO 9660 vnode hold a reference on the vnode of the underlying device vnode of the mountpoint. The mountpoint already holds a suitable reference.
* Sync with ufs_vnops.c:1.245 and remove support for accessing device nodesjhb2009-01-281-3/+7
| | | | in ISO 9660 filesystems.
* add an assert to verify the number of channels returned by ic_getradiocapssam2009-01-281-0/+2
| | | | | | correlates with the size of the channel array passed down might want to promote this to be always present to catch for driver errors
* change null_getradiocaps to return the actual count of channels insteadsam2009-01-281-1/+1
| | | | | of the true number; otherwise the caller may use the count to do things with the data it should not (e.g. sort the channel table)
* Actually remove the VA_MARK_ATIME flag. This should have been in thejhb2009-01-281-1/+0
| | | | earlier commit to add VOP_MARKATIME().
* Assert an exclusive vnode lock for fifo_cleanup() and fifo_close() sincejhb2009-01-281-2/+2
| | | | | | they change v_fifoinfo. Discussed with: ups (a while ago)
* Overhaul regulatory support:sam2009-01-2839-3424/+2412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o remove HAL_CHANNEL; convert the hal to use net80211 channels; this mostly involves mechanical changes to variable names and channel attribute macros o gut HAL_CHANNEL_PRIVATE as most of the contents are now redundant with the net80211 channel available o change api for ath_hal_init_channels: no more reglass id's, no more outdoor indication (was a noop), anM contents o add ath_hal_getchannels to have the hal construct a channel list without altering runtime state; this is used to retrieve the calibration list for the device in ath_getradiocaps o add ath_hal_set_channels to take a channel list and regulatory data from above and construct internal state to match (maps frequencies for 900MHz cards, setup for CTL lookups, etc) o compact the private channel table: we keep one private channel per frequency instead of one per HAL_CHANNEL; this gives a big space savings and potentially improves ani and calibration by sharing state (to be seen; didn't see anything in testing); a new config option AH_MAXCHAN controls the table size (default to 96 which was chosen to be ~3x the largest expected size) o shrink ani state and change to mirror private channel table (one entry per frequency indexed by ic_devdata) o move ani state flags to private channel state o remove country codes; use net80211 definitions instead o remove GSM regulatory support; it's no longer needed now that we pass in channel lists from above o consolidate ADHOC_NO_11A attribute with DISALLOW_ADHOC_11A o simplify initial channel list construction based on the EEPROM contents; we preserve country code support for now but may want to just fallback to a WWR sku and dispatch the discovered country code up to user space so the channel list can be constructed using the master regdomain tables o defer to net80211 for max antenna gain o eliminate sorting of internal channel table; now that we use ic_devdata as an index, table lookups are O(1) o remove internal copy of the country code; the public one is sufficient o remove AH_SUPPORT_11D conditional compilation; we always support 11d o remove ath_hal_ispublicsafetysku; not needed any more o remove ath_hal_isgsmsku; no more GSM stuff o move Conformance Test Limit (CTL) state from private channel to a lookup using per-band pointers cached in the private state block o remove regulatory class id support; was unused and belongs in net80211 o fix channel list construction to set IEEE80211_CHAN_NOADHOC, IEEE80211_CHAN_NOHOSTAP, and IEEE80211_CHAN_4MSXMIT o remove private channel flags CHANNEL_DFS and CHANNEL_4MS_LIMIT; these are now set in the constructed net80211 channel o store CHANNEL_NFCREQUIRED (Noise Floor Required) channel attribute in one of the driver-private flag bits of the net80211 channel o move 900MHz frequency mapping into the hal; the mapped frequency is stored in the private channel and used throughout the hal (no more mapping in the driver and/or net80211) o remove ath_hal_mhz2ieee; it's no longer needed as net80211 does the calculation and available in the net80211 channel o change noise floor calibration logic to work with compacted private channel table setup; this may require revisiting as we no longer can distinguish channel attributes (e.g. 11b vs 11g vs turbo) but since the data is used only to calculate status data we can live with it for now o change ah_getChipPowerLimits internal method to operate on a single channel instead of all channels in the private channel table o add ath_hal_gethwchannel to map a net80211 channel to a h/w frequency (always the same except for 900MHz channels) o add HAL_EEBADREG and HAL_EEBADCC status codes to better identify regulatory problems o remove CTRY_DEBUG and CTRY_DEFAULT enum's; these come from net80211 now o change ath_hal_getwirelessmodes to really return wireless modes supported by the hardware (was previously applying regulatory constraints) o return channel interference status with IEEE80211_CHANSTATE_CWINT (should change to a callback so hal api's can take const pointers) o remove some #define's no longer needed with the inclusion of <net80211/_ieee80211.h> Sponsored by: Carlson Wireless
* Last step of splitting up minor and unit numbers: remove minor().ed2009-01-2811-29/+18
| | | | | | | | | | | | | | | | | | | | | | | Inside the kernel, the minor() function was responsible for obtaining the device minor number of a character device. Because we made device numbers dynamically allocated and independent of the unit number passed to make_dev() a long time ago, it was actually a misnomer. If you really want to obtain the device number, you should use dev2udev(). We already converted all the drivers to use dev2unit() to obtain the device unit number, which is still used by a lot of drivers. I've noticed not a single driver passes NULL to dev2unit(). Even if they would, its behaviour would make little sense. This is why I've removed the NULL check. Ths commit removes minor(), minor2unit() and unit2minor() from the kernel. Because there was a naming collision with uminor(), we can rename umajor() and uminor() back to major() and minor(). This means that the makedev(3) manual page also applies to kernel space code now. I suspect umajor() and uminor() isn't used that often in external code, but to make it easier for other parties to port their code, I've increased __FreeBSD_version to 800062.
* While OpenBSD's crypto/ framework has sha1 and md5 implementations thatbz2009-01-281-1/+6
| | | | | | | | | can cope with a result buffer of NULL in the "Final" function, we cannot. Thus pass in a temporary buffer long enough for either md5 or sha1 results so that we do not panic. PR: bin/126468 MFC after: 1 week
* initialize a couple of variables, gcc 4.2.4-4 (linux) reportsluigi2009-01-281-1/+2
| | | | some possible uninitialized uses and the warning does make sense.
* For some reason (probably dating ages ago) an #ifdef SYSCTL_NODE / #endifluigi2009-01-281-2/+5
| | | | | | | | | | section included a lot of stuff that did not belong there. So split the block in multiple components each around the relevant stuff. This said, I wonder if building a kernel where SYSCTL_NODE is not defined is supported at all. Submitted by: Marta Carbone
* Fix typo in last commit.glebius2009-01-281-1/+1
|
* Remove remain <= MHLEN restriction in m_makespace(),vanhu2009-01-281-52/+53
| | | | | | | | | | which caused assert with big packets PR: kern/124609 Submitted by: fabien.thomas@netasq.com Approved by: gnn(mentor) Obtained from: NetBSD MFC after: 1 month
* at91dci isn't useful except on arm.imp2009-01-281-1/+2
|
* Fix parsing of acregmin, acregmax, acdirmin and acdirmax NFS mount optionsrodrigc2009-01-281-4/+8
| | | | | | when passed as strings via nmount(). Submitted by: Jaakko Heinonen <jh saunalahti fi>
* Extend channel definition with:sam2009-01-271-0/+3
| | | | | | | | o max antenna gain o driver private opaque data Note this grows the size of a channel to 16 bytes; which makes the default channel table 4Kbytes (up from 3Kbytes).
* fix commentsam2009-01-271-1/+1
|
OpenPOWER on IntegriCloud