]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoTwo style related changes:
Warner Losh [Wed, 21 Jul 2004 17:02:36 +0000 (17:02 +0000)]
Two style related changes:
(1) use strlcpy instead of strncpy since the use here of the latter
    was incorrect.
(2) Move 'N' case into proper sorted order (sorted the same way that
    ls sorts its args).

20 years agoDon't sync the file system on panic by default. This seems to basically
Robert Watson [Wed, 21 Jul 2004 16:04:46 +0000 (16:04 +0000)]
Don't sync the file system on panic by default.  This seems to basically
work very infrequently, and often results in a compound panic which
confuses debugging; locking/SMP have made the layering violation (and
risks) of this more obvious over time.

Discussed with: green, bde, et al.

20 years agoUsing NULL as a malloc type when calling contigmalloc() is wrong, so introduce
Olivier Houchard [Wed, 21 Jul 2004 15:52:34 +0000 (15:52 +0000)]
Using NULL as a malloc type when calling contigmalloc() is wrong, so introduce
a new malloc type, and use it.

20 years agounbreak !WITNESS.
Alfred Perlstein [Wed, 21 Jul 2004 15:42:02 +0000 (15:42 +0000)]
unbreak !WITNESS.

20 years agoDo not use NULL as a malloc type for contigmalloc().
Olivier Houchard [Wed, 21 Jul 2004 15:18:45 +0000 (15:18 +0000)]
Do not use NULL as a malloc type for contigmalloc().

20 years agoThe media info is printed with the -hardware option so there is no
Hartmut Brandt [Wed, 21 Jul 2004 14:52:21 +0000 (14:52 +0000)]
The media info is printed with the -hardware option so there is no
point to write 'Media' in the table header for the -atm option.

20 years agoAdd the ACPI Panasonic extras driver.
Yoshihiro Takahashi [Wed, 21 Jul 2004 14:47:54 +0000 (14:47 +0000)]
Add the ACPI Panasonic extras driver.

Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org> and nyan

20 years agoAdd test programs for mbsnrtowcs() and wcsnrtombs().
Tim J. Robbins [Wed, 21 Jul 2004 13:47:48 +0000 (13:47 +0000)]
Add test programs for mbsnrtowcs() and wcsnrtombs().

20 years agoRead directly from the stdio buffer using the new __mbsnrtowcs() interface
Tim J. Robbins [Wed, 21 Jul 2004 12:12:48 +0000 (12:12 +0000)]
Read directly from the stdio buffer using the new __mbsnrtowcs() interface
instead of making repeated calls to __fgetwc().

20 years agoImplement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These are
Tim J. Robbins [Wed, 21 Jul 2004 10:54:57 +0000 (10:54 +0000)]
Implement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These are
convenient when the source string isn't null-terminated.

Implement the other conversion functions (mbstowcs(), mbsrtowcs(), wcstombs(),
wcsrtombs()) in terms of these new functions.

20 years agoAdd /etc/ntp to hold keys for ntpd.
Ollivier Robert [Wed, 21 Jul 2004 10:14:10 +0000 (10:14 +0000)]
Add /etc/ntp to hold keys for ntpd.

20 years ago'atmconfig natm show' shows all currently configured PVCs for IP over ATM,
Hartmut Brandt [Wed, 21 Jul 2004 09:44:27 +0000 (09:44 +0000)]
'atmconfig natm show' shows all currently configured PVCs for IP over ATM,
not 'atmconfig natm list'.

20 years agoAdd special lines for 'help commands'.
Hartmut Brandt [Wed, 21 Jul 2004 09:43:31 +0000 (09:43 +0000)]
Add special lines for 'help commands'.

20 years agoAllow more than one help file. There is a restriction that
Hartmut Brandt [Wed, 21 Jul 2004 09:42:56 +0000 (09:42 +0000)]
Allow more than one help file. There is a restriction that
each help file must start with a level 0 topic.

20 years agoAllow the help file path and name to be overwritten by cc -D...
Hartmut Brandt [Wed, 21 Jul 2004 09:39:53 +0000 (09:39 +0000)]
Allow the help file path and name to be overwritten by cc -D...
Also remove the current directory from the default help file path
and add an appropriate directory in /usr/local instead.

20 years agoUse __wcsrtombs() and __sfvwrite() to convert and write the wide character
Tim J. Robbins [Wed, 21 Jul 2004 08:35:18 +0000 (08:35 +0000)]
Use __wcsrtombs() and __sfvwrite() to convert and write the wide character
string instead of multiple calls to __fputwc().

20 years agoput several of the options for DEBUG_VFS_LOCKS under control of sysctls.
Alfred Perlstein [Wed, 21 Jul 2004 07:13:14 +0000 (07:13 +0000)]
put several of the options for DEBUG_VFS_LOCKS under control of sysctls.

20 years agoMake sure we don't call mbuf allocation functions with mutexes held.
Alfred Perlstein [Wed, 21 Jul 2004 07:12:24 +0000 (07:12 +0000)]
Make sure we don't call mbuf allocation functions with mutexes held.

Discussed with: rwatson

20 years agoAdditional pmap locking
Alan Cox [Wed, 21 Jul 2004 07:01:48 +0000 (07:01 +0000)]
Additional pmap locking

Tested by: marcel@

20 years agoMy bad: /dev/sa0, no 'r'
Tim Kientzle [Wed, 21 Jul 2004 06:43:10 +0000 (06:43 +0000)]
My bad: /dev/sa0, no 'r'

Thanks (and many apologies) to: Cristoph Mallon

20 years agoOops... Add the CS_OWN flag to the trace and where commands so that
Marcel Moolenaar [Wed, 21 Jul 2004 05:55:51 +0000 (05:55 +0000)]
Oops... Add the CS_OWN flag to the trace and where commands so that
db_stack_trace() actually has a chance to parse its own arguments.

20 years agoSemi-gratuitous change. Move two refcount operations to their own lines
Peter Wemm [Wed, 21 Jul 2004 05:08:10 +0000 (05:08 +0000)]
Semi-gratuitous change.  Move two refcount operations to their own lines
rather than be buried inside an if (expression).  And now that the if
expression is the same in both exit paths, use the same ordering.

20 years agoUnify db_stack_trace_cmd(). All it did was look up the thread given
Marcel Moolenaar [Wed, 21 Jul 2004 05:07:09 +0000 (05:07 +0000)]
Unify db_stack_trace_cmd(). All it did was look up the thread given
the thread ID and call db_trace_thread().
Since arm has all the logic in db_stack_trace_cmd(), rename the
new DB_COMMAND function to db_stack_trace to avoid conflicts on
arm.
While here, have db_stack_trace parse its own arguments so that
we can use a more natural radix for IDs. If the ID is not a thread
ID, or more precisely when no thread exists with the ID, try if
there's a process with that ID and return the first thread in it.
This makes it easier to print stack traces from the ps output.

requested by: rwatson@
tested on: amd64, i386, ia64

20 years agoAdd kdb_thr_from_pid(), which given a PID returns the first thread
Marcel Moolenaar [Wed, 21 Jul 2004 04:49:48 +0000 (04:49 +0000)]
Add kdb_thr_from_pid(), which given a PID returns the first thread
in the process. This is useful when working from or with a process.

20 years agoAdd some additional pmap locking and lock assertions.
Alan Cox [Wed, 21 Jul 2004 03:38:46 +0000 (03:38 +0000)]
Add some additional pmap locking and lock assertions.

20 years agoMake this test compile again and remove its dependency on sys/pipe.h.
Mike Silbersack [Wed, 21 Jul 2004 03:13:53 +0000 (03:13 +0000)]
Make this test compile again and remove its dependency on sys/pipe.h.

20 years agoAn a #error discouraging people from using pipe.h from places outside
Mike Silbersack [Wed, 21 Jul 2004 03:11:41 +0000 (03:11 +0000)]
An a #error discouraging people from using pipe.h from places outside
the kernel.

20 years agoSlide pipe.h include after the _KERNEL define in preparation for disallowing
Mike Silbersack [Wed, 21 Jul 2004 03:07:50 +0000 (03:07 +0000)]
Slide pipe.h include after the _KERNEL define in preparation for disallowing
non-_KERNEL inclusions of pipe.h

20 years agoMove the initialization and teardown of pmaps to the vmspace zone's
Peter Wemm [Wed, 21 Jul 2004 00:29:21 +0000 (00:29 +0000)]
Move the initialization and teardown of pmaps to the vmspace zone's
init and fini handlers.  Our vm system removes all userland mappings at
exit prior to calling pmap_release.  It just so happens that we might
as well reuse the pmap for the next process since the userland slate
has already been wiped clean.

However.  There is a functional benefit to this as well.  For platforms
that share userland and kernel context in the same pmap, it means that
the kernel portion of a pmap remains valid after the vmspace has been
freed (process exit) and while it is in uma's cache.  This is significant
for i386 SMP systems with kernel context borrowing because it avoids
a LOT of IPIs from the pmap_lazyfix() cleanup in the usual case.

Tested on:  amd64, i386, sparc64, alpha
Glanced at by:  alc

20 years agoImplement ptrace_set_pc().
Olivier Houchard [Tue, 20 Jul 2004 23:00:02 +0000 (23:00 +0000)]
Implement ptrace_set_pc().
Add a stub for ptrace_clear_single_step().

20 years agoRemove astpending, it has not been used for a long time.
Olivier Houchard [Tue, 20 Jul 2004 22:39:56 +0000 (22:39 +0000)]
Remove astpending, it has not been used for a long time.

20 years agoUncomment the vector relocation code.
Olivier Houchard [Tue, 20 Jul 2004 22:39:24 +0000 (22:39 +0000)]
Uncomment the vector relocation code.

20 years agoNuke disable_intr() and enable_intr(), as it already exists elsewhere.
Olivier Houchard [Tue, 20 Jul 2004 22:38:46 +0000 (22:38 +0000)]
Nuke disable_intr() and enable_intr(), as it already exists elsewhere.

20 years agoWhen removing the last reference to a cloner, do not try to unlock twice -
Max Laier [Tue, 20 Jul 2004 21:44:28 +0000 (21:44 +0000)]
When removing the last reference to a cloner, do not try to unlock twice -
esp. not since the backing memory was just freed.

Reviewed by: rwatson

20 years agoM_PREPEND() the IP header on to the front of an outgoing raw IP packet
Robert Watson [Tue, 20 Jul 2004 20:52:30 +0000 (20:52 +0000)]
M_PREPEND() the IP header on to the front of an outgoing raw IP packet
using M_DONTWAIT rather than M_WAITOK to avoid sleeping on memory
while holding a mutex.

20 years ago*sigh* Fix source code compatibility with 5.2.1-RELEASE _again_.
Bill Paul [Tue, 20 Jul 2004 20:28:57 +0000 (20:28 +0000)]
*sigh* Fix source code compatibility with 5.2.1-RELEASE _again_.
(Make kdb stuff conditional.)

20 years agoBack out previous commit. Even though statfs(2) can take a regular
Christian S.J. Peron [Tue, 20 Jul 2004 19:30:57 +0000 (19:30 +0000)]
Back out previous commit. Even though statfs(2) can take a regular
file as an argument, it may still fail for the same reasons that
open(2) can.

Pointed out by: Jilles Tjoelker
Apporived by: bmilekic (mentor)

20 years agoRemove reference to ENOTDIR in the documented errors
Christian S.J. Peron [Tue, 20 Jul 2004 18:35:33 +0000 (18:35 +0000)]
Remove reference to ENOTDIR in the documented errors
for statfs(2). This is false, if the pathname specified
is a regular file, then the information for the file
system that the file lives on will be returned.

Approved by: bmilekic (mentor)

20 years agoCurrently if a mount point is not accessible by the calling user,
Christian S.J. Peron [Tue, 20 Jul 2004 18:24:47 +0000 (18:24 +0000)]
Currently if a mount point is not accessible by the calling user,
invalid information will be printed if the -t flag is specified.

$ df -t ufs
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s1a    495726   139944   316124    31%    /
/dev/ad0s1e    253678     6438   226946     3%    /tmp
/dev/ad0s1f  56206340 13594248 38115586    26%    /usr
/dev/ad0s1d    694126    19812   618784     3%    /var
/dev/ad0s1d    694126    19812   618784     3%    /var
$

Note that the mount point which is not accessible shows
up as the previous file system that was printed. The reason
for this is that df -t will call statfs(2) on the pathname
supplied by getfsstat(2).

This is done to refresh the file system statistics in the
event that a previous file system had a long delay in
providing its stats.

This change affects the df utility in the following ways:
o Teach df has to deal with statfs(2) failing. If statfs(2)
  fails, fall back on the possibly stale stats provided by
  the initial call to getfsstat(2).
o Print a warning that the fs stats could possibly be stale
o Modify the man page and document this new behavior
  as a bug.

Approved by: bmilekic (mentor)
PR: 68165

20 years agoSlight cosmetic changes.
Julian Elischer [Tue, 20 Jul 2004 17:15:38 +0000 (17:15 +0000)]
Slight cosmetic changes.
Also introduce a macro to be called by persistent nodes to signal their
persistence during shutdown to hide this mechanism from the node author.

Make node flags have a consistent style in naming.

Document the change.

20 years agoThe natm sub-command was missing in the TOC of the helpfile.
Hartmut Brandt [Tue, 20 Jul 2004 16:50:57 +0000 (16:50 +0000)]
The natm sub-command was missing in the TOC of the helpfile.

20 years agoRemove reference to fla driver.
Poul-Henning Kamp [Tue, 20 Jul 2004 16:25:20 +0000 (16:25 +0000)]
Remove reference to fla driver.

20 years agoForced to commit to add:
Ollivier Robert [Tue, 20 Jul 2004 15:54:53 +0000 (15:54 +0000)]
Forced to commit to add:

Tested on: amd64 (sledge), sparc64 (panther), IA-64 (pluto1), alpha (beast)

in addition to my own machine running 5.2-CURRENT.

20 years agoRemove an extra '}'.
Ollivier Robert [Tue, 20 Jul 2004 15:51:00 +0000 (15:51 +0000)]
Remove an extra '}'.

20 years agoAdd missing Makefile from previous commit.
Ollivier Robert [Tue, 20 Jul 2004 15:45:04 +0000 (15:45 +0000)]
Add missing Makefile from previous commit.

20 years agoUpdate our ntpd to the long awaited 4.2.0 version.
Ollivier Robert [Tue, 20 Jul 2004 15:44:32 +0000 (15:44 +0000)]
Update our ntpd to the long awaited 4.2.0 version.

This bring us several things:
- updated drivers
- IPv6 support at last
- ntp-genkeys is replaced by ntp-keygen
- ntptrace is now a script (courtesy of John Hay)
- lots of renamed files from .htm to .html (while I prefer .html, I
  find the change a bit gratuitous)
- still no manpages :(

Please test and report.

Commit very much helped by: GNU arch (http://gnuarch.org/)

20 years agoUpdate information on build/import.
Ollivier Robert [Tue, 20 Jul 2004 15:25:19 +0000 (15:25 +0000)]
Update information on build/import.

20 years agoMerge conflicts.
Ollivier Robert [Tue, 20 Jul 2004 15:19:51 +0000 (15:19 +0000)]
Merge conflicts.

Lots of added files, some removed and quite a large number of renames :(

20 years agoMerge conflicts (see also previous commit).
Ollivier Robert [Tue, 20 Jul 2004 15:18:31 +0000 (15:18 +0000)]
Merge conflicts (see also previous commit).

Reinsert our local changes to ntp_control.c:

1.4:    Do not log every potential exploit attempt since a denial-of-service
        may result
1.5:    int -> unsigned char fixes

20 years agoRevert this file to the vendor version, we don't need to have our own
Ollivier Robert [Tue, 20 Jul 2004 15:15:00 +0000 (15:15 +0000)]
Revert this file to the vendor version, we don't need to have our own
version of it.  Will help further upgrades.

20 years agoThis commit was generated by cvs2svn to compensate for changes in r132451,
Ollivier Robert [Tue, 20 Jul 2004 15:01:56 +0000 (15:01 +0000)]
This commit was generated by cvs2svn to compensate for changes in r132451,
which included commits to RCS files with non-trunk default branches.

20 years agoVirgin import of ntpd 4.2.0
Ollivier Robert [Tue, 20 Jul 2004 15:01:56 +0000 (15:01 +0000)]
Virgin import of ntpd 4.2.0

20 years agoIn ng_device_newhook():
Gleb Smirnoff [Tue, 20 Jul 2004 13:16:17 +0000 (13:16 +0000)]
In ng_device_newhook():
  - Return meaningful return errorcodes.
  - Free previously allocated connection in error cases.

In ng_device_rcvdata():
  - Return meaningful return errorcodes.
  - Detach mbuf from netgraph item, and free the item before
    doing any other actions that may return from method.
  - Do not call strange malloc() for buffer. [1]
  - In case of any error jump to end, where mbuf is freed.

In ng_device_disconnect():
  - Return meaningful return errorcodes.
  - Free disconnected connection.

style(9) in mentioned above functions:
  - Remove '/* NGD_DEBUG */', when only one line is ifdef'ed.
  - Remove extra braces to easier reading.
  - Add space after comma in function calls.

PR: kern/41881 (part)
Reviewed by: marks
Approved by: julian (mentor)

20 years agoAdd ng_device(4) to LINT.
Gleb Smirnoff [Tue, 20 Jul 2004 12:42:54 +0000 (12:42 +0000)]
Add ng_device(4) to LINT.

Reviewed by: marks
Approved by: julian (mentor)

20 years ago1. Make ng_device.h system include. This fixes module build.
Gleb Smirnoff [Tue, 20 Jul 2004 11:19:46 +0000 (11:19 +0000)]
1. Make ng_device.h system include. This fixes module build.
2. Sort includes, while here.
3. s/NULL/0/ in NG_SEND_MSG_HOOK(), since ng_ID_t is integer.

PR: kern/41881 (part)
Reviewed by: marks
Approved by: julian (mentor)

20 years agoTemporary fix for interoperability with Windows and OS X. A more complete
Doug Rabson [Tue, 20 Jul 2004 08:58:27 +0000 (08:58 +0000)]
Temporary fix for interoperability with Windows and OS X. A more complete
fix will follow when its ready.

Submitted by: simokawa

20 years agoFix typos.
Lukas Ertl [Tue, 20 Jul 2004 08:32:42 +0000 (08:32 +0000)]
Fix typos.

PR:            misc/67586
Submitted by:  Paul A. Hoadley <paulh@logicsquad.net>

20 years agoFix whitespace and punctuation.
Lukas Ertl [Tue, 20 Jul 2004 08:28:28 +0000 (08:28 +0000)]
Fix whitespace and punctuation.

PR:            misc/49967
Submitted by:  Sean C. Farley <sean-freebsd@farley.org>

20 years agoCall __mbrtowc() and __wcrtomb() directly instead of taking detours
Tim J. Robbins [Tue, 20 Jul 2004 08:27:27 +0000 (08:27 +0000)]
Call __mbrtowc() and __wcrtomb() directly instead of taking detours
through mbrtowc() and wcrtomb().

20 years agoRemove duplicate fortunes and fix some typos.
Lukas Ertl [Tue, 20 Jul 2004 08:19:51 +0000 (08:19 +0000)]
Remove duplicate fortunes and fix some typos.

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

20 years agoImprove make's diagnostic of mistmatched .if-.endif. This patch is
Hartmut Brandt [Tue, 20 Jul 2004 07:42:06 +0000 (07:42 +0000)]
Improve make's diagnostic of mistmatched .if-.endif. This patch is
slightly different from the patch in the PR. The problem is, that
make handles .if clauses inside false .if clauses simply by
counting them - it doesn't put them onto the conditional stack, nor even
parses them so we need an extra line number stack for these ifs.

PR: bin/61257
Submitted by: Mikhail Teterin <mi@aldan.algebra.com>

20 years agoAdd a simple regression test for the stat st_size bug just fixed in
Mike Silbersack [Tue, 20 Jul 2004 07:17:19 +0000 (07:17 +0000)]
Add a simple regression test for the stat st_size bug just fixed in
sys_pipe.c

20 years agoo Support the REL32LSB relocation. It's in the ELF file from which
Marcel Moolenaar [Tue, 20 Jul 2004 07:11:14 +0000 (07:11 +0000)]
o  Support the REL32LSB relocation. It's in the ELF file from which
   we construct the EFI image. It doesn't seem to actually end up
   in the EFI image, AFAICT.
o  Replace .quad, .long and .short with data8, data4 and data2 resp.
   The former are gnuisms.
o  Redefine _start_plabel as a data16 with @iplt(_start) as its
   value. This is the preferred way to create user PLT entries.

20 years agoFix a minor error in pipe_stat - st_size was always reported as 0
Mike Silbersack [Tue, 20 Jul 2004 07:06:43 +0000 (07:06 +0000)]
Fix a minor error in pipe_stat - st_size was always reported as 0
when direct writes kicked in.  Whether this affected any applications
is unknown.

20 years agoFix the creation of EFI images that got broken by the import of
Marcel Moolenaar [Tue, 20 Jul 2004 07:01:02 +0000 (07:01 +0000)]
Fix the creation of EFI images that got broken by the import of
binutils 2.15. The linker now creates a .rela.dyn section for
dynamic relocations, while our script created a .rela section.
Likewise, we copied the .rela section to the EFI image, but not
the .rela.dyn section. The fix is to rename .rela to .rela.dyn
in the linker script so that all relocations end up in the same
section again. This we copy into the EFI image.

20 years agoThe previous revision introduced a compilation error, i.e., the use of an
Alan Cox [Tue, 20 Jul 2004 06:32:32 +0000 (06:32 +0000)]
The previous revision introduced a compilation error, i.e., the use of an
undefined variable.  Correct this error.

20 years agoUse warn() instead of perror().
Tim J. Robbins [Tue, 20 Jul 2004 05:52:00 +0000 (05:52 +0000)]
Use warn() instead of perror().

20 years agoDon't output too many debug messages for bootverbose.
Hidetoshi Shimokawa [Tue, 20 Jul 2004 04:49:44 +0000 (04:49 +0000)]
Don't output too many debug messages for bootverbose.
This driver seems to be fairly stable now.

20 years agoInitialize ifp->if_output for FreeBSD-4.
Hidetoshi Shimokawa [Tue, 20 Jul 2004 04:29:33 +0000 (04:29 +0000)]
Initialize ifp->if_output for FreeBSD-4.

20 years agoAdjust packet length correctly for FreeBSD-4.
Hidetoshi Shimokawa [Tue, 20 Jul 2004 03:56:23 +0000 (03:56 +0000)]
Adjust packet length correctly for FreeBSD-4.

Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de>

20 years agoelf_cpu_load_file no longer has an __unused variable. Also, don't
Peter Grehan [Tue, 20 Jul 2004 02:40:57 +0000 (02:40 +0000)]
elf_cpu_load_file no longer has an __unused variable. Also, don't
bother syncing the icache for the special case of the kernel (id == 1),
since the loader has already done this.

__unused use reported by:  gallatin

20 years agoRemove the allpmaps list. It's unused.
Alan Cox [Tue, 20 Jul 2004 02:40:56 +0000 (02:40 +0000)]
Remove the allpmaps list.  It's unused.

Reviewed by: peter@

20 years agoProperly obey PPC context synchronization rules when modifying
Peter Grehan [Tue, 20 Jul 2004 02:22:36 +0000 (02:22 +0000)]
Properly obey PPC context synchronization rules when modifying
the address translation bits of the MSR. This fixes the boot-time
panic reported by Drew Gallatin.

20 years ago#ifdef __i386__ -> __i386__ || __amd64__
Peter Wemm [Tue, 20 Jul 2004 02:15:10 +0000 (02:15 +0000)]
#ifdef __i386__ -> __i386__ || __amd64__

20 years agoReport the number of bytes not written when complaining about failed writes
Brian Somers [Tue, 20 Jul 2004 01:42:30 +0000 (01:42 +0000)]
Report the number of bytes not written when complaining about failed writes

20 years agoMake end of frames for KSE thread, for system scope thread, without this
David Xu [Tue, 20 Jul 2004 01:38:59 +0000 (01:38 +0000)]
Make end of frames for KSE thread, for system scope thread, without this
change, debugger will dump a weird stack backtrace.

20 years agoFix printing of long doubles to match the size that
Andrew Gallatin [Mon, 19 Jul 2004 23:56:07 +0000 (23:56 +0000)]
Fix printing of long doubles to match the size  that
gcc is using.  This fixes devstat consumers (like vmstat, iostat,
systat) so they don't print crazy zillion digit numbers for
disk transfers and bandwidth.

According to gcc, long doubles are 64-bits, rather than 128 bits
like the SVR4 ABI spec wants them to be..  Note that MacOSX also treats
long doubles as 64-bits, and not 128 bits, so we are in good company.

Reviewed by: das
Approved by: grehan

20 years agoRemove extraneous locks on the VM free page queue mutex; it is not
Brian Feldman [Mon, 19 Jul 2004 23:29:36 +0000 (23:29 +0000)]
Remove extraneous locks on the VM free page queue mutex;  it is not
meant to be recursed upon, and could cauuse a deadlock inside the
new contigmalloc (vm.old_contigmalloc=0) code.

Submitted by: alc

20 years agoIdentify VIA EHCI root hubs and at least one VIA USB2.0 controller.
Benno Rice [Mon, 19 Jul 2004 23:22:10 +0000 (23:22 +0000)]
Identify VIA EHCI root hubs and at least one VIA USB2.0 controller.

20 years agoLet IN_FASTREOCOVERY macro decide if we are in recovery mode.
Jayanth Vijayaraghavan [Mon, 19 Jul 2004 22:37:33 +0000 (22:37 +0000)]
Let IN_FASTREOCOVERY macro decide if we are in recovery mode.

Nuke sackhole_limit for now. We need to add it back to limit the total
number of sack blocks in the system.

20 years agoFix a potential panic in the SACK code that was causing
Jayanth Vijayaraghavan [Mon, 19 Jul 2004 22:06:01 +0000 (22:06 +0000)]
Fix a potential panic in the SACK code that was causing
1) data to be sent to the right of snd_recover.
2) send more data then whats in the send buffer.

The fix is to postpone sack retransmit to a subsequent recovery episode
if the current retransmit pointer is beyond snd_recover.

Thanks to Mohan Srinivasan for helping fix the bug.

Submitted by:Daniel Lang

20 years agoDiff reduction to NetBSD.
Lukas Ertl [Mon, 19 Jul 2004 20:49:02 +0000 (20:49 +0000)]
Diff reduction to NetBSD.

usbdi.c rev. 1.104, author: mycroft
   ugen_isoc_rintr() may recycle the xfer immediately.  Therefore, we
   avoid touching the xfer after calling the callback in
   usb_transfer_complete().  From PR 25960.

20 years agoDiff reduction to NetBSD.
Lukas Ertl [Mon, 19 Jul 2004 20:47:46 +0000 (20:47 +0000)]
Diff reduction to NetBSD.

ehci.c rev. 1.69, author: mycroft
uhci.c rev. 1.179, author: mycroft
   hcpriv is not actually used here.  Remove references to it.

Obtained from:   NetBSD

20 years ago - Eliminate the pte object from the pmap. Instead, page table pages are
Alan Cox [Mon, 19 Jul 2004 18:12:04 +0000 (18:12 +0000)]
 - Eliminate the pte object from the pmap.  Instead, page table pages are
   allocated as "no object" pages.  Similar changes were made to the amd64
   and i386 pmap last year.  The primary reason being that maintaining
   a pte object leads to lock order violations.  A secondary reason being
   that the pte object is redundant, i.e., the page table itself can be
   used to lookup page table pages.  (Historical note: The pte object
   predates our ability to allocate "no object" pages.  Thus, the pte
   object was a necessary evil.)
 - Unconditionally check the vm object lock's status in vm_page_remove().
   Previously, this assertion could not be made on Alpha due to its use
   of a pte object.

20 years agoYou always spot the typos after you have committed.. Start sentence
Julian Elischer [Mon, 19 Jul 2004 18:06:12 +0000 (18:06 +0000)]
You always spot the typos after you have committed.. Start sentence
with a Cap.

20 years agoAllow the user who calls doadump() from the kernel debugger
Julian Elischer [Mon, 19 Jul 2004 18:03:02 +0000 (18:03 +0000)]
Allow the user who calls doadump() from the kernel debugger
to not get a page fault if he has not defined a dump device.
Panic can often not do a dump as it can hang forever in some cases.
 The original PR was for amd64 only. This is a generalised version of
that change.

PR: amd64/67712
Submitted by: wjw@withagen.nl <Willen Jan Withagen>

20 years agoFurther function forward declaration white space tweaks.
Robert Watson [Mon, 19 Jul 2004 17:18:58 +0000 (17:18 +0000)]
Further function forward declaration white space tweaks.

20 years agoRe-style at_control.c to bring it closer to style(9), primarily with
Robert Watson [Mon, 19 Jul 2004 17:15:51 +0000 (17:15 +0000)]
Re-style at_control.c to bring it closer to style(9), primarily with
regard to function prototypes and indentation.  The lack of indentation
in if clauses and case statements made this code extremely difficult
to read.

20 years agoprgregset_t changed type from being a typedef of struct reg to an
Marcel Moolenaar [Mon, 19 Jul 2004 16:54:52 +0000 (16:54 +0000)]
prgregset_t changed type from being a typedef of struct reg to an
array of one element of type struct reg. Change the argument to
libc_r_md_getgregs() accordingly.

20 years agoAs a temporary hack, turn off deferred preemptions that are the result of
John Baldwin [Mon, 19 Jul 2004 16:37:47 +0000 (16:37 +0000)]
As a temporary hack, turn off deferred preemptions that are the result of
a fast interrupt handler doing an swi_sched().  This fixed the lockups I
saw on my laptop when using xmms in KDE and on rwatson's MySQL benchmarks
on SMP.  This will eventually be removed and/or modified when I figure out
what the root cause is and fix that.

20 years agoSince breakage of malloc(9)/uma_zalloc(9) is totally non-optional in
Brian Feldman [Mon, 19 Jul 2004 15:05:24 +0000 (15:05 +0000)]
Since breakage of malloc(9)/uma_zalloc(9) is totally non-optional in
GENERIC/for WITNESS users, make sure the sysctl to disable the behavior
is read-only and always enabled.

20 years agoGuard against argv[0] being NULL.
Tim Kientzle [Mon, 19 Jul 2004 14:54:38 +0000 (14:54 +0000)]
Guard against argv[0] being NULL.

Thanks to: Tim J Robbins

20 years agoMake it clearer what means 'won't work' for .if string == ${VAR}.
Hartmut Brandt [Mon, 19 Jul 2004 14:42:57 +0000 (14:42 +0000)]
Make it clearer what means 'won't work' for .if string == ${VAR}.

Replace the use of '=' in conditionals in the examples
by the more correct '=='.

Clarify the example explaining that .for expansion takes place before
.if handling by showing the correct code instead of saying 'the other
way around'. Change a variable name there so the example is more parseable
to the human reader.

PR: docs/65400
Submitted by: Roman Neuhauser <neuhauser@chello.cz>

20 years agoAvoid passing negative values to tolower() on machines with signed chars.
Tim J. Robbins [Mon, 19 Jul 2004 12:57:24 +0000 (12:57 +0000)]
Avoid passing negative values to tolower() on machines with signed chars.

20 years agoFix a typo that could provoke a panic or access to random memory.
Hartmut Brandt [Mon, 19 Jul 2004 12:54:00 +0000 (12:54 +0000)]
Fix a typo that could provoke a panic or access to random memory.

PR: kern/67012
Submitted by: Zhenmin <zli4@cs.uiuc.edu>

20 years agoMake kdb_backtrace() sort of work.
Olivier Houchard [Mon, 19 Jul 2004 12:26:44 +0000 (12:26 +0000)]
Make kdb_backtrace() sort of work.

20 years agoEnable libpthread build for powerpc
Peter Grehan [Mon, 19 Jul 2004 12:20:10 +0000 (12:20 +0000)]
Enable libpthread build for powerpc

20 years agoPPC MD bits for KSE. Runs test cases OK. Crippled to 1:1 mode for
Peter Grehan [Mon, 19 Jul 2004 12:19:04 +0000 (12:19 +0000)]
PPC MD bits for KSE. Runs test cases OK. Crippled to 1:1 mode for
the time being.

20 years agoAdd signalcontext, required by KSE.
Peter Grehan [Mon, 19 Jul 2004 12:08:03 +0000 (12:08 +0000)]
Add signalcontext, required by KSE.

20 years agoThe new program counter should go into the trapframe's srr0 and
Peter Grehan [Mon, 19 Jul 2004 12:05:07 +0000 (12:05 +0000)]
The new program counter should go into the trapframe's srr0 and
not the link register, which was lucky enough to work.