summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace cleanup and move static variables together.njl2004-07-242-46/+46
|
* Remove unneeded parens and fix whitespace.njl2004-07-242-72/+58
|
* Disable kldunloading of geom_vinum temporarily until I figured outle2004-07-241-1/+1
| | | | how to do it correctly.
* Refine the wait for ATAPI_RESET.sos2004-07-241-2/+10
| | | | | | | | Properly wait for not busy and introduce a timeout for devices not setting busy (as they should). Leave a printf in there that states how long the wait was, as I'd like to get an idea of the variations here. The time needed seems also to be affected by whether a medium is present or not.
* Fix a bug where an item was being removed from a list without usingnjl2004-07-241-34/+29
| | | | | | FOREACH_SAFE. Remove bad cast of retp and instead use an additional arg to pass back the number of valid outputs. Use the package convenience functions for parsing packages.
* Prefer NULL to '0' when checking a pointer value.rwatson2004-07-241-37/+37
|
* Remove rev 1.50.obrien2004-07-241-9/+0
|
* Merged from sys/dev/sio/sio.c revision 1.450.nyan2004-07-242-2/+4
|
* Ports related rc.d cleanups:mtm2004-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | o Separate out local (ports) scripts that use rc.d, and the old style startup/shutdown scripts and execute them separately. On startup the rc.d style scripts are executed first and then the old-style scripts. On shutdown, exactly the reverse happens. o The rc.d ports scripts should now behave more like base system scripts. Scripts ending in .sh will be sourced into the current shell, while the rest will be executed in a subshell. Previously, all ports scripts, regardless of the .sh suffix, were executed in a subshell. o The parent script, /etc/rc.d/localpkg, passes its command line arguments straight to the rc.d ports scripts. This means they should now honor faststop and faststart commands as well. Old style scripts, should not see any differences. They will still get either a start or stop command. o The initial phrase shown during shutdown has been changed to use "local packages" instead of "daemon processes" to be more inline with the phrase used during local package startup. The phrases are also used only for old-style ports script startup/shutdown, whereas previously they were being used for both rc.d and old-style scripts. This should make startup/shutdown output a bit less ugly. Discussed with: portmgr Has Reservations: eik
* Bring the advertised interface capabilities into line with the realityyar2004-07-241-6/+14
| | | | | | | | | | | (in particular, bge(4) hasn't supported rxcsum since if_bge.c#1.5) Clean up some aspects of capabilities usage, i.e. stop using if_hwassist to see whether we are doing offload now because if_hwassist is for TCP/IP layer and it is subordinate to if_capenable. Thanks to: Aled Morris for donating a nice bge(4) NIC to me Reviewed by: -net, -hackers (silence)
* Simplify vmspace initialization. The bcopy() of fields from the oldalc2004-07-242-14/+8
| | | | | | | vmspace to the new vmspace in vmspace_exec() is mostly wasted effort. With one exception, vm_swrss, the copied fields are immediately overwritten. Instead, initialize these fields to zero in vmspace_alloc(), eliminating a bcopy() from vmspace_exec() and a bzero() from vmspace_fork().
* White space fix..julian2004-07-241-3/+3
| | | | diff reduction for upcoming commit.
* If debug.mpsafenet is non-zero, run the NFS server callout withoutrwatson2004-07-241-1/+4
| | | | Giant.
* Remove spl() use from nfsrv_timer.rwatson2004-07-241-3/+0
|
* Clean up whitespace, increase consistency and correctness.scottl2004-07-232-13/+9
| | | | Submitted by: bde
* Don't include a "\n" in KTR output, it confuses automatic parsing.rwatson2004-07-231-1/+1
|
* Remove the previous hack since it doesn't make a difference and is gettingscottl2004-07-231-2/+0
| | | | in the way of debugging.
* Use kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocatingalc2004-07-231-1/+1
| | | | | KVA for explicitly managed mappings, i.e., mappings created with pmap_qenter().
* Reinforce discouragement of the use of FULL_PREEMPTION.rwatson2004-07-231-0/+1
|
* Export KTR_COMPILE as a sysctl so you can easily check from user spacerwatson2004-07-231-0/+3
| | | | what event mask has been compiled into the kernel.
* Dont expect interrupt from ATAPI_RESET, it doesn't deliver one.sos2004-07-231-0/+11
|
* Let ddb know powerpc is big endian so as to make ddb outputgallatin2004-07-231-0/+2
| | | | | | human readable. Obtained from: sparc64/include/db_machdep.h
* Don't perform pipe endpoint locking during pipe_create(), as the piperwatson2004-07-231-11/+20
| | | | | | | | | | can't yet be referenced by other threads. In microbenchmarks, this appears to reduce the cost of pipe();close();close() on UP by 10%, and SMP by 7%. The vast majority of the cost of allocating a pipe remains VM magic. Suggested by: silby
* Use kmem_alloc_nofault() rather than kmem_alloc_pageable() for allocatingalc2004-07-231-1/+1
| | | | | KVA for explicitly managed mappings, i.e., mappings created with pmap_qenter().
* Detect kernel stack excursion into guard pages. Drop into KDBgrehan2004-07-232-10/+72
| | | | | | with a wired stack if this is found. Mostly obtained from: NetBSD
* Bring KDB stack size into line with thread stack size (4 pages).grehan2004-07-232-2/+2
|
* Allow DSI exceptions to invoke DDB.grehan2004-07-232-2/+4
|
* In setpgid(), since td is passed in as a system call argument, use itrwatson2004-07-231-1/+1
| | | | in preference to curthread, which costs slightly more.
* Fix the following LOR on pf module unload:mlaier2004-07-231-4/+4
| | | | | | | 1st ifnet (ifnet) @/usr/src/sys/contrib/pf/net/pf_if.c:191 2nd pf task mtx (pf task mtx) @/usr/src/sys/contrib/pf/net/pf_if.c:197 Reported by: Pyun YongHyeon (a long time ago)
* Refine pf_check_proto_cksum() a bit in order to avoid additional in_pseudo()mlaier2004-07-231-25/+22
| | | | | | | | calls further down the stack. If we find the cksum to be okay we pretend that the hardware did all the work and hence keep the upper layers from checking again. Submitted by: Pyun YongHyeon
* Allow an effective uid of root to bypass mac_bsdextended rules; the MACrwatson2004-07-231-0/+3
| | | | | | | Framework can restrict the root user, but this policy is not intended to support that. Stylish Swiss footwear provided for: trhodes
* The ADDR16 relocations were assuming that non-local symbols had angrehan2004-07-231-14/+24
| | | | | | | | | | | | | | addend of 0. This isn't correct, and was quite easy to break by referring to the address of an element within a structure. However, fixing this exposed the fact that symbol lookups for local variables were returning the base of the section they were contained in. This case is detected by comparing the return value from elf_lookup() to the relocbase+addend value: if it is lesser, but greater than relocbase, then relocbase+addend is taken to be the authoritative value. bug reported by: gallatin
* If you insert a pccard modem and then eject it, you get a panic. Thisimp2004-07-221-1/+2
| | | | | | | happens because the sio device was never opened and com->tp is therefore NULL. ttygone can't swallow a NULL, so guard against that possibility. Other places in this function make similar checks, so I believe this is correct.
* MFi386 revision 1.421alc2004-07-221-1/+1
| | | | | | - Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in pmap_mapdev(). See revision 1.140 of kern/sys_pipe.c for a detailed rationale.
* Remove redundant inclusion of bus_if.h. It isn't needed in this file, asimp2004-07-221-1/+0
| | | | sys/bus.h includes it.
* MFp4:imp2004-07-221-30/+29
| | | | | | | Improve child_detached a little and make it conform better to style(9). Also, improve comment about what we'll be doing in the future about driver_added. Soon it will be possible to kldload usb drivers and have them attach w/o a need to disconnect/reconnect them.
* Actually free the unit when destroying the interface.brooks2004-07-221-0/+5
| | | | | | Reported by: la at delfi.lt Tested by: la at delfi.lt PR: 68618
* Remove ahb, aha, ie, le and wl devices. They are all ISA/EISA only.imp2004-07-221-8/+0
| | | | | | | I went ahead and left in the ISA cards that also have pccard attachments. There's no way that these devices could attach. OK'd by: peter
* There is no pcic device on amd64. OLDCARD isn't supported, andimp2004-07-221-9/+0
| | | | | NEWCARD will call it something different. and there are no ISA add-in devices.
* Push Giant acquisition down into fo_stat() from most callers. Acquirerwatson2004-07-224-7/+8
| | | | | | | | | | | Giant conditional on debug.mpsafenet in the socket soo_stat() routine, unconditionally in vn_statfile() for VFS, and otherwise don't acquire Giant. Accept an unlocked read in kqueue_stat(), and cryptof_stat() is a no-op. Don't acquire Giant in fstat() system call. Note: in fdescfs, fo_stat() is called while holding Giant due to the VFS stack sitting on top, and therefore there will still be Giant recursion in this case.
* Add IDs from TI's web site. Reports from the field and inspection ofimp2004-07-222-1/+14
| | | | | | | | | | | the data sheets leads me to believe these will just work. Those parts with the various media readers on them may not have the required FreeBSD drivers that will attach to the subdevices that will be seen on some of these parts. PCI 1515, 1530, 1620, 4520, 6411, 6420, 7410, 7510, 7610 Prompted by: Havard Eidnes
* More TI device IDs.imp2004-07-221-0/+3
| | | | | | These are from the datasheets downloaded from TI's web site. They describe the PCI[67]x[12]1 and PCI[67]x20 parts, with and without the smartcard enabled.
* - Change uma_zone_set_obj() to call kmem_alloc_nofault() instead ofalc2004-07-224-13/+10
| | | | | | | | | | | | | | | | | | | | | | | kmem_alloc_pageable(). The difference between these is that an errant memory access to the zone will be detected sooner with kmem_alloc_nofault(). The following changes serve to eliminate the following lock-order reversal reported by witness: 1st 0xc1a3c084 vm object (vm object) @ vm/swap_pager.c:1311 2nd 0xc07acb00 swap_pager swhash (swap_pager swhash) @ vm/swap_pager.c:1797 3rd 0xc1804bdc vm object (vm object) @ vm/uma_core.c:931 There is no potential deadlock in this case. However, witness is unable to recognize this because vm objects used by UMA have the same type as ordinary vm objects. To remedy this, we make the following changes: - Add a mutex type argument to VM_OBJECT_LOCK_INIT(). - Use the mutex type argument to assign distinct types to special vm objects such as the kernel object, kmem object, and UMA objects. - Define a static swap zone object for use by UMA. (Only static objects are assigned a special mutex type.)
* Push acquisition of Giant from fdrop_closed() into fo_close() so thatrwatson2004-07-225-6/+16
| | | | | | | | | | | | | | | | | | | | | | | individual file object implementations can optionally acquire Giant if they require it: - soo_close(): depends on debug.mpsafenet - pipe_close(): Giant not acquired - kqueue_close(): Giant required - vn_close(): Giant required - cryptof_close(): Giant required (conservative) Notes: Giant is still acquired in close() even when closing MPSAFE objects due to kqueue requiring Giant in the calling closef() code. Microbenchmarks indicate that this removal of Giant cuts 3%-3% off of pipe create/destroy pairs from user space with SMP compiled into the kernel. The cryptodev and opencrypto code appears MPSAFE, but I'm unable to test it extensively and so have left Giant over fo_close(). It can probably be removed given some testing and review.
* suser() accepts a thread argument; as suser() dereferences td_ucred, arwatson2004-07-221-0/+12
| | | | | | | | | thread-local pointer, in practice that thread needs to be curthread. If we're running with INVARIANTS, generate a warning if not. If we have KDB compiled in, generate a stack trace. This doesn't fire at all in my local test environment, but could be irritating if it fires frequently for someone, so there will be motivation to fix things quickly when it does.
* In devfs_allocv(), rather than assigning 'td = curthread', assert thatrwatson2004-07-221-7/+9
| | | | | | | | | | | | | the caller passes in a td that is curthread, and consistently pass 'td' into vget(). Remove some bogus logic that passed in td or curthread conditional on td being non-NULL, which seems redundant in the face of the earlier assignment of td to curthread if td is NULL. In devfs_symlink(), cache the passed thread in 'td' so we don't have to keep retrieving it from the 'ap' structure, and assert that td is curthread (since we dereference it to get thread-local td_ucred). Use 'td' in preference to curthread for later lockmgr calls, since they are equal.
* Arg! Revert local changes that were accidentlly included in the previousscottl2004-07-221-40/+22
| | | | version.
* Don't count needed bounce pages if loading a buffer that was created withscottl2004-07-221-23/+41
| | | | | | bus_dmamem_alloc() Submitted by: harti
* Disable the PREEMPTION-enabled code in critical_exit() that encouragesscottl2004-07-221-0/+2
| | | | | switching to a different thread. This is just a hack to try to improve stability some more, but likely points closer to the real culprit.
* Add a macro, __pure, which expands to __attribute__((__pure__)) on gcctjr2004-07-221-0/+6
| | | | | versions that support it (>=2.96). This is similar to but not the same as the __pure macro that was removed in rev. 1.21.
OpenPOWER on IntegriCloud