Commit Graph

113161 Commits

Author SHA1 Message Date
David Schultz
15a53f77fd Add nexttoward to the list of implemented functions, and explicitly
list the four that are still missing.
2005-03-07 04:59:53 +00:00
David Schultz
66d672d8cb Document fmal. 2005-03-07 04:59:43 +00:00
David Schultz
94e03502dc 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
David Schultz
aeb5e711f3 - 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
David Schultz
228ad57d05 - 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
David Schultz
beed720c37 Alias scalbn as ldexpl and scalbnl on platforms where long double is
the same as double.
2005-03-07 04:58:03 +00:00
David Schultz
7b6a19039d - 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
David Schultz
caacab9b5f 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
David Schultz
ef94de735a 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
David Schultz
a506506a1c - 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
David Schultz
21f9dd806f - 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
David Schultz
1dfab5edec 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
David Schultz
e0fe8e4440 Implement frexpl. 2005-03-07 04:54:51 +00:00
David Schultz
f8a40fca14 Alias frexp as frexpl on platforms where a long double is the same as
a double.
2005-03-07 04:54:39 +00:00
David Schultz
65e60ab108 Implement fmal. 2005-03-07 04:54:20 +00:00
David Schultz
b1f37dcef4 - 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
David Schultz
99401fa2e9 - 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
David Schultz
4be31f0664 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
David Schultz
4442891961 Add an assembly version of fmal. 2005-03-07 04:53:11 +00:00
David Schultz
cd7d05b5a2 Add scalbnl, also known as as ldexpl. 2005-03-07 04:52:58 +00:00
David Schultz
4b2011300b Alias scalbnf as ldexpf. The two are identical in binary
floating-point formats.
2005-03-07 04:52:43 +00:00
Bill Paul
58a6edd121 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
Greg Lehey
3236b30e2b 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
Scott Long
8bf0837c7a Remove dead code. 2005-03-07 02:18:52 +00:00
Peter Grehan
e38509dc05 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
Peter Grehan
e2f6d6e28a Allow user to undersize memory with hw.physmem loader variable.
Obtained from:  i386/machdep.c:getmemsize()
2005-03-07 01:46:06 +00:00
Maxime Henrion
cebf474d0d Fix typo. 2005-03-07 00:24:52 +00:00
Maxim Sobolev
ecab0de7c1 Regen after addition of linux_nosys handler. 2005-03-07 00:23:58 +00:00
Maxim Sobolev
e3478fe000 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
Maxim Sobolev
5c16270365 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
Maxim Sobolev
a10260280f Fix ef(4) driver when kernel compiled w/o IPX.
MFC after:	3 days
2005-03-06 22:59:40 +00:00
Maxim Sobolev
996358f55c 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
Olivier Houchard
7a7e7cf91e Use [ldr|str]t instead of [ldr|str] when accessing ARM_TP_ADDRESS. 2005-03-06 21:12:03 +00:00
Olivier Houchard
da53588551 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
Scott Long
9ab2d898e7 Use correct flags for bus_dma_tag_create(). 2005-03-06 20:57:54 +00:00
Alan Cox
fe4fbe5515 Declare as volatile the memory location referenced by a pointer rather than
the pointer's value.
2005-03-06 20:57:08 +00:00
Scott Long
70e83c0d6e Use the correct flags for bus_dma_tag_create(). 2005-03-06 20:56:16 +00:00
Alan Cox
2b2c7a6b40 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
Poul-Henning Kamp
22a9eb5334 Always go to standby efter each call. 2005-03-06 19:43:12 +00:00
Poul-Henning Kamp
4e51c02840 Don't disable interrupts on a stray interrupt. 2005-03-06 19:42:32 +00:00
Hiroki Sato
e3be46bfb0 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
David Schultz
1b32579f23 Fix a mistake in the exponent range. 2005-03-06 19:08:18 +00:00
Hiroki Sato
990506a17c 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
Hideyuki KURASHINA
7c856bfd68 s/AST/ARNET/ where appropriate. 2005-03-06 14:50:42 +00:00
Stefan Farfeleder
0eca8743b8 Fix typos in a comment. 2005-03-06 13:53:05 +00:00
Olivier Houchard
2ba823e954 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
Yoshihiro Takahashi
c3b74b57af MFi386: revisions 1.609 and 1.610. 2005-03-06 12:59:59 +00:00
Maxim Konovalov
8cbe387216 o s/opt_ifpw.h/opt_ipfw.h/ in the previous commit.
Submitted by:	YONETANI Tomokazu
2005-03-06 11:22:49 +00:00
Nate Lawson
9956392d2c Whitespace nit. Clarifies which body this line belongs to. 2005-03-06 10:17:30 +00:00
Joe Marcus Clarke
c5a6625e3e 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