]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 years agoSet ifp->if_name to "awi" instead of device_get_name(dev) to avoid
Brooks Davis [Tue, 26 Feb 2002 20:09:19 +0000 (20:09 +0000)]
Set ifp->if_name to "awi" instead of device_get_name(dev) to avoid
casting away a const qualifier so the awi driver compiles.

22 years agoRather than include namespace pollution in <grp.h> in order to declare
Mike Barcroft [Tue, 26 Feb 2002 19:43:03 +0000 (19:43 +0000)]
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.

22 years agoStaticize an extern that no one else used.
Brooks Davis [Tue, 26 Feb 2002 18:24:00 +0000 (18:24 +0000)]
Staticize an extern that no one else used.

22 years agoMake peter's commit compatible with interrupt-enabled critical_enter()
Matthew Dillon [Tue, 26 Feb 2002 18:08:54 +0000 (18:08 +0000)]
Make peter's commit compatible with interrupt-enabled critical_enter()
and exit(), which has already solved the problem in regards to deadlocked
IPI's.

22 years agoAdd a missing field to the end of array marker in the pci_ids array.
Brooks Davis [Tue, 26 Feb 2002 17:35:21 +0000 (17:35 +0000)]
Add a missing field to the end of array marker in the pci_ids array.

Submitted by: sumikawa

22 years agoDid someone turn on -Werror or something?
Matthew Dillon [Tue, 26 Feb 2002 17:11:37 +0000 (17:11 +0000)]
Did someone turn on -Werror or something?

Fix kernel breakage.

22 years agoApparently gcc3.1 is now using deprcated v8 instructions in v9 code
Jake Burkholder [Tue, 26 Feb 2002 17:09:24 +0000 (17:09 +0000)]
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

22 years agoSTAGE-1 of 3 commit - allow (but do not require) interrupts to remain
Matthew Dillon [Tue, 26 Feb 2002 17:06:21 +0000 (17:06 +0000)]
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.

22 years agoInitialize a variable bogusly to avoid a gcc bug that causes a spurious
Bruce Evans [Tue, 26 Feb 2002 17:04:29 +0000 (17:04 +0000)]
Initialize a variable bogusly to avoid a gcc bug that causes a spurious
warning.

22 years agooff by one error in Aaron Gifford's code. KAME PR 393.
Hajimu UMEMOTO [Tue, 26 Feb 2002 16:58:58 +0000 (16:58 +0000)]
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

22 years agoFixed 3 regressions in rev.1.99 (clobbering of the English fix in rev.1.98,
Bruce Evans [Tue, 26 Feb 2002 16:17:45 +0000 (16:17 +0000)]
Fixed 3 regressions in rev.1.99 (clobbering of the English fix in rev.1.98,
and 2 unformattings).

22 years agoAdd some ifdef(RELEASE_CRUNCH) goo to explicitly list the requisite
Murray Stokely [Tue, 26 Feb 2002 15:12:54 +0000 (15:12 +0000)]
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.

22 years agoMFen
Sebastien Gioria [Tue, 26 Feb 2002 14:23:44 +0000 (14:23 +0000)]
MFen

22 years agoWhen asked to print bytes (-b option) do that and put 16 on a line.
Søren Schmidt [Tue, 26 Feb 2002 10:40:42 +0000 (10:40 +0000)]
When asked to print bytes (-b option) do that and put 16 on a line.

22 years agoHide "bla bla exists, skipping it" behind bootverbose.
Søren Schmidt [Tue, 26 Feb 2002 10:38:33 +0000 (10:38 +0000)]
Hide "bla bla exists, skipping it" behind bootverbose.

22 years agoAvoid a null-pointer dereference which occurred when emulating DOS
Robert Drehmel [Tue, 26 Feb 2002 10:22:25 +0000 (10:22 +0000)]
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>

22 years ago - Emulate instructions prefixed with 'rep' correctly: set the CX
Robert Drehmel [Tue, 26 Feb 2002 10:13:35 +0000 (10:13 +0000)]
 - Emulate instructions prefixed with 'rep' correctly: set the CX
   register to zero.

Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
PR: 35147

22 years ago - Fix indentation and return statements to conform to style(9).
Robert Drehmel [Tue, 26 Feb 2002 10:05:20 +0000 (10:05 +0000)]
 - Fix indentation and return statements to conform to style(9).
 - Use the __FBSDID macro.
 - Fix some warnings.

Submitted by: obrien (partly)

22 years agoRevert part of the last commit. A couple of defines were removed
Josef Karthauser [Tue, 26 Feb 2002 10:00:32 +0000 (10:00 +0000)]
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.

22 years agoAdd makeoptions NO_WERROR=true so that we can build. =)
Benno Rice [Tue, 26 Feb 2002 09:55:17 +0000 (09:55 +0000)]
Add makeoptions NO_WERROR=true so that we can build. =)

22 years agoCast the variable, not the constant to 64 bits.
Poul-Henning Kamp [Tue, 26 Feb 2002 09:27:39 +0000 (09:27 +0000)]
Cast the variable, not the constant to 64 bits.

22 years agoFix warning in !SMP case.
Poul-Henning Kamp [Tue, 26 Feb 2002 09:21:52 +0000 (09:21 +0000)]
Fix warning in !SMP case.

Submitted by:  Maxime Henrion <mux@mu.org>

22 years agoRemove unused variable.
Poul-Henning Kamp [Tue, 26 Feb 2002 09:16:27 +0000 (09:16 +0000)]
Remove unused variable.

22 years agoHide GCCisms in the non-GCC case.
Mike Barcroft [Tue, 26 Feb 2002 07:44:03 +0000 (07:44 +0000)]
Hide GCCisms in the non-GCC case.

22 years agoConvert pmap.pm_context to an array of contexts indexed by cpuid. This
Jake Burkholder [Tue, 26 Feb 2002 06:57:30 +0000 (06:57 +0000)]
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.

22 years agoSync with sparc64 devices in dev-sparc64.sgml rev. 1.1.
Bruce A. Mah [Tue, 26 Feb 2002 06:43:59 +0000 (06:43 +0000)]
Sync with sparc64 devices in dev-sparc64.sgml rev. 1.1.

22 years agoPu back a call to pmap_context_destroy which was accidentily removed
Jake Burkholder [Tue, 26 Feb 2002 06:39:38 +0000 (06:39 +0000)]
Pu back a call to pmap_context_destroy which was accidentily removed
in the previous commit.

Spotted by: tmm

22 years agoFix some minor spelling and grammatical problems, make one markup fix.
Bruce A. Mah [Tue, 26 Feb 2002 06:29:08 +0000 (06:29 +0000)]
Fix some minor spelling and grammatical problems, make one markup fix.

22 years agoIn ad-hoc mode, the "associate" bit is valid to check to see if it is
Doug Ambrisko [Tue, 26 Feb 2002 05:43:05 +0000 (05:43 +0000)]
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

22 years agoUntil I can figure out how to live without the volatile qualifier on
Warner Losh [Tue, 26 Feb 2002 03:46:14 +0000 (03:46 +0000)]
Until I can figure out how to live without the volatile qualifier on
comdefaultrate, comment out the support for machdep.conspeed for now.

22 years agoRemove an unused variable.
Warner Losh [Tue, 26 Feb 2002 03:37:35 +0000 (03:37 +0000)]
Remove an unused variable.

22 years agoFix warnings introduced in the PCI_ALLOW_UNSUPPORTED_IO_RANGE case.
Warner Losh [Tue, 26 Feb 2002 03:31:35 +0000 (03:31 +0000)]
Fix warnings introduced in the PCI_ALLOW_UNSUPPORTED_IO_RANGE case.

22 years agoIf we're going to ifdef out the only reference to asr_drvinit, then
Warner Losh [Tue, 26 Feb 2002 03:22:44 +0000 (03:22 +0000)]
If we're going to ifdef out the only reference to asr_drvinit, then
go ahead and ifdef out the function too.

22 years agoAdd an experimental tunable: machdep.conspeed.
Warner Losh [Tue, 26 Feb 2002 03:13:30 +0000 (03:13 +0000)]
Add an experimental tunable: machdep.conspeed.

# I'm not sure where to document this.

22 years agominor style(9) fix: return (foo); The file was mostly style(9) before.
Warner Losh [Tue, 26 Feb 2002 03:00:19 +0000 (03:00 +0000)]
minor style(9) fix: return (foo);  The file was mostly style(9) before.

22 years agoAllow the user tsb to span multiple pages. Make the default 2 pages for now
Jake Burkholder [Tue, 26 Feb 2002 02:37:43 +0000 (02:37 +0000)]
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.

22 years agoAfter getting IANA to fix a typo in their port assignments, add
Crist J. Clark [Tue, 26 Feb 2002 02:36:49 +0000 (02:36 +0000)]
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

22 years agoWhen using hardware decoding, reconstruct the wire form of the ethernet
Brooks Davis [Tue, 26 Feb 2002 02:19:33 +0000 (02:19 +0000)]
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

22 years agoEnforce inbound IPsec SPD
Chris D. Faulhaber [Tue, 26 Feb 2002 02:11:13 +0000 (02:11 +0000)]
Enforce inbound IPsec SPD

Reviewed by: fenner

22 years agoMake gif(4) nesting level and parallel tunnel support tunable at runtime
Brooks Davis [Tue, 26 Feb 2002 01:56:56 +0000 (01:56 +0000)]
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.

22 years agoin ulpt_reset() req.bmRequestType was unitialized, fix it.
Alfred Perlstein [Tue, 26 Feb 2002 01:19:56 +0000 (01:19 +0000)]
in ulpt_reset() req.bmRequestType was unitialized, fix it.

22 years agoMerge from NetBSD:
Josef Karthauser [Tue, 26 Feb 2002 01:15:08 +0000 (01:15 +0000)]
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.

22 years agoFix a warning by pulling prototype for arp_ifinit() into scope.
Peter Wemm [Tue, 26 Feb 2002 01:11:08 +0000 (01:11 +0000)]
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).

22 years agoFix warning; amdsmb_abort() is not used.
Peter Wemm [Tue, 26 Feb 2002 01:04:58 +0000 (01:04 +0000)]
Fix warning; amdsmb_abort() is not used.

22 years agoFix warning. s/microuptime()/binuptime()/ for switchtime initial value.
Peter Wemm [Tue, 26 Feb 2002 01:03:39 +0000 (01:03 +0000)]
Fix warning. s/microuptime()/binuptime()/ for switchtime initial value.

22 years agoRemove unused variable (td)
Peter Wemm [Tue, 26 Feb 2002 01:01:37 +0000 (01:01 +0000)]
Remove unused variable (td)

22 years agoFix a warning. useracc() should take a const pointer argument.
Peter Wemm [Tue, 26 Feb 2002 01:00:39 +0000 (01:00 +0000)]
Fix a warning.  useracc() should take a const pointer argument.

22 years agoFix a warning. Do not assume pointer == long.
Peter Wemm [Tue, 26 Feb 2002 00:55:27 +0000 (00:55 +0000)]
Fix a warning.  Do not assume pointer == long.

22 years agoWork-in-progress commit syncing up pmap cleanups that I have been working
Peter Wemm [Mon, 25 Feb 2002 23:49:51 +0000 (23:49 +0000)]
Work-in-progress commit syncing up pmap cleanups that I have been working
on for a while:
- fine grained TLB shootdown for SMP on i386
- ranged TLB shootdowns.. eg: specify a range of pages to shoot down with
  a single IPI, since the IPI is very expensive.  Adjust some callers
  that used to trigger this inside tight loops to do a ranged shootdown
  at the end instead.
- PG_G support for SMP on i386 (options ENABLE_PG_G)
- defer PG_G activation till after we decide what we are going to do with
  PSE and the 4MB pages at the start of the kernel.  This should solve
  some rumored strangeness about stale PG_G entries getting stuck
  underneath the 4MB pages.
- add some instrumentation for the fine TLB shootdown
- convert some asm instruction wrappers from functions to inlines.  gcc
  seems to do a fair bit better with this.
- [temporarily!] pessimize the tlb shootdown IPI handlers.  I will fix
  this again shortly.

This has been working fairly well for me for a while, but I have tweaked
it again prior to commit since my last major testing round.  The only
outstanding problem that I know of is PG_G related, which is why there
is an option for it (not on by default for SMP).  I have seen a world
speedups by a few percent (as much as 4 or 5% in one case) but I have
*not* accurately measured this - I am a bit sceptical of these numbers.

22 years agoThoreau listed twice.
Crist J. Clark [Mon, 25 Feb 2002 23:26:13 +0000 (23:26 +0000)]
Thoreau listed twice.
Give RFK's fullname and place of birth.
Spell 'Wiener' correctly and add place of birth.

PR: misc/35305
Submitted by: Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>

22 years agoRemove code to lock the user tsb into the tlb. We can handle faults on it
Jake Burkholder [Mon, 25 Feb 2002 22:58:41 +0000 (22:58 +0000)]
Remove code to lock the user tsb into the tlb.  We can handle faults on it
now, as we do for normal wired kernel memory.

22 years agoI was able to boot this kernel using the latest WIP kernel sources.
David E. O'Brien [Mon, 25 Feb 2002 22:13:44 +0000 (22:13 +0000)]
I was able to boot this kernel using the latest WIP kernel sources.
I don't believe anyone is quite using the sparc64 kernel sources in CVS
yet -- things aren't just quite ready (but almost).  So this commit should
be OK to make.

22 years agoTurn on -Werror by default. This is is easily turned off, by either:
Peter Wemm [Mon, 25 Feb 2002 22:04:33 +0000 (22:04 +0000)]
Turn on -Werror by default.  This is is easily turned off, by either:
- fix the warnings, they are there for a reason!
- add -DNO_ERROR to your make(1) command.
- add 'makeoptions NO_WERROR=true' to your kernel config.
- add 'nowerror' to conf/files* that have warnings that should be fixed
  due to tracking 3rd party vendor code.
- add 'nowerror' to conf/files* where the warning is false due to a
  compiler bug and fixing it with brute force would be too expensive.

There are some very sloppy warnings in our kernel build, come on folks!

'make release' uses -DNO_WERROR intentionally.

22 years agoAdd a hint about -DNO_WERROR
Peter Wemm [Mon, 25 Feb 2002 21:59:57 +0000 (21:59 +0000)]
Add a hint about -DNO_WERROR

22 years agoAdd 'nowerror' to the vendor acpica code that spews out warnings.
Peter Wemm [Mon, 25 Feb 2002 21:54:06 +0000 (21:54 +0000)]
Add 'nowerror' to the vendor acpica code that spews out warnings.

22 years agoSupply -DNO_WERROR to the kernel build during release.
Peter Wemm [Mon, 25 Feb 2002 21:53:18 +0000 (21:53 +0000)]
Supply -DNO_WERROR to the kernel build during release.

22 years agoAdd one.
Poul-Henning Kamp [Mon, 25 Feb 2002 21:52:34 +0000 (21:52 +0000)]
Add one.

Submitted by: jedgar
Reviewed by: The usual gang of idiots in that IRC channel.

22 years agoTidy up some warnings
Peter Wemm [Mon, 25 Feb 2002 21:42:23 +0000 (21:42 +0000)]
Tidy up some warnings

22 years agoAdd a link to the hubs article, at the part that talks about setting
Giorgos Keramidas [Mon, 25 Feb 2002 19:51:34 +0000 (19:51 +0000)]
Add a link to the hubs article, at the part that talks about setting
up FreeBSD mirrors.

Reviewed by: bmah

22 years agoAdd myself.
Juli Mallett [Mon, 25 Feb 2002 19:48:04 +0000 (19:48 +0000)]
Add myself.

Reviewed by: mike
Approved by: mike

22 years agoImplement a nested window state. This avoids attempting to spill a user
Jake Burkholder [Mon, 25 Feb 2002 18:37:17 +0000 (18:37 +0000)]
Implement a nested window state.  This avoids attempting to spill a user
window to the user stack while in a nested kernel trap.  We do this for
entry to the kernel from user mode, but if we get an interrupt in kernel
mode while there are still user windows in the cpu, and we attempt to spill
to the user stack, we may take too many nested traps and overflow the trap
stack, causing a red state exception.  This is needed by upcoming changes
to allow the user tsb to not be locked in the tlb.

Reviewed by: tmm

22 years agoPer POSIX <grp.h> doesn't require <sys/types.h>.
Maxim Sobolev [Mon, 25 Feb 2002 17:20:40 +0000 (17:20 +0000)]
Per POSIX <grp.h> doesn't require <sys/types.h>.

Submitted by: ache

22 years agoRewrite the part of the conversation function that allocates the reply array;
Dag-Erling Smørgrav [Mon, 25 Feb 2002 16:39:34 +0000 (16:39 +0000)]
Rewrite the part of the conversation function that allocates the reply array;
it was inelegant and neglected to check the return value from malloc(3).

Sponsored by: DARPA, NAI Labs

22 years agoBackout rev.1.5 - it seems that it's posixly correct that the program
Maxim Sobolev [Mon, 25 Feb 2002 13:55:47 +0000 (13:55 +0000)]
Backout rev.1.5 - it seems that it's posixly correct that the program
needs to include <sys/types.h> before <grp.h>.

Submitted by: fjoe, sheldonh
David Malone <dwmalone@maths.tcd.ie>

22 years agoIn rev.1.4 type of (group)->gr_gid was changes from (int) to (gid_t),
Maxim Sobolev [Mon, 25 Feb 2002 13:24:02 +0000 (13:24 +0000)]
In rev.1.4 type of (group)->gr_gid was changes from (int) to (gid_t),
so that <sys/types.h> is now required. Add it, otherwise it breaks
some ports.

Submitted by: Joe Marcus Clarke <marcus@marcuscom.com>

22 years ago#include <time.h> for the definition of time functions instead of
Bruce Evans [Mon, 25 Feb 2002 12:02:03 +0000 (12:02 +0000)]
#include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.

Sorted includes.

22 years agoAdd a few missing commas.
Murray Stokely [Mon, 25 Feb 2002 10:27:51 +0000 (10:27 +0000)]
Add a few missing commas.

22 years agoAdd a new test_counter() function which tries to determine the width of
Poul-Henning Kamp [Mon, 25 Feb 2002 09:51:17 +0000 (09:51 +0000)]
Add a new test_counter() function which tries to determine the width of
the inter-value histogram for 2000 samples.  If the width is 3 or less
for 10 consequtive samples, we trust the counter to be good, otherwise
we use the *_safe() method.

This method may be too strict, but the worst which can happen is that
we take the performance hit of the *_safe() method when we should not.

Make the *_safe() method more discriminating by mandating that the three
samples do not span more than 15 ticks on the counter.

Disable the PCI-ident based probing as a means to recognize good
counters.

Inspiration from: dillon and msmith

22 years agoDocument what inpcb->inp_vflag is for.
Alfred Perlstein [Mon, 25 Feb 2002 09:41:43 +0000 (09:41 +0000)]
Document what inpcb->inp_vflag is for.

Submitted by: Marco Molteni <molter@tin.it>

22 years agoFix a bug introduced in rev.1.23 - for some reason mkdir("/", ...) system
Maxim Sobolev [Mon, 25 Feb 2002 09:17:44 +0000 (09:17 +0000)]
Fix a bug introduced in rev.1.23 - for some reason mkdir("/", ...) system
call returns `EISDIR', not `EEXIST', so that be prepared for that. This should
fix number of ports, that often call `mkdir -p //usr/local/foobar'. This
is just a quick workaround, the real fix would be either to avoid calling
mkdir("/", ...) or fix VFS code to return consistent errno for this case.

22 years agoThe TCP code did not do sufficient checks on whether incoming packets
Crist J. Clark [Mon, 25 Feb 2002 08:29:21 +0000 (08:29 +0000)]
The TCP code did not do sufficient checks on whether incoming packets
were destined for a broadcast IP address. All TCP packets with a
broadcast destination must be ignored. The system only ignored packets
that were _link-layer_ broadcasts or multicast. We need to check the
IP address too since it is quite possible for a broadcast IP address
to come in with a unicast link-layer address.

Note that the check existed prior to CSRG revision 7.35, but was
removed. This commit effectively backs out that nine-year-old change.

PR: misc/35022

22 years ago#include <time.h> for the definition of time functions instead of
Bruce Evans [Mon, 25 Feb 2002 07:39:34 +0000 (07:39 +0000)]
#include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.

Removed unused include of <sys/stat.h>.  Only its pollution was used.

22 years agoAdd some basic FreeBSD/sparc64 Hardware Notes.
Murray Stokely [Mon, 25 Feb 2002 07:25:38 +0000 (07:25 +0000)]
Add some basic FreeBSD/sparc64 Hardware Notes.

Reviewed by: jake, tmm

22 years agoTypo fix: missing ;.
Makoto Matsushita [Mon, 25 Feb 2002 05:35:39 +0000 (05:35 +0000)]
Typo fix: missing ;.

Pointed out by: Manfred Antar <null@pozo.com>
Pointy hat to: matusita

22 years ago#include <time.h> for the definition of time functions instead of
Bruce Evans [Mon, 25 Feb 2002 05:31:49 +0000 (05:31 +0000)]
#include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.

22 years ago#include <sys/time.h> instead of depending on namespace pollution in
Bruce Evans [Mon, 25 Feb 2002 05:23:59 +0000 (05:23 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.

22 years ago#include <sys/time.h> instead of depending on namespace pollution in
Bruce Evans [Mon, 25 Feb 2002 05:16:22 +0000 (05:16 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.  Intentionally
don't follow the local style of polluting the local headers.

22 years agoUnremoved used includes. <sys/time.h> is needed if <sys/stat.h> isn't
Bruce Evans [Mon, 25 Feb 2002 05:09:12 +0000 (05:09 +0000)]
Unremoved used includes.  <sys/time.h> is needed if <sys/stat.h> isn't
polluted, and <sys/types.h> is strictly a prerequisite for <sys/stat.h>
untiil we drop support for pre-2001 versions of POSIX.

22 years ago#include <sys/time.h> instead of depending on namespace pollution in
Bruce Evans [Mon, 25 Feb 2002 05:00:39 +0000 (05:00 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.

Removed unused includes (<time.h> doesn't declare anything of interest;
only <sys/time.h> does).

Sorted includes a bit.

22 years agoModify the tte format to not include the tlb context number and to store the
Jake Burkholder [Mon, 25 Feb 2002 04:56:50 +0000 (04:56 +0000)]
Modify the tte format to not include the tlb context number and to store the
virtual page number in a much more convenient way; all in one piece.  This
greatly simplifies the comparison for a matching tte, and allows the fault
handlers to be much simpler due to not having to load wierd masks.
Rewrite the tlb fault handlers to account for the new format.  These are also
written to allow faults on the user tsb inside of the fault handlers; the
kernel fault handler must be aware of this and not clobber the other's
registers.  The faults do not yet occur due to other support that is needed
(and still under my desk).

Bug fixes from: tmm

22 years agoImprove grep'ing for variables in make.conf and rc.conf*.
Doug Barton [Mon, 25 Feb 2002 04:52:56 +0000 (04:52 +0000)]
Improve grep'ing for variables in make.conf and rc.conf*.
Thanks to cjc for the idea.

22 years agoUse the default 'ld' emulation rather than hard coding it.
David E. O'Brien [Mon, 25 Feb 2002 04:49:17 +0000 (04:49 +0000)]
Use the default 'ld' emulation rather than hard coding it.
For FreeBSD, 'ld' 2.12.0 uses a different emulation than in the past.
So this change makes the upgrade easier.

22 years ago#include <sys/time.h> instead of depending on namespace pollution in
Bruce Evans [Mon, 25 Feb 2002 04:47:39 +0000 (04:47 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval (sys/stat.h> only
needs timespecs even when its POSIX support is not turned on, so it
shouldn't declare timevals).

Fixed some #include messes.

22 years agoDeclare time(not3) instead of depending on namespace pollution 3 layers
Bruce Evans [Mon, 25 Feb 2002 04:31:25 +0000 (04:31 +0000)]
Declare time(not3) instead of depending on namespace pollution 3 layers
deep in <stand.h> to eventually include <time.h> to declare the user
version.

This is not quite the right place to declare it, but <stand.h> would
be worse because time() is very MD so it isn't in libstand.

Many places in the boot sources still get the user version using only
1 layer of pollution (#include <sys/time.h>.  Some pollute themselves
directly (#include <time.h>).  But the boot Makefiles are too broken
to enable warnings for redeclarations.

22 years agoRemoved mounds of unused variables.
Bruce Evans [Mon, 25 Feb 2002 03:45:09 +0000 (03:45 +0000)]
Removed mounds of unused variables.

22 years ago#include <sys/time.h> instead of depending on namespace pollution in
Bruce Evans [Mon, 25 Feb 2002 03:36:06 +0000 (03:36 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for its prerequisite <sys/time.h>.

#include <sys/param.h> in the correct place instead of bogusly including
<sys/types.h>.

22 years ago#include <sys/time.h> instead of depending on namespace pollution in
Bruce Evans [Mon, 25 Feb 2002 02:30:04 +0000 (02:30 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for its prerequisite <sys/time.h>.

Removed a duplicated include.  Sorted includes.

22 years agoThe thermal thread needs to take Giant before it does anything with the
Mike Smith [Mon, 25 Feb 2002 02:21:22 +0000 (02:21 +0000)]
The thermal thread needs to take Giant before it does anything with the
interpreter.

Submitted by: Magnus B{ckstr|m <b@etek.chalmers.se>

22 years agoRemoved unused include of <sys/resource.h> instead of depending on
Bruce Evans [Mon, 25 Feb 2002 02:18:36 +0000 (02:18 +0000)]
Removed unused include of <sys/resource.h> instead of depending on
namespace pollution only 1 layer deep in <sys/stat.h> for its
prerequisite <sys/time.h>

Removed other unused includes.

22 years ago#include <time.h> for the definition of time functions instead of
Bruce Evans [Mon, 25 Feb 2002 01:50:43 +0000 (01:50 +0000)]
#include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.

Sorted includes.  Removed some unused includes.

22 years ago#include <time.h> for the definition of time functions instead of
Bruce Evans [Mon, 25 Feb 2002 01:36:59 +0000 (01:36 +0000)]
#include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.

Removed unused includes.

22 years ago#include <stddef.h> for the definition of NULL instead of depending on
Bruce Evans [Mon, 25 Feb 2002 01:25:30 +0000 (01:25 +0000)]
#include <stddef.h> for the definition of NULL instead of depending on
namespace pollution 2 layers deep in <sys/stat.h>.

Sorted includes.

22 years agoSockets passed into uipc_abort() have been allocated by sonewconn()
Ian Dowse [Mon, 25 Feb 2002 00:03:34 +0000 (00:03 +0000)]
Sockets passed into uipc_abort() have been allocated by sonewconn()
but never accept'ed, so they must be destroyed. Originally, unp_drop()
detected this situation by checking if so->so_head is non-NULL.
However, since revision 1.54 of uipc_socket.c (Feb 1999), so->so_head
is set to NULL before calling soabort(), so any unix-domain sockets
waiting to be accept'ed are leaked if the server socket is closed.

Resolve this by moving the socket destruction code into uipc_abort()
itself, and making it unconditional (the other caller of unp_drop()
never needs the socket to be destroyed). Use unp_detach() to avoid
the original code duplication when destroying the socket.

PR: kern/17895
Reviewed by: dwmalone (an earlier version of the patch)
MFC after: 1 week

22 years agoCorrect name spelling for one of the people who share my birthday.
Greg Lehey [Sun, 24 Feb 2002 23:59:57 +0000 (23:59 +0000)]
Correct name spelling for one of the people who share my birthday.

PR: docs/35274
Submitted by: nivit@libero.it (Nicola Vitale)

22 years agoMFen (1.283 --> 2.286).
Jun Kuriyama [Sun, 24 Feb 2002 23:54:59 +0000 (23:54 +0000)]
MFen (1.283 --> 2.286).

22 years agoMake atomic_cmpset_32 correctly return 0 on failure.
Benno Rice [Sun, 24 Feb 2002 23:31:49 +0000 (23:31 +0000)]
Make atomic_cmpset_32 correctly return 0 on failure.

22 years agoFix style bugs:
Alfred Perlstein [Sun, 24 Feb 2002 23:24:01 +0000 (23:24 +0000)]
Fix style bugs:
Missing `const' qualifier.
Initialization in declaration.

Submitted by: mike

22 years agoTests by numerous people have shown that many chipsets do not properly
Matthew Dillon [Sun, 24 Feb 2002 22:58:15 +0000 (22:58 +0000)]
Tests by numerous people have shown that many chipsets do not properly
latch the acpi timer, resulting in weird deltas.  The problem is severe
enough to adversely effect the timecounter code.

Default to the 'safe' version of the get-timecount function.  The probe
will override it if a known-good chipset is found.  This is temporary
until a more complete solution is found.

Reviewed by: phk

22 years agobump __FreeBSD_version for usb structure rename.
Alfred Perlstein [Sun, 24 Feb 2002 22:45:33 +0000 (22:45 +0000)]
bump __FreeBSD_version for usb structure rename.

22 years agoGive a little more information as to why pnp configuration of a device
Alfred Perlstein [Sun, 24 Feb 2002 22:27:54 +0000 (22:27 +0000)]
Give a little more information as to why pnp configuration of a device
may have failed.

Submitted by: Terry Lambert <tlambert2@mindspring.com>