Commit Graph

70622 Commits

Author SHA1 Message Date
dd
d78decac59 Introduce a version field to `struct xucred' in place of one of the
spares (the size of the field was changed from u_short to u_int to
reflect what it really ends up being).  Accordingly, change users of
xucred to set and check this field as appropriate.  In the kernel,
this is being done inside the new cru2x() routine which takes a
`struct ucred' and fills out a `struct xucred' according to the
former.  This also has the pleasant sideaffect of removing some
duplicate code.

Reviewed by:	rwatson
2002-02-27 04:45:37 +00:00
alfred
3c704a3a20 clarify panic message 2002-02-27 04:27:36 +00:00
alfred
f8d7991dc9 Fix warnings caused by discarding const.
Hairy Eyeball At: peter
2002-02-27 02:44:45 +00:00
julian
d2a46a6a46 Remove errors in LINT (now that they are fatal) 2002-02-27 02:21:43 +00:00
peter
db074157e3 Jake further reduced IPI shootdowns on sparc64 in loops by using ranged
shootdowns in a couple of key places.  Do the same for i386.  This also
hides some physical addresses from higher levels and has it use the
generic vm_page_t's instead.  This will help for PAE down the road.

Obtained from:	jake (MI code, suggestions for MD part)
2002-02-27 02:14:58 +00:00
danny
3c98fd8be7 Remove problematic PHY_WRITE so that autoneg to 10 Mbps
actually works.

Submitted by: Dennis <TD790@aol.com>
Reviewed by:	Bill Paul <wpaul@freebsd.org>
MFC after:	7 days
2002-02-27 02:11:34 +00:00
alfred
2866deed0e remove trailing semi-colons from macro definitions. 2002-02-27 02:02:13 +00:00
dillon
aead36ff73 didn't quite undo the last reversion. This gets it. 2002-02-27 01:48:17 +00:00
jake
a05f8dd485 Minor cleanup. 2002-02-27 00:31:31 +00:00
jake
7866fe9e09 Wrap long lines. 2002-02-27 00:28:35 +00:00
jake
d106442758 Use pcpu.pc_cpumask instead of computing 1 << cpuid. 2002-02-27 00:27:05 +00:00
jake
55cf141700 Add a macro for shift of an integer (1 << shift == sizeof). Move the pointer
define to live alongside it.  For kicks assert at compile time that they are
correct.  Use these instead of magic numbers.
2002-02-27 00:21:04 +00:00
jake
0cad28641b Wrap long lines. 2002-02-27 00:03:01 +00:00
julian
306d35ab8e remove "discards qualifier" erro by not potentially writing to
a const *.
2002-02-26 23:38:34 +00:00
obrien
a6e36e611b Define basic macros required by GDB. 2002-02-26 21:49:46 +00:00
alfred
5c1b147b58 use _GENERIC_DIRSIZ(dp) to avoid copying too much of the dirent over
the user supplied buffer.  this can be a problem when the user doesn't
supply a full dirent and we corrupt their memory.
2002-02-26 21:39:32 +00:00
dillon
77e68828ba revert compatibility fix temporarily (thought it would not break anything
leaving it in).
2002-02-26 20:34:52 +00:00
dillon
40bd08ec32 revert last commit temporarily due to whining on the lists. 2002-02-26 20:33:41 +00:00
brooks
f7246a0853 Fix warnings in the gif(4) driver so it compiles with -Werror. 2002-02-26 20:11:33 +00:00
brooks
53fe802832 Set ifp->if_name to "awi" instead of device_get_name(dev) to avoid
casting away a const qualifier so the awi driver compiles.
2002-02-26 20:09:19 +00:00
mike
75ac649d38 Rather than include namespace pollution in <grp.h> in order to declare
`gid_t', use the canonical protection scheme to define a type in two or
more headers.  This brings <grp.h> closer to POSIX.1-2001 conformance.
2002-02-26 19:43:03 +00:00
brooks
2c05f43ce8 Staticize an extern that no one else used. 2002-02-26 18:24:00 +00:00
dillon
eb6c26cc24 Make peter's commit compatible with interrupt-enabled critical_enter()
and exit(), which has already solved the problem in regards to deadlocked
IPI's.
2002-02-26 18:08:54 +00:00
brooks
8082866c05 Add a missing field to the end of array marker in the pci_ids array.
Submitted by:	sumikawa
2002-02-26 17:35:21 +00:00
dillon
4ee816815c Did someone turn on -Werror or something?
Fix kernel breakage.
2002-02-26 17:11:37 +00:00
jake
a432194f4d Apparently gcc3.1 is now using deprcated v8 instructions in v9 code
due to them being faster in certain cases.  Therefore we need to save
and restore the v8 %y register around traps in kernel mode as well as
traps in usermode.

Tested by:	obrien, tmm
2002-02-26 17:09:24 +00:00
dillon
407cb1012e STAGE-1 of 3 commit - allow (but do not require) interrupts to remain
enabled in critical sections and streamline critical_enter() and
critical_exit().

This commit allows an architecture to leave interrupts enabled inside
critical sections if it so wishes.  Architectures that do not wish to do
this are not effected by this change.

This commit implements the feature for the I386 architecture and provides
a sysctl, debug.critical_mode, which defaults to 1 (use the feature).  For
now you can turn the sysctl on and off at any time in order to test the
architectural changes or track down bugs.

This commit is just the first stage.  Some areas of the code, specifically
the MACHINE_CRITICAL_ENTER #ifdef'd code, is strictly temporary and will
be cleaned up in the STAGE-2 commit when the critical_*() functions are
moved entirely into MD files.

The following changes have been made:

	* critical_enter() and critical_exit() for I386 now simply increment
	  and decrement curthread->td_critnest.  They no longer disable
	  hard interrupts.  When critical_exit() decrements the counter to
	  0 it effectively calls a routine to deal with whatever interrupts
	  were deferred during the time the code was operating in a critical
	  section.

	  Other architectures are unaffected.

	* fork_exit() has been conditionalized to remove MD assumptions for
	  the new code.  Old code will still use the old MD assumptions
	  in regards to hard interrupt disablement.  In STAGE-2 this will
	  be turned into a subroutine call into MD code rather then hardcoded
	  in MI code.

	  The new code places the burden of entering the critical section
	  in the trampoline code where it belongs.

	* I386: interrupts are now enabled while we are in a critical section.
	  The interrupt vector code has been adjusted to deal with the fact.
	  If it detects that we are in a critical section it currently defers
	  the interrupt by adding the appropriate bit to an interrupt mask.

	* In order to accomplish the deferral, icu_lock is required.  This
	  is i386-specific.  Thus icu_lock can only be obtained by mainline
	  i386 code while interrupts are hard disabled.  This change has been
	  made.

	* Because interrupts may or may not be hard disabled during a
	  context switch, cpu_switch() can no longer simply assume that
	  PSL_I will be in a consistent state.  Therefore, it now saves and
	  restores eflags.

	* FAST INTERRUPT PROVISION.  Fast interrupts are currently deferred.
	  The intention is to eventually allow them to operate either while
	  we are in a critical section or, if we are able to restrict the
	  use of sched_lock, while we are not holding the sched_lock.

	* ICU and APIC vector assembly for I386 cleaned up.  The ICU code
	  has been cleaned up to match the APIC code in regards to format
	  and macro availability.  Additionally, the code has been adjusted
	  to deal with deferred interrupts.

	* Deferred interrupts use a per-cpu boolean int_pending, and
	  masks ipending, spending, and fpending.  Being per-cpu variables
	  it is not currently necessary to lock; bus cycles modifying them.

	  Note that the same mechanism will enable preemption to be
	  incorporated as a true software interrupt without having to
	  further hack up the critical nesting code.

	* Note: the old critical_enter() code in kern/kern_switch.c is
	  currently #ifdef to be compatible with both the old and new
	  methodology.  In STAGE-2 it will be moved entirely to MD code.

Performance issues:

	One of the purposes of this commit is to enhance critical section
	performance, specifically to greatly reduce bus overhead to allow
	the critical section code to be used to protect per-cpu caches.
	These caches, such as Jeff's slab allocator work, can potentially
	operate very quickly making the effective savings of the new
	critical section code's performance very significant.

	The second purpose of this commit is to allow architectures to
	enable certain interrupts while in a critical section.  Specifically,
	the intention is to eventually allow certain FAST interrupts to
	operate rather then defer.

	The third purpose of this commit is to begin to clean up the
	critical_enter()/critical_exit()/cpu_critical_enter()/
	cpu_critical_exit() API which currently has serious cross pollution
	in MI code (in fork_exit() and ast() for example).

	The fourth purpose of this commit is to provide a framework that
	allows kernel-preempting software interrupts to be implemented
	cleanly.  This is currently used for two forward interrupts in I386.
	Other architectures will have the choice of using this infrastructure
	or building the functionality directly into critical_enter()/
	critical_exit().

	Finally, this commit is designed to greatly improve the flexibility
	of various architectures to manage critical section handling,
	software interrupts, preemption, and other highly integrated
	architecture-specific details.
2002-02-26 17:06:21 +00:00
bde
c87bf09c56 Initialize a variable bogusly to avoid a gcc bug that causes a spurious
warning.
2002-02-26 17:04:29 +00:00
ume
0a1dde7902 off by one error in Aaron Gifford's code. KAME PR 393.
PR:		kern/34242
Submitted by:	Aaron D. Gifford <agifford@infowest.com>
MFC after:	1 week
2002-02-26 16:58:58 +00:00
bde
a9426fd434 Fixed 3 regressions in rev.1.99 (clobbering of the English fix in rev.1.98,
and 2 unformattings).
2002-02-26 16:17:45 +00:00
murray
a63405fc34 Add some ifdef(RELEASE_CRUNCH) goo to explicitly list the requisite
object files for crunchgen.  Without this patch, release.4 will fail
to build the crunched binaries for the release floppies.
2002-02-26 15:12:54 +00:00
gioria
32eee4f3cf MFen 2002-02-26 14:23:44 +00:00
sos
7db2708a45 When asked to print bytes (-b option) do that and put 16 on a line. 2002-02-26 10:40:42 +00:00
sos
0ee88c0f9f Hide "bla bla exists, skipping it" behind bootverbose. 2002-02-26 10:38:33 +00:00
robert
41d53f2430 Avoid a null-pointer dereference which occurred when emulating DOS
interrupt 0x10 function 0x00 without dpy int tty.c being set.

PR:		35147
Submitted by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
2002-02-26 10:22:25 +00:00
robert
722e6c0882 - Emulate instructions prefixed with 'rep' correctly: set the CX
register to zero.

Submitted by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
PR:		35147
2002-02-26 10:13:35 +00:00
robert
44da26eeab - Fix indentation and return statements to conform to style(9).
- Use the __FBSDID macro.
 - Fix some warnings.

Submitted by:	obrien (partly)
2002-02-26 10:05:20 +00:00
joe
6721b394e0 Revert part of the last commit. A couple of defines were removed
by NetBSD because they don't use them (they've no usbd), but we do.
2002-02-26 10:00:32 +00:00
benno
963a0a3c10 Add makeoptions NO_WERROR=true so that we can build. =) 2002-02-26 09:55:17 +00:00
phk
8823bf89fc Cast the variable, not the constant to 64 bits. 2002-02-26 09:27:39 +00:00
phk
9576413007 Fix warning in !SMP case.
Submitted by:	 Maxime Henrion <mux@mu.org>
2002-02-26 09:21:52 +00:00
phk
43fec1fd83 Remove unused variable. 2002-02-26 09:16:27 +00:00
mike
97972ad77b Hide GCCisms in the non-GCC case. 2002-02-26 07:44:03 +00:00
jake
9e60d2c0a5 Convert pmap.pm_context to an array of contexts indexed by cpuid. This
doesn't make sense for SMP right now, but it is a means to an end.
2002-02-26 06:57:30 +00:00
bmah
fba5d81386 Sync with sparc64 devices in dev-sparc64.sgml rev. 1.1. 2002-02-26 06:43:59 +00:00
jake
4d6d0507de Pu back a call to pmap_context_destroy which was accidentily removed
in the previous commit.

Spotted by:	tmm
2002-02-26 06:39:38 +00:00
bmah
79c90ea020 Fix some minor spelling and grammatical problems, make one markup fix. 2002-02-26 06:29:08 +00:00
ambrisko
efc085f329 In ad-hoc mode, the "associate" bit is valid to check to see if it is
part of an ad-hoc network.  This means another station needs to be
around so they can both associate.

MFC after:	1 week
2002-02-26 05:43:05 +00:00
imp
d794cb28e5 Until I can figure out how to live without the volatile qualifier on
comdefaultrate, comment out the support for machdep.conspeed for now.
2002-02-26 03:46:14 +00:00
imp
33739817ed Remove an unused variable. 2002-02-26 03:37:35 +00:00