summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* reorder a couple of cases of void __inline to __inline voidjulian2005-08-081-3/+3
| | | | | | | to silence warnings from compilig with -W Submitted by: sandvine inc MFC after: 1 week
* Merge the dev_clone and dev_clone_cred event handlers into a singlerwatson2005-08-0818-40/+51
| | | | | | | | | | | | | event handler, dev_clone, which accepts a credential argument. Implementors of the event can ignore it if they're not interested, and most do. This avoids having multiple event handler types and fall-back/precedence logic in devfs. This changes the kernel API for /dev cloning, and may affect third party packages containg cloning kernel modules. Requested by: phk MFC after: 3 days
* Be case-insensitive when dealing with algorithm names.pjd2005-08-081-4/+5
| | | | | PR: kern/84659 Submitted by: Benjamin Lutz <benlutz@datacomm.ch>
* Add support for HP branded 2610SAps2005-08-081-0/+2
| | | | | MFC after: 3 days Approved by: scottl
* Ha! This is a very interesting bug.pjd2005-08-081-4/+6
| | | | | | | | | | | I copied strcasecmp() from userland to the kernel and it didn't worked! I started to debug the problem and I find out that this line: while (tolower(*us1) == tolower(*us2++)) { was adding _3_ bytes to 'us2' pointer. Am I loosing my minds here?!... No, in-kernel tolower() is a macro which uses its argument three times. Bad tolower(9), no cookie.
* Check to see if we wired the user-supplied buffers in SYSCTL_OUT, ifcsjp2005-08-081-1/+6
| | | | | | | | | | | | the buffer has not been wired and we are holding any non-sleep-able locks, drop a witness warning. If the buffer has not been wired, it is possible that the writing of the data can sleep, especially if the page is not in memory. This can result in a number of different locking issues, including dead locks. MFC after: 1 week Discussed with: rwatson Reviewed by: jhb
* Split crypto tx+rx key indices and add a key index -> node mapping table:sam2005-08-0810-157/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Crypto changes: o change driver/net80211 key_alloc api to return tx+rx key indices; a driver can leave the rx key index set to IEEE80211_KEYIX_NONE or set it to be the same as the tx key index (the former disables use of the key index in building the keyix->node mapping table and is the default setup for naive drivers by null_key_alloc) o add cs_max_keyid to crypto state to specify the max h/w key index a driver will return; this is used to allocate the key index mapping table and to bounds check table loookups o while here introduce ieee80211_keyix (finally) for the type of a h/w key index o change crypto notifiers for rx failures to pass the rx key index up as appropriate (michael failure, replay, etc.) Node table changes: o optionally allocate a h/w key index to node mapping table for the station table using the max key index setting supplied by drivers (note the scan table does not get a map) o defer node table allocation to lateattach so the driver has a chance to set the max key id to size the key index map o while here also defer the aid bitmap allocation o add new ieee80211_find_rxnode_withkey api to find a sta/node entry on frame receive with an optional h/w key index to use in checking mapping table; also updates the map if it does a hash lookup and the found node has a rx key index set in the unicast key; note this work is separated from the old ieee80211_find_rxnode call so drivers do not need to be aware of the new mechanism o move some node table manipulation under the node table lock to close a race on node delete o add ieee80211_node_delucastkey to do the dirty work of deleting unicast key state for a node (deletes any key and handles key map references) Ath driver: o nuke private sc_keyixmap mechansim in favor of net80211 support o update key alloc api These changes close several race conditions for the ath driver operating in ap mode. Other drivers should see no change. Station mode operation for ath no longer uses the key index map but performance tests show no noticeable change and this will be fixed when the scan table is eliminated with the new scanning support. Tested by: Michal Mertl, avatar, others Reviewed by: avatar, others MFC after: 2 weeks
* Add strcasecmp() and strncasecmp() to libkern and connect to the build.pjd2005-08-083-0/+72
|
* Insert a series of place-holder function pointers in mac_policy.h forrwatson2005-08-082-0/+50
| | | | | | | | | | | | | | | entry points that will be inserted over the life-time of the 6.x branch, including for: - New struct file labeling (void * already added to struct file), events, access control checks. - Additional struct mount access control checks, internalization/ externalization. - mac_check_cap() - System call enter/exit check and event. - Socket and vnode ioctl entry points. MFC after: 3 days
* Try best to keep a preempted thread at front of run queue, this seemsdavidxu2005-08-081-1/+9
| | | | | improved performance a bit for some workloads, but still seeing interactive lagging unless cpu idling race is fixed.
* Retire the last of the FreeBSD 4.x compat code from the mly driver.scottl2005-08-082-15/+1
|
* Retire the FreeBSD 4.x compat code and __FreeBSD_version checks from the aacscottl2005-08-082-65/+0
| | | | driver.
* Complete the removal of __FreeBSD_version checks from the amr driver. Thescottl2005-08-085-114/+6
| | | | | driver had advanced enough over the years that direct sharing of code with FreeBSD 4.x was in no way possible anymore.
* use ieee80211_iterate_nodes to retrieve station data; the previoussam2005-08-081-45/+89
| | | | | | code walked the list w/o locking MFC after: 1 week
* Fix typo so QUEUE_MACRO_DEBUG works again.phk2005-08-081-1/+1
| | | | | PR: 84654 Submitted by: Antoine.Pelisse@xloling.org (apelisse@gmail.com)
* Cleanup beacon/listen interval handling:sam2005-08-0810-17/+32
| | | | | | | | | | | | | | | | | o separate configured beacon interval from listen interval; this avoids potential use of one value for the other (e.g. setting powersavesleep to 0 clobbers the beacon interval used in hostap or ibss mode) o bounds check the beacon interval received in probe response and beacon frames and drop frames with bogus settings; not clear if we should instead clamp the value as any alteration would result in mismatched sta+ap configuration and probably be more confusing (don't want to log to the console but perhaps ok with rate limiting) o while here up max beacon interval to reflect WiFi standard Noticed by: Martin <nakal@nurfuerspam.de> MFC after: 1 week
* Remove a stale __FreeBSD_version check.scottl2005-08-071-5/+3
|
* The presence of a on __FreeBSD_version flagged some code that hasn't been inscottl2005-08-071-23/+4
| | | | the right spot since the FreeBSD 3.x days, if not earlier.
* Other changes to this driver preclude its use on 4.x, so remove 4.x compatimp2005-08-071-4/+0
| | | | code elsewhere in the driver.
* When support for 2MB/4MB pages was added in revision 1.148 an error wasalc2005-08-072-2/+0
| | | | | | | | | made in pmap_protect(): The pmap's resident count should not be reduced unless mappings are removed. The errant change to the pmap's resident count could result in a later pmap_remove() failing to remove any mappings if the errant change has set the pmap's resident count to zero.
* Recognize the SAB82532 in USIII machines.marius2005-08-073-4/+5
|
* The system tick _compare_ register of USIII CPUs and up is ASR25, notmarius2005-08-071-1/+1
| | | | ASR24 (which is the system tick register).
* Add if_arl_load, if_axe_load, if_aue_load, if_cs_load, if_cue_load,krion2005-08-071-1/+10
| | | | | | | if_hme_load, if_nve_load, if_rue_load, if_udav_load to Networking Drivers section. Submitted by: matteo
* Export a routine, kobj_machdep_init(), that allows platformsgrehan2005-08-072-2/+16
| | | | | | | to use the kobj subsystem as soon at mutex_init() has been called instead of having to wait for the SI_SUB_LOCK sysinit. Reviewed by: dfr
* Revert last change, I will turn ULE on as default after 6.0-R.davidxu2005-08-061-2/+2
| | | | Noticed by: scottl
* Improve SMP support:marcel2005-08-069-320/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Allocate a VHPT per CPU. The VHPT is a hash table that the CPU uses to look up translations it can't find in the TLB. As such, the VHPT serves as a level 1 cache (the TLB being a level 0 cache) and best results are obtained when it's not shared between CPUs. The collision chain (i.e. the hash bucket) is shared between CPUs, as all buckets together constitute our collection of PTEs. To achieve this, the collision chain does not point to the first PTE in the list anymore, but to a hash bucket head structure. The head structure contains the pointer to the first PTE in the list, as well as a mutex to lock the bucket. Thus, each bucket is locked independently of each other. With at least 1024 buckets in the VHPT, this provides for sufficiently finei-grained locking to make the ssolution scalable to large SMP machines. o Add synchronisation to the lazy FP context switching. We do this with a seperate per-thread lock. On SMP machines the lazy high FP context switching without synchronisation caused inconsistent state, which resulted in a panic. Since the use of the high FP registers is not common, it's possible that races exist. The ia64 package build has proven to be a good stress test, so this will get plenty of exercise in the near future. o Don't use the local ID of the processor we want to send the IPI to as the argument to ipi_send(). use the struct pcpu pointer instead. The reason for this is that IPI delivery is unreliable. It has been observed that sending an IPI to a CPU causes it to receive a stray external interrupt. As such, we need a way to make the delivery reliable. The intended solution is to queue requests in the target CPU's per-CPU structure and use a single IPI to inform the CPU that there's a new entry in the queue. If that IPI gets lost, the CPU can check it's queue at any convenient time (such as for each clock interrupt). This also allows us to send requests to a CPU without interrupting it, if such would be beneficial. With these changes SMP is almost working. There are still some random process crashes and the machine can hang due to having the IPI lost that deals with the high FP context switch. The overhead of introducing the hash bucket head structure results in a performance degradation of about 1% for UP (extra pointer indirection). This is surprisingly small and is offset by gaining reasonably/good scalable SMP support.
* Reduce the default MAXCPU from 16 to 4. This is in preparation ofmarcel2005-08-061-1/+1
| | | | | | | | allocating a VHPT per CPU. Since we don't yet know how many CPUs are actually in the system at the time we need to allocate the VHPTs, we allocate for MAXCPU processors. This can result in a lot of wasted space for 2-way machines. So, for now, limit MAXCPU to something smaller until we have something more dynamic.
* For ia64_ptc_{e,g,ga,l}(), use instruction serialization. Wemarcel2005-08-061-4/+4
| | | | | typically don't know what the TLB described and need to assume that it affects the fetching of instructions.
* Add hints for uart(4). These are the same as for sio(4) and make itmarcel2005-08-061-0/+7
| | | | easier to switch from sio(4) to uart(4).
* destroy lock _before_ free'ing the structure it resides insam2005-08-061-2/+1
|
* Add if_ath_load (default NO) in Networking Drivers section.krion2005-08-061-0/+1
| | | | | PR: conf/80870 Submitted by: Hasan Cana <vpb at albabsd dot org>
* Make ULE as default scheduler, allow it to be tested more widely.davidxu2005-08-061-2/+2
|
* Change the data type of the upper shared memory limits from a signedcsjp2005-08-062-14/+14
| | | | | | | | | | | | integer to an unsigned long. This lifts variables like the maximum number of pages available for shared memory from 2^31 to 2^32 on 32 bit architectures, and from 2^31 to 2^64 on 64 bit architectures. It should be noted that this changes breaks ABI on 64 bit architectures because the size of the shmmax, shmmin, shmmni, shmseg and shmall members of the shminfo structure has changed. Silence on: current@
* fix debug msg typosam2005-08-061-1/+1
| | | | MFC after: 3 days
* Fix handling of frames sent prior to a station being authorizedsam2005-08-063-2/+40
| | | | | | | | | | | | when operating in ap mode. Previously we allocated a node from the station table, sent the frame (using the node), then released the reference that "held the frame in the table". But while the frame was in flight the node might be reclaimed which could lead to problems. The solution is to add an ieee80211_tmp_node routine that crafts a node that does exist in a table and so isn't ever reclaimed; it exists only so long as the associated frame is in flight. MFC after: 5 days
* Holding a vnode doesn't prevent v_mount from disappearing (when thessouhlal2005-08-063-4/+5
| | | | | | | | | | | | vnode is inactivated), possibly leading to a NULL dereference when checking if the mount wants knotes to be activated in the VOP hooks. So, we add a new vnode flag VV_NOKNOTE that is only set in getnewvnode(), if necessary, and check it when activating knotes. Since the flags are not erased when a vnode is being held, we can safely read them. Reviewed by: kris@ MFC after: 3 days
* The kernel is usually at /boot/kernel/kernel nowadays.ssouhlal2005-08-062-2/+2
| | | | | PR: i386/81756 Submitted by: trasz <trasz@buziaczek.pl>
* When summing capacities, skip info from batteries that weren't present.njl2005-08-051-0/+4
| | | | | | | | Previously, we used all info (including -1 or "not present") which would keep the system from reaching 100% when charging. Reported by: Eric Anderson MFC after: 2 days
* Fix up the locking in pcn(4) and mark it MPSAFE.jhb2005-08-052-36/+60
| | | | | | | | | | | | | - Add locked versions of the init() and start() methods. - Use callout_*() rather than timeout(). - Make the driver lock non-recursive. - Push down locking in detach() and ioctl(). - Fix the tick routine to bail if the interface has been stopped and use callout_drain() in detach() after the call to stop(). - Lock the driver lock in the ifmedia handlers. Tested by: Ketrien I. Saihr-Kesenchedra ketrien at error404.nls.net MFC after: 1 week
* Allow the array number to be read back on atacontrol createsos2005-08-051-1/+1
|
* Add support for the ITE IT8211F controller.sos2005-08-052-6/+15
|
* Make IOCATARAIDSTATUS IOWR so status can be gotten correctlysos2005-08-051-1/+1
|
* Recognize D-Link DGE-528(T) Gigabit as an re(4) device.tobez2005-08-052-0/+7
| | | | | | Submitted by: Andrus Nomm <andrus@members.ee> PR: 76780 MFC After: 1 week
* When the MAC address is reported all zeros, then error is necessarilyimp2005-08-051-1/+3
| | | | | | | | 0. This means that we 'succeed' the attach, even after we've freed the internal data bits. This leads to a panic when you eject the card with this problem. Set error = ENXIO in the mac read zeros case.
* Don't lock when holding led_mtx, instead use AcpiOsQueueForExecution to defermarkus2005-08-041-2/+29
| | | | | | | | | | | the locking. Idea taken from: acpi_asus(4) Approved by: philip Reported by: avatar Gordon Bergling <gbergling@0xfce3.net> MFC after: 1 week
* Dont limit all transfers to DEV_BSIZE (stale dbug code)sos2005-08-041-3/+4
| | | | Hide the loaded/unloaded message behind bootverbose
* don't do mutex locking around kthread_create() call.ume2005-08-041-4/+16
| | | | Reported by: Maxim Maximov <mcsi__at__mcsi.pp.ru>
* Initialize the if_addr mutex in if_alloc() rather than waiting untiljhb2005-08-041-1/+1
| | | | | | | | | | | | if_attach(). This allows ethernet drivers to use it in their routines to program their MAC filters before ether_ifattach() is called (de(4) is one such driver). Also, the if_addr mutex is destroyed in if_free() rather than if_detach(), so there was another potential bug in that a driver that failed during attach and called if_free() without having called ether_ifattach() would have tried to destroy an uninitialized mutex. Reported by: Holm Tiffe holm at freibergnet dot de Discussed with: rwatson
* Make kernel build suceed when with "options CPU_DISABLE_SSE".tobez2005-08-041-0/+2
| | | | | | PR: 84010 Submitted by: Sergey Gluschenko <deen@freebsd.org.ua> MFC after: 1 week
* Don't perform a nested include of opt_vmpage.h if LIBMEMSTAT is defined,rwatson2005-08-041-1/+1
| | | | | | | as opt_vmpage.h will not be available to user space library builds. A similar existing check is present for KLD_MODULE for similar reasons. MFC after: 3 days
OpenPOWER on IntegriCloud