summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-12-17Import utility filesRichard Braun
* Makefrag.am (libkernel_a_SOURCES): Add kern/list.h, kern/rbtree.c, kern/rbtree.h and kern/rbtree_i.h. * kern/list.h: New file. * kern/rbtree.c: Likewise. * kern/rbtree.h: Likewise. * kern/rbtree_i.h: Likewise. * kern/macro_help.h (MACRO_BEGIN): Use GNU C compound statement enclosed in parentheses. (MACRO_END): Likewise.
2011-11-27Keep frame pointer when debugger is enabledSamuel Thibault
* Makefrag.am (AM_CFLAGS) [enable_kdb]: Add -fno-omit-frame-pointer.
2011-10-16Merge branch 'master' of callisto:gnumachSamuel Thibault
2011-10-16Do not map xen driver pagesSamuel Thibault
* xen/block.c (hyp_block_init): Use vm_page_grab_phys_addr instead of kmem_alloc_wired to allocate driver pages. * xen/net.c (hyp_net_init): Likewise.
2011-10-16Increase kmem area for the Xen case.Samuel Thibault
Kernel tacks are 4 pages in the Xen case, so we need more kmem space. * i386/i386/vm_param.h (VM_KERNEL_MAP_SIZE) [MACH_XEN]: Increase to 224MiB.
2011-10-10Raise block device interrupt level to SPL6Samuel Thibault
* linux/dev/drivers/block/genhd.c (device_setup): Set linux_intr_pri to SPL6. * linux/dev/glue/block.c (init_partition, device_open): Likewise.
2011-10-10Raise Linux kmem memory sizeSamuel Thibault
* linux/dev/glue/kmem.c (MEM_CHUNKS): Increase to 32.
2011-10-10Leave interrupts enabled in sym53c8xx driverSamuel Thibault
The driver can work with them, and request_irq works fine with them. * linux/src/drivers/scsi/sym53c8xx.c (ncr_attach): Do not pass SA_INTERRUPT to request_irq().
2011-10-09Define BITS_PER_LONG for Linux codeSamuel Thibault
* linux/src/include/asm-i386/types.h (BITS_PER_LONG): Define to 32.
2011-10-08Add sym53c8xx driver from linux 2.2Samuel Thibault
This driver supports qemu's SCSI host device. Unfortunately it seems to be breaking the network device, so test with care. * linux/Makefrag.am (liblinux_a_SOURCES): Add linux/src/drivers/scsi/sym53c8xx{.c,_comm.h,.h,_defs.h} * linux/configfrag.ac: Add AC_Linux_DRIVER([sym53c8xx] to enable CONFIG_SCSI_SYM53C8XX. * linux/dev/glue/kmem.c (MEM_CHUNKS): Increase to 16. * linux/src/drivers/scsi/hosts.c [CONFIG_SCSI_SYM53C8XX]: Include "sym53c8xx.h". (builtin_scsi_hosts): include SYM53C8XX.
2011-09-28fix copy out-of-line data when length >= 512MBSergio Lopez
* ipc/ipc_kmsg.c (ipc_kmsg_copyin_body): Change length type to unsigned64_t. Cast number to unsigned64_t. (ipc_kmsg_copyout_body): Likewise.
2011-09-28Make thread_suspend honor the TH_UNINT flagSergio López
Interrupting a thread without a continuation, puts it in a inconsistent state. This is the cause for the bug described in https://lists.gnu.org/archive/html/bug-hurd/2011-09/msg00148.html * kern/thread.c (thread_suspend): Fail with KERN_FAILURE if thread is uninterruptible.
2011-09-12Remove unused [!MACH_KERNEL] driver codeGuillem Jover
Use «unifdef -DMACK_KERNEL=1» as a starting point, but only remove the code not exposed on public headers, the rest is needed to build properly from userland. * device/cons.c [!MACH_KERNEL]: Remove includes. [!MACH_KERNEL] (constty): Remove variable. (cninit, cnmaygetc) [MACH_KERNEL]: Remove preprocessor conditionals. [!MACH_KERNEL] (cnopen, cnclose, cnread, cnwrite, cnioctl, cnselect) (cncontrol): Remove functions. * device/cons.h (struct consdev) [MACH_KERNEL]: Remove preprocessor conditional. * device/kmsg.h [MACH_KERNEL]: Likewise. * i386/i386at/autoconf.c [!MACH_KERNEL]: Remove includes. * i386/i386at/kd_event.c [!MACH_KERNEL]: Likewise. [!MACH_KERNEL] (kbd_sel, kbdpgrp, kbdflag): Remove variables. [!MACH_KERNEL] (KBD_COLL, KBD_ASYNC, KBD_NBIO): Remove macros. (kbdopen, kbdclose, kbd_enqueue) [!MACH_KERNEL]: Remove code. [!MACH_KERNEL] (kbdioctl, kbdselect, kbdread): Remove functions. [!MACH_KERNEL] (X_kdb_enter_init, X_kdb_exit_init: Likewise. * i386/i386at/kd_mouse.c [!MACH_KERNEL]: Remove includes. [!MACH_KERNEL] (mouse_sel, mousepgrp, mouseflag): Remove variables. [!MACH_KERNEL] (MOUSE_COLL, MOUSE_ASYNC, MOUSE_NBIO): Remove macros. (mouseopen, mouseclose, kd_mouse_read, mouse_enqueue) [!MACH_KERNEL]: Remove code. [!MACH_KERNEL] (mouseioctl, mouseselect, mouseread): Remove functions. * i386/i386at/lpr.c [!MACH_KERNEL]: Remove includes. (lpropen) [MACH_KERNEL]: Remove preprocessor conditionals. (lpropen, lprclose, lprstart) [!MACH_KERNEL]: Remove code. [!MACH_KERNEL] (lprwrite, lprioctl, lprstop): Remove functions. * i386/i386at/rtc.c (readtodc, writetodc) [!MACH_KERNEL]: Remove code. * kern/mach_factor.c [MACH_KERNEL]: Remove preprocessor conditional. * xen/time.c (readtodc) [!MACH_KERNEL]: Remove code.
2011-09-09Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2011-09-09Do not take unused strpbrk() from libcGuillem Jover
* Makefile.am (clib_routines): Remove strpbrk.
2011-09-06* .gitignore: Tighten some rules, and distribute others to...Thomas Schwinge
* doc/.gitignore: ... here; * i386/i386/.gitignore: ... here; * tests/.gitignore: ..., and here.
2011-09-06* i386/i386/pcb.h (stack_attach): Parameterize the continuation parameter'sThomas Schwinge
parameter list. * i386/i386/pcb.c (stack_attach): Likewise.
2011-09-06Move i386/i386/locore.S declarations.Thomas Schwinge
* i386/i386/trap.c (recover_table, recover_table_end, retry_table) (retry_table_end): Move declarations to... * i386/i386/locore.h: ... here.
2011-09-06Further prototyping work for memory_object_proxy.c functions.Thomas Schwinge
* vm/memory_object_proxy.h: Add #includes. (memory_object_proxy_lookup): New declaration. * vm/memory_object_proxy.c: #include <vm/memory_object_proxy.h>. * vm/vm_user.c: Likewise. (memory_object_proxy_lookup): Drop declaration. Parts based on a patch by Fridolín Pokorný <fridolin.pokorny@gmail.com>.
2011-09-05Drop module memory free verbositySamuel Thibault
* kern/bootstrap.c (bootstrap_create): Do not show freed module memory.
2011-09-05Free memory used by boot modulesSamuel Thibault
* vm/vm_resident.c (pmap_startup): Warn when some pages could not be included in the allocator due to bad estimation. * kern/bootstrap.c: Include <vm/pmap.h>. (bootstrap_create): Call vm_page_create on bootstrap modules content.
2011-09-03Add prototypes for memory_object_proxy.c functionsFridolín Pokorný
* vm/memory_object_proxy.h: Add file. * vm/vm_init.c: Include <vm/memory_object_proxy.h>. * kern/ipc_kobject.c: Likewise. * Makefile.am (libkernel_a_SOURCES): Add vm/memory_object_proxy.h.
2011-09-03Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/gnumachSamuel Thibault
2011-09-02Remove long obsolete RPC routinesGuillem Jover
* kern/compat_xxx_defs.h: Remove file. * Makefrag.am (libkernel_a_SOURCES): Remove `kern/compat_xxx_defs.h'. * include/mach/mach_types.defs (xxx_emulation_vector_t): Remove type. * device/device.srv: Do not simport <kern/compat_xxx_defs.h>. * kern/mach.srv: Likewise. * kern/mach_host.srv: Likewise. * include/device/device.defs [MACH_KERNEL]: Do not simport <kern/compat_xxx_defs.h>. (xxx_device_set_status, xxx_device_get_status) (xxx_device_set_filter): Replace routine declarations with skip directives. * include/mach/mach.defs [MACH_KERNEL]: Do not simport <kern/compat_xxx_defs.h>. (xxx_memory_object_lock_request, xxx_task_get_emulation_vector) (xxx_task_set_emulation_vector, xxx_host_info, xxx_slot_info) (xxx_cpu_control, xxx_task_info, xxx_thread_get_state) (xxx_thread_set_state, xxx_thread_info): Replace routine declarations with skip directive. * include/mach/mach_host.defs [MACH_KERNEL]: Do not simport <kern/compat_xxx_defs.h>. (yyy_host_info, yyy_processor_info, yyy_processor_control) (xxx_processor_set_default_priv, yyy_processor_set_info): Replace routine declarations with skip directive. * kern/ipc_host.c (xxx_processor_set_default_priv): Remove function. * kern/machine.c (xxx_host_info, xxx_slot_info) (xxx_cpu_control): Likewise. * kern/syscall_emulation.c (xxx_task_set_emulation_vector) (xxx_task_get_emulation_vector): Likewise. * vm/memory_object.c (xxx_memory_object_lock_request): Likewise.
2011-09-02Do not remap errno codes from E* to LINUX_E*Guillem Jover
Mach no longer uses any of the old and clashing errno E* codes, so it's safe to use them now w/o namespacing. This also means one less modification needed to the Linux code. * linux/dev/include/asm-i386/errno.h: Remove file. * linux/dev/kernel/dma.c (notifier_chain_unregister) [MACH_INCLUDE]: Remove code. * linux/dev/include/linux/notifier.h: Likewise. * linux/dev/arch/i386/kernel/irq.c (setup_x86_irq): Rename LINUX_EBUSY to EBUSY. (request_irq): Rename LINUX_EINVAL to EINVAL. * linux/dev/glue/block.c (register_blkdev): Rename LINUX_EBUSY to EBUSY and LINUX_EINVAL to EINVAL. (unregister_blkdev): Rename LINUX_EINVAL to EINVAL. (rdwr_partial) Rename LINUX_ENOMEM to ENOMEM and LINUX_EIO to EIO. * linux/dev/glue/misc.c (linux_to_mach_error): Rename LINUX_EPERM to EPERM, LINUX_EIO to EIO, LINUX_ENXIO to ENXIO, LINUX_EACCES to EACCES, LINUX_EFAULT to EFAULT, LINUX_EBUSY to EBUSY, LINUX_EINVAL to EINVAL, LINUX_EROFS to EROFS, LINUX_EWOULDBLOCK to EWOULDBLOCK and LINUX_ENOMEM to ENOMEM. (verify_area): Rename LINUX_EFAULT to EFAULT. * linux/dev/kernel/resource.c (check_region): Rename LINUX_EBUSY to EBUSY. * linux/dev/kernel/sched.c (__do_down): Rename LINUX_EINTR to EINTR.
2011-09-02Use Mach native error codes instead of POSIX errno E* onesGuillem Jover
* device/errno.h: Remove file. * Makefrag.am (libkernel_a_SOURCES): Remove `device/errno.h'. * i386/i386at/com.c: Include <device/device_types.h> instead of <device/errno.h>. (comopen): Replace ENXIO with D_NO_SUCH_DEVICE. * i386/i386at/kd_event.c: Include <device/device_types.h> instead of <device/errno.h>. * i386/i386at/kd_mouse.c: Likewise. (mouseopen): Replace ENODEV with D_NO_SUCH_DEVICE and EBUSY with D_ALREADY_OPEN. * i386/i386at/lpr.c: Include <device/device_types.h> instead of <device/errno.h>. (lpropen): Replace ENXIO with D_NO_SUCH_DEVICE and EBUSY with D_ALREADY_OPEN.
2011-09-02Change argument name to match function body usageGuillem Jover
Otherwise the function wrongly uses the global symbol. * linux/src/drivers/scsi/ppa.c (ppa_nibble_in): Rename `str_p' argument to `base'.
2011-09-02Disable set but unused variableGuillem Jover
* linux/src/drivers/scsi/gdth.c (gdth_detect): Conditionalize `b' on [LINUX_VERSION_CODE < 0x020000]. Do not preset it to 0, it's initialized later on when needed.
2011-09-02Remove set but unused variablesGuillem Jover
* linux/dev/drivers/block/floppy.c (setup_rw_floppy): Remove `dflags'. (floppy_eject): Remove `dummy'. * linux/src/drivers/net/8390.c (ethdev_init): Remove `ei_local'. * linux/src/drivers/scsi/ppa.c (ppa_detect): Remove `ppb'.
2011-09-02Cast addr argument to vm_offset_tGuillem Jover
* linux/dev/glue/kmem.c (vfree): Cast `addr' argument on kfree_mem function to vm_offset_t.
2011-09-02Add vsnprintf prototypeGuillem Jover
* kern/printf.h (vsnprintf): New prototype.
2011-09-02Add missing headersGuillem Jover
* linux/dev/init/main.c: Include <linux/pci.h>. * linux/dev/kernel/printk.c: Include <kern/printf.h>.
2011-09-01Add missing header file to the distribution.Ludovic Courtès
* linux/Makefrag.am (liblinux_a_SOURCES): Add `linux/dev/glue/glue.h', which appeared in commit 2b4bff9914d57bff600ac70194b8b1aab3485bee ("Fix declarations").
2011-09-01Fix documentationSamuel Thibault
2011-09-01Close kernel stacks.Samuel Thibault
* i386/i386/pcb.c (stack_attach): Initialize ebp to 0.
2011-09-01Fix PC samplingSamuel Thibault
interrupt.S now saves the IRQ on the stack to acknowledge it later. * i386/i386/hardclock.c (hardclock): Add irq parameter. * i386/i386at/kd.c (kdintr, kdcheckmagic): Remove regs parameter. * i386/i386at/kd.h (kdintr): Likewise.
2011-08-31Add silent rules support if available and disable it by defaultGuillem Jover
* configure.ac (AM_SILENT_RULES): Add silent rules support if available, and disable it by default. * Makefile.am (AWK_V, AWK_V_, AWK_V_0): New variables. (NM_V, NM_V_, NM_V_0): Likewise. (GZIP_V, GZIP_V_, GZIP_V_0): Likewise. (MIGCOM_V, MIGCOM_V_, MIGCOM_V_0): Likewise. (gnumach-undef): Use NM_V in front of NM. (gnumach-undef-bad): Use AM_V_GEN in front of sed. (clib-routines.o): Use AM_V_at in fron of undefined symbols check. Use AM_V_CCLD in front of CCLD. * Makefrag.am (gnumach.msgids): Use AM_V_GEN in front of cat. * Makerules.am (%.symc): Use AWK_V in front of AWK. (%.symc.o): Use AM_V_CC in front of COMPILE. (%.h): Use AM_V_GEN in front of sed. (%.gz): Use GZIP_V in front of GZIP. * Makerules.mig.am (%.user.defs.c): Use AM_V_GEN in front of command. (%.server.defs.c): Likewise. (%.user.h %.user.c %.user.msgids): Use MIGCOM_V in front of MIGCOM. (%.server.h %.server.c %.server.msgids): Likewise.
2011-08-31Optimize copyout pathSamuel Thibault
* i386/i386/locore.S (copyout): Remove RETRY() use from >=i486 variant. Move copyout_ret and copyout_fail.
2011-08-31Fix copyout retry on lazy allocation on >= i486Samuel Thibault
* i386/i386/locore.S (copyout): Add a >=i486 variant of copyout which uses no loop, but simply retries rep mov.
2011-08-31Disable global page while writing in kernel spaceSamuel Thibault
* i386/i386/db_interface.c (db_write_bytes): If CPU has PGE feature, disable CR4_PGE before enabling kernel page write access, and re-enable the former after disabling the latter.
2011-08-31Protect set_cr3 against compiler assignment optimizationsSamuel Thibault
This fixes the kdb `break' command. i386/i386/proc_reg.h (set_cr3): Add "memory" clobber.
2011-08-31Fix undefined operation on assigning self pre-incremented variableGuillem Jover
* linux/src/drivers/scsi/wd7000.c (mail_out): Add `1' instead of pre-incrementing self assigned variable. * linux/src/drivers/net/de4x5.c (de4x5_sw_reset, de4x5_queue_pkt, de4x5_rx) (de4x5_tx, de4x5_rx_ovfc, set_multicast_list, ping_media, mii_get_phy) (de4x5_ioctl): Likewise. * linux/src/drivers/net/depca.c (depca_rx, depca_tx, load_packet): Likewise.
2011-08-31Honour type promotion on variable argument handlingGuillem Jover
* linux/dev/lib/vsprintf.c (linux_vsprintf): Use `int' when retrieving a `short' through `va_arg'.
2011-08-31Correct MiG Mach types to fix compilation warningsGuillem Jover
* include/mach/mach_types.defs (thread_info_t): Change from array of natural_t to integer_t. (task_info_t): Likewise. (host_info_t): Likewise. (processor_info_t): Likewise. (processor_set_info_t): Likewise.
2011-08-31Denote __exit symbols as usedGuillem Jover
* linux/src/include/linux/init.h: Include <linux/compiler.h>. (__exitused): New macro. (__exit): Define to ` __exitused __cold notrace'. * linux/src/include/linux/kcomp.h (__exit): Remove.
2011-08-31Move <linux/init.h> from linux/pcmcia-cs to linux/srcGuillem Jover
* linux/pcmcia-cs/include/linux/init.h: Move to ... * linux/src/include/linux/init.h: ... here.
2011-08-31Import Linux 3.1 compiler definitionsGuillem Jover
* linux/src/include/linux/compiler.h: New file. * linux/src/include/linux/compiler-gcc.h: Likewise. * linux/src/include/linux/compiler-gcc3.h: Likewise. * linux/src/include/linux/compiler-gcc4.h: Likewise. * linux/dev/include/linux/kernel.h (barrier): Remove definition and include <linux/compiler.h> instead.
2011-08-31Import Linux 3.1 ctype codeGuillem Jover
* linux/src/include/linux/ctype.h: Update file. * linux/src/lib/ctype.c: Likewise.
2011-08-31Remove unused and non-functional string specialization headerGuillem Jover
* linux/src/include/asm-i386/string-486.h: Remove.
2011-08-31Fix memcmp prototypeGuillem Jover
* include/string.h (memcmp): Remove bogus `*' from return type.