summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Clean all the object files whether or not ACPI_DEBUG is specified.njl2004-02-281-1/+1
|
* Remove unneeded {} originally used to hold local variables for dummynetrwatson2004-02-281-2/+0
| | | | | | in a code block, as the variable is now gone. Submitted by: sam
* Create a new mutex type for virtual channels. This allows us to gettruckman2004-02-284-29/+24
| | | | | | | | rid of the MTX_DUPOK flag on channel mutexes, which allows witness to do a better job of lock order checking. Nuke snd_chnmtxcreate() since it is no longer needed. Tested by: matk
* Lock channels only as necessary in dsp_ioctl(), and only lock onetruckman2004-02-281-65/+173
| | | | | | | | | | channel at a time unless it is actually necessary to lock both. This avoids problems with lock order reversal and malloc() calls with a mutex held when lower level code unlocks a channel, calls malloc(), and relocks the channel. This also avoids the cost of some unnecessary locking and unlocking. Tested by: matk
* Switch from using mutexes to using semaphores to protect against earlyscottl2004-02-285-52/+65
| | | | | | | completion of synchronous commands. Also switch to a per-array bioq as it appears to improve performance. Submitted by: mbr, imp.ch (bioq change)
* Issue a request sense command automagically when ATAPI commands failsos2004-02-282-58/+86
| | | | with a valid sense key.
* Previous commit mistakenly delayed cnadd() as well as make_dev().kensmith2004-02-281-2/+1
| | | | | | | | | | Testing on cluster ref machine with just delaying make_dev() seems to work, and results in printf() output appearing sooner in boot cycle instead of going to /dev/null. Caught by: bde Pointy hat: kensmith Approved by: rwatson (mentor)
* Remove now unneeded arguments to tcp_twrespond() -- so and msrc. Theserwatson2004-02-285-23/+7
| | | | | | were needed by the MAC Framework until inpcbs gained labels. Submitted by: sam
* Add support for /dev/led/error on Soekris Net4801.phk2004-02-281-14/+48
|
* Compare the *number* of patterns to zero, not the *pointer* to thecperciva2004-02-281-1/+1
| | | | | | | patterns. (These lines are correct the other two times they appear.) Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor), ken (scsi)
* Sync to 1.163 of usbdevssanpei2004-02-282-2/+9
|
* add support DM9601(DAVICOM USB to Ethernet MAC Controller with Integrated ↵sanpei2004-02-287-0/+2291
| | | | | | | | | | 10/100 PHY) - Corega FEther USB-TXC PR: kern/62932 Submitted by: HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp> Obtained from: NetBSD
* Move the code dealing with vnode out of several functions into a singlekan2004-02-271-156/+136
| | | | | | helper function vm_mmap_vnode. Discussed with: jeffr,alc (a while ago)
* NFSv4 fixes from Connectathon 2004:rees2004-02-275-113/+94
| | | | | | | | | | | | remove unused pid field of file context struct map nfs4 error codes to errnos eliminate redundant code from nfs4_request use zero stateid on setattr that doesn't set file size use same clientid on all mounts until reboot invalidate dirty bufs in nfs4_close, to play it safe open file for writing if truncating and it's not already open Approved by: alfred
* Fix -current builds on alpha. Recent changes in device handling causedkensmith2004-02-272-2/+29
| | | | | | | | | | | subtle problems with how alpha was handling the promcons device. This moves the call to make_dev() for the promcons device to a later point of the boot-up sequence than where promcons initially gets attached, make_dev() called during the first attach crashes due to kernel stack issues. Reviewed by: gallatin, marcel, phk Discussed on: -current@, -alpha@ Approved by: rwatson (mentor)
* Switch the sleep/wakeup and condition variable implementations to use thejhb2004-02-2715-603/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | sleep queue interface: - Sleep queues attempt to merge some of the benefits of both sleep queues and condition variables. Having sleep qeueus in a hash table avoids having to allocate a queue head for each wait channel. Thus, struct cv has shrunk down to just a single char * pointer now. However, the hash table does not hold threads directly, but queue heads. This means that once you have located a queue in the hash bucket, you no longer have to walk the rest of the hash chain looking for threads. Instead, you have a list of all the threads sleeping on that wait channel. - Outside of the sleepq code and the sleep/cv code the kernel no longer differentiates between cv's and sleep/wakeup. For example, calls to abortsleep() and cv_abort() are replaced with a call to sleepq_abort(). Thus, the TDF_CVWAITQ flag is removed. Also, calls to unsleep() and cv_waitq_remove() have been replaced with calls to sleepq_remove(). - The sched_sleep() function no longer accepts a priority argument as sleep's no longer inherently bump the priority. Instead, this is soley a propery of msleep() which explicitly calls sched_prio() before blocking. - The TDF_ONSLEEPQ flag has been dropped as it was never used. The associated TDF_SET_ONSLEEPQ and TDF_CLR_ON_SLEEPQ macros have also been dropped and replaced with a single explicit clearing of td_wchan. TD_SET_ONSLEEPQ() would really have only made sense if it had taken the wait channel and message as arguments anyway. Now that that only happens in one place, a macro would be overkill.
* Drop sched_lock around the wakeup of the parent process after settingjhb2004-02-271-4/+9
| | | | | | the process state to zombie when a process exits to avoid a lock order reversal with the sleepqueue locks. This appears to be the only place that we call wakeup() with sched_lock held.
* Add an implementation of a generic sleep queue abstraction that is usedjhb2004-02-274-5/+884
| | | | | | | | | | | | | | | | to queue threads sleeping on a wait channel similar to how turnstiles are used to queue threads waiting for a lock. This subsystem will be used as the backend for sleep/wakeup and condition variables initially. Eventually it will also be used to replace the ithread-specific iwait thread inhibitor. Sleep queues are also not locked by sched_lock, so this splits sched_lock up a bit further increasing concurrency within the scheduler. Sleep queues also natively support timeouts on sleeps and interruptible sleeps allowing for the reduction of a lot of duplicated code between the sleep/wakeup and condition variable implementations. For more details on the sleep queue implementation, check the comments in sys/sleepqueue.h and kern/subr_sleepqueue.c.
* Add sysctl_move_oid() which reparents an existing OID.des2004-02-272-0/+22
|
* Fix a few style nits. do { } while(0) are only used for compoundjhb2004-02-271-3/+3
| | | | | | statements and nowhere else in the kernel seems to use them for single statements. Also, all other users of do { } while(0) use multiple lines rather than cramming it all onto one line.
* Clarify and tweak some comments.jhb2004-02-272-6/+8
|
* Fix _sx_assert() to panic() rather than printf() when an assertion failsjhb2004-02-271-3/+5
| | | | and ignore assertions if we have already paniced.
* Even if we're sure that we can't be orphaned here, we have to definepjd2004-02-271-1/+2
| | | | | | | | | orphan field - we're enforcing it in GEOM. This will reach KASSERT in INVARIANTS case. Add missing space. Approved by: scottl (mentor)
* Remove unused field.pjd2004-02-271-1/+0
| | | | Approved by: scottl (mentor)
* For some reason crt0.o needs to be linked first for pxeboot(8) toru2004-02-271-2/+5
| | | | | | work. This is odd because loader(8) doesn't suffer from this problem. Perhaps pxeboot bootstrap can be fixed to handle this better. Anyway, PXE booting should work again.
* Forward declare struct proc, struct sockaddr, and struct thread, whichrwatson2004-02-262-0/+6
| | | | | | | are employed in entry points later in the same include file. Obtained from: TrustedBSD Project Sponsored by: DARPA, Air Force Research Laboratory, McAfee Research
* Replace the ktrace queue's semaphore with a condition variable instead asjhb2004-02-261-5/+5
| | | | | it is slightly more efficient since we already have a mutex to protect the queue. Ktrace originally used a semaphore more as a proof of concept.
* Bump CTL_MAXNAME from 12 to 24.des2004-02-261-1/+1
|
* Forward declare struct bpf_d, struct ifnet, struct image_params, andrwatson2004-02-262-2/+10
| | | | | | | | | struct vattr in mac_policy.h. This permits policies not implementing entry points using these types to compile without including include files with these types. Obtained from: TrustedBSD Project Sponsored by: DARPA, Air Force Research Laboratory
* Merged from sys/isa/fd.c revision 1.266.nyan2004-02-262-366/+126
|
* Bring eventhandler callbacks for pf.mlaier2004-02-264-0/+28
| | | | | | | | This enables pf to track dynamic address changes on interfaces (dailup) with the "on (<ifname>)"-syntax. This also brings hooks in anticipation of tracking cloned interfaces, which will be in future versions of pf. Approved by: bms(mentor)
* Tweak existing header and other build infrastructure to be able to buildmlaier2004-02-2617-5/+148
| | | | | | | pf/pflog/pfsync as modules. Do not list them in NOTES or modules/Makefile (i.e. do not connect it to any (automatic) builds - yet). Approved by: bms(mentor)
* Move inet and inet6 related MAC Framework entry points from mac_net.crwatson2004-02-265-655/+809
| | | | | | | | | | | | | | to a new mac_inet.c. This code is now conditionally compiled based on inet support being compiled into the kernel. Move socket related MAC Framework entry points from mac_net.c to a new mac_socket.c. To do this, some additional _enforce MIB variables are now non-static. In addition, mbuf_to_label() is now mac_mbuf_to_label() and non-static. Obtained from: TrustedBSD Project Sponsored by: DARPA, McAfee Research
* Bring diff from the security/pf port. This has code been tested as a portmlaier2004-02-2611-50/+3205
| | | | | | | | | | | | | for a long time and is run in production use. This is the code present in portversion 2.03 with some additional tweaks. The rather extensive diff accounts for: - locking (to enable pf to work with a giant-free netstack) - byte order difference between OpenBSD and FreeBSD for ip_len/ip_off - conversion from pool(9) to zone(9) - api differences etc. Approved by: bms(mentor) (in general)
* This commit was generated by cvs2svn to compensate for changes in r126258,mlaier2004-02-2611-0/+13723
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor import of OpenBSD's packet filter (pf) as of OpenBSD 3.4mlaier2004-02-2611-0/+13723
| | | | Approved by: bms(mentor), core (in general)
* Split the mlock() kernel code into two parts, mlock(), which unpackstruckman2004-02-2616-87/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the syscall arguments and does the suser() permission check, and kern_mlock(), which does the resource limit checking and calls vm_map_wire(). Split munlock() in a similar way. Enable the RLIMIT_MEMLOCK checking code in kern_mlock(). Replace calls to vslock() and vsunlock() in the sysctl code with calls to kern_mlock() and kern_munlock() so that the sysctl code will obey the wired memory limits. Nuke the vslock() and vsunlock() implementations, which are no longer used. Add a member to struct sysctl_req to track the amount of memory that is wired to handle the request. Modify sysctl_wire_old_buffer() to return an error if its call to kern_mlock() fails. Only wire the minimum of the length specified in the sysctl request and the length specified in its argument list. It is recommended that sysctl handlers that use sysctl_wire_old_buffer() should specify reasonable estimates for the amount of data they want to return so that only the minimum amount of memory is wired no matter what length has been specified by the request. Modify the callers of sysctl_wire_old_buffer() to look for the error return. Modify sysctl_old_user to obey the wired buffer length and clean up its implementation. Reviewed by: bms
* Assert pipe mutex in pipeselwakeup(), as we manipulate pipe_staterwatson2004-02-261-0/+1
| | | | | in a non-atomic manner. It appears to always be called with the mutex (good).
* Update comment regarding MAC labels: we no longer pass endpointsrwatson2004-02-251-7/+3
| | | | | | | into the MAC Framework, just the pipe pair. GC 'hadpeer' used in pipedestroy(), which is no longer needed as we check pipe_present flags on the pair.
* Since we don't use PG_NX yet, don't turn on EFER_NXE quite yet. This needspeter2004-02-252-0/+6
| | | | | to be done based on the cpuid bits. AMD says that we should test the cpuid features bits for certain things, such as this.
* Re-remove MT_TAGs. The problems with dummynet have been fixed now.mlaier2004-02-2517-445/+469
| | | | | Tested by: -current, bms(mentor), me Approved by: bms(mentor), sam
* Make mode setting with fdcontrol(8) stick.phk2004-02-252-364/+122
| | | | Recognize when configured for "auto".
* Fix style bug in last commit,johan2004-02-251-5/+5
| | | | | | | | add a tab after WARNS?=. While I'm here fix other style bugs. Submitted by: bde (libbdf/Makefile)
* Fixed namespace pollution in rev.1.74. Implementation of the syncachebde2004-02-251-1/+4
| | | | | | | | increased <netinet/tcp_var>'s already large set of prerequisites, and this was handled badly. Just don't declare the complete syncache struct unless <netinet/pcb.h> is included before <netinet/tcp_var.h>. Approved by: jlemon (years ago, for a more invasive fix)
* Don't use the negatively-opaque type uma_zone_t or be chummy withbde2004-02-251-3/+1
| | | | <vm/uma.h>'s idempotency indentifier or its misspelling.
* Add support for the sii3512 SATA chip.sos2004-02-252-0/+3
|
* Fixed some insertion sort errors.bde2004-02-251-13/+13
|
* Fixed some style bugs in previous commit (unsorting of the DDB_* options,bde2004-02-251-5/+6
| | | | misofrmatting, and English usage errors).
* Relax a KASSERT condition to allow for a valid corner case wherehsu2004-02-252-4/+10
| | | | | | the FIN on the last segment consumes an extra sequence number. Spurious panic reported by Mike Silbersack <silby@silby.com>.
* Revert the last commit. I don't know what I was thinking, but this changescottl2004-02-251-1/+0
| | | | definitely doesn't help any thing.
OpenPOWER on IntegriCloud