Commit Graph

113316 Commits

Author SHA1 Message Date
das
1f3be4402d Remove ldexp and ldexpf. The former is in libc, and the latter is
identical to scalbnf, which is now aliased as ldexpf.  Note that the
old implementations made the mistake of setting errno and were the
only libm routines to do so.
2005-03-07 04:59:30 +00:00
das
55e39ad021 - Remove s_ldexpf.c (now aliased to scalbn.)
- Add nexttoward{,f,l} and nextafterl.  On all platforms,
  nexttowardl is an alias for nextafterl.
- Add fmal.
- Add man pages for new routines: fmal, nextafterl,
  nexttoward{,f,l}, scalb{,l}nl.

Note that on platforms where long double is the same as double, we
generally just alias the double versions of the routines, since doing
so avoids extra work on the source code level and redundant code in
the binary.  In particular:

		ldbl53		ldbl64/113
fmal       	s_fma.c		s_fmal.c
ldexpl     	s_scalbn.c	s_scalbnl.c
nextafterl 	s_nextafter.c	s_nextafterl.c
nexttoward 	s_nextafter.c	s_nexttoward.c
nexttowardf	s_nexttowardf.c	s_nexttowardf.c
nexttowardl	s_nextafter.c	s_nextafterl.c
scalbnl    	s_scalbn.c	s_scalbnl.c
2005-03-07 04:59:11 +00:00
das
fd944134c6 - Define FP_FAST_FMA for sparc64, since fma() is now implemented using
sparc64's 128-bit long doubles.
- Define FP_FAST_FMAL for ia64.
- Prototypes for fmal, frexpl, ldexpl, nextafterl, nexttoward{,f,l},
  scalblnl, and scalbnl.
2005-03-07 04:58:43 +00:00
das
9a051ba77b Alias scalbn as ldexpl and scalbnl on platforms where long double is
the same as double.
2005-03-07 04:58:03 +00:00
das
6600ea99c1 - Implement scalblnl.
- In scalbln and scalblnf, check the bounds of the second argument.
  This is probably unnecessary, but strictly speaking, we should
  report an error if someone tries to compute scalbln(x, INT_MAX + 1ll).
2005-03-07 04:57:50 +00:00
das
fe5bcdbac5 Implement nexttowardf. This is used on both platforms with 11-bit
exponents and platforms with 15-bit exponents for long doubles.
2005-03-07 04:57:38 +00:00
das
7818b34a10 Implement nexttoward and nextafterl; the latter is also known as
nexttowardl.  These are not needed on machines where long doubles
look like IEEE-754 doubles, so the implementation only supports
the usual long double formats with 15-bit exponents.

Anything bizarre, such as machines where floating-point and integer
data have different endianness, will cause problems.  This is the case
with big endian ia64 according to libc/ia64/_fpmath.h.  Please contact
me if you managed to get a machine running this way.
2005-03-07 04:56:46 +00:00
das
356e29eb2d - Try harder to trick gcc into not optimizing away statements
that are intended to raise underflow and inexact exceptions.
- On systems where long double is the same as double, nextafter
  should be aliased as nexttoward, nexttowardl, and nextafterl.
2005-03-07 04:55:58 +00:00
das
83b372fbd0 - Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double.  For architectures that don't have such a bit,
  LDBL_NBIT is 0.  This makes it possible to say `mantissa & ~LDBL_NBIT'
  in places that previously used an #ifdef to select the right expression.
  The optimizer should dispense with the extra arithmetic when LDBL_NBIT
  is 0 anyway.
- Add an XXX comment for the big endian case.
2005-03-07 04:55:40 +00:00
das
a6dba00c47 Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double.  For architectures that don't have such a bit,
LDBL_NBIT is 0.  This makes it possible to say `mantissa & ~LDBL_NBIT'
in places that previously used an #ifdef to select the right expression.
The optimizer should dispense with the extra arithmetic when LDBL_NBIT
is 0.
2005-03-07 04:55:22 +00:00
das
2cc13e1e88 Implement frexpl. 2005-03-07 04:54:51 +00:00
das
84ad4c5b6e Alias frexp as frexpl on platforms where a long double is the same as
a double.
2005-03-07 04:54:39 +00:00
das
1e49f0f6c9 Implement fmal. 2005-03-07 04:54:20 +00:00
das
acc1374e50 - Define the LDBL_PREC to be the number of significant bits in a long
double's mantissa.
- Add an assembly version of fmal.
2005-03-07 04:54:02 +00:00
das
21f1e1325d - Define the LDBL_PREC to be the number of significant bits in a long
double's mantissa.
- Add an assembly version of scalbnl.
2005-03-07 04:53:48 +00:00
das
7de9ed08e2 Define the LDBL_PREC to be the number of significant bits in a long
double's mantissa.
2005-03-07 04:53:36 +00:00
das
727afbc2b1 Add an assembly version of fmal. 2005-03-07 04:53:11 +00:00
das
1acdadc49a Add scalbnl, also known as as ldexpl. 2005-03-07 04:52:58 +00:00
das
e60595c23c Alias scalbnf as ldexpf. The two are identical in binary
floating-point formats.
2005-03-07 04:52:43 +00:00
wpaul
fba490d861 When you call MiniportInitialize() for an 802.11 driver, it will
at some point result in a status event being triggered (it should
be a link down event: the Microsoft driver design guide says you
should generate one when the NIC is initialized). Some drivers
generate the event during MiniportInitialize(), such that by the
time MiniportInitialize() completes, the NIC is ready to go. But
some drivers, in particular the ones for Atheros wireless NICs,
don't generate the event until after a device interrupt occurs
at some point after MiniportInitialize() has completed.

The gotcha is that you have to wait until the link status event
occurs one way or the other before you try to fiddle with any
settings (ssid, channel, etc...). For the drivers that set the
event sycnhronously this isn't a problem, but for the others
we have to pause after calling ndis_init_nic() and wait for the event
to arrive before continuing. Failing to wait can cause big trouble:
on my SMP system, calling ndis_setstate_80211() after ndis_init_nic()
completes, but _before_ the link event arrives, will lock up or
reset the system.

What we do now is check to see if a link event arrived while
ndis_init_nic() was running, and if it didn't we msleep() until
it does.

Along the way, I discovered a few other problems:

- Defered procedure calls run at PASSIVE_LEVEL, not DISPATCH_LEVEL.
  ntoskrnl_run_dpc() has been fixed accordingly. (I read the documentation
  wrong.)

- Similarly, the NDIS interrupt handler, which is essentially a
  DPC, also doesn't need to run at DISPATCH_LEVEL. ndis_intrtask()
  has been fixed accordingly.

- MiniportQueryInformation() and MiniportSetInformation() run at
  DISPATCH_LEVEL, and each request must complete before another
  can be submitted. ndis_get_info() and ndis_set_info() have been
  fixed accordingly.

- Turned the sleep lock that guards the NDIS thread job list into
  a spin lock. We never do anything with this lock held except manage
  the job list (no other locks are held), so it's safe to do this,
  and it's possible that ndis_sched() and ndis_unsched() can be
  called from DISPATCH_LEVEL, so using a sleep lock here is
  semantically incorrect. Also updated subr_witness.c to add the
  lock to the order list.
2005-03-07 03:05:31 +00:00
grog
427fcfc7b2 Correct indentation style:
- "options" is followed by the characters \040\011, not \011\011.
  Correct both my own sins and those of others.
- Comment blocks start and end with an empty line ^#$.
- Remove non-standard comments added in my last commit.

Requested by: njl
Correctness confirmed by: bde
2005-03-07 02:20:14 +00:00
scottl
0269d6f325 Remove dead code. 2005-03-07 02:18:52 +00:00
grehan
44ee33095d physmem is a much better indicator for 'real' memory on PPC than Maxmem
since there are often significant holes in the memory map due to the
kernel, loader and OFW data structures not being included: Maxmem is
the highest available, so can be misleading.
2005-03-07 01:52:24 +00:00
grehan
3359f3b157 Allow user to undersize memory with hw.physmem loader variable.
Obtained from:  i386/machdep.c:getmemsize()
2005-03-07 01:46:06 +00:00
mux
5833b0e968 Fix typo. 2005-03-07 00:24:52 +00:00
sobomax
270ebad327 Regen after addition of linux_nosys handler. 2005-03-07 00:23:58 +00:00
sobomax
7faa9e9e0f Handle unimplemented syscall by instantly returning ENOSYS instead of sending
signal first and only then returning ENOSYS to match what real linux does.

PR:		kern/74302
Submitted by:	Travis Poppe <tlp@LiquidX.org>
2005-03-07 00:18:06 +00:00
sobomax
3ce7730799 When neither of supported frame type is enabled via kernel options enable
them all, otherwise the driver will be useless and will only confuse user
as manual page says nothing about the need to enable one of those frame
types explicitly in the kernel config.

PR:		kern/47152
Submitted by:	Andriy Gapon <avg@icyb.net.ua>
MFC after:	3 days
2005-03-06 23:03:58 +00:00
sobomax
80fb82bb40 Fix ef(4) driver when kernel compiled w/o IPX.
MFC after:	3 days
2005-03-06 22:59:40 +00:00
sobomax
f2f382f647 Always produce cpuX entries, even in the case when there is only one CPU
in the system. This is consistent with what real linuxes do.

PR:		kern/75848
Submitted by:	Andriy Gapon <avg@icyb.net.ua>
MFC after:	3 days
2005-03-06 22:28:14 +00:00
cognet
ddf62ad14c Use [ldr|str]t instead of [ldr|str] when accessing ARM_TP_ADDRESS. 2005-03-06 21:12:03 +00:00
cognet
e1d8c28458 Make sure ARM_TP_ADDRESS is accessible right now by calling pmap_fault_fixup,
as we can't rely on a trap happening, as it is done normally.
While I'm there, uncomment the call to cpu_dcache_wbinv_range() in
pmap_kenter_internal, as we don't call cpu_dcache_wbinv_all() there anymore.
2005-03-06 21:10:31 +00:00
scottl
59a3b39bf7 Use correct flags for bus_dma_tag_create(). 2005-03-06 20:57:54 +00:00
alc
3528453a09 Declare as volatile the memory location referenced by a pointer rather than
the pointer's value.
2005-03-06 20:57:08 +00:00
scottl
e8e563a698 Use the correct flags for bus_dma_tag_create(). 2005-03-06 20:56:16 +00:00
alc
a81d71bdde The m_ext reference counts are potentially shared and modified
asynchronously by different threads.  Thus, declare as volatile the
reference count that is accessed through m_ext's pointer, ref_cnt.
Revert the previous change, revision 1.144, that casts as volatile a
single dereference of ref_cnt.

Reviewed by: bmilekic, dwhite
Problem reported by: kris
MFC after: 3 days
2005-03-06 20:09:00 +00:00
phk
ae2807f90d Always go to standby efter each call. 2005-03-06 19:43:12 +00:00
phk
bfda3d22fa Don't disable interrupts on a stray interrupt. 2005-03-06 19:42:32 +00:00
hrs
9604a4d65a New release notes:
atkbd(4) 0x08 flag,
	ipnat(8) redirect rule supports non-TCP/UDP packets, and
	sppp(4) MPSAFE.

Update release notes:
	pppd(8) incorrect CBCP response fix (MFC).
2005-03-06 19:08:51 +00:00
das
a263f09ca4 Fix a mistake in the exponent range. 2005-03-06 19:08:18 +00:00
hrs
4f76a8d7dc New release notes:
Beastie boot menu disabled,
	acpi(4) turns ACPI and PCI devices off or to a lower
	power state in suspend,
	acpi_ibm driver added,
	ed(4) ALTQ support,
	ipfw(4) ucred-based rules can be used with debug.mpsafenet=1,
	TCP-MD5 implementation in KAME IPv4 IPsec,
	ftpd(8) 212 and 213 status code support,
	gvinum checkparity/rebuildparity/setstate subcommand support,
	periodic(8) security report now includes blocked packet
	counts by pf(4),
	ppp(8) NAS-IP-Address/NAS-Identifier options,
	pppd(8) incorrect CBCP response fix, and
	rescue(8) now includes BSD tar.

Update release notes:
	rc.conf(5) network interface renaming support (MFC), and
	markup fix in the entry of systat(1) IPv6 support.
2005-03-06 18:01:05 +00:00
rushani
28fca89e2d s/AST/ARNET/ where appropriate. 2005-03-06 14:50:42 +00:00
stefanf
6f3297a743 Fix typos in a comment. 2005-03-06 13:53:05 +00:00
cognet
36e1c6cac0 Unlike NetBSD's bcopy(), our bcopy allows the two strings to overlap, even in
kernel. So bring in the userland version, instead of just calling memcpy.
2005-03-06 13:11:32 +00:00
nyan
e5e6b074be MFi386: revisions 1.609 and 1.610. 2005-03-06 12:59:59 +00:00
maxim
f58688c4a1 o s/opt_ifpw.h/opt_ipfw.h/ in the previous commit.
Submitted by:	YONETANI Tomokazu
2005-03-06 11:22:49 +00:00
njl
3525860172 Whitespace nit. Clarifies which body this line belongs to. 2005-03-06 10:17:30 +00:00
marcus
08440d6d16 Increase the default stacksizes:
32-bit		64-bit
main thread	2 MB		4 MB
other threads	1 MB		2 MB

Approved by:	mtm
Adapted from:	libpthread
2005-03-06 07:56:18 +00:00
imp
620860e7a0 Back out previous commit. The description didn't match the commit,
and marking this interrupt as fast isn't quite right.  It also needs
to be MP Safe, and I've not done that work (yet).
2005-03-06 06:59:15 +00:00
imp
004cb1509b Use BUS_PROBE_DEFAULT 2005-03-06 06:55:11 +00:00