Commit Graph

22794 Commits

Author SHA1 Message Date
wpaul
cf55535bda Add a missing SK_UNLOCK() to sk_attach_xmac(). 2000-10-25 23:36:45 +00:00
dfr
03b418be19 Move the call to extend_heap() from main to start so that if our BSS
expands beyond the limit we will extend the address space before trying
to zero the BSS. This should give us plenty of headroom for modest
expansion of the loader.
2000-10-25 23:36:01 +00:00
dfr
3659542941 Don't build start.S as part of libalpha.a - its built specially. 2000-10-25 23:30:04 +00:00
dfr
f1af8ca01e Don't indirect through a null pointer if we run out of kernel filenames. 2000-10-25 23:28:19 +00:00
dfr
9ee1dd3b6c Make a few functions inline to save space. 2000-10-25 23:24:43 +00:00
des
b044ac7c87 Bring cpuinfo closer to what it looks like in Linux 2.2.
Submitted by:	R Bradford Jones <brad@kazrak.com>
2000-10-25 22:38:23 +00:00
des
cf2c27603a Add /proc/<pid>/status and /proc/<pid>/stat (the latter being mostly
zeroes for the time being).

Prompted by:	Nathan Boeger <nathan@khmere.com>
2000-10-25 22:12:59 +00:00
jhb
88bbcad879 - Add atomic_cmpset_{acq_,rel_,}_long
- Add in atomic operations for 8-bit, 16-bit, and 32-bit integers
2000-10-25 21:56:16 +00:00
jhb
bbfbda47af This driver doesn't have a software interrupt handler, so don't attempt to
schedule a non-existant handler to run.
2000-10-25 21:29:36 +00:00
jhb
99ac2bc137 Catch up to the new software interrupt code.
Noticed by:	phk
2000-10-25 21:24:08 +00:00
jhb
50e63cb8ab - Catch up to new software interrupt code.
- Add a missing curly brace.

Noticed by:	phk
2000-10-25 21:13:42 +00:00
jhb
3b31c8d431 - Remove unneeded machine/ipl.h #include.
- Change the softintr() macro to do nothing on FreeBSD.  Previously,
  this macro would set a bit in spending and schedule the softinterrupt
  thread to run.  However, the bs driver never actually registers a
  a software interrupt handler, so all this work achieved nothing.  From
  the code it is not clear what exactly the softintr() macro is actually
  supposed to be doing.  It looks like it is supposed to be possibly
  running the hardware interrupt handler maybe?  This handler is only
  present in the #ifdef __NetBSD__ code however.  I have no idea how this
  driver handles interrupts at all, but at least it compiles now.
2000-10-25 20:38:08 +00:00
jhb
c46ad82089 Catch up to the new swi code.
Noticed by:	phk
2000-10-25 20:21:42 +00:00
ru
811a2e2625 We now keep the ip_id field in network byte order all the
time, so there is no need to make the distinction between
ip_output() and ip_input() cases.

Reviewed by:	silence on freebsd-net
2000-10-25 10:56:41 +00:00
ps
d3cce807d9 Fast interrupts have no associated process, therefore do not try
and schedule it.  This fixes booting machines with broken MP tables.
2000-10-25 10:40:20 +00:00
n_hibma
3f71e941c5 The USB scanner driver. To be used together with SANE. 2000-10-25 10:34:38 +00:00
n_hibma
56bb47de31 Regen. 2000-10-25 10:14:44 +00:00
n_hibma
ffe3d7c5e5 Sync with NetBSD 2000-10-25 10:13:47 +00:00
msmith
1fa4177f01 Major update to the 'twe' driver.
- Layout reorganisation to enhance portability.  The driver now has
   a relatively MI 'core' and a FreeBSD-specific layer over the top.
   Since the NetBSD people have already done their own port, this is
   largely just to help me with the BSD/OS port.

 - Request ID allocation changed to improve performance (I'd been
   considering switching to this approach after having failed to come
   up with a better way to dynamically allocate request IDs, and seeing
   Andy Doran use it in the NetBSD port of the driver convinced me
   that I was wasting my time doing it any other way).  Now we just
   allocate all the requests up front.

 - Maximum request count bumped back to 255 after characterisation
   of a firmware issue (off-by-one causing it to crash with 256
   outstanding commands).

 - Control interface implemented.  This allows 3ware's '3dm' utility to
   talk to the controller.  3dm will be available from 3ware shortly.

 - Controller soft-reset feature added; if the controller signals a
   firmware or protocol error, the controller will be reset and all
   outstanding commands will be retried.
2000-10-25 06:59:06 +00:00
jhb
b34a97ebe9 - Overhaul the software interrupt code to use interrupt threads for each
type of software interrupt.  Roughly, what used to be a bit in spending
  now maps to a swi thread.  Each thread can have multiple handlers, just
  like a hardware interrupt thread.
- Instead of using a bitmask of pending interrupts, we schedule the specific
  software interrupt thread to run, so spending, NSWI, and the shandlers
  array are no longer needed.  We can now have an arbitrary number of
  software interrupt threads.  When you register a software interrupt
  thread via sinthand_add(), you get back a struct intrhand that you pass
  to sched_swi() when you wish to schedule your swi thread to run.
- Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit
  more intuitive.  Also, prefix all the members of struct intrhand with
  'ih_'.
- Make swi_net() a MI function since there is now no point in it being
  MD.

Submitted by:	cp
2000-10-25 05:19:40 +00:00
mjacob
929a2c23c5 Get rid of ridiculous ISP_PVS macro. Instead, just set an
ISP_SMPLOCK define based on the previous 5.4 major/minor release
define of PVS- because this allows us to turn it off easier.
2000-10-25 04:42:46 +00:00
mjacob
19bfb7a91e Whoops! Forgot to commit this when I committed the other (turnin on locks)
change. Sorry about that.
2000-10-25 04:40:49 +00:00
jhb
e0d7328037 Quite some warnings. 2000-10-25 04:37:54 +00:00
gallatin
9c25d279b4 fix bogus cast in osf1_getrlimit/osf1_setrlimit 2000-10-25 00:37:34 +00:00
jhb
4360a1ac6a Implement atomic_{set,clear,add,subtract}_{acq_,rel_,}_ptr() 2000-10-25 00:16:38 +00:00
jhb
4bba355088 Only use 1 set of memory barrier operations with the atomic_*_{acq,rel}_ptr
functions.
2000-10-25 00:15:21 +00:00
gallatin
6dc050780f teach the osf1_getsysinfo() function about a few more fields
submitted by: Jim.Pirzyk@disney.com
PR: alpha/22263
2000-10-25 00:14:11 +00:00
jhb
730fdd0ecf - Forward declare struct mtx instead of #include'ing sys/mutex.h 2000-10-25 00:07:09 +00:00
jhb
90a1e68da6 - Catch a machine/mutex.h -> sys/mutex.h I somehow missed.
- Close a small race condition.  The sched_lock mutex protects
  p->p_stat as well as the run queues.  Another CPU could change p_stat
  of the process while we are waiting for the lock, and we would end up
  scheduling a process that isn't runnable.
2000-10-25 00:04:16 +00:00
jhb
db83cce7ff - Make the eventhandler_mutex mutex a private variable in
subr_eventhandler.c
- Move the extra #include's in sys/eventhandler.h to be protected by
  the #ifndef SYS_EVENTHANDLER/#endif
2000-10-25 00:01:39 +00:00
tegge
eb76b5ea48 Eliminate some bitrot (nonexisting member variable names).
Don't use curproc when a proc pointer is available.
2000-10-24 23:33:01 +00:00
tegge
e22e759f6f Style fixes. 2000-10-24 22:40:18 +00:00
wpaul
aba642d961 Convert the USB ethernet drivers to use mutexes. Also convert
usb_ethersubr.c. This module maintains two queues for packets which
are each protected with one mutex. These are all the changes I can
do for now. Removing the USBD_NO_TSLEEP flag doesn't work yet: when
I tried it, the system would usually freeze up after a NIC had been
operating for a while. The usb_ethersubr module itself ought to
go away; this is the next thing I need to test.
2000-10-24 22:38:54 +00:00
tegge
a75932293a Make RPC timeout message more readable.
Supply proc pointer to sosend.
2000-10-24 22:37:55 +00:00
dfr
11c5efcde9 * Various fixes to breakage introduced by the atomic and mutex reorgs.
* Fixes to the signal delivery code. Not quite right yet.

I would have preferred to wait until I have signal delivery actually
working but the current kernel in CVS doesn't build.
2000-10-24 19:54:38 +00:00
julian
7e01249585 Since neither archie nor I work at Whistle any more, change our email
addresses to be the more usefu @freebsd.org ones
so we can keep getting bug-reports.
- man pages to follow..
2000-10-24 17:32:45 +00:00
sos
283943941f Fix the problem with DMA mode not working on Aladdin chips.
Amasing in how many ways Acer has screwed up that chip.
2000-10-24 13:50:22 +00:00
obrien
535eb47841 Adjust comments
Submitted by:	bde

Add ISO C99's long long type limits.
Reviewed by:	bde
2000-10-24 10:49:56 +00:00
obrien
b1c82066dd * Update comments
* convert decimal constants to hex
Submitted by:	bde

* Add ISO-C99 long long limits
2000-10-24 10:48:50 +00:00
dwmalone
604e688433 Problem to avoid processes getting stuck in "vmopar". From Ian's
mail:

	The problem seems to originate with NFS's postop_attr
	information that is returned with a read or write RPC.
	Within a vm_fault context, the code cannot deal with
	vnode_pager_setsize() shrinking a vnode.

	The workaround in the patch below stops the nfsm_postop_attr()
	macro from ever shrinking a vnode. If the new size in the
	postop_attr information is smaller, then it just sets the
	nfsnode n_attrstamp to 0 to stop the wrong size getting
	used in the future. This change only affects postop_attr
	attributes; the nfsm_loadattr() macro works as normal.

	The change is implemented by adding a new argument to
	nfs_loadattrcache() called 'dontshrink'. When this is
	non-zero, nfs_loadattrcache() will never reduce the
	vnode/nfsnode size; instead it zeros n_attrstamp.

There remain other was processes can get stuck in vmopar.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by:	dillon
Tested by:	Vadim Belman <voland@lflat.org>
2000-10-24 10:13:36 +00:00
babkin
181e55c216 Added the CAM-ified wds driver for the ancient WD7000 SCSI card.
Last time it was present in FreeBSD 3.x, before CAM.

Reviewed by:	gibbs
Approved by:	gibbs
2000-10-24 03:44:31 +00:00
babkin
15eb041cb4 Added lines for the wds driver.
Approved by:	gibbs
2000-10-24 03:38:28 +00:00
jhb
8e917a73ea Don't dink with interrupts in vm_page_zero_idle(). This code assumed it
was being called with interrupts disabled, when it was actually being called
with them enabled.

Pointed out by:	tegge
2000-10-23 23:32:36 +00:00
mjacob
28046d02ab CURTHD now defines in globals.h 2000-10-23 18:39:30 +00:00
mjacob
d7e1064cb6 Move bogus proc reference stuff into <machine/globals.h>. There is no
more include file including <sys/proc.h>, but there still is this wonky
and (causes warnings on i386) reference in globals.h.

CURTHD is now defined in <machine/globals.h> as well. The correct thing
to do is provide a platform function for this.
2000-10-23 18:36:03 +00:00
mjacob
e001484933 Put back inclusion of proc.h so that alpha kernels (at the very least)
will compile again. I can't quite see where this was a recursive inclusion.
We probably need to do something to fix the alpha, but let's not break it
in the interim- it's broken enough.
2000-10-23 15:34:44 +00:00
non
f467d17e2a Add PC-Card/ISA SCSI host adpater drivers from NetBSD/pc98
(a NetBSD port for NEC PC-98x1 machines). They are ncv for NCR 53C500,
nsp for Workbit Ninja SCSI-3, and stg for TMC 18C30 and 18C50.

I thank NetBSD/pc98 and bsd-nomads people.

Obtained from:	NetBSD/pc98
2000-10-23 12:55:51 +00:00
phk
94b0862455 Generate LOTS of warnings to remind the SMPng crew to fix the curproc
UP/SMP issue.
2000-10-23 09:22:18 +00:00
phk
c6979cb775 Do not recursively include <sys/proc.h> 2000-10-23 09:14:20 +00:00
obrien
3442ab179c Apply style(9). [best I could] 2000-10-23 08:46:25 +00:00
obrien
508ea78bf3 Apply style(9).
(best I could)
2000-10-23 08:36:59 +00:00
phk
b648a6f5df Get rid of the last traces of ACTUALLY_LKM_NOT_KERNEL 2000-10-23 08:35:41 +00:00
obrien
0e820d6be8 Sort the #define's. 2000-10-23 08:29:04 +00:00
obrien
ed6c5eae68 Minimal set of diffs from the i386 bits to the AlphaLinux. 2000-10-23 08:15:58 +00:00
obrien
7e4a890930 Re-order the #define's into a more logical one. 2000-10-23 08:13:19 +00:00
itojun
0b7223cb28 be careful on mbuf overrun on ctlinput.
short icmp6 packet may be able to panic the kernel.
sync with kame.
2000-10-23 07:11:01 +00:00
itojun
00f627fe96 kame 1.32 -> 1.33
in add_m6fc(), set interface list for all cases.
in response to a report from Hoerdt Mickael.

kame 1.31 -> 1.32
discard PIM register if the version of the inner packet is incorrect (i.e. IPv6)
(according to clarfication of recent discussion in the IETF pim ML)
2000-10-23 07:07:33 +00:00
obrien
a683df4891 We need to explicitly tell the args struct for COMPAT functions we use
that use the same args struct as their non-COMPAT counter parts.
2000-10-23 02:20:01 +00:00
obrien
addaf21e5e Somehow I left out sycall #98 2000-10-22 21:47:07 +00:00
obrien
947a094612 Minor whitespace cleanup. 2000-10-22 21:42:03 +00:00
obrien
8acb3d7a12 Minimal set of diffs from the i386 bits to the AlphaLinux.
Submitted by:	gallatin (content, minimization by me)
2000-10-22 21:36:27 +00:00
phk
448ff6e567 Don't bogusly include <struct.h>
Bogusly define our own versions of strbase() and fldoff() until we
have sorted out where they live in the kernel.
2000-10-22 19:43:01 +00:00
phk
e48eef18f5 Don't rely on <sys/queue.h> to bogusly include <struct.h>.
Bogusly include <struct.h> until we have a better place to get
fldoff() from.
2000-10-22 19:39:17 +00:00
nyan
e5bb6df427 Moved prototypes of isa_alloc_resourcev() and isa_load_resourcev() to
isa/isavar.h, and added needed includes.
2000-10-22 16:48:08 +00:00
bp
e7c0d40264 Rev 1.41 was committed from wrong diff, now do it right. 2000-10-22 16:15:12 +00:00
phk
dec28dea4d Make LINT compile again. 2000-10-22 16:09:12 +00:00
bp
d3507fbe83 Release and unlock vnode if resource deadlock detected. 2000-10-22 15:40:22 +00:00
bp
1840436251 Update stale comment.
PR:		kern/21805
2000-10-22 14:24:30 +00:00
bp
ae7a56b0bf Remove de_lock field from denode structure and make msdosfs PDIRUNLOCK aware. 2000-10-22 14:22:17 +00:00
sos
fd2d82a6b1 Clean up the raid code a bit, also allow disks on HPT controllers to
be swapped around and still be put in the correct order in a raid.
2000-10-22 12:17:57 +00:00
sos
596fb1d81d Fix warning in the ISA only case. 2000-10-22 12:17:38 +00:00
sos
57e22ac98f Get the prober error code instead of relying on scp->error to contain
the lastest greatest.
2000-10-22 12:16:51 +00:00
sos
5ee1b4dbb2 Up the reset pulse to 100ms in ata_reset, some drives especially
DVD drives need this to reset proberly.

Remove some verboseness..
2000-10-22 12:16:00 +00:00
scottl
80bf139704 First attempt at timeouts for bio commands sent to the controller. No retry is
attempted right now; the failure is merely passed up.  This may help with the
mysterious lockups seen by some with Pablano controllers.
2000-10-22 09:21:19 +00:00
imp
58dbf3b8df Make usual 1-line cardbus support modification.
I'm committing this over an Intel PRO-100 CardBus II card.
2000-10-22 06:41:46 +00:00
imp
2a2d2cee67 Cleanup the rman_make_alignment_flags function to be much clearer and shorter
than the prior version.
2000-10-22 04:48:11 +00:00
imp
63aa08dd3a o Remove lots of kludges with iospace and irq.
o Make sure that I/O space is aligned properly based on the length of the
  resource we're allocating.
o Add bootverbose message when we fail.
2000-10-22 04:46:56 +00:00
imp
959285ef14 Cleanup allocation of resources for 16-bits. We now do the right
thing in pccbb bridge (the pcic bridge will be updated as I merge the
two copies of the code that were in the original cardbus commit).
2000-10-22 04:37:57 +00:00
nyan
89f2a8f4c5 if_ed_cbus.c is required from PC-98 only, and if_ed_isa.c is not necessary
for PC-98.
2000-10-21 02:44:11 +00:00
nyan
52b8fdee1a Add '-DPC98' to CFLAGS if MACHINE == pc98. 2000-10-21 02:37:17 +00:00
bmilekic
de141593df (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
jhb
8fa82d6020 Propogate the 'const'ness of mutex descriptions to the witness code to
quiet warnings.
2000-10-20 22:45:01 +00:00
jhb
43348dd1d2 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
jhb
9dc6ec674a 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
jhb
5333a41c62 Actually enable the witness code if the WITNESS kernel option is enabled. 2000-10-20 21:58:11 +00:00
imp
33eb42398e Allow interrupts to be sharable.
This allows us to probe, but not attach.
2000-10-20 20:29:59 +00:00
imp
54ae811765 Get the interrupt correct. 2000-10-20 20:27:22 +00:00
jhb
0cdcbe5ac0 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
jhb
1b2b9bc04a 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
jhb
e6801485e2 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
jhb
7fa25a44d8 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
jhb
830be7efea 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
jhb
be3ae8af99 Fix the atomic_cmpset_{acq,rel}_ptr() functions to do proper type-casting. 2000-10-20 19:46:02 +00:00
jon
267418cbbf remove old pccbb bridge code.
(argh, I thought I already did this in the original commmit)
2000-10-20 19:37:51 +00:00
phk
b68243ba85 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
archie
bdb02ef625 Add actual URL for XMAC II datasheet in comments. 2000-10-20 16:18:16 +00:00
ache
e26904360a Add i815 host to PCI bridge ID 2000-10-20 16:05:47 +00:00
ache
d11a94dee4 Return -10000 in pci_hostb_probe to allow agp driver (disabled otherwise) 2000-10-20 15:40:05 +00:00
ache
992c52b8cc Add i815 Host to Hub 2000-10-20 15:14:51 +00:00
ache
70956e150a Add i815 IDs 2000-10-20 15:12:57 +00:00
ru
d0376d286f Save a few CPU cycles in IP fragmentation code. 2000-10-20 14:10:37 +00:00
hm
b0ab69633f Submitted by: Hans Petter Selasky <hselasky@c2i.net>
Remove double 0x7e flags between hdlc-frames.
2000-10-20 11:20:58 +00:00
kato
fb0fcac9f4 Used kbio.h and consio.h instead of machine/console.h. 2000-10-20 10:35:44 +00:00
kato
48345f55cb Merged from sys/i386/isa/npx.c revision 1.86. 2000-10-20 10:20:27 +00:00
kato
ae0b8da4c2 Merged from sys/i386/isa/clock.c revision 1.160. 2000-10-20 10:19:40 +00:00
kato
f4eed09cc6 Merged from sys/i386/i386/machdep.c revisions 1.417 and 1.418. 2000-10-20 10:17:26 +00:00
roger
9191d9388d Add missing 'unit' code
Submitted by:	Brad L. Chisholm <blc@bsdwins.com>
2000-10-20 08:16:53 +00:00
jhb
86661e93ae 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
jhb
03895bf1d2 GC the unused safepri variable. 2000-10-20 07:55:41 +00:00
jhb
8ee35ef322 Remove unnecessary machine/mutex.h include. 2000-10-20 07:54:21 +00:00
jhb
9f1c0ff984 - 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
jhb
8e0a1a0604 Actually harvest interrupt threads when the last handler is removed from a
thread.
2000-10-20 07:46:12 +00:00
jhb
079be70708 - 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
jhb
fd1830cb4e Catch up to SMP_DEBUG -> MUTEX_DEBUG. 2000-10-20 07:41:50 +00:00
jhb
3494e6effd - 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
jhb
7869e1e2be - 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
jhb
461d87bc7b - 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
jhb
b9a77d1471 - machine/mutex.h -> sys/mutex.h
- Use MUTEX_DECLARE() and MTX_COLD for vm86pcb_lock
2000-10-20 07:30:11 +00:00
jhb
5ef465d07f - 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
jhb
529d211e5d - 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
jhb
13b878e47e - 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
jhb
3d9895e689 - 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
jhb
ce5cfaf1b3 Axe the barrier_{read,write,rw}() helper functions as this method of
doing memory barriers doesn't really scale well for the ia64.  Also,
memory barriers are more a property of the CPU than bus space.

Requested by:	dfr
2000-10-20 06:45:48 +00:00
kato
d1fe403a55 Convert the type of bus_space_handle_t of pc98 from structure into
pointer to structure.

Reviewed by:	nyan
2000-10-20 02:42:06 +00:00
n_hibma
54ef22618e Add the quirk entry for the Sony Memory Stick Adapter.
Add NO_SYNQ_CACHE to the Sony DSC camera entry.
2000-10-20 00:53:30 +00:00
n_hibma
a1227d6f63 Bugfix: The data is not stored only in the first cblock, calculate the
length of the data properly. This should be moved into a tty_subr
function.

Also, disanle the setting of the CDC_CM_OVER_DATA flag. It breaks some
modems. I don't think that ther actually is a modem that needs this.

Submitted by:		Brad Karp <bkarp@ICSI.Berkeley.EDU>
2000-10-20 00:35:52 +00:00
n_hibma
ccf0db5457 Regen. 2000-10-20 00:30:01 +00:00
n_hibma
cf91979a1c Add the Sony MSC Memory Stick Adaptor (in the Sony PCS laptops) 2000-10-20 00:29:21 +00:00
peter
579ec76de1 execsw_set hasn't been used for a while and does not exist. 2000-10-20 00:26:33 +00:00
joe
bd4a46d7e8 Augment the 'ifaddr' structure with a 'struct if_data' to keep
statistics on a per network address basis.

Teach the IPv4 and IPv6 input/output routines to log packets/bytes
against the network address connected to the flow.

Teach netstat to display the per-address stats for IP protocols
when 'netstat -i' is evoked, instead of displaying the per-interface
stats.
2000-10-19 23:15:54 +00:00
imp
dd5359a9a0 o Fix memory leak in ivars
o Change name of bus
o Change the panic on resource allocation failure to just a message.  We'll
  work out why this fails later in the pcic/pccbb code merge.
2000-10-19 22:36:41 +00:00
dfr
cec0c905bb Don't force bootverbose anymore. 2000-10-19 20:39:48 +00:00
dfr
dfc4475867 Decrease the number of ticks between clock interrupts by a factor of ten
to place more pressure on the exception handling code.
2000-10-19 20:37:28 +00:00
dfr
2544266537 * Disable interrupts when restoring a trapframe.
* Make sure we reset ar.k6 (used to hold the kernel stack pointer when
  we are returning to user mode after a syscall.
2000-10-19 20:36:31 +00:00
jhb
1076772e76 Reparent a kernel thread to init during kthread_exit() so that the zombie
can be reaped.
2000-10-19 19:53:44 +00:00
jhb
1c582068f5 - Move the prototype for proc_reparent from sys/ptrace.h to sys/proc.h
- Fix the sorting of function prototypes in sys/proc.h
2000-10-19 18:55:22 +00:00
jhb
38d1c8db91 Quiet a silly warning.
Pointy-hat to:	ps
2000-10-19 18:52:20 +00:00
ru
093cfc269a A failure to allocate memory for auxiliary TCP data is now fatal.
This fixes a null pointer dereference problem that is unlikely to
happen in normal circumstances.
2000-10-19 10:44:44 +00:00
jon
1ba46557a2 NEWCARD/Cardbus -
This commit adds support for Xircom X3201 based cardbus cards.
Support for the TDK 78Q2120 MII is also added.
IBM Etherjet, Intel and Xircom cards uses these chips.

Note that as a result of this commit, some Intel/DEC 21143 based cardbus
cards will also attach, but not get link.  That is being looked at.
2000-10-19 08:34:32 +00:00
jhb
18f874d5c5 Move init_clocks earlier in the system startup so that hardclock and clock
interrupts are started before the device probe.  This allows interrupt
threads to run during the device probe among other things.
2000-10-19 08:16:34 +00:00
msmith
703a356981 Write the routed interrupt back to PCI configuration space. 2000-10-19 08:07:23 +00:00
msmith
29922cc3b2 Call the BIOS to route the selected interrupt. Correctly calculate the
interrupt from the PCI routing table (ffs returns 1 for the rightmost
bit, not 0).
2000-10-19 08:06:50 +00:00
msmith
fabe339dd1 Add PCI BIOS function codes for IRQ routing fetch and route. 2000-10-19 08:02:46 +00:00
rwatson
be06217d29 o Introduce new VOP_ACCESS() flag VADMIN, allowing file systems to perform
"administrative" authorization checks.  In most cases, the VADMIN test
  checks to make sure the credential effective uid is the same as the file
  owner.
o Modify vaccess() to set VADMIN as an available right if the uid is
  appropriate.
o Modify references to uid-based access control operations such that they
  now always invoke VOP_ACCESS() instead of using hard-coded policy checks.
o This allows alternative UFS policies to be implemented by replacing only
  ufs_access() (such as mandatory system policies).
o VOP_ACCESS() requires the caller to hold an exclusive vnode lock on the
  vnode: I believe that new invocations of VOP_ACCESS() are always called
  with the lock held.
o Some direct checks of the uid remain, largely associated with the QUOTA
  and SUIDDIR code.

Reviewed by:	eivind
Obtained from:	TrustedBSD Project
2000-10-19 07:53:59 +00:00
jhb
03a08cfa61 Axe the idle_event eventhandler, and add a MD cpu_idle function used
for things such as halting CPU's, idling CPU's, etc.

Discussed with:	msmith
2000-10-19 07:47:16 +00:00
roger
bd09783654 Add Daniel's name and fix release data 2000-10-19 07:34:18 +00:00
roger
9905561893 Update to driver 2.17
Fixes bugs in devfs when unloading and reloading
Syncs with NetBSD changes

Submitted by:	Alexander Langer <alex@big.endian.de>
Submitted by:	Thomas Klausner <wiz@netbsd.org>
Submitted by:	Daniel O'Connor" <doconnor@gsoft.com.au>
2000-10-19 07:33:28 +00:00
sos
173b42030e Minor changes to the ATA RAID support code, remove some verbosity
and put some under bootverbose..
2000-10-18 18:49:42 +00:00
peter
cdc5e446eb EVENTHANDLER_INVOKE() takes two arguments. 2000-10-18 17:56:06 +00:00
peter
548f92e52d This didn't compile. Fix typo: s/rmang_get_start/rman_get_start/ 2000-10-18 17:45:29 +00:00