Commit Graph

137258 Commits

Author SHA1 Message Date
Marcel Moolenaar
9dbb1b6e7d o Build libuboot with -msoft-float like everything else.
o  Move the API prototypes to a separate header (glue.h)
o  Allow the platform to hint libuboot about where to look
   for the API signature. The uboot_address variable is
   expected to be defined by the platform.
2008-02-23 17:56:17 +00:00
Marcel Moolenaar
719ea9c174 Add the appropriate license information. This file is double
licensed under GPL and BSD.

Thanks to: raj@
2008-02-23 17:52:30 +00:00
Marcel Moolenaar
9a1b62b630 We build ficl and libofw with -msoft-float. Build the loader
with -msoft-float too.
2008-02-23 17:48:23 +00:00
Warner Losh
46b993ff99 Implement a number of primaries present in GNU find, but not present
in our find.

The following are nops because they aren't relevant to our find:
	-ignore_readdir_race
	-noignore_readdir_race
	-noleaf
The following aliaes were created:
	-gid -> -group		[2]
	-uid -> -user		[2]
	-wholename -> -path
	-iwholename -> ipath
	-mount -> -xdev
	-d -> -depth		[1]
The following new primaries were created:
	-lname	like -name, but matches symbolic links only)
	-ilname like -lname but case insensitive
	-quit	exit(0)
	-samefile returns true for hard links to the specified file
	-true	Always true
I changed one primary to match GNU find since I think our use of it violates
POLA
	-false	Always false (was an alias for -not!)

Also, document the '+' modifier for -execdir, as well as all of the above.
This was previously implemented.

Document the remaining 7 primaries that are in GNU find, but aren't yet
implemented in find(1)

[1] This was done in GNU find for compatibility with FreeBSD, yet they
mixed up command line args and primary args.

[2] -uid/-gid in GNU find ONLY takes a numeric arg, but that arg does the
normal range thing that.  GNU find -user and -uid also take a numberic arg,
but don't do the range processing.  find(1) does both for -user and -group,
so making -uid and -gid aliases is compatible for all non-error cases used
in GNU find.  While not perfect emulation, this seems a reasonable thing
for us.
2008-02-23 16:29:04 +00:00
Christian Brueffer
8f74c2663b Fix typo. 2008-02-23 14:34:52 +00:00
Bruce Evans
60a50c2585 Optimize the 9pi/2 < |x| <= 2**19pi/2 case some more by avoiding an
fabs(), a conditional branch, and sign adjustments of 3 variables for
x < 0 when the branch is taken.  In double precision, even when the
branch is perfectly predicted, this saves about 10 cycles or 10% on
amd64 (A64) and i386 (A64) for the negative half of the range, but
makes little difference for the positive half of the range.  In float
precision, it also saves about 4 cycles for the positive half of the
range on i386, and many more cycles in both halves on amd64 (28 in the
negative half and 11 in the positive half for tanf), but the amd64
times for float precision are anomalously slow so the larger
improvement is only a side effect.

Previous commits arranged for the x < 0 case to be handled simply:
- one part of the rounding method uses the magic number 0x1.8p52
  instead of the usual 0x1.0p52.  The latter is required for large |x|,
  but it doesn't work for negative x and we don't need it for large |x|.
- another part of the rounding method no longer needs to add `half'.
  It would have needed to add -half for negative x.
- removing the "quick check no cancellation" in the double precision
  case removed the need to take the absolute value of the quadrant
  number.

Add my noncopyright in e_rem_pio2.c
2008-02-23 12:53:21 +00:00
Kip Macy
ce86be8a6a Fix tinderbox by removing call to kdb_backtrace
MFC after: 3 days
2008-02-23 06:19:16 +00:00
Sean Farley
bc991a6d5f Add the groupmod '-d' option to pw to allow the deletion of existing users
from a group without the need to perform the same operation by replacing
the existing list via the '-M' option.  The '-M' option requires someone
to fetch the existing members with pw, deleting the undesired members from
the list and sending the altered list back to pw.

Approved by:	wes (mentor)
MFC after:	5 days
2008-02-23 01:25:22 +00:00
Sean Farley
72d1b828b3 style(9) (verified no object changes)
Approved by:	wes (mentor)
MFC after:	5 days
2008-02-23 01:17:42 +00:00
Kip Macy
8e10660f12 - update firmware to 5.0
- add support for T3C
- add DDP support (zero-copy receive)
- fix TOE transmit of large requests
- fix shutdown so that sockets don't remain in CLOSING state indefinitely
- register listeners when an interface is brought up after tom is loaded
- fix setting of multicast filter
- enable link at device attach
- exit tick handler if shutdown is in progress
- add helper for logging TCB
- add sysctls for dumping transmit queues

- note that TOE wxill not be MFC'd until after 7.0 has been finalized

MFC after: 3 days
2008-02-23 01:06:17 +00:00
Dag-Erling Smørgrav
60e15db992 This patch adds a new ktrace(2) record type, KTR_STRUCT, whose payload
consists of the null-terminated name and the contents of any structure
you wish to record.  A new ktrstruct() function constructs and emits a
KTR_STRUCT record.  It is accompanied by convenience macros for struct
stat and struct sockaddr.

In kdump(1), KTR_STRUCT records are handled by a dispatcher function
that runs stringent sanity checks on its contents before handing it
over to individual decoding funtions for each type of structure.
Currently supported structures are struct stat and struct sockaddr for
the AF_INET, AF_INET6 and AF_UNIX families; support for AF_APPLETALK
and AF_IPX is present but disabled, as I am unable to test it properly.

Since 's' was already taken, the letter 't' is used by ktrace(1) to
enable KTR_STRUCT trace points, and in kdump(1) to enable their
decoding.

Derived from patches by Andrew Li <andrew2.li@citi.com>.

PR:		kern/117836
MFC after:	3 weeks
2008-02-23 01:01:49 +00:00
Bruce M Simpson
e75f77ece7 ip6(4) man page lacks documentation for TCLASS option.
PR:		docs/120945
Reviewed by:	remko
2008-02-22 21:02:36 +00:00
Bruce Evans
dbf10e45c4 Avoid using FP-to-integer conversion for !(amd64 || i386) too. Use the
FP-to-FP method to round to an integer on all arches, and convert this
to an int using FP-to-integer conversion iff irint() is not available.
This is cleaner and works well on at least ia64, where it saves 20-30
cycles or about 10% on average for 9Pi/4 < |x| <= 32pi/2 (should be
similar up to 2**19pi/2, but I only tested the smaller range).

After the previous commit to e_rem_pio2.c removed the "quick check no
cancellation" non-optimization, the result of the FP-to-integer
conversion is not needed so early, so using irint() became a much
smaller optimization than when it was committed.

An earlier commit message said that cos, cosf, sin and sinf were equally
fast on amd64 and i386 except for cos and sin on i386.  Actually, cos
and sin on amd64 are equally fast to cosf and sinf on i386 (~88 cycles),
while cosf and sinf on amd64 are not quite equally slow to cos and sin
on i386 (average 115 cycles with more variance).
2008-02-22 18:43:23 +00:00
Bruce Evans
7c1b5e7953 Remove the "quick check no cancellation" optimization for
9pi/2 < |x| < 32pi/2 since it is only a small or negative optimation
and it gets in the way of further optimizations.  It did one more
branch to avoid some integer operations and to use a different
dependency on previous results.  The branches are fairly predictable
so they are usually not a problem, so whether this is a good
optimization depends mainly on the timing for the previous results,
which is very machine-dependent.  On amd64 (A64), this "optimization"
is a pessimization of about 1 cycle or 1%; on ia64, it is an
optimization of about 2 cycles or 1%; on i386 (A64), it is an
optimization of about 5 cycles or 4%; on i386 (Celeron P2) it is an
optimization of about 4 cycles or 3% for cos but a pessimization of
about 5 cycles for sin and 1 cycle for tan.  I think the new i386
(A64) slowness is due to an pipeline stall due to an avoidable
load-store mismatch (so the old timing was better), and the i386
(Celeron) variance is due to its branch predictor not being too good.
2008-02-22 17:26:24 +00:00
Bruce Evans
43590b1517 Optimize the 9pi/2 < |x| <= 2**19pi/2 case on amd64 and i386 by avoiding
the the double to int conversion operation which is very slow on these
arches.  Assume that the current rounding mode is the default of
round-to-nearest and use rounding operations in this mode instead of
faking this mode using the round-towards-zero mode for conversion to
int.  Round the double to an integer as a double first and as an int
second since the double result is needed much earler.

Double rounding isn't a problem since we only need a rough approximation.
We didn't support other current rounding modes and produce much larger
errors than before if called in a non-default mode.

This saves an average about 10 cycles on amd64 (A64) and about 25 on
i386 (A64) for x in the above range.  In some cases the saving is over
25%.  Most cases with |x| < 1000pi now take about 88 cycles for cos
and sin (with certain CFLAGS, etc.), except on i386 where cos and sin
(but not cosf and sinf) are much slower at 111 and 121 cycles respectivly
due to the compiler only optimizing well for float precision.  A64
hardware cos and sin are slower at 105 cycles on i386 and 110 cycles
on amd64.
2008-02-22 15:55:14 +00:00
Randall Stewart
7a846e9ad8 Fixes a memory leak when VRF's are in play.
Submitted by:	Prasad Narasimha (snprasad@cisco.com)
Reviewed by:	rrs
2008-02-22 15:08:10 +00:00
Randall Stewart
69d5ee4f23 - Takes out stray ifdef code that should not have been present. 2008-02-22 15:06:25 +00:00
Bruce Evans
0ddfa46b44 Add an irint() function in inline asm for amd64 and i386. irint() is
the same as lrint() except it returns int instead of long.  Though the
extern lrint() is fairly fast on these arches, it still takes about
12 cycles longer than the inline version, and 12 cycles is a lot in
applications where [li]rint() is used to avoid slow conversions that
are only a couple of times slower.

This is only for internal use.  The libm versions of *rint*() should
also be inline, but that would take would take more header engineering.
Implementing irint() instead of lrint() also avoids a conflict with
the extern declaration of the latter.
2008-02-22 14:11:03 +00:00
Bruce Evans
f839bac29c Optimize the conversion to bits a little (by about 11 cycles or 16%
on i386 (A64), 5 cycles on amd64 (A64), and 3 cycles on ia64).  gcc
tends to generate very bad code for accessing floating point values
as bits except when the integer accesses have the same width as the
floating point values, and direct accesses to bit-fields (as is common
only for long double precision) always gives such accesses.  Use the
expsign access method, which is good for 80-bit long doubles and
hopefully no worse for 128-bit long doubles.  Now the generated code
is less bad.  There is still unnecessary copying of the arg on amd64
and i386 and mysterious extra slowness on amd64.
2008-02-22 11:59:05 +00:00
Konstantin Belousov
cbd2c621f8 Sanitize arguments to linux_mremap().
Check that only MREMAP_FIXED and MREMAP_MAYMOVE flags are specified.
Check for the page alignment of the addr argument.

Submitted by:	rdivacky
MFC after:	1 week
2008-02-22 11:47:56 +00:00
Ruslan Ermilov
ce04f76c56 Fix essential bugs and warnings. 2008-02-22 10:28:03 +00:00
Bruce Evans
a7aa8cc980 Optimize the fixup for +-0 by using better classification for this case
and by using a table lookup to avoid a branch when this case occurs.
On i386, this saves 1-4 cycles out of about 64 for non-large args.
2008-02-22 10:04:53 +00:00
Ruslan Ermilov
da9b9cd9dc Hide BSD ar(1) under the MK_TOOLCHAIN option.
Reviewed by:	obrien
2008-02-22 09:31:23 +00:00
Bruce Evans
33843eef65 Fix rintl() on signaling NaNs and unsupported formats. 2008-02-22 09:21:14 +00:00
David E. O'Brien
be1acc9caf Clean up created turds. 2008-02-22 06:53:52 +00:00
David E. O'Brien
18bbbf9ba4 We build important toolchain statically. So build BSD 'ar' statically
when its replacing GNU 'ar'.
2008-02-22 06:51:26 +00:00
David E. O'Brien
a856b6c56c Re-introduce the new BSDLed 'ar' to the build.
It is installed as "bsdar" unless WANT_BSDAR is defined.

Discussed with: kaiw
2008-02-22 06:47:45 +00:00
Joseph Koshy
3c7b2ed7f9 Fix 'make checkdpadd'. 2008-02-22 06:25:49 +00:00
David Schultz
5aa554c7e5 s/rcsid/__FBSDID/ 2008-02-22 02:30:36 +00:00
David Schultz
fab324dfa4 Remove an unused variable. 2008-02-22 02:27:34 +00:00
David Schultz
7cd50f4d94 Eliminate some warnings. 2008-02-22 02:26:51 +00:00
David Christensen
8ec2795f0d MFC after: 4 weeks
- Added loose RX MTU functionality to allow frames larger than 1500 bytes
  to be accepted even though the interface MTU is set to 1500.
- Implemented new TCP header splitting/jumbo frame support which uses
  two chains for receive traffic rather than the original single recevie
  chain.
- Added additional debug support code.
2008-02-22 00:46:22 +00:00
Paolo Pisati
d956bdf35e -Fix display of nat range.
-Whitespace elimination.

Bug spotted by: Luiz Otavio O Souza
MFC After: 3 days
2008-02-21 22:55:54 +00:00
Christian Brueffer
4bf10a52b0 Add some missing Xrefs to drivers.
MFC after:	3 days
2008-02-21 20:44:25 +00:00
Philip Paeps
a975b4b6f2 Note, as required by our agreement with IEEE/The Open Group, that the message
queue manual pages excerpt the POSIX standard.

Spotted by:	Mindaugas Rasiukevicius <rmind -at- NetBSD.org>
Reviewed by:	imp
MFC after:	1 day
2008-02-21 19:16:57 +00:00
Remko Lodder
03206b569c Add support for the VIA USB2IDE bridge [1].
PR:		usb/95173
Submitted by:	Goegele Hannes <diazepam@gmx.net>
		Ben Kelly <bkelly at vadev dot org>
Tested by:	blackend
Approved by:	imp (mentor, blanket for simple patches)
X-MFC-After:	1 week
2008-02-21 19:07:08 +00:00
David E. O'Brien
fcc69fd9f7 If 'WITH_BSDAR' is defined, install as gnu-<util_name>. 2008-02-21 16:59:02 +00:00
Ruslan Ermilov
a72d00742b Fix static linkage. 2008-02-21 16:29:52 +00:00
Ruslan Ermilov
e901b583be Add LIBELF. 2008-02-21 16:29:31 +00:00
Kai Wang
7a76718800 Back out previous commit. Restore Binutils ar as default. Disconnect
'BSD' ar to the build.

Requested by: 	des
2008-02-21 16:12:46 +00:00
Kai Wang
d0e2abaf12 * Connect ar(1) to the build and make it default ar. Rename GNU
binutils ar and ranlib to gar and granlib, respectively.

* Introduce a temporary variable WITH_GNUAR as a safety net.
When buildworld with -DWITH_GNUAR, GNU binutils ar and ranlib
will install as default ones and 'BSD' ar will be disabled.

* Bump __FreeBSD_version to reflect the import of 'BSD' ar(1).

Approved by:		 jkoshy (mentor)
2008-02-21 11:21:29 +00:00
Ruslan Ermilov
741ac35cd4 Remove WARNS from here and compile with default kernel flags.
Switch off those warnings that ZFS sources do not pass.
2008-02-21 11:11:06 +00:00
Ruslan Ermilov
995dc98447 Remove WARNS from here and compile with default kernel flags. 2008-02-21 11:09:59 +00:00
Kai Wang
d192f3d3c3 Import ar(1) front-end. (aka 'BSD' ar)
Reviewed by: 		jkoshy
Approved by:		jkoshy (mentor)
Tested by:		erwin (ports build test on pointyhat)
Sponsored by:		Google Summer of Code 2007
Reviewed by (earlier version): Jaakko Heinonen <jh[AT]saunalahti.fi>
Tested by (earlier version): Steve Kargl <sgk[AT]troutmask.apl.washington.edu>
Tested by (earlier version): Martin Voros <martin_voros[AT]yahoo.com>
Tested by (earlier version): swell.k[AT]gmail.com
Tested by (earlier version): joel
Tested by (earlier version): Alexey Shuvaev <shuvaev[AT]physik.uni-wuerzburg.de>
Tested by (earlier version): Arjan van Leeuwen <avleeuwen[AT]gmail.com>

Thanks to gabor@ for building ports for it.
Thanks to erwin@ and kris@ for scheduling the ports build test on pointyhat.
And thanks to many others for their feedback.
2008-02-21 10:52:31 +00:00
Greg Lehey
1dc2c6a592 Ensure that the -s flag truncates the accounting data.
This problem has only been reported on the amd64 platform.

PR:		bin/120293
Tested by:	Callum Gibson
MFC after:	2 weeks
2008-02-21 07:12:56 +00:00
Tim Kientzle
5b7a04161d Sanity-check the block size.
Thanks to: Joerg Sonnenberger
MFC after: 7 days
2008-02-21 03:21:50 +00:00
Marcel Moolenaar
043ec583dc Don't check the bpbSecPerTrack and bpbHeads fields of the BPB.
They are typically 0 on new ia64 systems. Since we don't use
either field, there's no harm in not checking.
2008-02-21 03:19:46 +00:00
Marcel Moolenaar
70d8932f66 Don't use disklabel for the MFS root. The DoFS.sh script creates
a bogus partition table and puts the file system on the whole
partition. geom_part doesn't expose the 'c' partition as it's an
artifact of the BSD label and not to be used. Secondly, gpart(8)
is the preferred tool for partitioning disks on ia64.
2008-02-21 03:16:36 +00:00
Rui Paulo
8ea0d8cff1 Add AS lookup functionality. On each hop we query a whois server to
find the corresponding AS for that IP (-a switch).
We can also choose a different whois server with the -A switch. The
default is whois.radb.net.

Obtained from:	       NetBSD
Reviewed by:	       bms, njl (mentor)
Approved by:	       njl (mentor)
2008-02-20 23:29:53 +00:00
David Malone
6f540420dd Two no-op fixes to improve corretness of syslogd code:
1) Use [AP]F_LOCAL rather than [AP]F_UNIX.
2) When copying a pipe's name, use f->f_un.f_pipe.f_pname, not f->f_un.f_fname.

PR:		20889
Submitted by:	Damieon Stark
PR:		116642
Submitted by:	Jim Pirzyk
Reviewed by:	md5
2008-02-20 21:54:41 +00:00