Commit Graph

92346 Commits

Author SHA1 Message Date
martin
98e544d2b4 Regen (posix_fadvise versionend) 2008-01-27 20:14:12 +00:00
martin
c9146bcc25 Catch up with versioning of posix_fadvise 2008-01-27 20:13:07 +00:00
pooka
2ff7c33801 honor pager locking protocol in uao_detach() 2008-01-27 20:10:53 +00:00
jmcneill
31646d87c2 Don't attempt to claim ownership from the BIOS if the OS already holds
the HC OS Owned semaphore. Unconditionally clear SMIs as long as the
USB legacy capability is present.
2008-01-27 20:09:14 +00:00
jmcneill
b6294fbf32 Add some USB EHCI Legacy Support Extended CSR bit definitions. 2008-01-27 20:06:48 +00:00
pooka
18e91c156a Don't fool around when recycling vnodes, simply override refcount
to 1, hold on tight to your hat, and call recycle.  The reason is
that we might pick up extra references such as from lookup and we
don't really care about tracking those.  For example with p2k,
puffs in the kernel already does all the refcounting we could ever
dream of, and therefore it's left to the client and unnecessary.
2008-01-27 20:01:29 +00:00
dsl
cb0033a159 Call do_posix_fadvise() in netbsd32_posix_fadvise() 2008-01-27 19:51:40 +00:00
dsl
460b556c90 Move the prototype for do_posix_fadvise() somewhere useful. 2008-01-27 19:48:52 +00:00
pooka
67b0c1ab9c unlock vp in error branch 2008-01-27 19:19:42 +00:00
pooka
e90887eb2e vrele2 is a goner 2008-01-27 19:08:07 +00:00
pooka
fb3107360b Use vfs_subr.c from sys/kern. This brings differences in the vnode
life cycle between rump and a real kernel to a minimum.
2008-01-27 19:07:20 +00:00
rmind
4c26b5ddf3 - sys_shmget: size type must be size_t, not int. Should avoid possible
problems with huge allocations.
- shmrealloc: use newshmni for calculation of new sz, shminfo.shmmni
  was a mistake.  Convert sz to size_t type.
2008-01-27 18:37:50 +00:00
dsl
5da7cb61ba Remove NETBSD32_OFF_T_RETURN() netbsd32_lseek() now uses MI code to return
all 64 bits of the new position.
2008-01-27 17:37:40 +00:00
hannken
ce34b417f9 uvm_swap_init(): Call VOP_OPEN() on swapdev_vp to make I/O through the
swap device work with specnodes.

Ok: Andrew Doran <ad@netbsd.org>
2008-01-27 17:18:09 +00:00
chris
84400d5df4 Fix arm cpu_in_cksum. It was walking the mbuf chain wrongly, and trying
to read from the wrong memory address and so causing protection faults.

Tested with iperf, mounting nfs drives, and also the regress tool.
2008-01-27 16:58:05 +00:00
martin
2e87d89112 Implement new version of posix_fadvise as a stub callinig the real
worker function, and compatibility stub doing the same with old argument
sturcture.
2008-01-27 16:16:50 +00:00
martin
a870c2e30e Regen (posix_fadvise got a pad arg) 2008-01-27 16:14:59 +00:00
martin
65badb72df Version the posix_fadvise syscall and add the missing "pad" argument,
so that it does not only work on i386 (no padding) and 64bit archs (all
args padded to 64bit).
2008-01-27 16:13:39 +00:00
chris
67bda63986 Add an arm/conf/std.arm file which contains common arm options, initially
just options CPU_IN_CKSUM.

Include std.arm in all arm platform std files.

This should reenable the asm in_cksum code for all arm platforms.

Also remove the now unused in_cksum_arm.S.
2008-01-27 12:37:10 +00:00
kiyohara
fa0b00252c Update and add some options/devices. 2008-01-27 06:23:38 +00:00
jmcneill
cdbea784c7 On resume, ensure that esa is powered up, and ensure we power the
AC97 codec once the host controller is up and running.
2008-01-27 01:57:03 +00:00
jmcneill
d66b2b71eb Fixup PCI_COMMAND_STATUS_REG on attach. 2008-01-27 01:56:02 +00:00
dyoung
ae1c071d6f Patch /dev/drvctl and drvctl(8) to let us suspend/resume device
sub-trees, and to let us list the children of a device.

While I am here, add -p to the drvctl(8) usage message.
2008-01-27 01:38:33 +00:00
pooka
052fd49d29 Fix locking botches: take vm object lock before calling pager,
not inside the pager.
2008-01-27 00:16:22 +00:00
pooka
a8d02d0b1a opt_inet.h is no longer necessary 2008-01-26 22:53:10 +00:00
jmcneill
de1fd2ebad Use auconv to create our encoding list for us. 2008-01-26 22:06:16 +00:00
dsl
769c734483 Remove some dubious casting of the address of integer variables that
can only be 'not invalid' if the sizes match - when it is unnecessary.
2008-01-26 21:01:23 +00:00
dsl
d84d2af8e2 Split the return value of sys_lseek() into two 32 bit halves for retval[0/1]
in a manner that is endianness independant.
Should mean the amd64 will return correct offsets > 2^32 (sparc64 had a
special define).
Any new netbsd32 ports should work regardless of the endianness.
2008-01-26 20:57:46 +00:00
oster
287ee4e9a9 In a land before time, when kernel processes roamed the system, we
needed to keep track of the kernel process that opened a device in
order to close it with the right credentials.  Flash forward to today
where curlwp is now quite sufficient.
2008-01-26 20:44:37 +00:00
rmind
b5e9addd22 sched_setparam: fix the case when incorrect (according to the class)
in-kernel priority is used.  Reported by <drochner>.

Minor fixes for scheduling calls to conform the POSIX:
- If pid is equal to zero, use the calling process;
- In case of permission problem, return EPERM instead of EACESS;
- sched_setscheduler() should return previously used policy;
- pthread_* calls should return the error code or zero;

Should fix the namespace problems (and builds of some packages):
- Move cpuset_t defintion from pset.h to sched.h;
- Remove the #include of pset.h in pthread.h;
2008-01-26 17:55:29 +00:00
tsutsui
ae2fa185c0 VOP_LEASE is gone. 2008-01-26 15:48:11 +00:00
tsutsui
e44e8e02b0 Fix fallout from v_specinfo removal. 2008-01-26 15:37:35 +00:00
ad
52451df464 - Make nfsnode hash MPSAFE.
- Replace use of lockmgr().
2008-01-26 15:30:07 +00:00
tsutsui
ef25ad925d Remove unused splfoo() definitions. 2008-01-26 15:25:44 +00:00
tsutsui
d2bce17888 Add "-mdivide-breaks" to CPUFLAGS in GENERIC, and
use "-march=r3900" for CPUFLAGS in TX3912 and TX3922.

The "-mips2" option seems to imply "-mdivide-traps" and
gcc4 with the option generates "teq" instruction on division ops,
but teq is not supported by TX39xx CPUs.

The problem is reported and the fix (-mdevide-breaks) is
provided by Risto Sainio. Tested on his PenCentra 200,
and also tested on Telios HC-AJ2 by nakayama@.

This should be pulled up to netbsd-4.
2008-01-26 15:09:11 +00:00
tsutsui
ff0e8a32fd Make these TX39xx stuff compile without "-mips2" option.
TX39xx has a sync instruction, but it doesn't support all mips2 instructions.
2008-01-26 14:40:08 +00:00
tsutsui
de92c0b2bc Replace bootinfo stuff on sgimips (which has been disabled in bootloader)
with ones used on arc (which has been working for a year) and
enable it in bootloader. Tested on IP32.
2008-01-26 14:35:24 +00:00
ad
ea9faa6742 lockstat: no longer track lockmgr() events. 2008-01-26 14:29:31 +00:00
tsutsui
af15dc6cc2 - call mec_reset() to make sure DMA stopped (inspired by OpenBSD)
- also stop DMA in mec_reset() before resetting chip
- set MAC address to MAC_STATION reg in mec_attach(), not in mec_reset()

Possibly fixes occasional interrupt storm from mec(4) (i.e. hangup) at boot.
2008-01-26 14:28:49 +00:00
ad
29426ebab2 - Fix several problems with the inode hash.
- Replace use of lockmgr().
2008-01-26 14:25:38 +00:00
tsutsui
6ca5886d93 Add a wakeup instruction which is taken from Realtek driver.
Untested on newer chips, but no bad side effect on my 8169S.
2008-01-26 14:24:14 +00:00
ad
2763af2195 rw_write_held: return true only if held by the current LWP. 2008-01-26 14:13:37 +00:00
tsutsui
9e319fb40f Wakeup some newer chips from powerdown mode. From FreeBSD/Linux driver
via OpenBSD.

Tested by wiz@ in PR kern/37868.
2008-01-26 14:13:06 +00:00
tsutsui
d0ea2c0ffa Also account idepth in clock interrupt handlers
(which are registered directly by isr_add_custom())
and use the idepth value for CLKF_INTR().
2008-01-26 14:02:54 +00:00
nakayama
5da5bac16f Fix for 32-bit kernels. 2008-01-26 11:43:36 +00:00
nakayama
7a559cd1c0 Fix include. 2008-01-26 11:42:45 +00:00
scw
fe86b93506 g/c an unused variable.
From Donald T Hayford on port-arm@
2008-01-26 10:46:39 +00:00
dsl
a94c98311a Don't try to bound the return value for pread/pwrite/pathconf by casting
an 'ssize_t' or 'long' variable to 'register_t'.
If the sizes were different it would either overwrite stack or return
uninitialised stack.  On big-endian systems things would be worse!
2008-01-26 09:07:01 +00:00
dsl
fe0f1a7e5d regen 2008-01-26 08:44:48 +00:00
dsl
be09b9791a Add a wrapper for posix_fadvise() 2008-01-26 08:35:51 +00:00