Commit Graph

948 Commits

Author SHA1 Message Date
rmind 3dc24f5a91 Use lwp_getpcb() on m68k ports, clean from struct user usage. 2009-11-23 00:11:42 +00:00
rmind 23d62c72ca Include sys/user.h for MD proc.h (hppa and m68k ports). 2009-11-21 15:13:14 +00:00
skrll 9bedfc746a Remove unnecessary and incorrect STRONG_ALIAS. 2009-11-11 11:25:52 +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
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
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
snj 4988388746 Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@. 2009-10-20 19:10:09 +00:00
mhitch 8d2f7e8644 Fix DEBUG build - pv_flags does not exist anymore. 2009-10-11 20:37:47 +00:00
thorpej b5fd5d5727 Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
2009-08-26 00:30:01 +00:00
thorpej 97a2657a66 Add a real API for testing if a page is a managed page, and adjust callers
to stop relying on vm_physseg_find() for this purpose.
2009-08-18 18:06:53 +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
martin 18d36d7f38 Do not use lwp_trampoline for cpu_setfunc, we do not want to call
lwp_startup() after a setfunc. Grow a simplified setfunc_trampoline
instead.
2009-05-30 17:52:05 +00:00
skrll e03976623a Add TLS relocation definitions. 2009-05-30 05:56:52 +00:00
mhitch 0742f912f5 Add memory clobber to the instructions that change the IPL in the status
register.  See also kern/38637.
2009-05-06 21:37:40 +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
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
tsutsui 1832dc90cf Avoid "returned non-zero status" warning on make depend for kernels
without options FPSP on ports which have support for 68040 and FPSP.

Should close PR port-atari/40678.
2009-02-28 16:11:39 +00:00
martin f055e18205 Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
2009-01-27 20:30:12 +00:00
martin f7d75c4a14 fix include path in previous 2009-01-27 20:12:19 +00:00
martin 071773c11c Move FPSR_ register bit definitions into their own file 2009-01-27 20:03:12 +00:00
martin 2a9360026c The FE_* constants are used verbatim to set the RND field in the FPCR
register - so FE_UPWARD needs to be 3 and FE_DOWNWARD 2 - otherwise
our libc code for fpsetround(), fpgetround() and __flt_rounds() would
need to be adjust (and become slower). This fixes a failure in the
lib/libc/ieeefp/round regression test.

OK: matt
2009-01-27 19:04:39 +00:00
abs a192b2c217 Abstract out setting of '-m680X0' based on -DM68020, -DM68030,
-DM68040, and -DM68060 into sys/arch/m68k/Makefile.cmachflags and
include from both atari and amiga. Other m68k ports which build
kernels that support multiple CPU types can also switch across to
this.
2009-01-25 22:25:08 +00:00
tsutsui 7107680c9d In fpu_emul_arith(), check lower 7 bits in word1 rather than only 6 bits
to check 040/060 FP instructions, and don't call fpu_implode() and
fpu_upd_fpsr() if no vaild emulated result is set otherwise these
functions cause NULL pointer dereference.

Fixes panics triggered by 040/060's FDADD instruction
(which has the same lower 6 bits with fscale instruction)
on 020/030 machines (even with 68881/68882) running kernels
with options FPU_EMULATE.
Problem reported by John Carr on port-sun3.

Should be pulled up to netbsd-4-0, netbsd-4 and netbsd-5.

XXX: m68k 4.0 packages binaries on ftp have this FDADD instruction.
2009-01-20 14:57:21 +00:00
tsutsui 00ae5151a8 Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
2009-01-17 07:17:35 +00:00
tsutsui ac2053000c Make st_entry_t and pt_entry_t unsigned.
These values contain paddr_t and bitmap flags.

XXX paddr_t is unsigned long, not unsigned int.
2009-01-17 01:38:10 +00:00
cegger b4fe900840 adaption for making kgdb_dev a dev_t 2009-01-11 23:20:37 +00:00
martin 755cd7edcb Now that COMPAT_50 is needed inside the kernel for the time_t changes,
piggyback it and guard the copying of syscall return values on it. Our
libc has been fixed quite some time ago, time to get rid of the bogus copy.
2009-01-11 20:40:31 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
tsutsui 970121f868 Use the global kernel_pmap_ptr pointer in each MD pmap_bootstrap.c
(where MMU is not enabled yet) and make kernel_pmap_store static again.
Also consistently use uintptr_t on address conversion in RELOC() macro.

Tested on hp300 (PA != VA) and news68k (PA == VA).
2008-12-28 05:15:59 +00:00
tsutsui f1f16fdb45 Prepare kernel_pmap_ptr as well as other m68k ports which have own pmap.c. 2008-12-10 17:13:53 +00:00
tsutsui cf4bdf5d25 Restore kernel_pmap_store declaration since it's still used by
most m68k ports in pmap_bootstrap.c.
2008-12-10 17:12:07 +00:00
pooka ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
tsutsui b8f301461c Add #ifdef _KERNEL_OPT. 2008-11-25 14:02:16 +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
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +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
apb 96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
martin f219f266bb Include saframe.h, fixes PR port-m68k/39761 2008-10-18 13:38:42 +00:00
wrstuden 4fb41e761e Merge wrstuden-revivesa into HEAD. Catch some files that I forgot
to revive on HEAD in previous commit.
2008-10-15 06:52:38 +00:00
wrstuden fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +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
rmind 160268aca6 Remove proc_representative_lwp(), use a simple LIST_FIRST() instead.
OK by <ad>.
2008-07-02 19:49:58 +00:00
tsutsui 2bea7e173d - use TAILQ macro
- use NULL rather than 0 for pointers
No binary change.
2008-06-28 13:22:14 +00:00
tsutsui 99644a6f1e Remove ({ }) gcc extensions and use static inline functions instead. 2008-06-27 13:05:12 +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
chs 6740bb5440 enable profiling of assembly functions. 2008-05-25 15:56:11 +00:00
wrstuden 97003b024b Oops. These are supposed to come alive on the branch, not the head. 2008-05-11 00:18:09 +00:00
wrstuden dbbab92bc9 Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
2008-05-10 23:48:44 +00:00