summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Change device name notation.simokawa2003-08-054-54/+141
| | | | | | - /dev/fw{,mem}X.Y represents the Y'th unit on the X'th bus. - /dev/fw{,mem}X is an alias of fw{,mem}X.0 for compatibility. - Clone devices.
* Enable IFCAP_VLAN_MTU and increase MTU for it.simokawa2003-08-052-4/+6
| | | | Reviewed by: wpaul
* Make the second argument to sooptcopyout() constant in order tohsu2003-08-052-5/+2
| | | | | | simplify the upcoming PIM patches. Submitted by: Pavlin Radoslavov <pavlin@icir.org>
* In the mknod(), mkfifo(), link(), symlink() and undelete() syscalls,iedowse2003-08-052-10/+46
| | | | | | | | | | | | | | use vrele() instead of vput() on the parent directory vnode returned by namei() in the case where it is equal to the target vnode. This handles namei()'s somewhat strange (but documented) behaviour of not locking either vnode when the two vnodes are equal and LOCKPARENT but not LOCKLEAF is specified. Note that since a vnode double-unlock is not currently fatal, these coding errors were effectively harmless. Spotted by: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de> Reviewed by: mckusick
* In _bus_dmamap_load_buffer(), only count the number of bounce pages needed ifscottl2003-08-042-2/+4
| | | | | | | | they haven't been counted before. This test was ommitted when bus_dmamap_load() was merged into this function, and results in the pagesneeded field growing without bounds when multiple deferrals happen. Thanks to Paul Saab for beating his head against this for a few hours =-)
* Fix logic bug in the previous commit. Any region less than 5 is amarcel2003-08-041-1/+1
| | | | | | user space region. Hence, we need to test if 5 is greater than the region; not greater equal. This bug caused us to call ast() while interrupting kernel mode.
* Do some minor Giant pushdown made possible by copyin, fget, fdrop,dwmalone2003-08-042-19/+14
| | | | | | | | | malloc and mbuf allocation all not requiring Giant. 1) ostat, fstat and nfstat don't need Giant until they call fo_stat. 2) accept can copyin the address length without grabbing Giant. 3) sendit doesn't need Giant, so don't bother grabbing it until kern_sendit. 4) move Giant grabbing from each indivitual recv* syscall to recvit.
* Adjust a comment to remove staleness and take slightly less implementationjhb2003-08-041-6/+2
| | | | specific perspective.
* - GC unused cpu_thread_link().jhb2003-08-043-18/+1
| | | | | | | - Move the enabling of interrupts out of assembly and into C a few instructions later at cpu_critical_fork_exit(). This puts more of the MD critical section implementation under the MD critical section API making it easier to test and develop alternative implementations.
* - Since td_critnest is now initialized in MI code, it doesn't have to bejhb2003-08-0410-66/+0
| | | | | | set in cpu_critical_fork_exit() anymore. - As far as I can tell, cpu_thread_link() has never been used, not even when it was originally added, so remove it.
* Set td_critnest to 1 when setting up a thread since it is a MI field withjhb2003-08-043-1/+3
| | | | | | | MI values. This ensures that td_critnest for a newly fork'd thread is always valid. Requested by: bde (a long time ago)
* Insert cosmetic spaces.jhb2003-08-041-2/+2
| | | | Reported by: kris
* Allow foot shooting as Linux emulation needs it.julian2003-08-042-4/+5
| | | | | | | | | Also change "Auto mode" to use a "special" value instead of 0, and define and document it. I had thought libpthread had already been switched to use auto mode but it appears that patch hasn't been committed yet. Discussed with: Davidxu
* Add support for multiple CPUs to cpuinfo.des2003-08-041-8/+18
|
* Put an uncovered page between the swap devices, that way we can be surephk2003-08-041-32/+23
| | | | | | | | | | to not get any cross-device I/O requests. (The unallocated first page protecting BSD labels already gave us this, but that hack may go away at some point in time). Remove the check for cross-device I/O requests in swap_pager_strategy. Move the repeated statistics updating into flushchainbuf().
* Set the BGE_RX_MTU register correctly so that we can receive slightlywpaul2003-08-041-1/+1
| | | | | | | | | | | | larger than normal frames, to account for the case where a bge(4) NIC is used with VLANs. Since we set the IFCAP_VLAN_MTU flag, we must allow reception of frames up to 1522 bytes in size rather than 1518. Note that it is possible to work around this bug by doing: # ifconfig bge0 mtu 1504 prior to configuring any VLAN interfaces.
* - Don't mess with TX queue in fwohci_stop() if we failed to attach the device.simokawa2003-08-042-7/+14
| | | | | | | | Tested by: wilko - Detect memory mapping failure of registers by checking OHCI version. Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp>
* Cleanup the clock code. This includes:marcel2003-08-048-459/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Remove alpha specific timer code (mc146818A) and compiled-out calibration of said timer. o Remove i386 inherited timer code (i8253) and related acquire and release functions. o Move sysbeep() from clock.c to machdep.c and have it return ENODEV. Console beeps should be implemented using ACPI or if no such device is described, using the sound driver. o Move the sysctls related to adjkerntz, disable_rtc_set and wall_cmos_clock from machdep.c to clock.c, where the variables are. o Don't hardcode a hz value of 1024 in cpu_initclocks() and don't bother faking a stathz that's 1/8 of that. Keep it simple: hz defaults to HZ and stathz equals hz. This is also how it's done for sparc64. o Keep a per-CPU ITC counter (pc_clock) and adjustment (pc_clockadj) to calculate ITC skew and corrections. On average, we adjust the ITC match register once every ~1500 interrupts for a duration of 2 consequtive interruprs. This is to correct the non-deterministic behaviour of the ITC interrupt (there's a delay between the match and the raising of the interrupt). o Add 4 debugging sysctls to monitor clock behaviour. Those are debug.clock_adjust_edges, debug.clock_adjust_excess, debug.clock_adjust_lost and debug.clock_adjust_ticks. The first counts the individual adjustment cycles (when the skew first crosses the threshold), the second counts the number of times the adjustment was excessive (any non-zero value is to be considered a bug), the third counts lost clock interrupts and the last counts the number of interrupts for which we applied an adjustment (debug.clock_adjust_ticks / debug.clock_adjust_edges gives the avarage duration of an individual adjustment -- should be ~2). While here, remove some nearby (trivial) left-overs from alpha and other cleanups.
* Use kmem_alloc_nofault() instead of kmem_alloc_pageable() to allocatealc2003-08-041-1/+1
| | | | | | | swapbkva. Swapbkva mappings are explicitly managed using pmap_qenter(), not on-demand by vm_fault(), making kmem_alloc_nofault() more appropriate. Submitted by: tegge
* Now that the central POSIX.1e ACL code implements functions torwatson2003-08-043-88/+13
| | | | | | | | | | | | | | | | | | | | | generate the inode mode from a default ACL and creation mask, implement ufs_sync_inode_from_acl() using acl_posix1e_newfilemode(). Since ACL_OVERRIDE_MASK/ACL_PRESERVE_MASK are defined, we no longer need to explicitly pass in a "preserve_mask" field: this is implicit in the use of POSIX.1e semantics. Note: this change contains a semantic bugfix for new file creation: we now intersect the ACL-generated mode and the cmode requested by the user process. This means permissions on newly created file objects will now be more conservative. In the future, we may want to provide alternative semantics (similar to Solaris and Linux) in which the ACL mask overrides the umask, permitting ACLs to broaden the rights beyond the requested umask. PR: 50148 Reported by: Ritz, Bruno <bruno_ritz@gmx.ch> Obtained from: TrustedBSD Project
* fix disordering of filenames. Place the dev/ppc files in alphabeticalimp2003-08-043-4/+5
| | | | order.
* Move more ACL logic from the UFS code (ufs_acl.c) to the central POSIX.1erwatson2003-08-044-8/+279
| | | | | | | | | | | | | | | | | | support routines in kern_acl.c: - Define ACL_OVERRIDE_MASK and ACL_PRESERVE_MASK centrally in acl.h: the mode bits that are (and aren't) stored in the ACL. - Add acl_posix1e_acl_to_mode(): given a POSIX.1e extended ACL, generate a compatibility mode (only the bits supported by the POSIX.1e ACL). - acl_posix1e_newfilemode(): Given a requested creation mode and default ACL, calculate the mode for the new file system object (only the bits supported by the POSIX.1e ACL). PR: 50148 Reported by: Ritz, Bruno <bruno_ritz@gmx.ch> Obtained from: TrustedBSD Project
* In ufs_chmod(), use privilege only when required in the followingrwatson2003-08-041-5/+9
| | | | | | | | | | | | | | | cases: - Setting sticky bit on non-directory - Setting setgid on a file with a group that isn't in the effective or extended groups of the authorizing credential I.e., test the requirement first, then do the privilege test, rather than doing the privilege test regardless of the need for privilege. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Use the revision ID from PCI configuration space to identify Inteljdp2003-08-041-23/+41
| | | | | | | 8255x chips more precisely. The information was obtained from Intel's Open Source Software Developer Manual for the 8255x. MFC after: 1 day
* Fix handling of external interrupts: we weren't calling ast() whenmarcel2003-08-042-14/+51
| | | | | | | | | | | | | | | | | | | | interrupting user mode. The net effect of this bug is that a clock interrupt does not cause rescheduling and processes are not preempted. It only takes a "while (1);" to render the machine useless. This bug was introduced by the context changes and EPC syscall code. Handling of ASTs was moved to C for clarity and ease of maintenance, but was not added for the external interrupt case. This needs to be revisited. We now have calls to do_ast() in trap(), break_syscall() and ivt_External_Interrupt(). A single call in exception_restore covers these 3 places without duplication. This is where we handled ASTs prior to the overhaul, except that the meat has been moved to do_ast(), a C function. This was the goal to begin with. Pointy hat: marcel
* Name swap_pager_find_dev() more correctly swp_pager_finde_dev().phk2003-08-031-38/+21
| | | | | | | | Use ->bio_children to count child buffers, rather than abuse the bio_caller1 pointer. Expand the relevant bits of waitchainbuf() inline, this clarifies the code a little bit.
* I accidentally hit undo before committing, fix the resulting off-by-one.phk2003-08-031-1/+1
|
* Remove the NSWAPDEV option, we have no upper limit on how manyphk2003-08-032-9/+0
| | | | swap devices we can have anymore.
* Change the layout policy of the swap_pager from a hardcoded widthphk2003-08-035-156/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | striping to a per device round-robin algorithm. Because of the policy of not attempting to retain previous swap allocation on page-out, this means that a newly added swap device almost instantly takes its 1/N share of the I/O load but it takes somewhat longer for it to assume it's 1/N share of the pages if there is plenty of space on the other devices. Change the 8G total swapspace limitation to 8G per device instead by using a per device blist rather than one global blist. This reduces the memory footprint by 75% (typically a couple hundred kilobytes) for the common case with one swapdevice but NSWAPDEV=4. Remove the compile time constant limit of number of swap devices, there is no limit now. Instead of a fixed size array, store the per swapdev structure in a TAILQ. Total swap space is still addressed by a 32 bit page number and therefore the upper limit is now 2^42 bytes = 16TB (for i386). We still do not allocate the first page of each device in order to give some amount of protection to any bsdlabel at the start of the device. A new device is appended after the existing devices in the swap space, no attempt is made to fill in holes left behind by swapoff (this can trivially be changed should it ever become a problem). The sysctl vm.nswapdev now reflects the number of currently configured swap devices. Rename vm_swap_size to swap_pager_avail for consistency with other exported names. Change argument type for vm_proc_swapin_all() and swap_pager_isswapped() to be a struct swdevt pointer rather than an index. Not changed: we are still using blists to manage the free space, but since the swapspace is no longer fragmented by the striping different resource managers might fare better.
* Move extern declaration of the various pagerops from vm_pager.cphk2003-08-032-6/+6
| | | | to vm_pager.h where the various pagers will also see them.
* Deal with GCC annoyingly defining _BIG_ENDIAN.obrien2003-08-031-0/+1
|
* Style sync.obrien2003-08-034-16/+18
|
* Revise obj_alloc(). Most notably, use the object's lock to prevent twoalc2003-08-031-17/+30
| | | | | | | concurrent invocations from acquiring the same address(es). Also, in case of an incomplete allocation, free any allocated pages. In collaboration with: tegge
* When INVARIANTS is on and we're in uma_zalloc_free(), we need to makebmilekic2003-08-021-0/+15
| | | | | | | | sure that uma_dbg_free() is called if we're about to call uma_zfree_internal() but we're asking it to skip the dtor and uma_dbg_free() call itself. So, if we're about to call uma_zfree_internal() from uma_zfree_arg() and skip == 1, call uma_dbg_free() ourselves.
* Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in pmap_mapdev().alc2003-08-024-4/+4
| | | | | | See revision 1.140 of kern/sys_pipe.c for a detailed rationale. Submitted by: tegge
* There's already the elink.ko module available, don't embed it here.ru2003-08-021-2/+1
| | | | Reviewed by: markm
* Both 'c' an 'lines' are unused, the bogus init of lines was accidentallyjhb2003-08-021-2/+1
| | | | left behind.
* Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in proc_rwmem().alc2003-08-021-1/+1
| | | | | | See revision 1.140 of kern/sys_pipe.c for a detailed rationale. Submitted by: tegge
* fix braino in last commit.julian2003-08-021-1/+1
| | | | Beaten with clue-stick by: Davidxu
* Support the Titan VScom PCI-200HV2 2 port serial card.bde2003-08-021-0/+10
| | | | MFC after: 3 days
* Kick Giant compatibility one layer up.phk2003-08-021-9/+1
|
* Grab Giant in bufdonebio() since drivers may not hold it.phk2003-08-021-0/+4
| | | | | This only protects the "struct buf" consumers (ie: DEV_STRATEGY()), but does not protect BIO_STRATEGY() users.
* Merged from sys/dev/sio/sio.c revision 1.400.nyan2003-08-022-6/+12
|
* Grab Giant in physio() since non-giant drivers are starting to appear.phk2003-08-021-0/+3
|
* Merged from sys/dev/ppc/ppc.c revision 1.42.nyan2003-08-022-88/+74
|
* MFi386: revision 1.449.nyan2003-08-021-0/+1
|
* Don't hardcode unit 0 for the current device if we're loaded from anmarcel2003-08-024-35/+31
| | | | | | | | | | | | EFI file system. When booting from a CD and there's already an EFI system partition on the disk, setting the current device to unit 0 will select the harddisk. This invariably breaks installing FreeBSD when other operating systems have been installed before. We obviously want to do the same when we're booting over the network. Maybe later. Based on a patch (from memory) from: arun
* Relax the check for bad LDTE allocations. It turns out thatjulian2003-08-021-4/+21
| | | | | | | | | there is code that blindly allocates LDTEs starting at slot 6 and I quess it doesn't really matter to us if they overwrite the BSDI syscall slot, since it isn't a BSDI binary. Also add some code to help track down other such users (commented out for now). Reviewed by: deischen@
* - Use kmem_alloc_nofault() rather than kmem_alloc_pageable() inalc2003-08-021-3/+1
| | | | | | pmap_mapdev(). See revision 1.140 of kern/sys_pipe.c for a detailed rationale. Submitted by: tegge - Remove GIANT_REQUIRED from pmap_mapdev().
* o remove bmisshack no longer needed with the BSSID fix in v0.9.5.2 of the halsam2003-08-021-14/+17
| | | | | | o add monitor mode support o fix short preamble handling in beacon setup (noop) o correct resume handling
OpenPOWER on IntegriCloud