Commit graph

120009 commits

Author SHA1 Message Date
Ruslan Ermilov 6eee826901 Keep up with const poisoning in uuid.h,v 1.3. 2005-11-24 07:04:20 +00:00
Ruslan Ermilov fee45c0c38 Fix prototype of strmode() to match the code and documentation. 2005-11-24 06:59:35 +00:00
Ruslan Ermilov 36c71f6ac1 Fix prototype. 2005-11-24 06:56:21 +00:00
Nate Lawson 1f6e47a324 Only copy out the battery status/info if there was no error. 2005-11-24 05:23:56 +00:00
Olivier Houchard ce4210d673 Use a magic number to know we were started from the elf wrapper.
Add a dummy _start function to make the non-elf version of the wrapper work.
2005-11-24 02:27:55 +00:00
Olivier Houchard f5a9ac9ca4 Create a non-elf pure binary version of the kernel as well. 2005-11-24 02:25:49 +00:00
Bruce Evans 16638b5585 Optimized by eliminating the special case for 0.67434 <= |x| < pi/4.
A single polynomial approximation for tan(x) works in infinite precision
up to |x| < pi/2, but in finite precision, to restrict the accumulated
roundoff error to < 1 ulp, |x| must be restricted to less than about
sqrt(0.5/((1.5+1.5)/3)) ~= 0.707.  We restricted it a bit more to
give a safety margin including some slop for optimizations.  Now that
we use double precision for the calculations, the accumulated roundoff
error is in double-precision ulps so it can easily be made almost 2**29
times smaller than a single-precision ulp.  Near x = pi/4 its maximum
is about 0.5+(1.5+1.5)*x**2/3 ~= 1.117 double-precision ulps.

The minimax polynomial needs to be different to work for the larger
interval.  I didn't increase its degree the old degree is just large
enough to keep the final error less than 1 ulp and increasing the
degree would be a pessimization.  The maximum error is now ~0.80
ulps instead of ~0.53 ulps.

The speedup from this optimization for uniformly distributed args in
[-2pi, 2pi] is 28-43% on athlons, depending on how badly gcc selected
and scheduled the instructions in the old version.  The old version
has some int-to-float conversions that are apparently difficult to schedule
well, but gcc-3.3 somehow did everything ~10 cycles or ~10% faster than
gcc-3.4, with the difference especially large on AXPs.  On A64s, the
problem seems to be related to documented penalties for moving single
precision data to undead xmm registers.  With this version, the speed
is cycles is almost independent of the athlon and gcc version despite
the large differences in instruction selection to use the FPU on AXPs
and SSE on A64s.
2005-11-24 02:04:26 +00:00
Gleb Smirnoff 7ddd4e4126 Merge in new driver version from Intel - 3.2.18.
The most important change is support for adapters based on
82571 and 82572 chips.

Tested on:	82547EI on i386
Tested on:	82540EM on sparc64
2005-11-24 01:44:49 +00:00
Kris Kennaway 12f6e63d15 Correct division by zero error in comment. 2005-11-24 00:53:14 +00:00
Craig Rodrigues 7f2444598a Remove UFS-specific parts from mount(8).
For mounting UFS, all mount options are passed directly to nmount(),
without any UFS-specific logic.
2005-11-23 23:22:56 +00:00
Craig Rodrigues 722705c6b2 These files were never hooked into the build, and were the start
of an nmount()-based mount program for UFS.
Now that mount(8) calls nmount() directly for mounting UFS filesystems,
they are unnecessary.
2005-11-23 23:06:33 +00:00
Craig Rodrigues 5e6b93a014 In nmount() and vfs_donmount(), do not strcmp() the options in the iovec
directly.  We need to copyin() the strings in the iovec before
we can strcmp() them.  Also, when we want to send the errmsg back
to userspace, we need to copyout()/copystr() the string.

Add a small helper function vfs_getopt_pos() which takes in the
name of an option, and returns the array index of the name in the iovec,
or -1 if not found.  This allows us to locate an option in
the iovec without actually manipulating the iovec members. directly via
strcmp().

Noticed by:	kris on sparc64
2005-11-23 20:51:15 +00:00
Ruslan Ermilov 4ca0505435 Fix prototype. 2005-11-23 20:34:37 +00:00
Ruslan Ermilov 8b79908889 Fix prototype. 2005-11-23 20:26:58 +00:00
Craig Rodrigues 35d6c7f50e Do not pass userquota and groupquota mount options to nmount().
These options are read from fstab by quotacheck(8), but are not
valid mount options that need to be passed down the the filesystem.

Noticed by:	maxim
2005-11-23 20:17:27 +00:00
Tai-hwa Liang 62c7cb517a - Adding the missing 'W' option back which was accidentally removed
in rev1.37.
- Fixing a core dump inside build_iovec_argf by providing a !NULL format
  string to vsnprintf(3).

Reviewed by:	rodrigc
2005-11-23 19:52:14 +00:00
John Baldwin b05223a327 Add locking and mark MPSAFE:
- Add locked variants of start, init, and ifmedia_upd.
- Add a mutex to the softc and remove spl calls.
- Use callout(9) rather than timeout(9).
- Setup interrupt handler last in attach.
- Use M_ZERO rather than bzero.

MFC after:	1 week
Tested by:	wpaul
2005-11-23 18:51:34 +00:00
John Baldwin addfb88d47 MFi386: Sort and add COUNT_{IPIS,XINVLTLB_HITS}.
Pointy hat to:	jhb (2)
2005-11-23 18:12:05 +00:00
John Baldwin 0c43612a35 Sort. 2005-11-23 18:11:24 +00:00
Olivier Houchard 2ec9d05328 MFP4: Bring in arm9 cache-related functions
Obtained from:	NetBSD
2005-11-23 18:02:40 +00:00
Damien Bergamini 8ea9781eed Optimize PLCP length field computation for 802.11b rates. 2005-11-23 17:32:57 +00:00
Bill Paul f1b78ee016 Somehow memmove() got mapped to memset() in the patch table. Create a
real memmove() implementation and use that instead.
2005-11-23 17:10:46 +00:00
Ruslan Ermilov 79be508c8f Fix prototypes. 2005-11-23 16:44:23 +00:00
John Baldwin ef2cda76c0 - Quiet the pci_link(4) devices so that they don't show up in dmesg now.
- Improve panic message if we fail to read the PCI bus number from a bridge
  device.
- Don't try to lookup a BIOS IRQ for a link unless the link is routed via
  an ISA IRQ since BIOSen currently only route PCI link devices via ISA
  IRQs.

Tested by:	Mathieu Prevot bsdhack at club-internet dot fr
MFC after:	1 week
2005-11-23 16:36:13 +00:00
Ruslan Ermilov 8ae7a845d5 There's no longer^Wyet <sys/capability.h>. 2005-11-23 16:24:39 +00:00
Ruslan Ermilov 49e5b98f5a Fix inet6_opt_get_val() prototype. 2005-11-23 16:07:54 +00:00
Ruslan Ermilov 5306fb2d0c Make SYNOPSIS compile. 2005-11-23 15:55:38 +00:00
Ruslan Ermilov b0faeb2d42 Make SYNOPSIS compile after imp@'s changes. 2005-11-23 15:44:42 +00:00
Ruslan Ermilov 16a97b8591 Make SYNOPSIS compile. 2005-11-23 15:41:36 +00:00
Bruce Evans 94a5f9be99 Use only double precision for "kernel" tanf (except for returning float).
This is a minor interface change.  The function is renamed from
__kernel_tanf() to __kernel_tandf() so that misues of it will cause
link errors and not crashes.

This version is a routine translation with no special optimizations
for accuracy or efficiency.  It gives an unimportant increase in
accuracy, from ~0.9 ulps to 0.5285 ulps.  Almost all of the error is
from the minimax polynomial (~0.03 ulps and the final rounding step
(< 0.5 ulps).  It gives strange differences in efficiency in the -5
to +10% range, with -O1 fairly consistently becoming faster and -O2
slower on AXP and A64 with gcc-3.3 and gcc-3.4.
2005-11-23 14:27:56 +00:00
Ruslan Ermilov c48648d2c1 Add missing includes. 2005-11-23 10:49:07 +00:00
Kirill Ponomarev c94ab799af Document PKG_PATH enviroment variable.
Prodded by:	Mark Andrews <Mark_Andrews AT isc DOT org>
MFC after:	2 days
2005-11-23 10:31:59 +00:00
Wilko Bulte b099d1e351 correct typo 2005-11-23 09:00:35 +00:00
Ed Maste d4fd73659c Userland applications may include queue.h and define INVARIANTS
but not provide a panic(9) implementation.  Thus, enable the sanity
checks under INVARIANTS only if _KERNEL is also defined.

Submitted by:	jmallett
Approved by:	rwatson (mentor)
2005-11-23 04:02:27 +00:00
Bruce Evans 01231dd04c Simplified setiing up args for __kernel_rem_pio2(). We already have x
with a 24-bit fraction, so we don't need a loop to split it into up to
3 terms with 24-bit fractions.
2005-11-23 03:03:09 +00:00
Bruce Evans 33f8f56e09 Quick fix for stack buffer overrun in rev.1.13. Oops. The prec == 1
arg to __kernel_rem_pio2() gives 53-bit (double) precision, not single
precision and/or the array dimension like I thought.  prec == 2 is
used in e_rem_pio2.c for double precision although it is documented
to be for 64-bit (extended) precision, and I just reduced it by 1
thinking that this would give the value suitable for 24-bit (float)
precision.  Reducing it 1 more to the documented value for float
precision doesn't actually work (it gives errors of ~0.75 ulps in the
reduced arg, but errors of much less than 0.5 ulps are needed; the bug
seems to be in kernel_rem_pio2.c).  Keep using a value 1 larger than
the documented value but supply an array large enough hold the extra
unused result from this.

The bug can also be fixed quickly by increasing init_jk[0] in
k_rem_pio2.c from 2 to 3.  This gives behaviour identical to using
prec == 1 except it doesn't create the extra result.  It isn't clear
how the precision bug affects higher precisions.  113-bit (quad) is
the largest precision, so there is no way to use a large precision
to fix it.
2005-11-23 02:06:06 +00:00
Nate Lawson 2010798dab Try to fix problems with periodic hangs by never directly calling _BIF.
Instead, re-evaluate _BIF only when we get a notify and use the cached
results.  We also still evaluate _BIF once on boot.  Also, optimize the
init loop a little by only querying for a particular info if it's not valid.

MFC after:	2 days
2005-11-23 00:57:51 +00:00
Maksim Yevmenkin d47d4f47b0 Teach rfcomm_sppd(1) about service names, so it is possible to specify
service name instead of channel number with -c command option. Supported
service names are: DUN (Dial-Up Networking), FAX (Fax) and SP (Serial Port).

MFC after:	1 week
2005-11-23 00:56:18 +00:00
Nate Lawson f08e63dc4d Simplify checks for valid battery info via DeMorgan's Rule. No
functional change.
2005-11-23 00:53:01 +00:00
John Baldwin 1dab802e37 Garbage collect machine/smptests.h now that it is empty and no longer used. 2005-11-22 22:55:48 +00:00
John Baldwin c21ba8d166 Make COUNT_IPIS and COUNT_XINVLTLB_HITS real kernel options and take
them out of machine/smptests.h.
2005-11-22 22:54:42 +00:00
John Baldwin e36e973da9 Garbage collect unused {VERBOSE_,}CPUSTOP_ON_DDBBREAK macros. 2005-11-22 22:37:13 +00:00
John Baldwin 0a17b197d3 Garbage collect the code to store diagnostics codes in a CMOS register
during SMP startup.  We haven't had any issues with starting up the APs
on i386 in quite a while now which is all this code is really useful for.
If someone ever does really need it they can always dig it up out of the
attic.
2005-11-22 22:34:14 +00:00
Marius Strobl d13ea234b3 - Add a workaround (change the interrupt map mask to compare the full
INO) for incorrect interrupt map entries on E250 machines. These
  incorrect entries caused the INO of the on-board HME to be also
  assigned to the second on-board NS16550 and to the on-board printer
  port controller. Further down the road caused hme(4) to fail to attach
  to the on-board HME in FreeBSD 5 and 6 as INTR_FAST and non-INTR_FAST
  handlers can't share the same IRQ there (it's unknown what whould
  happen in -CURRENT now that INTR_FAST and non-INTR_FAST handlers can
  share an IRQ but I'd expect funny problems with uart(4)).
- Make sure there are exactly 4 PCI ranges instead of just checking
  that the bridge has a 'ranges' property in the OFW device tree at all.
  Besides the fact that currently the 64bit memory range isn't used by
  this driver it we can't really work with less than 4 ranges and don't
  have memory for more than 4 bus handles for the ranges in the softc.
- Remove sc_range and sc_nrange from softc; for the bridges supported
  by this driver we no longer need to know the ranges besides the bus
  handles obtained from them once this driver is attached. That way we
  also can free the memory allocated for sc_range during attach again.
- Remove sc_dvmabase from the softc and pass it to psycho_iommu_init()
  via an additional argument as we no longer need to know the DVMA base
  in this driver once the IOMMU is initialized.
- Remove sc_dmatag from the softc, there isn't much sense in keeping
  the nexus dma tag around locally.

PR:		88279 [1]
Info from:	OpenSolaris [1]
Tested by:	kensmith [1]
MFC after:	1 month
2005-11-22 22:32:50 +00:00
Doug Barton a2362f35f6 Update the test for failed zone transfers to reflect BIND 9.3.1 semantics
Simplify the shell scripting a bit, and remove a useless grep | sed

The problem was pointed out by the PR, and I used part of the solution
suggested there, but the semantics changed again for 9.2.x -> 9.3.x.

PR:		conf/74228
Submitted by:	Jeremy Chadwick <freebsd@jdc.parodius.com>
2005-11-22 22:24:27 +00:00
Marius Strobl dcb740a42a Some clean-up, style changes and changes that will reduce differences
between this driver and other Host-PCI bridge drivers based on this one:

- Make the code fit into 80 columns.
- Make the code adhere style(9) (don't use function calls in initializers,
  use uintXX_t instead of u_intXX_t, add missing prototypes, ...).
- Remove unused and superfluous struct declaration, softc member, casts,
  includes, etc.
- Use FBSDID.
- Sprinkle const.
- Try to make comments and messages consistent in style throughout the
  driver.
- Use convenience macros for the number of interrupts and ranges of the
  bridge.
- Use __func__ instead of hardcoded function names in panic strings and
  error messages. Some of the hardcoded function names actually were
  outdated through moving code around. [1]
- Rename softc members related to the PCI side of the bridge to sc_pci_*
  in order to make it clear which side of the bridge they refer to (so
  stuff like sc_bushandle vs. sc_bh is less confusing while reading the
  code).

PR:	76052 [1]
2005-11-22 21:34:26 +00:00
Ruslan Ermilov 1580b6c355 Unbreak installworld. 2005-11-22 20:47:43 +00:00
Maksim Yevmenkin f5937f20c1 Remove not needed redirection of kldstat -q output to /dev/null.
Noticed by:	pjd
MFC after:	3 days
2005-11-22 19:17:41 +00:00
Maksim Yevmenkin e08872c40b Revise hcsecd(8) and sdpd(8) rc.d scripts one more time
- Use _prestart rc.d method to automatically kldload ng_btsocket(4) if needed;

- Rename "sdpd_user" to "sdpd_username" and "sdpd_group" to "sdpd_groupname"
  to avoid collision with "magic" variables;

Inspired by:	yar
MFC after:	3 days
2005-11-22 18:51:43 +00:00
Marius Strobl b18381c4a9 - Add ofw_bus_if.h to SRCS on sparc64 as envctrl.c and pcf_ebus.c depend
on it.
- Sync with sys/conf/files* and build pcf_isa.c only on i386 for now.
- Try to adhere to style.Makefile(5) (sorting, whitespace).
2005-11-22 17:32:51 +00:00