summaryrefslogtreecommitdiff
path: root/vm/vm_object.c
AgeCommit message (Collapse)Author
2023-07-05vm: Make vm_object_coalesce return new object and offsetSergey Bugaev
vm_object_coalesce() callers used to rely on the fact that it always merged the next_object into prev_object, potentially destroying next_object and leaving prev_object the result of the whole operation. After ee65849bec5da261be90f565bee096abb4117bdd "vm: Allow coalescing null object with an internal object", this is no longer true, since in case of prev_object == VM_OBJECT_NULL and next_object != VM_OBJECT_NULL, the overall result is next_object, not prev_object. The current callers are prepared to deal with this since they handle this case seprately anyway, but the following commit will introduce another caller that handles both cases in the same code path. So, declare the way vm_object_coalesce() coalesces the two objects its implementation detail, and make it return the resulting object and the offset into it explicitly. This simplifies the callers, too. Message-Id: <20230705141639.85792-2-bugaevc@gmail.com>
2023-07-03vm: Allow coalescing null object with an internal objectSergey Bugaev
Previously, vm_object_coalesce would only succeed with next_object being VM_OBJECT_NULL (and with the previous patch, with the two object references pointing to the same object). This patch additionally allows the inverse: prev_object being VM_OBJECT_NULL and next_object being some internal VM object that we have not created a pager port for, provided the offset of the existing mapping in the object allows for placing the new mapping before it. This is not used anywhere at the moment (the only caller, vm_map_enter, ensures that next_object is either VM_OBJECT_NULL or an object that has a pager port), but it will get used with the next patch. Message-Id: <20230626112656.435622-4-bugaevc@gmail.com>
2023-07-03vm: Allow coalescing a VM object with itselfSergey Bugaev
If a mapping of an object is made right next to another mapping of the same object have the same properties (protection, inheritance, etc.), Mach will now expand the previous VM map entry to cover the new address range instead of creating a new entry. Message-Id: <20230626112656.435622-3-bugaevc@gmail.com>
2023-02-08slock: Fix initialization of statically-allocated slocksSamuel Thibault
(this is actually a no-op for i386)
2023-01-19Include mig generated headers to avoid warnings with -Wmissing-prototypes.Flavio Cruz
This also reverts 566c227636481b246d928772ebeaacbc7c37145b and 963b1794d7117064cee8ab5638b329db51dad854 Message-Id: <Y8d75KSqNL4FFInm@mercury.tail36e24.ts.net>
2022-12-27Fix some warnings with -Wmissing-prototypes.Flavio Cruz
Marked some functions as static (private) as needed and added missing includes. This also revealed some dead code which was removed. Note that -Wmissing-prototypes is not enabled here since there is a bunch more warnings. Message-Id: <Y6j72lWRL9rsYy4j@mars>
2022-02-16vm_object: Fix vm_object_page_map map function prototypeSamuel Thibault
The map function is supposed to return physical addresses, thus phys_addr_t.
2021-11-28Fix rejecting the mapping of some pagesSamuel Thibault
The memmmap method may reject some offsets (because it falls in non-device ranges), so device_map_page has to notice this and report the error. device_pager_data_request then has to notice as well and report.
2020-03-15vm_object_copy_call: Make sure vm_object_enter succeedsSamuel Thibault
Suggested by guy fleury iteriteka <gfleury@disroot.org> * vm/vm_object.c (ipc/mavm_object_copy_call): Make sure vm_object_enter call succeeds.
2017-10-23Drop the register qualifier.Justus Winter
* i386/intel/pmap.c: Drop the register qualifier. * ipc/ipc_kmsg.h: Likewise. * kern/bootstrap.c: Likewise. * kern/profile.c: Likewise. * kern/thread.c: Likewise. * vm/vm_object.c: Likewise.
2017-09-21vm: Remove old memory manager remnants.Justus Winter
* vm/vm_object.c (vm_object_accept_old_init_protocol): Remove. (vm_object_enter): Adapt.
2016-10-03Remove deprecated external memory management interface.Justus Winter
* NEWS: Update. * device/dev_pager.c (device_pager_data_request): Prune unused branch. (device_pager_data_request_done): Remove function. (device_pager_data_write): Likewise. (device_pager_data_write_done): Likewise. (device_pager_copy): Use 'memory_object_ready'. * device/dev_pager.h (device_pager_data_write_done): Remove prototype. * device/device_pager.srv (memory_object_data_write): Remove macro. * doc/mach.texi: Update documentation. * include/mach/mach.defs (memory_object_data_provided): Drop RPC. (memory_object_set_attributes): Likewise. * include/mach/memory_object.defs: Update comments. (memory_object_data_write): Drop RPC. * include/mach/memory_object_default.defs: Update comments. * include/mach_debug/vm_info.h (VOI_STATE_USE_OLD_PAGEOUT): Drop macro. * vm/memory_object.c (memory_object_data_provided): Remove function. (memory_object_data_error): Simplify. (memory_object_set_attributes_common): Make static, remove unused parameters, simplify. (memory_object_change_attributes): Update callsite. (memory_object_set_attributes): Remove function. (memory_object_ready): Update callsite. * vm/vm_debug.c (mach_vm_object_info): Adapt to the changes. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_object.h (struct vm_object): Drop flag 'use_old_pageout'. * vm/vm_pageout.c: Update comments. (vm_pageout_page): Simplify.
2016-06-17Change page cache statisticsRichard Braun
Instead of reporting statistics about unreferenced objects (the object cache), report statistics about external objects (the page cache). * vm/vm_object.c (vm_object_cached_count): Remove variable. (vm_object_cache_add): Remove object cache stats updates. (vm_object_cache_remove): Likewise. (vm_object_terminate): Update page cache stats. * vm/vm_object.h (vm_object_cached_count): Remove variable. (vm_object_cached_pages): Likewise. (vm_object_cached_pages_lock_data): Likewise. (vm_object_cached_pages_update): Remove macro. (vm_object_external_count): New extern variable. (vm_object_external_pages): Likewise. * vm/vm_resident.c (vm_object_external_count): New variable. (vm_object_external_pages): Likewise. (vm_page_insert): Remove object cache stats updates and update page cache stats. (vm_page_replace): Likewise. (vm_page_remove): Likewise. * vm/vm_user.c (vm_cache_statistics): Report page cache stats instead of object cache stats.
2016-05-16Fix pageout deadlockRichard Braun
The pageout daemon uses small, internal, temporary objects to transport the data out to memory managers, which are expected to release the data once written out to backing store. Releasing this data is done with a vm_deallocate call. The problem with this is that vm_map is allowed to merge these objects, in which case vm_deallocate will only remove a reference instead of releasing the underlying pages, causing the pageout daemon to deadlock. This change makes the pageout daemon mark these objects so that they don't get merged. * vm/vm_object.c (vm_object_bootstrap): Update template. (vm_object_coalesce): Don't coalesce if an object is used for pageout. * vm/vm_object.h (struct vm_object): New `used_for_pageout` member. * vm/vm_pageout.c (vm_pageout_page): Mark new objects for pageout.
2016-03-11Merge remote-tracking branch 'remotes/origin/rbraun/vm_cache_policy'Richard Braun
Finally ;-).
2016-02-07Fix page cache accountingRichard Braun
* vm/vm_object.c (vm_object_bootstrap): Set template object `cached' member to FALSE. (vm_object_cache_add, vm_object_cache_remove): New functions. (vm_object_collect, vm_object_deallocate, vm_object_lookup, vm_object_lookup_name, vm_object_destroy): Use new cache management functions. (vm_object_terminate, vm_object_collapse): Make sure object isn't cached. * vm/vm_object.h (struct vm_object): New `cached' member.
2016-02-02Stack the slab allocator directly on top of the physical allocatorRichard Braun
In order to increase the amount of memory available for kernel objects, without reducing the amount of memory available for user processes, a new allocation strategy is introduced in this change. Instead of allocating kernel objects out of kernel virtual memory, the slab allocator directly uses the direct mapping of physical memory as its backend. This largely increases the kernel heap, and removes the need for address translation updates. In order to allow this strategy, an assumption made by the interrupt code had to be removed. In addition, kernel stacks are now also allocated directly from the physical allocator. * i386/i386/db_trace.c: Include i386at/model_dep.h (db_i386_reg_value): Update stack check. * i386/i386/locore.S (trap_from_kernel, all_intrs, int_from_intstack): Update interrupt handling. * i386/i386at/model_dep.c: Include kern/macros.h. (int_stack, int_stack_base): New variables. (int_stack_high): Remove variable. (i386at_init): Update interrupt stack initialization. * i386/i386at/model_dep.h: Include i386/vm_param.h. (int_stack_top, int_stack_base): New extern declarations. (ON_INT_STACK): New macro. * kern/slab.c: Include vm/vm_page.h (KMEM_CF_NO_CPU_POOL, KMEM_CF_NO_RECLAIM): Remove macros. (kmem_pagealloc, kmem_pagefree, kalloc_pagealloc, kalloc_pagefree): Remove functions. (kmem_slab_create): Allocate slab pages directly from the physical allocator. (kmem_slab_destroy): Release slab pages directly to the physical allocator. (kmem_cache_compute_sizes): Update the slab size computation algorithm to return a power-of-two suitable for the physical allocator. (kmem_cache_init): Remove custom allocation function pointers. (kmem_cache_reap): Remove check on KMEM_CF_NO_RECLAIM. (slab_init, kalloc_init): Update calls to kmem_cache_init. (kalloc, kfree): Directly fall back on the physical allocator for big allocation sizes. (host_slab_info): Remove checks on defunct flags. * kern/slab.h (kmem_slab_alloc_fn_t, kmem_slab_free_fn_t): Remove types. (struct kmem_cache): Add `slab_order' member, remove `slab_alloc_fn' and `slab_free_fn' members. (KMEM_CACHE_NOCPUPOOL, KMEM_CACHE_NORECLAIM): Remove macros. (kmem_cache_init): Update prototype, remove custom allocation functions. * kern/thread.c (stack_alloc): Allocate stacks from the physical allocator. * vm/vm_map.c (vm_map_kentry_cache, kentry_data, kentry_data_size): Remove variables. (kentry_pagealloc): Remove function. (vm_map_init): Update calls to kmem_cache_init, remove initialization of vm_map_kentry_cache. (vm_map_create, _vm_map_entry_dispose, vm_map_copyout): Unconditionnally use vm_map_entry_cache. * vm/vm_map.h (kentry_data, kentry_data_size, kentry_count): Remove extern declarations. * vm/vm_page.h (VM_PT_STACK): New page type. * device/dev_lookup.c (dev_lookup_init): Update calls to kmem_cache_init. * device/dev_pager.c (dev_pager_hash_init, device_pager_init): Likewise. * device/ds_routines.c (mach_device_init, mach_device_trap_init): Likewise. * device/net_io.c (net_io_init): Likewise. * i386/i386/fpu.c (fpu_module_init): Likewise. * i386/i386/machine_task.c (machine_task_module_init): Likewise. * i386/i386/pcb.c (pcb_module_init): Likewise. * i386/intel/pmap.c (pmap_init): Likewise. * ipc/ipc_init.c (ipc_bootstrap): Likewise. * ipc/ipc_marequest.c (ipc_marequest_init): Likewise. * kern/act.c (global_act_init): Likewise. * kern/processor.c (pset_sys_init): Likewise. * kern/rdxtree.c (rdxtree_cache_init): Likewise. * kern/task.c (task_init): Likewise. * vm/memory_object_proxy.c (memory_object_proxy_init): Likewise. * vm/vm_external.c (vm_external_module_initialize): Likewise. * vm/vm_fault.c (vm_fault_init): Likewise. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_resident.c (vm_page_module_init): Likewise. (vm_page_bootstrap): Remove initialization of kentry_data.
2016-01-23Use vm_page as the physical memory allocatorRichard Braun
This change replaces the historical page allocator with a buddy allocator implemented in vm/vm_page.c. This allocator allows easy contiguous allocations and also manages memory inside segments. In a future change, these segments will be used to service requests with special constraints, such as "usable for 16-bits DMA" or "must be part of the direct physical mapping". * Makefrag.am (libkernel_a_SOURCES): Add vm/vm_page.c. * i386/Makefrag.am (libkernel_a_SOURCES): Add i386/i386at/biosmem.{c,h}. * i386/i386/vm_param.h: Include kern/macros.h. (VM_PAGE_DMA_LIMIT, VM_PAGE_MAX_SEGS, VM_PAGE_DMA32_LIMIT, VM_PAGE_DIRECTMAP_LIMIT, VM_PAGE_HIGHMEM_LIMIT, VM_PAGE_SEG_DMA, VM_PAGE_SEG_DMA32, VM_PAGE_SEG_DIRECTMAP, VM_PAGE_SEG_HIGHMEM): New macros. * i386/i386at/model_dep.c: Include i386at/biosmem.h. (avail_next, avail_remaining): Remove variables. (mem_size_init): Remove function. (i386at_init): Initialize and use the biosmem module for early physical memory management. (pmap_free_pages): Return phys_last_addr instead of avail_remaining. (init_alloc_aligned): Turn into a wrapper for biosmem_bootalloc. (pmap_grab_page): Directly call init_alloc_aligned instead of pmap_next_page. * i386/include/mach/i386/vm_types.h (phys_addr_t): New type. * kern/bootstrap.c (free_bootstrap_pages): New function. (bootstrap_create): Call free_bootstrap_pages instead of vm_page_create. * kern/cpu_number.h (CPU_L1_SIZE): New macro. * kern/slab.h: Include kern/cpu_number.h. (CPU_L1_SIZE): Remove macro, moved to kern/cpu_number.h. * kern/startup.c (setup_main): Change the value of machine_info.memory_size. * linux/dev/glue/glue.h (alloc_contig_mem, free_contig_mem): Update prototypes. * linux/dev/glue/kmem.c (linux_kmem_init): Don't use defunct page queue. * linux/dev/init/main.c (linux_init): Don't free unused memory. (alloc_contig_mem, free_contig_mem): Turn into wrappers for the vm_page allocator. * linux/pcmcia-cs/glue/ds.c (PAGE_SHIFT): Don't undefine. * vm/pmap.h (pmap_startup, pmap_next_page): Remove prototypes. * vm/vm_fault.c (vm_fault_page): Update calls to vm_page_convert. * vm/vm_init.c (vm_mem_init): Call vm_page_info_all. * vm/vm_object.c (vm_object_page_map): Update call to vm_page_init. * vm/vm_page.h (vm_page_queue_free): Remove variable declaration. (vm_page_create, vm_page_release_fictitious, vm_page_release): Remove declarations. (vm_page_convert, vm_page_init): Update prototypes. (vm_page_grab_contig, vm_page_free_contig): New prototypes. * vm/vm_resident.c (vm_page_template, vm_page_queue_free, vm_page_big_pagenum): Remove variables. (vm_page_bootstrap): Update and call vm_page_setup. (pmap_steal_memory): Update and call vm_page_bootalloc. (pmap_startup, vm_page_create, vm_page_grab_contiguous_pages): Remove functions. (vm_page_init_template, vm_page_grab_contig, vm_page_free_contig): New functions. (vm_page_init): Update and call vm_page_init_template. (vm_page_release_fictitious): Make static. (vm_page_more_fictitious): Update call to vm_page_init. (vm_page_convert): Rewrite to comply with vm_page. (vm_page_grab): Update and call vm_page_alloc_pa. (vm_page_release): Update and call vm_page_free_pa.
2016-01-01Slightly improve map debugging readabilityRichard Braun
* vm/vm_object.c (vm_object_print): Break line so all debugging output fits in a page.
2015-12-29Improve map debugging readabilityRichard Braun
* vm/vm_map.c (vm_map_print): Reduce indentation, break lines earlier. (vm_map_copy_print): Likewise. * vm/vm_object.c (vm_object_print): Likewise.
2015-11-29Nicer out of memory condition reportingSamuel Thibault
* vm/vm_object.c (_vm_object_allocate): Return 0 immediately when kmem_cache_alloc returned 0. (vm_object_allocate): Panic when _vm_object_allocate returns 0.
2015-08-18vm: collapse unreachable branch into assertionJustus Winter
* vm/vm_object.c (vm_object_collapse): Collapse unreachable branch into assertion.
2015-07-10vm: drop debugging remnantsJustus Winter
* vm/vm_object.c (vm_object_terminate): Drop debugging remnants.
2015-05-20vm: gracefully handle resource shortageJustus Winter
* vm/vm_object.c (vm_object_copy_call): Gracefully handle resource shortage by doing the allocation earlier and aborting the function if unsuccessful.
2015-01-02vm: Fix typo in comment (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2013-12-09vm/vm_object.c: remove unused variableMarin Ramesa
* vm/vm_object.c (vm_object_terminate_remove_all): Remove unused variable.
2013-11-24vm: move forward declarations into a header fileMarin Ramesa
* vm/vm_object.c (memory_object_release, vm_object_deactivate_pages, vm_object_copy_delayed): Remove forward declarations. * vm/vm_object.h (memory_object_release, vm_object_deactivate_pages, vm_object_copy_delayed): Add prototypes.
2013-11-15vm/vm_object.c: remove register qualifiersMarin Ramesa
* vm/vm_object.c: Remove register qualifiers.
2013-11-09Remove lint codeMarin Ramesa
2013-10-09VM cache policy changeRichard Braun
This patch lets the kernel unconditionnally cache non empty unreferenced objects instead of using a fixed arbitrary limit. As the pageout daemon evicts pages, it collects cached objects that have become empty. The effective result is a graceful adjustment of the number of objects related to memory management (virtual memory objects, their associated ports, and potentially objects maintained in the external memory managers). Physical memory can now be almost entirely filled up with cached pages. In addition, these cached pages are not automatically deactivated as objects can quickly be referenced again. There are problems with this patch however. The first is that, on machines with a large amount of physical memory (above 1 GiB but it also depends on usage patterns), scalability issues are exposed. For example, file systems which don't throttle their writeback requests can create thread storms, strongly reducing system responsiveness. Other issues such as linear scans of memory objects also add visible CPU overhead. The second is that, as most memory is used, it increases the chances of swapping deadlocks. Applications that map large objects and quickly cause lots of page faults can still easily bring the system to its knees.
2013-07-18vm: organize vm print function prototypesMarin Ramesa
* vm/vm_print.h: New file. Include <vm/vm_map.h>. Include <machine/db_machdep.h>. (vm_map_print): Add prototype. (vm_map_copy_print): Likewise. (vm_object_print): Likewise. (vm_page_print): Likewise. Include <vm/vm_object.h>. Include <vm/vm_page.h> * vm/vm_map.h (vm_map_print): Remove prototype. * vm/vm_map.c [MACH_KDB]: Include <vm/vm_print.h>. * vm/vm_object.h (vm_object_print): Remove prototype. * vm/vm_object.c [MACH_KDB]: Include <vm/vm_print.h>. * vm/vm_resident.c [MACH_KDB]: Include <vm/vm_print.h>.
2013-01-04Fix compilation warning implicit function declaration kdbprintfDavid Höppner
When kernel debugger support is requested ipc and vm need the prototype for the debugger function kdbprintf. * ddb/db_output.h: Add prototype for kdbprintf. * ipc/ipc_object.c: Add include file ddb/db_output.h * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise.
2012-09-23Provide basic page cache statisticsRichard Braun
* Makefrag.am (EXTRA_DIST): Add kern/gnumach.srv. (include_mach_HEADERS): Add include/mach/gnumach.defs and include/mach/vm_cache_statistics.h (nodist_libkernel_a_SOURCES): Add kern/gnumach.server.defs.c, kern/gnumach.server.h, kern/gnumach.server.c, kern/gnumach.server.msgids, kern/gnumach.server.defs. * include/mach/mach_types.h: Add #include <mach/vm_cache_statistics.h>. * kern/ipc_kobject.c (ipc_kobject_server): Declare and call gnumach_server_routine. * vm/vm_object.c (vm_object_cached_pages): New variable. (vm_object_cached_pages_lock_data): Likewise. (vm_object_deallocate): Update number of cached pages. (vm_object_lookup): Likewise. (vm_object_lookup_name): Likewise. (vm_object_destroy): Likewise. (vm_object_enter): Likewise. * vm/vm_object.h (ref_count): Declare as int. (resident_page_count): Likewise. (vm_object_cached_count): Add extern declaration. (vm_object_cached_pages): Likewise. (vm_object_cached_pages_lock_data): Likewise. (vm_object_cached_pages_update): New macro. * vm/vm_resident.c (vm_page_insert): Assert resident page count doesn't overflow, update number of cached pages as appropriate. (vm_page_replace): Likewise. (vm_page_remove): Update number of cached pages as appropriate. * vm/vm_user.c: Add #include <mach/vm_cache_statistics.h>. (vm_cache_statistics): New function. * vm/vm_user.h: Add #include <mach/mach_types.h>. (vm_cache_statistics): New declaration. * include/mach/gnumach.defs: New file.
2012-03-09Use unsigned long for addresses and sizesSamuel Thibault
TODO: remonter formats * i386/include/mach/i386/vm_types.h (vm_offset_t): Define to unsigned long. (signed32_t): Define to signed int. (unsigned32_t): Define to unsigned int. * i386/include/mach/sa/stdarg.h (__va_size): Use sizeof(unsigned long)-1 instead of 3. * include/mach/port.h (mach_port_t): Define to vm_offset_t instead of natural_t. * include/sys/types.h (size_t): Define to unsigned long instead of natural_t. * linux/src/include/asm-i386/posix_types.h (__kernel_size_t): Define to unsigned long. (__kernel_ssize_t): Define to long. * linux/src/include/linux/stddef.h (size_t): Define to unsigned long. * device/dev_pager.c (dev_pager_hash): Cast port to vm_offset_t insted of natural_t. (device_pager_data_request): Fix format. * device/ds_routines.c (ds_no_senders): Fix format. * i386/i386/io_map.c (io_map): Likewise. * i386/i386at/autoconf.c (take_dev_irq): Likewise. * i386/i386at/com.c (comattach): Likewise. * i386/i386at/lpr.c (lprattach): Likewise. * i386/i386at/model_dep.c (mem_size_init, mem_size_init, c_boot_entry): Likewise. * i386/intel/pmap.c (pmap_enter): Likewise. * ipc/ipc_notify.c (ipc_notify_port_deleted, ipc_notify_msg_accepted, ipc_notify_dead_name): Likewise. * ipc/mach_port.c (mach_port_destroy, mach_port_deallocate): Likewise. * kern/ipc_kobject.c (ipc_kobject_destroy): Likewise. * kern/slab.c (kalloc_init): Likewise. * vm/vm_fault.c (vm_fault_page): Likewise. * vm/vm_map.c (vm_map_pmap_enter): Likewise. * xen/block.c (device_read): Likewise. * device/net_io.c (bpf_match): Take unsigned long * instead of unsigned int *. (bpf_do_filter): Make mem unsigned long instead of long. * i386/i386/ktss.c (ktss_init): Cast pointer to unsigned long instead of unsigned. * i386/i386/pcb.c (stack_attach, switch_ktss): Cast pointers to long instead of int. * i386/i386/trap.c (dump_ss): Likewise. * ipc/ipc_hash.c (IH_LOCAL_HASH): Cast object to vm_offset_t. * ipc/mach_msg.c (mach_msg_receive, mach_msg_receive_continue): Cast kmsg to vm_offset_t instead of natural_t. * kern/pc_sample.c (take_pc_sample): Cast to vm_offset_t instead of natural_t. * kern/boot_script.c (sym, arg): Set type of `val' field to long instead of int. (create_task, builtin_symbols, boot_script_parse_line, boot_script_define_function): Cast to long instead of int. * kern/bootstrap.c (bootstrap_create): Likewise. * kern/sched_prim.c (decl_simple_lock_data): Likewise. * kern/printf.c (vsnprintf): Set size type to size_t. * kern/printf.h (vsnprintf): Likewise. * vm/vm_map.h (kentry_data_size): Fix type to vm_size_t. * vm/vm_object.c (vm_object_pmap_protect_by_page): Fix size parameter type to vm_size_t.
2011-12-17Adjust VM initializationRichard Braun
Unlike the zone allocator, the slab code can't be fed with an initial chunk of memory. Some VM objects used early during startup now have to be statically allocated, and kernel map entries need a special path to avoid recursion when being allocated. * vm/vm_map.c (vm_submap_object_store): New variable. (vm_submap_object): Point to vm_submap_object_store. (kentry_data_size): Initialize to arbitrary value. (kentry_count): Remove variable. (kentry_pagealloc): New function. (vm_map_setup): Likewise. (vm_map_create): Replace initialization with a call to vm_map_setup(). * vm/vm_map.h (vm_map_setup): New prototype. * vm/vm_kern.c (kernel_map_store): New variable. (kernel_map): Point to kernel_map_store. (kmem_suballoc): Remove function. Replaced with... (kmem_submap): New function. (kmem_init): Call vm_map_setup() instead of vm_map_create(). * vm/vm_kern.h (kmem_suballoc): Remove prototype. (kmem_submap): New prototype. * vm/vm_object.c (kernel_object_store): New variable. (kernel_object): Point to kernel_object_store. (vm_object_template): Change type from vm_object_t to struct vm_object. (_vm_object_setup): New function. (_vm_object_allocate): Replace initialization with a call to _vm_object_setup(). (vm_object_bootstrap): Don't allocate vm_object_template, and use it as a structure instead of a pointer. Initialize kernel_object and vm_submap_object with _vm_object_setup() instead of _vm_object_allocate(). * vm/vm_resident.c (vm_page_bootstrap): Don't initialize kentry_data_size. * device/ds_routines.c (device_io_map_store): New variable. (device_io_map): Point to device_io_map_store. (mach_device_init): Call kmem_submap() instead of kmem_suballoc(). * ipc/ipc_init.c (ipc_kernel_map_store): New variable. (ipc_kernel_map): Point to ipc_kernel_map_store.
2011-12-17Adjust the kernel to use the slab allocatorRichard Braun
* device/dev_lookup.c: Replace zalloc header, types and function calls with their slab counterparts. * device/dev_pager.c: Likewise. * device/ds_routines.c: Likewise. * device/io_req.h: Likewise. * device/net_io.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_perm.c: Likewise. * i386/i386/machine_task.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/task.h: Likewise. * i386/intel/pmap.c: Likewise. * i386/intel/pmap.h: Remove #include <kernel/zalloc.h>. * include/mach_debug/mach_debug.defs (host_zone_info): Replace routine declaration with skip directive. (host_slab_info): New routine declaration. * include/mach_debug/mach_debug_types.defs (zone_name_t) (zone_name_array_t, zone_info_t, zone_info_array_t): Remove types. (cache_info_t, cache_info_array_t): New types. * include/mach_debug/mach_debug_types.h: Replace #include <mach_debug/zone_info.h> with <mach_debug/slab_info.h>. * ipc/ipc_entry.c: Replace zalloc header, types and function calls with their slab counterparts. * ipc/ipc_entry.h: Likewise. * ipc/ipc_init.c: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_object.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/ipc_table.c (kalloc_map): Remove extern declaration. * kern/act.c: Replace zalloc header, types and function calls with their slab counterparts. * kern/kalloc.h: Add #include <vm/vm_types.h>. (MINSIZE): Remove definition. (kalloc_map): Add extern declaration. (kget): Remove prototype. * kern/mach_clock.c: Adjust comment. * kern/processor.c: Replace zalloc header, types and function calls with their slab counterparts. * kern/startup.c: Remove #include <kernel/zalloc.h>. * kern/task.c: Replace zalloc header, types and function calls with their slab counterparts. * kern/thread.c: Likewise. * vm/memory_object_proxy.c: Likewise. * vm/vm_external.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_init.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_page.h: Remove #include <kernel/zalloc.h>. * vm/vm_pageout.c: Replace zalloc header, types and function calls with their slab counterparts. * vm/vm_resident.c: Likewise. (zdata, zdata_size): Remove declarations. (vm_page_bootstrap): Don't steal memory for the zone system.
2009-12-21Add a SoftDebugger functionSamuel Thibault
* kern/debug.h (SoftDebugger): Add prototype. * kern/debug.c (Debugger): Move code invoking debugging trap to... (SoftDebugger): ... new function. Print the passed message. * kern/lock_mon.c (decl_simple_lock_data, retry_bit_lock): Call SoftDebugger instead of Debugger. * device/ds_routines.c (ds_device_open, device_read, device_read_inband): Call SoftDebugger instead of Debugger. * i386/i386at/model_dep.c (c_boot_entry): Call SoftDebugger instead of Debugger. * kern/syscall_sw.c (null_port, kern_invalid): Call SoftDebugger instead of Debugger. * vm/vm_object.c (vm_object_collapse): Call SoftDebugger instead of Debugger.
2009-10-14Update constants to nowadays standardsSamuel Thibault
kern/zalloc.c (zone_map_size): Increase to 64MiB. i386/i386at/model_dep.c (mem_size_init): Reduce cap to 1/6 of memory space to save room for zalloc area. linux/src/drivers/block/ide.h (INITIAL_MULT_COUNT): Set to 16. vm/vm_map.h (VM_MAP_COPY_PAGE_LIST_MAX): Set to 64. vm/vm_object.c (vm_object_cached_max): Set to 4000.
2009-06-182008-07-15 Barry deFreese <bddebian@comcast.net>Samuel Thibault
* device/dev_pager.c (device_pager_data_request, device_pager_data_request_done, device_pager_init_pager): Fix printf formats. * i386/i386/debug_i386.c (dump_ss): Likewise. * i386/i386/trap.c (user_trap): Likewise. * i386/i386at/com.c (comtimer): Likewise. * ipc/ipc_notify (ipc_notify_port_deleted, ipc_notify_msg_accepted, ipc_notify_port_destroyed, ipc_notify_no_senders, ipc_notify_send_once, ipc_notify_dead_name): Likewise. * kern/ipc_kobject.c (ipc_kobject_destroy): Likewise. * kern/sched_prim.c (do_runq_scan): Likewise. * linux/pcmcia-cs/clients/smc91c92_cs.c (smc_start_xmit): Likewise. * linux/src/drivers/net/sundance.c (start_tx): Likewise. * vm/vm_fault.c (vm_fault_page): Likewise. * vm/vm_map.c (vm_map_pmap_enter): Likewise. * vm/vm_object.c (vm_object_collapse): Likewise.
2009-06-182007-03-01 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
* linux/dev/glue/block.c (free_buffer): Use `VM_PAGE_FREE'. * vm/vm_object.c (vm_object_collapse, vm_object_page_remove) (vm_object_page_map): Likewise.
2009-06-182006-12-30 Richard Braun <syn@hurdfr.org>Samuel Thibault
Add alignment support in the zone allocator. * kern/zalloc.c (ALIGN_SIZE_UP): New macro. (zinit): New `align' parameter. (zget_space): Likewise. (zalloc): Updated call to zget_space() with the zone alignment. * kern/zalloc.h (zone): New member `align'. (zinit): Declaration updated as required. * device/dev_lookup.c (dev_lookup_init): Updated call to zinit() with alignment of 0. * device/dev_pager.c (dev_pager_hash_init): Likewise. (device_pager_init): Likewise. * device/ds_routines.c (ds_init): Likewise. (ds_trap_init): Likewise. * device/net_io.c (net_io_init): Likewise. * i386/i386/fpu.c (fpu_module_init): Likewise. * i386/i386/pcb.c (pcb_module_init): Likewise. * i386/intel/pmap.c (pmap_init): Likewise. * ipc/ipc_init.c (ipc_bootstrap): Likewise. * ipc/ipc_marequest.c (ipc_marequest_init): Likewise. * kern/act.c (global_act_init): Likewise. * kern/kalloc.c (kalloc_init): Likewise. * kern/processor.c (pset_sys_init): Likewise. * kern/task.c (task_init): Likewise. * kern/thread.c (thread_init): Likewise. * kern/zalloc.c (zone_bootstrap): Likewise. * vm/vm_external.c (vm_external_module_initialize): Likewise. * vm/vm_fault.c (vm_fault_init): Likewise. * vm/vm_map.c (vm_map_init): Likewise. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_resident.c (vm_page_module_init): Likewise.
2009-06-182006-11-10 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
Put "for panic()" in ChangeLog, not in source code.
2009-06-182006-11-09 Barry deFreese <bddebian@comcast.net>Samuel Thibault
[task #5726 --- ``GCC built-in functions''] * include/printf.h: Move file... * kern/printf.h: ... here. * kern/debug.h (panic_init, panic): Add prototypes. * chips/busses.c: Don't include `printf.h', include `kern/printf.h' and `kern/debug.h'. * ddb/db_command.c: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_output.c: Likewise. * device/cirbuf.c: Likewise. * device/cons.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/device_init.c: Likewise. * device/dk_label.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/debug_i386.c: Likewise. * i386/i386/fpe_linkage.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/kttd_interface.c: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/i386at_ds_routines.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * ipc/ipc_right.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/act.c: Likewise. * kern/ast.c: Likewise. * kern/bootstrap.c: Likewise. * kern/debug.c: Likewise. * kern/eventcount.c: Likewise. * kern/exception.c: Likewise. * kern/host.c: Likewise. * kern/ipc_host.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_sched.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/kalloc.c: Likewise. * kern/lock.c: Likewise. * kern/mach_clock.c: Likewise. * kern/machine.c: Likewise. * kern/pc_sample.c: Likewise. * kern/printf.c: Likewise. * kern/processor.c: Likewise. * kern/sched_prim.c: Likewise. * kern/server_loop.ch: Likewise. * kern/startup.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * kern/thread_swap.c: Likewise. * kern/xpr.c: Likewise. * kern/zalloc.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_resident.c: Likewise.
2009-06-182006-11-07 Barry deFreese <bddebian@comcast.net>Samuel Thibault
[task #5726 --- ``GCC built-in functions''] * include/printf.h: New file. (printf_init, _doprnt, printnum, sprintf, printf, indent, iprint): New declarations. * include/string.h (strchr, strcmp, strcpy, strlen, strncmp, strncpy, strrchr, strsep): New extern declarations. * kern/strings.c: Don't include `kern/strings.h', include `string.h'. (strncmp, strncpy, strlen): Fix prototypes into using size_t. * kern/strings.h: Removed file. * kern/debug.c: Include `printf.h'. (do_cnputc): New function. (panic, log): Use do_cnputc instead of cnputc. * chips/busses.c: Don't include `kern/strings.h', include `printf.h' and `string.h'. (_doprnt): Remove extern declaration. (indent): Remove extern declaration. * chips/busses.c: Likewise. * ddb/db_aout.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_sym.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/dk_label.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/db_trace.c: Likewise. * i386/i386/debug_i386.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/kttd_interface.c: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/i386at_ds_routines.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/bootstrap.c: Likewise. * kern/eventcount.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/pc_sample.c: Likewise. * kern/printf.c: Likewise. * kern/sched_prim.c: Likewise. * kern/thread.c: Likewise. * kern/zalloc.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise.
2009-06-182006-11-05 Barry deFreese <bddebian@comcast.net>Samuel Thibault
memcpy/memset cleanup. * include/string.h: New file. * include/mach/mig_support.h: Include `string.h'. [MACH_KERNEL] (bcopy): Remove extern declaration. [MACH_KERNEL] (memcpy): Remove macro. * device/cirbuf.c: Include `string.h'. (q_to_b, b_to_q): Replace bcopy() with memcpy() and bzero() with memset(), clean memcpy() and memset() invocation. * device/cons.c (cnputc): Likewise. * device/dev_pager.c (device_pager_data_request_done): Likewise. * device/ds_routines.c (device_write_get, ds_read_done): Likewise. * device/kmsg.c: Likewise. * device/net_io.c (net_filter, net_set_filter, net_getstat): Likewise. * i386/i386/fpu.c (fpu_set_state, fpu_get_state) fp_load) (fp_state_alloc): Likewise. * i386/i386/iopb.c (io_tss_init, i386_io_port_list): Likewise. * i386/i386/mp_desc.c (mp_desc_init): Likewise. * i386/i386/pcb.c (pcb_init, thread_setstatus) (thread_getstatus): Likewise. * i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys) (copy_from_phys): Likewise. * i386/i386/trap.c (v86_assist): Likewise. * i386/i386/user_ldt.c (i386_set_ldt, i386_get_ldt): Likewise. * i386/i386at/immc.c (immc_cnputc): Likewise. * i386/i386at/kd_event.c (X_kdb_enter_init, X_kdb_exit_init): Likewise. * i386/intel/pmap.c (pmap_init, pmap_page_table_page_alloc) (pmap_create): Likewise. * ipc/ipc_entry.c (ipc_entry_grow_table): Likewise. * ipc/ipc_kmsg.c (ipc_kmsg_get_from_kernel) (ipc_kmsg_put_to_kernel): Likewise. * ipc/ipc_object.c (ipc_object_alloc, ipc_object_alloc_name): Likewise. * ipc/ipc_port.c (ipc_port_dngrow): Likewise. * ipc/ipc_space.c: Likewise. * ipc/mach_debug.c (mach_port_space_info) (mach_port_space_info): Likewise. * kern/act.c (act_create): Likewise. * kern/boot_script.c: Likewise. * kern/bootstrap.c: Likewise. * kern/eventcount.c (evc_init): Likewise. * kern/host.c (host_info, host_processor_sets): Likewise. * kern/lock.c (lock_init): Likewise. * kern/lock_mon.c (lock_info_clear): Likewise. * kern/mach_clock.c (mapable_time_init): Likewise. * kern/pc_sample.c (get_sampled_pcs): Likewise. * kern/processor.c (processor_set_things): Likewise. * kern/syscall_emulation.c (task_set_emulation_vector_internal) (task_get_emulation_vector, xxx_task_get_emulation_vector): Likewise. * kern/task.c (task_threads): Likewise. * kern/xpr.c (xprbootstrap): Likewise. * kern/zalloc.c (host_zone_info): Likewise. * vm/vm_debug.c (mach_vm_object_pages): Likewise. * vm/vm_kern.c (projected_buffer_allocate, copyinmap) (copyoutmap): Likewise. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_resident.c (vm_page_grab_contiguous_pages): Likewise.
2009-06-182006-10-15 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
[task #5956 --- ``Automake'ify GNU Mach's code base''] * kern/bootstrap.c: Don't include `bootstrap_symbols.h'. * ddb/db_command.c: Don't include `cpus.h'. * ddb/db_mp.c: Likewise. * i386/i386/ast_check.c: Likewise. * i386/i386/cswitch.S: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/fpu.h: Likewise. * i386/i386/i386asm.sym: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/mp_desc.h: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/trap.c: Likewise. * i386/intel/pmap.c: Likewise. * include/mach/machine.h: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * kern/ast.c: Likewise. * kern/ast.h: Likewise. * kern/cpu_number.h: Likewise. * kern/debug.c: Likewise. * kern/eventcount.c: Likewise. * kern/host.c: Likewise. * kern/ipc_sched.c: Likewise. * kern/lock.c: Likewise. * kern/lock.h: Likewise. * kern/lock_mon.c: Likewise. * kern/mach_clock.c: Likewise. * kern/mach_factor.c: Likewise. * kern/machine.c: Likewise. * kern/priority.c: Likewise. * kern/processor.c: Likewise. * kern/processor.h: Likewise. * kern/sched.h: Likewise. * kern/sched_prim.c: Likewise. * kern/startup.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread.c: Likewise. * kern/timer.c: Likewise. * kern/timer.h: Likewise. * vm/vm_resident.c: Likewise. * kern/sched_prim.c: Don't include `fast_tas.h'. * kern/task.c: Likewise. * kern/task.h: Likewise. * kern/sched_prim.c: Don't include `hw_footprint.h'. * kern/thread.c: Likewise. * kern/thread.h: Likewise. * kern/counters.c: Don't include `mach_counters.h'. * kern/counters.h: Likewise. * ddb/db_ext_symtab.c: Don't include `mach_debug.h'. * i386/i386/pcb.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/thread.c: Likewise. * kern/zalloc.c: Likewise. * kern/ast.c: Don't include `mach_fixpri.h'. * kern/processor.c: Likewise. * kern/processor.h: Likewise. * kern/sched.h: Likewise. * kern/sched_prim.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread.c: Likewise. * kern/thread.h: Likewise. * kern/host.c: Don't include `mach_host.h'. * kern/ipc_sched.c: Likewise. * kern/machine.c: Likewise. * kern/processor.c: Likewise. * kern/processor.h: Likewise. * kern/sched_prim.c: Likewise. * kern/startup.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * kern/thread.h: Likewise. * include/mach/mach.defs: Don't include `mach_ipc_compat.h'. * include/mach/mach_param.h: Likewise. * include/mach/mach_traps.h: Likewise. * include/mach/message.h: Likewise. * include/mach/mig_errors.h: Likewise. * include/mach/notify.h: Likewise. * include/mach/port.h: Likewise. * include/mach/std_types.defs: Likewise. * include/mach/task_special_ports.h: Likewise. * include/mach/thread_special_ports.h: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_notify.h: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_object.h: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_port.h: Likewise. * ipc/ipc_right.c: Likewise. * ipc/ipc_right.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_msg.h: Likewise. * ipc/mach_port.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/syscall_sw.c: Likewise. * kern/thread.h: Likewise. * include/mach_debug/mach_debug.defs: Don't include `mach_ipc_debug.h'. * ipc/ipc_hash.c: Likewise. * ipc/ipc_hash.h: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_marequest.h: Likewise. * kern/ipc_kobject.c: Don't include `mach_ipc_test.h'. * ddb/db_access.c: Don't include `mach_kdb.h'. * ddb/db_aout.c: Likewise. * ddb/db_break.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_command.h: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_examine.c: Likewise. * ddb/db_expr.c: Likewise. * ddb/db_ext_symtab.c: Likewise. * ddb/db_input.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_mp.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_run.c: Likewise. * ddb/db_sym.c: Likewise. * ddb/db_task_thread.c: Likewise. * ddb/db_trap.c: Likewise. * ddb/db_variables.c: Likewise. * ddb/db_watch.c: Likewise. * ddb/db_watch.h: Likewise. * ddb/db_write_cmd.c: Likewise. * i386/i386/db_disasm.c: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/db_trace.c: Likewise. * i386/i386/i386asm.sym: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/model_dep.c: Likewise. * include/mach_debug/mach_debug.defs: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_pset.c: Likewise. * kern/bootstrap.c: Likewise. * kern/debug.c: Likewise. * kern/exception.c: Likewise. * kern/lock.c: Likewise. * kern/xpr.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise. * kern/lock.h: Don't include `mach_ldebug.h'. * kern/lock_mon.c: Don't include `mach_lock_mon.h'. * kern/ipc_kobject.c: Don't include `mach_machine_routines.h'. * kern/lock_mon.c: Don't include `mach_mp_debug.h'. * vm/memory_object.c: Don't include `mach_pagemap.h'. * vm/vm_fault.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise. * i386/i386/trap.c: Don't include `mach_pcsample.h'. * kern/mach4.srv: Likewise. * kern/mach_clock.c: Likewise. * kern/pc_sample.c: Likewise. * kern/task.c: Likewise. * kern/thread.c: Likewise. * vm/vm_fault.c: Likewise. * device/net_io.c: Don't include `mach_ttd.h'. * i386/i386/kttd_interface.c: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Likewise. * include/mach_debug/mach_debug.defs: Don't include `mach_vm_debug.h'. * vm/vm_debug.c: Likewise. * vm/vm_page.h: Likewise. * vm/vm_resident.c: Likewise. * kern/sched_prim.c: Don't include `power_save.h'. * kern/sched.h: Don't include `simple_clock.h'. * kern/sched_prim.c: Likewise. * kern/thread.c: Likewise. * kern/mach_clock.c: Don't include `stat_time.h'. * i386/i386/i386asm.sym: Likewise. * i386/i386/locore.S: Likewise. * kern/sched.h: Likewise. * kern/timer.c: Likewise. * kern/timer.h: Likewise. * kern/startup.c: Don't include `xpr_debug.h'. * kern/xpr.h: Likewise. * i386/i386at/autoconf.c: Don't include `com.h'. * i386/i386at/com.c: Likewise. * i386/i386at/conf.c: Likewise. * i386/i386at/cons_conf.c: Likewise. * i386/i386/fpe_linkage.c: Don't include `fpe.h'. * i386/i386/fpu.c: Likewise. * i386/i386/fpu.h: Likewise. * i386/i386/trap.c: Likewise. * i386/i386at/autoconf.c: Don't include `lpr.h'. * i386/i386at/conf.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386/cswitch.S: Don't include `platforms.h'. * i386/i386/fpu.c: Likewise. * i386/i386/gdt.c: Likewise. * i386/i386/hardclock.c: Likewise. * i386/i386/i386asm.sym: Likewise. * i386/i386/io_emulate.c: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/pic.c: Likewise. * i386/i386/pic.h: Likewise. * i386/i386/pit.c: Likewise. * i386/i386/pit.h: Likewise. * i386/i386/seg.h: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386at/com.c: Don't include `rc.h' * i386/i386at/cons_conf.c: Likewise. * i386/i386at/pic_isa.c: Likewise. * device/ds_routines.c: Don't include <i386/linux/device-drivers.h>. * i386/i386at/i386at_ds_routines.c: Likewise. * i386/linux/dev/include/linux/autoconf.h: Likewise. * linux/dev/arch/i386/kernel/setup.c: Likewise. * linux/dev/init/main.c: Likewise. * linux/pcmcia-cs/glue/pcmcia_glue.h: Likewise. * linux/pcmcia-cs/glue/wireless_glue.h: Likewise. * kern/lock_mon.c: Don't include <time_stamp.h>. * device/cons.c: Include <device/cons.h> instead of <cons.h>. * i386/i386at/com.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/cons_conf.c: Likewise. * i386/i386at/i386at_ds_routines.c: Include <device/device.server.h> instead of "device_interface.h". * device/chario.c: Include <device/device_reply.user.h> instead of "device_reply.h". * device/ds_routines.c: Likewise. * linux/dev/glue/block.c: Likewise. * linux/dev/glue/net.c: Likewise. * linux/pcmcia-cs/glue/ds.c: Likewise. * device/cons.c: Include <device/kmsg.h> instead of <kmsg.h>. * device/kmsg.c: Likewise. * i386/i386/cswitch.S: Include <i386/cpu_number.h> instead of "cpu_number.h". * i386/i386/locore.S: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * i386/i386/i386asm.sym: Include <i386/gdt.h> instead of "gdt.h". * i386/i386/idt.c: Likewise. * i386/i386at/int_init.c: Likewise. * i386/i386/cswitch.S: Include <i386/i386asm.h> instead of "i386asm.h". * i386/i386/locore.S: Likewise. * i386/i386at/boothdr.S: Likewise. * i386/i386at/interrupt.S: Likewise. * i386/i386at/idt.h: Include <i386/idt-gen.h> instead of "idt-gen.h". * i386/i386at/interrupt.S: Include <i386/ipl.h> instead of "ipl.h". * i386/i386/i386asm.sym: Include <i386/ldt.h> instead of "ldt.h". * i386/i386/locore.S: Likewise. * i386/i386/i386asm.sym: Include <i386/mp_desc.h> instead of "mp_desc.h". * i386/i386at/interrupt.S: Include <i386/pic.h> instead of "pic.h". * i386/i386/cswitch.S: Include <i386/proc_reg.h> instead of "proc_reg.h". * i386/i386/locore.S: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386/i386asm.sym: Include <i386/seg.h> instead of "seg.h". * i386/i386/idt.c: Likewise. * i386/i386/locore.S: Likewise. * i386/i386/locore.S: Include <i386/trap.h> instead of "trap.h". * i386/i386/i386asm.sym: Include <i386/tss.h> instead of "tss.h". * i386/i386/i386asm.sym: Include <i386/vm_param.h> instead of "vm_param.h". * i386/i386/idt.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/intel/pmap.c: Likewise. * i386/i386/i386asm.sym: Include <i386at/idt.h> instead of "idt.h". * i386/i386/idt.c: Likewise. * i386/i386at/int_init.c: Likewise. * ipc/ipc_target.c: Include <kern/sched_prim.h> instead of "sched_prim.h". * vm/memory_object.c: Include <vm/memory_object_default.user.h> instead of "memory_object_default.h". * vm/vm_object.c: Likewise. * vm/vm_pageout.c: Likewise. * vm/memory_object.c: Include <vm/memory_object_user.user.h> instead of "memory_object_user.h". * vm/vm_fault.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_pageout.c: Likewise.
2009-06-182006-03-20 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
* DEVELOPMENT: Document the NORMA removal. 2006-03-20 Leonardo Lopes Pereira <leonardolopespereira@gmail.com> Remove unused and unsupported code. Consult the file `DEVELOPMENT' for details. [patch #4982] * bogus/norma_device.h: Remove file. * bogus/norma_ether.h: Likewise. * bogus/norma_ipc.h: Likewise. * bogus/norma_task.h: Likewise. * bogus/norma_vm.h: Likewise. * include/mach/mach_norma.defs: Likewise. * include/mach/norma_task.defs: Likewise. * include/mach/norma_special_ports.h: Likewise. * Makefile.in (bogus-files): Remove `norma_device.h', `norma_ether.h', `norma_ipc.h', `norma_task.h' and `norma_vm.h'. (mach-headers): Remove `mach_norma.defs', `norma_task.defs' and `norma_special_ports.h'. * device/ds_routines.c: Don't include <norma_device.h> anymore and adopt all users of NORMA_DEVICE as if it were always defined to `0'. * device/net_io.c: Likewise for <norma_ether.h>, NORMA_ETHER. * kern/machine.c: Likewise. * ddb/db_command.c: Likevise for <norma_ipc.h>, NORMA_IPC. * ipc/ipc_init.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_kmsg.h: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_port.h: Likewise. * ipc/ipc_space.c: Likewise. * ipc/ipc_space.h: Likewise. * ipc/mach_msg.c: Likewise. * kern/ast.c: Likewise. * kern/debug.c: Likewise. * kern/exception.c: Likewise. * kern/startup.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_map.c: Likewise. * kern/ipc_kobject.c: Likewise for <norma_task.h>, NORMA_TASK. * kern/task.c: Likewise. * kern/task.h: Likewise. * ddb/db_command.c: Likewise for <norma_vm.h>, NORMA_VM. * device/dev_pager.c: Likewise. * include/mach/mach_types.defs: Likewise. * include/mach/mach_types.h: Likewise. * include/mach/memory_object_default.defs: Likewise. * include/mach/memory_object.defs: Likewise. * ipc/ipc_kmsg.c: Likewise. * kern/ipc_kobject.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/startup.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_object.h: Likewise. * vm/vm_pageout.c: Likewise.
2009-06-182006-01-31 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
Cleanup of GNU Mach's build system. The system dependend parts are now handeled by the respective Makefile and no longer by the top-level one. * configure, i386/configure, i386/linux/configure, linux/configure: Regenerated. * Makefile.in: Various cleanups. (mach/machine, mach_machine): Targets removed. (AWK, CC, CFLAGS, CPPFLAGS, DEFINES, INCLUDES, INSTALL, INSTALL_DATA) (INSTALL_PROGRAM, LD, MIG, MIGFLAGS, NM): Variables moved into Makerules.in. Do not include $(sysdep)/Makefrag anymore. (all, check, clean, distclean, mostlyclean, maintainer-clean, install) (install-headers, install-kernel): Recurse into the system dependend subdirectory. (check): Add a basic test using mbchk. (clean, distclean): Be more explicit in what to delete. ($(systype)/%): New target. (kernel.o): Incorporate the system dependend archive. (installed-sysdep-headers-names, $(installed-sysdep-headers-names)): Variable and target moved into the system dependend Makefile.in. (install-headers, mkheaderdirs): Don't care for the system dependend header files. (%.symc, %.symc.o, %.h, %_user.c, %_interface.h, %_server.c): Targets moved into Makerules.in. Inclusion of dependency files: Likewise. (%.migs_d, %.migu_d, %.migsh_d, %.miguh_d, make-deps, %.d): Likewise. Include Makerules. * Makerules.in: New file, mainly based on Makefile.in. * configure.in: Do not substitute cross_compiling and not explicitly substitute LDFLAGS. Check for cpp, ranlib, ar and mbchk. Care for the mach/machine symbolic link. Add Makerules as a config file. * i386/Makefile.in: Various cleanups. Merge i386/Makefrag and the system dependent stuff from Makefile.in into this file. (all, check, install, install-headers, install-kernel): Recurse into the system dependend subdirectory. (sysdep.o): transformed to the new target sysdep.a. (linux/linux.o): Target removed. (clean, distclean): Be more explicit in what to delete. (linux/%): New target. (install-headers): Install the system dependend header files. (mkheaderdirs): New target. Include the top-level Makerules. * i386/Makefrag: File removed. * i386/Makerules.in: New file. * i386/configure.in: Synchronize AC_INIT to the top-level definition. Do not check for ld and make. Add Makerules as a config file. * i386/linux/Makefile.in: Various cleanups. Replace linux-objs with objfiles. (check, install, install-headers, install-kernel): New empty targets. Don't care about linux-flags if no_deps is true. Inclusion of dependency files removed and instead... Include the top-level Makerules. * i386/linux/Makerules.in: New file. * i386/linux/configure.ac: Synchronize AC_INIT to the top-level definition. Do not check for gcc and ld. Do not explicitly substitute LDFLAGS. Add Makerules as a config file. * linux/configure.in: Synchronize AC_INIT to the top-level definition. Do not create directories using a dummy file. * linux/dummy.in: File removed. * ddb/db_access.h: Include <machine/vm_param.h> instead of "vm_param.h". * kern/bootstrap.c: Likewise. * kern/thread.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise.
1997-03-24prerelease workThomas Bushnell
1997-02-25Initial sourceThomas Bushnell