Commit Graph

2544 Commits

Author SHA1 Message Date
mlelstv
8ce4433821 Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
2012-07-29 18:05:39 +00:00
abs
9560c9d7a4 Sync devices with GENERIC, and include bpfilter to allow dhcpcd to work 2012-07-03 22:42:47 +00:00
abs
bd1c4855ff All apply to vax only:
- Drop KERNFS from INSTALL kernel
- Add dmesg to sysinst ramdisk
- Add 'ramdisk' target to MAKEDEV and use
- Add dhcpcd to sysinst ramdisk
- Drop old install.md script
- Misc install image cleanup (reduce diff to zaurus of all things)
2012-07-03 21:49:55 +00:00
abs
36d6d3048d - Increase MAXPARTITIONS for vax from 8 to 16, using the standard NetBSD
mechanism to ensure all existing /dev nodes continue to work
- Adjust boot block layout to fit additional partitions
- Adjust number of inodes on install media
2012-07-02 22:42:18 +00:00
abs
927d767b2b drop some blank lines - no functional change 2012-06-28 13:59:55 +00:00
abs
d58ef031eb dependent not dependend 2012-06-28 13:59:25 +00:00
abs
0a805bc0a7 Define and use VS_REGS_KA49 rather than magic numbers. From OpenBSD. 2012-06-28 13:58:21 +00:00
abs
351c7b5d8f - Add racd* devices for MSCP based CD-ROM drives (RRD40s), as opposed
to mixing them in with the ra* disks, modelled loosely on how MSCP
  rx* floppies are handled
- racd* defaults to the same single iso9660 partition as cd*
- Cleanup config option handling slightly so any combination of ra*,
  rx* (and now raccd*) can be defined without build errors.
- Avoid ugly printf when disks have all zero disklabel magic number
2012-06-22 20:42:22 +00:00
abs
37d94841fa If a port is going to have wscons for virtual terminals then it really makes
sense to enable WSDISPLAY_COMPAT_USL so the system can switch between the
virtual terminals...
2012-06-05 08:41:36 +00:00
matt
2ff5436688 Really fix polyf/polyd macros. Now returns expected results. 2012-06-01 06:26:38 +00:00
matt
b2993e8d16 Remove an unneeded indirect access from polyd/polyf macros 2012-05-29 17:25:38 +00:00
matt
e950a585b9 Implement __HAVE_RAS. Unlike most implementation, this is done in userret
instead of cpu_switchto since we already accessing the proc structure so
the additional overhead of check p_raslist is minimal.
2012-05-25 12:32:48 +00:00
martin
6c3cc552c2 Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.
2012-05-21 14:15:16 +00:00
abs
a64e443af7 Revert hax to fix boot blocks for gcc 4.5, accudently committed in last 2012-05-14 10:05:50 +00:00
abs
326f063e60 From the "why was this not done before" box:
Implement WSDISPLAYIO_LINEBYTES so xwsfb works
2012-05-14 08:44:13 +00:00
christos
7484a2dbbe - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
2012-03-28 17:03:27 +00:00
he
136d71a66c Bump the ramdisk size so that the contents fits again. 2012-03-18 14:12:55 +00:00
joerg
99c3eea80c P1003_1B_SEMAPHORE is no longer optional. 2012-03-10 21:51:48 +00:00
jklos
0b6df50018 Missing end of line. 2012-03-06 22:50:24 +00:00
matt
dce68d1860 Change cpu_idle to be an inline which sets IPL to 1 and then back to 0
so simh can recognize the kernel is idle.
2012-02-27 15:50:48 +00:00
matt
d6fe275ec9 physmem is declared by uvm 2012-02-27 15:41:10 +00:00
rmind
ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
martin
f8c7c04bbe Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.
2012-02-11 23:16:15 +00:00
matt
aa4a29af75 Define __INFINITY as huge_val since VAX FP doesn't have infinities. 2012-02-05 17:45:38 +00:00
para
3eed4a3cfa - bringing kmeminit_nkmempages back and revert pmaps that called this early
- use nkmempages to scale the kmem_arena
- reducing diff to pre kmem/vmem change
   (NKMEMPAGES_MAX_DEFAULT will need adjusting on some archs)
2012-02-02 18:59:44 +00:00
matt
fc737977f3 For fast lwp_getprivate, just do the chmk $SYS_lwp_getprivate inline. 2012-02-02 18:32:16 +00:00
matt
c583175773 In the syscall vector, deal with SYS_lwp_getprivate quickly. XXX what about
non-NetBSD syscall tables.
2012-02-02 18:31:41 +00:00
matt
f24871cb06 On a kernel segfault, print the registers from the trapframe. 2012-02-02 14:30:48 +00:00
matt
939c43e3d8 Fix the initial sizing of the system page table / address space. 2012-02-02 14:30:13 +00:00
matt
eb871edeb7 Deal with instruction with no arguments. 2012-02-02 14:29:25 +00:00
para
89c9828deb converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
2012-01-27 18:52:47 +00:00
christos
dd23e71080 Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.
2012-01-24 20:03:36 +00:00
joerg
e8bec33be1 Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
2012-01-20 14:08:04 +00:00
joerg
71d0bcc69f Introduce __HAVE_NO___THREAD for sun2 and vax to disable the TLS usage.
Require __HAVE_TLS_VARIANT_I or __HAVE_TLS_VARIANT_II as well as
__lwp_getprivate_fast / __lwp_gettcb_fast to exist for libpthread.
Define VAX as going to use TLS variant I, if it is ever implemented.
2012-01-17 20:34:57 +00:00
macallan
b98ab6a827 adjust for wsfont_find() change 2012-01-11 21:23:38 +00:00
chs
d331b836f8 define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.
2012-01-07 16:47:42 +00:00
dholland
7bbf82b772 WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
2011-12-18 05:49:22 +00:00
mrg
9a4a666ff3 implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places.  avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.
2011-12-12 19:03:07 +00:00
tls
8a012bd83f The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself.  Move it to std.  This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports.  Thanks to Havard Eidnes for
pointing them out.
2011-11-22 21:25:05 +00:00
njoly
3f9feaa4df Remove extra newlines. 2011-11-10 22:33:12 +00:00
martin
f72f669ae1 Obvious copy&pasto, PR port-vax/45525 from Henning Petersen 2011-10-26 20:24:41 +00:00
chs
e873fd069d use gcc builtin for memset() on vax too. 2011-10-01 16:06:24 +00:00
bouyer
a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
matt
311f859cdd Add macros for polyd and polyf 2011-07-28 22:54:02 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
mrg
fdd886a82d avoid some multi-level pointer cast issues. 2011-07-03 08:56:25 +00:00
matt
9b5b646399 Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead.  We had a dummy field so it didn't grow in
size.  This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf.  Make trapframe members
start with tf_
2011-07-03 02:18:20 +00:00
wiz
4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
mrg
14ac2b9dab deal with __builtin_va_start()'s introduction. 2011-06-22 04:00:43 +00:00
rmind
e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
matt
424af65722 device_t, cfdata_t, etc.
CFATTACH_DECL -> CFATTACH_DECL_NEW for sizeof(struct device).
2011-06-05 16:59:21 +00:00
christos
b7290d6431 assignment to sc_dev is in tcattach, we don't have sc_dev 2011-06-05 16:12:50 +00:00
tsutsui
47f361e87a Split device_t/softc. pmax is tested on GXemul.
Compile test only for alpha and vax.

XXX: alpha/tc/tcasic.c calls tcattach() via config_found(9), but
XXX: pmax/tc/tcbus.c and vax/vsa/tc_vsbus.c calls tcattach() directly.
XXX: It looks horrible...
2011-06-04 01:57:34 +00:00
joerg
a2bf8e5d19 Introduce DDB_EXPR_FMT and replace the logic around DB_EXPR_T_IS_QUAD. 2011-05-26 15:34:12 +00:00
matt
3ff0e09ec6 Remove pmap's simple_lock; switch to atomic ops
Change pvtable simple_lock to mutex
Switch to kmem (goodbye malloc).
2011-05-24 23:30:30 +00:00
jakllsch
15bf553730 Specify that the sock argument of socktodesc() is an int,
instead of letting it default to int.
2011-05-19 02:37:41 +00:00
rmind
2626d57668 Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency.  Remove some unnecessary malloc.h inclusions as well.
2011-04-24 16:26:51 +00:00
matt
bb186500b2 Add L_PRIVATE 2011-04-14 08:17:42 +00:00
matt
02be76bc53 Support LWP_PC 2011-04-14 08:17:27 +00:00
matt
339f90a29b Add __lwp_getprivate_fast 2011-04-12 18:24:28 +00:00
matt
6a9b230111 Add a CHMU handler to implement __lwp_getprivate_fast. 2011-04-12 18:07:57 +00:00
rmind
7742d02d14 G/C unused MUTEX_COUNT_BIAS (it was for VAX) 2011-04-11 19:11:08 +00:00
martin
292d7c42ed Do not increment a bool var - from Henning Petersen, PR port-vax/44816. 2011-04-02 10:21:58 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
joerg
48717cfc00 Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-04 22:25:24 +00:00
pooka
22c822c7f3 Make vmapbuf() return success/error and make physio deal with a
failure.
2011-02-10 14:46:44 +00:00
rmind
9b6bd2d968 Remove clause 3 (UCB advertising clause) from the University of Utah
copyright.  Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
2011-02-08 20:20:06 +00:00
matt
4ce9ec6b46 Align functions on 4 byte boundaries, not 16.
Add END(x) for function sizing.
2011-01-25 02:37:35 +00:00
joerg
3c550524b5 Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh.  Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
2011-01-22 19:19:14 +00:00
joerg
19b23810a0 Switch remaining platforms to modern CPP for assembler. 2011-01-21 15:59:04 +00:00
rmind
7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
matt
965c032362 Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
2010-12-22 01:03:02 +00:00
joerg
3e11e26976 Consistently use .gnu.warning with .pushsectio and .popsection on all
architectures instead of obsolete STABS frames for linker warnings.
2010-12-20 21:11:24 +00:00
matt
6a66466f0c Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
2010-12-20 00:25:23 +00:00
matt
0817367336 Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.
2010-12-14 23:44:49 +00:00
matt
06386a01bd Cleanup includes. Change <machine/XXX.h> to <sys/XXX.h> for bus, cpu, intr.
Remove unneeded includes.
2010-12-14 23:38:30 +00:00
matt
e7308846ab Cleanup includes. Switch from <machine/XXX.h> to <sys/XXX.h> from
bus, cpu, and intr.  Remove unneeded includes.
2010-12-14 23:31:16 +00:00
matt
1d55765e60 Include <sys/evcnt.h> since <sys/cpu.h> no includes <sys/device.h> 2010-12-14 23:29:33 +00:00
matt
f62094ba63 Since CLKF_BASEPRI isn't used any more, merge its test into CLKF_INTR which
results in a simplier comparision.
2010-12-14 23:29:02 +00:00
matt
57d4ba2384 Switch to use <sys/device_if.h> 2010-12-14 23:27:37 +00:00
hannken
afdfce8e3b Remove unused count from pseudo-device md. 2010-11-23 11:13:52 +00:00
uwe
5bb781f731 Correct definition of leap year. Make yeartonum and numtoyear use
full years so that year 2000 is correctly counted as a leap year.

Now NetBSD under SIMH picks up correct time-of-day clock value.  It
used to be a day behind, since 2000 - 1900 = 100 and naive leap year
test wouldn't count it as a leap year.
2010-11-19 03:31:24 +00:00
uebayasi
5d7952a5d1 Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap.  vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
2010-11-14 13:33:20 +00:00
matt
6a98e8539f Implement CAS using a RAS for non-MP VAX systems. This technique uses the
atomicity of indirect addressing for correctness.  It also uses the knowledge
of dereferencing an address outside the page table length will cause a PTELEN
trap.  [Tested on netbsd-5]
2010-11-13 02:23:27 +00:00
uebayasi
63631ac178 Pull in uvm/uvm.h for VM_PAGE_TO_PHYS(). 2010-11-12 13:35:51 +00:00
uebayasi
52232a9d0d Pull in uvm/uvm.h where UVM's page level interface is used. 2010-11-12 13:18:56 +00:00
uebayasi
04cf143fd6 Use more VM_PHYSMEM_*() accessors. No functional changes. 2010-11-10 09:27:21 +00:00
uebayasi
41e5df6d3e Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)).  This functionality will be re-added later.
2010-11-06 15:42:43 +00:00
uebayasi
ee5c2a53e4 Machine dependent code is considered as part of UVM. Include
internal API header.
2010-11-06 11:46:00 +00:00
chs
f5b2ba770a enable DDB_HISTORY_SIZE since DDB is enabled. 2010-08-08 18:19:26 +00:00
ragge
85273aa8b3 A big bunch of bugfixes from Johnny Billquist. Highlights:
- Makes the VAX8600 work as expected (500kg of hardware :-)
- Fix a hard-tracked bug causing VAXen to hang at splhigh.
2010-07-01 19:50:11 +00:00
rmind
3c507045e2 Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
2010-07-01 02:38:26 +00:00
rmind
1840edb963 Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight.  Will be used for passive serialization.

OK ad@.
2010-06-22 18:29:01 +00:00
mrg
43b100a118 document the acorn26, i386, ia64 and vax ddb commands in both the builtin
help and in ddb.4.  fixes PR#38304, PR#38305, PR#38309 and PR#38313.
2010-06-09 02:48:52 +00:00
tnozaki
9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
tnozaki
b3cad2b95e fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
2010-05-29 17:45:15 +00:00
matt
43d0731fa4 Add PSL_HIGHIPL for recent subr.S change 2010-05-12 14:43:48 +00:00
snj
965a29d74a Fix gimplish. 2010-05-12 04:30:18 +00:00
matt
677688bd7f Make sure the softint lwp runs at IPL_HIGH. 2010-05-12 01:58:22 +00:00
hans
36cce634e3 Make console keyboard work on VAXstation 4000/9x. Seems not to break
anything on other VAXstations (tested on 4000 VLC).
2010-05-09 22:24:44 +00:00
hans
cbf9d0d33f Make SPX work as console device on VAXstation 4000/9x. 2010-05-09 22:19:46 +00:00
mrg
309c6e11b7 enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
2010-05-08 22:16:25 +00:00
chs
7654d6d482 enable TMPFS in all GENERICs that have MFS enabled. 2010-04-29 22:40:48 +00:00
rmind
13f624ca0f Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
2010-04-23 19:18:09 +00:00
pooka
835e533be4 Remove unused count (invariably "4") from pseudo-device fss. 2010-04-16 13:48:27 +00:00
tnozaki
377cb4e4f9 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
   it may pass through compiler type check, it's harmful.
   so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
2010-03-27 22:14:09 +00:00
chs
04aa4da3b0 fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
2010-03-20 23:31:27 +00:00
snj
6ea9f5a749 Spell "exception" properly. 2010-02-27 22:12:31 +00:00
joerg
d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
mbalmer
2603a89351 One semicolon only (;; -> ;) 2010-01-05 13:20:29 +00:00
tsutsui
471e528b58 Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
2009-12-12 14:44:08 +00:00
martin
3ec6df1964 Clear new pcb in cpu_lwp_fork, now that this seems to no longer be
guaranteed to be zeroed memory after the uarea swap changes.
XXX shouldn't we zero the new uarea upfront in MI code before calling
uvm_lwp_fork?
2009-12-12 12:23:29 +00:00
martin
f714d75546 Fix register usage in previous proc0paddr->lwp0.l_addr change: do not
overwrite %r1 yet, it is later used to calculate the kernel stack pointer.
As a side effect the right value is stored in $PR_PCBB again.
2009-12-12 12:19:21 +00:00
matt
0a8b38422e Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge).  These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
2009-12-11 05:52:03 +00:00
matt
6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
rmind
e9f7af26e6 Rename L_ADDR to L_PCB and amend some comments accordingly. 2009-12-10 05:10:00 +00:00
rmind
ce313d4fb1 Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork(). 2009-11-29 04:15:42 +00:00
rmind
3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
matt
11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
rmind
8065606a88 - Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .
2009-11-21 04:45:39 +00:00
cegger
9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
cegger
62cf489d8e kill extra whitespaces
reviewed by tsutsui@
2009-10-26 19:16:54 +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
5f45928b22 Provide cpu_lwp_free* stubs in vax and powerpc.
Reported by <he>.
2009-10-24 20:03:56 +00:00
snj
febb7cce65 Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder). 2009-10-21 23:12:09 +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
mhitch
298c91975c Explicitly include sys/exec_aout.h. 2009-09-18 21:40:09 +00:00
mhitch
bd24936ebd Not understanding what vax_mfpr_get_counter() was doing, my fix for
backwards time was incorrect, and actually disabled the use of mfpr for
timecounters.  The intent was to emulate a 32 bit counter using the
hardclock_ticks from the clock interrupt and the contents of the
Interval Counter register.  The problem with that was when the ICR
wrapped, but the clock interrupt was blocked resulted in an incorrect
count.  Work around this by keeping track of the previous ICR value
and hardclock_ticks to ensure the 32 bit counter doesn't go backwards.
Also, the ICR runs from -10000 to -1, so adjust the value when reading it.
Now mfpr works quit nicely on my 4000/90.
2009-09-14 02:19:15 +00:00
matt
209a0b42e3 Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
2009-08-15 23:44:57 +00:00
matt
0e5be1dc2f Change kvtopte and kvtophys from ({ }) to static inline and while there
make them tolerable of rump.
2009-08-10 08:05:32 +00:00
pooka
b89c189be7 Declare extern syscallnames in a header. 2009-06-02 23:21:37 +00:00
skrll
169b77c55c Fix obvious typo in last. 2009-05-13 09:40:48 +00:00
mhitch
033728692b Add "memory" clobber to mtpr for barrier. See also kern/38637. 2009-05-13 03:40:13 +00:00
mhitch
f3c29cad43 Revert using __insn_barrier(); changed to use "memory" clobber in the
mtpr() macro.
2009-05-13 03:38:08 +00:00
mhitch
6c4dd62a45 Add __insn_barrier() to _splset(). See also kern/38637. 2009-05-06 21:41:58 +00:00
cegger
1d89a182fb change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
2009-04-21 21:29:58 +00:00
tsutsui
0126759cb5 Apply patch from mhitch@:
Make copyin(9) and copyout(9) work with 64KB or larger data blocks.
Fixes broken pipe(2) problem mentioned in PR port-vax/41139. Ok'ed by ragge@.

Should be pulled up to netbsd-5.
2009-04-10 13:40:38 +00:00
tsutsui
f2ca316138 Don't use relative path from <machine> in #include.
It won't work for symlinks.
2009-04-02 13:00:40 +00:00
tsutsui
92da7d73c5 Revert kludge in previous.
The warning was triggered by __builtin_memcpy() on vax, and
it has been disabled in libkern.h for _STANDALONE programs.
2009-03-23 13:52:32 +00:00
he
9cd8fe02fa Correct a few more bungled bcopy() -> memcpy() conversions. 2009-03-19 22:52:16 +00:00
he
521052f60d It seems gcc is unhappy about a literal 0 as a pointer argument
to memcpy().  Work around that by using a local variable instead.
(This looks a bit dubious, but who am I to judge the restrictions
in the standalone environment on the vax -- this should not change
the semantics of what was here before.)
2009-03-19 14:11:20 +00:00
cegger
e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
35fb64746b bcmp -> memcmp 2009-03-18 15:14:29 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
dsl
98ae204731 Add some 'int' into function definitions where the K&R one didn't
specify a type.
2009-03-17 18:19:15 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl
02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
joerg
f5b0fec0e0 Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
2009-03-06 20:31:46 +00:00
msaitoh
f9ccf64b65 Fix typo(s/interupt/interrupt/) 2009-03-05 01:38:12 +00:00
mhitch
daf32f5010 The ci_want_resched check and preempt() call had been removed from
userret() which resulted in no process preemption (and probably
contributed to the signal trap loop locking up the machine that was
recently fixed).  Put the check and preempt() call in the AST trap
handler to restore process preemption.
2009-02-25 19:56:49 +00:00
ad
59fcf21389 PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.
2009-02-22 20:28:05 +00:00
mhitch
ddaf305db5 Not all 32 bits of the interval count register are being used, so set
the counter_mask to the number of significant bits we are actually using.
Fixes user/system CPU usage times.
2009-02-21 23:19:30 +00:00
mhitch
9259dea89c On the vax, the trapsignal() call will change frame->sp to point to a
callg on the user's stack that calls the user's signal handler, so do
the skip_opcode() before calling trapsignal().  A floating point
overflow no longer causes a signal loop.  This should stop the native
compile hangs trying to compile src/lib/libm/complex/catan.ln.
2009-02-18 17:32:12 +00:00
christos
78c0289565 Add INDEX_OPCODE() 2009-02-17 13:48:29 +00:00
christos
b2fabde467 - add siginfo translation for all arithmetic faults and traps.
- skip the current instruction for all faults, to avoid infinite loops on
  SIGFPE (from OpenBSD)
Info from: http://bitsavers.vt100.net/pdf/dec/vax/archSpec/EK-VAXAR-RM-001_Arch_May82.pdf
2009-02-16 23:55:31 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
jym
92ae85d18e Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
2009-02-06 18:50:26 +00:00
mrg
c6a4afa995 add COMPAT_50 to all the configs with COMPAT_40. 2009-01-24 05:06:05 +00:00
christos
e6a971bc07 Patches from Brad Parker to support vax730. 2009-01-22 18:49:02 +00:00
he
d4b1297c8f Re-adapt to the changed return types for major() and minor(). 2009-01-21 16:24:33 +00:00
pooka
854c6deca2 Use kernel locking routines only with _HARDKERNEL 2009-01-14 23:20:34 +00:00
mjf
2cebf05ce3 - Separate the COMPAT_13 and COMPAT_16 code into their own files and
compile them only when the relevant config options are set.

- Provide a sendsig_sigcontext() implementation using the existing vax
  signal code; it already does the correct thing.
2009-01-13 23:56:13 +00:00
yamt
70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
tsutsui
69cf32a782 Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
 numbers in seconds returned by the machine dependent getsecs() function
 which are used to measure relative time

saseconds_t (currently int):
 numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
2009-01-12 11:32:43 +00:00
christos
af8f3048ca fix dev_t printf formats. 2009-01-11 22:37:50 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
cegger
074ef1779e add stub for sendsig_sigcontext().
I leave this to our vax guys to implement it.
Implementing it is another step to make vax kernels build again.
2008-12-27 16:26:06 +00:00
cegger
42f4c567d4 catch up with latest changes: sendsig -> sendsig_siginfo 2008-12-20 12:50:24 +00:00
cegger
dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
pooka
ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
martin
719a906ef5 As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
2008-11-30 18:21:31 +00:00
cegger
651359d330 build fix: include <sys/buf.h> 2008-11-24 13:45:37 +00:00
ad
6ba528b5bc Remove softdep, pass 1. We are focused on improving journalling.
Proposed on tech-kern@.
2008-11-24 11:41:07 +00:00
hans
6e50d3937a Fix unibus interrupts on SBI machines. OK by matt. 2008-11-20 17:08:03 +00:00
hans
7c2871cb2a fix build for 11/780-only kernel configs. OK by matt. 2008-11-19 22:54:16 +00:00
hans
dae9680b33 fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.
2008-11-19 20:26:40 +00:00
ad
92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00
hans
7a092e0d4e uba device registers should be volatile. OK by ragge. 2008-11-19 15:39:10 +00:00
ad
0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
dyoung
94d985722a It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
2008-11-11 06:46:40 +00:00
hans
af5e538279 fix userret() and resurrect cpu_setfunc() to make vax build again. ok by matt. 2008-10-22 11:24:28 +00:00
ad
d1b01a3709 Provide a small inline wrapper for sysent::sy_call() and use it to store
the active syscall description in struct lwp. To be used at some future
point to prevent unloading of modules that provide syscalls, while the
syscalls are in use.
2008-10-21 12:16:58 +00:00
cegger
b119a37e7e build fix: get prototype for cpu_upcall() 2008-10-17 08:12:23 +00:00
hans
ce49696b30 Set nexaddr on qbus vaxen to enable remapping of buffers when booting
from MSCP devices. Fixes MSCP boot problem introduced by moving boot up
to allow for bigger kernels. OK by matt.
2008-10-16 13:39:25 +00:00
hans
991c2cc9b0 fix detection of unknown massbus devices, ok by matt 2008-10-16 12:47:22 +00:00
wrstuden
fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
hans
193647776f fix compile with options TRAPDEBUG, ok by matt 2008-10-10 21:13:35 +00:00
mrg
db754c0bc1 remove a strain # endif from the previous commit. 2008-08-31 23:23:42 +00:00
matt
9906ead4b6 Drop support for compiling a.out kernel. Elves rule! 2008-08-29 18:25:01 +00:00
hans
094d45b30f Add new accelerated driver for SPX graphics found in some VAXstations,
remove old broken lcspx driver. This is a bugfixed and refactored
version of the spx driver originally developed by Blaz Antonic in 2005.
OK'ed by mhitch.
2008-08-12 17:54:47 +00:00
tls
fca9d633b9 Add accept filters to GENERIC kernels where they exist. 2008-08-10 15:31:20 +00:00
matt
91d4704c12 Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones.  Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
2008-08-05 16:47:41 +00:00
matt
c5e5572326 For ARITH traps, set the siginfo code appropriately for FP related traps. 2008-08-05 16:00:31 +00:00
matt
a97a3faaf7 Add the AFLT_FLT* code for T_ARITHFLT. 2008-08-05 15:59:28 +00:00
matt
e56d3c9caf Add PSL_{IV,FU,DV} bits. 2008-08-05 15:56:04 +00:00
simonb
0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
ad
b94f79f0e8 Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@. 2008-07-02 17:28:54 +00:00
ad
06c343ac94 vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both. 2008-06-04 12:41:40 +00:00
ad
fd089e08cf Remove ref to uvm.page_idle_zero 2008-06-04 11:30:25 +00:00
tsutsui
6b0322861b Add options COMPAT_40 to files which have options COMPAT_30. 2008-05-30 20:10:01 +00:00
chs
6740bb5440 enable profiling of assembly functions. 2008-05-25 15:56:11 +00:00
ad
1e62ed170b Remove unneeded playing about with kernel_lock. 2008-05-21 14:07:29 +00:00
jklos
b92aa793c1 Fix leds.c to compile. 2008-05-04 00:10:42 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad
284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
ad
6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad
30abe39468 - Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
2008-04-24 11:51:18 +00:00
matt
e21c02e25f Put RCSIDs in section ".ident" 2008-04-13 15:07:39 +00:00
tsutsui
78a1d236b6 Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
2008-04-13 04:55:52 +00:00
tsutsui
5147571380 Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes. 2008-04-04 16:00:57 +00:00
tsutsui
d9941582bf Split device_t/softc for le(4) and variants and misc cosmetic changes. 2008-04-04 12:25:06 +00:00
he
87e42a468b Convert from use of bcopy() to memcpy() so that this builds again. 2008-03-31 06:19:59 +00:00
matt
6e8b97e230 After a process in swapped in, refresh the pcb's paddr. 2008-03-15 18:42:06 +00:00
matt
9e8ca25d60 Switch dz driver to PRIVALLOC and device_* accessors. 2008-03-15 00:57:15 +00:00
matt
eb34c39d65 This is not (has never?) being used. 2008-03-15 00:27:18 +00:00
matt
3fbab323bd Switch to PRIVALLOC and device_* accessors 2008-03-15 00:25:05 +00:00
matt
3143c8de1f Use 0 sized softc and switch to PRIVALLOC 2008-03-15 00:24:13 +00:00
matt
5e7971cbf0 Fix device access. Use a 0 sized softc and switch to PRIVALLOC for mem_cmi. 2008-03-15 00:23:17 +00:00
matt
4e11517afe Use device_* 2008-03-15 00:21:48 +00:00
matt
e344d4551d Use a 0 sized softc / switch to PRIVALLOC. 2008-03-15 00:21:30 +00:00
matt
022989947e Comment out xmi and nmi devices. 2008-03-15 00:20:08 +00:00
jkunz
2f13c500d2 Fix falout from recent VAX code rototill:
MicroVAX 4000/[3-7]00 could not get HW Ethernet address.
2008-03-14 21:35:01 +00:00
jkunz
3682eb424e Fix falout from recent VAX code rototill: MicroVAX 4000/1xx and 3100m9x could not get HW Ethernet address. 2008-03-14 20:49:29 +00:00
matt
fad3202138 This file is no longer used. 2008-03-11 05:43:35 +00:00
matt
9586b67527 Update to new world order 2008-03-11 05:43:17 +00:00
matt
dfba816635 Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code.  Move to prototype definitions.  staticfy, constify, avoid casting.
Use device_* accessors.
2008-03-11 05:34:01 +00:00
christos
2853595ad1 Allow KA53 to link, from Hans Rosenfeld. clk_page is used only if VAX46, VAX48
or VAX49 are defined.
2008-03-07 16:02:43 +00:00
christos
80acf2debe Fix KA53 console. From Hans Rosenfeld. 2008-03-07 15:58:33 +00:00
rmind
c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
joerg
ab9987d535 Missing assym.h dependency. 2008-03-01 13:59:26 +00:00
xtraeme
f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
matt
ba7104fdd4 Model this syscall.c on the i386 syscall.c. Don't have separate
syscall_fancy and syscall_plain.  Use p->p_trace_enabled.
2008-02-24 12:57:39 +00:00
matt
57db79967d Never ever trust the user. Fix bug introduced in version 1.8 of trap.c
by ragge nearly 13 years ago.
2008-02-24 08:38:39 +00:00
matt
aa6e59f5dc A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu().  This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.
2008-02-23 05:48:13 +00:00
matt
8310bd848b Revert last change. 2008-02-22 17:38:38 +00:00
matt
ca4e85e5a3 Fix panic in readdisksubr.c 2008-02-22 15:57:53 +00:00
matt
49ffaced1c Fix a bug in the pmap pcb tracking code. While here, rewrite it to simplier.
Use a field in the pcb itself (since it's basically free) and keep track of
what pmap "owns" a pcb (for consistency checking).  use M_ZERO as appropriate.
2008-02-22 08:46:48 +00:00
matt
9433f6a071 expand some printfs. Don't bother checking for curlwp == NULL; it can't
happen anymore.  Convert some variables to bool.
2008-02-22 03:20:39 +00:00
matt
6c90a57c76 Rethink softint cleanup. instead of post softint, do it before so we always
know it was done right.  This fixes KSP invalid panics.
2008-02-22 03:18:40 +00:00
matt
80798140ed Switch NetBSD/vax to the CAS model of mutexes. Fix the locking primitives
in lock_stubs.S so they actually function correctly.
2008-02-22 03:16:01 +00:00
matt
a0283d03d4 Add back some includes which were inadvertantly removed. 2008-02-22 03:14:22 +00:00
matt
4e3cca57c1 More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.
2008-02-21 03:52:47 +00:00
drochner
bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
matt
a027746fa0 Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.
2008-02-20 16:37:52 +00:00