Age | Commit message (Collapse) | Author |
|
This change increases clarity.
* kern/list.h (list_insert): Rename to ...
(list_insert_head): ... this.
* kern/slab.c: Update calls to list_insert.
|
|
* doc/mach.texi: Replace @itemx with @item for --enable-tulip and
--enable-epic100.
|
|
* kern/slab.c (kalloc_init): Remove unused variables.
|
|
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing parameters to
printf.
|
|
* linux/Makefrag.am (liblinux_a_SOURCES): Fix path to ahci.h
|
|
* 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.
|
|
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.
|
|
|
|
* 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.
|
|
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.
|
|
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.
|
|
* kern/slab.c (kmem_cache_free): Lock cache before releasing an object to
the slab layer.
|
|
* Makefrag.am (AM_CFLAGS) [enable_kdb]: Add -fno-optimize-sibling-calls
option.
|
|
* kern/sched.h (BASEPRI_USER): Increase to 25.
|
|
* i386/i386/db_interface.h [! MACH_KBD] (db_set_hw_watchpoint,
db_clear_hw_watchpoint, db_dr): Do not declare functions.
|
|
* kern/sched.h (NRQS): Increase to 50.
|
|
* kern/sched_prim.c (do_priority_computation): Replace 31 with NRQS - 1.
idle_thread: Likewise.
|
|
* 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.
|
|
Make the `watch' command use hw debug registers whenever possible.
* ddb/db_watch.c (db_set_hw_watchpoint, db_clear_hw_watchpoint): Add
functions prototypes.
(db_set_watchpoints): Try to call db_set_hw_watchpoint.
(db_clear_watchpoints): Call db_clear_hw_watchpoint.
* i386/i386/db_interface.c: Include <ddb/db_watch.h>
(db_set_hw_watchpoint): Take a db_watchpoint_t WATCH parameter instead of
its content. Remove support for clearing a debug register.
(db_clear_hw_watchpoint): Add function.
* i386/i386/db_interface.h: Include <ddb/db_watch.h>.
(db_set_hw_watchpoint): Fix function prototype.
(db_clear_hw_watchpoint): Add function prototype.
* i386/i386/db_machdep.h: Do not include <machine/db_interface.h>
|
|
* doc/mach.texi: Add dwatch documentation.
|
|
This adds using the x86 hardware debugging registers, either from the kernel
through db_set_hw_watchpoint, or from userland through i386_DEBUG_STATE.
While the kernel is using the registers, the userland values are ignored.
* i386/i386/db_interface.c (kernel_dr, ids): New variables.
(db_load_context, db_get_debug_state, db_set_debug_state, db_dr,
db_set_hw_watchpoint): New functions.
(kdb_trap): Use get_dr* instead of dr_addr[].
* i386/i386/db_interface.h (db_user_to_kernel_address, db_set_hw_watchpoint)
(db_dr, db_get_debug_state, db_set_debug_state, db_load_context): Add functions
prototypes.
(dr0, dr1, dr2, dr3): Remove functions prototypes.
* i386/i386/locore.S (dr6, dr0, dr1, dr2, dr3): Remove functions.
(dr_msk, dr_addr): Remove variables.
* i386/include/mach/i386/thread_status.h (i386_DEBUG_STATE): Add macro.
(i386_debug_state): Add structure.
(i386_DEBUG_STATE_COUNT): Add macro.
* i386/i386/thread.h: Include <mach/machine/thread_status.h>.
(i386_machine_state): Add `struct i386_debug_state ids' field.
* i386/i386/pcb.c: Include <i386/db_interface.h>.
(switch_ktss): Call db_load_context.
(thread_setstatus, thread_getstatus): Add I386_DEBUG_STATE case.
* i386/i386/proc_reg.h (get_dr0, set_dr0, get_dr1, set_dr1, get_dr2,
set_dr2, get_dr3, set_dr3, get_dr6, set_dr6, get_dr7, set_dr7): Add macros.
|
|
* i386/Makefrag.am (AM_CFLAGS): Add -mno-3dnow -mno-mmx -mno-sse -mno-sse2.
|
|
* i386/intel/pmap.c (pmap_map_mfn) [MACH_XEN && !MACH_PV_PAGETABLES]:
Implement.
|
|
* i386/xen/xen_boothdr.S (FEATURES): Mark PVH features as required.
|
|
|
|
* i386/i386/gdt.c (gdt_init) [MACH_PV_DESCRIPTORS && !MACH_PV_PAGETABLES]:
Do not enable VMASST_TYPE_4gb_segments.
* i386/i386/trap.c (user_trap): Do not handle trap 15, 4gb segment
assist notification.
|
|
* i386/i386/vm_param.h [MACH_XEN && !MACH_PV_PAGETABLES]: Do not include
<xen/public/xen.h>.
|
|
* i386/i386/vm_param.h (VM_MAX_KERNEL_ADDRESS) [MACH_XEN &&
!MACH_PV_PAGETABLES]: Remove hypervisor area from VM_MAX_KERNEL_ADDRESS
restriction.
|
|
* i386/i386/idt_inittab.S: Turn MACH_XEN test into MACH_PV_DESCRIPTORS test.
* i386/i386/fpu.c: Turn appropriate MACH_HYP/XEN tests into MACH_RING1 tests.
* i386/i386/ktss.c: Likewise.
* i386/i386/locore.S: Likewise.
* i386/i386/mp_desc.c: Likewise.
* i386/i386/pcb.c: Likewise.
* i386/i386/proc_reg.h: Likewise.
* i386/i386/trap.c: Likewise.
|
|
* xen/configfrag.ac (--disable-pv-pagetables): Add option.
* i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_PV_PAGETABLES]: Add
writable_page_tables.
* i386/i386/gdt.c: Turn appropriate MACH_XEN/MACH_HYP tests into
MACH_PV_PAGETABLES tests.
* i386/i386/i386asm.sym: Likewise
* i386/i386/ldt.c: Likewise
* i386/i386/locore.S: Likewise
* i386/i386/proc_reg.h: Likewise
* i386/i386/user_ldt.c: Likewise
* i386/i386/vm_param.h: Likewise
* i386/i386/xen.h: Likewise
* i386/i386at/model_dep.c: Likewise
* i386/intel/pmap.h: Likewise
* include/mach/xen.h: Likewise
* xen/console.c: Likewise
* xen/store.c: Likewise
* i386/intel/pmap.c: Likewise. Define pmap_map_mfn as TODO stub.
|
|
|
|
* i386/i386/i386asm.sym (PFN_LIST) [!MACH_PSEUDO_PHYS]: Do not define.
|
|
* xen/configfrag.ac (--disable-ring1): Add option.
* i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_RING1]: Add
supervisor_mode_kernel.
* i386/i386/seg.h (KERNEL_RING) [!MACH_RING1]: Set macro to 0.
|
|
* xen/configfrag.ac (--disable-pv-descriptors): Add option
* i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_PV_DESCRIPTORS]: Add
writable_descriptor_tables.
* i386/i386/gdt.c: Turn appropriate MACH_XEN/MACH_HYP tests into
MACH_PV_DESCRIPTORS tests.
* i386/i386/gdt.h: Likewise.
* i386/i386/i386asm.sym: Likewise.
* i386/i386/idt.c: Likewise.
* i386/i386/idt_inittab.S: Likewise.
* i386/i386/ldt.c: Likewise.
* i386/i386/pcb.c: Likewise.
* i386/i386/seg.h: Likewise.
* i386/i386/user_ldt.c: Likewise.
* i386/i386/user_ldt.h: Likewise.
|
|
The purpose of this system call is to help debugging in situations where
it's desirable to bypass the mach_msg call entirely.
* include/mach/syscall_sw.h (mach_print): Generate system call code.
* kern/syscall_subr.c: Include <kern/printf.h>.
[MACH_KDB] (mach_print): New function.
* kern/syscall_subr.h (mach_print): New prototype.
* kern/syscall_sw.c [MACH_KDB] (mach_trap_table): Declare mach_print
system call.
|
|
|
|
* vm/vm_fault.c (vm_fault_page): Properly increment
current_task()->zero_fills and cow_faults.
|
|
* 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.
|
|
This problem was overlooked because of simple locks being no-ops.
* kern/slab.c (slab_collect): Fix lock name to kmem_cache_list_lock.
(host_slab_info): Likewise.
|
|
The purpose of this function is to allow kernel code to display the state
of the slab caches in situations where the host_slab_info RPC wouldn't be
available, e.g. before a panic.
* kern/slab.c (slab_info): New function.
* kern/slab.h: Add declaration for slab_info.
|
|
* vm/vm_map.h (KENTRY_DATA_SIZE): Bump from 32 pages to 64 pages.
|
|
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.
|
|
By disabling some of the most slow drivers by default, and giving progress
feedback to the user.
* linux/configfrag.ac (CONFIG_SCSI_NCR53C7xx, CONFIG_SCSI_AIC7XXX,
CONFIG_SCSI_GDTH): Disable by default
* linux/src/drivers/scsi/eata.c (__initfunc): Don't feed line in probe
message.
* linux/src/drivers/scsi/hosts.c (scsi_init): Print SCSI probe progress.
|
|
Cherry picked from Linux kernel commit 76c25284e0d845bff4ee1031721556148af4db1c
* linux/dev/drivers/block/floppy.c (config_types): Clear from
`allowed_drive_mask' floppy drives whose cmos type is 0.
|
|
|
|
0a55db5 made thread_suspend return KERN_FAILURE when the target thread is in
TH_UNINT state. That however is not currently handled by libc, and it's more
useful to just wait for the thread to get interruptible.
* kern/sched_prim.c (thread_invoke): Wake NEW_THREAD->STATE for thread_suspend.
* kern/thread.c (thread_suspend): Wait on NEW_THREAD->STATE as long as THREAD
has TH_UNINT.
|
|
Based upon a patch by Philippe De Muyter, and feedback from Mark
Lord and Robert Hancock.
As noted by Mark Lord, the outdated ATA1 spec specifies a 20msec
timeout for setting DRQ but lots of common devices overshoot this.
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from Linux kernel commit 602da297e293eb2cbd28dcdbbe247593a46a853a)
* linux/src/drivers/block/ide.h (WAIT_DRQ): Increase to 1 s.
|
|
* linux/src/drivers/block/ide.c: Partially update to Linux 2.0.40 code.
|
|
The mapable_time_init function is called before machine_init, but the
latter sets the system boot time. Fix their calling order.
* kern/startup.c (setup_main): Call machine_init before mapable_time_init.
|
|
* kern/rbtree.h (rbtree_lookup): Prefix local variable names with three
underscores.
(rbtree_lookup_nearest): Likewise.
(rbtree_insert): Likewise.
(rbtree_lookup_slot): Likewise.
(rbtree_insert_slot): Rewrite as an inline function.
|