Age | Commit message (Collapse) | Author |
|
* i386/i386/ast_check.c (init_ast_check, cause_ast_check): Define return type.
* i386/i386/pic.c (intnull, prtnull): Define argument types.
* i386/i386at/com.c (compr_addr): Likewise.
(compr): Likewise.
(compr_addr): Fix printf format.
* i386/i386at/kd.c (kd_cmdreg_write, kd_kbd_magic): Define argument types.
* i386/i386at/kd_mouse.c (init_mouse_hw): Likewise.
* ipc/mach_port.c (sact_count): Define return type.
* ipc/mach_rpc.c (mach_port_rpc_sig): Define argument types.
* kern/act.c (dump_act): Define return type.
* kern/lock_mon.c (simple_lock, simple_lock_try, simple_unlock, lip, lock_info_sort, lock_info_clear, print_lock_info): Define return type.
(time_lock): Define return type and argument type.
* kern/timer.c (time_trap_uexit): Define argument type.
|
|
|
|
Member ip_kobject is of type vm_offset_t.
* ipc/mach_debug.c (mach_port_kernel_object) (ip_kobject): Remove unnecessary cast.
|
|
Return value from ip_kotype is an unsigned int.
* ipc/mach_debug.c (mach_port_kernel_object) (ip_kotype): Remove unnecessary cast.
|
|
Addresses were cast to (void *). Pointers uncasted.
* device/ds_routines.c (ds_read_done) (memset) (start_sent): Cast to (void *) instead to (char *). Argument is an address.
(ds_read_done) (memset) (end_data): Likewise.
* i386/i386/pcb.c (thread_getstatus) (memcpy) (pm): Don't cast. Argument is a pointer.
(thread_getstatus) (memcpy) (iopb): Likewise.
* i386/i386at/immc.c (immc_cnputc) (memmove): Cast first argument to (void *). Argument is an address.
(immc_cnputc) (memmove): Cast second argument to (void *). Argument is an address.
(immc_cnputc) (memset): Cast first argument to (void *). Argument is an address.
* i386/i386at/model_dep.c (i386at_init) (memcpy) (phystokv): Cast to (void *) instead to (char *). Argument is an address.
* i386/intel/pmap.c (pmap_init) (memset) (addr): Likewise.
* ipc/mach_debug.c (mach_port_space_info) (memset) (table_addr + size_used): Likewise.
(mach_port_space_info) (memset) (tree_addr + size_used): Likewise.
* kern/host.c (host_processor_sets) (memcpy) (newaddr): Likewise.
(host_processor_sets) (memcpy) (addr): Likewise.
* kern/xpr.c (xprbootstrap) (memset) (addr): Likewise.
* vm/vm_debug.c (mach_vm_object_pages) (memset) (addr + size_used): Likewise.
|
|
This is ipc/port.h. Not ipc/ipc_port.h.
* ipc/port.h: Update comment.
|
|
* ipc/mach_port.c (mach_port_deallocate_debug): Use boolean instead of an int.
|
|
* ipc/ipc_init.c (ipc_kernel_map_size): Qualify constant with const.
|
|
* ipc/ipc_port.c (indent): Trivial stylistic fix for consistency.
|
|
* device/cons.c [MACH_KMSG]: Likewise.
[CONSBUFSIZE > 0]: Likewise.
* i386/i386/trap.c [MACH_KDB]: Likewise.
[MACH_PV_PAGETABLES]: Likewise.
* i386/i386at/kd.c [ENABLE_IMMEDIATE_CONSOLE]: Likewise.
* ipc/ipc_kmsg_queue.h [_IPC_KMSG_QUEUE_H_]: Likewise.
* kern/act.c [ACTWATCH]: Likewise.
* kern/refcount.h [MACHINE_REFCOUNT]: Likewise.
* kern/task.c [FAST_TAS]: Likewise.
|
|
* ipc/mach_port.c (mach_port_get_receive_status): Remove forward declaration.
* ipc/mach_port.h (mach_port_get_receive_status): Add prototype.
|
|
* ipc/ipc_entry.c (db_ipc_object_by_name): Remove forward declaration.
* ipc/ipc_entry.h (db_ipc_object_by_name): Add prototype.
|
|
Struct ipc_kmsg_queue is not defined in kern/thread.h.
* ipc/ipc_kmsg.h: Update comment.
|
|
* ipc/ipc_mqueue.h: Include ipc/ipc_kmsg_queue.h.
* kern/ipc_kobject.h: Move includes into ifndef.
* kern/syscall_emulation.h: Include kern/task.h.
(eml_init, eml_task_reference, eml_task_deallocate): Add prototypes.
* kern/task.c: Include kern/syscall_emulation.h.
(eml_init, eml_task_reference, eml_task_deallocate): Remove forward declarations
|
|
* ipc/mach_msg.c: Include kern/exception.h.
(exception_raise_continue, exception_raise_continue_fast): Remove forward declarations.
* kern/exception.h: Include ipc/ipc_types.h.
Include ipc/ipc_kmsg.h.
|
|
* ipc/ipc_table.c (ipc_table_fill): Remove forward declaration.
* ipc/ipc_table.h (ipc_table_fill): Add prototype.
|
|
* ipc/ipc_kmsg.c (copyinmap, copyoutmap, ipc_msg_print): Remove forward declarations.
* ipc/ipc_kmsg.h (ipc_msg_print): Add prototype.
|
|
* ipc/mach_port.h (mach_port_destroy): Add prototype.
|
|
* ipc/ipc_print.h: Include ipc/ipc_pset.h for ipc_pset_t.
|
|
* ddb/db_write_cmd.h: Add copyright.
* ipc/ipc_print.h: Likewise.
* vm/vm_print.h: Likewise.
|
|
Finish up with the addition of ifndefs.
* device/buf.h: Add ifndef.
* device/dev_master.h: Likewise.
* include/device/tty_status.h: Likewise.
* include/mach/version.h: Likewise.
* ipc/ipc_machdep.h: Likewise.
|
|
* ipc/ipc_thread.h: Remove register qualifiers.
|
|
* ipc/mach_msg.c: Remove register qualifiers.
|
|
* ipc/ipc_table.c: Qualify constants with const.
|
|
* ipc/ipc_pset.c: Trivial stylistic fix for consistency.
|
|
* ipc/ipc_kmsg.c: Remove register qualifiers.
|
|
* ipc/ipc_print.h: New file.
[MACH_KDB] Include <mach/mach_types.h>.
[MACH_KDB] Include <mach/message.h>.
[MACH_KDB] Include <ipc/ipc_types.h>.
(ipc_port_print): Add prototype.
(ipc_pset_print): Likewise.
(ipc_kmsg_print): Likewise.
(ipc_msg_print): Likewise.
* ipc/ipc_port.h (ipc_port_print): Remove prototype.
* ipc/ipc_port.c [MACH_KDB]: Include <ipc/ipc_print.h>.
* ipc/ipc_pset.h (ipc_pset_print): Remove prototype.
* ipc/ipc_pset.c [MACH_KDB]: Include <ipc/ipc_print.h>.
* ipc/ipc_kmsg.c [MACH_KDB]: Include <ipc/ipc_print.h>.
|
|
* ipc/mach_port.c (mach_port_set_syscall_right): Remove unused variable.
|
|
* ipc/ipc_mqueue.c (ipc_mqueue_send, ipc_mqueue_receive): Increment
counters for message sent and received.
* kern/ipc_kobject.c (ipc_kobject_server): Increment sent and received
counters for the kernel task.
* kern/task.c (task_create): Zero statistics.
* kern/task.c (task_info): Add task_events_info call.
* kern/task.h: Add statistics.
* vm/vm_fault.c (vm_fault_page): Increment zero_fills, pageins,
reactivations and cow_faults counters.
* vm/vm_fault.c (vm_fault_wire_fast): Increment faults counters.
* vm/vm_pageout.c (vm_pageout_scan): Increment reactivations counter.
|
|
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.
|
|
* ipc/ipc_thread.h (ipc_thread_enqueue_macro): Insert thread at the
head of the list instead of the tail.
|
|
* ipc/ipc_table.c: Add #include <kern/slab.h>.
(ipc_table_alloc): Use kmem_map instead of kalloc_map when allocating
a table.
(ipc_table_realloc): Likewise for reallocation.
(ipc_table_free): Likewise for release.
* kern/kalloc.h (kalloc_map): Remove declaration.
* kern/slab.c (KMEM_MAP_SIZE): Increase to 128 MiB.
(KALLOC_MAP_SIZE): Remove macro.
(kalloc_map_store): Remove variable.
(kalloc_map): Likewise.
(kalloc_pagealloc): Use kmem_map instead of kalloc_map for general
purpose allocations.
(kalloc_pagefree): Likewise.
(kalloc_init): Remove the creation of kalloc_map.
|
|
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.
|
|
Use macros instead of raw numeric values.
* ipc/ipc_hash.h (IPC_HASH_GLOBAL_SIZE): New macro.
* ipc/ipc_hash.c (ipc_hash_init): Directly set the global hash table
size to IPC_HASH_GLOBAL_SIZE.
* ipc/ipc_marequest.h (IPC_MAREQUEST_SIZE): New macro.
* ipc/ipc_marequest.c (ipc_marequest_init): Directly set the marequest
hash table size to IPC_MAREQUEST_SIZE.
|
|
The zone allocator could limit the size of its zones to an arbitrary
value set at zinit() time. There is no such parameter with the slab
module. As a result of removing those limits, the kern/mach_param.h
header becomes empty, and is simply removed altogether.
* Makefrag.am (libkernel_a_SOURCES): Remove kern/mach_param.h.
* i386/i386/fpu.c: Remove #include <kern/mach_param.h>.
* i386/i386/machine_task.c: Likewise.
* i386/i386/pcb.c: Likewise.
* ipc/ipc_init.c: Likewise.
(ipc_space_max): Remove variable.
(ipc_tree_entry_max): Likewise.
(ipc_port_max): Likewise.
(ipc_pset_max): Likewise.
* ipc/ipc_init.h (IPC_ZONE_TYPE): Remove macro.
(ipc_space_max): Remove extern declaration.
(ipc_tree_entry_max): Likewise.
(ipc_port_max): Likewise.
(ipc_pset_max): Likewise.
* ipc/ipc_hash.c (ipc_hash_init): Don't use ipc_tree_entry_max to
compute ipc_hash_global_size.
* ipc/ipc_marequest.c: Remove #include <kern/mach_param.h>.
(ipc_marequest_max): Remove variable.
(ipc_marequest_init): Don't use ipc_marequest_max to compute
ipc_marequest_size.
(ipc_marequest_info): Return (unsigned int)-1 in maxp.
* kern/act.c: Remove #include <kern/mach_param.h>.
* kern/mach_clock.c: Likewise.
* kern/priority.c: Likewise.
* kern/task.c: Likewise.
* kern/thread.c: Likewise.
* vm/memory_object_proxy.c: Likewise.
* vm/vm_fault.c: Likewise.
|
|
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.
|
|
* 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.
|
|
* ipc/ipc_kmsg.c (ipc_kmsg_copyin_body): Change length type to
unsigned64_t. Cast number to unsigned64_t.
(ipc_kmsg_copyout_body): Likewise.
|
|
Users of ipc_space_create() actually assume that it succeeds.
* ipc/ipc_init.c (ipc_bootstrap): Create ipc_space_zone without EXHAUSTIBLE
flag.
|
|
These are harmless (the target is stopped) and difficult to fix anyway.
* ipc/mach_port.c (mach_port_destroy): Do not warn about spurious port
deallocation when SPACE is not equal to current_space().
(mach_port_deallocate): Likewise.
|
|
* ipc/mach_port.c (mach_port_destroy): Print the current space and the
target space on spurious deallocation.
(mach_port_deallocate): Likewise.
|
|
Follow-up to fa6c711d
* ipc/ipc_init.c (ipc_kernel_map_size): Increase to 8MiB.
|
|
* ipc/ipc_entry.c (ipc_entry_get): Do not warn when ipc_entry_get returns
KERN_NO_SPACE.
|
|
* ipc/ipc_entry.c (ipc_entry_get, ipc_entry_grow_table): Warn when returning
KERN_NO_SPACE.
* vm/vm_map.c (vm_map_find_entry, vm_map_enter, vm_map_copyout,
vm_map_copyout_page_list): Warn when returning KERN_NO_SPACE.
|
|
* kern/printf.h (printf_once): New macro.
* ipc/mach_port.c (mach_port_names, mach_port_get_set_status): Warn when
returning KERN_RESOURCE_SHORTAGE.
* vm/vm_kern.c: Include printf.h.
(kmem_alloc, kmem_realloc, kmem_alloc_wired, kmem_alloc_aligned,
kmem_alloc_pageable): Warn when failing.
* vm/vm_resident.c (vm_page_grab_contiguous_pages): Warn when returning
KERN_RESOURCE_SHORTAGE.
|
|
* ipc/mach_port.c (mach_port_destroy): Warn (and possibly call debugger) when
ipc_right_lookup_write didn't find the port name.
|
|
* ipc/mach_port.c (debug_mach_port_deallocate): Rename to...
(mach_port_deallocate_debug): ... new name, and set volatile
to permit live changes from ddb.
|
|
* ipc/mach_port.c (debug_mach_port_deallocation): New variable,
set to 0.
(mach_port_deallocate): Only call SoftDebugger if
debug_mach_port_deallocation is not 0.
|
|
* ipc/mach_port.c (mach_port_deallocate): Call SoftDebugger if
ipc_right_lookup_write was not succcessful and `name' is not
MACH_PORT_NULL or MACH_PORT_DEAD.
|
|
* ipc/mach_port.c (mach_port_insert_right): Cast poly into
(ipc_object_t) to fix compiler warning when calling
ipc_object_copyout_name.
|