summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-10GNU Mach 1.5.v1.5Thomas Schwinge
* version.m4 (AC_PACKAGE_VERSION): Set to 1.5. * NEWS: Finalize for 1.5.
2015-03-19Give the Debian package name for the non-multilib libc.aSamuel Thibault
* Makefile.am (clib-routines.o): Mention the Debian libc6-dev:i386 package.
2015-03-08Remove spl debugging in Xen caseSamuel Thibault
xen cli/sti doesn't use IF * i386/i386/spl.S [MACH_XEN]: Disable IF check.
2015-03-05Show odd number of portsSamuel Thibault
* linux/dev/drivers/block/ahci.c (ahci_probe_dev): Show odd number of ports.
2015-02-26Use printf_once instead of recoding itSamuel Thibault
* i386/i386at/kd_event.c: Call printf_once instead of recoding it. * i386/i386at/kd_mouse.c: Likewise.
2015-02-26Limit printing "queue full" messagesSamuel Thibault
* i386/i386at/kd_event.c (kbd_enqueue): Print "queue full" warning only once. * i386/i386at/kd_mouse.c (mouse_enqueue): Likewise.
2015-02-25kern: inherit the name of the parent taskJustus Winter
* kern/task.c (task_create): Inherit the name of the parent task.
2015-02-20i386: specialize `copyinmsg' and `copyoutmsg'Justus Winter
Previously, `copyinmsg' was the same function as `copyin'. The former is for messages, and the size of messages is a multiple of four. Likewise for `copyoutmsg'. Provide a specialized version of both functions. This shaves off a couple of instructions and improves our IPC performance. * i386/i386/locore.S (copyinmsg): New function. (copyoutmsg): New function.
2015-02-20i386: drop needless instruction from `copyout'Justus Winter
* i386/i386/locore.S (copyout): Do not needlessly copy length to %eax first.
2015-02-20kern: improve assertJustus Winter
Use the ternary operator to implement `assert' like it is done in the glibc. The glibcs changelog does not mention the rationale behind this change, but doing the same seems to improve our IPC performance. * kern/assert.h (assert): Define macro using the ternary operator.
2015-02-20linux: fix compiler warningJustus Winter
If the loop above completes at least one iteration, `i' will be larger than zero. * linux/dev/glue/block.c (rdwr_full): Add assertion to appease the compiler.
2015-02-20kern: reduce the size of `struct thread'Justus Winter
Reduce the size of `struct thread' by twelve bytes making it fit into exactly five cache lines (on 32-bit platforms). * kern/thread.h (struct thread): Group the state and all flags in a bitfield. (TH_EV_WAKE_ACTIVE, TH_EV_STATE): Provide macros that generate keys for synchronization primitives like `thread_wakeup'. * kern/thread.c (thread_halt, thread_dowait, thread_suspend): Use the new keys instead of addresses of fields for the synchronisation. * kern/ipc_sched.c (thread_handoff): Likewise. * kern/sched_prim.c (thread_invoke, thread_dispatch): Likewise.
2015-02-18kern: avoid #if 0ing out thread_collect_scanJustus Winter
Currently, `thread_collect_scan' does nothing because `pcb_collect' is a nop. Its body is exempt from compilation by means of the preprocessor. This is unfortunate as it increases the risk of bitrot, and we still need to pay the price of rate-limiting thread_collect_scan. * kern/thread.c (thread_collect_scan): Drop #if 0 around the body. * vm/vm_pageout.c (vm_pageout_scan): Do not call `consider_thread_collect' and document why.
2015-02-18vm: fix typoJustus Winter
* vm/vm_resident.c: Fix typo.
2015-01-22ipc: warn about more port management bugsJustus Winter
* ipc/mach_port.c (mach_port_destroy): Simplify expression. Reword warning. (mach_port_deallocate): Likewise. (mach_port_mod_refs): Also warn about errors when using this function.
2015-01-02vm: Fix typo in comment (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02kern: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02ipc: Fix typo in comment (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02include: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02i386: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02device: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02Makefile.am: Fix typos and grammar in commentStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02ddb: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-02Handle kernel traps happening before starting userlandSamuel Thibault
* i386/i386/trap.c (kernel_trap): When current_thread is null, assume that we are in kernel land.
2014-12-16kern: gracefully handle bogus sample pc sequence numberJustus Winter
If a sequence number larger than the sample control sequence number is supplied, `nsamples' becomes negative. Handle this gracefully. * kern/pc_sample.c (get_sampled_pcs): Handle bogus sequence number.
2014-12-16ipc: guard test code with `MACH_IPC_TEST'Justus Winter
* ipc/ipc_kmsg.h (ikm_mark_bogus): New macro. (ipc_kmsg_rmqueue_first_macro): Use `ikm_mark_bogus'. * ipc/ipc_kmsg.c (ipc_kmsg_rmqueue): Likewise.
2014-12-16ipc: tune size of cached kernel message buffersJustus Winter
The previous limit was 256 bytes. That seems a little crummy by todays standards, and we are frequently sending bigger packets (e.g. every RPC containing a string_t on Hurd). Use the page size for IKM_SAVED_KMSG_SIZE to make sure the page is pinned to a single processor. * ipc/ipc_kmsg.h (IKM_SAVED_KMSG_SIZE): Define to `PAGE_SIZE'.
2014-12-15Make spl7 just clear IF instead of setting the PIC maskSamuel Thibault
* i386/i386/spl.S (spl7): Just set curr_ipl and cli. (splx) [MACH_KDB || MACH_TTD]: When curr_ipl is 7, make sure that IF is cleared. (splx): When staying at ipl7, do not enable interrupts. (spl) [MACH_KDB || MACH_TTD]: When curr_ipl is 7, make sure that IF is cleared. (spl): When new ipl is 7, branch to spl7. * i386/i386/locore.S (TIME_TRAP_UENTRY, TIME_TRAP_SENTRY): Save flags, and restore them instead of blindly using sti.
2014-12-11Ship missing fileSamuel Thibault
* Makefrag.am (EXTRA_DIST): Add kern/task_notify.cli.
2014-12-09include: add X_IMPORTS to ipc definitionsJustus Winter
This makes it possible to inject imports. * include/mach/gnumach.defs: Make it possible to inject imports. * include/mach/mach.defs: Likewise. * include/mach/mach_host.defs: Likewise.
2014-12-09kern: provide notifications about new tasksJustus Winter
These notifications are sent to the port registered via `register_new_task_notification' and provide a robust parental relation between tasks to a userspace server. * Makefrag.am: Add task_notify.defs. * include/mach/gnumach.defs: Add register_new_task_notification. * include/mach/task_notify.defs: New file. * kern/task.c (new_task_notification): New variable. (task_create): Send new task notifications. (register_new_task_notification): Add server function. * kern/task_notify.cli: New file.
2014-12-09Retire procedure `old_mach_port_get_receive_status'Justus Winter
Retire the compatibility RPC `old_mach_port_get_receive_status' that works like `mach_port_get_receive_status' but returns an `old_mach_port_status' object that lacks the `mps_seqno' field. Do not remove the type yet, so we do not break anyones build. The RPC stubs currently distributed with the glibc require it. * include/mach/mach_port.defs (old_mach_port_get_receive_status): Drop RPC. * include/mach/mach_types.defs (old_mach_port_status_t): Drop type. * include/mach/port.h (old_mach_port_status_t): Add note to remove this for the 1.6 release. * ipc/mach_port.c (old_mach_port_get_receive_status): Drop function.
2014-12-07Fix pthread_create warning on translator terminationSamuel Thibault
This was due to task_terminate not actually properly suspending threads before disable the task port, which was thus preventing pthread_create from being able to create a stack. Thanks Gabriele Giacone for finding out a reproducer of this. * kern/task.h (task_hold_locked): New declaration. * kern/task.c (task_hold): Move the locked part of the code into... (task_hold_locked): ... new function. (task_terminate): Call task_hold_locked just before deactivating the task. Call ipc_task_disable after waiting for threads to actually suspend with task_dowait.
2014-12-01kern: disable all counters by defaultJustus Winter
Make all five non-conditional counters conditional ones. Casual checking revealed that the hits-to-miss ratio is excellent. * kern/counters.c: Make all counters conditional. * kern/counters.h: Likewise. * kern/ipc_sched.c: Likewise. * kern/sched_prim.c: Likewise.
2014-11-28include: make `mach_port_t' payload-awareJustus Winter
Honor a new macro `MACH_PAYLOAD_TO_PORT' to inject a translation function mapping payloads to port names in the definition of `mach_port_t'. * include/mach/std_types.defs (mach_port_t): Honor `MACH_PAYLOAD_TO_PORT'. * include/device/device.defs (reply_port_t): Likewise. * include/device/device_reply.defs (reply_port_t): Likewise. * include/device/device_request.defs (reply_port_t): Likewise.
2014-11-23Fix programming PIT counterSamuel Thibault
* linux/dev/arch/i386/kernel/irq.c (init_IRQ): Properly mask 8 bits of PIT counter.
2014-11-21Correct GCC's -Wformat-security issuesDavid Michael
* linux/pcmcia-cs/clients/axnet_cs.c (axdev_init): Add a format string literal where printk only has a single variable argument. * linux/src/drivers/net/3c507.c (el16_probe1): Likewise. * linux/src/drivers/net/3c509.c (el3_probe): Likewise. * linux/src/drivers/net/3c515.c (init_module): Likewise. (tc515_probe): Likewise. * linux/src/drivers/net/ac3200.c (ac_probe1): Likewise. * linux/src/drivers/net/apricot.c (apricot_probe): Likewise. * linux/src/drivers/net/at1700.c (at1700_probe1): Likewise. * linux/src/drivers/net/de4x5.c (de4x5_hw_init): Likewise. * linux/src/drivers/net/de600.c (de600_probe): Likewise. * linux/src/drivers/net/de620.c (de620_probe): Likewise. * linux/src/drivers/net/depca.c (depca_hw_init): Likewise. * linux/src/drivers/net/e2100.c (e21_probe1): Likewise. * linux/src/drivers/net/eepro.c (eepro_probe1): Likewise. * linux/src/drivers/net/eepro100.c (speedo_found1): Likewise. * linux/src/drivers/net/eexpress.c (eexp_hw_probe): Likewise. * linux/src/drivers/net/ewrk3.c (ewrk3_hw_init): Likewise. * linux/src/drivers/net/fmv18x.c (fmv18x_probe1): Likewise. * linux/src/drivers/net/hp-plus.c (hpp_probe1): Likewise. * linux/src/drivers/net/hp.c (hp_probe1): Likewise. * linux/src/drivers/net/lance.c (lance_probe1): Likewise. * linux/src/drivers/net/ne.c (ne_probe1): Likewise. * linux/src/drivers/net/pcnet32.c (pcnet32_probe1): Likewise. * linux/src/drivers/net/seeq8005.c (seeq8005_probe1): Likewise. * linux/src/drivers/net/smc-ultra.c (ultra_probe1): Likewise. * linux/src/drivers/net/smc-ultra32.c (ultra32_probe1): Likewise. * linux/src/drivers/net/wd.c (wd_probe1): Likewise.
2014-11-16Only set debug registers when they are usedSamuel Thibault
* i386/i386/db_interface.c (zero_dr): New variable (db_load_context): Do not set debug registers to zero when they are already zero. (db_dr): When kernel debug registers get zero, record that the debug registers have been zeroed.
2014-11-13Add nodma optionsSamuel Thibault
Some very slow qemu instances would eventually trigger DMA timeouts, let's give a way to disable DMA there, it does not actually slow down operations anyway. * linux/src/drivers/block/ide.h (ide_drive_s): Add nodma field. * linux/src/drivers/block/ide.c (do_identify): Do not call dmaproc(ide_dma_check) when nodma is 1. (ide_setup): Add nodma option.
2014-11-12Pass ide and hd kernel options to ide driverSamuel Thibault
* linux/dev/drivers/block/genhd.c: Include <linux/hdreg.h> and <alloca.h> (device_setup): Look for ide and hd options, and call ide_setup with them. * linux/src/drivers/block/ide.c (ide_setup) [MACH]: Parse hd[0-7] instead of hd[a-h].
2014-11-10Fix documentation for vm_mapSamuel Thibault
doc/mach.texi (vm_map): Document that vm_map uses the address as a starting hint even when anywhere is TRUE.
2014-11-10Revert "Make vm_map really ignore `address' when `anywhere' is true"Samuel Thibault
This reverts commit 5ae510e35c54009626999a88f0f1cb34d6dfc94f.
2014-11-03include: add a payload-aware intran mutator for device_tJustus Winter
* include/device/device_types.defs (device_t): Add a payload-aware intran mutator.
2014-11-03include: add a payload-aware intran mutator for notify_port_tJustus Winter
* include/mach/notify.defs (notify_port_t): Add a payload-aware intran mutator.
2014-11-03include: add a payload-aware intran mutator for memory_object_tJustus Winter
* include/mach/mach_types.defs (memory_object_t): Add a payload-aware intran mutator. * include/mach/memory_object.defs: Likewise in the inlined type declarations.
2014-11-03Fix link refusalSamuel Thibault
* Makefile.am (clib-routines.o): Refuse to link only when multiarch is detected.
2014-11-03Refuse to link against a libc with multiarch supportSamuel Thibault
We don't have support for this yet. * Makefile.am (clib-routines.o): Check for the presence of __init_cpu_features, and in such case refuse to continue.
2014-11-02Fix build when gcc avoids inliningSamuel Thibault
* ipc/ipc_port.h (ipc_port_flag_protected_payload, ipc_port_flag_protected_payload_set, ipc_port_flag_protected_payload_clear): Use static inline qualifier instead of extern inline.
2014-10-22Revert "Make sure mig is available"Samuel Thibault
This reverts commit b28e05e203e0739fa5db59c5af378b29eea7a232.
2014-10-10doc: restore section `Inherited Ports'Justus Winter
Previously, the section `Inherited Ports' was commented out. This was done, as the functionality was unused by the Hurd. The functions `mach_ports_register' and `mach_ports_lookup' were never removed, and are exposed to user space. This patch brings the documentation back and adds a remark at the top, that the section documents the original intentions for this interface. I chose bringing back the documentation over removing the functionality because I like to make use of it as a method for service discovery that is deliberately orthogonal to the way the service lookup is usually done in the Hurd. This can be used to implement robust low-level debugging facilities. * doc/mach.texi: Restore section `Inherited Ports'.