Age | Commit message (Collapse) | Author |
|
Linux does this to be extra careful with some BIOSes which apparently
spuriously write between 4k and 64k.
* i386/i386at/model_dep.c (RESERVED_BIOS): New macro.
(avail_next, mem_size_init, init_alloc_aligned): Use RESERVED_BIOS instead
of hardcoded 0x1000.
|
|
* i386/i386at/kd.c (kdstart): Moved escape sequence handling to new
kd_putc_esc function.
(kd_putc_esc): New function with logic from kdstart.
(kdcnputc): Call kd_putc_esc rather than kd_putc to allow for ANSI
escape codes.
* i386/i386at/kd.h (kd_putc_esc): New function.
|
|
halted.
* kern/thread.h (thread_halt_self): Add continuation_t parameter.
* kern/thread.c (thread_halt_self): Pass continuation_t parameter to
thread_block instead of thread_exception_return.
* kern/ast.c (ast_taken): Pass thread_exception_return to thread_halt_self.
* kern/profile.c (profile_thread): Likewise.
* kern/exception.c (exception_no_server): Likewise.
(thread_release_and_exception_return): New function.
(exception_raise_continue_slow): Pass thread_release_and_exception_return to
thread_halt_self.
|
|
to replace the use of the NULL pointer.
* kern/sched_prim.h (thread_no_continuation): New macro.
* kern/machine.c (processor_assign, processor_doaction): Use
thread_no_continuation instead of 0.
* kern/profile.c (send_last_sample_buf): Likewise
* kern/sched_prim.c (thread_sleep, thread_invoke, thread_dispatch):
Likewise.
* kern/task.c (task_terminate, task_assign): Likewise.
* kern/thread.c (thread_suspend): Likewise.
* kern/thread.h (struct thread): Change type of swap_func field to
continuation_t.
|
|
* kern/bootstrap.c (boot_script_exec_cmd): Avoid holding the lock
across the call to `thread_create'.
|
|
* i386/intel/pmap.c (pmap_page_protect): Enable assertions.
(phys_attribute_clear, phys_attribute_test): Likewise.
|
|
* kern/lock.c (simple_unlock): Really zero-out unused simple lock info
entries.
|
|
* i386/intel/pmap.c (pmap_page_protect): Fix function name in panic
message.
|
|
* vm/vm_object.c (vm_object_collapse): Collapse unreachable branch
into assertion.
|
|
* configfrag.ac (MACH_LDEBUG): Adjust comment, we use it to sanity
check all locks now.
* kern/lock.c (lock_write): Keep track of the writer thread.
(lock_done): Clear writer.
(lock_read_to_write): Keep track of the writer thread.
(lock_write_to_read): Assert that the current thread holds the lock.
Clear writer.
(lock_try_write): Keep track of the writer thread.
(lock_try_read_to_write): Likewise.
(lock_set_recursive): Assert that the current thread holds the lock.
* kern/lock.h (struct lock): New field `writer'.
(have_read_lock, have_write_lock, have_lock): New macros that can be
used to assert that the current thread holds the given lock. If
MACH_LDEBUG is not set, they evaluate to true.
|
|
Do not bother saving the return address when acquire a simple lock.
Save the location as provided by the compiler as string instead. Also
save the lock parameter.
* kern/lock.c (struct simple_locks_info): Drop `ra', add `expr', `loc'.
(simple_lock): Rename to `_simple_lock', add expression and location
parameters and save them.
(simple_lock_try): Likewise.
(simple_unlock): Zero-out the now unused slot in the list of taken locks.
(db_show_all_slocks): Use the new information.
* kern/lock.h (simple_lock, simple_lock_try): Provide macro versions
passing the location and expression as string.
|
|
* kern/lock.c (do_check_simple_locks): New variable.
(check_simple_locks): Make check conditional.
(check_simple_locks_{en,dis}able): New functions.
* kern/lock.h (check_simple_locks_{en,dis}able): New declarations.
* ddb/db_trap.c (db_task_trap): Disable simple lock checks.
|
|
* vm/vm_user.c (vm_wire): Drop unused but set variable `host'.
|
|
* vm/vm_fault.c (vm_fault_page): Enable extra assertions.
|
|
* kern/macros.h: Avoid re-defining macros.
* linux/src/include/linux/compiler-gcc.h: Likewise.
* linux/src/include/linux/compiler.h: Likewise.
|
|
The kernel keeps track of task and thread creation times by saving a
time stamp. Previously, the real-time clock was used for this. When
the real-time clock is changed, however, the reference frame for the
time stamps is lost. This surfaced in Hurd systems reporting
spuriously long uptimes.
Fix this by creating a boot-time clock and use it as reference frame
for the time stamps.
* kern/mach_clock.c (clock_boottime_offset): Create clock by keeping
track of the offset from the real-time.
(clock_boottime_update): New function.
(record_time_stamp): Use the boot-time clock for time stamps.
(read_time_stamp): New function to convert it back to real-time.
(host_set_time): Call `clock_boottime_update'.
* kern/mach_clock.h (record_time_stamp): Amend comment.
(read_time_stamp): New declaration.
* kern/task.c (task_info): Use `read_time_stamp'.
* kern/thread.c (thread_info): Likewise.
|
|
* include/mach/time_value.h (time_value_assert): New macro to assert
that the given value is well-formed.
(time_value_add_usec): Use the new macro.
(time_value_sub_usec): New macro.
(time_value_add): Use `time_value_add_usec'.
(time_value_sub_usec): New macro.
|
|
* kern/lock.h (struct slock, simple_lock_data_empty): Add field
`is_a_simple_lock'.
(simple_lock_assert): New macro that tests for `is_a_simple_lock'.
Use this macro to assert that the arguments to various other macros
are indeed simple locks.
|
|
* configfrag.ac (XPR_DEBUG): Disable tracing system.
|
|
* ipc/ipc_space.h (is_{reference,release}): Use the macro variant.
|
|
* Makerules.am: Make sure the field offsets are updated.
|
|
Previously, killing the thread would fail because of the extra
reference, making task_terminate loop forever.
* kern/bootstrap.c (boot_script_exec_command): Deallocate thread.
|
|
* kern/bootstrap.c (boot_script_free_task): Deallocate task.
|
|
* linux/src/drivers/net/pci-scan.c: Avoid #erroring out.
|
|
A lot of code assumes that printf is re-entrant, e.g. the pagination
code in the debugger, or any use of assert inside the console driver.
* kern/printf.c: Drop the lock serializing calls to `_doprnt'.
(printf_init): Remove function.
* kern/printf.h (printf_init): Remove declaration.
* kern/startup.c (setup_main): Remove call to `printf_init'.
|
|
* kern/lock.c (struct simple_locks_info): Fix type of `ra'.
(simple_lock, simple_lock_try): Use compiler built-in functions to get
return address.
|
|
* kern/bootstrap.c (boot_script_exec_cmd): Add missing unlock.
(user_bootstrap): Likewise.
|
|
* kern/slab.c (host_slab_info): Fix locking.
|
|
This fixes a corruption in the radix trees representing the IPC spaces
when memory was tight.
* ipc/ipc_space.h: Use a general lock to protect IPC spaces.
|
|
* ipc/ipc_entry.c (ipc_entry_alloc): Assume the space is write-locked.
(ipc_entry_alloc_name): Likewise.
* ipc/ipc_object.c: Fix the locking around all call sites to the two
functions where the space was not locked before.
|
|
* i386/intel/pmap.c: Fix typo.
|
|
* ipc/ipc_table.c (ipc_table_alloc): Unconditionally use `kalloc'.
(ipc_table_free): Unconditionally use `kfree'.
|
|
Previously, the pageout code traversed the list of pages in an object
instead of the list of inactive pages.
* vm/vm_pageout.c (vm_pageout_scan): Fix traversing the list of
inactive pages.
|
|
This turns mistakes as the one corrected in e59f05e9 into compile-time
errors.
* kern/queue.h: Add a new macro, queue_assert, and use it to assert
that all arguments given to the queue macros have the correct type.
* device/net_io.c (ENQUEUE_DEAD): Adapt to the fact that
`queue_next(q)' is no longer an lvalue.
|
|
Previously, the pageout code traversed the hash table chain instead of
the list of inactive pages. The code merely compiled by accident,
because the `struct page' also has a field called `next' for the hash
table chain.
* vm/vm_pageout.c (vm_pageout_scan): Fix traversing the list of
inactive pages.
|
|
* vm/vm_object.c (vm_object_terminate): Drop debugging remnants.
|
|
* Makefile.am (clib_routines): Steal `__umoddi3'.
* kern/printf.c (MAXBUF): Increase size.
(printnum, _doprnt): Handle long long integers.
* kern/printf.h (printnum): Adjust declaration.
|
|
* vm/vm_kern.c (kmem_init): Fix panic message.
|
|
* i386/i386at/immc.c (immc_cnputc): Fix line wrapping.
|
|
* kern/server_loop.ch: Remove superfluous file.
|
|
* kern/bootstrap.c (boot_script_exec_cmd): Improve error handling.
|
|
* doc/mach.texi (vm_wire): Document that the host port does not have to be
privileged.
* include/mach/mach_hosts.defs (vm_wire): Use mach_port_t instead of
host_priv_t.
* vm/vm_map.h (vm_map): Add user_wired field.
* vm/vm_map.c (vm_map_setup): Initialize user_wired field to 0.
(vm_map_pageable_common, vm_map_entry_delete, vm_map_copy_overwrite,
vm_map_copyout_page_list, vm_map_copyin_page_list): When switching
user_wired_count field of entry between 0 and non-0, accumulate the
corresponding size into the user_wired field of map.
* vm/vm_user.c (vm_wire): Turn host parameter into port parameter, and
inline a version of convert_port_to_host_priv which records whether the host
port is privileged or not. When it is not privileged, check whether
the additional amount to user_wired will overcome 64KiB.
|
|
* linux/src/include/linux/string.h (strcpy, strncpy, strcat, strncat,
strchr, strrchr, strlen, strnlen, strcmp, strncmp, memmove,
memscan): Comment out extern declarations.
* linux/dev/include/asm-i386/string.h (strcpy, strncpy, strcat, strncat,
strcmp, strncmp, strchr, strrchr, strlen, __memcpy, __constant_memcpy,
memmove, memchr, __memset_generic, __constant_c_memset, strnlen,
__constant_c_and_count_memset, memscan): Turn extern inline into static
inline.
* linux/dev/include/linux/fs.h (mark_buffer_uptodate): Likewise.
* linux/src/include/asm-i386/bitops.h (set_bit, clear_bit, change_bit,
test_and_set_bit, test_and_clear_bit, test_and_change_bit, test_bit,
find_first_zero_bit, find_next_zero_bit, ffz, ffs): Likewise.
* linux/src/include/asm-i386/io.h (virt_to_phys, phys_to_virt, __out##s,
__in##s, ins##s, outs##s): Likewise.
* linux/src/include/asm-i386/semaphore.h (down, down_interruptible, up):
Likewise.
* linux/src/include/asm-i386/segment.h [!__OPTIMIZE]: Emit an ud2 instruction
instead of an undefined reference.
|
|
* Makefrag.am (EXTRA_DIST): Add ipc/notify.defs.
|
|
Previously, running `../configure ...' to reconfigure an out-of-tree
build would link `machine' to `i386/i386' instead of `../i386/i386'
(i.e. point to the build directory instead to the source) if
`i386/i386' also exists in the build directory because of a previous
build.
* configfrag.ac: Prefix machine link target with `$srcdir'.
|
|
* linux/dev/drivers/block/ahci.c (ahci_identify): Restore flags before
returning on timeout.
|
|
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Print messages when
device is present but powered down.
|
|
* ddb/db_trap.c (db_task_trap): Automatically display stack traces if
an unexpected trap occurs.
|
|
Improve the immediate console to the point that it can be enabled and
display e.g. assertion failures from very early on (i.e. from
`c_boot_entry').
* device/cons.h (romgetc, romputc): New declarations.
* i386/configfrag.ac: Add configuration variable.
* i386/i386at/conf.c (dev_name_list): Add entry.
* i386/i386at/cons_conf.c (constab): Add entry.
* i386/i386at/immc.c: Add missing includes.
(immc_cnprobe, immc_cninit, immc_cngetc, immc_romputc): New functions.
(immc_cnputc): Fix signature, use virtual addresses.
* i386/i386at/immc.h: New file.
* i386/i386at/kd.c: Use `#if ENABLE_IMMEDIATE_CONSOLE'.
* i386/i386at/kd.h (kd_setpos): Add missing declaration.
* i386/i386at/model_dep.c (c_boot_entry): Install immediate console as
early boot console.
|
|
* i386/i386at/model_dep.c (rebootflag): Explain flag.
|