Commit Graph

119528 Commits

Author SHA1 Message Date
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
Warner Losh
41ac33a2b6 Eliminate even more duplication, and move some definitions into pcireg.h 2005-10-28 05:55:52 +00:00
Warner Losh
972072d384 Remove now redundant defines. 2005-10-28 05:31:11 +00:00
Warner Losh
495036f25b Simplify code a little, prefer PCI?_FOO registers where possible. 2005-10-28 05:30:47 +00:00
Warner Losh
abca52f4ac Use PCIR_BARS rather than CARDBUS_BASE0_REG
Style nit.
2005-10-28 05:29:41 +00:00
Bill Paul
bcb02fd532 Remove forgotten, no longer needed WB_UNLOCK() from the end wb_ioctl().
With this change, the driver tests good (at least on i386):

wb0: <Winbond W89C840F 10/100BaseTX> port 0xb800-0xb87f mem 0xe6800000-0xe680007f irq 12 at device 10.0 on pci0
miibus1: <MII bus> on wb0
amphy0: <Am79C873 10/100 media interface> on miibus1
amphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
wb0: Ethernet address: 00:00:e8:18:2a:02
wb0: link state changed to DOWN
wb0: link state changed to UP
2005-10-28 02:17:40 +00:00
Craig Rodrigues
5dbed42856 Submitted following patch to FSF GCC:
* freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS):
	  Use builtin_define_with_int_value() instead of
	  adding a new check for every new major FreeBSD version.

Motivated by:	simon
Discussed with:	obrien, kan
2005-10-27 23:57:55 +00:00
John Baldwin
80e963994a Fixup locking and mark MPSAFE.
- Add locked variants of init() and start().
- Use callout_*() to manage callout.
- Test IFF_DRV_RUNNING rather than IFF_UP in wb_intr() to see if we are
  still active when an interrupt comes in.

I couldn't find any of these cards anywhere to test on myself, and google
turns up references to FreeBSD and OpenBSD manpages for this driver when
trying to locate a card that way.  I'm not sure anyone actually uses these
cards with FreeBSD.

Tested by:	NO ONE (despite repeated requests)
2005-10-27 21:22:58 +00:00
John Baldwin
4cc88f8f33 - Use if_printf() and device_printf() and remove vr_unit from the softc.
I had to initialize the ifnet a bit earlier in attach so that the
  if_printf()'s in vr_reset() didn't explode with a page fault.
- Use M_ZERO with contigmalloc() rather than an explicit bzero.
2005-10-27 21:18:37 +00:00
John Baldwin
2bf266e6da - Add locking and mark MPSAFE. The driver had a mutex in the softc and
even initialized it, but it never used it.
- Use callout_*() to manage the callout.
- Use m_devget() to copy data out of the rx buffers rather than doing it
  all by hand.
- Use m_getcl() to allocate mbuf clusters rather than doing it all by hand.
- Don't free the software descriptor for a rx ring entry if we can't
  allocate an mbuf cluster for it.  We left a dangling pointer and never
  reallocated the entry anyway.  OpenBSD's code (from which this was
  derived) has the same bug.

Tested by:	NO ONE (despite repeated requests)
Reviewed by:	wpaul (5)
2005-10-27 21:16:17 +00:00
John Baldwin
f070bd5600 Drop the driver lock around atm_input() analogous to all the ethernet
drivers dropping the driver lock around ether_input().

Silence by:	harti
2005-10-27 21:08:12 +00:00
John Baldwin
28f22a242b Remove old ACPICA files from the INTEL vendor branch. They were removed
from HEAD about 4 years ago when we started flattening out the ACPICA
distribution.
2005-10-27 20:48:05 +00:00
John Baldwin
b34b3c19c6 Bump config(8) version for the DEFAULTS change. 2005-10-27 19:27:55 +00:00
David E. O'Brien
d7f4443e77 Remove information on nVidia nForce3 Pro-150 chipset to match GENERIC change. 2005-10-27 19:07:35 +00:00
Gleb Smirnoff
19bf94288f Keep locks consistent before goto.
Reported by:	pho
Reviewed by:	mohans
2005-10-27 19:02:34 +00:00
Peter Wemm
54903605b3 MFi386: bring over DEFAULTS (repocopy) and adapt. While there isn't a
4.x->6.x amd64 upgrade path, the config files are kept in approximate sync.
2005-10-27 18:54:43 +00:00
David E. O'Brien
537b6cf3ea Remove atpic as we've changed to using the lapic timer vs. using irq0 2005-10-27 18:40:56 +00:00
Murray Stokely
663f4b128b Look for packages in packages-6.0-release or packages-6-stable, as
appropriate.

Approved by:	re (scottl@)
Reviewed by:	portmgr (kris@)
2005-10-27 18:34:51 +00:00
Ruslan Ermilov
1558abf6ce Rename the .dbg extension to .symbols, which matches "symbol-file"
gdb(1) command better, though I must admit it's confusing: these
files have not only [debugging] symbols, but much more than that.

Requested by:	obrien
2005-10-27 17:39:03 +00:00
Xin LI
5340ce189f MFen: 1.883.2.7 -> 1.883.2.8
MT6 candidate

Obtained from:	The FreeBSD Simplified Chinese Project
2005-10-27 17:35:48 +00:00
John Baldwin
85d72e4a2e Create a default kernel config for i386 and move 'device isa' and
'device npx' (both of which aren't really optional right now) and
'device io' and 'device mem' (to preserve POLA for 4.x users upgrading
to 6.0) from GENERIC into DEFAULTS.

Requested by:	scottl
Reviewed by:	scottl
2005-10-27 17:34:35 +00:00
Ed Maste
5d89e1d0af In watchdog_config enable the software watchdog iff the WD_ACTIVE flag is
set.  When watchdogd(1) is terminated intentionally it clears the bit,
which should then disable it in the kernel.

PR:		kern/74386
Submitted by:	Alex Hoff <ahoff at sandvine dot com>
Approved by:	phk, rwatson (mentor)
2005-10-27 17:22:47 +00:00
John Baldwin
dfdbf9be00 Optionally include a DEFAULTS config file if it is present in the current
directory before the specified config file.  This is implemented by
opening DEFAULTS as stdin if it exists, and if so resetting stdin to the
actual config file when DEFAULTS is fully parsed via yywrap().  In short,
this lets us create DEFAULTS kernel configs in /sys/<arch>/conf that can
enable certain options or devices by default and allow users to disable
them via 'nooptions' or 'nodevice' rather than having to create kludge
NO_FOO options.

Requested by:	scottl
Reviewed by:	scottl
2005-10-27 17:13:23 +00:00
John Baldwin
518bf2dcc7 Update example libmap.conf file:
- Remove pointless examples that map libpthread to itself.
- Update shared libraries for 6.0 bumps.

Reported by:	rwatson
MFC after:	1 day
2005-10-27 16:59:02 +00:00
John Baldwin
2851f51eb1 Revert most of revision 1.235 and fix the problem a different way. We
can't acquire an sx lock in ttyinfo() because ttyinfo() can be called
from interrupt handlers (such as atkbd_intr()).  Instead, go back to
locking the process group while we pick a thread to display information for
and hold that lock until after we drop sched_lock to make sure the
process doesn't exit out from under us.  sched_lock ensures that the
specific thread from that process doesn't go away.  To protect against
the process exiting after we drop the proc lock but before we dereference
it to lookup the pid and p_comm in the call to ttyprintf(), we now copy
the pid and p_comm to local variables while holding the proc lock.

This problem was found by the recently added TD_NO_SLEEPING assertions for
interrupt handlers.

Tested by:	emaste
MFC after:	1 week
2005-10-27 16:47:28 +00:00
Søren Schmidt
f373190c49 Enclose the delayed attach in Giant so we dont loose the race with other
drivers trying to attach ATA devices like pccard.
Dont clear the delayed flag before we are acutally finished.

Spotted by: imp
2005-10-27 16:32:39 +00:00
David E. O'Brien
4a55b68732 Clear pending_txs when not "RUNNING".
Submitted by:	Q <q@onthenet.com.au>
2005-10-27 15:39:19 +00:00
Ruslan Ermilov
bebb05211f Use ${S} to pass ${SYSDIR} to ports. This makes PORTS_MODULES
feature work when compiling a kernel via "make buildkernel".

Noticed and tested by:	nork
2005-10-27 14:33:08 +00:00
Ruslan Ermilov
98b45a8ff8 Installing debug modules was a bad idea -- I bogusly assumed that
our kernel linker will only load PT_LOAD segments, apparently not.
Instead, produce .dbg objects from .debug objects, and install
them together with non-debug objects, as described in objcopy(1).

Original code by:	obrien
2005-10-27 14:24:45 +00:00
David Xu
55ac4c3523 Link libthr to libpthread on Alpha and Sparc. 2005-10-27 10:21:23 +00:00
Paul Saab
53f5742d33 Allow 32bit get/setsockopt with SO_SNDTIMEO or SO_RECVTIMEO to work. 2005-10-27 04:26:35 +00:00
David Xu
38478fab7c Disconnect libc_r from buildworld, it is still kept in the tree to
provide some baseline references, but users are encouraged to use
libpthread or libthr in real world.

Discussed on: arch@
2005-10-27 03:09:20 +00:00
Maksim Yevmenkin
9460540740 Do not manually allocate/free device's softc structure.
Pointed by:	jhb
Reviewed by:	imp, jhb
2005-10-26 23:13:51 +00:00
Peter Wemm
40c9966a37 Commit something we found useful at work at one point. Add sysctls for
debug.kdb.panic and debug.kdb.trap alongside the existing debug.kdb.enter
sysctl.  'panic' causes a panic, and 'trap' causes a page fault.  We used
these to ensure that crash dumps succeed from those two common failure
modes.  This avoids the need for creating a 'panic' kld module.
2005-10-26 22:40:07 +00:00
Peter Wemm
a9fbe5d07b MFi386: Various apic fixes and tweaks
* Don't recursively panic if we've already paniced and the local apic is
  now stuck.
* Add hw.apic.* tunables/sysctls for extint controls
* Change "lapic%d timer" to "cpu%d timer" intname to match i386
2005-10-26 22:32:30 +00:00
Peter Wemm
cb89fb11b7 fdread cannot work without opening the /dev/fd node in O_RDWR mode now,
because it sets the floppy controller parameters, which requires O_RDWR.
Specifically, the FD_SOPTS ioctl requires this, and the code errors out
and aborts if it can't do it.  Among other things, it is changing the
FDOPT_NOERRLOG flag.  Broken in 6.0 as well.
2005-10-26 22:28:38 +00:00
Peter Wemm
cb496fcf97 Make fdcontrol work again. It has been broken for a while. It tries
to set the floppy controller parameters, but that requires that the
device node be open in O_RDWR mode now.  I think it is broken in 6.0 as
well.  This line looks like a stray anyway.
2005-10-26 22:23:52 +00:00
Peter Wemm
946bca4fcd Regenerate (with the correct #ifdef COMPAT_43 tests now) 2005-10-26 22:21:03 +00:00
Peter Wemm
767dfc44be There is no 'freebsd3_' prefix for COMPAT_43 syscalls. Those are all
bundled under MCOMPAT and have an 'o' prefix.  Adjust as appropriate.
This re-enables compiling without COMPAT_43 again.
2005-10-26 22:19:51 +00:00
Peter Wemm
8f155a8f2e Change PHYSMAP_SIZE to allow for more memory segments. The old value was
too low for certain Dell amd64 machines.
2005-10-26 22:16:52 +00:00
Bill Paul
4cf9a535a8 Minor nit: in ntoskrnl_finddev(), only free the 'children' device_t
array if device_find_children() actually returned a non-NULL array pointer.
2005-10-26 20:21:45 +00:00