]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoAdd support for writing Intel MatrixRAID arrays.
sos [Mon, 5 Dec 2005 17:33:57 +0000 (17:33 +0000)]
Add support for writing Intel MatrixRAID arrays.
Do a little better on handling volumes as well, however we cant create
multiple volumes from FreeBSD yet.

HW sponsored by:        Mullet Scandinavia AB

18 years agoDocument the public targets and make variables supported by the
jkoshy [Mon, 5 Dec 2005 16:59:45 +0000 (16:59 +0000)]
Document the public targets and make variables supported by the
build system.

Reviewed by: ru (multiple passes)

18 years agoPrepare for MACHINE and hw.machine switching to "pc98" on FreeBSD/pc98.
ru [Mon, 5 Dec 2005 14:22:12 +0000 (14:22 +0000)]
Prepare for MACHINE and hw.machine switching to "pc98" on FreeBSD/pc98.

Reviewed by: nyan

18 years agoAdd a simple KVM tool to dump the kernel state of UMA, including walking
rwatson [Mon, 5 Dec 2005 13:04:00 +0000 (13:04 +0000)]
Add a simple KVM tool to dump the kernel state of UMA, including walking
the keg/zone lists, summarizing cache state, and walking bucket lists in
each zone.  I seem to get inconsistent results on SMP, possibly due to
local header problems, but it seems to work quite well on UP.  This tool
requires sufficient privilege to read /dev/mem (or a core dump), and is
for debugging purposes rather than administrative monitoring purposes
(use vmstat instead).

18 years agoTry to use contigmalloc() even if M_NOWAIT has been specified.
cognet [Mon, 5 Dec 2005 12:58:44 +0000 (12:58 +0000)]
Try to use contigmalloc() even if M_NOWAIT has been specified.

18 years agoTeach the elf trampoline how to deal with gzipped kernels.
cognet [Mon, 5 Dec 2005 12:55:46 +0000 (12:55 +0000)]
Teach the elf trampoline how to deal with gzipped kernels.

18 years ago- Rev. 1.175 fixed compilation on sparc64 but also backed out zeroing of
marius [Mon, 5 Dec 2005 12:32:20 +0000 (12:32 +0000)]
- Rev. 1.175 fixed compilation on sparc64 but also backed out zeroing of
  the eaddr array (introduced in rev. 1.174) prior to writing to it. As
  dc_read_eeprom() is told to write only 3 16-bit words to eaddr but eaddr
  in fact is somewhat larger removal of the zeroing defeated the check
  whether the MAC address is all zero as there can be some random garbage
  in eaddr past the 3 words written to it and the check verifys all bits
  in eaddr. Solve this by changing the check to verify only the 3 words
  (happenning to be ETHER_ADDR_LEN bytes) written to eaddr.
- While here change the notation of "FCode" in a nearby comment to the
  official way.

Ok'ed by: marcel, ru

18 years agoFix -Wundef warnings found when compiling i386 LINT, GENERIC and
ru [Mon, 5 Dec 2005 11:58:35 +0000 (11:58 +0000)]
Fix -Wundef warnings found when compiling i386 LINT, GENERIC and
custom kernels.

18 years agoFix markup.
davidxu [Mon, 5 Dec 2005 09:31:49 +0000 (09:31 +0000)]
Fix markup.

Submitted by: ru

18 years agoFix markup.
davidxu [Mon, 5 Dec 2005 09:31:23 +0000 (09:31 +0000)]
Fix markup.

18 years agoBump __FreeBSD_version to reflect removal of MNT_NODEV mount option.
rodrigc [Mon, 5 Dec 2005 09:13:35 +0000 (09:13 +0000)]
Bump __FreeBSD_version to reflect removal of MNT_NODEV mount option.

Requested by: marcus

18 years agoAdd an MLINKS entry for times.1.
stefanf [Mon, 5 Dec 2005 08:01:10 +0000 (08:01 +0000)]
Add an MLINKS entry for times.1.

Noticed by: ru

18 years agoChange how *.sh scripts are handled. If the script is in /etc/rc.d,
dougb [Mon, 5 Dec 2005 07:04:15 +0000 (07:04 +0000)]
Change how *.sh scripts are handled. If the script is in /etc/rc.d,
source it into the shell. If not, handle it in a subshell the same
way that "real" rc.d-style scripts are handled. This will dramatically
ease the "process local scripts in the base rcorder" transition.

Add *.bak to the list of files in */rc.d that we ignore.

18 years agoCanonify, correct, and add citations related to Douglas Adams' work.
dougb [Mon, 5 Dec 2005 06:47:23 +0000 (06:47 +0000)]
Canonify, correct, and add citations related to Douglas Adams' work.
Correct a quotation from Hitchhiker's.

18 years agoAdd document about mqueuefs.
davidxu [Mon, 5 Dec 2005 05:18:23 +0000 (05:18 +0000)]
Add document about mqueuefs.

18 years agoDocument SIGEV_NONE and SIGEV_SIGNAL.
davidxu [Mon, 5 Dec 2005 04:44:39 +0000 (04:44 +0000)]
Document SIGEV_NONE and SIGEV_SIGNAL.

18 years agoAfter reading some documents, I realized SIGEV_NONE != NULL, also
davidxu [Mon, 5 Dec 2005 04:41:32 +0000 (04:41 +0000)]
After reading some documents, I realized SIGEV_NONE != NULL, also
fix code in mqueue_send_notification to handle SIGEV_NONE.

18 years agoHandle SIGEV_NONE, if notification is SIGEV_NONE, error status and
davidxu [Mon, 5 Dec 2005 03:23:27 +0000 (03:23 +0000)]
Handle SIGEV_NONE, if notification is SIGEV_NONE, error status and
return status will be set, but no notification will be registered.
Increase hard limit of maxmsg to 100, so posixtestsuite ports can run.

18 years ago- Add Product IDs for iPod 3G and iPod Video.
flz [Mon, 5 Dec 2005 01:51:28 +0000 (01:51 +0000)]
- Add Product IDs for iPod 3G and iPod Video.
- Add an USB quirk for iPods, da(4) devices are now successfully created.

Approved by: ssouhlal
MFC after: 1 week

18 years agoSimplify vmspace_dofree().
alc [Sun, 4 Dec 2005 22:55:41 +0000 (22:55 +0000)]
Simplify vmspace_dofree().

18 years agoSort.
stefanf [Sun, 4 Dec 2005 20:01:48 +0000 (20:01 +0000)]
Sort.

18 years agoRemove a few commented out builtins from the original ash. The files
stefanf [Sun, 4 Dec 2005 19:37:07 +0000 (19:37 +0000)]
Remove a few commented out builtins from the original ash.  The files
implementing them were never part of FreeBSD.

18 years agoAdd the times builtin.
stefanf [Sun, 4 Dec 2005 18:59:34 +0000 (18:59 +0000)]
Add the times builtin.

18 years agoAdd the times builtin. It reports the user and system time for the shell
stefanf [Sun, 4 Dec 2005 18:44:21 +0000 (18:44 +0000)]
Add the times builtin.  It reports the user and system time for the shell
itself and its children.  Instead of calling times() (as implied by POSIX) this
implementation directly calls getrusage() to get the times because this is more
convenient.

18 years agoCatch up with 64bit time_t on sparc64. The rstat packet expects a 32bit
philip [Sun, 4 Dec 2005 18:25:26 +0000 (18:25 +0000)]
Catch up with 64bit time_t on sparc64.  The rstat packet expects a 32bit
time_t and times will look incorrect on machines with 64bit time_t.

PR: 88788
Submitted by: Keith White <Keith.White -at- site.uottawa.ca>
MFC after: 1 week

18 years agoAdd Sony TJ37 to the uvisor manpage.
bmah [Sun, 4 Dec 2005 15:44:54 +0000 (15:44 +0000)]
Add Sony TJ37 to the uvisor manpage.

Prompted by: simon
MFC after: 1 week

18 years agoFixed the approximation to pio4. pio4_hi must be pio2_hi/2 since it
bde [Sun, 4 Dec 2005 13:52:46 +0000 (13:52 +0000)]
Fixed the approximation to pio4.  pio4_hi must be pio2_hi/2 since it
shares its low half with pio2_hi.  pio2_hi is rounded down although
rounding to nearest would be a tiny bit better, so pio4_hi must be
rounded down too.  It was rounded to nearest, which happens to be
different in float precision but the same in double precision.

This fixes about 13.5 million errors of more than 1 ulp in asinf().
The largest error was 2.81 ulps on amd64 and 2.57 ulps on i386 -O1.
Now the largest error is 0.93 ulps on amd65 and 0.67 ulps on i386 -O1.

18 years agoUse compile-time detection of 64-bit addressing.
ru [Sun, 4 Dec 2005 12:37:19 +0000 (12:37 +0000)]
Use compile-time detection of 64-bit addressing.

18 years agoFor log1pf(), fixed the approximations to sqrt(2), sqrt(2)-1 and
bde [Sun, 4 Dec 2005 12:30:44 +0000 (12:30 +0000)]
For log1pf(), fixed the approximations to sqrt(2), sqrt(2)-1 and
sqrt(2)/2-1.  For log1p(), fixed the approximation to sqrt(2)/2-1.

The end result is to fix an error of 1.293 ulps in
    log1pf(0.41421395540 (hex 0x3ed413da))
and an error of 1.783 ulps in
    log1p(-0.292893409729003961761) (hex 0x12bec4 00000001)).
The former was the only error of > 1 ulp for log1pf() and the latter
is the only such error that I know of for log1p().

The approximations don't need to be very accurate, but the last 2 need
to be related to the first and be rounded up a little (even more than
1 ulp for sqrt(2)/2-1) for the following implementation-detail reason:
when the arg (x) is not between (the approximations to) sqrt(2)/2-1
and sqrt(2)-1, we commit to using a correction term, but we only
actually use it if 1+x is between sqrt(2)/2 and sqrt(2) according to
the first approximation. Thus we must ensure that
!(sqrt(2)/2-1 < x < sqrt(2)-1) implies !(sqrt(2)/2 < x+1 < sqrt(2)),
where all the sqrt(2)'s are really slightly different approximations
to sqrt(2) and some of the "<"'s are really "<="'s.  This was not done.

In log1pf(), the last 2 approximations were rounded up by about 6 ulps
more than needed relative to a good approximation to sqrt(2), but the
actual approximation to sqrt(2) was off by 3 ulps.  The approximation
to sqrt(2)-1 ended up being 4 ulps too small, so the algoritm was
broken in 4 cases.  The result happened to be broken in 1 case.  This
is fixed by using a natural approximation to sqrt(2) and derived
approximations for the others.

In logf(), all the approximations made sense, but the approximation
to sqrt(2)/2-1 was 2 ulps too small (a tiny amount, since we compare
with a granularity of 2**32 ulps), so the algorithm was broken in 2
cases.  The result was broken in 1 case.  This is fixed by rounding
up the approximation to sqrt(2)/2-1 by 2**32 ulps, so 2**32 cases are
now handled a little differently (still correctly according to my
assertion that the approximations don't need to be very accurate, but
this has not been checked).

18 years agoUse a compile-time detection of 64-bit addressing so that this
ru [Sun, 4 Dec 2005 12:30:34 +0000 (12:30 +0000)]
Use a compile-time detection of 64-bit addressing so that this
compiles on 32-bit machines.

Reported by: ale

18 years agoFix -Wundef from compiling the amd64 LINT.
ru [Sun, 4 Dec 2005 10:06:06 +0000 (10:06 +0000)]
Fix -Wundef from compiling the amd64 LINT.

18 years agoFix -Wunder and make the sbus code really compile only on sparc64.
ru [Sun, 4 Dec 2005 10:03:00 +0000 (10:03 +0000)]
Fix -Wunder and make the sbus code really compile only on sparc64.

18 years agoFix -Wundef warnings and properly check the size of long, FWIW.
ru [Sun, 4 Dec 2005 10:01:44 +0000 (10:01 +0000)]
Fix -Wundef warnings and properly check the size of long, FWIW.

18 years agoOops, the bug is still here, but reimplement the cpp(1) conditional properly.
ru [Sun, 4 Dec 2005 09:57:09 +0000 (09:57 +0000)]
Oops, the bug is still here, but reimplement the cpp(1) conditional properly.

18 years agoThere no longer seems to be this bug in gcc(1). Remove the
ru [Sun, 4 Dec 2005 09:47:20 +0000 (09:47 +0000)]
There no longer seems to be this bug in gcc(1).  Remove the
badly implemented workaround that caused a workaround to be
applied to all architectures, not only amd64.

18 years agoMerge NetBSD's revision 1.27. This bug can be observed eg. when browsing
stefanf [Sun, 4 Dec 2005 09:34:56 +0000 (09:34 +0000)]
Merge NetBSD's revision 1.27.  This bug can be observed eg. when browsing
through the history in sh.

| Refresh bug reported by Julien Torres:
|
| going from:
|     activate -verbose
| to:
|     reset -activation
| results in:
|     reset -activationverbose"
| instead of:
|     reset -activation
|
| This is because we choose to insert "reset -" before the current line,
| and the delete "e -" and insert "ion" in the appropriate place. The
| cleareol code did not handle this case properly; we now cleareol to
| the maximum number of characters of the first difference, the second
| difference and the difference in line length.

18 years agoUse the usual volatile hack to trick gcc into clipping any extra precision
bde [Sun, 4 Dec 2005 08:57:54 +0000 (08:57 +0000)]
Use the usual volatile hack to trick gcc into clipping any extra precision
on assignment.

Extra precision on i386's broke hi+lo decomposition in the usual way.
It caused all except 1 of the 62343 errors of more than 1 ulp for
log1pf() on i386's with gcc -O [-fno-float-store].

18 years agoFix on sparc64.
ru [Sun, 4 Dec 2005 07:45:12 +0000 (07:45 +0000)]
Fix on sparc64.

18 years agoRecognize the Sony Clie PEG-TJ37.
bmah [Sun, 4 Dec 2005 07:34:19 +0000 (07:34 +0000)]
Recognize the Sony Clie PEG-TJ37.

Tested on: My PEG-TJ37 and my RELENG_6 workstation
MFC after: 1 week

18 years agoAdhoc mode fixups:
sam [Sun, 4 Dec 2005 04:50:27 +0000 (04:50 +0000)]
Adhoc mode fixups:
o plug memory leak in adhoc mode: on rx the sender may be the
  current master so simply checking against ic_bss is not enough
  to identify if the packet comes from an unknown sender; must
  also check the mac address
o split neighbor node creation into two routines and fillin state
  of nodes faked up on xmit when a beacon or probe response frame
  is later received; this ensures important state like the rate set
  and advertised capabilities are correct

Obtained from: netbsd
MFC after: 1 week

18 years agoFix -Wundef.
ru [Sun, 4 Dec 2005 02:12:43 +0000 (02:12 +0000)]
Fix -Wundef.

18 years agoAdd "yet another" moused(8) hack: suspend handling mouse events when SIGUSR1
philip [Sun, 4 Dec 2005 00:28:40 +0000 (00:28 +0000)]
Add "yet another" moused(8) hack: suspend handling mouse events when SIGUSR1
is caught.  Can be assigned to a window manager shortcut to prevent accidents
with touchpads.

PR: bin/89357
Submitted by: Nick Hibma <nick -at- van-laarhoven.org>
MFC after: 1 week

18 years agoUse __LP64__ to check for the 64-bit pointer type, and fix -Wundef.
ru [Sun, 4 Dec 2005 00:25:03 +0000 (00:25 +0000)]
Use __LP64__ to check for the 64-bit pointer type, and fix -Wundef.

18 years agoEliminate unneeded preallocation at initialization.
alc [Sat, 3 Dec 2005 22:41:15 +0000 (22:41 +0000)]
Eliminate unneeded preallocation at initialization.

Reviewed by: tegge

18 years agoUse a simpler way to reach the <machine> include dir, which should
ru [Sat, 3 Dec 2005 21:37:54 +0000 (21:37 +0000)]
Use a simpler way to reach the <machine> include dir, which should
also work on pc98.

18 years agoForce any hardwire-routed interrupts to level trigger and active low
jhb [Sat, 3 Dec 2005 21:17:17 +0000 (21:17 +0000)]
Force any hardwire-routed interrupts to level trigger and active low
polarity.  Some machines route PCI IRQs to an ISA IRQ but fail to include
an interrupt override entry to set the polarity and trigger of the given
ISA IRQ in their MADT table.

PR: usb/74989
Reported by: Julien Gabel jpeg at thilelli dot net
MFC after: 1 week

18 years agoMove the 2->3 upgrade kit on the attic.
ru [Sat, 3 Dec 2005 20:30:29 +0000 (20:30 +0000)]
Move the 2->3 upgrade kit on the attic.

18 years agoDocument "makeoption", "nocpu", and "nomakeoptions" directives.
ru [Sat, 3 Dec 2005 20:07:32 +0000 (20:07 +0000)]
Document "makeoption", "nocpu", and "nomakeoptions" directives.
(Indeed this should be repo-copied to src/usr.sbin/config/.)

18 years agoAdd "makeoption" as an alias to "makeoptions", for symmetry.
ru [Sat, 3 Dec 2005 20:04:24 +0000 (20:04 +0000)]
Add "makeoption" as an alias to "makeoptions", for symmetry.

18 years agoRemove workaround for old GCC bugs.
rodrigc [Sat, 3 Dec 2005 19:59:35 +0000 (19:59 +0000)]
Remove workaround for old GCC bugs.

Submitted by: ru

18 years ago- Move the declaration of struct upa_ranges and the UPA_RANGE_* macros
marius [Sat, 3 Dec 2005 19:52:20 +0000 (19:52 +0000)]
- Move the declaration of struct upa_ranges and the UPA_RANGE_* macros
  from sys/sparc64/include/ofw_upa.h to sys/sparc64/pci/ofw_pci.h and
  rename them to struct ofw_pci_ranges and OFW_PCI_RANGE_* respectively.
  This ranges struct only applies to host-PCI bridges but no to other
  bridges found on UPA. At the same time it applies to all host-PCI
  bridges regardless of whether the interconnection bus is Fireplane/
  Safari, JBus or UPA.
- While here rename the PCI_CS_* macros in sys/sparc64/pci/ofw_pci.h
  to OFW_PCI_CS_* in order to be consistent and change this header to
  use uintXX_t instead of u_intXX_t.

18 years agoEliminate unneeded preallocation at initialization.
alc [Sat, 3 Dec 2005 19:37:29 +0000 (19:37 +0000)]
Eliminate unneeded preallocation at initialization.

Reviewed by: tegge

18 years ago- Adhere style(9) (don't use function calls in initializers).
marius [Sat, 3 Dec 2005 18:52:31 +0000 (18:52 +0000)]
- Adhere style(9) (don't use function calls in initializers).
- Use FBSDID.

18 years agoRemove unused sc_node from softc.
marius [Sat, 3 Dec 2005 18:14:47 +0000 (18:14 +0000)]
Remove unused sc_node from softc.

18 years ago- Adhere style(9) (don't use function calls in initializers, use uintXX_t
marius [Sat, 3 Dec 2005 18:11:26 +0000 (18:11 +0000)]
- Adhere style(9) (don't use function calls in initializers, use uintXX_t
  instead of u_intXX_t).
- Use FBSDID.

18 years agoAdd [-J jid_file] option to write out a JidFile, similar to a PidFile,
philip [Sat, 3 Dec 2005 17:32:39 +0000 (17:32 +0000)]
Add [-J jid_file] option to write out a JidFile, similar to a PidFile,
containing the jailid, path, hostname, ip and the command used to start
the jail.

PR: misc/89883
Submitted by: L. Jason Godsey <lannygodsey -at- yahoo.com>
Reviewed by: phk
MFC after: 1 week

18 years ago- Register the PCI bus error interrupt handler according to which half of
marius [Sat, 3 Dec 2005 16:36:54 +0000 (16:36 +0000)]
- Register the PCI bus error interrupt handler according to which half of
  the bridge (PCI bus A or B) we are attaching to rather than registering
  both handlers at once when attaching to the first half we encounter.
  This is a bit cleaner as it corresponds to which PCI bus error interrupt
  actually is assigned to the respective half by the OFW and allows to
  collapse both PCI bus error interrupt handlers into one function easily.
- Use the actual RID of the respective interrupt resource as index into
  sc_irq_res and also use it when allocating the resource. For now this
  is a bit cleaner and will be mandatory later on.
- According to OpenSolaris the spare hardware interrupt is used as the
  over-temperature interrupt in systems with Psycho bridges. Unlike as
  with the SBus-based workstations I didn't manage to trigger it when
  covering the fan outlets of an U60 but better be safe than sorry and
  register a handler anyway.

MFC after: 1 month

18 years ago- Improve the comment regarding the workaround for the E250 interrupt map
marius [Sat, 3 Dec 2005 13:08:05 +0000 (13:08 +0000)]
- Improve the comment regarding the workaround for the E250 interrupt map
  bug by explaining what the problem is and how the workaround works.
- Fix some cosmetics nits, mainly properly terminate sentences in comments,
  which I missed when backporting the style changes to psycho(4) in psycho.c
  rev. 1.54 due to lack of corresponding code.
- The "USIIe version of the Sabre bridge" actually is termed "Hummingbird";
  name it as such in comments and messages.

18 years agoAdd "rdonly" to global_opts, and parse it in vfs_donmount().
rodrigc [Sat, 3 Dec 2005 12:04:20 +0000 (12:04 +0000)]
Add "rdonly" to global_opts, and parse it in vfs_donmount().

Requested by: rwatson

18 years agoConvert to use the recently introduced set of ofw_bus_gen_get_*() for
marius [Sat, 3 Dec 2005 11:59:26 +0000 (11:59 +0000)]
Convert to use the recently introduced set of ofw_bus_gen_get_*() for
providing the ofw_bus KOBJ interface.

Tested by: grehan

18 years agoFixed fdlibm[+cygnus] logbf() and logb() on denormals. Adjustment
bde [Sat, 3 Dec 2005 11:57:19 +0000 (11:57 +0000)]
Fixed fdlibm[+cygnus] logbf() and logb() on denormals.  Adjustment
according to the highest nonzero bit in a denormal was missing.

fdlibm ilogbf() and ilogb() have always had the adjustment, but only
use a small part of their method for handling denormals; use the
normalization method in log[f]() for the main part.

18 years agoFix prototype.
ru [Sat, 3 Dec 2005 09:01:02 +0000 (09:01 +0000)]
Fix prototype.

18 years agoFix type of argument.
ru [Sat, 3 Dec 2005 09:00:43 +0000 (09:00 +0000)]
Fix type of argument.

18 years agoRestored removal of the special handling needed for a result of +-0.
bde [Sat, 3 Dec 2005 09:00:29 +0000 (09:00 +0000)]
Restored removal of the special handling needed for a result of +-0.
It was lost in rev.1.9.  The log message for rev.1.9 says that the
special case of +-0 is handled twice, but it was only handled once,
so it became unhandled, and this happened to break half of the cases
that return +-0:
- round-towards-minus-infinity:  0   <  x < 1:  result was -0 not  0
- round-to-nearest:             -0.5 <= x < 0:  result was  0 not -0
- round-towards-plus-infinity:  -1   <  x < 0:  result was  0 not -0
- round-towards-zero:           -1   <  x < 0:  result was  0 not -0

18 years agoBreak hard sentence break.
ru [Sat, 3 Dec 2005 08:52:07 +0000 (08:52 +0000)]
Break hard sentence break.

18 years agoAdd an entry explaining the changes which add local scripts
dougb [Sat, 3 Dec 2005 07:51:07 +0000 (07:51 +0000)]
Add an entry explaining the changes which add local scripts
to the base rcorder.

18 years agoSimplified the fix in rev.1.3. Instead of using long double for
bde [Sat, 3 Dec 2005 07:38:35 +0000 (07:38 +0000)]
Simplified the fix in rev.1.3.  Instead of using long double for
TWO52[sx] to trick gcc into correctly converting TWO52[sx]+x to double
on assignment to "double w", force a correct assignment by assigning
to *(double *)&w.  This is cleaner and avoids the double rounding
problem on machines that evaluate double expressions in double
precision.  It is not necessary to convert w-TWO52[sx] to double
precision on return as implied in the comment in rev.1.3, since
the difference is exact.

18 years agoFixed rint(x) in the following cases:
bde [Sat, 3 Dec 2005 07:23:30 +0000 (07:23 +0000)]
Fixed rint(x) in the following cases:
(1) In round-to-nearest mode, on all machines, fdlibm rint() never
    worked for |x| = n+0.75 where n is an even integer between 262144
    and 524286 inclusive (2*131072 cases).  To avoid double rounding
    on some machines, we begin by adjusting x to a value with the 0.25
    bit not set, essentially by moving the 0.25 bit to a lower bit
    where it works well enough as a guard, but we botched the adjustment
    when log2(|x|) == 18 (2*2**52 cases) and ended up just clearing
    the 0.25 bit then.  Most subcases still worked accidentally since
    another lower bit serves as a guard.  The case of odd n worked
    accidentally because the rounding goes the right way then.  However,
    for even n, after mangling n+0.75 to 0.5, rounding gives n but the
    correct result is n+1.
(2) In round-towards-minus-infinity mode, on all machines, fdlibm rint()
    never for x = n+0.25 where n is any integer between -524287 and
    -262144 inclusive (262144 cases).  In these cases, after mangling
    n+0.25 to n, rounding gives n but the correct result is n-1.
(3) In round-towards-plus-infinity mode, on all machines, fdlibm rint()
    never for x = n+0.25 where n is any integer between 262144 and
    524287 inclusive (262144 cases).  In these cases, after mangling
    n+0.25 to n, rounding gives n but the correct result is n+1.

A variant of this bug was fixed for the float case in rev.1.9 of s_rintf.c,
but the analysis there is incomplete (it only mentions (1)) and the fix
is buggy.

Example of the problem with double rounding: rint(1.375) on a machine
which evaluates double expressions with just 1 bit of extra precision
and is in round-to-nearest mode.  We evaluate the result using
(double)(2**52 + 1.375) - 2**52.  Evaluating 2**52 + 1.375 in (53+1) bit
prcision gives 2**52 + 1.5 (first rounding).  (Second) rounding of this
to double gives 2**52 + 2.0.  Subtracting 2**52 from this gives 2.0 but
we want 1.0.  Evaluating 2**52 + 1.375 in double precision would have
given the desired intermediate result of 2**52 + 1.0.

The double rounding problem is relatively rare, so the botched adjustment
can be fixed for most machines by removing the entire adjustment.  This
would be a wrong fix (using it is 1 of the bugs in rev.1.9 of s_rintf.c)
since fdlibm is supposed to be generic, but it works in the following cases:
- on all machines that evaluate double expressions in double precision,
  provided either long double has the same precision as double (alpha,
  and i386's with precision forced to double) or my earlier fix to use
  a long double 2**52 is modified to avoid using long double precision.
- on all machines that evaluate double expressions in many more than 11
  bits of extra precision.  The 1 bit of extra precision in the example
  is the worst case.  With N bits of extra precision, it sufices to
  adjust the bit N bits below the 0.5 bit.  For N >= about 52 there is
  no such bit so the adjustment is both impossible and unnecessary.  The
  fix in rev.1.9 of s_rintf.c apparently depends on corresponding magic
  in float precision: on all supported machines N is either 0 or >= 24,
  so double rounding doesn't occur in practice.
- on all machines that don't use fdlibm rint*() (i386's).
So under FreeBSD, the double rounding problem only affects amd64 now, but
should only affect i386 in future (when double expressions are evaluated
in long double precision).

18 years agoSwitch BUILD_ARCH in Makefile to use uname -p suggested by ru.
ambrisko [Sat, 3 Dec 2005 05:11:07 +0000 (05:11 +0000)]
Switch BUILD_ARCH in Makefile to use uname -p suggested by ru.
Switch strncpy to strlcpy suggested by gad and issue found by pjd.
Add to uname(3) man page describing:
UNAME_s
UNAME_r
UNAME_v
UNAME_m
Add to getosreldate(3) man page describing:
OSVERSION

Submitted by: ru, pjd/gad
Reviewed by: ru (man pages)

18 years agoRemove implementation-defined, it has already been described in NOTES
davidxu [Sat, 3 Dec 2005 02:49:04 +0000 (02:49 +0000)]
Remove implementation-defined, it has already been described in NOTES
section.

18 years agoRemove implementation-defined sentences.
davidxu [Sat, 3 Dec 2005 02:31:18 +0000 (02:31 +0000)]
Remove implementation-defined sentences.

18 years agoSimplify parsing of mount options by passing
rodrigc [Sat, 3 Dec 2005 01:57:58 +0000 (01:57 +0000)]
Simplify parsing of mount options by passing
"rw" option down to kernel, since vfs_donmount() can now parse it.

18 years agoAdd option P1003_1B_MQUEUE.
davidxu [Sat, 3 Dec 2005 01:40:38 +0000 (01:40 +0000)]
Add option P1003_1B_MQUEUE.

18 years agoFix lots of markup and content bug.
davidxu [Sat, 3 Dec 2005 01:34:41 +0000 (01:34 +0000)]
Fix lots of markup and content bug.

Submitted by: ru

18 years agoDon't bogusly depend on dhclient. It's now run either by
brooks [Sat, 3 Dec 2005 01:33:06 +0000 (01:33 +0000)]
Don't bogusly depend on dhclient.  It's now run either by
/etc/rc.d/netif or from devd rather than by the startup scripts.

18 years ago- Add "rw" mount option to global_opts.
rodrigc [Sat, 3 Dec 2005 01:26:27 +0000 (01:26 +0000)]
- Add "rw" mount option to global_opts.
- In vfs_donmount(), parse "ro", "noro", and "rw", in order to set or
  unset the MNT_RDONLY filesystem flag.

18 years agoMerge DRM CVS as of 2005-12-02, adding i915 DRM support thanks to Alexey Popov,
anholt [Sat, 3 Dec 2005 01:23:50 +0000 (01:23 +0000)]
Merge DRM CVS as of 2005-12-02, adding i915 DRM support thanks to Alexey Popov,
and a new r300 PCI ID.

18 years agoMake cleaner diffs by munging the $FreeBSD$s from the FreeBSD CVS sources back
anholt [Sat, 3 Dec 2005 00:43:57 +0000 (00:43 +0000)]
Make cleaner diffs by munging the $FreeBSD$s from the FreeBSD CVS sources back
into the new sources.

18 years agoAdd support for i915 GMCH AGP. This diff is a combination of work by myself
anholt [Fri, 2 Dec 2005 23:51:36 +0000 (23:51 +0000)]
Add support for i915 GMCH AGP.  This diff is a combination of work by myself
and some fixes from Motomichi Matsuzaki.  Testing involved many people, but the
final, successful testing was from rwatson who endured several rounds of "it
crashes at XYZ stage" "oh, please correct this typo and try again."  The Linux
driver, and to a small extent the limited specs, were both used as a reference
for how to program the chipset.

PR: kern/80396
Submitted by: Martin Mersberger

18 years agoRegister definitions for the ancient via6522. This 20+ year-old chip
grehan [Fri, 2 Dec 2005 22:36:14 +0000 (22:36 +0000)]
Register definitions for the ancient via6522. This 20+ year-old chip
still exists as a cell in the Macio asic on Apples, and is used to communicate
through the shift register with the external PMU microcontroller.

18 years ago"-o rw" is invalid and undocumented mount option that
ru [Fri, 2 Dec 2005 21:33:43 +0000 (21:33 +0000)]
"-o rw" is invalid and undocumented mount option that
is only present for fstab(5) compatibility, and is
otherwise ignored by mount(8) (not passed to mount_*
programs, and not passed to nmount(2)).

"-u -o rw" worked with an old mount(8) with mount_ufs.c
because "-o rw" was stripped and simple "-u" caused an
update of UFS from read-only to read-write, due to
inability of mount(2) to track changes in options
(MNT_RDONLY is either set or not).

"-u" no longer causes the transition from RO to RW,
now that mount(8) was converted to use nmount(2), so
an explicit change to RW is required.  Keep up with
this change, and use "-uw" to mount root read-write.

18 years agoBrooks pointed out a case where tmp needs to be run after
dougb [Fri, 2 Dec 2005 20:35:23 +0000 (20:35 +0000)]
Brooks pointed out a case where tmp needs to be run after
mountcritremote, so force it the other way instead.

18 years agoIntroduce startup scripts from the local_startup directories to
dougb [Fri, 2 Dec 2005 20:06:07 +0000 (20:06 +0000)]
Introduce startup scripts from the local_startup directories to
the base rcorder. This is accomplished by running rcorder twice,
first to get all the disks mounted (through mountcritremote),
then again to include the local_startup directories.

This dramatically changes the behavior of rc.d/localpkg, as
all "local" scripts that have the new rc.d semantics are now
run in the base rcorder, so only scripts that have not been
converted yet will run in rc.d/localpkg.

Make a similar change in rc.shutdown, and add some functions in
rc.subr to support these changes.

Bump __FreeBSD_version to reflect this change.

18 years agoForce this script to run before mountcritremote to avoid
dougb [Fri, 2 Dec 2005 19:54:57 +0000 (19:54 +0000)]
Force this script to run before mountcritremote to avoid
non-deterministic behavior when introducing local_startup
scripts to rcorder.

18 years agoChange pmap_enter_quick() to use the vm_prot_t parameter introduced in
alc [Fri, 2 Dec 2005 18:02:54 +0000 (18:02 +0000)]
Change pmap_enter_quick() to use the vm_prot_t parameter introduced in
revision 1.179 to correctly set/clear execute permission on the mapping
it creates.  Thus, mmap(2)ing a memory resident file will not result in
the file being mapped with execute permission when execute permission was
not requested.

Eliminate an unneeded Instruction Memory Barrier (IMB) in
pmap_enter_quick().  Since there was no previous (instruction) mapping
for the given virtual address prior to pmap_enter_quick(), there can be
no instructions from the given virtual address in the pipeline that need
flushing.

MFC after: 1 week

18 years agoAdd option P1003_1B_MQUEUE for POSIX message queue.
davidxu [Fri, 2 Dec 2005 14:23:39 +0000 (14:23 +0000)]
Add option P1003_1B_MQUEUE for POSIX message queue.

18 years ago1. Cleanup including.
davidxu [Fri, 2 Dec 2005 14:09:32 +0000 (14:09 +0000)]
1. Cleanup including.
2. Set configuration value for CTL_P1003_1B_MESSAGE_PASSING.

18 years agosyscall -> system call.
davidxu [Fri, 2 Dec 2005 13:50:56 +0000 (13:50 +0000)]
syscall -> system call.

18 years agoFixed roundf(). The following cases never worked in FreeBSD:
bde [Fri, 2 Dec 2005 13:45:06 +0000 (13:45 +0000)]
Fixed roundf().  The following cases never worked in FreeBSD:
- in round-towards-minus-infinity mode, on all machines, roundf(x) never
  worked for 0 < |x| < 0.5 (2*0x3effffff cases in all, or almost half of
  float space).  It was -0 for 0 < x < 0.5 and 0 for -0.5 < x < 0, but
  should be 0 and -0, respectively.  This is because t = ceilf(|x|) = 1
  for these args, and when we adjust t from 1 to 0 by subtracting 1, we
  get -0 in this rounding mode, but we want and expected to get 0.
- in round-towards-minus-infinity, round towards zero and round-to-nearest
  modes, on machines that evaluate float expressions in float precision
  (most machines except i386's), roundf(x) never worked for |x| =
  <float value immediately below 0.5> (2 cases in all).  It was +-1 but
  should have been +-0.  This is because t = ceilf(|x|) = 1 for these
  args, and when we try to classify |x| by subtracting it from 1 we
  get an unexpected rounding error -- the result is 0.5 after rounding
  to float in all 3 rounding modes, so we we have forgotten the
  difference between |x| and 0.5 and end up returning the same value
  as for +-0.5.

The fix is to use floorf() instead of ceilf() and to add 1 instead of
-1 in the adjustment.  With floorf() all the expressions used are
always evaluated exactly so there are no rounding problems, and with
adjustments of +1 we don't go near -0 when adjusting.

Attempted to fix round() and roundl() by cloning the fix for roundf().
This has only been tested for round(), only on args representable as
floats.  Double expressions are evaluated in double precision even on
i386's, so round(0.5-epsilon) was broken even on i386's.  roundl()
must be completely broken on i386's since long double precision is not
really supported.  There seem to be no other dependencies on the
precision.

18 years agoAdd a missing newline to a printf.
jhb [Fri, 2 Dec 2005 13:35:14 +0000 (13:35 +0000)]
Add a missing newline to a printf.

MFC after: 1 week

18 years agoUpdate the ICH7 support so it deals better with chips without AHCI.
sos [Fri, 2 Dec 2005 10:13:53 +0000 (10:13 +0000)]
Update the ICH7 support so it deals better with chips without AHCI.

Update Intel MatrixRAID support to be able to pick up RAID0+1 (RAID10)
and RAID5 arrays without panic'ing.
This has the side effect of now also supporting multiple volumes on
MatrixRAID's now I have the metadata better understood..

HW sponsored by: Mullet Scandinavia AB

18 years agoFix markup.
davidxu [Fri, 2 Dec 2005 09:04:35 +0000 (09:04 +0000)]
Fix markup.

18 years agoRestore the enabling of debugging by default by the DRM_DEBUG kernel option.
anholt [Fri, 2 Dec 2005 08:53:51 +0000 (08:53 +0000)]
Restore the enabling of debugging by default by the DRM_DEBUG kernel option.
It remains controlled by hw.dri.*.debug no matter what.

PR: kern/85479
Submitted by: Oliver Fromme <olli@secnetix.de>

18 years agoOn the 82571 and newer chipset the ICR register is meaningful only
glebius [Fri, 2 Dec 2005 08:33:56 +0000 (08:33 +0000)]
On the 82571 and newer chipset the ICR register is meaningful only
if the E1000_ICR_INT_ASSERTED bit is set.

Submitted by: Jack Vogel

18 years ago1. Check if message priority is less than MQ_PRIO_MAX.
davidxu [Fri, 2 Dec 2005 08:23:49 +0000 (08:23 +0000)]
1. Check if message priority is less than MQ_PRIO_MAX.
2. Use getnanotime instead of getnanouptime.
3. Don't free message in _mqueue_send, mqueue_send will free it.

18 years agoDefine MQ_PRIO_MAX, it seems it is the only place
davidxu [Fri, 2 Dec 2005 07:45:28 +0000 (07:45 +0000)]
Define MQ_PRIO_MAX, it seems it is the only place
the definition will be shared by kernel and userland.

18 years agoUnbreak build when I fluff the clean-up of __FBSDID diff reduction
ambrisko [Fri, 2 Dec 2005 04:55:05 +0000 (04:55 +0000)]
Unbreak build when I fluff the clean-up of __FBSDID diff reduction
before commit.

pointyhat++

18 years agoRemove mqueuefs from LINKS, it is no longer needed for nmount interface.
davidxu [Fri, 2 Dec 2005 04:25:54 +0000 (04:25 +0000)]
Remove mqueuefs from LINKS, it is no longer needed for nmount interface.

Noticed by: rodrigc

18 years agoRemove unsupported "dev" option from comments of mntopts.h.
rodrigc [Fri, 2 Dec 2005 03:55:02 +0000 (03:55 +0000)]
Remove unsupported "dev" option from comments of mntopts.h.

Requested by: jkoshy

18 years agomessqge queue has been implemented, set _POSIX_MESSAGE_PASSING to 200112L.
davidxu [Fri, 2 Dec 2005 02:52:17 +0000 (02:52 +0000)]
messqge queue has been implemented, set _POSIX_MESSAGE_PASSING to 200112L.