Commit Graph

102392 Commits

Author SHA1 Message Date
njoly
a135bd0847 Regen for struct linux_stat64 fix. 2009-10-30 10:58:15 +00:00
njoly
e8df95dcb7 stat64 syscalls require struct linux_stat64. 2009-10-30 10:57:40 +00:00
christos
64e2458fef spell the guys name properly. 2009-10-30 01:57:48 +00:00
christos
2ef9c80a16 compile without COMPAT_50 2009-10-30 00:53:29 +00:00
eeh
f50f807334 Fix up numoutput accounting. 2009-10-29 18:20:11 +00:00
christos
fc0e85c95e PR/42246: NAKAJIMA Yoshihiro: provide COMPAT_50 for LFS 2009-10-29 17:10:32 +00:00
yamt
413e239f0d fix a typo in a comment. 2009-10-29 09:50:49 +00:00
apb
2fbd897fba Describe new -n option in a comment; improve description of -m option. 2009-10-29 06:33:27 +00:00
njoly
b83467c466 Make flock(2) more robust to invalid operation, such as
(LOCK_EX|LOCK_SH).
2009-10-28 18:24:44 +00:00
macallan
b37fcdb29c fix occasionally wrong colours in rectangle fills 2009-10-28 04:25:13 +00:00
macallan
d3a06a75fa add radeonfb ( has been working for ages with my XVR-100 ) and pm2fb ( for
PGX32 / TechSource Raptor GFX 8P )
We should probably enable cgthree as well since it grew wsdisplay support a
while ago.
2009-10-28 03:41:30 +00:00
macallan
91a682eb8a A driver for the Permedia 2 graphics processor, so far it's been tested only
on sparc64 with a Sun PGX32 / TechSource Raptor GFX 8P
So far it accelerates block copies, rectangle fills and the cursor, it
supports the usual wsdisplay / vcons stuff.
TODO:
- character drawing by hardware so we don't need to map the framebuffer
- DDC2 support
- mode setting
This driver still relies on the firmware to set up graphics modes etc. so it
won't work on x86 ( or non-OpenFirmware for that matter ) unless you use the
VESA BIOS to set up graphics and pass the right properties ( width, height
etc. ) to the driver. For the same reason it will work only if it's the
OpenFirmware console.
2009-10-28 02:10:27 +00:00
elric
022690d221 Assign copyright to TNF on these old files. 2009-10-27 23:04:41 +00:00
martin
7ef4d1bd9d Fix endianess issues when accessing the B-channel fifos. 2009-10-27 21:47:23 +00:00
rmind
8a919a04df cpu_proc_fork: use pcb1 and pcb2, and thus make routine more readable.
Remove or update outdated comments, add new ones.  Clean-up.
2009-10-27 03:48:59 +00:00
snj
a98264b10e Drop 3rd and 4th clauses. Approved by gwr@ and wrstuden@ (copyright
holders).
2009-10-27 03:45:32 +00:00
snj
7e31e944c7 Drop 3rd and 4th clauses. Approved by all copyright holders
(Embedtronics Oy's owners, Jon Sevy, and joff).
2009-10-27 03:42:31 +00:00
rmind
0d5ca7ed05 Make pcb_ldt_sel, in amd64, an unused field. Unlike in i386, it was
missed during clean-up of LDT handling.
2009-10-27 03:05:27 +00:00
rmind
e4be2748a3 - Amend fd_hold() to take an argument and add assert (reflects two cases,
fork1() and the rest, e.g. kthread_create(), when creating from lwp0).

- lwp_create(): do not touch filedesc internals, use fd_hold().
2009-10-27 02:58:28 +00:00
rmind
0ca6708c13 - Use pool(9) for pmf_event_workitem_t, instead of pool_cache(9). Still,
meta-data of this pool takes more space than the actual data..

- Reduce lowat/hiwat to 1..8, since intensity is very low.

- Remove unused pew_next_free from pmf_event_workitem_t.
2009-10-27 02:55:07 +00:00
martin
d0ff1af4a8 g/c zssoftpending 2009-10-26 19:55:11 +00:00
cegger
62cf489d8e kill extra whitespaces
reviewed by tsutsui@
2009-10-26 19:16:54 +00:00
rmind
c32b625d4c Update comment about proc0_init(). 2009-10-26 19:03:17 +00:00
cegger
5b494d7c82 buildfix: only declare sysctl_net_ifq_setup() if INET or INET6 is defined 2009-10-26 16:41:35 +00:00
joerg
f92e474cf5 Add -n option to print major and minor version, e.g. 5.99 on -current. 2009-10-26 15:32:38 +00:00
tsutsui
020968479d A boot block on alpha is always little endian, so read and store values
in little endian via le64toh() and htole64() in ALPHA_BOOT_BLOCK_CKSUM().
Fixes installboot(8) (and future endian-aware disklabel(8)) for alpha
on big endian machines.
2009-10-26 14:22:47 +00:00
thorpej
b88f55760b Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.
2009-10-26 03:51:42 +00:00
thorpej
ba23fd19c8 Garbage-collect PMAP_LEV1MAP_SHOOTDOWN() -- it hasn't been used for a long
time.
2009-10-26 03:21:19 +00:00
snj
0c56aec186 Fix a typo in a comment. 2009-10-26 00:59:39 +00:00
mhitch
4cdf2079e4 We might switch cpu in between the start of cpu_reboot() and where we
actually start shutting down cpus.  This caused problems because the
wait_mask computed at the beginning of cpu_reboot() wouldn't be correct
when actually waiting for the other cpus to shutdown, and cpu_halt()
might be called instead of prom_halt() at the end, leading to a hung
machine.
2009-10-25 20:39:45 +00:00
bouyer
5e31b302a3 When we stall the continuation waiting for the queued I/O to complete
in xbdback_co_cache_flush2(), we don't advance the req pointer. In this
case call xbdi_put() to compensate for the xbdi_get() that will be done again
in xbdback_co_main_loop().
Fix stalled xbdback detach that would stall the whole xenbus thread,
preventing new domU from be created.
2009-10-25 13:47:43 +00:00
ahoka
88ffebdb42 Remove obscenity from comments. 2009-10-25 09:32:25 +00:00
he
adee7c99f9 Correct the previous by adding an obviously overlooked
"struct pmap *pm" argument declaration to pmap_vax_swappable().
2009-10-25 09:25:10 +00:00
rmind
554a0142dc Initialise struct emul members by name (it is readable now and one can search
them in the tree).
2009-10-25 01:14:03 +00:00
rmind
5f45928b22 Provide cpu_lwp_free* stubs in vax and powerpc.
Reported by <he>.
2009-10-24 20:03:56 +00:00
nakayama
e3b6fc3b97 Use trunc_page or round_page where appropriate.
No functional changes intended, and generate same binaries.
2009-10-24 14:52:19 +00:00
he
c162de1c7b Fix the previous by terminating the comment. 2009-10-24 13:28:16 +00:00
dsl
e547824726 Fix constant in comment 2009-10-24 12:57:17 +00:00
pooka
99e178a1c1 Pass modinit to rumpuser_dl_module_bootstrap() as a function pointer
to avoid linker rump -> rumpuser -> rump dependency which is annoying
redundancy in static linking.
2009-10-24 11:36:59 +00:00
pooka
c9f53946a5 unused rumpuser_realpath is really dead 2009-10-24 11:29:55 +00:00
dsl
c3b1f51b2f Support reading /boot > 64k. Based on the patch from Izumi Tsutsui.
Compiles but not actually tested!  Fixes PR/42202
2009-10-24 11:23:06 +00:00
dsl
836bb82532 Add some illumination ... 2009-10-24 10:28:30 +00:00
thorpej
825a207d3f Ensure coherency between the L1 PT cache and pmap_growkernel() -- protect
allocations from pmap_growkernel() with a r/w lock.
2009-10-24 04:56:42 +00:00
joerg
af76846cf3 Reduce a noise from a debug printf to debug level 2009-10-23 20:41:11 +00:00
snj
3358f48bf3 Drop 3rd and 4th clauses. Approved by scw (copyright holder). 2009-10-23 17:01:08 +00:00
snj
1d76033e5b Drop 3rd and 4th clauses. Approved by Jukka Marin (copyright holder). 2009-10-23 16:46:13 +00:00
snj
cff5cadd85 Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
2009-10-23 06:53:12 +00:00
snj
264f5ccd6e Drop 3rd and 4th clauses. Approved by cl@ and Keir Fraser (copyright
holders).
2009-10-23 05:10:48 +00:00
snj
ce8b7309aa Follow revision 1.28 in OpenBSD: remove ad clause. 2009-10-23 03:28:09 +00:00
snj
85791bacd0 Follow revision 1.8 in OpenBSD: remove ad clause. 2009-10-23 03:25:36 +00:00
snj
0d31d3264f Remove 3rd and 4th clauses. OK cl@ (copyright holder). 2009-10-23 02:32:33 +00:00
snj
7e82f68c7b Switch to a 2 clause license. Approved by joff@ (copyright holder). 2009-10-23 00:39:29 +00:00
rmind
33963b1448 Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
routines and it can/should provide stubs.
2009-10-22 22:28:57 +00:00
bouyer
e0f9b22254 Remove closes 3 and 4 from my copyright. 2009-10-22 21:50:01 +00:00
snj
b094016798 Drop 3rd and 4th clauses. OK gwr@ leo@ (copyright holders). 2009-10-22 20:15:45 +00:00
rmind
10758cb0f9 Simplify pmap_remove() a little by avoiding pmap_do_remove() layer, since
possibility to skip wired mappings is not needed anymore.  Apart from that,
no functional differences are intended.
2009-10-22 19:50:55 +00:00
snj
da0d530a06 Drop 3rd and 4th clauses. OK gwr@ drochner@ (copyright holders). 2009-10-22 19:10:42 +00:00
snj
e88e7f274c Drop 3rd and 4th clauses. Approved by soren@ and Onno van der Linden
(copyright holders).
2009-10-22 18:47:56 +00:00
rmind
30d0b02e57 Make lwp_park_sobj and lwp_park_tab static.
Wrap long lines while here.
2009-10-22 13:12:47 +00:00
snj
78f74058b2 Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
2009-10-21 23:53:38 +00:00
rmind
3e88e8e75c Sync rump with kernel changes. 2009-10-21 23:13:53 +00:00
snj
febb7cce65 Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder). 2009-10-21 23:12:09 +00:00
snj
0c15144ae1 Drop 3rd and 4th clauses. Approved by thomas@ (copyright holder). 2009-10-21 21:57:39 +00:00
snj
7f108050aa Drop 3rd and 4th clause. Approved by leo@ and thomas@ (copyright holders). 2009-10-21 21:50:14 +00:00
rmind
4e22ab72ae 5.99.21: removed uarea swap-out functionality. 2009-10-21 21:28:36 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
pooka
447898cbb0 update i_uid and i_gid after chown 2009-10-21 17:37:21 +00:00
rmind
d4b6de6fb5 Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).

(this single file was missed in previous commit)
2009-10-21 16:16:24 +00:00
snj
176f5f951d Drop 3rd and 4th clauses. OK jmcneill (copyright holder). 2009-10-21 16:06:59 +00:00
rmind
f95af63371 Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
2009-10-21 14:15:50 +00:00
snj
7a9dfdb753 Remove 3rd and 4th clauses. OK'd by Tohru Nishimura and Reinoud Zandijk
(copyright holders).
2009-10-21 00:30:43 +00:00
pooka
5a1b660dab use autogenerated prototype 2009-10-20 23:29:57 +00:00
pooka
b762b305fb regen 2009-10-20 23:29:39 +00:00
pooka
693ea25ed2 add shmif_create 2009-10-20 23:28:50 +00:00
pooka
17e6aa2d7b printf -> rumpuser_dprintf
(can't use printf while holding spinlock)
2009-10-20 23:21:53 +00:00
tron
6492b9712e Add support for 64 bit file offsets to smbfs_smb_setfsize(), largely
based on code taken from FreeBSD.

This stops truncation of files larger than 4GB by VOP_SETATTR() which e.g.
happened when copying large files "rump_smbfs". Kudos to Antti Kantee
for diagnosing the problem in smbfs_smb_setfsize().
2009-10-20 20:55:01 +00:00
snj
4988388746 Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@. 2009-10-20 19:10:09 +00:00
christos
32f18d7dbe make this compile again. 2009-10-20 19:04:59 +00:00
kardel
c3263d7b0a update copyright to 2 clause version of the NetBSD Foundation 2009-10-20 17:29:06 +00:00
jym
de3d6f78cf Fix a bug where on MP systems, pool_cache_invalidate(9) could be called
early during boot, just after CPUs are attached but before they are marked
as running.

This will result in a list of CPUs without the SPCF_RUNNING flag set, and
will trigger the 'KASSERT(xc_tailp < xc_headp)' in xc_lowpri() as no cross
call is issued.

Bug reported and patch tested by tron@.

See also http://mail-index.netbsd.org/tech-kern/2009/10/19/msg006293.html
2009-10-20 17:24:22 +00:00
jmcneill
ec03d6f02a trim some fat, don't scan disklabels on non-HD disks 2009-10-20 14:49:03 +00:00
jmcneill
441aa3df66 trim some fat 2009-10-20 14:47:33 +00:00
tron
3ad0ebd5a8 Only allocate a "struct iovec" array from the healp if a reasonably sized
stack array isn't large enough.
2009-10-20 12:17:44 +00:00
pooka
0d29473b2c Actually, put uvm_readahead into rumpkern, since while it's
technically vfs stuff, sys_descrip depends on it and readahead
itself uses only the pager interface.
2009-10-20 10:42:41 +00:00
cegger
d3e9e93ad6 Use aprint_* when attaching. While here, unwrap some lines. 2009-10-20 10:34:21 +00:00
jnemeth
3f353bcfa2 Check to see if we were passed a NULL proplist dictionary. 2009-10-20 05:33:30 +00:00
snj
07ce40632e Follow upstream's lead and remove third and fourth clauses (except on
from usr.sbin/mopd/common/pf.c, where only the ad clause is removed,
because it has a shared UCB copyright) on Mats O Jansson's files.

thorpej OK'd usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c, where he shares
copyright.
2009-10-20 00:51:13 +00:00
pooka
02a39de4a7 fix sign-compare warnings 2009-10-20 00:25:26 +00:00
rmind
993cb03302 Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).
2009-10-19 23:19:37 +00:00
pooka
fe208f2f7a __weak_alias for uvm_readahead() since it's used also in sys_descrip.c 2009-10-19 22:35:11 +00:00
pooka
639268f462 remove stale uvm_readahead() stub 2009-10-19 22:31:47 +00:00
christos
32ec2634aa treat sun2 like the other losing platforms. 2009-10-19 22:07:29 +00:00
pooka
6f49a65bc8 Set recycle to false along with a comment screaming that it should
be set properly to recycle unused vnodes immediately.
2009-10-19 19:12:06 +00:00
bouyer
6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
snj
4968c04d96 Move Eduardo Horvath's license to 2 clause. OK eeh@. 2009-10-19 18:12:37 +00:00
tsutsui
3ef39e3a6a Apply a similar fix for mount function from ffs_vfsops.c rev 1.186:
Change cd9660_mount, in MNT_UPDATE case, to check dev_t's for equality
 instead of just vnode pointers.  Fixes erroneous "Invalid argument"
 errors from mount(8) with -u against cd9660 root in the presence of
 mfs or tmpfs /dev prepared after initial mountroot.

Tested on QEMU running cobalt Restore CD.
2009-10-19 17:53:36 +00:00
pooka
c8d929f4fb add Arnaud's EuroBSDCon paper 2009-10-19 14:43:46 +00:00
tsutsui
437ae37c1d Switch the atari port to the common m68k/m68k/pmap_motorola.c, at last. 2009-10-19 13:40:28 +00:00
cegger
570ca15b16 buildfix: define integer before use. i386 ALL kernel builds again 2009-10-19 08:20:21 +00:00
dholland
a501df5ab8 Avoid leaking pages. Fixes PR 42053 from SHIMIZU Ryo. 2009-10-19 01:25:29 +00:00
tron
f996d27b06 Fix cut & paste error spotted by Nicolas Joly. 2009-10-18 23:20:31 +00:00
christos
981156292d fix the sun2 case for real. 2009-10-18 22:57:05 +00:00
tron
8cd44ca832 Avoid panic if a file system tries to write a chain of more than 32 mbuf-s
to a socket. This happens e.g. when copying large files to SMBFS.

Code reviewed by Antti Kantee.
2009-10-18 22:55:56 +00:00
tron
9c260cf349 Fix detection of SMB capabilities according to the CIFS spec:
1.) SMB_CAP_LARGE_FILES advertises support for 64-bit file offsets.
2.) SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX advertise support for
    large reads and writes (larger than 64KB).
The code previously only used SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX
which is not correct and doesn't work for the Apple Time Capsule which
only supports SMB_CAP_LARGE_FILES. With these changes SMBFS can copy a
5GB to a Time Capsule and read it back without problems.

Thanks a lot to Allen Briggs for pointing out the broke assumptions
and explaining the CIFS spec to me. This fixes PR kern/42175.
2009-10-18 22:53:36 +00:00
snj
065c5ae0d0 Move Matthias Pfaller's files to 2-clause license. OK matthias@. 2009-10-18 18:13:59 +00:00
tsutsui
1bc6608553 Don't try to read disklabel to check FS_RAID on floppy boot since
reopening floppy could cause Data Access Exception later.
Fixes PR port-sparc/42186, ok'ed by mrg@.
2009-10-18 06:24:21 +00:00
pooka
9646a920b0 Clear PG_FAKE for pages we wrote to. This avoids paging in data
we already have (and the backend might not yet have) in cases where
fs_bshift > PAGE_SHIFT.
2009-10-18 00:41:09 +00:00
pooka
50222d88ba Bump protocol version once more to allow for previous to be pulled
to netbsd-5 (protocols are not compatible due to time_t/dev_t
change).
2009-10-17 23:22:04 +00:00
pooka
805e7ceb14 Transmit VOP_ABORTOP() to the server. 2009-10-17 23:16:05 +00:00
njoly
6a42e0741e Make tmpfs write fail when process file size limit is reached. 2009-10-17 22:20:56 +00:00
pooka
a6085c2236 fix off-by-one in sanity check and bump lazy bum magic value 2009-10-17 20:35:52 +00:00
nakayama
77df506ed7 Wrap unused code with #if 0 which is called from #if 0'ed code. 2009-10-17 20:03:06 +00:00
mlelstv
e33abf1ab0 Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.
2009-10-17 11:18:17 +00:00
hannken
58cd15b068 Remove unneeded vinvalbuf() on backing store as we don't use
VOP_BMAP()/VOP_STRATEGY() here.
2009-10-17 10:29:29 +00:00
nakayama
33ec454f0c Merge want_ast check in userret() into trap handler, and repeat
preempt() call while want_resched is true.  While there remove
unnecessary #if 1.

This should fix a performance degradation of disk I/O on heavy load.
2009-10-17 08:50:49 +00:00
pooka
65aa3ef107 If send fails with EMSGSIZE for whatever reason, it's unlikely to
succeed no matter how hard we retry.  So just fail the request.
2009-10-16 23:36:05 +00:00
pooka
291f141ce9 for udp sockets crank snd/rcvbufsize to 64k 2009-10-16 23:17:46 +00:00
joerg
336cbcc88d Don't spam the console with debug messages. 2009-10-16 21:23:08 +00:00
cegger
f94b517224 Family 10h Errata #319: Attach on Family10h cpu series which have it fixed. 2009-10-16 12:05:19 +00:00
phx
89bf9948e9 Fixed typos in zssc_dump() (DEBUG). 2009-10-16 10:07:16 +00:00
phx
be3b6697b5 Fixed typo in DEBUG: atysc -> atzsc 2009-10-16 09:36:35 +00:00
pooka
afa1f603b7 In case of timeout, remember to remove ourselves from the sleep staleq. 2009-10-16 02:13:54 +00:00
enami
c210965a47 Since the aprint_normal_dev() several lines above prints a space
after the device name, no need to prepend the space here.
2009-10-16 00:45:26 +00:00
jnemeth
30d0592bd3 allow passing a NULL proplib dictionary to modctl(MODCTL_LOAD, ...) 2009-10-16 00:27:07 +00:00
pooka
d0c17feb81 We have real pollsuck() now, so remove this, ahem, less-than-perfect one.
(XXX: only thing in the kernel using pollsuck is netsmb)
2009-10-16 00:16:32 +00:00
pooka
254ffabc38 Include sys_select.c for proper select()/poll() support. 2009-10-16 00:14:53 +00:00
pooka
cc056ae92c include rumpcpu_generic 2009-10-15 23:42:40 +00:00
pooka
2f6e67dfd6 When allocating the temporary lwp we must have an lwp context. So
take turns using lwp0 for this purpose, nothing else uses it.
2009-10-15 23:15:55 +00:00
thorpej
1f59a448f4 - pool_cache_invalidate(): broadcast a cross-call to drain the per-CPU
caches before draining the global cache.
- pool_cache_invalidate_local(): remove.
2009-10-15 20:50:12 +00:00
pooka
cfc0373f49 rump_get_curlwp() is dead 2009-10-15 16:46:37 +00:00
pooka
c663ed2f3f regen: lwp interface changes 2009-10-15 16:40:15 +00:00
pooka
8559951571 Give lwp usage some much-needed love: stop treating lwp0 as the
all-sink and make sure each separate thread in rump has its own
lwp.  Happy-go-lucky callers will get scheduled a temporary lwp
on entry, while true lwp connoisseurs may request a stable lwp
for their purposes.  Some more love may be required later down the
road, but for now different threads will stepping on each others
toes.
2009-10-15 16:39:22 +00:00
hannken
4e246abd4c No longer abuse TAILQ internal data. 2009-10-15 10:05:48 +00:00
pooka
5a586117cf fix previous to make sense 2009-10-15 01:50:08 +00:00
pooka
466e9bcfec adjust for new rump_cpu 2009-10-15 01:35:23 +00:00
pooka
8c6bd3376a forgot to commit with previous batch 2009-10-15 01:29:06 +00:00
pooka
9bb1dbd8d7 rump_cpu is now a pointer 2009-10-15 00:34:05 +00:00
pooka
fcebdb26e0 Add prototype for wait operation variants which do not drop any
resources (because they should be holding any in the first place).
2009-10-15 00:33:37 +00:00
pooka
f1f3f36233 regen: scheduling points 2009-10-15 00:32:11 +00:00
pooka
000a197343 regen: scheduling points in rump_pub wrappers 2009-10-15 00:31:25 +00:00
pooka
624234c0c5 Generate scheduling points around rump vnode operations. 2009-10-15 00:29:40 +00:00
pooka
cd231d0604 Generate scheduling points in rump_pub calls. 2009-10-15 00:29:19 +00:00
pooka
9454f185c4 Add initial work on a rump virtual cpu scheduler. This is necessary
for kernel code which has been written to avoid MP contention by
using cpu-local storage (most prominently, select and pool_cache).

Instead of always assuming rump_cpu, the scheduler must now be run
(and unrun) on all entry points into rump.  Likewise, rumpuser
unruns and re-runs the scheduler around each potentially blocking
operation.  As an optimization, I modified some locking primitives
to try to get the lock without blocking before releasing the cpu.

Also, ltsleep was modified to assume that it is never called without
the biglock held and made to use the biglock as the sleep interlock.
Otherwise there is just too much drama with deadlocks.  If some
kernel code wants to call ltsleep without the biglock, then, *snif*,
it's no longer supported and rump and should be modified to support
newstyle locks anyway.
2009-10-15 00:28:46 +00:00
pooka
36f718311e whoops, restore probing of ugen{0..3} instead of just ugen2 2009-10-14 23:29:42 +00:00
dsl
931ac5949a Error out of ptcread() if the uio length supplied is zero before the code
has a chance to panic in ureadc().
2009-10-14 19:25:39 +00:00
pooka
a9cd93a788 use rump_pub 2009-10-14 19:14:39 +00:00
bouyer
e4821a51fc Don't pass a NULL arg to DIOCCACHESYNC, sd(4) dereferences it.
Pass a pointer to a int initialized to 1, so that a DIOCCACHESYNC will be
forced on sd(4).
Should fix dom0 panic reported by Sarton O'Brien.
2009-10-14 18:54:00 +00:00
pooka
d09e2773d0 "rumppriv" goes back to "rump" per internal interface naming change. 2009-10-14 18:18:53 +00:00
pooka
a6f92a2b8f regen: put all public interfaces created by ifspec into a rump_pub namespace 2009-10-14 18:16:41 +00:00
pooka
abf164854c Actually, adjust previous a bit: instead of preserving the names
of the external interfaces and namespacing the internal ones to
"rumppriv", put the external ones in a "rump_pub" namespace.  While
this requires adjusting all of the external callers of these
interfaces, it is the right thing to do in the long run, since it
clarifies the structure.
2009-10-14 18:14:48 +00:00
pooka
aa022ebd2b This wasn't supposed to go in -- the tree is under temporary
component boundary breakage.
2009-10-14 17:34:08 +00:00
pooka
8ca7f09f6e g/c some stuff which wasn't supposed to see the light of day 2009-10-14 17:30:52 +00:00
pooka
42972db848 Adjust rump sources for external/internal interfaces.
No functional change.
2009-10-14 17:29:19 +00:00
pooka
796b2444f2 generate rump local interfaces 2009-10-14 17:28:13 +00:00
pooka
c1bfb8966b adjust whitespace a bit 2009-10-14 17:26:09 +00:00
pooka
f2c144d595 Create rump public interfaces from description tables. This allows
us to control and wrap all entry points from "userspace" into rump.
This in turn is necessary for the upcoming rump cpu scheduler.

For each interface "foo" a public wrapper called "rump_foo" is
created.  It calls the internal implementation "rumppriv_foo".  In
case foo is to be called from inside of rump kernel space, the
private interface "rumppriv_foo" is used -- the userspace wrapper
prototypes are not even exported into the rump kernel namespace.
Needless to say, the rump kernel internal interfaces are not exported
for users.

Now, three classes of interfaces fight for control of rump:
  + the noble local control interfaces (which this commit addresses)
  + the insidious rump system calls (which are generated from syscalls.master)
  + and the evil vnode interfaces (which are generated from vnode_if.src)
2009-10-14 17:17:00 +00:00
hannken
df5d842a2c ufs_rmdir(): move fstrans_done() after vput(). No more unlinked and
zero-sized directory inodes in snapshots.
2009-10-14 09:40:27 +00:00
pooka
2ceb2a6829 raidframe doesn't need sys/user.h (or at least one would hope so ;) 2009-10-13 22:46:28 +00:00
pooka
5e8ba6d465 protect against multi-inclusion 2009-10-13 22:41:57 +00:00
pooka
ddc943db02 regen: fix rump varargs syscalls prototypes 2009-10-13 21:57:52 +00:00
pooka
0d8bdf6131 For varargs syscalls, create rump prototypes which match the regular
system call counterparts, e.g.:
open(const char *, int, mode_t) -> open(const char *, int, ...)
2009-10-13 21:54:29 +00:00
pooka
5ac5a300e2 don't define curlwp, it's just (unused) sugar 2009-10-13 20:08:08 +00:00
pooka
b7f550b683 add one more passthrough 2009-10-13 18:36:48 +00:00
dsl
d8e92c2a50 Enclose (void *)0 in an extra set of parenthese to make the result usable
in arbitrary expressions.
Fixes PR/41890, I can't think of any downsides!
2009-10-13 17:19:00 +00:00
uwe
c9c7f30b6e Fix inline asm for tas.b. "=m" is not restrictive enough and gcc may
decide to use addressing modes that tas.b does not support.  'V' is
advertised to be "non-offsettable" subset of 'm' but there's a bug in
gcc that prevents "=V" from working.

When in doubt use brute force, so pass lock pointer as "r" input and
declare "memory" as clobbered.

Landisk kernel diff is 5 instructions (register choice for lock
address in __cpu_simple_lock_try).

sys/dev/raidframe/rf_copyback.c - where old __asm triggered incorrect code
- successfully compiles (as part of sys/rump/dev/lib/libraidframe).
2009-10-13 12:55:53 +00:00
hannken
8deb3262b5 Fix a deadlock where fscow_disestablish() blocks because outstanding
copy-on-write operations wait for si_snaplock.
2009-10-13 12:38:14 +00:00
hannken
64747bca1d Fix a race where the backing store thread runs (and exits immediately)
before kthread_create() returns.
2009-10-13 12:37:19 +00:00
cegger
b999b7186c regen. 2009-10-13 11:56:16 +00:00
cegger
71e630a3b7 - replace 'Advanced Micro Devices' with 'AMD'.
Requested by jmcneill@
- remove duplicate printing of 'AMD' with the AMD HUDSON-2 chipset.
2009-10-13 11:55:54 +00:00
cegger
550de75c2f regen. 2009-10-13 10:46:05 +00:00
cegger
b7ebbeb62f AMD SB900 renamed to AMD HUDSON-2 2009-10-13 10:45:14 +00:00
yamt
e894729250 sys___aio_suspend50, sys_lio_listio:
- fix the buffer sizes.
	- use kmem_alloc instead of kmem_zalloc for buffers which we will
	  overwrite soon.
2009-10-12 23:43:13 +00:00
wiz
2dfcea5de5 Add quirk for Meizu M6, which doesn't like synchronize cache;
addresses PR 40442.

Idea for quirk from FreeBSD/hps.
2009-10-12 23:43:05 +00:00
yamt
bb529e553e compat_50_sys_aio_suspend:
- fix the buffer size.
	- use kmem_alloc instead of kmem_zalloc for buffers which we will
	  overwrite soon.
2009-10-12 23:41:51 +00:00
yamt
29e552b036 wrap long lines. no functional changes. 2009-10-12 23:38:08 +00:00
yamt
b8562be527 make aio_worker static. 2009-10-12 23:36:56 +00:00
yamt
5873138145 constify 2009-10-12 23:36:02 +00:00
yamt
28bf72b353 fix KMEM_SIZE vs KMEM_GUARD 2009-10-12 23:35:09 +00:00
yamt
de25ce6a4c remove no longer necessary include of drvctl.h 2009-10-12 23:33:02 +00:00
yamt
199e4526f3 aio_suspend1: fix a double free bug. 2009-10-12 23:31:59 +00:00
christos
e1d5a1ca51 unbreak sun2. 2009-10-12 22:32:23 +00:00
wiz
9ed0c95351 regen 2009-10-12 22:29:16 +00:00
wiz
79a9d356f7 Fix typo in comment. 2009-10-12 22:28:47 +00:00
wiz
b00fb4bb91 Add vendor and product ID for Meizu M6. 2009-10-12 22:28:15 +00:00
pooka
c8c66517fe Bump iovec lazy bum magic value to 32: nfsd likes to write mbufs
with 17 per chain (previous i'm-too-lazy-for-my-forloop value was
of course 16).
2009-10-12 02:25:44 +00:00
pooka
8ac0fe74d9 add recvmsg and sendmsg to networking rump syscalls 2009-10-11 23:23:09 +00:00
mhitch
8d2f7e8644 Fix DEBUG build - pv_flags does not exist anymore. 2009-10-11 20:37:47 +00:00
pooka
7e9bd843aa Include host offset in regular etfs read/write operations (I can't
imagine it being particularly useful, but let's call file this
under POLA).
2009-10-11 18:12:51 +00:00
pooka
860f5d7238 Support creating file system sockets (non-sockets not supported in
VOP_CREATE since I don't want to have to write read/write support
for non-etfs files).
2009-10-11 17:54:22 +00:00
dsl
65dd100015 Check for zero length read here - and return zero.
Most times we've come through spec_read() which has already done the test,
but not always (eg pty with ptsfs mounted).
Without this there is a simple local-user panic in ureadc().
Noted Matthew Mondor on tech-kern.
2009-10-11 17:20:48 +00:00
bsh
0c0e7d064d add options COMPAT_50 to all evbarm boards. 2009-10-11 16:20:22 +00:00
pooka
fed1ab4ee0 raidframe works well enough now to initialize parity, so install it. 2009-10-11 11:26:40 +00:00
mlelstv
688e4b57e6 AmigaOS console.device expects a character buffer, not a pointer to an int.
This fixes printf() output.
2009-10-11 10:00:10 +00:00
sborrill
6c11da0940 Add ioctls required by hdaudioctl. This involves some refactoring of the
hdaudio_afg ioctl code.
2009-10-11 08:50:11 +00:00
dsl
270307174b Fix locking when collecting pt_read and pt_ucntl. 2009-10-11 08:08:32 +00:00
pooka
8d38112c32 add some stubs required by raidframe linkage 2009-10-10 21:10:04 +00:00
pooka
d4069e2c5e Provide an interface for reboot. 2009-10-09 14:41:36 +00:00
pooka
d3da4377ca regen 2009-10-09 14:32:07 +00:00
pooka
4dd39169ff namespace RB_ from reboot.h 2009-10-09 14:31:47 +00:00
jym
31629a1342 Add pool_cache_invalidate_local() to the pool_cache(9) API, to permit
per-CPU objects invalidation when cached in the pool cache.

See http://mail-index.netbsd.org/tech-kern/2009/10/05/msg006206.html .

Reviewed by bouyer@. Thanks!
2009-10-08 21:54:45 +00:00
cegger
446b6b0dd3 Use m_pullup to handle defragmentation.
Reinject mbuf into TX queue when it couldn't be loaded.

diff for age(4) reviewed/discussed with plunky@ several weeks ago.
2009-10-08 08:57:19 +00:00
pooka
0111b794da Seems like module loading code is tasked with calling secmodel_register()
these days ...
2009-10-08 00:47:47 +00:00
pooka
b15be8fcc2 remove extraneous call to secmodel_suser_start() 2009-10-08 00:36:56 +00:00
pooka
4ecb17968a dlclose() in error branch 2009-10-08 00:34:54 +00:00
pooka
366ae82927 Use uvm_readahead.c instead of null stubs. 2009-10-07 10:23:50 +00:00
pooka
2038fbfec8 use vref() for increasing reference count instead of homegrown brilliance 2009-10-07 09:55:35 +00:00
pooka
3398bac8f2 g/c some prehistoric interfaces which have been superceded by others. 2009-10-07 09:50:43 +00:00
pooka
9759195360 * set winsize to memwinsize in initial getwindow(). makes no functional
difference, but looks less like a debug hack leftover.
* explain memory windows vs. directio a little better in comment
2009-10-07 09:42:14 +00:00
pooka
a8268fa583 space -> tab in one entry for consistency 2009-10-07 09:24:27 +00:00
pooka
788da19b0b do initial window allocation test at proper offsets 2009-10-07 09:23:03 +00:00
pooka
61d1563c1b Allow to set size and host file offset for etfs files and rumpblk. 2009-10-07 09:17:54 +00:00
elad
c8cfab9333 Extract usermount policy to its own routine. 2009-10-07 01:31:41 +00:00
elad
1e17e53958 Compare against initproc, not pid 1, to check if it's init (unify). 2009-10-07 01:06:57 +00:00
elad
2cb56be586 Add a (weak aliased) machdep_init() as a place to do machdep initialization
that can't happen as early as the other init functions as called from
cpu_startup() -- for example, register kauth(9) listeners.

Put unprivileged policy in the x86 code; used by i386, amd64, and xen.
2009-10-06 21:07:05 +00:00
elad
14dd40c754 Allow root to do things that the subsystem allows as well (unify).
This is important in the case someone manages to load the suser secmodel
and remove subsystem specific listeners; without this change they would
have ended up with a root user that can only do privileged operations.
2009-10-06 20:34:22 +00:00
pooka
5290e6c820 Give a p2k node an internal state. This allows us to do proper
reference counting and not release nodes based just on puffs'
impression of if they are free.

This also allows us to reclaim vnodes already in inactive if the
file system so desires.  Some file systems, most notably ffs, change
file state already in inactive.  This could lead to a deadlock in
the middle of inactive and reclaim if some other puffs operation
was processed in between (as exposed by haad's open(at) test
program).

Also, properly thread the componentname from lookup to the actual
vnode operation.  This required the changes the rump componentname
routines.  Yes, the rename case is truly mindbogglingly disgusting.
Puke for yourself.
2009-10-06 16:23:03 +00:00
sborrill
88bbf990c2 Commit patch from PR#41926. Confirmed to work by PR submitter on two
controllers as well myself and another on viaide.

Stops errors such as the following when probing SATA drives through
controllers that offer the legacy pciide interface:
viaide1 channel 0: reset failed for drive 0

OK bouyer@
2009-10-06 13:45:01 +00:00
pooka
a373547b43 Use uint64_t instead of size_t for block device partition size.
from jak
2009-10-06 13:05:44 +00:00
pooka
0f0ad0a73d Build proper version for i386 (since it works) and dummy versions
for the rest until the disklabel MD problems get sorted out.
2009-10-06 09:12:47 +00:00
elad
0bef641c61 Unify: >= 0 -> > -1. 2009-10-06 05:03:58 +00:00
elad
ce7ff2b92d Cosmetic changes to declarations. No functional change. 2009-10-06 05:01:51 +00:00
elad
756638cf95 Factor out a block of code that appears in three places (Veriexec, keylock,
and securelevel) so that others can use it as well.
2009-10-06 04:28:10 +00:00
rmind
9abdb3b71e tmpfs_rename: handle hard-links correctly. Fixes PR/41236. 2009-10-06 00:17:24 +00:00
rmind
b619d660f4 Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.
2009-10-05 23:59:30 +00:00
rmind
c9a5a18df3 mq_timedsend/mq_timedreceive: timeout value is absolute, not relative.
While here, drop unecessary (since fdesc API changes) lwp_t arguments.

Bug reported by Stathis Kamperis, thanks!
2009-10-05 23:49:46 +00:00
rmind
ae2795775d ufsdirhash_recycle(): modify ufs_dirhashmem atomically. 2009-10-05 23:48:08 +00:00
rmind
5503429772 shmexit: simplify a lot by avoiding unnecessary memory allocations, since
it is a last reference, just re-lock and check mapping list again.  Often
there wont be re-locks at all, moreover, shm_lock is not contended at all.
2009-10-05 23:47:04 +00:00
rmind
c3a98b4c87 semu_alloc: simplify a little. 2009-10-05 23:46:02 +00:00
rmind
ac8f63538a Convert cpu_number(), which can be sparse, to cpu_index(), which is MI. 2009-10-05 23:39:27 +00:00
haad
fbd1c01117 Add zfs sets and needed veriables to hook zfs into the build. ZFS on i386
need still one fix othervise it should be ready for testing.
2009-10-05 22:32:58 +00:00
dyoung
7b7a580067 Replace u_quad_t with uint64_t. u_quad_t is just a typedef for
uint64_t, so no ABI/API breakage will result from this change.
2009-10-05 21:25:05 +00:00
dyoung
0fabd75b6e It's a big job to write detachment hooks for pciide(4) and all of
its derivatives, and I haven't the time myself.  In struct
pciide_product_desc, provide a tiny bit of commented-out code to
guide an enterprising developer who takes on the immense task.
2009-10-05 20:03:47 +00:00
dyoung
e30873664a Improve readability of trap() by extracting two subroutines,
trap_print() and check_dr0().
2009-10-05 19:04:14 +00:00
christos
14c3063365 add the error from ifpromisc to the panic. 2009-10-05 17:58:15 +00:00
pooka
608e3170ea * support async transfers
* make it possible to abort transfers
(these are all cheap hacks, but make things work)
2009-10-05 13:00:37 +00:00
cegger
c4c0ae224e regen. 2009-10-05 12:53:37 +00:00
cegger
7ce1696dc4 add SB900 IDE/SATA ids 2009-10-05 12:52:03 +00:00
pooka
281623cb29 Call the pager with page-aligned offsets, 'cause that's what the
pager expects.  Fixes KASSERT failure if someone manages to do
otherwise.
2009-10-05 09:11:29 +00:00
pooka
cd7abaf063 set l_cpu for lwp0 2009-10-05 09:09:29 +00:00
pooka
29b5e8e633 Attach sd to devsw and create /dev/sd0[a-h]. 2009-10-05 08:34:53 +00:00
elad
4c9fcb77c3 - Add usermount_common_policy() that implements some common (everything
but access control) user mounting policies: enforced MNT_NOSUID and
  MNT_NODEV, no MNT_EXPORT, MNT_EXEC propagation. This can be useful for
  secmodels that are interested in simply adding finer grained user mount
  support.

- Add a mount subsystem listener for KAUTH_REQ_SYSTEM_MOUNT_GET.
2009-10-05 04:20:13 +00:00
elad
52bc2f0e12 Attach the listener in the correct "attach" function.
Should fix issues reported by Anon Ymous.
2009-10-05 03:44:01 +00:00
christos
28b2719313 Don't call usl_sync_check_sig from an interrupt context. Call it only if waitok.
Stack trace:	mutex_vector_enter <- usl_sync_check_sig <- usl_detachproc <-
		wsdisplay_switch <- wskbd_translate <- wskbd_input <-
		pckbd_input <- pckbcintr <- intr_biglock_wrapper <-
		Xintr_ioapic_edge1
Reported by Anon Ymous
2009-10-04 22:24:15 +00:00
pooka
bc9ecc7b8b * pass a few write requests through to the device.
* drop async transfer requests on the floor (no, this does not make
  anything work, but it's the easiest way to prevent a receive pipe
  transfer request from hanging everything.  one tiny bugstep at a time ...)
2009-10-04 17:46:58 +00:00
pooka
8e5c2019ed Fix hopefully the last deadlock in the wretched piece of code:
since ltsleep abuses "while (!mutex_tryenter()) continue;" for NOT
releasing the kernel biglock before sleeping, we cannot do a normal
mutex_enter() in the wakeup path, or otherwise we might be a
situation where the sleeper holds the kernel lock and wants the
sleepermutex (and will not back down) and the wakeupper holds the
sleepermutex and wants the kernel lock.  So introduce kernel lock
backdown to the wakeup path.
2009-10-04 17:40:34 +00:00
mhitch
7e4eb61e65 IPI interrupts occur above IPL_VM, so using IPL_VM in for the tlb shootdown
queue mutex doesn't work very well.  I get various deadlocks and corrupted
queue entries.  Change to IPL_SCHED [IPL_CLOCK] to block IPI interrupts
while the cpu is mucking with the shootdown queue.
2009-10-04 17:00:31 +00:00
pooka
9dbaa03ccb Implement RUMP_ETFS_REG. Usable e.g. by firmload(9).
(well, it should probably be RUMP_ETFS_PATH, but simple things first)
2009-10-04 16:31:08 +00:00
pooka
8ec501e110 Include firmload. Although it may be used by devices, it's pure
vfs in nature, and therefore it belongs here (can't load a firmware
from a file system without file system support, right?).  Rename
rump_cwdi to cwdi0, since firmload depends on that name (naughty
firmload).
2009-10-04 13:29:36 +00:00
pooka
a346a8ca77 Initialize suckets before domains since some domains install timers
which take softnet_lock and might run before the lock is actually
initialized.  Also, soinit() itself already calls soinit2(), so no
need to call it twice.
2009-10-04 13:24:58 +00:00
pooka
6e184706c2 Pass some requests to the device. Hi ho, required for rum. 2009-10-04 10:44:31 +00:00