summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Initialize cinfo structure at compile time rather than run time sinceimp2001-05-192-34/+29
| | | | they are now constant.
* slots and next haven't been used in a while. GC them.imp2001-05-191-6/+0
|
* Add new 'loadavg' entry, fix overflow with meminfo.jlemon2001-05-194-16/+84
| | | | | PR: 27253, 27350 Submitted by: Jim Pirzyk
* Now that we've moved the mecia support out of pcic.c to its ownimp2001-05-191-12/+12
| | | | | driver, we no longer need to go through the cinfo.XXXX indirections. restore the direct calls that were replaced earlier.
* Use new kernel_sysctlbyname function. Remove private copy.jlemon2001-05-193-22/+2
|
* Add convenience function kernel_sysctlbyname() for kernel consumers,jlemon2001-05-192-1/+27
| | | | so they don't have to roll their own sysctlbyname function.
* Move ISA specific code into pcic_isa. This is the probe routine, theimp2001-05-193-262/+255
| | | | | get/setb1 routines. Also expose clrb and setb as pcic_{clrb,setb} so we can use it from the probe. pcic_probe is no longer needed.
* It turns out that Intel's i82365sl-DF step has the same ID as the VLSIimp2001-05-192-31/+62
| | | | | | | | | | | | | | | | | | | | | | | | | 82C146. The Intel i82365SL-DF supports 3.3V cards. The Step A/B/C parts do not appear to support this. This is hard to know for sure since it was deduced from "compatible" parts' data sheets and the article mentioned below. Rework the VLSI detection to be a little nicer and not depend on scanning cards twice. This would allow bad VLSI cards to coexist with a good intel card, for example. We now detect i82365SL-DF cards where before we'd detect a VLSI. For the most part, this is good, but we run a small chance of detecting a single slot 82C146 as a i82365SL-DF. Since I can't find a datasheet for the 82c146, I don't know if this is a problem or not. This work is based on an excellent article, in Japanese, by NAKAGAWA, Yoshihisa-san that appeared in FreeBSD Press Number 4. He provided a patch against PAO3 in his article. Since the pcic.c code has changed some since then, I've gone ahead and cleaned up his patch somewhat and changed how the code detects the buggy '146 cards. I also removed the comment asking if there were other cards that matched the 82C146 since we found one and additional information isn't necessary.
* remove my private assertions from tsleep.alfred2001-05-191-7/+2
| | | | add one assertion to ensure we don't sleep while holding vm.
* Regen syscalls that were made mpsafe via vm_mtxalfred2001-05-196-23/+23
| | | | | | obreak, getpagesize, sbrk, sstk, mmap, ovadvise, munmap, mprotect, madvise, mincore, mmap, mlock, munlock, minherit, msync, mlockall, munlockall
* Introduce a global lock for the vm subsystem (vm_mtx).alfred2001-05-1991-253/+1149
| | | | | | | | | | | | | | | | | | | vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
* Must be a bit less aggressive about freeing pagedep structures.mckusick2001-05-181-1/+1
| | | | | Obtained from: Robert Watson <rwatson@FreeBSD.org> and Matthew Jacob <mjacob@feral.com>
* Add a new ioctl to syscons, CONS_SCRSHOT. Given a userland buffer, itnik2001-05-182-0/+28
| | | | | | | | | | | copies out the current contents of the video buffer for a syscons terminal, providing a snapshot of the text and attributes. Based heavily on work originally submitted by Joel Holveck <joelh@gnu.org> for 2.2.x almost 30 months ago, which I cleaned up a little, and forward ported to -current. See also the usr.bin/scrshot utility.
* Currently there is no way to tell if write operation invoked viabp2001-05-182-2/+2
| | | | | | | vn_start_write() on the given vnode will be successful. VOP_LEASE() may help to solve this problem, but its return value ignored nearly everywhere. For now just assume that the missing upper layer on write means insufficient access rights (which is correct for most cases).
* Make _BSD_TIME_T_ (time_t) an `int' rather than `long'. This will helpobrien2001-05-183-3/+3
| | | | | | | flag errors where programmers assume time_t is a long, which it is not on 64-bit platforms. Submitted by: bde
* Style changes -- revert ordering to mostly two revs ago.obrien2001-05-185-291/+293
| | | | | | Embellish some comments, fix tab'ing. Requested by: bde
* - Use a timeout for the tsleep in scheduler() instead of having vmmeter()jhb2001-05-182-5/+22
| | | | | | | | | | | | | | | wakeup proc0 by hand to enforce the timeout. - When swapping out a process, keep the process locked via the proc lock from the first checks up until we clear PS_INMEM and set PS_SWAPPING in swapout(). The swapout() function now must be called with the proc lock held and releases it before returning. - Comment out the code to attempt to lock a process' VM structures before swapping out. It is broken in that it releases the lock after obtaining it. If it does grab the lock, it needs to hand it off to swapout() instead of releasing it. This can be revisisted when the VM is locked as this is a valid test to perform. It also causes a lock order reversal for the time being, which is the immediate cause for temporarily disabling it.
* Add workaround for embedded NICs, in particular, the 815E boards.jlemon2001-05-172-17/+44
| | | | | There appears to be a bug where the chip will lock up when running in 10Mb/s mode.
* During the code to pick a process to kill when memory is exhausted, keepjhb2001-05-171-3/+18
| | | | | | | the process in question locked as soon as we find it and determine it to be eligible until we actually kill it. To avoid deadlock, we don't block on the process lock but skip any process that is already locked during our search.
* - Don't panic on a try lock operation for a sleep lock if we hold a spinjhb2001-05-171-2/+6
| | | | | | | lock. Since we won't actually block on a try lock operation, it's not a problem. Add a comment explaining why it is safe to skip lock order checking with try locks. - Remove the ithread list lock spin lock from the order list.
* - Remove the global ithread_list_lock spin lock in favor of per-ithreadjhb2001-05-172-37/+34
| | | | | | | | | | | | sleep locks. - Delay returning from ithread_remove_handler() until we are certain that the interrupt handler being removed has in fact been removed from the ithread. - XXX: There is still a problem in that nothing protects the kernel from adding a new handler while the ithread is running, though with our current architectures this is not a problem. Requested by: gibbs (2)
* - Move the setting of bootverbose to a MI SI_SUB_TUNABLES SYSINIT.jhb2001-05-175-19/+15
| | | | | | | | - Attach a writable sysctl to bootverbose (debug.bootverbose) so it can be toggled after boot. - Move the printf of the version string to a SI_SUB_COPYRIGHT SYSINIT just afer the display of the copyright message instead of doing it by hand in three MD places.
* Use NHWI instead of APIC_IMEN_BITS.jhb2001-05-171-1/+1
|
* - Axe the IMEN_BITS and APIC_IMEN_BITS constants.jhb2001-05-172-8/+6
| | | | | | - Add back in a definition of NHWI which is preferred over ICU_LEN. Submitted by: bde
* Primary purpose of this commit is to enable support for the Aviatordmlb2001-05-174-300/+715
| | | | | | | | | | | | | | | | | | | | | | Pro and Raylink cards with version 5 firmware. Only infra-structure mode has been tested. Specific changes for this feature are: o Add RFC1042 encapsulation of IP datagrams o Add authentication and association o Decode of the beacon (although not used) Other changes have been made: o Pass command completion status to *_done (in place for adding proper error recovery) o Move a couple of state variables into the current network parameters structure. This is in prep. for dealing with roaming. MFC after: 1 week
* Disable the wi driver locking for now. The driver tries to tsleep with thejhb2001-05-171-2/+2
| | | | driver lock held on detach which can lead to annoying and useless panics.
* o Modify access control checks in p_candebug() such that the policy is asrwatson2001-05-171-3/+3
| | | | | | | | | | | | follows: the effective uid of p1 (subject) must equal the real, saved, and effective uids of p2 (object), p2 must not have undergone a credential downgrade. A subject with appropriate privilege may override these protections. In the future, we will extend these checks to require that p1 effective group membership must be a superset of p2 effective group membership. Obtained from: TrustedBSD Project
* Add a couple more codes for upcoming raylink driver additions.dmlb2001-05-171-9/+70
| | | | MFC after: 3 days
* Cleanupalfred2001-05-171-54/+50
| | | | | | | | | | | | | | | | | | | | | Remove comment about setting error for reads on EOF, read returns 0 on EOF so the code should be ok. Remove non-effective priority boost, PRIO+1 doesn't do anything (according to McKusick), if a real priority boost is needed it should have been +4. Style fixes: .) return foo -> return (foo) .) FLAG1|FlAG2 -> FLAG1 | FlAG2 .) wrap long lines .) unwrap short lines .) for(i=0;i=foo;i++) -> for (i = 0; i=foo; i++) .) remove braces for some conditionals with a single statement .) fix continuation lines. md5 couldn't verify the binary because some code had to be shuffled around to address the style issues.
* initialize pipe pointersalfred2001-05-171-0/+1
|
* pipe_create has to zero out the select record earlier to avoidalfred2001-05-171-1/+1
| | | | | | | returning a half-initialized pipe and causing pipeclose() to follow a junk pointer. Discovered by: "Nick S" <snicko@noid.org>
* Cosmetics to rev.1.89: removed argument names in a function prototype.ru2001-05-171-1/+1
|
* Backed out rev.1.8. Rev.1.8 was just to support a bogus unused includebde2001-05-171-2/+1
| | | | in ng_tty.c.
* Update to use the changed ioctl interface.sos2001-05-171-45/+42
|
* Change the ioctl interface to prepare for new functionality.sos2001-05-171-45/+50
|
* When a new block is allocated to a directory, an fsync of a filemckusick2001-05-174-39/+242
| | | | | | | | | | | | | whose name is within that block must ensure not only that the block containing the file name has been written, but also that the on-disk directory inode references that block. When a new directory block is created, we allocate a newdirblk structure which is linked to the associated allocdirect (on its ad_newdirblk list). When the allocdirect has been satisfied, the newdirblk structure is moved to the inodedep id_bufwait list of its directory to await the inode being written. When the inode is written, the directory entries are fully committed and can be deleted from their pagedep->id_pendinghd and inodedep->id_pendinghd lists.
* VOP getwritemount() can be invoked on vnodes with VFREE flag set (used inbp2001-05-172-8/+24
| | | | snapshots code). At this point upper vp may not exist.
* Use vop_*vobject() VOPs to get reference to VM object from upper or lower fs.bp2001-05-176-120/+120
|
* Do not leave an extra reference on vnode.bp2001-05-172-12/+4
| | | | | | PR: kern/27250 Submitted by: "Vladimir B. Grebenschikov" <vova@express.ru> MFC after: 2 weeks
* Allocate more memory if necessary.dcs2001-05-171-0/+3
|
* digiModel_t -> enum digi_modelbrian2001-05-174-18/+8
| | | | Remove a forgotton and unused structure.
* Consistently define the rune types.obrien2001-05-165-17/+86
| | | | Follow NetBSD's lead and add a _BSD_MBSTATE_T_ type.
* Move the int typedefs to the top so they can be used in defining other types.obrien2001-05-165-116/+126
| | | | | | Ensure every platform has __offsetof. Make multiple inclusion detection consistent with other <platform>/include/*.h files.
* Change the second argument of vflush() to an integer that specifiesiedowse2001-05-1630-333/+118
| | | | | | | | | | | | | | | | | | | | the number of references on the filesystem root vnode to be both expected and released. Many filesystems hold an extra reference on the filesystem root vnode, which must be accounted for when determining if the filesystem is busy and then released if it isn't busy. The old `skipvp' approach required individual filesystem xxx_unmount functions to re-implement much of vflush()'s logic to deal with the root vnode. All 9 filesystems that hold an extra reference on the root vnode got the logic wrong in the case of forced unmounts, so `umount -f' would always fail if there were any extra root vnode references. Fix this issue centrally in vflush(), now that we can. This commit also fixes a vnode reference leak in devfs, which could result in idle devfs filesystems that refuse to unmount. Reviewed by: phk, bp
* Catch up with some recent changes:imp2001-05-161-1/+6
| | | | | | 1) pcic_isa.c 2) For pc98, add mecia driver and -DPC98 to command line. 3) pcic_p.c -> pcic_pci.c
* Separate out isa attachment to its own file. The pci attachment willimp2001-05-164-84/+189
| | | | | | | | | | | soon attach directly to pcic rather than the kludge pci-pcic device we have now. In some ways, this is similar to the work PAO3 did to try to support cardbus bridges. In some ways different. This and future commits will be taking from the spirit of many of those changes. pcicvar.h is completely different from the pcicvar.h that appeared in PAO3, but similar in concept.
* This file is now obsolete. The #defines in it have never been usedimp2001-05-161-44/+0
| | | | and the pcic_devclass no longer is used by pccard.c.
* remove include of ipl.h because it no longer existsalfred2001-05-161-1/+0
|
* Lock the procfs functions for doing a single step and reading/writingjhb2001-05-164-132/+67
| | | | | | registers better. Hold sched_lock not only for checking the flag but also while performing the actual operation to ensure the process doesn't get swapped out by another CPU while we the operation is being performed.
* pcic98reg.h is now contained in meciareg.h.imp2001-05-152-59/+1
|
OpenPOWER on IntegriCloud