]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoThis are the build infrastructure changes to allow to use the
Tom Rhodes [Fri, 12 Mar 2004 21:36:12 +0000 (21:36 +0000)]
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.

The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.

Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.

To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.

Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.

Problems with icc v8:
 - panic: npx0 cannot be emulated on an SMP system
 - UP: first start of /bin/sh results in a FP exception

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by: silence on -arch
Submitted by: netchild

20 years agoDo what the execve(2) manpage says and enforce what a Strictly
Ruslan Ermilov [Fri, 12 Mar 2004 21:06:20 +0000 (21:06 +0000)]
Do what the execve(2) manpage says and enforce what a Strictly
Conforming POSIX application should do by disallowing the argv
argument to be NULL.

PR: kern/33738
Submitted by: Marc Olzheim, Serge van den Boom
OK'ed by: nectar

20 years agoAllow kernel with the BOOTP option to boot when DHCP/BOOTP sets the root
Brooks Davis [Fri, 12 Mar 2004 20:37:40 +0000 (20:37 +0000)]
Allow kernel with the BOOTP option to boot when DHCP/BOOTP sets the root
path to an absolute path without a host name.  Previously, there was a
nasty POLA violation where a system would PXE boot until you added the
BOOTP option and then it would panic instead.

Reviewed by: tegge, Dirk-Willem van Gulik <dirkx at webweaving.org>
(a previous version)
Submitted by: tegge (getip function)

20 years agoThis is a temporary fix to solve a regression issue on sparc64 that
Ken Smith [Fri, 12 Mar 2004 20:35:21 +0000 (20:35 +0000)]
This is a temporary fix to solve a regression issue on sparc64 that
is caused by the way sparc64 registers its CPUs.  Nate will work on
a real fix shortly.

Approved by: njl

20 years agoRewrite sleepqueue manpage to catch up to the new sleep queue interface.
John Baldwin [Fri, 12 Mar 2004 19:07:18 +0000 (19:07 +0000)]
Rewrite sleepqueue manpage to catch up to the new sleep queue interface.

20 years ago- Remove old sleep queues.
John Baldwin [Fri, 12 Mar 2004 19:06:18 +0000 (19:06 +0000)]
- Remove old sleep queues.
- Remove sleepqueue argument from sleepq_set_timeout() since it is not
  used.

20 years agoFixup a comment.
John Baldwin [Fri, 12 Mar 2004 19:05:46 +0000 (19:05 +0000)]
Fixup a comment.

20 years agoInstead of repeating most of vt102, make mvterm reference it.
Jens Schweikhardt [Fri, 12 Mar 2004 17:41:13 +0000 (17:41 +0000)]
Instead of repeating most of vt102, make mvterm reference it.

PR: 61796
Submitted by: Daniel Rudy <root@wildfire.danielrudy.org>
MFC after: 1 week

20 years agoAdd if_ndis_pci.c and if_ndis_pccard.c so that building the NDISulator
Bill Paul [Fri, 12 Mar 2004 17:31:29 +0000 (17:31 +0000)]
Add if_ndis_pci.c and if_ndis_pccard.c so that building the NDISulator
directly into the kernel works again. Also make the 'ndisapi' entries
not depend on pccard anymore.

Forgotten by: me
Noticed by: sos

20 years agoRemove a spurious backslash at EOL to get a proper xterm-ic entry.
Jens Schweikhardt [Fri, 12 Mar 2004 17:21:48 +0000 (17:21 +0000)]
Remove a spurious backslash at EOL to get a proper xterm-ic entry.

PR: 56956
Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz>
MFC after: 1 week

20 years agoDon't set ifp->if_output to ether_output(), since ether_ifattach()
Maxime Henrion [Fri, 12 Mar 2004 17:05:06 +0000 (17:05 +0000)]
Don't set ifp->if_output to ether_output(), since ether_ifattach()
will do it for us (we either call ether_ifattach() directly, or it
gets called within ieee80211_ifattach()).

Approved by: wpaul

20 years agoMove newsyslog.conf.5 to usr.sbin/newsyslog. There is no real history
Tom Rhodes [Fri, 12 Mar 2004 16:03:26 +0000 (16:03 +0000)]
Move newsyslog.conf.5 to usr.sbin/newsyslog.  There is no real history
other than 'initial revision' thus I did not request a repocopy.

Requested by:   ru, gad

20 years agoUnremoved a used variable in the PCCARD_ARCH case.
Bruce Evans [Fri, 12 Mar 2004 15:28:13 +0000 (15:28 +0000)]
Unremoved a used variable in the PCCARD_ARCH case.

Reported by: tinderbox

20 years agoHide internal implementation details of UID/GID checks from the user.
Ruslan Ermilov [Fri, 12 Mar 2004 13:24:17 +0000 (13:24 +0000)]
Hide internal implementation details of UID/GID checks from the user.

20 years agoUse find(1) instead of ``pw groupshow'' to detect missing groups.
Ruslan Ermilov [Fri, 12 Mar 2004 13:20:24 +0000 (13:20 +0000)]
Use find(1) instead of ``pw groupshow'' to detect missing groups.
Restore checks for recently added PF groups.

Reviewed by: mlaier

20 years agoAdd id(1) (aka groups(1) aka whoami(1)) since it is used by install.sh.
Dag-Erling Smørgrav [Fri, 12 Mar 2004 13:10:04 +0000 (13:10 +0000)]
Add id(1) (aka groups(1) aka whoami(1)) since it is used by install.sh.

20 years agoTHe log message for the previous commit should have said:
Bruce Evans [Fri, 12 Mar 2004 12:05:38 +0000 (12:05 +0000)]
THe log message for the previous commit should have said:

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
PR: standards/56906

20 years agoReplace a manual check of a VMIO candidate with vn_canvmio(). This
Dag-Erling Smørgrav [Fri, 12 Mar 2004 12:02:12 +0000 (12:02 +0000)]
Replace a manual check of a VMIO candidate with vn_canvmio().  This
silences an annoying warning in getblk() when VMIO'ing on a directory
vnode, which can happen when vfs.vmiodirenable is 1.

Bring the warning message in line with reality at the same time.

Submitted by: hmp

20 years agoInitial support for C99's (or is it POSIX.1-2001's?) MATH_ERRNO,
Bruce Evans [Fri, 12 Mar 2004 12:02:03 +0000 (12:02 +0000)]
Initial support for C99's (or is it POSIX.1-2001's?) MATH_ERRNO,
MATH_ERREXCEPTION and math_errhandling, so that C99 applications at
least have the possibility of determining that errno is not set for
math functions.  Set math_errhandling to the non-standard-conforming
value of 0 for now to indicate that we don't support either method
of reporting errors.  We intentionally don't support MATH_ERRNO
because errno is a mistake, and we are missing support for
MATH_ERREXCEPTION (<fenv.h>, compiler support for <fenv.h>, and
actually setting the exception flags correctly).

20 years agoDo not print a warning about net.inet.pim.stats if errno is
Dag-Erling Smørgrav [Fri, 12 Mar 2004 11:22:50 +0000 (11:22 +0000)]
Do not print a warning about net.inet.pim.stats if errno is
ENOENT, because that means we do not have PIM in the kernel.

Submitted by: hmp
MFC after: 1 week

20 years agoFix copy&paste-o.
Poul-Henning Kamp [Fri, 12 Mar 2004 06:51:21 +0000 (06:51 +0000)]
Fix copy&paste-o.

Spotted by: iedowse

20 years agoIf /conf/diskless_remount exists, use it to remount the entire /conf
Brooks Davis [Fri, 12 Mar 2004 04:40:16 +0000 (04:40 +0000)]
If /conf/diskless_remount exists, use it to remount the entire /conf
directory.  This allows multiple roots (say for different architectures)
to share the same set of /conf files.

20 years agoUse 'pw groupshow' instead of 'id -g' to see if a group exists.
Gregory Neil Shapiro [Fri, 12 Mar 2004 03:46:15 +0000 (03:46 +0000)]
Use 'pw groupshow' instead of 'id -g' to see if a group exists.

PR: 64073
Submitted by: jhb
MFC after: 5 days

20 years agoPart 2 of rev 1.68. Update comment to match reality now that vm_endcopy
Peter Wemm [Fri, 12 Mar 2004 00:16:48 +0000 (00:16 +0000)]
Part 2 of rev 1.68.  Update comment to match reality now that vm_endcopy
exists and we no longer copy to the end of the struct.

Forgotten by:  alfred and green

20 years agomdoc(7): New sentence should start on new line.
Pawel Jakub Dawidek [Thu, 11 Mar 2004 22:22:03 +0000 (22:22 +0000)]
mdoc(7): New sentence should start on new line.

Pointed out by: hmp

20 years agoTurn on logging for tftpd.
Dag-Erling Smørgrav [Thu, 11 Mar 2004 22:15:28 +0000 (22:15 +0000)]
Turn on logging for tftpd.

20 years agoDon't run fsck if there's no /etc/fstab.
Tim Kientzle [Thu, 11 Mar 2004 20:00:10 +0000 (20:00 +0000)]
Don't run fsck if there's no /etc/fstab.

In particular, this allows a "virgin" system installed from
source (installworld, installkernel, cd etc && make distribution)
to boot correctly and modestly simplifies the creation
of single-partition network/cdrom/CF bootable images.

20 years agoAdd reference to the g_access(9) manual page.
Pawel Jakub Dawidek [Thu, 11 Mar 2004 19:53:22 +0000 (19:53 +0000)]
Add reference to the g_access(9) manual page.

20 years agoConnect g_access(9) to the build.
Pawel Jakub Dawidek [Thu, 11 Mar 2004 19:51:14 +0000 (19:51 +0000)]
Connect g_access(9) to the build.

20 years agoAdd manual page for g_access(9) GEOM function.
Pawel Jakub Dawidek [Thu, 11 Mar 2004 19:23:48 +0000 (19:23 +0000)]
Add manual page for g_access(9) GEOM function.

20 years agoWhen I was a kid my work table was one cluttered mess an cleaning it up
Poul-Henning Kamp [Thu, 11 Mar 2004 18:50:33 +0000 (18:50 +0000)]
When I was a kid my work table was one cluttered mess an cleaning it up
were a rather overwhelming task.  I soon learned that if you don't know
where you're going to store something, at least try to pile it next to
something slightly related in the hope that a pattern emerges.

Apply the same principle to the ffs/snapshot/softupdates code which have
leaked into specfs:  Add yet a buf-quasi-method and call it from the
only two places I can see it can make a difference and implement the
magic in ffs_softdep.c where it belongs.

It's not pretty, but at least it's one less layer violated.

20 years agoRemove unused variables.
John Baldwin [Thu, 11 Mar 2004 18:50:05 +0000 (18:50 +0000)]
Remove unused variables.

20 years ago- Use variable names instead of numbers for the script arguments to
Simon L. B. Nielsen [Thu, 11 Mar 2004 18:12:48 +0000 (18:12 +0000)]
- Use variable names instead of numbers for the script arguments to
  improve readability.
- Use mktemp to create the temporary files and directory.
- Mount temporary md(4) backed file system on a temporary directory,
  instead of /mnt.

Approved by: phk

20 years agoThis commit was generated by cvs2svn to compensate for changes in r126854,
Dag-Erling Smørgrav [Thu, 11 Mar 2004 18:04:03 +0000 (18:04 +0000)]
This commit was generated by cvs2svn to compensate for changes in r126854,
which included commits to RCS files with non-trunk default branches.

20 years agoMFP4 (#47094): avoid bogus NULL pointer warnings when building with -DDEBUG.
Dag-Erling Smørgrav [Thu, 11 Mar 2004 18:04:03 +0000 (18:04 +0000)]
MFP4 (#47094): avoid bogus NULL pointer warnings when building with -DDEBUG.

20 years agoProperly vector all bwrite() and BUF_WRITE() calls through the same path
Poul-Henning Kamp [Thu, 11 Mar 2004 18:02:36 +0000 (18:02 +0000)]
Properly vector all bwrite() and BUF_WRITE() calls through the same path
and s/BUF_WRITE()/bwrite()/ since it now does the same as bwrite().

20 years agoRemove unused mnt_reservedvnlist field.
Poul-Henning Kamp [Thu, 11 Mar 2004 16:59:57 +0000 (16:59 +0000)]
Remove unused mnt_reservedvnlist field.

20 years agoRemove unused second arg to vfinddev().
Poul-Henning Kamp [Thu, 11 Mar 2004 16:33:11 +0000 (16:33 +0000)]
Remove unused second arg to vfinddev().
Don't call addaliasu() on VBLK nodes.

20 years agoProperly count references of our dev_t to avoid triggering a KASSERT in
Lukas Ertl [Thu, 11 Mar 2004 14:11:08 +0000 (14:11 +0000)]
Properly count references of our dev_t to avoid triggering a KASSERT in
dev_strategy().

Submitted by:   dwmalone
Approved by:    grog (mentor)

20 years agoCorrectly account for extra bits in unit numbers when looking for
Poul-Henning Kamp [Thu, 11 Mar 2004 14:11:02 +0000 (14:11 +0000)]
Correctly account for extra bits in unit numbers when looking for
next free unit.

20 years agoAdd yet another VIA pci id.
Søren Schmidt [Thu, 11 Mar 2004 14:08:11 +0000 (14:08 +0000)]
Add yet another VIA pci id.

20 years agoStop setting ifp->if_output to ether_output() since ether_ifattach()
Maxime Henrion [Thu, 11 Mar 2004 14:04:59 +0000 (14:04 +0000)]
Stop setting ifp->if_output to ether_output() since ether_ifattach()
does it for us already.

20 years agoDon't implement anything in the ffs family in <machine/cpufunc.h>
Bruce Evans [Thu, 11 Mar 2004 13:38:54 +0000 (13:38 +0000)]
Don't implement anything in the ffs family in <machine/cpufunc.h>
in the non-_KERNEL case.  This "fixes" applications that include
this "kernel-only" header and also include <strings.h> (or get
<strings.h> via the default _BSD_VISIBLE pollution in <string.h>.
In C++ there was a fatal error: the declaration specifies C linkage
but the implementation gives C++ linkage.  In C there was only a
static/extern mismatch if the headers were included in a certain order
order, and a partially redundant declaration for all include orders;
gcc emits incomplete or wrong diagnostics for these, but only for
compiling with -Wsystem-headers and certain other warning options, so
the problem was usually not seen for C.

Ports breakage reported by: kris

20 years agoAdd clone_setup() function rather than rely on lazy initialization.
Poul-Henning Kamp [Thu, 11 Mar 2004 12:58:55 +0000 (12:58 +0000)]
Add clone_setup() function rather than rely on lazy initialization.

Requested by: rwatson

20 years agoFixed assorted misuses of NULL in integer context.
Bruce Evans [Thu, 11 Mar 2004 11:58:16 +0000 (11:58 +0000)]
Fixed assorted misuses of NULL in integer context.

20 years agoFixed mispellings of '\0' as NULL.
Bruce Evans [Thu, 11 Mar 2004 11:41:54 +0000 (11:41 +0000)]
Fixed mispellings of '\0' as NULL.

20 years agoFixed a misspelling of 0 as NULL.
Bruce Evans [Thu, 11 Mar 2004 11:30:57 +0000 (11:30 +0000)]
Fixed a misspelling of 0 as NULL.

Fixed a nearby bug.  The "play it safe" code in dosysctl() was unsafe
because it overran the buffer by 1 if sysctl() filled all of the buffer.

Fixed a nearby style bug in output.  Not just 1, but 2 extra newlines
were printed at the end by "vmstat -m" and "vmstat -z".  Don't print
any newlines explicitly.  This depends on 2 of the many formatting
bugs in the corresponding sysctls.  First, the sysctls return an extra
newline at the end of the strings.  This also messes up output from
sysctl(8).  Second, the sysctls return an extra newline at the beginning
of the strings.  This is good for separating the 2 tables output by
"vmstat -mz" and for starting the header on a new line in plain sysctl
output, but gives a bogus extra newline at the beginning for "vm -[m | z]"
and "sysctl -n [kern.malloc | vm.zone]".

Fixed some nearby style bugs in the source code:
- the same line that misspelled 0 as NULL also spelled NULL as 0.
- the size was doubled twice in the realloc loop.
- the "play it safe" comment was misleading.  Terminating the buffer
  is bogus because dosysctl() is only meant to work with sysctls that
  return strings and the terminator is part of a string.  However, the
  kern.malloc sysctl has more than style bugs.  It also doesn't return
  a string.  Termination is needed to work around this bug.

20 years agoReplace <iostream.h> with <iostream> to remove annoying warning
Josef El-Rayes [Thu, 11 Mar 2004 10:43:35 +0000 (10:43 +0000)]
Replace <iostream.h> with <iostream> to remove annoying warning
of using deprecated header.

Approved by:    dwhite, simon(mentor)
Reviewed by:    mlaier
Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>
PR:             bin/63781

20 years agoFixed a misspelling of '\0' as NULL.
Bruce Evans [Thu, 11 Mar 2004 10:22:25 +0000 (10:22 +0000)]
Fixed a misspelling of '\0' as NULL.

20 years agoFixed misspellings of 0 as NULL.
Bruce Evans [Thu, 11 Mar 2004 10:19:45 +0000 (10:19 +0000)]
Fixed misspellings of 0 as NULL.

20 years agoFixed misspellings of '\0' as NULL.
Bruce Evans [Thu, 11 Mar 2004 10:12:05 +0000 (10:12 +0000)]
Fixed misspellings of '\0' as NULL.

20 years agoFixed a misspelling of 0 as NULL.
Bruce Evans [Thu, 11 Mar 2004 10:09:01 +0000 (10:09 +0000)]
Fixed a misspelling of 0 as NULL.

20 years agoFixed misspellings of 0 as NULL.
Bruce Evans [Thu, 11 Mar 2004 10:01:12 +0000 (10:01 +0000)]
Fixed misspellings of 0 as NULL.

20 years agoFixed misspellings of 0 as NULL.
Bruce Evans [Thu, 11 Mar 2004 09:56:04 +0000 (09:56 +0000)]
Fixed misspellings of 0 as NULL.

20 years agoFix mind-o: sanity check in ndis_disable_ndis() is not sane.
Bill Paul [Thu, 11 Mar 2004 09:50:00 +0000 (09:50 +0000)]
Fix mind-o: sanity check in ndis_disable_ndis() is not sane.

20 years agoFix the problem with the Cisco Aironet 340 PCMCIA card. Most newer drivers
Bill Paul [Thu, 11 Mar 2004 09:40:00 +0000 (09:40 +0000)]
Fix the problem with the Cisco Aironet 340 PCMCIA card. Most newer drivers
for Windows are deserialized miniports. Such drivers maintain their own
queues and do their own locking. This particular driver is not deserialized
though, and we need special support to handle it correctly.

Typically, in the ndis_rxeof() handler, we pass all incoming packets
directly to (*ifp->if_input)(). This in turn may cause another thread
to run and preempt us, and the packet may actually be processed and
then released before we even exit the ndis_rxeof() routine. The
problem with this is that releasing a packet calls the ndis_return_packet()
function, which hands the packet and its buffers back to the driver.
Calling ndis_return_packet() before ndis_rxeof() returns will screw
up the driver's internal queues since, not being deserialized,
it does no locking.

To avoid this problem, if we detect a serialized driver (by checking
the attribute flags passed to NdisSetAttributesEx(), we use an alternate
ndis_rxeof() handler, ndis_rxeof_serial(), which puts the call to
(*ifp->if_input)() on the NDIS SWI work queue. This guarantees the
packet won't be processed until after ndis_rxeof_serial() returns.

Note that another approach is to always copy the packet data into
another mbuf and just let the driver retain ownership of the ndis_packet
structure (ndis_return_packet() never needs to be called in this
case). I'm not sure which method is faster.

20 years agoBe more insistent on destroying geoms at unload time. Still not perfect,
Poul-Henning Kamp [Thu, 11 Mar 2004 08:16:23 +0000 (08:16 +0000)]
Be more insistent on destroying geoms at unload time.  Still not perfect,
but it will do (better) for now.

KASSERT that to have providers a class must have an access method.

Tag the new_provider event with the geom as well.

20 years agoAdd a newsyslog.conf manual page. This follows suit with the other utilities
Tom Rhodes [Thu, 11 Mar 2004 04:35:08 +0000 (04:35 +0000)]
Add a newsyslog.conf manual page.  This follows suit with the other utilities
which have configuration files.  This is just a cut-paste from newsyslog.8
with the following changes:

o Kill hard sentence breaks.
o Markup fixes.
o Wordsmithing.

20 years agoRemove information about the configuration file.
Tom Rhodes [Thu, 11 Mar 2004 04:32:16 +0000 (04:32 +0000)]
Remove information about the configuration file.
Add an Xref to newsyslog.conf.5 and bzip2.1.

20 years agoBack out id -g checks as they are wrong (sendmail group untouched).
Max Laier [Thu, 11 Mar 2004 00:22:04 +0000 (00:22 +0000)]
Back out id -g checks as they are wrong (sendmail group untouched).

Requested by: dwhite
Approve by: dwhite

20 years agoRemove stale or broken call to kdb_trap() and protected by the non-
Marcel Moolenaar [Thu, 11 Mar 2004 00:17:45 +0000 (00:17 +0000)]
Remove stale or broken call to kdb_trap() and protected by the non-
option KDB. Besides being wrong, it also interferes with ongoing
work.

20 years agoGive xterm-basic the le entry. bs should be avoided.
Jens Schweikhardt [Wed, 10 Mar 2004 22:38:32 +0000 (22:38 +0000)]
Give xterm-basic the le entry. bs should be avoided.
This is a prerequisite to fix

PR: bin/48679
Discussed with: Thomas Dickey (xterm termcap maintainer)
MFC after: 2 weeks

20 years agoA manpage for ng_eiface(4).
Ruslan Ermilov [Wed, 10 Mar 2004 22:25:25 +0000 (22:25 +0000)]
A manpage for ng_eiface(4).

Submitted by: Gleb Smirnoff

20 years agoIdentify the Deerfield processor. Deerfield is a low-voltage variant
Marcel Moolenaar [Wed, 10 Mar 2004 22:23:20 +0000 (22:23 +0000)]
Identify the Deerfield processor. Deerfield is a low-voltage variant
based on the Madison core and targeting the low end of the spectrum.
Its clock frequency is 1Ghz, whereas Madison starts at 1.3Ghz. Since
the CPUID information is the same for Madison and Deerfield, we use
the clock frequency to identify the processor.
Supposedly the Deerfield only uses 62W, which seems to be less than
modern Xeon processors (about 70W) and about half what a Madison would
need.

20 years agoReworked the fix to print the useful line number on error in
Ruslan Ermilov [Wed, 10 Mar 2004 21:51:06 +0000 (21:51 +0000)]
Reworked the fix to print the useful line number on error in
the .for loop:

- Replaced four global variables in parse.c with one.
- Made Parse_FromString() accept the "lineno" as an argument.
- Fixed line numbering when there are escaped newlines in the
  body of the .for loop.

Adopted from: NetBSD

20 years agoDon't call devsw() more than we need to, and in particular do not expose
Poul-Henning Kamp [Wed, 10 Mar 2004 20:56:28 +0000 (20:56 +0000)]
Don't call devsw() more than we need to, and in particular do not expose
ourselves to device removal by not checking for it the second time.

Use count_dev(dev) rather than vcount(vp)

20 years agoMake the extern for adv_mcode match the reality: it's u_int8_t, but
Poul-Henning Kamp [Wed, 10 Mar 2004 20:52:47 +0000 (20:52 +0000)]
Make the extern for adv_mcode match the reality: it's u_int8_t, but
probably unendiansafely used as u_int16_t.

20 years agoFix a long-standing deadlock issue with vnode backed md(4) devices:
Poul-Henning Kamp [Wed, 10 Mar 2004 20:41:09 +0000 (20:41 +0000)]
Fix a long-standing deadlock issue with vnode backed md(4) devices:

On vnode backed md(4) devices over a certain, currently undetermined
size relative to the buffer cache our "lemming-syncer" can provoke
a buffer starvation which puts the md thread to sleep on wdrain.

This generally tends to grind the entire system to a stop because the
event that is supposed to wake up the thread will not happen until a fair
bit of the piled up I/O requests in the system finish, and since a lot
of those are on a md(4) vnode backed device which is currently waiting
on wdrain until a fair amount of the piled up ... you get the picture.

The cure is to issue all VOP_WRITES on the vnode backing the device
with IO_SYNC.

In addition to more closely emulating a real disk device with a
non-lying write-cache, this makes the writes exempt from rate-limited
(there to avoid starving the buffer cache) and consequently prevents
the deadlock.

Unfortunately performance takes a hit.

Add "async" option to give people who know what they are doing the
old behaviour.

20 years agoAdd an option to write collected data to file in binary format. This
Poul-Henning Kamp [Wed, 10 Mar 2004 20:30:19 +0000 (20:30 +0000)]
Add an option to write collected data to file in binary format.  This
is very useful for collecting test-data for trial runs.

20 years agoUndo the previous commit, which was just plain wrong, and then correctly
Garance A Drosehn [Wed, 10 Mar 2004 19:47:57 +0000 (19:47 +0000)]
Undo the previous commit, which was just plain wrong, and then correctly
increase _FreeBSD_version to reflect the 64-bTT change on sparc64.

Noticed by: kris
Pointy hat to: gad

20 years agoIncrease __FreeBSD_version to reflect the transition from 32-bit to
Garance A Drosehn [Wed, 10 Mar 2004 17:40:55 +0000 (17:40 +0000)]
Increase __FreeBSD_version to reflect the transition from 32-bit to
64-bit time_t on the FreeBSD/sparc64 architecture.

20 years agoChange time_t from a 32-bit value to a 64-bit value, on FreeBSD/sparc64
Garance A Drosehn [Wed, 10 Mar 2004 17:39:05 +0000 (17:39 +0000)]
Change time_t from a 32-bit value to a 64-bit value, on FreeBSD/sparc64
only.  This is a  MAJOR  incompatible change for the sparc64 platform,
but will not effect FreeBSD on other architectures.

Reviewed by: imp for UPDATING, freebsd-sparc for the change itself.

20 years agoEliminate multiple __FBSDID and sys/cdefs.h.
Bruce M Simpson [Wed, 10 Mar 2004 17:03:27 +0000 (17:03 +0000)]
Eliminate multiple __FBSDID and sys/cdefs.h.

20 years agoAdd installcheck for proxy:proxy and authpf.
Max Laier [Wed, 10 Mar 2004 16:34:11 +0000 (16:34 +0000)]
Add installcheck for proxy:proxy and authpf.

Suggested by: ru
Approved by: bms(mentor)

20 years ago- Document cv_broadcastpri().
John Baldwin [Wed, 10 Mar 2004 15:57:25 +0000 (15:57 +0000)]
- Document cv_broadcastpri().
- Remove references to cv_waitq_*() as they no longer exist.

20 years agoRemove `$Name$' leftovers from the port version reporting.
Max Laier [Wed, 10 Mar 2004 15:08:21 +0000 (15:08 +0000)]
Remove `$Name$' leftovers from the port version reporting.

Noticed by: Craig Rodrigues
Approved by: bms(mentor)

20 years agoftp-proxy no longer lives in /usr/local/...
Max Laier [Wed, 10 Mar 2004 15:06:17 +0000 (15:06 +0000)]
ftp-proxy no longer lives in /usr/local/...

Noticed by: Pyun YongHyeon
Approved by: bms(mentor)

20 years agoAdd trailing collon
Max Laier [Wed, 10 Mar 2004 15:04:29 +0000 (15:04 +0000)]
Add trailing collon

Noticed by: dwhite
Approved by: bms(mentor)

20 years agoSet stream orientation in ungetc() instead of __ungetc(). This avoids
Tim J. Robbins [Wed, 10 Mar 2004 12:41:11 +0000 (12:41 +0000)]
Set stream orientation in ungetc() instead of __ungetc(). This avoids
setting it redundantly when called from ungetwc(), vfscanf() etc.,
which already set the orientation.

20 years agoRemove duplicate check for EOF from ungetc(); __ungetc() already checks.
Tim J. Robbins [Wed, 10 Mar 2004 11:13:23 +0000 (11:13 +0000)]
Remove duplicate check for EOF from ungetc(); __ungetc() already checks.

20 years agoWe don't retain 'x' bits in CVS so explicity use sh to run script.
Poul-Henning Kamp [Wed, 10 Mar 2004 11:11:58 +0000 (11:11 +0000)]
We don't retain 'x' bits in CVS so explicity use sh to run script.

20 years agoCall __sputc() directly in fputc() instead of taking an expensive
Tim J. Robbins [Wed, 10 Mar 2004 10:49:45 +0000 (10:49 +0000)]
Call __sputc() directly in fputc() instead of taking an expensive
detour through putc().

20 years agoAdd first cut at "nanobsd":
Poul-Henning Kamp [Wed, 10 Mar 2004 10:28:33 +0000 (10:28 +0000)]
Add first cut at "nanobsd":

Nanobsd should make it very simple for people to create (CF-)disk images
for embedded us of FreeBSD.

Currently only works for 256MB disks.  More agrressive shaving of the
build image can reduce that much further.

20 years agoCall __sgetc() directly in getchar() instead of taking an expensive
Tim J. Robbins [Wed, 10 Mar 2004 10:24:15 +0000 (10:24 +0000)]
Call __sgetc() directly in getchar() instead of taking an expensive
detour through getc().

20 years agoUse the external clock input for our PLL.
Poul-Henning Kamp [Wed, 10 Mar 2004 10:10:46 +0000 (10:10 +0000)]
Use the external clock input for our PLL.

This may not be a generally valid configuration, but neither is relying
on the PCI clock to be stable.

The only currently known and supported hardware is the VPN14x1 from
Soekris, and since it has external clock, we fail safe(r) by using
it.

Unfortunately there is no way to probe this reliably.

20 years agoSet the stream orientation explicitly in fgetln() instead of relying on
Tim J. Robbins [Wed, 10 Mar 2004 09:28:38 +0000 (09:28 +0000)]
Set the stream orientation explicitly in fgetln() instead of relying on
__srefill() to do it.

20 years agoRemove the /* 1.2 */ comment which was orphaned by previous commit.
Poul-Henning Kamp [Wed, 10 Mar 2004 09:23:27 +0000 (09:23 +0000)]
Remove the /* 1.2 */ comment which was orphaned by previous commit.

20 years agoSet stream orientation in puts().
Tim J. Robbins [Wed, 10 Mar 2004 09:15:38 +0000 (09:15 +0000)]
Set stream orientation in puts().

20 years agoPut libypclnt behind NO_YP_LIBC
Poul-Henning Kamp [Wed, 10 Mar 2004 08:58:06 +0000 (08:58 +0000)]
Put libypclnt behind NO_YP_LIBC

20 years agoRearrange some of the GEOM debugging tools to be more structured.
Poul-Henning Kamp [Wed, 10 Mar 2004 08:49:08 +0000 (08:49 +0000)]
Rearrange some of the GEOM debugging tools to be more structured.

  Retire g_sanity() and corresponding debugflag (0x8)

  Retire g_{stall,release}_events().

  Under #ifdef DIAGNOSTIC:

    Make g_valid_obj() an official function and have it return an an
    non-zero integer which indicates the kind of object when found.

    Implement G_VALID_{CLASS,GEOM,CONSUMER,PROVIDER}() macros based
    on g_valid_obj().

    Sprinkle calls to these macros liberally over the infrastructure.

    Always check that we do not free a live object.

20 years agoFixed a misspelling of 0 as NULL.
Bruce Evans [Wed, 10 Mar 2004 08:46:39 +0000 (08:46 +0000)]
Fixed a misspelling of 0 as NULL.

20 years agoFix handling of tap/vmnet flag in relation to cloning and properly enforce
Poul-Henning Kamp [Wed, 10 Mar 2004 08:02:29 +0000 (08:02 +0000)]
Fix handling of tap/vmnet flag in relation to cloning and properly enforce
largest supported unit number for this device driver.

Reported by: Kaho Toshikazu <kaho@easy.es.tuat.ac.jp>

20 years agoFix several issues related to the KeInitializeTimer() etc... API stuff
Bill Paul [Wed, 10 Mar 2004 07:43:11 +0000 (07:43 +0000)]
Fix several issues related to the KeInitializeTimer() etc... API stuff
that I added recently:

- When a periodic timer fires, it's automatically re-armed. We must
  make sure to re-arm the timer _before_ invoking any caller-supplied
  defered procedure call: the DPC may choose to call KeCancelTimer(),
  and re-arming the timer after the DPC un-does the effect of the
  cancel.

- Fix similar issue with periodic timers in subr_ndis.c.

- When calling KeSetTimer() or KeSetTimerEx(), if the timer is
  already pending, untimeout() it first before timeout()ing
  it again.

- The old Atheros driver for the 5211 seems to use KeSetTimerEx()
  incorrectly, or at the very least in a very strange way that
  doesn't quite follow the Microsoft documentation. In one case,
  it calls KeSetTimerEx() with a duetime of 0 and a period of 5000.
  The Microsoft documentation says that negative duetime values
  are relative to the current time and positive values are absolute.
  But it doesn't say what's supposed to happen with positive values
  that less than the current time, i.e. absolute values that are
  in the past.

  Lacking any further information, I have decided that timers with
  positive duetimes that are in the past should fire right away (or
  in our case, after only 1 tick). This also takes care of the other
  strange usage in the Atheros driver, where the duetime is
  specified as 500000 and the period is 50. I think someone may
  have meant to use -500000 and misinterpreted the documentation.

- Also modified KeWaitForSingleObject() and KeWaitForMultipleObjects()
  to make the same duetime adjustment, since they have the same rules
  regarding timeout values.

- Cosmetic: change name of 'timeout' variable in KeWaitForSingleObject()
  and KeWaitForMultipleObjects() to 'duetime' to avoid senseless
  (though harmless) overlap with timeout() function name.

With these fixes, I can get the 5211 card to associate properly with
my adhoc net using driver AR5211.SYS version 2.4.1.6.

20 years agoMove the AH algorithm list from a static local function variable to
Robert Watson [Wed, 10 Mar 2004 04:56:54 +0000 (04:56 +0000)]
Move the AH algorithm list from a static local function variable to
a static const global variable in ah_core.c.  This makes it more clear
that this array does not require synchronization, as well as
synchronizing the layout to the ESP algorithm list.  This is the
version of my patch that Itojun committed to the KAME tree.

Obtained from: me, via KAME

20 years ago - Make the acquisition of Giant in vm_fault_unwire() conditional on the
Alan Cox [Wed, 10 Mar 2004 04:44:43 +0000 (04:44 +0000)]
 - Make the acquisition of Giant in vm_fault_unwire() conditional on the
   pmap.  For the kernel pmap, Giant is not required.  In general, for
   other pmaps, Giant is required by i386's pmap_pte() implementation.
   Specifically, the use of PMAP2/PADDR2 is synchronized by Giant.
   Note: In principle, updates to the kernel pmap's wired count could be
   lost without Giant.  However, in practice, we never use the kernel
   pmap's wired count.  This will be resolved when pmap locking appears.
 - With the above change, cpu_thread_clean() and uma_large_free() need
   not acquire Giant.  (The first case is simply the revival of
   i386/i386/vm_machdep.c's revision 1.226 by peter.)

20 years agoLock down IP-layer encapsulation library:
Robert Watson [Wed, 10 Mar 2004 02:48:50 +0000 (02:48 +0000)]
Lock down IP-layer encapsulation library:

 - Add encapmtx to protect ip_encap.c global variables (encapsulation
   list).
 - Unifdef #ifdef 0 pieces of encap_init() which was (and now really
   is) basically a no-op.
 - Lock encapmtx when walking encaptab, modifying it, comparing
   entries, etc.
 - Remove spl's.

Note that currently there's no facilite to make sure outstanding
use of encapsulation methods on a table entry have drained bfore
we allow a table entry to be removed.  As such, it's currently the
caller's responsibility to make sure that draining takes place.

Reviewed by: mlaier

20 years agoScrub unused variable zeroin_addr.
Robert Watson [Wed, 10 Mar 2004 01:01:04 +0000 (01:01 +0000)]
Scrub unused variable zeroin_addr.

20 years agomake sure we had the filedesc lock when calling fdinit when RFCFDG is set
John-Mark Gurney [Wed, 10 Mar 2004 00:27:36 +0000 (00:27 +0000)]
make sure we had the filedesc lock when calling fdinit when RFCFDG is set
on call to rfork.

Submitted by: Brian Buchanan
Semi-Reviewed by: rwatson

20 years agoAnother April Fool signs up.
Peter Edwards [Wed, 10 Mar 2004 00:06:01 +0000 (00:06 +0000)]
Another April Fool signs up.

20 years agoConst-poison ethernet and FDDI broadcast address constants, as they
Robert Watson [Tue, 9 Mar 2004 23:55:59 +0000 (23:55 +0000)]
Const-poison ethernet and FDDI broadcast address constants, as they
are accessed read-only.