summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add some more O2Micro devices I gleened from the web site/linux pcmcia cs.Warner Losh2001-04-182-4/+13
| | | | | | | | | | | | Add TI4451 as well. These are untested since I don't have the hardware to test against. Also, some O2Micro devices are #define w/o numbers as place holders so that I can encourage people to submit them when they appear in the channels. Notes: svn path=/head/; revision=75645
* Fix the botched rev 1.59 where I made it such that without INVARIANTSAlfred Perlstein2001-04-181-2/+2
| | | | | | | | | the map is never locked. Submitted by: tegge Notes: svn path=/head/; revision=75644
* Add support for the OZ6832.Warner Losh2001-04-182-0/+3
| | | | | | | Submitted by: Martin Nilsson <martin@svenskabutiker.se> Notes: svn path=/head/; revision=75643
* Move setting of TI113X_PCI_CARD_CONTROL register soonerWarner Losh2001-04-172-6/+4
| | | | Notes: svn path=/head/; revision=75639
* Minor comment that missed the last changeWarner Losh2001-04-172-2/+2
| | | | Notes: svn path=/head/; revision=75638
* When booting, turn on the 3E0 compatibility address for ricoh cardbusWarner Losh2001-04-174-6/+64
| | | | | | | | | | | | | | parts. This is based on the newcard code that turns it off :-). We can now reboot after NEWCARD or Windows and have OLDCARD work. Add support for the RL5C466 while I'm at it. Treat TI1031 the same as the CLPD6832. It doesn't work yet, but sucks less than it did before. Also add a few #defines for other changes in the pipe. Notes: svn path=/head/; revision=75637
* Make this driver play ball with devfs(5).Dima Dorfman2001-04-172-6/+38
| | | | | | | Reviewed by: brian Notes: svn path=/head/; revision=75633
* Add a sanity check on ucred refcount.Alfred Perlstein2001-04-171-0/+1
| | | | | | | Submitted by: Terry Lambert <terry@lambert.org> Notes: svn path=/head/; revision=75632
* Implement client side NFS locks.Alfred Perlstein2001-04-1721-15/+896
| | | | | | | | Obtained from: BSD/os Import Ok'd by: mckusick, jkh, motd on builder.freebsd.org Notes: svn path=/head/; revision=75631
* Write a switch statement as less obscure if statements.Poul-Henning Kamp2001-04-171-18/+8
| | | | Notes: svn path=/head/; revision=75629
* Save are floating point state in cpu_switch() if needed instead of relyingJohn Baldwin2001-04-172-1/+8
| | | | | | | | | | completely on lazy floating point state saving. This is needed for the SMP case since processes can migrate to other CPUs. Submitted by: dfr Notes: svn path=/head/; revision=75622
* Randomize the TCP initial sequence numbers more thoroughly.Kris Kennaway2001-04-178-8/+161
| | | | | | | | Obtained from: OpenBSD Reviewed by: jesper, peter, -developers Notes: svn path=/head/; revision=75619
* Fix an old bug related to BETTER_CLOCK. Call forward_*clock if SMPJohn Baldwin2001-04-171-3/+3
| | | | | | | | | | | | and __i386__ are defined rather than if SMP and BETTER_CLOCK are defined. The removal of BETTER_CLOCK would have broken this except that kern_clock.c doesn't include <machine/smptests.h>, so it doesn't see the definition of BETTER_CLOCK, and forward_*clock aren't called, even on 4.x. This seems to fix the problem where a n-way SMP system would see 100 * n clk interrupts and 128 * n rtc interrupts. Notes: svn path=/head/; revision=75616
* Regen.Nick Hibma2001-04-172-2/+9
| | | | Notes: svn path=/head/; revision=75613
* Add the HP scanner 3400CNick Hibma2001-04-171-0/+1
| | | | Notes: svn path=/head/; revision=75612
* Regen.Nick Hibma2001-04-172-2/+18
| | | | Notes: svn path=/head/; revision=75609
* Lexar jumpSHOT Id.Nick Hibma2001-04-171-0/+4
| | | | | | | Submitted by: gshapiro Notes: svn path=/head/; revision=75608
* set gd_other_cpus later, when we have a better idea what the other cpusAndrew Gallatin2001-04-171-1/+0
| | | | | | | | | are. submitted by: jhb Notes: svn path=/head/; revision=75605
* Improved support for alpha SMP. The following commit gets dual AS2100sAndrew Gallatin2001-04-171-54/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and AS4100s into single user mode. This work was done jointly by jhb and myself, and builds on dfr's earlier work. smp_init_secondary() / smp_start_secondary() - use the uniq val to pass the globalp (me) - fancy footwork to take any pending machine checks (me) - doing things the FreeBSD way and getting the per-cpu idleproc created correctly, and synchronizing the startup of secondaries (jhb) mp_start() - better recognition of available cpus (jhb) smp_rendezvous() - if smp hasn't started, only run the rendezvous function on the current cpu. Sleuthing and (prior) incorrect fix by me, correct fix by jhb smp_handle_ipi() - more verbose handling of console messages (jhb) - grab sched lock around setting PS_ASTPENDING (jhb) forward_*clock() - commented out. Joint decision by dfr, jhb and myself General synchronization improvements (more mb()s, etc) (jhb) Printf cleanups (joint) Whitespace cleanups (jhb) Notes: svn path=/head/; revision=75604
* Changes to support SMP:Andrew Gallatin2001-04-171-6/+2
| | | | | | | | | | | | - don't do the stack overflow sanity check on MP systems -- p->p_addr will be malloc'ed memory (not K0SEG) and the check will fail. - don't ignore clock interrupts on secondaries. Alphas apparently roundrobin clock interrupts to all cpus, so we're going to take clock interrupts on all CPUS and not forward them. Notes: svn path=/head/; revision=75600
* changes to smp_init_secondary_glue():Andrew Gallatin2001-04-171-19/+11
| | | | | | | | | | | | | | | - use the unique value to save the per-cpu globalp struct like the comment says - don't lower the ipl to ALPHA_PSL_IPL_HIGH: we may have a pending machine check to take and we're not prepared for that yet, as we haven't setup our interrupt entry points. (this may only happen on sable/lynx) - indicate the fact that the working version of smp_init_secondary() doesn't return (this is tied up in other changes and hasn't yet been committed). Notes: svn path=/head/; revision=75599
* Dont (ab)use drv2 to know if (si_flags & SI_NAMED) (pointed out by dd)Brian Somers2001-04-171-5/+3
| | | | | | | Call cdevsw_remove when we unload. Notes: svn path=/head/; revision=75582
* This patch removes the VOP_BWRITE() vector.Poul-Henning Kamp2001-04-1719-66/+74
| | | | | | | | | | | | | | | | VOP_BWRITE() was a hack which made it possible for NFS client side to use struct buf with non-bio backing. This patch takes a more general approach and adds a bp->b_op vector where more methods can be added. The success of this patch depends on bp->b_op being initialized all relevant places for some value of "relevant" which is not easy to determine. For now the buffers have grown a b_magic element which will make such issues a tiny bit easier to debug. Notes: svn path=/head/; revision=75580
* Add debugging option to always read/write cylinder groups as fullKirk McKusick2001-04-172-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sized blocks. To enable this option, use: `sysctl -w debug.bigcgs=1'. Add debugging option to disable background writes of cylinder groups. To enable this option, use: `sysctl -w debug.dobkgrdwrite=0'. These debugging options should be tried on systems that are panicing with corrupted cylinder group maps to see if it makes the problem go away. The set of panics in question are: ffs_clusteralloc: map mismatch ffs_nodealloccg: map corrupted ffs_nodealloccg: block not in map ffs_alloccg: map corrupted ffs_alloccg: block not in map ffs_alloccgblk: cyl groups corrupted ffs_alloccgblk: can't find blk in cyl ffs_checkblk: partially free fragment The following panics are less likely to be related to this problem, but might be helped by these debugging options: ffs_valloc: dup alloc ffs_blkfree: freeing free block ffs_blkfree: freeing free frag ffs_vfree: freeing free inode If you try these options, please report whether they helped reduce your bitmap corruption panics to Kirk McKusick at <mckusick@mckusick.com> and to Matt Dillon <dillon@earth.backplane.com>. Notes: svn path=/head/; revision=75573
* Background fsck sysctl operations must use vn_start_write andKirk McKusick2001-04-171-8/+14
| | | | | | | | vn_finished_write so that they do not attempt to modify a suspended filesystem. Notes: svn path=/head/; revision=75572
* In my first reading of POSIX.1e, I misinterpreted handling of theRobert Watson2001-04-176-225/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACL_USER_OBJ and ACL_GROUP_OBJ fields, believing that modification of the access ACL could be used by privileged processes to change file/directory ownership. In fact, this is incorrect; ACL_*_OBJ (+ ACL_MASK and ACL_OTHER) should have undefined ae_id fields; this commit attempts to correct that misunderstanding. o Modify arguments to vaccess_acl_posix1e() to accept the uid and gid associated with the vnode, as those can no longer be extracted from the ACL passed as an argument. Perform all comparisons against the passed arguments. This actually has the effect of simplifying a number of components of this call, as well as reducing the indent level, but now seperates handling of ACL_GROUP_OBJ from ACL_GROUP. o Modify acl_posix1e_check() to return EINVAL if the ae_id field of any of the ACL_{USER_OBJ,GROUP_OBJ,MASK,OTHER} entries is a value other than ACL_UNDEFINED_ID. As a temporary work-around to allow clean upgrades, set the ae_id field to ACL_UNDEFINED_ID before each check so that this cannot cause a failure in the short term (this work-around will be removed when the userland libraries and utilities are updated to take this change into account). o Modify ufs_sync_acl_from_inode() so that it forces ACL_{USER_OBJ,GROUP_OBJ,MASK,OTHER} ae_id fields to ACL_UNDEFINED_ID when synchronizing the ACL from the inode. o Modify ufs_sync_inode_from_acl to not propagate uid and gid information to the inode from the ACL during ACL update. Also modify the masking of permission bits that may be set from ALLPERMS to (S_IRWXU|S_IRWXG|S_IRWXO), as ACLs currently do not carry none-ACCESSPERMS (S_ISUID, S_ISGID, S_ISTXT). o Modify ufs_getacl() so that when it emulates an access ACL from the inode, it initializes the ae_id fields to ACL_UNDEFINED_ID. o Clean up ufs_setacl() substantially since it is no longer possible to perform chown/chgrp operations using vop_setacl(), so all the access control for that can be eliminated. o Modify ufs_access() so that it passes owner uid and gid information into vaccess_acl_posix1e(). Pointed out by: jedger Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=75571
* Blow away the panic mutex in favor of using a single atomic_cmpset() on aJohn Baldwin2001-04-1711-39/+9
| | | | | | | | | panic_cpu shared variable. I used a simple atomic operation here instead of a spin lock as it seemed to be excessive overhead. Also, this can avoid recursive panics if, for example, witness is broken. Notes: svn path=/head/; revision=75570
* Check to see if enroll() returns NULL in the witness initialization. ThisJohn Baldwin2001-04-171-0/+4
| | | | | | | | | | can happen if witness runs out of resources during initialization or if witness_skipspin is enabled. Sleuthing by: Peter Jeremy <peter.jeremy@alcatel.com.au> Notes: svn path=/head/; revision=75569
* Exit and re-enter the critical section while spinning for a spinlock soJohn Baldwin2001-04-172-0/+6
| | | | | | | that interrupts can come in while we are waiting for a lock. Notes: svn path=/head/; revision=75568
* - Add appropriate #ifndef/#define/#endif to protect against multipleJohn Baldwin2001-04-171-5/+4
| | | | | | | | | inclusions. - Blow away all evidence of a static curpcb as curpcb is a per-CPU variable and this definition is now bogus. Notes: svn path=/head/; revision=75566
* - Fix memory barriers in atomic operations so that the barriers are alwaysJohn Baldwin2001-04-171-20/+26
| | | | | | | | | | | | | | | | "inside" of locked regions. That is, an acquire atomic operation will always enforce a memory barrier after the atomic operation and a release operation will always enforce a memory barrier before the atomic operation. - Explicitly use 'mb' instead of 'wmb' in release atomic operations. The 'wmb' memory barrier is not strong enough to guarantee coherence with other processors. This is effectively a nop since alpha_wmb() actually performs a 'mb' and not a 'wmb', but I wanted the code to be more correct since at some point in the future alpha_wmb()'s implementation may switch to being a real 'wmb'. Notes: svn path=/head/; revision=75565
* Add a cpu_throw() function that secondary CPU's can use for their firstJohn Baldwin2001-04-171-0/+10
| | | | | | | context switch. Notes: svn path=/head/; revision=75563
* In exception_return(), test for usermode before testing the IPL to see ifJohn Baldwin2001-04-171-3/+7
| | | | | | | | | | | | | | | we should call ast(). This allows us to branch to a separate Lkernelret label so we can fixup the saved t7 register in the trapframe. Otherwise we can run into a problem on SMP systems where a process is interrupted by a trap or interrupt on one CPU, migrates to another CPU, and then returns with the t7 in the stack clobbering the CPU's t7. As a result, two CPU's would both point to the same per-CPU data and things would go downhill from there. Sleuthing help by: gallatin Notes: svn path=/head/; revision=75562
* - Stop other CPU's in the SMP case when we enter ddb.John Baldwin2001-04-171-2/+52
| | | | | | | | | - Add a new ddb command: 'show pcpu' similar to the i386 command added recently. By default it displays the current CPU's info, but an optional argument can specify the logical ID of a specific CPU to examine. Notes: svn path=/head/; revision=75561
* Add support the the Intel ICH2 mobileSøren Schmidt2001-04-162-20/+14
| | | | | | | Tidy chip name printing a bit. Notes: svn path=/head/; revision=75553
* Add missing sound module.Mark Murray2001-04-161-0/+1
| | | | | | | OK'ed by: cg Notes: svn path=/head/; revision=75550
* Fix an off-by-2 error in periphdriver_register(). The read side of theKenneth D. Merry2001-04-161-1/+1
| | | | | | | | | | | bcopy would go off the end of the array by two elements, which sometimes causes a panic if it happens to cross into a page that isn't mapped. Submitted by: gibbs Reviewed by: peter Notes: svn path=/head/; revision=75549
* Move the isa parts to a separate file.John Hay2001-04-166-2447/+6
| | | | Notes: svn path=/head/; revision=75541
* Update to the 2001-04-02 version of the nanokernel code from Dave Mills.John Hay2001-04-162-24/+30
| | | | Notes: svn path=/head/; revision=75540
* Merged from sys/i386/isa/npx.c revision 1.95.KATO Takenori2001-04-161-1/+1
| | | | Notes: svn path=/head/; revision=75539
* Merged from sys/conf/options.i386 revision 1.148.KATO Takenori2001-04-161-2/+2
| | | | Notes: svn path=/head/; revision=75538
* Turn on kernel debugging support (DDB, INVARIANTS, INVARIANT_SUPPORT, WITNESS)David E. O'Brien2001-04-156-6/+42
| | | | | | | | | by default while SMPng is still being developed. Submitted by: jhb Notes: svn path=/head/; revision=75528
* use TAILQ_FOREACH, fix a comment's locationAlfred Perlstein2001-04-153-15/+6
| | | | Notes: svn path=/head/; revision=75523
* Call strlen() once instead of twice.Brian Somers2001-04-141-2/+2
| | | | Notes: svn path=/head/; revision=75519
* Back out wrapping the asm ... ; bits in #ifndef lint macros. ThereMark Murray2001-04-141-6/+0
| | | | | | | | | | | | | | | | | | | | are some good reasons for not doing this, even if the linting of the code breaks. 1) If lint were ever to understand the stuff inside the macros, that would break the checks. 2) There are ways to use __GNUC__ to exclude overly specific code. 3) (Not yet practical) Lint(1) needs to properlyu understand all of te code we actually run. Complained about by: bde Education by: jake, jhb, eivind Notes: svn path=/head/; revision=75518
* The VIA 586 chip does UDMA from rev 0x3 onwards.Søren Schmidt2001-04-141-1/+1
| | | | | | | MFC candidate! Notes: svn path=/head/; revision=75516
* Update to describe use of mdconfig instead of deprecated vnconfig.Kirk McKusick2001-04-141-3/+3
| | | | | | | Submitted by: Steve Ames <steve@virtual-voodoo.com> Notes: svn path=/head/; revision=75515
* dgm now builds as a moduleBrian Somers2001-04-142-1/+9
| | | | Notes: svn path=/head/; revision=75511
* New-busify and ansify.Brian Somers2001-04-141-895/+1061
| | | | | | | | I've cleaned up a bit of the formatting here, but it's still a long way from style(9). Notes: svn path=/head/; revision=75510
* This checkin adds support in ufs/ffs for the FS_NEEDSFSCK flag.Kirk McKusick2001-04-143-8/+19
| | | | | | | | | | | | | | | | | | | | | | It is described in ufs/ffs/fs.h as follows: /* * Filesystem flags. * * Note that the FS_NEEDSFSCK flag is set and cleared only by the * fsck utility. It is set when background fsck finds an unexpected * inconsistency which requires a traditional foreground fsck to be * run. Such inconsistencies should only be found after an uncorrectable * disk error. A foreground fsck will clear the FS_NEEDSFSCK flag when * it has successfully cleaned up the filesystem. The kernel uses this * flag to enforce that inconsistent filesystems be mounted read-only. */ #define FS_UNCLEAN 0x01 /* filesystem not clean at mount */ #define FS_DOSOFTDEP 0x02 /* filesystem using soft dependencies */ #define FS_NEEDSFSCK 0x04 /* filesystem needs sync fsck before mount */ Notes: svn path=/head/; revision=75503