Commit Graph

2123 Commits

Author SHA1 Message Date
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 12193ee3b4 Use lwp_getpcb() on hppa and ia64, clean from struct user usage. 2009-11-21 15:36:33 +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
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
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
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
rmind 585d607d92 Fix few more l_pflag and LP_OWEUPC confusions. 2009-07-29 17:45:39 +00:00
he 63656b9476 Remove a now-unused local variable. 2009-05-26 06:38:26 +00:00
ad 25ba07d234 Build failure, reported by he@ 2009-05-26 00:46:22 +00:00
ad 610bc1e5aa Don't pass a buffer to physio(), let it be allocated dynamically.
This leaves only scsipi and atapi doing the same.
2009-05-18 20:41:57 +00:00
tsutsui 1239650e67 - remove a cast against malloc
- (type *)0 -> NULL
- misc KNF
2009-04-18 17:56:24 +00:00
tsutsui d7aded87fa bcopy -> memmove (where possibly overwrapped) 2009-04-18 16:20:43 +00:00
tsutsui 997f95acb2 Include <sys/evcnt.h> instead of <sys/device.h> for struct evcnt.
<sys/device.h> now requires <sys/mutex.h> for struct device_lock, and
<machine/mutex.h> requires <machine/intr.h> for ipl_cookie_t, so
including <sys/device.h> from <machine/intr.h> causes recursive dependency.
2009-04-09 10:29:09 +00:00
tsutsui ac465a42e7 Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.
2009-04-03 10:38:12 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
tsutsui 2ba9ae83e1 Use <bsd.klinks.mk> to create symlinks to MD system header directories. 2009-03-15 06:04:02 +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
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
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
he d4b1297c8f Re-adapt to the changed return types for major() and minor(). 2009-01-21 16:24:33 +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
yamt 70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
tsutsui b24e157611 Add options COMPAT_50. 2009-01-12 17:24:20 +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
tsutsui acde3c90d0 Add casts to int to rdunit() and rdpart() macro to suppress a warning
since they are unlikely 64 bits.

XXX: actually these should be DISKUNIT() and DISKPART() in <sys/disklabel.h>.
2009-01-11 18:19:53 +00:00
tsutsui 07939f4755 Use PRIu64 to print 64 bit dev_t. 2009-01-11 13:03:00 +00:00
tsutsui 74ed958e0f Fix inverted logic on FPU type check in fpfault(). From OpenBSD. 2009-01-11 06:02:18 +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 6a29394250 Remove obsolete code for old software interrupt emulation.
The MI softint(9) handles it in the kernel threads nowadays.

Note "Emulation of VAX REI instruction" is still there to handle ASTs.
2008-12-21 17:42:05 +00:00
tsutsui 6882959c9b Account idepth in locore.s. 2008-12-21 15:52:16 +00:00
tsutsui a2ae506662 Sync comments about the last segment of KVA space with current implementation.
XXX other m68k ports should be updated as well.
2008-12-20 14:35:53 +00:00
pgoyette 9c68331911 Store config(1)'s root filesystem type as a text string rather than
embedding the address of its xxx_mountroot() in swapnetbsd.c.  This
permits booting of kernels with hard-wired filesystem type even if the
filesystem is in a loadable module (ie, not linked into the kernel
image).

Discussed on current-users.  Tested on amd64 and i386 with both hard-
wired and '?' filesystem times, and on both modular and monolithic
kernels.

Thanks to pooka@ for code review and suggestions.

Addresses my PR kern/40167
2008-12-19 17:11:57 +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
ad 6ba528b5bc Remove softdep, pass 1. We are focused on improving journalling.
Proposed on tech-kern@.
2008-11-24 11:41:07 +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
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +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
wrstuden fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
tsutsui 1a0c6c8f90 Remove advertising clause for UCB in various genassym.cf files,
which were derived from genassym.c in 4.4BSD-Lite2 (or 386BSD).
Closes PR misc/39573.  Approved by martin@.
2008-09-20 18:29:04 +00:00
tsutsui 9636fc5edc Remove ancient workaround hacks for gcc 2.7.2. 2008-09-14 15:03:17 +00:00
tls fca9d633b9 Add accept filters to GENERIC kernels where they exist. 2008-08-10 15:31:20 +00:00
simonb 0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
tsutsui a6ea1c4a92 Change boot messages to replace build date and maker with kernrev. 2008-07-16 13:44:51 +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
matt 60271c61c4 Need for machine-links to finish before building ${PROG} 2008-06-24 13:02:25 +00:00
tsutsui aecc2565d0 Make cpu_intr_p() inline. 2008-06-22 17:33:41 +00:00