Commit graph

120504 commits

Author SHA1 Message Date
Bruce Evans ec761d7501 Optimize by not doing excessive conversions for handling the sign bit.
This gives an optimization of between 9 and 22% on Athlons (largest
for cbrt() on amd64 -- from 205 to 159 cycles).

We extracted the sign bit and worked with |x|, and restored the sign
bit as the last step.  We avoided branches to a fault by using accesses
to FP values as bits to clear and restore the sign bit.  Avoiding
branches is usually good, but the bit access macros are not so good
(especially for setting FP values), and here they always caused pipeline
stalls on Athlons.  Even using branches would be faster except on args
that give perfect branch misprediction, since only mispredicted branches
cause stalls, but it possible to avoid touching the sign bit in FP
values at all (except to preserve it in conversions from bits to FP
not related to the sign bit).  Do this.  The results are identical
except in 2 of the 3 unsupported rounding modes, since all the
approximations use odd rational functions so they work right on strictly
negative values, and the special case of -0 doesn't use an approximation.
2005-12-13 20:17:23 +00:00
Alan Cox 984922d761 Assert that the page that is given to vm_page_free_toq() does not have any
managed mappings.
2005-12-13 19:59:09 +00:00
Peter Wemm 737429bc96 MFamd64 rev 1.223: Use the TSC to implement DELAY() if not marked broken
and it has been calibrated.
2005-12-13 19:08:55 +00:00
John Baldwin e83f6bcb75 Revert previous commit. The BIOS braindamage is even worse than I
originally thought.  The BIOS that cleared CPUID_APIC actually managed
to disable the local APIC entirely and even Windows 64 doesn't boot on
it.

Reported by:	bz
2005-12-13 18:29:10 +00:00
Bruce Evans 7d5a4821ba Fixed some especially horrible style bugs (indentation that is neither
KNF nor fdlibmNF combined with multiple statements per line).
2005-12-13 18:22:00 +00:00
Dag-Erling Smørgrav 1cd4b9861a Print user, system and real time upon exit. 2005-12-13 17:51:56 +00:00
Ruslan Ermilov a5b0d9050a [mdoc] add missing space before a punctuation type argument. 2005-12-13 17:07:52 +00:00
Xin LI 1278dd6847 In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference.  Handle the difference within the
linux_ioctl_termio on the LINUX_TCFLSH path.

Submitted by:	Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
2005-12-13 15:32:52 +00:00
John Baldwin 15b7edbeaa Don't check the CPUID_APIC bit in the cpu_features flags field to determine
if the boot CPU has a local APIC because some BIOS vendors are not
competent enough to set this bit.  Instead, just assume that we always have
a local APIC on amd64.  For i386 the check is a bit more subtle.  FreeBSD
requires either an MP Table or an ACPI MADT table to enumerate APICs.  The
only systems that have one of those tables that don't have local APICs are
some presumably rare (and old) SMP 486 systems using external APICs.  Thus,
instead of checking the CPUID_APIC flag, check the CPU class and abort if
we are running on a 486.

MFC after:	1 week
Reported by:	bz
2005-12-13 15:09:40 +00:00
David Xu 412295fdbd Sort .Xr by section number.
Submitted by: ru
2005-12-13 13:43:35 +00:00
Poul-Henning Kamp b384108ed6 /* You're not supposed to hit this problem */
For some denormalized long double values, a bug in __hldtoa() (called
from *printf()'s %A format) results in a base 16 digit being rounded
up from 0xf to 0x10.

When this digit is subsequently converted to string format, an index
of 10 reaches past the end of the uppper-case hex/char array, picking
up whatever the code segment happen to contain at that address.

This mostly seem to be some character from the upper half of the
byte range.

When using the %a format instead of %A, the first character past
the end of the lowercase hex/char table happens to be index 0 in
the uppercase hex/char table hextable and therefore the string
representation features a '0', which is supposedly correct.

This leads me to belive that the proper fix _may_ be as simple as
masking all but the lower four bits off after incrementing a hex-digit
in libc/gdtoa/_hdtoa.c:roundup().  I worry however that the upper
bit in 0x10 indicates a carry not carried.

Until das@ or bde@ finds time to visit this issue, extend the
hexdigit arrays with a 17th index containing '?' so that we get a
invalid but consistent and printable output in both %a and %A formats
whenever this bug strikes.

This unmasks the bug in the %a format therefore solving the real
issue may both become easier and more urgent.

Possibly related to:	PR 85080
With help by:		bde@
2005-12-13 13:23:27 +00:00
Gleb Smirnoff 40b1ae9e00 Add a new feature for optimizining ipfw rulesets - substitution of the
action argument with the value obtained from table lookup. The feature
is now applicable only to "pipe", "queue", "divert", "tee", "netgraph"
and "ngtee" rules.

An example usage:

  ipfw pipe 1000 config bw 1000Kbyte/s
  ipfw pipe 4000 config bw 4000Kbyte/s
  ipfw table 1 add x.x.x.x 1000
  ipfw table 1 add x.x.x.y 4000
  ipfw pipe tablearg ip from table(1) to any

In the example above the rule will throw different packets to different pipes.

TODO:
  - Support "skipto" action, but without searching all rules.
  - Improve parser, so that it warns about bad rules. These are:
    - "tablearg" argument to action, but no "table" in the rule. All
      traffic will be blocked.
    - "tablearg" argument to action, but "table" searches for entry with
      a specific value. All traffic will be blocked.
    - "tablearg" argument to action, and two "table" looks - for src and
      for dst. The last lookup will match.
2005-12-13 12:16:03 +00:00
Marcel Moolenaar 2778b70e71 In bge_link_upd(), rewrite the logic so that status is assigned
on the code path it is used in a way that GCC understands. This
avoids breakage due to higher optimization levels.
2005-12-13 06:14:14 +00:00
David Xu e9e7495667 Add cross references to siginfo.3. 2005-12-13 03:05:58 +00:00
Craig Rodrigues e497db39e8 Inherit system-wide BLKDEV_IOSIZE definition.
Submitted by:	kan
2005-12-13 02:32:30 +00:00
David Xu 22fc836263 Add siginfo. 2005-12-13 00:28:09 +00:00
Paul Saab fc6ff223c4 Improve upon rev 1.133 where NFS/TCP would not reconnect.
Submitted by:	Mohan Srinivasan
2005-12-12 23:18:05 +00:00
Peter Wemm 6bcdd71391 For the amd64 platform, we can depend on the TSC being present. This patch
changes DELAY to use the TSC once it has been calibrated.  This does NOT
use the TSC for long-term timekeeping.   It only uses it to bound the
DELAY() spinloop.  This should not be affected by the Athlon64 X2 TSC
quirks because the cpu is not halted while we use DELAY().
2005-12-12 22:27:07 +00:00
Warner Losh fbd68c4b4c Make uart_getenv() not be ns8250 dependent. This will allow, in the future,
compilation of kernels without ns8250 support but using the uart framework.
These kernels will be for machines where size matters more, so including code
that can never be executed is undesriable...
2005-12-12 21:00:58 +00:00
Craig Rodrigues cf9e56b04e For reiserfs, pass mount parameters directly to nmount() instead
of forking an external mount_reiserfs program.

Reviewed by:	dumbbell
2005-12-12 19:51:37 +00:00
Gleb Smirnoff 02a101a611 - Polling can be used on SMP.
- A kernel module can support polling.
2005-12-12 19:29:30 +00:00
Sam Leffler 439b4702f3 add mcastrate support
MFC after:	1 week
2005-12-12 19:23:55 +00:00
Sam Leffler d16441fde1 disallow module unload when there are dynamic references
MFC after:	1 week
2005-12-12 19:07:48 +00:00
Sam Leffler 1fd2349de8 propagate current bss state on sta join so, in particular, authmode
is set properly in the new bss node

MFC after:	2 weeks
2005-12-12 18:44:27 +00:00
Sam Leffler 1b49e12042 Bandaid ieee80211_set_chan to handle a channel parameter of "any";
this can happen under certain conditions when scanning.  This logic
will eventually go away with the new scanning code.

While here de-inline the routine.

MFC after:	1 week
2005-12-12 18:42:20 +00:00
Sam Leffler 6cfac1074c o correct auto mode logic for avoiding turbo channels
o correct assumption that a static turbo channel is also
  usable in 11a; the opposite is true

MFC after:	1 week
2005-12-12 18:38:20 +00:00
Sam Leffler e701e041f2 Add ieee80211_beacon_miss for processing sta mode beacon miss events
in the 802.11 layer: we send a directed probe request frame to the
current ap bmiss_max times (w/o answer) before scanning for a new ap.

MFC after:	2 weeks
2005-12-12 18:04:44 +00:00
Sam Leffler 047f1635dd add some useful definitions that'll be used soon 2005-12-12 17:57:00 +00:00
Sam Leffler 64353cb0ef add fixed rate for sending multicast frames
Obtained from:	atheros
MFC after:	1 week
2005-12-12 17:54:39 +00:00
Sam Leffler c25442860a change malloc when setting an optional ie to use M_NOWAIT
MFC after:	3 days
2005-12-12 17:40:49 +00:00
Sam Leffler e55e5e4276 correct parameter check when retrieving the current channel list
MFC after:	3 days
2005-12-12 17:38:53 +00:00
Christian Brueffer 5804e5be7f Mention SiS write support and add a missing parenthesis. 2005-12-12 16:46:19 +00:00
Marius Strobl 00d3c930da Fix a bug introduced in rev. 1.5; for retrieving the device_t of the
parent bridge of a PCI-PCI bridge we need two device_get_parent().
2005-12-12 16:07:11 +00:00
Diomidis Spinellis 8af06aba63 Add missing John Gilmore quote. 2005-12-12 15:47:33 +00:00
Florent Thoumie a3a5e8e574 - Add a note about latest changes to the iwi(4) driver. A message is printed
if the firmware can't be found in /boot/firmware.

Approved by:	brueffer
2005-12-12 15:00:45 +00:00
Maxime Henrion 52dfd9cdad Add the device ID of fxp(4) NICs found in Sony Vaio VGN-TX1XP laptops.
PR:		kern/90024
Submitted by:	Thomas Hurst <tom@hur.st>
MFC after:	3 days
2005-12-12 14:30:13 +00:00
Søren Schmidt 921f15117f Add support for writing SiS metadata. 2005-12-12 14:13:55 +00:00
Bruno Ducrot f9ead0fcbe Don't flood kernel logs with "invalid _PSS package" messages.
Approved by:	njl, imp (mentor)
2005-12-12 11:15:20 +00:00
Ruslan Ermilov e9484e32a1 Remove all redundant option file names that don't hurt readability. 2005-12-12 10:15:11 +00:00
David Xu e6a9baa280 Remove unused _get_curthread() call. 2005-12-12 07:14:57 +00:00
Bjoern A. Zeeb 3e4212785c Make nve(4) work for people with nf3/nf4 who never got it
working at all and only saw "nve0: device timeout (N)" messages.

- Setup PHY before handing control to NVidia API setting
  speed, duplex, enabling interrupts, etc.
- Add restriction of MAXADDR_32BIT for high address to contigmalloc
  to make the driver work on machines with 4+GB of memory.

PR:        kern/85583, kern/88045
Tested by: scottl, others earlier version
MFC after: 10 days
2005-12-12 06:23:43 +00:00
David Xu dd1a6f53ac Stop fiddling thread priority with msleep, eliminating unnecessary
context switching. This improves performance about 30% on UP machine.
2005-12-12 05:04:56 +00:00
Maksim Yevmenkin 4b99735d08 Fix typo in rfcomm_pppd(8) man page.
Noticed by:	Ronald Klop
MFC after:	1 day
2005-12-12 04:19:36 +00:00
Craig Rodrigues 15fd62fa0f #define __user to nothing 2005-12-12 03:21:37 +00:00
Craig Rodrigues 7b30d7180f Add read-only XFS to LINT. 2005-12-12 02:01:51 +00:00
Craig Rodrigues 80d8e89620 Build xfs before xl.
Noticed by:	pjd
2005-12-12 01:37:57 +00:00
Craig Rodrigues 5518f0df3a Add xfs to list of modules which are built. 2005-12-12 01:29:57 +00:00
Craig Rodrigues 778a46030c Remove extra geom_zero.
Noticed by:	pjd
2005-12-12 01:28:19 +00:00
Craig Rodrigues e1fd210e51 Hook XFS into kernel build. 2005-12-12 01:14:59 +00:00
Craig Rodrigues 1f83e99e4c Add Makefile for compiling XFS as a kernel module. 2005-12-12 01:11:08 +00:00