Commit Graph

1015 Commits

Author SHA1 Message Date
wiz 4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +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
tsutsui 7eb0284e74 - remove simple_lock(9) and use atomic_ops(3) to account pmap reference count,
perrequest from rmind@
- while here no need to export struct pmap on sun2/sun3/sun3x

No particular problem for a week on hp300 and sun3x kernels with disabled
tcp_vtw which has been broken for a month on low memory machines.
2011-06-03 17:03:52 +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
tsutsui 1831386b4e - consistently use #ifdef DEBUG_FPE and #ifdef DIAGNOSTIC
- use DPRINTF() style debug printfs
- use __func__ to print function names
2011-05-25 15:47:19 +00:00
tsutsui 248f85bd79 KNF. No binary change. 2011-05-25 15:17:21 +00:00
tsutsui a197c7a73f - use DPRINTF() style debug printfs
- use __func__ to print function names
- consistently use #ifdef DEBUG_FPE
- add some missing debug messages including \n in error paths
2011-05-23 15:40:34 +00:00
tsutsui 9e59c87c59 KNF, mostly indent. No binary change. 2011-05-23 14:52:31 +00:00
tsutsui 34637b8687 - merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

Briefly tested and no obvious breakage on atari, sun3, and x68k.
2011-05-16 13:22:51 +00:00
tsutsui 599eb3007d Fix botch in rev 1.28 that causes wrong results of fcmp and ftst in FPE.
fpu_upd_fpsr() should be called even in discard_result case if an emulated
instruction gets proper result without signal.

Fixes weird behavior of awk(1) seen on /etc/rc.d/postfix on XM6i and
TME emulating sun3 without 68881.

Should be pulled up to all netbsd-4 and netbsd-5 branches.
2011-05-14 16:17:55 +00:00
mrg 07a98cd33f obsolete DB_AOUT_SYMBOLS. however, we need to leave most of the code
in db_sym.[ch] as it is used by the elf version of crash(8).

i will be cleaning up the db_sym.c code in a follow up commit to avoid
having dead code compiled.
2011-04-11 04:22:30 +00:00
matt e3bce9dd91 If _KERNEL is not defined, force MACHINE to be "m68k". Userland should be
using uname/sysctl to get this value.
2011-03-05 14:32:32 +00:00
joerg 1631a78097 Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-02-24 04:28:41 +00:00
joerg 13d02bb5bf Fix ucontext32_t on AMD64. Add optional compile time assertions for
ucontext_t and ucontext32_t to ensure that they don't change.
Provide the constants for AMD64, ARM, i386, and M68K.
2011-02-23 02:58:38 +00:00
matt a5e30bea72 Put RCSIDs in section .ident. (use .pushsection/.popsection) 2011-02-12 16:31:32 +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
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
tsutsui 1e4ed35788 Use #ifdef CACHE_HAVE_VAC rather than #ifdef M68K_MMU_HP where
the pmap code indends.
(though currently only MMU_HP machines have VAC in pmap_motorola ports)
2011-01-06 13:49:16 +00:00
tsutsui 0d6929ab07 Make pmap_aliasmask unsigned and declare it in <m68k/pmap_motorola.h>.
XXX: does anyone still have working HP320 or HP350 with 020+HP_MMU+VAC?
2011-01-02 05:21:11 +00:00
he 914db8430e Protect the include of <sys/cpu_data.h> with a test for either _KERNEL
or _KMEMUSER.  This should fix the build problem in libkvm for our m68k
ports.
2011-01-01 00:37:16 +00:00
matt c831bbca8c Collect cpu_info and friends and move to m68k/include/cpu.h
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
2010-12-22 02:42:27 +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
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
tsutsui bb3ae5174d Get rid of more #ifdef COMPAT_AOUT_M68K dependent part.
Now compat_aoutm68k can be a module.

XXX: linux/svr4 ELF binaries also require a syscall return value in %a0?
2010-10-15 10:40:52 +00:00
tsutsui f350eccac6 Fix typo. 2010-10-15 10:20:09 +00:00
tsutsui eee2fbcce4 Un-ifdef COMPAT_AOUT_M68K for MODULAR kernel. 2010-10-14 16:34:29 +00:00
tsutsui b2c1aff3d8 Fix reloc calcurations (mechanically pulled from working i386 and sh3).
Now options MODULAR works at least on news68k:

# uname -mrs
NetBSD 5.99.39 news68k
# modstat|grep filesys
coredump         misc       filesys    2     2790     -
exec_aout        misc       filesys    0     1866     coredump
exec_elf32       misc       filesys    0     6072     coredump
exec_script      misc       filesys    0     972      -
kernfs           vfs        filesys    0     9734     -
mfs              vfs        filesys    0     3656     ffs
procfs           vfs        filesys    0     23924    -
#
2010-10-14 16:33:50 +00:00
christos 1a7202d2d0 cargo cult the x86 changes. 2010-09-20 16:13:35 +00:00
tsutsui d52a314491 - add m68k/conf/std.m68k, which includes common standard options for m68k,
options EXEC_ELF32, EXEC_SCRIPTS, and CPU_IN_CKSUM for md cpu_in_cksum.c
- make all m68k ports include common arch/m68k/conf/std.m68k
  from MD std.${MACHINE}
2010-09-19 02:09:27 +00:00
tsutsui 4a614dd9e5 Remove MD m68k/in_cksum.c which is obsolete since cpu_in_cksum refactoring
in 2008 and now superseded by m68k/cpu_in_cksum.c.
2010-09-19 01:39:48 +00:00
tsutsui fa0b9f38f6 Add m68k MD cpu_in_cksum.c.
Based on sys/netinet/cpu_in_cksum.c but just modified
to use traditional MD m68k/oc_cksum.s.

Makes ~5% improvements of ttcp(1) xfer rates on ATARI TT030 + SMC_TT.
2010-09-19 01:35:43 +00:00
mrg 6ba01f04a1 look for the m680[2346]0 options in the opt_m68k_arch.h and set them
appropriately in the kernel config, if not already set.

restores the settings before the M680x0 options became _KERNEL_OPT
options.  tested by myself and mhitch.
2010-07-12 02:45:31 +00:00
chs 7ddf89ffa3 enable usermode RAS for sun[23] also. 2010-07-07 01:23:08 +00:00
chs 9ea6b6e3f2 implement ucas_* for m68k. 2010-07-07 01:16:23 +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
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
he df6736b3e1 Only include opt_m68k_arch.h if _KERNEL_OPT is defined, so that librump
builds again.  OK'ed by mrg@.
2010-06-06 11:41:06 +00:00
mrg fb81c7d694 fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h.  FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
2010-06-06 04:51:33 +00:00
mrg bd01b4a30e fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h.  FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
2010-06-06 04:50:05 +00:00
tnozaki dc71c99d49 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:33:57 +00:00
tsutsui 9ce7892d8f lwp_uc_pool has been replaced with kmem(9)
so also replace <sys/pool.h> with <sys/kmem.h>.
2010-04-26 15:07:01 +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
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
skrll 158aca4053 s/cpu_fork/cpu_lwp_fork/ in comment. 2010-02-25 07:14:48 +00:00
wiz 65b4cc1cbf Fix typo. 2010-02-09 23:07:13 +00:00