Commit graph

119417 commits

Author SHA1 Message Date
Stefan Farfeleder 70293cc76a Include disabled options in the output of 'set +o'. POSIX says the output of
set +o can be used to reload previous settings, for this to work disabled
options must be printed as well or otherwise options that were set in the mean
time won't be turned off.

To avoid an excessively long output line I formatted the output to print only
six options per line.

Submitted by:	Jilles Tjoelker
PR:		73500
2005-10-29 18:41:35 +00:00
Bruce Evans 19b114da0e Implement inline functions to give the complex result x+I*y from float
or double args x and y.  x+I*y cannot be used directly yet due to compiler
bugs.

Submitted by:	Steve Kargl <sgk@troutmask.apl.washington.edu>
2005-10-29 17:14:11 +00:00
Bruce Evans 8b438ea8dd Use double precision to simplify and optimize arg reduction for small
and medium size args too: instead of conditionally subtracting a float
17+24, 17+17+24 or 17+17+17+24 bit approximation to pi/2, always
subtract a double 33+53 bit one.  The float version is now closer to
the double version than to old versions of itself -- it uses the same
33+53 bit approximation as the simplest cases in the double version,
and where the float version had to switch to the slow general case at
|x| == 2^7*pi/2, it now switches at |x| == 2^19*pi/2 the same as the
double version.

This speeds up arg reduction by a factor of 2 for |x| between 3*pi/4 and
2^7*pi/4, and by a factor of 7 for |x| between 2^7*pi/4 and 2^19*pi/4.
2005-10-29 16:34:50 +00:00
David Xu c09df63bb9 Remove unused variable.
Reviewed by: cognet
2005-10-29 13:40:31 +00:00
Stefan Farfeleder 33b222b992 Document command -v and -V.
Glanced at by:	simon
2005-10-29 13:08:35 +00:00
David E. O'Brien 67ae096798 Catch up with FreeBSD 7. 2005-10-29 09:13:31 +00:00
Stefan Farfeleder 1b16155934 Document that read -t timeout returns 1 if the timeout elapses. 2005-10-29 08:22:09 +00:00
Bruce Evans 21b0341c80 Start trying to make the float precision trig functions actually worth
using under FreeBSD.  Before this commit, all float precision functions
except exp2f() were implemented using only float precision, apparently
because Cygnus needed this in 1993 for embedded systems with slow or
inefficient double precision.  For FreeBSD, except possibly on systems
that do floating point entirely in software (very old i386 and now
arm), this just gives a more complicated implementation, many bugs,
and usually worse performance for float precision than for double
precision.  The bugs and worse performance were particulary large in
arg reduction for trig functions.  We want to divide by an approximation
to pi/2 which has as many as 1584 bits, so we should use the widest
type that is efficient and/or easy to use, i.e., double.  Use fdlibm's
__kernel_rem_pio2() to do this as Sun apparently intended.  Cygnus's
k_rem_pio2f.c is now unused.  e_rem_pio2f.c still needs to be separate
from e_rem_pio2.c so that it can be optimized for float args.  Similarly
for long double precision.

This speeds up cosf(x) on large args by a factor of about 2.  Correct
arg reduction on large args is still inherently very slow, so hopefully
these args rarely occur in practice.  There is much more efficiency
to be gained by using double precision to speed up arg reduction on
medium and small float args.
2005-10-29 08:15:29 +00:00
Stefan Farfeleder 5060fc022b Forced commit to note the patch for the previous commit was
Submitted by:	rodrigc
2005-10-29 07:19:11 +00:00
Warner Losh e5baeed6a6 MFp4: When doing lazy allocation, it turns out that we need to record the
actual resource values we received from the system rather than the range
we requested.  Since we request a range starting at 0, we would record
that number.  Later, since this == 0, we'd allocate again.  However,
we wouldn't write the new resource into the BAR.  This resulted in
a resource leak as well as a BAR that couldn't access the resource at
all since rman_get_start, et al, were wrong.

MFC After: 1 week (assuming RELENG_6 is open for business)
2005-10-29 05:52:17 +00:00
Warner Losh 87623e8dd6 Use symbolic name rather thanhard coding the cap pointer offset for
type two devices.
2005-10-29 05:49:06 +00:00
Yaroslav Tykhiy a52364d522 Record renaming rc.d/ppp-user to rc.d/ppp. 2005-10-29 05:27:32 +00:00
Yaroslav Tykhiy 82b765987d Transforming "ppp-user" into just "ppp", step 5:
Finally, delete the old, unfittingly named file "ppp-user".
2005-10-29 05:12:14 +00:00
Yaroslav Tykhiy 10b58447d5 Transforming "ppp-user" into just "ppp", step 4:
The legacy script "/etc/netstart" will start "ppp", not "ppp-user".
2005-10-29 05:08:00 +00:00
Yaroslav Tykhiy 66ba402cd0 Transforming "ppp-user" into just "ppp", step 3:
Install "ppp" (just repocopied) instead of "ppp-user".
2005-10-29 05:05:52 +00:00
Yaroslav Tykhiy ea66108778 Transforming "ppp-user" into just "ppp", step 2:
This file has been repo-copied from src/etc/rc.d/ppp-user.
(Forced commit.)
2005-10-29 05:00:25 +00:00
Warner Losh bd645acfdd Add Billionton LNA-100B variation that Alan reported in arch. [1]
Also add Global Village lan modem, even though I'm unsure if it works.

Reported by: Alan newsletter at acsoftware dot org
2005-10-29 03:49:44 +00:00
Warner Losh 2f280ad1f6 Add Global Village lan modem.
Add Billionton LNA-100B[1]

Reported by: [1] Alan newsletter at acsoftware dot org
2005-10-29 03:48:24 +00:00
Warner Losh ba61c672f6 Shutdown a little better by commenting the shutdown code and acknowledging
any interrupts after we turn off the interrupt mask.
2005-10-29 03:36:00 +00:00
Warner Losh d9a423c36f Shut down the card bus bridge hardware on detach. Before we'd just
free the resoruces w/o actually turning off the interrupts.  This lead
to interrupt storms if you were to insert a card after kldunloading
the driver.
2005-10-29 03:27:43 +00:00
David Xu babdcc8d78 Kill unused variable declaration. 2005-10-29 03:08:43 +00:00
Bill Paul 1ec14c6ee9 Remove call to txp_set_filter() from txp_attach(). txp_set_filter() needs
the ifp, so you can't call it before doing if_alloc(). Also, there's
really no need to call it here anyway: the code I originally ported from
OpenBSD incorrectly set the station address only once at device attach
time, instead of setting in txp_init(). This meant you couldn't change
the address with ifconfig txp0 ether xx:xx:xx:xx:xx:xx. I added the
call to txp_set_filter() in txp_init() to correct this, but forgot to
remove the call from txp_attach(). Until now, it never mattered.

With this fix, the txp driver tests good:

txp0: <3Com 3cR990-TX-97 Etherlink with 3XP Processor> port 0xb800-0xb87f mem 0xe6800000-0xe683ffff irq 12 at device 10.0 on pci0
txp0: Ethernet address: 00:01:03:d4:91:4f
2005-10-29 03:01:16 +00:00
Matt Jacob 8e62a8ac99 Add an ioctl framework for doing FC task management functions from
a user space tool- useful for doing FC target mode certification.
2005-10-29 02:46:59 +00:00
Bill Paul 068b664206 Fix ndis_getstate_80211() so that it properly reports the authmode
and channel to ifconfig. Also use the SSID and channel info from
the association info that we already have instead of using ndis_get_info()
to ask the driver for it again.
2005-10-29 02:18:27 +00:00
Brooks Davis 978ffdbaa9 s/insure/ensure/ in previous commit. My dictionary and m-w.com say they
are synonymous, but ensure seems slightly closer and does not have the
connotation of buying insurance.

Reported by:	Jason McIntyre <jmc at kerhand dot co dot uk>
2005-10-28 22:47:40 +00:00
Brooks Davis ab77cda1ad Don't crash when given an invalid nwkey string.
PR:	misc/88159
2005-10-28 21:57:04 +00:00
Søren Schmidt ae539be6f8 Return the right format (LBA/MSF) in TOC entries.
Null the TOC on media change even if no media present.

Reported by: des
2005-10-28 21:41:42 +00:00
Ruslan Ermilov 2ad08c56d8 Add some significant Ukrainian dates.
PR:		88076
Submitted by:	Andriy Gapon
2005-10-28 21:25:28 +00:00
Gleb Smirnoff f3d30eb20d First fill in structure with valid values, and only then attach it
to the global list.

Reviewed by:	rwatson
2005-10-28 20:29:42 +00:00
Pawel Jakub Dawidek a65a0da2f9 Fix possible live-lock under heavy load where we can't allocate more
memory for request.
I was sure graid3 should handle such situations well, but green@ reported
it is not and we want to fix it before 6.0.

Submitted by:	green
2005-10-28 20:25:02 +00:00
Ruslan Ermilov ee042e1ba6 Document NGM_IFACE_GET_IFINDEX. 2005-10-28 19:05:44 +00:00
Martin Cracauer 12c8305335 Fix this:
kern/87959	cracauer	ext2fs: no cp(1) possible, mmap returns EINVAL

ext2fs was missing vnode_create_vobject.

(Reisefs probably has the same problem but I want to get this in quick
for 6-release)
2005-10-28 18:39:00 +00:00
Stefan Farfeleder b2f153feaf Add the POSIX options -v and -V to the 'command' builtin. Both describe the
type of their argument, if it is a shell function, an alias, a builtin, etc.
-V is more verbose than -v.

PR:	77259, 84539
2005-10-28 18:37:09 +00:00
Yaroslav Tykhiy df19ed6a02 Use ${name} in pathnames where appropriate.
The sendmail script already was on this way,
but it didn't reach the end of it yet.
2005-10-28 16:55:38 +00:00
Yaroslav Tykhiy b29890a328 Use:
command="/path/to/${name}"

since it's applicable here.  It's the current style of rc.d.

Pointed out by:	pjd
2005-10-28 16:10:56 +00:00
Yaroslav Tykhiy 23b50ea745 Transforming "ppp-user" into just "ppp", step 1:
The rcorder(8) condition PROVIDE'd by the script
and REQUIRE'd by the others becomes "ppp".

The ultimate goal of the transformation is to reduce
confusion resulting from the fact that $name has been
"ppp" already.

Discussed with: pjd, -rc
2005-10-28 16:07:52 +00:00
Joerg Wunsch 9b229abc8f Finally complete some work on generalizing the PCF8584-based I2C
drivers I started quite some time before.

Retire the old i386-only pcf driver, and activate the new general
driver that has been sitting in the tree already for quite some
time.

Build the i2c modules for sparc64 architectures as well (where I've
been developing all this on).
2005-10-28 15:58:19 +00:00
Yoshihiro Takahashi 4cf092a1fa Move the isa, npx, mem and io devices and the PC98 option from GENERIC
into DEFAULTS.
2005-10-28 15:30:51 +00:00
Ruslan Ermilov d56ace0997 Use variable-sized arrays where appropriate. 2005-10-28 14:41:28 +00:00
Ruslan Ermilov c2888a85bc Belatedly document the NGM_KSOCKET_ACCEPT ("accept") control message. 2005-10-28 14:15:54 +00:00
Stefan Farfeleder 94cfb3d24c Add test cases for the command built-in, including its -v and -V options which
I'll commit real soon.

Count the number of found test cases instead of hard-coding them.  Allow an
arbitrary exit status.
2005-10-28 14:02:42 +00:00
Bruce Evans 11dc241777 Use fairly optimal minimax polynomials for __kernel_cosf() and
__kernel_sinf().  The old ones were the double-precision polynomials
with coefficients truncated to float.  Truncation is not a good way
to convert minimax polynomials to lower precision.  Optimize for
efficiency and use the lowest-degree polynomials that give a relative
error of less than 1 ulp -- degree 8 instead of 14 for cosf and degree
9 instead of 13 for sinf.  For sinf, the degree 8 polynomial happens
to be 6 times more accurate than the old degree 14 one, but this only
gives a tiny amount of extra accuracy in results -- we just need to
use a a degree high enough to give a polynomial whose relative accuracy
in infinite precision (but with float coefficients) is a small fraction
of a float ulp (fdlibm generally uses 1/32 for the small fraction, and
the fraction for our degree 8 polynomial is about 1/600).

The maximum relative errors for cosf() and sinf() are now 0.7719 ulps
and 0.7969 ulps, respectively.
2005-10-28 13:36:58 +00:00
Stefan Farfeleder 670528cd78 Protect malloc, realloc and free calls with INT{ON,OFF} directly in chkalloc,
ckrealloc and ckfree (added), respectively.  sh jumps out of the signal handler
using longjmp which is obviously a bad idea during malloc calls.

Note: I think there is still a small race here because volatile sig_atomic_t
only guarantees atomic reads and writes while we're doing increments and
decrements.

Protect a setmode call with INT{ON,OFF} as it calls malloc internally.

PR:		45478
Patch from:	Nate Eldredge
2005-10-28 10:45:19 +00:00
Marcel Moolenaar b923a71020 In uart_bus_probe() return BUS_PROBE_DEFAULT when the probe is
successful.
2005-10-28 06:30:39 +00:00
Marcel Moolenaar 3a45066f19 o Style(9) nits
o  Fix typo in comment
o  s/-100/BUS_PROBE_GENERIC/
o  s/err/error/ for consistency
o  Remove non-applicable comment
o  Allow uart_bus_probe() to return the predefined BUS_PROBE_*
   contants. In this case: explicitly test for error > 0.
2005-10-28 06:27:53 +00:00
Marcel Moolenaar 17ef9ca46d Allow uart_bus_probe() to return the predefined BUS_PROBE_*
constants. In this case: just return what uart_bus_probe()
returns.
2005-10-28 06:24:09 +00:00
Warner Losh 6811d2bc72 Cardbus has only 1 slot, so simplify a little. 2005-10-28 06:03:53 +00:00
Warner Losh 00b02fa185 Add PCIM_BIOS_ADDR_MASK too 2005-10-28 06:02:51 +00:00
Warner Losh 0ec342c524 Some cardbus CIS definitions moved here since they are PCI registers. 2005-10-28 05:57:10 +00:00
Warner Losh 46dfab17fb Minor style(9) nitage. 2005-10-28 05:56:50 +00:00