aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* vm: organize vm print function prototypesMarin Ramesa2013-07-186-5/+25
| | | | | | | | | | | | | | | | | * 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>.
* ddb: cleanup db_command.cMarin Ramesa2013-07-182-13/+7
| | | | | | | | | | | | | | | | | * ddb/db_command.c (_longjmp): Remove prototype. (vm_map_print): Likewise. (vm_object_print): Likewise. (vm_page_print): Likewise. (vm_map_copy_print): Likewise. (ipc_port_print): Likewise. (ipc_pset_print): Likewise. (db_show_all_slocks): Likewise. (ipc_kmsg_print): Likewise. (ipc_msg_print): Likewise. Include <vm/vm_print.h>. Include <ipc/ipc_print.h>. Include <kern/lock.h>. * i386/i386/setjmp.h [__GNUC__] (_longjmp): Add prototype.
* fix implicit declarationsMarin Ramesa2013-07-072-0/+3
| | | | | * ddb/db_trap.c: Include <machine/setjmp.h>. * i386/i386/setjmp.h (_setjmp): Add prototype.
* Restore db_help_cmdSamuel Thibault2013-07-071-0/+13
| | | | * ddb/db_command.c (db_help_cmd): Restore function.
* ddb: cleanup db_command.cMarin Ramesa2013-07-069-30/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ddb/db_write_cmd.h: New file. (db_write_cmd): Add prototype. Include <mach/boolean.h>. Include <machine/db_machdep.h>. * ddb/db_break.h (db_listbreak_cmd): Add prototype. (db_delete_cmd): Likewise. (db_breakpoint_cmd): Likewise. * ddb/db_watch.h (db_listwatch_cmd): Likewise. (db_deletewatch_cmd): Likewise. (db_watchpoint_cmd): Likewise. * ddb/db_print.h (db_show_one_thread): Likewise. (db_show_all_threads): Likewise. * ddb/db_examine.h (db_print_cmd): Likewise. (db_examine_forward): Likewise. (db_examine_backward): Likewise. (db_search_cmd): Likewise. * ddb/db_variables.h (db_set_cmd): Likewise. * ddb/db_run.h (db_trace_until_call_cmd): Likewise. (db_trace_until_matching_cmd): Likewise. (db_continue_cmd): Likewise. * ddb/db_command.h (db_fncall): Likewise. * ddb/db_command.c: Include <ddb/db_break.h>. Include <ddb/db_watch.h>. Include <ddb/db_variables.h>. Include <ddb/db_write_cmd.h>. Include <ddb/db_run.h>. Include <ddb/db_cond.h>. (db_listbreak_cmd): Remove prototype. (db_listwatch_cmd): Likewise. (db_show_one_thread): Likewise. (db_show_all_threads): Likewise. (db_show_macro): Likewise. (db_show_help): Likewise. (db_print_cmd): Likewise. (db_examine_cmd): Likewise. (db_set_cmd): Likewise. (db_examine_forward): Likewise. (db_examine_backward): Likewise. (db_search_cmd): Likewise. (db_write_cmd): Likewise. (db_delete_cmd): Likewise. (db_breakpoint_cmd): Likewise. (db_deletewatch_cmd): Likewise. (db_watchpoint_cmd): Likewise. (db_single_step_cmd): Likewise. (db_trace_until_call_cmd): Likewise. (db_trace_until_matching_cmd): Likewise. (db_continue_cmd): Likewise. (db_cond_cmd): Likewise. (db_help_cmd): Likewise. (db_def_macro_cmd): Likewise. (db_del_macro_cmd): Likewise. (db_fncall): Likewise.
* ddb: use and cleanup db_print.hMarin Ramesa2013-07-053-73/+3
| | | | | | | | | | | | | | | | | | | | | * ddb/db_command.c: Include db_print.h. Remove extern db_show_regs(). Remove extern db_show_one_task(). Remove extern db_show_port_id(). * ddb/db_print.c: Include db_print.h * ddb/db_print.h (db_show_all_acts): Remove prototype. (db_show_one_act): Likewise. (db_show_shuttle): Likewise. (db_show_one_task_vm): Likewise. (db_show_all_task_vm): Likewise. (db_show_one_space): Likewise. (db_show_all_spaces): Likewise. (db_sys): Likewise. (db_port_kmsg_count): Likewise. (db_show_one_simple_lock): Likewise. (db_show_one_mutex): Likewise. (db_show_subsystem): Likewise. (db_show_runq): Likewise.
* ddb: fix implicit declarationsMarin Ramesa2013-07-045-0/+10
| | | | | | | | * ddb/db_break.c: Include ddb/db_access.h. * ddb/db_examine.h (db_xcdump): Add prototype. * ddb/db_ext_symtab.c: Include vm/vm_user.h. * ddb/db_input.c: Include device/cons.h. * ddb/db_output.c: Likewise.
* (slab_info): fix format warningsMarin Ramesa2013-06-291-1/+1
| | | | * kern/slab.c (slab_info): Fix format for vm_size_t.
* Add device_pager_setup prototypeMarin Ramesa2013-06-291-0/+7
| | | | * device/ds_routines.h (device_pager_setup): Add prototype.
* Add [nh]to[hn][ls] prototypesMarin Ramesa2013-06-291-0/+5
| | | | * device/net_io.h (ntohl, htonl, ntohs, htons): Add prototypes.
* Fix int/long discrepancySamuel Thibault2013-06-291-7/+7
| | | | | | | * device/net_io.c (bpf_match): Make the `keys' parameter a pointer to unsigned int instead of unsigned long. (bpf_do_filter): Make `A', `B' and `mem' unsigned ints instead of unsigned longs. Also turn long casts into int casts.
* Add partitioning reload support to ahciSamuel Thibault2013-06-241-2/+33
| | | | | | | * linux/dev/drivers/block/ahci.c (port): Add `gd' field. (ahci_ioctl): New function. (ahci_fops): Fill `ioctl' field with `ahci_ioctl'. (ahci_probe_pci): Fill `gd' field with `gd'.
* Fix printing ahci PCI dev and funSamuel Thibault2013-06-241-2/+3
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Compute `dev' and `fun' earlier so they can be printed.
* Add missing 4KiB memorySamuel Thibault2013-06-101-1/+1
| | | | | * i386/i386at/model_dep.c (init_alloc_aligned): Let allocated area last until end of memory map.
* Add non-contiguous mmap supportSamuel Thibault2013-06-102-10/+99
| | | | | | | * i386/include/mach/i386/multiboot.h (multiboot_mmap): New structure * i386/i386at/model_dep.c (mem_size_init): Parse boot_info.mmap_addr if available. (init_alloc_aligned): Likewise.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault2013-06-091-4/+10
|\
| * Fix object construction in the slab allocatorRichard Braun2013-06-091-4/+10
| | | | | | | | | | | | | | | | There is currently no actual use of constructors, which is why this bug has been long overlooked. * kern/slab.c (kmem_cpu_pool_fill): Call constructor on buffers unless verification is enabled for the cache, or the constructor is NULL.
* | Do not skip AHCI controller without HOST_CAP_ONLYSamuel Thibault2013-06-091-4/+0
| | | | | | | | | | | | | | | | We rather rely on the announced PCI type to determine whether to use IDE or AHCI. * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Do not skip AHCI controller without HOST_CAP_ONLY.
* | Add timeout to ahci IDENTIFYSamuel Thibault2013-06-091-1/+15
| | | | | | | | | | | | * linux/dev/drivers/block/ahci.c (identify_timeout): New function. (identify_timer): New variable. (ahci_probe_port): Add timer to abandon identify command.
* | Fix printf formatSamuel Thibault2013-06-091-3/+3
| | | | | | | | | | | | * linux/dev/drivers/block/ahci.c (ahci_do_request): Cast capacity into unsigned long and use %lu format. (ahci_probe_port): Cast size into unsigned and use %u format.
* | Fix formatSamuel Thibault2013-06-091-3/+3
|/
* Comment unused variableMarin Ramesa2013-06-041-3/+4
| | | | * kern/ipc_mig.c (syscall_device_write_request): Comment unused variable.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault2013-06-041-0/+1
|\
| * Fix yet another locking error in the slab allocatorRichard Braun2013-06-021-0/+1
| | | | | | | | | | * kern/slab.c (kmem_cache_free): Relock cache before retrying releasing an object to the CPU pool layer.
* | Fix format warningsMiguel Figueiredo2013-06-043-7/+7
| | | | | | | | | | | | * vm/vm_resident.c (pmap_startup): Fix printf format. * xen/block.c (hyp_block_init, device_write): Likewise. * xen/net.c (hyp_net_init): Likewise.
* | Remove unused variableMiguel Figueiredo2013-06-021-1/+0
|/ | | | * kern/act.c (act_create): Remove unused variable.
* Remove unused variableMiguel Figueiredo2013-06-021-1/+0
| | | | * ipc/mach_port.c (mach_port_set_syscall_right): Remove unused variable.
* Add LBA48 support to AHCI driverSamuel Thibault2013-05-302-12/+41
| | | | | | | | | | | | * linux/dev/drivers/block/ahci.c (port): Extend `capacity' field type to unsigned long long. Add `lba48' field. Make `identify' field unsigned. (ahci_do_port_request): When `lba48' is true, use WIN_READDMA_EXT and WIN_WRITEDMA_EXT commands. (ahci_probe_port): Test lba48 flag, read capacity and set `lba48' accordingly. Display size in GiB above 10GiB. * linux/src/include/linux/hdreg.h (WIN_READDMA_EXT, WIN_WRITEDMA_EXT): New macros (hd_driveid): Add `command_set_2' and lba_capacity_2' fields.
* Remove old elevator algorithm functionMiguel Figueiredo2013-05-271-129/+0
| | | | * device/blkio.c (disksort): remove unused function
* Remove unneeded variable initializationMiguel Figueiredo2013-05-191-1/+1
| | | | | * kern/thread.c (thread_force_terminate): Remove unneeded variable initialization.
* Remove duplicate lineSamuel Thibault2013-05-191-1/+0
| | | | | | | Reported by Miguel Figueiredo * kern/thread.c (thread_create): Remove duplicate reset of new_thread->pc_sample.buffer to 0.
* Reduce fragmentation in the slab allocatorRichard Braun2013-05-161-2/+5
| | | | | | | | | | This reverts a change brought when reworking slab lists handling that made the allocator store slabs in LIFO order, whatever their reference count. While it's fine for free slabs, it actually increased fragmentation for partial slabs. * kern/slab.c (kmem_cache_alloc_from_slab): Insert slabs that become partial at the end of the partial slabs list.
* Rename list_insert to list_insert_headRichard Braun2013-05-162-5/+5
| | | | | | | | This change increases clarity. * kern/list.h (list_insert): Rename to ... (list_insert_head): ... this. * kern/slab.c: Update calls to list_insert.
* Fix itemization errors in the texinfo documentationRichard Braun2013-05-151-2/+2
| | | | | * doc/mach.texi: Replace @itemx with @item for --enable-tulip and --enable-epic100.
* Drop unused variablesMiguel Figueiredo2013-05-131-1/+0
| | | | * kern/slab.c (kalloc_init): Remove unused variables.
* Add missing parameters to printfSamuel Thibault2013-05-111-1/+1
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing parameters to printf.
* Fix ahci.h pathSamuel Thibault2013-05-101-1/+1
| | | | * linux/Makefrag.am (liblinux_a_SOURCES): Fix path to ahci.h
* Add AHCI driverSamuel Thibault2013-05-107-0/+1136
| | | | | | | | | | | | | * linux/dev/glue/kmem.c (vmtophys): New function. * linux/dev/include/linux/mm.h (vmtophys): New prototype. * linux/src/include/linux/pci.h (PCI_CLASS_STORAGE_SATA, PCI_CLASS_STORAGE_SATA_AHCI): New macros. * linux/dev/drivers/block/ahci.c: New file. * linux/dev/include/ahci.h: New file. * linux/Makefrag.am (liblinux_a_SOURCES): Add linux/dev/drivers/block/ahci.c and linux/dev/drivers/block/ahci.h. * linux/src/drivers/block/ide.c: Include <ahci.h>. (probe_for_hwifs): Call ahci_probe_pci.
* Fix non-block-aligned-offset readsSamuel Thibault2013-05-021-2/+2
| | | | | | | | This fixes grave issues when device_read is called with non-block-aligned offset, e.g. when using grub-probe with a non-block-aligned partition table. * linux/dev/glue/block.c (rdwr_full): Use current position instead of base buffer position to check for alignment.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault2013-05-012-94/+20
|\
| * Optimize slab reapingRichard Braun2013-04-211-13/+10
| | | | | | | | | | | | | | | | Instead of walking the list of free slabs while holding the cache lock, detach the list from the cache and directly compute the final count values, and destroy slabs after releasing the cache lock. * kern/slab.c (kmem_cache_reap): Optimize.
| * Rework slab lists handlingRichard Braun2013-04-212-81/+8
| | | | | | | | | | | | | | | | | | | | | | | | Don't enforce strong ordering of partial slabs. Separating partial slabs from free slabs is already effective against fragmentation, and sorting would sometimes cause pathological scalability issues. In addition, store new slabs (whether free or partial) in LIFO order for better cache usage. * kern/slab.c (kmem_cache_grow): Insert new slab at the head of the slabs list. (kmem_cache_alloc_from_slab): Likewise. In addition, don't sort partial slabs. (kmem_cache_free_to_slab): Likewise. * kern/slab.h: Remove comment about partial slabs sorting.
| * Fix locking error in the slab allocatorRichard Braun2013-04-211-0/+2
| | | | | | | | | | * kern/slab.c (kmem_cache_free): Lock cache before releasing an object to the slab layer.
* | Fix macro nameSamuel Thibault2013-05-011-1/+1
|/ | | | | | * linux/dev/glue/block.c (device_get_status): Use DEV_GET_RECORDS_RECORD_SIZE for DEV_GET_RECORDS instead of DEV_GET_SIZE_RECORD_SIZE.
* Add -fno-optimize-sibling-calls option for better kdb tracesSamuel Thibault2013-04-081-1/+1
| | | | | * Makefrag.am (AM_CFLAGS) [enable_kdb]: Add -fno-optimize-sibling-calls option.
* Update BASEPRI_USERSamuel Thibault2013-03-111-1/+1
| | | | * kern/sched.h (BASEPRI_USER): Increase to 25.
* Fix build without kdbSamuel Thibault2013-03-111-0/+2
| | | | | * i386/i386/db_interface.h [! MACH_KBD] (db_set_hw_watchpoint, db_clear_hw_watchpoint, db_dr): Do not declare functions.
* Increase number of prioritiesSamuel Thibault2013-03-061-1/+1
| | | | * kern/sched.h (NRQS): Increase to 50.
* Do not hardcode maximum priority valueSamuel Thibault2013-03-051-5/+5
| | | | | * kern/sched_prim.c (do_priority_computation): Replace 31 with NRQS - 1. idle_thread: Likewise.
* Include machine/db_interface instead of hardcoding function prototypesSamuel Thibault2013-02-042-8/+4
| | | | | | | | | * ddb/db_access.c: Include <machine/db_interface.h>. (db_read_bytes, db_write_bytes): Remove functions prototypes. (db_get_task_value): Fix calling db_read_bytes. (db_put_task_value): Fix calling db_write_bytes. * ddb/db_watch.c: Include <machine/db_interface.h>. (db_set_hw_watchpoint, db_clear_hw_watchpoint): Remove functions prototypes.