Commit Graph

70606 Commits

Author SHA1 Message Date
dillon
95be92ead0 revert compatibility fix temporarily (thought it would not break anything
leaving it in).
2002-02-26 20:34:52 +00:00
dillon
996781f17a revert last commit temporarily due to whining on the lists. 2002-02-26 20:33:41 +00:00
brooks
1187176183 Fix warnings in the gif(4) driver so it compiles with -Werror. 2002-02-26 20:11:33 +00:00
brooks
a2dc9de4b4 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
d20627ce9b 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
b1c3d8a603 Staticize an extern that no one else used. 2002-02-26 18:24:00 +00:00
dillon
5052e3a1dc 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
8bf18cd564 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
a9d43ec4d7 Did someone turn on -Werror or something?
Fix kernel breakage.
2002-02-26 17:11:37 +00:00
jake
52438c9de8 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
57b097e18c 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
1db1715215 Initialize a variable bogusly to avoid a gcc bug that causes a spurious
warning.
2002-02-26 17:04:29 +00:00
ume
f7cd13562c 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
4446cd5261 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
4de8d802ca 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
cabde5c437 MFen 2002-02-26 14:23:44 +00:00
sos
673b8cea9c When asked to print bytes (-b option) do that and put 16 on a line. 2002-02-26 10:40:42 +00:00
sos
d4b125fae2 Hide "bla bla exists, skipping it" behind bootverbose. 2002-02-26 10:38:33 +00:00
robert
6ec282a1de 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
a3d5207088 - 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
01103f4256 - 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
17b9c41c9c 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
5cad5d55f8 Add makeoptions NO_WERROR=true so that we can build. =) 2002-02-26 09:55:17 +00:00
phk
d758d06485 Cast the variable, not the constant to 64 bits. 2002-02-26 09:27:39 +00:00
phk
944071fc6d Fix warning in !SMP case.
Submitted by:	 Maxime Henrion <mux@mu.org>
2002-02-26 09:21:52 +00:00
phk
7dd928f3d0 Remove unused variable. 2002-02-26 09:16:27 +00:00
mike
5dfc7bcc86 Hide GCCisms in the non-GCC case. 2002-02-26 07:44:03 +00:00
jake
8319be1fd2 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
3529974882 Sync with sparc64 devices in dev-sparc64.sgml rev. 1.1. 2002-02-26 06:43:59 +00:00
jake
865ab80de2 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
7fc344c3a9 Fix some minor spelling and grammatical problems, make one markup fix. 2002-02-26 06:29:08 +00:00
ambrisko
acdfe59f3d 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
698bf093a6 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
492a827587 Remove an unused variable. 2002-02-26 03:37:35 +00:00
imp
36dfb69bea Fix warnings introduced in the PCI_ALLOW_UNSUPPORTED_IO_RANGE case. 2002-02-26 03:31:35 +00:00
imp
ddfe22a475 If we're going to ifdef out the only reference to asr_drvinit, then
go ahead and ifdef out the function too.
2002-02-26 03:22:44 +00:00
imp
b7821a97ea Add an experimental tunable: machdep.conspeed.
# I'm not sure where to document this.
2002-02-26 03:13:30 +00:00
imp
d9c0f8d090 minor style(9) fix: return (foo); The file was mostly style(9) before. 2002-02-26 03:00:19 +00:00
jake
84d0ef9268 Allow the user tsb to span multiple pages. Make the default 2 pages for now
until we do some testing to see what's best.  This gives a massive reduction
in system time for processes with a relatively large working set.  The size
of the tsb directly affects the rss size that a user process can keep mapped.
When it starts to get full replacements occur and the process takes a lot of
soft vm faults.  Increasing the default from 1 page to 2 gives the following
before and after numbers for compiling vfs_bio.c:

before:
       14.27 real         6.56 user         5.69 sys
after:
        8.57 real         6.11 user         1.62 sys

This should make self hosted builds more tolerable.
2002-02-26 02:37:43 +00:00
cjc
aea627e849 After getting IANA to fix a typo in their port assignments, add
some new IANA-blessed services and close some PRs. Ports for
Jabber and PostgreSQL.

PR:		conf/35219, conf/35220
Submitted by:	Sean Chittenden <sean@chittenden.org>
MFC after:	1 day
2002-02-26 02:36:49 +00:00
brooks
15d7d34bd9 When using hardware decoding, reconstruct the wire form of the ethernet
header and push it up any attached bpf devices on the parent interface.
This makes hardware vlan decoding more like the normal software path.

Tested by:	cjtt@employees.org
MFC after:	2 weeks
2002-02-26 02:19:33 +00:00
jedgar
ecdaec0ea7 Enforce inbound IPsec SPD
Reviewed by:	fenner
2002-02-26 02:11:13 +00:00
brooks
3cea5d4273 Make gif(4) nesting level and parallel tunnel support tunable at runtime
via sysctl's.  The old #defines, MAX_GIF_NEST and XBONEHACK are
currently supported for backwards compatability, but will probably be
removed at some point in the future.
2002-02-26 01:56:56 +00:00
alfred
bdb9bb2d04 in ulpt_reset() req.bmRequestType was unitialized, fix it. 2002-02-26 01:19:56 +00:00
joe
1f5739bd13 Merge from NetBSD:
usb.h (rev 1.61):

    date: 2002/01/01 14:23:37;  author: augustss;
    Add a missing subclass definition.

usb.h (rev 1.63) and usb_port.h (rev 1.52):

    date: 2002/02/25 00:46:37;  author: augustss;
    Some portability improvement.
    Add define for usb.h version.
2002-02-26 01:15:08 +00:00
peter
3f12466c8d Fix a warning by pulling prototype for arp_ifinit() into scope.
Then fix cast the correct value into an incorrect value, which was not
detected due to the missing prototype (but was harmless anyway).
2002-02-26 01:11:08 +00:00
peter
4a41840718 Fix warning; amdsmb_abort() is not used. 2002-02-26 01:04:58 +00:00
peter
b7d611f95e Fix warning. s/microuptime()/binuptime()/ for switchtime initial value. 2002-02-26 01:03:39 +00:00
peter
4771e77e38 Remove unused variable (td) 2002-02-26 01:01:37 +00:00
peter
c3e9a433a0 Fix a warning. useracc() should take a const pointer argument. 2002-02-26 01:00:39 +00:00