Commit Graph

179226 Commits

Author SHA1 Message Date
tsutsui
f2ca316138 Don't use relative path from <machine> in #include.
It won't work for symlinks.
2009-04-02 13:00:40 +00:00
drochner
6e71fa2242 add a test which exercises libpthread's ability to remember the
threads which were created, doing some random mallocs in between
so that threads are not equidistant in the address space
(bug fixed in libpthread/pthread.c rev. 1.109)
2009-04-02 12:58:44 +00:00
drochner
103beeac7d add a test which stresses the rbtree code with random numbers 2009-04-02 12:49:59 +00:00
pooka
095a7dd3b6 Release tdvp in an appropriate VOP_RENAME error branch to avoid
panic described in PR kern/40948.

As usual, all the error branches in rename live based on an unholy
amalgamation of prayer and the blood of cute, furry and tasty
quadrupeds, so I won't even attempt to audit the rest.

And this wapbl rename really really needs to be merged with the
standard rename.  That should be a fun PhD thesis topic ....
2009-04-02 11:33:04 +00:00
pooka
c69ace3c05 ARGSUSED makes lindt a happy camper 2009-04-02 09:30:41 +00:00
dyoung
30156f20e6 Cosmetic changes, only, to clarify and to save a couple of lines: return
a constant, 0, instead of returning ret when it is always 0.  Wait to
initialize ret until we really need to.
2009-04-02 01:06:49 +00:00
dyoung
b783d8bd8c Add the WEP capability to our net80211 capability flags, since we do
sort of support hardware WEP.  Only change the WEP key index in a Tx
descriptor from 0 if the type of our transmit key is _WEP, not _TKIP:
i.e., only if we're really doing WEP crypto in the hardware.

Ignore a watchdog timeout on any Tx ring if we can collect some packets
from that ring.  Restart both the receiver and the transmitter when a
watchdog timeout occurs instead of restarting only the transmitter.
2009-04-02 00:57:20 +00:00
dyoung
726f95dae4 I find myself making a lot of changes in this code to keep it compiling
and (let us hope) working in the 21st century, so I have put it through
unifdef -D__NetBSD__ -U__FreeBSD__ so that it is less of a chore to read
and to maintain.
2009-04-02 00:39:37 +00:00
enami
09fcc8b316 So that profile kernel runs again,
- Adjust the size of functions used to patch.
- Fix the jump offset of mcount call when patching functions.

Approved by Andrew Doran.
2009-04-02 00:19:02 +00:00
dyoung
0d1ba3e899 During shutdown, detach devices in an orderly fashion.
Call the detach routine for every device in the device tree, starting
with the leaves and moving toward the root, expecting that each
(pseudo-)device driver will use the opportunity to gracefully commit
outstandings transactions to the underlying (pseudo-)device and to
relinquish control of the hardware to the system BIOS.

Detaching devices is not suitable for every shutdown: in an emergency,
or if the system state is inconsistent, we should resort to a fast,
simple shutdown that uses only the pmf(9) shutdown hooks and the
(deprecated) shutdownhooks.  For now, if the flag RB_NOSYNC is set in
boothowto, opt for the fast, simple shutdown.

Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence
that it is safe to detach a device during shutdown.  Introduce macros
CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf
attachments with default device flags.  Add DVF_DETACH_SHUTDOWN
to configuration attachments for atabus(4), atw(4) at cardbus(4),
cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4),
elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4),
pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4).

Add a device-detachment "reason" flag, DETACH_SHUTDOWN, that tells the
autoconf code and a device driver that the reason for detachment is
system shutdown.

Add a sysctl, kern.detachall, that tells the system to try to detach
every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN
flag.  The default for kern.detachall is 0.  SET IT TO 1, PLEASE, TO
HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN.

This is a work in progress.  In future work, I aim to treat
pseudo-devices more thoroughly, and to gracefully tear down a stack of
(pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and
raid(4) instances at shutdown.

Also commit some changes that are not easily untangled from the rest:

(1) begin to simplify device_t locking: rename struct pmf_private to
device_lock, and incorporate device_lock into struct device.

(2) #include <sys/device.h> in sys/pmf.h in order to get some
definitions that it needs.  Stop unnecessarily #including <sys/device.h>
in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases
building.
2009-04-02 00:09:32 +00:00
darran
49d3640ae0 Also inherit the parent's TCP segmentation offload capability.
Note the vlan interface does not see updates to the parents capabilities
so if, for example, TSO is on in both, then turned off in the parent it
will remain on in the vlan interface.
2009-04-01 22:56:59 +00:00
drochner
23d4af832f sort out what is needed for crash(8) and what not, should fix
recent build errors
2009-04-01 21:15:45 +00:00
christos
802d07dbca cast segsz to int. 2009-04-01 21:15:23 +00:00
cube
7ad46619fb Make keypad return an int instead of nothing, as the SUS and even
curses_input(3) [!] say it should.

OK'd jdc@.  ABI lawyers say this doesn't need major bump.
2009-04-01 20:59:15 +00:00
perry
0e8e3df5ff More reproducible build fixes:
1) invoke objcopy with --preserve-dates or it will update all the
   dates in the .a file to the present date.
2) add an invocation of ar-as-ranlib or the object file index ends up
   with the date in it. (it might also end up with an incorrect
   index.)
2009-04-01 17:51:12 +00:00
perry
6b7db9a3b4 Add a _ARRANFL for the flags for invoking ar as ranlib.
Will be used only for Makefile.rump for now.
2009-04-01 17:47:39 +00:00
martin
4e59766728 Make the ddb.onpanic line acceptable even if commented out 2009-04-01 16:38:46 +00:00
martin
5139ca15dc Use the new ?= operator to set the on_panic value for the optional ddb
hierachie.
2009-04-01 16:20:55 +00:00
christos
e048bed6b3 Don't print an error with sysctl -w name?=value if name does not exist.
Should be pulled up to 5.0
2009-04-01 15:55:27 +00:00
pooka
c675da1b5a Be less verbose. (something like rump_dmesg with optional QUIET
would be nice, but needs work)
2009-04-01 14:37:00 +00:00
reinoud
42726265fe Implement MMC_TRACKINFO_DATA and MMC_TRACKINFO_AUDIO detection for cdrom and
dvdrom devices. These two compatibility codes were forgotten when those were
introduced.
2009-04-01 12:19:04 +00:00
lukem
e8c7343395 fix sign-compare issue 2009-04-01 10:17:04 +00:00
drochner
f1c955a1b2 Fix the comparision function used by the red-black tree global thread list
implementation:
-don't return a difference, this can overflow
-don't try to substract typed pointers which don't belong to the
 same object, this gives undefined results

This fixes instabilities of programs which use more than a handful
of threads, eg spuriously failing pthread_join().
2009-04-01 10:13:24 +00:00
wiz
3a9e7e68ee Readability improvement. Whitespace nits. 2009-04-01 08:58:47 +00:00
wiz
280ab6ce9b Use .An and .Aq for formatting in the AUTHORS section. 2009-04-01 08:55:45 +00:00
mrg
a4a48f5384 note that -n also stops the timestamp from being output.
bump date.
2009-04-01 08:15:37 +00:00
tls
d15f48cfe5 Fix probe for VIA C3 and successors -- these are CPU family 6, not 5.
The broken probe was causing the VIA padlock driver to never attach!
Now we can see that its AES appears to be broken -- it makes FAST_IPSEC
ESP not work, on systems where it works fine with cryptosoft.

Rework code to detect and (if necessary) enable VIA crypto and RNG.
Add RNG support to VIA padlock driver.  In the process, have a quick
go at debugging the AES support but no luck thus far.
2009-04-01 03:56:54 +00:00
dogcow
36ffab86d9 fix what looks like a mechanical stuffup in the timeval -> timespec conversion. 2009-04-01 03:06:06 +00:00
christos
097860c04e cast to size_t to avoid sign / unsigned comparison warning. 2009-03-31 21:33:17 +00:00
perry
2cd7db9ec7 add -n to gzip invocation 2009-03-31 21:12:51 +00:00
perry
0ef5ffa1dd add -n to gzip invocation 2009-03-31 21:00:34 +00:00
rmind
f8a1f87074 Sync with recent i386/amd64 source merges - fix Xen builds. 2009-03-31 20:12:19 +00:00
christos
2037025cb5 PR/41111: Ed Ravin: ping -R gives misleading error when remote side doesn't
support record route
Deal with source route and record route specially giving a meaningful error
message.
Pullup to 5.0?
2009-03-31 19:51:11 +00:00
christos
6fb300657f Avoid hardcoded "too large" constant that caused FPE on the vax.
XXX: Should pullup to 5.0
2009-03-31 18:48:16 +00:00
dyoung
d0947ed2de Also look for sources in sys/arch/x86/x86/ if MACHINE_ARCH is i386 or
x86_64.
2009-03-31 18:41:40 +00:00
christos
e6ec3d065c implement RL_PROMPT_{START,END}_IGNORE 2009-03-31 17:53:03 +00:00
christos
c8754a5b44 Implement literal prompt sequences. Now someone can implement
RL_PROMPT_START_LITERAL/RL_PROMPT_END_LITERAL :-)
2009-03-31 17:38:27 +00:00
drochner
0785c6f16e avoid tsleep also during shutdown (and in particular ACPI poweroff),
should fix PR kern/39141 by Takahiro Kambe and PR port-i386/41110
by Reinoud Zandijk
2009-03-31 17:17:47 +00:00
tsutsui
ef7be3ace7 Add byteorder(9) man page which describes htole32() etc. From FreeBSD
via PR misc/40770, with some tweaks by me.
2009-03-31 16:11:59 +00:00
reinoud
49f0ea0bd0 KGDB does no longer refers to ddb/db_access. Fixes compilation problems of KGDB
kernels.
2009-03-31 15:50:45 +00:00
tsutsui
e90ec2adcc Remove extra whitespace added by a dumb tool. 2009-03-31 11:48:15 +00:00
tsutsui
d008724eb5 Switch atari standalone bootloaders to using MI libsa and libkern.
Tested by David Ross on port-atari@. Thanks!
2009-03-31 11:42:07 +00:00
darran
d4dd9a671a Missed a small but important change to enable hardware VLAN support. 2009-03-31 06:58:55 +00:00
cegger
456f7ba595 buildfix: NEW_VMCMD(2 -> NEW_VMCMD2( 2009-03-31 06:03:31 +00:00
darran
0b4bf6c76b Enable the vlan code that thorpej@NetBSD.org added, and fix a bug where
the vlan tag was read from the rx descriptor after it was reinitialized
(and hence was always 0).  Hardware vlan support looks good tested
between two vmware clients.
With support from tls@NetBSD.org.
2009-03-31 04:16:57 +00:00
rmind
44170e3c3a Merge i386 and amd64 ipifuncs.c into x86. No functional changes intended.
XXX: fpu #ifdefs are ugly (should be revisited at some point).
2009-03-30 22:28:39 +00:00
christos
b5c4aec40f fix erroneously deleted assignment. 2009-03-30 22:22:44 +00:00
rmind
70456c4d9e Merge i386 and amd64 vm_machdep.c into x86. No functional changes intended.
Note: some #ifdefs will be removed with macros.
2009-03-30 22:20:55 +00:00
rmind
74a033c8eb Merge/move core_machdep.c into x86, no difference between i386 and amd64. 2009-03-30 22:13:42 +00:00
ad
7de9da978b Revert the _lwp_ctl which is causing problem. I did test this locally,
I guess not well enough.
2009-03-30 21:32:51 +00:00