Commit Graph

1657 Commits

Author SHA1 Message Date
dholland f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
dholland 8c70ef39af Add d_discard to all struct bdevsw instances I could find.
I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
2014-07-25 08:02:18 +00:00
christos e93cdeae9b Add MAP_INHERIT_ZERO 2014-07-18 12:36:57 +00:00
christos 9aaf8e57e5 Split out the minherit code into separate functions for readability (allows
us to indent them properly), and merge the new vm_map_entry creation into
a common function to avoid code duplication. No functional change.
2014-07-18 12:19:09 +00:00
riastradh 4fa7e6020b Initialize ubchist earlier. 2014-07-07 20:14:43 +00:00
maxv 87145c7a28 This KASSERT can trigger a panic too easily, if SCARG(uap, cmd)=SWAP_OFF and
SCARG(uap, arg)=NULL. The same KASSERT is already in the SWAP_ON switch case,
so just delete it here.
2014-06-28 15:52:45 +00:00
maxv 1fc63be65d Sync swapctl() with netbsd32. Return EINVAL when misc<0, and 0 when misc=0
or uvmexp.nswapdev=0.
2014-06-22 19:09:39 +00:00
riastradh e951f85b1a Allow VM_NFREELIST in uao_set_pgfl, meaning any freelist is OK. 2014-05-25 18:55:11 +00:00
riastradh c20b71f6fe Add uao_set_pgfl to limit a uvm_aobj's pages to a specified freelist.
Brought up on tech-kern:

https://mail-index.netbsd.org/tech-kern/2014/05/20/msg017095.html
2014-05-22 14:01:46 +00:00
riastradh 8557df8fac Back out previous silliness -- on failure no pages are allocated. 2014-05-19 05:48:14 +00:00
riastradh 1b07394016 Don't leak memory on failure in uvm_pglistalloc_contig.
Free pages like uvm_pglistalloc_simple does.

Discovered by code inspection.
2014-05-19 05:24:29 +00:00
chs e495a99da8 remove unused variables for UVM_PAGE_TRKOWN. 2014-04-21 16:33:48 +00:00
matt 21b604c9f8 Change cpu_tlb_info definition based on PMAP_TLB_MAX instead of MULTIPROCESSOR 2014-04-03 14:46:25 +00:00
matt 18fc7d3f42 Compare ASIDs, not pmaps. 2014-04-03 14:23:38 +00:00
matt ad2de1daa9 Make this compile on booke again. 2014-04-03 13:54:59 +00:00
matt 1627c0ae4a Allow this to handle H/W tlbs. Some ARM allow for a cheap way to flush all
entries using an ASID from the TLB.  Add support for taking advantage of it.
Most ARMs don't have an easy way to find out what's in the TLB so make
record_asids can just say all ASIDs are in use.  Fix some off by 1 errors.
2014-03-30 15:26:15 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
dholland a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
pooka 75234fdf68 deduplicate uvm_object_printit() implementation 2014-03-11 20:22:47 +00:00
matt 1a23213bde Use UVMHIST_INITIALIZER (KERNHIST_INITIALIZER) to statically initialize
maphist.  This allows maphist to used very very early in boot well before
uvm has been initialized.
2014-03-05 05:35:55 +00:00
matt 89e28d04a5 use _KERNEL_OPT around #include 2014-03-04 06:14:53 +00:00
christos b1664f725b only check that npages fit, if we are going to add npages to swpgonly. 2014-03-01 18:32:01 +00:00
martin 87d65da062 Fix copy & pasto 2014-02-26 20:33:53 +00:00
matt b007730cbb Add vm.min_address and vm.max_address which return VM_MIN_ADDRESS and
VM_MAXUSER_ADDRESS.
2014-02-26 16:11:59 +00:00
pooka 4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
martin b59de6cf0c Mark a potentially unused variable 2014-02-25 15:20:29 +00:00
martin 195d8e90a0 Mark a variable used only in diagnostics 2014-02-25 14:22:59 +00:00
mlelstv 509b7e4910 Drop empty priority lists, not the full ones. Fixes kern/48611. 2014-02-22 19:05:31 +00:00
skrll 0785dcba86 Remove unnecessary struct simplelock forward declaration. 2014-02-21 22:08:07 +00:00
pooka a2e24f6a7e Use same uvm_swap_shutdown() stub for !vmswap kernels and rump kernels. 2014-02-18 06:18:13 +00:00
manu d7670a176d Properly translate struct swapent for COMPAT_NETBSD32 2014-02-03 13:20:20 +00:00
christos d0d265890a make this compile. 2014-01-25 17:30:45 +00:00
christos 2dffd96cd7 deal with COMPAT_10 issue. 2014-01-25 17:21:49 +00:00
christos 37493adfb4 delete VM_DEFAULT_ADDRESS and commentary which is no longer used/true. 2014-01-25 15:17:17 +00:00
christos 21c591da6e provide proper defaults for topdown and bottomup allocation.
XXX: Ports that provide their own VM_DEFAULT_ADDRESS() need to provide the
two new flavors, otherwise they get the default ones now.
2014-01-25 05:14:03 +00:00
dsl ff2955473b Re-instate the zero length sections in elf core dumps (they probably help
describe the process memory layout).
Fudge the a.out core code to not dump the entire contents.
I'm not sue that anything can read a.out core files - more progress might
  be made on such dumps by converting the a.out file to elf!
2014-01-07 07:59:03 +00:00
dsl 825d1920ba There is no need for uvm_coredump_walkmap() to explicity pass the proc_t
pointer to the calller's function.
If the code needs the process its address can be placed in the caller's
  cookie.
2014-01-03 21:12:18 +00:00
dsl 7a743f3de6 Minor changes to the process coredump code.
- Add some extra comments.
- Add some XXX comments because the process state might not be stable,
- Add uvm_coredump_count_segs() to simplify the calling code.
- uvm code now only returns non-empty sections/segments.
- Put the 'iocookie' into the 'cookie' block passed to uvm_coredump_walkmap()
  instead of passing it through as an additional parameter.
amd64 can still generate core dumps that gdb can read.
2014-01-03 15:15:02 +00:00
dsl be74e0a9c9 Change the type of the 'cookie' that holds the state of the core dump file
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
2014-01-01 18:57:15 +00:00
christos 6b4946039c fix circleq comments 2013-11-23 14:50:40 +00:00
christos 72307c58b9 convert from CIRCLEQ to TAILQ
add uvm_swap_shutdown(), unused
2013-11-23 14:32:13 +00:00
martin 41de4c61e8 As discussed on tech-kern: make TOPDOWN-VM runtime selectable per process
(offer MD code or emulations to override it).
2013-11-14 12:07:11 +00:00
martin 419cac9e69 Mark a diagnostic-only variable 2013-10-25 20:28:33 +00:00
martin f7c781e1d9 Mark diagnostic-only variables 2013-10-25 20:27:29 +00:00
martin 43a24031f7 Mark a diagnostic-only variable 2013-10-25 20:26:22 +00:00
martin f5b6eb9494 Mark diagnostic-only variables 2013-10-25 20:25:25 +00:00
martin c9e83a001d Mark a diagnostic-only variable 2013-10-25 20:22:55 +00:00
martin 015d1a5e21 Mark a diagnostic-only variable 2013-10-25 20:05:39 +00:00
martin dbe78631e3 Optimize out VM_PHYSMEM_PTR_SWAP on architectures that have VM_PHYSSEG_MAX = 1
(hard to address two different array entries there w/o invoking undefined
behaviour, and newer compilers complain about it).
2013-10-25 14:30:21 +00:00
martin 01c3389f26 Some pmaps may not consume all arguments of pmap_copy() 2013-10-25 14:20:11 +00:00