summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Fixes for alpha pmap on SMP machines:jhb2002-02-063-52/+66
| | | | | | | | | | | | | | | | | | | | - Create a private list of active pmaps rather than abusing the list of all processes when we need to look up pmaps. The process list needs a sx lock and we can't be getting sx locks in the middle of cpu_switch() (pmap_activate() can call pmap_get_asn() from cpu_switch()). Instead, we protect the list with a spinlock. This also means the list is shorter since a pmap can be used by more than one process and we could (at least in thoery) dink with pmap's more than once, but now we only touch each pmap once when we have to update all of them. - Wrap pmap_activate()'s code to get a new ASN in an explicit critical section so that when it is called while doing an exec() we can't get preempted. - Replace splhigh() in pmap_growkernel() with a critical section to prevent preemption while we are adjusting the kernel page tables. - Fixes abuse of PCPU_GET(), which doesn't return an L-value. - Also adds some slight cleanups to the ASN handling by adding some macros instead of magic numbers in relation to the ASN and ASN generations. Reviewed by: dfr
* Don't attach to Dell PERC2/QC cards that have a firmware rev of 1.x. Thisscottl2002-02-064-0/+51
| | | | | | | | check is complicated by the fact that the Adaptec 5400S cards claim to use 1.x firmware also. PERC2/QC 1.x firmware is not compatible with this driver and will cause a system hang. MFC after: 3 days
* Allow the kern.maxusers boot tuneable to be set to 0 (previously onlydillon2002-02-061-2/+3
| | | | | | the kernel config's maxusers could be set to 0 for autosizing to work). Reviewed by: rwatson, imp MFC after: 3 days
* Correctly identify the Intel 82830 AGP bridge.benno2002-02-052-0/+6
|
* Fix a race with free'ing vmspaces at process exit when vmspaces arealfred2002-02-055-20/+37
| | | | | | | | | | | | | | | | | | | shared. Also introduce vm_endcopy instead of using pointer tricks when initializing new vmspaces. The race occured because of how the reference was utilized: test vmspace reference, possibly block, decrement reference When sharing a vmspace between multiple processes it was possible for two processes exiting at the same time to test the reference count, possibly block and neither one free because they wouldn't see the other's update. Submitted by: green
* Let the number of timecounters follow hz, otherwise people withphk2002-02-052-3/+4
| | | | | | | | | | | | | HZ=BIGNUM will strain the assumptions behind timecounters to the point where they break. This may or may not help people seeing microuptime() backwards messages. Make the global timecounter variable volatile, it makes no difference in the code GCC generates, but it makes represents the intent correctly. Thanks to: jdp MFC after: 2 weeks
* The hardware checksum code makes the assumption that a packet routed outarchie2002-02-051-2/+9
| | | | | | | | | | | | a particular Ethernet interface will actually be delivered by (only) that device driver. This is not necessarily true when ng_ether(4) is used. To word around this, while a ng_ether(4)'s "upper" hook is connected, turn off all hardware checksum, fragmentation, etc., features for that interface. PR: kern/31586 MFC after: 1 week
* Add support for the Aztech 2320 chip.tg2002-02-051-0/+45
| | | | | Reviewed by: cg Obtained from: NetBSD (partly)
* - Do not hang if the resource allocation fails.tanimura2002-02-052-19/+30
| | | | | | | - Add another quirk entry of SB AWE64. PR: kern/32530 Submitted by: Magnus Backstrom <b@etek.chalmers.se>
* Get rid of the twisted MFREE() macro entirely.dillon2002-02-0515-95/+67
| | | | | Reviewed by: dg, bmilekic MFC after: 3 days
* + A variety of 23XX changes:mjacob2002-02-0410-56/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disable MWI on 2300 based on function code, set an 'isp_port' for the 2312- it's a separate instance, but the NVRAM is shared, and the second port's NVRAM is at offset 256. + Enable RIO operation for LVD SCSI cards. This makes a *big* difference as even under reasonable load we get batched completions of about 30 commands at a time on, say, an ISP1080. + Do 'continuation' mailbox commands- this allows us to specify a work area within the softc and 'continue' repeated mailbox commands. This is more or less on an ad hoc basis and is currently only used for firmware loading (which f/w now loads substantially faster becuase the calling thread is only woken when all the f/w words are loaded- not for each one of the 40000 f/w words that gets loaded). + If we're about to return from isp_intr with a 'bogus interrupt' indication, and we're not a 23XX card, check to see whether the semaphore register is currently *2* (not *1* as it should be) and whether there's an async completion sitting in outgoing mailbox0. This seems to capture cases of lost fast posting and RIO interrupts that the 12160 && 1080 have been known to pump out under extreme load (extreme, as in > 250 active commands). + FC_SCRATCH_ACQUIRE/FC_SCRATCH_RELEASE macros. + Endian correct swizzle/unswizzle of an ATIO2 that has a WWPN in it. MFC after: 1 week
* Move the pseudofs, procfs and linprocfs modules out from the fs directory.des2002-02-046-31/+34
| | | | | Keeping them there seemed like a good idea at the time, but it annoys bde and confuses people who do not understand how MODULES_OVERRIDE works.
* Major update of the ATA RAID code, part 1:sos2002-02-0418-2053/+2263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overhaul of the attach/detach code and structures, there were some nasty bugs in the old implementation. This made it possible to collapse the ATA/ATAPI device control structures into one generic structure. A note here, the kernel is NOT ready for detach of active devices, it fails all over in random places, but for inactive devices it works. However for ATA RAID this works, since the RAID abstration layer insulates the buggy^H^H^H^H^H^Hfragile device subsystem from the physical disks. Proberly detect the RAID's from the BIOS, and mark critical RAID1 arrays as such, but continue if there is enough of the mirror left to do so. Properly fail arrays on a live system. For RAID0 that means return EIO, and for RAID1 it means continue on the still working part of the mirror if possible, else return EIO. If the state changes, log this to the console. Allow for Promise & Highpoint controllers/arrays to coexist on the same machine. It is not possible to distribute arrays over different makes of controllers though. If Promise SuperSwap enclosures are used, signal disk state on the status LED on the front. Misc fixes that I had lying around for various minor bugs. Sponsored by: Advanis Inc.
* Change EPERM to EOPNOTSUPP when failing pseudofs_setattr() arbitrarily.rwatson2002-02-041-4/+2
| | | | Quoth the alfred: The latter would be better.
* Return EPERM instead of 0 in the un-implemented pseudofs_setattr().rwatson2002-02-041-2/+1
| | | | Conceivably, it should even return EOPNOTSUPP.
* o Scatter vn_start_write() and vn_finished_write() through ACL code sorwatson2002-02-043-9/+30
| | | | | | | that it interacts properly with snapshotting. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Corrected an argument to in6_pcbnotify().ume2002-02-041-2/+3
| | | | | Obtained from: KAME MFC after: 1 week
* In tcp_respond(), correctly reset returned IPv6 header. This is essentialume2002-02-042-0/+6
| | | | | | | when the original packet contains an IPv6 extension header. Obtained from: KAME MFC after: 1 week
* Back out the "upgrading" of NBBY to unsigned, as it exposesmarkm2002-02-041-1/+1
| | | | bugs elsewhere, and also is well understood as a signed quantity.
* Note that Kirk apparently missed adding vn_start_write() and friendsrwatson2002-02-043-0/+9
| | | | | to kern_acl.c when he added snapshotting. This will need to be added at some point.
* Default debugging to OFF now.imp2002-02-044-5/+2
|
* Supported C-NET(98)P2 PnP mode.nyan2002-02-041-15/+27
| | | | | Submitted by: "Hirokazu WATANABE" <gwna@geocities.co.jp> MFC after: 3 days
* Remove mbuf exhaustion warning messages; these are handled by thesilby2002-02-041-4/+0
| | | | | | | mbuf system in a rate-limited fashion now. Reviewed by: luigi MFC after: 1 week
* Follow NetBSD and ANSIfy the function definitions.joe2002-02-033-343/+232
| | | | Remove trailing whitespaces (submitted to NetBSD).
* WARNS=n and lint(1) silencer. Declare an array of (const) stringsmarkm2002-02-031-1/+1
| | | | as const char.
* Zero functional difference; make some integer constants unsigned, asmarkm2002-02-032-4/+4
| | | | | they are used in unsigned context. This shuts lint(1) up in a few significant ways with "signed/unsigned" arithmetic warnings.
* Make the style a little bit more consistant by removing parametermarkm2002-02-032-6/+4
| | | | | names from some prototypes. (Other prototypes here already have these removed).
* Use osigreturn(2) instead of sigreturn(2) plus broken magic for returningbde2002-02-037-42/+18
| | | | | | | | | | | | | | | | | | from old signal handlers. This is simpler and faster, and fixes (new) sigreturn(2) when %eip in the new signal context happens to match the magic value (0x1d516). 0x1d516 is below the default ELF text section, so this probably never broken anything in practice. locore.s: In addition, don't build the signal trampoline for old signal handlers when it is not used. alpha: Not fixed, but seems to be even less broken in practice due to more advanced magic. A false match occurs for register #32 in mc_regs[]. Since there is no hardware register #32, a false match is only possible for direct calls to sigreturn(2) that happen to have the magic number in the spare mc_regs[32] field.
* Improve the change in the previous commit: use a stub for osigreturn()bde2002-02-035-0/+20
| | | | when it is not really used instead of unconditionalizing all of it.
* Regenerate.joe2002-02-022-503/+615
|
* Update comments and product identifiers so that they're the samejoe2002-02-021-12/+12
| | | | as NetBSD's definitions.
* Add some missing usb vendors (from NetBSD).joe2002-02-021-0/+16
|
* Sync with NetBSD's version, dropping all the 'ltd', 'corp', etc.joe2002-02-021-140/+140
| | | | | | It's more important to keep this file easily syncable across the BSDs, and NetBSD have stated a preference for not adding them to theirs.
* o Add the prototype of cr_cansignal() from an earlier change torwatson2002-02-021-0/+1
| | | | | | | | | kern_prot.c. This has apparently been sitting in my local tree for ages, and has been generating a warning during the building of kern_prot.o. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Merged cy_pcireg.h into the one file that uses it (cy_pci.c).bde2002-02-023-47/+32
|
* Fixed breakage of interrupt setup in previous commit. It used anbde2002-02-022-0/+4
| | | | uninitialized variable in the !CY_PCI_FASTINTR case (*blush*).
* In the routines vrele() and vput(), we must lock the vnode andmckusick2002-02-021-15/+15
| | | | | | | | | | | call VOP_INACTIVE before placing the vnode back on the free list. Otherwise there is a race condition on SMP machines between getnewvnode() locking the vnode to reclaim it and vrele() locking the vnode to inactivate it. This window of vulnerability becomes exaggerated in the presence of filesystems that have been suspended as the inactive routine may need to temporarily release the lock on the vnode to avoid deadlock with the syncer process.
* When taking a snapshot, we must check for active files that havemckusick2002-02-026-272/+336
| | | | | | been unlinked (e.g., with a zero link count). We have to expunge all trace of these files from the snapshot so that they are neither reclaimed prematurely by fsck nor saved unnecessarily by dump.
* Remove bogus assertion in dup2 that can lead to panics when kernelalfred2002-02-011-2/+0
| | | | | | | | | | | | | | | | | threads race for a file slot. dup2(2) incorrectly assumes that if it needs to grow the ofiles array that it will get what it wants. This assertion was valid before we allowed shared filedescriptor tables but is now incorrect. The assertion can trigger superfolous panics if the thread doing a dup2 looses a race with another thread while possibly blocked in the MALLOC call in fdalloc. Another thread may grab the slot we are requesting which makes fdalloc return something other than what we asked for, this will triggering the bogus assertion. MFC after: 2 weeks Reviewed by: phk
* Avoid lock order reversal filedesc/Giant when calling FREE() in fdallocalfred2002-02-011-0/+2
| | | | | | by unlocking the filedesc before calling FREE(). Submitted by: bde
* Don't recurse on filedesc lock in chroot_refuse_vdir_fds().alfred2002-02-012-16/+18
| | | | Noticed by: Michael Nottebrock <michaelnottebrock@gmx.net>
* Regenerate to make osigreturn standard.bde2002-02-015-12/+13
|
* Made osigreturn(2) standard so that SYS_osigreturn can be used in thebde2002-02-011-1/+1
| | | | | | | | | | | | signal trampoline for old signals. The arches that support old signals currently abuse sigreturn(2) instead. This mainly complicates things and slightly breaks the the new sigreturn(2). COMPAT is too limited to support the correct configuration of osigreturn, and this commit doesn't attempt to fix it; it just moves the bogusness: osigreturn() must now be provided unconditionally even on arches that don't really need it; previously it had to be provided under the bogus condition defined(COMPAT_43).
* Compile osigreturn() unconditionally since it will always be needed onbde2002-02-019-33/+30
| | | | | | | | | | | | | | | | | | some arches and the syscall table is machine-independent. It was (bogusly) conditional on COMPAT_43, so this usually makes no difference. ia64: in addition: - replace the bogus cloned comment before osigreturn() by a correct one. osigreturn() is just a stub fo ia64's. - fix the formatting of cloned comment before sigreturn(). - fix the return code. use nosys() instead of returning ENOSYS to get the same semantics as if the syscall is not in the syscall table. Generating SIGSYS is actually correct here. - fix style bugs. powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment. sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
* Expand COMBRD(x) macro.nyan2002-02-011-2/+2
|
* Some netgraph parse types (such as for the 'value' field in ng_ksocket'sarchie2002-02-011-8/+15
| | | | | | | | 'struct ng_ksocket_sockopt') like to peek into the ng_mesg header for information. Make sure when generating default values that we provide a valid header to peek into. MFC after: 1 week
* * Remove __P and convert to ANSI prototypes.obrien2002-02-011-1/+3
| | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
* GC P_BUFEXHAUST leftovers, we've had a new mechanism to avoid bufferdillon2002-01-313-5/+1
| | | | | | cache lockups for over a year now. MFC after: 0 days
* identify GLPRISM2 PCI WaveLAN/IEEE 802.11alfred2002-01-311-0/+1
| | | | Submitted by: Toni Andjelkovic <toni@soth.at>
* Finish revs.1.23 and 1.24 so that MCOUNT_ENTER really actually compilesbde2002-01-312-0/+2
| | | | | | | | | for SMP in the plain profiling case. It seems to work too. This error was not detected by LINT because LINT only compiles the GUPROF profiling case, which is is a superset of the plain profiling case for !SMP but which is so broken for SMP that the buggy code is not compiled.
OpenPOWER on IntegriCloud