Commit graph

52988 commits

Author SHA1 Message Date
Bosko Milekic ca43854a66 (Introduce something sitting in my repo for 3 weeks now...)
Have if_ti stop "hiding" the softc pointer in the buffer region. Rather,
use the available void * passed to the free routine and pass the softc
pointer through there.

To note: in MEXTADD(), TI_JUMBO_FRAMELEN should probably be TI_JLEN. I left it
unchanged, because this way I'm sure to not damage anything in this respect...
2000-10-21 00:13:35 +00:00
John Baldwin b67a3e6e85 Propogate the 'const'ness of mutex descriptions to the witness code to
quiet warnings.
2000-10-20 22:45:01 +00:00
John Baldwin bd4635599d Define the mtx_legal2block() macro used in the witness code that managed
to get lost during the MI mutex conversion.

Reported by:    Steve Kargl <sgk@troutmask.apl.washington.edu>
2000-10-20 22:44:06 +00:00
John Baldwin 32a48fa01c Revert the init_clocks change in revision 1.72. On the alpha we use an
ISA device for our clock, so trying to initialize the clock before probing
devices introduces a chicken and egg problem.

Debug help from:	peter
2000-10-20 22:12:16 +00:00
John Baldwin 78f0da0373 Actually enable the witness code if the WITNESS kernel option is enabled. 2000-10-20 21:58:11 +00:00
Warner Losh f40ed9c2e4 Allow interrupts to be sharable.
This allows us to probe, but not attach.
2000-10-20 20:29:59 +00:00
Warner Losh 4659a20822 Get the interrupt correct. 2000-10-20 20:27:22 +00:00
John Baldwin 9aea17a792 Fix a braino in the ASS_SIEN() macro in the MUTEX_DEBUG case by using
mtx_saveintr instead of saveintr.
2000-10-20 20:27:12 +00:00
Andrey A. Chernov 7e290fd42a Back out increasing entropy file size workaround and wait for real fix instead.
Requested by: markm
2000-10-20 20:26:05 +00:00
John Baldwin f5271ebc2f Doh. Fix a 64-bit-ism by using uintptr_t for a temporary lock variable
instead of int.
2000-10-20 20:24:40 +00:00
John Baldwin 8a6149a3a3 Don't bother setting the saved IPL in the sched_lock mutex as it doesn't
really do anything since the first mtx_enter() will overwrite the value
saved here.
2000-10-20 20:14:55 +00:00
Josef Karthauser cce1cd64ed Fix a typo in the last commit; should be 'remove' not 'insert'.
Noticed by:	sanpei
2000-10-20 20:02:31 +00:00
John Baldwin 8cc99fae9a Catch up to some of the changes to _getlock_spin_block. Specifically,
use _obtain_lock() instead of a manual atomic_cmpset_ptr.
2000-10-20 19:54:47 +00:00
John Baldwin bb352e20a2 Grrrr. Fix the order of the #define's so atomic_cmpset_{acq,rel}_long
are defined before atomic_cmpset_{acq,rel}_ptr tries to call them.
2000-10-20 19:53:52 +00:00
John Baldwin 6d02703c2f Fix the atomic_cmpset_{acq,rel}_ptr() functions to do proper type-casting. 2000-10-20 19:46:02 +00:00
Jonathan Chen e4cd0fe921 note the new preliminary support of cardbus stuff 2000-10-20 19:44:36 +00:00
Jonathan Chen 8d0e8723e1 remove old pccbb bridge code.
(argh, I thought I already did this in the original commmit)
2000-10-20 19:37:51 +00:00
Wolfram Schneider 04ec069eb0 update URL and copyright 2000-10-20 18:27:53 +00:00
Wolfram Schneider 7089ec586f Added upcoming FreeBSD 4.2 2000-10-20 18:21:44 +00:00
Poul-Henning Kamp 1921a06d6a Introduce the M_ZERO flag to malloc(9)
Instead of:

        foo = malloc(sizeof(foo), M_WAIT);
        bzero(foo, sizeof(foo));

You can now (and please do) use:

        foo = malloc(sizeof(foo), M_WAIT | M_ZERO);

In the future this will enable us to do idle-time pre-zeroing of
malloc-space.
2000-10-20 17:54:55 +00:00
Jordan K. Hubbard 1d745d28e0 Redirect the stderr of dd to /dev/null so the user doesn't see rather
weird dd output on bootup as /dev/random is being reseeded.  Also,
can't this happen in the background since /dev/random blocks?
2000-10-20 17:41:46 +00:00
Andrey A. Chernov 2af8bc5b22 Increase entropy file size from 4096 to 16384 because 4096 actually is not
enough to cause reseeding
2000-10-20 16:32:05 +00:00
Archie Cobbs 69ad30ba3a Add actual URL for XMAC II datasheet in comments. 2000-10-20 16:18:16 +00:00
Andrey A. Chernov 6fdfeafd1b Add i815 host to PCI bridge ID 2000-10-20 16:05:47 +00:00
Andrey A. Chernov c07f6a2dd1 Return -10000 in pci_hostb_probe to allow agp driver (disabled otherwise) 2000-10-20 15:40:05 +00:00
Andrey A. Chernov da0f52e1ea Add i815 Host to Hub 2000-10-20 15:14:51 +00:00
Andrey A. Chernov 000fc03e87 Add i815 IDs 2000-10-20 15:12:57 +00:00
Ruslan Ermilov cc22c7a746 Save a few CPU cycles in IP fragmentation code. 2000-10-20 14:10:37 +00:00
MIHIRA Sanpei Yoshiro 2a2e255b8a add -I option, ``Don't get and use a list of free
IRQs from kernel.''..

With IBM ThinkPad600.  ``sio1'' was disabled in BIOS
and irq 3 was free (also not listed in dmesg), I think.
But I could not use irq 3 for PC-Card with new(PIOCSRESOURCE
ioctl enabled) pccardd.
2000-10-20 13:08:18 +00:00
Hellmuth Michaelis 1c2715d95d Submitted by: Hans Petter Selasky <hselasky@c2i.net>
Remove double 0x7e flags between hdlc-frames.
2000-10-20 11:20:58 +00:00
KATO Takenori 8de38d83a3 Used kbio.h and consio.h instead of machine/console.h. 2000-10-20 10:35:44 +00:00
KATO Takenori 5a262ebb43 Merged from sys/i386/isa/npx.c revision 1.86. 2000-10-20 10:20:27 +00:00
KATO Takenori 618028ff9f Merged from sys/i386/isa/clock.c revision 1.160. 2000-10-20 10:19:40 +00:00
KATO Takenori 6a8ef4f44f Merged from sys/i386/i386/machdep.c revisions 1.417 and 1.418. 2000-10-20 10:17:26 +00:00
Roger Hardiman b02fea74af Add missing 'unit' code
Submitted by:	Brad L. Chisholm <blc@bsdwins.com>
2000-10-20 08:16:53 +00:00
John Baldwin 35e0e5b311 Catch up to moving headers:
- machine/ipl.h -> sys/ipl.h
- machine/mutex.h -> sys/mutex.h
2000-10-20 07:58:15 +00:00
John Baldwin 341885a9fc GC the unused safepri variable. 2000-10-20 07:55:41 +00:00
John Baldwin 36f8814a83 Remove unnecessary machine/mutex.h include. 2000-10-20 07:54:21 +00:00
John Baldwin 700bfa750f - GC some #if 0'd code regarding the non-existant safepri variable.
- Don't dink with the witness state of Giant unless we actually own it
  during mi_switch().
2000-10-20 07:52:10 +00:00
John Baldwin d1182da2cf Actually harvest interrupt threads when the last handler is removed from a
thread.
2000-10-20 07:46:12 +00:00
John Baldwin 13b0500f02 - machine/mutex.h -> sys/mutex.h
- Use cpu_throw() instead of cpu_switch() during cpu_exit() since we don't
  need to save our previous state.
2000-10-20 07:43:55 +00:00
John Baldwin ab4f2c187a Catch up to SMP_DEBUG -> MUTEX_DEBUG. 2000-10-20 07:41:50 +00:00
John Baldwin bce7f05af8 - machine/mutex.h -> sys/mutex.h
- Catch up to the MI mutex structure due to saveflags,saveipl,savepsr
  becoming saveintr.
2000-10-20 07:38:44 +00:00
John Baldwin 557b927eca - machine/mutex.h -> sys/mutex.h
- Use MUTEX_DECLARE() and MTX_COLD for Giant and sched_lock.
2000-10-20 07:32:48 +00:00
John Baldwin 02660e29a8 - machine/mutex.h -> sys/mutex.h
- machine/ipl.h -> sys/ipl.h
- Use MUTEX_DECLARE() for clock_lock
2000-10-20 07:31:00 +00:00
John Baldwin 1e9b3e8eb0 - machine/mutex.h -> sys/mutex.h
- Use MUTEX_DECLARE() and MTX_COLD for vm86pcb_lock
2000-10-20 07:30:11 +00:00
John Baldwin eec258d257 - machine/mutex.h -> sys/mutex.h
- Use MUTEX_DECLARE() and MTX_COLD for the malloc_mtx mutex
2000-10-20 07:29:16 +00:00
John Baldwin d8881ca31d - machine/mutex.h -> sys/mutex.h
- The initial lock_mtx mutex used in the lockmgr code is initialized very
  early, so use MUTEX_DECLARE() and MTX_COLD.
2000-10-20 07:28:00 +00:00
John Baldwin 36412d79b4 - Make the mutex code almost completely machine independent. This greatly
reducues the maintenance load for the mutex code.  The only MD portions
  of the mutex code are in machine/mutex.h now, which include the assembly
  macros for handling mutexes as well as optionally overriding the mutex
  micro-operations.  For example, we use optimized micro-ops on the x86
  platform #ifndef I386_CPU.
- Change the behavior of the SMP_DEBUG kernel option.  In the new code,
  mtx_assert() only depends on INVARIANTS, allowing other kernel developers
  to have working mutex assertiions without having to include all of the
  mutex debugging code.  The SMP_DEBUG kernel option has been renamed to
  MUTEX_DEBUG and now just controls extra mutex debugging code.
- Abolish the ugly mtx_f hack.  Instead, we dynamically allocate
  seperate mtx_debug structures on the fly in mtx_init, except for mutexes
  that are initiated very early in the boot process.   These mutexes
  are declared using a special MUTEX_DECLARE() macro, and use a new
  flag MTX_COLD when calling mtx_init.  This is still somewhat hackish,
  but it is less evil than the mtx_f filler struct, and the mtx struct is
  now the same size with and without mutex debugging code.
- Add some micro-micro-operation macros for doing the actual atomic
  operations on the mutex mtx_lock field to make it easier for other archs
  to override/optimize mutex ops if needed.  These new tiny ops also clean
  up the code in some places by replacing long atomic operation function
  calls that spanned 2-3 lines with a short 1-line macro call.
- Don't call mi_switch() from mtx_enter_hard() when we block while trying
  to obtain a sleep mutex.  Calling mi_switch() would bogusly release
  Giant before switching to the next process.  Instead, inline most of the
  code from mi_switch() in the mtx_enter_hard() function.  Note that when
  we finally kill Giant we can back this out and go back to calling
  mi_switch().
2000-10-20 07:26:37 +00:00
John Baldwin ccbdd9ee59 - Expand the set of atomic operations to optionally include memory barriers
in most of the atomic operations.  Now for these operations, you can
  use the normal atomic operation, you can use the operation with a read
  barrier, or you can use the operation with a write barrier.  The function
  names follow the same semantics used in the ia64 instruction set.  An
  atomic operation with a read barrier has the extra suffix 'acq', due to
  it having "acquire" semantics.  An atomic operation with a write barrier
  has the extra suffix 'rel'.  These suffixes are inserted between the
  name of the operation to perform and the typename.  For example, the
  atomic_add_int() function now has 3 variants:
  - atomic_add_int() - this is the same as the previous function
  - atomic_add_acq_int() - this function combines the add operation with a
    read memory barrier
  - atomic_add_rel_int() - this function combines the add operation with a
    write memory barrier
- Add 'ptr' to the list of types that we can perform atomic operations
  on.  This allows one to do atomic operations on uintptr_t's.  This is
  useful in the mutex code, for example, because the actual mutex lock is
  a pointer.
- Add two new operations for doing loads and stores with memory barriers.
  The new load operations use a read barrier before the load, and the
  new store operations use a write barrier after the load.  For example,
  atomic_load_acq_int() will atomically load an integer as well as
  enforcing a read barrier.
2000-10-20 07:00:48 +00:00