summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak fore adapters from POV of warnings.julian2002-02-272-2/+2
| | | | | | Define the atm_dev_free() routine so that its OK to free stuff that is defined as volatile. Note this doesn't FORCE the arguemnts to be volatile, just says that it's not an error if it is..
* Remove now unused struct proc *p.imp2002-02-271-1/+0
| | | | Approved by: jhb
* - Insert a space in the panic() string in order more clearly show thearr2002-02-272-2/+2
| | | | message.
* Add a comment explaining a code change..julian2002-02-271-2/+2
|
* Use thread0.td_ucred instead of proc0.p_ucred. This change is cosmeticjhb2002-02-273-11/+11
| | | | | | and isn't strictly required. However, it lowers the number of false positives found when grep'ing the kernel sources for p_ucred to ensure proper locking.
* - Change namei() to use td_ucred instead of p_ucred.jhb2002-02-273-7/+7
| | | | | - Change the hack in access() that uses a temporary credential to set td_ucred to the temp cred instead of p_ucred.
* - Change unp_listen() to accept a thread rather than a proc as its secondjhb2002-02-271-5/+5
| | | | | argument. - Use td_ucred in unp_listen() instead of p_ucred.
* Fix Giant leakage in several error cases in __semctl().jhb2002-02-271-4/+4
|
* Add a comment about an unlocked access to p_ucred that will go away injhb2002-02-271-0/+1
| | | | the near future.
* Use td_ucred and thus remove now unneeded proc lock acquire and release.jhb2002-02-271-3/+1
|
* kill __P.alfred2002-02-271-22/+22
|
* add assertions in the places where giant is required to catch whenalfred2002-02-271-0/+12
| | | | | | | | | | | the pipe is locked and shouldn't be. initialize pipe->pipe_mtxp to NULL when creating pipes in order not to trip the above assertions. swap pipe lock with giant around calls to pipe_destroy_write_buffer() pipe_destroy_write_buffer issue noticed by: jhb
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-27117-454/+430
| | | | reference.
* Temporarily lock Giant while we update td_ucred. The proc lock doesn'tjhb2002-02-271-6/+6
| | | | | | | | | | fully protect p_ucred yet so Giant is needed until all the p_ucred locking is done. This is the original reason td_ucred was not used immediately after its addition. Unfortunately, not using td_ucred is not enough to avoid problems. Since p_ucred could be stale, we could actually be dereferencing a stale pointer to dink with the refcount, so we really need Giant to avoid foot-shooting. This allows td_ucred to be safely used as well.
* Fix a horribly suboptimal algorithm in the vm_daemon.silby2002-02-2711-34/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to determine what to page out, the vm_daemon checks reference bits on all pages belonging to all processes. Unfortunately, the algorithm used reacted badly with shared pages; each shared page would be checked once per process sharing it; this caused an O(N^2) growth of tlb invalidations. The algorithm has been changed so that each page will be checked only 16 times. Prior to this change, a fork/sleepbomb of 1300 processes could cause the vm_daemon to take over 60 seconds to complete, effectively freezing the system for that time period. With this change in place, the vm_daemon completes in less than a second. Any system with hundreds of processes sharing pages should benefit from this change. Note that the vm_daemon is only run when the system is under extreme memory pressure. It is likely that many people with loaded systems saw no symptoms of this problem until they reached the point where swapping began. Special thanks go to dillon, peter, and Chuck Cranor, who helped me get up to speed with vm internals. PR: 33542, 20393 Reviewed by: dillon MFC after: 1 week
* Add gem and hme.tmm2002-02-271-0/+5
|
* Add a driver for the Sun GEM (Gigabit) and ERI (100 Mb/s) PCI ethernettmm2002-02-274-0/+2989
| | | | adaptors, ported from NetBSD.
* Add a driver for the Sun HME PCI/SBus ethernet adaptor, which is onboardtmm2002-02-275-0/+2455
| | | | | | | | in most machines of the Sun Ultra series. This is a port of the NetBSD driver which I enhanced to make use of the gather functionality and the configurable RX buffer offset to avoid copying all received/sent packet (instead, packets will be directly DMAd from mbuf chains and into mbuf clusters now).
* Fix a NULL deref panic in pipe_write, we can't blindly lockalfred2002-02-271-12/+12
| | | | | pipe->pipe_peer->pipe_mtxp because it may be NULL, so lock the passed in pipe's mutex instead.
* Add the following functions/macros to support byte order conversions andtmm2002-02-2731-278/+434
| | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike
* Use the updated getcredhostname() function.robert2002-02-273-4/+3
|
* Use the updated getcredhostname() function.robert2002-02-272-5/+2
|
* Make getcredhostname() take a buffer and the buffer's sizerobert2002-02-272-4/+13
| | | | | | | | as arguments. The correct hostname is copied into the buffer while having the prison's lock acquired in a jailed process' case. Reviewed by: jhb, rwatson
* - Use the new getcredhostname function in xenix_utsname(),robert2002-02-273-4/+9
| | | | | | ibcs2_getipdomainname(), and ibcs2_utssys(). Reviewed by: phk
* - Use the new getcredhostname function in the SVR4 uname system call.robert2002-02-271-2/+3
| | | | | | - Remove spurious empty line. Reviewed by: phk
* Use the getcredhostname function to fill the hostname intorobert2002-02-271-1/+3
| | | | | | | | the linux_newuname_args structure. This should fix the case of jailed linux processes not using the jail's hostname. PR: 35336 Reviewed by: phk
* Add a function which returns the correct hostname for a givenrobert2002-02-272-0/+12
| | | | | | credential. Reviewed by: phk
* Change the wording of the inline comments from the previous commit.cjc2002-02-272-16/+6
| | | | Objection from: ru
* MPsafe fixes:alfred2002-02-271-4/+23
| | | | | use SYSINIT to initialize pipe_zone. use PIPE_LOCK to protect kevent ops.
* Return ESRCH if the target process is not inferior to the curproc.tanimura2002-02-271-0/+2
| | | | Spotted by: HIROSHI OOTA <oota@LSi.nec.co.jp>
* Don't hardcode /sys when making tags, instead use ${.CURDIR}/.. thisalfred2002-02-271-1/+1
| | | | | | | fixes a problem where one tries to make tags when the source isn't in /sys. Submitted by: Jihui Yang <yangjihui@yahoo.com>
* Re-fix a pointer/integer warning.peter2002-02-272-2/+2
|
* Back out all the pmap related stuff I've touched over the last few days.peter2002-02-2741-2193/+1037
| | | | | | There is some unresolved badness that has been eluding me, particularly affecting uniprocessor kernels. Turning off PG_G helped (which is a bad sign) but didn't solve it entirely. Userland programs still crashed.
* Fix warnings that have become fataljulian2002-02-272-3/+10
| | | | | | | | 1/ conditionalise (#if 0) function that is not used. Unused code left in place for netBSD compatibility. 2/ Recode loop to convince gcc that it does initialise a variable (use do-while instead of for() so gcc knows that we always go through at least once. Feel free to check my logic.
* turn on the ethertype filter modulejulian2002-02-271-0/+1
|
* Remove a redundant decalaration of call_desc[] since it's now agj2002-02-271-2/+0
| | | | fatal error.
* First rev at making pipe(2) pipe's MPsafe.alfred2002-02-272-23/+76
| | | | | | | | | | | Both ends of the pipe share a pool_mutex, this makes allocation and deadlock avoidance easy. Remove some un-needed FILE_LOCK ops while I'm here. There are some issues wrt to select and the f{s,g}etown code that we'll have to deal with, I think we may also need to move the calls to vfs_timestamp outside of the sections covered by PIPE_LOCK.
* Minimal testing has shown that a 4 page tsb is a nice sweet spot for currentjake2002-02-271-1/+1
| | | | | | | | | | | | | | | work loads. It tapers off after that as gcc's working set generally just fits. compiling bin/csh: TSB_PAGES = 2 213.33 real 77.59 user 110.01 sys TSB_PAGES = 4 116.43 real 75.78 user 19.16 sys TSB_PAGES = 8 119.27 real 76.38 user 18.12 sys Testing by: tmm
* Parameterize the number of pages to allocate for the per-cpu area onjake2002-02-275-5/+7
| | | | PCPU_PAGES.
* Make cpu_identify take the value of the ver register and cpuid as argumentsjake2002-02-273-6/+4
| | | | so we can print nice things about non-current cpus.
* Bandaid for the Uniprocessor kernel exploding. This makes a UP kernelpeter2002-02-272-2/+2
| | | | | | boot and run (and indeed I am committing from it) instead of exploding during the int 0x15 call from inside the atkbd driver to get the keyboard repeat rates.
* More IPV6 const fixes.alfred2002-02-272-2/+2
|
* Use the pci.c code wherever possible, rather than copying all the pciimp2002-02-275-1040/+220
| | | | | | | | | | | | | | code into cardbus and s/pci/cardbus. This exposes a few pci_* functions that are now static. This work is similar to work Justin posted to the mobile list about a year or two ago, which I have neglected since then. This is a subset of his current work with the multiple inheritance newbus architecutre. When completed, that will eliminate the need for pci/pci_private.h. Similar work is needed for the cardbus_cis and pccard_cis code as well.
* Introduce a version field to `struct xucred' in place of one of thedd2002-02-278-46/+28
| | | | | | | | | | | | spares (the size of the field was changed from u_short to u_int to reflect what it really ends up being). Accordingly, change users of xucred to set and check this field as appropriate. In the kernel, this is being done inside the new cru2x() routine which takes a `struct ucred' and fills out a `struct xucred' according to the former. This also has the pleasant sideaffect of removing some duplicate code. Reviewed by: rwatson
* clarify panic messagealfred2002-02-272-2/+2
|
* Fix warnings caused by discarding const.alfred2002-02-276-9/+11
| | | | Hairy Eyeball At: peter
* Remove errors in LINT (now that they are fatal)julian2002-02-271-0/+4
|
* Jake further reduced IPI shootdowns on sparc64 in loops by using rangedpeter2002-02-277-125/+65
| | | | | | | | shootdowns in a couple of key places. Do the same for i386. This also hides some physical addresses from higher levels and has it use the generic vm_page_t's instead. This will help for PAE down the road. Obtained from: jake (MI code, suggestions for MD part)
* Remove problematic PHY_WRITE so that autoneg to 10 Mbpsdanny2002-02-271-16/+1
| | | | | | | | actually works. Submitted by: Dennis <TD790@aol.com> Reviewed by: Bill Paul <wpaul@freebsd.org> MFC after: 7 days
* remove trailing semi-colons from macro definitions.alfred2002-02-271-2/+2
|
OpenPOWER on IntegriCloud