Commit Graph

35093 Commits

Author SHA1 Message Date
jeff
50eca6a88f - Correct the name in the header guards.
Spotted by:	rwatson
2002-09-23 00:29:31 +00:00
scottl
ab3398815a The ahc driver should only have one devclass, not one for each bus
attachment.

Submitted by:	too many people to count
MFC after:	3 days
2002-09-22 23:03:31 +00:00
jdp
dbcf61f6d5 Fix a couple of longstanding typos which would have made a
statement fail to compile if it weren't inside "#ifdef
__brokenalpha__".

Submitted by:	Birger Toedtmann <birger@takatukaland.de>
MFC after:	2 weeks
2002-09-22 19:27:07 +00:00
jdp
3ab30dbb85 Follow the lead of recent changes in the 3com Linux driver by
disabling memory write invalidate unconditionally.  It looks like
they've decided that MWI just doesn't work with these devices.
Also, remove now-irrelevant code that set PCI write boundary values
based on the cache line size.

MFC after:	2 weeks
2002-09-22 18:58:58 +00:00
jdp
e7af3a6c4a Set up the BCM570x chip's DMA Read/Write Control register more
correctly.  This fixes the "watchdog timeout -- resetting" errors
seen on Dell 2650 systems.

MFC after:	1 month
2002-09-22 18:27:29 +00:00
iedowse
dafeb40034 Attempt to fix the error reported by the alpha tinderbox. A pointer
was being cast to an integer as part of a hash function, so just
add an intptr_t cast to silence the warning.
2002-09-22 13:25:57 +00:00
grehan
241347da96 Initialize fwsectors/fwheads to allow the DIOCGFWSECTORS and
DIOCGFWHEADS ioctls to return meaningful values to disklabel/newfs

Approved by: phk
2002-09-22 10:07:18 +00:00
truckman
3e44afdc97 Fix misspellings, capitalization, and punctuation in comments. Minor
comment phrasing and style changes.
2002-09-22 08:54:17 +00:00
phk
ca78c8fcf1 Move the com_scr register address definition over with the other seven.
Approved by:	bde
2002-09-22 08:51:31 +00:00
mdodd
ebb696ff7e Modify vm_map_clean() (and thus the msync(2) system call) to support
invalidation of cached pages for objects of type OBJT_DEVICE.

Submitted by:	Christian Zander <zander@minion.de>
Approved by:	alc
2002-09-22 08:22:32 +00:00
jeff
5c2586e01c - Hook ALQ up to the build. 2002-09-22 07:19:37 +00:00
jeff
47f059c8d6 - Add options ALQ and KTR_ALQ. 2002-09-22 07:14:27 +00:00
jeff
1925bb752e - Add support for logging KTR via ALQ. This is optional and enabled by the
KTR_ALQ config option.
2002-09-22 07:13:45 +00:00
jeff
29f7b975a7 - Tell witness about ALQ's spin lock. 2002-09-22 07:11:57 +00:00
jeff
dff8b170b4 - Add an asynchronous fixed length record logging mechanism called
ALQ (Asynch. Logging Queues).  ALQ supports many seperate queues with
   different record and buffer sizes.  It opens and logs to any vnode so
   it can be used with character devices as well as regular files.

Reviewed in part by:	phk, jake, markm
2002-09-22 07:11:14 +00:00
jake
87b049746c Call trap directly for exceptional cases that need more processing on
return to usermode, rather than branching back to a label before the
original call.
2002-09-22 06:51:41 +00:00
jake
889b132813 Removed unneeded include (missed in last revision). 2002-09-22 06:05:23 +00:00
jake
71181f3a59 Moved netisr code from kern/kern_intr.c to net/netisr.c as threatened in a
comment.
2002-09-22 05:56:41 +00:00
silby
b4f455bab1 Remove all DELAY(1) calls around MII operations in the XL driver.
According to the MII specification, the delay produced by our
reads alone are sufficient for correct operation.

This reduces the time mii_tick takes from 10ms to ~1ms here.  That's
still a lot, but much better than before.

Submitted by:	Harti Brandt <brandt@fokus.gmd.de>
MFC after:	3 weeks
2002-09-22 04:48:30 +00:00
peter
b14dade25b Create inlines for ltr(sel), lldt(sel), lidt(addr) rather than
functions that have one instruction.
2002-09-22 04:45:21 +00:00
alc
2e0a9f1f68 o Update some comments. 2002-09-22 04:33:43 +00:00
silby
3a4a400adc Fix issue where shutdown(socket, SHUT_RD) was effectively
ignored for TCP sockets.

NetBSD PR:	18185
Submitted by:	Sean Boudreau <seanb@qnx.com>
MFC after:	3 days
2002-09-22 02:54:07 +00:00
jake
0597bfec13 Remove unneeded opt headers.
Noticed by:	benno
2002-09-22 01:34:33 +00:00
mdodd
18510fd2d9 - Move the init of %gs and pcb_gs before user_ldt_free().
- Always call load_gs()
- Trim comments.

This addresses some of the issues raised by BDE.
2002-09-22 01:32:48 +00:00
benno
0739a1270e It's Apple GMAC, not HMAC.
Approved by:	jake (for sparc64)
2002-09-22 01:18:06 +00:00
jake
28d46f30fd Moved nfs_diskless setup code from autoconf.c to nfsclient/nfs_diskless.c
so that it is MI.  Allow nfs_mountroot to return an error if the nfs_diskless
struct is not valid, rather than panicing later on.  Call nfs_setup_diskless()
from nfs_mountroot if NFS_ROOT is defined, like bootpc_init().  Removed legacy
root mount support for sparc64, and enabled NFS_ROOT by default.
2002-09-22 00:59:02 +00:00
bde
29240c0000 Whitespace fixes (mainly for many more messes in the definitions of the
rfork() constants).
2002-09-21 22:57:52 +00:00
jake
3b4eef4d8d Use the fields in the sysentvec and in the vm map header in place of the
constants VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK and PS_STRINGS.
This is mainly so that they can be variable even for the native abi, based
on different machine types.  Get stack protections from the sysentvec too.
This makes it trivial to map the stack non-executable for certain abis, on
machines that support it.
2002-09-21 22:07:17 +00:00
markm
fb64253767 Remove #ifdef'ed Giant mutex wrappers round debugging statements. 2002-09-21 21:44:19 +00:00
nsouch
991c2705c4 Cleanup of amdpm(4).
Add of NVIDIA nForce (nfpm) smbus support.

Obtained from:	Thomas D. Dean <tomdean@speakeasy.org>
2002-09-21 21:43:49 +00:00
markm
ab6227b056 No functional change. Fix comments and whitespace. 2002-09-21 21:40:02 +00:00
rwatson
e5f1d59118 Remove another missed trailing space. 2002-09-21 19:50:28 +00:00
alc
4afb6357c8 o Remove an initialized but unused variable from pmap_remove_all(). 2002-09-21 19:42:11 +00:00
rwatson
206eb63bd0 Trim trailing whitespace from the ends of lines. 2002-09-21 19:26:59 +00:00
rwatson
efd88325ba Continue cleanup and sync of mac_biba and mac_mls policies to the
TrustedBSD MAC Perforce tree.  Remove unused functions
mac_biba_equal_range and mac_mls_equal_range, which determined if the
ranges in two range-enabled labels were equal.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-21 19:20:01 +00:00
markm
5647aa9584 Wrap GNUish asm() code in #ifdef __GNUC__ 2002-09-21 19:12:59 +00:00
markm
ace2744bc7 Use a function instead of a non-portable, GCC-specific asm() entry. 2002-09-21 19:03:42 +00:00
markm
09946fef8a A good dose of style.9. No functional change. 2002-09-21 19:02:17 +00:00
rwatson
b77eb790de Remove mac_biba_high_single() check for interface renaming: we now
use the notion that a subject range of (low-high) connotes Biba
privilege rather than a single of high.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-21 19:01:44 +00:00
markm
cfe04ea627 Code tidy-up. ISOfy, turn a macro into an inline for lint(1) (perhaps
this needs to go to cpufunc.h?), de-register.
2002-09-21 18:53:58 +00:00
markm
19ea227db1 Use a function instead of embedding non-portable asm() constructs
in C code.
2002-09-21 18:51:19 +00:00
markm
82d8ceab83 Sort includes. 2002-09-21 18:30:12 +00:00
rwatson
ed25385ee7 As INVARIANTS isn't supported for code that loads only as a kernel
module and is not linked into the base system, two KASSERT's rotted.
Fix them by fixing variable names.  It would be really nice if
opt_global.h was used when building modules as part of a buildkernel.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-21 18:29:37 +00:00
markm
08ca54d400 Provide in inline function for the (GNUC) assembler "hlt" instruction. 2002-09-21 18:26:53 +00:00
markm
3f6be7a6c3 Wrap GCC-specific asm() code in #ifdef __GNUC__ 2002-09-21 18:19:51 +00:00
mux
d30199a912 Don't include opt_bus.h here, it breaks stuff trying to
include machine/bus.h.

Reviewed by:	tmm
2002-09-21 18:12:00 +00:00
markm
f084128c54 Constify to kill some warnings. 2002-09-21 17:29:36 +00:00
markm
1502568753 Everywhere else, an argument passed to a device containing flags
is called "flags". Make it so here.
2002-09-21 17:28:17 +00:00
simokawa
43a0750855 Firewire can be built on other than i386 after sbp.c fix.
Tested on: Alpha (beast.freebsd.org)
2002-09-21 15:22:09 +00:00
simokawa
bd6241aa97 don't include bus_dma.h which doesn't need. 2002-09-21 15:05:22 +00:00
simokawa
3c709442f7 remove unused code. 2002-09-21 14:48:07 +00:00
phk
d1989a2f5a Remove empty #if*/#endif clauses. 2002-09-21 08:44:51 +00:00
phk
ca965d32d0 Remove #ifdef/#endif 3 years after the stuff they protected was removed.
Spotted by:	peter.
2002-09-21 08:00:01 +00:00
phk
98a088ce48 Fix a 3 year old oversight: Remove the #ifdef/#endif pair now that there
is nothing between them anymore.

Spotted by:	peter.
2002-09-21 07:59:06 +00:00
alc
4e4b144080 Reduce namespace pollution.
Submitted by:	bde
2002-09-21 07:51:44 +00:00
wollman
fce090c17d Claim to be 1003.1-2001. We're not quite, yet, but that's a more useful
target than any pre-C99 POSIX (which we could never have conformed to
under our ia32 ABI).

Document why HOST_NAME_MAX (and hopefully other similar constants in the
future) is not defined.

Define in <sys/unistd.h> all 1003.1-2001 option and option group constants
which did not meet the standard for inclusion in <unistd.h>.  Delete from
<sys/unistd.h> all sysconf(3) constants and those option constants which
were moved to <unistd.h>.  pathconf(3) keys remain here as pathconf() is
implemented directly as a system call.  Add a comment noting brokenness
in some .1e additions here.  Fix whitespace in definition of constants for
rfork().

(5 of 5)
2002-09-21 02:19:03 +00:00
rwatson
c86d1bea9a Insert a missing call to MAC protection check for delivering an
mbuf to a bpf device.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
Submitted by:	phk
2002-09-21 00:59:56 +00:00
grehan
80399b3a23 Add missing semicolon 2002-09-20 23:26:07 +00:00
phk
317f7d0b60 Assert my copyright on this file (using the default 2-clause BSD).
The vast majority of the contents is from my keyboard and no
significant pieces remain of the former copyright holders code.
2002-09-20 22:26:27 +00:00
phk
f99eaf8ce5 (This commit touches about 15 disk device drivers in a very consistent
and predictable way, and I apologize if I have gotten it wrong anywhere,
getting prior review on a patch like this is not feasible, considering
the number of people involved and hardware availability etc.)

If struct disklabel is the messenger: kill the messenger.

Inside struct disk we had a struct disklabel which disk drivers used to
communicate certain metrics to the disklayer above (GEOM or the disk
mini-layer).  This commit changes this communication to use four
explicit fields instead.

Amongst the benefits is that the fields do not get overwritten by
wrong or bogus on-disk disklabels.

Once that is clear, <sys/disk.h> which is included in the drivers
no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in,
the few places that needs them, have gotten explicit #includes for
them.

The disklabel inside struct disk is now only for internal use in
the disk mini-layer, so instead of embedding it, we malloc it as
we need it.

This concludes (modulus any mistakes) the series of disklabel related
commits.

I belive it all amounts to a NOP for all the rest of you :-)

Sponsored by:   DARPA & NAI Labs.
2002-09-20 19:36:05 +00:00
mdodd
2539e3d8a0 Remove NVIDIA ioctl bits. They will be provided in a kernel module. 2002-09-20 19:19:58 +00:00
jhb
3c5095fc72 Axe unused include. 2002-09-20 19:16:41 +00:00
ume
a3ddf3a54c mistakenly set IFF_UP by SIOCSIFPHYADDR.
Obtained from:	KAME
2002-09-20 18:21:46 +00:00
phk
8fa9608749 This file does not <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 18:15:40 +00:00
phk
a313cdcbaf Remove unused #includes: <sys/disk.h> <sys/devicestat.h> and <sys/sysctl.h>
Sponsored by:	DARPA & NAI Labs.
Approved by:	sos
2002-09-20 18:08:57 +00:00
phk
11c93dc683 We need neither <sys/diskslice.h> nor <sys/disklabel.h> here.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:59:09 +00:00
phk
48b03f7c07 Put an XXX comment here to point somebody in the right direction. 2002-09-20 17:55:47 +00:00
mike
086445be5d Fix various style(9) bugs:
o Unusual order of #ifndef _FOO_H_, followed by license.
o Missing tabs in typedef.
o Missing tabs in struct between types and member names.
o Unaligned, unordered function prototypes.
o Reversed comment for #endif.
2002-09-20 17:54:34 +00:00
phk
b05161d361 For reasons now lost in historical fog, the bounds_check_with_label()
function were put in i386/i386/machdep.c from where it has been
cut and pasted to other architectures with only minor corruption.

Disklabel is really a MI format in many ways, at least it certainly
is when you operate on struct disklabel.

Put bounds_check_with_label() back in subr_disklabel.c where it belongs.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 17:51:00 +00:00
phk
492876b22e We don't need the <sys/disklabel.h> include for alpha anymore.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:45:44 +00:00
phk
10f5b58778 #include <sys/disk.h> to get disk_err() prototype.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:40:49 +00:00
phk
78854e898b Reduce <sys/disklabel.h> poisoning a bit.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:14:48 +00:00
phk
77c3f6a70f Remove unneeded #include <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:00:24 +00:00
phk
a719cfb56b Include <sys/ioccom.h> directly, rather than indirectly through
<sys/disklabel.h>

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:59:14 +00:00
phk
e6d6b3ea37 Remove even more Copy&Pasted sets of #includes. 2002-09-20 16:53:19 +00:00
phk
0c72f48ed7 Remove unused #includes. Looks amacingly like the exact same set
as I just removed from ncr53c500_pccard.c.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:51:09 +00:00
phk
0e79f65347 Remove #include of <sys/disklabel.h> (and a few other unused #includes I
noticed while here).

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:49:36 +00:00
phk
f1b5b39d15 We don't need to #include <sys/disklabel.h>.
We don't need to #include <sys/disklabel.h> second time either.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:42:33 +00:00
phk
8065a2f590 Remove needless <sys/disklabel.h> and <sys/diskslice.h> #includes.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:37:15 +00:00
phk
0d0b20486d Don't call dkunit() to find our unit number, it is in our softc.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:26:12 +00:00
phk
04e808125a Don't use dkunit() to find out unit, we already have our softc pointer
where we can find it.

Don't call dkpart() just to print the result, it is constant.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:25:16 +00:00
mbr
2dbd48c162 Fix the support for the AN985/983 chips, which do not set the
RXSTATE to STOPPED, but to WAIT. This should fix hangs which
could only be solved by replugging the cable.

Submitted by:	jhb
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:18:13 +00:00
mbr
4590476d95 Enable the automatic TX underrun recovery for the ADMtek chips.
This solves cvsup update on my laptop which aborts after a while
without this patch.

PR:		34236
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:16:06 +00:00
phk
501bfd8ac9 Make FreeBSD "struct disklabel" agnostic, step 312 of 723:
Rename bioqdisksort() to bioq_disksort().
Keep a #define around to avoid changing all diskdrivers right now.

Move it from subr_disklabel.c to subr_disk.c.
Move prototype from <sys/disklabel.h> to <sys/bio.h>

Sponsored by:   DARPA and NAI Labs.
2002-09-20 14:14:37 +00:00
jhb
47e2421c5c fork_trampoline() marks a trap frame.
Submitted by:	bde
2002-09-20 13:58:21 +00:00
jhb
b11ffbee29 Use proper type for a variable used as a DDB symbol. 2002-09-20 13:56:11 +00:00
jhb
e10343b51f Trim includes.
Submitted by:	bde
2002-09-20 13:54:45 +00:00
jhb
ff4d4620fd Various style fixes, including moving db_print_backtrace() out of the
middle of the watchpoint code.

Submitted by:	bde
2002-09-20 13:53:33 +00:00
phk
c003c05d8c Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.

Drop the by now entirely useless struct disklabel argument.

Add a flag argument for new-line termination.

Fix a couple of printf-format-casts to %j instead of %l.

Correctly print the name of all bio commands.

Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.

Use the new disk_err() throughout, #include <sys/disk.h> as needed.

Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.

Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.

Sponsored by:   DARPA & NAI Labs.
2002-09-20 12:52:03 +00:00
phk
ce3ca627fa Remove unused variable. 2002-09-20 09:33:30 +00:00
phk
f3169d0f73 Retire now unused DIOCGDVIRGIN kludge.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 09:31:14 +00:00
imp
6de5d1911e Current uses struct thread *td rather than struct proc *p. 2002-09-20 04:30:00 +00:00
jhb
d6636c7eba Fix last commit so that it actually works:
- Get test for valid trace request contents right.
- You don't use 'stq' to move a value from one register to another,
  use 'mov' to read sp.  Also, can't use nice names for registers
  in in-line asm in gcc.
- pc is not a publically accessible register, instead, create a label
  in the asm code and use 'lda' to load the address of that label into
  the pc field of the trace request.
- Use correction function name for db_print_backtrace().
2002-09-19 20:40:26 +00:00
jhb
997ef4970c Use correct function name in previous commit.
Submitted by:	jake
Pointy hat to:	jhb
2002-09-19 19:51:56 +00:00
mdodd
7622a47a60 Pass flags to msync() accounting for differences in the definition of
MS_SYNC on FreeBSD and Linux.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 19:02:54 +00:00
mdodd
2b21905959 This patch extends the FreeBSD Linux compatibility layer to support
NVIDIA API calls; more specifically, it adds an ioctl() handler for
the range of possible NVIDIA ioctl numbers.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 18:56:55 +00:00
mux
631f07997f Switch to using strlcpy() in several places. It seems there
were cases where we could get unterminated strings before.
2002-09-19 18:54:22 +00:00
mdodd
6c70d571f0 This patch enables FreeBSD i686 MTRR support on Intel Pentium
4/XEON processors, which are not currently recognized.

Submitted by:	 Christian Zander <zander@minion.de>
2002-09-19 18:53:49 +00:00
jhb
10c45d7a9a Ahem, actually add the DDB_TRACE option and finish changing DDB_UNATTENDED
to use its own header.
2002-09-19 18:52:37 +00:00
jhb
29c1877a0f Add ability to dump stacktraces on kernel panics when DDB is compiled into
the kernel.  By default this is turned off since otherwise it could scroll
valuable panic messages off of the screen.  This option can be turned on
by the DDB_TRACE kernel option as well as the debug.trace_on_panic sysctl.

Also, fix the DDB_UNATTENDED option to use its own header instead of
abusing opt_ddb.h.  This way turning that one option on or off doesn't
force you to recompile all of ddb.

Requested by:	many (1), bde (2*)

* - I know bde prefers !abusing option headers in general but can't
    remember if he as brought up this specific case.
2002-09-19 18:49:46 +00:00