Commit Graph

99578 Commits

Author SHA1 Message Date
dholland
3781289e95 Merge patch from PR 12605, which tidies up allocation of transmit DMA maps.
Generalize it to also tidy up allocation of receive DMA maps. And change a
few of the symbol names involved to (1) make sure all uses have been fixed
and (2) make it clearer what's actually going on.

Previously the driver was using DMA maps off the free list without fully
allocating them, apparently in order to save two or three lines releasing
them on error paths. According to the submitter of the PR (H.Saito) this
was causing it to reuse a map already in use when under load, resulting
in panics.

I'm not sure if that ought to have been possible or if it reflected an
interrupt handling bug somewhere else, but the change is an improvement
regardless, so we'll go with it.

Compile-tested only, but I've crosschecked the diffs and all that and it's
a pretty noninvasive change.

(Is anyone actually using this driver rather than tlp?)
2009-03-29 05:26:43 +00:00
rmind
be5c9950c6 kpsignal2: do not start process (when it is stopped) for all termination
signals (i.e. SA_KILL), just if SIGKILL (or SIGCONT).  Improve comments.

Make some functions static, remove unused sigrealloc() prototype.

Fixes PR/39814.  Similar patch reviewed by <ad>.
2009-03-29 05:02:46 +00:00
rmind
6b0e9f0301 fownsignal: pre-check for zero pgid, avoids locking of proc_lock. 2009-03-29 04:40:01 +00:00
mrg
49be05cbf6 5.99.9: struct vmspace grew a new member. 2009-03-29 01:12:22 +00:00
rmind
a3e23c67f6 Reduce some differences between i386 and amd64.
Mainly cosmetical changes - no functional changes intended.
2009-03-29 01:10:28 +00:00
mrg
fcc023545e - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
2009-03-29 01:02:48 +00:00
rmind
ee70d529c3 Change amd64 fault handler to check instruction pointer for copyin/out et al
functions, like in i386.  Avoids setting pcb_onfault, saves few instructions.
2009-03-28 22:56:19 +00:00
rmind
614719fdd8 Add few comments. 2009-03-28 22:46:52 +00:00
tsutsui
0ab04c94e6 Fix another botch in hwcsum changes for PR kern/40955:
8168/8111/8168B/8111B doesn't have DESCV2.

Problem reported by Arto Huusko on current-users@.
2009-03-28 22:16:08 +00:00
rmind
1ce95d231e x86_64_ipi_halt: unset CPU as running (sync with i386). 2009-03-28 22:03:27 +00:00
rmind
9a2646038e Convert some panic() checks to KASSERT()s.
This code is stable and there is no reason to enforce checks.
2009-03-28 21:45:55 +00:00
rmind
f70325ee02 - kpreempt_disabled: constify l.
- Few predictions.
- KNF.
2009-03-28 21:43:16 +00:00
rmind
4aca8329b0 sys_fcntl: use FD_CLOEXEC, instead of magic number '1'. 2009-03-28 21:42:19 +00:00
rmind
9c724ebaca Make inferior() function static, rename to p_inferior(), return bool. 2009-03-28 21:41:05 +00:00
rmind
ea3400a4b7 - proc_free(): no need assign 'p->p_pptr' to 'parent' many times,
re-use it where appropriate (proc_lock is held across usages).
- Undefine DEBUG_EXIT.
2009-03-28 21:38:55 +00:00
rmind
0d4fdf8b96 kvtop: change return type to paddr_t. 2009-03-28 21:34:17 +00:00
rmind
eefc2d042b mmrw: add missing pmap_update(). 2009-03-28 21:23:44 +00:00
rmind
a7fde9e6fa cpu_coredump: pass UIO_SYSSPACE to coredump_write(), not UIO_USERSPACE. 2009-03-28 21:21:29 +00:00
christos
0ca4fa8e5b revert previous; ctags has been fixed. 2009-03-28 18:43:20 +00:00
pooka
46d9c48ff8 regen: new syscalls 2009-03-28 16:34:34 +00:00
pooka
5e0d2571db mark a bunch of syscalls as RUMP 2009-03-28 16:33:40 +00:00
mrg
7e57d1b381 put the max_paddr DEBUG message under DUMP_DEBUG option. 2009-03-28 01:45:17 +00:00
ad
cf4d738d95 Remove -mtune, we'll let the compiler pick a good default (the current
default sucks).
2009-03-27 21:04:35 +00:00
drochner
bf4f01a782 Rearrange TSC inter-CPU synchronization code so that the gory details
are dealt with in x86/tsc.c and callers don't have to care that much.
Also add some comments and make some variables static.
approved by ad (a while ago)
2009-03-27 19:53:19 +00:00
dyoung
858d3b857c If a sip(4) is powered down, then so is its PHY, so don't try to read
media status from the PHY.
2009-03-27 16:45:53 +00:00
dyoung
590c39d0f3 For legibility, unifdef -U__FreeBSD__ -D__NetBSD__. This compiles, but
it is not run-tested.
2009-03-27 16:15:24 +00:00
dyoung
7377de8f1d Make this build on -current. 2009-03-27 16:10:50 +00:00
dyoung
a6cfb08d9c If defined(_KERNEL), #include <sys/types.h>, otherwise #include
<stdbool.h>, for the bool definition that we need. intr.h only got the
definition by chance, before.
2009-03-27 16:09:24 +00:00
dyoung
103f0ed593 If defined(_KERNEL), #include <sys/types.h>, otherwise #include
<stdbool.h>, for the bool definition that we need. cpu.h only got the
definition by chance, before.
2009-03-27 16:07:37 +00:00
dyoung
098e562dfd Explicitly #include <sys/device.h> and <sys/evcnt.h>. These files only
got the definitions they needed by chance, before.
2009-03-27 15:47:33 +00:00
pooka
c9e578684e rump_virtif_create prototype 2009-03-27 13:47:53 +00:00
pooka
06dceb4d08 * make interface creation open /dev/tapn for interface n
* create "unique" enaddr
* do send in async context
2009-03-27 13:46:34 +00:00
pooka
7a82389053 shotgun approach to rump syscalls 2009-03-27 13:18:27 +00:00
tsutsui
f8fb75a405 Use bus_space(9) to access registers. SETREG() macro using bogus casts
against packed structures doesn't work on gcc4. (no character on screen)
See also:
http://mail-index.NetBSD.org/port-sparc/2003/11/11/0002.html

Should be pulled up to netbsd-4 and netbsd-5.
2009-03-27 12:25:41 +00:00
tsutsui
030266c11f Check a correct bit for ip4csum-rx. Reported privately on PR kern/40955. 2009-03-27 12:19:17 +00:00
drochner
643809db9f namespace sanity: TIMER_RELTIME is _NETBSD_SOURCE only 2009-03-27 11:06:26 +00:00
drochner
109046eebe namespace sanity: SI_LWP and SI_NOINFO are _NETBSD_SOURCE only 2009-03-27 11:05:43 +00:00
drochner
083fa0419a In sigput(), save the siginfo no matter whether SA_SIGINFO is set or not.
There are also sigtimedwait(2) et al. to catch signals without invoking
a signal handler. Fixes PR kern/41076 by Matteo Beccati (the first
test case, where the signal is sent before sigwaitinfo(2) gets called).
2009-03-27 10:58:38 +00:00
dholland
c963cec011 Add the other three PCI ids for the nvidia MCP65 SATA controller to
the quirk table. This way they attach as ahcisata and work, instead of
attaching as viaide and failing miserably.

Fixes PR kern/37826.

XXX: There are a bunch of additional MCP67 and MCP73 PCI ids that
XXX: should probably be added also, but I don't want to do that without
XXX: further investigation and testing.
2009-03-27 06:36:49 +00:00
pooka
696e7eae87 fix botch in previous 2009-03-27 06:35:10 +00:00
cegger
8c5327a270 use auto-negotiation for manual media type selection.
This should fix establishment of 10/100Mbps link on L1E.
Helpful to reduce watchdog timeout problems on L1 (age(4)) reported by Jochen Kunz.
From FreeBSD via OpenBSD.
2009-03-27 04:42:50 +00:00
gmcgarry
65b9855fd5 Replace gcc initialisers with c99 designated initialisers. 2009-03-26 22:22:14 +00:00
he
c05f1c0f90 Make the function declaration the same for the big-endian case as
for the little-endian case, and consistent with the libkern.h
declaration.  Fixes build problem for at least hp700 and evbbarm-eb.
2009-03-26 22:18:14 +00:00
gmcgarry
a6dda89bce Pass argument to __aligned() through __STRING() so that it is correctly expanded. Now __aligned(CACHE_LINE_SIZE) works with pcc. 2009-03-26 22:16:44 +00:00
pooka
f75bcfdea3 pretend to do some sort of cleanup in error branches 2009-03-26 20:05:07 +00:00
pooka
02040931ba Handle eof a bit differently. E.g. ffs and msdosfs seem to have
a quite different opinion about what happens in bmap beyond EOF,
so avoid calling it.
2009-03-26 08:22:22 +00:00
macallan
31e90ebd10 add a few more register definitions, needed by the latest crime_drv. 2009-03-26 04:11:58 +00:00
mrg
b73a4b4545 avoid a useless uninitialised use, picked up by gcc -O3. 2009-03-26 01:52:24 +00:00
dyoung
3a72540da6 This only got the definition of device_xname() by chance, so explicitly
#include <sys/device.h>.
2009-03-26 00:30:10 +00:00
dyoung
b63bf39017 It is only by chance that this gets the prop_array_t definition that it
needs, so explicitly #include <prop/proplib.h>.
2009-03-25 23:35:54 +00:00