summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Change and clean the mutex lock interface.bmilekic2001-02-09200-3721/+3509
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Apply patch to add support for the intergrated ethernet in the SiS630Ewpaul2001-02-092-1/+105
| | | | | | | | | | chipset. The MAC address is stored in the APC CMOS RAM and we have to commit trememdous evil in order to read it. The code to do this is only activated on the i386 platform. Thanks to Cameron Grant for providing access to a test box for me to tinker with. This will fix the problem where the sis driver ends up with a station address of 00:00:00:00:00:00 on boards that use the 630E chipset.
* Add includes of sys/malloc.h so this actually compiles.jhb2001-02-092-1/+2
| | | | Pointy-hat to: asmodai
* Whoops... forgotten a few pieces in previous patch:luigi2001-02-081-5/+9
| | | | | | | * a ">" is really ">=" ; * do not try to fetch zero-sized blocks from the card; * make sure that bpf gets the packets it wants even with bridging active;
* Make sure that we do not accept packets shorter than a full ethernetluigi2001-02-081-1/+3
| | | | header, or we would have a negative length passed to ether_input().
* Fix memory leaks with dev_get_children().imp2001-02-081-0/+6
| | | | Submitted by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
* Fix a memory leak.sos2001-02-081-5/+4
| | | | Pointed out by: Asmodai
* Fix memoryleaks with device_get_children().asmodai2001-02-082-0/+3
| | | | Approved by: wpaul
* Fix memory leaks with dev_get_children().imp2001-02-081-0/+3
| | | | Submitted by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
* Free the memory we get from devclass_get_devices and device_get_children.msmith2001-02-083-9/+24
| | | | Submitted by: wpaul
* Fix typos: initalise -> initialise.asmodai2001-02-082-6/+6
| | | | Initalise is not an english word.
* When we receive an incoming Ethernet frame that was unicast to aarchie2001-02-081-10/+14
| | | | | | | | | different hardware address, we should drop it (this should only happen in promiscuous mode). Relocate the code for this check from before ng_ether(4) processing to after ng_ether(4) processing. Also fix a compiler warning. PR: kern/24465
* Added pc98 supports.nyan2001-02-081-0/+5
|
* Add recently added PHY drivers sources.semenu2001-02-081-0/+3
| | | | Reminded by: Peter Wemm <peter@netplex.com.au>
* Don't bother with acquiring/releasing Giant around kmem_malloc() andjhb2001-02-081-40/+0
| | | | | | | | kmem_free() for now. Kmem_malloc() and kmem_free() now have appropriate assertions in place, and these checks aren't feasible until more of the networking code is locked down. Also, the extra assertions here should already be caught by the WITNESS code as lock order violations should mutex operations on Giant be reintroduced here later.
* Don't enable interrupts for a kernel breakpoint or trace trap. Otherwise,jhb2001-02-083-18/+21
| | | | | this negates the explicit disabling of interrupts when entering the debugger in Debugger().
* - Check if the ccb_infos in the softc is NULL before trying to free it injhb2001-02-082-2/+11
| | | | | | | | adv_free() as the ISA probe routine doesn't malloc() ccb_infos but does call adv_free(). - Release the ISA-only overrun DMA tags, bufs, and maps if the probe fails. Tested by: rwatson
* The code I picked up from NetBSD in '97 had a nasty bug. It limitedpeter2001-02-071-7/+15
| | | | | | | the index of the pollfd array to the number of fd's currently open, not the maximum number of fd's. ie: if you had 0,1,2 open, you could not use pollfd slots higher than 20. The specs say we only have to support OPEN_MAX [64] entries but we allow way more than that.
* When SMPng was first committed, we removed 'cpl' from the interruptjhb2001-02-072-2/+2
| | | | | frame. Teach ddb about this as there is one less word for it to skip over when finding a trapframe on the interrupt frame stack.
* Oops... I knew i shouldn't use arrows in vi. Fix a typo causing errors insemenu2001-02-071-1/+0
| | | | compilation.
* back out rev 1.49, looks like i committed it from the wrong tree.cg2001-02-071-424/+803
| | | | | | include the changes 1.49 was supposed to have. Noticed by: peter
* Reflect recently added support for SMC9432FTX cards.semenu2001-02-072-2/+2
|
* Add support for SMC9432FTX card, possibly othe fiber optic SMC9432 familysemenu2001-02-075-85/+406
| | | | cards will work too.
* Add QS6612, AC101 and LXT970 personal drivers and register definitions.semenu2001-02-078-7/+1368
| | | | Obtained from: NetBSD/OpenBSD
* Use correct index when counting short errors.phk2001-02-071-1/+1
|
* Change the peripheral driver list from a linker set to module drivenpeter2001-02-0712-26/+65
| | | | | driver registration. This should allow things like da, sa, cd etc to be in seperate KLD's to the cam core and make them preloadable.
* conditionalize "hwptr went backwards" messagescg2001-02-071-801/+425
| | | | | modify default buffer size heuristic to not max out at 4k. mpg123 should now behave better under load.
* Move ti1031 to the 16-bit bridge sectionimp2001-02-072-6/+6
|
* Introduce busspace instead of the good old in/out instructions.sos2001-02-069-253/+312
| | | | Not pretty but it works (I hope)...
* Regen.n_hibma2001-02-062-2/+17
|
* Add a comment about the fact that adding an ID doesn't actually do anything.n_hibma2001-02-061-0/+15
|
* Damn! that was the wrong patch! get it right this time....sos2001-02-061-1/+1
|
* Fix the clone functionality in atapi-cd, it didn't work forsos2001-02-063-6/+17
| | | | | devs other than the first, and allowed to clone a nonexistent device..
* Fix typo: compatability -> compatibility.asmodai2001-02-0612-19/+19
| | | | Compatability is not an existing english word.
* Fix typo: seperate -> separate.asmodai2001-02-0624-27/+27
| | | | Seperate does not exist in the english language.
* Fix typo: seperate -> separate.asmodai2001-02-061-1/+1
| | | | | | Seperate does not exist in the english language. Submitted to look at by: kris
* Fix typo: depricated -> deprecated.asmodai2001-02-061-1/+1
|
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-0645-108/+72
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Fix typo: wierd -> weird.asmodai2001-02-066-6/+6
| | | | There is no such thing as wierd in the english language.
* Fix typo: wierd -> weird.asmodai2001-02-061-1/+1
|
* Fix typo: teh -> the.asmodai2001-02-061-1/+1
|
* Fix bad patch from a few days ago. It broke some bridging.julian2001-02-051-9/+10
|
* Add a dummy disconnect function so that the socket code doesn't leap intojulian2001-02-051-2/+7
| | | | | space when it calls the disconnect PRU function without checking that it there.
* - Minimize the amount of duplicated code for the PREEMPTION #ifdef, it nowjhb2001-02-051-27/+9
| | | | | | | | | | | | only covers about 3-4 lines. - Don't lower the IPL while we are on the interrupt stack. Instead, save the raised IPL and change the saved IPL in sched_lock to IPL_0 before calling mi_switch(). When we are resumed, restore the saved IPL in sched_lock to the saved raised IPL so that when we release sched_lock we won't lower the IPL. Without this, we would get nested interrupts that would overflow the kernel stack. Tested by: mjacob
* Make netgraph modules refuse to link with modules of a different ABI version.julian2001-02-053-39/+75
| | | | | | also try implement teh documented behaviour in socket nodes so that when there is only one hook, an unaddressed write/send will DTRT and send the data to that hook.
* Regen.n_hibma2001-02-052-5/+67
|
* Add some ids from NetBSD.n_hibma2001-02-051-2/+16
|
* Regen.n_hibma2001-02-052-2/+41
|
* * Correct a broken entryn_hibma2001-02-051-1/+2
| | | | | * Add the id for the Rio 800 USB. Submitted by: Wesley Morgan <morganw@chemikals.org>
* add forgotten makefilecg2001-02-051-0/+8
|
OpenPOWER on IntegriCloud