Commit Graph

100132 Commits

Author SHA1 Message Date
elad
b50c4b9e09 Add device scope actions for rnd(4) and use them.
Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004953.html
2009-05-05 21:03:28 +00:00
bouyer
f48b5c49cc Declare sh_flags volatile.
Without it, on ports where splhigh() is inline, the compiler will optimise
the second SOFTINT_PENDING test in softint_schedule(). A dissasembly
of softint_schedule() with and without the volatile sh_flags confirm this
on sparc.
Because of this there is a race that could lead to the softhand_t
being enqueued twice on si_q, leading to a corrupted queue and
some handler being SOFTINT_PENDING but never called.

Should fix PR kern/38637
2009-05-05 20:26:36 +00:00
msaitoh
b25f90b108 Doesn't print error message only when the register is BGE_SRS_MODE.
It occurs on some environment (and once after boot?). Other *BSDs and
Linux don't print the error message for all registers.
2009-05-05 18:08:28 +00:00
tsutsui
a6747c30ce - KNF and some misc cosmetics
- remove a function name from error messages on attach failure
2009-05-05 16:38:41 +00:00
tsutsui
1ad413250a Add support for i82596 Rev A chip which doesn't have the enhanced 32 bit
big endian mode:
- add IEE_REV_A flag to indicate if chip support the 32 bit BE mode or not
- add IEE_SWAPA32() macro and use it on necessary 32 bit DMA pointers
- rename IEE_SWAP() macro for the SCP address pointer and statistics
  counters which require word swap even on Rev B/C chips to IEE_SWAP32()
  for clarification
- add comments about these BE mode quirks

Tested on HP9000 735/125 by me and also tested on 715/50 by skrll@
with netbsd-5 branch, and fixes MI part of PR port-hp700/35531.
2009-05-05 15:47:35 +00:00
cegger
4bbacd3411 buildfix: use %d for BOOTP_SIZE_(MIN,MAX).
Makes i386 ALL kernel build again.
2009-05-05 12:48:31 +00:00
nonaka
6cb21f59ee Added NE2000 with 8bit bus width support.
reviewd by tsutsui@ at tech-kern ML.
2009-05-05 12:37:24 +00:00
cegger
06e69f3860 struct device * -> device_t 2009-05-05 12:10:07 +00:00
cegger
f2bccc0a8e struct device * -> device_t, use device_private() 2009-05-05 12:07:15 +00:00
cegger
73af259591 Attach on BCM5709 chip.
XXX Firmware fails to complete initialization on this chip.
2009-05-05 10:21:22 +00:00
cegger
dc97f7f624 print autoconf error message with aprint_error 2009-05-05 10:02:52 +00:00
cegger
6a970ea21d device_t/softc split 2009-05-05 09:51:23 +00:00
rmind
3d7fe7769c ufsdirhash_recycle():
- Fix ufs_dirhashmem modification (do it atomically).
- Fix a memory leak.

OK by <ad>.
2009-05-04 20:54:25 +00:00
ginsbach
ced39b2b50 Mention POSIX.1-2008 (_POSIX_C_SOURCE == 200809L) and
XPG 7 (_XOPEN_SOURCE == 700) in comments.
2009-05-04 16:44:14 +00:00
manu
c328d568d4 TFTPROOT loads the RAMdisk through TFTP at boot time. It needs the
network to be functionnal, and therefore must be called after
config_finalize(). Unfortunately, config_finalize() attaches md0
through mdattach(), and when tftproot_getfile() attempts to attach it
later by calling mdattach() again, it gets a failure.

This change checks for the RAMdisk size in mdattach(). If it is zero, then
the RAMdisk has not been loaded yet, and nothing is done. It will be
attached later when tftproot_getfile() will call mdattach()
2009-05-04 16:20:41 +00:00
yamt
183ff8793d sysctl_doeproc: fix a bug in rev.1.135.
don't forget to mark our marker process PK_MARKER.
this fixes crashes in sched_pstats, etc.
2009-05-04 14:52:33 +00:00
pooka
b142e2e100 Nuke RUMPCN_HASNTBUF. The inspiration behind it must've been ... deep. 2009-05-04 14:31:25 +00:00
cegger
463905bb9c struct cfdata * -> cfdata_t 2009-05-04 12:38:51 +00:00
cegger
1a57d635a0 struct device * -> device_t
No functional changes intended.
2009-05-04 12:19:29 +00:00
cegger
ad6eeaade5 struct device * -> device_t, use device_private()
No functional changes intended.
2009-05-04 12:15:51 +00:00
cegger
a4a2ef3bd3 struct device * -> device_t
No functional changes intended.
2009-05-04 12:14:31 +00:00
cegger
46919b98ad struct device * -> device_t, use device_private 2009-05-04 12:13:19 +00:00
ad
557443fab0 PR kern/41342: BSDi binaries cause panic
XXX Manuel, please have a look as I am not sure what to do for XEN here!
2009-05-04 11:47:29 +00:00
markd
a44286a718 Treat G4X like I915 and G33 for MSAC. Fixes aperture setting.
Has been working successfully for me and snj for the last few months.
2009-05-04 11:05:45 +00:00
yamt
6f0983460b when freeing cn_pnbuf, make it NULL if DIAGNOSTIC. 2009-05-04 06:05:19 +00:00
yamt
706e6928e0 tweak some assertions on so_head to make them more meaningful. 2009-05-04 06:02:40 +00:00
yamt
fc99505dcc nfs_lookup: handle the case where the vnode returned cache_lookup_raw is
being reclaimed by another thread.  after recent changes in cache_lookup_raw,
there's a race between cache_lookup_raw/vtryget and getcleanvnode/vclean.
PR/41028.
2009-05-04 05:59:35 +00:00
yamt
5f6d027dab nfs_lookup: add an assertion. 2009-05-04 05:50:17 +00:00
yamt
ffdcb971f2 nfs_lookup: comments. no functional changes. 2009-05-04 05:49:00 +00:00
elad
414eb0a314 Move dovfsusermount to secmodel_bsd44, where it really belongs.
The secmodel code now creates the same knob in two places: both under the
secmodel itself, as well as the widely known location.

Mailing list references:

    http://mail-index.netbsd.org/source-changes/2009/05/02/msg220641.html
    http://mail-index.netbsd.org/tech-kern/2009/05/03/msg005015.html
2009-05-03 21:25:44 +00:00
pooka
d98497528c set MNT_ROOTFS for the rootfs (the kernel, a logical piece of work) 2009-05-03 19:00:18 +00:00
tsutsui
9e1aa4a731 Use <bsd.klinks.mk> to create machine and ${MACHINE_ARCH} symlinks. 2009-05-03 17:33:29 +00:00
elad
fda35a52f4 Add a bluetooth action to the device scope and use it in netbt as a
replacement for KAUTH_GENERIC_ISSUSER.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/25/msg004905.html

Bluetooth-specific authorization wrapper might come later.
2009-05-03 17:21:12 +00:00
pooka
e3b3da7a9e Rename rump_cred_destroy() to rump_cred_put() -- they've been
refcounted since forever now.
2009-05-03 17:09:49 +00:00
pooka
3b98424735 define DEBUGPRINT 2009-05-03 16:53:54 +00:00
pooka
ec3ee0abf9 Include some debug print routines if DEBUGPRINT is defined. This
way they can be included without having to include DDB.
(arguably all print routines should be behind #ifdef DEBUGPRINT
and options DDB should define that macro, but I'll tackle that later)
2009-05-03 16:52:54 +00:00
pooka
f24be5ee8c Add rump_vfs_getmp(), which returns struct mount for a given path.
(yes, it does not take a reference to the mountpoint)
2009-05-03 16:01:44 +00:00
tsutsui
08978db2b9 Fix race on parallel build by using the same way with i386.
XXX: we can't use <bsd.klinks.mk> if Makefile needs own .BEGIN: target.
2009-05-03 15:12:12 +00:00
tsutsui
cf78f721dd Make COM_RING_SIZE configurable by kernel config(5). 2009-05-03 13:52:36 +00:00
tsutsui
8fa3bb31fc Remove unused sc_rev settings (all quirks are handled by sc_quirk)
and merge HWREV cases which have the same quirks.
2009-05-03 13:49:07 +00:00
tsutsui
4e610c8a4e Enable support for UFS2 boot. Tested on 735/125. 2009-05-03 11:32:04 +00:00
dyoung
85d5fd7b83 In pccbb_pci_callback(), set CBB_SPECMAPPED in sc_flags if we've
acquired bus space from bus_space_alloc(9) or from rbus_space_alloc(),
so that we use the appropriate routine to release the bus space in
pccbbdetach().  This stops panics during cbb(4) detachment (esp. at
shutdown) on some systems.

Thanks to Kurt Schreiner for testing the fix, Kurt, Patrick Welche,
Pouya D. Tafti, and Matt Green for reporting.
2009-05-03 00:31:12 +00:00
martin
1e54487f2a Correct previous: detaching uhubN makes the bus pointer NULL 2009-05-02 22:28:41 +00:00
martin
9b2932709e If we are unlucky, during detach of child devices, after a uhub has detached,
our uhci_poll_hub callout might strike. The detaching of the uhub has left
the device member in the pipe NULL, so make sure we do not dereference it.

We could halt the callout before detaching child devices, but it this
would likely interfere with proper servicing the child devices while
they are still around.
2009-05-02 22:09:39 +00:00
elad
b1bd59c577 Fix locking around mountlist usage, as pointed out by ad@ in:
http://mail-index.netbsd.org/source-changes-d/2009/04/22/msg000322.html
  http://mail-index.netbsd.org/tech-kern/2009/04/22/msg004897.html

Use vfs_busy() and vfs_unbusy(), and properly iterate the mountlist.
2009-05-02 21:47:12 +00:00
oster
62f6e89480 Fix assignment of SUsPerPU and add SUsPerRU assignment. Reported by
and fix from Anthony Mallet in PR#41328.  Thanks!
2009-05-02 21:11:26 +00:00
manu
20f56b3015 - Silence warning when running with debug enabled
- Remind the administrator about the required DHCP option when some are
  missing, instead of silently failing, you stupid computer!
2009-05-02 21:06:51 +00:00
elad
996746c20d Replace wrong __UNCONST() use with a local variable.
Similar to issues pointed out by bouyer@ and forgotten by me when I did
the last commit.

Should fix issues reported on current-users@ in:

    http://mail-index.netbsd.org/current-users/2009/05/02/msg009273.html
2009-05-02 18:58:03 +00:00
bouyer
10a318e30f Patch from Brian Marcotte on port-xen@:
write a "feature-rx-notify" to the xenstore, which is used by recent
linux dom0 kernels. This reduce packet loss when using a NetBSD domU
on such linux dom0.
This entry is ignored by NetBSD and older linux domUs.
2009-05-02 18:18:44 +00:00
pooka
6e63908b9f Since rump_module_load() doesn't actually load the module, change
the name to rump_module_init().  Also, adjust the signature to take
a direct pointer to modinfo and allow passing of props.  Finally,
provide rump_module_fini().
2009-05-02 15:20:08 +00:00