Commit Graph

32602 Commits

Author SHA1 Message Date
Benno Rice
96269f7e26 - Rename the _C_LABEL macro to CNAME.
- Rename the _ASM_LABEL macro to ASMNAME.
- Add the HIDENAME macro which is used in libc's syscall stuff.
2002-05-17 01:44:55 +00:00
Benno Rice
b635dacd57 Fix commenting around NetBSD version string. 2002-05-17 01:41:01 +00:00
Eric Melville
096a727e41 Separate "seperate" from kernel source. 2002-05-16 22:43:20 +00:00
Eric Melville
13d362233e Banish "priviledged" from kernel source. 2002-05-16 22:41:48 +00:00
Tom Rhodes
d394511de3 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
Ian Dowse
2bf6dd18ba The ufs/ffs files are no longer required by ext2fs. 2002-05-16 20:54:44 +00:00
Ian Dowse
79af20a81c Give ext2fs its own static "dirchk" variable instead of using ufs's
variable. Make this accessible as the sysctl vfs.e2fs.dirchk.
2002-05-16 20:53:04 +00:00
Ian Dowse
13a263882f Remove register keyword. 2002-05-16 19:43:28 +00:00
Maxime Henrion
fc6f338fd2 In VOP_LOOKUP, don't assume that the final pathname component
will be in the same filesystem than the one where the current
component is.

Approved by:	scottl
2002-05-16 19:22:39 +00:00
Ian Dowse
9504abaad7 Complete the separation of ext2fs from ufs by copying the remaining
shared code and converting all ufs references. Originally it may
have made sense to share common features between the two filesystems,
but recently it has only caused problems, the UFS2 work being the
final straw.

All UFS_* indirect calls are now direct calls to ext2_* functions,
and ext2fs-specific mount and inode structures have been introduced.
2002-05-16 19:08:03 +00:00
Maxime Henrion
34e53231d0 o Fix vfs_copyopt(), the first argument to bcopy() is the source,
not the destination.
o Remove some code from vfs_getopt() which was making the interface
  more complicated to use for a very slight gain.
2002-05-16 17:09:41 +00:00
Maxim Sobolev
5b24bd6150 Rename struct scr_size into struct _scr_size and struct scrmap into
struct _scrmap, so that it doesn't break C++ programs (name of element of
the structure is the same as the name of the scructure itself).

MFC after:	5 days
2002-05-16 10:57:10 +00:00
Warner Losh
5b6a60ea0a Use splnet() when we need to block timeouts rather than splimp() since
the former blocks software interrupts, while the latter blocks
hardware interrupts.

Avoid one place where I'm at splnet across a call to copyout.  Leave
one in place to give bde something to complain about :-).  Actaully,
I'll fix it in a subsequent commit.

Reviewed by: bde
spl conical hat to: imp
2002-05-16 06:32:37 +00:00
Andrew Gallatin
16b9af9990 Fixup unaligned bwx instructions (ldwu, stw). This may fix some mysterious
natd sigbus errors being reported on the freebsd-alpha@ mailing list.

Obtained from: NetBSD
2002-05-16 00:03:32 +00:00
David E. O'Brien
ae8f9dd13f An exact copy of i386/include/float.h will work here. 2002-05-15 20:54:35 +00:00
Poul-Henning Kamp
4aafadc8b9 Revert daddr_t to 32 bits while we research the reported problems. 2002-05-15 17:52:03 +00:00
Mike Silbersack
000c679b3c Enhance the use of the watchdog timer in this driver so that it will
allow recovery from transmission lockups which occur in the middle
of the descriptor list, rather than just at the beginning.

For some unknown reason, Rhine II chips have a tendency to stop
transmitting while under heavy load, possibly due to collisions.
Whether this behavior is due to a hardware bug or a driver glitch
is unknown as of now.

In either case, this change allows the driver to gracefully recover
from such situations.

Special thanks go to The Anarcat <anarcat@anarcat.dyndns.org>, who
bugged me into looking at this and to
Dominic Marks <dominic_marks@btinternet.com>, who performed a great
deal of testing to help characterize this problem.

MFC after:	3 days
2002-05-15 17:05:28 +00:00
David E. O'Brien
5aecc48bb0 style sync with other platforms. 2002-05-15 16:40:25 +00:00
Brian Somers
2f371b0268 Remove an extraneous )
Not approved by: maintainer

I'm guessing that this is trivial enough to sidestep approval.
2002-05-15 12:25:11 +00:00
John Hay
c7c7cac2fb DEV_BSIZE lives in sys/param.h and not in machine/param.h anymore. 2002-05-15 11:32:53 +00:00
Kelly Yancey
c3a2190cdc Reset token-ring source routing control field on receipt of ethernet frame
without source routing information.  This restores the behaviour in this
scenario to that of prior to my last commit.
2002-05-15 01:03:32 +00:00
Robert Watson
661016419c p_cansignal() returns an errno value; at some point, the check for
inter-process signalling ceased to preserve and return that value,
instead always returning EPERM.  This meant that it was possible
to "probe" the pid space for processes that were not otherwise
visible.  This change reverts that reversion.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-05-14 23:07:15 +00:00
Jeff Roberson
0e2d6cc899 Disable the shared locking namei() code for now. It breaks several stacking
filesystems.  This is on hold until the rest of VFS Locking is reviewed and
deemed safe.  It can be enabled with 'options LOOKUP_SHARED'.
2002-05-14 21:59:49 +00:00
David E. O'Brien
d93389d676 `unexpand -a' should be run _before_ sed 's/^#define /#define^I/g'. 2002-05-14 21:59:10 +00:00
David E. O'Brien
5d340b7ec1 Tighten up the defined()'s. 2002-05-14 21:54:56 +00:00
Joerg Wunsch
a2642c4d67 After some comments from bde, rewrite the loops to avoid turning the
previously used "micro-optimization" (count-down loop) into a
pessimization.  Now the loops are written in the more natural count-up
form.

Also, while being there, i made the logic in out_fdc() similar to the
logic in in_fdc().  The old implementation was a bit bogus anyway
since it first tested the DIO bit and only afterwards the RQM bit.
However, according to the description of the i82077, the DIO bit is
only guaranteed to be valid once the RQM bit is set.  Thus, the old
implementatoin would have had the chance to misbehave on a controller
that is implemented in accordance with the i82077 description (but is
not bug-for-bug compatible).

MFC after:	3 days
2002-05-14 21:28:45 +00:00
Poul-Henning Kamp
6380601f64 Move MI stuff out of MD param.h files.
It can all still be overridden in the MD files should need suddenly arise.
2002-05-14 20:35:29 +00:00
Poul-Henning Kamp
4c51ae2155 Remove the unused definitions of ctod() and dotc(). 2002-05-14 20:01:34 +00:00
Robert Watson
f83c7ad731 Modify the arguments to syncache_socket() to include the mbuf (m) that
results in the syncache entry being turned into a socket.  While it's
not used in the main tree, this is required in the MAC tree so that
labels can be propagated from the mbuf to the socket.  This is also
useful if you're doing things like transparent IP connection hijacking
and you want to use the syncache/cookie mechanism, but we won't go
there.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-05-14 18:57:55 +00:00
Dag-Erling Smørgrav
733c328439 Remove a printf(3) argument with no corresponding format specifier. 2002-05-14 18:28:06 +00:00
Ian Dowse
cf6b7c4adc Following a repo-copy from src/sys/ufs/ufs, rename functions and
structures etc. to ext2fs-specific names, and remove ufs-specific
code that is no longer required. As a first stage, the code will
still convert back and forth between the on-disk format and struct
inode, so the struct dinode fields have been added to struct inode
for now.

Note that these files are not yet connected to the build.
2002-05-14 17:14:01 +00:00
Robert Watson
4a7edf6974 Strategic diff reduction against TrustedBSD MAC branch: introduce an
additional system boot ordering entry, SI_SUB_MAC_LATE, which occurs
after all MAC policies have been initialized, permitting the MAC
subsystem to take action once all "early loaded" modules are in place.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-05-14 14:36:09 +00:00
Ruslan Ermilov
122865286e Even more BBSIZE related breakage. 2002-05-14 13:30:45 +00:00
Yoshihiro Takahashi
8b20c954cb Fixed to build for GCC 3.1 2002-05-14 12:34:03 +00:00
Yoshihiro Takahashi
348df1aa25 Add -ffreestanding to CFLAGS. 2002-05-14 12:32:59 +00:00
Brian Somers
87c4cce00e Add a NGM_PPPOE_SESSIONID message to the ng_pppoe node.
This message is sent to the control socket when the SessionID
is established.

Approved by:	archie (after a very cursory glance)
2002-05-14 12:32:41 +00:00
Yoshihiro Takahashi
8fed82b9af MFi386: revision 1.519 2002-05-14 12:31:47 +00:00
Yoshihiro Takahashi
3ffc9f0bff Merged from sys/isa/fd.c revisions from 1.229 to 1.232. 2002-05-14 12:30:52 +00:00
Yoshihiro Takahashi
0e053201b3 Merged from sys/dev/syscons/syscons.c revision 1.384 2002-05-14 12:29:34 +00:00
Poul-Henning Kamp
98b0c78978 Make daddr_t and u_daddr_t 64bits wide.
Retire daddr64_t and use daddr_t instead.

Sponsored by:	DARPA & NAI Labs.
2002-05-14 11:09:43 +00:00
Poul-Henning Kamp
085559c4fc Roll the LOG2 macro up again, I don't belive unrolling this for 64bits
make sense.

Sponsored by:	DARPA & NAI Labs.
2002-05-14 08:01:34 +00:00
Ruslan Ermilov
be1d673d24 Check that kldxref(8) exists before running it. 2002-05-14 07:49:12 +00:00
Poul-Henning Kamp
e74e01d5e3 Make the mtio data structures explicitly sized.
A couple of the fields should probably be 64bits in the future.

Sponsored by:	DARPA & NAI Labs.
2002-05-14 07:30:13 +00:00
Poul-Henning Kamp
22bd43ccda Move a few ancient minor-number definitions for tapedrives to the
only driver which uses them.  Remove the rest.
2002-05-14 06:57:02 +00:00
David E. O'Brien
d600c96632 Tweak the include dirs w/o incurring extra warnings 2002-05-14 01:18:51 +00:00
David E. O'Brien
014585d125 unexpand -a everything 2002-05-14 01:09:03 +00:00
David E. O'Brien
ddd36f9fac First pass of style(9) for #define's. 2002-05-14 00:53:08 +00:00
Warner Losh
e9f49c9c96 BDE and I have had a chance to hash this out:
o Use splnet() instead of splclock().
o Use splnet() instead of splimp().

Reviewed by: bde
2002-05-13 21:17:33 +00:00
Ruslan Ermilov
475ab3cda6 Align CLEANFILES with revision 1.25 changes. 2002-05-13 16:16:00 +00:00
Ruslan Ermilov
26aace39ab Fixed CLEANFILES after bsd.lib.mk sweep. 2002-05-13 15:48:05 +00:00
Bruce Evans
74f168bf7a Fixed a semantic error. va_arg(ap, u_short) is nonsense except on i386's
with 16-bit ints, since u_short is promoted when it is passed to a
varargs function.  gcc now warns about this.  We always pass small
integers (this is well obuscated), so there are no conversion problems.

Fixed a related style bug (bogus cast).
2002-05-13 14:34:47 +00:00
Bruce Evans
5d81c9882f Don't include <stddef.h> "For offsetof". This is not even wrong in
-current, since offsetof() is defined a header under /sys so that
system sources don't need to have this wrong include.

This bug was only detected because my version of <stddef.h> has some
spelling fixes (s/field/member/g) and gcc is now sensitive to the spelling
of arg names in macros as required by standards (ISO C90 6.8.3...).
2002-05-13 14:11:33 +00:00
Bruce Evans
a8fae7e580 Fixed syntax errors (tokens after #endif). 2002-05-13 12:55:30 +00:00
Bruce Evans
a10e4c9532 Fixed syntax errors (garbage after #endif; just editing errors in this
case).  These errors and related style bugs swere cloned from ufs
shortly after they were committed to ufs.  They were mostly fixed in
ufs long ago.
2002-05-13 12:39:46 +00:00
Bruce Evans
f5d3fceede Fixed a syntax error (a label not followed by a statement). 2002-05-13 11:53:40 +00:00
Ruslan Ermilov
46f8fdc34e Removed now unused INTERNALSTATICLIB.
INTERNALLIB now implies NOPIC and NOPROFILE.
Removed gratuitous NOMAN.
2002-05-13 11:09:07 +00:00
Ruslan Ermilov
2a53f3fb35 Major cleanup of bsd.lib.mk.
Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB.
INTERNALLIB now means to build static library only and don't install
anything.  Added a NOINSTALLLIB knob for libpam/modules.  To not
build any library at all, just do not set LIB.
2002-05-13 10:53:24 +00:00
Luigi Rizzo
4b9840932d Add ipfw hooks to ether_demux() and ether_output_frame().
Ipfw processing of frames at layer 2 can be enabled by the sysctl variable

	net.link.ether.ipfw=1

Consider this feature experimental, because right now, the firewall
is invoked in the places indicated below, and controlled by the
sysctl variables listed on the right.  As a consequence, a packet
can be filtered from 1 to 4 times depending on the path it follows,
which might make a ruleset a bit hard to follow.

I will add an ipfw option to tell if we want a given rule to apply
to ether_demux() and ether_output_frame(), but we have run out of
flags in the struct ip_fw so i need to think a bit on how to implement
this.

		to upper layers
	     |			     |
	     +----------->-----------+
	     ^			     V
	[ip_input]		[ip_output]	net.inet.ip.fw.enable=1
	     |			     |
	     ^			     V
	[ether_demux]      [ether_output_frame]	net.link.ether.ipfw=1
	     |			     |
	     +->- [bdg_forward]-->---+		net.link.ether.bridge_ipfw=1
	     ^			     V
	     |			     |
		 to devices
2002-05-13 10:37:19 +00:00
Joerg Wunsch
8a0ba81859 style(9) changes before further editing that region:
. add unnecessary parenthesis around return values
. put body of an "if" statement onto a line of its own
2002-05-13 10:28:20 +00:00
Luigi Rizzo
2f8707ca5d Remove custom definitions (IP_FW_TCPF_SYN etc.) of TCP header flags
which are the same as the original ones (TH_SYN etc.)
2002-05-13 10:21:13 +00:00
Poul-Henning Kamp
05f4ff5da1 Remove register keyword.
Sponsored by:	DARPA & NAI Labs.
Submitted by:	mckusick
2002-05-13 09:22:31 +00:00
Benno Rice
289fc68db6 Build the fpu support routines. 2002-05-13 07:53:22 +00:00
Benno Rice
eeaa897915 FPU support.
Obtained from:	NetBSD (portions)
2002-05-13 07:44:48 +00:00
David E. O'Brien
ef372b6540 Bump for GCC 3.1. 2002-05-13 07:14:17 +00:00
David E. O'Brien
21ab21338d Match the default newfs UFS block size. 2002-05-13 05:09:34 +00:00
Jeff Roberson
713deb3677 Don't call the uz free function while the zone lock is held. This can lead
to lock order reversals.  uma_reclaim now builds a list of freeable slabs and
then unlocks the zones to do all of the frees.
2002-05-13 05:08:18 +00:00
Marcel Moolenaar
42f79044e3 s/_ALPHA_/_MACHINE_/ 2002-05-13 05:01:05 +00:00
Marcel Moolenaar
dfef48964d Remove reference to the "Alpha Calling Standard". 2002-05-13 04:58:12 +00:00
Jeff Roberson
0aef6126a1 Remove the hash_free() lock order reversal. This could have happened for
several reasons before.  Fixing it involved restructuring the generic hash
code to require calling code to handle locking, unlocking, and freeing hashes
on error conditions.
2002-05-13 04:39:28 +00:00
Jake Burkholder
20409ddf22 Fix IF_SEXT(val, 32). The constants need to have type long to
handle size > 16.
2002-05-13 04:26:38 +00:00
Jake Burkholder
26a9c7b7e1 These were repo-copied to dump_machdep.c. 2002-05-13 02:52:35 +00:00
Jake Burkholder
60b22c6d62 ${MACHINE_ARCH}dump.c -> dump_machdep.c. 2002-05-13 02:40:21 +00:00
Jake Burkholder
c0db03795f Add another copy of the ia64 dump_machdep.c. 2002-05-13 02:39:19 +00:00
Poul-Henning Kamp
2b2df79fad Remove two "register" and a blank line.
Submitted by:	mckusick
Sponsored by:	DARPA & NAI Labs.
2002-05-12 22:54:48 +00:00
Poul-Henning Kamp
77068a7fe2 Retire the bogus uses of the disklabel field d_sbsize and begin to
initialize it to zero so we don't have to have everbody and their
aunt including FFS specific header files.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:49:41 +00:00
Luigi Rizzo
201efb1913 Add code to match MAC header fields (at the moment supported on
bridged packets only, soon to come also for packets on ordinary
ether_input() and ether_output() paths. The syntax is

    ipfw add <action> MAC dst src type

where dst and src can be "any" or a MAC address optionallyfollowed
by a mask, e.g.

	10:20:30:40:50
	10:20:30:40:50/32
	10:20:30:40:50&ff:ff:ff:f0:ff:0f

and type can be a single ethernet type, a range, or a type followed by
a mask (values are always in hexadecimal) e.g.

	0800
	0800-0806
	0800/8
	0800&03ff

Note, I am still uncertain on what is the best format for inputting
these values, having the values in hexadecimal is convenient in most
cases but can be confusing sometimes. Suggestions welcome.

Implement suggestion from PR 37778 to allow "not me" on destination
and source IP. The code in the PR was slightly wrong and interfered
with the normal handling of IP addresses. This version hopefully is
correct.

Minor cleanup of the code, in some places moving the indentation to 4
spaces because the code was becoming too deep. Eventually, in a
separate commit, I will move the whole file to 4 space indent.
2002-05-12 20:43:50 +00:00
Poul-Henning Kamp
7110af7577 ARGH! SBLOCK is not unused. Try to get this right.
BBSIZE belongs in <sys/disklabel.h> (but shouldn't be a constant).

Define SBLOCK again, using the right math.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:21:40 +00:00
Poul-Henning Kamp
7cb71b749c Remove #define for BBOFF, it is assumed == 0 so many places that we might
as well forget about it.  In fact the only thing which used it was the
SBOFF macro.

Sponsored by: DARPA & NAI Labs.
2002-05-12 20:00:21 +00:00
Poul-Henning Kamp
16910634dd Remove unused BBLOCK and SBLOCK #defines.
Sponsored by: DARPA & NAI Labs.
2002-05-12 19:56:31 +00:00
Alan Cox
a47335fdb4 o Remove GIANT_REQUIRED and an excessive number of blank lines
from vm_map_inherit().  (minherit() need not acquire Giant
   anymore.)
2002-05-12 18:42:05 +00:00
Marcel Moolenaar
882c6b1e5a Fix alpha build. The alpha has dumpsys implemented.
While here, revert the condition to list the machines
for which dumpsys has not been implemented.

Reported by: wilko
2002-05-12 18:27:28 +00:00
Jake Burkholder
63fd3b0af9 Enable KTR_TRAP by default. 2002-05-12 18:10:48 +00:00
Joerg Wunsch
5613959d84 Hide the fd autoselection messages behind the bootverbose case so they
stop bothering people on their consoles.
2002-05-12 17:17:46 +00:00
Bruce Evans
26e5d4d14f Translated -malign-functions=4 to -falign-functions=16 for the new gcc. 2002-05-12 15:51:38 +00:00
Bruce Evans
e754a32842 Saved 176 bytes by compiling with -fno-guess-branch-probability. The
default of -fguess-branch-probablility causes time optimizations (?)
like rewriting `if (foo) x++;' as
`if (!foo) goto forth; back: ; ...; forth: x++; goto back;".  This is
pessimizes space especially well on i386's because one short branch
gets converted to 2 long ones.

Removed -fno-align-foo since it is implied by -Os.  Previous commit
messages seem to have overstated the new alignment bugs in gcc.  The
only case that affects boot2 is that -fno-align-functions (or
equivalently -falign-functions=1) actually gives -falign-functions=2.
This is caused by FUNCTION_BOUNDARY being 2 (bytes) instead of 1.
The default case where the optimization level is 1 and no alignment
options are given is more broken.  All alignments are minimal, modulo
the bug in FUNCTION_BOUNDARY.  This is caused by toplev.c setting
defaults too early.

Some hacks in previous commits ar not needed now, but may as well be
kept until gcc is fixed.  The previous on in the Makefile saved 96
bytes of text due to the wrong FUNCTION_BOUNDARY and 32 bytes of data
due to unrelated bloat in the alignment of large objects.  There aren't
even any options to control alignment of data.
2002-05-12 15:45:28 +00:00
Joerg Wunsch
cb38bb6c36 Increase the PIO timeout to approximately the value it used to have
before rev 1.229 (~ 100 ms).  According to bde, some (old) broken
hardware could require it.  In order to make timing more accurate than
what could be achieved with a loop around DELAY(1), increase loop
timing after the initial ~ 1 ms.

Also, move the declaration of FDSTS_TIMEOUT out from fdreg.h into fd.c
where it actually belongs to.

MFC after:	2 days
2002-05-12 15:24:21 +00:00
Hajimu UMEMOTO
88a89f8617 Recent zlib does not like Z_FLUSH at the end of inflate().
Reported by:	quak@mydiax.ch
Obtained from:	KAME
MFC after:	2 days
		and approved by re
2002-05-12 14:12:30 +00:00
David E. O'Brien
95cfc25d0d Back out last commit. I expect our bsd.*.mk gods to remove the need for
defining so many extra things in addition to INTERNALLIB.  We don't like
repetitive C code and we shouldn't for make code either.
2002-05-12 13:54:42 +00:00
Benno Rice
608cd3ca29 More locking fixes. 2002-05-12 13:43:21 +00:00
Benno Rice
a397544c6b Do the correct locking on processes for DSI and ISI traps.
Copied from:	sparc64
2002-05-12 06:06:24 +00:00
Marcel Moolenaar
f5b454cf25 o Rename ia64_count_aps to ia64_count_cpus and reimplement the
function to return the total number of CPUs and not the highest
   CPU id.
o  Define mp_maxid based on the minimum of the actual number of
   CPUs in the system and MAXCPU.
o  In cpu_mp_add, when the CPU id of the CPU we're trying to add
   is larger than mp_maxid, don't add the CPU. Formerly this was
   based on MAXCPU. Don't count CPUs when we add them. We already
   know how many CPUs exist.
o  Replace MAXCPU with mp_maxid when used in loops that iterate
   over the id space. This avoids a couple of useless iterations.
o  In cpu_mp_unleash, use the number of CPUs to determine if we
   need to launch the CPUs.
o  Remove mp_hardware as it's not used anymore.
o  Move the IPI vector array from mp_machdep.c to sal.c. We use
   the array as a centralized place to collect vector assignments.
   Note that we still assign vectors to SMP specific IPIs in
   non-SMP configurations. Rename the array from mp_ipi_vector to
   ipi_vector.
o  Add IPI_MCA_RENDEZ and IPI_MCA_CMCV. These are used by MCA.
   Note that IPI_MCA_CMCV is not SMP specific.
o  Initialize the ipi_vector array so that we place the IPIs in
   sensible priority classes. The classes are relative to where
   the AP wake-up vector is located to guarantee that it's the
   highest priority (external) interrupt. Class assignment is
   as follows:
	class	IPI		notes
	x	AP wake-up	(normally x=15)
	x-1	MCA rendezvous
	x-2	AST, Rendezvous, stop
	x-3	CMCV, test
2002-05-12 05:54:21 +00:00
Alan Cox
47c3ccc467 o Acquire and release Giant in vm_object_reference() and
vm_object_deallocate(), replacing the assertion GIANT_REQUIRED.
 o Remove GIANT_REQUIRED from vm_map_protect() and vm_map_simplify_entry().
 o Acquire and release Giant around vm_map_protect()'s call to pmap_protect().

Altogether, these changes eliminate the need for mprotect() to acquire
and release Giant.
2002-05-12 05:22:56 +00:00
Scott Long
c52bf372f5 Update the PCI table as per Dell's fickleness.
MFC after:	3 days
2002-05-12 04:30:28 +00:00
Dima Dorfman
11612afabe s/demon/daemon/ 2002-05-12 00:22:38 +00:00
Mike Barcroft
9828cf071d Remove some duplicate types that should have been removed as part of
the rearranging in the previous revision.

Pointy hat to:	cvs update (merging), mike (for not noticing)
2002-05-11 23:28:51 +00:00
Jake Burkholder
6cc8d3ac6b Attempt to not crash and burn on UltraSPARC III machines; the cpuid property
is named differently.
2002-05-11 22:05:22 +00:00
Andrew Gallatin
338a21a47a Restore the ability to take crashdumps on alpha. This was cut and pasted
nearly in its entirety from i386, so it retains the phk/nati copyright.

Savecore likes the results, but I have no way to test it as gdb is
still broken.
2002-05-11 21:53:46 +00:00
Peter Wemm
92948f4701 Save about 60 bytes by #define memcpy __builtin_memcpy and removing
the function we provided.  Restore the Keyboard: yes/no  printf for the
probe diagnostics.  We end up with 40 bytes free.
2002-05-11 21:49:39 +00:00
Peter Wemm
1333378a61 Reconnect boot2. I'm sure I'll regret this though. :-) 2002-05-11 21:41:03 +00:00
Peter Wemm
7a163a83da Use a crowbar and duct-tape to make boot2 fit again. This gets it down
to 4 bytes free.  I removed a printf (the Keyboard yes/no) since it is of
marginal value and sed'ed the generated asm output to remove the unwanted
aligns.  There's probably a better way to gain a few extra bytes than
losing the printf.  Shortening strings is probably a better option but this
should get us over the hurdle.
2002-05-11 21:39:59 +00:00
Jake Burkholder
d07160f401 Change the disk probing so that it will actually find disks other
than the first one on a controller, and work for secondary
controllers.
Due to the prom not having nodes for each disk, but a catch-all one,
we have to iterate over each device, trying to open it to determine
whether it is actually present.
Since probing this way takese some time (and spews some spurious
warnings), it should maybe be short-circuited if we use the
device we were booted from.
Implement lazy device probing, and correct slice/partiniton
handling in the ofwd_open() code. With this, I can now actually boot
a kernel from disk, and the loader does not create unnecessary
delays.

Submitted by:	tmm
2002-05-11 21:30:46 +00:00
Jake Burkholder
025c284b8d Add a support macro to convert the 5-bit packed register field of
a floating point instruction into a 6-bit register number for
double and quad arguments.
Make use of the new INSFPdq_RN macro where apporpriate; this
is required for correctly handling the "high" fp registers
(>= %f32).
Fix a number of bugs related to the handling of the high registers
which were caused by using __fpu_[gs]etreg() where __fpu_[gs]etreg64()
should be used (the former can only access the low, single-precision,
registers).

Submitted by:	tmm
2002-05-11 21:20:05 +00:00
David E. O'Brien
3bf8b9cee3 NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using
INTERNALLIB now.
2002-05-11 18:02:33 +00:00
Kelly Yancey
ca2b29fd52 Fix logic inversion bug. 2002-05-11 06:27:24 +00:00
Dima Dorfman
b90faaf350 sysctl -w -> sysctl 2002-05-11 06:06:11 +00:00
John Baldwin
8f0dda1601 Temporarily disable Jeff's fix for atomic_cmpset_32() to zero-extend the
value we load from memory.  gcc3.1 passes in the u_int32_t old value to
compare against as a _sign_-extended 64-bit value for some reason (bug?).
This is a temporary workaround so kernels work again on alpha.
2002-05-11 04:27:39 +00:00
Alfred Perlstein
b71b449d27 As a temporary bandaid disable '__printf0like' unconditionally, it
doesn't seem to work under gcc 3.1 yet.

We are now 'WERROR' safe again.
2002-05-11 03:58:24 +00:00
John Baldwin
2065f9d26e Add a dummy cleandir target to the kernel section so that make buildkernel
actually works on a kernel config with NO_MODULES set.
2002-05-11 02:25:02 +00:00
Joerg Wunsch
d0900d6bc0 Change the PIO loops from a hard counter into a loop that calls DELAY()
in each cycle, with a tunable max cycle count defined in fdreg.h.

This is said to fix the problem on some Compaq hardware (and perhaps
on other machines using the Natsemi PC87317 chip) where the fdc(4)
driver failed to operate at all.

PR:		kern/21397
Submitted by:	Jung-uk Kim <jkim@niksun.com>
MFC after:	3 days
2002-05-10 17:56:39 +00:00
Andrew Gallatin
8bef1df9eb Remove ## concatination in the CFGREAD and CFGWRITE macros, as gcc3 complains
about them & they are not needed.  Same fix as to tsunami_pci.c.
(not surprising, as this code was cut and pasted from there when I wrote it).
2002-05-10 16:56:14 +00:00
Maxime Henrion
8eee3a3d58 Fix several bugs in devfs_lookupx(). When we check the nameiop to
make sure it's a correct operation for devfs, do it only in the
ISLASTCN case.  If we don't, we are assuming that the final file will
be in devfs, which is not true if another partition is mounted on top
of devfs or with special filenames (like /dev/net/../../foo).

Reviewed by:	phk
2002-05-10 15:41:14 +00:00
John Baldwin
2c6c9ea2bd p_leader is only set at fork1() time, so update its locking note
appropriately.
2002-05-10 14:28:05 +00:00
Benno Rice
0f92104c14 Implement the following functions:
- pmap_addr_hint
- pmap_change_wiring
- pmap_extract
- pmap_is_modified
2002-05-10 14:21:48 +00:00
Benno Rice
e89482f7cb Install the system call trap handler. 2002-05-10 14:19:44 +00:00
Joerg Wunsch
ca06fe5647 Fix a misplaced break statement within a switch that accidentally made
it into an "#ifdef INET6" block.  This caused a (harmless but annoying)
EINVAL return value to be sent even though the operation completed
successfully.

PR:		kern/37786
Submitted by:	Ari Suutari <ari.suutari@syncrontech.com>,David Malone <dwmalone@maths.tcd.ie>
MFC after:	1 day
2002-05-10 12:48:09 +00:00
Gary Jennejohn
c0a06166a0 Fix a problem which could cause some machines to hang after a warm boot.
This should be in 4.6.

Submitted by:	Ari Suutari <ari.suutari@syncrontech.com>
2002-05-10 12:04:04 +00:00
David E. O'Brien
d1bdfb40fd -ffreestanding is the word.
(also resort some CFLAGS such that the more "important" value are first so
they are easier to see)
2002-05-10 09:26:35 +00:00
Marcel Moolenaar
3ce344cfd3 Add missing #endif 2002-05-10 07:33:11 +00:00
Benno Rice
fafc736254 Improve our detection of an attempted duplicate entry. We may be trying to
change the page protection bits.
2002-05-10 06:27:08 +00:00
Benno Rice
f2b85e7c82 Remove a debugging printf that escaped. 2002-05-10 06:26:19 +00:00
Benno Rice
a51eb7c321 Increase the size of the kstack. 2002-05-10 05:16:40 +00:00
John Baldwin
88f0d73da4 - Axe -mpreferred-stack-boundary=2 as -Os turns this on by default.
- Axe -fdata-sections as turning it on or off makes no difference.  If
  it did make a difference it would serve to bloat boot2 even further with
  extra padding.
- Axe -fforce-addr.  This gets us 32 bytes so we are down to only being
  64-bytes over.

We still can't compile this with gcc 3.1.  The problem seems to be that
the -fno-align-foo options don't actually work.  Comparing the new and
old output it turns out that gcc is 4-byte padding all the functions and
labels and what not despite the passed in arguments thus adding the
unfortunate bloat to boot2.
2002-05-10 04:05:42 +00:00
David E. O'Brien
10cd195e63 I reorganized a little bit too much in the backwards case. 2002-05-10 03:24:06 +00:00
David E. O'Brien
4c04f5d447 Opps, remove added bogon. 2002-05-10 02:21:05 +00:00
David E. O'Brien
8fea834105 Sync with the other platforms. 2002-05-10 02:20:33 +00:00
David E. O'Brien
c7e401fbc3 Gcc 3.1 varargs support. 2002-05-10 02:12:04 +00:00
David E. O'Brien
fc336fdfbb Gcc 3.1 varargs support. 2002-05-10 02:02:54 +00:00
David E. O'Brien
39bd77be52 Use only bits w/in /sys if at all possible. 2002-05-10 01:53:16 +00:00
David E. O'Brien
54fd053e6c We don't need bootinfo any more, and sparc64 doesn't have it anyways. 2002-05-10 01:20:37 +00:00
David E. O'Brien
07776d8fb2 Don't be redundant. 2002-05-10 01:06:52 +00:00
David E. O'Brien
7571ef5ae3 -ffreestanding is the word for /sys. 2002-05-10 00:53:45 +00:00
David E. O'Brien
708a23c342 Turn off boot2 -- it gained over 96 bytes dieting on the in-tree Gcc 3.1. 2002-05-10 00:52:00 +00:00
Josef Karthauser
f737c3ae0a MFNetBSD: Bring in the most recent NetBSD and OpenBSD parts. 2002-05-09 21:55:47 +00:00
John Baldwin
3c600cfb6c Fix acpi_avoid() to call freeenv() on the original char * returned from
getenv().

Reported by:	joe
Tested by:	joe
2002-05-09 21:13:37 +00:00
Peter Wemm
7cca309311 Use usb_callout_init() instead of directly calling callout_init() with
NetBSD's expected arguments.  This unbreaks the kernel compile.

Pointy hat to: joe
2002-05-09 21:08:34 +00:00
David E. O'Brien
f21450f69f Ficl doesn't build on sparc64. 2002-05-09 20:33:22 +00:00
David E. O'Brien
39ebfeb05b Add a hack (ported from NetBSD) to support Sun disk labels.
This code works by converting the Sun label to a struct disklabel, which
is probably even the right thing for reading a label. The original
checksum is taken over, so that the label source can be distinguished.

The NetBSD code to wrap a BSD-style disklabel into the Sun disklabel has been
deleted for now - don't know whether that is really desirable, after all Sun
disklabels could just be used always (BSD disklabels are going to have
problems with PROM compatability).  The dsinit() call in diskopen() has been
#ifdef'ed out for now, this will be changed to use the minimal slice struct
in case of dsinit() failure.

Submitted by:	tmm
Obtained from:	NetBSD
2002-05-09 20:22:59 +00:00
Mike Silbersack
a9caffba47 Change the mbuf exhaustion warning message to match the message
in -stable.
2002-05-09 20:21:07 +00:00
Archie Cobbs
a1479aa2fd Don't send packets out an interface unless it is IFF_UP|IFF_RUNNING.
This fixes panics with certain Ethernet drivers when doing bridging,
PPPoE, etc. before the driver has been fully brought up.

MFC after:	1 week
2002-05-09 20:19:00 +00:00
David E. O'Brien
6feff71aaf Directives may not be used inside a macro argument, so don't. 2002-05-09 18:01:19 +00:00
David E. O'Brien
a89dc896b5 Partical style cleanup. 2002-05-09 17:47:25 +00:00
Benno Rice
3779a55671 Update to newer trap code from NetBSD.
Obtained from:	NetBSD
2002-05-09 14:22:55 +00:00
Benno Rice
afb7382655 Add an assertion that we have a current pmap set before we try and return. 2002-05-09 14:15:51 +00:00
Benno Rice
1d61c15b8a The per-cpu curpmap is now set by pmap_activate. We don't need to do it here
anymore.
2002-05-09 14:13:29 +00:00
Benno Rice
8c2b091ea2 - Add a prototype for the setfault() function.
- Remove some stray printf()s.
2002-05-09 14:11:17 +00:00
Benno Rice
8207b3627b 1. Better track the executable status of mappings.
2.  Set a pcpu variable to the real address of the active pmap (used when
    exiting from traps.

Obtained from:	NetBSD (1)
2002-05-09 14:09:19 +00:00
Benno Rice
3bc5121f01 Rename the constants for the contents of the PVR register so as not to
conflict with cpu names used in config files..
2002-05-09 14:04:43 +00:00
Josef Karthauser
4722fea82e MFNetBSD:
revision 1.43
    date: 2001/04/12 01:39:04;  author: thorpej;  state: Exp;  lines: +2 -2
    Switch to USB_USE_SOFTINTR.  The callout hack does indeed work
    fine for systems without generic soft interrupts, even if it is
    a little sub-optimal.  Consider it a penalty for ports not
    implementing a kernel API.

    Addresses kern/11957.  The PR has been open for 4 months, and
    I have work blocked on the continued existence of splimp() in
    the networking code.

The NetBSD patch only switches it on for NetBSD, but I've also
switched it on for FreeBSD in this commit.
2002-05-09 12:49:25 +00:00
Josef Karthauser
1063e12617 Replace /kernel with /boot/kernel/kernel.
PR:		docs/37757
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-09 11:47:42 +00:00
Luigi Rizzo
d60315bef5 Cleanup the interface to ip_fw_chk, two of the input arguments
were totally useless and have been removed.

ip_input.c, ip_output.c:
    Properly initialize the "ip" pointer in case the firewall does an
    m_pullup() on the packet.

    Remove some debugging code forgotten long ago.

ip_fw.[ch], bridge.c:
    Prepare the grounds for matching MAC header fields in bridged packets,
    so we can have 'etherfw' functionality without a lot of kernel and
    userland bloat.
2002-05-09 10:34:57 +00:00
Jonathan Mini
d8f4f6a404 Remove trace_req().
Reviewed by:	alfred, jhb, peter
2002-05-09 04:13:41 +00:00
Alan Cox
82641acd17 o Correct an error made in revision 1.65: In readv(), if uap->iovcnt is
out-of-range, drop the file reference before returning.  (This error
   also exists in the RELENG_4 branch.)
 o Eliminate the acquisition and release of Giant in readv()
   now that malloc() and free() are callable without Giant.
2002-05-09 02:30:41 +00:00
David E. O'Brien
3393d027da Comment two values I was looking at for GDB. 2002-05-09 02:07:51 +00:00
Matt Jacob
cc8371bc71 Only saying you're launching other CPUs if there are more than one to launch. 2002-05-08 23:12:00 +00:00
Alfred Perlstein
8b43b53530 expand_name fixes:
.) don't use MAXPATHLEN + 1, fix logic to compensate.
.) style(9) function parameters.
.) fix line wrapping.
.) remove duplicated error and string handling code.
.) don't NUL terminate already NUL terminated string.
.) all string length variables changed from int to size_t.
.) constify variables.
.) catch when corename would be truncated.
.) cast pid_t and uid_t args for format string.
.) add parens around return arguments.

Help and suggestions from: bde
2002-05-08 09:06:47 +00:00
Jeff Roberson
c4b689f10a zapnot the signed bits in atomic_cmpset_32. Previously this did not work with
negative values because the original value was sign extended but the compared
value was not.
2002-05-08 05:19:56 +00:00
Jake Burkholder
0cce52f8eb Remove runq_findproc. This never worked right in the first place and can
be prohibitively expensive.
2002-05-08 04:39:49 +00:00
Jake Burkholder
51ceaefac4 Remove unneeded include. 2002-05-08 04:21:58 +00:00
Jake Burkholder
ea4ad4bb29 Make a macro for the guts of tl0_immu_miss, like dmmu_miss and prot.
Rearrange things slightly so that the contents of the tag access
register are read and restored outside of the macros.  The intention
is to pass the page size to look up as an argument to the macros.
2002-05-08 04:14:16 +00:00
Kelly Yancey
0ee3222df6 Roll my own min() (named ISO88025_MIN() so as to not cause conflicts) so
that this header may be included from userland where min() may not be
declared (or worse, declared differently).  I open to alternative
solutions.
2002-05-08 01:08:26 +00:00
John Baldwin
492da65ed7 Detect and attach to the ICH3 SMBus controller.
PR:		i386/36972
Submitted by:	Colin Perkins <csp@isi.edu>
Requested by:	Larry Rosenman <ler@lerctr.org>
MFC After:	7 days
2002-05-08 00:51:54 +00:00
Alfred Perlstein
b2bc3101a8 M_ZERO the temp buffer in expand_name() otherwise if an error occurs
while logging we may pass a non NUL terminated string to log(9) for a
%s format arg.
2002-05-07 23:37:07 +00:00
Kelly Yancey
42fdfc126a Move ISO88025 source routing information into sockaddr_dl's sdl_data
field.  This returns the sdl_data field to a variable-length field.  More
importantly, this prevents a easily-reproduceable data-corruption bug when
the interface name plus the hardware address exceed the sdl_data field's
original 12 byte limit.  However, token-ring interfaces may still overflow
the new sdl_data field's 46 byte limit if the interface name exceeds 6
characters (since 6 characters for interface name plus 6 for hardware
address plus 34 for source routing = the size of sdl_data).  Further
refinements could overcome this limitation but would break binary
compatibility; this commit only addresses fixing the bug for
commonly-occuring cases without breaking binary compatibility with the
intention that the functionality can be MFC'ed to -stable.

  See message ID's (both send to -arch):
	20020421013332.F87395-100000@gateway.posi.net
	20020430181359.G11009-300000@gateway.posi.net
  for a more thorough description of the bug addressed and how to
reproduce it.

Approved by:	silence on -arch and -net
Sponsored by:	NTT Multimedia Communications Labs
MFC after:	1 week
2002-05-07 22:14:06 +00:00
Peter Wemm
0d93809e04 Re-remove kern_random.c and svr4_signal.c. Somehow dillon managed to keep
on committing to these while they were in the Attic after they had been
removed.  I think this was because he had the file checked out and already
'modified' while markm cvs rm'ed them, and cvs screws up when trying to
"merge" the modifications with the "rm".  And after that the client
state was sufficiently hosed to keep it messed up.  Yay CVS!  (CVS is
very fragile for adding and removing files remotely)

The existence of these files was pointed out by: ru
2002-05-07 21:54:47 +00:00
Andrew R. Reiter
52550fcde1 - Remove the init routine for loop -- it broke something and I don't have
the time to fix it properly at the moment.
2002-05-07 20:50:10 +00:00
Andrew R. Reiter
3130f09161 - Use an array of init functions to be used in a for loop in our
initialization routine.
2002-05-07 20:37:40 +00:00
Andrew R. Reiter
4822f32850 - Add atm_init_fn 2002-05-07 20:36:35 +00:00
Andrew R. Reiter
bfb57eef8a - Add atm_sock_init()
- Move the Atm_pcb storage pool (atm_pcb_pool) to be an UMA zone.
2002-05-07 20:13:55 +00:00
Andrew R. Reiter
a3d5f221b4 - Change the atm_cm_init function to take no argument. 2002-05-07 20:12:29 +00:00
Warner Losh
f6462e80ac MFOpenBSD: ibss and ibss-master.
ibss is the modern ad-hoc mode.  ibss-master is the same, except that
it creates the ibss network.  This distinction is necessary because
some supported cards (symbol) support the former without supporting
the latter.

A seprate commit will introduce a demo-adhoc mode so that we can
disentwingle the multiple, mutually exclusive meandings of adhoc in
the present state of affairs.

Submitted by: jhay
2002-05-07 18:16:39 +00:00
Warner Losh
f0a8d5cb6c Minor style nit 2002-05-07 18:11:55 +00:00
Warner Losh
d87fc9ac63 Try to use spls more correctly 2002-05-07 18:09:19 +00:00
Seigo Tanimura
9d0fc9636e Do not forget to increase the number of completely connected sockets in
soisconnected_locked().

Forgotten by:	tanimura
2002-05-07 16:17:44 +00:00
Bruce Evans
7085e70878 Reconnect db_elf.c to the build (now under "options DDB_NOKLDSYM"). It
doesn't actually build yet.
2002-05-07 10:59:52 +00:00
Marcel Moolenaar
bb9c068e14 o Add ar.lc to the pcb.
o  Create pcb_save as the backend for savectx and cpu_switch.
o  While here, use explicit bundling for pcb_save and optimize
   for compactness (~87% density).

o  Not part of the commit is a backend pcb_restore. restorectx()
   still jumps halfway into cpu_switch().
2002-05-07 05:52:27 +00:00
Jeff Roberson
f0d73b3e5f Switch from just holding the interlock to holding the standard lock throughout
getnewvnode().  This is safer.  In the future, we should investigate requiring
only the interlock to get the vnode object.
2002-05-07 02:44:06 +00:00
Bruce Evans
833863ff77 Include <sys/lockmgr.h> for definitions of deprecated locking interfaces --
don't depend on namespace pollution in other headers.
2002-05-06 23:34:13 +00:00
Alfred Perlstein
e649887b1e Make funsetown() take a 'struct sigio **' so that the locking can
be done internally.

Ensure that no one can fsetown() to a dying process/pgrp.  We need
to check the process for P_WEXIT to see if it's exiting.  Process
groups are already safe because there is no such thing as a pgrp
zombie, therefore the proctree lock completely protects the pgrp
from having sigio structures associated with it after it runs
funsetownlst.

Add sigio lock to witness list under proctree and allproc, but over
proc and pgrp.

Seigo Tanimura helped with this.
2002-05-06 19:31:28 +00:00
Josef Karthauser
567f4af63d MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),
usbdi.h (1.60)
	  (and local changes compatibility changes to ufm.c and urio.c)

    date: 2002/02/11 15:11:49;  author: augustss;
    Give usbd_do_request_flags() an extra argument for the timeout.
2002-05-06 18:23:36 +00:00
John Baldwin
e746d950ab When checking to see if the init process calls exit1(), compare p to the
initproc proc pointer instead of checking to see if the pid is 1.

Submitted by:	bde
2002-05-06 17:07:10 +00:00
John Baldwin
276c516984 Style fixes in local variable declarations.
Submitted by:	bde
2002-05-06 17:04:29 +00:00
Hajimu UMEMOTO
8117063142 Revised MLD-related definitions
- Used mld_xxx and MLD_xxx instead of mld6_xxx and MLD6_xxx according
  to the official defintions in rfc2292bis
  (macro definitions for backward compatibility were provided)
- Changed the first member of mld_hdr{} from mld_hdr to mld_icmp6_hdr
  to avoid name space conflict in C++

This change makes ports/net/pchar compilable again under -CURRENT.

Obtained from:	KAME
2002-05-06 16:28:25 +00:00
John Baldwin
7a6b989bfa - Style fixes in some comments.
- Whitespace nit.
- Sort some includes.

Submitted by:	bde (mostly)
2002-05-06 15:46:29 +00:00
John Baldwin
d204693572 Add support for the D-Link DFE-690TXD Cardbus card which has a RealTek 8139
with its own PCI ID.
2002-05-06 13:43:00 +00:00
Mitsuru IWASAKI
e8388e1466 Add suspend/resume code mostly merged from fxp/rl driver.
This is temporary hack, better and generalized solution probably
should be implemented at lower layer(MII or PCI?).
Tested by:	shoko.araki@soliton.co.jp
MFC after:	1 week
2002-05-06 10:55:42 +00:00
David Malone
a37231dc3f Add another Askey ISA modem ID.
PR:		35813
Submitted by:	Chris Knight <chris@aims.com.au>
2002-05-06 09:02:55 +00:00
Alan Cox
b3a882e936 o Header files shouldn't depend on options: Provide prototypes
for uiomoveco(), uioread(), and vm_uiomove() regardless
   of whether ENABLE_VFS_IOOPT is defined or not.

Submitted by:	bde
2002-05-06 06:20:04 +00:00
Alan Cox
c0b6bbb80b o Condition the compilation and use of vm_freeze_copyopts()
on ENABLE_VFS_IOOPT.
2002-05-06 05:45:57 +00:00
Jeff Roberson
6953f5da1a Hold the currently selected vnode's lock across the call to VOP_GETVOBJECT.
Don't try to create a vm object before the file system has a chance to finish
initializing it.  This is incorrect for a number of reasons.  Firstly, that
VOP requires a lock which the file system may not have initialized yet. Also,
open and others will create a vm object if it is necessary later.
2002-05-06 04:47:43 +00:00
Alan Cox
dcc5840ed5 o Some improvements to the page coloring of vm objects, particularly,
for shadow objects.

Submitted by:	bde
2002-05-06 03:34:17 +00:00
Bruce Evans
607aa34e88 Include <sys/queue.h> so that this file provides its own namespace
pollution which is required for its includes of <sys/_lock.h> and
<sys/_mutex.h> to work.
2002-05-06 03:13:08 +00:00
Chris D. Faulhaber
eab0c369f1 s/sysctl -w/sysctl/ 2002-05-06 00:45:27 +00:00
Alan Cox
e86256c1f4 o Move vm_freeze_copyopts() from vm_map.{c.h} to vm_object.{c,h}. It's plainly
an operation on a vm_object and belongs in the latter place.
2002-05-06 00:12:47 +00:00
Bruce Evans
5eb6f4bc21 Restored db_elf.c from the Attic. This will be used for a quick fix for
the longstanding brokenness of symbols in ddb at boot time.  It doesn't
compile and is not attached to the build yet.
2002-05-06 00:05:44 +00:00
Maxime Henrion
9d997d8be8 Add the lchflags(2) syscall.
Reviewed by:	rwatson
2002-05-05 23:47:41 +00:00
Maxime Henrion
8d9b781fb5 Add an entry for the lchflags(2) syscall. It's useful to prevent
a symlink deletion.

Reviewed by:	rwatson
2002-05-05 23:37:44 +00:00
Jeff Roberson
576365ba36 Move a KASSERT() in open() prior to unlocking the vnode. It's not safe to
call VOP_GETVOBJECT without a lock.
2002-05-05 23:17:13 +00:00
Alan Cox
c50fe92b8d o Condition the compilation of uiomoveco() and vm_uiomove()
on ENABLE_VFS_IOOPT.
 o Add a comment to the effect that this code is experimental
   support for zero-copy I/O.
2002-05-05 22:42:40 +00:00
Luigi Rizzo
43d11e8453 Indentation and comments cleanup, no functional change.
MFC after: 3 days
2002-05-05 21:27:47 +00:00
Poul-Henning Kamp
81e017430a Expand the one-line function pbreassignbuf() the only place it is or could
be used.
2002-05-05 20:37:08 +00:00
Poul-Henning Kamp
d08961bec3 Move some UFS related stuff home where it belongs. 2002-05-05 20:04:33 +00:00
Orion Hodson
7dace039d8 No longer attempt to power off the ACLINK during suspend - luigi
reports this causes his ich machine to hang.
2002-05-05 15:37:09 +00:00
Maxime Henrion
4e039937d9 Add a KERNELDUMPMAGIC_CLEARED macro to unbreak savecore. Since
it is a "magic" value, what it expands to is not really important.
I set it to "Cleared Kernel Dump", but that can be changed later
if someone thinks it's not good enough.

Pointy hat to:	fenner
2002-05-05 13:47:21 +00:00
Marcel Moolenaar
e80835fe0e o Add struct mca_guid
o  Add currently known GUIDs
o  Slight restyling
2002-05-05 08:26:25 +00:00
Marcel Moolenaar
33264d92ba o Include md_var.h
o  Remove definition of struct ia64_fdesc
o  Remove prototype of os_boot_rendez
o  Use the FDESC_FUNC and FDESC_GP abstractions
2002-05-05 08:18:42 +00:00
Marcel Moolenaar
fd4a02c900 Remove definition of struct ia64_fdesc. It's been moved to md_var.h 2002-05-05 08:16:10 +00:00
Marcel Moolenaar
8cc99b71a9 o Move definition of struct ia64_fdesc here to remove duplication.
o  Add prototype of os_boot_rendez.
2002-05-05 08:14:32 +00:00
Alan Cox
15fdd586e3 o Remove GIANT_REQUIRED from vm_map_lookup() and vm_map_lookup_done().
o Acquire and release Giant around vm_map_lookup()'s call
   to vm_object_shadow().
2002-05-05 05:36:28 +00:00
Bruce Evans
f5216b9a19 Return the correct error code (ENOSYS, not EINVAL) from nosys(). Getting
killed by SIGSYS for unimlemented syscalls is bad enough.

Obtained from:	Lite2 branch

The Lite2 branch has some other interesting unmerged (?) bits in this
file.  They are well hidden among cosmetic regressions.
2002-05-05 04:50:47 +00:00
Bruce Evans
a9a0f15a69 Fixed breakage of binary compatibility of the kern.clockrate sysctl in
sys/time.h rev.1.53, etc.  Zero out the entire struct clkinfo and not
just the new spare part of it so that there is no possibility of leaking
kernel stack context to userland.
2002-05-05 04:33:09 +00:00
Bruce Evans
f318190a01 Fixed checking for VM86 mode in doreti which I broke in rev.1.30. Only
the case of VM86 calls from the kernel was broken, so this bug was not
a security hole.

PR:		36710
Submitted by:	David Xu <davidx@viasoft.com.cn> (version for RELENG_4)
MFC after:	3 days
2002-05-05 03:19:48 +00:00
Jeff Roberson
c7173f58fa Use pages instead of uz_maxpages, which has not been initialized yet, when
creating the vm_object.  This was broken after the code was rearranged to
grab giant itself.

Spotted by:     alc
2002-05-04 21:49:29 +00:00
Alan Cox
79660d837c o Make _vm_object_allocate() and vm_object_allocate() callable
without holding Giant.
 o Begin documenting the trivial cases of the locking protocol
   on vm_object.
2002-05-04 20:23:48 +00:00
David E. O'Brien
856f29cf94 Use -ffreestanding for kernel bits unconditionally. 2002-05-04 20:07:33 +00:00
Maxime Henrion
afd458b0fa Fix a typo.
Submitted by:	dwmalone
2002-05-04 19:50:09 +00:00
Poul-Henning Kamp
60a084052b Shake unused stuff out of the flags in struct buf->b_flags. 2002-05-04 19:40:34 +00:00
Poul-Henning Kamp
e31c615c60 Remove a six year old undocumented #ifdef : NO_B_MALLOC. 2002-05-04 19:24:55 +00:00
Poul-Henning Kamp
2a5bcfdef6 The struct buf->b_act was not used anywere. 2002-05-04 19:06:32 +00:00
Bill Fenner
7bf744074d Restore the ability interrupt dumps on i386, based on
the old kern_shutdown.c .  Other archs might be able to
use similar code but I don't have anything to test on.
2002-05-04 17:45:48 +00:00
Matthew Dillon
9f9435545b Remove obsolete code (that was already #if 0'd out).
Requested by: Hiten Pandya <hitmaster2k@yahoo.com>
2002-05-04 17:10:15 +00:00
Maxime Henrion
614be65181 When a program launched on the local console exits, the shell will
call read() to get the next command, and scread() disables the
screensaver.  We don't want this behaviour in the sc_saver_keybonly
case.

Submitted by:	Olivier Houchard <doginou@ci0.org>
2002-05-04 15:42:38 +00:00
Doug Rabson
9e861cfaa4 Use region 7 addresses for the slabs in the PV and PT zones so that we
don't confuse the zone allocater by translating region 5 addresses to
region 7 addresses (which is unavoidable for PTEs).
2002-05-04 12:21:32 +00:00
Poul-Henning Kamp
d9fc2b816e Do not call nge_tick() if we get an PHY interrupt, nge_tick() calls
mii_tick() which should only be called once per second.

Our current MII/PHY state-engine is not able to deal with PHY
interrupts as far as I can tell, and most net drivers don't seem
to use the link/status change call-back mechanism.  It seems that
MII/PHY was orphaned before it grew up.
2002-05-04 11:15:33 +00:00
Poul-Henning Kamp
37c0fba7c4 Increase gigE negotiation timeout to 17 seconds.
10 seconds is not enough to negotiate a gigE link with a cisco switch which
holds carrier off for several seconds between tries.
2002-05-04 11:08:49 +00:00
Poul-Henning Kamp
fd94424c78 Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't really
do anything at the end of the day except bloat the drivers which has
copy&pasted it.
2002-05-04 11:00:30 +00:00
Marcel Moolenaar
9a1bf46934 Make sure we don't index the pm_rid array out of bounds in
pmap_ensure_rid(). This can happen because the function is
called for both user and kernel addresses, while the rid array
only has room for user addresses. This bug got exposed by rev
1.58 of ia64/ia64/pmap.c and rev 1.8 of ia64/include/pmap.h.
2002-05-04 08:04:28 +00:00
Alfred Perlstein
698f85d3e3 style(9): 'if' and 'while' need a space after them. 2002-05-04 07:40:49 +00:00
Jeff Roberson
5df148630f Include systm.h so panic(9) is defined when doing DEBUG_ALL_VFS_LOCKS. 2002-05-04 02:40:37 +00:00
Jeff Roberson
441271159e Include systm.h for panic(9) so that DEBUG_ALL_VFS_LOCKS compiles. 2002-05-04 02:37:00 +00:00
Jeff Roberson
ef317162da include systm.h in vnode_if.c so that panic is defined when we're doing
DEBUG_ALL_VFS_LOCKS.
2002-05-04 02:35:13 +00:00
Alan Cox
8c5c5d049f o Remove GIANT_REQUIRED from vm_map_lookup_entry() and
vm_map_check_protection().
 o Call vm_map_check_protection() without Giant held in munmap().
2002-05-04 02:07:36 +00:00
Poul-Henning Kamp
1ed91802ee HPFS picks up the vop_stdgetpages and vop_stdputpages member functions
via the default entry and the default vop vector.
2002-05-03 18:23:29 +00:00
Juli Mallett
ea0b7a7699 Typo fix: detects -> detect.
Reviewed by:	phk
2002-05-03 17:59:25 +00:00
Poul-Henning Kamp
9589c2561c Fix a memory-leak when configuring a vnode backed md(4) device fails.
Submitted by:	Martin Faxér <gmh003532@brfmasthugget.se>
MFC after:	4 weeks
2002-05-03 17:55:10 +00:00
Dag-Erling Smørgrav
d95ec55335 s/pfs_badop/vop_eopnotsupp/
Submitted by:	phk
2002-05-03 14:58:25 +00:00
Poul-Henning Kamp
48e5da550a Initialize time_second to 1 instead of zero to pacify slightly bogus arp code.
Various minor style fixes from BDE.
2002-05-03 08:46:03 +00:00
Poul-Henning Kamp
9ebe64ca1b Don't grab the lock until somewhat later in attach to avoid a lock
reversal.
2002-05-03 08:44:53 +00:00
Poul-Henning Kamp
afe564a200 Name ufs_vop_[gs]etextattr() consistently with the rest of our VOPs and
put then in the ufs_vnops where they belong, rather than in the ffs_vnops.

Ok'ed by:	rwatson
Sponsored by:	DARPA & NAI Labs.
2002-05-03 08:40:33 +00:00
Seigo Tanimura
6041fa0a60 As malloc(9) and free(9) are now Giant-free, remove the Giant lock
across malloc(9) and free(9) of a pgrp or a session.
2002-05-03 07:46:59 +00:00
Seigo Tanimura
5cbc7077cb The first argument of pgsigio() is now struct sigio **. 2002-05-03 07:45:26 +00:00
Seigo Tanimura
c8d8a686e4 Fix the lock order reversal between the sigio lock and a process/pgrp lock in
funsetownlst() by locking the sigio lock across funsetownlst().
2002-05-03 05:32:25 +00:00
Marcel Moolenaar
cb5e1f4f73 Adjust KINFO_PROC_SIZE due to segsz_t being changed from a 32-bit to
a 64-bit integral.
2002-05-03 01:41:37 +00:00
Scott Long
39ee03c316 bzero out the sync command buffer when sending commands. This was causing
problems when enumerating multiple arrays.

This is an MFC candidate.
2002-05-03 00:07:50 +00:00
Josef Karthauser
38c162edb3 MFNetBSD:
revision 1.94
    date: 2001/12/30 20:26:59;  author: augustss;  state: Exp;  lines: +5 -2
    Make sure we don't have any pending softintrs when entering polling mode.
    Thanks to Darrin for finding and fixing this problem when using USB
    keyboards in DDB.
2002-05-02 22:47:37 +00:00
Peter Wemm
85f79d52e9 Retire makeobjops.pl - replaced by ../tools/makeobjops.awk. 2002-05-02 22:21:59 +00:00
Prafulla Deuskar
29c4c8ed2b Make em driver compilable on IA64/alpha.
Submitted by:	peter
MFC after:	3 days
2002-05-02 22:21:01 +00:00
Peter Wemm
7bdbf808c3 Retire makeLINT.pl 2002-05-02 22:20:40 +00:00
Peter Wemm
59d72e9d82 Makefile uses genwakecode.sh now. 2002-05-02 22:17:35 +00:00
Alfred Perlstein
90535973d5 Cleanup, quote:
This leaves some vestiges of the old locking, including style
  bugs in it.  I've only noticed anachronisms in socketvar.h so far
  (I've merged net* but not kern or all of sys).  The patch also
  has old fixes for style bugs in accf stuff and namespace pollution
  in uma...  The largest style bugs are line continued backslashes
  in column 80 and (these are fixed), and starting the do-while
  code for the new macros in column 40, which is quite unlike the
  usual indentation (see sys/queue.h) and not even like the indentation
  for the old macros (column 32) (this is not fixed).

Submitted by: bde
2002-05-02 22:03:19 +00:00
Poul-Henning Kamp
0b5d880d39 As promised make the hack for sizeof(struct disklabel) on alpha annoying.
Run make world (or recompile whatever program whines) to get rid of warning.

Compat bits will be removed entirely in about two weeks.
2002-05-02 21:53:39 +00:00