summaryrefslogtreecommitdiff
path: root/linux/dev/glue/kmem.c
AgeCommit message (Collapse)Author
2012-03-20Change types holding cpu flags from int to longGuillem Jover
On amd64 the cpu flags is a 64-bit word, and long on 32-bit systems is 32-bit wide anyway. * linux/dev/glue/kmem.c (linux_kmalloc, linux_kfree, __get_free_pages, free_pages): Use unsigned long instead of unsigned. * linux/dev/include/asm-i386/system.h (__save_flags, __restore_flags): Likewise. * linux/dev/kernel/printk.c (printk): Likewise. * linux/src/drivers/scsi/advansys.c (DvcEnterCritical, DvcLeaveCritical, advansys_queuecommand, advansys_abort, advansys_reset, advansys_interrupt, interrupts_enabled, AdvISR): Likewise. * linux/src/drivers/scsi/aha152x.c (aha152x_intr): Likewise. * linux/src/drivers/scsi/aha1542.c (aha1542_intr_handle): Likewise. * linux/src/drivers/scsi/aic7xxx.c (aic7xxx_done_cmds_complete): Likewise. * linux/src/drivers/scsi/ultrastor.c (log_ultrastor_abort, ultrastor_queuecommand, ultrastor_abort): Likewise.
2011-10-10Raise Linux kmem memory sizeSamuel Thibault
* linux/dev/glue/kmem.c (MEM_CHUNKS): Increase 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-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-08-31Fix declarationsSamuel Thibault
* device/ds_routines.h (io_done_list): Add variable declaration. (device_io_map): Keep variable declaration and move definition to... * device/ds_routines.c: ... here. * i386/i386/fpu.c: Include <i386/pic.h> (curr_ipl): Remove declaration. (fpintr): Add int unit parameter. * linux/dev/glue/glue.h: New header. * i386/i386/fpu.h (fpintr): Add function prototype. * i386/i386/hardclock.c (clock_interrupt, linux_timer_intr): Remove prototypes. [LINUX_DEV]: Include <linux/dev/glue/glue.h> * i386/i386/ipl.h (curr_ipl): Add declaration. * i386/i386/pic.h (curr_pic_mask, pic_mask, prtnull, intnull): Add declarations. * i386/i386at/kd.h (kdintr): Add declaration. * i386/i386at/pic_isa.c: Include <i386/fpu.h> and <i386at/kd.h> (intnull, fpintr, hardclock, kdintr, prtnull): Remove prototypes. * i386/xen/xen.c: Include <kern/mach_clock.h> (clock_interrupt): Remove prototype. * linux/dev/arch/i386/kernel/irq.c: Include <linux/dev/glue/glue.h> and <machine/machspl.h> (linux_timer_intr, splhigh, spl0, curr_ipl, curr_pic_mask, pic_mask, get_options): Remove declarations. * linux/dev/drivers/block/floppy.c: Include <linux/dev/glue/glue.h> (issig, get_options): Remove declarations. * linux/dev/drivers/block/genhd.c: Include <linux/dev/glue/glue.h> (linux_intr_pri): Remove declaration. * linux/dev/glue/block.c: Include <devices/ds_routines.h> and <linux/dev/glue/glue.h>. (device_io_map, blksize_size): Remove declarations. * linux/dev/glue/kmem.c: Include <kern/printf.h> and <linux/dev/glue/glue.h> (alloc_contig_mem, printf): Remove declarations. * linux/dev/glue/misc.c: Include <printf.h> and <linux/dev/glue/glue.h> (vm_map_lookup_entry, printf): Remove prototypes. * linux/dev/glue/net.c: Include <kern/printf.h>, <device/ds_routines.h> and <linux/dev/glue/glue.h>. (linux_intr_pri, io_done_list): Remove declarations. * linux/dev/init/main.c: Include <machine/model_dep.h> and <linux/dev/glue/glue.h>. (phys_last_addr, alloc_contig_mem, free_contig_mem, init_IRQ, restore_IRQ, startrtclock, linux_version_init, linux_kmem_init, pci_init, linux_net_emulation_init, device_setup, linux_printk, linux_timer_intr, spl0, splhigh, form_pic_mask, linux_bad_intr, prtnull, intnull, linux_sched_init, pcmcia_init): Remove declarations. * linux/dev/kernel/sched.c: Include <kern/printf.h>, <machine/machspl.h> and <linux/dev/glue/glue.h>. (alloc_contig_mem, free_contig_mem, splhigh, splx, linux_soft_intr, issig, printf, linux_auto_config): Remove prototypes. * linux/dev/kernel/softirq.c: Include <linux/dev/glue/glue.h>. * linux/src/drivers/block/floppy.c: Include <linux/dev/glue/glue.h>. (get_options): Remove prototype. * linux/src/init/main.c: Include <linux/dev/glue/glue.h> (init_IRQ): Remove prototype.
2010-07-31Put a name on the 16MiB magic numberSamuel Thibault
* linux/dev/glue/kmem.c (MEM_DMA_LIMIT): New macro (linux_kmem_init): Replace 16 * 1024 * 1024 occurrences with MEM_DMA_LIMIT.
2009-06-182007-04-25 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
* linux/dev/glue/kmem.c (vmalloc_list_remove): Cast the first argument in the `kfree' call to what is expected.
2009-06-182006-05-12 Stefan Siegl <stesie@brokenpipe.de>Thomas Schwinge
* linux/dev/glue/kmem.c (vfree): Panic if `vmalloc_list_lookup' did NOT succeed.
1999-04-261999-02-04 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>Thomas Bushnell
* device/kmsg.c (kmsginit): Add a missing semicolon. (kmsggetstat): Fix typos, DEV_GET_DEVICE_SIZE -> DEV_GET_SIZE_DEVICE_SIZE and DEV_GET_RECORD_SIZE -> DEV_GET_SIZE_RECORD_SIZE. (kmsg_putchar): Fix a typo kmsg_done_init -> kmsg_init_done. * linux/dev/glue/block.c (device_get_status): Allocate a hd_geometry on the stack. * linux/dev/drivers/block/ide.c: New file. * linux/dev/drivers/scsi/sd_ioctl.c: New file. 1999-02-01 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp> * linux/dev/glue/block.c (dev_getstat): Fix a missing `struct'. * device/cons.c (cninit): Don't call kmsginit. * kmsg.c (kmsg_buffer): Defined as static. (kmsg_write_offset): Likewise. (kmsg_read_offset): Likewise. (kmsg_read_queue): Likewise. (kmsg_in_use): Likewise. (kmsg_lock): Likewise. (kmsginit): Likewise, and call queue_init instead of setting PREV and NEXT manually. (kmsg_done_init): New variable. (kmsg_putchar): Call kmsginit if not initialized yet. (kmsggetstat): New function. * kmsg.h (kmsggetstat): Add the prototype. * i386/i386at/kd_event.c (kbdgetstat): Handle DEV_GET_SIZE. (kbdread): Check if the amount a user specify is a multiple of sizeof(kd_event). * i386/i386at/kd_mouse.c (mousegetstat): New function. (mouseread): Check if the amount a user specify is a multiple of sizeof(kd_event). * i386/i386at/conf.c (dev_name_list): Set the mouse getstat entry to mousegetstat and the kmsg getstat entry to kmsggetstat. Use MACH_COM instead of NCOM to determine if com is used. Use MACH_LPR instead of NLPR to determine if lpr is used. * configure.in (--enable-com): New option. (--enable-lpr): Likewise. * Makefile.in (enable_com): New variable. (enable_lpr): Likewise. * i386/Makefrag (i386at-files): Remove com.c. (objfiles): Add com.o if enable_com is yes, and lpr.o if enable_lpr is yes. 1999-01-24 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp> * device/kmsg.h (KMSGBUFSIZE): Deleted. * device/kmsg.c: Rewritten completely to provide stream interface. * linux/dev/glue/block.c (device_getstat): Added V_GETPARMS support. * config.guess: New version from automake-1.4. * config.sub: Likewise. * install-sh: Likewise. 1998-12-30 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp> * linux/dev/glue/net.c (dev_alloc_skb): Change the skb arragement. (dev_kfree_skb): Free only skb. (device_write): Keep skb elements up-to-date. 1998-12-02 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp> * configure.in: Fix linuxdev option handling. * linux/Drivers.in: Remove linuxdev option and fix linking files. * linux/Makefile.in: Replace @DEFS@ with -DLINUX_DEV. * linux/dev/arch/i386/kernel/irq.c: Include missing header files. * linux/dev/arch/i386/kernel/setup.c: Include <device-drivers.h>. * linux/dev/glue/kmem.c: Add printf declaration. * linux/dev/glue/misc.c: Include <linux/types.h>. * linux/dev/init/main.c: Call linux_sched_init instead of sched_init. * linux/dev/kernel/sched.c: Add timer_bh declaration. (tqueue_bh): Fix the argument. (linux_sched_init): Renamed from sched_init. 1998-11-30 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp> Clean up linux emulation code to make it architecture-independent as much as possible. * linux: Renamed from linuxdev. * Makefile.in (objfiles): Add linux.o instead of linuxdev.o. (MAKE): New variable. Used for the linux.o target. * configure.in: Add AC_CHECK_TOOL(MAKE, make). * i386/i386/spl.h: Include <i386/ipl.h>, for compatibility with OSF Mach 3.0. Suggested by Elgin Lee <ehl@funghi.com>. * linux/src: Renamed from linux/linux. * linux/dev: Renamed from linux/mach. * linux/Drivers.in (AC_INIT): Use dev/include/linux/autoconf.h, instead of mach/include/linux/autoconf.h. * Makefile.in (all): Target ../linux.o instead of ../linuxdev.o. * linux/dev/drivers/block/genhd.c: Include <machine/spl.h> instead of <i386/ipl.h>. * linux/dev/drivers/net/auto_irq.c: Remove unneeded header files, <i386/ipl.h> and <i386/pic.h>. * linux/dev/init/main.c: Many i386-dependent codes moved to ... * linux/dev/arch/i386/irq.c: ... here. * linux/dev/arch/i386/setup.c: New file. * linux/dev/arch/i386/linux_emul.h: Likewise. * linux/dev/arch/i386/glue/timer.c: Merged into sched.c. * linux/dev/arch/i386/glue/sched.c: Include <machine/spl.h> instead of <i386/ipl.h>, and moved to ... * linux/dev/kernel/sched.c: ... here. * linux/dev/arch/i386/glue/block.c: Include <machine/spl.h> and <linux_emul.h>, instead of i386-dependent header files, and moved to ... * linux/dev/glue/blocl.c: ... here. * linux/dev/arch/i386/glue/net.c: Include <machine/spl.h> and <linux_emul.h>, instead of i386-dependent header files, and moved to ... * linux/dev/glue/net.c: ... here. * linux/dev/arch/i386/glue/misc.c: Remove `x86' and moved to ... * linux/dev/glue/misc.c: ... here. * linux/dev/arch/i386/glue/kmem.c: Moved to ... * linux/dev/glue/kmem.c: ... here.