Commit Graph

100425 Commits

Author SHA1 Message Date
tsutsui
3ec7e0d881 Fix more pasto botch. 2009-05-09 20:44:56 +00:00
tsutsui
f8a52a52cb Remove (wrong) function names by pasto from attach failure messages. 2009-05-09 20:42:09 +00:00
tsutsui
a0a1d7acfb Use __func__ to print function names. 2009-05-09 18:31:46 +00:00
pgoyette
465d8da77a Minor white-space KNF nit. No functional change. 2009-05-09 17:32:27 +00:00
sborrill
9ea64db0b6 regen 2009-05-09 15:16:42 +00:00
sborrill
2336481d62 Add alternative product ID for VIA VT8237A Integrated SATA Controller 2009-05-09 15:15:50 +00:00
pgoyette
b3c79debe6 Initial implementation of sdtemp(4) driver for on-DIMM temp sensor.
(These optional sensors are specified by JEDEC Standard No. 21-C
Section 4-7 and implemented by multiple vendors.  Tested on my
amd64 machine with Kingston KVR1066D3E7S/2G memory which includes
a STMicro STTS424E02 sensor.)
2009-05-09 15:04:25 +00:00
tsutsui
66687cb59d Fix a botch in rev 1.29: return error properly from pdcgettod(). 2009-05-09 12:44:30 +00:00
skrll
2b47a0c491 Whitespace. 2009-05-09 12:18:29 +00:00
skrll
6110648597 No need to do the hp700_pagezero_{,un}map dance to get the pdc entry point
as it's stashed in pdc - just use pdc.

Update a comment while I'm here.
2009-05-09 12:04:11 +00:00
skrll
0b0472a5e5 Don't overload cpu_type in cpuid().
Rename a hppa_cpu_info member for clarity.
2009-05-09 11:39:30 +00:00
mlelstv
f4e36171e8 Replace splsoftnet() with proper mutexes as suggested by ad@.
Fixes PR kren/40940.
2009-05-09 11:36:17 +00:00
pgoyette
7450d74baf For multi-byte transfers, the bytes need to be written to or read from
consecutive data registers.  Discovered while debugging sdtemp(4) driver
which does _only_ 16-bit transfers!
2009-05-09 07:13:57 +00:00
pgoyette
bbb7ea8f3e You can't use a BYTE protocol to read 16-bits worth of data from the
i2c bus.  Discovered while debugging my sdtemp(4) driver.
2009-05-09 04:56:39 +00:00
tsutsui
cd77526abc Add necessary parentheses to roundup2() macro. 2009-05-09 04:03:47 +00:00
tsutsui
8de92473d5 Also check if cache line alignment is power of two in KASSERT(). 2009-05-09 03:54:10 +00:00
tsutsui
42731279ac Use roundup2() macro to calculate cache line aligned offsets of
DMA descriptor members in shared memory.
The previous ones could return wrong values if cache line size is
smaller than structures, and we can assume cache line size is
power of two to avoid division ops.
2009-05-09 03:50:16 +00:00
yamt
bed2400e59 lockdebug fixes for rw_tryupgrade/rw_downgrade. 2009-05-09 03:33:10 +00:00
tsutsui
0eda417b19 Move allocation of DMA shared memory with bus_dma(9) ops
from MD attachments to MI iee_attach().
Tested on HP9000 735/125. Compile test only on ews4800mips.

XXX: more strict bus_dmamap_sync(9) calls are required in various places.
2009-05-09 03:22:20 +00:00
tsutsui
d9e806321a Call bus_dmamap_sync(9) more properly on DMA polling. 2009-05-09 02:29:29 +00:00
tsutsui
511e1d5877 - use BUS_DMA_COHERENT rather than using MIPS_KSEG1_START
- use bus_dmamap_sync(9) rather than mips_dcache_wbinv_range()
- call bus_dmamap_sync(9) properly on DMA polling

XXX: untested due to lack of hardware
2009-05-09 02:18:48 +00:00
tsutsui
55141e130f Check return values of pdc_call() in pdcgettod() and pdcsettod(). 2009-05-09 01:59:17 +00:00
joerg
a0fa8c3062 softc split as needed by the rest of the drm code. Add basic
suspend/resume hooks.
2009-05-09 01:29:01 +00:00
yamt
9031548af6 exit1: fix a race with do_sys_wait/proc_free. 2009-05-08 13:32:59 +00:00
elad
17c0c1e672 Add and use a network scope action/request for tun(4), similar to ppp(4),
sl(4), and strip(4).
2009-05-08 11:09:43 +00:00
rmind
76fc93c832 ufs_setattr: fix previous - return in error path does not finish the
transaction (hi elad).
2009-05-08 10:52:00 +00:00
skrll
785840b34d Provide ucas for hppa. 2009-05-08 10:12:55 +00:00
skrll
ec76129d54 Whitespace. 2009-05-08 09:33:57 +00:00
kefren
1130fba7b6 Don't call callout_stop() without callout_init()
Fixes PR/41364
2009-05-08 05:18:34 +00:00
cegger
2760809573 CFATTACH_DECL2 is no longer used. remove it.
ok dyoung@
2009-05-07 22:17:41 +00:00
elad
d4ee4ec689 Remove some more "priv" variable usage in favor of kauth(9) calls. 2009-05-07 21:51:47 +00:00
elad
13385da3e6 Replace KAUTH_GENERIC_ISSUSER with a better alternative. 2009-05-07 20:32:51 +00:00
elad
88003af1dc Use genfs_can_mount(). 2009-05-07 20:32:23 +00:00
elad
863a01b5c1 Extract the open-coded authorization logic for chtimes() from various
file-systems and put it in a single function, genfs_can_chtimes().

This also makes UDF follow the same policy as all other file-systems.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004951.html
2009-05-07 19:30:29 +00:00
elad
9e9887cc59 Introduce several actions/requests for authorizing file-system related
operations, specifically quota and block allocation from reserved space.

Modify ufs_quotactl() to accomodate passing "mp" earlier by vfs_busy()ing
it a little bit higher.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/26/msg004936.html

Note that the umapfs request mentioned in this thread was NOT added as
there is still on-going discussion regarding the proper implementation.
2009-05-07 19:26:08 +00:00
elad
b853042065 Introduce actions/requests to handle authorization for ppp(4), sl(4),
strip(4), btuart(4) and bcsp(4) network interfaces and devices.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004955.html
2009-05-07 18:01:56 +00:00
tsutsui
0b635e75c0 Pass proper timeval args to pdc_call() to save TOD with PDC_TOD_WRITE,
Per OpenBSD's hppa/dev/clock.c rev 1.14.

Tested on my 735/125 with a new lithium battery, okay'ed by skrll@.
2009-05-07 17:30:59 +00:00
pooka
cd558b6419 Add rump_set_curlwp() for context switch to an existing lwp/proc. 2009-05-07 16:04:25 +00:00
pooka
825ba1eb35 Don't create unpgc thread if RUMP_THREADS is 0. The benefit is the
usual: possible to run programs using AF_LOCAL without threads.
2009-05-07 16:03:24 +00:00
mjacob
30611ba7e0 update firmware 2009-05-07 15:55:18 +00:00
mjacob
c83986a8bd Add firmware set for 8Gb card. 2009-05-07 15:54:20 +00:00
skrll
7ab26758f5 device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*

There are a couple of MI drivers with MD attachments left.
2009-05-07 15:34:49 +00:00
skrll
0b960e17e7 Another cannot. 2009-05-07 15:21:39 +00:00
skrll
529329f14e There are more "can't"s that "cannot"s. Be consistent and use "can't"
everywhere.
2009-05-07 15:17:22 +00:00
tsutsui
d03e93aff1 TAB/space cleanup. 2009-05-07 14:22:37 +00:00
tsutsui
1cd0d72fce Some earlier machines like 715/50 and 735/99 have the i82596DX Rev A chip
which doesn't support 32-bit big endian mode enabled by IEE_SYSBUS_BE bit,
so don't rely on the IEE_SYSBUS_BE mode on old HPPA_FIO_LAN models and
use IEE_REV_A quirk flag recently added into MI i82596.c.

Tested on HP9000 735/125 by me and also tested on 715/50 by skrll@
with netbsd-5 branch.  Closes MD part of PR port-hp700/35531.
2009-05-07 14:13:01 +00:00
rjs
4179d32aff Use device_private(). 2009-05-07 13:06:11 +00:00
cegger
bc33dc599e struct device * -> device_t, no functional changes intended. 2009-05-07 12:15:33 +00:00
skrll
babee9b443 Wrap PAGE0 access with hp700_pagezero_{,un}map 2009-05-07 09:56:50 +00:00
cegger
2641fe2fb7 struct device * -> device_t
comment says, first argument of audiobell is a device, so make it a device.
2009-05-07 09:23:01 +00:00
cegger
ed4086f2eb struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-07 09:13:13 +00:00
cegger
5496566c68 struct device * -> device_t, no functional changes intended. 2009-05-07 09:11:42 +00:00
skrll
1a869e5eb8 KNF 2009-05-07 09:10:18 +00:00
skrll
05991fa689 G/C some old stuff. 2009-05-07 09:08:02 +00:00
skrll
f1498b38bc G/C some unused stuff from OpenBSD. 2009-05-07 08:58:13 +00:00
skrll
ac2641c0f7 Whitespace. 2009-05-07 08:55:15 +00:00
skrll
fabe240540 A bit more KNF. 2009-05-07 08:54:59 +00:00
skrll
f21c2fa615 KNF 2009-05-07 08:30:40 +00:00
skrll
764d19818b Add __insn_barrier after updating cpl in splraise. PR/41369. 2009-05-07 08:16:50 +00:00
cegger
6ee74bfd56 struct device * -> device_t, no functional changes intended. 2009-05-07 08:03:23 +00:00
cegger
602c27254b use device_private() 2009-05-07 07:56:03 +00:00
cegger
930db79c5b struct device * -> device_t, no functional changes intended. 2009-05-07 07:33:05 +00:00
jdc
c10e3b28bd Add extra counter definitions (pointed out by Geoff Wing). 2009-05-07 06:46:54 +00:00
skrll
51ddbaac30 Wrap some wide comments. 2009-05-07 06:41:19 +00:00
cegger
73144fe522 device_t/softc split
patch presented on tech-kern@, no comments on it
2009-05-07 06:08:02 +00:00
roy
b49ed2c029 Make 3 attempts at bootp before trying bootparams which allows slow
bridges a chance to work.
Clear variables when changing bootp/bootparams.
Displayed variables are cleaned up so they don't overflow the right of
the screen.

ok: martin
2009-05-07 00:01:31 +00:00
roy
235c0d4ef6 We should check for potential overflows.
ok: martin
2009-05-06 23:56:49 +00:00
ad
b5dc34151d Unneeded LK_CANRECURSE. 2009-05-06 22:38:42 +00:00
ad
6977231a34 G/C reference to LK_CANRECURSE. 2009-05-06 22:38:31 +00:00
elad
8f15ad8a37 Provide privilege checking code snippets for all significant NetBSD
versions: < 2 (suser, proc), 2 & 3 (suser, lwp), >= 4 (kauth, lwp).

No functional change as it's all inside a big comment.
2009-05-06 22:17:41 +00:00
elad
4188b89914 Remove some usage of "priv" and "privileged" variables and instead pass
around credentials. Also push down kauth(9) calls closer to where the
operation is done.

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/04/30/msg001270.html
2009-05-06 21:41:59 +00:00
mhitch
6c4dd62a45 Add __insn_barrier() to _splset(). See also kern/38637. 2009-05-06 21:41:58 +00:00
mhitch
0742f912f5 Add memory clobber to the instructions that change the IPL in the status
register.  See also kern/38637.
2009-05-06 21:37:40 +00:00
elad
aedd27810d Sprinkle some switch defaults. 2009-05-06 21:10:22 +00:00
jdc
6e8d1a982c Check for internal PHY first, so that it always attaches first, even when
we have an MII transeiver attached.
Count all collision and error counters.
Handle counter overflow and RXTERR.

Tested on U60 HME, PCI HME (501-5019) and SBus Sunswift (501-2739)
2009-05-06 20:40:19 +00:00
elad
105d9a093d Replace curlwp->l_cred with kauth_cred_get().
Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/05/05/msg005038.html
2009-05-06 18:41:54 +00:00
cegger
af1172fad0 device_t/softc split
tested by jakllsch@
2009-05-06 18:25:28 +00:00
rmind
4ef6600a51 Revert previous until problem will be understood. 2009-05-06 16:43:47 +00:00
cegger
a591bc88dd struct device * -> device_t, no functional changes intended. 2009-05-06 10:34:32 +00:00
cegger
6b9f9b8644 use device_private() 2009-05-06 09:32:52 +00:00
cegger
59717d7121 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-06 09:25:14 +00:00
cegger
3261738b4d struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-06 08:20:49 +00:00
cegger
6d542a9a5c add KASSERT to identify when PR kern/40734 happens again.
It happened to me twice and to Emmanuel Dreyfus (reported on port-amd64 ML)
2009-05-06 07:27:42 +00:00
cegger
a531bda091 correct previous: use %zu for BOOTP_SIZE_(MIN,MAX).
Pointed out by David Holland
2009-05-06 05:34:12 +00:00
cube
0f7746f7cc Bump required config(1) version after files.drm changes [hi mrg!]. 2009-05-06 02:52:13 +00:00
mrg
a35a651446 you can now easily select trying external drm with "options DRM_EXTERNAL". 2009-05-06 01:33:24 +00:00
mrg
a2836b8e54 avoid a warning seen with -O3. 2009-05-06 01:32:37 +00:00
macallan
98c856f101 enable ZX/Leo since we now support wscons on it 2009-05-05 23:58:50 +00:00
macallan
08f5b97b95 clear screen on attach 2009-05-05 23:55:04 +00:00
cegger
52b1d2aee7 struct cfdata * -> cfdata_t 2009-05-05 21:47:49 +00:00
cegger
3d240405ea CFATTACH_DECL3 is no longer used.
ok dyoung@
2009-05-05 21:40:25 +00:00
dyoung
e470d88889 Change struct cfdata * to cfdata_t. No functional change intended. 2009-05-05 21:34:13 +00:00
cegger
4474fa75b2 device_t/softc split
tested by and ok dyoung@
2009-05-05 21:33:21 +00:00
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
pooka
fae90815de Do not include securelevel, it includes too many dependencies on
vfs in its current form.
2009-05-02 14:16:52 +00:00
pooka
fb42667d02 Move dovfsusermount from vfs_syscalls.c to param.c: secmodel bsd44
depends on it and we can't isolate it in vfs.
(no, it doesn't really belong in param.c, but I couldn't figure out
a better place for it)
2009-05-02 14:13:28 +00:00
pooka
45ef580f17 Merge librumpfs_ufs into librumpfs_ffs. This reflects what happened
with the ffs kernel module and follows the trend of retiring ufs.
It also allows to get rid of a special case kludge in runtime module
loading, since ufs was not really a module.  librumpfs_ufs is now
obsoleted and ffs consumers should be linked solely against
librumpfs_ffs.
2009-05-02 01:15:52 +00:00
dyoung
aaa0eb2937 Use device_t, cfdata_t, device_private(). 2009-05-01 20:43:41 +00:00
pooka
6b398beab3 in case of error, return instead of continuing 2009-05-01 11:01:34 +00:00
pooka
4f521cc9ba fix editing artifact 2009-05-01 11:00:49 +00:00
cegger
287d5dd11d struct device * -> device_t 2009-05-01 09:38:24 +00:00
cegger
7298f44f6a - struct device * -> device_t
- remove useless parenthesis
2009-05-01 09:26:34 +00:00
cegger
827656cbc1 struct device * -> device_t 2009-05-01 09:20:02 +00:00
cegger
f2c0b025dc remove useless parenthesis 2009-05-01 08:27:41 +00:00
cegger
85834d03a8 add ale(4) 2009-05-01 06:25:50 +00:00
martin
6a887ea20a Add missing paranthesis - from Kurt Lidl in PR port-vax/41316 2009-05-01 03:23:39 +00:00
martin
cb13eee90c Add missing braces - patch from Kurt Lidl in PR port-vax/41314. 2009-05-01 03:18:20 +00:00
nonaka
a6a538b335 compile again. 2009-05-01 00:15:57 +00:00
dyoung
ee9d8d96c8 Straggler from last vnd(4) commit: #define VNF_CLEARING. 2009-04-30 22:36:10 +00:00
ad
922436b4c6 PR kern/41311: Mutex error: mutex_vector_enter: locking against myself 2009-04-30 20:41:33 +00:00
dyoung
662437b2c3 Remove extraneous parentheses. Fix spelling/grammar. No functional
change intended.
2009-04-30 20:39:08 +00:00
dyoung
c968789de1 Flesh out vnd_detach(). Let the system detach vnd(4) at shutdown. Stop
vnd_ioctl(VNDIOCCLR) from racing with vndopen() to call vndclear().
2009-04-30 20:34:08 +00:00
elad
3c1f169a59 Commit changes to netinet6/in6_src.c, forgot in previous commit:
http://mail-index.netbsd.org/source-changes/2009/04/30/msg220547.html

Make in_pcbsetport() set the port number selected before passing "sin" to
kauth(9).
2009-04-30 20:26:09 +00:00
skrll
2418e09480 Correct some CPU ifdefs so that a HP7100_CPU only kernel should compile. 2009-04-30 20:10:31 +00:00
skrll
fdba187b53 Remove if defined(HP7100LC_CPU) || defined(HP7300LC_CPU) from around
pmap_hptsize and pdc_hwtlb (for now).
2009-04-30 19:15:18 +00:00
elad
ddcbe0e1dd - Make in6_pcbbind_{addr,port}() static
- Properly authorize port binding in in_pcbsetport() and in6_pcbsetport()

- Pass struct sockaddr_in6 to in6_pcbsetport() instead of just the address,
  so that we have a more complete context

- Adjust udp6_output() to craft a sockaddr_in6 as it calls in6_pcbsetport()

- Fix an issue in in_pcbbind() where we used the "dom_sa_any" pointer and
  not a copy of it, pointed out by bouyer@, thanks!

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/04/29/msg001259.html
2009-04-30 18:18:34 +00:00
pooka
90b68ff919 remove outdated comment 2009-04-30 17:43:07 +00:00
pooka
580ab7a0ba print succinctly 2009-04-30 17:41:41 +00:00
pooka
d03c5f2304 Stir up the stack a bit to help arc4random() decide on a more
"random" seed.  This is a quick hack, I'll play games with rnd(9)
later (no nethack).
2009-04-30 16:59:32 +00:00
dyoung
b44d7cdf40 Fix spelling. if( -> if (. No functional change intended. 2009-04-30 16:38:12 +00:00
dyoung
114a99200c Use NULL instead of (type *)0. Delete extraneous parentheses. No
functional change intended.
2009-04-30 16:07:50 +00:00
skrll
af6031b09f Move HPPA_SID_KERNEL into pmap.h and deal with the move. 2009-04-30 15:34:24 +00:00
skrll
c5ea9b9669 Update to deal with the new hppa pmap. 2009-04-30 15:31:16 +00:00
skrll
d560aa564f +#include <sys/atomic.h> 2009-04-30 15:30:55 +00:00
skrll
51d0553d6a Regen (again) 2009-04-30 15:14:49 +00:00
skrll
6cc4b39756 Add another NS product found in hppa machines. 2009-04-30 15:13:58 +00:00
skrll
9763c0c6d8 Regen. 2009-04-30 15:07:44 +00:00
skrll
c026dcb4aa Add the National Semiconductor PC87560 Legacy IO chip on systems with
PA-8500 and later 64-bit CPUs.
2009-04-30 15:03:30 +00:00
tsutsui
0cd2869469 Add necessary files for build.sh -m rs6000 release.
Based on PR port-powerpc/40421 from Wojciech Galazka,
with misc tweaks by me.

Note sysinst part is not pulled because there is
no supported storage device yet on this port.
2009-04-30 12:47:39 +00:00
skrll
31880cf1d1 Another file missed by me / cvs in the nick-hppapmap merge. 2009-04-30 07:08:39 +00:00
skrll
0608921b49 Somehow these were missed by me / cvs in the nick-hppapmap merge. 2009-04-30 07:03:12 +00:00
skrll
8516d55745 Merge nick-hppapmap.
This is a port of the OpenBSD pmap and trap handling code to get us

        - Performance boost on some/all machines.
        - Well on the way to PA2.0 (in 32bit mode) support. Several
          machines probe hardware, but fail sometime after interrupts
          are enabled.

Other things changed / fixed on the branch are

        - update autoconf to use the OpenBSD code.
        - com @ dino is very close to being supported.
        - HPPA_REDZONE has been replaced with a working redzone which
          is enabled with DIAGNOSTIC.
        - UPAGES has been halved in size.
        - power(4) from OpenBSD to fix a few bugs.
        - updated list of modules from OpenBSD.
	- initial ports of uturn(4), astro(4) and elroy(4).
	- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
2009-04-30 07:01:26 +00:00
nonaka
8ca2e6bcac Support SH7706 2009-04-30 05:20:30 +00:00
nonaka
3954731670 Added some register definition. 2009-04-30 05:19:38 +00:00
nonaka
3c6a17f5ff include sys/lwp.h for curlwp. 2009-04-30 05:15:36 +00:00
pgoyette
f10549404b Include cpu_topology.c for xen kernels, too. 2009-04-30 04:38:01 +00:00
rmind
cc8d7ff411 Move x86 CPU topology detection code into the separate file (as it was originally).
OK by <yamt>.
2009-04-30 00:07:23 +00:00
dyoung
82e9f91ec4 Add elansc_shutdown() for turning off the watchdog.
Don't try to unregister the watchdog in elansc_detach() if we are
shutting the system down, because unregistering is designed to fail if
the watchdog is armed.
2009-04-29 23:50:53 +00:00
dyoung
458342a90c Delete dead code. 2009-04-29 23:18:09 +00:00
elad
69db27dc69 Replace open-coded vaccess() in ntfs_access() with a call to vaccess().
Similarly to msdosfs, always add the exec bit to keep the current
behavior.

Mailing list reference:

    http://mail-index.netbsd.org/tech-kern/2009/04/21/msg004881.html
2009-04-29 22:33:33 +00:00
jym
01d8525951 Do not forget to detach rnd(4) device when removing a xennet device.
Ok by bouyer@ in private mail.
2009-04-29 22:21:49 +00:00
pooka
a22ec3808b Add proof-of-concept code for enabling system calls to rump virtual
kernels running in other processes on the same machine or on an
entirely different host.  I wrote this a while ago and am now
committing it mainly to avoid losing it.  It works, but could do
with a little tuning here and there.

What this will hopefully eventually buy us is the ability to use
standard userland tools to configure rump kernels, e.g. ifconfig(8)
and route(8) could be used to configure the networking stack provided
by a rump kernel.  Also some distributed OS implications may apply.

fun fact: a system call which just does copyin/copyout takes >1000x
longer when made over the LAN as compared to when made on the same
machine.
2009-04-29 17:51:47 +00:00
pooka
c51cd914ad Add enough support to be able to create directories and perform
lookups through them.  This has two implications:

1) mountpoints can be created directly onto the rump rootfs.
   this is benefitial in test programs where we want the same
   program to be easily switched between testing against rump and
   testing against the host kernel.
2) fakeblk must be used (it used to work implicitly) to register
   block devices that should be used from the host fs namespace.
2009-04-29 16:05:41 +00:00
pooka
e479d47c73 include proc0 in allproc 2009-04-29 15:49:28 +00:00
pooka
ab0d880435 Use cwdinit() for proc0's cwdi. 2009-04-29 15:49:01 +00:00
dyoung
dfec23a174 Extract vfs_unmountall1() from vfs_unmountall() for reuse. 2009-04-29 15:44:55 +00:00
tsutsui
f6e36a0172 Pull some changes for newer chips from FreeBSD:
- pull MACSTAT and CMDSTOP quirks for 8168/8111 chips
- always set CPLUSCMD_PCI_MRW on reset
- set VLANSTRIP and RXCSUM_ENB bits on CPLUS register per if_capenable

Tested on 8111C and 8111D by several users, and
no bad side effect on my old 8169S.
2009-04-29 15:10:57 +00:00
pooka
fd43b78759 catch locking-against-oneself already when taking the lock 2009-04-29 14:58:50 +00:00
njoly
7e5810aafc Attach 82801IEM LPC Interface Bridge too. 2009-04-29 14:55:36 +00:00
pooka
986e36ad6d replace outdated comment. no functional change 2009-04-29 11:01:50 +00:00
martin
85a5535229 Add missing prototype for vfs_mountalloc(). 2009-04-29 10:46:46 +00:00
skrll
c90e89c311 Don't panic in dino_intr_disesablish. Just note that it needs to be
implemented for now.

Stop gap fix for PR/41295.
2009-04-29 07:14:58 +00:00
dyoung
3e0a641f96 Extract common code from vfs_rootmountalloc(9) and mount_domount() into
a new struct mount-allocation routine, vfs_mountalloc(9).  Documentation
updates will follow.

Attention: Synchronization Oversight Committee!  In mount_domount(),
I postpone the call mutex_enter(&mp->mnt_updating) until right before
the VFS_MOUNT(9) call because (1) that looks to me like the earliest
possible opportunity for mp to become visible to any other LWP, because
it was just kmem_zalloc(9)'d and (2) it made extracting the common code
much easier.  Tell me if my reasoning is faulty.
2009-04-29 01:03:43 +00:00
dyoung
b99ed0004a Let this build even if 'no options INET'. 2009-04-28 23:05:25 +00:00
dyoung
d446e68bf2 Use device_t, cfdata_t, and device_private(). 2009-04-28 22:43:50 +00:00
dyoung
a82ec647f5 Let this build with 'no options INET'.
(I don't know why I bothered, either.)
2009-04-28 21:26:51 +00:00
dyoung
5c35d469c9 Cosmetic: remove unnecessary parentheses. 2009-04-28 20:56:40 +00:00
dyoung
9777865b42 Extract sockaddr_any_by_family() from sockaddr_any() for looking up a
wildcard ("any") address by protocol family instead of by sockaddr.
2009-04-28 20:54:50 +00:00
skrll
15c5c4397e copyin the modctl_load_t for the non-x86 world. Fixes PR/41294. 2009-04-28 17:57:00 +00:00
ginsbach
6be6867d6d Regen for Mellanox additions. 2009-04-28 14:32:43 +00:00
ginsbach
ea30fa5024 Add Mellanox Technologies Infiniband devices. 2009-04-28 14:27:16 +00:00
pooka
fa938330cb Free uao lock when destroying object. Fixes tmpfs rename leak
reported by njoly.
2009-04-28 14:00:42 +00:00
tsutsui
da88f224b7 Remove magic reset sequence except wakeup for rev 2 chips which breaks 8111D.
Problem reported and fix confirmed by Thomas Bieg on current-users.

Also tested on 8111C (no bad side effect) by several users privately.
2009-04-28 13:25:17 +00:00
cegger
a4aa7dace4 on detach, deregister from pmf 2009-04-28 11:49:15 +00:00
cegger
9bb7df81f0 on detach, deregister from pmf and free resource 2009-04-28 11:47:56 +00:00
cegger
18c8862fdc sprintf -> snprintf 2009-04-28 05:44:43 +00:00
yamt
a6f64ec082 do_sys_utimes: fix a bug introduced by rev.1.367.
VA_UTIMES_NULL is in va_vaflags, not va_flags.
2009-04-28 03:01:15 +00:00
cegger
da38c1360b sprintf -> snprintf 2009-04-27 20:02:29 +00:00
pooka
8a514cd619 initialize async before use 2009-04-27 18:36:43 +00:00
tsutsui
9998edcec4 Wrap one more printf() with #ifdef DEBUG, which was missed on rev 1.52. 2009-04-27 14:52:50 +00:00
pooka
e5d3ecb4f1 * expand syncing logic into rumpuser, since it has more freedom on
how to do it (e.g. fsync_range)
* hash out O_DIRECT support.  it's the fastest method of safely operating
  on a file, but we can't currently autodetect support, so it's not
  enabled by default
* sprinkle more event counters
2009-04-27 14:28:58 +00:00
njoly
692b478fd5 Add IPC_64 support to all semctl(2) commands, following corresponding
compat linux change.
2009-04-27 13:24:18 +00:00
joerg
5cef834a23 Add commented out hpet@ichlpcib entry. 2009-04-27 12:02:10 +00:00
pooka
1a8a4475a6 avoid namespace collision. no functional change. 2009-04-26 22:26:59 +00:00
pooka
b12cf03935 Bump maximum number of outstanding async i/o's to 1024, 128 can
fill up really fast.
2009-04-26 21:39:10 +00:00
pooka
e2fddf883f * set syncdelay to 0 only if we don't have a syncer thread
* add some #if0'd debug code to unmount for printing event counters
2009-04-26 21:36:24 +00:00
pooka
e06cd50d97 Don't drop kernel lock twice inside same operation. 2009-04-26 21:30:43 +00:00
pooka
13bf8de01d prettyprint long line, no functional change 2009-04-26 20:45:37 +00:00
pooka
125fe29b5a fix uninitialized 2009-04-26 20:44:50 +00:00
pooka
aab61fc839 Fix getnano/microuptime to report actual uptime. 2009-04-26 20:41:24 +00:00
tsutsui
70dab57692 Always make local functions static. Local symbols are still preserved
on link by ld(1) with -X option on most ports for debug.
2009-04-26 16:17:08 +00:00
pgoyette
adaec344ee Catch up with recent changes to sys/proc.h (Hello, rmind!) 2009-04-26 14:37:03 +00:00
nonaka
35df2d384d fix build broken.
Pointed by Takeshi Nakayama.
2009-04-26 13:05:55 +00:00
uch
c519d37fde added error check. 2009-04-26 12:41:59 +00:00
cegger
2cae64a195 check error code from bwi_attach() 2009-04-26 10:45:19 +00:00
cegger
394d81abd5 fix error handling 2009-04-26 10:26:54 +00:00
cegger
57fb22a89c device_t/softc split 2009-04-26 10:07:48 +00:00
cegger
c6c48498e2 prepare device_t/softc split 2009-04-26 09:56:46 +00:00
cegger
32e56df1e0 u_intNN_t -> uintNN_t 2009-04-26 09:47:31 +00:00
cegger
60326e09a5 - Fix error handling in attachment
- use aprint_*_dev
2009-04-26 09:12:33 +00:00
cegger
1ab9e723df detach ohci on shutdown 2009-04-26 08:54:13 +00:00
cegger
c398d65d42 Fix error handling. 2009-04-26 08:46:10 +00:00
elad
03d23b4d6b Authorizing actions from the generic scope using a device scope wrapper
is a big no-no.

As painful as it is, use kauth_authorize_generic() for now.
2009-04-26 07:53:43 +00:00
nonaka
9445e9e796 Added some command definitions. 2009-04-26 07:21:13 +00:00
cegger
c1bf5ecbc4 age_intr: don't return w/o ack. the interrupt.
Add a comment when this special case can happen.
2009-04-26 07:01:29 +00:00
cegger
f8c09ed139 fix error handling in lii_attach()
ok jmcneill@
2009-04-26 06:56:46 +00:00
tsutsui
d7ac09b75f - use (uint8_t *) for RX buffer
- remove unnecessary pointer casts
2009-04-26 02:25:57 +00:00
pgoyette
5dd6c0425b When drm is compiled in only for PCI devices, agp_flush_cache() is not
defined.  Wrap the call to it with #ifndef DRM_NO_AGP to avoid link
errors.
2009-04-26 02:23:26 +00:00
elad
f9642d24c5 Wrap some long lines in a comment, pointed out by ad@ - thanks!
While here, wrap two more long lines.
2009-04-25 21:26:20 +00:00
rmind
79a49ca39e - Add kcpuset_iszero().
- Fix kcpuset_match().
2009-04-25 19:38:25 +00:00
elad
54bf8cc67a Add genfs_can_mount() and use it to prevent some more code duplication of
the security checks when mounting a device (VOP_ACCESS() + kauth(9) call)).

Proposed with no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004859.html

The vnode is always expected to be locked, so no locking is done outside
the file-system code.
2009-04-25 18:53:44 +00:00