Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 19:38:13 +0000 (11:38 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 19:38:13 +0000 (11:38 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits)
  [IPV4]: Restore multipath routing after rt_next changes.
  [XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch.
  [NET]: Reorder fields of struct dst_entry
  [DECNET]: Convert decnet route to use the new dst_entry 'next' pointer
  [IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer
  [IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer
  [NET]: Introduce union in struct dst_entry to hold 'next' pointer
  [DECNET]: fix misannotation of linkinfo_dn
  [DECNET]: FRA_{DST,SRC} are le16 for decnet
  [UDP]: UDP can use sk_hash to speedup lookups
  [NET]: Fix whitespace errors.
  [NET] XFRM: Fix whitespace errors.
  [NET] X25: Fix whitespace errors.
  [NET] WANROUTER: Fix whitespace errors.
  [NET] UNIX: Fix whitespace errors.
  [NET] TIPC: Fix whitespace errors.
  [NET] SUNRPC: Fix whitespace errors.
  [NET] SCTP: Fix whitespace errors.
  [NET] SCHED: Fix whitespace errors.
  [NET] RXRPC: Fix whitespace errors.
  ...

616 files changed:
CREDITS
Documentation/ABI/testing/debugfs-pktcdvd
Documentation/ABI/testing/sysfs-class-pktcdvd
Documentation/DocBook/gadget.tmpl
Documentation/DocBook/kernel-api.tmpl
Documentation/DocBook/stylesheet.xsl
Documentation/DocBook/usb.tmpl
Documentation/auxdisplay/cfag12864b [new file with mode: 0644]
Documentation/auxdisplay/cfag12864b-example.c [new file with mode: 0644]
Documentation/auxdisplay/ks0108 [new file with mode: 0644]
Documentation/cdrom/packet-writing.txt
Documentation/feature-removal-schedule.txt
Documentation/filesystems/relay.txt
Documentation/ioctl-number.txt
Documentation/kernel-doc-nano-HOWTO.txt
Documentation/kernel-parameters.txt
Documentation/local_ops.txt [new file with mode: 0644]
Documentation/rbtree.txt [new file with mode: 0644]
Documentation/rtc.txt
Documentation/sysrq.txt
MAINTAINERS
arch/alpha/Kconfig
arch/alpha/kernel/time.c
arch/alpha/kernel/vmlinux.lds.S
arch/arm/Kconfig
arch/arm/kernel/time.c
arch/arm/kernel/vmlinux.lds.S
arch/arm26/Kconfig
arch/arm26/kernel/ecard.c
arch/arm26/kernel/time.c
arch/arm26/kernel/vmlinux-arm26-xip.lds.in
arch/arm26/kernel/vmlinux-arm26.lds.in
arch/avr32/kernel/time.c
arch/avr32/kernel/vmlinux.lds.c
arch/cris/Kconfig
arch/cris/arch-v10/drivers/axisflashmap.c
arch/cris/arch-v10/kernel/time.c
arch/cris/arch-v10/mm/tlb.c
arch/cris/arch-v10/vmlinux.lds.S
arch/cris/arch-v32/mm/tlb.c
arch/cris/arch-v32/vmlinux.lds.S
arch/cris/kernel/time.c
arch/cris/mm/tlb.c
arch/frv/Kconfig
arch/frv/kernel/vmlinux.lds.S
arch/h8300/Kconfig
arch/h8300/kernel/Makefile
arch/h8300/kernel/time.c
arch/h8300/kernel/vmlinux.lds.S
arch/i386/Kconfig
arch/i386/kernel/vmlinux.lds.S
arch/i386/mm/fault.c
arch/i386/mm/highmem.c
arch/ia64/Kconfig
arch/ia64/ia32/binfmt_elf32.c
arch/ia64/ia32/ia32_entry.S
arch/ia64/ia32/sys_ia32.c
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/traps.c
arch/ia64/kernel/vmlinux.lds.S
arch/ia64/mm/contig.c
arch/ia64/mm/discontig.c
arch/ia64/mm/init.c
arch/ia64/sn/kernel/sn2/sn_proc_fs.c
arch/m32r/Kconfig
arch/m32r/Makefile
arch/m32r/defconfig
arch/m32r/kernel/head.S
arch/m32r/kernel/process.c
arch/m32r/kernel/signal.c
arch/m32r/kernel/time.c
arch/m32r/kernel/vmlinux.lds.S
arch/m32r/lib/ashxdi3.S
arch/m32r/lib/checksum.S
arch/m32r/lib/delay.c
arch/m32r/lib/memcpy.S
arch/m32r/lib/memset.S
arch/m32r/lib/strlen.S
arch/m32r/m32104ut/defconfig.m32104ut
arch/m32r/m32700ut/defconfig.m32700ut.smp
arch/m32r/m32700ut/defconfig.m32700ut.up
arch/m32r/mappi/defconfig.nommu
arch/m32r/mappi/defconfig.smp
arch/m32r/mappi/defconfig.up
arch/m32r/mappi2/defconfig.opsp [new file with mode: 0644]
arch/m32r/mappi2/defconfig.vdec2
arch/m32r/mappi3/defconfig.smp
arch/m32r/mm/fault-nommu.c
arch/m32r/mm/fault.c
arch/m32r/mm/mmu.S
arch/m32r/oaks32r/defconfig.nommu
arch/m32r/opsput/defconfig.opsput
arch/m68k/Kconfig
arch/m68k/kernel/Makefile
arch/m68k/kernel/ptrace.c
arch/m68k/kernel/time.c
arch/m68k/kernel/traps.c
arch/m68k/kernel/vmlinux-std.lds
arch/m68k/kernel/vmlinux-sun3.lds
arch/m68knommu/Kconfig
arch/m68knommu/kernel/ptrace.c
arch/m68knommu/kernel/time.c
arch/m68knommu/kernel/traps.c
arch/m68knommu/kernel/vmlinux.lds.S
arch/mips/Kconfig
arch/mips/kernel/linux32.c
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/time.c
arch/mips/kernel/vmlinux.lds.S
arch/mips/mm/cache.c
arch/mips/philips/pnx8550/common/proc.c
arch/parisc/Kconfig
arch/parisc/kernel/sys_parisc32.c
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/time.c
arch/parisc/kernel/vmlinux.lds.S
arch/parisc/mm/init.c
arch/powerpc/Kconfig
arch/powerpc/kernel/proc_ppc64.c
arch/powerpc/kernel/rtas_flash.c
arch/powerpc/kernel/sys_ppc32.c
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/platforms/iseries/mf.c
arch/powerpc/platforms/pseries/reconfig.c
arch/ppc/Kconfig
arch/ppc/kernel/vmlinux.lds.S
arch/s390/Kconfig
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/syscalls.S
arch/s390/kernel/vmlinux.lds.S
arch/s390/mm/Makefile
arch/s390/mm/fault.c
arch/s390/mm/ioremap.c [deleted file]
arch/sh/kernel/time.c
arch/sh/kernel/vmlinux.lds.S
arch/sh/mm/init.c
arch/sh64/Kconfig
arch/sh64/kernel/time.c
arch/sh64/kernel/vmlinux.lds.S
arch/sh64/mm/init.c
arch/sparc/Kconfig
arch/sparc/kernel/Makefile
arch/sparc/kernel/sunos_ioctl.c
arch/sparc/kernel/time.c
arch/sparc/kernel/vmlinux.lds.S
arch/sparc64/Kconfig
arch/sparc64/defconfig
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_common.c
arch/sparc64/kernel/pci_sun4v.c
arch/sparc64/kernel/pci_sun4v.h
arch/sparc64/kernel/pci_sun4v_asm.S
arch/sparc64/kernel/sunos_ioctl32.c
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/systbls.S
arch/sparc64/kernel/vmlinux.lds.S
arch/sparc64/mm/init.c
arch/um/Kconfig
arch/um/drivers/chan_kern.c
arch/um/drivers/harddog_kern.c
arch/um/drivers/harddog_user.c
arch/um/drivers/hostaudio_kern.c
arch/um/drivers/line.c
arch/um/drivers/mconsole_kern.c
arch/um/drivers/mconsole_user.c
arch/um/drivers/net_kern.c
arch/um/drivers/port_kern.c
arch/um/drivers/port_user.c
arch/um/drivers/random.c
arch/um/drivers/ssl.c
arch/um/drivers/stdio_console.c
arch/um/drivers/ubd_kern.c
arch/um/include/chan_kern.h
arch/um/include/chan_user.h
arch/um/include/kern_util.h
arch/um/include/line.h
arch/um/include/mconsole_kern.h
arch/um/include/net_kern.h
arch/um/include/os.h
arch/um/include/sigio.h
arch/um/include/tempfile.h
arch/um/include/umid.h [deleted file]
arch/um/kernel/Makefile
arch/um/kernel/exec.c
arch/um/kernel/irq.c
arch/um/kernel/mem.c
arch/um/kernel/physmem.c
arch/um/kernel/ptrace.c
arch/um/kernel/resource.c [deleted file]
arch/um/kernel/sigio.c
arch/um/kernel/skas/mem.c
arch/um/kernel/syscall.c
arch/um/kernel/sysrq.c
arch/um/kernel/time.c
arch/um/kernel/trap.c
arch/um/kernel/tt/gdb.c
arch/um/kernel/tt/gdb_kern.c
arch/um/kernel/um_arch.c
arch/um/kernel/umid.c
arch/um/os-Linux/aio.c
arch/um/os-Linux/elf_aux.c
arch/um/os-Linux/file.c
arch/um/os-Linux/irq.c
arch/um/os-Linux/mem.c
arch/um/os-Linux/start_up.c
arch/um/os-Linux/sys-i386/registers.c
arch/um/os-Linux/sys-x86_64/Makefile
arch/um/os-Linux/sys-x86_64/prctl.c [new file with mode: 0644]
arch/um/os-Linux/sys-x86_64/registers.c
arch/um/os-Linux/umid.c
arch/um/sys-x86_64/ptrace.c
arch/um/sys-x86_64/syscalls.c
arch/um/sys-x86_64/tls.c
arch/v850/Kconfig
arch/v850/kernel/anna.c
arch/v850/kernel/as85ep1.c
arch/v850/kernel/fpga85e2c.c
arch/v850/kernel/gbus_int.c
arch/v850/kernel/ma.c
arch/v850/kernel/me2.c
arch/v850/kernel/rte_cb.c
arch/v850/kernel/rte_mb_a_pci.c
arch/v850/kernel/rte_me2_cb.c
arch/v850/kernel/teg.c
arch/v850/kernel/time.c
arch/v850/kernel/vmlinux.lds.S
arch/x86_64/Kconfig
arch/x86_64/ia32/ia32_binfmt.c
arch/x86_64/ia32/ia32entry.S
arch/x86_64/ia32/sys_ia32.c
arch/x86_64/kernel/mce_amd.c
arch/x86_64/kernel/vmlinux.lds.S
arch/x86_64/mm/fault.c
arch/xtensa/Kconfig
arch/xtensa/kernel/time.c
arch/xtensa/kernel/vmlinux.lds.S
block/blktrace.c
block/ioctl.c
drivers/Kconfig
drivers/Makefile
drivers/atm/eni.c
drivers/auxdisplay/Kconfig [new file with mode: 0644]
drivers/auxdisplay/Makefile [new file with mode: 0644]
drivers/auxdisplay/cfag12864b.c [new file with mode: 0644]
drivers/auxdisplay/cfag12864bfb.c [new file with mode: 0644]
drivers/auxdisplay/ks0108.c [new file with mode: 0644]
drivers/base/node.c
drivers/block/DAC960.c
drivers/block/DAC960.h
drivers/block/Kconfig
drivers/block/paride/Kconfig
drivers/block/pktcdvd.c
drivers/char/Kconfig
drivers/char/amiserial.c
drivers/char/cyclades.c
drivers/char/epca.c
drivers/char/generic_serial.c
drivers/char/ip2/i2lib.c
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/isicom.c
drivers/char/istallion.c
drivers/char/keyboard.c
drivers/char/moxa.c
drivers/char/mxser.c
drivers/char/mxser.h
drivers/char/mxser_new.c
drivers/char/mxser_new.h
drivers/char/n_r3964.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/raw.c
drivers/char/rio/riointr.c
drivers/char/riscom8.c
drivers/char/rocket.c
drivers/char/serial167.c
drivers/char/specialix.c
drivers/char/synclink.c
drivers/char/synclink_gt.c
drivers/char/synclinkmp.c
drivers/char/sysrq.c
drivers/char/toshiba.c
drivers/char/tty_io.c
drivers/char/tty_ioctl.c
drivers/char/vt.c
drivers/char/vt_ioctl.c
drivers/firmware/edd.c
drivers/ide/ide-proc.c
drivers/infiniband/hw/ehca/ehca_cq.c
drivers/infiniband/hw/ehca/ehca_mrmw.c
drivers/infiniband/hw/ehca/ehca_pd.c
drivers/infiniband/hw/ehca/ehca_qp.c
drivers/input/gameport/ns558.c
drivers/isdn/gigaset/bas-gigaset.c
drivers/isdn/gigaset/interface.c
drivers/isdn/i4l/isdn_tty.c
drivers/macintosh/via-pmu.c
drivers/md/bitmap.c
drivers/media/video/zoran_driver.c
drivers/misc/hdpuftrs/hdpu_nexus.c
drivers/misc/ioc4.c
drivers/mtd/devices/block2mtd.c
drivers/net/ppp_generic.c
drivers/parisc/led.c
drivers/pci/Kconfig
drivers/pnp/base.h
drivers/pnp/pnpbios/rsparser.c
drivers/rapidio/rio-scan.c
drivers/rtc/Kconfig
drivers/rtc/Makefile
drivers/rtc/rtc-cmos.c [new file with mode: 0644]
drivers/s390/crypto/zcrypt_api.c
drivers/s390/net/lcs.c
drivers/sbus/sbus.c
drivers/scsi/53c7xx.c
drivers/scsi/aic94xx/aic94xx_hwi.c
drivers/scsi/scsi_lib.c
drivers/serial/8250.c
drivers/serial/8250_pci.c
drivers/serial/Kconfig
drivers/serial/crisv10.c
drivers/serial/ioc4_serial.c
drivers/serial/serial_txx9.c
drivers/sn/ioc3.c
drivers/tc/zs.c
drivers/usb/gadget/file_storage.c
drivers/usb/gadget/rndis.c
drivers/usb/host/hc_crisv10.c
drivers/usb/host/uhci-q.c
drivers/usb/serial/digi_acceleport.c
drivers/usb/serial/keyspan_pda.c
drivers/usb/serial/mos7720.c
drivers/usb/serial/mos7840.c
drivers/video/sa1100fb.h
fs/9p/vfs_file.c
fs/Kconfig
fs/aio.c
fs/binfmt_elf_fdpic.c
fs/buffer.c
fs/coda/sysctl.c
fs/configfs/dir.c
fs/dlm/memory.c
fs/dquot.c
fs/drop_caches.c
fs/ecryptfs/crypto.c
fs/ecryptfs/file.c
fs/ecryptfs/inode.c
fs/ecryptfs/keystore.c
fs/ecryptfs/main.c
fs/exec.c
fs/ext2/dir.c
fs/ext2/super.c
fs/ext3/inode.c
fs/ext3/namei.c
fs/ext3/super.c
fs/ext4/inode.c
fs/ext4/namei.c
fs/ext4/super.c
fs/fuse/file.c
fs/fuse/inode.c
fs/gfs2/meta_io.c
fs/hfs/hfs.h
fs/hfsplus/hfsplus_raw.h
fs/inode.c
fs/jffs/inode-v23.c
fs/namespace.c
fs/partitions/check.c
fs/partitions/msdos.c
fs/partitions/sgi.c
fs/partitions/sun.c
fs/proc/base.c
fs/proc/proc_misc.c
fs/ramfs/file-mmu.c
fs/ramfs/file-nommu.c
fs/read_write.c
fs/smbfs/request.c
fs/sysfs/dir.c
include/asm-alpha/mman.h
include/asm-alpha/percpu.h
include/asm-alpha/termios.h
include/asm-arm/spinlock.h
include/asm-arm/termios.h
include/asm-arm/uaccess.h
include/asm-arm26/termios.h
include/asm-arm26/uaccess-asm.h
include/asm-avr32/termios.h
include/asm-cris/semaphore-helper.h
include/asm-cris/system.h
include/asm-cris/termios.h
include/asm-frv/termios.h
include/asm-generic/memory_model.h
include/asm-generic/mman.h
include/asm-h8300/termios.h
include/asm-i386/atomic.h
include/asm-i386/bitops.h
include/asm-i386/termios.h
include/asm-i386/uaccess.h
include/asm-ia64/termios.h
include/asm-m32r/a.out.h
include/asm-m32r/addrspace.h
include/asm-m32r/bugs.h
include/asm-m32r/byteorder.h
include/asm-m32r/cache.h
include/asm-m32r/cacheflush.h
include/asm-m32r/current.h
include/asm-m32r/delay.h
include/asm-m32r/dma.h
include/asm-m32r/errno.h
include/asm-m32r/ide.h
include/asm-m32r/ioctls.h
include/asm-m32r/ipcbuf.h
include/asm-m32r/kmap_types.h
include/asm-m32r/m32104ut/m32104ut_pld.h
include/asm-m32r/m32700ut/m32700ut_lan.h
include/asm-m32r/m32700ut/m32700ut_lcd.h
include/asm-m32r/m32700ut/m32700ut_pld.h
include/asm-m32r/mappi2/mappi2_pld.h
include/asm-m32r/mappi3/mappi3_pld.h
include/asm-m32r/mc146818rtc.h
include/asm-m32r/mman.h
include/asm-m32r/mmu.h
include/asm-m32r/mmu_context.h
include/asm-m32r/module.h
include/asm-m32r/msgbuf.h
include/asm-m32r/namei.h
include/asm-m32r/opsput/opsput_lan.h
include/asm-m32r/opsput/opsput_lcd.h
include/asm-m32r/opsput/opsput_pld.h
include/asm-m32r/page.h
include/asm-m32r/param.h
include/asm-m32r/pci.h
include/asm-m32r/pgalloc.h
include/asm-m32r/pgtable-2level.h
include/asm-m32r/posix_types.h
include/asm-m32r/rtc.h
include/asm-m32r/scatterlist.h
include/asm-m32r/sections.h
include/asm-m32r/segment.h
include/asm-m32r/sembuf.h
include/asm-m32r/setup.h
include/asm-m32r/shmbuf.h
include/asm-m32r/shmparam.h
include/asm-m32r/sigcontext.h
include/asm-m32r/siginfo.h
include/asm-m32r/signal.h
include/asm-m32r/smp.h
include/asm-m32r/sockios.h
include/asm-m32r/spinlock_types.h
include/asm-m32r/stat.h
include/asm-m32r/string.h
include/asm-m32r/syscall.h
include/asm-m32r/system.h
include/asm-m32r/termbits.h
include/asm-m32r/termios.h
include/asm-m32r/timex.h
include/asm-m32r/tlbflush.h
include/asm-m32r/types.h
include/asm-m32r/uaccess.h
include/asm-m32r/ucontext.h
include/asm-m32r/unaligned.h
include/asm-m32r/unistd.h
include/asm-m32r/user.h
include/asm-m32r/vga.h
include/asm-m32r/xor.h
include/asm-m68k/math-emu.h
include/asm-m68k/termios.h
include/asm-m68k/user.h
include/asm-mips/mman.h
include/asm-mips/termios.h
include/asm-parisc/mman.h
include/asm-parisc/termios.h
include/asm-powerpc/termios.h
include/asm-s390/io.h
include/asm-s390/termios.h
include/asm-sh/termios.h
include/asm-sh64/termios.h
include/asm-sparc/io.h
include/asm-sparc/termios.h
include/asm-sparc64/irq.h
include/asm-sparc64/pbm.h
include/asm-sparc64/termios.h
include/asm-um/elf-ppc.h
include/asm-um/processor-x86_64.h
include/asm-um/ptrace-x86_64.h
include/asm-v850/termios.h
include/asm-x86_64/termios.h
include/asm-x86_64/uaccess.h
include/asm-xtensa/mman.h
include/asm-xtensa/termios.h
include/linux/Kbuild
include/linux/byteorder/Kbuild
include/linux/byteorder/pdp_endian.h [deleted file]
include/linux/byteorder/swabb.h
include/linux/cfag12864b.h [new file with mode: 0644]
include/linux/compiler-gcc.h
include/linux/console.h
include/linux/console_struct.h
include/linux/fs.h
include/linux/genhd.h
include/linux/gfp.h
include/linux/init.h
include/linux/io.h
include/linux/kernel.h
include/linux/kfifo.h
include/linux/ks0108.h [new file with mode: 0644]
include/linux/ktime.h
include/linux/list.h
include/linux/lockdep.h
include/linux/mc146818rtc.h
include/linux/mm.h
include/linux/mm_inline.h
include/linux/mmzone.h
include/linux/mount.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/pnp.h
include/linux/reiserfs_xattr.h
include/linux/relay.h
include/linux/rio.h
include/linux/sched.h
include/linux/security.h
include/linux/slab_def.h
include/linux/socket.h
include/linux/spinlock.h
include/linux/stat.h
include/linux/swap.h
include/linux/time.h
include/linux/timex.h
include/linux/tty.h
include/linux/vmstat.h
include/linux/xattr.h
include/scsi/libsas.h
init/Kconfig
init/Makefile
init/initramfs.c
init/main.c
init/noinitramfs.c [new file with mode: 0644]
ipc/util.c
kernel/auditfilter.c
kernel/compat.c
kernel/cpu.c
kernel/exit.c
kernel/fork.c
kernel/hrtimer.c
kernel/irq/Makefile
kernel/irq/devres.c [new file with mode: 0644]
kernel/irq/manage.c
kernel/irq/proc.c
kernel/kfifo.c
kernel/kthread.c
kernel/lockdep.c
kernel/lockdep_proc.c
kernel/panic.c
kernel/posix-timers.c
kernel/power/disk.c
kernel/power/main.c
kernel/power/snapshot.c
kernel/power/swsusp.c
kernel/power/user.c
kernel/printk.c
kernel/profile.c
kernel/relay.c
kernel/sched.c
kernel/signal.c
kernel/sys.c
kernel/sysctl.c
kernel/time/clocksource.c
kernel/timer.c
kernel/workqueue.c
lib/Kconfig
lib/Kconfig.debug
lib/Makefile
lib/bitmap.c
lib/bust_spinlocks.c
lib/cmdline.c
lib/devres.c [new file with mode: 0644]
lib/idr.c
lib/iomap.c
lib/kobject.c
lib/sha1.c
lib/sort.c
lib/string.c
lib/textsearch.c
lib/vsprintf.c
mm/Kconfig
mm/filemap.c
mm/highmem.c
mm/memory.c
mm/mempolicy.c
mm/mempool.c
mm/page-writeback.c
mm/page_alloc.c
mm/readahead.c
mm/shmem.c
mm/slab.c
mm/truncate.c
mm/vmalloc.c
mm/vmscan.c
mm/vmstat.c
net/core/dst.c
net/core/neighbour.c
net/decnet/dn_table.c
net/ipv4/ipmr.c
net/ipv4/ipvs/ip_vs_conn.c
net/ipv4/netfilter/ip_conntrack_core.c
net/ipv6/ip6_fib.c
net/sctp/sm_make_chunk.c
scripts/kernel-doc
security/selinux/avc.c
security/selinux/hooks.c
security/selinux/ss/avtab.c
sound/oss/Kconfig
sound/oss/dmasound/Kconfig
usr/Makefile
usr/gen_init_cpio.c

diff --git a/CREDITS b/CREDITS
index ae08e4c10ed4f5c2364db7326cbdd4a7cce529f8..a4e5599003b28d5c5e7f74f08d24d1c2dba718c3 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -2571,6 +2571,16 @@ S: Subiaco, 6008
 S: Perth, Western Australia
 S: Australia
 
+N: Miguel Ojeda Sandonis
+E: maxextreme@gmail.com
+D: Author: Auxiliary LCD Controller driver (ks0108)
+D: Author: Auxiliary LCD driver (cfag12864b)
+D: Author: Auxiliary LCD framebuffer driver (cfag12864bfb)
+D: Maintainer: Auxiliary display drivers tree (drivers/auxdisplay/*)
+S: C/ Mieses 20, 9-B
+S: Valladolid 47009
+S: Spain
+
 N: Greg Page
 E: gpage@sovereign.org
 D: IPX development and support
index 03dbd883cc41599211cb1c462fc126352112bb3a..bf9c16b64c34feff4087a6b83b78995d213bcc96 100644 (file)
@@ -1,6 +1,6 @@
 What:           /debug/pktcdvd/pktcdvd[0-7]
 Date:           Oct. 2006
-KernelVersion:  2.6.19
+KernelVersion:  2.6.20
 Contact:        Thomas Maier <balagi@justmail.de>
 Description:
 
@@ -11,8 +11,7 @@ The pktcdvd module (packet writing driver) creates
 these files in debugfs:
 
 /debug/pktcdvd/pktcdvd[0-7]/
-    info            (0444) Lots of human readable driver
-                           statistics and infos. Multiple lines!
+    info            (0444) Lots of driver statistics and infos.
 
 Example:
 -------
index c4c55edc9a5c9ca7f5eaa6441049360ad5813017..b1c3f0263359150017e37081baa5f0aeb01c2121 100644 (file)
@@ -1,6 +1,6 @@
 What:           /sys/class/pktcdvd/
 Date:           Oct. 2006
-KernelVersion:  2.6.19
+KernelVersion:  2.6.20
 Contact:        Thomas Maier <balagi@justmail.de>
 Description:
 
index a34442436128ebd2e0ac209f050402e298e23827..e7fc964334086403ea4a4b73b35ef253464b2d0e 100644 (file)
@@ -482,13 +482,13 @@ slightly.
 <para>Gadget drivers
 rely on common USB structures and constants
 defined in the
-<filename>&lt;linux/usb_ch9.h&gt;</filename>
+<filename>&lt;linux/usb/ch9.h&gt;</filename>
 header file, which is standard in Linux 2.6 kernels.
 These are the same types and constants used by host
 side drivers (and usbcore).
 </para>
 
-!Iinclude/linux/usb_ch9.h
+!Iinclude/linux/usb/ch9.h
 </sect1>
 
 <sect1 id="core"><title>Core Objects and Methods</title>
index 3fa0c4b4541e065760a3c119e88d314ba3b6ee91..0bb90237e230d5e0d9c05448767741bd8c0c6e87 100644 (file)
@@ -316,6 +316,9 @@ X!Earch/i386/kernel/mca.c
      <sect1><title>DMI Interfaces</title>
 !Edrivers/firmware/dmi_scan.c
      </sect1>
+     <sect1><title>EDD Interfaces</title>
+!Idrivers/firmware/edd.c
+     </sect1>
   </chapter>
 
   <chapter id="security">
index 3ccce886c349d4ab3d5e357213d651b82d204eb4..974e17ccf10644af33b1d6347655b7a9c26e747c 100644 (file)
@@ -4,4 +4,5 @@
 <param name="funcsynopsis.style">ansi</param>
 <param name="funcsynopsis.tabular.threshold">80</param>
 <!-- <param name="paper.type">A4</param> -->
+<param name="generate.section.toc.level">2</param>
 </stylesheet>
index 143e5ff7deb8c4fad66789c02750749251a2acea..a2ebd651b05a8d241dc529ae29c3ee05fd7459ac 100644 (file)
 
 <chapter><title>USB-Standard Types</title>
 
-    <para>In <filename>&lt;linux/usb_ch9.h&gt;</filename> you will find
+    <para>In <filename>&lt;linux/usb/ch9.h&gt;</filename> you will find
     the USB data types defined in chapter 9 of the USB specification.
     These data types are used throughout USB, and in APIs including
     this host side API, gadget APIs, and usbfs.
     </para>
 
-!Iinclude/linux/usb_ch9.h
+!Iinclude/linux/usb/ch9.h
 
     </chapter>
 
@@ -574,7 +574,7 @@ for (;;) {
 #include &lt;asm/byteorder.h&gt;</programlisting>
            The standard USB device model requests, from "Chapter 9" of
            the USB 2.0 specification, are automatically included from
-           the <filename>&lt;linux/usb_ch9.h&gt;</filename> header.
+           the <filename>&lt;linux/usb/ch9.h&gt;</filename> header.
            </para>
 
            <para>Unless noted otherwise, the ioctl requests
diff --git a/Documentation/auxdisplay/cfag12864b b/Documentation/auxdisplay/cfag12864b
new file mode 100644 (file)
index 0000000..3572b98
--- /dev/null
@@ -0,0 +1,105 @@
+       ===================================
+       cfag12864b LCD Driver Documentation
+       ===================================
+
+License:               GPLv2
+Author & Maintainer:   Miguel Ojeda Sandonis <maxextreme@gmail.com>
+Date:                  2006-10-27
+
+
+
+--------
+0. INDEX
+--------
+
+       1. DRIVER INFORMATION
+       2. DEVICE INFORMATION
+       3. WIRING
+       4. USERSPACE PROGRAMMING
+
+
+---------------------
+1. DRIVER INFORMATION
+---------------------
+
+This driver support one cfag12864b display at time.
+
+
+---------------------
+2. DEVICE INFORMATION
+---------------------
+
+Manufacturer:  Crystalfontz
+Device Name:   Crystalfontz 12864b LCD Series
+Device Code:   cfag12864b
+Webpage:       http://www.crystalfontz.com
+Device Webpage:        http://www.crystalfontz.com/products/12864b/
+Type:          LCD (Liquid Crystal Display)
+Width:         128
+Height:                64
+Colors:                2 (B/N)
+Controller:    ks0108
+Controllers:   2
+Pages:         8 each controller
+Addresses:     64 each page
+Data size:     1 byte each address
+Memory size:   2 * 8 * 64 * 1 = 1024 bytes = 1 Kbyte
+
+
+---------
+3. WIRING
+---------
+
+The cfag12864b LCD Series don't have official wiring.
+
+The common wiring is done to the parallel port as shown:
+
+Parallel Port                          cfag12864b
+
+  Name Pin#                            Pin# Name
+
+Strobe ( 1)------------------------------(17) Enable
+Data 0 ( 2)------------------------------( 4) Data 0
+Data 1 ( 3)------------------------------( 5) Data 1
+Data 2 ( 4)------------------------------( 6) Data 2
+Data 3 ( 5)------------------------------( 7) Data 3
+Data 4 ( 6)------------------------------( 8) Data 4
+Data 5 ( 7)------------------------------( 9) Data 5
+Data 6 ( 8)------------------------------(10) Data 6
+Data 7 ( 9)------------------------------(11) Data 7
+       (10)                      [+5v]---( 1) Vdd
+       (11)                      [GND]---( 2) Ground
+       (12)                      [+5v]---(14) Reset
+       (13)                      [GND]---(15) Read / Write
+  Line (14)------------------------------(13) Controller Select 1
+       (15)
+  Init (16)------------------------------(12) Controller Select 2
+Select (17)------------------------------(16) Data / Instruction
+Ground (18)---[GND]              [+5v]---(19) LED +
+Ground (19)---[GND]
+Ground (20)---[GND]              E    A             Values:
+Ground (21)---[GND]       [GND]---[P1]---(18) Vee    Â· R = Resistor = 22 ohm
+Ground (22)---[GND]                |                 Â· P1 = Preset = 10 Kohm
+Ground (23)---[GND]       ----   S ------( 3) V0     Â· P2 = Preset = 1 Kohm
+Ground (24)---[GND]       |  |
+Ground (25)---[GND] [GND]---[P2]---[R]---(20) LED -
+
+
+------------------------
+4. USERSPACE PROGRAMMING
+------------------------
+
+The cfag12864bfb describes a framebuffer device (/dev/fbX).
+
+It has a size of 1024 bytes = 1 Kbyte.
+Each bit represents one pixel. If the bit is high, the pixel will
+turn on. If the pixel is low, the pixel will turn off.
+
+You can use the framebuffer as a file: fopen, fwrite, fclose...
+Although the LCD won't get updated until the next refresh time arrives.
+
+Also, you can mmap the framebuffer: open & mmap, munmap & close...
+which is the best option for most uses.
+
+Check Documentation/auxdisplay/cfag12864b-example.c
+for a real working userspace complete program with usage examples.
diff --git a/Documentation/auxdisplay/cfag12864b-example.c b/Documentation/auxdisplay/cfag12864b-example.c
new file mode 100644 (file)
index 0000000..7bfac35
--- /dev/null
@@ -0,0 +1,282 @@
+/*
+ *    Filename: cfag12864b-example.c
+ *     Version: 0.1.0
+ * Description: cfag12864b LCD userspace example program
+ *     License: GPLv2
+ *
+ *      Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ *        Date: 2006-10-31
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*
+ * ------------------------
+ * start of cfag12864b code
+ * ------------------------
+ */
+
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+#define CFAG12864B_WIDTH               (128)
+#define CFAG12864B_HEIGHT              (64)
+#define CFAG12864B_SIZE                        (128 * 64 / 8)
+#define CFAG12864B_BPB                 (8)
+#define CFAG12864B_ADDRESS(x, y)       ((y) * CFAG12864B_WIDTH / \
+                                       CFAG12864B_BPB + (x) / CFAG12864B_BPB)
+#define CFAG12864B_BIT(n)              (((unsigned char) 1) << (n))
+
+#undef CFAG12864B_DOCHECK
+#ifdef CFAG12864B_DOCHECK
+       #define CFAG12864B_CHECK(x, y)          ((x) < CFAG12864B_WIDTH && \
+                                               (y) < CFAG12864B_HEIGHT)
+#else
+       #define CFAG12864B_CHECK(x, y)          (1)
+#endif
+
+int cfag12864b_fd;
+unsigned char * cfag12864b_mem;
+unsigned char cfag12864b_buffer[CFAG12864B_SIZE];
+
+/*
+ * init a cfag12864b framebuffer device
+ *
+ * No error:       return = 0
+ * Unable to open: return = -1
+ * Unable to mmap: return = -2
+ */
+int cfag12864b_init(char *path)
+{
+       cfag12864b_fd = open(path, O_RDWR);
+       if (cfag12864b_fd == -1)
+               return -1;
+
+       cfag12864b_mem = mmap(0, CFAG12864B_SIZE, PROT_READ | PROT_WRITE,
+               MAP_SHARED, cfag12864b_fd, 0);
+       if (cfag12864b_mem == MAP_FAILED) {
+               close(cfag12864b_fd);
+               return -2;
+       }
+
+       return 0;
+}
+
+/*
+ * exit a cfag12864b framebuffer device
+ */
+void cfag12864b_exit(void)
+{
+       munmap(cfag12864b_mem, CFAG12864B_SIZE);
+       close(cfag12864b_fd);
+}
+
+/*
+ * set (x, y) pixel
+ */
+void cfag12864b_set(unsigned char x, unsigned char y)
+{
+       if (CFAG12864B_CHECK(x, y))
+               cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] |=
+                       CFAG12864B_BIT(x % CFAG12864B_BPB);
+}
+
+/*
+ * unset (x, y) pixel
+ */
+void cfag12864b_unset(unsigned char x, unsigned char y)
+{
+       if (CFAG12864B_CHECK(x, y))
+               cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &=
+                       ~CFAG12864B_BIT(x % CFAG12864B_BPB);
+}
+
+/*
+ * is set (x, y) pixel?
+ *
+ * Pixel off: return = 0
+ * Pixel on:  return = 1
+ */
+unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
+{
+       if (CFAG12864B_CHECK(x, y))
+               if (cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &
+                       CFAG12864B_BIT(x % CFAG12864B_BPB))
+                       return 1;
+
+       return 0;
+}
+
+/*
+ * not (x, y) pixel
+ */
+void cfag12864b_not(unsigned char x, unsigned char y)
+{
+       if (cfag12864b_isset(x, y))
+               cfag12864b_unset(x, y);
+       else
+               cfag12864b_set(x, y);
+}
+
+/*
+ * fill (set all pixels)
+ */
+void cfag12864b_fill(void)
+{
+       unsigned short i;
+
+       for (i = 0; i < CFAG12864B_SIZE; i++)
+               cfag12864b_buffer[i] = 0xFF;
+}
+
+/*
+ * clear (unset all pixels)
+ */
+void cfag12864b_clear(void)
+{
+       unsigned short i;
+
+       for (i = 0; i < CFAG12864B_SIZE; i++)
+               cfag12864b_buffer[i] = 0;
+}
+
+/*
+ * format a [128*64] matrix
+ *
+ * Pixel off: src[i] = 0
+ * Pixel on:  src[i] > 0
+ */
+void cfag12864b_format(unsigned char * matrix)
+{
+       unsigned char i, j, n;
+
+       for (i = 0; i < CFAG12864B_HEIGHT; i++)
+       for (j = 0; j < CFAG12864B_WIDTH / CFAG12864B_BPB; j++) {
+               cfag12864b_buffer[i * CFAG12864B_WIDTH / CFAG12864B_BPB +
+                       j] = 0;
+               for (n = 0; n < CFAG12864B_BPB; n++)
+                       if (matrix[i * CFAG12864B_WIDTH +
+                               j * CFAG12864B_BPB + n])
+                               cfag12864b_buffer[i * CFAG12864B_WIDTH /
+                                       CFAG12864B_BPB + j] |=
+                                       CFAG12864B_BIT(n);
+       }
+}
+
+/*
+ * blit buffer to lcd
+ */
+void cfag12864b_blit(void)
+{
+       memcpy(cfag12864b_mem, cfag12864b_buffer, CFAG12864B_SIZE);
+}
+
+/*
+ * ----------------------
+ * end of cfag12864b code
+ * ----------------------
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#define EXAMPLES       6
+
+void example(unsigned char n)
+{
+       unsigned short i, j;
+       unsigned char matrix[CFAG12864B_WIDTH * CFAG12864B_HEIGHT];
+
+       if (n > EXAMPLES)
+               return;
+
+       printf("Example %i/%i - ", n, EXAMPLES);
+
+       switch (n) {
+       case 1:
+               printf("Draw points setting bits");
+               cfag12864b_clear();
+               for (i = 0; i < CFAG12864B_WIDTH; i += 2)
+                       for (j = 0; j < CFAG12864B_HEIGHT; j += 2)
+                               cfag12864b_set(i, j);
+               break;
+
+       case 2:
+               printf("Clear the LCD");
+               cfag12864b_clear();
+               break;
+
+       case 3:
+               printf("Draw rows formatting a [128*64] matrix");
+               memset(matrix, 0, CFAG12864B_WIDTH * CFAG12864B_HEIGHT);
+               for (i = 0; i < CFAG12864B_WIDTH; i++)
+                       for (j = 0; j < CFAG12864B_HEIGHT; j += 2)
+                               matrix[j * CFAG12864B_WIDTH + i] = 1;
+               cfag12864b_format(matrix);
+               break;
+
+       case 4:
+               printf("Fill the lcd");
+               cfag12864b_fill();
+               break;
+
+       case 5:
+               printf("Draw columns unsetting bits");
+               for (i = 0; i < CFAG12864B_WIDTH; i += 2)
+                       for (j = 0; j < CFAG12864B_HEIGHT; j++)
+                               cfag12864b_unset(i, j);
+               break;
+
+       case 6:
+               printf("Do negative not-ing all bits");
+               for (i = 0; i < CFAG12864B_WIDTH; i++)
+                       for (j = 0; j < CFAG12864B_HEIGHT; j ++)
+                               cfag12864b_not(i, j);
+               break;
+       }
+
+       puts(" - [Press Enter]");
+}
+
+int main(int argc, char *argv[])
+{
+       unsigned char n;
+
+       if (argc != 2) {
+               printf(
+                       "Sintax:  %s fbdev\n"
+                       "Usually: /dev/fb0, /dev/fb1...\n", argv[0]);
+               return -1;
+       }
+
+       if (cfag12864b_init(argv[1])) {
+               printf("Can't init %s fbdev\n", argv[1]);
+               return -2;
+       }
+
+       for (n = 1; n <= EXAMPLES; n++) {
+               example(n);
+               cfag12864b_blit();
+               while (getchar() != '\n');
+       }
+
+       cfag12864b_exit();
+
+       return 0;
+}
diff --git a/Documentation/auxdisplay/ks0108 b/Documentation/auxdisplay/ks0108
new file mode 100644 (file)
index 0000000..92b03b6
--- /dev/null
@@ -0,0 +1,55 @@
+       ==========================================
+       ks0108 LCD Controller Driver Documentation
+       ==========================================
+
+License:               GPLv2
+Author & Maintainer:   Miguel Ojeda Sandonis <maxextreme@gmail.com>
+Date:                  2006-10-27
+
+
+
+--------
+0. INDEX
+--------
+
+       1. DRIVER INFORMATION
+       2. DEVICE INFORMATION
+       3. WIRING
+
+
+---------------------
+1. DRIVER INFORMATION
+---------------------
+
+This driver support the ks0108 LCD controller.
+
+
+---------------------
+2. DEVICE INFORMATION
+---------------------
+
+Manufacturer:  Samsung
+Device Name:   KS0108 LCD Controller
+Device Code:   ks0108
+Webpage:       -
+Device Webpage:        -
+Type:          LCD Controller (Liquid Crystal Display Controller)
+Width:         64
+Height:                64
+Colors:                2 (B/N)
+Pages:         8
+Addresses:     64 each page
+Data size:     1 byte each address
+Memory size:   8 * 64 * 1 = 512 bytes
+
+
+---------
+3. WIRING
+---------
+
+The driver supports data parallel port wiring.
+
+If you aren't building LCD related hardware, you should check
+your LCD specific wiring information in the same folder.
+
+For example, check Documentation/auxdisplay/cfag12864b.
index 7715d2247c4de4cf01045a7f46ce9ce5bf36a7a4..cf1f8126991c00fe5f904631d0471821bf958515 100644 (file)
@@ -93,7 +93,7 @@ Notes
 Using the pktcdvd sysfs interface
 ---------------------------------
 
-Since Linux 2.6.19, the pktcdvd module has a sysfs interface
+Since Linux 2.6.20, the pktcdvd module has a sysfs interface
 and can be controlled by it. For example the "pktcdvd" tool uses
 this interface. (see http://people.freenet.de/BalaGi#pktcdvd )
 
index fa844fd7bded4004f1c050e8cc5bc719210c1452..8247a4b79d09e73775cb139de8dc2fedde44f86a 100644 (file)
@@ -215,6 +215,13 @@ Who:       Jean Delvare <khali@linux-fr.org>,
 
 ---------------------------
 
+What:  drivers depending on OBSOLETE_OSS
+When:  options in 2.6.22, code in 2.6.24
+Why:   OSS drivers with ALSA replacements
+Who:   Adrian Bunk <bunk@stusta.de>
+
+---------------------------
+
 What:  IPv4 only connection tracking/NAT/helpers
 When:  2.6.22
 Why:   The new layer 3 independant connection tracking replaces the old
index d6788dae034948ce35eab71bfa80e013217864ac..7fbb6ffe576910695a5aecabd21c1c428497304f 100644 (file)
@@ -157,7 +157,7 @@ TBD(curr. line MT:/API/)
   channel management functions:
 
     relay_open(base_filename, parent, subbuf_size, n_subbufs,
-               callbacks)
+               callbacks, private_data)
     relay_close(chan)
     relay_flush(chan)
     relay_reset(chan)
@@ -251,7 +251,7 @@ static struct rchan_callbacks relay_callbacks =
 
 And an example relay_open() invocation using them:
 
-  chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks);
+  chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks, NULL);
 
 If the create_buf_file() callback fails, or isn't defined, channel
 creation and thus relay_open() will fail.
@@ -289,6 +289,11 @@ they use the proper locking for such a buffer, either by wrapping
 writes in a spinlock, or by copying a write function from relay.h and
 creating a local version that internally does the proper locking.
 
+The private_data passed into relay_open() allows clients to associate
+user-defined data with a channel, and is immediately available
+(including in create_buf_file()) via chan->private_data or
+buf->chan->private_data.
+
 Channel 'modes'
 ---------------
 
index 5a8bd5bd88eff17f02421165fff6811674e0a53f..8f750c0efed5ed0adc5329ff5bd6a5e17d5c9113 100644 (file)
@@ -94,8 +94,7 @@ Code  Seq#    Include File            Comments
 'L'    00-1F   linux/loop.h
 'L'    E0-FF   linux/ppdd.h            encrypted disk device driver
                                        <http://linux01.gwdg.de/~alatham/ppdd.html>
-'M'    all     linux/soundcard.h       conflict!
-'M'    00-1F   linux/isicom.h          conflict!
+'M'    all     linux/soundcard.h
 'N'    00-1F   drivers/usb/scanner.h
 'P'    all     linux/soundcard.h
 'Q'    all     linux/soundcard.h
index 284e7e198e93a288624c6258ff30294c6aacf8d6..2075c0658bf547d04d36fa1b6a59a2c7a48d50b8 100644 (file)
@@ -101,16 +101,20 @@ The format of the block comment is like this:
 
 /**
  * function_name(:)? (- short description)?
-(* @parameterx: (description of parameter x)?)*
+(* @parameterx(space)*: (description of parameter x)?)*
 (* a blank line)?
  * (Description:)? (Description of function)?
  * (section header: (section description)? )*
 (*)?*/
 
-The short function description cannot be multiline, but the other
-descriptions can be (and they can contain blank lines). Avoid putting a
-spurious blank line after the function name, or else the description will
-be repeated!
+The short function description ***cannot be multiline***, but the other
+descriptions can be (and they can contain blank lines).  If you continue
+that initial short description onto a second line, that second line will
+appear further down at the beginning of the description section, which is
+almost certainly not what you had in mind.
+
+Avoid putting a spurious blank line after the function name, or else the
+description will be repeated!
 
 All descriptive text is further processed, scanning for the following special
 patterns, which are highlighted appropriately.
@@ -121,6 +125,31 @@ patterns, which are highlighted appropriately.
 '@parameter' - name of a parameter
 '%CONST' - name of a constant.
 
+NOTE 1:  The multi-line descriptive text you provide does *not* recognize
+line breaks, so if you try to format some text nicely, as in:
+
+  Return codes
+    0 - cool
+    1 - invalid arg
+    2 - out of memory
+
+this will all run together and produce:
+
+  Return codes 0 - cool 1 - invalid arg 2 - out of memory
+
+NOTE 2:  If the descriptive text you provide has lines that begin with
+some phrase followed by a colon, each of those phrases will be taken as
+a new section heading, which means you should similarly try to avoid text
+like:
+
+  Return codes:
+    0: cool
+    1: invalid arg
+    2: out of memory
+
+every line of which would start a new section.  Again, probably not
+what you were after.
+
 Take a look around the source tree for examples.
 
 
index 25d2985171044712e864035fc5201147ba96cdb8..d25acd51e18105aca3f3d0811d37f39aa8d3119c 100644 (file)
@@ -1396,6 +1396,8 @@ and is between 256 and 4096 characters. It is defined in the file
                        in <PAGE_SIZE> units (needed only for swap files).
                        See  Documentation/power/swsusp-and-swap-files.txt
 
+       retain_initrd   [RAM] Keep initrd memory after extraction
+
        rhash_entries=  [KNL,NET]
                        Set number of hash buckets for route cache
 
diff --git a/Documentation/local_ops.txt b/Documentation/local_ops.txt
new file mode 100644 (file)
index 0000000..b0aca07
--- /dev/null
@@ -0,0 +1,163 @@
+            Semantics and Behavior of Local Atomic Operations
+
+                           Mathieu Desnoyers
+
+
+       This document explains the purpose of the local atomic operations, how
+to implement them for any given architecture and shows how they can be used
+properly. It also stresses on the precautions that must be taken when reading
+those local variables across CPUs when the order of memory writes matters.
+
+
+
+* Purpose of local atomic operations
+
+Local atomic operations are meant to provide fast and highly reentrant per CPU
+counters. They minimize the performance cost of standard atomic operations by
+removing the LOCK prefix and memory barriers normally required to synchronize
+across CPUs.
+
+Having fast per CPU atomic counters is interesting in many cases : it does not
+require disabling interrupts to protect from interrupt handlers and it permits
+coherent counters in NMI handlers. It is especially useful for tracing purposes
+and for various performance monitoring counters.
+
+Local atomic operations only guarantee variable modification atomicity wrt the
+CPU which owns the data. Therefore, care must taken to make sure that only one
+CPU writes to the local_t data. This is done by using per cpu data and making
+sure that we modify it from within a preemption safe context. It is however
+permitted to read local_t data from any CPU : it will then appear to be written
+out of order wrt other memory writes on the owner CPU.
+
+
+* Implementation for a given architecture
+
+It can be done by slightly modifying the standard atomic operations : only
+their UP variant must be kept. It typically means removing LOCK prefix (on
+i386 and x86_64) and any SMP sychronization barrier. If the architecture does
+not have a different behavior between SMP and UP, including asm-generic/local.h
+in your archtecture's local.h is sufficient.
+
+The local_t type is defined as an opaque signed long by embedding an
+atomic_long_t inside a structure. This is made so a cast from this type to a
+long fails. The definition looks like :
+
+typedef struct { atomic_long_t a; } local_t;
+
+
+* How to use local atomic operations
+
+#include <linux/percpu.h>
+#include <asm/local.h>
+
+static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0);
+
+
+* Counting
+
+Counting is done on all the bits of a signed long.
+
+In preemptible context, use get_cpu_var() and put_cpu_var() around local atomic
+operations : it makes sure that preemption is disabled around write access to
+the per cpu variable. For instance :
+
+       local_inc(&get_cpu_var(counters));
+       put_cpu_var(counters);
+
+If you are already in a preemption-safe context, you can directly use
+__get_cpu_var() instead.
+
+       local_inc(&__get_cpu_var(counters));
+
+
+
+* Reading the counters
+
+Those local counters can be read from foreign CPUs to sum the count. Note that
+the data seen by local_read across CPUs must be considered to be out of order
+relatively to other memory writes happening on the CPU that owns the data.
+
+       long sum = 0;
+       for_each_online_cpu(cpu)
+               sum += local_read(&per_cpu(counters, cpu));
+
+If you want to use a remote local_read to synchronize access to a resource
+between CPUs, explicit smp_wmb() and smp_rmb() memory barriers must be used
+respectively on the writer and the reader CPUs. It would be the case if you use
+the local_t variable as a counter of bytes written in a buffer : there should
+be a smp_wmb() between the buffer write and the counter increment and also a
+smp_rmb() between the counter read and the buffer read.
+
+
+Here is a sample module which implements a basic per cpu counter using local.h.
+
+--- BEGIN ---
+/* test-local.c
+ *
+ * Sample module for local.h usage.
+ */
+
+
+#include <asm/local.h>
+#include <linux/module.h>
+#include <linux/timer.h>
+
+static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0);
+
+static struct timer_list test_timer;
+
+/* IPI called on each CPU. */
+static void test_each(void *info)
+{
+       /* Increment the counter from a non preemptible context */
+       printk("Increment on cpu %d\n", smp_processor_id());
+       local_inc(&__get_cpu_var(counters));
+
+       /* This is what incrementing the variable would look like within a
+        * preemptible context (it disables preemption) :
+        *
+        * local_inc(&get_cpu_var(counters));
+        * put_cpu_var(counters);
+        */
+}
+
+static void do_test_timer(unsigned long data)
+{
+       int cpu;
+
+       /* Increment the counters */
+       on_each_cpu(test_each, NULL, 0, 1);
+       /* Read all the counters */
+       printk("Counters read from CPU %d\n", smp_processor_id());
+       for_each_online_cpu(cpu) {
+               printk("Read : CPU %d, count %ld\n", cpu,
+                       local_read(&per_cpu(counters, cpu)));
+       }
+       del_timer(&test_timer);
+       test_timer.expires = jiffies + 1000;
+       add_timer(&test_timer);
+}
+
+static int __init test_init(void)
+{
+       /* initialize the timer that will increment the counter */
+       init_timer(&test_timer);
+       test_timer.function = do_test_timer;
+       test_timer.expires = jiffies + 1;
+       add_timer(&test_timer);
+
+       return 0;
+}
+
+static void __exit test_exit(void)
+{
+       del_timer_sync(&test_timer);
+}
+
+module_init(test_init);
+module_exit(test_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("Local Atomic Ops");
+--- END ---
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
new file mode 100644 (file)
index 0000000..7224459
--- /dev/null
@@ -0,0 +1,192 @@
+Red-black Trees (rbtree) in Linux
+January 18, 2007
+Rob Landley <rob@landley.net>
+=============================
+
+What are red-black trees, and what are they for?
+------------------------------------------------
+
+Red-black trees are a type of self-balancing binary search tree, used for
+storing sortable key/value data pairs.  This differs from radix trees (which
+are used to efficiently store sparse arrays and thus use long integer indexes
+to insert/access/delete nodes) and hash tables (which are not kept sorted to
+be easily traversed in order, and must be tuned for a specific size and
+hash function where rbtrees scale gracefully storing arbitrary keys).
+
+Red-black trees are similar to AVL trees, but provide faster real-time bounded
+worst case performance for insertion and deletion (at most two rotations and
+three rotations, respectively, to balance the tree), with slightly slower
+(but still O(log n)) lookup time.
+
+To quote Linux Weekly News:
+
+    There are a number of red-black trees in use in the kernel.
+    The anticipatory, deadline, and CFQ I/O schedulers all employ
+    rbtrees to track requests; the packet CD/DVD driver does the same.
+    The high-resolution timer code uses an rbtree to organize outstanding
+    timer requests.  The ext3 filesystem tracks directory entries in a
+    red-black tree.  Virtual memory areas (VMAs) are tracked with red-black
+    trees, as are epoll file descriptors, cryptographic keys, and network
+    packets in the "hierarchical token bucket" scheduler.
+
+This document covers use of the Linux rbtree implementation.  For more
+information on the nature and implementation of Red Black Trees,  see:
+
+  Linux Weekly News article on red-black trees
+    http://lwn.net/Articles/184495/
+
+  Wikipedia entry on red-black trees
+    http://en.wikipedia.org/wiki/Red-black_tree
+
+Linux implementation of red-black trees
+---------------------------------------
+
+Linux's rbtree implementation lives in the file "lib/rbtree.c".  To use it,
+"#include <linux/rbtree.h>".
+
+The Linux rbtree implementation is optimized for speed, and thus has one
+less layer of indirection (and better cache locality) than more traditional
+tree implementations.  Instead of using pointers to separate rb_node and data
+structures, each instance of struct rb_node is embedded in the data structure
+it organizes.  And instead of using a comparison callback function pointer,
+users are expected to write their own tree search and insert functions
+which call the provided rbtree functions.  Locking is also left up to the
+user of the rbtree code.
+
+Creating a new rbtree
+---------------------
+
+Data nodes in an rbtree tree are structures containing a struct rb_node member:
+
+  struct mytype {
+       struct rb_node node;
+       char *keystring;
+  };
+
+When dealing with a pointer to the embedded struct rb_node, the containing data
+structure may be accessed with the standard container_of() macro.  In addition,
+individual members may be accessed directly via rb_entry(node, type, member).
+
+At the root of each rbtree is an rb_root structure, which is initialized to be
+empty via:
+
+  struct rb_root mytree = RB_ROOT;
+
+Searching for a value in an rbtree
+----------------------------------
+
+Writing a search function for your tree is fairly straightforward: start at the
+root, compare each value, and follow the left or right branch as necessary.
+
+Example:
+
+  struct mytype *my_search(struct rb_root *root, char *string)
+  {
+       struct rb_node *node = root->rb_node;
+
+       while (node) {
+               struct mytype *data = container_of(node, struct mytype, node);
+               int result;
+
+               result = strcmp(string, data->keystring);
+
+               if (result < 0)
+                       node = node->rb_left;
+               else if (result > 0)
+                       node = node->rb_right;
+               else
+                       return data;
+       }
+       return NULL;
+  }
+
+Inserting data into an rbtree
+-----------------------------
+
+Inserting data in the tree involves first searching for the place to insert the
+new node, then inserting the node and rebalancing ("recoloring") the tree.
+
+The search for insertion differs from the previous search by finding the
+location of the pointer on which to graft the new node.  The new node also
+needs a link to its parent node for rebalancing purposes.
+
+Example:
+
+  int my_insert(struct rb_root *root, struct mytype *data)
+  {
+       struct rb_node **new = &(root->rb_node), *parent = NULL;
+
+       /* Figure out where to put new node */
+       while (*new) {
+               struct mytype *this = container_of(*new, struct mytype, node);
+               int result = strcmp(data->keystring, this->keystring);
+
+               parent = *new;
+               if (result < 0)
+                       new = &((*new)->rb_left);
+               else if (result > 0)
+                       new = &((*new)->rb_right);
+               else
+                       return FALSE;
+       }
+
+       /* Add new node and rebalance tree. */
+       rb_link_node(data->node, parent, new);
+       rb_insert_color(data->node, root);
+
+       return TRUE;
+  }
+
+Removing or replacing existing data in an rbtree
+------------------------------------------------
+
+To remove an existing node from a tree, call:
+
+  void rb_erase(struct rb_node *victim, struct rb_root *tree);
+
+Example:
+
+  struct mytype *data = mysearch(mytree, "walrus");
+
+  if (data) {
+       rb_erase(data->node, mytree);
+       myfree(data);
+  }
+
+To replace an existing node in a tree with a new one with the same key, call:
+
+  void rb_replace_node(struct rb_node *old, struct rb_node *new,
+                       struct rb_root *tree);
+
+Replacing a node this way does not re-sort the tree: If the new node doesn't
+have the same key as the old node, the rbtree will probably become corrupted.
+
+Iterating through the elements stored in an rbtree (in sort order)
+------------------------------------------------------------------
+
+Four functions are provided for iterating through an rbtree's contents in
+sorted order.  These work on arbitrary trees, and should not need to be
+modified or wrapped (except for locking purposes):
+
+  struct rb_node *rb_first(struct rb_root *tree);
+  struct rb_node *rb_last(struct rb_root *tree);
+  struct rb_node *rb_next(struct rb_node *node);
+  struct rb_node *rb_prev(struct rb_node *node);
+
+To start iterating, call rb_first() or rb_last() with a pointer to the root
+of the tree, which will return a pointer to the node structure contained in
+the first or last element in the tree.  To continue, fetch the next or previous
+node by calling rb_next() or rb_prev() on the current node.  This will return
+NULL when there are no more nodes left.
+
+The iterator functions return a pointer to the embedded struct rb_node, from
+which the containing data structure may be accessed with the container_of()
+macro, and individual members may be accessed directly via
+rb_entry(node, type, member).
+
+Example:
+
+  struct rb_node *node;
+  for (node = rb_first(&mytree); node; node = rb_next(node))
+       printk("key=%s\n", rb_entry(node, int, keystring));
+
index 7cf1ec5bcdd3b37854ec34ebc085cd3be4532ee7..1ef6bb88cd0003ad05a0d813533689e130a72002 100644 (file)
@@ -149,7 +149,7 @@ RTC class framework, but can't be supported by the older driver.
        is connected to an IRQ line, it can often issue an alarm IRQ up to
        24 hours in the future.
 
-    *  RTC_WKALM_SET, RTC_WKALM_READ ... RTCs that can issue alarms beyond
+    *  RTC_WKALM_SET, RTC_WKALM_RD ... RTCs that can issue alarms beyond
        the next 24 hours use a slightly more powerful API, which supports
        setting the longer alarm time and enabling its IRQ using a single
        request (using the same model as EFI firmware).
@@ -167,6 +167,28 @@ Linux out of a low power sleep state (or hibernation) back to a fully
 operational state.  For example, a system could enter a deep power saving
 state until it's time to execute some scheduled tasks.
 
+Note that many of these ioctls need not actually be implemented by your
+driver.  The common rtc-dev interface handles many of these nicely if your
+driver returns ENOIOCTLCMD.  Some common examples:
+
+    *  RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be
+       called with appropriate values.
+
+    *  RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: the
+       set_alarm/read_alarm functions will be called.  To differentiate
+       between the ALM and WKALM, check the larger fields of the rtc_wkalrm
+       struct (like tm_year).  These will be set to -1 when using ALM and
+       will be set to proper values when using WKALM.
+
+    *  RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called
+       to set the frequency while the framework will handle the read for you
+       since the frequency is stored in the irq_freq member of the rtc_device
+       structure.  Also make sure you set the max_user_freq member in your
+       initialization routines so the framework can sanity check the user
+       input for you.
+
+If all else fails, check out the rtc-test.c driver!
+
 
 -------------------- 8< ---------------- 8< -----------------------------
 
@@ -237,7 +259,7 @@ int main(int argc, char **argv)
                                "\n...Update IRQs not supported.\n");
                        goto test_READ;
                }
-               perror("ioctl");
+               perror("RTC_UIE_ON ioctl");
                exit(errno);
        }
 
@@ -284,7 +306,7 @@ int main(int argc, char **argv)
        /* Turn off update interrupts */
        retval = ioctl(fd, RTC_UIE_OFF, 0);
        if (retval == -1) {
-               perror("ioctl");
+               perror("RTC_UIE_OFF ioctl");
                exit(errno);
        }
 
@@ -292,7 +314,7 @@ test_READ:
        /* Read the RTC time/date */
        retval = ioctl(fd, RTC_RD_TIME, &rtc_tm);
        if (retval == -1) {
-               perror("ioctl");
+               perror("RTC_RD_TIME ioctl");
                exit(errno);
        }
 
@@ -320,14 +342,14 @@ test_READ:
                                "\n...Alarm IRQs not supported.\n");
                        goto test_PIE;
                }
-               perror("ioctl");
+               perror("RTC_ALM_SET ioctl");
                exit(errno);
        }
 
        /* Read the current alarm settings */
        retval = ioctl(fd, RTC_ALM_READ, &rtc_tm);
        if (retval == -1) {
-               perror("ioctl");
+               perror("RTC_ALM_READ ioctl");
                exit(errno);
        }
 
@@ -337,7 +359,7 @@ test_READ:
        /* Enable alarm interrupts */
        retval = ioctl(fd, RTC_AIE_ON, 0);
        if (retval == -1) {
-               perror("ioctl");
+               perror("RTC_AIE_ON ioctl");
                exit(errno);
        }
 
@@ -355,7 +377,7 @@ test_READ:
        /* Disable alarm interrupts */
        retval = ioctl(fd, RTC_AIE_OFF, 0);
        if (retval == -1) {
-               perror("ioctl");
+               perror("RTC_AIE_OFF ioctl");
                exit(errno);
        }
 
@@ -368,7 +390,7 @@ test_PIE:
                        fprintf(stderr, "\nNo periodic IRQ support\n");
                        return 0;
                }
-               perror("ioctl");
+               perror("RTC_IRQP_READ ioctl");
                exit(errno);
        }
        fprintf(stderr, "\nPeriodic IRQ rate is %ldHz.\n", tmp);
@@ -387,7 +409,7 @@ test_PIE:
                                        "\n...Periodic IRQ rate is fixed\n");
                                goto done;
                        }
-                       perror("ioctl");
+                       perror("RTC_IRQP_SET ioctl");
                        exit(errno);
                }
 
@@ -397,7 +419,7 @@ test_PIE:
                /* Enable periodic interrupts */
                retval = ioctl(fd, RTC_PIE_ON, 0);
                if (retval == -1) {
-                       perror("ioctl");
+                       perror("RTC_PIE_ON ioctl");
                        exit(errno);
                }
 
@@ -416,7 +438,7 @@ test_PIE:
                /* Disable periodic interrupts */
                retval = ioctl(fd, RTC_PIE_OFF, 0);
                if (retval == -1) {
-                       perror("ioctl");
+                       perror("RTC_PIE_OFF ioctl");
                        exit(errno);
                }
        }
index 61613166981b9139a5961fe0c3344cbd03286688..452c0f1523044883b785fc5d35699b270fa7493a 100644 (file)
@@ -64,11 +64,6 @@ On all -  write a character to /proc/sysrq-trigger.  e.g.:
 
 *  What are the 'command' keys?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-'r'     - Turns off keyboard raw mode and sets it to XLATE.
-
-'k'     - Secure Access Key (SAK) Kills all programs on the current virtual
-          console. NOTE: See important comments below in SAK section.
-
 'b'     - Will immediately reboot the system without syncing or unmounting
           your disks.
 
@@ -76,21 +71,37 @@ On all -  write a character to /proc/sysrq-trigger.  e.g.:
 
 'd'    - Shows all locks that are held.
 
-'o'     - Will shut your system off (if configured and supported).
+'e'     - Send a SIGTERM to all processes, except for init.
 
-'s'     - Will attempt to sync all mounted filesystems.
+'f'    - Will call oom_kill to kill a memory hog process.
 
-'u'     - Will attempt to remount all mounted filesystems read-only.
+'g'    - Used by kgdb on ppc platforms.
 
-'p'     - Will dump the current registers and flags to your console.
+'h'     - Will display help (actually any other key than those listed
+          above will display help. but 'h' is easy to remember :-)
 
-'t'     - Will dump a list of current tasks and their information to your
-          console.
+'i'     - Send a SIGKILL to all processes, except for init.
+
+'k'     - Secure Access Key (SAK) Kills all programs on the current virtual
+          console. NOTE: See important comments below in SAK section.
 
 'm'     - Will dump current memory info to your console.
 
 'n'    - Used to make RT tasks nice-able
 
+'o'     - Will shut your system off (if configured and supported).
+
+'p'     - Will dump the current registers and flags to your console.
+
+'r'     - Turns off keyboard raw mode and sets it to XLATE.
+
+'s'     - Will attempt to sync all mounted filesystems.
+
+'t'     - Will dump a list of current tasks and their information to your
+          console.
+
+'u'     - Will attempt to remount all mounted filesystems read-only.
+
 'v'    - Dumps Voyager SMP processor info to your console.
 
 'w'    - Dumps tasks that are in uninterruptable (blocked) state.
@@ -102,17 +113,6 @@ On all -  write a character to /proc/sysrq-trigger.  e.g.:
           it so that only emergency messages like PANICs or OOPSes would
           make it to your console.)
 
-'f'    - Will call oom_kill to kill a memory hog process.
-
-'e'     - Send a SIGTERM to all processes, except for init.
-
-'g'    - Used by kgdb on ppc platforms.
-
-'i'     - Send a SIGKILL to all processes, except for init.
-
-'h'     - Will display help (actually any other key than those listed
-          above will display help. but 'h' is easy to remember :-)
-
 *  Okay, so what can I use them for?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Well, un'R'aw is very handy when your X server or a svgalib program crashes.
index a6c1ebd18d0f801e685e5625ca052aa98eea7d88..9ea954ace2ffabdb21b45de731517261be3605fa 100644 (file)
@@ -635,6 +635,12 @@ W: http://people.redhat.com/sgrubb/audit/
 T:     git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git
 S:     Maintained
 
+AUXILIARY DISPLAY DRIVERS
+P:     Miguel Ojeda Sandonis
+M:     maxextreme@gmail.com
+L:     linux-kernel@vger.kernel.org
+S:     Maintained
+
 AVR32 ARCHITECTURE
 P:     Haavard Skinnemoen
 M:     hskinnemoen@atmel.com
@@ -836,6 +842,18 @@ L: linux-kernel@vger.kernel.org
 L:     discuss@x86-64.org
 S:     Maintained
 
+CFAG12864B LCD DRIVER
+P:     Miguel Ojeda Sandonis
+M:     maxextreme@gmail.com
+L:     linux-kernel@vger.kernel.org
+S:     Maintained
+
+CFAG12864BFB LCD FRAMEBUFFER DRIVER
+P:     Miguel Ojeda Sandonis
+M:     maxextreme@gmail.com
+L:     linux-kernel@vger.kernel.org
+S:     Maintained
+
 COMMON INTERNET FILE SYSTEM (CIFS)
 P:     Steve French
 M:     sfrench@samba.org
@@ -1971,6 +1989,12 @@ M:       davem@davemloft.net
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
+KS0108 LCD CONTROLLER DRIVER
+P:     Miguel Ojeda Sandonis
+M:     maxextreme@gmail.com
+L:     linux-kernel@vger.kernel.org
+S:     Maintained
+
 LAPB module
 L:     linux-x25@vger.kernel.org
 S:     Orphan
index 84caf50725b53e829df2a39baa059084d63663e4..770f717bd250c2c0965b6477e2b6b205b8f37dbe 100644 (file)
@@ -41,6 +41,10 @@ config GENERIC_CALIBRATE_DELAY
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_ISA_DMA
        bool
        default y
index d7053eb4ffcfd93623d58aabda82d30cf9118dee..4748e14a28bca3b9edd05b73d0787b60367cee7d 100644 (file)
@@ -90,17 +90,6 @@ static inline __u32 rpcc(void)
     return result;
 }
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- *
- * Copied from ARM code for expediency... ;-}
- */
-unsigned long long sched_clock(void)
-{
-        return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
-
 /*
  * timer_interrupt() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
index 76bf071e376c9915b31fe96fc30dbb3090672a34..4cc44bd33d3345502339ebe62e45790841eddff0 100644 (file)
@@ -52,10 +52,12 @@ SECTIONS
   }
   __initcall_end = .;
 
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(8192);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
 
   . = ALIGN(8);
   .con_initcall.init : {
index 1523046e092bd6b24488354617293037ca47e0a6..5c795193ebbad56bcde85161ffaab4fde02e2e90 100644 (file)
@@ -29,6 +29,10 @@ config MMU
        bool
        default y
 
+config NO_IOPORT
+       bool
+       default n
+
 config EISA
        bool
        ---help---
@@ -100,6 +104,10 @@ config GENERIC_BUST_SPINLOCK
 config ARCH_MAY_HAVE_PC_FDC
        bool
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_ISA_DMA
        bool
 
@@ -294,6 +302,7 @@ config ARCH_RPC
        select TIMER_ACORN
        select ARCH_MAY_HAVE_PC_FDC
        select ISA_DMA_API
+       select NO_IOPORT
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
index 3c8cdcfe8d4a9f72c9ffb3762a72b260be85d73c..ee47c532e2108b0879bef642c3a5ee174891b581 100644 (file)
@@ -77,16 +77,6 @@ static unsigned long dummy_gettimeoffset(void)
 }
 #endif
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- * This is the default implementation.  Sub-architecture
- * implementations can override this.
- */
-unsigned long long __attribute__((weak)) sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 /*
  * An implementation of printk_clock() independent from
  * sched_clock().  This avoids non-bootable kernels when
index a8fa75ea07a991a3211da58766cb33dfbca235a9..b929a60f7547cdde716dca1c18b06aafd92f8a22 100644 (file)
@@ -53,10 +53,12 @@ SECTIONS
                __security_initcall_start = .;
                        *(.security_initcall.init)
                __security_initcall_end = .;
+#ifdef CONFIG_BLK_DEV_INITRD
                . = ALIGN(32);
                __initramfs_start = .;
                        usr/built-in.o(.init.ramfs)
                __initramfs_end = .;
+#endif
                . = ALIGN(64);
                __per_cpu_start = .;
                        *(.data.percpu)
index 74eba8b5a8ca41c5576b30c691b56344f0a416ce..989113dce415fadb3ac3e4e6dff03ea40a2ebd7c 100644 (file)
@@ -60,6 +60,10 @@ config GENERIC_CALIBRATE_DELAY
 config GENERIC_BUST_SPINLOCK
        bool
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_ISA_DMA
        bool
 
index 9dbc17247c6fdfd6a3b00b2fdc734b02aaae02f9..e2bcefc91cc30fe2001e01b6481003659cc64ddc 100644 (file)
@@ -665,7 +665,7 @@ ecard_probe(int slot, card_type_t type)
                ec->fiqmask = 4;
        }
 
-       for (i = 0; i < sizeof(blacklist) / sizeof(*blacklist); i++)
+       for (i = 0; i < ARRAY_SIZE(blacklist); i++)
                if (blacklist[i].manufacturer == ec->cid.manufacturer &&
                    blacklist[i].product == ec->cid.product) {
                        ec->card_desc = blacklist[i].type;
index 1206469b2b86249574f0dd111a83d457b960c7a8..0f1d57fbd3d7bea278fed6bf0ed3a20b0e7ce8d6 100644 (file)
@@ -89,14 +89,6 @@ static unsigned long gettimeoffset(void)
         return (offset + LATCH/2) / LATCH;
 }
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 static unsigned long next_rtc_update;
 
 /*
index ca61ec8218fe4bd33657766cbec3f2c0cfabdbc7..046a85054018ff4ee849e99d2cfe3483b3025657 100644 (file)
@@ -46,10 +46,12 @@ SECTIONS
                __con_initcall_start = .;
                        *(.con_initcall.init)
                __con_initcall_end = .;
+#ifdef CONFIG_BLK_DEV_INITRD
                . = ALIGN(32);
                __initramfs_start = .;
                        usr/built-in.o(.init.ramfs)
                __initramfs_end = .;
+#endif
                . = ALIGN(32768);
                __init_end = .;
        }
index d1d3418d7eb623627005e398094660ed678035d1..1d2949e83be8de301112f98bec3599cd046a7047 100644 (file)
@@ -47,10 +47,12 @@ SECTIONS
                __con_initcall_start = .;
                        *(.con_initcall.init)
                __con_initcall_end = .;
+#ifdef CONFIG_BLK_DEV_INITRD
                . = ALIGN(32);
                __initramfs_start = .;
                        usr/built-in.o(.init.ramfs)
                __initramfs_end = .;
+#endif
                . = ALIGN(32768);
                __init_end = .;
        }
index 5a247ba71a72e1bdfcd036e3ca8840eb35fbfe08..a2f74affaa98b920729d629a71d55c796475e0e3 100644 (file)
@@ -109,15 +109,6 @@ static void avr32_hpt_init(unsigned int count)
        sysreg_write(COUNT, count);
 }
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       /* There must be better ways...? */
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 /*
  * local_timer_interrupt() does profiling and process accounting on a
  * per-CPU basis.
index 5c4424e362b50cbaf918ccb264693f87ccf7509b..ef13b7c78935dba91cce904c289f3259f689db75 100644 (file)
@@ -46,10 +46,12 @@ SECTIONS
                __security_initcall_start = .;
                        *(.security_initcall.init)
                __security_initcall_end = .;
+#ifdef CONFIG_BLK_DEV_INITRD
                . = ALIGN(32);
                __initramfs_start = .;
                        *(.init.ramfs)
                __initramfs_end = .;
+#endif
                . = ALIGN(4096);
                __init_end = .;
        }
index 3474309e049c857ac2192c50fe1429358aff0dfc..4b41248b61ad8b6922df5b31c3ebdfa98d52945d 100644 (file)
@@ -9,6 +9,10 @@ config MMU
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config RWSEM_GENERIC_SPINLOCK
        bool
        default y
@@ -40,6 +44,9 @@ config IRQ_PER_CPU
        bool
        default y
 
+config NO_IOPORT
+       def_bool y
+
 config CRIS
        bool
        default y
index ffade19a14e6f0b974dbea77034bacc329ebd795..efd7b0f3a91042aa85455309594979ec6de44a3a 100644 (file)
@@ -359,8 +359,7 @@ static struct mtd_info *flash_probe(void)
                 * So we use the MTD concatenation layer instead of further
                 * complicating the probing procedure.
                 */
-               mtd_cse = mtd_concat_create(mtds,
-                                           sizeof(mtds) / sizeof(mtds[0]),
+               mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds),
                                            "cse0+cse1");
 #else
                printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel "
index ebacf1457d914cacae4069c21094639fbc906dd7..077e973c33f0c131be44a9c8e32fd4c149b61528 100644 (file)
@@ -38,7 +38,6 @@ unsigned long get_ns_in_jiffie(void)
        unsigned long flags;
 
        local_irq_save(flags);
-       local_irq_disable();
        timer_count = *R_TIMER0_DATA;
        presc_count = *R_TIM_PRESC_STATUS;  
        /* presc_count might be wrapped */
index 70a5523eff78b3a5f7ec2c98b4e4d98bd6a6d70d..7d9fec88dee56c16bdc6eef806c4d1b3fc450708 100644 (file)
@@ -42,8 +42,7 @@ flush_tlb_all(void)
         * in the same 4-way entry group. details.. 
         */
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        for(i = 0; i < NUM_TLB_ENTRIES; i++) {
                *R_TLB_SELECT = ( IO_FIELD(R_TLB_SELECT, index, i) );
                *R_TLB_HI = ( IO_FIELD(R_TLB_HI, page_id, INVALID_PAGEID ) |
@@ -78,8 +77,7 @@ flush_tlb_mm(struct mm_struct *mm)
         * global pages. is it worth the extra I/O ? 
         */
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        for(i = 0; i < NUM_TLB_ENTRIES; i++) {
                *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i);
                if (IO_EXTRACT(R_TLB_HI, page_id, *R_TLB_HI) == page_id) {
@@ -118,8 +116,7 @@ flush_tlb_page(struct vm_area_struct *vma,
         * and the virtual address requested 
         */
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        for(i = 0; i < NUM_TLB_ENTRIES; i++) {
                unsigned long tlb_hi;
                *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i);
index 689729a7e66e6b217d8649a3f8ae6235f1b2798d..4b348b38cf333f9819776a817a4de43f618ded6d 100644 (file)
@@ -82,7 +82,8 @@ SECTIONS
                __con_initcall_end = .;
        }       
        SECURITY_INIT
-               
+
+#ifdef CONFIG_BLK_DEV_INITRD
        .init.ramfs : {
                __initramfs_start = .;
                *(.init.ramfs)
@@ -93,6 +94,7 @@ SECTIONS
                FILL (0); 
                . = ALIGN (8192);
        }
+#endif
        
        __vmlinux_end = .;            /* last address of the physical file */
        __init_end = .;
index 9d75d7692303fca512713743952403f07cab07fe..c2d12e9c40d79a2e5720837bdaca10bebd07693c 100644 (file)
@@ -54,8 +54,7 @@ __flush_tlb_all(void)
         * Mask with 0xf so similar TLB entries aren't written in the same 4-way
         * entry group.
         */
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
 
        for (mmu = 1; mmu <= 2; mmu++) {
                SUPP_BANK_SEL(mmu); /* Select the MMU */
@@ -92,8 +91,7 @@ __flush_tlb_mm(struct mm_struct *mm)
                return;
 
        /* Mark the TLB entries that match the page_id as invalid. */
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
 
        for (mmu = 1; mmu <= 2; mmu++) {
                SUPP_BANK_SEL(mmu);
@@ -140,8 +138,7 @@ __flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
         * Invalidate those TLB entries that match both the mm context and the
         * requested virtual address.
         */
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
 
        for (mmu = 1; mmu <= 2; mmu++) {
                SUPP_BANK_SEL(mmu);
index 472d4b3c4cf4b1d595d36a7b43dabd063d7c5a2d..e124fcd766d5c0fcd1cfd06fd42a746e5444822b 100644 (file)
@@ -95,6 +95,7 @@ SECTIONS
        .data.percpu  : { *(.data.percpu) }
        __per_cpu_end = .;
 
+#ifdef CONFIG_BLK_DEV_INITRD
        .init.ramfs : {
                __initramfs_start = .;
                *(.init.ramfs)
@@ -107,6 +108,7 @@ SECTIONS
                FILL (0);
                . = ALIGN (8192);
        }
+#endif
 
        __vmlinux_end = .;      /* Last address of the physical file. */
        __init_end = .;
index 0f9213cbd48e24f9068c62125b7b9814d09ce617..acfd0455940590c5e5292ce86b89dde0e1b0200e 100644 (file)
@@ -55,7 +55,6 @@ void do_gettimeofday(struct timeval *tv)
        unsigned long flags;
        signed long usec, sec;
        local_irq_save(flags);
-       local_irq_disable();
        usec = do_gettimeoffset();
 
         /*
@@ -217,14 +216,6 @@ cris_do_profile(struct pt_regs* regs)
 #endif
 }
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 static int
 __init init_udelay(void)
 {
index 0df390a656cdf9f1edfc94c25b5bf6cbc7a33497..c4a98e2e529e04dd46b85ff768bdabad3df8d1a4 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <asm/tlb.h>
 
 #define D(x)
@@ -100,7 +101,7 @@ tlb_init(void)
 
        /* clear the page_id map */
 
-       for (i = 1; i < sizeof (page_id_map) / sizeof (page_id_map[0]); i++)
+       for (i = 1; i < ARRAY_SIZE(page_id_map); i++)
                page_id_map[i] = NULL;
        
        /* invalidate the entire TLB */
index 7561d7b72e75408bb05f3998008c2cee2b1debcf..cea237413aa242b995442e5abee32cfdac728fca 100644 (file)
@@ -6,6 +6,10 @@ config FRV
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config RWSEM_GENERIC_SPINLOCK
        bool
        default y
index 9c1fb12367fa3cfbedf6b8abe926fc40eb0e431e..97910e016825e29361f4fb41b5e5aee69b043d60 100644 (file)
@@ -61,10 +61,12 @@ SECTIONS
   .data.percpu  : { *(.data.percpu) }
   __per_cpu_end = .;
 
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(4096);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
 
   . = ALIGN(THREAD_SIZE);
   __init_end = .;
index 34a84bc4baf59ae515c1a0b0c899deee21604ef4..1734d96422c60f82219e779d57bae3c81fac525b 100644 (file)
@@ -17,6 +17,10 @@ config SWAP
        bool
        default n
 
+config ZONE_DMA
+       bool
+       default y
+
 config FPU
        bool
        default n
@@ -53,6 +57,9 @@ config TIME_LOW_RES
        bool
        default y
 
+config NO_IOPORT
+       def_bool y
+
 config ISA
        bool
        default y
index 71b6131e98b877f1d21559a80139707b2dce1de8..4edbc2ef6ca28e6d2c8a09c9727ec5c9f9a50b30 100644 (file)
@@ -6,6 +6,8 @@ extra-y := vmlinux.lds
 
 obj-y := process.o traps.o ptrace.o ints.o \
         sys_h8300.o time.o semaphore.o signal.o \
-         setup.o gpio.o init_task.o syscalls.o
+         setup.o gpio.o init_task.o syscalls.o devres.o
+
+devres-y = ../../../kernel/irq/devres.o
 
 obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o 
index 8abab3bc2b6fe1615cf80c71e3ca6450e8ee91f2..d1ef615ba895369ffb4883b082600e1e66e9651f 100644 (file)
@@ -118,9 +118,3 @@ int do_settimeofday(struct timespec *tv)
 }
 
 EXPORT_SYMBOL(do_settimeofday);
-
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-
-}
index f05288be8878fb86efcf4bcae6b95fdafe69073d..65f1cdc5ee0459fd20b3fab62ee5f36a2e962216 100644 (file)
@@ -126,10 +126,12 @@ SECTIONS
        ___con_initcall_end = .;
                *(.exit.text)
                *(.exit.data)
+#if defined(CONFIG_BLK_DEV_INITRD)
                . = ALIGN(4);
        ___initramfs_start = .;
                *(.init.ramfs)
        ___initramfs_end = .;
+#endif
        . = ALIGN(0x4) ;
        ___init_end = .;
        __edata = . ;
index 0dfee812811a9c75427551ef8177b45f2ca7a998..63d5e841caf5a1ce0ceb7e986c572b6b70f7f3e9 100644 (file)
@@ -38,6 +38,10 @@ config MMU
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config SBUS
        bool
 
index a53c8b1854b58896a2dbc2b384d52722a1754481..5038a73d554e18df68cc097c5f77431ddf50a5b5 100644 (file)
@@ -181,12 +181,14 @@ SECTIONS
      from .altinstructions and .eh_frame */
   .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
   .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
+#if defined(CONFIG_BLK_DEV_INITRD)
   . = ALIGN(4096);
   .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
        __initramfs_start = .;
        *(.init.ramfs)
        __initramfs_end = .;
   }
+#endif
   . = ALIGN(L1_CACHE_BYTES);
   .data.percpu  : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
        __per_cpu_start = .;
index aaaa4d225f7e25ad86c66511fcdf06d598ce9a09..cba9b3894a3325c0490ab1f8475a851cea25ba2f 100644 (file)
@@ -59,32 +59,6 @@ static inline int notify_page_fault(enum die_val val, const char *str,
        return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args);
 }
 
-/*
- * Unlock any spinlocks which will prevent us from getting the
- * message out 
- */
-void bust_spinlocks(int yes)
-{
-       int loglevel_save = console_loglevel;
-
-       if (yes) {
-               oops_in_progress = 1;
-               return;
-       }
-#ifdef CONFIG_VT
-       unblank_screen();
-#endif
-       oops_in_progress = 0;
-       /*
-        * OK, the message is on the console.  Now we call printk()
-        * without oops_in_progress set so that printk will give klogd
-        * a poke.  Hold onto your hats...
-        */
-       console_loglevel = 15;          /* NMI oopser may have shut the console up */
-       printk(" ");
-       console_loglevel = loglevel_save;
-}
-
 /*
  * Return EIP plus the CS segment base.  The segment limit is also
  * adjusted, clamped to the kernel/user address space (whichever is
index e0fa6cb655a82574a50c3e8fc9334c2f71b9c156..bb2de1089add4e90270e4f35afbbe442007cbefe 100644 (file)
@@ -33,13 +33,14 @@ void *kmap_atomic(struct page *page, enum km_type type)
 
        /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
        pagefault_disable();
+
+       idx = type + KM_TYPE_NR*smp_processor_id();
+       BUG_ON(!pte_none(*(kmap_pte-idx)));
+
        if (!PageHighMem(page))
                return page_address(page);
 
-       idx = type + KM_TYPE_NR*smp_processor_id();
        vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-       if (!pte_none(*(kmap_pte-idx)))
-               BUG();
        set_pte(kmap_pte-idx, mk_pte(page, kmap_prot));
 
        return (void*) vaddr;
index f1d2899e9a629763173afffb8d86766a5fac08fc..db185f34e34117ddca100abf49df37d1af5bfed4 100644 (file)
@@ -24,6 +24,10 @@ config 64BIT
        bool
        default y
 
+config ZONE_DMA
+       def_bool y
+       depends on !IA64_SGI_SN2
+
 config MMU
        bool
        default y
index 578737ec7629374253ea7b53029b8a3fe7d6848c..c05bda66236451291e51e7622682ab41593739bf 100644 (file)
@@ -91,9 +91,8 @@ ia64_elf32_init (struct pt_regs *regs)
         * it with privilege level 3 because the IVE uses non-privileged accesses to these
         * tables.  IA-32 segmentation is used to protect against IA-32 accesses to them.
         */
-       vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (vma) {
-               memset(vma, 0, sizeof(*vma));
                vma->vm_mm = current->mm;
                vma->vm_start = IA32_GDT_OFFSET;
                vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -117,9 +116,8 @@ ia64_elf32_init (struct pt_regs *regs)
         * code is locked in specific gate page, which is pointed by pretcode
         * when setup_frame_ia32
         */
-       vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (vma) {
-               memset(vma, 0, sizeof(*vma));
                vma->vm_mm = current->mm;
                vma->vm_start = IA32_GATE_OFFSET;
                vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -142,9 +140,8 @@ ia64_elf32_init (struct pt_regs *regs)
         * Install LDT as anonymous memory.  This gives us all-zero segment descriptors
         * until a task modifies them via modify_ldt().
         */
-       vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (vma) {
-               memset(vma, 0, sizeof(*vma));
                vma->vm_mm = current->mm;
                vma->vm_start = IA32_LDT_OFFSET;
                vma->vm_end = vma->vm_start + PAGE_ALIGN(IA32_LDT_ENTRIES*IA32_LDT_ENTRY_SIZE);
@@ -214,12 +211,10 @@ ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack)
                bprm->loader += stack_base;
        bprm->exec += stack_base;
 
-       mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (!mpnt)
                return -ENOMEM;
 
-       memset(mpnt, 0, sizeof(*mpnt));
-
        down_write(&current->mm->mmap_sem);
        {
                mpnt->vm_mm = current->mm;
index a32cd59b81ed7e00658fd0f7b6fcf00924121736..687e5fdc968377fcead5c80c909f9f7aa8e02f5b 100644 (file)
@@ -326,7 +326,7 @@ ia32_syscall_table:
        data8 sys_ni_syscall
        data8 compat_sys_wait4
        data8 sys_swapoff         /* 115 */
-       data8 sys32_sysinfo
+       data8 compat_sys_sysinfo
        data8 sys32_ipc
        data8 sys_fsync
        data8 sys32_sigreturn
index 957681c39ad9957a287929c093aa060908b7c9c4..d430d36ae49d62763757d05c354ec4590781d6da 100644 (file)
@@ -2209,74 +2209,6 @@ sys32_fstat64 (unsigned int fd, struct stat64 __user *statbuf)
        return ret;
 }
 
-struct sysinfo32 {
-       s32 uptime;
-       u32 loads[3];
-       u32 totalram;
-       u32 freeram;
-       u32 sharedram;
-       u32 bufferram;
-       u32 totalswap;
-       u32 freeswap;
-       u16 procs;
-       u16 pad;
-       u32 totalhigh;
-       u32 freehigh;
-       u32 mem_unit;
-       char _f[8];
-};
-
-asmlinkage long
-sys32_sysinfo (struct sysinfo32 __user *info)
-{
-       struct sysinfo s;
-       long ret, err;
-       int bitcount = 0;
-       mm_segment_t old_fs = get_fs();
-
-       set_fs(KERNEL_DS);
-       ret = sys_sysinfo((struct sysinfo __user *) &s);
-       set_fs(old_fs);
-       /* Check to see if any memory value is too large for 32-bit and
-        * scale down if needed.
-        */
-       if ((s.totalram >> 32) || (s.totalswap >> 32)) {
-               while (s.mem_unit < PAGE_SIZE) {
-                       s.mem_unit <<= 1;
-                       bitcount++;
-               }
-               s.totalram >>= bitcount;
-               s.freeram >>= bitcount;
-               s.sharedram >>= bitcount;
-               s.bufferram >>= bitcount;
-               s.totalswap >>= bitcount;
-               s.freeswap >>= bitcount;
-               s.totalhigh >>= bitcount;
-               s.freehigh >>= bitcount;
-       }
-
-       if (!access_ok(VERIFY_WRITE, info, sizeof(*info)))
-               return -EFAULT;
-
-       err  = __put_user(s.uptime, &info->uptime);
-       err |= __put_user(s.loads[0], &info->loads[0]);
-       err |= __put_user(s.loads[1], &info->loads[1]);
-       err |= __put_user(s.loads[2], &info->loads[2]);
-       err |= __put_user(s.totalram, &info->totalram);
-       err |= __put_user(s.freeram, &info->freeram);
-       err |= __put_user(s.sharedram, &info->sharedram);
-       err |= __put_user(s.bufferram, &info->bufferram);
-       err |= __put_user(s.totalswap, &info->totalswap);
-       err |= __put_user(s.freeswap, &info->freeswap);
-       err |= __put_user(s.procs, &info->procs);
-       err |= __put_user (s.totalhigh, &info->totalhigh);
-       err |= __put_user (s.freehigh, &info->freehigh);
-       err |= __put_user (s.mem_unit, &info->mem_unit);
-       if (err)
-               return -EFAULT;
-       return ret;
-}
-
 asmlinkage long
 sys32_sched_rr_get_interval (pid_t pid, struct compat_timespec __user *interval)
 {
index aa94f60fa8e7724ee04f83e665e9b762c97540ca..86e144f321ff5b59e9545eb80d9ec751b4415846 100644 (file)
@@ -2301,12 +2301,11 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon
        DPRINT(("smpl_buf @%p\n", smpl_buf));
 
        /* allocate vma */
-       vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (!vma) {
                DPRINT(("Cannot allocate vma\n"));
                goto error_kmem;
        }
-       memset(vma, 0, sizeof(*vma));
 
        /*
         * partially initialize the vma for the sampling buffer
index ab684747036fbcf71b6ce464a9561942f982e48d..765cbe5ba6ae280474761231db44d890ff74cbde 100644 (file)
@@ -24,8 +24,6 @@
 #include <asm/uaccess.h>
 #include <asm/kdebug.h>
 
-extern spinlock_t timerlist_lock;
-
 fpswa_interface_t *fpswa_interface;
 EXPORT_SYMBOL(fpswa_interface);
 
@@ -53,34 +51,6 @@ trap_init (void)
                fpswa_interface = __va(ia64_boot_param->fpswa);
 }
 
-/*
- * Unlock any spinlocks which will prevent us from getting the message out (timerlist_lock
- * is acquired through the console unblank code)
- */
-void
-bust_spinlocks (int yes)
-{
-       int loglevel_save = console_loglevel;
-
-       if (yes) {
-               oops_in_progress = 1;
-               return;
-       }
-
-#ifdef CONFIG_VT
-       unblank_screen();
-#endif
-       oops_in_progress = 0;
-       /*
-        * OK, the message is on the console.  Now we call printk() without
-        * oops_in_progress set so that printk will give klogd a poke.  Hold onto
-        * your hats...
-        */
-       console_loglevel = 15;          /* NMI oopser may have shut the console up */
-       printk(" ");
-       console_loglevel = loglevel_save;
-}
-
 void
 die (const char *str, struct pt_regs *regs, long err)
 {
index 8f3d0066f4468cffbb980ce04e091ea48c4b6106..25dd55e4db2482985e86563599be0f05ec74058b 100644 (file)
@@ -111,12 +111,14 @@ SECTIONS
   .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
        { *(.init.data) }
 
+#ifdef CONFIG_BLK_DEV_INITRD
   .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
        {
          __initramfs_start = .;
          *(.init.ramfs)
          __initramfs_end = .;
        }
+#endif
 
    . = ALIGN(16);
   .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
index 63e6d49c5813ed2bac5d027f0668a80080544a97..ca4d41e5f177563c5739816c14ee563dc51ed87b 100644 (file)
@@ -259,9 +259,11 @@ paging_init (void)
        num_physpages = 0;
        efi_memmap_walk(count_pages, &num_physpages);
 
-       max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
        memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
+#ifdef CONFIG_ZONE_DMA
+       max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
        max_zone_pfns[ZONE_DMA] = max_dma;
+#endif
        max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
index 6eae596c509d5cc5c17a5ebc5b5702f4e6d6bf01..16835108bb5bc71a3e19cdcc1f582473ce89899c 100644 (file)
@@ -37,7 +37,9 @@ struct early_node_data {
        unsigned long pernode_size;
        struct bootmem_data bootmem_data;
        unsigned long num_physpages;
+#ifdef CONFIG_ZONE_DMA
        unsigned long num_dma_physpages;
+#endif
        unsigned long min_pfn;
        unsigned long max_pfn;
 };
@@ -633,9 +635,11 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n
        unsigned long end = start + len;
 
        mem_data[node].num_physpages += len >> PAGE_SHIFT;
+#ifdef CONFIG_ZONE_DMA
        if (start <= __pa(MAX_DMA_ADDRESS))
                mem_data[node].num_dma_physpages +=
                        (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
+#endif
        start = GRANULEROUNDDOWN(start);
        start = ORDERROUNDDOWN(start);
        end = GRANULEROUNDUP(end);
@@ -688,7 +692,9 @@ void __init paging_init(void)
        }
 
        memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
+#ifdef CONFIG_ZONE_DMA
        max_zone_pfns[ZONE_DMA] = max_dma;
+#endif
        max_zone_pfns[ZONE_NORMAL] = max_pfn;
        free_area_init_nodes(max_zone_pfns);
 
index faaca21a3718c5e7b5b82ed7a5b04fbc7c586a8e..f225dd72968b3bdd159b1b7c0552eec66b3c92e2 100644 (file)
@@ -68,7 +68,7 @@ max_pgt_pages(void)
 #ifndef        CONFIG_NUMA
        node_free_pages = nr_free_pages();
 #else
-       node_free_pages = nr_free_pages_pgdat(NODE_DATA(numa_node_id()));
+       node_free_pages = node_page_state(numa_node_id(), NR_FREE_PAGES);
 #endif
        max_pgt_pages = node_free_pages / PGT_FRACTION_OF_NODE_MEM;
        max_pgt_pages = max(max_pgt_pages, MIN_PGT_PAGES);
@@ -176,9 +176,8 @@ ia64_init_addr_space (void)
         * the problem.  When the process attempts to write to the register backing store
         * for the first time, it will get a SEGFAULT in this case.
         */
-       vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (vma) {
-               memset(vma, 0, sizeof(*vma));
                vma->vm_mm = current->mm;
                vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
                vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -195,9 +194,8 @@ ia64_init_addr_space (void)
 
        /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
        if (!(current->personality & MMAP_PAGE_ZERO)) {
-               vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+               vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
                if (vma) {
-                       memset(vma, 0, sizeof(*vma));
                        vma->vm_mm = current->mm;
                        vma->vm_end = PAGE_SIZE;
                        vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT);
index 43ddc2eccb965bd3c71d372e1afc6c53505babc4..62b3e9a496acc7bd0d716c74931cd6e58db78bf5 100644 (file)
@@ -89,61 +89,80 @@ static int coherence_id_open(struct inode *inode, struct file *file)
        return single_open(file, coherence_id_show, NULL);
 }
 
-static struct proc_dir_entry
-*sn_procfs_create_entry(const char *name, struct proc_dir_entry *parent,
-                       int (*openfunc)(struct inode *, struct file *),
-       int (*releasefunc)(struct inode *, struct file *),
-       ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *))
-{
-       struct proc_dir_entry *e = create_proc_entry(name, 0444, parent);
-
-       if (e) {
-               struct file_operations *f;
-
-               f = kzalloc(sizeof(*f), GFP_KERNEL);
-               if (f) {
-                       f->open = openfunc;
-                       f->read = seq_read;
-                       f->llseek = seq_lseek;
-                       f->release = releasefunc;
-                       f->write = write;
-                       e->proc_fops = f;
-               }
-       }
-
-       return e;
-}
-
 /* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */
 extern int sn_topology_open(struct inode *, struct file *);
 extern int sn_topology_release(struct inode *, struct file *);
 
+static const struct file_operations proc_partition_id_fops = {
+       .open           = partition_id_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
+static const struct file_operations proc_system_sn_fops = {
+       .open           = system_serial_number_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
+static const struct file_operations proc_license_id_fops = {
+       .open           = licenseID_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
+static const struct file_operations proc_sn_force_intr_fops = {
+       .open           = sn_force_interrupt_open,
+       .read           = seq_read,
+       .write          = sn_force_interrupt_write_proc,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
+static const struct file_operations proc_coherence_id_fops = {
+       .open           = coherence_id_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
+static const struct file_operations proc_sn_topo_fops = {
+       .open           = sn_topology_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = sn_topology_release,
+};
+
 void register_sn_procfs(void)
 {
        static struct proc_dir_entry *sgi_proc_dir = NULL;
+       struct proc_dir_entry *pde;
 
        BUG_ON(sgi_proc_dir != NULL);
        if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL)))
                return;
 
-       sn_procfs_create_entry("partition_id", sgi_proc_dir,
-               partition_id_open, single_release, NULL);
-
-       sn_procfs_create_entry("system_serial_number", sgi_proc_dir,
-               system_serial_number_open, single_release, NULL);
-
-       sn_procfs_create_entry("licenseID", sgi_proc_dir, 
-               licenseID_open, single_release, NULL);
-
-       sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir,
-               sn_force_interrupt_open, single_release,
-               sn_force_interrupt_write_proc);
-
-       sn_procfs_create_entry("coherence_id", sgi_proc_dir, 
-               coherence_id_open, single_release, NULL);
-       
-       sn_procfs_create_entry("sn_topology", sgi_proc_dir,
-               sn_topology_open, sn_topology_release, NULL);
+       pde = create_proc_entry("partition_id", 0444, sgi_proc_dir);
+       if (pde)
+               pde->proc_fops = &proc_partition_id_fops;
+       pde = create_proc_entry("system_serial_number", 0444, sgi_proc_dir);
+       if (pde)
+               pde->proc_fops = &proc_system_sn_fops;
+       pde = create_proc_entry("licenseID", 0444, sgi_proc_dir);
+       if (pde)
+               pde->proc_fops = &proc_license_id_fops;
+       pde = create_proc_entry("sn_force_interrupt", 0644, sgi_proc_dir);
+       if (pde)
+               pde->proc_fops = &proc_sn_force_intr_fops;
+       pde = create_proc_entry("coherence_id", 0444, sgi_proc_dir);
+       if (pde)
+               pde->proc_fops = &proc_coherence_id_fops;
+       pde = create_proc_entry("sn_topology", 0444, sgi_proc_dir);
+       if (pde)
+               pde->proc_fops = &proc_sn_topo_fops;
 }
 
 #endif /* CONFIG_PROC_FS */
index f383dab973f5ea62d86f914a5774357be3ea7a4d..9740d6b8ae11c407ae56d4c88bf6b179056deceb 100644 (file)
@@ -16,6 +16,10 @@ config GENERIC_ISA_DMA
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_HARDIRQS
        bool
        default y
@@ -24,6 +28,9 @@ config GENERIC_IRQ_PROBE
        bool
        default y
 
+config NO_IOPORT
+       def_bool y
+
 source "init/Kconfig"
 
 
index f219c47d334fefd3c12892ecf7ffd640e8fda1ed..cdf63b210c53d68d7ebad661498515401851fb05 100644 (file)
@@ -7,7 +7,7 @@
 
 LDFLAGS                :=
 OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
-LDFLAGS_vmlinux        := -e startup_32
+LDFLAGS_vmlinux        :=
 
 CFLAGS += -pipe -fno-schedule-insns
 CFLAGS_KERNEL += -mmodel=medium
index 853093093168e40bede4a8df4baa86dc0931af2f..13579917afef09e621bdfbf6fd08e6393e90f174 100644 (file)
@@ -1,20 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:20:11 2005
+# Linux kernel version: 2.6.19
+# Tue Dec 12 17:52:38 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
@@ -22,32 +20,40 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
-# CONFIG_IKCONFIG_PROC is not set
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -55,10 +61,29 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
 
 #
 # Processor type and features
@@ -70,8 +95,10 @@ CONFIG_PLAT_M32700UT=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 CONFIG_CHIP_M32700=y
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 CONFIG_MMU=y
@@ -85,34 +112,39 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x01000000
 CONFIG_NOHIGHMEM=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00080000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
-# CONFIG_SMP is not set
+CONFIG_SMP=y
+# CONFIG_CHIP_M32700_TS1 is not set
+CONFIG_NR_CPUS=2
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
 #
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-
-#
-# PC-card bridges
-#
-# CONFIG_TCIC is not set
-# CONFIG_M32R_PCC is not set
-CONFIG_M32R_CFC=y
-CONFIG_M32R_CFC_NUM=1
+# CONFIG_PCCARD is not set
 
 #
 # PCI Hotplug Support
@@ -124,6 +156,94 @@ CONFIG_M32R_CFC_NUM=1
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -133,12 +253,100 @@ CONFIG_BINFMT_ELF=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
 #
-# CONFIG_MTD is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
+# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+# CONFIG_MTD_CHAR is not set
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+# CONFIG_MTD_CFI_NOSWAP is not set
+CONFIG_MTD_CFI_BE_BYTE_SWAP=y
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+# CONFIG_MTD_CFI_I2 is not set
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=m
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=m
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
 
 #
 # Parallel port support
@@ -152,7 +360,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -160,23 +367,21 @@ CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+CONFIG_ATA_OVER_ETH=m
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
@@ -185,7 +390,6 @@ CONFIG_BLK_DEV_IDE=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-CONFIG_BLK_DEV_IDECS=y
 CONFIG_BLK_DEV_IDECD=m
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -204,7 +408,9 @@ CONFIG_IDE_GENERIC=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=m
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -216,6 +422,7 @@ CONFIG_BLK_DEV_SD=m
 CONFIG_BLK_DEV_SR=m
 # CONFIG_BLK_DEV_SR_VENDOR is not set
 CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -225,26 +432,23 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_LOGGING is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
 #
-# CONFIG_SCSI_SATA is not set
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
-# PCMCIA SCSI adapter support
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
 #
-# CONFIG_PCMCIA_AHA152X is not set
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -254,6 +458,7 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -264,75 +469,19 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
+# Network device support
 #
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -358,11 +507,6 @@ CONFIG_SMC91X=y
 #
 # CONFIG_NET_RADIO is not set
 
-#
-# PCMCIA network device support
-#
-# CONFIG_NET_PCMCIA is not set
-
 #
 # Wan interfaces
 #
@@ -371,6 +515,8 @@ CONFIG_SMC91X=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -386,6 +532,7 @@ CONFIG_SMC91X=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -414,7 +561,6 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -422,6 +568,7 @@ CONFIG_SOUND_GAMEPORT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -450,8 +597,8 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 CONFIG_DS1302=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -459,52 +606,64 @@ CONFIG_DS1302=y
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
 #
-CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
 
 #
-# Video For Linux
+# Video Capture Adapters
 #
 
 #
-# Video Adapters
+# Video Capture Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
 # CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_M32R_AR=y
-CONFIG_VIDEO_M32R_AR_M64278=y
+CONFIG_VIDEO_M32R_AR=m
+CONFIG_VIDEO_M32R_AR_M64278=m
 
 #
 # Radio Adapters
 #
-# CONFIG_RADIO_MAESTRO is not set
 
 #
 # Digital Video Broadcasting Devices
@@ -514,15 +673,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 CONFIG_FB=y
-# CONFIG_FB_CFB_FILLRECT is not set
-# CONFIG_FB_CFB_COPYAREA is not set
-# CONFIG_FB_CFB_IMAGEBLIT is not set
-# CONFIG_FB_SOFT_CURSOR is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_S1D13XXX=y
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -531,6 +691,7 @@ CONFIG_FB=y
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
@@ -542,6 +703,7 @@ CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_LOGO_M32R_CLUT224=y
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -554,6 +716,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -563,23 +730,62 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # MMC/SD Card support
 #
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+CONFIG_MMC_DEBUG=y
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_TIFM_SD is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
 
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=m
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=m
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
 CONFIG_JBD_DEBUG=y
 CONFIG_FS_MBCACHE=y
 CONFIG_REISERFS_FS=m
@@ -587,17 +793,19 @@ CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_REISERFS_FS_XATTR is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -623,15 +831,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -643,6 +849,8 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -655,12 +863,14 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -669,6 +879,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -723,16 +934,23 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # Profiling support
 #
-# CONFIG_PROFILING is not set
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
 
 #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=14
+CONFIG_LOG_BUF_SHIFT=15
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -745,13 +963,10 @@ CONFIG_LOG_BUF_SHIFT=14
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
index 0d3c8ee0e03d9fc21de2fd05f160d7d612d993a2..dab7436d7bbe85e2997c18b43b5082e4eece4255 100644 (file)
@@ -7,8 +7,6 @@
  *                            Hitoshi Yamamoto
  */
 
-/* $Id$ */
-
 #include <linux/init.h>
 __INIT
 __INITDATA
index 44cbe0ce0f8fb21681590509e76af47ac9696727..a689e2978b6e382bdad4f9fcd56fbf194a1ddb6f 100644 (file)
@@ -174,7 +174,7 @@ void show_regs(struct pt_regs * regs)
          regs->acc1h, regs->acc1l);
 #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
        printk("ACCH[%08lx]:ACCL[%08lx]\n", \
-         regs->acch, regs->accl);
+         regs->acc0h, regs->acc0l);
 #else
 #error unknown isa configuration
 #endif
index 092ea86bb0794a473780c2b474197f2bcf4ef1ee..4b156054baa6306f0d1d5d774c3f972809951737 100644 (file)
@@ -109,19 +109,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
        COPY(r10);
        COPY(r11);
        COPY(r12);
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
        COPY(acc0h);
        COPY(acc0l);
-       COPY(acc1h);
-       COPY(acc1l);
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
-       COPY(acch);
-       COPY(accl);
-       COPY(dummy_acc1h);
-       COPY(dummy_acc1l);
-#else
-#error unknown isa configuration
-#endif
+       COPY(acc1h);            /* ISA_DSP_LEVEL2 only */
+       COPY(acc1l);            /* ISA_DSP_LEVEL2 only */
        COPY(psw);
        COPY(bpc);
        COPY(bbpsw);
@@ -196,19 +187,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
        COPY(r10);
        COPY(r11);
        COPY(r12);
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
        COPY(acc0h);
        COPY(acc0l);
-       COPY(acc1h);
-       COPY(acc1l);
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
-       COPY(acch);
-       COPY(accl);
-       COPY(dummy_acc1h);
-       COPY(dummy_acc1l);
-#else
-#error unknown isa configuration
-#endif
+       COPY(acc1h);            /* ISA_DSP_LEVEL2 only */
+       COPY(acc1l);            /* ISA_DSP_LEVEL2 only */
        COPY(psw);
        COPY(bpc);
        COPY(bbpsw);
index a09038282c78a3f5b452f4c4cbbf06120283d15f..3858c9f39ba5fb2362ad60e5ce381514e5c7c933 100644 (file)
@@ -286,11 +286,3 @@ void __init time_init(void)
 #error no chip configuration
 #endif
 }
-
-/*
- *  Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
index 358b9cee2c6585c0a84d42e9e22ef4c7fbe52b64..439cc257cd1df7faf55a57051530d65be3dac13b 100644 (file)
@@ -6,12 +6,15 @@
 #include <asm/page.h>
 
 OUTPUT_ARCH(m32r)
-ENTRY(startup_32)
 #if defined(__LITTLE_ENDIAN__)
        jiffies = jiffies_64;
 #else
        jiffies = jiffies_64 + 4;
 #endif
+
+kernel_entry = boot - 0x80000000;
+ENTRY(kernel_entry)
+
 SECTIONS
 {
   . = CONFIG_MEMORY_START + __PAGE_OFFSET;
@@ -99,10 +102,14 @@ SECTIONS
      from .altinstructions and .eh_frame */
   .exit.text : { *(.exit.text) }
   .exit.data : { *(.exit.data) }
+
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(4096);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
+
   . = ALIGN(32);
   __per_cpu_start = .;
   .data.percpu  : { *(.data.percpu) }
index 107594b65d58315059fd86f0cfe02c284cb6fc95..7fc0c19801ba4a3a688a8e8bd6e95daa8c1d9137 100644 (file)
@@ -4,8 +4,6 @@
  * Copyright (C) 2001,2002  Hiroyuki Kondo, and Hirokazu Takata
  *
  */
-/* $Id$ */
-
 
 ;
 ;      input   (r0,r1)  src
@@ -293,4 +291,3 @@ __lshrdi3:
 #endif /* not CONFIG_ISA_DUAL_ISSUE */
 
        .end
-
index cfbe00e5184a7dcbfb189cfde256942060e9f95f..0af0360c76d9505f2ce1965f3fc9e337830d1f46 100644 (file)
@@ -25,8 +25,6 @@
  *             as published by the Free Software Foundation; either version
  *             2 of the License, or (at your option) any later version.
  */
-/* $Id$ */
-
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
@@ -319,3 +317,4 @@ ENTRY(csum_partial_copy_generic)
        nop
        nop
 
+       .end
index 06382a38c3185f79242b2dbec8a3f12850bccced..59bfc34e0d9f8aa86ded52d4145592af889aec1f 100644 (file)
@@ -5,8 +5,6 @@
  * Copyright (c) 2004  Hirokazu Takata
  */
 
-/* $Id$ */
-
 #include <linux/param.h>
 #ifdef CONFIG_SMP
 #include <linux/sched.h>
index 2089a215314eb5aff9c18f032182bc0693696584..05987cd639ef70b9fa193ff3c0351e4f9215b4e0 100644 (file)
@@ -10,8 +10,6 @@
  *        src: r1
  *        n  : r2
  */
-/* $Id$ */
-
 
        .text
 #include <linux/linkage.h>
index b47fa3537aa4f16067473a9b7085beea3f79d6de..2b2831a379273730c79c026e64bc911d3e456caa 100644 (file)
@@ -12,8 +12,6 @@
  *        ret: r0
  *
  */
-/* $Id$ */
-
 
        .text
        .global memset
index 5f41aacd7b3e43f71ab10ed5fba0e07acd76b84a..916de9e8f80121cdbdc51d733b11d382636a0292 100644 (file)
@@ -6,8 +6,6 @@
  *  size_t strlen(const char *s);
  *
  */
-/* $Id$ */
-
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
index 454de336803a10b971d77ab2a98e3cd72dbe11c8..7b68fe8d921e2b8328f4d9cd58842090a9d11292 100644 (file)
@@ -1,20 +1,20 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.14
-# Wed Nov  9 16:04:51 2005
+# Linux kernel version: 2.6.19
+# Wed Dec 13 17:22:20 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
 #
@@ -22,33 +22,66 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 #
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-# CONFIG_KOBJECT_UEVENT is not set
-# CONFIG_IKCONFIG is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
-CONFIG_EMBEDDED=y
-# CONFIG_KALLSYMS is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-# CONFIG_FUTEX is not set
-# CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 CONFIG_TINY_SHMEM=y
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
 #
-# CONFIG_MODULES is not set
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
 
 #
 # Processor type and features
@@ -70,40 +103,40 @@ CONFIG_ISA_M32R=y
 CONFIG_BUS_CLOCK=54000000
 CONFIG_TIMER_DIVIDE=128
 # CONFIG_CPU_LITTLE_ENDIAN is not set
-CONFIG_MEMORY_START=04000000
-CONFIG_MEMORY_SIZE=01000000
+CONFIG_MEMORY_START=0x04000000
+CONFIG_MEMORY_SIZE=0x01000000
 CONFIG_NOHIGHMEM=y
-# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
+CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
 # CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00700000
+CONFIG_IRAM_SIZE=0x00010000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
-# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT=y
 # CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_ISA is not set
+CONFIG_ISA=y
 
 #
 # PCCARD (PCMCIA/CardBus) support
 #
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-
-#
-# PC-card bridges
-#
+# CONFIG_PCCARD is not set
 
 #
 # PCI Hotplug Support
@@ -112,10 +145,8 @@ CONFIG_PCMCIA_IOCTL=y
 #
 # Executable file formats
 #
-CONFIG_BINFMT_FLAT=y
-# CONFIG_BINFMT_ZFLAT is not set
-# CONFIG_BINFMT_SHARED_FLAT is not set
-# CONFIG_BINFMT_MISC is not set
+# CONFIG_BINFMT_FLAT is not set
+CONFIG_BINFMT_MISC=y
 
 #
 # Networking
@@ -125,17 +156,19 @@ CONFIG_NET=y
 #
 # Networking options
 #
-# CONFIG_PACKET is not set
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_FIB_HASH=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_PNP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_ARPD is not set
@@ -143,13 +176,87 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
 # CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+# CONFIG_IP_NF_MATCH_AH is not set
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
 
 #
 # DCCP Configuration (EXPERIMENTAL)
@@ -160,6 +267,11 @@ CONFIG_TCP_CONG_BIC=y
 # SCTP Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -169,11 +281,14 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_ATALK is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
 # CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
+CONFIG_NET_CLS_ROUTE=y
 
 #
 # Network testing
@@ -193,8 +308,8 @@ CONFIG_TCP_CONG_BIC=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -209,11 +324,21 @@ CONFIG_FW_LOADER=y
 #
 # Parallel port support
 #
-# CONFIG_PARPORT is not set
+CONFIG_PARPORT=m
+# CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_AX88796 is not set
+CONFIG_PARPORT_1284=y
 
 #
 # Plug and Play support
 #
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
 
 #
 # Block devices
@@ -221,37 +346,130 @@ CONFIG_FW_LOADER=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
-CONFIG_BLK_DEV_NBD=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_BLK_DEV_NBD=m
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+CONFIG_CDROM_PKTCDVD_WCACHE=y
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-# CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
-# CONFIG_IDE is not set
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_IDEPNP is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_BLK_DEV_HD is not set
 
 #
 # SCSI device support
 #
 # CONFIG_RAID_ATTRS is not set
-# CONFIG_SCSI is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=m
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
 
 #
 # Multi-device support (RAID and LVM)
 #
-# CONFIG_MD is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
+# CONFIG_MD_RAID456 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+# CONFIG_DM_MULTIPATH is not set
 
 #
 # Fusion MPT device support
@@ -270,10 +488,16 @@ CONFIG_IOSCHED_NOOP=y
 # Network device support
 #
 CONFIG_NETDEVICES=y
-CONFIG_DUMMY=y
+CONFIG_DUMMY=m
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
 
 #
 # PHY device support
@@ -285,8 +509,33 @@ CONFIG_DUMMY=y
 #
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
-CONFIG_SMC91X=y
-# CONFIG_NE2000 is not set
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_EL16 is not set
+# CONFIG_EL3 is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_SMC91X is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+# CONFIG_EWRK3 is not set
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=m
+# CONFIG_SEEQ8005 is not set
+CONFIG_NET_PCI=y
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+# CONFIG_CS89x0 is not set
+# CONFIG_NET_POCKET is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -299,21 +548,18 @@ CONFIG_SMC91X=y
 #
 # Token Ring devices
 #
+# CONFIG_TR is not set
 
 #
 # Wireless LAN (non-hamradio)
 #
 # CONFIG_NET_RADIO is not set
 
-#
-# PCMCIA network device support
-#
-# CONFIG_NET_PCMCIA is not set
-
 #
 # Wan interfaces
 #
 # CONFIG_WAN is not set
+# CONFIG_PLIP is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
@@ -334,35 +580,83 @@ CONFIG_SMC91X=y
 #
 # Input device support
 #
-# CONFIG_INPUT is not set
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
 
 #
 # Hardware I/O ports
 #
-# CONFIG_SERIO is not set
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_PARKBD is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
 
 #
 # Character devices
 #
-# CONFIG_VT is not set
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
 # Serial drivers
 #
-# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_PNP=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
 # Non-8250 serial port support
 #
 CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_M32R_SIO=y
-CONFIG_SERIAL_M32R_SIO_CONSOLE=y
+# CONFIG_SERIAL_M32R_SIO_CONSOLE is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_PRINTER is not set
+# CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
 
 #
 # IPMI
@@ -372,13 +666,8 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Watchdog Cards
 #
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=y
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -386,21 +675,57 @@ CONFIG_SOFT_WATCHDOG=y
 #
 # Ftape, the floppy tape device driver
 #
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
-# CONFIG_I2C is not set
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ELEKTOR=m
+CONFIG_I2C_ISA=m
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
 
 #
 # Dallas's 1-wire bus
@@ -410,21 +735,89 @@ CONFIG_SOFT_WATCHDOG=y
 #
 # Hardware Monitoring support
 #
-# CONFIG_HWMON is not set
-# CONFIG_HWMON_VID is not set
+CONFIG_HWMON=y
+CONFIG_HWMON_VID=m
+# CONFIG_SENSORS_ABITUGURU is not set
+CONFIG_SENSORS_ADM1021=m
+CONFIG_SENSORS_ADM1025=m
+# CONFIG_SENSORS_ADM1026 is not set
+CONFIG_SENSORS_ADM1031=m
+# CONFIG_SENSORS_ADM9240 is not set
+CONFIG_SENSORS_ASB100=m
+# CONFIG_SENSORS_ATXP1 is not set
+CONFIG_SENSORS_DS1621=m
+# CONFIG_SENSORS_F71805F is not set
+CONFIG_SENSORS_FSCHER=m
+# CONFIG_SENSORS_FSCPOS is not set
+CONFIG_SENSORS_GL518SM=m
+# CONFIG_SENSORS_GL520SM is not set
+CONFIG_SENSORS_IT87=m
+# CONFIG_SENSORS_LM63 is not set
+CONFIG_SENSORS_LM75=m
+CONFIG_SENSORS_LM77=m
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+# CONFIG_SENSORS_LM87 is not set
+CONFIG_SENSORS_LM90=m
+# CONFIG_SENSORS_LM92 is not set
+CONFIG_SENSORS_MAX1619=m
+# CONFIG_SENSORS_PC87360 is not set
+CONFIG_SENSORS_SMSC47M1=m
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+CONFIG_SENSORS_W83781D=m
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
-# Misc devices
+# Multimedia devices
 #
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
 
 #
-# Multimedia Capabilities Port drivers
+# Video Capture Adapters
 #
 
 #
-# Multimedia devices
+# Video Capture Adapters
 #
-# CONFIG_VIDEO_DEV is not set
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_PMS is not set
+CONFIG_VIDEO_BWQCAM=m
+CONFIG_VIDEO_CQCAM=m
+# CONFIG_VIDEO_W9966 is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+# CONFIG_VIDEO_M32R_AR is not set
+
+#
+# Radio Adapters
+#
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
 
 #
 # Digital Video Broadcasting Devices
@@ -434,8 +827,18 @@ CONFIG_SOFT_WATCHDOG=y
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
 
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
 #
 # Sound
 #
@@ -446,6 +849,11 @@ CONFIG_SOFT_WATCHDOG=y
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -457,34 +865,70 @@ CONFIG_SOFT_WATCHDOG=y
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
 
 #
-# SN Devices
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
 #
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
-# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD_DEBUG=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_INOTIFY is not set
+CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -494,8 +938,11 @@ CONFIG_DNOTIFY=y
 #
 # CD-ROM/DVD Filesystems
 #
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
 
 #
 # DOS/FAT/NT Filesystems
@@ -503,7 +950,7 @@ CONFIG_DNOTIFY=y
 CONFIG_FAT_FS=y
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
-CONFIG_FAT_DEFAULT_CODEPAGE=932
+CONFIG_FAT_DEFAULT_CODEPAGE=437
 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
@@ -511,11 +958,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
+CONFIG_CONFIGFS_FS=m
 
 #
 # Miscellaneous filesystems
@@ -527,7 +976,7 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
-CONFIG_CRAMFS=y
+# CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
@@ -542,10 +991,14 @@ CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
-CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
@@ -567,7 +1020,7 @@ CONFIG_MSDOS_PARTITION=y
 # Native Language Support
 #
 CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_DEFAULT="cp437"
 CONFIG_NLS_CODEPAGE_437=y
 # CONFIG_NLS_CODEPAGE_737 is not set
 # CONFIG_NLS_CODEPAGE_775 is not set
@@ -592,7 +1045,7 @@ CONFIG_NLS_CODEPAGE_932=y
 # CONFIG_NLS_CODEPAGE_1250 is not set
 # CONFIG_NLS_CODEPAGE_1251 is not set
 # CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
+CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_ISO8859_2 is not set
 # CONFIG_NLS_ISO8859_3 is not set
 # CONFIG_NLS_ISO8859_4 is not set
@@ -605,32 +1058,28 @@ CONFIG_NLS_CODEPAGE_932=y
 # CONFIG_NLS_ISO8859_15 is not set
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
-CONFIG_NLS_UTF8=y
+# CONFIG_NLS_UTF8 is not set
 
 #
 # Profiling support
 #
-# CONFIG_PROFILING is not set
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
 
 #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -641,7 +1090,38 @@ CONFIG_DEBUG_INFO=y
 #
 # Cryptographic options
 #
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -650,8 +1130,12 @@ CONFIG_DEBUG_INFO=y
 #
 # Library routines
 #
-# CONFIG_CRC_CCITT is not set
-# CONFIG_CRC16 is not set
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
 CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
+CONFIG_LIBCRC32C=m
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
index 3e607d90b5f45b71af6cd34a907ecece49c5ecc1..13579917afef09e621bdfbf6fd08e6393e90f174 100644 (file)
@@ -1,19 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:20:58 2005
+# Linux kernel version: 2.6.19
+# Tue Dec 12 17:52:38 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
@@ -21,33 +20,40 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
-# CONFIG_IKCONFIG_PROC is not set
+CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -55,12 +61,30 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -71,8 +95,10 @@ CONFIG_PLAT_M32700UT=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 CONFIG_CHIP_M32700=y
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 CONFIG_MMU=y
@@ -86,37 +112,39 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x01000000
 CONFIG_NOHIGHMEM=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00080000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 CONFIG_SMP=y
-CONFIG_CHIP_M32700_TS1=y
+# CONFIG_CHIP_M32700_TS1 is not set
 CONFIG_NR_CPUS=2
-# CONFIG_NUMA is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
 #
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-
-#
-# PC-card bridges
-#
-# CONFIG_TCIC is not set
-# CONFIG_M32R_PCC is not set
-CONFIG_M32R_CFC=y
-CONFIG_M32R_CFC_NUM=1
+# CONFIG_PCCARD is not set
 
 #
 # PCI Hotplug Support
@@ -128,6 +156,94 @@ CONFIG_M32R_CFC_NUM=1
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -137,12 +253,100 @@ CONFIG_BINFMT_ELF=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
 #
-# CONFIG_MTD is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
+# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+# CONFIG_MTD_CHAR is not set
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+# CONFIG_MTD_CFI_NOSWAP is not set
+CONFIG_MTD_CFI_BE_BYTE_SWAP=y
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+# CONFIG_MTD_CFI_I2 is not set
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=m
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=m
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
 
 #
 # Parallel port support
@@ -156,7 +360,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -164,23 +367,21 @@ CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+CONFIG_ATA_OVER_ETH=m
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
@@ -189,7 +390,6 @@ CONFIG_BLK_DEV_IDE=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-CONFIG_BLK_DEV_IDECS=y
 CONFIG_BLK_DEV_IDECD=m
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -208,7 +408,9 @@ CONFIG_IDE_GENERIC=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=m
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -220,6 +422,7 @@ CONFIG_BLK_DEV_SD=m
 CONFIG_BLK_DEV_SR=m
 # CONFIG_BLK_DEV_SR_VENDOR is not set
 CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -229,26 +432,23 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_LOGGING is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
 #
-# CONFIG_SCSI_SATA is not set
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
-# PCMCIA SCSI adapter support
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
 #
-# CONFIG_PCMCIA_AHA152X is not set
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -258,6 +458,7 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -268,75 +469,19 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
+# Network device support
 #
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -362,11 +507,6 @@ CONFIG_SMC91X=y
 #
 # CONFIG_NET_RADIO is not set
 
-#
-# PCMCIA network device support
-#
-# CONFIG_NET_PCMCIA is not set
-
 #
 # Wan interfaces
 #
@@ -375,6 +515,8 @@ CONFIG_SMC91X=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -390,6 +532,7 @@ CONFIG_SMC91X=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -418,7 +561,6 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -426,6 +568,7 @@ CONFIG_SOUND_GAMEPORT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -454,8 +597,8 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 CONFIG_DS1302=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -463,52 +606,64 @@ CONFIG_DS1302=y
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
 #
-CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
 
 #
-# Video For Linux
+# Video Capture Adapters
 #
 
 #
-# Video Adapters
+# Video Capture Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
 # CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_M32R_AR=y
-CONFIG_VIDEO_M32R_AR_M64278=y
+CONFIG_VIDEO_M32R_AR=m
+CONFIG_VIDEO_M32R_AR_M64278=m
 
 #
 # Radio Adapters
 #
-# CONFIG_RADIO_MAESTRO is not set
 
 #
 # Digital Video Broadcasting Devices
@@ -518,15 +673,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 CONFIG_FB=y
-# CONFIG_FB_CFB_FILLRECT is not set
-# CONFIG_FB_CFB_COPYAREA is not set
-# CONFIG_FB_CFB_IMAGEBLIT is not set
-# CONFIG_FB_SOFT_CURSOR is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_S1D13XXX=y
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -535,6 +691,7 @@ CONFIG_FB=y
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
@@ -546,6 +703,7 @@ CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_LOGO_M32R_CLUT224=y
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -558,6 +716,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -567,23 +730,62 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # MMC/SD Card support
 #
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+CONFIG_MMC_DEBUG=y
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_TIFM_SD is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
 
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=m
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=m
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
 CONFIG_JBD_DEBUG=y
 CONFIG_FS_MBCACHE=y
 CONFIG_REISERFS_FS=m
@@ -591,17 +793,19 @@ CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_REISERFS_FS_XATTR is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -627,15 +831,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -647,6 +849,8 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -659,12 +863,14 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -673,6 +879,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -727,16 +934,23 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # Profiling support
 #
-# CONFIG_PROFILING is not set
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
 
 #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=15
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -749,13 +963,10 @@ CONFIG_LOG_BUF_SHIFT=15
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
index 2d3e7cda8f461e5f8a35a51e61f6ada8a006268e..190f961d33e2b4baf77f4d059b96e6a77febbb66 100644 (file)
@@ -1,19 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:21:34 2005
+# Linux kernel version: 2.6.19
+# Tue Dec 12 12:07:08 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,32 +21,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
-# CONFIG_IKCONFIG_PROC is not set
+CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -55,11 +61,29 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -70,8 +94,10 @@ CONFIG_PLAT_M32700UT=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 CONFIG_CHIP_M32700=y
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 CONFIG_MMU=y
@@ -85,34 +111,37 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x01000000
 CONFIG_NOHIGHMEM=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00080000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 # CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
 #
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-
-#
-# PC-card bridges
-#
-# CONFIG_TCIC is not set
-# CONFIG_M32R_PCC is not set
-CONFIG_M32R_CFC=y
-CONFIG_M32R_CFC_NUM=1
+# CONFIG_PCCARD is not set
 
 #
 # PCI Hotplug Support
@@ -124,6 +153,94 @@ CONFIG_M32R_CFC_NUM=1
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -133,12 +250,100 @@ CONFIG_BINFMT_ELF=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
 #
-# CONFIG_MTD is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
+# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+# CONFIG_MTD_CHAR is not set
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+# CONFIG_MTD_CFI_NOSWAP is not set
+CONFIG_MTD_CFI_BE_BYTE_SWAP=y
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+# CONFIG_MTD_CFI_I2 is not set
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=m
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=m
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
 
 #
 # Parallel port support
@@ -152,7 +357,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -160,23 +364,21 @@ CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+CONFIG_ATA_OVER_ETH=m
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
@@ -185,7 +387,6 @@ CONFIG_BLK_DEV_IDE=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-CONFIG_BLK_DEV_IDECS=y
 CONFIG_BLK_DEV_IDECD=m
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -204,7 +405,9 @@ CONFIG_IDE_GENERIC=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=m
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -216,6 +419,7 @@ CONFIG_BLK_DEV_SD=m
 CONFIG_BLK_DEV_SR=m
 # CONFIG_BLK_DEV_SR_VENDOR is not set
 CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -225,26 +429,23 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_LOGGING is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
 #
-# CONFIG_SCSI_SATA is not set
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
-# PCMCIA SCSI adapter support
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
 #
-# CONFIG_PCMCIA_AHA152X is not set
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -254,6 +455,7 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -264,75 +466,19 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
+# Network device support
 #
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -358,11 +504,6 @@ CONFIG_SMC91X=y
 #
 # CONFIG_NET_RADIO is not set
 
-#
-# PCMCIA network device support
-#
-# CONFIG_NET_PCMCIA is not set
-
 #
 # Wan interfaces
 #
@@ -371,6 +512,8 @@ CONFIG_SMC91X=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -386,6 +529,7 @@ CONFIG_SMC91X=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -414,7 +558,6 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -422,6 +565,7 @@ CONFIG_SOUND_GAMEPORT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -450,8 +594,8 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 CONFIG_DS1302=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -459,52 +603,64 @@ CONFIG_DS1302=y
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
 #
-CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
 
 #
-# Video For Linux
+# Video Capture Adapters
 #
 
 #
-# Video Adapters
+# Video Capture Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
 # CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_M32R_AR=y
-CONFIG_VIDEO_M32R_AR_M64278=y
+CONFIG_VIDEO_M32R_AR=m
+CONFIG_VIDEO_M32R_AR_M64278=m
 
 #
 # Radio Adapters
 #
-# CONFIG_RADIO_MAESTRO is not set
 
 #
 # Digital Video Broadcasting Devices
@@ -514,15 +670,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 CONFIG_FB=y
-# CONFIG_FB_CFB_FILLRECT is not set
-# CONFIG_FB_CFB_COPYAREA is not set
-# CONFIG_FB_CFB_IMAGEBLIT is not set
-# CONFIG_FB_SOFT_CURSOR is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_S1D13XXX=y
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -531,6 +688,7 @@ CONFIG_FB=y
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
@@ -542,6 +700,7 @@ CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_LOGO_M32R_CLUT224=y
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -554,6 +713,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -563,23 +727,62 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # MMC/SD Card support
 #
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+CONFIG_MMC_DEBUG=y
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_TIFM_SD is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
 
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=m
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=m
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
 CONFIG_JBD_DEBUG=y
 CONFIG_FS_MBCACHE=y
 CONFIG_REISERFS_FS=m
@@ -587,17 +790,19 @@ CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_REISERFS_FS_XATTR is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -623,15 +828,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -643,6 +846,8 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -655,12 +860,14 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -669,6 +876,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -723,16 +931,23 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # Profiling support
 #
-# CONFIG_PROFILING is not set
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
 
 #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -745,13 +960,10 @@ CONFIG_LOG_BUF_SHIFT=14
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
index a8425fba340b43a8cbe924bc35d71dd8177b7c16..fbf6c384c9d094b305cf0adf442ddbf1c56a3a9d 100644 (file)
@@ -1,19 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:21:46 2005
+# Linux kernel version: 2.6.19
+# Wed Dec 13 17:57:45 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,29 +21,36 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SYSVIPC is not set
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 # CONFIG_IKCONFIG_PROC is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TINY_SHMEM=y
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -52,11 +58,29 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -67,8 +91,10 @@ CONFIG_PLAT_MAPPI=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 CONFIG_CHIP_M32700=y
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 # CONFIG_MMU is not set
@@ -82,18 +108,31 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x00000000
 CONFIG_MEMORY_SIZE=0x00E00000
 CONFIG_NOHIGHMEM=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00080000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 # CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
@@ -102,12 +141,14 @@ CONFIG_PREEMPT=y
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
 #
-# CONFIG_TCIC is not set
 CONFIG_M32R_PCC=y
+CONFIG_PCCARD_NONSTATIC=y
 
 #
 # PCI Hotplug Support
@@ -121,6 +162,94 @@ CONFIG_BINFMT_FLAT=y
 # CONFIG_BINFMT_SHARED_FLAT is not set
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -130,7 +259,13 @@ CONFIG_BINFMT_FLAT=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -149,7 +284,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -157,18 +291,15 @@ CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -178,7 +309,13 @@ CONFIG_IOSCHED_CFQ=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
 
 #
 # Multi-device support (RAID and LVM)
@@ -188,6 +325,7 @@ CONFIG_IOSCHED_CFQ=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -198,75 +336,18 @@ CONFIG_IOSCHED_CFQ=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
+# Network device support
 #
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -303,6 +384,8 @@ CONFIG_NE2000=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -318,6 +401,7 @@ CONFIG_NE2000=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -346,7 +430,6 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -366,7 +449,6 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_M32R_SIO=y
 CONFIG_SERIAL_M32R_SIO_CONSOLE=y
-# CONFIG_SERIAL_M32R_PLDSIO is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -380,39 +462,53 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 
 #
 # PCMCIA character devices
 #
 # CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -427,7 +523,9 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -439,6 +537,11 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -450,31 +553,73 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -493,15 +638,12 @@ CONFIG_DNOTIFY=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -525,12 +667,14 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -539,6 +683,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -599,10 +744,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -615,13 +766,10 @@ CONFIG_LOG_BUF_SHIFT=14
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
index 1a7f3cd4224667cc82e71f2e1ca4de92d0e85c2a..168669202b94518cab1d0a7cf282d4dcd73c1cd0 100644 (file)
@@ -1,21 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:21:52 2005
+# Linux kernel version: 2.6.19
+# Wed Dec 13 17:50:59 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
-CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
@@ -23,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -56,12 +60,30 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -72,8 +94,10 @@ CONFIG_PLAT_MAPPI=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 CONFIG_CHIP_M32700=y
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 CONFIG_MMU=y
@@ -87,23 +111,33 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x04000000
 CONFIG_NOHIGHMEM=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 CONFIG_IRAM_START=0x00f00000
 CONFIG_IRAM_SIZE=0x00080000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 CONFIG_SMP=y
 CONFIG_CHIP_M32700_TS1=y
 CONFIG_NR_CPUS=2
-# CONFIG_NUMA is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
@@ -112,12 +146,14 @@ CONFIG_NR_CPUS=2
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
 #
-# CONFIG_TCIC is not set
 CONFIG_M32R_PCC=y
+CONFIG_PCCARD_NONSTATIC=y
 
 #
 # PCI Hotplug Support
@@ -129,6 +165,93 @@ CONFIG_M32R_PCC=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+# CONFIG_PACKET is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -138,7 +261,13 @@ CONFIG_BINFMT_ELF=y
 #
 # CONFIG_STANDALONE is not set
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -161,6 +290,8 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -186,6 +317,7 @@ CONFIG_MTD_CFI_I2=y
 # Mapping drivers for chip access
 #
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
 
 #
 # Self-contained MTD device drivers
@@ -193,7 +325,6 @@ CONFIG_MTD_CFI_I2=y
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLKMTD is not set
 # CONFIG_MTD_BLOCK2MTD is not set
 
 #
@@ -208,6 +339,11 @@ CONFIG_MTD_CFI_I2=y
 #
 # CONFIG_MTD_NAND is not set
 
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
 #
 # Parallel port support
 #
@@ -220,7 +356,6 @@ CONFIG_MTD_CFI_I2=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -228,23 +363,21 @@ CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=m
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=m
 
 #
@@ -271,7 +404,13 @@ CONFIG_IDE_GENERIC=m
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
 
 #
 # Multi-device support (RAID and LVM)
@@ -281,85 +420,29 @@ CONFIG_IDE_GENERIC=m
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
 # I2O device support
 #
 
 #
-# Networking support
+# Network device support
 #
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_PACKET is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -396,6 +479,8 @@ CONFIG_NE2000=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -411,6 +496,7 @@ CONFIG_NE2000=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -442,7 +528,6 @@ CONFIG_SERIO=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -462,7 +547,6 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_M32R_SIO=y
 CONFIG_SERIAL_M32R_SIO_CONSOLE=y
-# CONFIG_SERIAL_M32R_PLDSIO is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -476,39 +560,53 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 
 #
 # PCMCIA character devices
 #
 # CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -523,7 +621,9 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -535,6 +635,11 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -546,31 +651,74 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -595,16 +743,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
-# CONFIG_HUGETLBFS is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -621,8 +766,9 @@ CONFIG_JFFS_FS_VERBOSE=0
 CONFIG_JFFS_PROC_FS=y
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-# CONFIG_JFFS2_FS_NOR_ECC is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -639,12 +785,14 @@ CONFIG_JFFS2_RTIME=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -653,6 +801,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -713,10 +862,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=15
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -729,14 +884,11 @@ CONFIG_LOG_BUF_SHIFT=15
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
index 38910fb766926078b6cb7bf38b0c37b8b3ce3b45..5ba00603c1a0d09500b4c8fa9f4bf83e7e659120 100644 (file)
@@ -1,20 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:21:59 2005
+# Linux kernel version: 2.6.19
+# Wed Dec 13 17:51:20 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -23,31 +21,38 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -55,11 +60,29 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -70,8 +93,10 @@ CONFIG_PLAT_MAPPI=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 CONFIG_CHIP_M32700=y
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 CONFIG_MMU=y
@@ -85,20 +110,31 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x04000000
 CONFIG_NOHIGHMEM=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 CONFIG_IRAM_START=0x00f00000
 CONFIG_IRAM_SIZE=0x00080000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 # CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
@@ -107,12 +143,14 @@ CONFIG_PREEMPT=y
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
 #
-# CONFIG_TCIC is not set
 CONFIG_M32R_PCC=y
+CONFIG_PCCARD_NONSTATIC=y
 
 #
 # PCI Hotplug Support
@@ -124,6 +162,93 @@ CONFIG_M32R_PCC=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+# CONFIG_PACKET is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -133,7 +258,13 @@ CONFIG_BINFMT_ELF=y
 #
 # CONFIG_STANDALONE is not set
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -156,6 +287,8 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -181,6 +314,7 @@ CONFIG_MTD_CFI_I2=y
 # Mapping drivers for chip access
 #
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
 
 #
 # Self-contained MTD device drivers
@@ -188,7 +322,6 @@ CONFIG_MTD_CFI_I2=y
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLKMTD is not set
 # CONFIG_MTD_BLOCK2MTD is not set
 
 #
@@ -203,6 +336,11 @@ CONFIG_MTD_CFI_I2=y
 #
 # CONFIG_MTD_NAND is not set
 
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
 #
 # Parallel port support
 #
@@ -215,7 +353,6 @@ CONFIG_MTD_CFI_I2=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -223,23 +360,21 @@ CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=m
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=m
 
 #
@@ -266,7 +401,13 @@ CONFIG_IDE_GENERIC=m
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
 
 #
 # Multi-device support (RAID and LVM)
@@ -276,85 +417,29 @@ CONFIG_IDE_GENERIC=m
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
 # I2O device support
 #
 
 #
-# Networking support
+# Network device support
 #
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_PACKET is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -391,6 +476,8 @@ CONFIG_NE2000=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -406,6 +493,7 @@ CONFIG_NE2000=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -437,7 +525,6 @@ CONFIG_SERIO=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -457,7 +544,6 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_M32R_SIO=y
 CONFIG_SERIAL_M32R_SIO_CONSOLE=y
-# CONFIG_SERIAL_M32R_PLDSIO is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -471,39 +557,53 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 
 #
 # PCMCIA character devices
 #
 # CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -518,7 +618,9 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -530,6 +632,11 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -541,31 +648,74 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -590,16 +740,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
-# CONFIG_HUGETLBFS is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -616,8 +763,9 @@ CONFIG_JFFS_FS_VERBOSE=0
 CONFIG_JFFS_PROC_FS=y
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-# CONFIG_JFFS2_FS_NOR_ECC is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -634,12 +782,14 @@ CONFIG_JFFS2_RTIME=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -648,6 +798,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -708,10 +859,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -724,14 +881,11 @@ CONFIG_LOG_BUF_SHIFT=14
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
diff --git a/arch/m32r/mappi2/defconfig.opsp b/arch/m32r/mappi2/defconfig.opsp
new file mode 100644 (file)
index 0000000..b379ae9
--- /dev/null
@@ -0,0 +1,883 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.19
+# Wed Dec 13 19:40:30 2006
+#
+CONFIG_M32R=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+# CONFIG_IKCONFIG_PROC is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+# CONFIG_FUTEX is not set
+# CONFIG_EPOLL is not set
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# Processor type and features
+#
+# CONFIG_PLAT_MAPPI is not set
+# CONFIG_PLAT_USRV is not set
+# CONFIG_PLAT_M32700UT is not set
+# CONFIG_PLAT_OPSPUT is not set
+# CONFIG_PLAT_OAKS32R is not set
+CONFIG_PLAT_MAPPI2=y
+# CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
+# CONFIG_CHIP_M32700 is not set
+# CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
+# CONFIG_CHIP_VDEC2 is not set
+CONFIG_CHIP_OPSP=y
+CONFIG_MMU=y
+CONFIG_TLB_ENTRIES=16
+CONFIG_ISA_M32R2=y
+CONFIG_ISA_DSP_LEVEL2=y
+CONFIG_ISA_DUAL_ISSUE=y
+CONFIG_BUS_CLOCK=50000000
+CONFIG_TIMER_DIVIDE=128
+# CONFIG_CPU_LITTLE_ENDIAN is not set
+CONFIG_MEMORY_START=0x08000000
+CONFIG_MEMORY_SIZE=0x01000000
+CONFIG_NOHIGHMEM=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00008000
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_PREEMPT=y
+# CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+# CONFIG_ISA is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+# CONFIG_M32R_CFC is not set
+
+#
+# PCI Hotplug Support
+#
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_TIFM_CORE is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+CONFIG_BLK_DEV_IDECD=m
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# PCMCIA SCSI adapter support
+#
+# CONFIG_PCMCIA_AHA152X is not set
+# CONFIG_PCMCIA_FDOMAIN is not set
+# CONFIG_PCMCIA_NINJA_SCSI is not set
+# CONFIG_PCMCIA_QLOGIC is not set
+# CONFIG_PCMCIA_SYM53C500 is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_SMC91X=y
+# CONFIG_NE2000 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# PCMCIA network device support
+#
+# CONFIG_NET_PCMCIA is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_M32R_SIO=y
+CONFIG_SERIAL_M32R_SIO_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+
+#
+# Video Capture Adapters
+#
+
+#
+# Video Capture Adapters
+#
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_M32R_AR is not set
+
+#
+# Radio Adapters
+#
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+CONFIG_JBD_DEBUG=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
index 56f287b658989cbf700afc53c4dd55b82080d2b5..fe5b2a63cd6805873087d39946148e2152274c29 100644 (file)
@@ -1,19 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:22:02 2005
+# Linux kernel version: 2.6.19
+# Wed Dec 13 19:31:44 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,32 +21,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 # CONFIG_IKCONFIG_PROC is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -55,11 +61,29 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -70,8 +94,10 @@ CONFIG_KMOD=y
 # CONFIG_PLAT_OAKS32R is not set
 CONFIG_PLAT_MAPPI2=y
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 # CONFIG_CHIP_M32700 is not set
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 CONFIG_CHIP_VDEC2=y
 # CONFIG_CHIP_OPSP is not set
 CONFIG_MMU=y
@@ -83,18 +109,31 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x01000000
 CONFIG_NOHIGHMEM=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00008000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 # CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
@@ -103,11 +142,12 @@ CONFIG_PREEMPT=y
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
 #
-# CONFIG_TCIC is not set
 # CONFIG_M32R_CFC is not set
 
 #
@@ -120,6 +160,94 @@ CONFIG_PCMCIA=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -129,7 +257,13 @@ CONFIG_BINFMT_ELF=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -148,7 +282,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -156,23 +289,21 @@ CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
@@ -200,7 +331,9 @@ CONFIG_IDE_GENERIC=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=m
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -212,6 +345,7 @@ CONFIG_BLK_DEV_SD=m
 CONFIG_BLK_DEV_SR=m
 # CONFIG_BLK_DEV_SR_VENDOR is not set
 CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -221,16 +355,18 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_LOGGING is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
 #
-# CONFIG_SCSI_SATA is not set
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
@@ -242,6 +378,10 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_PCMCIA_QLOGIC is not set
 # CONFIG_PCMCIA_SYM53C500 is not set
 
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+
 #
 # Multi-device support (RAID and LVM)
 #
@@ -250,6 +390,7 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -260,75 +401,19 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
+# Network device support
 #
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -367,6 +452,8 @@ CONFIG_SMC91X=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -382,6 +469,7 @@ CONFIG_SMC91X=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -410,7 +498,6 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -418,6 +505,7 @@ CONFIG_SOUND_GAMEPORT=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -432,7 +520,6 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_M32R_SIO=y
 CONFIG_SERIAL_M32R_SIO_CONSOLE=y
-# CONFIG_SERIAL_M32R_PLDSIO is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -446,59 +533,78 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 
 #
 # PCMCIA character devices
 #
 # CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
 #
 CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
 
 #
-# Video For Linux
+# Video Capture Adapters
 #
 
 #
-# Video Adapters
+# Video Capture Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
 # CONFIG_VIDEO_CPIA is not set
 # CONFIG_VIDEO_M32R_AR is not set
 
 #
 # Radio Adapters
 #
-# CONFIG_RADIO_MAESTRO is not set
 
 #
 # Digital Video Broadcasting Devices
@@ -508,6 +614,7 @@ CONFIG_VIDEO_DEV=y
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
 
 #
@@ -515,6 +622,7 @@ CONFIG_VIDEO_DEV=y
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -526,6 +634,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -537,39 +650,74 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=m
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=m
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
 CONFIG_JBD_DEBUG=y
 CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-# CONFIG_REISERFS_FS_XATTR is not set
+# CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -595,15 +743,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -627,12 +773,14 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -641,6 +789,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -701,10 +850,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -717,13 +872,10 @@ CONFIG_LOG_BUF_SHIFT=14
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
index 2eebe75fc07176c28878ee8d9a6d440cc923a2da..2f352267a6d9d3c39e937f888d752fab19cf91bb 100644 (file)
@@ -1,21 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Tue May 31 17:55:34 2005
+# Linux kernel version: 2.6.19
+# Mon Dec 11 19:57:33 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
-CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
@@ -23,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -56,12 +60,30 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -72,8 +94,10 @@ CONFIG_STOP_MACHINE=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 CONFIG_PLAT_MAPPI3=y
+# CONFIG_PLAT_M32104UT is not set
 CONFIG_CHIP_M32700=y
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 CONFIG_MMU=y
@@ -87,23 +111,33 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x08000000
 CONFIG_NOHIGHMEM=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
 CONFIG_IRAM_START=0x00f00000
 CONFIG_IRAM_SIZE=0x00080000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 CONFIG_SMP=y
 # CONFIG_CHIP_M32700_TS1 is not set
 CONFIG_NR_CPUS=2
-# CONFIG_NUMA is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
@@ -112,11 +146,12 @@ CONFIG_NR_CPUS=2
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
 #
-# CONFIG_TCIC is not set
 # CONFIG_M32R_PCC is not set
 # CONFIG_M32R_CFC is not set
 
@@ -130,6 +165,93 @@ CONFIG_PCMCIA=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+# CONFIG_PACKET is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -140,6 +262,12 @@ CONFIG_BINFMT_ELF=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -162,6 +290,8 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -187,6 +317,7 @@ CONFIG_MTD_CFI_I2=y
 # Mapping drivers for chip access
 #
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
 
 #
 # Self-contained MTD device drivers
@@ -194,7 +325,6 @@ CONFIG_MTD_CFI_I2=y
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 # CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLKMTD is not set
 # CONFIG_MTD_BLOCK2MTD is not set
 
 #
@@ -209,6 +339,11 @@ CONFIG_MTD_CFI_I2=y
 #
 # CONFIG_MTD_NAND is not set
 
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
 #
 # Parallel port support
 #
@@ -221,7 +356,6 @@ CONFIG_MTD_CFI_I2=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -229,23 +363,21 @@ CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
@@ -254,7 +386,7 @@ CONFIG_BLK_DEV_IDE=y
 # CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
-CONFIG_BLK_DEV_IDECS=y
+CONFIG_BLK_DEV_IDECS=m
 CONFIG_BLK_DEV_IDECD=m
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -272,7 +404,13 @@ CONFIG_IDE_GENERIC=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
 
 #
 # Multi-device support (RAID and LVM)
@@ -282,85 +420,30 @@ CONFIG_IDE_GENERIC=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
 # I2O device support
 #
 
 #
-# Networking support
+# Network device support
 #
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_PACKET is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -399,6 +482,8 @@ CONFIG_SMC91X=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -414,6 +499,7 @@ CONFIG_SMC91X=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -445,7 +531,6 @@ CONFIG_SERIO=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -465,7 +550,6 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_M32R_SIO=y
 CONFIG_SERIAL_M32R_SIO_CONSOLE=y
-# CONFIG_SERIAL_M32R_PLDSIO is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -479,39 +563,53 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 
 #
 # PCMCIA character devices
 #
 # CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -526,7 +624,9 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -538,6 +638,11 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -549,36 +654,74 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -603,16 +746,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
-# CONFIG_HUGETLBFS is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -629,8 +769,9 @@ CONFIG_JFFS_FS_VERBOSE=0
 CONFIG_JFFS_PROC_FS=y
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-# CONFIG_JFFS2_FS_NOR_ECC is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
 CONFIG_JFFS2_ZLIB=y
 CONFIG_JFFS2_RTIME=y
@@ -647,12 +788,14 @@ CONFIG_JFFS2_RTIME=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -661,6 +804,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -721,10 +865,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=15
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -737,14 +887,11 @@ CONFIG_LOG_BUF_SHIFT=15
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
index 03fc4c858e0e01d521fac4a1aa2c55322b88bbdf..9880abac3f5488ffc7d5ccc1ea9f6bc2afd20604 100644 (file)
@@ -7,8 +7,6 @@
  *    Copyright (C) 1995  Linus Torvalds
  */
 
-/* $Id: fault-nommu.c,v 1.1 2004/03/30 06:40:59 sakugawa Exp $ */
-
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -46,32 +44,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS];
 #define tlb_entry_d tlb_entry_d_dat[smp_processor_id()]
 #endif
 
-/*
- * Unlock any spinlocks which will prevent us from getting the
- * message out
- */
-void bust_spinlocks(int yes)
-{
-       int loglevel_save = console_loglevel;
-
-       if (yes) {
-               oops_in_progress = 1;
-               return;
-       }
-#ifdef CONFIG_VT
-       unblank_screen();
-#endif
-       oops_in_progress = 0;
-       /*
-        * OK, the message is on the console.  Now we call printk()
-        * without oops_in_progress set so that printk will give klogd
-        * a poke.  Hold onto your hats...
-        */
-       console_loglevel = 15;          /* NMI oopser may have shut the console up */
-       printk(" ");
-       console_loglevel = loglevel_save;
-}
-
 void do_BUG(const char *file, int line)
 {
        bust_spinlocks(1);
@@ -161,4 +133,3 @@ void local_flush_tlb_all(void)
 {
        BUG();
 }
-
index 9b9feb0f161075c09fb9f012017449e240f40cfa..037d58e82fb5a06319396fbb23670f0e1e939489 100644 (file)
@@ -49,32 +49,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS];
 
 extern void init_tlb(void);
 
-/*
- * Unlock any spinlocks which will prevent us from getting the
- * message out
- */
-void bust_spinlocks(int yes)
-{
-       int loglevel_save = console_loglevel;
-
-       if (yes) {
-               oops_in_progress = 1;
-               return;
-       }
-#ifdef CONFIG_VT
-       unblank_screen();
-#endif
-       oops_in_progress = 0;
-       /*
-        * OK, the message is on the console.  Now we call printk()
-        * without oops_in_progress set so that printk will give klogd
-        * a poke.  Hold onto your hats...
-        */
-       console_loglevel = 15;          /* NMI oopser may have shut the console up */
-       printk(" ");
-       console_loglevel = loglevel_save;
-}
-
 /*======================================================================*
  * do_page_fault()
  *======================================================================*
@@ -362,8 +336,10 @@ vmalloc_fault:
                if (!pte_present(*pte_k))
                        goto no_context;
 
-               addr = (address & PAGE_MASK) | (error_code & ACE_INSTRUCTION);
+               addr = (address & PAGE_MASK);
+               set_thread_fault_code(error_code);
                update_mmu_cache(NULL, addr, *pte_k);
+               set_thread_fault_code(0);
                return;
        }
 }
@@ -377,7 +353,7 @@ vmalloc_fault:
 void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr,
        pte_t pte)
 {
-       unsigned long *entry1, *entry2;
+       volatile unsigned long *entry1, *entry2;
        unsigned long pte_data, flags;
        unsigned int *entry_dat;
        int inst = get_thread_fault_code() & ACE_INSTRUCTION;
@@ -391,30 +367,26 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr,
 
        vaddr = (vaddr & PAGE_MASK) | get_asid();
 
+       pte_data = pte_val(pte);
+
 #ifdef CONFIG_CHIP_OPSP
        entry1 = (unsigned long *)ITLB_BASE;
-       for(i = 0 ; i < NR_TLB_ENTRIES; i++) {
-               if(*entry1++ == vaddr) {
-                       pte_data = pte_val(pte);
-                       set_tlb_data(entry1, pte_data);
-                       break;
-               }
-               entry1++;
+       for (i = 0; i < NR_TLB_ENTRIES; i++) {
+               if (*entry1++ == vaddr) {
+                       set_tlb_data(entry1, pte_data);
+                       break;
+               }
+               entry1++;
        }
        entry2 = (unsigned long *)DTLB_BASE;
-       for(i = 0 ; i < NR_TLB_ENTRIES ; i++) {
-               if(*entry2++ == vaddr) {
-                       pte_data = pte_val(pte);
-                       set_tlb_data(entry2, pte_data);
-                       break;
-               }
-               entry2++;
+       for (i = 0; i < NR_TLB_ENTRIES; i++) {
+               if (*entry2++ == vaddr) {
+                       set_tlb_data(entry2, pte_data);
+                       break;
+               }
+               entry2++;
        }
-       local_irq_restore(flags);
-       return;
 #else
-       pte_data = pte_val(pte);
-
        /*
         * Update TLB entries
         *  entry1: ITLB entry address
@@ -439,6 +411,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr,
                "i" (MSVA_offset), "i" (MTOP_offset), "i" (MIDXI_offset)
                : "r4", "memory"
        );
+#endif
 
        if ((!inst && entry2 >= DTLB_END) || (inst && entry1 >= ITLB_END))
                goto notfound;
@@ -482,7 +455,6 @@ notfound:
        set_tlb_data(entry1, pte_data);
 
        goto found;
-#endif
 }
 
 /*======================================================================*
index 9a4d40b3d6a26ceab9c021ba1d558371e1930880..8bb74b10dca76707a2d7c52e4fb3399fd3f26fbf 100644 (file)
@@ -4,8 +4,6 @@
  *  Copyright (C) 2001 by Hiroyuki Kondo
  */
 
-/* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */
-
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/smp.h>
@@ -345,5 +343,4 @@ ENTRY(m32r_otlb_entrys)
 
 #endif  /* CONFIG_MMU */
 
-.end
-
+       .end
index 3f9fe519acb2413e62ccb26ac004c4ddcc616277..aaa00828e0d38e746405417752a9fd6956eddf02 100644 (file)
@@ -1,19 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:22:04 2005
+# Linux kernel version: 2.6.19
+# Tue Dec 12 12:09:17 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -22,28 +21,35 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SYSVIPC is not set
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TINY_SHMEM=y
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -51,11 +57,29 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -66,8 +90,10 @@ CONFIG_KMOD=y
 CONFIG_PLAT_OAKS32R=y
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 # CONFIG_CHIP_M32700 is not set
 CONFIG_CHIP_M32102=y
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 # CONFIG_CHIP_OPSP is not set
 CONFIG_ISA_M32R=y
@@ -77,18 +103,31 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x01000000
 CONFIG_MEMORY_SIZE=0x00800000
 CONFIG_NOHIGHMEM=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00010000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PREEMPT=y
-# CONFIG_HAVE_DEC_LOCK is not set
 # CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
@@ -108,6 +147,94 @@ CONFIG_BINFMT_FLAT=y
 # CONFIG_BINFMT_SHARED_FLAT is not set
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -118,6 +245,12 @@ CONFIG_BINFMT_FLAT=y
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -136,7 +269,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -144,18 +276,15 @@ CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -165,7 +294,13 @@ CONFIG_IOSCHED_CFQ=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
 
 #
 # Multi-device support (RAID and LVM)
@@ -175,6 +310,7 @@ CONFIG_IOSCHED_CFQ=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -185,75 +321,18 @@ CONFIG_IOSCHED_CFQ=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
+# Network device support
 #
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -285,6 +364,8 @@ CONFIG_NE2000=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -300,6 +381,7 @@ CONFIG_NE2000=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -328,7 +410,6 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -348,7 +429,6 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_M32R_SIO=y
 CONFIG_SERIAL_M32R_SIO_CONSOLE=y
-# CONFIG_SERIAL_M32R_PLDSIO is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -362,34 +442,46 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -404,7 +496,9 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -416,6 +510,11 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -427,10 +526,44 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
@@ -438,20 +571,22 @@ CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
+# CONFIG_EXT4DEV_FS is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -470,13 +605,12 @@ CONFIG_DNOTIFY=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -500,12 +634,14 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -514,6 +650,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -574,10 +711,16 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_HEADERS_CHECK is not set
 
 #
 # Security options
@@ -590,13 +733,10 @@ CONFIG_LOG_BUF_SHIFT=14
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
index 66adec6a701adeba82cdf8a5fd9e69c2ef755d44..461f95e72d173bd1aed1db49ce277d62500db6f2 100644 (file)
@@ -1,19 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc5
-# Fri Jun  3 16:22:06 2005
+# Linux kernel version: 2.6.19
+# Wed Dec 13 18:34:36 2006
 #
 CONFIG_M32R=y
-# CONFIG_UID16 is not set
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
@@ -21,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 CONFIG_IKCONFIG=y
 # CONFIG_IKCONFIG_PROC is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -54,11 +60,29 @@ CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
 
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
 #
 # Processor type and features
 #
@@ -69,8 +93,10 @@ CONFIG_PLAT_OPSPUT=y
 # CONFIG_PLAT_OAKS32R is not set
 # CONFIG_PLAT_MAPPI2 is not set
 # CONFIG_PLAT_MAPPI3 is not set
+# CONFIG_PLAT_M32104UT is not set
 # CONFIG_CHIP_M32700 is not set
 # CONFIG_CHIP_M32102 is not set
+# CONFIG_CHIP_M32104 is not set
 # CONFIG_CHIP_VDEC2 is not set
 CONFIG_CHIP_OPSP=y
 CONFIG_MMU=y
@@ -84,17 +110,31 @@ CONFIG_TIMER_DIVIDE=128
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x01000000
 CONFIG_NOHIGHMEM=y
-# CONFIG_DISCONTIGMEM is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_IRAM_START=0x00f00000
+CONFIG_IRAM_SIZE=0x00010000
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 # CONFIG_PREEMPT is not set
 # CONFIG_SMP is not set
+CONFIG_NODES_SHIFT=1
 
 #
 # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 #
-# CONFIG_PCI is not set
 # CONFIG_ISA is not set
 
 #
@@ -103,13 +143,15 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
 #
-# CONFIG_TCIC is not set
 CONFIG_M32R_CFC=y
 CONFIG_M32R_CFC_NUM=1
+CONFIG_PCCARD_NONSTATIC=y
 
 #
 # PCI Hotplug Support
@@ -121,6 +163,94 @@ CONFIG_M32R_CFC_NUM=1
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
 #
 # Device Drivers
 #
@@ -130,8 +260,14 @@ CONFIG_BINFMT_ELF=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -150,7 +286,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # Block devices
 #
-# CONFIG_BLK_DEV_FD is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -158,18 +293,15 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_BLK_DEV_INITRD is not set
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
 
 #
-# IO Schedulers
+# Misc devices
 #
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
@@ -179,7 +311,9 @@ CONFIG_IOSCHED_CFQ=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=m
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -191,6 +325,7 @@ CONFIG_BLK_DEV_SD=m
 CONFIG_BLK_DEV_SR=m
 # CONFIG_BLK_DEV_SR_VENDOR is not set
 CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -200,16 +335,18 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_LOGGING is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
 #
-# CONFIG_SCSI_SATA is not set
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
@@ -221,6 +358,10 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_PCMCIA_QLOGIC is not set
 # CONFIG_PCMCIA_SYM53C500 is not set
 
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+
 #
 # Multi-device support (RAID and LVM)
 #
@@ -229,6 +370,7 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -239,75 +381,19 @@ CONFIG_SCSI_MULTI_LUN=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
+# Network device support
 #
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
 
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -346,6 +432,8 @@ CONFIG_SMC91X=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -361,6 +449,7 @@ CONFIG_SMC91X=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -389,7 +478,6 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -423,8 +511,8 @@ CONFIG_LEGACY_PTY_COUNT=256
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
 CONFIG_DS1302=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -432,31 +520,45 @@ CONFIG_DS1302=y
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_DRM is not set
 
 #
 # PCMCIA character devices
 #
 # CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
 # CONFIG_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
+# CONFIG_TCG_TPM is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
 #
-# Misc devices
+# Hardware Monitoring support
 #
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -471,7 +573,9 @@ CONFIG_DS1302=y
 #
 # Graphics support
 #
+CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -483,6 +587,11 @@ CONFIG_DS1302=y
 #
 # CONFIG_USB_ARCH_HAS_HCD is not set
 # CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
 
 #
 # USB Gadget Support
@@ -494,39 +603,74 @@ CONFIG_DS1302=y
 #
 # CONFIG_MMC is not set
 
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
 #
 # InfiniBand support
 #
-# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=m
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
 # CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=m
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
 CONFIG_JBD_DEBUG=y
 CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-# CONFIG_REISERFS_FS_XATTR is not set
+# CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
@@ -552,15 +696,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -584,12 +726,14 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -598,6 +742,7 @@ CONFIG_SUNRPC=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -658,21 +803,32 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RWSEMS is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_PAGEALLOC is not set
 
 #
 # Security options
@@ -685,13 +841,10 @@ CONFIG_DEBUG_INFO=y
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
index 70a577c89c7c84d279d9ce9f9c08f1c0bbaa08db..a8e1e604dfa81427b19d77a1ae3d81fdfb9841c8 100644 (file)
@@ -42,6 +42,9 @@ config ARCH_MAY_HAVE_PC_FDC
        depends on Q40 || (BROKEN && SUN3X)
        default y
 
+config NO_IOPORT
+       def_bool y
+
 mainmenu "Linux/68k Kernel Configuration"
 
 source "init/Kconfig"
@@ -439,6 +442,10 @@ config GENERIC_ISA_DMA
        depends on Q40 || AMIGA_PCMCIA || GG2
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 source "drivers/pci/Kconfig"
 
 source "drivers/zorro/Kconfig"
index 1c9ecaa473d5795e90ef0540ae3c9accedec9a20..0b68ab8d63d1d5a120f9e4403b317ecdbfd71308 100644 (file)
@@ -10,7 +10,9 @@ endif
 extra-y        += vmlinux.lds
 
 obj-y  := entry.o process.o traps.o ints.o signal.o ptrace.o \
-          sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
+          sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o devres.o
+
+devres-y = ../../../kernel/irq/devres.o
 
 obj-$(CONFIG_PCI)      += bios32.o
 obj-$(CONFIG_MODULES)  += module.o
index ef89060ea328374d25fe9d03a8a449cf9126d52f..7fd2720c38416f422d70d695d8dc73c67ed0a7b5 100644 (file)
@@ -76,7 +76,7 @@ static inline long get_reg(struct task_struct *task, int regno)
 
        if (regno == PT_USP)
                addr = &task->thread.usp;
-       else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+       else if (regno < ARRAY_SIZE(regoff))
                addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
        else
                return 0;
@@ -93,7 +93,7 @@ static inline int put_reg(struct task_struct *task, int regno,
 
        if (regno == PT_USP)
                addr = &task->thread.usp;
-       else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+       else if (regno < ARRAY_SIZE(regoff))
                addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
        else
                return -1;
index 2a599c3ed7878322239737583dd0137399e19077..4c065f9ceffcd5ab7fcfe6e8de09b3e6d2adacc9 100644 (file)
@@ -159,12 +159,3 @@ int do_settimeofday(struct timespec *tv)
 }
 
 EXPORT_SYMBOL(do_settimeofday);
-
-/*
- * Scheduler clock - returns current time in ns units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies*(1000000000/HZ);
-}
-
index 759fa244e6cd60cc5e226c486525e64b43aae190..a27a4fa332962a6c35918c1f28c3f6494c026453 100644 (file)
@@ -1011,7 +1011,7 @@ EXPORT_SYMBOL(dump_stack);
 void bad_super_trap (struct frame *fp)
 {
        console_verbose();
-       if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0]))
+       if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names))
                printk ("*** %s ***   FORMAT=%X\n",
                        vec_names[(fp->ptregs.vector) >> 2],
                        fp->ptregs.format);
index d2794452b195cbcafd1bca92c069df1f85ebdb23..437b4f8d86c58200d15fcce3a0eaa6d99d9a98d3 100644 (file)
@@ -61,10 +61,12 @@ SECTIONS
   .con_initcall.init : { *(.con_initcall.init) }
   __con_initcall_end = .;
   SECURITY_INIT
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(8192);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
   . = ALIGN(8192);
   __init_end = .;
 
index 8c7eccbfc982e31205f37cb7a062b713faa60efd..2868e206fc76816a5cb795fb31632b5e35c7d713 100644 (file)
@@ -55,10 +55,12 @@ __init_begin = .;
        .con_initcall.init : { *(.con_initcall.init) }
        __con_initcall_end = .;
        SECURITY_INIT
+#ifdef CONFIG_BLK_DEV_INITRD
        . = ALIGN(8192);
        __initramfs_start = .;
        .init.ramfs : { *(.init.ramfs) }
        __initramfs_end = .;
+#endif
        . = ALIGN(8192);
        __init_end = .;
        .data.init.task : { *(.data.init_task) }
index 25993c2a8fbbeb4c540218980f05d22c60a9dfcb..823f73736bb5b3c8a35f84e608302224e3abcedd 100644 (file)
@@ -17,6 +17,10 @@ config FPU
        bool
        default n
 
+config ZONE_DMA
+       bool
+       default y
+
 config RWSEM_GENERIC_SPINLOCK
        bool
        default y
@@ -49,6 +53,9 @@ config TIME_LOW_RES
        bool
        default y
 
+config NO_IOPORT
+       def_bool y
+
 source "init/Kconfig"
 
 menu "Processor type and features"
index 9130119537b9ffdbe082e9857f0ea9c657ae159b..72d34962357519477ea234a93e928402a759fc82 100644 (file)
@@ -62,7 +62,7 @@ static inline long get_reg(struct task_struct *task, int regno)
 
        if (regno == PT_USP)
                addr = &task->thread.usp;
-       else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+       else if (regno < ARRAY_SIZE(regoff))
                addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
        else
                return 0;
@@ -79,7 +79,7 @@ static inline int put_reg(struct task_struct *task, int regno,
 
        if (regno == PT_USP)
                addr = &task->thread.usp;
-       else if (regno < sizeof(regoff)/sizeof(regoff[0]))
+       else if (regno < ARRAY_SIZE(regoff))
                addr = (unsigned long *) (task->thread.esp0 + regoff[regno]);
        else
                return -1;
index 11ea217ed5cfa153f6d2b8e550ea1a23eee5fea2..467053da2d08343d29f77c7cc31529c7caef8e54 100644 (file)
@@ -174,13 +174,4 @@ int do_settimeofday(struct timespec *tv)
        clock_was_set();
        return 0;
 }
-
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 EXPORT_SYMBOL(do_settimeofday);
index 9129b3a5258bc28a8e832eea7dcd809bb7860c44..bed5f47bf568c05c940d19a289085ba5ea4fdbf5 100644 (file)
@@ -158,7 +158,7 @@ void show_stack(struct task_struct *task, unsigned long *stack)
 void bad_super_trap(struct frame *fp)
 {
        console_verbose();
-       if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0]))
+       if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names))
                printk (KERN_WARNING "*** %s ***   FORMAT=%X\n",
                        vec_names[(fp->ptregs.vector) >> 2],
                        fp->ptregs.format);
index bfade20a9e5e8fd75b53fa24c77c0f1e30591c56..c86a1bf589d4582fb9cf6ee3bac1dc070556333f 100644 (file)
@@ -159,10 +159,12 @@ SECTIONS {
                __security_initcall_start = .;
                *(.security_initcall.init)
                __security_initcall_end = .;
+#ifdef CONFIG_BLK_DEV_INITRD
                . = ALIGN(4);
                __initramfs_start = .;
                *(.init.ramfs)
                __initramfs_end = .;
+#endif
                . = ALIGN(4096);
                __init_end = .;
        } > INIT
index 9d839a9c4b1a10f62b9f938e7ed013509a04178d..1bc6d249be4494d61a42a3e431d854664eac91f5 100644 (file)
@@ -8,6 +8,10 @@ mainmenu "Linux/MIPS Kernel Configuration"
 
 menu "Machine selection"
 
+config ZONE_DMA
+       bool
+       default y
+
 choice
        prompt "System type"
        default SGI_IP22
index 0b8ce59429a8d1e3e73a6fe22cfe9b61b6429b40..ca7ad78f4def1fea27de9142b1ffd17d91900337 100644 (file)
@@ -193,50 +193,6 @@ sysn32_waitid(int which, compat_pid_t pid,
        return ret;
 }
 
-struct sysinfo32 {
-       s32 uptime;
-       u32 loads[3];
-       u32 totalram;
-       u32 freeram;
-       u32 sharedram;
-       u32 bufferram;
-       u32 totalswap;
-       u32 freeswap;
-       u16 procs;
-       u32 totalhigh;
-       u32 freehigh;
-       u32 mem_unit;
-       char _f[8];
-};
-
-asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info)
-{
-       struct sysinfo s;
-       int ret, err;
-       mm_segment_t old_fs = get_fs ();
-
-       set_fs (KERNEL_DS);
-       ret = sys_sysinfo((struct sysinfo __user *)&s);
-       set_fs (old_fs);
-       err = put_user (s.uptime, &info->uptime);
-       err |= __put_user (s.loads[0], &info->loads[0]);
-       err |= __put_user (s.loads[1], &info->loads[1]);
-       err |= __put_user (s.loads[2], &info->loads[2]);
-       err |= __put_user (s.totalram, &info->totalram);
-       err |= __put_user (s.freeram, &info->freeram);
-       err |= __put_user (s.sharedram, &info->sharedram);
-       err |= __put_user (s.bufferram, &info->bufferram);
-       err |= __put_user (s.totalswap, &info->totalswap);
-       err |= __put_user (s.freeswap, &info->freeswap);
-       err |= __put_user (s.procs, &info->procs);
-       err |= __put_user (s.totalhigh, &info->totalhigh);
-       err |= __put_user (s.freehigh, &info->freehigh);
-       err |= __put_user (s.mem_unit, &info->mem_unit);
-       if (err)
-               return -EFAULT;
-       return ret;
-}
-
 #define RLIM_INFINITY32        0x7fffffff
 #define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x)
 
index 39add2341aa296f303f0d4f0b0d18c67aa232a74..ee8802b597582ef1a71458dfeb93ad0de5412a74 100644 (file)
@@ -217,7 +217,7 @@ EXPORT(sysn32_call_table)
        PTR     sys32_gettimeofday
        PTR     compat_sys_getrlimit            /* 6095 */
        PTR     compat_sys_getrusage
-       PTR     sys32_sysinfo
+       PTR     compat_sys_sysinfo
        PTR     compat_sys_times
        PTR     sys32_ptrace
        PTR     sys_getuid                      /* 6100 */
index c58b8e0105ea0db8fa4cc2994324fddde7a4d17b..c5f590ca99b09d47a293a40b2c55ae83a01687dd 100644 (file)
@@ -321,7 +321,7 @@ sys_call_table:
        PTR     sys_ni_syscall                  /* sys_vm86 */
        PTR     compat_sys_wait4
        PTR     sys_swapoff                     /* 4115 */
-       PTR     sys32_sysinfo
+       PTR     compat_sys_sysinfo
        PTR     sys32_ipc
        PTR     sys_fsync
        PTR     sys32_sigreturn
index 8aa544f73a5ea27fd85eb007ac9ec59938e0ff35..545fcbc8cea2283525f3b7fd6b214c9646c9545e 100644 (file)
@@ -455,8 +455,3 @@ EXPORT_SYMBOL(rtc_lock);
 EXPORT_SYMBOL(to_tm);
 EXPORT_SYMBOL(rtc_mips_set_time);
 EXPORT_SYMBOL(rtc_mips_get_time);
-
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies*(1000000000/HZ);
-}
index cecff24cc9721a16e7abdb9e04980f73b53293ec..c76b793310c26d4a5a5c4895a7d83fe839826165 100644 (file)
@@ -113,10 +113,12 @@ SECTIONS
      references from .rodata */
   .exit.text : { *(.exit.text) }
   .exit.data : { *(.exit.data) }
+#if defined(CONFIG_BLK_DEV_INITRD)
   . = ALIGN(_PAGE_SIZE);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
   . = ALIGN(32);
   __per_cpu_start = .;
   .data.percpu  : { *(.data.percpu) }
index 1f954a238a6332b0d8aaa0a4dde2fc5903f4f225..31819c58bffaa188c676f9c61112c569a2f8874c 100644 (file)
@@ -107,8 +107,6 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address,
        }
 }
 
-#define __weak __attribute__((weak))
-
 static char cache_panic[] __initdata = "Yeee, unsupported cache architecture.";
 
 void __init cpu_cache_init(void)
index 72a016767e09d399f3ff65d95641a7082e639e32..3f097558ef1365df5b3f1d62343744322e731782 100644 (file)
@@ -79,10 +79,7 @@ static int pnx8550_proc_init( void )
 
        // Create /proc/pnx8550
         pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL);
-        if (pnx8550_dir){
-                pnx8550_dir->nlink = 1;
-        }
-        else {
+        if (!pnx8550_dir) {
                 printk(KERN_ERR "Can't create pnx8550 proc dir\n");
                 return -1;
         }
@@ -90,7 +87,6 @@ static int pnx8550_proc_init( void )
        // Create /proc/pnx8550/timers
         pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir );
         if (pnx8550_timers){
-                pnx8550_timers->nlink = 1;
                 pnx8550_timers->read_proc = pnx8550_timers_read;
         }
         else {
@@ -100,7 +96,6 @@ static int pnx8550_proc_init( void )
        // Create /proc/pnx8550/registers
         pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir );
         if (pnx8550_registers){
-                pnx8550_registers->nlink = 1;
                 pnx8550_registers->read_proc = pnx8550_registers_read;
         }
         else {
index 0f9ff618c6d7205c7d86f856cd78b9898b89e85a..28da4e71c44311e7111f8a2b2182b0d595a2d62d 100644 (file)
@@ -50,9 +50,6 @@ config TIME_LOW_RES
        depends on SMP
        default y
 
-config GENERIC_ISA_DMA
-       bool
-
 config GENERIC_HARDIRQS
        def_bool y
 
index 29be4377aca6c0fb1e2cebd00d4fba4556efdc01..ce3245f87fddf832f9385a53b691ae7585a7d2a4 100644 (file)
@@ -579,70 +579,6 @@ asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *off
 }
 
 
-struct sysinfo32 {
-       s32 uptime;
-       u32 loads[3];
-       u32 totalram;
-       u32 freeram;
-       u32 sharedram;
-       u32 bufferram;
-       u32 totalswap;
-       u32 freeswap;
-       unsigned short procs;
-       u32 totalhigh;
-       u32 freehigh;
-       u32 mem_unit;
-       char _f[12];
-};
-
-/* We used to call sys_sysinfo and translate the result.  But sys_sysinfo
- * undoes the good work done elsewhere, and rather than undoing the
- * damage, I decided to just duplicate the code from sys_sysinfo here.
- */
-
-asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info)
-{
-       struct sysinfo val;
-       int err;
-       unsigned long seq;
-
-       /* We don't need a memset here because we copy the
-        * struct to userspace once element at a time.
-        */
-
-       do {
-               seq = read_seqbegin(&xtime_lock);
-               val.uptime = jiffies / HZ;
-
-               val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
-               val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
-               val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
-
-               val.procs = nr_threads;
-       } while (read_seqretry(&xtime_lock, seq));
-
-
-       si_meminfo(&val);
-       si_swapinfo(&val);
-       
-       err = put_user (val.uptime, &info->uptime);
-       err |= __put_user (val.loads[0], &info->loads[0]);
-       err |= __put_user (val.loads[1], &info->loads[1]);
-       err |= __put_user (val.loads[2], &info->loads[2]);
-       err |= __put_user (val.totalram, &info->totalram);
-       err |= __put_user (val.freeram, &info->freeram);
-       err |= __put_user (val.sharedram, &info->sharedram);
-       err |= __put_user (val.bufferram, &info->bufferram);
-       err |= __put_user (val.totalswap, &info->totalswap);
-       err |= __put_user (val.freeswap, &info->freeswap);
-       err |= __put_user (val.procs, &info->procs);
-       err |= __put_user (val.totalhigh, &info->totalhigh);
-       err |= __put_user (val.freehigh, &info->freehigh);
-       err |= __put_user (val.mem_unit, &info->mem_unit);
-       return err ? -EFAULT : 0;
-}
-
-
 /* lseek() needs a wrapper because 'offset' can be negative, but the top
  * half of the argument has been zeroed by syscall.S.
  */
index 701d66a596e8855d22ab3ddaa4a889b68b4500ce..be8eb9a0d24a7420879fc819b776870b01b21b21 100644 (file)
        /* struct rusage contains longs... */
        ENTRY_COMP(wait4)
        ENTRY_SAME(swapoff)             /* 115 */
-       ENTRY_DIFF(sysinfo)
+       ENTRY_COMP(sysinfo)
        ENTRY_SAME(shutdown)
        ENTRY_SAME(fsync)
        ENTRY_SAME(madvise)
index bad7d1eb62b975dff89921860ca30e816e948de3..5f1b51af06a9820ff54e57479c50543eacb0799f 100644 (file)
@@ -288,17 +288,6 @@ do_settimeofday (struct timespec *tv)
 }
 EXPORT_SYMBOL(do_settimeofday);
 
-/*
- * XXX: We can do better than this.
- * Returns nanoseconds
- */
-
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
-
 void __init start_cpu_itimer(void)
 {
        unsigned int cpu = smp_processor_id();
index 7b943b45f7cd518f7749aa50fcf6ed081d5615f0..3b78c2794c369e72bfe57d2bdd461fc8754b0d63 100644 (file)
@@ -173,10 +173,12 @@ SECTIONS
      from .altinstructions and .eh_frame */
   .exit.text : { *(.exit.text) }
   .exit.data : { *(.exit.data) }
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(ASM_PAGE_SIZE);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
   . = ALIGN(32);
   __per_cpu_start = .;
   .data.percpu  : { *(.data.percpu) }
index 0667f2b4f9775b13ab6fbc527884de52022bfa34..0c118e584e7341bde28a65fdc2d23a2c5929fe79 100644 (file)
@@ -808,9 +808,7 @@ void __init paging_init(void)
        for (i = 0; i < npmem_ranges; i++) {
                unsigned long zones_size[MAX_NR_ZONES] = { 0, };
 
-               /* We have an IOMMU, so all memory can go into a single
-                  ZONE_DMA zone. */
-               zones_size[ZONE_DMA] = pmem_ranges[i].pages;
+               zones_size[ZONE_NORMAL] = pmem_ranges[i].pages;
 
 #ifdef CONFIG_DISCONTIGMEM
                /* Need to initialize the pfnnid_map before we can initialize
index f08e80a0bf0addaf3a33d95f30238a6064f4a53e..0088c5ebca78190328a382ceebaa522ded7489b0 100644 (file)
@@ -977,6 +977,10 @@ config ISA
          have an IBM RS/6000 or pSeries machine or a PReP machine, say Y.  If
          you have an embedded board, consult your board documentation.
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_ISA_DMA
        bool
        depends on PPC64 || POWER4 || 6xx && !CPM2
index dd7001cacf75cfc09040b05961c39bb7c0471cfd..3d437c32546ee6a463af22c4a0270e28279cae71 100644 (file)
@@ -71,7 +71,6 @@ static int __init proc_ppc64_init(void)
        pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL);
        if (!pde)
                return 1;
-       pde->nlink = 1;
        pde->data = vdso_data;
        pde->size = PAGE_SIZE;
        pde->proc_fops = &page_map_fops;
index 0c4fcd34bfe585ce199271ec7f73fcc549e9d171..65e4ebe8db319e58c16730c37642a13770a80f43 100644 (file)
@@ -708,7 +708,6 @@ static struct proc_dir_entry *create_flash_pde(const char *filename,
 
        ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL);
        if (ent != NULL) {
-               ent->nlink = 1;
                ent->proc_fops = fops;
                ent->owner = THIS_MODULE;
        }
index 03a2a2f30d66dfcf555881fd05bed1228de6dbd7..673e8d9df7f58e0067d9eee854c5e789741d90e0 100644 (file)
@@ -198,73 +198,6 @@ static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
                 __put_user(i->tv_usec, &o->tv_usec)));
 }
 
-struct sysinfo32 {
-        s32 uptime;
-        u32 loads[3];
-        u32 totalram;
-        u32 freeram;
-        u32 sharedram;
-        u32 bufferram;
-        u32 totalswap;
-        u32 freeswap;
-        unsigned short procs;
-       unsigned short pad;
-       u32 totalhigh;
-       u32 freehigh;
-       u32 mem_unit;
-       char _f[20-2*sizeof(int)-sizeof(int)];
-};
-
-asmlinkage long compat_sys_sysinfo(struct sysinfo32 __user *info)
-{
-       struct sysinfo s;
-       int ret, err;
-       int bitcount=0;
-       mm_segment_t old_fs = get_fs ();
-       
-       /* The __user cast is valid due to set_fs() */
-       set_fs (KERNEL_DS);
-       ret = sys_sysinfo((struct sysinfo __user *)&s);
-       set_fs (old_fs);
-
-       /* Check to see if any memory value is too large for 32-bit and
-         * scale down if needed.
-         */
-       if ((s.totalram >> 32) || (s.totalswap >> 32)) {
-           while (s.mem_unit < PAGE_SIZE) {
-               s.mem_unit <<= 1;
-               bitcount++;
-           }
-           s.totalram >>=bitcount;
-           s.freeram >>= bitcount;
-           s.sharedram >>= bitcount;
-           s.bufferram >>= bitcount;
-           s.totalswap >>= bitcount;
-           s.freeswap >>= bitcount;
-           s.totalhigh >>= bitcount;
-           s.freehigh >>= bitcount;
-       }
-
-       err = put_user (s.uptime, &info->uptime);
-       err |= __put_user (s.loads[0], &info->loads[0]);
-       err |= __put_user (s.loads[1], &info->loads[1]);
-       err |= __put_user (s.loads[2], &info->loads[2]);
-       err |= __put_user (s.totalram, &info->totalram);
-       err |= __put_user (s.freeram, &info->freeram);
-       err |= __put_user (s.sharedram, &info->sharedram);
-       err |= __put_user (s.bufferram, &info->bufferram);
-       err |= __put_user (s.totalswap, &info->totalswap);
-       err |= __put_user (s.freeswap, &info->freeswap);
-       err |= __put_user (s.procs, &info->procs);
-       err |= __put_user (s.totalhigh, &info->totalhigh);
-       err |= __put_user (s.freehigh, &info->freehigh);
-       err |= __put_user (s.mem_unit, &info->mem_unit);
-       if (err)
-               return -EFAULT;
-       
-       return ret;
-}
-
 
 
 
index 04b8e71bf5b0087a814fba70bd47dce22eda717f..7eefeb4a30e70b9837f3e50eb045444521095baf 100644 (file)
@@ -131,14 +131,14 @@ SECTIONS
                __stop___fw_ftr_fixup = .;
        }
 #endif
-
+#ifdef CONFIG_BLK_DEV_INITRD
        . = ALIGN(PAGE_SIZE);
        .init.ramfs : {
                __initramfs_start = .;
                *(.init.ramfs)
                __initramfs_end = .;
        }
-
+#endif
 #ifdef CONFIG_PPC32
        . = ALIGN(32);
 #else
index 1ad0e4aaad1a0d5ba514e4d1d136c9cf7d40907c..90d3d49f713e827b6312d43a8656f4981d3b397c 100644 (file)
@@ -1253,7 +1253,6 @@ static int __init mf_proc_init(void)
                ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf);
                if (!ent)
                        return 1;
-               ent->nlink = 1;
                ent->data = (void *)(long)i;
                ent->read_proc = proc_mf_dump_cmdline;
                ent->write_proc = proc_mf_change_cmdline;
@@ -1264,7 +1263,6 @@ static int __init mf_proc_init(void)
                ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf);
                if (!ent)
                        return 1;
-               ent->nlink = 1;
                ent->data = (void *)(long)i;
                ent->proc_fops = &proc_vmlinux_operations;
        }
@@ -1272,7 +1270,6 @@ static int __init mf_proc_init(void)
        ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
        if (!ent)
                return 1;
-       ent->nlink = 1;
        ent->data = (void *)0;
        ent->read_proc = proc_mf_dump_side;
        ent->write_proc = proc_mf_change_side;
@@ -1280,7 +1277,6 @@ static int __init mf_proc_init(void)
        ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
        if (!ent)
                return 1;
-       ent->nlink = 1;
        ent->data = (void *)0;
        ent->read_proc = proc_mf_dump_src;
        ent->write_proc = proc_mf_change_src;
index 4ad33e41b0082794582e9a8710d063aa6e7ab599..789a5e99aefdedc7b77c6bdbd719494df50b06a1 100644 (file)
@@ -513,7 +513,6 @@ static int proc_ppc64_create_ofdt(void)
 
        ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL);
        if (ent) {
-               ent->nlink = 1;
                ent->data = NULL;
                ent->size = 0;
                ent->proc_fops = &ofdt_fops;
index c22e60619d9bb6c257f0b7a6483c355cf45112ea..0df9c33629fd992159cf95406157886dff090994 100644 (file)
@@ -1177,6 +1177,10 @@ config ISA
          have an IBM RS/6000 or pSeries machine or a PReP machine, say Y.  If
          you have an embedded board, consult your board documentation.
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_ISA_DMA
        bool
        depends on 6xx && !CPM2
index 61921268a0d00c290e7dfd1db163a8311d934461..a0625562a44bb7a82db233c6388b984662ec44a8 100644 (file)
@@ -135,10 +135,12 @@ SECTIONS
   .data.percpu  : { *(.data.percpu) }
   __per_cpu_end = .;
 
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(4096);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
 
   . = ALIGN(4096);
   __init_end = .;
index eaed402ad3460a758872ccf271971a36f6042add..eaaac3788110ec90ad076dc92d922da452675242 100644 (file)
@@ -7,6 +7,10 @@ config MMU
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config LOCKDEP_SUPPORT
        bool
        default y
@@ -37,6 +41,9 @@ config GENERIC_HWEIGHT
 config GENERIC_TIME
        def_bool y
 
+config NO_IOMEM
+       def_bool y
+
 mainmenu "Linux Kernel Configuration"
 
 config S390
index 666bb6daa148e649d3156aea4b88c65e7c553b3e..664c669b1856ac881e96bca89b8c5a2429a517c6 100644 (file)
@@ -398,51 +398,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
        return err;
 }
 
-struct sysinfo32 {
-        s32 uptime;
-        u32 loads[3];
-        u32 totalram;
-        u32 freeram;
-        u32 sharedram;
-        u32 bufferram;
-        u32 totalswap;
-        u32 freeswap;
-        unsigned short procs;
-       unsigned short pads;
-       u32 totalhigh;
-       u32 freehigh;
-       unsigned int mem_unit;
-        char _f[8];
-};
-
-asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
-{
-       struct sysinfo s;
-       int ret, err;
-       mm_segment_t old_fs = get_fs ();
-       
-       set_fs (KERNEL_DS);
-       ret = sys_sysinfo((struct sysinfo __force __user *) &s);
-       set_fs (old_fs);
-       err = put_user (s.uptime, &info->uptime);
-       err |= __put_user (s.loads[0], &info->loads[0]);
-       err |= __put_user (s.loads[1], &info->loads[1]);
-       err |= __put_user (s.loads[2], &info->loads[2]);
-       err |= __put_user (s.totalram, &info->totalram);
-       err |= __put_user (s.freeram, &info->freeram);
-       err |= __put_user (s.sharedram, &info->sharedram);
-       err |= __put_user (s.bufferram, &info->bufferram);
-       err |= __put_user (s.totalswap, &info->totalswap);
-       err |= __put_user (s.freeswap, &info->freeswap);
-       err |= __put_user (s.procs, &info->procs);
-       err |= __put_user (s.totalhigh, &info->totalhigh);
-       err |= __put_user (s.freehigh, &info->freehigh);
-       err |= __put_user (s.mem_unit, &info->mem_unit);
-       if (err)
-               return -EFAULT;
-       return ret;
-}
-
 asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
                                struct compat_timespec __user *interval)
 {
index 71e54ef0931e1846d35ae784462a993ca21d4705..97901296894eae6785bf74edfc6cceb2842f6656 100644 (file)
@@ -517,10 +517,10 @@ sys32_swapoff_wrapper:
        llgtr   %r2,%r2                 # const char *
        jg      sys_swapoff             # branch to system call
 
-       .globl  sys32_sysinfo_wrapper
-sys32_sysinfo_wrapper:
+       .globl  compat_sys_sysinfo_wrapper
+compat_sys_sysinfo_wrapper:
        llgtr   %r2,%r2                 # struct sysinfo_emu31 *
-       jg      sys32_sysinfo           # branch to system call
+       jg      compat_sys_sysinfo      # branch to system call
 
        .globl  sys32_ipc_wrapper
 sys32_ipc_wrapper:
index a4ceae3dbcf1b5fe8ed8ae27b931a56d8791b346..a52c44455bf0bbb20db3e3f65e8d9edc0c9fc5a5 100644 (file)
@@ -124,7 +124,7 @@ NI_SYSCALL                                                  /* old "idle" system call */
 NI_SYSCALL                                                     /* vm86old for i386 */
 SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4_wrapper)
 SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper)         /* 115 */
-SYSCALL(sys_sysinfo,sys_sysinfo,sys32_sysinfo_wrapper)
+SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper)
 SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper)
 SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper)
 SYSCALL(sys_sigreturn_glue,sys_sigreturn_glue,sys32_sigreturn_glue)
index a4890739252230df4ebb28cc70a0e79915aa7bd0..c30716ae130ca7b47afc2183997cc387923013f8 100644 (file)
@@ -91,11 +91,14 @@ SECTIONS
   .con_initcall.init : { *(.con_initcall.init) }
   __con_initcall_end = .;
   SECURITY_INIT
+
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(256);
   __initramfs_start = .;
   .init.ramfs : { *(.init.initramfs) }
   . = ALIGN(2);
   __initramfs_end = .;
+#endif
   . = ALIGN(256);
   __per_cpu_start = .;
   .data.percpu  : { *(.data.percpu) }
index 8e09db1edbb91a8cb835d35e7af6605d65c2364e..f95449b29fa5229bcb16bdb3dd9262b9121c2f5b 100644 (file)
@@ -2,6 +2,6 @@
 # Makefile for the linux s390-specific parts of the memory manager.
 #
 
-obj-y   := init.o fault.o ioremap.o extmem.o mmap.o vmem.o
+obj-y   := init.o fault.o extmem.o mmap.o vmem.o
 obj-$(CONFIG_CMM) += cmm.o
 
index 9ff143e87746b5ac0bf350c1496307c10506d123..641aef36ccc498847ee90fb42c77fa676f496d9d 100644 (file)
@@ -83,12 +83,10 @@ static inline int notify_page_fault(enum die_val val, const char *str,
 }
 #endif
 
-extern spinlock_t timerlist_lock;
 
 /*
  * Unlock any spinlocks which will prevent us from getting the
- * message out (timerlist_lock is acquired through the
- * console unblank code)
+ * message out.
  */
 void bust_spinlocks(int yes)
 {
diff --git a/arch/s390/mm/ioremap.c b/arch/s390/mm/ioremap.c
deleted file mode 100644 (file)
index 3d2100a..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  arch/s390/mm/ioremap.c
- *
- *  S390 version
- *    Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
- *    Author(s): Hartmut Penner (hp@de.ibm.com)
- *
- *  Derived from "arch/i386/mm/extable.c"
- *    (C) Copyright 1995 1996 Linus Torvalds
- *
- * Re-map IO memory to kernel address space so that we can access it.
- * This is needed for high PCI addresses that aren't mapped in the
- * 640k-1MB IO memory area on PC's
- */
-
-#include <linux/vmalloc.h>
-#include <linux/mm.h>
-#include <linux/io.h>
-#include <asm/pgalloc.h>
-
-/*
- * Generic mapping function (not visible outside):
- */
-
-/*
- * Remap an arbitrary physical address space into the kernel virtual
- * address space. Needed when the kernel wants to access high addresses
- * directly.
- */
-void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
-{
-       void * addr;
-       struct vm_struct * area;
-
-       if (phys_addr < virt_to_phys(high_memory))
-               return phys_to_virt(phys_addr);
-       if (phys_addr & ~PAGE_MASK)
-               return NULL;
-       size = PAGE_ALIGN(size);
-       if (!size || size > phys_addr + size)
-               return NULL;
-       area = get_vm_area(size, VM_IOREMAP);
-       if (!area)
-               return NULL;
-       addr = area->addr;
-       if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
-                              phys_addr, __pgprot(flags))) {
-               vfree(addr);
-               return NULL;
-       }
-       return addr;
-}
-
-void iounmap(void *addr)
-{
-       if (addr > high_memory)
-               vfree(addr);
-}
index c206c9504c4bb40da950a374ead73943f9ab36a4..d47e775962e955054f8e0296f4f3a5fdd65377e5 100644 (file)
@@ -41,14 +41,6 @@ static int null_rtc_set_time(const time_t secs)
 void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time;
 int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time;
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long __attribute__ ((weak)) sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 #ifndef CONFIG_GENERIC_TIME
 void do_gettimeofday(struct timeval *tv)
 {
index f34bdcc33a7dd5a39124e7f3f1c543b48884353a..75de165867a0e75a83ac4220c493c5b10a530bfb 100644 (file)
@@ -83,9 +83,13 @@ SECTIONS
   .con_initcall.init : { *(.con_initcall.init) }
   __con_initcall_end = .;
   SECURITY_INIT
+
+#ifdef CONFIG_BLK_DEV_INITRD
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
+
   __machvec_start = .;
   .init.machvec : { *(.init.machvec) }
   __machvec_end = .;
index 29bd37b1488e42ee7e5a74d5beb5cf5ba680b059..bf0c263cb6fd036ec3f3f9e971799dc41f18fa56 100644 (file)
@@ -158,7 +158,6 @@ void __init paging_init(void)
         * Setup some defaults for the zone sizes.. these should be safe
         * regardless of distcontiguous memory or MMU settings.
         */
-       zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT;
        zones_size[ZONE_NORMAL] = __MEMORY_SIZE >> PAGE_SHIFT;
 #ifdef CONFIG_HIGHMEM
        zones_size[ZONE_HIGHMEM] = 0 >> PAGE_SHIFT;
@@ -170,8 +169,6 @@ void __init paging_init(void)
         * the zone sizes accordingly, in addition to turning it on.
         */
        {
-               unsigned long max_dma, low, start_pfn;
-
                /* We don't need to map the kernel through the TLB, as
                 * it is permanatly mapped using P1. So clear the
                 * entire pgd. */
@@ -179,19 +176,7 @@ void __init paging_init(void)
 
                /* Turn on the MMU */
                enable_mmu();
-
-               /* Fixup the zone sizes */
-               start_pfn = START_PFN;
-               max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
-               low = MAX_LOW_PFN;
-
-               if (low < max_dma) {
-                       zones_size[ZONE_DMA] = low - start_pfn;
-                       zones_size[ZONE_NORMAL] = 0;
-               } else {
-                       zones_size[ZONE_DMA] = max_dma - start_pfn;
-                       zones_size[ZONE_NORMAL] = low - max_dma;
-               }
+               zones_size[ZONE_NORMAL] = MAX_LOW_PFN - START_PFN;
        }
 
        /* Set an initial value for the MMU.TTB so we don't have to
index 7bc0744b7ab6aca55207c96740c48c793fa286e4..e14b533558c8a87fc712c17252dc22ea140318cd 100644 (file)
@@ -36,9 +36,6 @@ config GENERIC_CALIBRATE_DELAY
 config RWSEM_XCHGADD_ALGORITHM
        bool
 
-config GENERIC_ISA_DMA
-       bool
-
 config ARCH_HAS_ILOG2_U32
        bool
        default n
index 9c4a38a8698c608e353a04831fc1761fcd99e526..390b40de7cefcb6886b81bc50ad6513cfbf3b43f 100644 (file)
@@ -579,12 +579,3 @@ void enter_deep_standby(void)
        asm __volatile__ ("nop");
        panic("Unexpected wakeup!\n");
 }
-
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
index 95c4d753e357132bc6e98ac8a3c4a465ba106451..a59c5e998131e93c5649e82d21328e8ba720d493 100644 (file)
@@ -115,9 +115,13 @@ SECTIONS
   .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
   __con_initcall_end = .;
   SECURITY_INIT
+
+#ifdef CONFIG_BLK_DEV_INITRD
   __initramfs_start = .;
   .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
+
   . = ALIGN(PAGE_SIZE);
   __init_end = .;
 
index 83295bd21aa7d050c3046e5b1189a66c793fcf51..5dc08787259c1220acf701e1e2730ee85a125c9c 100644 (file)
@@ -118,10 +118,7 @@ void __init paging_init(void)
 
        mmu_context_cache = MMU_CONTEXT_FIRST_VERSION;
 
-        /*
-        * All memory is good as ZONE_NORMAL (fall-through) and ZONE_DMA.
-         */
-       zones_size[ZONE_DMA] = MAX_LOW_PFN - START_PFN;
+       zones_size[ZONE_NORMAL] = MAX_LOW_PFN - START_PFN;
        NODE_DATA(0)->node_mem_map = NULL;
        free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
 }
index d0dec1ea2eed93345091981a64c6028f9ae474ff..bd992c0048f0aa1d8801b6dde2b3380982268ef9 100644 (file)
@@ -13,6 +13,10 @@ config HIGHMEM
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_ISA_DMA
        bool
        default y
index 6616ee05c313c613f3f4fe18053fb806458d2ef2..e795f282dece9f29d6914bc639ffb0c73da5d9f9 100644 (file)
@@ -12,7 +12,9 @@ obj-y    := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
            sys_sparc.o sunos_asm.o systbls.o \
            time.o windows.o cpu.o devices.o sclow.o \
            tadpole.o tick14.o ptrace.o sys_solaris.o \
-           unaligned.o muldiv.o semaphore.o prom.o of_device.o
+           unaligned.o muldiv.o semaphore.o prom.o of_device.o devres.o
+
+devres-y = ../../../kernel/irq/devres.o
 
 obj-$(CONFIG_PCI) += pcic.o
 obj-$(CONFIG_SUN4) += sun4setup.o
index a6ba3d26222c1c173d4e5960ba26904705178843..32e8274e43574513c501fb8cd42940741f88aae7 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/termios.h>
+#include <linux/tty.h>
 #include <linux/ioctl.h>
 #include <linux/route.h>
 #include <linux/sockios.h>
index 2fcce000d87731c8c13a5965842f13b71bb6f251..9bb1240aaf8afee365a25a14b566de19f02ce601 100644 (file)
@@ -436,15 +436,6 @@ static inline unsigned long do_gettimeoffset(void)
        return (*master_l10_counter >> 10) & 0x1fffff;
 }
 
-/*
- * Returns nanoseconds
- * XXX This is a suboptimal implementation.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 /* Ok, my cute asm atomicity trick doesn't work anymore.
  * There are just too many variables that need to be protected
  * now (both members of xtime, et al.)
index b73e6b9067eddf5ba48ea26d503c607f67d2ea60..e5c24e0521dee34f43e0ef32c693320512f841a9 100644 (file)
@@ -57,10 +57,14 @@ SECTIONS
   .con_initcall.init : { *(.con_initcall.init) }
   __con_initcall_end = .;
   SECURITY_INIT
+
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(4096);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
+
   . = ALIGN(32);
   __per_cpu_start = .;
   .data.percpu  : { *(.data.percpu) }
index d41f66ac7fff71dd8768271775aad6b183de987f..fb84647dbf3dedd132e4e0082a232ab95e9da0e4 100644 (file)
@@ -232,6 +232,10 @@ config LARGE_ALLOCS
 
 source "mm/Kconfig"
 
+config ZONE_DMA
+       bool
+       default y
+
 config GENERIC_ISA_DMA
        bool
        default y
index 5a9e68b13e606277d37fdbe527fd3b758463696c..069ee3ccd84968784755cdcb7c2f95c3b41380f8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc2
-# Thu Dec 28 15:09:49 2006
+# Linux kernel version: 2.6.20
+# Sat Feb 10 23:08:12 2007
 #
 CONFIG_SPARC=y
 CONFIG_SPARC64=y
@@ -151,7 +151,7 @@ CONFIG_SUN_AUXIO=y
 CONFIG_SUN_IO=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_MULTITHREAD_PROBE is not set
+CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
 CONFIG_SUN_OPENPROMFS=m
 CONFIG_SPARC32_COMPAT=y
@@ -182,7 +182,9 @@ CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
 # CONFIG_XFRM_SUB_POLICY is not set
+CONFIG_XFRM_MIGRATE=y
 CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
@@ -300,6 +302,7 @@ CONFIG_STANDALONE=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
 
 #
@@ -393,6 +396,7 @@ CONFIG_BLK_DEV_ALI15X3=y
 # CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT8213 is not set
 # CONFIG_BLK_DEV_IT821X is not set
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -402,6 +406,7 @@ CONFIG_BLK_DEV_ALI15X3=y
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
 # CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
@@ -579,6 +584,7 @@ CONFIG_NET_PCI=y
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
 # CONFIG_VIA_RHINE is not set
+# CONFIG_SC92031 is not set
 
 #
 # Ethernet (1000 Mbit)
@@ -601,11 +607,13 @@ CONFIG_E1000_NAPI=y
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
 # CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
 
 #
 # Ethernet (10000 Mbit)
 #
 # CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
@@ -627,8 +635,17 @@ CONFIG_BNX2=m
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
+CONFIG_SLHC=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
@@ -1042,6 +1059,11 @@ CONFIG_SND_ALI5451=m
 CONFIG_SND_SUN_CS4231=m
 # CONFIG_SND_SUN_DBRI is not set
 
+#
+# SoC audio support
+#
+# CONFIG_SND_SOC is not set
+
 #
 # Open Sound System
 #
@@ -1052,6 +1074,7 @@ CONFIG_AC97_BUS=m
 # HID Devices
 #
 CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
 
 #
 # USB support
@@ -1066,9 +1089,7 @@ CONFIG_USB=y
 # Miscellaneous USB options
 #
 CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1078,9 +1099,11 @@ CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 # CONFIG_USB_EHCI_TT_NEWSCHED is not set
+# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
 # CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 CONFIG_USB_UHCI_HCD=m
 # CONFIG_USB_SL811_HCD is not set
@@ -1132,6 +1155,7 @@ CONFIG_USB_HIDDEV=y
 # CONFIG_USB_ATI_REMOTE2 is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
 # CONFIG_USB_APPLETOUCH is not set
+# CONFIG_USB_GTCO is not set
 
 #
 # USB Imaging devices
@@ -1473,8 +1497,10 @@ CONFIG_CRYPTO_TGR192=m
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1489,6 +1515,7 @@ CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
 CONFIG_CRYPTO_TEST=m
 
 #
index c3d068c7a4128c5ad7a94a8ad62936f425fe2569..b5ff3ee5ace1cc23d3a86cd50878568b505ea7d8 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/seq_file.h>
 #include <linux/bootmem.h>
 #include <linux/irq.h>
+#include <linux/msi.h>
 
 #include <asm/ptrace.h>
 #include <asm/processor.h>
@@ -87,7 +88,6 @@ struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BY
 #define irq_work(__cpu)        &(trap_block[(__cpu)].irq_worklist)
 
 static unsigned int virt_to_real_irq_table[NR_IRQS];
-static unsigned char virt_irq_cur = 1;
 
 static unsigned char virt_irq_alloc(unsigned int real_irq)
 {
@@ -95,26 +95,32 @@ static unsigned char virt_irq_alloc(unsigned int real_irq)
 
        BUILD_BUG_ON(NR_IRQS >= 256);
 
-       ent = virt_irq_cur;
+       for (ent = 1; ent < NR_IRQS; ent++) {
+               if (!virt_to_real_irq_table[ent])
+                       break;
+       }
        if (ent >= NR_IRQS) {
                printk(KERN_ERR "IRQ: Out of virtual IRQs.\n");
                return 0;
        }
 
-       virt_irq_cur = ent + 1;
        virt_to_real_irq_table[ent] = real_irq;
 
        return ent;
 }
 
-#if 0 /* Currently unused. */
-static unsigned char real_to_virt_irq(unsigned int real_irq)
+static void virt_irq_free(unsigned int virt_irq)
 {
-       struct ino_bucket *bucket = __bucket(real_irq);
+       unsigned int real_irq;
 
-       return bucket->virt_irq;
+       if (virt_irq >= NR_IRQS)
+               return;
+
+       real_irq = virt_to_real_irq_table[virt_irq];
+       virt_to_real_irq_table[virt_irq] = 0;
+
+       __bucket(real_irq)->virt_irq = 0;
 }
-#endif
 
 static unsigned int virt_to_real_irq(unsigned char virt_irq)
 {
@@ -268,8 +274,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
 
 static void sun4u_irq_enable(unsigned int virt_irq)
 {
-       irq_desc_t *desc = irq_desc + virt_irq;
-       struct irq_handler_data *data = desc->handler_data;
+       struct irq_handler_data *data = get_irq_chip_data(virt_irq);
 
        if (likely(data)) {
                unsigned long cpuid, imap;
@@ -286,8 +291,7 @@ static void sun4u_irq_enable(unsigned int virt_irq)
 
 static void sun4u_irq_disable(unsigned int virt_irq)
 {
-       irq_desc_t *desc = irq_desc + virt_irq;
-       struct irq_handler_data *data = desc->handler_data;
+       struct irq_handler_data *data = get_irq_chip_data(virt_irq);
 
        if (likely(data)) {
                unsigned long imap = data->imap;
@@ -300,8 +304,7 @@ static void sun4u_irq_disable(unsigned int virt_irq)
 
 static void sun4u_irq_end(unsigned int virt_irq)
 {
-       irq_desc_t *desc = irq_desc + virt_irq;
-       struct irq_handler_data *data = desc->handler_data;
+       struct irq_handler_data *data = get_irq_chip_data(virt_irq);
 
        if (likely(data))
                upa_writel(ICLR_IDLE, data->iclr);
@@ -344,6 +347,20 @@ static void sun4v_irq_disable(unsigned int virt_irq)
        }
 }
 
+#ifdef CONFIG_PCI_MSI
+static void sun4v_msi_enable(unsigned int virt_irq)
+{
+       sun4v_irq_enable(virt_irq);
+       unmask_msi_irq(virt_irq);
+}
+
+static void sun4v_msi_disable(unsigned int virt_irq)
+{
+       mask_msi_irq(virt_irq);
+       sun4v_irq_disable(virt_irq);
+}
+#endif
+
 static void sun4v_irq_end(unsigned int virt_irq)
 {
        struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
@@ -362,8 +379,7 @@ static void sun4v_irq_end(unsigned int virt_irq)
 static void run_pre_handler(unsigned int virt_irq)
 {
        struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
-       irq_desc_t *desc = irq_desc + virt_irq;
-       struct irq_handler_data *data = desc->handler_data;
+       struct irq_handler_data *data = get_irq_chip_data(virt_irq);
 
        if (likely(data->pre_handler)) {
                data->pre_handler(__irq_ino(__irq(bucket)),
@@ -402,30 +418,47 @@ static struct irq_chip sun4v_irq_ack = {
        .end            = sun4v_irq_end,
 };
 
+#ifdef CONFIG_PCI_MSI
+static struct irq_chip sun4v_msi = {
+       .typename       = "sun4v+msi",
+       .mask           = mask_msi_irq,
+       .unmask         = unmask_msi_irq,
+       .enable         = sun4v_msi_enable,
+       .disable        = sun4v_msi_disable,
+       .ack            = run_pre_handler,
+       .end            = sun4v_irq_end,
+};
+#endif
+
 void irq_install_pre_handler(int virt_irq,
                             void (*func)(unsigned int, void *, void *),
                             void *arg1, void *arg2)
 {
-       irq_desc_t *desc = irq_desc + virt_irq;
-       struct irq_handler_data *data = desc->handler_data;
+       struct irq_handler_data *data = get_irq_chip_data(virt_irq);
+       struct irq_chip *chip;
 
        data->pre_handler = func;
        data->pre_handler_arg1 = arg1;
        data->pre_handler_arg2 = arg2;
 
-       if (desc->chip == &sun4u_irq_ack ||
-           desc->chip == &sun4v_irq_ack)
+       chip = get_irq_chip(virt_irq);
+       if (chip == &sun4u_irq_ack ||
+           chip == &sun4v_irq_ack
+#ifdef CONFIG_PCI_MSI
+           || chip == &sun4v_msi
+#endif
+           )
                return;
 
-       desc->chip = (desc->chip == &sun4u_irq ?
-                     &sun4u_irq_ack : &sun4v_irq_ack);
+       chip = (chip == &sun4u_irq ?
+               &sun4u_irq_ack : &sun4v_irq_ack);
+       set_irq_chip(virt_irq, chip);
 }
 
 unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
 {
        struct ino_bucket *bucket;
        struct irq_handler_data *data;
-       irq_desc_t *desc;
        int ino;
 
        BUG_ON(tlb_type == hypervisor);
@@ -434,11 +467,11 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
        bucket = &ivector_table[ino];
        if (!bucket->virt_irq) {
                bucket->virt_irq = virt_irq_alloc(__irq(bucket));
-               irq_desc[bucket->virt_irq].chip = &sun4u_irq;
+               set_irq_chip(bucket->virt_irq, &sun4u_irq);
        }
 
-       desc = irq_desc + bucket->virt_irq;
-       if (unlikely(desc->handler_data))
+       data = get_irq_chip_data(bucket->virt_irq);
+       if (unlikely(data))
                goto out;
 
        data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
@@ -446,7 +479,7 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap)
                prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n");
                prom_halt();
        }
-       desc->handler_data = data;
+       set_irq_chip_data(bucket->virt_irq, data);
 
        data->imap  = imap;
        data->iclr  = iclr;
@@ -460,7 +493,6 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
        struct ino_bucket *bucket;
        struct irq_handler_data *data;
        unsigned long sysino;
-       irq_desc_t *desc;
 
        BUG_ON(tlb_type != hypervisor);
 
@@ -468,11 +500,11 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
        bucket = &ivector_table[sysino];
        if (!bucket->virt_irq) {
                bucket->virt_irq = virt_irq_alloc(__irq(bucket));
-               irq_desc[bucket->virt_irq].chip = &sun4v_irq;
+               set_irq_chip(bucket->virt_irq, &sun4v_irq);
        }
 
-       desc = irq_desc + bucket->virt_irq;
-       if (unlikely(desc->handler_data))
+       data = get_irq_chip_data(bucket->virt_irq);
+       if (unlikely(data))
                goto out;
 
        data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
@@ -480,7 +512,7 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
                prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n");
                prom_halt();
        }
-       desc->handler_data = data;
+       set_irq_chip_data(bucket->virt_irq, data);
 
        /* Catch accidental accesses to these things.  IMAP/ICLR handling
         * is done by hypervisor calls on sun4v platforms, not by direct
@@ -493,6 +525,56 @@ out:
        return bucket->virt_irq;
 }
 
+#ifdef CONFIG_PCI_MSI
+unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
+                            unsigned int msi_start, unsigned int msi_end)
+{
+       struct ino_bucket *bucket;
+       struct irq_handler_data *data;
+       unsigned long sysino;
+       unsigned int devino;
+
+       BUG_ON(tlb_type != hypervisor);
+
+       /* Find a free devino in the given range.  */
+       for (devino = msi_start; devino < msi_end; devino++) {
+               sysino = sun4v_devino_to_sysino(devhandle, devino);
+               bucket = &ivector_table[sysino];
+               if (!bucket->virt_irq)
+                       break;
+       }
+       if (devino >= msi_end)
+               return 0;
+
+       sysino = sun4v_devino_to_sysino(devhandle, devino);
+       bucket = &ivector_table[sysino];
+       bucket->virt_irq = virt_irq_alloc(__irq(bucket));
+       *virt_irq_p = bucket->virt_irq;
+       set_irq_chip(bucket->virt_irq, &sun4v_msi);
+
+       data = get_irq_chip_data(bucket->virt_irq);
+       if (unlikely(data))
+               return devino;
+
+       data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC);
+       if (unlikely(!data)) {
+               prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n");
+               prom_halt();
+       }
+       set_irq_chip_data(bucket->virt_irq, data);
+
+       data->imap = ~0UL;
+       data->iclr = ~0UL;
+
+       return devino;
+}
+
+void sun4v_destroy_msi(unsigned int virt_irq)
+{
+       virt_irq_free(virt_irq);
+}
+#endif
+
 void ack_bad_irq(unsigned int virt_irq)
 {
        struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq);
index dfc41cd4bb5d06f690fa47080e8a6dcbecb3c65e..6b740eb6fe7e45915a0e4372cf496036b3d3fb23 100644 (file)
@@ -13,6 +13,8 @@
 #include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/smp_lock.h>
+#include <linux/msi.h>
+#include <linux/irq.h>
 #include <linux/init.h>
 
 #include <asm/uaccess.h>
@@ -646,4 +648,37 @@ int pci_domain_nr(struct pci_bus *pbus)
 }
 EXPORT_SYMBOL(pci_domain_nr);
 
+#ifdef CONFIG_PCI_MSI
+int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
+{
+       struct pcidev_cookie *pcp = pdev->sysdata;
+       struct pci_pbm_info *pbm = pcp->pbm;
+       struct pci_controller_info *p = pbm->parent;
+       int virt_irq, err;
+
+       if (!pbm->msi_num || !p->setup_msi_irq)
+               return -EINVAL;
+
+       err = p->setup_msi_irq(&virt_irq, pdev, desc);
+       if (err < 0)
+               return err;
+
+       return virt_irq;
+}
+
+void arch_teardown_msi_irq(unsigned int virt_irq)
+{
+       struct msi_desc *entry = get_irq_data(virt_irq);
+       struct pci_dev *pdev = entry->dev;
+       struct pcidev_cookie *pcp = pdev->sysdata;
+       struct pci_pbm_info *pbm = pcp->pbm;
+       struct pci_controller_info *p = pbm->parent;
+
+       if (!pbm->msi_num || !p->setup_msi_irq)
+               return;
+
+       return p->teardown_msi_irq(virt_irq, pdev);
+}
+#endif /* !(CONFIG_PCI_MSI) */
+
 #endif /* !(CONFIG_PCI) */
index 827ae30aa4971e5306e1f8c0ed6db494e65b71ec..5a92cb90ebe009d18fb7f1a61656d48bd6ab42c1 100644 (file)
@@ -7,6 +7,8 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/device.h>
 
 #include <asm/pbm.h>
 #include <asm/prom.h>
@@ -129,6 +131,20 @@ static void __init fixup_obp_assignments(struct pci_dev *pdev,
        }
 }
 
+static ssize_t
+show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char * buf)
+{
+       struct pci_dev *pdev;
+       struct pcidev_cookie *sysdata;
+
+       pdev = to_pci_dev(dev);
+       sysdata = pdev->sysdata;
+
+       return snprintf (buf, PAGE_SIZE, "%s\n", sysdata->prom_node->full_name);
+}
+
+static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL);
+
 /* Fill in the PCI device cookie sysdata for the given
  * PCI device.  This cookie is the means by which one
  * can get to OBP and PCI controller specific information
@@ -142,7 +158,7 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm,
        struct pcidev_cookie *pcp;
        struct device_node *dp;
        struct property *prop;
-       int nregs, len;
+       int nregs, len, err;
 
        dp = find_device_prom_node(pbm, pdev, bus_node,
                                   &pregs, &nregs);
@@ -215,6 +231,13 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm,
        fixup_obp_assignments(pdev, pcp);
 
        pdev->sysdata = pcp;
+
+       /* we don't really care if we can create this file or not,
+        * but we need to assign the result of the call or the world will fall
+        * under alien invasion and everybody will be frozen on a spaceship
+        * ready to be eaten on alpha centauri by some green and jelly humanoid.
+        */
+       err = sysfs_create_file(&pdev->dev.kobj, &dev_attr_obppath.attr);
 }
 
 void __init pci_fill_in_pbm_cookies(struct pci_bus *pbus,
index 6b04794b7a971bab494b7837748c6bc741bc7e5b..ec22cd61ec8ce8eeab6689a6de6ff4d04efc948d 100644 (file)
@@ -10,6 +10,8 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/percpu.h>
+#include <linux/irq.h>
+#include <linux/msi.h>
 
 #include <asm/pbm.h>
 #include <asm/iommu.h>
@@ -1074,6 +1076,443 @@ static void pci_sun4v_get_bus_range(struct pci_pbm_info *pbm)
 
 }
 
+#ifdef CONFIG_PCI_MSI
+struct pci_sun4v_msiq_entry {
+       u64             version_type;
+#define MSIQ_VERSION_MASK              0xffffffff00000000UL
+#define MSIQ_VERSION_SHIFT             32
+#define MSIQ_TYPE_MASK                 0x00000000000000ffUL
+#define MSIQ_TYPE_SHIFT                        0
+#define MSIQ_TYPE_NONE                 0x00
+#define MSIQ_TYPE_MSG                  0x01
+#define MSIQ_TYPE_MSI32                        0x02
+#define MSIQ_TYPE_MSI64                        0x03
+#define MSIQ_TYPE_INTX                 0x08
+#define MSIQ_TYPE_NONE2                        0xff
+
+       u64             intx_sysino;
+       u64             reserved1;
+       u64             stick;
+       u64             req_id;  /* bus/device/func */
+#define MSIQ_REQID_BUS_MASK            0xff00UL
+#define MSIQ_REQID_BUS_SHIFT           8
+#define MSIQ_REQID_DEVICE_MASK         0x00f8UL
+#define MSIQ_REQID_DEVICE_SHIFT                3
+#define MSIQ_REQID_FUNC_MASK           0x0007UL
+#define MSIQ_REQID_FUNC_SHIFT          0
+
+       u64             msi_address;
+
+       /* The format of this value is message type dependant.
+        * For MSI bits 15:0 are the data from the MSI packet.
+        * For MSI-X bits 31:0 are the data from the MSI packet.
+        * For MSG, the message code and message routing code where:
+        *      bits 39:32 is the bus/device/fn of the msg target-id
+        *      bits 18:16 is the message routing code
+        *      bits 7:0 is the message code
+        * For INTx the low order 2-bits are:
+        *      00 - INTA
+        *      01 - INTB
+        *      10 - INTC
+        *      11 - INTD
+        */
+       u64             msi_data;
+
+       u64             reserved2;
+};
+
+/* For now this just runs as a pre-handler for the real interrupt handler.
+ * So we just walk through the queue and ACK all the entries, update the
+ * head pointer, and return.
+ *
+ * In the longer term it would be nice to do something more integrated
+ * wherein we can pass in some of this MSI info to the drivers.  This
+ * would be most useful for PCIe fabric error messages, although we could
+ * invoke those directly from the loop here in order to pass the info around.
+ */
+static void pci_sun4v_msi_prehandler(unsigned int ino, void *data1, void *data2)
+{
+       struct pci_pbm_info *pbm = data1;
+       struct pci_sun4v_msiq_entry *base, *ep;
+       unsigned long msiqid, orig_head, head, type, err;
+
+       msiqid = (unsigned long) data2;
+
+       head = 0xdeadbeef;
+       err = pci_sun4v_msiq_gethead(pbm->devhandle, msiqid, &head);
+       if (unlikely(err))
+               goto hv_error_get;
+
+       if (unlikely(head >= (pbm->msiq_ent_count * sizeof(struct pci_sun4v_msiq_entry))))
+               goto bad_offset;
+
+       head /= sizeof(struct pci_sun4v_msiq_entry);
+       orig_head = head;
+       base = (pbm->msi_queues + ((msiqid - pbm->msiq_first) *
+                                  (pbm->msiq_ent_count *
+                                   sizeof(struct pci_sun4v_msiq_entry))));
+       ep = &base[head];
+       while ((ep->version_type & MSIQ_TYPE_MASK) != 0) {
+               type = (ep->version_type & MSIQ_TYPE_MASK) >> MSIQ_TYPE_SHIFT;
+               if (unlikely(type != MSIQ_TYPE_MSI32 &&
+                            type != MSIQ_TYPE_MSI64))
+                       goto bad_type;
+
+               pci_sun4v_msi_setstate(pbm->devhandle,
+                                      ep->msi_data /* msi_num */,
+                                      HV_MSISTATE_IDLE);
+
+               /* Clear the entry.  */
+               ep->version_type &= ~MSIQ_TYPE_MASK;
+
+               /* Go to next entry in ring.  */
+               head++;
+               if (head >= pbm->msiq_ent_count)
+                       head = 0;
+               ep = &base[head];
+       }
+
+       if (likely(head != orig_head)) {
+               /* ACK entries by updating head pointer.  */
+               head *= sizeof(struct pci_sun4v_msiq_entry);
+               err = pci_sun4v_msiq_sethead(pbm->devhandle, msiqid, head);
+               if (unlikely(err))
+                       goto hv_error_set;
+       }
+       return;
+
+hv_error_set:
+       printk(KERN_EMERG "MSI: Hypervisor set head gives error %lu\n", err);
+       goto hv_error_cont;
+
+hv_error_get:
+       printk(KERN_EMERG "MSI: Hypervisor get head gives error %lu\n", err);
+
+hv_error_cont:
+       printk(KERN_EMERG "MSI: devhandle[%x] msiqid[%lx] head[%lu]\n",
+              pbm->devhandle, msiqid, head);
+       return;
+
+bad_offset:
+       printk(KERN_EMERG "MSI: Hypervisor gives bad offset %lx max(%lx)\n",
+              head, pbm->msiq_ent_count * sizeof(struct pci_sun4v_msiq_entry));
+       return;
+
+bad_type:
+       printk(KERN_EMERG "MSI: Entry has bad type %lx\n", type);
+       return;
+}
+
+static int msi_bitmap_alloc(struct pci_pbm_info *pbm)
+{
+       unsigned long size, bits_per_ulong;
+
+       bits_per_ulong = sizeof(unsigned long) * 8;
+       size = (pbm->msi_num + (bits_per_ulong - 1)) & ~(bits_per_ulong - 1);
+       size /= 8;
+       BUG_ON(size % sizeof(unsigned long));
+
+       pbm->msi_bitmap = kzalloc(size, GFP_KERNEL);
+       if (!pbm->msi_bitmap)
+               return -ENOMEM;
+
+       return 0;
+}
+
+static void msi_bitmap_free(struct pci_pbm_info *pbm)
+{
+       kfree(pbm->msi_bitmap);
+       pbm->msi_bitmap = NULL;
+}
+
+static int msi_queue_alloc(struct pci_pbm_info *pbm)
+{
+       unsigned long q_size, alloc_size, pages, order;
+       int i;
+
+       q_size = pbm->msiq_ent_count * sizeof(struct pci_sun4v_msiq_entry);
+       alloc_size = (pbm->msiq_num * q_size);
+       order = get_order(alloc_size);
+       pages = __get_free_pages(GFP_KERNEL | __GFP_COMP, order);
+       if (pages == 0UL) {
+               printk(KERN_ERR "MSI: Cannot allocate MSI queues (o=%lu).\n",
+                      order);
+               return -ENOMEM;
+       }
+       memset((char *)pages, 0, PAGE_SIZE << order);
+       pbm->msi_queues = (void *) pages;
+
+       for (i = 0; i < pbm->msiq_num; i++) {
+               unsigned long err, base = __pa(pages + (i * q_size));
+               unsigned long ret1, ret2;
+
+               err = pci_sun4v_msiq_conf(pbm->devhandle,
+                                         pbm->msiq_first + i,
+                                         base, pbm->msiq_ent_count);
+               if (err) {
+                       printk(KERN_ERR "MSI: msiq register fails (err=%lu)\n",
+                              err);
+                       goto h_error;
+               }
+
+               err = pci_sun4v_msiq_info(pbm->devhandle,
+                                         pbm->msiq_first + i,
+                                         &ret1, &ret2);
+               if (err) {
+                       printk(KERN_ERR "MSI: Cannot read msiq (err=%lu)\n",
+                              err);
+                       goto h_error;
+               }
+               if (ret1 != base || ret2 != pbm->msiq_ent_count) {
+                       printk(KERN_ERR "MSI: Bogus qconf "
+                              "expected[%lx:%x] got[%lx:%lx]\n",
+                              base, pbm->msiq_ent_count,
+                              ret1, ret2);
+                       goto h_error;
+               }
+       }
+
+       return 0;
+
+h_error:
+       free_pages(pages, order);
+       return -EINVAL;
+}
+
+static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
+{
+       u32 *val;
+       int len;
+
+       val = of_get_property(pbm->prom_node, "#msi-eqs", &len);
+       if (!val || len != 4)
+               goto no_msi;
+       pbm->msiq_num = *val;
+       if (pbm->msiq_num) {
+               struct msiq_prop {
+                       u32 first_msiq;
+                       u32 num_msiq;
+                       u32 first_devino;
+               } *mqp;
+               struct msi_range_prop {
+                       u32 first_msi;
+                       u32 num_msi;
+               } *mrng;
+               struct addr_range_prop {
+                       u32 msi32_high;
+                       u32 msi32_low;
+                       u32 msi32_len;
+                       u32 msi64_high;
+                       u32 msi64_low;
+                       u32 msi64_len;
+               } *arng;
+
+               val = of_get_property(pbm->prom_node, "msi-eq-size", &len);
+               if (!val || len != 4)
+                       goto no_msi;
+
+               pbm->msiq_ent_count = *val;
+
+               mqp = of_get_property(pbm->prom_node,
+                                     "msi-eq-to-devino", &len);
+               if (!mqp || len != sizeof(struct msiq_prop))
+                       goto no_msi;
+
+               pbm->msiq_first = mqp->first_msiq;
+               pbm->msiq_first_devino = mqp->first_devino;
+
+               val = of_get_property(pbm->prom_node, "#msi", &len);
+               if (!val || len != 4)
+                       goto no_msi;
+               pbm->msi_num = *val;
+
+               mrng = of_get_property(pbm->prom_node, "msi-ranges", &len);
+               if (!mrng || len != sizeof(struct msi_range_prop))
+                       goto no_msi;
+               pbm->msi_first = mrng->first_msi;
+
+               val = of_get_property(pbm->prom_node, "msi-data-mask", &len);
+               if (!val || len != 4)
+                       goto no_msi;
+               pbm->msi_data_mask = *val;
+
+               val = of_get_property(pbm->prom_node, "msix-data-width", &len);
+               if (!val || len != 4)
+                       goto no_msi;
+               pbm->msix_data_width = *val;
+
+               arng = of_get_property(pbm->prom_node, "msi-address-ranges",
+                                      &len);
+               if (!arng || len != sizeof(struct addr_range_prop))
+                       goto no_msi;
+               pbm->msi32_start = ((u64)arng->msi32_high << 32) |
+                       (u64) arng->msi32_low;
+               pbm->msi64_start = ((u64)arng->msi64_high << 32) |
+                       (u64) arng->msi64_low;
+               pbm->msi32_len = arng->msi32_len;
+               pbm->msi64_len = arng->msi64_len;
+
+               if (msi_bitmap_alloc(pbm))
+                       goto no_msi;
+
+               if (msi_queue_alloc(pbm)) {
+                       msi_bitmap_free(pbm);
+                       goto no_msi;
+               }
+
+               printk(KERN_INFO "%s: MSI Queue first[%u] num[%u] count[%u] "
+                      "devino[0x%x]\n",
+                      pbm->name,
+                      pbm->msiq_first, pbm->msiq_num,
+                      pbm->msiq_ent_count,
+                      pbm->msiq_first_devino);
+               printk(KERN_INFO "%s: MSI first[%u] num[%u] mask[0x%x] "
+                      "width[%u]\n",
+                      pbm->name,
+                      pbm->msi_first, pbm->msi_num, pbm->msi_data_mask,
+                      pbm->msix_data_width);
+               printk(KERN_INFO "%s: MSI addr32[0x%lx:0x%x] "
+                      "addr64[0x%lx:0x%x]\n",
+                      pbm->name,
+                      pbm->msi32_start, pbm->msi32_len,
+                      pbm->msi64_start, pbm->msi64_len);
+               printk(KERN_INFO "%s: MSI queues at RA [%p]\n",
+                      pbm->name,
+                      pbm->msi_queues);
+       }
+
+       return;
+
+no_msi:
+       pbm->msiq_num = 0;
+       printk(KERN_INFO "%s: No MSI support.\n", pbm->name);
+}
+
+static int alloc_msi(struct pci_pbm_info *pbm)
+{
+       int i;
+
+       for (i = 0; i < pbm->msi_num; i++) {
+               if (!test_and_set_bit(i, pbm->msi_bitmap))
+                       return i + pbm->msi_first;
+       }
+
+       return -ENOENT;
+}
+
+static void free_msi(struct pci_pbm_info *pbm, int msi_num)
+{
+       msi_num -= pbm->msi_first;
+       clear_bit(msi_num, pbm->msi_bitmap);
+}
+
+static int pci_sun4v_setup_msi_irq(unsigned int *virt_irq_p,
+                                  struct pci_dev *pdev,
+                                  struct msi_desc *entry)
+{
+       struct pcidev_cookie *pcp = pdev->sysdata;
+       struct pci_pbm_info *pbm = pcp->pbm;
+       unsigned long devino, msiqid;
+       struct msi_msg msg;
+       int msi_num, err;
+
+       *virt_irq_p = 0;
+
+       msi_num = alloc_msi(pbm);
+       if (msi_num < 0)
+               return msi_num;
+
+       devino = sun4v_build_msi(pbm->devhandle, virt_irq_p,
+                                pbm->msiq_first_devino,
+                                (pbm->msiq_first_devino +
+                                 pbm->msiq_num));
+       err = -ENOMEM;
+       if (!devino)
+               goto out_err;
+
+       set_irq_msi(*virt_irq_p, entry);
+
+       msiqid = ((devino - pbm->msiq_first_devino) +
+                 pbm->msiq_first);
+
+       err = -EINVAL;
+       if (pci_sun4v_msiq_setstate(pbm->devhandle, msiqid, HV_MSIQSTATE_IDLE))
+       if (err)
+               goto out_err;
+
+       if (pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_VALID))
+               goto out_err;
+
+       if (pci_sun4v_msi_setmsiq(pbm->devhandle,
+                                 msi_num, msiqid,
+                                 (entry->msi_attrib.is_64 ?
+                                  HV_MSITYPE_MSI64 : HV_MSITYPE_MSI32)))
+               goto out_err;
+
+       if (pci_sun4v_msi_setstate(pbm->devhandle, msi_num, HV_MSISTATE_IDLE))
+               goto out_err;
+
+       if (pci_sun4v_msi_setvalid(pbm->devhandle, msi_num, HV_MSIVALID_VALID))
+               goto out_err;
+
+       pcp->msi_num = msi_num;
+
+       if (entry->msi_attrib.is_64) {
+               msg.address_hi = pbm->msi64_start >> 32;
+               msg.address_lo = pbm->msi64_start & 0xffffffff;
+       } else {
+               msg.address_hi = 0;
+               msg.address_lo = pbm->msi32_start;
+       }
+       msg.data = msi_num;
+       write_msi_msg(*virt_irq_p, &msg);
+
+       irq_install_pre_handler(*virt_irq_p,
+                               pci_sun4v_msi_prehandler,
+                               pbm, (void *) msiqid);
+
+       return 0;
+
+out_err:
+       free_msi(pbm, msi_num);
+       sun4v_destroy_msi(*virt_irq_p);
+       *virt_irq_p = 0;
+       return err;
+
+}
+
+static void pci_sun4v_teardown_msi_irq(unsigned int virt_irq,
+                                      struct pci_dev *pdev)
+{
+       struct pcidev_cookie *pcp = pdev->sysdata;
+       struct pci_pbm_info *pbm = pcp->pbm;
+       unsigned long msiqid, err;
+       unsigned int msi_num;
+
+       msi_num = pcp->msi_num;
+       err = pci_sun4v_msi_getmsiq(pbm->devhandle, msi_num, &msiqid);
+       if (err) {
+               printk(KERN_ERR "%s: getmsiq gives error %lu\n",
+                      pbm->name, err);
+               return;
+       }
+
+       pci_sun4v_msi_setvalid(pbm->devhandle, msi_num, HV_MSIVALID_INVALID);
+       pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_INVALID);
+
+       free_msi(pbm, msi_num);
+
+       /* The sun4v_destroy_msi() will liberate the devino and thus the MSIQ
+        * allocation.
+        */
+       sun4v_destroy_msi(virt_irq);
+}
+#else /* CONFIG_PCI_MSI */
+static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
+{
+}
+#endif /* !(CONFIG_PCI_MSI) */
+
 static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 devhandle)
 {
        struct pci_pbm_info *pbm;
@@ -1119,6 +1558,7 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node
 
        pci_sun4v_get_bus_range(pbm);
        pci_sun4v_iommu_init(pbm);
+       pci_sun4v_msi_init(pbm);
 
        pdev_htab_populate(pbm);
 }
@@ -1187,6 +1627,10 @@ void sun4v_pci_init(struct device_node *dp, char *model_name)
        p->scan_bus = pci_sun4v_scan_bus;
        p->base_address_update = pci_sun4v_base_address_update;
        p->resource_adjust = pci_sun4v_resource_adjust;
+#ifdef CONFIG_PCI_MSI
+       p->setup_msi_irq = pci_sun4v_setup_msi_irq;
+       p->teardown_msi_irq = pci_sun4v_teardown_msi_irq;
+#endif
        p->pci_ops = &pci_sun4v_ops;
 
        /* Like PSYCHO and SCHIZO we have a 2GB aligned area
index 884d25f6158dad36a58c6c4c30365c910530d7a1..8e9fc3a5b4f52d68120d360fa0d18ca6f0e9b2a7 100644 (file)
@@ -28,4 +28,65 @@ extern int pci_sun4v_config_put(unsigned long devhandle,
                                unsigned long size,
                                unsigned long data);
 
+extern unsigned long pci_sun4v_msiq_conf(unsigned long devhandle,
+                                        unsigned long msiqid,
+                                        unsigned long msiq_paddr,
+                                        unsigned long num_entries);
+extern unsigned long pci_sun4v_msiq_info(unsigned long devhandle,
+                                        unsigned long msiqid,
+                                        unsigned long *msiq_paddr,
+                                        unsigned long *num_entries);
+extern unsigned long pci_sun4v_msiq_getvalid(unsigned long devhandle,
+                                            unsigned long msiqid,
+                                            unsigned long *valid);
+extern unsigned long pci_sun4v_msiq_setvalid(unsigned long devhandle,
+                                            unsigned long msiqid,
+                                            unsigned long valid);
+extern unsigned long pci_sun4v_msiq_getstate(unsigned long devhandle,
+                                            unsigned long msiqid,
+                                            unsigned long *state);
+extern unsigned long pci_sun4v_msiq_setstate(unsigned long devhandle,
+                                            unsigned long msiqid,
+                                            unsigned long state);
+extern unsigned long pci_sun4v_msiq_gethead(unsigned long devhandle,
+                                            unsigned long msiqid,
+                                            unsigned long *head);
+extern unsigned long pci_sun4v_msiq_sethead(unsigned long devhandle,
+                                            unsigned long msiqid,
+                                            unsigned long head);
+extern unsigned long pci_sun4v_msiq_gettail(unsigned long devhandle,
+                                            unsigned long msiqid,
+                                            unsigned long *head);
+extern unsigned long pci_sun4v_msi_getvalid(unsigned long devhandle,
+                                           unsigned long msinum,
+                                           unsigned long *valid);
+extern unsigned long pci_sun4v_msi_setvalid(unsigned long devhandle,
+                                           unsigned long msinum,
+                                           unsigned long valid);
+extern unsigned long pci_sun4v_msi_getmsiq(unsigned long devhandle,
+                                          unsigned long msinum,
+                                          unsigned long *msiq);
+extern unsigned long pci_sun4v_msi_setmsiq(unsigned long devhandle,
+                                          unsigned long msinum,
+                                          unsigned long msiq,
+                                          unsigned long msitype);
+extern unsigned long pci_sun4v_msi_getstate(unsigned long devhandle,
+                                           unsigned long msinum,
+                                           unsigned long *state);
+extern unsigned long pci_sun4v_msi_setstate(unsigned long devhandle,
+                                           unsigned long msinum,
+                                           unsigned long state);
+extern unsigned long pci_sun4v_msg_getmsiq(unsigned long devhandle,
+                                          unsigned long msinum,
+                                          unsigned long *msiq);
+extern unsigned long pci_sun4v_msg_setmsiq(unsigned long devhandle,
+                                          unsigned long msinum,
+                                          unsigned long msiq);
+extern unsigned long pci_sun4v_msg_getvalid(unsigned long devhandle,
+                                           unsigned long msinum,
+                                           unsigned long *valid);
+extern unsigned long pci_sun4v_msg_setvalid(unsigned long devhandle,
+                                           unsigned long msinum,
+                                           unsigned long valid);
+
 #endif /* !(_PCI_SUN4V_H) */
index 6604fdbf746cc44b2c410013563a87e27ae84ee3..ecb81f389b0689ff3518448813a1532e96e50af5 100644 (file)
@@ -93,3 +93,269 @@ pci_sun4v_config_put:
         mov    -1, %o1
 1:     retl
         mov    %o1, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: msiq phys address
+        * %o3: num entries
+        *
+        * returns %o0: status
+        *
+        * status will be zero if the operation completed
+        * successfully, else -1 if not
+        */
+       .globl  pci_sun4v_msiq_conf
+pci_sun4v_msiq_conf:
+       mov     HV_FAST_PCI_MSIQ_CONF, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: &msiq_phys_addr
+        * %o3: &msiq_num_entries
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_info
+pci_sun4v_msiq_info:
+       mov     %o2, %o4
+       mov     HV_FAST_PCI_MSIQ_INFO, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o4]
+       stx     %o2, [%o3]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: &valid
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_getvalid
+pci_sun4v_msiq_getvalid:
+       mov     HV_FAST_PCI_MSIQ_GETVALID, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: valid
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_setvalid
+pci_sun4v_msiq_setvalid:
+       mov     HV_FAST_PCI_MSIQ_SETVALID, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: &state
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_getstate
+pci_sun4v_msiq_getstate:
+       mov     HV_FAST_PCI_MSIQ_GETSTATE, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: state
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_setstate
+pci_sun4v_msiq_setstate:
+       mov     HV_FAST_PCI_MSIQ_SETSTATE, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: &head
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_gethead
+pci_sun4v_msiq_gethead:
+       mov     HV_FAST_PCI_MSIQ_GETHEAD, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: head
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_sethead
+pci_sun4v_msiq_sethead:
+       mov     HV_FAST_PCI_MSIQ_SETHEAD, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msiqid
+        * %o2: &tail
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msiq_gettail
+pci_sun4v_msiq_gettail:
+       mov     HV_FAST_PCI_MSIQ_GETTAIL, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: &valid
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msi_getvalid
+pci_sun4v_msi_getvalid:
+       mov     HV_FAST_PCI_MSI_GETVALID, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: valid
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msi_setvalid
+pci_sun4v_msi_setvalid:
+       mov     HV_FAST_PCI_MSI_SETVALID, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: &msiq
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msi_getmsiq
+pci_sun4v_msi_getmsiq:
+       mov     HV_FAST_PCI_MSI_GETMSIQ, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: msitype
+        * %o3: msiq
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msi_setmsiq
+pci_sun4v_msi_setmsiq:
+       mov     HV_FAST_PCI_MSI_SETMSIQ, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: &state
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msi_getstate
+pci_sun4v_msi_getstate:
+       mov     HV_FAST_PCI_MSI_GETSTATE, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: state
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msi_setstate
+pci_sun4v_msi_setstate:
+       mov     HV_FAST_PCI_MSI_SETSTATE, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: &msiq
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msg_getmsiq
+pci_sun4v_msg_getmsiq:
+       mov     HV_FAST_PCI_MSG_GETMSIQ, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: msiq
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msg_setmsiq
+pci_sun4v_msg_setmsiq:
+       mov     HV_FAST_PCI_MSG_SETMSIQ, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: &valid
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msg_getvalid
+pci_sun4v_msg_getvalid:
+       mov     HV_FAST_PCI_MSG_GETVALID, %o5
+       ta      HV_FAST_TRAP
+       stx     %o1, [%o2]
+       retl
+        mov    %o0, %o0
+
+       /* %o0: devhandle
+        * %o1: msinum
+        * %o2: valid
+        *
+        * returns %o0: status
+        */
+       .globl  pci_sun4v_msg_setvalid
+pci_sun4v_msg_setvalid:
+       mov     HV_FAST_PCI_MSG_SETVALID, %o5
+       ta      HV_FAST_TRAP
+       retl
+        mov    %o0, %o0
+
index 3f619ead22cc89a70ed5905e782a041153626463..a05e43d517554b5a81befdef2f074e05283270f4 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/termios.h>
+#include <linux/tty.h>
 #include <linux/ioctl.h>
 #include <linux/route.h>
 #include <linux/sockios.h>
index e27cb71bd8e2c09a20bfe7d50b379c80b39abe0a..7876a02262852399ee3c27efa1d135d366feb528 100644 (file)
@@ -459,70 +459,6 @@ asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2)
        return sys_sysfs(option, arg1, arg2);
 }
 
-struct sysinfo32 {
-        s32 uptime;
-        u32 loads[3];
-        u32 totalram;
-        u32 freeram;
-        u32 sharedram;
-        u32 bufferram;
-        u32 totalswap;
-        u32 freeswap;
-        unsigned short procs;
-       unsigned short pad;
-       u32 totalhigh;
-       u32 freehigh;
-       u32 mem_unit;
-       char _f[20-2*sizeof(int)-sizeof(int)];
-};
-
-asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
-{
-       struct sysinfo s;
-       int ret, err;
-       int bitcount = 0;
-       mm_segment_t old_fs = get_fs ();
-       
-       set_fs(KERNEL_DS);
-       ret = sys_sysinfo((struct sysinfo __user *) &s);
-       set_fs(old_fs);
-       /* Check to see if any memory value is too large for 32-bit and
-         * scale down if needed.
-         */
-       if ((s.totalram >> 32) || (s.totalswap >> 32)) {
-               while (s.mem_unit < PAGE_SIZE) {
-                       s.mem_unit <<= 1;
-                       bitcount++;
-               }
-               s.totalram >>= bitcount;
-               s.freeram >>= bitcount;
-               s.sharedram >>= bitcount;
-               s.bufferram >>= bitcount;
-               s.totalswap >>= bitcount;
-               s.freeswap >>= bitcount;
-               s.totalhigh >>= bitcount;
-               s.freehigh >>= bitcount;
-       }
-
-       err = put_user (s.uptime, &info->uptime);
-       err |= __put_user (s.loads[0], &info->loads[0]);
-       err |= __put_user (s.loads[1], &info->loads[1]);
-       err |= __put_user (s.loads[2], &info->loads[2]);
-       err |= __put_user (s.totalram, &info->totalram);
-       err |= __put_user (s.freeram, &info->freeram);
-       err |= __put_user (s.sharedram, &info->sharedram);
-       err |= __put_user (s.bufferram, &info->bufferram);
-       err |= __put_user (s.totalswap, &info->totalswap);
-       err |= __put_user (s.freeswap, &info->freeswap);
-       err |= __put_user (s.procs, &info->procs);
-       err |= __put_user (s.totalhigh, &info->totalhigh);
-       err |= __put_user (s.freehigh, &info->freehigh);
-       err |= __put_user (s.mem_unit, &info->mem_unit);
-       if (err)
-               return -EFAULT;
-       return ret;
-}
-
 asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval)
 {
        struct timespec t;
index 9a8026797ac04c368db63eab8a43dcf445d2b0a8..948b7d2d5874f37030c85b69026a1046f2ba10c4 100644 (file)
@@ -61,7 +61,7 @@ sys_call_table32:
        .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask
 /*200*/        .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
        .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64
-/*210*/        .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, sys32_sysinfo
+/*210*/        .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, compat_sys_sysinfo
        .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex
 /*220*/        .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid
        .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16
index 4a6063f33e7a4155e084cd50ba58a2617f3fa3c3..13fa2a2e4513b75cdae8052b544d5a96bf134c29 100644 (file)
@@ -81,10 +81,14 @@ SECTIONS
   __sun4v_2insn_patch = .;
   .sun4v_2insn_patch : { *(.sun4v_2insn_patch) }
   __sun4v_2insn_patch_end = .;
+
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(8192); 
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
+
   . = ALIGN(8192);
   __per_cpu_start = .;
   .data.percpu  : { *(.data.percpu) }
index 054822a3e05ec6d64f9fead97c692a86f87fdc46..09d434f41e4b37059cf7e6fa1d724f1695e25469 100644 (file)
@@ -416,7 +416,7 @@ void show_mem(void)
        printk("Free swap:       %6ldkB\n",
               nr_swap_pages << (PAGE_SHIFT-10));
        printk("%ld pages of RAM\n", num_physpages);
-       printk("%d free pages\n", nr_free_pages());
+       printk("%lu free pages\n", nr_free_pages());
 }
 
 void mmu_info(struct seq_file *m)
@@ -1593,7 +1593,7 @@ void __init mem_init(void)
        initpages = (((unsigned long) __init_end) - ((unsigned long) __init_begin));
        initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT;
 
-       printk("Memory: %uk available (%ldk kernel code, %ldk data, %ldk init) [%016lx,%016lx]\n",
+       printk("Memory: %luk available (%ldk kernel code, %ldk data, %ldk init) [%016lx,%016lx]\n",
               nr_free_pages() << (PAGE_SHIFT-10),
               codepages << (PAGE_SHIFT-10),
               datapages << (PAGE_SHIFT-10), 
index d32a80e6668c08c008714d8c0ef1f26ce6a4645b..b3a21ba77cd2a40f9784d3e5d86fe53dfb1fed67 100644 (file)
@@ -16,6 +16,9 @@ config MMU
        bool
        default y
 
+config NO_IOMEM
+       def_bool y
+
 mainmenu "Linux/Usermode Kernel Configuration"
 
 config ISA
index 7d4190e5565498c6eea6dce02fc3cc092a65b384..7b8baf146accc411487cb3c098db8825f0b56759 100644 (file)
 #include "line.h"
 #include "os.h"
 
-/* XXX: could well be moved to somewhere else, if needed. */
-static int my_printf(const char * fmt, ...)
-       __attribute__ ((format (printf, 1, 2)));
-
-static int my_printf(const char * fmt, ...)
-{
-       /* Yes, can be called on atomic context.*/
-       char *buf = kmalloc(4096, GFP_ATOMIC);
-       va_list args;
-       int r;
-
-       if (!buf) {
-               /* We print directly fmt.
-                * Yes, yes, yes, feel free to complain. */
-               r = strlen(fmt);
-       } else {
-               va_start(args, fmt);
-               r = vsprintf(buf, fmt, args);
-               va_end(args);
-               fmt = buf;
-       }
-
-       if (r)
-               r = os_write_file(1, fmt, r);
-       return r;
-
-}
-
 #ifdef CONFIG_NOCONFIG_CHAN
-/* Despite its name, there's no added trailing newline. */
-static int my_puts(const char * buf)
-{
-       return os_write_file(1, buf, strlen(buf));
-}
-
-static void *not_configged_init(char *str, int device, struct chan_opts *opts)
+static void *not_configged_init(char *str, int device,
+                               const struct chan_opts *opts)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
        return NULL;
 }
@@ -64,34 +31,34 @@ static void *not_configged_init(char *str, int device, struct chan_opts *opts)
 static int not_configged_open(int input, int output, int primary, void *data,
                              char **dev_out)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
        return -ENODEV;
 }
 
 static void not_configged_close(int fd, void *data)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
 }
 
 static int not_configged_read(int fd, char *c_out, void *data)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
        return -EIO;
 }
 
 static int not_configged_write(int fd, const char *buf, int len, void *data)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
        return -EIO;
 }
 
 static int not_configged_console_write(int fd, const char *buf, int len)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
        return -EIO;
 }
@@ -99,14 +66,14 @@ static int not_configged_console_write(int fd, const char *buf, int len)
 static int not_configged_window_size(int fd, void *data, unsigned short *rows,
                                     unsigned short *cols)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
        return -ENODEV;
 }
 
 static void not_configged_free(void *data)
 {
-       my_puts("Using a channel type which is configured out of "
+       printk("Using a channel type which is configured out of "
               "UML\n");
 }
 
@@ -255,15 +222,28 @@ void enable_chan(struct line *line)
        }
 }
 
+/* Items are added in IRQ context, when free_irq can't be called, and
+ * removed in process context, when it can.
+ * This handles interrupt sources which disappear, and which need to
+ * be permanently disabled.  This is discovered in IRQ context, but
+ * the freeing of the IRQ must be done later.
+ */
+static DEFINE_SPINLOCK(irqs_to_free_lock);
 static LIST_HEAD(irqs_to_free);
 
 void free_irqs(void)
 {
        struct chan *chan;
+       LIST_HEAD(list);
+       struct list_head *ele;
 
-       while(!list_empty(&irqs_to_free)){
-               chan = list_entry(irqs_to_free.next, struct chan, free_list);
-               list_del(&chan->free_list);
+       spin_lock_irq(&irqs_to_free_lock);
+       list_splice_init(&irqs_to_free, &list);
+       INIT_LIST_HEAD(&irqs_to_free);
+       spin_unlock_irq(&irqs_to_free_lock);
+
+       list_for_each(ele, &list){
+               chan = list_entry(ele, struct chan, free_list);
 
                if(chan->input)
                        free_irq(chan->line->driver->read_irq, chan);
@@ -279,7 +259,9 @@ static void close_one_chan(struct chan *chan, int delay_free_irq)
                return;
 
        if(delay_free_irq){
+               spin_lock_irq(&irqs_to_free_lock);
                list_add(&chan->free_list, &irqs_to_free);
+               spin_unlock_irq(&irqs_to_free_lock);
        }
        else {
                if(chan->input)
@@ -372,8 +354,7 @@ int console_write_chan(struct list_head *chans, const char *buf, int len)
        return ret;
 }
 
-int console_open_chan(struct line *line, struct console *co,
-                     const struct chan_opts *opts)
+int console_open_chan(struct line *line, struct console *co)
 {
        int err;
 
@@ -381,7 +362,7 @@ int console_open_chan(struct line *line, struct console *co,
        if(err)
                return err;
 
-       printk("Console initialized on /dev/%s%d\n",co->name,co->index);
+       printk("Console initialized on /dev/%s%d\n", co->name, co->index);
        return 0;
 }
 
@@ -534,7 +515,7 @@ static const struct chan_type chan_table[] = {
 };
 
 static struct chan *parse_chan(struct line *line, char *str, int device,
-                              const struct chan_opts *opts)
+                              const struct chan_opts *opts, char **error_out)
 {
        const struct chan_type *entry;
        const struct chan_ops *ops;
@@ -553,19 +534,21 @@ static struct chan *parse_chan(struct line *line, char *str, int device,
                }
        }
        if(ops == NULL){
-               my_printf("parse_chan couldn't parse \"%s\"\n",
-                      str);
+               *error_out = "No match for configured backends";
                return NULL;
        }
-       if(ops->init == NULL)
-               return NULL;
+
        data = (*ops->init)(str, device, opts);
-       if(data == NULL)
+       if(data == NULL){
+               *error_out = "Configuration failed";
                return NULL;
+       }
 
        chan = kmalloc(sizeof(*chan), GFP_ATOMIC);
-       if(chan == NULL)
+       if(chan == NULL){
+               *error_out = "Memory allocation failed";
                return NULL;
+       }
        *chan = ((struct chan) { .list          = LIST_HEAD_INIT(chan->list),
                                 .free_list     =
                                        LIST_HEAD_INIT(chan->free_list),
@@ -582,7 +565,7 @@ static struct chan *parse_chan(struct line *line, char *str, int device,
 }
 
 int parse_chan_pair(char *str, struct line *line, int device,
-                   const struct chan_opts *opts)
+                   const struct chan_opts *opts, char **error_out)
 {
        struct list_head *chans = &line->chan_list;
        struct chan *new, *chan;
@@ -599,14 +582,14 @@ int parse_chan_pair(char *str, struct line *line, int device,
                in = str;
                *out = '\0';
                out++;
-               new = parse_chan(line, in, device, opts);
+               new = parse_chan(line, in, device, opts, error_out);
                if(new == NULL)
                        return -1;
 
                new->input = 1;
                list_add(&new->list, chans);
 
-               new = parse_chan(line, out, device, opts);
+               new = parse_chan(line, out, device, opts, error_out);
                if(new == NULL)
                        return -1;
 
@@ -614,7 +597,7 @@ int parse_chan_pair(char *str, struct line *line, int device,
                new->output = 1;
        }
        else {
-               new = parse_chan(line, str, device, opts);
+               new = parse_chan(line, str, device, opts, error_out);
                if(new == NULL)
                        return -1;
 
index 64ff22aa077bdb3686fe33e655914630af45dd44..73c5caa7a150ea1a6757aaa2bfea26b00bc6a771 100644 (file)
@@ -9,10 +9,10 @@
  *     modify it under the terms of the GNU General Public License
  *     as published by the Free Software Foundation; either version
  *     2 of the License, or (at your option) any later version.
- *     
- *     Neither Alan Cox nor CymruNet Ltd. admit liability nor provide 
- *     warranty for any of this software. This material is provided 
- *     "AS-IS" and at no charge.       
+ *
+ *     Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
+ *     warranty for any of this software. This material is provided
+ *     "AS-IS" and at no charge.
  *
  *     (c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *     Made SMP safe for 2.3.x
  *
  *  20011127 Joel Becker (jlbec@evilplan.org>
- *     Added soft_noboot; Allows testing the softdog trigger without 
+ *     Added soft_noboot; Allows testing the softdog trigger without
  *     requiring a recompile.
  *     Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT.
  */
+
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/reboot.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include "mconsole.h"
 
 MODULE_LICENSE("GPL");
 
-/* Locked by the BKL in harddog_open and harddog_release */
+static DEFINE_SPINLOCK(lock);
 static int timer_alive;
 static int harddog_in_fd = -1;
 static int harddog_out_fd = -1;
@@ -57,18 +58,18 @@ static int harddog_out_fd = -1;
 /*
  *     Allow only one person to hold it open
  */
+
 extern int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock);
 
 static int harddog_open(struct inode *inode, struct file *file)
 {
-       int err;
+       int err = -EBUSY;
        char *sock = NULL;
 
-       lock_kernel();
+       spin_lock(&lock);
        if(timer_alive)
-               return -EBUSY;
-#ifdef CONFIG_HARDDOG_NOWAYOUT  
+               goto err;
+#ifdef CONFIG_HARDDOG_NOWAYOUT
        __module_get(THIS_MODULE);
 #endif
 
@@ -76,11 +77,15 @@ static int harddog_open(struct inode *inode, struct file *file)
        sock = mconsole_notify_socket();
 #endif
        err = start_watchdog(&harddog_in_fd, &harddog_out_fd, sock);
-       if(err) return(err);
+       if(err)
+               goto err;
 
        timer_alive = 1;
-       unlock_kernel();
+       spin_unlock(&lock);
        return nonseekable_open(inode, file);
+err:
+       spin_unlock(&lock);
+       return err;
 }
 
 extern void stop_watchdog(int in_fd, int out_fd);
@@ -90,14 +95,16 @@ static int harddog_release(struct inode *inode, struct file *file)
        /*
         *      Shut off the timer.
         */
-       lock_kernel();
+
+       spin_lock(&lock);
 
        stop_watchdog(harddog_in_fd, harddog_out_fd);
        harddog_in_fd = -1;
        harddog_out_fd = -1;
 
        timer_alive=0;
-       unlock_kernel();
+       spin_unlock(&lock);
+
        return 0;
 }
 
@@ -110,7 +117,7 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t
         *      Refresh the timer.
         */
        if(len)
-               return(ping_watchdog(harddog_out_fd));
+               return ping_watchdog(harddog_out_fd);
        return 0;
 }
 
@@ -134,7 +141,7 @@ static int harddog_ioctl(struct inode *inode, struct file *file,
                case WDIOC_GETBOOTSTATUS:
                        return put_user(0,(int __user *)argp);
                case WDIOC_KEEPALIVE:
-                       return(ping_watchdog(harddog_out_fd));
+                       return ping_watchdog(harddog_out_fd);
        }
 }
 
@@ -165,7 +172,7 @@ static int __init harddog_init(void)
 
        printk(banner);
 
-       return(0);
+       return 0;
 }
 
 static void __exit harddog_exit(void)
@@ -175,14 +182,3 @@ static void __exit harddog_exit(void)
 
 module_init(harddog_init);
 module_exit(harddog_exit);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index def013b5a3c7a5ec373dae711829b4ae10f76349..c495ecf263b14862b9b9227679416abbf0f0d032 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -38,7 +38,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
        int in_fds[2], out_fds[2], pid, n, err;
        char pid_buf[sizeof("nnnnn\0")], c;
        char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL };
-       char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL, 
+       char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL,
                                  NULL };
        char **args = NULL;
 
@@ -96,7 +96,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
        }
        *in_fd_ret = in_fds[0];
        *out_fd_ret = out_fds[1];
-       return(0);
+       return 0;
 
  out_close_in:
        os_close_file(in_fds[0]);
@@ -105,7 +105,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
        os_close_file(out_fds[0]);
        os_close_file(out_fds[1]);
  out:
-       return(err);
+       return err;
 }
 
 void stop_watchdog(int in_fd, int out_fd)
@@ -123,20 +123,9 @@ int ping_watchdog(int fd)
        if(n != sizeof(c)){
                printk("ping_watchdog - write failed, err = %d\n", -n);
                if(n < 0)
-                       return(n);
-               return(-EIO);
+                       return n;
+               return -EIO;
        }
        return 1;
 
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index a0d148ea63d6bfa7b8bf8a1ffaceeff6b72ad477..10e08a8c17c3149cc346529a1c61bb6f6b241cff 100644 (file)
 #include "os.h"
 
 struct hostaudio_state {
-  int fd;
+       int fd;
 };
 
 struct hostmixer_state {
-  int fd;
+       int fd;
 };
 
 #define HOSTAUDIO_DEV_DSP "/dev/sound/dsp"
 #define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer"
 
-/* Only changed from linux_main at boot time */
-char *dsp = HOSTAUDIO_DEV_DSP;
-char *mixer = HOSTAUDIO_DEV_MIXER;
+/* Changed either at boot time or module load time.  At boot, this is
+ * single-threaded; at module load, multiple modules would each have
+ * their own copy of these variables.
+ */
+static char *dsp = HOSTAUDIO_DEV_DSP;
+static char *mixer = HOSTAUDIO_DEV_MIXER;
 
 #define DSP_HELP \
 "    This is used to specify the host dsp device to the hostaudio driver.\n" \
@@ -69,12 +72,12 @@ MODULE_PARM_DESC(mixer, MIXER_HELP);
 static ssize_t hostaudio_read(struct file *file, char __user *buffer,
                              size_t count, loff_t *ppos)
 {
-        struct hostaudio_state *state = file->private_data;
+       struct hostaudio_state *state = file->private_data;
        void *kbuf;
        int err;
 
 #ifdef DEBUG
-        printk("hostaudio: read called, count = %d\n", count);
+       printk("hostaudio: read called, count = %d\n", count);
 #endif
 
        kbuf = kmalloc(count, GFP_KERNEL);
@@ -88,7 +91,7 @@ static ssize_t hostaudio_read(struct file *file, char __user *buffer,
        if(copy_to_user(buffer, kbuf, err))
                err = -EFAULT;
 
- out:
+out:
        kfree(kbuf);
        return(err);
 }
@@ -96,12 +99,12 @@ static ssize_t hostaudio_read(struct file *file, char __user *buffer,
 static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
                               size_t count, loff_t *ppos)
 {
-        struct hostaudio_state *state = file->private_data;
+       struct hostaudio_state *state = file->private_data;
        void *kbuf;
        int err;
 
 #ifdef DEBUG
-        printk("hostaudio: write called, count = %d\n", count);
+       printk("hostaudio: write called, count = %d\n", count);
 #endif
 
        kbuf = kmalloc(count, GFP_KERNEL);
@@ -125,24 +128,24 @@ static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
 static unsigned int hostaudio_poll(struct file *file, 
                                   struct poll_table_struct *wait)
 {
-        unsigned int mask = 0;
+       unsigned int mask = 0;
 
 #ifdef DEBUG
-        printk("hostaudio: poll called (unimplemented)\n");
+       printk("hostaudio: poll called (unimplemented)\n");
 #endif
 
-        return(mask);
+       return(mask);
 }
 
 static int hostaudio_ioctl(struct inode *inode, struct file *file, 
                           unsigned int cmd, unsigned long arg)
 {
-        struct hostaudio_state *state = file->private_data;
+       struct hostaudio_state *state = file->private_data;
        unsigned long data = 0;
        int err;
 
 #ifdef DEBUG
-        printk("hostaudio: ioctl called, cmd = %u\n", cmd);
+       printk("hostaudio: ioctl called, cmd = %u\n", cmd);
 #endif
        switch(cmd){
        case SNDCTL_DSP_SPEED:
@@ -179,42 +182,40 @@ static int hostaudio_ioctl(struct inode *inode, struct file *file,
 
 static int hostaudio_open(struct inode *inode, struct file *file)
 {
-        struct hostaudio_state *state;
-        int r = 0, w = 0;
-        int ret;
+       struct hostaudio_state *state;
+       int r = 0, w = 0;
+       int ret;
 
 #ifdef DEBUG
-        printk("hostaudio: open called (host: %s)\n", dsp);
+       printk("hostaudio: open called (host: %s)\n", dsp);
 #endif
 
-        state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
-        if(state == NULL)
+       state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
+       if(state == NULL)
                return(-ENOMEM);
 
-        if(file->f_mode & FMODE_READ) r = 1;
-        if(file->f_mode & FMODE_WRITE) w = 1;
+       if(file->f_mode & FMODE_READ) r = 1;
+       if(file->f_mode & FMODE_WRITE) w = 1;
 
        ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0);
-        if(ret < 0){
+       if(ret < 0){
                kfree(state);
                return(ret);
-        }
-
+       }
        state->fd = ret;
-        file->private_data = state;
-        return(0);
+       file->private_data = state;
+       return(0);
 }
 
 static int hostaudio_release(struct inode *inode, struct file *file)
 {
-        struct hostaudio_state *state = file->private_data;
+       struct hostaudio_state *state = file->private_data;
 
 #ifdef DEBUG
-        printk("hostaudio: release called\n");
+       printk("hostaudio: release called\n");
 #endif
-
-               os_close_file(state->fd);
-        kfree(state);
+       os_close_file(state->fd);
+       kfree(state);
 
        return(0);
 }
@@ -224,10 +225,10 @@ static int hostaudio_release(struct inode *inode, struct file *file)
 static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file, 
                                  unsigned int cmd, unsigned long arg)
 {
-        struct hostmixer_state *state = file->private_data;
+       struct hostmixer_state *state = file->private_data;
 
 #ifdef DEBUG
-        printk("hostmixer: ioctl called\n");
+       printk("hostmixer: ioctl called\n");
 #endif
 
        return(os_ioctl_generic(state->fd, cmd, arg));
@@ -235,68 +236,67 @@ static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file,
 
 static int hostmixer_open_mixdev(struct inode *inode, struct file *file)
 {
-        struct hostmixer_state *state;
-        int r = 0, w = 0;
-        int ret;
+       struct hostmixer_state *state;
+       int r = 0, w = 0;
+       int ret;
 
 #ifdef DEBUG
-        printk("hostmixer: open called (host: %s)\n", mixer);
+       printk("hostmixer: open called (host: %s)\n", mixer);
 #endif
 
-        state = kmalloc(sizeof(struct hostmixer_state), GFP_KERNEL);
-        if(state == NULL) return(-ENOMEM);
+       state = kmalloc(sizeof(struct hostmixer_state), GFP_KERNEL);
+       if(state == NULL) return(-ENOMEM);
 
-        if(file->f_mode & FMODE_READ) r = 1;
-        if(file->f_mode & FMODE_WRITE) w = 1;
+       if(file->f_mode & FMODE_READ) r = 1;
+       if(file->f_mode & FMODE_WRITE) w = 1;
 
        ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0);
         
-        if(ret < 0){
+       if(ret < 0){
                printk("hostaudio_open_mixdev failed to open '%s', err = %d\n",
                       dsp, -ret);
                kfree(state);
                return(ret);
-        }
+       }
 
-        file->private_data = state;
-        return(0);
+       file->private_data = state;
+       return(0);
 }
 
 static int hostmixer_release(struct inode *inode, struct file *file)
 {
-        struct hostmixer_state *state = file->private_data;
+       struct hostmixer_state *state = file->private_data;
 
 #ifdef DEBUG
-        printk("hostmixer: release called\n");
+       printk("hostmixer: release called\n");
 #endif
 
-               os_close_file(state->fd);
-        kfree(state);
+       os_close_file(state->fd);
+       kfree(state);
 
        return(0);
 }
 
-
 /* kernel module operations */
 
 static const struct file_operations hostaudio_fops = {
-        .owner          = THIS_MODULE,
-        .llseek         = no_llseek,
-        .read           = hostaudio_read,
-        .write          = hostaudio_write,
-        .poll           = hostaudio_poll,
-        .ioctl          = hostaudio_ioctl,
-        .mmap           = NULL,
-        .open           = hostaudio_open,
-        .release        = hostaudio_release,
+       .owner          = THIS_MODULE,
+       .llseek         = no_llseek,
+       .read           = hostaudio_read,
+       .write          = hostaudio_write,
+       .poll           = hostaudio_poll,
+       .ioctl          = hostaudio_ioctl,
+       .mmap           = NULL,
+       .open           = hostaudio_open,
+       .release        = hostaudio_release,
 };
 
 static const struct file_operations hostmixer_fops = {
-        .owner          = THIS_MODULE,
-        .llseek         = no_llseek,
-        .ioctl          = hostmixer_ioctl_mixdev,
-        .open           = hostmixer_open_mixdev,
-        .release        = hostmixer_release,
+       .owner          = THIS_MODULE,
+       .llseek         = no_llseek,
+       .ioctl          = hostmixer_ioctl_mixdev,
+       .open           = hostmixer_open_mixdev,
+       .release        = hostmixer_release,
 };
 
 struct {
@@ -310,42 +310,31 @@ MODULE_LICENSE("GPL");
 
 static int __init hostaudio_init_module(void)
 {
-        printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n",
+       printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n",
               dsp, mixer);
 
        module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1);
-        if(module_data.dev_audio < 0){
-                printk(KERN_ERR "hostaudio: couldn't register DSP device!\n");
-                return -ENODEV;
-        }
+       if(module_data.dev_audio < 0){
+               printk(KERN_ERR "hostaudio: couldn't register DSP device!\n");
+               return -ENODEV;
+       }
 
        module_data.dev_mixer = register_sound_mixer(&hostmixer_fops, -1);
-        if(module_data.dev_mixer < 0){
-                printk(KERN_ERR "hostmixer: couldn't register mixer "
+       if(module_data.dev_mixer < 0){
+               printk(KERN_ERR "hostmixer: couldn't register mixer "
                       "device!\n");
-                unregister_sound_dsp(module_data.dev_audio);
-                return -ENODEV;
-        }
+               unregister_sound_dsp(module_data.dev_audio);
+               return -ENODEV;
+       }
 
-        return 0;
+       return 0;
 }
 
 static void __exit hostaudio_cleanup_module (void)
 {
-       unregister_sound_mixer(module_data.dev_mixer);
-       unregister_sound_dsp(module_data.dev_audio);
+       unregister_sound_mixer(module_data.dev_mixer);
+       unregister_sound_dsp(module_data.dev_audio);
 }
 
 module_init(hostaudio_init_module);
 module_exit(hostaudio_cleanup_module);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 83301e1ef67cbe24dbe6ee73f70b21c756ff87f8..0e1e9a20a4d67b032f59f910d6adafa5a760978d 100644 (file)
@@ -191,7 +191,6 @@ void line_flush_buffer(struct tty_struct *tty)
        /*XXX: copied from line_write, verify if it is correct!*/
        if(tty->stopped)
                return;
-               //return 0;
 
        spin_lock_irqsave(&line->lock, flags);
        err = flush_buffer(line);
@@ -421,42 +420,55 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
        return err;
 }
 
+/* Normally, a driver like this can rely mostly on the tty layer
+ * locking, particularly when it comes to the driver structure.
+ * However, in this case, mconsole requests can come in "from the
+ * side", and race with opens and closes.
+ *
+ * mconsole config requests will want to be sure the device isn't in
+ * use, and get_config, open, and close will want a stable
+ * configuration.  The checking and modification of the configuration
+ * is done under a spinlock.  Checking whether the device is in use is
+ * line->tty->count > 1, also under the spinlock.
+ *
+ * tty->count serves to decide whether the device should be enabled or
+ * disabled on the host.  If it's equal to 1, then we are doing the
+ * first open or last close.  Otherwise, open and close just return.
+ */
+
 int line_open(struct line *lines, struct tty_struct *tty)
 {
-       struct line *line;
+       struct line *line = &lines[tty->index];
        int err = -ENODEV;
 
-       line = &lines[tty->index];
-       tty->driver_data = line;
+       spin_lock(&line->count_lock);
+       if(!line->valid)
+               goto out_unlock;
 
-       /* The IRQ which takes this lock is not yet enabled and won't be run
-        * before the end, so we don't need to use spin_lock_irq.*/
-       spin_lock(&line->lock);
+       err = 0;
+       if(tty->count > 1)
+               goto out_unlock;
+
+       spin_unlock(&line->count_lock);
 
        tty->driver_data = line;
        line->tty = tty;
-       if(!line->valid)
-               goto out;
 
-       if(tty->count == 1){
-               /* Here the device is opened, if necessary, and interrupt
-                * is registered.
-                */
-               enable_chan(line);
-               INIT_DELAYED_WORK(&line->task, line_timer_cb);
+       enable_chan(line);
+       INIT_DELAYED_WORK(&line->task, line_timer_cb);
 
-               if(!line->sigio){
-                       chan_enable_winch(&line->chan_list, tty);
-                       line->sigio = 1;
-               }
-
-               chan_window_size(&line->chan_list, &tty->winsize.ws_row,
-                                &tty->winsize.ws_col);
+       if(!line->sigio){
+               chan_enable_winch(&line->chan_list, tty);
+               line->sigio = 1;
        }
 
-       err = 0;
-out:
-       spin_unlock(&line->lock);
+       chan_window_size(&line->chan_list, &tty->winsize.ws_row,
+                        &tty->winsize.ws_col);
+
+       return err;
+
+out_unlock:
+       spin_unlock(&line->count_lock);
        return err;
 }
 
@@ -466,25 +478,36 @@ void line_close(struct tty_struct *tty, struct file * filp)
 {
        struct line *line = tty->driver_data;
 
-       /* XXX: I assume this should be called in process context, not with
-         *  interrupts disabled!
-         */
-       spin_lock_irq(&line->lock);
+       /* If line_open fails (and tty->driver_data is never set),
+        * tty_open will call line_close.  So just return in this case.
+        */
+       if(line == NULL)
+               return;
 
        /* We ignore the error anyway! */
        flush_buffer(line);
 
-       if(tty->count == 1){
-               line->tty = NULL;
-               tty->driver_data = NULL;
+       spin_lock(&line->count_lock);
+       if(!line->valid)
+               goto out_unlock;
 
-               if(line->sigio){
-                       unregister_winch(tty);
-                       line->sigio = 0;
-               }
+       if(tty->count > 1)
+               goto out_unlock;
+
+       spin_unlock(&line->count_lock);
+
+       line->tty = NULL;
+       tty->driver_data = NULL;
+
+       if(line->sigio){
+               unregister_winch(tty);
+               line->sigio = 0;
         }
 
-       spin_unlock_irq(&line->lock);
+       return;
+
+out_unlock:
+       spin_unlock(&line->count_lock);
 }
 
 void close_lines(struct line *lines, int nlines)
@@ -495,14 +518,44 @@ void close_lines(struct line *lines, int nlines)
                close_chan(&lines[i].chan_list, 0);
 }
 
+static int setup_one_line(struct line *lines, int n, char *init, int init_prio,
+                         char **error_out)
+{
+       struct line *line = &lines[n];
+       int err = -EINVAL;
+
+       spin_lock(&line->count_lock);
+
+       if(line->tty != NULL){
+               *error_out = "Device is already open";
+               goto out;
+       }
+
+       if (line->init_pri <= init_prio){
+               line->init_pri = init_prio;
+               if (!strcmp(init, "none"))
+                       line->valid = 0;
+               else {
+                       line->init_str = init;
+                       line->valid = 1;
+               }
+       }
+       err = 0;
+out:
+       spin_unlock(&line->count_lock);
+       return err;
+}
+
 /* Common setup code for both startup command line and mconsole initialization.
  * @lines contains the array (of size @num) to modify;
  * @init is the setup string;
+ * @error_out is an error string in the case of failure;
  */
 
-int line_setup(struct line *lines, unsigned int num, char *init)
+int line_setup(struct line *lines, unsigned int num, char *init,
+              char **error_out)
 {
-       int i, n;
+       int i, n, err;
        char *end;
 
        if(*init == '=') {
@@ -513,73 +566,56 @@ int line_setup(struct line *lines, unsigned int num, char *init)
        else {
                n = simple_strtoul(init, &end, 0);
                if(*end != '='){
-                       printk(KERN_ERR "line_setup failed to parse \"%s\"\n",
-                              init);
-                       return 0;
+                       *error_out = "Couldn't parse device number";
+                       return -EINVAL;
                }
                init = end;
        }
        init++;
 
        if (n >= (signed int) num) {
-               printk("line_setup - %d out of range ((0 ... %d) allowed)\n",
-                      n, num - 1);
-               return 0;
+               *error_out = "Device number out of range";
+               return -EINVAL;
        }
        else if (n >= 0){
-               if (lines[n].tty != NULL) {
-                       printk("line_setup - device %d is open\n", n);
-                       return 0;
-               }
-               if (lines[n].init_pri <= INIT_ONE){
-                       lines[n].init_pri = INIT_ONE;
-                       if (!strcmp(init, "none"))
-                               lines[n].valid = 0;
-                       else {
-                               lines[n].init_str = init;
-                               lines[n].valid = 1;
-                       }
-               }
+               err = setup_one_line(lines, n, init, INIT_ONE, error_out);
+               if(err)
+                       return err;
        }
        else {
                for(i = 0; i < num; i++){
-                       if(lines[i].init_pri <= INIT_ALL){
-                               lines[i].init_pri = INIT_ALL;
-                               if(!strcmp(init, "none")) lines[i].valid = 0;
-                               else {
-                                       lines[i].init_str = init;
-                                       lines[i].valid = 1;
-                               }
-                       }
+                       err = setup_one_line(lines, i, init, INIT_ALL,
+                                            error_out);
+                       if(err)
+                               return err;
                }
        }
        return n == -1 ? num : n;
 }
 
 int line_config(struct line *lines, unsigned int num, char *str,
-               const struct chan_opts *opts)
+               const struct chan_opts *opts, char **error_out)
 {
        struct line *line;
        char *new;
        int n;
 
        if(*str == '='){
-               printk("line_config - can't configure all devices from "
-                      "mconsole\n");
-               return 1;
+               *error_out = "Can't configure all devices from mconsole";
+               return -EINVAL;
        }
 
        new = kstrdup(str, GFP_KERNEL);
        if(new == NULL){
-               printk("line_config - kstrdup failed\n");
-               return 1;
+               *error_out = "Failed to allocate memory";
+               return -ENOMEM;
        }
-       n = line_setup(lines, num, new);
+       n = line_setup(lines, num, new, error_out);
        if(n < 0)
-               return 1;
+               return n;
 
        line = &lines[n];
-       return parse_chan_pair(line->init_str, line, n, opts);
+       return parse_chan_pair(line->init_str, line, n, opts, error_out);
 }
 
 int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
@@ -602,13 +638,13 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str,
 
        line = &lines[dev];
 
-       spin_lock(&line->lock);
+       spin_lock(&line->count_lock);
        if(!line->valid)
                CONFIG_CHUNK(str, size, n, "none", 1);
        else if(line->tty == NULL)
                CONFIG_CHUNK(str, size, n, line->init_str, 1);
        else n = chan_config_string(&line->chan_list, str, size, error_out);
-       spin_unlock(&line->lock);
+       spin_unlock(&line->count_lock);
 
        return n;
 }
@@ -628,22 +664,21 @@ int line_id(char **str, int *start_out, int *end_out)
         return n;
 }
 
-int line_remove(struct line *lines, unsigned int num, int n)
+int line_remove(struct line *lines, unsigned int num, int n, char **error_out)
 {
        int err;
        char config[sizeof("conxxxx=none\0")];
 
        sprintf(config, "%d=none", n);
-       err = line_setup(lines, num, config);
+       err = line_setup(lines, num, config, error_out);
        if(err >= 0)
                err = 0;
        return err;
 }
 
-struct tty_driver *line_register_devfs(struct lines *set,
-                                      struct line_driver *line_driver,
-                                      const struct tty_operations *ops,
-                                      struct line *lines, int nlines)
+struct tty_driver *register_lines(struct line_driver *line_driver,
+                                 const struct tty_operations *ops,
+                                 struct line *lines, int nlines)
 {
        int i;
        struct tty_driver *driver = alloc_tty_driver(nlines);
@@ -683,6 +718,7 @@ static LIST_HEAD(winch_handlers);
 void lines_init(struct line *lines, int nlines, struct chan_opts *opts)
 {
        struct line *line;
+       char *error;
        int i;
 
        for(i = 0; i < nlines; i++){
@@ -696,8 +732,9 @@ void lines_init(struct line *lines, int nlines, struct chan_opts *opts)
                if(line->init_str == NULL)
                        printk("lines_init - kstrdup returned NULL\n");
 
-               if(parse_chan_pair(line->init_str, line, i, opts)){
-                       printk("parse_chan_pair failed for device %d\n", i);
+               if(parse_chan_pair(line->init_str, line, i, opts, &error)){
+                       printk("parse_chan_pair failed for device %d : %s\n",
+                              i, error);
                        line->valid = 0;
                }
        }
index 96f0189327af58260bcbfe14e304faf67cfe513c..178b2eff4a8ce836b5286aae5e32429480a2cf66 100644 (file)
@@ -33,7 +33,6 @@
 #include "irq_user.h"
 #include "init.h"
 #include "os.h"
-#include "umid.h"
 #include "irq_kern.h"
 #include "choose-mode.h"
 
@@ -337,13 +336,15 @@ void mconsole_stop(struct mc_request *req)
        mconsole_reply(req, "", 0, 0);
 }
 
-/* This list is populated by __initcall routines. */
-
+static DEFINE_SPINLOCK(mc_devices_lock);
 static LIST_HEAD(mconsole_devices);
 
 void mconsole_register_dev(struct mc_device *new)
 {
+       spin_lock(&mc_devices_lock);
+       BUG_ON(!list_empty(&new->list));
        list_add(&new->list, &mconsole_devices);
+       spin_unlock(&mc_devices_lock);
 }
 
 static struct mc_device *mconsole_find_dev(char *name)
@@ -367,18 +368,21 @@ struct unplugged_pages {
        void *pages[UNPLUGGED_PER_PAGE];
 };
 
+static DECLARE_MUTEX(plug_mem_mutex);
 static unsigned long long unplugged_pages_count = 0;
-static struct list_head unplugged_pages = LIST_HEAD_INIT(unplugged_pages);
+static LIST_HEAD(unplugged_pages);
 static int unplug_index = UNPLUGGED_PER_PAGE;
 
-static int mem_config(char *str)
+static int mem_config(char *str, char **error_out)
 {
        unsigned long long diff;
        int err = -EINVAL, i, add;
        char *ret;
 
-       if(str[0] != '=')
+       if(str[0] != '='){
+               *error_out = "Expected '=' after 'mem'";
                goto out;
+       }
 
        str++;
        if(str[0] == '-')
@@ -386,15 +390,21 @@ static int mem_config(char *str)
        else if(str[0] == '+'){
                add = 1;
        }
-       else goto out;
+       else {
+               *error_out = "Expected increment to start with '-' or '+'";
+               goto out;
+       }
 
        str++;
        diff = memparse(str, &ret);
-       if(*ret != '\0')
+       if(*ret != '\0'){
+               *error_out = "Failed to parse memory increment";
                goto out;
+       }
 
        diff /= PAGE_SIZE;
 
+       down(&plug_mem_mutex);
        for(i = 0; i < diff; i++){
                struct unplugged_pages *unplugged;
                void *addr;
@@ -435,11 +445,14 @@ static int mem_config(char *str)
                                unplugged = list_entry(entry,
                                                       struct unplugged_pages,
                                                       list);
-                               unplugged->pages[unplug_index++] = addr;
                                err = os_drop_memory(addr, PAGE_SIZE);
-                               if(err)
+                               if(err){
                                        printk("Failed to release memory - "
                                               "errno = %d\n", err);
+                                       *error_out = "Failed to release memory";
+                                       goto out_unlock;
+                               }
+                               unplugged->pages[unplug_index++] = addr;
                        }
 
                        unplugged_pages_count++;
@@ -447,6 +460,8 @@ static int mem_config(char *str)
        }
 
        err = 0;
+out_unlock:
+       up(&plug_mem_mutex);
 out:
        return err;
 }
@@ -470,12 +485,14 @@ static int mem_id(char **str, int *start_out, int *end_out)
        return 0;
 }
 
-static int mem_remove(int n)
+static int mem_remove(int n, char **error_out)
 {
+       *error_out = "Memory doesn't support the remove operation";
        return -EBUSY;
 }
 
 static struct mc_device mem_mc = {
+       .list           = LIST_HEAD_INIT(mem_mc.list),
        .name           = "mem",
        .config         = mem_config,
        .get_config     = mem_get_config,
@@ -542,7 +559,7 @@ static void mconsole_get_config(int (*get_config)(char *, char *, int,
 void mconsole_config(struct mc_request *req)
 {
        struct mc_device *dev;
-       char *ptr = req->request.data, *name;
+       char *ptr = req->request.data, *name, *error_string = "";
        int err;
 
        ptr += strlen("config");
@@ -559,8 +576,8 @@ void mconsole_config(struct mc_request *req)
                ptr++;
 
        if(*ptr == '='){
-               err = (*dev->config)(name);
-               mconsole_reply(req, "", err, 0);
+               err = (*dev->config)(name, &error_string);
+               mconsole_reply(req, error_string, err, 0);
        }
        else mconsole_get_config(dev->get_config, req, name);
 }
@@ -595,13 +612,16 @@ void mconsole_remove(struct mc_request *req)
                goto out;
        }
 
-       err = (*dev->remove)(n);
+       err_msg = NULL;
+       err = (*dev->remove)(n, &err_msg);
        switch(err){
        case -ENODEV:
-               err_msg = "Device doesn't exist";
+               if(err_msg == NULL)
+                       err_msg = "Device doesn't exist";
                break;
        case -EBUSY:
-               err_msg = "Device is currently open";
+               if(err_msg == NULL)
+                       err_msg = "Device is currently open";
                break;
        default:
                break;
@@ -615,7 +635,7 @@ struct mconsole_output {
        struct mc_request *req;
 };
 
-static DEFINE_SPINLOCK(console_lock);
+static DEFINE_SPINLOCK(client_lock);
 static LIST_HEAD(clients);
 static char console_buf[MCONSOLE_MAX_DATA];
 static int console_index = 0;
@@ -670,16 +690,18 @@ static void with_console(struct mc_request *req, void (*proc)(void *),
        unsigned long flags;
 
        entry.req = req;
+       spin_lock_irqsave(&client_lock, flags);
        list_add(&entry.list, &clients);
-       spin_lock_irqsave(&console_lock, flags);
+       spin_unlock_irqrestore(&client_lock, flags);
 
        (*proc)(arg);
 
        mconsole_reply_len(req, console_buf, console_index, 0, 0);
        console_index = 0;
 
-       spin_unlock_irqrestore(&console_lock, flags);
+       spin_lock_irqsave(&client_lock, flags);
        list_del(&entry.list);
+       spin_unlock_irqrestore(&client_lock, flags);
 }
 
 #ifdef CONFIG_MAGIC_SYSRQ
index 75aef6f7ef6e22dd9669f55f707021cd4f539d10..f02634fbf32ad0e95be61d11c7d911f11a318cd0 100644 (file)
@@ -16,7 +16,7 @@
 #include "user.h"
 #include "sysdep/ptrace.h"
 #include "mconsole.h"
-#include "umid.h"
+#include "os.h"
 #include "user_util.h"
 
 static struct mconsole_command commands[] = {
index afe3d427ddfae510b29135453dcfa3217252c308..04e31f86c10afb88f21002b7b0eb8c261e3490a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and 
+ * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and
  * James Leu (jleu@mindspring.net).
  * Copyright (C) 2001 by various other people who didn't put their name here.
  * Licensed under the GPL.
@@ -91,8 +91,8 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id)
        spin_lock(&lp->lock);
        while((err = uml_net_rx(dev)) > 0) ;
        if(err < 0) {
-               printk(KERN_ERR 
-                      "Device '%s' read returned %d, shutting it down\n", 
+               printk(KERN_ERR
+                      "Device '%s' read returned %d, shutting it down\n",
                       dev->name, err);
                /* dev_close can't be called in interrupt context, and takes
                 * again lp->lock.
@@ -108,7 +108,7 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id)
 
 out:
        spin_unlock(&lp->lock);
-       return(IRQ_HANDLED);
+       return IRQ_HANDLED;
 }
 
 static int uml_net_open(struct net_device *dev)
@@ -159,7 +159,7 @@ out:
 static int uml_net_close(struct net_device *dev)
 {
        struct uml_net_private *lp = dev->priv;
-       
+
        netif_stop_queue(dev);
 
        free_irq(dev->irq, dev);
@@ -194,7 +194,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
                /* this is normally done in the interrupt when tx finishes */
                netif_wake_queue(dev);
-       } 
+       }
        else if(len == 0){
                netif_start_queue(dev);
                lp->stats.tx_dropped++;
@@ -239,7 +239,7 @@ static int uml_net_set_mac(struct net_device *dev, void *addr)
        set_ether_mac(dev, hwaddr->sa_data);
        spin_unlock_irq(&lp->lock);
 
-       return(0);
+       return 0;
 }
 
 static int uml_net_change_mtu(struct net_device *dev, int new_mtu)
@@ -333,7 +333,7 @@ static int eth_configure(int n, void *init, char *mac,
        struct uml_net_private *lp;
        int save, err, size;
 
-       size = transport->private_size + sizeof(struct uml_net_private) + 
+       size = transport->private_size + sizeof(struct uml_net_private) +
                sizeof(((struct uml_net_private *) 0)->user);
 
        device = kzalloc(sizeof(*device), GFP_KERNEL);
@@ -438,7 +438,7 @@ static int eth_configure(int n, void *init, char *mac,
        lp->tl.function = uml_net_user_timer_expire;
        memcpy(lp->mac, device->mac, sizeof(lp->mac));
 
-       if (transport->user->init) 
+       if (transport->user->init)
                (*transport->user->init)(&lp->user, dev);
 
        set_ether_mac(dev, device->mac);
@@ -460,38 +460,36 @@ static struct uml_net *find_device(int n)
        device = NULL;
  out:
        spin_unlock(&devices_lock);
-       return(device);
+       return device;
 }
 
-static int eth_parse(char *str, int *index_out, char **str_out)
+static int eth_parse(char *str, int *index_out, char **str_out,
+                    char **error_out)
 {
        char *end;
-       int n;
+       int n, err = -EINVAL;;
 
        n = simple_strtoul(str, &end, 0);
        if(end == str){
-               printk(KERN_ERR "eth_setup: Failed to parse '%s'\n", str);
-               return(1);
-       }
-       if(n < 0){
-               printk(KERN_ERR "eth_setup: device %d is negative\n", n);
-               return(1);
+               *error_out = "Bad device number";
+               return err;
        }
+
        str = end;
        if(*str != '='){
-               printk(KERN_ERR 
-                      "eth_setup: expected '=' after device number\n");
-               return(1);
+               *error_out = "Expected '=' after device number";
+               return err;
        }
+
        str++;
        if(find_device(n)){
-               printk(KERN_ERR "eth_setup: Device %d already configured\n",
-                      n);
-               return(1);
+               *error_out = "Device already configured";
+               return err;
        }
-       if(index_out) *index_out = n;
+
+       *index_out = n;
        *str_out = str;
-       return(0);
+       return 0;
 }
 
 struct eth_init {
@@ -500,13 +498,11 @@ struct eth_init {
        int index;
 };
 
-/* Filled in at boot time.  Will need locking if the transports become
- * modular.
- */
-struct list_head transports = LIST_HEAD_INIT(transports);
+static DEFINE_SPINLOCK(transports_lock);
+static LIST_HEAD(transports);
 
 /* Filled in during early boot */
-struct list_head eth_cmd_line = LIST_HEAD_INIT(eth_cmd_line);
+static LIST_HEAD(eth_cmd_line);
 
 static int check_transport(struct transport *transport, char *eth, int n,
                           void **init_out, char **mac_out)
@@ -515,23 +511,23 @@ static int check_transport(struct transport *transport, char *eth, int n,
 
        len = strlen(transport->name);
        if(strncmp(eth, transport->name, len))
-               return(0);
+               return 0;
 
        eth += len;
        if(*eth == ',')
                eth++;
        else if(*eth != '\0')
-               return(0);
+               return 0;
 
        *init_out = kmalloc(transport->setup_size, GFP_KERNEL);
        if(*init_out == NULL)
-               return(1);
+               return 1;
 
        if(!transport->setup(eth, mac_out, *init_out)){
                kfree(*init_out);
                *init_out = NULL;
        }
-       return(1);
+       return 1;
 }
 
 void register_transport(struct transport *new)
@@ -542,7 +538,10 @@ void register_transport(struct transport *new)
        char *mac = NULL;
        int match;
 
+       spin_lock(&transports_lock);
+       BUG_ON(!list_empty(&new->list));
        list_add(&new->list, &transports);
+       spin_unlock(&transports_lock);
 
        list_for_each_safe(ele, next, &eth_cmd_line){
                eth = list_entry(ele, struct eth_init, list);
@@ -564,7 +563,9 @@ static int eth_setup_common(char *str, int index)
        struct transport *transport;
        void *init;
        char *mac = NULL;
+       int found = 0;
 
+       spin_lock(&transports_lock);
        list_for_each(ele, &transports){
                transport = list_entry(ele, struct transport, list);
                if(!check_transport(transport, str, index, &init, &mac))
@@ -573,19 +574,26 @@ static int eth_setup_common(char *str, int index)
                        eth_configure(index, init, mac, transport);
                        kfree(init);
                }
-               return(1);
+               found = 1;
+               break;
        }
-       return(0);
+
+       spin_unlock(&transports_lock);
+       return found;
 }
 
 static int eth_setup(char *str)
 {
        struct eth_init *new;
+       char *error;
        int n, err;
 
-       err = eth_parse(str, &n, &str);
-       if(err)
+       err = eth_parse(str, &n, &str, &error);
+       if(err){
+               printk(KERN_ERR "eth_setup - Couldn't parse '%s' : %s\n",
+                      str, error);
                return 1;
+       }
 
        new = alloc_bootmem(sizeof(*new));
        if (new == NULL){
@@ -607,38 +615,24 @@ __uml_help(eth_setup,
 "    Configure a network device.\n\n"
 );
 
-#if 0
-static int eth_init(void)
-{
-       struct list_head *ele, *next;
-       struct eth_init *eth;
-
-       list_for_each_safe(ele, next, &eth_cmd_line){
-               eth = list_entry(ele, struct eth_init, list);
-
-               if(eth_setup_common(eth->init, eth->index))
-                       list_del(&eth->list);
-       }
-       
-       return(1);
-}
-__initcall(eth_init);
-#endif
-
-static int net_config(char *str)
+static int net_config(char *str, char **error_out)
 {
        int n, err;
 
-       err = eth_parse(str, &n, &str);
-       if(err) return(err);
+       err = eth_parse(str, &n, &str, error_out);
+       if(err)
+               return err;
 
+       /* This string is broken up and the pieces used by the underlying
+        * driver.  So, it is freed only if eth_setup_common fails.
+        */
        str = kstrdup(str, GFP_KERNEL);
        if(str == NULL){
-               printk(KERN_ERR "net_config failed to strdup string\n");
-               return(-1);
+               *error_out = "net_config failed to strdup string";
+               return -ENOMEM;
        }
        err = !eth_setup_common(str, n);
-       if(err) 
+       if(err)
                kfree(str);
        return(err);
 }
@@ -658,7 +652,7 @@ static int net_id(char **str, int *start_out, int *end_out)
         return n;
 }
 
-static int net_remove(int n)
+static int net_remove(int n, char **error_out)
 {
        struct uml_net *device;
        struct net_device *dev;
@@ -671,7 +665,7 @@ static int net_remove(int n)
        dev = device->dev;
        lp = dev->priv;
        if(lp->fd > 0)
-                return -EBUSY;
+               return -EBUSY;
        if(lp->remove != NULL) (*lp->remove)(&lp->user);
        unregister_netdev(dev);
        platform_device_unregister(&device->pdev);
@@ -683,10 +677,11 @@ static int net_remove(int n)
 }
 
 static struct mc_device net_mc = {
+       .list           = LIST_HEAD_INIT(net_mc.list),
        .name           = "eth",
        .config         = net_config,
        .get_config     = NULL,
-        .id            = net_id,
+       .id             = net_id,
        .remove         = net_remove,
 };
 
@@ -699,7 +694,8 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event,
        void (*proc)(unsigned char *, unsigned char *, void *);
        unsigned char addr_buf[4], netmask_buf[4];
 
-       if(dev->open != uml_net_open) return(NOTIFY_DONE);
+       if(dev->open != uml_net_open)
+               return NOTIFY_DONE;
 
        lp = dev->priv;
 
@@ -717,9 +713,10 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event,
                memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf));
                (*proc)(addr_buf, netmask_buf, &lp->user);
        }
-       return(NOTIFY_DONE);
+       return NOTIFY_DONE;
 }
 
+/* uml_net_init shouldn't be called twice on two CPUs at the same time */
 struct notifier_block uml_inetaddr_notifier = {
        .notifier_call          = uml_inetaddr_event,
 };
@@ -727,7 +724,7 @@ struct notifier_block uml_inetaddr_notifier = {
 static int uml_net_init(void)
 {
        struct list_head *ele;
-       struct uml_net_private *lp;     
+       struct uml_net_private *lp;
        struct in_device *ip;
        struct in_ifaddr *in;
 
@@ -738,18 +735,21 @@ static int uml_net_init(void)
         * didn't get a chance to run for them.  This fakes it so that
         * addresses which have already been set up get handled properly.
         */
+       spin_lock(&opened_lock);
        list_for_each(ele, &opened){
                lp = list_entry(ele, struct uml_net_private, list);
                ip = lp->dev->ip_ptr;
-               if(ip == NULL) continue;
+               if(ip == NULL)
+                       continue;
                in = ip->ifa_list;
                while(in != NULL){
                        uml_inetaddr_event(NULL, NETDEV_UP, in);
                        in = in->ifa_next;
                }
-       }       
+       }
+       spin_unlock(&opened_lock);
 
-       return(0);
+       return 0;
 }
 
 __initcall(uml_net_init);
@@ -759,13 +759,16 @@ static void close_devices(void)
        struct list_head *ele;
        struct uml_net_private *lp;
 
+       spin_lock(&opened_lock);
        list_for_each(ele, &opened){
                lp = list_entry(ele, struct uml_net_private, list);
                free_irq(lp->dev->irq, lp->dev);
                if((lp->close != NULL) && (lp->fd >= 0))
                        (*lp->close)(lp->fd, &lp->user);
-               if(lp->remove != NULL) (*lp->remove)(&lp->user);
+               if(lp->remove != NULL)
+                       (*lp->remove)(&lp->user);
        }
+       spin_unlock(&opened_lock);
 }
 
 __uml_exitcall(close_devices);
@@ -783,8 +786,8 @@ struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra)
        return(skb);
 }
 
-void iter_addresses(void *d, void (*cb)(unsigned char *, unsigned char *, 
-                                       void *), 
+void iter_addresses(void *d, void (*cb)(unsigned char *, unsigned char *,
+                                       void *),
                    void *arg)
 {
        struct net_device *dev = d;
@@ -809,11 +812,11 @@ int dev_netmask(void *d, void *m)
        struct in_ifaddr *in;
        __be32 *mask_out = m;
 
-       if(ip == NULL) 
+       if(ip == NULL)
                return(1);
 
        in = ip->ifa_list;
-       if(in == NULL) 
+       if(in == NULL)
                return(1);
 
        *mask_out = in->ifa_mask;
@@ -827,7 +830,7 @@ void *get_output_buffer(int *len_out)
        ret = (void *) __get_free_pages(GFP_KERNEL, 0);
        if(ret) *len_out = PAGE_SIZE;
        else *len_out = 0;
-       return(ret);
+       return ret;
 }
 
 void free_output_buffer(void *buffer)
@@ -835,7 +838,7 @@ void free_output_buffer(void *buffer)
        free_pages((unsigned long) buffer, 0);
 }
 
-int tap_setup_common(char *str, char *type, char **dev_name, char **mac_out, 
+int tap_setup_common(char *str, char *type, char **dev_name, char **mac_out,
                     char **gate_addr)
 {
        char *remain;
@@ -854,14 +857,3 @@ unsigned short eth_protocol(struct sk_buff *skb)
 {
        return(eth_type_trans(skb, skb->dev));
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 6dfe632f1c14d9a64ebc9a279a65025eefba2ac7..1c8efd95c421946ab5e7e56db518395c1847378b 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -55,9 +55,9 @@ static irqreturn_t pipe_interrupt(int irq, void *data)
        fd = os_rcv_fd(conn->socket[0], &conn->helper_pid);
        if(fd < 0){
                if(fd == -EAGAIN)
-                       return(IRQ_NONE);
+                       return IRQ_NONE;
 
-               printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n", 
+               printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n",
                       -fd);
                os_close_file(conn->fd);
        }
@@ -68,7 +68,7 @@ static irqreturn_t pipe_interrupt(int irq, void *data)
        list_add(&conn->list, &conn->port->connections);
 
        complete(&conn->port->done);
-       return(IRQ_HANDLED);
+       return IRQ_HANDLED;
 }
 
 #define NO_WAITER_MSG \
@@ -97,14 +97,14 @@ static int port_accept(struct port_list *port)
                       "connection\n");
                goto out_close;
        }
-       *conn = ((struct connection) 
+       *conn = ((struct connection)
                { .list         = LIST_HEAD_INIT(conn->list),
                  .fd           = fd,
                  .socket       = { socket[0], socket[1] },
                  .telnetd_pid  = pid,
                  .port         = port });
 
-       if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, 
+       if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt,
                          IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
                          "telnetd", conn)){
                printk(KERN_ERR "port_accept : failed to get IRQ for "
@@ -117,20 +117,20 @@ static int port_accept(struct port_list *port)
                printk("No one waiting for port\n");
        }
        list_add(&conn->list, &port->pending);
-       return(1);
+       return 1;
 
  out_free:
        kfree(conn);
  out_close:
        os_close_file(fd);
-       if(pid != -1) 
+       if(pid != -1)
                os_kill_process(pid, 1);
  out:
-       return(ret);
-} 
+       return ret;
+}
 
-DECLARE_MUTEX(ports_sem);
-struct list_head ports = LIST_HEAD_INIT(ports);
+static DECLARE_MUTEX(ports_sem);
+static LIST_HEAD(ports);
 
 void port_work_proc(struct work_struct *unused)
 {
@@ -158,8 +158,8 @@ static irqreturn_t port_interrupt(int irq, void *data)
 
        port->has_connection = 1;
        schedule_work(&port_work);
-       return(IRQ_HANDLED);
-} 
+       return IRQ_HANDLED;
+}
 
 void *port_data(int port_num)
 {
@@ -185,14 +185,14 @@ void *port_data(int port_num)
                       port_num, -fd);
                goto out_free;
        }
-       if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, 
-                         IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "port",
-                         port)){
+       if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt,
+                         IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
+                         "port", port)){
                printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num);
                goto out_close;
        }
 
-       *port = ((struct port_list) 
+       *port = ((struct port_list)
                { .list                 = LIST_HEAD_INIT(port->list),
                  .wait_count           = ATOMIC_INIT(0),
                  .has_connection       = 0,
@@ -222,7 +222,7 @@ void *port_data(int port_num)
        os_close_file(fd);
  out:
        up(&ports_sem);
-       return(dev);
+       return dev;
 }
 
 int port_wait(void *data)
@@ -232,15 +232,15 @@ int port_wait(void *data)
        struct port_list *port = dev->port;
        int fd;
 
-        atomic_inc(&port->wait_count);
+       atomic_inc(&port->wait_count);
        while(1){
                fd = -ERESTARTSYS;
-                if(wait_for_completion_interruptible(&port->done))
-                        goto out;
+               if(wait_for_completion_interruptible(&port->done))
+                       goto out;
 
                spin_lock(&port->lock);
 
-               conn = list_entry(port->connections.next, struct connection, 
+               conn = list_entry(port->connections.next, struct connection,
                                  list);
                list_del(&conn->list);
                spin_unlock(&port->lock);
@@ -248,12 +248,12 @@ int port_wait(void *data)
                os_shutdown_socket(conn->socket[0], 1, 1);
                os_close_file(conn->socket[0]);
                os_shutdown_socket(conn->socket[1], 1, 1);
-               os_close_file(conn->socket[1]); 
+               os_close_file(conn->socket[1]);
 
                /* This is done here because freeing an IRQ can't be done
                 * within the IRQ handler.  So, pipe_interrupt always ups
                 * the semaphore regardless of whether it got a successful
-                * connection.  Then we loop here throwing out failed 
+                * connection.  Then we loop here throwing out failed
                 * connections until a good one is found.
                 */
                free_irq(TELNETD_IRQ, conn);
index bc6afaf74c1a8123ace69f94c5d2d9a340bc6347..80508023054f27bfc493827eeb3e53cbc864f7b0 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -38,18 +38,18 @@ static void *port_init(char *str, int device, const struct chan_opts *opts)
        if(*str != ':'){
                printk("port_init : channel type 'port' must specify a "
                       "port number\n");
-               return(NULL);
+               return NULL;
        }
        str++;
        port = strtoul(str, &end, 0);
        if((*end != '\0') || (end == str)){
                printk("port_init : couldn't parse port '%s'\n", str);
-               return(NULL);
+               return NULL;
        }
 
        kern_data = port_data(port);
        if(kern_data == NULL)
-               return(NULL);
+               return NULL;
 
        data = um_kmalloc(sizeof(*data));
        if(data == NULL)
@@ -59,10 +59,10 @@ static void *port_init(char *str, int device, const struct chan_opts *opts)
                                      .kernel_data      = kern_data });
        sprintf(data->dev, "%d", port);
 
-       return(data);
+       return data;
  err:
        port_kern_free(kern_data);
-       return(NULL);
+       return NULL;
 }
 
 static void port_free(void *d)
@@ -83,14 +83,14 @@ static int port_open(int input, int output, int primary, void *d,
        if((fd >= 0) && data->raw){
                CATCH_EINTR(err = tcgetattr(fd, &data->tt));
                if(err)
-                       return(err);
+                       return err;
 
                err = raw(fd);
                if(err)
-                       return(err);
+                       return err;
        }
        *dev_out = data->dev;
-       return(fd);
+       return fd;
 }
 
 static void port_close(int fd, void *d)
@@ -120,8 +120,8 @@ int port_listen_fd(int port)
        int fd, err, arg;
 
        fd = socket(PF_INET, SOCK_STREAM, 0);
-       if(fd == -1) 
-               return(-errno);
+       if(fd == -1)
+               return -errno;
 
        arg = 1;
        if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &arg, sizeof(arg)) < 0){
@@ -136,7 +136,7 @@ int port_listen_fd(int port)
                err = -errno;
                goto out;
        }
-  
+
        if(listen(fd, 1) < 0){
                err = -errno;
                goto out;
@@ -146,10 +146,10 @@ int port_listen_fd(int port)
        if(err < 0)
                goto out;
 
-       return(fd);
+       return fd;
  out:
        os_close_file(fd);
-       return(err);
+       return err;
 }
 
 struct port_pre_exec_data {
@@ -173,13 +173,13 @@ void port_pre_exec(void *arg)
 int port_connection(int fd, int *socket, int *pid_out)
 {
        int new, err;
-       char *argv[] = { "/usr/sbin/in.telnetd", "-L", 
+       char *argv[] = { "/usr/sbin/in.telnetd", "-L",
                         "/usr/lib/uml/port-helper", NULL };
        struct port_pre_exec_data data;
 
        new = os_accept_connection(fd);
        if(new < 0)
-               return(new);
+               return new;
 
        err = os_pipe(socket, 0, 0);
        if(err < 0)
@@ -190,29 +190,18 @@ int port_connection(int fd, int *socket, int *pid_out)
                  .pipe_fd              = socket[1] });
 
        err = run_helper(port_pre_exec, &data, argv, NULL);
-       if(err < 0) 
+       if(err < 0)
                goto out_shutdown;
 
        *pid_out = err;
-       return(new);
+       return new;
 
  out_shutdown:
        os_shutdown_socket(socket[0], 1, 1);
        os_close_file(socket[0]);
-       os_shutdown_socket(socket[1], 1, 1);    
+       os_shutdown_socket(socket[1], 1, 1);
        os_close_file(socket[1]);
  out_close:
        os_close_file(new);
-       return(err);
+       return err;
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 73b2bdd6d2d3b867165e116b7a1b430f34096c9b..e942e836f9954335651fc3c2b6587c2bd7d7e888 100644 (file)
@@ -78,6 +78,7 @@ static const struct file_operations rng_chrdev_ops = {
        .read           = rng_dev_read,
 };
 
+/* rng_init shouldn't be called more than once at boot time */
 static struct miscdevice rng_miscdev = {
        RNG_MISCDEV_MINOR,
        RNG_MODULE_NAME,
index ed9c59082d0df56806248e7928d4a953d524d15e..fc22b9bd91530548a72cd0b6aad1afde5b00d3e6 100644 (file)
@@ -38,6 +38,7 @@ static void ssl_announce(char *dev_name, int dev)
               dev_name);
 }
 
+/* Almost const, except that xterm_title may be changed in an initcall */
 static struct chan_opts opts = {
        .announce       = ssl_announce,
        .xterm_title    = "Serial Line #%d",
@@ -46,10 +47,12 @@ static struct chan_opts opts = {
        .in_kernel      = 1,
 };
 
-static int ssl_config(char *str);
+static int ssl_config(char *str, char **error_out);
 static int ssl_get_config(char *dev, char *str, int size, char **error_out);
-static int ssl_remove(int n);
+static int ssl_remove(int n, char **error_out);
 
+
+/* Const, except for .mc.list */
 static struct line_driver driver = {
        .name                   = "UML serial line",
        .device_name            = "ttyS",
@@ -61,9 +64,8 @@ static struct line_driver driver = {
        .read_irq_name          = "ssl",
        .write_irq              = SSL_WRITE_IRQ,
        .write_irq_name         = "ssl-write",
-       .symlink_from           = "serial",
-       .symlink_to             = "tts",
        .mc  = {
+               .list           = LIST_HEAD_INIT(driver.mc.list),
                .name           = "ssl",
                .config         = ssl_config,
                .get_config     = ssl_get_config,
@@ -72,17 +74,16 @@ static struct line_driver driver = {
        },
 };
 
-/* The array is initialized by line_init, which is an initcall.  The 
- * individual elements are protected by individual semaphores.
+/* The array is initialized by line_init, at initcall time.  The
+ * elements are locked individually as needed.
  */
 static struct line serial_lines[NR_PORTS] =
        { [0 ... NR_PORTS - 1] = LINE_INIT(CONFIG_SSL_CHAN, &driver) };
 
-static struct lines lines = LINES_INIT(NR_PORTS);
-
-static int ssl_config(char *str)
+static int ssl_config(char *str, char **error_out)
 {
-       return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts);
+       return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts,
+                          error_out);
 }
 
 static int ssl_get_config(char *dev, char *str, int size, char **error_out)
@@ -91,9 +92,10 @@ static int ssl_get_config(char *dev, char *str, int size, char **error_out)
                               size, error_out);
 }
 
-static int ssl_remove(int n)
+static int ssl_remove(int n, char **error_out)
 {
-       return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n);
+       return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n,
+                          error_out);
 }
 
 static int ssl_open(struct tty_struct *tty, struct file *filp)
@@ -168,9 +170,10 @@ static int ssl_console_setup(struct console *co, char *options)
 {
        struct line *line = &serial_lines[co->index];
 
-       return console_open_chan(line, co, &opts);
+       return console_open_chan(line, co);
 }
 
+/* No locking for register_console call - relies on single-threaded initcalls */
 static struct console ssl_cons = {
        .name           = "ttyS",
        .write          = ssl_console_write,
@@ -186,9 +189,8 @@ static int ssl_init(void)
 
        printk(KERN_INFO "Initializing software serial port version %d\n",
               ssl_version);
-       ssl_driver = line_register_devfs(&lines, &driver, &ssl_ops,
-                                        serial_lines,
-                                        ARRAY_SIZE(serial_lines));
+       ssl_driver = register_lines(&driver, &ssl_ops, serial_lines,
+                                   ARRAY_SIZE(serial_lines));
 
        lines_init(serial_lines, ARRAY_SIZE(serial_lines), &opts);
 
@@ -212,7 +214,15 @@ __uml_exitcall(ssl_exit);
 
 static int ssl_chan_setup(char *str)
 {
-       return line_setup(serial_lines, ARRAY_SIZE(serial_lines), str);
+       char *error;
+       int ret;
+
+       ret = line_setup(serial_lines, ARRAY_SIZE(serial_lines), str, &error);
+       if(ret < 0)
+               printk(KERN_ERR "Failed to set up serial line with "
+                      "configuration string \"%s\" : %s\n", str, error);
+
+       return 1;
 }
 
 __setup("ssl", ssl_chan_setup);
index 7a4897e27f42784054bb674fb29e8664f17a5af9..7ff0b0fc37e73eff2875fe4ae0db633570181b66 100644 (file)
@@ -30,8 +30,6 @@
 
 #define MAX_TTYS (16)
 
-/* ----------------------------------------------------------------------------- */
-
 /* Referenced only by tty_driver below - presumably it's locked correctly
  * by the tty driver.
  */
@@ -44,6 +42,7 @@ void stdio_announce(char *dev_name, int dev)
               dev_name);
 }
 
+/* Almost const, except that xterm_title may be changed in an initcall */
 static struct chan_opts opts = {
        .announce       = stdio_announce,
        .xterm_title    = "Virtual Console #%d",
@@ -52,10 +51,12 @@ static struct chan_opts opts = {
        .in_kernel      = 1,
 };
 
-static int con_config(char *str);
+static int con_config(char *str, char **error_out);
 static int con_get_config(char *dev, char *str, int size, char **error_out);
-static int con_remove(int n);
+static int con_remove(int n, char **con_remove);
+
 
+/* Const, except for .mc.list */
 static struct line_driver driver = {
        .name                   = "UML console",
        .device_name            = "tty",
@@ -67,9 +68,8 @@ static struct line_driver driver = {
        .read_irq_name          = "console",
        .write_irq              = CONSOLE_WRITE_IRQ,
        .write_irq_name         = "console-write",
-       .symlink_from           = "ttys",
-       .symlink_to             = "vc",
        .mc  = {
+               .list           = LIST_HEAD_INIT(driver.mc.list),
                .name           = "con",
                .config         = con_config,
                .get_config     = con_get_config,
@@ -78,18 +78,16 @@ static struct line_driver driver = {
        },
 };
 
-static struct lines console_lines = LINES_INIT(MAX_TTYS);
-
-/* The array is initialized by line_init, which is an initcall.  The 
- * individual elements are protected by individual semaphores.
+/* The array is initialized by line_init, at initcall time.  The
+ * elements are locked individually as needed.
  */
-struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver),
-                             [ 1 ... MAX_TTYS - 1 ] =
-                             LINE_INIT(CONFIG_CON_CHAN, &driver) };
+static struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver),
+                                    [ 1 ... MAX_TTYS - 1 ] =
+                                    LINE_INIT(CONFIG_CON_CHAN, &driver) };
 
-static int con_config(char *str)
+static int con_config(char *str, char **error_out)
 {
-       return line_config(vts, ARRAY_SIZE(vts), str, &opts);
+       return line_config(vts, ARRAY_SIZE(vts), str, &opts, error_out);
 }
 
 static int con_get_config(char *dev, char *str, int size, char **error_out)
@@ -97,9 +95,9 @@ static int con_get_config(char *dev, char *str, int size, char **error_out)
        return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out);
 }
 
-static int con_remove(int n)
+static int con_remove(int n, char **error_out)
 {
-       return line_remove(vts, ARRAY_SIZE(vts), n);
+       return line_remove(vts, ARRAY_SIZE(vts), n, error_out);
 }
 
 static int con_open(struct tty_struct *tty, struct file *filp)
@@ -146,9 +144,10 @@ static int uml_console_setup(struct console *co, char *options)
 {
        struct line *line = &vts[co->index];
 
-       return console_open_chan(line, co, &opts);
+       return console_open_chan(line, co);
 }
 
+/* No locking for register_console call - relies on single-threaded initcalls */
 static struct console stdiocons = {
        .name           = "tty",
        .write          = uml_console_write,
@@ -156,16 +155,14 @@ static struct console stdiocons = {
        .setup          = uml_console_setup,
        .flags          = CON_PRINTBUFFER,
        .index          = -1,
-       .data           = &vts,
 };
 
 int stdio_init(void)
 {
        char *new_title;
 
-       console_driver = line_register_devfs(&console_lines, &driver,
-                                            &console_ops, vts,
-                                            ARRAY_SIZE(vts));
+       console_driver = register_lines(&driver, &console_ops, vts,
+                                       ARRAY_SIZE(vts));
        if (console_driver == NULL)
                return -1;
        printk(KERN_INFO "Initialized stdio console driver\n");
@@ -192,7 +189,15 @@ __uml_exitcall(console_exit);
 
 static int console_chan_setup(char *str)
 {
-       return line_setup(vts, ARRAY_SIZE(vts), str);
+       char *error;
+       int ret;
+
+       ret = line_setup(vts, ARRAY_SIZE(vts), str, &error);
+       if(ret < 0)
+               printk(KERN_ERR "Failed to set up console with "
+                      "configuration string \"%s\" : %s\n", str, error);
+
+       return 1;
 }
 __setup("con", console_chan_setup);
 __channel_help(console_chan_setup, "con");
index 49c047b75cc556cbda484a5c6166d23d5b137f7c..f98d26e513813483dc27681ce75f180e7566f4ae 100644 (file)
@@ -56,6 +56,7 @@
 enum ubd_req { UBD_READ, UBD_WRITE };
 
 struct io_thread_req {
+       struct request *req;
        enum ubd_req op;
        int fds[2];
        unsigned long offsets[2];
@@ -106,10 +107,6 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data)
 
 #define DRIVER_NAME "uml-blkdev"
 
-/* Can be taken in interrupt context, and is passed to the block layer to lock
- * the request queue. Kernel side code knows that. */
-static DEFINE_SPINLOCK(ubd_io_lock);
-
 static DEFINE_MUTEX(ubd_lock);
 
 /* XXX - this made sense in 2.4 days, now it's only used as a boolean, and
@@ -132,12 +129,8 @@ static struct block_device_operations ubd_blops = {
        .getgeo         = ubd_getgeo,
 };
 
-/* Protected by the queue_lock */
-static request_queue_t *ubd_queue;
-
 /* Protected by ubd_lock */
 static int fake_major = MAJOR_NR;
-
 static struct gendisk *ubd_gendisk[MAX_DEV];
 static struct gendisk *fake_gendisk[MAX_DEV];
 
@@ -148,10 +141,6 @@ static struct gendisk *fake_gendisk[MAX_DEV];
 #define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0, \
                                         .cl = 1 })
 #endif
-
-/* Not protected - changed only in ubd_setup_common and then only to
- * to enable O_SYNC.
- */
 static struct openflags global_openflags = OPEN_FLAGS;
 
 struct cow {
@@ -178,6 +167,8 @@ struct ubd {
        unsigned no_cow:1;
        struct cow cow;
        struct platform_device pdev;
+       struct request_queue *queue;
+       spinlock_t lock;
 };
 
 #define DEFAULT_COW { \
@@ -198,8 +189,10 @@ struct ubd {
         .no_cow =               0, \
        .shared =               0, \
         .cow =                 DEFAULT_COW, \
+       .lock =                 SPIN_LOCK_UNLOCKED,     \
 }
 
+/* Protected by ubd_lock */
 struct ubd ubd_devs[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD };
 
 /* Only changed by fake_ide_setup which is a setup */
@@ -242,7 +235,6 @@ static void make_ide_entries(char *dev_name)
 
        ent = create_proc_entry("media", S_IFREG|S_IRUGO, dir);
        if(!ent) return;
-       ent->nlink = 1;
        ent->data = NULL;
        ent->read_proc = proc_ide_read_media;
        ent->write_proc = NULL;
@@ -286,12 +278,12 @@ static int parse_unit(char **ptr)
  * otherwise, the str pointer is used (and owned) inside ubd_devs array, so it
  * should not be freed on exit.
  */
-static int ubd_setup_common(char *str, int *index_out)
+static int ubd_setup_common(char *str, int *index_out, char **error_out)
 {
        struct ubd *ubd_dev;
        struct openflags flags = global_openflags;
        char *backing_file;
-       int n, err, i;
+       int n, err = 0, i;
 
        if(index_out) *index_out = -1;
        n = *str;
@@ -302,56 +294,55 @@ static int ubd_setup_common(char *str, int *index_out)
                str++;
                if(!strcmp(str, "sync")){
                        global_openflags = of_sync(global_openflags);
-                       return(0);
+                       goto out1;
                }
+
+               err = -EINVAL;
                major = simple_strtoul(str, &end, 0);
                if((*end != '\0') || (end == str)){
-                       printk(KERN_ERR
-                              "ubd_setup : didn't parse major number\n");
-                       return(1);
+                       *error_out = "Didn't parse major number";
+                       goto out1;
                }
 
-               err = 1;
-               mutex_lock(&ubd_lock);
-               if(fake_major != MAJOR_NR){
-                       printk(KERN_ERR "Can't assign a fake major twice\n");
-                       goto out1;
-               }
+               mutex_lock(&ubd_lock);
+               if(fake_major != MAJOR_NR){
+                       *error_out = "Can't assign a fake major twice";
+                       goto out1;
+               }
 
-               fake_major = major;
+               fake_major = major;
 
                printk(KERN_INFO "Setting extra ubd major number to %d\n",
                       major);
-               err = 0;
-       out1:
-               mutex_unlock(&ubd_lock);
-               return(err);
+               err = 0;
+       out1:
+               mutex_unlock(&ubd_lock);
+               return err;
        }
 
        n = parse_unit(&str);
        if(n < 0){
-               printk(KERN_ERR "ubd_setup : couldn't parse unit number "
-                      "'%s'\n", str);
-               return(1);
+               *error_out = "Couldn't parse device number";
+               return -EINVAL;
        }
        if(n >= MAX_DEV){
-               printk(KERN_ERR "ubd_setup : index %d out of range "
-                      "(%d devices, from 0 to %d)\n", n, MAX_DEV, MAX_DEV - 1);
-               return(1);
+               *error_out = "Device number out of range";
+               return 1;
        }
 
-       err = 1;
+       err = -EBUSY;
        mutex_lock(&ubd_lock);
 
        ubd_dev = &ubd_devs[n];
        if(ubd_dev->file != NULL){
-               printk(KERN_ERR "ubd_setup : device already configured\n");
+               *error_out = "Device is already configured";
                goto out;
        }
 
        if (index_out)
                *index_out = n;
 
+       err = -EINVAL;
        for (i = 0; i < sizeof("rscd="); i++) {
                switch (*str) {
                case 'r':
@@ -370,47 +361,54 @@ static int ubd_setup_common(char *str, int *index_out)
                        str++;
                        goto break_loop;
                default:
-                       printk(KERN_ERR "ubd_setup : Expected '=' or flag letter (r, s, c, or d)\n");
+                       *error_out = "Expected '=' or flag letter "
+                               "(r, s, c, or d)";
                        goto out;
                }
                str++;
        }
 
-        if (*str == '=')
-               printk(KERN_ERR "ubd_setup : Too many flags specified\n");
-        else
-               printk(KERN_ERR "ubd_setup : Expected '='\n");
+       if (*str == '=')
+               *error_out = "Too many flags specified";
+       else
+               *error_out = "Missing '='";
        goto out;
 
 break_loop:
-       err = 0;
        backing_file = strchr(str, ',');
 
-       if (!backing_file) {
+       if (backing_file == NULL)
                backing_file = strchr(str, ':');
-       }
 
-       if(backing_file){
-               if(ubd_dev->no_cow)
-                       printk(KERN_ERR "Can't specify both 'd' and a "
-                              "cow file\n");
+       if(backing_file != NULL){
+               if(ubd_dev->no_cow){
+                       *error_out = "Can't specify both 'd' and a cow file";
+                       goto out;
+               }
                else {
                        *backing_file = '\0';
                        backing_file++;
                }
        }
+       err = 0;
        ubd_dev->file = str;
        ubd_dev->cow.file = backing_file;
        ubd_dev->boot_openflags = flags;
 out:
        mutex_unlock(&ubd_lock);
-       return(err);
+       return err;
 }
 
 static int ubd_setup(char *str)
 {
-       ubd_setup_common(str, NULL);
-       return(1);
+       char *error;
+       int err;
+
+       err = ubd_setup_common(str, NULL, &error);
+       if(err)
+               printk(KERN_ERR "Failed to initialize device with \"%s\" : "
+                      "%s\n", str, error);
+       return 1;
 }
 
 __setup("ubd", ubd_setup);
@@ -422,7 +420,7 @@ __uml_help(ubd_setup,
 "    use either a ':' or a ',': the first one allows writing things like;\n"
 "      ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n"
 "    while with a ',' the shell would not expand the 2nd '~'.\n"
-"    When using only one filename, UML will detect whether to thread it like\n"
+"    When using only one filename, UML will detect whether to treat it like\n"
 "    a COW file or a backing file. To override this detection, add the 'd'\n"
 "    flag:\n"
 "      ubd0d=BackingFile\n"
@@ -471,12 +469,6 @@ static void do_ubd_request(request_queue_t * q);
 /* Only changed by ubd_init, which is an initcall. */
 int thread_fd = -1;
 
-/* Changed by ubd_handler, which is serialized because interrupts only
- * happen on CPU 0.
- * XXX: currently unused.
- */
-static int intr_count = 0;
-
 /* call ubd_finish if you need to serialize */
 static void __ubd_finish(struct request *req, int error)
 {
@@ -499,36 +491,38 @@ static void __ubd_finish(struct request *req, int error)
  * spin_lock_irq()/spin_lock_irqsave() */
 static inline void ubd_finish(struct request *req, int error)
 {
-       spin_lock(&ubd_io_lock);
+       struct ubd *dev = req->rq_disk->private_data;
+
+       spin_lock(&dev->lock);
        __ubd_finish(req, error);
-       spin_unlock(&ubd_io_lock);
+       spin_unlock(&dev->lock);
 }
 
 /* XXX - move this inside ubd_intr. */
-/* Called without ubd_io_lock held, and only in interrupt context. */
+/* Called without dev->lock held, and only in interrupt context. */
 static void ubd_handler(void)
 {
        struct io_thread_req req;
-       struct request *rq = elv_next_request(ubd_queue);
+       struct request *rq;
+       struct ubd *dev;
        int n;
 
        do_ubd = 0;
-       intr_count++;
        n = os_read_file(thread_fd, &req, sizeof(req));
        if(n != sizeof(req)){
                printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, "
                       "err = %d\n", os_getpid(), -n);
-               spin_lock(&ubd_io_lock);
-               end_request(rq, 0);
-               spin_unlock(&ubd_io_lock);
                return;
        }
 
+       rq = req.req;
+       dev = rq->rq_disk->private_data;
+
        ubd_finish(rq, req.error);
-       reactivate_fd(thread_fd, UBD_IRQ);      
-       spin_lock(&ubd_io_lock);
-       do_ubd_request(ubd_queue);
-       spin_unlock(&ubd_io_lock);
+       reactivate_fd(thread_fd, UBD_IRQ);
+       spin_lock(&dev->lock);
+       do_ubd_request(dev->queue);
+       spin_unlock(&dev->lock);
 }
 
 static irqreturn_t ubd_intr(int irq, void *dev)
@@ -632,8 +626,7 @@ static int ubd_open_dev(struct ubd *ubd_dev)
 }
 
 static int ubd_disk_register(int major, u64 size, int unit,
-                       struct gendisk **disk_out)
-                       
+                            struct gendisk **disk_out)
 {
        struct gendisk *disk;
 
@@ -659,7 +652,7 @@ static int ubd_disk_register(int major, u64 size, int unit,
        }
 
        disk->private_data = &ubd_devs[unit];
-       disk->queue = ubd_queue;
+       disk->queue = ubd_devs[unit].queue;
        add_disk(disk);
 
        *disk_out = disk;
@@ -668,28 +661,39 @@ static int ubd_disk_register(int major, u64 size, int unit,
 
 #define ROUND_BLOCK(n) ((n + ((1 << 9) - 1)) & (-1 << 9))
 
-static int ubd_add(int n)
+static int ubd_add(int n, char **error_out)
 {
        struct ubd *ubd_dev = &ubd_devs[n];
-       int err;
+       int err = 0;
 
-       err = -ENODEV;
        if(ubd_dev->file == NULL)
                goto out;
 
        err = ubd_file_size(ubd_dev, &ubd_dev->size);
-       if(err < 0)
+       if(err < 0){
+               *error_out = "Couldn't determine size of device's file";
                goto out;
+       }
 
        ubd_dev->size = ROUND_BLOCK(ubd_dev->size);
 
-       err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]);
-       if(err)
+       err = -ENOMEM;
+       ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock);
+       if (ubd_dev->queue == NULL) {
+               *error_out = "Failed to initialize device queue";
                goto out;
+       }
+       ubd_dev->queue->queuedata = ubd_dev;
+
+       err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]);
+       if(err){
+               *error_out = "Failed to register device";
+               goto out_cleanup;
+       }
 
        if(fake_major != MAJOR_NR)
                ubd_disk_register(fake_major, ubd_dev->size, n,
-                            &fake_gendisk[n]);
+                                 &fake_gendisk[n]);
 
        /* perhaps this should also be under the "if (fake_major)" above */
        /* using the fake_disk->disk_name and also the fakehd_set name */
@@ -699,30 +703,37 @@ static int ubd_add(int n)
        err = 0;
 out:
        return err;
+
+out_cleanup:
+       blk_cleanup_queue(ubd_dev->queue);
+       goto out;
 }
 
-static int ubd_config(char *str)
+static int ubd_config(char *str, char **error_out)
 {
        int n, ret;
 
+       /* This string is possibly broken up and stored, so it's only
+        * freed if ubd_setup_common fails, or if only general options
+        * were set.
+        */
        str = kstrdup(str, GFP_KERNEL);
        if (str == NULL) {
-               printk(KERN_ERR "ubd_config failed to strdup string\n");
-               ret = 1;
-               goto out;
+               *error_out = "Failed to allocate memory";
+               return -ENOMEM;
        }
-       ret = ubd_setup_common(str, &n);
-       if (ret) {
-               ret = -1;
+
+       ret = ubd_setup_common(str, &n, error_out);
+       if (ret)
                goto err_free;
-       }
+
        if (n == -1) {
                ret = 0;
                goto err_free;
        }
 
        mutex_lock(&ubd_lock);
-       ret = ubd_add(n);
+       ret = ubd_add(n, error_out);
        if (ret)
                ubd_devs[n].file = NULL;
        mutex_unlock(&ubd_lock);
@@ -777,7 +788,7 @@ static int ubd_id(char **str, int *start_out, int *end_out)
         return n;
 }
 
-static int ubd_remove(int n)
+static int ubd_remove(int n, char **error_out)
 {
        struct ubd *ubd_dev;
        int err = -ENODEV;
@@ -807,6 +818,7 @@ static int ubd_remove(int n)
                fake_gendisk[n] = NULL;
        }
 
+       blk_cleanup_queue(ubd_dev->queue);
        platform_device_unregister(&ubd_dev->pdev);
        *ubd_dev = ((struct ubd) DEFAULT_UBD);
        err = 0;
@@ -815,8 +827,11 @@ out:
        return err;
 }
 
-/* All these are called by mconsole in process context and without ubd-specific locks. */
+/* All these are called by mconsole in process context and without
+ * ubd-specific locks.  The structure itself is const except for .list.
+ */
 static struct mc_device ubd_mc = {
+       .list           = LIST_HEAD_INIT(ubd_mc.list),
        .name           = "ubd",
        .config         = ubd_config,
        .get_config     = ubd_get_config,
@@ -836,13 +851,17 @@ static int __init ubd0_init(void)
 {
        struct ubd *ubd_dev = &ubd_devs[0];
 
+       mutex_lock(&ubd_lock);
        if(ubd_dev->file == NULL)
                ubd_dev->file = "root_fs";
+       mutex_unlock(&ubd_lock);
+
        return(0);
 }
 
 __initcall(ubd0_init);
 
+/* Used in ubd_init, which is an initcall */
 static struct platform_driver ubd_driver = {
        .driver = {
                .name  = DRIVER_NAME,
@@ -851,17 +870,12 @@ static struct platform_driver ubd_driver = {
 
 static int __init ubd_init(void)
 {
-        int i;
+       char *error;
+       int i, err;
 
        if (register_blkdev(MAJOR_NR, "ubd"))
                return -1;
 
-       ubd_queue = blk_init_queue(do_ubd_request, &ubd_io_lock);
-       if (!ubd_queue) {
-               unregister_blkdev(MAJOR_NR, "ubd");
-               return -1;
-       }
-               
        if (fake_major != MAJOR_NR) {
                char name[sizeof("ubd_nnn\0")];
 
@@ -870,8 +884,14 @@ static int __init ubd_init(void)
                        return -1;
        }
        platform_driver_register(&ubd_driver);
-       for (i = 0; i < MAX_DEV; i++)
-               ubd_add(i);
+       mutex_lock(&ubd_lock);
+       for (i = 0; i < MAX_DEV; i++){
+               err = ubd_add(i, &error);
+               if(err)
+                       printk(KERN_ERR "Failed to initialize ubd device %d :"
+                              "%s\n", i, error);
+       }
+       mutex_unlock(&ubd_lock);
        return 0;
 }
 
@@ -1003,7 +1023,7 @@ static void cowify_req(struct io_thread_req *req, unsigned long *bitmap,
                           req->bitmap_words, bitmap_len);
 }
 
-/* Called with ubd_io_lock held */
+/* Called with dev->lock held */
 static int prepare_request(struct request *req, struct io_thread_req *io_req)
 {
        struct gendisk *disk = req->rq_disk;
@@ -1022,6 +1042,7 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
        offset = ((__u64) req->sector) << 9;
        len = req->current_nr_sectors << 9;
 
+       io_req->req = req;
        io_req->fds[0] = (ubd_dev->cow.file != NULL) ? ubd_dev->cow.fd : ubd_dev->fd;
        io_req->fds[1] = ubd_dev->fd;
        io_req->cow_offset = -1;
@@ -1043,7 +1064,7 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
        return(0);
 }
 
-/* Called with ubd_io_lock held */
+/* Called with dev->lock held */
 static void do_ubd_request(request_queue_t *q)
 {
        struct io_thread_req io_req;
@@ -1102,7 +1123,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
                                 sizeof(ubd_id)))
                        return(-EFAULT);
                return(0);
-               
+
        case CDROMVOLREAD:
                if(copy_from_user(&volume, (char __user *) arg, sizeof(volume)))
                        return(-EFAULT);
index 9003a343e1484691880fb6ebf20cf0963609f7d6..c4b41bb1035f6f8ef10a193b92bea717650711fc 100644 (file)
@@ -30,14 +30,13 @@ struct chan {
 extern void chan_interrupt(struct list_head *chans, struct delayed_work *task,
                           struct tty_struct *tty, int irq);
 extern int parse_chan_pair(char *str, struct line *line, int device,
-                          const struct chan_opts *opts);
+                          const struct chan_opts *opts, char **error_out);
 extern int open_chan(struct list_head *chans);
 extern int write_chan(struct list_head *chans, const char *buf, int len,
                             int write_irq);
 extern int console_write_chan(struct list_head *chans, const char *buf, 
                              int len);
-extern int console_open_chan(struct line *line, struct console *co,
-                            const struct chan_opts *opts);
+extern int console_open_chan(struct line *line, struct console *co);
 extern void deactivate_chan(struct list_head *chans, int irq);
 extern void reactivate_chan(struct list_head *chans, int irq);
 extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);
index a795547a1dbdb5217563457761bd0f13c2a557e4..38f16d812e7c29d230aa6d72086ef2f3329b40eb 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -9,11 +9,11 @@
 #include "init.h"
 
 struct chan_opts {
-       void (*announce)(char *dev_name, int dev);
+       void (*const announce)(char *dev_name, int dev);
        char *xterm_title;
-       int raw;
-       unsigned long tramp_stack;
-       int in_kernel;
+       const int raw;
+       const unsigned long tramp_stack;
+       const int in_kernel;
 };
 
 enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE };
@@ -54,14 +54,3 @@ __uml_help(fn, prefix "[0-9]*=<channel description>\n" \
 );
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index cec9fcc57bf51f5169cbee6cf7fdc6f60555d5f8..173af029d12b6ec9280c28acbe851ad5b1f7443d 100644 (file)
@@ -61,7 +61,6 @@ extern int set_signals(int enable);
 extern void force_sigbus(void);
 extern int pid_to_processor_id(int pid);
 extern void deliver_signals(void *t);
-extern int next_syscall_index(int max);
 extern int next_trap_index(int max);
 extern void default_idle(void);
 extern void finish_fork(void);
@@ -88,7 +87,6 @@ extern void timer_irq(union uml_pt_regs *regs);
 extern void unprotect_stack(unsigned long stack);
 extern void do_uml_exitcalls(void);
 extern int attach_debugger(int idle_pid, int pid, int stop);
-extern void bad_segv(struct faultinfo fi, unsigned long ip);
 extern int config_gdb(char *str);
 extern int remove_gdb(void);
 extern char *uml_strdup(char *string);
@@ -104,8 +102,6 @@ extern int clear_user_proc(void *buf, int size);
 extern int copy_to_user_proc(void *to, void *from, int size);
 extern int copy_from_user_proc(void *to, void *from, int size);
 extern int strlen_user_proc(char *str);
-extern void bus_handler(int sig, union uml_pt_regs *regs);
-extern void winch(int sig, union uml_pt_regs *regs);
 extern long execute_syscall(void *r);
 extern int smp_sigio_handler(void);
 extern void *get_current(void);
@@ -120,7 +116,6 @@ extern void time_init_kern(void);
 
 /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */
 extern int __cant_sleep(void);
-extern void segv_handler(int sig, union uml_pt_regs *regs);
 extern void sigio_handler(int sig, union uml_pt_regs *regs);
 
 #endif
index 5f232ae89fbb8440a7dd4b4830011bb401f437d4..1223f2c844b4085c798e79400419bcb718dc979c 100644 (file)
 #include "linux/tty.h"
 #include "linux/interrupt.h"
 #include "linux/spinlock.h"
+#include "linux/mutex.h"
 #include "chan_user.h"
 #include "mconsole_kern.h"
 
+/* There's only one modifiable field in this - .mc.list */
 struct line_driver {
-       char *name;
-       char *device_name;
-       short major;
-       short minor_start;
-       short type;
-       short subtype;
-       int read_irq;
-       char *read_irq_name;
-       int write_irq;
-       char *write_irq_name;
-       char *symlink_from;
-       char *symlink_to;
+       const char *name;
+       const char *device_name;
+       const short major;
+       const short minor_start;
+       const short type;
+       const short subtype;
+       const int read_irq;
+       const char *read_irq_name;
+       const int write_irq;
+       const char *write_irq_name;
        struct mc_device mc;
 };
 
 struct line {
        struct tty_struct *tty;
+       spinlock_t count_lock;
+       int valid;
+
        char *init_str;
        int init_pri;
        struct list_head chan_list;
-       int valid;
-       int count;
-       int throttled;
+
        /*This lock is actually, mostly, local to*/
        spinlock_t lock;
-
+       int throttled;
        /* Yes, this is a real circular buffer.
         * XXX: And this should become a struct kfifo!
         *
@@ -57,22 +58,17 @@ struct line {
 };
 
 #define LINE_INIT(str, d) \
-       { .init_str =   str, \
+       { .count_lock = SPIN_LOCK_UNLOCKED, \
+         .init_str =   str,    \
          .init_pri =   INIT_STATIC, \
          .valid =      1, \
          .lock =       SPIN_LOCK_UNLOCKED, \
          .driver =     d }
 
-struct lines {
-       int num;
-};
-
-#define LINES_INIT(n) {  .num =        n }
-
 extern void line_close(struct tty_struct *tty, struct file * filp);
 extern int line_open(struct line *lines, struct tty_struct *tty);
 extern int line_setup(struct line *lines, unsigned int sizeof_lines,
-                     char *init);
+                     char *init, char **error_out);
 extern int line_write(struct tty_struct *tty, const unsigned char *buf,
                      int len);
 extern void line_put_char(struct tty_struct *tty, unsigned char ch);
@@ -90,17 +86,18 @@ extern char *add_xterm_umid(char *base);
 extern int line_setup_irq(int fd, int input, int output, struct line *line,
                          void *data);
 extern void line_close_chan(struct line *line);
-extern struct tty_driver * line_register_devfs(struct lines *set,
-                                              struct line_driver *line_driver,
-                                              const struct tty_operations *driver,
-                                              struct line *lines, int nlines);
+extern struct tty_driver *register_lines(struct line_driver *line_driver,
+                                        const struct tty_operations *driver,
+                                        struct line *lines, int nlines);
 extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts);
 extern void close_lines(struct line *lines, int nlines);
 
 extern int line_config(struct line *lines, unsigned int sizeof_lines,
-                      char *str, const struct chan_opts *opts);
+                      char *str, const struct chan_opts *opts,
+                      char **error_out);
 extern int line_id(char **str, int *start_out, int *end_out);
-extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n);
+extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n,
+                      char **error_out);
 extern int line_get_config(char *dev, struct line *lines,
                           unsigned int sizeof_lines, char *str,
                           int size, char **error_out);
index 1ea6d928e1cd2a5794057cebac2fa6636363048d..d2fe07e78958cb521c4aa3e439581da596b85efe 100644 (file)
@@ -18,10 +18,10 @@ struct mconsole_entry {
 struct mc_device {
        struct list_head list;
        char *name;
-       int (*config)(char *);
+       int (*config)(char *, char **);
        int (*get_config)(char *, char *, int, char **);
-        int (*id)(char **, int *, int *);
-       int (*remove)(int);
+       int (*id)(char **, int *, int *);
+       int (*remove)(int, char **);
 };
 
 #define CONFIG_CHUNK(str, size, current, chunk, end) \
@@ -50,14 +50,3 @@ static inline void mconsole_register_dev(struct mc_device *new)
 #endif
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 218f8b47fdcd7ea80543acca85bc4e2b0bd9e972..125ab42df18a4e53ec77319991df474a890092cc 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -36,7 +36,7 @@ struct uml_net_private {
        void (*remove)(void *);
        int (*read)(int, struct sk_buff **skb, struct uml_net_private *);
        int (*write)(int, struct sk_buff **skb, struct uml_net_private *);
-       
+
        void (*add_address)(unsigned char *, unsigned char *, void *);
        void (*delete_address)(unsigned char *, unsigned char *, void *);
        int (*set_mtu)(int mtu, void *);
@@ -52,18 +52,18 @@ struct net_kern_info {
 
 struct transport {
        struct list_head list;
-       char *name;
-       int (*setup)(char *, char **, void *);
+       const char *name;
+       int (* const setup)(char *, char **, void *);
        const struct net_user_info *user;
        const struct net_kern_info *kern;
-       int private_size;
-       int setup_size;
+       const int private_size;
+       const int setup_size;
 };
 
 extern struct net_device *ether_init(int);
 extern unsigned short ether_protocol(struct sk_buff *);
 extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra);
-extern int tap_setup_common(char *str, char *type, char **dev_name, 
+extern int tap_setup_common(char *str, char *type, char **dev_name,
                            char **mac_out, char **gate_addr);
 extern void register_transport(struct transport *new);
 extern unsigned short eth_protocol(struct sk_buff *skb);
index 13a86bd383d3355fdaf4b30e9703b4968fb58ff8..8629bd1914925aba5d78f4348221c796fc323920 100644 (file)
@@ -137,7 +137,6 @@ extern int os_new_tty_pgrp(int fd, int pid);
 extern int os_get_ifname(int fd, char *namebuf);
 extern int os_set_slip(int fd);
 extern int os_set_owner(int fd, int pid);
-extern int os_sigio_async(int master, int slave);
 extern int os_mode_fd(int fd, int mode);
 
 extern int os_seek_file(int fd, __u64 offset);
@@ -341,4 +340,6 @@ extern void maybe_sigio_broken(int fd, int read);
 extern void sig_handler_common_skas(int sig, void *sc_ptr);
 extern void user_signal(int sig, union uml_pt_regs *regs, int pid);
 
+extern int os_arch_prctl(int pid, int code, unsigned long *addr);
+
 #endif
index fe99ea163c2e68eab0be8e7cecd183132a53e5e1..434f1a9ae4b354621f01d82eb3965cc8645af989 100644 (file)
@@ -12,14 +12,3 @@ extern void sigio_lock(void);
 extern void sigio_unlock(void);
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index e36d9e0f51058dc88f730701bcde3b72037a4816..d441eac936b9830014e4ec650562d10f262dc0f8 100644 (file)
@@ -9,13 +9,3 @@
 extern int make_tempfile(const char *template, char **tempname, int do_unlink);
 
 #endif
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/arch/um/include/umid.h b/arch/um/include/umid.h
deleted file mode 100644 (file)
index 11373c8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __UMID_H__
-#define __UMID_H__
-
-extern int umid_file_name(char *name, char *buf, int len);
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 6fa63a2a89e3855df6d351229cdca896c6c3a8f7..c5cf4a0827b0f130b20578c1a5c4fa0167249728 100644 (file)
@@ -7,7 +7,7 @@ extra-y := vmlinux.lds
 clean-files :=
 
 obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
-       physmem.o process.o ptrace.o reboot.o resource.o sigio.o \
+       physmem.o process.o ptrace.o reboot.o sigio.o \
        signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \
        um_arch.o umid.o
 
index 8d56ec6cca79606e8ee8d075e455e1f2b8d532d6..121166400e25a01917df9452560e2fc12bfba882 100644 (file)
@@ -39,9 +39,9 @@ static long execve1(char *file, char __user * __user *argv,
                    char __user *__user *env)
 {
         long error;
+#ifdef CONFIG_TTY_LOG
        struct tty_struct *tty;
 
-#ifdef CONFIG_TTY_LOG
        mutex_lock(&tty_mutex);
        tty = get_current_tty();
        if (tty)
index 5c1e611f628d548fed1716c75d5537c39d6b8cc4..50a288bb875a87ec10e977db3f366358c15d29d8 100644 (file)
@@ -79,7 +79,7 @@ skip:
        return 0;
 }
 
-struct irq_fd *active_fds = NULL;
+static struct irq_fd *active_fds = NULL;
 static struct irq_fd **last_irq_ptr = &active_fds;
 
 extern void free_irqs(void);
@@ -124,8 +124,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
        if (err < 0)
                goto out;
 
-       new_fd = um_kmalloc(sizeof(*new_fd));
        err = -ENOMEM;
+       new_fd = kmalloc(sizeof(struct irq_fd), GFP_KERNEL);
        if (new_fd == NULL)
                goto out;
 
@@ -176,9 +176,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
                 */
                spin_unlock_irqrestore(&irq_lock, flags);
                kfree(tmp_pfd);
-               tmp_pfd = NULL;
 
-               tmp_pfd = um_kmalloc(n);
+               tmp_pfd = kmalloc(n, GFP_KERNEL);
                if (tmp_pfd == NULL)
                        goto out_kfree;
 
index c95855ba6ab576f7063f3bdf825efb8182a13b9a..e85d65deea0db9c46f16085c8f168e56e4a475c5 100644 (file)
@@ -24,8 +24,9 @@
 #include "init.h"
 #include "kern_constants.h"
 
-/* Changed during early boot */
+/* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
 unsigned long *empty_zero_page = NULL;
+/* allocated in paging_init and unchanged thereafter */
 unsigned long *empty_bad_page = NULL;
 pgd_t swapper_pg_dir[PTRS_PER_PGD];
 unsigned long long highmem;
@@ -65,8 +66,8 @@ void mem_init(void)
 {
        max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT;
 
-        /* clear the zero-page */
-        memset((void *) empty_zero_page, 0, PAGE_SIZE);
+       /* clear the zero-page */
+       memset((void *) empty_zero_page, 0, PAGE_SIZE);
 
        /* Map in the area just after the brk now that kmalloc is about
         * to be turned on.
@@ -253,8 +254,10 @@ struct page *arch_validate(struct page *page, gfp_t mask, int order)
        int i;
 
  again:
-       if(page == NULL) return(page);
-       if(PageHighMem(page)) return(page);
+       if(page == NULL)
+               return page;
+       if(PageHighMem(page))
+               return page;
 
        addr = (unsigned long) page_address(page);
        for(i = 0; i < (1 << order); i++){
@@ -263,13 +266,15 @@ struct page *arch_validate(struct page *page, gfp_t mask, int order)
                                     sizeof(zero),
                                     &current->thread.fault_addr,
                                     &current->thread.fault_catcher)){
-                       if(!(mask & __GFP_WAIT)) return(NULL);
+                       if(!(mask & __GFP_WAIT))
+                               return NULL;
                        else break;
                }
                addr += PAGE_SIZE;
        }
 
-       if(i == (1 << order)) return(page);
+       if(i == (1 << order))
+               return page;
        page = alloc_pages(mask, order);
        goto again;
 }
@@ -283,7 +288,6 @@ void free_initmem(void)
 }
 
 #ifdef CONFIG_BLK_DEV_INITRD
-
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
        if (start < end)
@@ -296,37 +300,36 @@ void free_initrd_mem(unsigned long start, unsigned long end)
                totalram_pages++;
        }
 }
-       
 #endif
 
 void show_mem(void)
 {
-        int pfn, total = 0, reserved = 0;
-        int shared = 0, cached = 0;
-        int highmem = 0;
+       int pfn, total = 0, reserved = 0;
+       int shared = 0, cached = 0;
+       int highmem = 0;
        struct page *page;
 
-        printk("Mem-info:\n");
-        show_free_areas();
-        printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
-        pfn = max_mapnr;
-        while(pfn-- > 0) {
+       printk("Mem-info:\n");
+       show_free_areas();
+       printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
+       pfn = max_mapnr;
+       while(pfn-- > 0) {
                page = pfn_to_page(pfn);
-                total++;
-                if(PageHighMem(page))
-                        highmem++;
-                if(PageReserved(page))
-                        reserved++;
-                else if(PageSwapCache(page))
-                        cached++;
-                else if(page_count(page))
-                        shared += page_count(page) - 1;
-        }
-        printk("%d pages of RAM\n", total);
-        printk("%d pages of HIGHMEM\n", highmem);
-        printk("%d reserved pages\n", reserved);
-        printk("%d pages shared\n", shared);
-        printk("%d pages swap cached\n", cached);
+               total++;
+               if(PageHighMem(page))
+                       highmem++;
+               if(PageReserved(page))
+                       reserved++;
+               else if(PageSwapCache(page))
+                       cached++;
+               else if(page_count(page))
+                       shared += page_count(page) - 1;
+       }
+       printk("%d pages of RAM\n", total);
+       printk("%d pages of HIGHMEM\n", highmem);
+       printk("%d reserved pages\n", reserved);
+       printk("%d pages shared\n", shared);
+       printk("%d pages swap cached\n", cached);
 }
 
 /*
@@ -362,28 +365,7 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
        struct page *pte;
-   
+
        pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
        return pte;
 }
-
-struct iomem_region *iomem_regions = NULL;
-int iomem_size = 0;
-
-extern int parse_iomem(char *str, int *add) __init;
-
-__uml_setup("iomem=", parse_iomem,
-"iomem=<name>,<file>\n"
-"    Configure <file> as an IO memory region named <name>.\n\n"
-);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index abafa64b8727ecef4e0b35f04fbcae7d7551662a..638f3b5f6094a362968bca5c241a97a34cfe92fb 100644 (file)
@@ -40,7 +40,7 @@ static struct rb_node **find_rb(void *virt)
        while(*n != NULL){
                d = rb_entry(*n, struct phys_desc, rb);
                if(d->virt == virt)
-                       return(n);
+                       return n;
 
                if(d->virt > virt)
                        n = &(*n)->rb_left;
@@ -48,7 +48,7 @@ static struct rb_node **find_rb(void *virt)
                        n = &(*n)->rb_right;
        }
 
-       return(n);
+       return n;
 }
 
 static struct phys_desc *find_phys_mapping(void *virt)
@@ -56,9 +56,9 @@ static struct phys_desc *find_phys_mapping(void *virt)
        struct rb_node **n = find_rb(virt);
 
        if(*n == NULL)
-               return(NULL);
+               return NULL;
 
-       return(rb_entry(*n, struct phys_desc, rb));
+       return rb_entry(*n, struct phys_desc, rb);
 }
 
 static void insert_phys_mapping(struct phys_desc *desc)
@@ -89,10 +89,10 @@ static struct desc_mapping *find_mapping(int fd)
        list_for_each(ele, &descriptor_mappings){
                desc = list_entry(ele, struct desc_mapping, list);
                if(desc->fd == fd)
-                       return(desc);
+                       return desc;
        }
 
-       return(NULL);
+       return NULL;
 }
 
 static struct desc_mapping *descriptor_mapping(int fd)
@@ -101,11 +101,11 @@ static struct desc_mapping *descriptor_mapping(int fd)
 
        desc = find_mapping(fd);
        if(desc != NULL)
-               return(desc);
+               return desc;
 
        desc = kmalloc(sizeof(*desc), GFP_ATOMIC);
        if(desc == NULL)
-               return(NULL);
+               return NULL;
 
        *desc = ((struct desc_mapping)
                { .fd =         fd,
@@ -113,7 +113,7 @@ static struct desc_mapping *descriptor_mapping(int fd)
                  .pages =      LIST_HEAD_INIT(desc->pages) });
        list_add(&desc->list, &descriptor_mappings);
 
-       return(desc);
+       return desc;
 }
 
 int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w)
@@ -125,11 +125,11 @@ int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w)
 
        fd_maps = descriptor_mapping(fd);
        if(fd_maps == NULL)
-               return(-ENOMEM);
+               return -ENOMEM;
 
        phys = __pa(virt);
        desc = find_phys_mapping(virt);
-       if(desc != NULL)
+       if(desc != NULL)
                panic("Address 0x%p is already substituted\n", virt);
 
        err = -ENOMEM;
@@ -155,7 +155,7 @@ int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w)
        rb_erase(&desc->rb, &phys_mappings);
        kfree(desc);
  out:
-       return(err);
+       return err;
 }
 
 static int physmem_fd = -1;
@@ -182,10 +182,10 @@ int physmem_remove_mapping(void *virt)
        virt = (void *) ((unsigned long) virt & PAGE_MASK);
        desc = find_phys_mapping(virt);
        if(desc == NULL)
-               return(0);
+               return 0;
 
        remove_mapping(desc);
-       return(1);
+       return 1;
 }
 
 void physmem_forget_descriptor(int fd)
@@ -239,9 +239,9 @@ void arch_free_page(struct page *page, int order)
 
 int is_remapped(void *virt)
 {
-       struct phys_desc *desc = find_phys_mapping(virt);
+       struct phys_desc *desc = find_phys_mapping(virt);
 
-       return(desc != NULL);
+       return desc != NULL;
 }
 
 /* Changed during early boot */
@@ -276,7 +276,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
        else map = alloc_bootmem_low_pages(total_len);
 
        if(map == NULL)
-               return(-ENOMEM);
+               return -ENOMEM;
 
        for(i = 0; i < total_pages; i++){
                p = &map[i];
@@ -286,7 +286,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
        }
 
        max_mapnr = total_pages;
-       return(0);
+       return 0;
 }
 
 /* Changed during early boot */
@@ -296,7 +296,7 @@ unsigned long get_kmem_end(void)
 {
        if(kmem_top == 0)
                kmem_top = CHOOSE_MODE(kmem_end_tt, kmem_end_skas);
-       return(kmem_top);
+       return kmem_top;
 }
 
 void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
@@ -379,7 +379,7 @@ int phys_mapping(unsigned long phys, __u64 *offset_out)
                *offset_out = phys - iomem_size;
        }
 
-       return(fd);
+       return fd;
 }
 
 static int __init uml_mem_setup(char *line, int *add)
@@ -398,6 +398,23 @@ __uml_setup("mem=", uml_mem_setup,
 "      Example: mem=64M\n\n"
 );
 
+extern int __init parse_iomem(char *str, int *add);
+
+__uml_setup("iomem=", parse_iomem,
+"iomem=<name>,<file>\n"
+"    Configure <file> as an IO memory region named <name>.\n\n"
+);
+
+/*
+ * This list is constructed in parse_iomem and addresses filled in in
+ * setup_iomem, both of which run during early boot.  Afterwards, it's
+ * unchanged.
+ */
+struct iomem_region *iomem_regions = NULL;
+
+/* Initialized in parse_iomem */
+int iomem_size = 0;
+
 unsigned long find_iomem(char *driver, unsigned long *len_out)
 {
        struct iomem_region *region = iomem_regions;
@@ -405,13 +422,13 @@ unsigned long find_iomem(char *driver, unsigned long *len_out)
        while(region != NULL){
                if(!strcmp(region->driver, driver)){
                        *len_out = region->size;
-                       return(region->virt);
+                       return region->virt;
                }
 
                region = region->next;
        }
 
-       return(0);
+       return 0;
 }
 
 int setup_iomem(void)
@@ -435,18 +452,7 @@ int setup_iomem(void)
                region = region->next;
        }
 
-       return(0);
+       return 0;
 }
 
 __initcall(setup_iomem);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 9a77fb3c269d667d122c628fec3dd90d8fc4222a..627742d894347c7ca6eb51f989b1e4c259de0909 100644 (file)
@@ -18,6 +18,7 @@
 #include "kern_util.h"
 #include "skas_ptrace.h"
 #include "sysdep/ptrace.h"
+#include "os.h"
 
 static inline void set_singlestepping(struct task_struct *child, int on)
 {
@@ -240,6 +241,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                ret = 0;
                break;
        }
+#endif
+#ifdef PTRACE_ARCH_PRCTL
+        case PTRACE_ARCH_PRCTL:
+                /* XXX Calls ptrace on the host - needs some SMP thinking */
+                ret = arch_prctl_skas(child, data, (void *) addr);
+                break;
 #endif
        default:
                ret = ptrace_request(child, request, addr, data);
diff --git a/arch/um/kernel/resource.c b/arch/um/kernel/resource.c
deleted file mode 100644 (file)
index 32188e1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* 
- * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "linux/pci.h"
-
-unsigned long resource_fixup(struct pci_dev * dev, struct resource * res,
-                            unsigned long start, unsigned long size)
-{
-       return start;
-}
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 2b0ab438301c8bae8f8f4c3a6fe951b71f72e1dd..89f9866a1354b8073cf5f015bd4b80e276b6e9a4 100644 (file)
@@ -23,7 +23,7 @@ static irqreturn_t sigio_interrupt(int irq, void *data)
 
        os_read_file(sigio_irq_fd, &c, sizeof(c));
        reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
-       return(IRQ_HANDLED);
+       return IRQ_HANDLED;
 }
 
 int write_sigio_irq(int fd)
@@ -36,12 +36,13 @@ int write_sigio_irq(int fd)
        if(err){
                printk("write_sigio_irq : um_request_irq failed, err = %d\n",
                       err);
-               return(-1);
+               return -1;
        }
        sigio_irq_fd = fd;
-       return(0);
+       return 0;
 }
 
+/* These are called from os-Linux/sigio.c to protect its pollfds arrays. */
 static DEFINE_SPINLOCK(sigio_spinlock);
 
 void sigio_lock(void)
index 0d2cce621134b98e315c958f6addd43a8d0d1bf1..7c18dfcd7d8eee3446457ca928a867136cf880e2 100644 (file)
@@ -14,13 +14,9 @@ unsigned long set_task_sizes_skas(unsigned long *task_size_out)
        unsigned long host_task_size = ROUND_4M((unsigned long)
                                                &host_task_size);
 
-#ifdef CONFIG_HOST_TASK_SIZE
-       *host_size_out = ROUND_4M(CONFIG_HOST_TASK_SIZE);
-       *task_size_out = CONFIG_HOST_TASK_SIZE;
-#else
        if (!skas_needs_stub)
                *task_size_out = host_task_size;
        else *task_size_out = CONFIG_STUB_START & PGDIR_MASK;
-#endif
+
        return host_task_size;
 }
index f5ed8624648b88f0b0022a5994f202361fea19fb..2828c52832275fffa7b013e86cb70ea4867363f9 100644 (file)
@@ -149,22 +149,6 @@ long sys_olduname(struct oldold_utsname __user * name)
        return error;
 }
 
-DEFINE_SPINLOCK(syscall_lock);
-
-static int syscall_index = 0;
-
-int next_syscall_index(int limit)
-{
-       int ret;
-
-       spin_lock(&syscall_lock);
-       ret = syscall_index;
-       if(++syscall_index == limit)
-               syscall_index = 0;
-       spin_unlock(&syscall_lock);
-       return(ret);
-}
-
 int kernel_execve(const char *filename, char *const argv[], char *const envp[])
 {
        mm_segment_t fs;
index 239c98054dec4292f3444783240bf28958f7a850..f9e02b31a97af3dde7bb23437013d6e628b85761 100644 (file)
@@ -50,7 +50,7 @@ void dump_stack(void)
 EXPORT_SYMBOL(dump_stack);
 
 /*Stolen from arch/i386/kernel/traps.c */
-static int kstack_depth_to_print = 24;
+static const int kstack_depth_to_print = 24;
 
 /* This recently started being used in arch-independent code too, as in
  * kernel/sched.c.*/
index 2e354b3ca060649bb0cbd8afef6633637dc357a8..b1f8b0752419d8514763d6ca297674e6e7ceb03e 100644 (file)
@@ -35,31 +35,31 @@ unsigned long long sched_clock(void)
        return (unsigned long long)jiffies_64 * (1000000000 / HZ);
 }
 
-static unsigned long long prev_nsecs;
+static unsigned long long prev_nsecs[NR_CPUS];
 #ifdef CONFIG_UML_REAL_TIME_CLOCK
-static long long delta               /* Deviation per interval */
+static long long delta[NR_CPUS];               /* Deviation per interval */
 #endif
 
 void timer_irq(union uml_pt_regs *regs)
 {
        unsigned long long ticks = 0;
-
 #ifdef CONFIG_UML_REAL_TIME_CLOCK
-       if(prev_nsecs){
+       int c = cpu();
+       if(prev_nsecs[c]){
                /* We've had 1 tick */
                unsigned long long nsecs = os_nsecs();
 
-               delta += nsecs - prev_nsecs;
-               prev_nsecs = nsecs;
+               delta[c] += nsecs - prev_nsecs[c];
+               prev_nsecs[c] = nsecs;
 
                /* Protect against the host clock being set backwards */
-               if(delta < 0)
-                       delta = 0;
+               if(delta[c] < 0)
+                       delta[c] = 0;
 
-               ticks += (delta * HZ) / BILLION;
-               delta -= (ticks * BILLION) / HZ;
+               ticks += (delta[c] * HZ) / BILLION;
+               delta[c] -= (ticks * BILLION) / HZ;
        }
-       else prev_nsecs = os_nsecs();
+       else prev_nsecs[c] = os_nsecs();
 #else
        ticks = 1;
 #endif
@@ -69,8 +69,8 @@ void timer_irq(union uml_pt_regs *regs)
        }
 }
 
+/* Protects local_offset */
 static DEFINE_SPINLOCK(timer_spinlock);
-
 static unsigned long long local_offset = 0;
 
 static inline unsigned long long get_time(void)
index b5f124a2f6ae843b48d33ca02c2a9800a695578d..26f15c4585747c3bf1d95fef79276e628b69c7f6 100644 (file)
@@ -128,7 +128,18 @@ out_of_memory:
        goto out;
 }
 
-void segv_handler(int sig, union uml_pt_regs *regs)
+static void bad_segv(struct faultinfo fi, unsigned long ip)
+{
+       struct siginfo si;
+
+       si.si_signo = SIGSEGV;
+       si.si_code = SEGV_ACCERR;
+       si.si_addr = (void __user *) FAULT_ADDRESS(fi);
+       current->thread.arch.faultinfo = fi;
+       force_sig_info(SIGSEGV, &si, current);
+}
+
+static void segv_handler(int sig, union uml_pt_regs *regs)
 {
        struct faultinfo * fi = UPT_FAULTINFO(regs);
 
@@ -205,17 +216,6 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc)
        return(0);
 }
 
-void bad_segv(struct faultinfo fi, unsigned long ip)
-{
-       struct siginfo si;
-
-       si.si_signo = SIGSEGV;
-       si.si_code = SEGV_ACCERR;
-       si.si_addr = (void __user *) FAULT_ADDRESS(fi);
-       current->thread.arch.faultinfo = fi;
-       force_sig_info(SIGSEGV, &si, current);
-}
-
 void relay_signal(int sig, union uml_pt_regs *regs)
 {
        if(arch_handle_signal(sig, regs))
@@ -232,14 +232,14 @@ void relay_signal(int sig, union uml_pt_regs *regs)
        force_sig(sig, current);
 }
 
-void bus_handler(int sig, union uml_pt_regs *regs)
+static void bus_handler(int sig, union uml_pt_regs *regs)
 {
        if(current->thread.fault_catcher != NULL)
                do_longjmp(current->thread.fault_catcher, 1);
        else relay_signal(sig, regs);
 }
 
-void winch(int sig, union uml_pt_regs *regs)
+static void winch(int sig, union uml_pt_regs *regs)
 {
        do_IRQ(WINCH_IRQ, regs);
 }
index 786e4edd86c51bb9f3a03766d22ec8eb7c8dc55f..8eba8f7dca683cefaebb04f51be819a3f8362e68 100644 (file)
@@ -139,7 +139,7 @@ static void config_gdb_cb(void *arg)
        init_proxy(debugger_pid, 0, 0);
 }
 
-int gdb_config(char *str)
+int gdb_config(char *str, char **error_out)
 {
        struct gdb_data data;
 
@@ -154,7 +154,7 @@ void remove_gdb_cb(void *unused)
        exit_debugger_cb(NULL);
 }
 
-int gdb_remove(int unused)
+int gdb_remove(int unused, char **error_out)
 {
        initial_thread_cb(remove_gdb_cb, NULL);
         return 0;
index 68e1bf63cd0ad2e453010bc384161dfb74e75699..03b06bc00771596d55856641de8963ebb9c16e8c 100644 (file)
@@ -8,10 +8,11 @@
 
 #ifdef CONFIG_MCONSOLE
 
-extern int gdb_config(char *str);
-extern int gdb_remove(int n);
+extern int gdb_config(char *str, char **error_out);
+extern int gdb_remove(int n, char **error_out);
 
 static struct mc_device gdb_mc = {
+       .list           = INIT_LIST_HEAD(gdb_mc.list),
        .name           = "gdb",
        .config         = gdb_config,
        .remove         = gdb_remove,
index 66f43c906821b46de035417fdb1ca042b47eecad..84e57f6da1d3f8c87ce2af810b62914ad551cdbb 100644 (file)
@@ -30,7 +30,6 @@
 #include "kern.h"
 #include "mem_user.h"
 #include "mem.h"
-#include "umid.h"
 #include "initrd.h"
 #include "init.h"
 #include "os.h"
index 4eaee823bfd2a4979a32295f2bba60c6f9e41ccb..039e16efcd5571a7a520f051cf5efa1c61c61b54 100644 (file)
@@ -16,8 +16,10 @@ static int __init set_umid_arg(char *name, int *add)
 {
        int err;
 
-       if(umid_inited)
+       if(umid_inited){
+               printf("umid already set\n");
                return 0;
+       }
 
        *add = 0;
        err = set_umid(name);
index f897140cc4ae2ec6e76bb3610a510017f4679a7c..6ff12743a0bdbe3e396e78b19ac667b52265c74b 100644 (file)
@@ -24,9 +24,6 @@ struct aio_thread_req {
        struct aio_context *aio;
 };
 
-static int aio_req_fd_r = -1;
-static int aio_req_fd_w = -1;
-
 #if defined(HAVE_AIO_ABI)
 #include <linux/aio_abi.h>
 
@@ -111,6 +108,7 @@ static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf,
        return err;
 }
 
+/* Initialized in an initcall and unchanged thereafter */
 static aio_context_t ctx = 0;
 
 static int aio_thread(void *arg)
@@ -137,7 +135,7 @@ static int aio_thread(void *arg)
                        err = os_write_file(reply_fd, &reply, sizeof(reply));
                        if(err != sizeof(reply))
                                printk("aio_thread - write failed, fd = %d, "
-                                      "err = %d\n", aio_req_fd_r, -err);
+                                      "err = %d\n", reply_fd, -err);
                }
        }
        return 0;
@@ -182,6 +180,11 @@ out:
        return err;
 }
 
+/* These are initialized in initcalls and not changed */
+static int aio_req_fd_r = -1;
+static int aio_req_fd_w = -1;
+static int aio_pid = -1;
+
 static int not_aio_thread(void *arg)
 {
        struct aio_thread_req req;
@@ -208,14 +211,12 @@ static int not_aio_thread(void *arg)
                err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply));
                if(err != sizeof(reply))
                        printk("not_aio_thread - write failed, fd = %d, "
-                              "err = %d\n", aio_req_fd_r, -err);
+                              "err = %d\n", req.aio->reply_fd, -err);
        }
 
        return 0;
 }
 
-static int aio_pid = -1;
-
 static int init_aio_24(void)
 {
        unsigned long stack;
@@ -308,6 +309,7 @@ static int submit_aio_26(enum aio_type type, int io_fd, char *buf, int len,
 }
 #endif
 
+/* Initialized in an initcall and unchanged thereafter */
 static int aio_24 = DEFAULT_24_AIO;
 
 static int __init set_aio_24(char *name, int *add)
index 5a99dd3fbed0477bb7443eba1324e70f0dc4bcf4..3a8d7e3aae0a9e2cdc70d1bc547a8b636b614d29 100644 (file)
@@ -21,12 +21,11 @@ typedef Elf32_auxv_t elf_auxv_t;
 typedef Elf64_auxv_t elf_auxv_t;
 #endif
 
+/* These are initialized very early in boot and never changed */
 char * elf_aux_platform;
 long elf_aux_hwcap;
-
 unsigned long vsyscall_ehdr;
 unsigned long vsyscall_end;
-
 unsigned long __kernel_vsyscall;
 
 __init void scan_elf_aux( char **envp)
index 189fa677085a7880d9d8c7bdbcd4593de04a3ea1..371b4335f46dd2985fa852ef4a97abccc03080e5 100644 (file)
@@ -162,25 +162,6 @@ int os_set_owner(int fd, int pid)
        return 0;
 }
 
-/* FIXME? moved wholesale from sigio_user.c to get fcntls out of that file */
-int os_sigio_async(int master, int slave)
-{
-       int flags;
-
-       flags = fcntl(master, F_GETFL);
-       if(flags < 0)
-               return -errno;
-
-       if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
-          (fcntl(master, F_SETOWN, os_getpid()) < 0))
-               return -errno;
-
-       if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0))
-               return -errno;
-
-       return(0);
-}
-
 int os_mode_fd(int fd, int mode)
 {
        int err;
index d46b818c1311258934679b82fdd0685afeaecbca..d1b61d474e0a0a535423f74b097b851bf0b05677 100644 (file)
 #include "os.h"
 #include "um_malloc.h"
 
+/*
+ * Locked by irq_lock in arch/um/kernel/irq.c.  Changed by os_create_pollfd
+ * and os_free_irq_by_cb, which are called under irq_lock.
+ */
 static struct pollfd *pollfds = NULL;
 static int pollfds_num = 0;
 static int pollfds_size = 0;
@@ -58,7 +62,7 @@ int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds)
        if (pollfds_num == pollfds_size) {
                if (size_tmpfds <= pollfds_size * sizeof(pollfds[0])) {
                        /* return min size needed for new pollfds area */
-                       return((pollfds_size + 1) * sizeof(pollfds[0]));
+                       return (pollfds_size + 1) * sizeof(pollfds[0]);
                }
 
                if (pollfds != NULL) {
index 4203681e508d0a680635347c53a2168fdd3a68be..f1ea169db85e174cf2d6998043bce9d655eef0cd 100644 (file)
 
 #include <sys/param.h>
 
+/* Modified by which_tmpdir, which is called during early boot */
 static char *default_tmpdir = "/tmp";
+
+/*
+ *  Modified when creating the physical memory file and when checking
+ * the tmp filesystem for usability, both happening during early boot.
+ */
 static char *tempdir = NULL;
 
 static void __init find_tempdir(void)
@@ -29,7 +35,8 @@ static void __init find_tempdir(void)
        int i;
        char *dir = NULL;
 
-       if(tempdir != NULL) return;     /* We've already been called */
+       if(tempdir != NULL) /* We've already been called */
+               return;
        for(i = 0; dirs[i]; i++){
                dir = getenv(dirs[i]);
                if((dir != NULL) && (*dir != '\0'))
@@ -83,6 +90,7 @@ static int next(int fd, char *buf, int size, char c)
        return 1;
 }
 
+/* which_tmpdir is called only during early boot */
 static int checked_tmpdir = 0;
 
 /* Look for a tmpfs mounted at /dev/shm.  I couldn't find a cleaner
@@ -186,7 +194,7 @@ int make_tempfile(const char *template, char **out_tempname, int do_unlink)
        } else {
                free(tempname);
        }
-       return(fd);
+       return fd;
 out:
        free(tempname);
        return -1;
@@ -231,7 +239,7 @@ int create_tmp_file(unsigned long long len)
                exit(1);
        }
 
-       return(fd);
+       return fd;
 }
 
 int create_mem_file(unsigned long long len)
@@ -245,7 +253,7 @@ int create_mem_file(unsigned long long len)
                errno = -err;
                perror("exec_close");
        }
-       return(fd);
+       return fd;
 }
 
 
index 7fe92680c7dd8de39fef42309818df27546ff17a..5178eba9afa54fa779ab3af327e82259768d7fbf 100644 (file)
@@ -54,7 +54,7 @@ static int ptrace_child(void *arg)
                perror("ptrace");
                os_kill_process(pid, 0);
        }
-       os_stop_process(pid);
+       kill(pid, SIGSTOP);
 
        /*This syscall will be intercepted by the parent. Don't call more than
         * once, please.*/
@@ -73,6 +73,34 @@ static int ptrace_child(void *arg)
        _exit(ret);
 }
 
+static void fatal_perror(char *str)
+{
+       perror(str);
+       exit(1);
+}
+
+static void fatal(char *fmt, ...)
+{
+       va_list list;
+
+       va_start(list, fmt);
+       vprintf(fmt, list);
+       va_end(list);
+       fflush(stdout);
+
+       exit(1);
+}
+
+static void non_fatal(char *fmt, ...)
+{
+       va_list list;
+
+       va_start(list, fmt);
+       vprintf(fmt, list);
+       va_end(list);
+       fflush(stdout);
+}
+
 static int start_ptraced_child(void **stack_out)
 {
        void *stack;
@@ -82,20 +110,20 @@ static int start_ptraced_child(void **stack_out)
        stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
                     MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
        if(stack == MAP_FAILED)
-               panic("check_ptrace : mmap failed, errno = %d", errno);
+               fatal_perror("check_ptrace : mmap failed");
        sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
        pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
        if(pid < 0)
-               panic("start_ptraced_child : clone failed, errno = %d", errno);
+               fatal_perror("start_ptraced_child : clone failed");
        CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
        if(n < 0)
-               panic("check_ptrace : clone failed, errno = %d", errno);
+               fatal_perror("check_ptrace : clone failed");
        if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP))
-               panic("check_ptrace : expected SIGSTOP, got status = %d",
+               fatal("check_ptrace : expected SIGSTOP, got status = %d",
                      status);
 
        *stack_out = stack;
-       return(pid);
+       return pid;
 }
 
 /* When testing for SYSEMU support, if it is one of the broken versions, we
@@ -105,34 +133,34 @@ static int start_ptraced_child(void **stack_out)
  * must work anyway!
  */
 static int stop_ptraced_child(int pid, void *stack, int exitcode,
-                             int mustpanic)
+                             int mustexit)
 {
        int status, n, ret = 0;
 
        if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
-               panic("check_ptrace : ptrace failed, errno = %d", errno);
+               fatal_perror("stop_ptraced_child : ptrace failed");
        CATCH_EINTR(n = waitpid(pid, &status, 0));
        if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
                int exit_with = WEXITSTATUS(status);
                if (exit_with == 2)
-                       printf("check_ptrace : child exited with status 2. "
-                              "Serious trouble happening! Try updating your "
-                              "host skas patch!\nDisabling SYSEMU support.");
-               printf("check_ptrace : child exited with exitcode %d, while "
-                     "expecting %d; status 0x%x", exit_with,
-                     exitcode, status);
-               if (mustpanic)
-                       panic("\n");
-               else
-                       printf("\n");
+                       non_fatal("check_ptrace : child exited with status 2. "
+                                 "Serious trouble happening! Try updating "
+                                 "your host skas patch!\nDisabling SYSEMU "
+                                 "support.");
+               non_fatal("check_ptrace : child exited with exitcode %d, while "
+                         "expecting %d; status 0x%x\n", exit_with,
+                         exitcode, status);
+               if (mustexit)
+                       exit(1);
                ret = -1;
        }
 
        if(munmap(stack, PAGE_SIZE) < 0)
-               panic("check_ptrace : munmap failed, errno = %d", errno);
+               fatal_perror("check_ptrace : munmap failed");
        return ret;
 }
 
+/* Changed only during early boot */
 int ptrace_faultinfo = 1;
 int ptrace_ldt = 1;
 int proc_mm = 1;
@@ -160,6 +188,7 @@ __uml_setup("mode=skas0", mode_skas0_cmd_param,
                "    specify mode=tt. Note that this was recently added - on \n"
                "    older kernels you must use simply \"skas0\".\n\n");
 
+/* Changed only during early boot */
 static int force_sysemu_disabled = 0;
 
 static int __init nosysemu_cmd_param(char *str, int* add)
@@ -180,9 +209,9 @@ __uml_setup("nosysemu", nosysemu_cmd_param,
 static void __init check_sysemu(void)
 {
        void *stack;
-       int pid, n, status, count=0;
+       int pid, n, status, count=0;
 
-       printf("Checking syscall emulation patch for ptrace...");
+       non_fatal("Checking syscall emulation patch for ptrace...");
        sysemu_supported = 0;
        pid = start_ptraced_child(&stack);
 
@@ -191,31 +220,30 @@ static void __init check_sysemu(void)
 
        CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
        if (n < 0)
-               panic("check_sysemu : wait failed, errno = %d", errno);
+               fatal_perror("check_sysemu : wait failed");
        if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
-               panic("check_sysemu : expected SIGTRAP, "
-                     "got status = %d", status);
+               fatal("check_sysemu : expected SIGTRAP, got status = %d",
+                     status);
 
        n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET,
                   os_getpid());
        if(n < 0)
-               panic("check_sysemu : failed to modify system "
-                     "call return, errno = %d", errno);
+               fatal_perror("check_sysemu : failed to modify system call "
+                            "return");
 
        if (stop_ptraced_child(pid, stack, 0, 0) < 0)
                goto fail_stopped;
 
        sysemu_supported = 1;
-       printf("OK\n");
+       non_fatal("OK\n");
        set_using_sysemu(!force_sysemu_disabled);
 
-       printf("Checking advanced syscall emulation patch for ptrace...");
+       non_fatal("Checking advanced syscall emulation patch for ptrace...");
        pid = start_ptraced_child(&stack);
 
-       if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
-                 (void *) PTRACE_O_TRACESYSGOOD) < 0)
-               panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d",
-                     errno);
+       if((ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
+                  (void *) PTRACE_O_TRACESYSGOOD) < 0))
+               fatal_perror("check_ptrace: PTRACE_OLDSETOPTIONS failed");
 
        while(1){
                count++;
@@ -223,29 +251,30 @@ static void __init check_sysemu(void)
                        goto fail;
                CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
                if(n < 0)
-                       panic("check_ptrace : wait failed, errno = %d", errno);
+                       fatal_perror("check_ptrace : wait failed");
+
                if(WIFSTOPPED(status) && (WSTOPSIG(status) == (SIGTRAP|0x80))){
                        if (!count)
-                               panic("check_ptrace : SYSEMU_SINGLESTEP "
+                               fatal("check_ptrace : SYSEMU_SINGLESTEP "
                                      "doesn't singlestep");
                        n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET,
                                   os_getpid());
                        if(n < 0)
-                               panic("check_sysemu : failed to modify system "
-                                     "call return, errno = %d", errno);
+                               fatal_perror("check_sysemu : failed to modify "
+                                            "system call return");
                        break;
                }
                else if(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP))
                        count++;
                else
-                       panic("check_ptrace : expected SIGTRAP or "
-                             "(SIGTRAP|0x80), got status = %d", status);
+                       fatal("check_ptrace : expected SIGTRAP or "
+                             "(SIGTRAP | 0x80), got status = %d", status);
        }
        if (stop_ptraced_child(pid, stack, 0, 0) < 0)
                goto fail_stopped;
 
        sysemu_supported = 2;
-       printf("OK\n");
+       non_fatal("OK\n");
 
        if ( !force_sysemu_disabled )
                set_using_sysemu(sysemu_supported);
@@ -254,7 +283,7 @@ static void __init check_sysemu(void)
 fail:
        stop_ptraced_child(pid, stack, 1, 0);
 fail_stopped:
-       printf("missing\n");
+       non_fatal("missing\n");
 }
 
 static void __init check_ptrace(void)
@@ -262,22 +291,25 @@ static void __init check_ptrace(void)
        void *stack;
        int pid, syscall, n, status;
 
-       printf("Checking that ptrace can change system call numbers...");
+       non_fatal("Checking that ptrace can change system call numbers...");
        pid = start_ptraced_child(&stack);
 
-       if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
-               panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d", errno);
+       if((ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
+                  (void *) PTRACE_O_TRACESYSGOOD) < 0))
+               fatal_perror("check_ptrace: PTRACE_OLDSETOPTIONS failed");
 
        while(1){
                if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0)
-                       panic("check_ptrace : ptrace failed, errno = %d",
-                             errno);
+                       fatal_perror("check_ptrace : ptrace failed");
+
                CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
                if(n < 0)
-                       panic("check_ptrace : wait failed, errno = %d", errno);
-               if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP|0x80)))
-                       panic("check_ptrace : expected (SIGTRAP|0x80), "
-                             "got status = %d", status);
+                       fatal_perror("check_ptrace : wait failed");
+
+               if(!WIFSTOPPED(status) ||
+                  (WSTOPSIG(status) != (SIGTRAP | 0x80)))
+                       fatal("check_ptrace : expected (SIGTRAP|0x80), "
+                              "got status = %d", status);
 
                syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET,
                                 0);
@@ -285,13 +317,13 @@ static void __init check_ptrace(void)
                        n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_NR_OFFSET,
                                   __NR_getppid);
                        if(n < 0)
-                               panic("check_ptrace : failed to modify system "
-                                     "call, errno = %d", errno);
+                               fatal_perror("check_ptrace : failed to modify "
+                                            "system call");
                        break;
                }
        }
        stop_ptraced_child(pid, stack, 0, 1);
-       printf("OK\n");
+       non_fatal("OK\n");
        check_sysemu();
 }
 
@@ -350,22 +382,22 @@ static inline void check_skas3_ptrace_faultinfo(void)
        void *stack;
        int pid, n;
 
-       printf("  - PTRACE_FAULTINFO...");
+       non_fatal("  - PTRACE_FAULTINFO...");
        pid = start_ptraced_child(&stack);
 
        n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
        if (n < 0) {
                ptrace_faultinfo = 0;
                if(errno == EIO)
-                       printf("not found\n");
+                       non_fatal("not found\n");
                else
                        perror("not found");
        }
        else {
                if (!ptrace_faultinfo)
-                       printf("found but disabled on command line\n");
+                       non_fatal("found but disabled on command line\n");
                else
-                       printf("found\n");
+                       non_fatal("found\n");
        }
 
        init_registers(pid);
@@ -383,13 +415,13 @@ static inline void check_skas3_ptrace_ldt(void)
                .ptr = ldtbuf,
                .bytecount = sizeof(ldtbuf)};
 
-       printf("  - PTRACE_LDT...");
+       non_fatal("  - PTRACE_LDT...");
        pid = start_ptraced_child(&stack);
 
        n = ptrace(PTRACE_LDT, pid, 0, (unsigned long) &ldt_op);
        if (n < 0) {
                if(errno == EIO)
-                       printf("not found\n");
+                       non_fatal("not found\n");
                else {
                        perror("not found");
                }
@@ -397,9 +429,9 @@ static inline void check_skas3_ptrace_ldt(void)
        }
        else {
                if(ptrace_ldt)
-                       printf("found\n");
+                       non_fatal("found\n");
                else
-                       printf("found, but use is disabled\n");
+                       non_fatal("found, but use is disabled\n");
        }
 
        stop_ptraced_child(pid, stack, 1, 1);
@@ -414,22 +446,22 @@ static inline void check_skas3_ptrace_ldt(void)
 
 static inline void check_skas3_proc_mm(void)
 {
-       printf("  - /proc/mm...");
-       if (os_access("/proc/mm", OS_ACC_W_OK) < 0) {
-               proc_mm = 0;
-               printf("not found\n");
+       non_fatal("  - /proc/mm...");
+       if (access("/proc/mm", W_OK) < 0) {
+               proc_mm = 0;
+               perror("not found");
        }
        else {
                if (!proc_mm)
-                       printf("found but disabled on command line\n");
+                       non_fatal("found but disabled on command line\n");
                else
-                       printf("found\n");
+                       non_fatal("found\n");
        }
 }
 
 int can_do_skas(void)
 {
-       printf("Checking for the skas3 patch in the host:\n");
+       non_fatal("Checking for the skas3 patch in the host:\n");
 
        check_skas3_proc_mm();
        check_skas3_ptrace_faultinfo();
@@ -443,16 +475,16 @@ int can_do_skas(void)
 #else
 int can_do_skas(void)
 {
-       return(0);
+       return 0;
 }
 #endif
 
 int __init parse_iomem(char *str, int *add)
 {
        struct iomem_region *new;
-       struct uml_stat buf;
+       struct stat64 buf;
        char *file, *driver;
-       int fd, err, size;
+       int fd, size;
 
        driver = str;
        file = strchr(str,',');
@@ -462,15 +494,14 @@ int __init parse_iomem(char *str, int *add)
        }
        *file = '\0';
        file++;
-       fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0);
+       fd = open(file, O_RDWR, 0);
        if(fd < 0){
                os_print_error(fd, "parse_iomem - Couldn't open io file");
                goto out;
        }
 
-       err = os_stat_fd(fd, &buf);
-       if(err < 0){
-               os_print_error(err, "parse_iomem - cannot stat_fd file");
+       if(fstat64(fd, &buf) < 0){
+               perror("parse_iomem - cannot stat_fd file");
                goto out_close;
        }
 
@@ -480,7 +511,7 @@ int __init parse_iomem(char *str, int *add)
                goto out_close;
        }
 
-       size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1);
+       size = (buf.st_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1);
 
        *new = ((struct iomem_region) { .next           = iomem_regions,
                                        .driver         = driver,
@@ -491,11 +522,11 @@ int __init parse_iomem(char *str, int *add)
        iomem_regions = new;
        iomem_size += new->size + UM_KERN_PAGE_SIZE;
 
-       return(0);
+       return 0;
  out_close:
-       os_close_file(fd);
+       close(fd);
  out:
-       return(1);
+       return 1;
 }
 
 
@@ -526,6 +557,24 @@ static void openpty_cb(void *arg)
                info->err = -errno;
 }
 
+static int async_pty(int master, int slave)
+{
+       int flags;
+
+       flags = fcntl(master, F_GETFL);
+       if(flags < 0)
+               return -errno;
+
+       if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
+          (fcntl(master, F_SETOWN, os_getpid()) < 0))
+               return -errno;
+
+       if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0))
+               return -errno;
+
+       return(0);
+}
+
 static void __init check_one_sigio(void (*proc)(int, int))
 {
        struct sigaction old, new;
@@ -551,7 +600,7 @@ static void __init check_one_sigio(void (*proc)(int, int))
        if (err < 0)
                panic("check_sigio : __raw failed, errno = %d\n", -err);
 
-       err = os_sigio_async(master, slave);
+       err = async_pty(master, slave);
        if(err < 0)
                panic("tty_fds : sigio_async failed, err = %d\n", -err);
 
index 7cd0369e02b3b82970727bec506038ecb3cfd00c..79cd93c8c5ed62d08ebe0d1d99461e4f98105f1c 100644 (file)
@@ -34,27 +34,27 @@ void init_thread_registers(union uml_pt_regs *to)
 int save_fp_registers(int pid, unsigned long *fp_regs)
 {
        if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
-               return(-errno);
-       return(0);
+               return -errno;
+       return 0;
 }
 
 int restore_fp_registers(int pid, unsigned long *fp_regs)
 {
        if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
-               return(-errno);
-       return(0);
+               return -errno;
+       return 0;
 }
 
 static int move_registers(int pid, int int_op, union uml_pt_regs *regs,
                          int fp_op, unsigned long *fp_regs)
 {
        if(ptrace(int_op, pid, 0, regs->skas.regs) < 0)
-               return(-errno);
+               return -errno;
 
        if(ptrace(fp_op, pid, 0, fp_regs) < 0)
-               return(-errno);
+               return -errno;
 
-       return(0);
+       return 0;
 }
 
 void save_registers(int pid, union uml_pt_regs *regs)
index f67842a7735b80b09b6a7f1fbb13a1f98861a630..7955e061a678aaf3d7f29143b3a6ed65257ad391 100644 (file)
@@ -3,7 +3,7 @@
 # Licensed under the GPL
 #
 
-obj-$(CONFIG_MODE_SKAS) = registers.o signal.o
+obj-$(CONFIG_MODE_SKAS) = registers.o prctl.o signal.o
 
 USER_OBJS := $(obj-y)
 
diff --git a/arch/um/os-Linux/sys-x86_64/prctl.c b/arch/um/os-Linux/sys-x86_64/prctl.c
new file mode 100644 (file)
index 0000000..9d34edd
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2007 Jeff Dike (jdike@{addtoit.com,linux.intel.com})
+ * Licensed under the GPL
+ */
+
+#include <sys/ptrace.h>
+#include <linux/ptrace.h>
+
+int os_arch_prctl(int pid, int code, unsigned long *addr)
+{
+        return ptrace(PTRACE_ARCH_PRCTL, pid, (unsigned long) addr, code);
+}
index cb8e8a2632803c75d1c90db8b0b73cbbc86b6d07..a2d7e0c603f798efe99beb39da79b35f3ca9199e 100644 (file)
@@ -27,12 +27,12 @@ static int move_registers(int pid, int int_op, int fp_op,
                          union uml_pt_regs *regs)
 {
        if(ptrace(int_op, pid, 0, regs->skas.regs) < 0)
-               return(-errno);
+               return -errno;
 
        if(ptrace(fp_op, pid, 0, regs->skas.fp) < 0)
-               return(-errno);
+               return -errno;
 
-       return(0);
+       return 0;
 }
 
 void save_registers(int pid, union uml_pt_regs *regs)
index 48092b95c8ab997b4914a072afcd17f0e1aa7eda..b462863f7172fda8b98b5ac41f0d6367faf9e9ec 100644 (file)
@@ -18,7 +18,7 @@
 #define UMID_LEN 64
 
 /* Changed by set_umid, which is run early in boot */
-char umid[UMID_LEN] = { 0 };
+static char umid[UMID_LEN] = { 0 };
 
 /* Changed by set_uml_dir and make_uml_dir, which are run early in boot */
 static char *uml_dir = UML_DIR;
@@ -235,6 +235,7 @@ int __init set_umid(char *name)
        return 0;
 }
 
+/* Changed in make_umid, which is called during early boot */
 static int umid_setup = 0;
 
 int __init make_umid(void)
index 147bbf05cbc2fbc2d71e395f038ac97ce0387902..55b66e09a98cce2437969f49fdc477e08bb92311 100644 (file)
@@ -71,8 +71,6 @@ int poke_user(struct task_struct *child, long addr, long data)
 
         if (addr < MAX_REG_OFFSET)
                 return putreg(child, addr, data);
-
-#if 0 /* Need x86_64 debugregs handling */
         else if((addr >= offsetof(struct user, u_debugreg[0])) &&
                 (addr <= offsetof(struct user, u_debugreg[7]))){
                 addr -= offsetof(struct user, u_debugreg[0]);
@@ -81,7 +79,6 @@ int poke_user(struct task_struct *child, long addr, long data)
                 child->thread.arch.debugregs[addr] = data;
                 return 0;
         }
-#endif
         return -EIO;
 }
 
@@ -119,14 +116,12 @@ int peek_user(struct task_struct *child, long addr, long data)
         if(addr < MAX_REG_OFFSET){
                 tmp = getreg(child, addr);
         }
-#if 0 /* Need x86_64 debugregs handling */
         else if((addr >= offsetof(struct user, u_debugreg[0])) &&
                 (addr <= offsetof(struct user, u_debugreg[7]))){
                 addr -= offsetof(struct user, u_debugreg[0]);
                 addr = addr >> 2;
                 tmp = child->thread.arch.debugregs[addr];
         }
-#endif
         return put_user(tmp, (unsigned long *) data);
 }
 
index 73ce4463f70c6f96b2cd94f000b69df5a0da95ff..01b91f9fa7893647454f2a843f22a729197d78cb 100644 (file)
@@ -16,6 +16,7 @@
 #include "asm/prctl.h" /* XXX This should get the constants from libc */
 #include "choose-mode.h"
 #include "kern.h"
+#include "os.h"
 
 asmlinkage long sys_uname64(struct new_utsname __user * name)
 {
@@ -58,40 +59,69 @@ static long arch_prctl_tt(int code, unsigned long addr)
 
 #ifdef CONFIG_MODE_SKAS
 
-/* XXX: Must also call arch_prctl in the host, beside saving the segment bases! */
-static long arch_prctl_skas(int code, unsigned long addr)
+long arch_prctl_skas(struct task_struct *task, int code,
+                     unsigned long __user *addr)
 {
-       long ret = 0;
+        unsigned long *ptr = addr, tmp;
+       long ret;
+       int pid = task->mm->context.skas.id.u.pid;
 
+       /*
+        * With ARCH_SET_FS (and ARCH_SET_GS is treated similarly to
+        * be safe), we need to call arch_prctl on the host because
+        * setting %fs may result in something else happening (like a
+        * GDT or thread.fs being set instead).  So, we let the host
+        * fiddle the registers and thread struct and restore the
+        * registers afterwards.
+        *
+        * So, the saved registers are stored to the process (this
+        * needed because a stub may have been the last thing to run),
+        * arch_prctl is run on the host, then the registers are read
+        * back.
+        */
        switch(code){
        case ARCH_SET_FS:
-               current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr;
-               break;
        case ARCH_SET_GS:
-               current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr;
+                restore_registers(pid, &current->thread.regs.regs);
+                break;
+        case ARCH_GET_FS:
+        case ARCH_GET_GS:
+                /*
+                 * With these two, we read to a local pointer and
+                 * put_user it to the userspace pointer that we were
+                 * given.  If addr isn't valid (because it hasn't been
+                 * faulted in or is just bogus), we want put_user to
+                 * fault it in (or return -EFAULT) instead of having
+                 * the host return -EFAULT.
+                 */
+                ptr = &tmp;
+        }
+
+        ret = os_arch_prctl(pid, code, ptr);
+        if(ret)
+                return ret;
+
+        switch(code){
+       case ARCH_SET_FS:
+       case ARCH_SET_GS:
+                save_registers(pid, &current->thread.regs.regs);
                break;
        case ARCH_GET_FS:
-               ret = put_user(current->thread.regs.regs.skas.
-                               regs[FS_BASE / sizeof(unsigned long)],
-                               (unsigned long __user *)addr);
+               ret = put_user(tmp, addr);
                break;
        case ARCH_GET_GS:
-               ret = put_user(current->thread.regs.regs.skas.
-                               regs[GS_BASE / sizeof(unsigned long)],
-                               (unsigned long __user *)addr);
+               ret = put_user(tmp, addr);
                break;
-       default:
-               ret = -EINVAL;
-               break;
        }
 
-       return(ret);
+       return ret;
 }
 #endif
 
 long sys_arch_prctl(int code, unsigned long addr)
 {
-       return(CHOOSE_MODE_PROC(arch_prctl_tt, arch_prctl_skas, code, addr));
+       return CHOOSE_MODE_PROC(arch_prctl_tt, arch_prctl_skas, current, code,
+                                (unsigned long __user *) addr);
 }
 
 long sys_clone(unsigned long clone_flags, unsigned long newsp,
@@ -105,5 +135,14 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp,
        ret = do_fork(clone_flags, newsp, &current->thread.regs, 0, parent_tid,
                      child_tid);
        current->thread.forking = 0;
-       return(ret);
+       return ret;
+}
+
+void arch_switch_to_skas(struct task_struct *from, struct task_struct *to)
+{
+        if(to->thread.arch.fs == 0)
+                return;
+
+        arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs);
 }
+
index ce1bf1b81c431dcb859db4f25410a2758c226f19..febbc94be25fd423c890ac8f11d1859ca919217a 100644 (file)
@@ -1,14 +1,17 @@
 #include "linux/sched.h"
 
-void debug_arch_force_load_TLS(void)
-{
-}
-
 void clear_flushed_tls(struct task_struct *task)
 {
 }
 
 int arch_copy_tls(struct task_struct *t)
 {
+       /*
+        * If CLONE_SETTLS is set, we need to save the thread id
+        * (which is argument 5, child_tid, of clone) so it can be set
+        * during context switches.
+        */
+       t->thread.arch.fs = t->thread.regs.regs.skas.regs[R8 / sizeof(long)];
+
         return 0;
 }
index f0d4d72e560fe8e1b68700e6c87929da3239bae6..dbfab8fc9b49c2c4c6e620558401f57af2bedf50 100644 (file)
@@ -10,6 +10,9 @@ mainmenu "uClinux/v850 (w/o MMU) Kernel Configuration"
 config MMU
                bool
        default n
+config ZONE_DMA
+       bool
+       default y
 config RWSEM_GENERIC_SPINLOCK
        bool
        default y
index 40892d3e3c247ea2dbada930d4f65b5675f05993..0e429041a117606aa39674aa3d367ac684910a92 100644 (file)
@@ -114,7 +114,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
        { "ST",  IRQ_INTST(0),  IRQ_INTST_NUM,  3, 5 },
        { 0 }
 };
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
 
 static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
 
index 5352f8a5aa070191f9d0d027a0ac7bc420b10cb9..18437bc5c3ad29aa53eb221d0a1595aa7445aac2 100644 (file)
@@ -142,7 +142,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
        { "ST",  IRQ_INTST(0),  IRQ_INTST_NUM,  3, 5 },
        { 0 }
 };
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
 
 static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
 
index cb04a6954ccbc5d99b639d119bc36a50fa6f96ca..5c4923558a75c8f7b5620ccb7a5fb3f20df60f3a 100644 (file)
@@ -138,7 +138,7 @@ struct v850e_intc_irq_init irq_inits[] = {
        { "RPU", IRQ_RPU(0),    IRQ_RPU_NUM,    1, 6 },
        { 0 }
 };
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
 
 struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
 
index 25d636e79e6acfe59be1fc933632ad894e880a21..b2bcc251f65b8b1ec3c6c9a0d63845c25d99af69 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/signal.h>
+#include <linux/kernel.h>
 
 #include <asm/machdep.h>
 
@@ -36,7 +37,7 @@ struct used_gint {
        { 1, GBUS_INT_PRIORITY_HIGH },
        { 3, GBUS_INT_PRIORITY_LOW }
 };
-#define NUM_USED_GINTS (sizeof used_gint / sizeof used_gint[0])
+#define NUM_USED_GINTS ARRAY_SIZE(used_gint)
 
 /* A table of which GINT is used by each GBUS interrupts (they are
    assigned based on priority).  */
@@ -231,8 +232,7 @@ struct gbus_int_irq_init gbus_irq_inits[] __initdata = {
        { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6},
        { 0 }
 };
-#define NUM_GBUS_IRQ_INITS  \
-   ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1)
+#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
 
 static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
 
index 2aa8ab0f7edcb4f1198ae67205b9f815fdb6beaa..143774de75e1a590ca83a82018f10706bfa09be5 100644 (file)
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
        { "ST",  IRQ_INTST(0),  IRQ_INTST_NUM,  4, 5 },
        { 0 }
 };
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
 
 static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
 
index 14b0c8858aa46a8445dc44ee8f566316b0b04fbb..38be5c194f6b9a5ca782a2b71f07e66f60e0e7e3 100644 (file)
@@ -44,7 +44,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
        { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 },
        { 0 }
 };
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
 
 static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
 
index 0f7f6cd705a2d1eae01fa817054e462a577ef917..43018e1edebd13b6bf84558ef32628c13056c0af 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/irq.h>
 #include <linux/fs.h>
 #include <linux/module.h>
+#include <linux/kernel.h>
 
 #include <asm/machdep.h>
 #include <asm/v850e_uart.h>
@@ -176,8 +177,7 @@ static struct gbus_int_irq_init gbus_irq_inits[] = {
 #endif
        { 0 }
 };
-#define NUM_GBUS_IRQ_INITS  \
-   ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1)
+#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
 
 static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
 
index 35213fa9f7d829544c36e1223a6805df9cc4f004..35a4bd5515cb53c8903d612fc43ebda0a4cb5535 100644 (file)
@@ -70,8 +70,7 @@ static struct mb_pci_dev_irq mb_pci_dev_irqs[] = {
        /* PCI slot 2 */
        { 9,    IRQ_MB_A_PCI2(0),       1 }
 };
-#define NUM_MB_PCI_DEV_IRQS \
-  (sizeof mb_pci_dev_irqs / sizeof mb_pci_dev_irqs[0])
+#define NUM_MB_PCI_DEV_IRQS ARRAY_SIZE(mb_pci_dev_irqs)
 
 \f
 /* PCI configuration primitives.  */
index 3be355a029e27766c21f823661b435a524d06277..46803d48dffe2e5a14aec1c12813e8b6598f2465 100644 (file)
@@ -170,8 +170,7 @@ static struct cb_pic_irq_init cb_pic_irq_inits[] = {
        { "CB_EXTTM2",       IRQ_CB_EXTTM2,       1, 1, 6 },
        { 0 }
 };
-#define NUM_CB_PIC_IRQ_INITS  \
-   ((sizeof cb_pic_irq_inits / sizeof cb_pic_irq_inits[0]) - 1)
+#define NUM_CB_PIC_IRQ_INITS (ARRAY_SIZE(cb_pic_irq_inits) - 1)
 
 static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS];
 static unsigned char cb_pic_active_irqs = 0;
index 290d506650166633a691aecd1c953cfeff75cd16..699248f92aae104d2a9091384a1798b5bfd73a42 100644 (file)
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
        { "ST",  IRQ_INTST(0),  IRQ_INTST_NUM,  1, 5 },
        { 0 }
 };
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
 
 static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
 
index cd06f47c0ea7404bfd29f15f31e222ca9c2f5260..486e3a441c868d2ae97efd01fdab9d0e74de0b2e 100644 (file)
 
 #define TICK_SIZE      (tick_nsec / 1000)
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 /*
  * timer_interrupt() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
index 3a5fd07fe064cef52b7e0a7a0ec42bfb04192168..3563082212510b09eb92d922c2eedb28ea6d26ab 100644 (file)
                __root_fs_image_start = . ;                                   \
                *(.root)                                                      \
                __root_fs_image_end = . ;
+
+#ifdef CONFIG_BLK_DEV_INITRD
 /* The initramfs archive.  */
 #define INITRAMFS_CONTENTS                                                   \
                . = ALIGN (4) ;                                               \
                ___initramfs_start = . ;                                      \
                        *(.init.ramfs)                                        \
                ___initramfs_end = . ;
+#endif
+
 /* Where the initial bootmap (bitmap for the boot-time memory allocator) 
    should be place.  */
 #define BOOTMAP_CONTENTS                                                     \
index d4275537b25b6e8bc814f19215278da2633420f3..02dd39457bcf20cfb487dc1d34833427d714cce3 100644 (file)
@@ -44,6 +44,10 @@ config MMU
        bool
        default y
 
+config ZONE_DMA
+       bool
+       default y
+
 config ISA
        bool
 
index 5ce0bd486bbf35a90c31e4f9adb0cd918fb0f438..6efe04f3cbca8601bd39605d8e2085290953b73c 100644 (file)
@@ -300,12 +300,10 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top,
                bprm->loader += stack_base;
        bprm->exec += stack_base;
 
-       mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (!mpnt) 
                return -ENOMEM; 
 
-       memset(mpnt, 0, sizeof(*mpnt));
-
        down_write(&mm->mmap_sem);
        {
                mpnt->vm_mm = mm;
index b4aa875e175becbaa59b27f6a1be2554b1f6aca1..5f32cf4de5fb56e54cd0f5210c10cc62e8306866 100644 (file)
@@ -515,7 +515,7 @@ ia32_sys_call_table:
        .quad sys32_vm86_warning        /* vm86old */ 
        .quad compat_sys_wait4
        .quad sys_swapoff               /* 115 */
-       .quad sys32_sysinfo
+       .quad compat_sys_sysinfo
        .quad sys32_ipc
        .quad sys_fsync
        .quad stub32_sigreturn
index c9bac3af29d6a746be28d38a241667e78593df3f..200fdde18d968e70ce5d7bf2832db7e683a4f448 100644 (file)
@@ -523,72 +523,6 @@ sys32_sysfs(int option, u32 arg1, u32 arg2)
        return sys_sysfs(option, arg1, arg2);
 }
 
-struct sysinfo32 {
-        s32 uptime;
-        u32 loads[3];
-        u32 totalram;
-        u32 freeram;
-        u32 sharedram;
-        u32 bufferram;
-        u32 totalswap;
-        u32 freeswap;
-        unsigned short procs;
-       unsigned short pad; 
-        u32 totalhigh;
-        u32 freehigh;
-        u32 mem_unit;
-        char _f[20-2*sizeof(u32)-sizeof(int)];
-};
-
-asmlinkage long
-sys32_sysinfo(struct sysinfo32 __user *info)
-{
-       struct sysinfo s;
-       int ret;
-       mm_segment_t old_fs = get_fs ();
-       int bitcount = 0;
-       
-       set_fs (KERNEL_DS);
-       ret = sys_sysinfo((struct sysinfo __user *)&s);
-       set_fs (old_fs);
-
-        /* Check to see if any memory value is too large for 32-bit and scale
-        *  down if needed
-        */
-       if ((s.totalram >> 32) || (s.totalswap >> 32)) {
-               while (s.mem_unit < PAGE_SIZE) {
-                       s.mem_unit <<= 1;
-                       bitcount++;
-               }
-               s.totalram >>= bitcount;
-               s.freeram >>= bitcount;
-               s.sharedram >>= bitcount;
-               s.bufferram >>= bitcount;
-               s.totalswap >>= bitcount;
-               s.freeswap >>= bitcount;
-               s.totalhigh >>= bitcount;
-               s.freehigh >>= bitcount;
-       }
-
-       if (!access_ok(VERIFY_WRITE, info, sizeof(struct sysinfo32)) ||
-           __put_user (s.uptime, &info->uptime) ||
-           __put_user (s.loads[0], &info->loads[0]) ||
-           __put_user (s.loads[1], &info->loads[1]) ||
-           __put_user (s.loads[2], &info->loads[2]) ||
-           __put_user (s.totalram, &info->totalram) ||
-           __put_user (s.freeram, &info->freeram) ||
-           __put_user (s.sharedram, &info->sharedram) ||
-           __put_user (s.bufferram, &info->bufferram) ||
-           __put_user (s.totalswap, &info->totalswap) ||
-           __put_user (s.freeswap, &info->freeswap) ||
-           __put_user (s.procs, &info->procs) ||
-           __put_user (s.totalhigh, &info->totalhigh) || 
-           __put_user (s.freehigh, &info->freehigh) ||
-           __put_user (s.mem_unit, &info->mem_unit))
-               return -EFAULT;
-       return 0;
-}
-                
 asmlinkage long
 sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval)
 {
index fa09debad4b7c18b34966ebb3bd13bcca0937b9e..93c707257637cdea3b40eb472e7ab7baa442245f 100644 (file)
@@ -401,7 +401,6 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu,
        b = kzalloc(sizeof(struct threshold_block), GFP_KERNEL);
        if (!b)
                return -ENOMEM;
-       memset(b, 0, sizeof(struct threshold_block));
 
        b->block = block;
        b->bank = bank;
@@ -490,7 +489,6 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
                err = -ENOMEM;
                goto out;
        }
-       memset(b, 0, sizeof(struct threshold_bank));
 
        kobject_set_name(&b->kobj, "threshold_bank%i", bank);
        b->kobj.parent = &per_cpu(device_mce, cpu).kobj;
index 1e54ddf2338d7347149a1d3300294ce5d07f88b9..c360c42252444ad83eb20165b4d5ae8967dd06c5 100644 (file)
@@ -192,10 +192,14 @@ SECTIONS
      from .altinstructions and .eh_frame */
   .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
   .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
+
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(4096);
   __initramfs_start = .;
   .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
+
     . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
   __per_cpu_start = .;
   .data.percpu  : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
index a65fc6f1dcaff5ec3dd876a609a4f56fd3d7abf5..49e8cf2e06f8eca9d016386d8e91ec95c3de26b4 100644 (file)
@@ -69,27 +69,6 @@ static inline int notify_page_fault(enum die_val val, const char *str,
        return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args);
 }
 
-void bust_spinlocks(int yes)
-{
-       int loglevel_save = console_loglevel;
-       if (yes) {
-               oops_in_progress = 1;
-       } else {
-#ifdef CONFIG_VT
-               unblank_screen();
-#endif
-               oops_in_progress = 0;
-               /*
-                * OK, the message is on the console.  Now we call printk()
-                * without oops_in_progress set so that printk will give klogd
-                * a poke.  Hold onto your hats...
-                */
-               console_loglevel = 15;          /* NMI oopser may have shut the console up */
-               printk(" ");
-               console_loglevel = loglevel_save;
-       }
-}
-
 /* Sometimes the CPU reports invalid exceptions on prefetch.
    Check that here and ignore.
    Opcode checker based on code by Richard Brunner */
index 2e74cb0b7807fd986fa4993e9baf4044f8c015f9..7fbb44bea37f85048ebb8c6c55e2a9063477083d 100644 (file)
@@ -7,6 +7,10 @@ config FRAME_POINTER
        bool
        default n
 
+config ZONE_DMA
+       bool
+       default y
+
 config XTENSA
        bool
        default y
@@ -42,6 +46,9 @@ config ARCH_HAS_ILOG2_U64
        bool
        default n
 
+config NO_IOPORT
+       def_bool y
+
 source "init/Kconfig"
 
 menu "Processor type and features"
index a350431363a0a8c56080c170ab5a7ff88db2c50d..22949be4a5d8cc3c5d62f93b8779a67c3ecd451f 100644 (file)
@@ -38,15 +38,6 @@ unsigned long ccount_nsec;           /* nsec per ccount increment */
 unsigned int last_ccount_stamp;
 static long last_rtc_update = 0;
 
-/*
- * Scheduler clock - returns current tim in nanosec units.
- */
-
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
 static irqreturn_t timer_interrupt(int irq, void *dev_id);
 static struct irqaction timer_irqaction = {
        .handler =      timer_interrupt,
index a36c104c3a5295a05e89a0ef1eaf1c0d27b8cfd1..ab6370054cee709cdfccff4850d6fcdefb24ce9d 100644 (file)
@@ -203,10 +203,12 @@ SECTIONS
   .data.percpu  : { *(.data.percpu) }
   __per_cpu_end = .;
 
+#ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(4096);
   __initramfs_start =.;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
 
   /* We need this dummy segment here */
 
index d3679dd1d2201785e91194415d01736a16af54bc..d36b32ed22f4f7e5abf12112fbe95918115ae90f 100644 (file)
@@ -363,10 +363,9 @@ static int blk_trace_setup(request_queue_t *q, struct block_device *bdev,
        if (!bt->dropped_file)
                goto err;
 
-       bt->rchan = relay_open("trace", dir, buts.buf_size, buts.buf_nr, &blk_relay_callbacks);
+       bt->rchan = relay_open("trace", dir, buts.buf_size, buts.buf_nr, &blk_relay_callbacks, bt);
        if (!bt->rchan)
                goto err;
-       bt->rchan->private_data = bt;
 
        bt->act_mask = buts.act_mask;
        if (!bt->act_mask)
index f6962b64660ea67c6092c6303d7d52cd69bffbeb..e3f5eb9882cf4dfb403f6ca64f7262180b9db0fa 100644 (file)
@@ -61,7 +61,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
                                }
                        }
                        /* all seems OK */
-                       add_partition(disk, part, start, length);
+                       add_partition(disk, part, start, length, ADDPART_FLAG_NONE);
                        mutex_unlock(&bdev->bd_mutex);
                        return 0;
                case BLKPG_DEL_PARTITION:
index e7da9fa724ec5f50aa70040df67c10c2d7cbf2fe..050323fd79e9ae78f4f528ce260e08a8ec89f38b 100644 (file)
@@ -80,6 +80,8 @@ source "drivers/rtc/Kconfig"
 
 source "drivers/dma/Kconfig"
 
+source "drivers/auxdisplay/Kconfig"
+
 source "drivers/kvm/Kconfig"
 
 endmenu
index f28dcb4ec8b38e69d79e3e4e9263fa62e7e9cbc0..3a718f51350ed53e369609efb7086581656f7aca 100644 (file)
@@ -38,6 +38,7 @@ obj-$(CONFIG_ATA)             += ata/
 obj-$(CONFIG_FUSION)           += message/
 obj-$(CONFIG_IEEE1394)         += ieee1394/
 obj-y                          += cdrom/
+obj-y                          += auxdisplay/
 obj-$(CONFIG_MTD)              += mtd/
 obj-$(CONFIG_SPI)              += spi/
 obj-$(CONFIG_PCCARD)           += pcmcia/
index 5aab7bd473ac9325d5e327597ec474d059199184..8fccf018f165502f6d70b35bb9bad0f784344c20 100644 (file)
@@ -912,7 +912,6 @@ static int start_rx(struct atm_dev *dev)
                free_page((unsigned long) eni_dev->free_list);
                return -ENOMEM;
        }
-       memset(eni_dev->rx_map,0,PAGE_SIZE);
        eni_dev->rx_mult = DEFAULT_RX_MULT;
        eni_dev->fast = eni_dev->last_fast = NULL;
        eni_dev->slow = eni_dev->last_slow = NULL;
diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig
new file mode 100644 (file)
index 0000000..0300e7f
--- /dev/null
@@ -0,0 +1,109 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt.
+#
+# Auxiliary display drivers configuration.
+#
+
+menu "Auxiliary Display support"
+
+config KS0108
+       tristate "KS0108 LCD Controller"
+       depends on PARPORT_PC
+       default n
+       ---help---
+         If you have a LCD controlled by one or more KS0108
+         controllers, say Y. You will need also another more specific
+         driver for your LCD.
+
+         Depends on Parallel Port support. If you say Y at
+         parport, you will be able to compile this as a module (M)
+         and built-in as well (Y).
+
+         To compile this as a module, choose M here:
+         the module will be called ks0108.
+
+         If unsure, say N.
+
+config KS0108_PORT
+       hex "Parallel port where the LCD is connected"
+       depends on KS0108
+       default 0x378
+       ---help---
+         The address of the parallel port where the LCD is connected.
+
+         The first  standard parallel port address is 0x378.
+         The second standard parallel port address is 0x278.
+         The third  standard parallel port address is 0x3BC.
+
+         You can specify a different address if you need.
+
+         If you don't know what I'm talking about, load the parport module,
+         and execute "dmesg" or "cat /proc/ioports". You can see there how
+         many parallel ports are present and which address each one has.
+
+         Usually you only need to use 0x378.
+
+         If you compile this as a module, you can still override this
+         using the module parameters.
+
+config KS0108_DELAY
+       int "Delay between each control writing (microseconds)"
+       depends on KS0108
+       default "2"
+       ---help---
+         Amount of time the ks0108 should wait between each control write
+         to the parallel port.
+
+         If your driver seems to miss random writings, increment this.
+
+         If you don't know what I'm talking about, ignore it.
+
+         If you compile this as a module, you can still override this
+         value using the module parameters.
+
+config CFAG12864B
+       tristate "CFAG12864B LCD"
+       depends on X86
+       depends on FB
+       depends on KS0108
+       default n
+       ---help---
+         If you have a Crystalfontz 128x64 2-color LCD, cfag12864b Series,
+         say Y. You also need the ks0108 LCD Controller driver.
+
+         For help about how to wire your LCD to the parallel port,
+         check Documentation/auxdisplay/cfag12864b
+
+         Depends on the x86 arch and the framebuffer support.
+
+         The LCD framebuffer driver can be attached to a console.
+         It will work fine. However, you can't attach it to the fbdev driver
+         of the xorg server.
+
+         To compile this as a module, choose M here:
+         the modules will be called cfag12864b and cfag12864bfb.
+
+         If unsure, say N.
+
+config CFAG12864B_RATE
+       int "Refresh rate (hertz)"
+       depends on CFAG12864B
+       default "20"
+       ---help---
+         Refresh rate of the LCD.
+
+         As the LCD is not memory mapped, the driver has to make the work by
+         software. This means you should be careful setting this value higher.
+         If your CPUs are really slow or you feel the system is slowed down,
+         decrease the value.
+
+         Be careful modifying this value to a very high value:
+         You can freeze the computer, or the LCD maybe can't draw as fast as you
+         are requesting.
+
+         If you don't know what I'm talking about, ignore it.
+
+         If you compile this as a module, you can still override this
+         value using the module parameters.
+endmenu
diff --git a/drivers/auxdisplay/Makefile b/drivers/auxdisplay/Makefile
new file mode 100644 (file)
index 0000000..8a8936a
--- /dev/null
@@ -0,0 +1,6 @@
+#
+# Makefile for the kernel auxiliary displays device drivers.
+#
+
+obj-$(CONFIG_KS0108)           += ks0108.o
+obj-$(CONFIG_CFAG12864B)       += cfag12864b.o cfag12864bfb.o
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c
new file mode 100644 (file)
index 0000000..889583d
--- /dev/null
@@ -0,0 +1,383 @@
+/*
+ *    Filename: cfag12864b.c
+ *     Version: 0.1.0
+ * Description: cfag12864b LCD driver
+ *     License: GPLv2
+ *     Depends: ks0108
+ *
+ *      Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ *        Date: 2006-10-31
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/cdev.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/jiffies.h>
+#include <linux/mutex.h>
+#include <linux/uaccess.h>
+#include <linux/vmalloc.h>
+#include <linux/workqueue.h>
+#include <linux/ks0108.h>
+#include <linux/cfag12864b.h>
+
+
+#define CFAG12864B_NAME "cfag12864b"
+
+/*
+ * Module Parameters
+ */
+
+static unsigned int cfag12864b_rate = CONFIG_CFAG12864B_RATE;
+module_param(cfag12864b_rate, uint, S_IRUGO);
+MODULE_PARM_DESC(cfag12864b_rate,
+       "Refresh rate (hertzs)");
+
+unsigned int cfag12864b_getrate(void)
+{
+       return cfag12864b_rate;
+}
+
+/*
+ * cfag12864b Commands
+ *
+ *     E = Enable signal
+ *             Everytime E switch from low to high,
+ *             cfag12864b/ks0108 reads the command/data.
+ *
+ *     CS1 = First ks0108controller.
+ *             If high, the first ks0108 controller receives commands/data.
+ *
+ *     CS2 = Second ks0108 controller
+ *             If high, the second ks0108 controller receives commands/data.
+ *
+ *     DI = Data/Instruction
+ *             If low, cfag12864b will expect commands.
+ *             If high, cfag12864b will expect data.
+ *
+ */
+
+#define bit(n) (((unsigned char)1)<<(n))
+
+#define CFAG12864B_BIT_E       (0)
+#define CFAG12864B_BIT_CS1     (2)
+#define CFAG12864B_BIT_CS2     (1)
+#define CFAG12864B_BIT_DI      (3)
+
+static unsigned char cfag12864b_state;
+
+static void cfag12864b_set(void)
+{
+       ks0108_writecontrol(cfag12864b_state);
+}
+
+static void cfag12864b_setbit(unsigned char state, unsigned char n)
+{
+       if (state)
+               cfag12864b_state |= bit(n);
+       else
+               cfag12864b_state &= ~bit(n);
+}
+
+static void cfag12864b_e(unsigned char state)
+{
+       cfag12864b_setbit(state, CFAG12864B_BIT_E);
+       cfag12864b_set();
+}
+
+static void cfag12864b_cs1(unsigned char state)
+{
+       cfag12864b_setbit(state, CFAG12864B_BIT_CS1);
+}
+
+static void cfag12864b_cs2(unsigned char state)
+{
+       cfag12864b_setbit(state, CFAG12864B_BIT_CS2);
+}
+
+static void cfag12864b_di(unsigned char state)
+{
+       cfag12864b_setbit(state, CFAG12864B_BIT_DI);
+}
+
+static void cfag12864b_setcontrollers(unsigned char first,
+       unsigned char second)
+{
+       if (first)
+               cfag12864b_cs1(0);
+       else
+               cfag12864b_cs1(1);
+
+       if (second)
+               cfag12864b_cs2(0);
+       else
+               cfag12864b_cs2(1);
+}
+
+static void cfag12864b_controller(unsigned char which)
+{
+       if (which == 0)
+               cfag12864b_setcontrollers(1, 0);
+       else if (which == 1)
+               cfag12864b_setcontrollers(0, 1);
+}
+
+static void cfag12864b_displaystate(unsigned char state)
+{
+       cfag12864b_di(0);
+       cfag12864b_e(1);
+       ks0108_displaystate(state);
+       cfag12864b_e(0);
+}
+
+static void cfag12864b_address(unsigned char address)
+{
+       cfag12864b_di(0);
+       cfag12864b_e(1);
+       ks0108_address(address);
+       cfag12864b_e(0);
+}
+
+static void cfag12864b_page(unsigned char page)
+{
+       cfag12864b_di(0);
+       cfag12864b_e(1);
+       ks0108_page(page);
+       cfag12864b_e(0);
+}
+
+static void cfag12864b_startline(unsigned char startline)
+{
+       cfag12864b_di(0);
+       cfag12864b_e(1);
+       ks0108_startline(startline);
+       cfag12864b_e(0);
+}
+
+static void cfag12864b_writebyte(unsigned char byte)
+{
+       cfag12864b_di(1);
+       cfag12864b_e(1);
+       ks0108_writedata(byte);
+       cfag12864b_e(0);
+}
+
+static void cfag12864b_nop(void)
+{
+       cfag12864b_startline(0);
+}
+
+/*
+ * cfag12864b Internal Commands
+ */
+
+static void cfag12864b_on(void)
+{
+       cfag12864b_setcontrollers(1, 1);
+       cfag12864b_displaystate(1);
+}
+
+static void cfag12864b_off(void)
+{
+       cfag12864b_setcontrollers(1, 1);
+       cfag12864b_displaystate(0);
+}
+
+static void cfag12864b_clear(void)
+{
+       unsigned char i, j;
+
+       cfag12864b_setcontrollers(1, 1);
+       for (i = 0; i < CFAG12864B_PAGES; i++) {
+               cfag12864b_page(i);
+               cfag12864b_address(0);
+               for (j = 0; j < CFAG12864B_ADDRESSES; j++)
+                       cfag12864b_writebyte(0);
+       }
+}
+
+/*
+ * Update work
+ */
+
+unsigned char *cfag12864b_buffer;
+static unsigned char *cfag12864b_cache;
+static DEFINE_MUTEX(cfag12864b_mutex);
+static unsigned char cfag12864b_updating;
+static void cfag12864b_update(struct work_struct *delayed_work);
+static struct workqueue_struct *cfag12864b_workqueue;
+static DECLARE_DELAYED_WORK(cfag12864b_work, cfag12864b_update);
+
+static void cfag12864b_queue(void)
+{
+       queue_delayed_work(cfag12864b_workqueue, &cfag12864b_work,
+               HZ / cfag12864b_rate);
+}
+
+unsigned char cfag12864b_enable(void)
+{
+       unsigned char ret;
+
+       mutex_lock(&cfag12864b_mutex);
+
+       if (!cfag12864b_updating) {
+               cfag12864b_updating = 1;
+               cfag12864b_queue();
+               ret = 0;
+       } else
+               ret = 1;
+
+       mutex_unlock(&cfag12864b_mutex);
+
+       return ret;
+}
+
+void cfag12864b_disable(void)
+{
+       mutex_lock(&cfag12864b_mutex);
+
+       if (cfag12864b_updating) {
+               cfag12864b_updating = 0;
+               cancel_delayed_work(&cfag12864b_work);
+               flush_workqueue(cfag12864b_workqueue);
+       }
+
+       mutex_unlock(&cfag12864b_mutex);
+}
+
+unsigned char cfag12864b_isenabled(void)
+{
+       return cfag12864b_updating;
+}
+
+static void cfag12864b_update(struct work_struct *work)
+{
+       unsigned char c;
+       unsigned short i, j, k, b;
+
+       if (memcmp(cfag12864b_cache, cfag12864b_buffer, CFAG12864B_SIZE)) {
+               for (i = 0; i < CFAG12864B_CONTROLLERS; i++) {
+                       cfag12864b_controller(i);
+                       cfag12864b_nop();
+                       for (j = 0; j < CFAG12864B_PAGES; j++) {
+                               cfag12864b_page(j);
+                               cfag12864b_nop();
+                               cfag12864b_address(0);
+                               cfag12864b_nop();
+                               for (k = 0; k < CFAG12864B_ADDRESSES; k++) {
+                                       for (c = 0, b = 0; b < 8; b++)
+                                               if (cfag12864b_buffer
+                                                       [i * CFAG12864B_ADDRESSES / 8
+                                                       + k / 8 + (j * 8 + b) *
+                                                       CFAG12864B_WIDTH / 8]
+                                                       & bit(k % 8))
+                                                       c |= bit(b);
+                                       cfag12864b_writebyte(c);
+                               }
+                       }
+               }
+
+               memcpy(cfag12864b_cache, cfag12864b_buffer, CFAG12864B_SIZE);
+       }
+
+       if (cfag12864b_updating)
+               cfag12864b_queue();
+}
+
+/*
+ * cfag12864b Exported Symbols
+ */
+
+EXPORT_SYMBOL_GPL(cfag12864b_buffer);
+EXPORT_SYMBOL_GPL(cfag12864b_getrate);
+EXPORT_SYMBOL_GPL(cfag12864b_enable);
+EXPORT_SYMBOL_GPL(cfag12864b_disable);
+EXPORT_SYMBOL_GPL(cfag12864b_isenabled);
+
+/*
+ * Module Init & Exit
+ */
+
+static int __init cfag12864b_init(void)
+{
+       int ret = -EINVAL;
+
+       if (PAGE_SIZE < CFAG12864B_SIZE) {
+               printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
+                       "page size (%i) < cfag12864b size (%i)\n",
+                       (unsigned int)PAGE_SIZE, CFAG12864B_SIZE);
+               ret = -ENOMEM;
+               goto none;
+       }
+
+       cfag12864b_buffer = (unsigned char *) __get_free_page(GFP_KERNEL);
+       if (cfag12864b_buffer == NULL) {
+               printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
+                       "can't get a free page\n");
+               ret = -ENOMEM;
+               goto none;
+       }
+
+       cfag12864b_cache = kmalloc(sizeof(unsigned char) *
+               CFAG12864B_SIZE, GFP_KERNEL);
+       if (cfag12864b_buffer == NULL) {
+               printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
+                       "can't alloc cache buffer (%i bytes)\n",
+                       CFAG12864B_SIZE);
+               ret = -ENOMEM;
+               goto bufferalloced;
+       }
+
+       cfag12864b_workqueue = create_singlethread_workqueue(CFAG12864B_NAME);
+       if (cfag12864b_workqueue == NULL)
+               goto cachealloced;
+
+       memset(cfag12864b_buffer, 0, CFAG12864B_SIZE);
+
+       cfag12864b_clear();
+       cfag12864b_on();
+
+       return 0;
+
+cachealloced:
+       kfree(cfag12864b_cache);
+
+bufferalloced:
+       free_page((unsigned long) cfag12864b_buffer);
+
+none:
+       return ret;
+}
+
+static void __exit cfag12864b_exit(void)
+{
+       cfag12864b_disable();
+       cfag12864b_off();
+       destroy_workqueue(cfag12864b_workqueue);
+       kfree(cfag12864b_cache);
+       free_page((unsigned long) cfag12864b_buffer);
+}
+
+module_init(cfag12864b_init);
+module_exit(cfag12864b_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>");
+MODULE_DESCRIPTION("cfag12864b LCD driver");
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
new file mode 100644 (file)
index 0000000..94765e7
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ *    Filename: cfag12864bfb.c
+ *     Version: 0.1.0
+ * Description: cfag12864b LCD framebuffer driver
+ *     License: GPLv2
+ *     Depends: cfag12864b
+ *
+ *      Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ *        Date: 2006-10-31
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/fb.h>
+#include <linux/mm.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/uaccess.h>
+#include <linux/cfag12864b.h>
+
+#define CFAG12864BFB_NAME "cfag12864bfb"
+
+static struct fb_fix_screeninfo cfag12864bfb_fix __initdata = {
+       .id = "cfag12864b",
+       .type = FB_TYPE_PACKED_PIXELS,
+       .visual = FB_VISUAL_MONO10,
+       .xpanstep = 0,
+       .ypanstep = 0,
+       .ywrapstep = 0,
+       .line_length = CFAG12864B_WIDTH / 8,
+       .accel = FB_ACCEL_NONE,
+};
+
+static struct fb_var_screeninfo cfag12864bfb_var __initdata = {
+       .xres = CFAG12864B_WIDTH,
+       .yres = CFAG12864B_HEIGHT,
+       .xres_virtual = CFAG12864B_WIDTH,
+       .yres_virtual = CFAG12864B_HEIGHT,
+       .bits_per_pixel = 1,
+       .red = { 0, 1, 0 },
+       .green = { 0, 1, 0 },
+       .blue = { 0, 1, 0 },
+       .left_margin = 0,
+       .right_margin = 0,
+       .upper_margin = 0,
+       .lower_margin = 0,
+       .vmode = FB_VMODE_NONINTERLACED,
+};
+
+static int cfag12864bfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
+{
+       return vm_insert_page(vma, vma->vm_start,
+               virt_to_page(cfag12864b_buffer));
+}
+
+static struct fb_ops cfag12864bfb_ops = {
+       .owner = THIS_MODULE,
+       .fb_fillrect = cfb_fillrect,
+       .fb_copyarea = cfb_copyarea,
+       .fb_imageblit = cfb_imageblit,
+       .fb_mmap = cfag12864bfb_mmap,
+};
+
+static int __init cfag12864bfb_probe(struct platform_device *device)
+{
+       int ret = -EINVAL;
+       struct fb_info *info = framebuffer_alloc(0, &device->dev);
+
+       if (!info)
+               goto none;
+
+       info->screen_base = (char __iomem *) cfag12864b_buffer;
+       info->screen_size = CFAG12864B_SIZE;
+       info->fbops = &cfag12864bfb_ops;
+       info->fix = cfag12864bfb_fix;
+       info->var = cfag12864bfb_var;
+       info->pseudo_palette = NULL;
+       info->par = NULL;
+       info->flags = FBINFO_FLAG_DEFAULT;
+
+       if (register_framebuffer(info) < 0)
+               goto fballoced;
+
+       platform_set_drvdata(device, info);
+
+       printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node,
+               info->fix.id);
+
+       return 0;
+
+fballoced:
+       framebuffer_release(info);
+
+none:
+       return ret;
+}
+
+static int cfag12864bfb_remove(struct platform_device *device)
+{
+       struct fb_info *info = platform_get_drvdata(device);
+
+       if (info) {
+               unregister_framebuffer(info);
+               framebuffer_release(info);
+       }
+
+       return 0;
+}
+
+static struct platform_driver cfag12864bfb_driver = {
+       .probe  = cfag12864bfb_probe,
+       .remove = cfag12864bfb_remove,
+       .driver = {
+               .name   = CFAG12864BFB_NAME,
+       },
+};
+
+static struct platform_device *cfag12864bfb_device;
+
+static int __init cfag12864bfb_init(void)
+{
+       int ret;
+
+       if (cfag12864b_enable()) {
+               printk(KERN_ERR CFAG12864BFB_NAME ": ERROR: "
+                       "can't enable cfag12864b refreshing (being used)\n");
+               return -ENODEV;
+       }
+
+       ret = platform_driver_register(&cfag12864bfb_driver);
+
+       if (!ret) {
+               cfag12864bfb_device =
+                       platform_device_alloc(CFAG12864BFB_NAME, 0);
+
+               if (cfag12864bfb_device)
+                       ret = platform_device_add(cfag12864bfb_device);
+               else
+                       ret = -ENOMEM;
+
+               if (ret) {
+                       platform_device_put(cfag12864bfb_device);
+                       platform_driver_unregister(&cfag12864bfb_driver);
+               }
+       }
+
+       return ret;
+}
+
+static void __exit cfag12864bfb_exit(void)
+{
+       platform_device_unregister(cfag12864bfb_device);
+       platform_driver_unregister(&cfag12864bfb_driver);
+       cfag12864b_disable();
+}
+
+module_init(cfag12864bfb_init);
+module_exit(cfag12864bfb_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>");
+MODULE_DESCRIPTION("cfag12864b LCD framebuffer driver");
diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c
new file mode 100644 (file)
index 0000000..a637575
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ *    Filename: ks0108.c
+ *     Version: 0.1.0
+ * Description: ks0108 LCD Controller driver
+ *     License: GPLv2
+ *     Depends: parport
+ *
+ *      Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ *        Date: 2006-10-31
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/fs.h>
+#include <linux/io.h>
+#include <linux/parport.h>
+#include <linux/uaccess.h>
+#include <linux/ks0108.h>
+
+#define KS0108_NAME "ks0108"
+
+/*
+ * Module Parameters
+ */
+
+static unsigned int ks0108_port = CONFIG_KS0108_PORT;
+module_param(ks0108_port, uint, S_IRUGO);
+MODULE_PARM_DESC(ks0108_port, "Parallel port where the LCD is connected");
+
+static unsigned int ks0108_delay = CONFIG_KS0108_DELAY;
+module_param(ks0108_delay, uint, S_IRUGO);
+MODULE_PARM_DESC(ks0108_delay, "Delay between each control writing (microseconds)");
+
+/*
+ * Device
+ */
+
+static struct parport *ks0108_parport;
+static struct pardevice *ks0108_pardevice;
+
+/*
+ * ks0108 Exported Commands (don't lock)
+ *
+ *   You _should_ lock in the top driver: This functions _should not_
+ *   get race conditions in any way. Locking for each byte here would be
+ *   so slow and useless.
+ *
+ *   There are not bit definitions because they are not flags,
+ *   just arbitrary combinations defined by the documentation for each
+ *   function in the ks0108 LCD controller. If you want to know what means
+ *   a specific combination, look at the function's name.
+ *
+ *   The ks0108_writecontrol bits need to be reverted ^(0,1,3) because
+ *   the parallel port also revert them using a "not" logic gate.
+ */
+
+#define bit(n) (((unsigned char)1)<<(n))
+
+void ks0108_writedata(unsigned char byte)
+{
+       parport_write_data(ks0108_parport, byte);
+}
+
+void ks0108_writecontrol(unsigned char byte)
+{
+       udelay(ks0108_delay);
+       parport_write_control(ks0108_parport, byte ^ (bit(0) | bit(1) | bit(3)));
+}
+
+void ks0108_displaystate(unsigned char state)
+{
+       ks0108_writedata((state ? bit(0) : 0) | bit(1) | bit(2) | bit(3) | bit(4) | bit(5));
+}
+
+void ks0108_startline(unsigned char startline)
+{
+       ks0108_writedata(min(startline,(unsigned char)63) | bit(6) | bit(7));
+}
+
+void ks0108_address(unsigned char address)
+{
+       ks0108_writedata(min(address,(unsigned char)63) | bit(6));
+}
+
+void ks0108_page(unsigned char page)
+{
+       ks0108_writedata(min(page,(unsigned char)7) | bit(3) | bit(4) | bit(5) | bit(7));
+}
+
+EXPORT_SYMBOL_GPL(ks0108_writedata);
+EXPORT_SYMBOL_GPL(ks0108_writecontrol);
+EXPORT_SYMBOL_GPL(ks0108_displaystate);
+EXPORT_SYMBOL_GPL(ks0108_startline);
+EXPORT_SYMBOL_GPL(ks0108_address);
+EXPORT_SYMBOL_GPL(ks0108_page);
+
+/*
+ * Module Init & Exit
+ */
+
+static int __init ks0108_init(void)
+{
+       int result;
+       int ret = -EINVAL;
+
+       ks0108_parport = parport_find_base(ks0108_port);
+       if (ks0108_parport == NULL) {
+               printk(KERN_ERR KS0108_NAME ": ERROR: "
+                       "parport didn't find %i port\n", ks0108_port);
+               goto none;
+       }
+
+       ks0108_pardevice = parport_register_device(ks0108_parport, KS0108_NAME,
+               NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);
+       if (ks0108_pardevice == NULL) {
+               printk(KERN_ERR KS0108_NAME ": ERROR: "
+                       "parport didn't register new device\n");
+               goto none;
+       }
+
+       result = parport_claim(ks0108_pardevice);
+       if (result != 0) {
+               printk(KERN_ERR KS0108_NAME ": ERROR: "
+                       "can't claim %i parport, maybe in use\n", ks0108_port);
+               ret = result;
+               goto registered;
+       }
+
+       return 0;
+
+registered:
+       parport_unregister_device(ks0108_pardevice);
+
+none:
+       return ret;
+}
+
+static void __exit ks0108_exit(void)
+{
+       parport_release(ks0108_pardevice);
+       parport_unregister_device(ks0108_pardevice);
+}
+
+module_init(ks0108_init);
+module_exit(ks0108_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>");
+MODULE_DESCRIPTION("ks0108 LCD Controller driver");
+
index 001e6f6b9c1bf085130f3f286b2a45d1116abf62..475e33f76e0d3cefa8690e56ad046c17574c1231 100644 (file)
@@ -40,13 +40,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
        int n;
        int nid = dev->id;
        struct sysinfo i;
-       unsigned long inactive;
-       unsigned long active;
-       unsigned long free;
 
        si_meminfo_node(&i, nid);
-       __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid));
-
 
        n = sprintf(buf, "\n"
                       "Node %d MemTotal:     %8lu kB\n"
@@ -74,8 +69,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       nid, K(i.totalram),
                       nid, K(i.freeram),
                       nid, K(i.totalram - i.freeram),
-                      nid, K(active),
-                      nid, K(inactive),
+                      nid, node_page_state(nid, NR_ACTIVE),
+                      nid, node_page_state(nid, NR_INACTIVE),
 #ifdef CONFIG_HIGHMEM
                       nid, K(i.totalhigh),
                       nid, K(i.freehigh),
index 8d81a3a64c078bb4d2523ac51c2ef6ad6c10e7dc..6ad28dfb146908ec490b1c3657e70dcca75604b8 100644 (file)
@@ -177,7 +177,7 @@ static void DAC960_AnnounceDriver(DAC960_Controller_T *Controller)
   DAC960_Failure prints a standardized error message, and then returns false.
 */
 
-static boolean DAC960_Failure(DAC960_Controller_T *Controller,
+static bool DAC960_Failure(DAC960_Controller_T *Controller,
                              unsigned char *ErrorMessage)
 {
   DAC960_Error("While configuring DAC960 PCI RAID Controller at\n",
@@ -206,7 +206,7 @@ static boolean DAC960_Failure(DAC960_Controller_T *Controller,
   that are passed in.
  */
 
-static boolean init_dma_loaf(struct pci_dev *dev, struct dma_loaf *loaf,
+static bool init_dma_loaf(struct pci_dev *dev, struct dma_loaf *loaf,
                                                                 size_t len)
 {
        void *cpu_addr;
@@ -250,7 +250,7 @@ static void free_dma_loaf(struct pci_dev *dev, struct dma_loaf *loaf_handle)
   failure.
 */
 
-static boolean DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
+static bool DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
 {
   int CommandAllocationLength, CommandAllocationGroupSize;
   int CommandsRemaining = 0, CommandIdentifier, CommandGroupByteCount;
@@ -790,7 +790,7 @@ static void DAC960_ExecuteCommand(DAC960_Command_T *Command)
   on failure.
 */
 
-static boolean DAC960_V1_ExecuteType3(DAC960_Controller_T *Controller,
+static bool DAC960_V1_ExecuteType3(DAC960_Controller_T *Controller,
                                      DAC960_V1_CommandOpcode_T CommandOpcode,
                                      dma_addr_t DataDMA)
 {
@@ -814,7 +814,7 @@ static boolean DAC960_V1_ExecuteType3(DAC960_Controller_T *Controller,
   on failure.
 */
 
-static boolean DAC960_V1_ExecuteType3B(DAC960_Controller_T *Controller,
+static bool DAC960_V1_ExecuteType3B(DAC960_Controller_T *Controller,
                                       DAC960_V1_CommandOpcode_T CommandOpcode,
                                       unsigned char CommandOpcode2,
                                       dma_addr_t DataDMA)
@@ -840,7 +840,7 @@ static boolean DAC960_V1_ExecuteType3B(DAC960_Controller_T *Controller,
   on failure.
 */
 
-static boolean DAC960_V1_ExecuteType3D(DAC960_Controller_T *Controller,
+static bool DAC960_V1_ExecuteType3D(DAC960_Controller_T *Controller,
                                       DAC960_V1_CommandOpcode_T CommandOpcode,
                                       unsigned char Channel,
                                       unsigned char TargetID,
@@ -870,7 +870,7 @@ static boolean DAC960_V1_ExecuteType3D(DAC960_Controller_T *Controller,
   Return data in The controller's HealthStatusBuffer, which is dma-able memory
 */
 
-static boolean DAC960_V2_GeneralInfo(DAC960_Controller_T *Controller)
+static bool DAC960_V2_GeneralInfo(DAC960_Controller_T *Controller)
 {
   DAC960_Command_T *Command = DAC960_AllocateCommand(Controller);
   DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
@@ -908,7 +908,7 @@ static boolean DAC960_V2_GeneralInfo(DAC960_Controller_T *Controller)
   memory buffer.
 */
 
-static boolean DAC960_V2_NewControllerInfo(DAC960_Controller_T *Controller)
+static bool DAC960_V2_NewControllerInfo(DAC960_Controller_T *Controller)
 {
   DAC960_Command_T *Command = DAC960_AllocateCommand(Controller);
   DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
@@ -946,7 +946,7 @@ static boolean DAC960_V2_NewControllerInfo(DAC960_Controller_T *Controller)
   Data is returned in the controller's V2.NewLogicalDeviceInformation
 */
 
-static boolean DAC960_V2_NewLogicalDeviceInfo(DAC960_Controller_T *Controller,
+static bool DAC960_V2_NewLogicalDeviceInfo(DAC960_Controller_T *Controller,
                                           unsigned short LogicalDeviceNumber)
 {
   DAC960_Command_T *Command = DAC960_AllocateCommand(Controller);
@@ -997,7 +997,7 @@ static boolean DAC960_V2_NewLogicalDeviceInfo(DAC960_Controller_T *Controller,
 
 */
 
-static boolean DAC960_V2_NewPhysicalDeviceInfo(DAC960_Controller_T *Controller,
+static bool DAC960_V2_NewPhysicalDeviceInfo(DAC960_Controller_T *Controller,
                                            unsigned char Channel,
                                            unsigned char TargetID,
                                            unsigned char LogicalUnit)
@@ -1082,7 +1082,7 @@ static void DAC960_V2_ConstructNewUnitSerialNumber(
   memory buffer.
 */
 
-static boolean DAC960_V2_NewInquiryUnitSerialNumber(DAC960_Controller_T *Controller,
+static bool DAC960_V2_NewInquiryUnitSerialNumber(DAC960_Controller_T *Controller,
                        int Channel, int TargetID, int LogicalUnit)
 {
       DAC960_Command_T *Command;
@@ -1110,7 +1110,7 @@ static boolean DAC960_V2_NewInquiryUnitSerialNumber(DAC960_Controller_T *Control
   success and false on failure.
 */
 
-static boolean DAC960_V2_DeviceOperation(DAC960_Controller_T *Controller,
+static bool DAC960_V2_DeviceOperation(DAC960_Controller_T *Controller,
                                         DAC960_V2_IOCTL_Opcode_T IOCTL_Opcode,
                                         DAC960_V2_OperationDevice_T
                                           OperationDevice)
@@ -1142,7 +1142,7 @@ static boolean DAC960_V2_DeviceOperation(DAC960_Controller_T *Controller,
   other dma mapped memory.
 */
 
-static boolean DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
+static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
                                                      *Controller)
 {
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
@@ -1348,7 +1348,7 @@ skip_mailboxes:
   the structures that are contained in that region.
 */
 
-static boolean DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
+static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
                                                      *Controller)
 {
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
@@ -1526,7 +1526,7 @@ static boolean DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
   from DAC960 V1 Firmware Controllers and initializes the Controller structure.
 */
 
-static boolean DAC960_V1_ReadControllerConfiguration(DAC960_Controller_T
+static bool DAC960_V1_ReadControllerConfiguration(DAC960_Controller_T
                                                     *Controller)
 {
   DAC960_V1_Enquiry2_T *Enquiry2;
@@ -1767,7 +1767,7 @@ static boolean DAC960_V1_ReadControllerConfiguration(DAC960_Controller_T
   from DAC960 V2 Firmware Controllers and initializes the Controller structure.
 */
 
-static boolean DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T
+static bool DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T
                                                     *Controller)
 {
   DAC960_V2_ControllerInfo_T *ControllerInfo =
@@ -1898,7 +1898,7 @@ static boolean DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T
   for Controller.
 */
 
-static boolean DAC960_ReportControllerConfiguration(DAC960_Controller_T
+static bool DAC960_ReportControllerConfiguration(DAC960_Controller_T
                                                    *Controller)
 {
   DAC960_Info("Configuring Mylex %s PCI RAID Controller\n",
@@ -1947,7 +1947,7 @@ static boolean DAC960_ReportControllerConfiguration(DAC960_Controller_T
   Controller.
 */
 
-static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
+static bool DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
                                                 *Controller)
 {
   struct dma_loaf local_dma;
@@ -2095,7 +2095,7 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
   device connected to Controller.
 */
 
-static boolean DAC960_V2_ReadDeviceConfiguration(DAC960_Controller_T
+static bool DAC960_V2_ReadDeviceConfiguration(DAC960_Controller_T
                                                 *Controller)
 {
   unsigned char Channel = 0, TargetID = 0, LogicalUnit = 0;
@@ -2219,7 +2219,7 @@ static void DAC960_SanitizeInquiryData(DAC960_SCSI_Inquiry_T
   Information for DAC960 V1 Firmware Controllers.
 */
 
-static boolean DAC960_V1_ReportDeviceConfiguration(DAC960_Controller_T
+static bool DAC960_V1_ReportDeviceConfiguration(DAC960_Controller_T
                                                   *Controller)
 {
   int LogicalDriveNumber, Channel, TargetID;
@@ -2316,7 +2316,7 @@ static boolean DAC960_V1_ReportDeviceConfiguration(DAC960_Controller_T
   Information for DAC960 V2 Firmware Controllers.
 */
 
-static boolean DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T
+static bool DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T
                                                   *Controller)
 {
   int PhysicalDeviceIndex, LogicalDriveNumber;
@@ -2501,7 +2501,7 @@ static boolean DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T
   associated with Controller.
 */
 
-static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
+static bool DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
 {
   int MajorNumber = DAC960_MAJOR + Controller->ControllerNumber;
   int n;
@@ -2582,7 +2582,7 @@ static void DAC960_ComputeGenericDiskInfo(DAC960_Controller_T *Controller)
   It returns true for fatal errors and false otherwise.
 */
 
-static boolean DAC960_ReportErrorStatus(DAC960_Controller_T *Controller,
+static bool DAC960_ReportErrorStatus(DAC960_Controller_T *Controller,
                                        unsigned char ErrorStatus,
                                        unsigned char Parameter0,
                                        unsigned char Parameter1)
@@ -3048,7 +3048,7 @@ Failure:
   DAC960_InitializeController initializes Controller.
 */
 
-static boolean 
+static bool 
 DAC960_InitializeController(DAC960_Controller_T *Controller)
 {
   if (DAC960_ReadControllerConfiguration(Controller) &&
@@ -3445,8 +3445,8 @@ static void DAC960_RequestFunction(struct request_queue *RequestQueue)
   individual Buffer.
 */
 
-static inline boolean DAC960_ProcessCompletedRequest(DAC960_Command_T *Command,
-                                                boolean SuccessfulIO)
+static inline bool DAC960_ProcessCompletedRequest(DAC960_Command_T *Command,
+                                                bool SuccessfulIO)
 {
        struct request *Request = Command->Request;
        int UpToDate;
@@ -3572,7 +3572,7 @@ static void DAC960_V1_ProcessCompletedCommand(DAC960_Command_T *Command)
   else if (CommandType == DAC960_ReadRetryCommand ||
           CommandType == DAC960_WriteRetryCommand)
     {
-      boolean normal_completion;
+      bool normal_completion;
 #ifdef FORCE_RETRY_FAILURE_DEBUG
       static int retry_count = 1;
 #endif
@@ -4659,7 +4659,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
   else if (CommandType == DAC960_ReadRetryCommand ||
           CommandType == DAC960_WriteRetryCommand)
     {
-      boolean normal_completion;
+      bool normal_completion;
 
 #ifdef FORCE_RETRY_FAILURE_DEBUG
       static int retry_count = 1;
@@ -5632,7 +5632,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
        &Controller->V2.ControllerInformation;
       unsigned int StatusChangeCounter =
        Controller->V2.HealthStatusBuffer->StatusChangeCounter;
-      boolean ForceMonitoringCommand = false;
+      bool ForceMonitoringCommand = false;
       if (time_after(jiffies, Controller->SecondaryMonitoringTime
          + DAC960_SecondaryMonitoringInterval))
        {
@@ -5696,7 +5696,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
   necessary.  It returns true if there is enough room and false otherwise.
 */
 
-static boolean DAC960_CheckStatusBuffer(DAC960_Controller_T *Controller,
+static bool DAC960_CheckStatusBuffer(DAC960_Controller_T *Controller,
                                        unsigned int ByteCount)
 {
   unsigned char *NewStatusBuffer;
@@ -5744,7 +5744,7 @@ static void DAC960_Message(DAC960_MessageLevel_T MessageLevel,
                           ...)
 {
   static unsigned char Buffer[DAC960_LineBufferSize];
-  static boolean BeginningOfLine = true;
+  static bool BeginningOfLine = true;
   va_list Arguments;
   int Length = 0;
   va_start(Arguments, Controller);
@@ -5837,7 +5837,7 @@ static void DAC960_Message(DAC960_MessageLevel_T MessageLevel,
   Channel and TargetID and returns true on success and false on failure.
 */
 
-static boolean DAC960_ParsePhysicalDevice(DAC960_Controller_T *Controller,
+static bool DAC960_ParsePhysicalDevice(DAC960_Controller_T *Controller,
                                          char *UserCommandString,
                                          unsigned char *Channel,
                                          unsigned char *TargetID)
@@ -5870,7 +5870,7 @@ static boolean DAC960_ParsePhysicalDevice(DAC960_Controller_T *Controller,
   returns true on success and false on failure.
 */
 
-static boolean DAC960_ParseLogicalDrive(DAC960_Controller_T *Controller,
+static bool DAC960_ParseLogicalDrive(DAC960_Controller_T *Controller,
                                        char *UserCommandString,
                                        unsigned char *LogicalDriveNumber)
 {
@@ -5951,7 +5951,7 @@ static void DAC960_V1_SetDeviceState(DAC960_Controller_T *Controller,
   Controllers.
 */
 
-static boolean DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,
+static bool DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,
                                            unsigned char *UserCommand)
 {
   DAC960_Command_T *Command;
@@ -6166,7 +6166,7 @@ failure:
   on failure.
 */
 
-static boolean DAC960_V2_TranslatePhysicalDevice(DAC960_Command_T *Command,
+static bool DAC960_V2_TranslatePhysicalDevice(DAC960_Command_T *Command,
                                                 unsigned char Channel,
                                                 unsigned char TargetID,
                                                 unsigned short
@@ -6213,7 +6213,7 @@ static boolean DAC960_V2_TranslatePhysicalDevice(DAC960_Command_T *Command,
   Controllers.
 */
 
-static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
+static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
                                            unsigned char *UserCommand)
 {
   DAC960_Command_T *Command;
index 6148073532b2951ec9172f6ea0fc069fec58baa0..f5e2436c39aa08936494f5867ef1e30b70796490 100644 (file)
 #define DAC690_V1_PciDmaMask   0xffffffff
 #define DAC690_V2_PciDmaMask   0xffffffffffffffffULL
 
-/*
-  Define a Boolean data type.
-*/
-
-typedef bool boolean;
-
-
 /*
   Define a 32/64 bit I/O Address data type.
 */
@@ -139,25 +132,25 @@ typedef struct DAC960_SCSI_Inquiry
   unsigned char PeripheralDeviceType:5;                        /* Byte 0 Bits 0-4 */
   unsigned char PeripheralQualifier:3;                 /* Byte 0 Bits 5-7 */
   unsigned char DeviceTypeModifier:7;                  /* Byte 1 Bits 0-6 */
-  boolean RMB:1;                                       /* Byte 1 Bit 7 */
+  bool RMB:1;                                          /* Byte 1 Bit 7 */
   unsigned char ANSI_ApprovedVersion:3;                        /* Byte 2 Bits 0-2 */
   unsigned char ECMA_Version:3;                                /* Byte 2 Bits 3-5 */
   unsigned char ISO_Version:2;                         /* Byte 2 Bits 6-7 */
   unsigned char ResponseDataFormat:4;                  /* Byte 3 Bits 0-3 */
   unsigned char :2;                                    /* Byte 3 Bits 4-5 */
-  boolean TrmIOP:1;                                    /* Byte 3 Bit 6 */
-  boolean AENC:1;                                      /* Byte 3 Bit 7 */
+  bool TrmIOP:1;                                       /* Byte 3 Bit 6 */
+  bool AENC:1;                                         /* Byte 3 Bit 7 */
   unsigned char AdditionalLength;                      /* Byte 4 */
   unsigned char :8;                                    /* Byte 5 */
   unsigned char :8;                                    /* Byte 6 */
-  boolean SftRe:1;                                     /* Byte 7 Bit 0 */
-  boolean CmdQue:1;                                    /* Byte 7 Bit 1 */
-  boolean :1;                                          /* Byte 7 Bit 2 */
-  boolean Linked:1;                                    /* Byte 7 Bit 3 */
-  boolean Sync:1;                                      /* Byte 7 Bit 4 */
-  boolean WBus16:1;                                    /* Byte 7 Bit 5 */
-  boolean WBus32:1;                                    /* Byte 7 Bit 6 */
-  boolean RelAdr:1;                                    /* Byte 7 Bit 7 */
+  bool SftRe:1;                                                /* Byte 7 Bit 0 */
+  bool CmdQue:1;                                       /* Byte 7 Bit 1 */
+  bool :1;                                             /* Byte 7 Bit 2 */
+  bool Linked:1;                                       /* Byte 7 Bit 3 */
+  bool Sync:1;                                         /* Byte 7 Bit 4 */
+  bool WBus16:1;                                       /* Byte 7 Bit 5 */
+  bool WBus32:1;                                       /* Byte 7 Bit 6 */
+  bool RelAdr:1;                                       /* Byte 7 Bit 7 */
   unsigned char VendorIdentification[8];               /* Bytes 8-15 */
   unsigned char ProductIdentification[16];             /* Bytes 16-31 */
   unsigned char ProductRevisionLevel[4];               /* Bytes 32-35 */
@@ -215,13 +208,13 @@ DAC960_SCSI_RequestSenseKey_T;
 typedef struct DAC960_SCSI_RequestSense
 {
   unsigned char ErrorCode:7;                           /* Byte 0 Bits 0-6 */
-  boolean Valid:1;                                     /* Byte 0 Bit 7 */
+  bool Valid:1;                                                /* Byte 0 Bit 7 */
   unsigned char SegmentNumber;                         /* Byte 1 */
   DAC960_SCSI_RequestSenseKey_T SenseKey:4;            /* Byte 2 Bits 0-3 */
   unsigned char :1;                                    /* Byte 2 Bit 4 */
-  boolean ILI:1;                                       /* Byte 2 Bit 5 */
-  boolean EOM:1;                                       /* Byte 2 Bit 6 */
-  boolean Filemark:1;                                  /* Byte 2 Bit 7 */
+  bool ILI:1;                                          /* Byte 2 Bit 5 */
+  bool EOM:1;                                          /* Byte 2 Bit 6 */
+  bool Filemark:1;                                     /* Byte 2 Bit 7 */
   unsigned char Information[4];                                /* Bytes 3-6 */
   unsigned char AdditionalSenseLength;                 /* Byte 7 */
   unsigned char CommandSpecificInformation[4];         /* Bytes 8-11 */
@@ -381,8 +374,8 @@ typedef struct DAC960_V1_Enquiry
   unsigned int LogicalDriveSizes[32];                  /* Bytes 4-131 */
   unsigned short FlashAge;                             /* Bytes 132-133 */
   struct {
-    boolean DeferredWriteError:1;                      /* Byte 134 Bit 0 */
-    boolean BatteryLow:1;                              /* Byte 134 Bit 1 */
+    bool DeferredWriteError:1;                         /* Byte 134 Bit 0 */
+    bool BatteryLow:1;                                 /* Byte 134 Bit 1 */
     unsigned char :6;                                  /* Byte 134 Bits 2-7 */
   } StatusFlags;
   unsigned char :8;                                    /* Byte 135 */
@@ -410,7 +403,7 @@ typedef struct DAC960_V1_Enquiry
   unsigned char RebuildCount;                          /* Byte 150 */
   struct {
     unsigned char :3;                                  /* Byte 151 Bits 0-2 */
-    boolean BatteryBackupUnitPresent:1;                        /* Byte 151 Bit 3 */
+    bool BatteryBackupUnitPresent:1;                   /* Byte 151 Bit 3 */
     unsigned char :3;                                  /* Byte 151 Bits 4-6 */
     unsigned char :1;                                  /* Byte 151 Bit 7 */
   } MiscFlags;
@@ -492,8 +485,8 @@ typedef struct DAC960_V1_Enquiry2
       DAC960_V1_ErrorCorrection_ECC =          0x2,
       DAC960_V1_ErrorCorrection_Last =         0x7
     } __attribute__ ((packed)) ErrorCorrection:3;      /* Byte 40 Bits 3-5 */
-    boolean FastPageMode:1;                            /* Byte 40 Bit 6 */
-    boolean LowPowerMemory:1;                          /* Byte 40 Bit 7 */
+    bool FastPageMode:1;                               /* Byte 40 Bit 6 */
+    bool LowPowerMemory:1;                             /* Byte 40 Bit 7 */
     unsigned char :8;                                  /* Bytes 41 */
   } MemoryType;
   unsigned short ClockSpeed;                           /* Bytes 42-43 */
@@ -538,7 +531,7 @@ typedef struct DAC960_V1_Enquiry2
       DAC960_V1_Ultra =                                0x1,
       DAC960_V1_Ultra2 =                       0x2
     } __attribute__ ((packed)) BusSpeed:2;             /* Byte 106 Bits 2-3 */
-    boolean Differential:1;                            /* Byte 106 Bit 4 */
+    bool Differential:1;                               /* Byte 106 Bit 4 */
     unsigned char :3;                                  /* Byte 106 Bits 5-7 */
   } SCSICapability;
   unsigned char :8;                                    /* Byte 107 */
@@ -554,10 +547,10 @@ typedef struct DAC960_V1_Enquiry2
   } __attribute__ ((packed)) FaultManagementType;      /* Byte 114 */
   unsigned char :8;                                    /* Byte 115 */
   struct {
-    boolean Clustering:1;                              /* Byte 116 Bit 0 */
-    boolean MylexOnlineRAIDExpansion:1;                        /* Byte 116 Bit 1 */
-    boolean ReadAhead:1;                               /* Byte 116 Bit 2 */
-    boolean BackgroundInitialization:1;                        /* Byte 116 Bit 3 */
+    bool Clustering:1;                                 /* Byte 116 Bit 0 */
+    bool MylexOnlineRAIDExpansion:1;                   /* Byte 116 Bit 1 */
+    bool ReadAhead:1;                                  /* Byte 116 Bit 2 */
+    bool BackgroundInitialization:1;                   /* Byte 116 Bit 3 */
     unsigned int :28;                                  /* Bytes 116-119 */
   } FirmwareFeatures;
   unsigned int :32;                                    /* Bytes 120-123 */
@@ -589,7 +582,7 @@ typedef struct DAC960_V1_LogicalDriveInformation
   unsigned int LogicalDriveSize;                       /* Bytes 0-3 */
   DAC960_V1_LogicalDriveState_T LogicalDriveState;     /* Byte 4 */
   unsigned char RAIDLevel:7;                           /* Byte 5 Bits 0-6 */
-  boolean WriteBack:1;                                 /* Byte 5 Bit 7 */
+  bool WriteBack:1;                                    /* Byte 5 Bit 7 */
   unsigned short :16;                                  /* Bytes 6-7 */
 }
 DAC960_V1_LogicalDriveInformation_T;
@@ -630,13 +623,13 @@ typedef struct DAC960_V1_EventLogEntry
   unsigned char :2;                                    /* Byte 3 Bits 6-7 */
   unsigned short SequenceNumber;                       /* Bytes 4-5 */
   unsigned char ErrorCode:7;                           /* Byte 6 Bits 0-6 */
-  boolean Valid:1;                                     /* Byte 6 Bit 7 */
+  bool Valid:1;                                                /* Byte 6 Bit 7 */
   unsigned char SegmentNumber;                         /* Byte 7 */
   DAC960_SCSI_RequestSenseKey_T SenseKey:4;            /* Byte 8 Bits 0-3 */
   unsigned char :1;                                    /* Byte 8 Bit 4 */
-  boolean ILI:1;                                       /* Byte 8 Bit 5 */
-  boolean EOM:1;                                       /* Byte 8 Bit 6 */
-  boolean Filemark:1;                                  /* Byte 8 Bit 7 */
+  bool ILI:1;                                          /* Byte 8 Bit 5 */
+  bool EOM:1;                                          /* Byte 8 Bit 6 */
+  bool Filemark:1;                                     /* Byte 8 Bit 7 */
   unsigned char Information[4];                                /* Bytes 9-12 */
   unsigned char AdditionalSenseLength;                 /* Byte 13 */
   unsigned char CommandSpecificInformation[4];         /* Bytes 14-17 */
@@ -670,7 +663,7 @@ DAC960_V1_PhysicalDeviceState_T;
 
 typedef struct DAC960_V1_DeviceState
 {
-  boolean Present:1;                                   /* Byte 0 Bit 0 */
+  bool Present:1;                                      /* Byte 0 Bit 0 */
   unsigned char :7;                                    /* Byte 0 Bits 1-7 */
   enum {
     DAC960_V1_OtherType =                      0x0,
@@ -678,12 +671,12 @@ typedef struct DAC960_V1_DeviceState
     DAC960_V1_SequentialType =                 0x2,
     DAC960_V1_CDROM_or_WORM_Type =             0x3
     } __attribute__ ((packed)) DeviceType:2;           /* Byte 1 Bits 0-1 */
-  boolean :1;                                          /* Byte 1 Bit 2 */
-  boolean Fast20:1;                                    /* Byte 1 Bit 3 */
-  boolean Sync:1;                                      /* Byte 1 Bit 4 */
-  boolean Fast:1;                                      /* Byte 1 Bit 5 */
-  boolean Wide:1;                                      /* Byte 1 Bit 6 */
-  boolean TaggedQueuingSupported:1;                    /* Byte 1 Bit 7 */
+  bool :1;                                             /* Byte 1 Bit 2 */
+  bool Fast20:1;                                       /* Byte 1 Bit 3 */
+  bool Sync:1;                                         /* Byte 1 Bit 4 */
+  bool Fast:1;                                         /* Byte 1 Bit 5 */
+  bool Wide:1;                                         /* Byte 1 Bit 6 */
+  bool TaggedQueuingSupported:1;                       /* Byte 1 Bit 7 */
   DAC960_V1_PhysicalDeviceState_T DeviceState;         /* Byte 2 */
   unsigned char :8;                                    /* Byte 3 */
   unsigned char SynchronousMultiplier;                 /* Byte 4 */
@@ -765,15 +758,15 @@ DAC960_V1_ErrorTable_T;
 typedef struct DAC960_V1_Config2
 {
   unsigned char :1;                                    /* Byte 0 Bit 0 */
-  boolean ActiveNegationEnabled:1;                     /* Byte 0 Bit 1 */
+  bool ActiveNegationEnabled:1;                                /* Byte 0 Bit 1 */
   unsigned char :5;                                    /* Byte 0 Bits 2-6 */
-  boolean NoRescanIfResetReceivedDuringScan:1;         /* Byte 0 Bit 7 */
-  boolean StorageWorksSupportEnabled:1;                        /* Byte 1 Bit 0 */
-  boolean HewlettPackardSupportEnabled:1;              /* Byte 1 Bit 1 */
-  boolean NoDisconnectOnFirstCommand:1;                        /* Byte 1 Bit 2 */
+  bool NoRescanIfResetReceivedDuringScan:1;            /* Byte 0 Bit 7 */
+  bool StorageWorksSupportEnabled:1;                   /* Byte 1 Bit 0 */
+  bool HewlettPackardSupportEnabled:1;                 /* Byte 1 Bit 1 */
+  bool NoDisconnectOnFirstCommand:1;                   /* Byte 1 Bit 2 */
   unsigned char :2;                                    /* Byte 1 Bits 3-4 */
-  boolean AEMI_ARM:1;                                  /* Byte 1 Bit 5 */
-  boolean AEMI_OFM:1;                                  /* Byte 1 Bit 6 */
+  bool AEMI_ARM:1;                                     /* Byte 1 Bit 5 */
+  bool AEMI_OFM:1;                                     /* Byte 1 Bit 6 */
   unsigned char :1;                                    /* Byte 1 Bit 7 */
   enum {
     DAC960_V1_OEMID_Mylex =                    0x00,
@@ -787,13 +780,13 @@ typedef struct DAC960_V1_Config2
   unsigned char PhysicalSector;                                /* Byte 4 */
   unsigned char LogicalSector;                         /* Byte 5 */
   unsigned char BlockFactor;                           /* Byte 6 */
-  boolean ReadAheadEnabled:1;                          /* Byte 7 Bit 0 */
-  boolean LowBIOSDelay:1;                              /* Byte 7 Bit 1 */
+  bool ReadAheadEnabled:1;                             /* Byte 7 Bit 0 */
+  bool LowBIOSDelay:1;                                 /* Byte 7 Bit 1 */
   unsigned char :2;                                    /* Byte 7 Bits 2-3 */
-  boolean ReassignRestrictedToOneSector:1;             /* Byte 7 Bit 4 */
+  bool ReassignRestrictedToOneSector:1;                        /* Byte 7 Bit 4 */
   unsigned char :1;                                    /* Byte 7 Bit 5 */
-  boolean ForceUnitAccessDuringWriteRecovery:1;                /* Byte 7 Bit 6 */
-  boolean EnableLeftSymmetricRAID5Algorithm:1;         /* Byte 7 Bit 7 */
+  bool ForceUnitAccessDuringWriteRecovery:1;           /* Byte 7 Bit 6 */
+  bool EnableLeftSymmetricRAID5Algorithm:1;            /* Byte 7 Bit 7 */
   unsigned char DefaultRebuildRate;                    /* Byte 8 */
   unsigned char :8;                                    /* Byte 9 */
   unsigned char BlocksPerCacheLine;                    /* Byte 10 */
@@ -805,10 +798,10 @@ typedef struct DAC960_V1_Config2
       DAC960_V1_Sync_5MHz =                    0x2,
       DAC960_V1_Sync_10or20MHz =               0x3     /* Byte 11 Bits 0-1 */
     } __attribute__ ((packed)) Speed:2;
-    boolean Force8Bit:1;                               /* Byte 11 Bit 2 */
-    boolean DisableFast20:1;                           /* Byte 11 Bit 3 */
+    bool Force8Bit:1;                                  /* Byte 11 Bit 2 */
+    bool DisableFast20:1;                              /* Byte 11 Bit 3 */
     unsigned char :3;                                  /* Byte 11 Bits 4-6 */
-    boolean EnableTaggedQueuing:1;                     /* Byte 11 Bit 7 */
+    bool EnableTaggedQueuing:1;                                /* Byte 11 Bit 7 */
   } __attribute__ ((packed)) ChannelParameters[6];     /* Bytes 12-17 */
   unsigned char SCSIInitiatorID;                       /* Byte 18 */
   unsigned char :8;                                    /* Byte 19 */
@@ -819,8 +812,8 @@ typedef struct DAC960_V1_Config2
   unsigned char SimultaneousDeviceSpinUpCount;         /* Byte 21 */
   unsigned char SecondsDelayBetweenSpinUps;            /* Byte 22 */
   unsigned char Reserved1[29];                         /* Bytes 23-51 */
-  boolean BIOSDisabled:1;                              /* Byte 52 Bit 0 */
-  boolean CDROMBootEnabled:1;                          /* Byte 52 Bit 1 */
+  bool BIOSDisabled:1;                                 /* Byte 52 Bit 0 */
+  bool CDROMBootEnabled:1;                             /* Byte 52 Bit 1 */
   unsigned char :3;                                    /* Byte 52 Bits 2-4 */
   enum {
     DAC960_V1_Geometry_128_32 =                        0x0,
@@ -849,7 +842,7 @@ typedef struct DAC960_V1_DCDB
     DAC960_V1_DCDB_DataTransferSystemToDevice = 2,
     DAC960_V1_DCDB_IllegalDataTransfer =       3
   } __attribute__ ((packed)) Direction:2;               /* Byte 1 Bits 0-1 */
-  boolean EarlyStatus:1;                                /* Byte 1 Bit 2 */
+  bool EarlyStatus:1;                                   /* Byte 1 Bit 2 */
   unsigned char :1;                                     /* Byte 1 Bit 3 */
   enum {
     DAC960_V1_DCDB_Timeout_24_hours =          0,
@@ -857,8 +850,8 @@ typedef struct DAC960_V1_DCDB
     DAC960_V1_DCDB_Timeout_60_seconds =                2,
     DAC960_V1_DCDB_Timeout_10_minutes =                3
   } __attribute__ ((packed)) Timeout:2;                         /* Byte 1 Bits 4-5 */
-  boolean NoAutomaticRequestSense:1;                    /* Byte 1 Bit 6 */
-  boolean DisconnectPermitted:1;                        /* Byte 1 Bit 7 */
+  bool NoAutomaticRequestSense:1;                       /* Byte 1 Bit 6 */
+  bool DisconnectPermitted:1;                           /* Byte 1 Bit 7 */
   unsigned short TransferLength;                        /* Bytes 2-3 */
   DAC960_BusAddress32_T BusAddress;                     /* Bytes 4-7 */
   unsigned char CDBLength:4;                            /* Byte 8 Bits 0-3 */
@@ -920,7 +913,7 @@ typedef union DAC960_V1_CommandMailbox
     DAC960_V1_CommandIdentifier_T CommandIdentifier;   /* Byte 1 */
     unsigned char Dummy1[5];                           /* Bytes 2-6 */
     unsigned char LogicalDriveNumber:6;                        /* Byte 7 Bits 0-6 */
-    boolean AutoRestore:1;                             /* Byte 7 Bit 7 */
+    bool AutoRestore:1;                                        /* Byte 7 Bit 7 */
     unsigned char Dummy2[8];                           /* Bytes 8-15 */
   } __attribute__ ((packed)) Type3C;
   struct {
@@ -1070,9 +1063,9 @@ typedef struct DAC960_V2_MemoryType
     DAC960_V2_MemoryType_SDRAM =               0x04,
     DAC960_V2_MemoryType_Last =                        0x1F
   } __attribute__ ((packed)) MemoryType:5;             /* Byte 0 Bits 0-4 */
-  boolean :1;                                          /* Byte 0 Bit 5 */
-  boolean MemoryParity:1;                              /* Byte 0 Bit 6 */
-  boolean MemoryECC:1;                                 /* Byte 0 Bit 7 */
+  bool :1;                                             /* Byte 0 Bit 5 */
+  bool MemoryParity:1;                                 /* Byte 0 Bit 6 */
+  bool MemoryECC:1;                                    /* Byte 0 Bit 7 */
 }
 DAC960_V2_MemoryType_T;
 
@@ -1187,13 +1180,13 @@ typedef struct DAC960_V2_ControllerInfo
   unsigned char OEM_Code;                              /* Byte 131 */
   unsigned char VendorName[16];                                /* Bytes 132-147 */
   /* Other Physical/Controller/Operation Information */
-  boolean BBU_Present:1;                               /* Byte 148 Bit 0 */
-  boolean ActiveActiveClusteringMode:1;                        /* Byte 148 Bit 1 */
+  bool BBU_Present:1;                                  /* Byte 148 Bit 0 */
+  bool ActiveActiveClusteringMode:1;                   /* Byte 148 Bit 1 */
   unsigned char :6;                                    /* Byte 148 Bits 2-7 */
   unsigned char :8;                                    /* Byte 149 */
   unsigned short :16;                                  /* Bytes 150-151 */
   /* Physical Device Scan Information */
-  boolean PhysicalScanActive:1;                                /* Byte 152 Bit 0 */
+  bool PhysicalScanActive:1;                           /* Byte 152 Bit 0 */
   unsigned char :7;                                    /* Byte 152 Bits 1-7 */
   unsigned char PhysicalDeviceChannelNumber;           /* Byte 153 */
   unsigned char PhysicalDeviceTargetID;                        /* Byte 154 */
@@ -1305,8 +1298,8 @@ typedef struct DAC960_V2_ControllerInfo
   unsigned int FreeIOP;                                        /* Bytes 468-471 */
   unsigned short MaximumCombLengthInBlocks;            /* Bytes 472-473 */
   unsigned short NumberOfConfigurationGroups;          /* Bytes 474-475 */
-  boolean InstallationAbortStatus:1;                   /* Byte 476 Bit 0 */
-  boolean MaintenanceModeStatus:1;                     /* Byte 476 Bit 1 */
+  bool InstallationAbortStatus:1;                      /* Byte 476 Bit 0 */
+  bool MaintenanceModeStatus:1;                                /* Byte 476 Bit 1 */
   unsigned int :24;                                    /* Bytes 476-479 */
   unsigned char Reserved10[32];                                /* Bytes 480-511 */
   unsigned char Reserved11[512];                       /* Bytes 512-1023 */
@@ -1357,33 +1350,33 @@ typedef struct DAC960_V2_LogicalDeviceInfo
       DAC960_V2_IntelligentWriteCacheEnabled = 0x3,
       DAC960_V2_WriteCache_Last =              0x7
     } __attribute__ ((packed)) WriteCache:3;           /* Byte 8 Bits 3-5 */
-    boolean :1;                                                /* Byte 8 Bit 6 */
-    boolean LogicalDeviceInitialized:1;                        /* Byte 8 Bit 7 */
+    bool :1;                                           /* Byte 8 Bit 6 */
+    bool LogicalDeviceInitialized:1;                   /* Byte 8 Bit 7 */
   } LogicalDeviceControl;                              /* Byte 8 */
   /* Logical Device Operations Status */
-  boolean ConsistencyCheckInProgress:1;                        /* Byte 9 Bit 0 */
-  boolean RebuildInProgress:1;                         /* Byte 9 Bit 1 */
-  boolean BackgroundInitializationInProgress:1;                /* Byte 9 Bit 2 */
-  boolean ForegroundInitializationInProgress:1;                /* Byte 9 Bit 3 */
-  boolean DataMigrationInProgress:1;                   /* Byte 9 Bit 4 */
-  boolean PatrolOperationInProgress:1;                 /* Byte 9 Bit 5 */
+  bool ConsistencyCheckInProgress:1;                   /* Byte 9 Bit 0 */
+  bool RebuildInProgress:1;                            /* Byte 9 Bit 1 */
+  bool BackgroundInitializationInProgress:1;           /* Byte 9 Bit 2 */
+  bool ForegroundInitializationInProgress:1;           /* Byte 9 Bit 3 */
+  bool DataMigrationInProgress:1;                      /* Byte 9 Bit 4 */
+  bool PatrolOperationInProgress:1;                    /* Byte 9 Bit 5 */
   unsigned char :2;                                    /* Byte 9 Bits 6-7 */
   unsigned char RAID5WriteUpdate;                      /* Byte 10 */
   unsigned char RAID5Algorithm;                                /* Byte 11 */
   unsigned short LogicalDeviceNumber;                  /* Bytes 12-13 */
   /* BIOS Info */
-  boolean BIOSDisabled:1;                              /* Byte 14 Bit 0 */
-  boolean CDROMBootEnabled:1;                          /* Byte 14 Bit 1 */
-  boolean DriveCoercionEnabled:1;                      /* Byte 14 Bit 2 */
-  boolean WriteSameDisabled:1;                         /* Byte 14 Bit 3 */
-  boolean HBA_ModeEnabled:1;                           /* Byte 14 Bit 4 */
+  bool BIOSDisabled:1;                                 /* Byte 14 Bit 0 */
+  bool CDROMBootEnabled:1;                             /* Byte 14 Bit 1 */
+  bool DriveCoercionEnabled:1;                         /* Byte 14 Bit 2 */
+  bool WriteSameDisabled:1;                            /* Byte 14 Bit 3 */
+  bool HBA_ModeEnabled:1;                              /* Byte 14 Bit 4 */
   enum {
     DAC960_V2_Geometry_128_32 =                        0x0,
     DAC960_V2_Geometry_255_63 =                        0x1,
     DAC960_V2_Geometry_Reserved1 =             0x2,
     DAC960_V2_Geometry_Reserved2 =             0x3
   } __attribute__ ((packed)) DriveGeometry:2;          /* Byte 14 Bits 5-6 */
-  boolean SuperReadAheadEnabled:1;                     /* Byte 14 Bit 7 */
+  bool SuperReadAheadEnabled:1;                                /* Byte 14 Bit 7 */
   unsigned char :8;                                    /* Byte 15 */
   /* Error Counters */
   unsigned short SoftErrors;                           /* Bytes 16-17 */
@@ -1446,13 +1439,13 @@ typedef struct DAC960_V2_PhysicalDeviceInfo
   unsigned char TargetID;                              /* Byte 2 */
   unsigned char LogicalUnit;                           /* Byte 3 */
   /* Configuration Status Bits */
-  boolean PhysicalDeviceFaultTolerant:1;               /* Byte 4 Bit 0 */
-  boolean PhysicalDeviceConnected:1;                   /* Byte 4 Bit 1 */
-  boolean PhysicalDeviceLocalToController:1;           /* Byte 4 Bit 2 */
+  bool PhysicalDeviceFaultTolerant:1;                  /* Byte 4 Bit 0 */
+  bool PhysicalDeviceConnected:1;                      /* Byte 4 Bit 1 */
+  bool PhysicalDeviceLocalToController:1;              /* Byte 4 Bit 2 */
   unsigned char :5;                                    /* Byte 4 Bits 3-7 */
   /* Multiple Host/Controller Status Bits */
-  boolean RemoteHostSystemDead:1;                      /* Byte 5 Bit 0 */
-  boolean RemoteControllerDead:1;                      /* Byte 5 Bit 1 */
+  bool RemoteHostSystemDead:1;                         /* Byte 5 Bit 0 */
+  bool RemoteControllerDead:1;                         /* Byte 5 Bit 1 */
   unsigned char :6;                                    /* Byte 5 Bits 2-7 */
   DAC960_V2_PhysicalDeviceState_T PhysicalDeviceState; /* Byte 6 */
   unsigned char NegotiatedDataWidthBits;               /* Byte 7 */
@@ -1464,12 +1457,12 @@ typedef struct DAC960_V2_PhysicalDeviceInfo
   unsigned char NetworkAddress[16];                    /* Bytes 16-31 */
   unsigned short MaximumTags;                          /* Bytes 32-33 */
   /* Physical Device Operations Status */
-  boolean ConsistencyCheckInProgress:1;                        /* Byte 34 Bit 0 */
-  boolean RebuildInProgress:1;                         /* Byte 34 Bit 1 */
-  boolean MakingDataConsistentInProgress:1;            /* Byte 34 Bit 2 */
-  boolean PhysicalDeviceInitializationInProgress:1;    /* Byte 34 Bit 3 */
-  boolean DataMigrationInProgress:1;                   /* Byte 34 Bit 4 */
-  boolean PatrolOperationInProgress:1;                 /* Byte 34 Bit 5 */
+  bool ConsistencyCheckInProgress:1;                   /* Byte 34 Bit 0 */
+  bool RebuildInProgress:1;                            /* Byte 34 Bit 1 */
+  bool MakingDataConsistentInProgress:1;               /* Byte 34 Bit 2 */
+  bool PhysicalDeviceInitializationInProgress:1;       /* Byte 34 Bit 3 */
+  bool DataMigrationInProgress:1;                      /* Byte 34 Bit 4 */
+  bool PatrolOperationInProgress:1;                    /* Byte 34 Bit 5 */
   unsigned char :2;                                    /* Byte 34 Bits 6-7 */
   unsigned char LongOperationStatus;                   /* Byte 35 */
   unsigned char ParityErrors;                          /* Byte 36 */
@@ -1555,14 +1548,14 @@ DAC960_V2_Event_T;
 
 typedef struct DAC960_V2_CommandControlBits
 {
-  boolean ForceUnitAccess:1;                           /* Byte 0 Bit 0 */
-  boolean DisablePageOut:1;                            /* Byte 0 Bit 1 */
-  boolean :1;                                          /* Byte 0 Bit 2 */
-  boolean AdditionalScatterGatherListMemory:1;         /* Byte 0 Bit 3 */
-  boolean DataTransferControllerToHost:1;              /* Byte 0 Bit 4 */
-  boolean :1;                                          /* Byte 0 Bit 5 */
-  boolean NoAutoRequestSense:1;                                /* Byte 0 Bit 6 */
-  boolean DisconnectProhibited:1;                      /* Byte 0 Bit 7 */
+  bool ForceUnitAccess:1;                              /* Byte 0 Bit 0 */
+  bool DisablePageOut:1;                               /* Byte 0 Bit 1 */
+  bool :1;                                             /* Byte 0 Bit 2 */
+  bool AdditionalScatterGatherListMemory:1;            /* Byte 0 Bit 3 */
+  bool DataTransferControllerToHost:1;                 /* Byte 0 Bit 4 */
+  bool :1;                                             /* Byte 0 Bit 5 */
+  bool NoAutoRequestSense:1;                           /* Byte 0 Bit 6 */
+  bool DisconnectProhibited:1;                         /* Byte 0 Bit 7 */
 }
 DAC960_V2_CommandControlBits_T;
 
@@ -1825,8 +1818,8 @@ typedef union DAC960_V2_CommandMailbox
     DAC960_V2_CommandTimeout_T CommandTimeout;         /* Byte 19 */
     unsigned char RequestSenseSize;                    /* Byte 20 */
     unsigned char IOCTL_Opcode;                                /* Byte 21 */
-    boolean RestoreConsistency:1;                      /* Byte 22 Bit 0 */
-    boolean InitializedAreaOnly:1;                     /* Byte 22 Bit 1 */
+    bool RestoreConsistency:1;                         /* Byte 22 Bit 0 */
+    bool InitializedAreaOnly:1;                                /* Byte 22 Bit 1 */
     unsigned char :6;                                  /* Byte 22 Bits 2-7 */
     unsigned char Reserved[9];                         /* Bytes 23-31 */
     DAC960_V2_DataTransferMemoryAddress_T
@@ -2190,7 +2183,7 @@ typedef union DAC960_V1_StatusMailbox
   struct {
     DAC960_V1_CommandIdentifier_T CommandIdentifier;   /* Byte 0 */
     unsigned char :7;                                  /* Byte 1 Bits 0-6 */
-    boolean Valid:1;                                   /* Byte 1 Bit 7 */
+    bool Valid:1;                                      /* Byte 1 Bit 7 */
     DAC960_V1_CommandStatus_T CommandStatus;           /* Bytes 2-3 */
   } Fields;
 }
@@ -2322,12 +2315,12 @@ typedef struct DAC960_Controller
   unsigned long ShutdownMonitoringTimer;
   unsigned long LastProgressReportTime;
   unsigned long LastCurrentStatusTime;
-  boolean ControllerInitialized;
-  boolean MonitoringCommandDeferred;
-  boolean EphemeralProgressMessage;
-  boolean DriveSpinUpMessageDisplayed;
-  boolean MonitoringAlertMode;
-  boolean SuppressEnclosureMessages;
+  bool ControllerInitialized;
+  bool MonitoringCommandDeferred;
+  bool EphemeralProgressMessage;
+  bool DriveSpinUpMessageDisplayed;
+  bool MonitoringAlertMode;
+  bool SuppressEnclosureMessages;
   struct timer_list MonitoringTimer;
   struct gendisk *disks[DAC960_MaxLogicalDrives];
   struct pci_pool *ScatterGatherPool;
@@ -2342,11 +2335,11 @@ typedef struct DAC960_Controller
   DAC960_Command_T InitialCommand;
   DAC960_Command_T *Commands[DAC960_MaxDriverQueueDepth];
   struct proc_dir_entry *ControllerProcEntry;
-  boolean LogicalDriveInitiallyAccessible[DAC960_MaxLogicalDrives];
+  bool LogicalDriveInitiallyAccessible[DAC960_MaxLogicalDrives];
   void (*QueueCommand)(DAC960_Command_T *Command);
-  boolean (*ReadControllerConfiguration)(struct DAC960_Controller *);
-  boolean (*ReadDeviceConfiguration)(struct DAC960_Controller *);
-  boolean (*ReportDeviceConfiguration)(struct DAC960_Controller *);
+  bool (*ReadControllerConfiguration)(struct DAC960_Controller *);
+  bool (*ReadDeviceConfiguration)(struct DAC960_Controller *);
+  bool (*ReportDeviceConfiguration)(struct DAC960_Controller *);
   void (*QueueReadWriteCommand)(DAC960_Command_T *Command);
   union {
     struct {
@@ -2359,21 +2352,21 @@ typedef struct DAC960_Controller
       unsigned short OldEventLogSequenceNumber;
       unsigned short DeviceStateChannel;
       unsigned short DeviceStateTargetID;
-      boolean DualModeMemoryMailboxInterface;
-      boolean BackgroundInitializationStatusSupported;
-      boolean SAFTE_EnclosureManagementEnabled;
-      boolean NeedLogicalDriveInformation;
-      boolean NeedErrorTableInformation;
-      boolean NeedDeviceStateInformation;
-      boolean NeedDeviceInquiryInformation;
-      boolean NeedDeviceSerialNumberInformation;
-      boolean NeedRebuildProgress;
-      boolean NeedConsistencyCheckProgress;
-      boolean NeedBackgroundInitializationStatus;
-      boolean StartDeviceStateScan;
-      boolean RebuildProgressFirst;
-      boolean RebuildFlagPending;
-      boolean RebuildStatusPending;
+      bool DualModeMemoryMailboxInterface;
+      bool BackgroundInitializationStatusSupported;
+      bool SAFTE_EnclosureManagementEnabled;
+      bool NeedLogicalDriveInformation;
+      bool NeedErrorTableInformation;
+      bool NeedDeviceStateInformation;
+      bool NeedDeviceInquiryInformation;
+      bool NeedDeviceSerialNumberInformation;
+      bool NeedRebuildProgress;
+      bool NeedConsistencyCheckProgress;
+      bool NeedBackgroundInitializationStatus;
+      bool StartDeviceStateScan;
+      bool RebuildProgressFirst;
+      bool RebuildFlagPending;
+      bool RebuildStatusPending;
 
       dma_addr_t       FirstCommandMailboxDMA;
       DAC960_V1_CommandMailbox_T *FirstCommandMailbox;
@@ -2432,17 +2425,17 @@ typedef struct DAC960_Controller
       dma_addr_t NewInquiryUnitSerialNumberDMA;
 
       int DeviceResetCount[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets];
-      boolean DirectCommandActive[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets];
+      bool DirectCommandActive[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets];
     } V1;
     struct {
       unsigned int StatusChangeCounter;
       unsigned int NextEventSequenceNumber;
       unsigned int PhysicalDeviceIndex;
-      boolean NeedLogicalDeviceInformation;
-      boolean NeedPhysicalDeviceInformation;
-      boolean NeedDeviceSerialNumberInformation;
-      boolean StartLogicalDeviceInformationScan;
-      boolean StartPhysicalDeviceInformationScan;
+      bool NeedLogicalDeviceInformation;
+      bool NeedPhysicalDeviceInformation;
+      bool NeedDeviceSerialNumberInformation;
+      bool StartLogicalDeviceInformationScan;
+      bool StartPhysicalDeviceInformationScan;
       struct pci_pool *RequestSensePool;
 
       dma_addr_t       FirstCommandMailboxDMA;
@@ -2487,7 +2480,7 @@ typedef struct DAC960_Controller
 
       DAC960_V2_PhysicalDevice_T
        LogicalDriveToVirtualDevice[DAC960_MaxLogicalDrives];
-      boolean LogicalDriveFoundDuringScan[DAC960_MaxLogicalDrives];
+      bool LogicalDriveFoundDuringScan[DAC960_MaxLogicalDrives];
     } V2;
   } FW;
   unsigned char ProgressBuffer[DAC960_ProgressBufferSize];
@@ -2572,17 +2565,17 @@ typedef union DAC960_GEM_InboundDoorBellRegister
   unsigned int All;
   struct {
     unsigned int :24;
-    boolean HardwareMailboxNewCommand:1;
-    boolean AcknowledgeHardwareMailboxStatus:1;
-    boolean GenerateInterrupt:1;
-    boolean ControllerReset:1;
-    boolean MemoryMailboxNewCommand:1;
+    bool HardwareMailboxNewCommand:1;
+    bool AcknowledgeHardwareMailboxStatus:1;
+    bool GenerateInterrupt:1;
+    bool ControllerReset:1;
+    bool MemoryMailboxNewCommand:1;
     unsigned int :3;
   } Write;
   struct {
     unsigned int :24;
-    boolean HardwareMailboxFull:1;
-    boolean InitializationInProgress:1;
+    bool HardwareMailboxFull:1;
+    bool InitializationInProgress:1;
     unsigned int :6;
   } Read;
 }
@@ -2596,14 +2589,14 @@ typedef union DAC960_GEM_OutboundDoorBellRegister
   unsigned int All;
   struct {
     unsigned int :24;
-    boolean AcknowledgeHardwareMailboxInterrupt:1;
-    boolean AcknowledgeMemoryMailboxInterrupt:1;
+    bool AcknowledgeHardwareMailboxInterrupt:1;
+    bool AcknowledgeMemoryMailboxInterrupt:1;
     unsigned int :6;
   } Write;
   struct {
     unsigned int :24;
-    boolean HardwareMailboxStatusAvailable:1;
-    boolean MemoryMailboxStatusAvailable:1;
+    bool HardwareMailboxStatusAvailable:1;
+    bool MemoryMailboxStatusAvailable:1;
     unsigned int :6;
   } Read;
 }
@@ -2635,7 +2628,7 @@ typedef union DAC960_GEM_ErrorStatusRegister
   struct {
     unsigned int :24;
     unsigned int :5;
-    boolean ErrorStatusPending:1;
+    bool ErrorStatusPending:1;
     unsigned int :2;
   } Bits;
 }
@@ -2697,7 +2690,7 @@ void DAC960_GEM_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_GEM_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
+bool DAC960_GEM_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 {
   DAC960_GEM_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -2707,7 +2700,7 @@ boolean DAC960_GEM_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_GEM_InitializationInProgressP(void __iomem *ControllerBaseAddress)
+bool DAC960_GEM_InitializationInProgressP(void __iomem *ControllerBaseAddress)
 {
   DAC960_GEM_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -2748,7 +2741,7 @@ void DAC960_GEM_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_GEM_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_GEM_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_GEM_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -2758,7 +2751,7 @@ boolean DAC960_GEM_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseA
 }
 
 static inline
-boolean DAC960_GEM_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_GEM_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_GEM_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -2790,7 +2783,7 @@ void DAC960_GEM_DisableInterrupts(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_GEM_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
+bool DAC960_GEM_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
 {
   DAC960_GEM_InterruptMaskRegister_T InterruptMaskRegister;
   InterruptMaskRegister.All =
@@ -2834,7 +2827,7 @@ DAC960_GEM_ReadCommandStatus(void __iomem *ControllerBaseAddress)
   return readw(ControllerBaseAddress + DAC960_GEM_CommandStatusOffset + 2);
 }
 
-static inline boolean
+static inline bool
 DAC960_GEM_ReadErrorStatus(void __iomem *ControllerBaseAddress,
                          unsigned char *ErrorStatus,
                          unsigned char *Parameter0,
@@ -2882,16 +2875,16 @@ typedef union DAC960_BA_InboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean HardwareMailboxNewCommand:1;               /* Bit 0 */
-    boolean AcknowledgeHardwareMailboxStatus:1;                /* Bit 1 */
-    boolean GenerateInterrupt:1;                       /* Bit 2 */
-    boolean ControllerReset:1;                         /* Bit 3 */
-    boolean MemoryMailboxNewCommand:1;                 /* Bit 4 */
+    bool HardwareMailboxNewCommand:1;                  /* Bit 0 */
+    bool AcknowledgeHardwareMailboxStatus:1;           /* Bit 1 */
+    bool GenerateInterrupt:1;                          /* Bit 2 */
+    bool ControllerReset:1;                            /* Bit 3 */
+    bool MemoryMailboxNewCommand:1;                    /* Bit 4 */
     unsigned char :3;                                  /* Bits 5-7 */
   } Write;
   struct {
-    boolean HardwareMailboxEmpty:1;                    /* Bit 0 */
-    boolean InitializationNotInProgress:1;             /* Bit 1 */
+    bool HardwareMailboxEmpty:1;                       /* Bit 0 */
+    bool InitializationNotInProgress:1;                        /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Read;
 }
@@ -2906,13 +2899,13 @@ typedef union DAC960_BA_OutboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean AcknowledgeHardwareMailboxInterrupt:1;     /* Bit 0 */
-    boolean AcknowledgeMemoryMailboxInterrupt:1;       /* Bit 1 */
+    bool AcknowledgeHardwareMailboxInterrupt:1;                /* Bit 0 */
+    bool AcknowledgeMemoryMailboxInterrupt:1;          /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Write;
   struct {
-    boolean HardwareMailboxStatusAvailable:1;          /* Bit 0 */
-    boolean MemoryMailboxStatusAvailable:1;            /* Bit 1 */
+    bool HardwareMailboxStatusAvailable:1;             /* Bit 0 */
+    bool MemoryMailboxStatusAvailable:1;               /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Read;
 }
@@ -2928,8 +2921,8 @@ typedef union DAC960_BA_InterruptMaskRegister
   unsigned char All;
   struct {
     unsigned int :2;                                   /* Bits 0-1 */
-    boolean DisableInterrupts:1;                       /* Bit 2 */
-    boolean DisableInterruptsI2O:1;                    /* Bit 3 */
+    bool DisableInterrupts:1;                          /* Bit 2 */
+    bool DisableInterruptsI2O:1;                       /* Bit 3 */
     unsigned int :4;                                   /* Bits 4-7 */
   } Bits;
 }
@@ -2945,7 +2938,7 @@ typedef union DAC960_BA_ErrorStatusRegister
   unsigned char All;
   struct {
     unsigned int :2;                                   /* Bits 0-1 */
-    boolean ErrorStatusPending:1;                      /* Bit 2 */
+    bool ErrorStatusPending:1;                         /* Bit 2 */
     unsigned int :5;                                   /* Bits 3-7 */
   } Bits;
 }
@@ -3008,7 +3001,7 @@ void DAC960_BA_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_BA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
+bool DAC960_BA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 {
   DAC960_BA_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3017,7 +3010,7 @@ boolean DAC960_BA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_BA_InitializationInProgressP(void __iomem *ControllerBaseAddress)
+bool DAC960_BA_InitializationInProgressP(void __iomem *ControllerBaseAddress)
 {
   DAC960_BA_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3057,7 +3050,7 @@ void DAC960_BA_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_BA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_BA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_BA_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -3066,7 +3059,7 @@ boolean DAC960_BA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd
 }
 
 static inline
-boolean DAC960_BA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_BA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_BA_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -3097,7 +3090,7 @@ void DAC960_BA_DisableInterrupts(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_BA_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
+bool DAC960_BA_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
 {
   DAC960_BA_InterruptMaskRegister_T InterruptMaskRegister;
   InterruptMaskRegister.All =
@@ -3140,7 +3133,7 @@ DAC960_BA_ReadCommandStatus(void __iomem *ControllerBaseAddress)
   return readw(ControllerBaseAddress + DAC960_BA_CommandStatusOffset + 2);
 }
 
-static inline boolean
+static inline bool
 DAC960_BA_ReadErrorStatus(void __iomem *ControllerBaseAddress,
                          unsigned char *ErrorStatus,
                          unsigned char *Parameter0,
@@ -3188,16 +3181,16 @@ typedef union DAC960_LP_InboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean HardwareMailboxNewCommand:1;               /* Bit 0 */
-    boolean AcknowledgeHardwareMailboxStatus:1;                /* Bit 1 */
-    boolean GenerateInterrupt:1;                       /* Bit 2 */
-    boolean ControllerReset:1;                         /* Bit 3 */
-    boolean MemoryMailboxNewCommand:1;                 /* Bit 4 */
+    bool HardwareMailboxNewCommand:1;                  /* Bit 0 */
+    bool AcknowledgeHardwareMailboxStatus:1;           /* Bit 1 */
+    bool GenerateInterrupt:1;                          /* Bit 2 */
+    bool ControllerReset:1;                            /* Bit 3 */
+    bool MemoryMailboxNewCommand:1;                    /* Bit 4 */
     unsigned char :3;                                  /* Bits 5-7 */
   } Write;
   struct {
-    boolean HardwareMailboxFull:1;                     /* Bit 0 */
-    boolean InitializationInProgress:1;                        /* Bit 1 */
+    bool HardwareMailboxFull:1;                                /* Bit 0 */
+    bool InitializationInProgress:1;                   /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Read;
 }
@@ -3212,13 +3205,13 @@ typedef union DAC960_LP_OutboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean AcknowledgeHardwareMailboxInterrupt:1;     /* Bit 0 */
-    boolean AcknowledgeMemoryMailboxInterrupt:1;       /* Bit 1 */
+    bool AcknowledgeHardwareMailboxInterrupt:1;                /* Bit 0 */
+    bool AcknowledgeMemoryMailboxInterrupt:1;          /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Write;
   struct {
-    boolean HardwareMailboxStatusAvailable:1;          /* Bit 0 */
-    boolean MemoryMailboxStatusAvailable:1;            /* Bit 1 */
+    bool HardwareMailboxStatusAvailable:1;             /* Bit 0 */
+    bool MemoryMailboxStatusAvailable:1;               /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Read;
 }
@@ -3234,7 +3227,7 @@ typedef union DAC960_LP_InterruptMaskRegister
   unsigned char All;
   struct {
     unsigned int :2;                                   /* Bits 0-1 */
-    boolean DisableInterrupts:1;                       /* Bit 2 */
+    bool DisableInterrupts:1;                          /* Bit 2 */
     unsigned int :5;                                   /* Bits 3-7 */
   } Bits;
 }
@@ -3250,7 +3243,7 @@ typedef union DAC960_LP_ErrorStatusRegister
   unsigned char All;
   struct {
     unsigned int :2;                                   /* Bits 0-1 */
-    boolean ErrorStatusPending:1;                      /* Bit 2 */
+    bool ErrorStatusPending:1;                         /* Bit 2 */
     unsigned int :5;                                   /* Bits 3-7 */
   } Bits;
 }
@@ -3313,7 +3306,7 @@ void DAC960_LP_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LP_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
+bool DAC960_LP_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LP_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3322,7 +3315,7 @@ boolean DAC960_LP_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LP_InitializationInProgressP(void __iomem *ControllerBaseAddress)
+bool DAC960_LP_InitializationInProgressP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LP_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3362,7 +3355,7 @@ void DAC960_LP_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LP_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_LP_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LP_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -3371,7 +3364,7 @@ boolean DAC960_LP_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd
 }
 
 static inline
-boolean DAC960_LP_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_LP_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LP_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -3400,7 +3393,7 @@ void DAC960_LP_DisableInterrupts(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LP_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
+bool DAC960_LP_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LP_InterruptMaskRegister_T InterruptMaskRegister;
   InterruptMaskRegister.All =
@@ -3442,7 +3435,7 @@ DAC960_LP_ReadCommandStatus(void __iomem *ControllerBaseAddress)
   return readw(ControllerBaseAddress + DAC960_LP_CommandStatusOffset + 2);
 }
 
-static inline boolean
+static inline bool
 DAC960_LP_ReadErrorStatus(void __iomem *ControllerBaseAddress,
                          unsigned char *ErrorStatus,
                          unsigned char *Parameter0,
@@ -3502,16 +3495,16 @@ typedef union DAC960_LA_InboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean HardwareMailboxNewCommand:1;               /* Bit 0 */
-    boolean AcknowledgeHardwareMailboxStatus:1;                /* Bit 1 */
-    boolean GenerateInterrupt:1;                       /* Bit 2 */
-    boolean ControllerReset:1;                         /* Bit 3 */
-    boolean MemoryMailboxNewCommand:1;                 /* Bit 4 */
+    bool HardwareMailboxNewCommand:1;                  /* Bit 0 */
+    bool AcknowledgeHardwareMailboxStatus:1;           /* Bit 1 */
+    bool GenerateInterrupt:1;                          /* Bit 2 */
+    bool ControllerReset:1;                            /* Bit 3 */
+    bool MemoryMailboxNewCommand:1;                    /* Bit 4 */
     unsigned char :3;                                  /* Bits 5-7 */
   } Write;
   struct {
-    boolean HardwareMailboxEmpty:1;                    /* Bit 0 */
-    boolean InitializationNotInProgress:1;             /* Bit 1 */
+    bool HardwareMailboxEmpty:1;                       /* Bit 0 */
+    bool InitializationNotInProgress:1;                /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Read;
 }
@@ -3526,13 +3519,13 @@ typedef union DAC960_LA_OutboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean AcknowledgeHardwareMailboxInterrupt:1;     /* Bit 0 */
-    boolean AcknowledgeMemoryMailboxInterrupt:1;       /* Bit 1 */
+    bool AcknowledgeHardwareMailboxInterrupt:1;                /* Bit 0 */
+    bool AcknowledgeMemoryMailboxInterrupt:1;          /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Write;
   struct {
-    boolean HardwareMailboxStatusAvailable:1;          /* Bit 0 */
-    boolean MemoryMailboxStatusAvailable:1;            /* Bit 1 */
+    bool HardwareMailboxStatusAvailable:1;             /* Bit 0 */
+    bool MemoryMailboxStatusAvailable:1;               /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Read;
 }
@@ -3548,7 +3541,7 @@ typedef union DAC960_LA_InterruptMaskRegister
   unsigned char All;
   struct {
     unsigned char :2;                                  /* Bits 0-1 */
-    boolean DisableInterrupts:1;                       /* Bit 2 */
+    bool DisableInterrupts:1;                          /* Bit 2 */
     unsigned char :5;                                  /* Bits 3-7 */
   } Bits;
 }
@@ -3564,7 +3557,7 @@ typedef union DAC960_LA_ErrorStatusRegister
   unsigned char All;
   struct {
     unsigned int :2;                                   /* Bits 0-1 */
-    boolean ErrorStatusPending:1;                      /* Bit 2 */
+    bool ErrorStatusPending:1;                         /* Bit 2 */
     unsigned int :5;                                   /* Bits 3-7 */
   } Bits;
 }
@@ -3627,7 +3620,7 @@ void DAC960_LA_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
+bool DAC960_LA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LA_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3636,7 +3629,7 @@ boolean DAC960_LA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LA_InitializationInProgressP(void __iomem *ControllerBaseAddress)
+bool DAC960_LA_InitializationInProgressP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LA_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3676,7 +3669,7 @@ void DAC960_LA_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_LA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LA_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -3685,7 +3678,7 @@ boolean DAC960_LA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd
 }
 
 static inline
-boolean DAC960_LA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_LA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LA_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -3714,7 +3707,7 @@ void DAC960_LA_DisableInterrupts(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_LA_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
+bool DAC960_LA_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
 {
   DAC960_LA_InterruptMaskRegister_T InterruptMaskRegister;
   InterruptMaskRegister.All =
@@ -3763,7 +3756,7 @@ DAC960_LA_ReadStatusRegister(void __iomem *ControllerBaseAddress)
   return readw(ControllerBaseAddress + DAC960_LA_StatusRegisterOffset);
 }
 
-static inline boolean
+static inline bool
 DAC960_LA_ReadErrorStatus(void __iomem *ControllerBaseAddress,
                          unsigned char *ErrorStatus,
                          unsigned char *Parameter0,
@@ -3822,16 +3815,16 @@ typedef union DAC960_PG_InboundDoorBellRegister
 {
   unsigned int All;
   struct {
-    boolean HardwareMailboxNewCommand:1;               /* Bit 0 */
-    boolean AcknowledgeHardwareMailboxStatus:1;                /* Bit 1 */
-    boolean GenerateInterrupt:1;                       /* Bit 2 */
-    boolean ControllerReset:1;                         /* Bit 3 */
-    boolean MemoryMailboxNewCommand:1;                 /* Bit 4 */
+    bool HardwareMailboxNewCommand:1;                  /* Bit 0 */
+    bool AcknowledgeHardwareMailboxStatus:1;           /* Bit 1 */
+    bool GenerateInterrupt:1;                          /* Bit 2 */
+    bool ControllerReset:1;                            /* Bit 3 */
+    bool MemoryMailboxNewCommand:1;                    /* Bit 4 */
     unsigned int :27;                                  /* Bits 5-31 */
   } Write;
   struct {
-    boolean HardwareMailboxFull:1;                     /* Bit 0 */
-    boolean InitializationInProgress:1;                        /* Bit 1 */
+    bool HardwareMailboxFull:1;                                /* Bit 0 */
+    bool InitializationInProgress:1;                   /* Bit 1 */
     unsigned int :30;                                  /* Bits 2-31 */
   } Read;
 }
@@ -3846,13 +3839,13 @@ typedef union DAC960_PG_OutboundDoorBellRegister
 {
   unsigned int All;
   struct {
-    boolean AcknowledgeHardwareMailboxInterrupt:1;     /* Bit 0 */
-    boolean AcknowledgeMemoryMailboxInterrupt:1;       /* Bit 1 */
+    bool AcknowledgeHardwareMailboxInterrupt:1;                /* Bit 0 */
+    bool AcknowledgeMemoryMailboxInterrupt:1;          /* Bit 1 */
     unsigned int :30;                                  /* Bits 2-31 */
   } Write;
   struct {
-    boolean HardwareMailboxStatusAvailable:1;          /* Bit 0 */
-    boolean MemoryMailboxStatusAvailable:1;            /* Bit 1 */
+    bool HardwareMailboxStatusAvailable:1;             /* Bit 0 */
+    bool MemoryMailboxStatusAvailable:1;               /* Bit 1 */
     unsigned int :30;                                  /* Bits 2-31 */
   } Read;
 }
@@ -3868,7 +3861,7 @@ typedef union DAC960_PG_InterruptMaskRegister
   unsigned int All;
   struct {
     unsigned int MessageUnitInterruptMask1:2;          /* Bits 0-1 */
-    boolean DisableInterrupts:1;                       /* Bit 2 */
+    bool DisableInterrupts:1;                          /* Bit 2 */
     unsigned int MessageUnitInterruptMask2:5;          /* Bits 3-7 */
     unsigned int Reserved0:24;                         /* Bits 8-31 */
   } Bits;
@@ -3885,7 +3878,7 @@ typedef union DAC960_PG_ErrorStatusRegister
   unsigned char All;
   struct {
     unsigned int :2;                                   /* Bits 0-1 */
-    boolean ErrorStatusPending:1;                      /* Bit 2 */
+    bool ErrorStatusPending:1;                         /* Bit 2 */
     unsigned int :5;                                   /* Bits 3-7 */
   } Bits;
 }
@@ -3948,7 +3941,7 @@ void DAC960_PG_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PG_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
+bool DAC960_PG_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PG_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3957,7 +3950,7 @@ boolean DAC960_PG_HardwareMailboxFullP(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PG_InitializationInProgressP(void __iomem *ControllerBaseAddress)
+bool DAC960_PG_InitializationInProgressP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PG_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -3997,7 +3990,7 @@ void DAC960_PG_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PG_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_PG_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PG_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -4006,7 +3999,7 @@ boolean DAC960_PG_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd
 }
 
 static inline
-boolean DAC960_PG_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_PG_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PG_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -4039,7 +4032,7 @@ void DAC960_PG_DisableInterrupts(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PG_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
+bool DAC960_PG_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PG_InterruptMaskRegister_T InterruptMaskRegister;
   InterruptMaskRegister.All =
@@ -4088,7 +4081,7 @@ DAC960_PG_ReadStatusRegister(void __iomem *ControllerBaseAddress)
   return readw(ControllerBaseAddress + DAC960_PG_StatusRegisterOffset);
 }
 
-static inline boolean
+static inline bool
 DAC960_PG_ReadErrorStatus(void __iomem *ControllerBaseAddress,
                          unsigned char *ErrorStatus,
                          unsigned char *Parameter0,
@@ -4147,15 +4140,15 @@ typedef union DAC960_PD_InboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean NewCommand:1;                              /* Bit 0 */
-    boolean AcknowledgeStatus:1;                       /* Bit 1 */
-    boolean GenerateInterrupt:1;                       /* Bit 2 */
-    boolean ControllerReset:1;                         /* Bit 3 */
+    bool NewCommand:1;                                 /* Bit 0 */
+    bool AcknowledgeStatus:1;                          /* Bit 1 */
+    bool GenerateInterrupt:1;                          /* Bit 2 */
+    bool ControllerReset:1;                            /* Bit 3 */
     unsigned char :4;                                  /* Bits 4-7 */
   } Write;
   struct {
-    boolean MailboxFull:1;                             /* Bit 0 */
-    boolean InitializationInProgress:1;                        /* Bit 1 */
+    bool MailboxFull:1;                                        /* Bit 0 */
+    bool InitializationInProgress:1;                   /* Bit 1 */
     unsigned char :6;                                  /* Bits 2-7 */
   } Read;
 }
@@ -4170,11 +4163,11 @@ typedef union DAC960_PD_OutboundDoorBellRegister
 {
   unsigned char All;
   struct {
-    boolean AcknowledgeInterrupt:1;                    /* Bit 0 */
+    bool AcknowledgeInterrupt:1;                       /* Bit 0 */
     unsigned char :7;                                  /* Bits 1-7 */
   } Write;
   struct {
-    boolean StatusAvailable:1;                         /* Bit 0 */
+    bool StatusAvailable:1;                            /* Bit 0 */
     unsigned char :7;                                  /* Bits 1-7 */
   } Read;
 }
@@ -4189,7 +4182,7 @@ typedef union DAC960_PD_InterruptEnableRegister
 {
   unsigned char All;
   struct {
-    boolean EnableInterrupts:1;                                /* Bit 0 */
+    bool EnableInterrupts:1;                           /* Bit 0 */
     unsigned char :7;                                  /* Bits 1-7 */
   } Bits;
 }
@@ -4205,7 +4198,7 @@ typedef union DAC960_PD_ErrorStatusRegister
   unsigned char All;
   struct {
     unsigned int :2;                                   /* Bits 0-1 */
-    boolean ErrorStatusPending:1;                      /* Bit 2 */
+    bool ErrorStatusPending:1;                         /* Bit 2 */
     unsigned int :5;                                   /* Bits 3-7 */
   } Bits;
 }
@@ -4258,7 +4251,7 @@ void DAC960_PD_ControllerReset(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PD_MailboxFullP(void __iomem *ControllerBaseAddress)
+bool DAC960_PD_MailboxFullP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PD_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -4267,7 +4260,7 @@ boolean DAC960_PD_MailboxFullP(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PD_InitializationInProgressP(void __iomem *ControllerBaseAddress)
+bool DAC960_PD_InitializationInProgressP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PD_InboundDoorBellRegister_T InboundDoorBellRegister;
   InboundDoorBellRegister.All =
@@ -4286,7 +4279,7 @@ void DAC960_PD_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PD_StatusAvailableP(void __iomem *ControllerBaseAddress)
+bool DAC960_PD_StatusAvailableP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PD_OutboundDoorBellRegister_T OutboundDoorBellRegister;
   OutboundDoorBellRegister.All =
@@ -4315,7 +4308,7 @@ void DAC960_PD_DisableInterrupts(void __iomem *ControllerBaseAddress)
 }
 
 static inline
-boolean DAC960_PD_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
+bool DAC960_PD_InterruptsEnabledP(void __iomem *ControllerBaseAddress)
 {
   DAC960_PD_InterruptEnableRegister_T InterruptEnableRegister;
   InterruptEnableRegister.All =
@@ -4350,7 +4343,7 @@ DAC960_PD_ReadStatusRegister(void __iomem *ControllerBaseAddress)
   return readw(ControllerBaseAddress + DAC960_PD_StatusRegisterOffset);
 }
 
-static inline boolean
+static inline bool
 DAC960_PD_ReadErrorStatus(void __iomem *ControllerBaseAddress,
                          unsigned char *ErrorStatus,
                          unsigned char *Parameter0,
index 58c1debf86f1c7271ed84bce7cf1ea097c878725..cacb1c816e355503757c84c745d00f9a3c81e185 100644 (file)
@@ -417,8 +417,10 @@ config BLK_DEV_INITRD
          etc. See <file:Documentation/initrd.txt> for details.
 
          If RAM disk support (BLK_DEV_RAM) is also included, this
-         also enables initial RAM disk (initrd) support.
+         also enables initial RAM disk (initrd) support and adds
+         15 Kbytes (more on some other architectures) to the kernel size.
 
+         If unsure say Y.
 
 config CDROM_PKTCDVD
        tristate "Packet writing on CD/DVD media"
index c0d2854dd097e8b9bb4673d14923d5eb778d1391..28cf3082d4423fa4e0b0727ecc02ef61a1f27fa7 100644 (file)
@@ -2,14 +2,8 @@
 # PARIDE configuration
 #
 # PARIDE doesn't need PARPORT, but if PARPORT is configured as a module,
-# PARIDE must also be a module.  The bogus CONFIG_PARIDE_PARPORT option
-# controls the choices given to the user ...
+# PARIDE must also be a module.
 # PARIDE only supports PC style parports. Tough for USB or other parports...
-config PARIDE_PARPORT
-       tristate
-       depends on PARIDE!=n
-       default m if PARPORT_PC=m
-       default y if PARPORT_PC!=m
 
 comment "Parallel IDE high-level drivers"
        depends on PARIDE
index 62462190e07e877634053cf20e41643c8ea227cf..c0e89490e3d5c97427eaf2eeb15c42bb672b037f 100644 (file)
@@ -190,15 +190,6 @@ static struct attribute *kobj_pkt_attrs_wqueue[] = {
        NULL
 };
 
-/* declares a char buffer[64] _dbuf, copies data from
- * _b with length _l into it and ensures that _dbuf ends
- * with a \0 character.
- */
-#define DECLARE_BUF_AS_STRING(_dbuf, _b, _l) \
-       char _dbuf[64]; int dlen = (_l) < 0 ? 0 : (_l); \
-       if (dlen >= sizeof(_dbuf)) dlen = sizeof(_dbuf)-1; \
-       memcpy(_dbuf, _b, dlen); _dbuf[dlen] = 0
-
 static ssize_t kobj_pkt_show(struct kobject *kobj,
                        struct attribute *attr, char *data)
 {
@@ -264,9 +255,8 @@ static ssize_t kobj_pkt_store(struct kobject *kobj,
 {
        struct pktcdvd_device *pd = to_pktcdvdkobj(kobj)->pd;
        int val;
-       DECLARE_BUF_AS_STRING(dbuf, data, len); /* ensure sscanf scans a string */
 
-       if (strcmp(attr->name, "reset") == 0 && dlen > 0) {
+       if (strcmp(attr->name, "reset") == 0 && len > 0) {
                pd->stats.pkt_started = 0;
                pd->stats.pkt_ended = 0;
                pd->stats.secs_w = 0;
@@ -274,7 +264,7 @@ static ssize_t kobj_pkt_store(struct kobject *kobj,
                pd->stats.secs_r = 0;
 
        } else if (strcmp(attr->name, "congestion_off") == 0
-                  && sscanf(dbuf, "%d", &val) == 1) {
+                  && sscanf(data, "%d", &val) == 1) {
                spin_lock(&pd->lock);
                pd->write_congestion_off = val;
                init_write_congestion_marks(&pd->write_congestion_off,
@@ -282,7 +272,7 @@ static ssize_t kobj_pkt_store(struct kobject *kobj,
                spin_unlock(&pd->lock);
 
        } else if (strcmp(attr->name, "congestion_on") == 0
-                  && sscanf(dbuf, "%d", &val) == 1) {
+                  && sscanf(data, "%d", &val) == 1) {
                spin_lock(&pd->lock);
                pd->write_congestion_on = val;
                init_write_congestion_marks(&pd->write_congestion_off,
@@ -369,8 +359,7 @@ static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf,
                                        size_t count)
 {
        unsigned int major, minor;
-       DECLARE_BUF_AS_STRING(dbuf, buf, count);
-       if (sscanf(dbuf, "%u:%u", &major, &minor) == 2) {
+       if (sscanf(buf, "%u:%u", &major, &minor) == 2) {
                pkt_setup_dev(MKDEV(major, minor), NULL);
                return count;
        }
@@ -381,8 +370,7 @@ static ssize_t class_pktcdvd_store_remove(struct class *c, const char *buf,
                                        size_t count)
 {
        unsigned int major, minor;
-       DECLARE_BUF_AS_STRING(dbuf, buf, count);
-       if (sscanf(dbuf, "%u:%u", &major, &minor) == 2) {
+       if (sscanf(buf, "%u:%u", &major, &minor) == 2) {
                pkt_remove_dev(MKDEV(major, minor));
                return count;
        }
@@ -1377,7 +1365,7 @@ try_next_bio:
                        && pd->bio_queue_size <= pd->write_congestion_off);
        spin_unlock(&pd->lock);
        if (wakeup)
-               blk_clear_queue_congested(pd->disk->queue, WRITE);
+               clear_bdi_congested(&pd->disk->queue->backing_dev_info, WRITE);
 
        pkt->sleep_time = max(PACKET_WAIT_TIME, 1);
        pkt_set_state(pkt, PACKET_WAITING_STATE);
@@ -2598,7 +2586,7 @@ static int pkt_make_request(request_queue_t *q, struct bio *bio)
        spin_lock(&pd->lock);
        if (pd->write_congestion_on > 0
            && pd->bio_queue_size >= pd->write_congestion_on) {
-               blk_set_queue_congested(q, WRITE);
+               set_bdi_congested(&q->backing_dev_info, WRITE);
                do {
                        spin_unlock(&pd->lock);
                        congestion_wait(WRITE, HZ);
index d08bb4ee130751efee0b36bb4b380d491064b28f..d0a6dc53213c00ecb5e22c7b5933c9789c195e30 100644 (file)
@@ -191,7 +191,7 @@ config MOXA_INTELLIO
          module will be called moxa.
 
 config MOXA_SMARTIO
-       tristate "Moxa SmartIO support"
+       tristate "Moxa SmartIO support (OBSOLETE)"
        depends on SERIAL_NONSTANDARD
        help
          Say Y here if you have a Moxa SmartIO multiport serial card.
@@ -202,7 +202,7 @@ config MOXA_SMARTIO
          here.
 
 config MOXA_SMARTIO_NEW
-       tristate "Moxa SmartIO support v. 2.0 (EXPERIMENTAL)"
+       tristate "Moxa SmartIO support v. 2.0"
        depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
        help
          Say Y here if you have a Moxa SmartIO multiport serial card and/or
index feb4ac802a0d1e44f8fef6d24a7e7638a0d3b563..0e2b72f2b8871d96f124581bba1ee724c2f936c0 100644 (file)
@@ -527,10 +527,8 @@ static void do_softint(unsigned long private_)
        if (!tty)
                return;
 
-       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
+       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
 }
 
 /*
@@ -904,8 +902,7 @@ static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count
        if (!info->xmit.buf)
                return 0;
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        while (1) {
                c = CIRC_SPACE_TO_END(info->xmit.head,
                                      info->xmit.tail,
@@ -968,7 +965,6 @@ static void rs_flush_buffer(struct tty_struct *tty)
        local_irq_save(flags);
        info->xmit.head = info->xmit.tail = 0;
        local_irq_restore(flags);
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 }
 
index 3ffa0807754c34313f9288299552f97df2c8468f..363beb16572911ff18963e0eae785318e58890ae 100644 (file)
@@ -4488,7 +4488,6 @@ static void cy_flush_buffer(struct tty_struct *tty)
                CY_UNLOCK(info, flags);
        }
        tty_wakeup(tty);
-       wake_up_interruptible(&tty->write_wait);
 }                              /* cy_flush_buffer */
 
 /*
index a0f822c9d74def65e14f97fb319d782b305ef19d..88fc24fc43928674ef24647a394a2348cd18c082 100644 (file)
@@ -844,7 +844,6 @@ static void pc_flush_buffer(struct tty_struct *tty)
        fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0);
        memoff(ch);
        spin_unlock_irqrestore(&epca_lock, flags);
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 } /* End pc_flush_buffer */
 
@@ -1795,7 +1794,6 @@ static void doevent(int crd)
                                { /* Begin if LOWWAIT */
                                        ch->statusflags &= ~LOWWAIT;
                                        tty_wakeup(tty);
-                                       wake_up_interruptible(&tty->write_wait);
                                } /* End if LOWWAIT */
                        } else if (event & EMPTYTX_IND)  { /* Begin EMPTYTX_IND */
                                /* This event is generated by setup_empty_event */
@@ -1803,7 +1801,6 @@ static void doevent(int crd)
                                if (ch->statusflags & EMPTYWAIT)  { /* Begin if EMPTYWAIT */
                                        ch->statusflags &= ~EMPTYWAIT;
                                        tty_wakeup(tty);
-                                       wake_up_interruptible(&tty->write_wait);
                                } /* End if EMPTYWAIT */
                        } /* End EMPTYTX_IND */
                } /* End if valid tty */
index e769811e74172d36bff0d845a9fab7327299b158..337bbcdcf13dfb84642ea646c975bc7abe99a07c 100644 (file)
@@ -382,7 +382,6 @@ void gs_flush_buffer(struct tty_struct *tty)
        port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
        spin_unlock_irqrestore (&port->driver_lock, flags);
 
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
        func_exit ();
 }
index 78045767ec33691d7b8b89770c00f5f39b935f48..88b9d338da5352bb5acd5be3222c95aa3b6c479a 100644 (file)
@@ -1373,15 +1373,7 @@ ip2_owake( PTTY tp)
        ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags,
                        (1 << TTY_DO_WRITE_WAKEUP) );
 
-       wake_up_interruptible ( &tp->write_wait );
-       if ( ( tp->flags & (1 << TTY_DO_WRITE_WAKEUP) ) 
-         && tp->ldisc.write_wakeup )
-       {
-               (tp->ldisc.write_wakeup) ( tp );
-
-               ip2trace (CHANN, ITRC_SICMD, 11, 0 );
-
-       }
+       tty_wakeup(tp);
 }
 
 static inline void
index 53582b53da95c449a9cb730f1b93734793139c30..3aff5e99b674360bad4fa42407d70a9d594656e4 100644 (file)
@@ -406,13 +406,14 @@ static void clean_up_interface_data(ipmi_smi_t intf)
        free_smi_msg_list(&intf->waiting_msgs);
        free_recv_msg_list(&intf->waiting_events);
 
-       /* Wholesale remove all the entries from the list in the
-        * interface and wait for RCU to know that none are in use. */
+       /*
+        * Wholesale remove all the entries from the list in the
+        * interface and wait for RCU to know that none are in use.
+        */
        mutex_lock(&intf->cmd_rcvrs_mutex);
-       list_add_rcu(&list, &intf->cmd_rcvrs);
-       list_del_rcu(&intf->cmd_rcvrs);
+       INIT_LIST_HEAD(&list);
+       list_splice_init_rcu(&intf->cmd_rcvrs, &list, synchronize_rcu);
        mutex_unlock(&intf->cmd_rcvrs_mutex);
-       synchronize_rcu();
 
        list_for_each_entry_safe(rcvr, rcvr2, &list, link)
                kfree(rcvr);
@@ -451,7 +452,7 @@ int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
        mutex_lock(&ipmi_interfaces_mutex);
 
        /* Build a list of things to deliver. */
-       list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
+       list_for_each_entry(intf, &ipmi_interfaces, link) {
                if (intf->intf_num == -1)
                        continue;
                e = kmalloc(sizeof(*e), GFP_KERNEL);
@@ -1886,7 +1887,6 @@ int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name,
                kfree(entry);
                rv = -ENOMEM;
        } else {
-               file->nlink = 1;
                file->data = data;
                file->read_proc = read_proc;
                file->write_proc = write_proc;
@@ -2760,9 +2760,15 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
                synchronize_rcu();
                kref_put(&intf->refcount, intf_free);
        } else {
-               /* After this point the interface is legal to use. */
+               /*
+                * Keep memory order straight for RCU readers.  Make
+                * sure everything else is committed to memory before
+                * setting intf_num to mark the interface valid.
+                */
+               smp_wmb();
                intf->intf_num = i;
                mutex_unlock(&ipmi_interfaces_mutex);
+               /* After this point the interface is legal to use. */
                call_smi_watchers(i, intf->si_dev);
                mutex_unlock(&smi_watchers_mutex);
        }
@@ -3923,6 +3929,14 @@ static void send_panic_events(char *str)
                        /* Interface was not ready yet. */
                        continue;
 
+               /*
+                * intf_num is used as an marker to tell if the
+                * interface is valid.  Thus we need a read barrier to
+                * make sure data fetched before checking intf_num
+                * won't be used.
+                */
+               smp_rmb();
+
                /* First job here is to figure out where to send the
                   OEM events.  There's no way in IPMI to send OEM
                   events using an event send command, so we have to
index 01084abffddf66070e1c5b97847e8fc893f59f16..43ab9edc76f540ce254f07f827e00414bd70abc2 100644 (file)
@@ -183,7 +183,7 @@ static DEFINE_TIMER(tx, isicom_tx, 0, 0);
 /*   baud index mappings from linux defns to isi */
 
 static signed char linuxb_to_isib[] = {
-       -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19
+       -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19, 20, 21
 };
 
 struct isi_board {
@@ -213,8 +213,6 @@ struct      isi_port {
        struct tty_struct       * tty;
        wait_queue_head_t       close_wait;
        wait_queue_head_t       open_wait;
-       struct work_struct      hangup_tq;
-       struct work_struct      bh_tqueue;
        unsigned char           * xmit_buf;
        int                     xmit_head;
        int                     xmit_tail;
@@ -510,7 +508,7 @@ static void isicom_tx(unsigned long _data)
                if (port->xmit_cnt <= 0)
                        port->status &= ~ISI_TXOK;
                if (port->xmit_cnt <= WAKEUP_CHARS)
-                       schedule_work(&port->bh_tqueue);
+                       tty_wakeup(tty);
                unlock_card(&isi_card[card]);
        }
 
@@ -524,21 +522,6 @@ sched_again:
        mod_timer(&tx, jiffies + msecs_to_jiffies(10));
 }
 
-/*     Interrupt handlers      */
-
-
-static void isicom_bottomhalf(struct work_struct *work)
-{
-       struct isi_port *port = container_of(work, struct isi_port, bh_tqueue);
-       struct tty_struct *tty = port->tty;
-
-       if (!tty)
-               return;
-
-       tty_wakeup(tty);
-       wake_up_interruptible(&tty->write_wait);
-}
-
 /*
  *     Main interrupt handler routine
  */
@@ -557,6 +540,11 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
                return IRQ_NONE;
 
        base = card->base;
+
+       /* did the card interrupt us? */
+       if (!(inw(base + 0x0e) & 0x02))
+               return IRQ_NONE;
+
        spin_lock(&card->card_lock);
 
        /*
@@ -581,6 +569,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
        port = card->ports + channel;
        if (!(port->flags & ASYNC_INITIALIZED)) {
                outw(0x0000, base+0x04); /* enable interrupts */
+               spin_unlock(&card->card_lock);
                return IRQ_HANDLED;
        }
 
@@ -609,7 +598,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
                                                pr_dbg("interrupt: DCD->low.\n"
                                                        );
                                                port->status &= ~ISI_DCD;
-                                               schedule_work(&port->hangup_tq);
+                                               tty_hangup(tty);
                                        }
                                } else if (header & ISI_DCD) {
                                /* Carrier has been detected */
@@ -631,7 +620,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
                                                /* start tx ing */
                                                port->status |= (ISI_TXOK
                                                        | ISI_CTS);
-                                               schedule_work(&port->bh_tqueue);
+                                               tty_wakeup(tty);
                                        }
                                } else if (!(header & ISI_CTS)) {
                                        port->tty->hw_stopped = 1;
@@ -695,6 +684,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
                tty_flip_buffer_push(tty);
        }
        outw(0x0000, base+0x04); /* enable interrupts */
+       spin_unlock(&card->card_lock);
 
        return IRQ_HANDLED;
 }
@@ -720,7 +710,8 @@ static void isicom_config_port(struct isi_port *port)
                 *  respectively.
                 */
 
-               if (baud < 1 || baud > 2)
+               /* 1,2,3,4 => 57.6, 115.2, 230, 460 kbps resp. */
+               if (baud < 1 || baud > 4)
                        port->tty->termios->c_cflag &= ~CBAUDEX;
                else
                        baud += 15;
@@ -736,6 +727,10 @@ static void isicom_config_port(struct isi_port *port)
                        baud++; /*  57.6 Kbps */
                if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
                        baud +=2; /*  115  Kbps */
+               if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
+                       baud += 3; /* 230 kbps*/
+               if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
+                       baud += 4; /* 460 kbps*/
        }
        if (linuxb_to_isib[baud] == -1) {
                /* hang up */
@@ -1460,17 +1455,6 @@ static void isicom_start(struct tty_struct *tty)
        port->status |= ISI_TXOK;
 }
 
-/* hangup et all */
-static void do_isicom_hangup(struct work_struct *work)
-{
-       struct isi_port *port = container_of(work, struct isi_port, hangup_tq);
-       struct tty_struct *tty;
-
-       tty = port->tty;
-       if (tty)
-               tty_hangup(tty);
-}
-
 static void isicom_hangup(struct tty_struct *tty)
 {
        struct isi_port *port = tty->driver_data;
@@ -1503,7 +1487,6 @@ static void isicom_flush_buffer(struct tty_struct *tty)
        port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
        spin_unlock_irqrestore(&card->card_lock, flags);
 
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 }
 
@@ -1536,7 +1519,7 @@ static int __devinit reset_card(struct pci_dev *pdev,
 {
        struct isi_board *board = pci_get_drvdata(pdev);
        unsigned long base = board->base;
-       unsigned int portcount = 0;
+       unsigned int sig, portcount = 0;
        int retval = 0;
 
        dev_dbg(&pdev->dev, "ISILoad:Resetting Card%d at 0x%lx\n", card + 1,
@@ -1544,27 +1527,35 @@ static int __devinit reset_card(struct pci_dev *pdev,
 
        inw(base + 0x8);
 
-       mdelay(10);
+       msleep(10);
 
        outw(0, base + 0x8); /* Reset */
 
-       msleep(3000);
+       msleep(1000);
 
-       *signature = inw(base + 0x4) & 0xff;
+       sig = inw(base + 0x4) & 0xff;
+
+       if (sig != 0xa5 && sig != 0xbb && sig != 0xcc && sig != 0xdd &&
+                       sig != 0xee) {
+               dev_warn(&pdev->dev, "ISILoad:Card%u reset failure (Possible "
+                       "bad I/O Port Address 0x%lx).\n", card + 1, base);
+               dev_dbg(&pdev->dev, "Sig=0x%x\n", sig);
+               retval = -EIO;
+               goto end;
+       }
+
+       msleep(10);
 
        portcount = inw(base + 0x2);
-       if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) &&
-                       (portcount != 4) && (portcount != 8))) {
-               dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n",
-                       inw(base + 0x2), inw(base + 0xe));
-               dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure "
-                       "(Possible bad I/O Port Address 0x%lx).\n",
-                       card + 1, base);
+       if (!inw(base + 0xe) & 0x1 || (portcount != 0 && portcount != 4 &&
+                               portcount != 8 && portcount != 16)) {
+               dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure.",
+                       card + 1);
                retval = -EIO;
                goto end;
        }
 
-       switch (*signature) {
+       switch (sig) {
        case 0xa5:
        case 0xbb:
        case 0xdd:
@@ -1572,16 +1563,13 @@ static int __devinit reset_card(struct pci_dev *pdev,
                board->shift_count = 12;
                break;
        case 0xcc:
+       case 0xee:
                board->port_count = 16;
                board->shift_count = 11;
                break;
-       default:
-               dev_warn(&pdev->dev, "ISILoad:Card%d reset failure (Possible "
-                       "bad I/O Port Address 0x%lx).\n", card + 1, base);
-               dev_dbg(&pdev->dev, "Sig=0x%lx\n", signature);
-               retval = -EIO;
        }
        dev_info(&pdev->dev, "-Done\n");
+       *signature = sig;
 
 end:
        return retval;
@@ -1757,7 +1745,7 @@ end:
 /*
  *     Insmod can set static symbols so keep these static
  */
-static int card;
+static unsigned int card_count;
 
 static int __devinit isicom_probe(struct pci_dev *pdev,
        const struct pci_device_id *ent)
@@ -1767,7 +1755,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
        u8 pciirq;
        struct isi_board *board = NULL;
 
-       if (card >= BOARD_COUNT)
+       if (card_count >= BOARD_COUNT)
                goto err;
 
        ioaddr = pci_resource_start(pdev, 3);
@@ -1785,7 +1773,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
        board->index = index;
        board->base = ioaddr;
        board->irq = pciirq;
-       card++;
+       card_count++;
 
        pci_set_drvdata(pdev, board);
 
@@ -1795,7 +1783,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
                        "will be disabled.\n", board->base, board->base + 15,
                        index + 1);
                retval = -EBUSY;
-               goto err;
+               goto errdec;
        }
 
        retval = request_irq(board->irq, isicom_interrupt,
@@ -1824,8 +1812,10 @@ errunri:
        free_irq(board->irq, board);
 errunrr:
        pci_release_region(pdev, 3);
-err:
+errdec:
        board->base = 0;
+       card_count--;
+err:
        return retval;
 }
 
@@ -1839,6 +1829,8 @@ static void __devexit isicom_remove(struct pci_dev *pdev)
 
        free_irq(board->irq, board);
        pci_release_region(pdev, 3);
+       board->base = 0;
+       card_count--;
 }
 
 static int __init isicom_init(void)
@@ -1846,8 +1838,6 @@ static int __init isicom_init(void)
        int retval, idx, channel;
        struct isi_port *port;
 
-       card = 0;
-
        for(idx = 0; idx < BOARD_COUNT; idx++) {
                port = &isi_ports[idx * 16];
                isi_card[idx].ports = port;
@@ -1858,8 +1848,6 @@ static int __init isicom_init(void)
                        port->channel = channel;
                        port->close_delay = 50 * HZ/100;
                        port->closing_wait = 3000 * HZ/100;
-                       INIT_WORK(&port->hangup_tq, do_isicom_hangup);
-                       INIT_WORK(&port->bh_tqueue, isicom_bottomhalf);
                        port->status = 0;
                        init_waitqueue_head(&port->open_wait);
                        init_waitqueue_head(&port->close_wait);
index 68645d35187325baa50e8f5c6aec932469b5d67f..7b279d1de4a2eac8d6781269eb4b52f738d5cc5a 100644 (file)
@@ -2424,7 +2424,6 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
                        if (tty != NULL) {
                                tty_wakeup(tty);
                                EBRDENABLE(brdp);
-                               wake_up_interruptible(&tty->write_wait);
                        }
                }
 
index 7a6c1c0b7a95861f9e4a70c4d6dca302491e5987..c654a3e0c697b36f008b934a8ed276bb6c110373 100644 (file)
@@ -595,15 +595,9 @@ static void fn_spawn_con(struct vc_data *vc)
 
 static void fn_SAK(struct vc_data *vc)
 {
-       struct tty_struct *tty = vc->vc_tty;
-
-       /*
-        * SAK should also work in all raw modes and reset
-        * them properly.
-        */
-       if (tty)
-               do_SAK(tty);
-       reset_vc(vc);
+       struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
+       PREPARE_WORK(SAK_work, vc_SAK);
+       schedule_work(SAK_work);
 }
 
 static void fn_null(struct vc_data *vc)
index f391a24a1b442c1e8eb4aaf1c1857d015dfdc89b..7dbaee8d940296a5617af40e029b39ff2824d4e7 100644 (file)
  *      it under the terms of the GNU General Public License as published by
  *      the Free Software Foundation; either version 2 of the License, or
  *      (at your option) any later version.
- *
- *      This program is distributed in the hope that it will be useful,
- *      but WITHOUT ANY WARRANTY; without even the implied warranty of
- *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *      GNU General Public License for more details.
- *
- *      You should have received a copy of the GNU General Public License
- *      along with this program; if not, write to the Free Software
- *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 /*
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
-#define                MOXA_VERSION            "5.1k"
+#define MOXA_VERSION           "5.1k"
 
-#define MOXAMAJOR       172
-#define MOXACUMAJOR     173
+#define MOXAMAJOR              172
+#define MOXACUMAJOR            173
 
-#define put_to_user(arg1, arg2) put_user(arg1, (unsigned long *)arg2)
-#define get_from_user(arg1, arg2) get_user(arg1, (unsigned int *)arg2)
-
-#define MAX_BOARDS             4       /* Don't change this value */
+#define MAX_BOARDS             4       /* Don't change this value */
 #define MAX_PORTS_PER_BOARD    32      /* Don't change this value */
-#define MAX_PORTS              128     /* Don't change this value */
+#define MAX_PORTS              (MAX_BOARDS * MAX_PORTS_PER_BOARD)
 
 /*
  *    Define the Moxa PCI vendor and device IDs.
  */
-#define MOXA_BUS_TYPE_ISA              0
-#define MOXA_BUS_TYPE_PCI              1
-
-#ifndef        PCI_VENDOR_ID_MOXA
-#define        PCI_VENDOR_ID_MOXA      0x1393
-#endif
-#ifndef PCI_DEVICE_ID_CP204J
-#define PCI_DEVICE_ID_CP204J   0x2040
-#endif
-#ifndef PCI_DEVICE_ID_C218
-#define PCI_DEVICE_ID_C218     0x2180
-#endif
-#ifndef PCI_DEVICE_ID_C320
-#define PCI_DEVICE_ID_C320     0x3200
-#endif
+#define MOXA_BUS_TYPE_ISA      0
+#define MOXA_BUS_TYPE_PCI      1
 
 enum {
        MOXA_BOARD_C218_PCI = 1,
@@ -105,47 +80,56 @@ static char *moxa_brdname[] =
 
 #ifdef CONFIG_PCI
 static struct pci_device_id moxa_pcibrds[] = {
-       { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C218, PCI_ANY_ID, PCI_ANY_ID, 
-         0, 0, MOXA_BOARD_C218_PCI },
-       { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C320, PCI_ANY_ID, PCI_ANY_ID, 
-         0, 0, MOXA_BOARD_C320_PCI },
-       { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_CP204J, PCI_ANY_ID, PCI_ANY_ID, 
-         0, 0, MOXA_BOARD_CP204J },
+       { PCI_DEVICE(PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_C218),
+               .driver_data = MOXA_BOARD_C218_PCI },
+       { PCI_DEVICE(PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_C320),
+               .driver_data = MOXA_BOARD_C320_PCI },
+       { PCI_DEVICE(PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP204J),
+               .driver_data = MOXA_BOARD_CP204J },
        { 0 }
 };
 MODULE_DEVICE_TABLE(pci, moxa_pcibrds);
 #endif /* CONFIG_PCI */
 
-typedef struct _moxa_isa_board_conf {
+struct moxa_isa_board_conf {
        int boardType;
        int numPorts;
        unsigned long baseAddr;
-} moxa_isa_board_conf;
+};
 
-static moxa_isa_board_conf moxa_isa_boards[] =
+static struct moxa_isa_board_conf moxa_isa_boards[] =
 {
 /*       {MOXA_BOARD_C218_ISA,8,0xDC000}, */
 };
 
-typedef struct _moxa_pci_devinfo {
-       ushort busNum;
-       ushort devNum;
-       struct pci_dev *pdev;
-} moxa_pci_devinfo;
-
-typedef struct _moxa_board_conf {
+static struct moxa_board_conf {
        int boardType;
        int numPorts;
        unsigned long baseAddr;
        int busType;
-       moxa_pci_devinfo pciInfo;
-} moxa_board_conf;
 
-static moxa_board_conf moxa_boards[MAX_BOARDS];
-static void __iomem *moxaBaseAddr[MAX_BOARDS];
-static int loadstat[MAX_BOARDS];
+       int loadstat;
+
+       void __iomem *basemem;
+       void __iomem *intNdx;
+       void __iomem *intPend;
+       void __iomem *intTable;
+} moxa_boards[MAX_BOARDS];
+
+struct mxser_mstatus {
+       tcflag_t cflag;
+       int cts;
+       int dsr;
+       int ri;
+       int dcd;
+};
+
+struct moxaq_str {
+       int inq;
+       int outq;
+};
 
-struct moxa_str {
+struct moxa_port {
        int type;
        int port;
        int close_delay;
@@ -159,18 +143,18 @@ struct moxa_str {
        int cflag;
        wait_queue_head_t open_wait;
        wait_queue_head_t close_wait;
-       struct work_struct tqueue;
-};
 
-struct mxser_mstatus {
-       tcflag_t cflag;
-       int cts;
-       int dsr;
-       int ri;
-       int dcd;
-};
+       struct timer_list emptyTimer;
 
-static struct mxser_mstatus GMStatus[MAX_PORTS];
+       char chkPort;
+       char lineCtrl;
+       void __iomem *tableAddr;
+       long curBaud;
+       char DCDState;
+       char lowChkFlag;
+
+       ushort breakCnt;
+};
 
 /* statusflags */
 #define TXSTOPPED      0x1
@@ -178,25 +162,17 @@ static struct mxser_mstatus GMStatus[MAX_PORTS];
 #define EMPTYWAIT      0x4
 #define THROTTLE       0x8
 
-/* event */
-#define MOXA_EVENT_HANGUP      1
-
 #define SERIAL_DO_RESTART
 
-
-#define SERIAL_TYPE_NORMAL     1
-
 #define WAKEUP_CHARS           256
 
-#define PORTNO(x)              ((x)->index)
-
 static int verbose = 0;
 static int ttymajor = MOXAMAJOR;
 /* Variables for insmod */
 #ifdef MODULE
-static int baseaddr[]  =       {0, 0, 0, 0};
-static int type[]      =       {0, 0, 0, 0};
-static int numports[]  =       {0, 0, 0, 0};
+static int baseaddr[4];
+static int type[4];
+static int numports[4];
 #endif
 
 MODULE_AUTHOR("William Chen");
@@ -210,19 +186,9 @@ module_param_array(numports, int, NULL, 0);
 module_param(ttymajor, int, 0);
 module_param(verbose, bool, 0644);
 
-static struct tty_driver *moxaDriver;
-static struct moxa_str moxaChannels[MAX_PORTS];
-static unsigned char *moxaXmitBuff;
-static int moxaTimer_on;
-static struct timer_list moxaTimer;
-static int moxaEmptyTimer_on[MAX_PORTS];
-static struct timer_list moxaEmptyTimer[MAX_PORTS];
-static struct semaphore moxaBuffSem;
-
 /*
  * static functions:
  */
-static void do_moxa_softint(struct work_struct *);
 static int moxa_open(struct tty_struct *, struct file *);
 static void moxa_close(struct tty_struct *, struct file *);
 static int moxa_write(struct tty_struct *, const unsigned char *, int);
@@ -244,11 +210,11 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
 static void moxa_poll(unsigned long);
 static void set_tty_param(struct tty_struct *);
 static int block_till_ready(struct tty_struct *, struct file *,
-                           struct moxa_str *);
+                           struct moxa_port *);
 static void setup_empty_event(struct tty_struct *);
 static void check_xmit_empty(unsigned long);
-static void shut_down(struct moxa_str *);
-static void receive_data(struct moxa_str *);
+static void shut_down(struct moxa_port *);
+static void receive_data(struct moxa_port *);
 /*
  * moxa board interface functions:
  */
@@ -278,8 +244,8 @@ static void MoxaPortTxDisable(int);
 static void MoxaPortTxEnable(int);
 static int MoxaPortResetBrkCnt(int);
 static void MoxaPortSendBreak(int, int);
-static int moxa_get_serial_info(struct moxa_str *, struct serial_struct __user *);
-static int moxa_set_serial_info(struct moxa_str *, struct serial_struct __user *);
+static int moxa_get_serial_info(struct moxa_port *, struct serial_struct __user *);
+static int moxa_set_serial_info(struct moxa_port *, struct serial_struct __user *);
 static void MoxaSetFifo(int port, int enable);
 
 static const struct tty_operations moxa_ops = {
@@ -302,12 +268,41 @@ static const struct tty_operations moxa_ops = {
        .tiocmset = moxa_tiocmset,
 };
 
+static struct tty_driver *moxaDriver;
+static struct moxa_port moxa_ports[MAX_PORTS];
+static DEFINE_TIMER(moxaTimer, moxa_poll, 0, 0);
 static DEFINE_SPINLOCK(moxa_lock);
 
 #ifdef CONFIG_PCI
-static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board)
+static int __devinit moxa_pci_probe(struct pci_dev *pdev,
+               const struct pci_device_id *ent)
 {
-       board->baseAddr = pci_resource_start (p, 2);
+       struct moxa_board_conf *board;
+       unsigned int i;
+       int board_type = ent->driver_data;
+       int retval;
+
+       retval = pci_enable_device(pdev);
+       if (retval)
+               goto err;
+
+       for (i = 0; i < MAX_BOARDS; i++)
+               if (moxa_boards[i].basemem == NULL)
+                       break;
+
+       retval = -ENODEV;
+       if (i >= MAX_BOARDS) {
+               if (verbose)
+                       printk("More than %d MOXA Intellio family boards "
+                               "found. Board is ignored.\n", MAX_BOARDS);
+               goto err;
+       }
+
+       board = &moxa_boards[i];
+       board->basemem = pci_iomap(pdev, 2, 0x4000);
+       if (board->basemem == NULL)
+               goto err;
+
        board->boardType = board_type;
        switch (board_type) {
        case MOXA_BOARD_C218_ISA:
@@ -323,27 +318,40 @@ static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf
                break;
        }
        board->busType = MOXA_BUS_TYPE_PCI;
-       board->pciInfo.busNum = p->bus->number;
-       board->pciInfo.devNum = p->devfn >> 3;
-       board->pciInfo.pdev = p;
-       /* don't lose the reference in the next pci_get_device iteration */
-       pci_dev_get(p);
+
+       pci_set_drvdata(pdev, board);
 
        return (0);
+err:
+       return retval;
 }
+
+static void __devexit moxa_pci_remove(struct pci_dev *pdev)
+{
+       struct moxa_board_conf *brd = pci_get_drvdata(pdev);
+
+       pci_iounmap(pdev, brd->basemem);
+       brd->basemem = NULL;
+}
+
+static struct pci_driver moxa_pci_driver = {
+       .name = "moxa",
+       .id_table = moxa_pcibrds,
+       .probe = moxa_pci_probe,
+       .remove = __devexit_p(moxa_pci_remove)
+};
 #endif /* CONFIG_PCI */
 
 static int __init moxa_init(void)
 {
-       int i, numBoards;
-       struct moxa_str *ch;
+       int i, numBoards, retval = 0;
+       struct moxa_port *ch;
 
        printk(KERN_INFO "MOXA Intellio family driver version %s\n", MOXA_VERSION);
        moxaDriver = alloc_tty_driver(MAX_PORTS + 1);
        if (!moxaDriver)
                return -ENOMEM;
 
-       init_MUTEX(&moxaBuffSem);
        moxaDriver->owner = THIS_MODULE;
        moxaDriver->name = "ttyMX";
        moxaDriver->major = ttymajor;
@@ -351,40 +359,25 @@ static int __init moxa_init(void)
        moxaDriver->type = TTY_DRIVER_TYPE_SERIAL;
        moxaDriver->subtype = SERIAL_TYPE_NORMAL;
        moxaDriver->init_termios = tty_std_termios;
-       moxaDriver->init_termios.c_iflag = 0;
-       moxaDriver->init_termios.c_oflag = 0;
        moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
-       moxaDriver->init_termios.c_lflag = 0;
        moxaDriver->init_termios.c_ispeed = 9600;
        moxaDriver->init_termios.c_ospeed = 9600;
        moxaDriver->flags = TTY_DRIVER_REAL_RAW;
        tty_set_operations(moxaDriver, &moxa_ops);
 
-       moxaXmitBuff = NULL;
-
-       for (i = 0, ch = moxaChannels; i < MAX_PORTS; i++, ch++) {
+       for (i = 0, ch = moxa_ports; i < MAX_PORTS; i++, ch++) {
                ch->type = PORT_16550A;
                ch->port = i;
-               INIT_WORK(&ch->tqueue, do_moxa_softint);
-               ch->tty = NULL;
                ch->close_delay = 5 * HZ / 10;
                ch->closing_wait = 30 * HZ;
-               ch->count = 0;
-               ch->blocked_open = 0;
                ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
                init_waitqueue_head(&ch->open_wait);
                init_waitqueue_head(&ch->close_wait);
-       }
 
-       for (i = 0; i < MAX_BOARDS; i++) {
-               moxa_boards[i].boardType = 0;
-               moxa_boards[i].numPorts = 0;
-               moxa_boards[i].baseAddr = 0;
-               moxa_boards[i].busType = 0;
-               moxa_boards[i].pciInfo.busNum = 0;
-               moxa_boards[i].pciInfo.devNum = 0;
+               setup_timer(&ch->emptyTimer, check_xmit_empty,
+                               (unsigned long)ch);
        }
-       MoxaDriverInit();
+
        printk("Tty devices major number = %d\n", ttymajor);
 
        if (tty_register_driver(moxaDriver)) {
@@ -392,18 +385,8 @@ static int __init moxa_init(void)
                put_tty_driver(moxaDriver);
                return -1;
        }
-       for (i = 0; i < MAX_PORTS; i++) {
-               init_timer(&moxaEmptyTimer[i]);
-               moxaEmptyTimer[i].function = check_xmit_empty;
-               moxaEmptyTimer[i].data = (unsigned long) & moxaChannels[i];
-               moxaEmptyTimer_on[i] = 0;
-       }
 
-       init_timer(&moxaTimer);
-       moxaTimer.function = moxa_poll;
-       moxaTimer.expires = jiffies + (HZ / 50);
-       moxaTimer_on = 1;
-       add_timer(&moxaTimer);
+       mod_timer(&moxaTimer, jiffies + HZ / 50);
 
        /* Find the boards defined in source code */
        numBoards = 0;
@@ -451,35 +434,22 @@ static int __init moxa_init(void)
                }
        }
 #endif
-       /* Find PCI boards here */
+
 #ifdef CONFIG_PCI
-       {
-               struct pci_dev *p = NULL;
-               int n = ARRAY_SIZE(moxa_pcibrds) - 1;
-               i = 0;
-               while (i < n) {
-                       while ((p = pci_get_device(moxa_pcibrds[i].vendor, moxa_pcibrds[i].device, p))!=NULL)
-                       {
-                               if (pci_enable_device(p))
-                                       continue;
-                               if (numBoards >= MAX_BOARDS) {
-                                       if (verbose)
-                                               printk("More than %d MOXA Intellio family boards found. Board is ignored.", MAX_BOARDS);
-                               } else {
-                                       moxa_get_PCI_conf(p, moxa_pcibrds[i].driver_data,
-                                               &moxa_boards[numBoards]);
-                                       numBoards++;
-                               }
-                       }
-                       i++;
-               }
+       retval = pci_register_driver(&moxa_pci_driver);
+       if (retval) {
+               printk(KERN_ERR "Can't register moxa pci driver!\n");
+               if (numBoards)
+                       retval = 0;
        }
 #endif
+
        for (i = 0; i < numBoards; i++) {
-               moxaBaseAddr[i] = ioremap((unsigned long) moxa_boards[i].baseAddr, 0x4000);
+               moxa_boards[i].basemem = ioremap(moxa_boards[i].baseAddr,
+                               0x4000);
        }
 
-       return (0);
+       return retval;
 }
 
 static void __exit moxa_exit(void)
@@ -489,23 +459,22 @@ static void __exit moxa_exit(void)
        if (verbose)
                printk("Unloading module moxa ...\n");
 
-       if (moxaTimer_on)
-               del_timer(&moxaTimer);
+       del_timer_sync(&moxaTimer);
 
        for (i = 0; i < MAX_PORTS; i++)
-               if (moxaEmptyTimer_on[i])
-                       del_timer(&moxaEmptyTimer[i]);
+               del_timer_sync(&moxa_ports[i].emptyTimer);
 
        if (tty_unregister_driver(moxaDriver))
                printk("Couldn't unregister MOXA Intellio family serial driver\n");
        put_tty_driver(moxaDriver);
 
-       for (i = 0; i < MAX_BOARDS; i++) {
-               if (moxaBaseAddr[i])
-                       iounmap(moxaBaseAddr[i]);
-               if (moxa_boards[i].busType == MOXA_BUS_TYPE_PCI)
-                       pci_dev_put(moxa_boards[i].pciInfo.pdev);
-       }
+#ifdef CONFIG_PCI
+       pci_unregister_driver(&moxa_pci_driver);
+#endif
+
+       for (i = 0; i < MAX_BOARDS; i++)
+               if (moxa_boards[i].basemem)
+                       iounmap(moxa_boards[i].basemem);
 
        if (verbose)
                printk("Done\n");
@@ -514,28 +483,13 @@ static void __exit moxa_exit(void)
 module_init(moxa_init);
 module_exit(moxa_exit);
 
-static void do_moxa_softint(struct work_struct *work)
-{
-       struct moxa_str *ch = container_of(work, struct moxa_str, tqueue);
-       struct tty_struct *tty;
-
-       if (ch && (tty = ch->tty)) {
-               if (test_and_clear_bit(MOXA_EVENT_HANGUP, &ch->event)) {
-                       tty_hangup(tty);        /* FIXME: module removal race here - AKPM */
-                       wake_up_interruptible(&ch->open_wait);
-                       ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE;
-               }
-       }
-}
-
 static int moxa_open(struct tty_struct *tty, struct file *filp)
 {
-       struct moxa_str *ch;
+       struct moxa_port *ch;
        int port;
        int retval;
-       unsigned long page;
 
-       port = PORTNO(tty);
+       port = tty->index;
        if (port == MAX_PORTS) {
                return (0);
        }
@@ -543,23 +497,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
                tty->driver_data = NULL;
                return (-ENODEV);
        }
-       down(&moxaBuffSem);
-       if (!moxaXmitBuff) {
-               page = get_zeroed_page(GFP_KERNEL);
-               if (!page) {
-                       up(&moxaBuffSem);
-                       return (-ENOMEM);
-               }
-               /* This test is guarded by the BuffSem so no longer needed
-                  delete me in 2.5 */
-               if (moxaXmitBuff)
-                       free_page(page);
-               else
-                       moxaXmitBuff = (unsigned char *) page;
-       }
-       up(&moxaBuffSem);
 
-       ch = &moxaChannels[port];
+       ch = &moxa_ports[port];
        ch->count++;
        tty->driver_data = ch;
        ch->tty = tty;
@@ -585,10 +524,10 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
 
 static void moxa_close(struct tty_struct *tty, struct file *filp)
 {
-       struct moxa_str *ch;
+       struct moxa_port *ch;
        int port;
 
-       port = PORTNO(tty);
+       port = tty->index;
        if (port == MAX_PORTS) {
                return;
        }
@@ -605,7 +544,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
        if (tty_hung_up_p(filp)) {
                return;
        }
-       ch = (struct moxa_str *) tty->driver_data;
+       ch = (struct moxa_port *) tty->driver_data;
 
        if ((tty->count == 1) && (ch->count != 1)) {
                printk("moxa_close: bad serial port count; tty->count is 1, "
@@ -626,8 +565,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
        if (ch->asyncflags & ASYNC_INITIALIZED) {
                setup_empty_event(tty);
                tty_wait_until_sent(tty, 30 * HZ);      /* 30 seconds timeout */
-               moxaEmptyTimer_on[ch->port] = 0;
-               del_timer(&moxaEmptyTimer[ch->port]);
+               del_timer_sync(&moxa_ports[ch->port].emptyTimer);
        }
        shut_down(ch);
        MoxaPortFlushData(port, 2);
@@ -652,11 +590,11 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
 static int moxa_write(struct tty_struct *tty,
                      const unsigned char *buf, int count)
 {
-       struct moxa_str *ch;
+       struct moxa_port *ch;
        int len, port;
        unsigned long flags;
 
-       ch = (struct moxa_str *) tty->driver_data;
+       ch = (struct moxa_port *) tty->driver_data;
        if (ch == NULL)
                return (0);
        port = ch->port;
@@ -675,11 +613,11 @@ static int moxa_write(struct tty_struct *tty,
 
 static int moxa_write_room(struct tty_struct *tty)
 {
-       struct moxa_str *ch;
+       struct moxa_port *ch;
 
        if (tty->stopped)
                return (0);
-       ch = (struct moxa_str *) tty->driver_data;
+       ch = (struct moxa_port *) tty->driver_data;
        if (ch == NULL)
                return (0);
        return (MoxaPortTxFree(ch->port));
@@ -687,7 +625,7 @@ static int moxa_write_room(struct tty_struct *tty)
 
 static void moxa_flush_buffer(struct tty_struct *tty)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        if (ch == NULL)
                return;
@@ -698,7 +636,7 @@ static void moxa_flush_buffer(struct tty_struct *tty)
 static int moxa_chars_in_buffer(struct tty_struct *tty)
 {
        int chars;
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        /*
         * Sigh...I have to check if driver_data is NULL here, because
@@ -730,17 +668,16 @@ static void moxa_flush_chars(struct tty_struct *tty)
 
 static void moxa_put_char(struct tty_struct *tty, unsigned char c)
 {
-       struct moxa_str *ch;
+       struct moxa_port *ch;
        int port;
        unsigned long flags;
 
-       ch = (struct moxa_str *) tty->driver_data;
+       ch = (struct moxa_port *) tty->driver_data;
        if (ch == NULL)
                return;
        port = ch->port;
        spin_lock_irqsave(&moxa_lock, flags);
-       moxaXmitBuff[0] = c;
-       MoxaPortWriteData(port, moxaXmitBuff, 1);
+       MoxaPortWriteData(port, &c, 1);
        spin_unlock_irqrestore(&moxa_lock, flags);
        /************************************************
        if ( !(ch->statusflags & LOWWAIT) && (MoxaPortTxFree(port) <= 100) )
@@ -750,11 +687,11 @@ static void moxa_put_char(struct tty_struct *tty, unsigned char c)
 
 static int moxa_tiocmget(struct tty_struct *tty, struct file *file)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
        int port;
        int flag = 0, dtr, rts;
 
-       port = PORTNO(tty);
+       port = tty->index;
        if ((port != MAX_PORTS) && (!ch))
                return (-EINVAL);
 
@@ -776,11 +713,11 @@ static int moxa_tiocmget(struct tty_struct *tty, struct file *file)
 static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
                         unsigned int set, unsigned int clear)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
        int port;
        int dtr, rts;
 
-       port = PORTNO(tty);
+       port = tty->index;
        if ((port != MAX_PORTS) && (!ch))
                return (-EINVAL);
 
@@ -800,12 +737,12 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file,
 static int moxa_ioctl(struct tty_struct *tty, struct file *file,
                      unsigned int cmd, unsigned long arg)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
        register int port;
        void __user *argp = (void __user *)arg;
        int retval;
 
-       port = PORTNO(tty);
+       port = tty->index;
        if ((port != MAX_PORTS) && (!ch))
                return (-EINVAL);
 
@@ -853,14 +790,14 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file,
 
 static void moxa_throttle(struct tty_struct *tty)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        ch->statusflags |= THROTTLE;
 }
 
 static void moxa_unthrottle(struct tty_struct *tty)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        ch->statusflags &= ~THROTTLE;
 }
@@ -868,7 +805,7 @@ static void moxa_unthrottle(struct tty_struct *tty)
 static void moxa_set_termios(struct tty_struct *tty,
                             struct ktermios *old_termios)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        if (ch == NULL)
                return;
@@ -880,7 +817,7 @@ static void moxa_set_termios(struct tty_struct *tty,
 
 static void moxa_stop(struct tty_struct *tty)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        if (ch == NULL)
                return;
@@ -891,7 +828,7 @@ static void moxa_stop(struct tty_struct *tty)
 
 static void moxa_start(struct tty_struct *tty)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        if (ch == NULL)
                return;
@@ -905,7 +842,7 @@ static void moxa_start(struct tty_struct *tty)
 
 static void moxa_hangup(struct tty_struct *tty)
 {
-       struct moxa_str *ch = (struct moxa_str *) tty->driver_data;
+       struct moxa_port *ch = (struct moxa_port *) tty->driver_data;
 
        moxa_flush_buffer(tty);
        shut_down(ch);
@@ -919,24 +856,20 @@ static void moxa_hangup(struct tty_struct *tty)
 static void moxa_poll(unsigned long ignored)
 {
        register int card;
-       struct moxa_str *ch;
+       struct moxa_port *ch;
        struct tty_struct *tp;
        int i, ports;
 
-       moxaTimer_on = 0;
        del_timer(&moxaTimer);
 
        if (MoxaDriverPoll() < 0) {
-               moxaTimer.function = moxa_poll;
-               moxaTimer.expires = jiffies + (HZ / 50);
-               moxaTimer_on = 1;
-               add_timer(&moxaTimer);
+               mod_timer(&moxaTimer, jiffies + HZ / 50);
                return;
        }
        for (card = 0; card < MAX_BOARDS; card++) {
                if ((ports = MoxaPortsOfCard(card)) <= 0)
                        continue;
-               ch = &moxaChannels[card * MAX_PORTS_PER_BOARD];
+               ch = &moxa_ports[card * MAX_PORTS_PER_BOARD];
                for (i = 0; i < ports; i++, ch++) {
                        if ((ch->asyncflags & ASYNC_INITIALIZED) == 0)
                                continue;
@@ -962,18 +895,16 @@ static void moxa_poll(unsigned long ignored)
                                        if (MoxaPortDCDON(ch->port))
                                                wake_up_interruptible(&ch->open_wait);
                                        else {
-                                               set_bit(MOXA_EVENT_HANGUP, &ch->event);
-                                               schedule_work(&ch->tqueue);
+                                               tty_hangup(tp);
+                                               wake_up_interruptible(&ch->open_wait);
+                                               ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE;
                                        }
                                }
                        }
                }
        }
 
-       moxaTimer.function = moxa_poll;
-       moxaTimer.expires = jiffies + (HZ / 50);
-       moxaTimer_on = 1;
-       add_timer(&moxaTimer);
+       mod_timer(&moxaTimer, jiffies + HZ / 50);
 }
 
 /******************************************************************************/
@@ -981,10 +912,10 @@ static void moxa_poll(unsigned long ignored)
 static void set_tty_param(struct tty_struct *tty)
 {
        register struct ktermios *ts;
-       struct moxa_str *ch;
+       struct moxa_port *ch;
        int rts, cts, txflow, rxflow, xany;
 
-       ch = (struct moxa_str *) tty->driver_data;
+       ch = (struct moxa_port *) tty->driver_data;
        ts = tty->termios;
        if (ts->c_cflag & CLOCAL)
                ch->asyncflags &= ~ASYNC_CHECK_CD;
@@ -1004,7 +935,7 @@ static void set_tty_param(struct tty_struct *tty)
 }
 
 static int block_till_ready(struct tty_struct *tty, struct file *filp,
-                           struct moxa_str *ch)
+                           struct moxa_port *ch)
 {
        DECLARE_WAITQUEUE(wait,current);
        unsigned long flags;
@@ -1095,40 +1026,33 @@ static int block_till_ready(struct tty_struct *tty, struct file *filp,
 
 static void setup_empty_event(struct tty_struct *tty)
 {
-       struct moxa_str *ch = tty->driver_data;
+       struct moxa_port *ch = tty->driver_data;
        unsigned long flags;
 
        spin_lock_irqsave(&moxa_lock, flags);
        ch->statusflags |= EMPTYWAIT;
-       moxaEmptyTimer_on[ch->port] = 0;
-       del_timer(&moxaEmptyTimer[ch->port]);
-       moxaEmptyTimer[ch->port].expires = jiffies + HZ;
-       moxaEmptyTimer_on[ch->port] = 1;
-       add_timer(&moxaEmptyTimer[ch->port]);
+       mod_timer(&moxa_ports[ch->port].emptyTimer, jiffies + HZ);
        spin_unlock_irqrestore(&moxa_lock, flags);
 }
 
 static void check_xmit_empty(unsigned long data)
 {
-       struct moxa_str *ch;
+       struct moxa_port *ch;
 
-       ch = (struct moxa_str *) data;
-       moxaEmptyTimer_on[ch->port] = 0;
-       del_timer(&moxaEmptyTimer[ch->port]);
+       ch = (struct moxa_port *) data;
+       del_timer_sync(&moxa_ports[ch->port].emptyTimer);
        if (ch->tty && (ch->statusflags & EMPTYWAIT)) {
                if (MoxaPortTxQueue(ch->port) == 0) {
                        ch->statusflags &= ~EMPTYWAIT;
                        tty_wakeup(ch->tty);
                        return;
                }
-               moxaEmptyTimer[ch->port].expires = jiffies + HZ;
-               moxaEmptyTimer_on[ch->port] = 1;
-               add_timer(&moxaEmptyTimer[ch->port]);
+               mod_timer(&moxa_ports[ch->port].emptyTimer, jiffies + HZ);
        } else
                ch->statusflags &= ~EMPTYWAIT;
 }
 
-static void shut_down(struct moxa_str *ch)
+static void shut_down(struct moxa_port *ch)
 {
        struct tty_struct *tp;
 
@@ -1148,7 +1072,7 @@ static void shut_down(struct moxa_str *ch)
        ch->asyncflags &= ~ASYNC_INITIALIZED;
 }
 
-static void receive_data(struct moxa_str *ch)
+static void receive_data(struct moxa_port *ch)
 {
        struct tty_struct *tp;
        struct ktermios *ts;
@@ -1465,35 +1389,21 @@ static void receive_data(struct moxa_str *ch)
 /*
  *    Query
  */
-#define QueryPort      MAX_PORTS
-
-
 
 struct mon_str {
        int tick;
        int rxcnt[MAX_PORTS];
        int txcnt[MAX_PORTS];
 };
-typedef struct mon_str mon_st;
 
 #define        DCD_changed     0x01
 #define        DCD_oldstate    0x80
 
 static unsigned char moxaBuff[10240];
-static void __iomem *moxaIntNdx[MAX_BOARDS];
-static void __iomem *moxaIntPend[MAX_BOARDS];
-static void __iomem *moxaIntTable[MAX_BOARDS];
-static char moxaChkPort[MAX_PORTS];
-static char moxaLineCtrl[MAX_PORTS];
-static void __iomem *moxaTableAddr[MAX_PORTS];
-static long moxaCurBaud[MAX_PORTS];
-static char moxaDCDState[MAX_PORTS];
-static char moxaLowChkFlag[MAX_PORTS];
 static int moxaLowWaterChk;
 static int moxaCard;
-static mon_st moxaLog;
-static int moxaFuncTout;
-static ushort moxaBreakCnt[MAX_PORTS];
+static struct mon_str moxaLog;
+static int moxaFuncTout = HZ / 2;
 
 static void moxadelay(int);
 static void moxafunc(void __iomem *, int, ushort);
@@ -1514,16 +1424,18 @@ static int moxaloadc320(int, void __iomem *, int, int *);
  *****************************************************************************/
 void MoxaDriverInit(void)
 {
-       int i;
+       struct moxa_port *p;
+       unsigned int i;
 
        moxaFuncTout = HZ / 2;  /* 500 mini-seconds */
        moxaCard = 0;
        moxaLog.tick = 0;
        moxaLowWaterChk = 0;
        for (i = 0; i < MAX_PORTS; i++) {
-               moxaChkPort[i] = 0;
-               moxaLowChkFlag[i] = 0;
-               moxaLineCtrl[i] = 0;
+               p = &moxa_ports[i];
+               p->chkPort = 0;
+               p->lowChkFlag = 0;
+               p->lineCtrl = 0;
                moxaLog.rxcnt[i] = 0;
                moxaLog.txcnt[i] = 0;
        }
@@ -1545,19 +1457,12 @@ void MoxaDriverInit(void)
 #define MOXA_GET_CUMAJOR        (MOXA + 64)
 #define MOXA_GETMSTATUS         (MOXA + 65)
 
-
-struct moxaq_str {
-       int inq;
-       int outq;
-};
-
 struct dl_str {
        char __user *buf;
        int len;
        int cardno;
 };
 
-static struct moxaq_str temp_queue[MAX_PORTS];
 static struct dl_str dltmp;
 
 void MoxaPortFlushData(int port, int mode)
@@ -1565,10 +1470,10 @@ void MoxaPortFlushData(int port, int mode)
        void __iomem *ofsAddr;
        if ((mode < 0) || (mode > 2))
                return;
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        moxafunc(ofsAddr, FC_FlushQueue, mode);
        if (mode != 1) {
-               moxaLowChkFlag[port] = 0;
+               moxa_ports[port].lowChkFlag = 0;
                low_water_check(ofsAddr);
        }
 }
@@ -1580,7 +1485,7 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port)
        int MoxaPortTxQueue(int), MoxaPortRxQueue(int);
        void __user *argp = (void __user *)arg;
 
-       if (port == QueryPort) {
+       if (port == MAX_PORTS) {
                if ((cmd != MOXA_GET_CONF) && (cmd != MOXA_INIT_DRIVER) &&
                    (cmd != MOXA_LOAD_BIOS) && (cmd != MOXA_FIND_BOARD) && (cmd != MOXA_LOAD_C320B) &&
                 (cmd != MOXA_LOAD_CODE) && (cmd != MOXA_GETDATACOUNT) &&
@@ -1590,7 +1495,8 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port)
        }
        switch (cmd) {
        case MOXA_GET_CONF:
-               if(copy_to_user(argp, &moxa_boards, MAX_BOARDS * sizeof(moxa_board_conf)))
+               if(copy_to_user(argp, &moxa_boards, MAX_BOARDS *
+                               sizeof(struct moxa_board_conf)))
                        return -EFAULT;
                return (0);
        case MOXA_INIT_DRIVER:
@@ -1599,23 +1505,27 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port)
                return (0);
        case MOXA_GETDATACOUNT:
                moxaLog.tick = jiffies;
-               if(copy_to_user(argp, &moxaLog, sizeof(mon_st)))
+               if(copy_to_user(argp, &moxaLog, sizeof(struct mon_str)))
                        return -EFAULT;
                return (0);
        case MOXA_FLUSH_QUEUE:
                MoxaPortFlushData(port, arg);
                return (0);
-       case MOXA_GET_IOQUEUE:
-               for (i = 0; i < MAX_PORTS; i++) {
-                       if (moxaChkPort[i]) {
-                               temp_queue[i].inq = MoxaPortRxQueue(i);
-                               temp_queue[i].outq = MoxaPortTxQueue(i);
+       case MOXA_GET_IOQUEUE: {
+               struct moxaq_str __user *argm = argp;
+               struct moxaq_str tmp;
+
+               for (i = 0; i < MAX_PORTS; i++, argm++) {
+                       memset(&tmp, 0, sizeof(tmp));
+                       if (moxa_ports[i].chkPort) {
+                               tmp.inq = MoxaPortRxQueue(i);
+                               tmp.outq = MoxaPortTxQueue(i);
                        }
+                       if (copy_to_user(argm, &tmp, sizeof(tmp)))
+                               return -EFAULT;
                }
-               if(copy_to_user(argp, temp_queue, sizeof(struct moxaq_str) * MAX_PORTS))
-                       return -EFAULT;
                return (0);
-       case MOXA_GET_OQUEUE:
+       case MOXA_GET_OQUEUE:
                i = MoxaPortTxQueue(port);
                return put_user(i, (unsigned long __user *)argp);
        case MOXA_GET_IQUEUE:
@@ -1630,33 +1540,36 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port)
                if(copy_to_user(argp, &i, sizeof(int)))
                        return -EFAULT;
                return 0;
-       case MOXA_GETMSTATUS:
-               for (i = 0; i < MAX_PORTS; i++) {
-                       GMStatus[i].ri = 0;
-                       GMStatus[i].dcd = 0;
-                       GMStatus[i].dsr = 0;
-                       GMStatus[i].cts = 0;
-                       if (!moxaChkPort[i]) {
-                               continue;
+       case MOXA_GETMSTATUS: {
+               struct mxser_mstatus __user *argm = argp;
+               struct mxser_mstatus tmp;
+               struct moxa_port *p;
+
+               for (i = 0; i < MAX_PORTS; i++, argm++) {
+                       p = &moxa_ports[i];
+                       memset(&tmp, 0, sizeof(tmp));
+                       if (!p->chkPort) {
+                               goto copy;
                        } else {
-                               status = MoxaPortLineStatus(moxaChannels[i].port);
+                               status = MoxaPortLineStatus(p->port);
                                if (status & 1)
-                                       GMStatus[i].cts = 1;
+                                       tmp.cts = 1;
                                if (status & 2)
-                                       GMStatus[i].dsr = 1;
+                                       tmp.dsr = 1;
                                if (status & 4)
-                                       GMStatus[i].dcd = 1;
+                                       tmp.dcd = 1;
                        }
 
-                       if (!moxaChannels[i].tty || !moxaChannels[i].tty->termios)
-                               GMStatus[i].cflag = moxaChannels[i].cflag;
+                       if (!p->tty || !p->tty->termios)
+                               tmp.cflag = p->cflag;
                        else
-                               GMStatus[i].cflag = moxaChannels[i].tty->termios->c_cflag;
+                               tmp.cflag = p->tty->termios->c_cflag;
+copy:
+                       if (copy_to_user(argm, &tmp, sizeof(tmp)))
+                               return -EFAULT;
                }
-               if(copy_to_user(argp, GMStatus, sizeof(struct mxser_mstatus) * MAX_PORTS))
-                       return -EFAULT;
                return 0;
-       default:
+       default:
                return (-ENOIOCTLCMD);
        case MOXA_LOAD_BIOS:
        case MOXA_FIND_BOARD:
@@ -1694,6 +1607,7 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port)
 
 int MoxaDriverPoll(void)
 {
+       struct moxa_board_conf *brd;
        register ushort temp;
        register int card;
        void __iomem *ofsAddr;
@@ -1703,43 +1617,44 @@ int MoxaDriverPoll(void)
        if (moxaCard == 0)
                return (-1);
        for (card = 0; card < MAX_BOARDS; card++) {
-               if (loadstat[card] == 0)
+               brd = &moxa_boards[card];
+               if (brd->loadstat == 0)
                        continue;
-               if ((ports = moxa_boards[card].numPorts) == 0)
+               if ((ports = brd->numPorts) == 0)
                        continue;
-               if (readb(moxaIntPend[card]) == 0xff) {
-                       ip = moxaIntTable[card] + readb(moxaIntNdx[card]);
+               if (readb(brd->intPend) == 0xff) {
+                       ip = brd->intTable + readb(brd->intNdx);
                        p = card * MAX_PORTS_PER_BOARD;
                        ports <<= 1;
                        for (port = 0; port < ports; port += 2, p++) {
                                if ((temp = readw(ip + port)) != 0) {
                                        writew(0, ip + port);
-                                       ofsAddr = moxaTableAddr[p];
+                                       ofsAddr = moxa_ports[p].tableAddr;
                                        if (temp & IntrTx)
                                                writew(readw(ofsAddr + HostStat) & ~WakeupTx, ofsAddr + HostStat);
                                        if (temp & IntrBreak) {
-                                               moxaBreakCnt[p]++;
+                                               moxa_ports[p].breakCnt++;
                                        }
                                        if (temp & IntrLine) {
                                                if (readb(ofsAddr + FlagStat) & DCD_state) {
-                                                       if ((moxaDCDState[p] & DCD_oldstate) == 0)
-                                                               moxaDCDState[p] = (DCD_oldstate |
+                                                       if ((moxa_ports[p].DCDState & DCD_oldstate) == 0)
+                                                               moxa_ports[p].DCDState = (DCD_oldstate |
                                                                                   DCD_changed);
                                                } else {
-                                                       if (moxaDCDState[p] & DCD_oldstate)
-                                                               moxaDCDState[p] = DCD_changed;
+                                                       if (moxa_ports[p].DCDState & DCD_oldstate)
+                                                               moxa_ports[p].DCDState = DCD_changed;
                                                }
                                        }
                                }
                        }
-                       writeb(0, moxaIntPend[card]);
+                       writeb(0, brd->intPend);
                }
                if (moxaLowWaterChk) {
                        p = card * MAX_PORTS_PER_BOARD;
                        for (port = 0; port < ports; port++, p++) {
-                               if (moxaLowChkFlag[p]) {
-                                       moxaLowChkFlag[p] = 0;
-                                       ofsAddr = moxaTableAddr[p];
+                               if (moxa_ports[p].lowChkFlag) {
+                                       moxa_ports[p].lowChkFlag = 0;
+                                       ofsAddr = moxa_ports[p].tableAddr;
                                        low_water_check(ofsAddr);
                                }
                        }
@@ -1767,9 +1682,7 @@ int MoxaPortsOfCard(int cardno)
  *     2.  MoxaPortEnable(int port);                                        *
  *     3.  MoxaPortDisable(int port);                                       *
  *     4.  MoxaPortGetMaxBaud(int port);                                    *
- *     5.  MoxaPortGetCurBaud(int port);                                    *
  *     6.  MoxaPortSetBaud(int port, long baud);                            *
- *     7.  MoxaPortSetMode(int port, int databit, int stopbit, int parity); *
  *     8.  MoxaPortSetTermio(int port, unsigned char *termio);              *
  *     9.  MoxaPortGetLineOut(int port, int *dtrState, int *rtsState);      *
  *     10. MoxaPortLineCtrl(int port, int dtrState, int rtsState);          *
@@ -1780,18 +1693,12 @@ int MoxaPortsOfCard(int cardno)
  *     15. MoxaPortFlushData(int port, int mode);                           *
  *     16. MoxaPortWriteData(int port, unsigned char * buffer, int length); *
  *     17. MoxaPortReadData(int port, struct tty_struct *tty);              *
- *     18. MoxaPortTxBufSize(int port);                                     *
- *     19. MoxaPortRxBufSize(int port);                                     *
  *     20. MoxaPortTxQueue(int port);                                       *
  *     21. MoxaPortTxFree(int port);                                        *
  *     22. MoxaPortRxQueue(int port);                                       *
- *     23. MoxaPortRxFree(int port);                                        *
  *     24. MoxaPortTxDisable(int port);                                     *
  *     25. MoxaPortTxEnable(int port);                                      *
- *     26. MoxaPortGetBrkCnt(int port);                                     *
  *     27. MoxaPortResetBrkCnt(int port);                                   *
- *     28. MoxaPortSetXonXoff(int port, int xonValue, int xoffValue);       *
- *     29. MoxaPortIsTxHold(int port);                                      *
  *     30. MoxaPortSendBreak(int port, int ticks);                          *
  *****************************************************************************/
 /*
@@ -1878,15 +1785,6 @@ int MoxaPortsOfCard(int cardno)
  *                      38400/57600/115200 bps
  *
  *
- *      Function 9:     Get the current baud rate of this port.
- *      Syntax:
- *      long MoxaPortGetCurBaud(int port);
- *           int port           : port number (0 - 127)
- *
- *           return:    0       : this port is invalid
- *                      50 - 115200 bps
- *
- *
  *      Function 10:    Setting baud rate of this port.
  *      Syntax:
  *      long MoxaPortSetBaud(int port, long baud);
@@ -1900,18 +1798,6 @@ int MoxaPortsOfCard(int cardno)
  *                                    baud rate will be the maximun baud rate.
  *
  *
- *      Function 11:    Setting the data-bits/stop-bits/parity of this port
- *      Syntax:
- *      int  MoxaPortSetMode(int port, int databits, int stopbits, int parity);
- *           int port           : port number (0 - 127)
- *           int databits       : data bits (8/7/6/5)
- *           int stopbits       : stop bits (2/1/0, 0 show 1.5 stop bits)
- int parity     : parity (0:None,1:Odd,2:Even,3:Mark,4:Space)
- *
- *           return:    -1      : invalid parameter
- *                      0       : setting O.K.
- *
- *
  *      Function 12:    Configure the port.
  *      Syntax:
  *      int  MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud);
@@ -2016,22 +1902,6 @@ int MoxaPortsOfCard(int cardno)
  *           return:    0 - length      : real read data length
  *
  *
- *      Function 22:    Get the Tx buffer size of this port
- *      Syntax:
- *      int  MoxaPortTxBufSize(int port);
- *           int port           : port number (0 - 127)
- *
- *           return:    ..      : Tx buffer size
- *
- *
- *      Function 23:    Get the Rx buffer size of this port
- *      Syntax:
- *      int  MoxaPortRxBufSize(int port);
- *           int port           : port number (0 - 127)
- *
- *           return:    ..      : Rx buffer size
- *
- *
  *      Function 24:    Get the Tx buffer current queued data bytes
  *      Syntax:
  *      int  MoxaPortTxQueue(int port);
@@ -2056,14 +1926,6 @@ int MoxaPortsOfCard(int cardno)
  *           return:    ..      : Rx buffer current queued data bytes
  *
  *
- *      Function 27:    Get the Rx buffer current free space
- *      Syntax:
- *      int  MoxaPortRxFree(int port);
- *           int port           : port number (0 - 127)
- *
- *           return:    ..      : Rx buffer current free space
- *
- *
  *      Function 28:    Disable port data transmission.
  *      Syntax:
  *      void MoxaPortTxDisable(int port);
@@ -2076,14 +1938,6 @@ int MoxaPortsOfCard(int cardno)
  *           int port           : port number (0 - 127)
  *
  *
- *      Function 30:    Get the received BREAK signal count.
- *      Syntax:
- *      int  MoxaPortGetBrkCnt(int port);
- *           int port           : port number (0 - 127)
- *
- *           return:    0 - ..  : BREAK signal count
- *
- *
  *      Function 31:    Get the received BREAK signal count and reset it.
  *      Syntax:
  *      int  MoxaPortResetBrkCnt(int port);
@@ -2092,25 +1946,6 @@ int MoxaPortsOfCard(int cardno)
  *           return:    0 - ..  : BREAK signal count
  *
  *
- *      Function 32:    Set the S/W flow control new XON/XOFF value, default
- *                      XON is 0x11 & XOFF is 0x13.
- *      Syntax:
- *      void MoxaPortSetXonXoff(int port, int xonValue, int xoffValue);
- *           int port           : port number (0 - 127)
- *           int xonValue       : new XON value (0 - 255)
- *           int xoffValue      : new XOFF value (0 - 255)
- *
- *
- *      Function 33:    Check this port's transmission is hold by remote site
- *                      because the flow control.
- *      Syntax:
- *      int  MoxaPortIsTxHold(int port);
- *           int port           : port number (0 - 127)
- *
- *           return:    0       : normal
- *                      1       : hold by remote site
- *
- *
  *      Function 34:    Send out a BREAK signal.
  *      Syntax:
  *      void MoxaPortSendBreak(int port, int ms100);
@@ -2125,7 +1960,7 @@ int MoxaPortIsValid(int port)
 
        if (moxaCard == 0)
                return (0);
-       if (moxaChkPort[port] == 0)
+       if (moxa_ports[port].chkPort == 0)
                return (0);
        return (1);
 }
@@ -2136,9 +1971,9 @@ void MoxaPortEnable(int port)
        int MoxaPortLineStatus(int);
        short lowwater = 512;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        writew(lowwater, ofsAddr + Low_water);
-       moxaBreakCnt[port] = 0;
+       moxa_ports[port].breakCnt = 0;
        if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) ||
            (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) {
                moxafunc(ofsAddr, FC_SetBreakIrq, 0);
@@ -2155,7 +1990,7 @@ void MoxaPortEnable(int port)
 
 void MoxaPortDisable(int port)
 {
-       void __iomem *ofsAddr = moxaTableAddr[port];
+       void __iomem *ofsAddr = moxa_ports[port].tableAddr;
 
        moxafunc(ofsAddr, FC_SetFlowCtl, 0);    /* disable flow control */
        moxafunc(ofsAddr, FC_ClrLineIrq, Magic_code);
@@ -2181,7 +2016,7 @@ long MoxaPortSetBaud(int port, long baud)
 
        if ((baud < 50L) || ((max = MoxaPortGetMaxBaud(port)) == 0))
                return (0);
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        if (baud > max)
                baud = max;
        if (max == 38400L)
@@ -2193,7 +2028,7 @@ long MoxaPortSetBaud(int port, long baud)
        val = clock / baud;
        moxafunc(ofsAddr, FC_SetBaud, val);
        baud = clock / val;
-       moxaCurBaud[port] = baud;
+       moxa_ports[port].curBaud = baud;
        return (baud);
 }
 
@@ -2203,9 +2038,9 @@ int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud)
        tcflag_t cflag;
        tcflag_t mode = 0;
 
-       if (moxaChkPort[port] == 0 || termio == 0)
+       if (moxa_ports[port].chkPort == 0 || termio == 0)
                return (-1);
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        cflag = termio->c_cflag;        /* termio->c_cflag */
 
        mode = termio->c_cflag & CSIZE;
@@ -2259,13 +2094,13 @@ int MoxaPortGetLineOut(int port, int *dtrState, int *rtsState)
        if (!MoxaPortIsValid(port))
                return (-1);
        if (dtrState) {
-               if (moxaLineCtrl[port] & DTR_ON)
+               if (moxa_ports[port].lineCtrl & DTR_ON)
                        *dtrState = 1;
                else
                        *dtrState = 0;
        }
        if (rtsState) {
-               if (moxaLineCtrl[port] & RTS_ON)
+               if (moxa_ports[port].lineCtrl & RTS_ON)
                        *rtsState = 1;
                else
                        *rtsState = 0;
@@ -2278,13 +2113,13 @@ void MoxaPortLineCtrl(int port, int dtr, int rts)
        void __iomem *ofsAddr;
        int mode;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        mode = 0;
        if (dtr)
                mode |= DTR_ON;
        if (rts)
                mode |= RTS_ON;
-       moxaLineCtrl[port] = mode;
+       moxa_ports[port].lineCtrl = mode;
        moxafunc(ofsAddr, FC_LineControl, mode);
 }
 
@@ -2293,7 +2128,7 @@ void MoxaPortFlowCtrl(int port, int rts, int cts, int txflow, int rxflow, int tx
        void __iomem *ofsAddr;
        int mode;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        mode = 0;
        if (rts)
                mode |= RTS_FlowCtl;
@@ -2313,7 +2148,7 @@ int MoxaPortLineStatus(int port)
        void __iomem *ofsAddr;
        int val;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) ||
            (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) {
                moxafunc(ofsAddr, FC_LineStatus, 0);
@@ -2324,11 +2159,11 @@ int MoxaPortLineStatus(int port)
        val &= 0x0B;
        if (val & 8) {
                val |= 4;
-               if ((moxaDCDState[port] & DCD_oldstate) == 0)
-                       moxaDCDState[port] = (DCD_oldstate | DCD_changed);
+               if ((moxa_ports[port].DCDState & DCD_oldstate) == 0)
+                       moxa_ports[port].DCDState = (DCD_oldstate | DCD_changed);
        } else {
-               if (moxaDCDState[port] & DCD_oldstate)
-                       moxaDCDState[port] = DCD_changed;
+               if (moxa_ports[port].DCDState & DCD_oldstate)
+                       moxa_ports[port].DCDState = DCD_changed;
        }
        val &= 7;
        return (val);
@@ -2338,10 +2173,10 @@ int MoxaPortDCDChange(int port)
 {
        int n;
 
-       if (moxaChkPort[port] == 0)
+       if (moxa_ports[port].chkPort == 0)
                return (0);
-       n = moxaDCDState[port];
-       moxaDCDState[port] &= ~DCD_changed;
+       n = moxa_ports[port].DCDState;
+       moxa_ports[port].DCDState &= ~DCD_changed;
        n &= DCD_changed;
        return (n);
 }
@@ -2350,32 +2185,15 @@ int MoxaPortDCDON(int port)
 {
        int n;
 
-       if (moxaChkPort[port] == 0)
+       if (moxa_ports[port].chkPort == 0)
                return (0);
-       if (moxaDCDState[port] & DCD_oldstate)
+       if (moxa_ports[port].DCDState & DCD_oldstate)
                n = 1;
        else
                n = 0;
        return (n);
 }
 
-
-/*
-   int MoxaDumpMem(int port, unsigned char * buffer, int len)
-   {
-   int          i;
-   unsigned long                baseAddr,ofsAddr,ofs;
-
-   baseAddr = moxaBaseAddr[port / MAX_PORTS_PER_BOARD];
-   ofs = baseAddr + DynPage_addr + pageofs;
-   if (len > 0x2000L)
-   len = 0x2000L;
-   for (i = 0; i < len; i++)
-   buffer[i] = readb(ofs+i);
-   }
- */
-
-
 int MoxaPortWriteData(int port, unsigned char * buffer, int len)
 {
        int c, total, i;
@@ -2385,8 +2203,8 @@ int MoxaPortWriteData(int port, unsigned char * buffer, int len)
        ushort pageno, pageofs, bufhead;
        void __iomem *baseAddr, *ofsAddr, *ofs;
 
-       ofsAddr = moxaTableAddr[port];
-       baseAddr = moxaBaseAddr[port / MAX_PORTS_PER_BOARD];
+       ofsAddr = moxa_ports[port].tableAddr;
+       baseAddr = moxa_boards[port / MAX_PORTS_PER_BOARD].basemem;
        tx_mask = readw(ofsAddr + TX_mask);
        spage = readw(ofsAddr + Page_txb);
        epage = readw(ofsAddr + EndPage_txb);
@@ -2448,8 +2266,8 @@ int MoxaPortReadData(int port, struct tty_struct *tty)
        ushort pageno, bufhead;
        void __iomem *baseAddr, *ofsAddr, *ofs;
 
-       ofsAddr = moxaTableAddr[port];
-       baseAddr = moxaBaseAddr[port / MAX_PORTS_PER_BOARD];
+       ofsAddr = moxa_ports[port].tableAddr;
+       baseAddr = moxa_boards[port / MAX_PORTS_PER_BOARD].basemem;
        head = readw(ofsAddr + RXrptr);
        tail = readw(ofsAddr + RXwptr);
        rx_mask = readw(ofsAddr + RX_mask);
@@ -2504,7 +2322,7 @@ int MoxaPortReadData(int port, struct tty_struct *tty)
        }
        if ((readb(ofsAddr + FlagStat) & Xoff_state) && (remain < LowWater)) {
                moxaLowWaterChk = 1;
-               moxaLowChkFlag[port] = 1;
+               moxa_ports[port].lowChkFlag = 1;
        }
        return (total);
 }
@@ -2516,7 +2334,7 @@ int MoxaPortTxQueue(int port)
        ushort rptr, wptr, mask;
        int len;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        rptr = readw(ofsAddr + TXrptr);
        wptr = readw(ofsAddr + TXwptr);
        mask = readw(ofsAddr + TX_mask);
@@ -2530,7 +2348,7 @@ int MoxaPortTxFree(int port)
        ushort rptr, wptr, mask;
        int len;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        rptr = readw(ofsAddr + TXrptr);
        wptr = readw(ofsAddr + TXwptr);
        mask = readw(ofsAddr + TX_mask);
@@ -2544,7 +2362,7 @@ int MoxaPortRxQueue(int port)
        ushort rptr, wptr, mask;
        int len;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        rptr = readw(ofsAddr + RXrptr);
        wptr = readw(ofsAddr + RXwptr);
        mask = readw(ofsAddr + RX_mask);
@@ -2557,7 +2375,7 @@ void MoxaPortTxDisable(int port)
 {
        void __iomem *ofsAddr;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        moxafunc(ofsAddr, FC_SetXoffState, Magic_code);
 }
 
@@ -2565,7 +2383,7 @@ void MoxaPortTxEnable(int port)
 {
        void __iomem *ofsAddr;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        moxafunc(ofsAddr, FC_SetXonState, Magic_code);
 }
 
@@ -2573,8 +2391,8 @@ void MoxaPortTxEnable(int port)
 int MoxaPortResetBrkCnt(int port)
 {
        ushort cnt;
-       cnt = moxaBreakCnt[port];
-       moxaBreakCnt[port] = 0;
+       cnt = moxa_ports[port].breakCnt;
+       moxa_ports[port].breakCnt = 0;
        return (cnt);
 }
 
@@ -2583,7 +2401,7 @@ void MoxaPortSendBreak(int port, int ms100)
 {
        void __iomem *ofsAddr;
 
-       ofsAddr = moxaTableAddr[port];
+       ofsAddr = moxa_ports[port].tableAddr;
        if (ms100) {
                moxafunc(ofsAddr, FC_SendBreak, Magic_code);
                moxadelay(ms100 * (HZ / 10));
@@ -2594,7 +2412,7 @@ void MoxaPortSendBreak(int port, int ms100)
        moxafunc(ofsAddr, FC_StopBreak, Magic_code);
 }
 
-static int moxa_get_serial_info(struct moxa_str *info,
+static int moxa_get_serial_info(struct moxa_port *info,
                                struct serial_struct __user *retinfo)
 {
        struct serial_struct tmp;
@@ -2616,7 +2434,7 @@ static int moxa_get_serial_info(struct moxa_str *info,
 }
 
 
-static int moxa_set_serial_info(struct moxa_str *info,
+static int moxa_set_serial_info(struct moxa_port *info,
                                struct serial_struct __user *new_info)
 {
        struct serial_struct new_serial;
@@ -2713,7 +2531,7 @@ static int moxaloadbios(int cardno, unsigned char __user *tmp, int len)
 
        if(copy_from_user(moxaBuff, tmp, len))
                return -EFAULT;
-       baseAddr = moxaBaseAddr[cardno];
+       baseAddr = moxa_boards[cardno].basemem;
        writeb(HW_reset, baseAddr + Control_reg);       /* reset */
        moxadelay(1);           /* delay 10 ms */
        for (i = 0; i < 4096; i++)
@@ -2729,7 +2547,7 @@ static int moxafindcard(int cardno)
        void __iomem *baseAddr;
        ushort tmp;
 
-       baseAddr = moxaBaseAddr[cardno];
+       baseAddr = moxa_boards[cardno].basemem;
        switch (moxa_boards[cardno].boardType) {
        case MOXA_BOARD_C218_ISA:
        case MOXA_BOARD_C218_PCI:
@@ -2762,7 +2580,7 @@ static int moxaload320b(int cardno, unsigned char __user *tmp, int len)
                return -EINVAL;
        if(copy_from_user(moxaBuff, tmp, len))
                return -EFAULT;
-       baseAddr = moxaBaseAddr[cardno];
+       baseAddr = moxa_boards[cardno].basemem;
        writew(len - 7168 - 2, baseAddr + C320bapi_len);
        writeb(1, baseAddr + Control_reg);      /* Select Page 1 */
        for (i = 0; i < 7168; i++)
@@ -2780,7 +2598,7 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len)
 
        if(copy_from_user(moxaBuff, tmp, len))
                return -EFAULT;
-       baseAddr = moxaBaseAddr[cardno];
+       baseAddr = moxa_boards[cardno].basemem;
        switch (moxa_boards[cardno].boardType) {
        case MOXA_BOARD_C218_ISA:
        case MOXA_BOARD_C218_PCI:
@@ -2790,11 +2608,13 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len)
                        return (retval);
                port = cardno * MAX_PORTS_PER_BOARD;
                for (i = 0; i < moxa_boards[cardno].numPorts; i++, port++) {
-                       moxaChkPort[port] = 1;
-                       moxaCurBaud[port] = 9600L;
-                       moxaDCDState[port] = 0;
-                       moxaTableAddr[port] = baseAddr + Extern_table + Extern_size * i;
-                       ofsAddr = moxaTableAddr[port];
+                       struct moxa_port *p = &moxa_ports[port];
+
+                       p->chkPort = 1;
+                       p->curBaud = 9600L;
+                       p->DCDState = 0;
+                       p->tableAddr = baseAddr + Extern_table + Extern_size * i;
+                       ofsAddr = p->tableAddr;
                        writew(C218rx_mask, ofsAddr + RX_mask);
                        writew(C218tx_mask, ofsAddr + TX_mask);
                        writew(C218rx_spage + i * C218buf_pageno, ofsAddr + Page_rxb);
@@ -2812,11 +2632,13 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len)
                        return (retval);
                port = cardno * MAX_PORTS_PER_BOARD;
                for (i = 0; i < moxa_boards[cardno].numPorts; i++, port++) {
-                       moxaChkPort[port] = 1;
-                       moxaCurBaud[port] = 9600L;
-                       moxaDCDState[port] = 0;
-                       moxaTableAddr[port] = baseAddr + Extern_table + Extern_size * i;
-                       ofsAddr = moxaTableAddr[port];
+                       struct moxa_port *p = &moxa_ports[port];
+
+                       p->chkPort = 1;
+                       p->curBaud = 9600L;
+                       p->DCDState = 0;
+                       p->tableAddr = baseAddr + Extern_table + Extern_size * i;
+                       ofsAddr = p->tableAddr;
                        if (moxa_boards[cardno].numPorts == 8) {
                                writew(C320p8rx_mask, ofsAddr + RX_mask);
                                writew(C320p8tx_mask, ofsAddr + TX_mask);
@@ -2852,7 +2674,7 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len)
                }
                break;
        }
-       loadstat[cardno] = 1;
+       moxa_boards[cardno].loadstat = 1;
        return (0);
 }
 
@@ -2926,9 +2748,9 @@ static int moxaloadc218(int cardno, void __iomem *baseAddr, int len)
                return (-1);
        }
        moxaCard = 1;
-       moxaIntNdx[cardno] = baseAddr + IRQindex;
-       moxaIntPend[cardno] = baseAddr + IRQpending;
-       moxaIntTable[cardno] = baseAddr + IRQtable;
+       moxa_boards[cardno].intNdx = baseAddr + IRQindex;
+       moxa_boards[cardno].intPend = baseAddr + IRQpending;
+       moxa_boards[cardno].intTable = baseAddr + IRQtable;
        return (0);
 }
 
@@ -3021,25 +2843,15 @@ static int moxaloadc320(int cardno, void __iomem *baseAddr, int len, int *numPor
        if (readw(baseAddr + Magic_no) != Magic_code)
                return (-102);
        moxaCard = 1;
-       moxaIntNdx[cardno] = baseAddr + IRQindex;
-       moxaIntPend[cardno] = baseAddr + IRQpending;
-       moxaIntTable[cardno] = baseAddr + IRQtable;
+       moxa_boards[cardno].intNdx = baseAddr + IRQindex;
+       moxa_boards[cardno].intPend = baseAddr + IRQpending;
+       moxa_boards[cardno].intTable = baseAddr + IRQtable;
        return (0);
 }
 
-#if 0
-long MoxaPortGetCurBaud(int port)
-{
-
-       if (moxaChkPort[port] == 0)
-               return (0);
-       return (moxaCurBaud[port]);
-}
-#endif  /*  0  */
-
 static void MoxaSetFifo(int port, int enable)
 {
-       void __iomem *ofsAddr = moxaTableAddr[port];
+       void __iomem *ofsAddr = moxa_ports[port].tableAddr;
 
        if (!enable) {
                moxafunc(ofsAddr, FC_SetRxFIFOTrig, 0);
@@ -3049,132 +2861,3 @@ static void MoxaSetFifo(int port, int enable)
                moxafunc(ofsAddr, FC_SetTxFIFOCnt, 16);
        }
 }
-
-#if 0
-int MoxaPortSetMode(int port, int databits, int stopbits, int parity)
-{
-       void __iomem *ofsAddr;
-       int val;
-
-       val = 0;
-       switch (databits) {
-       case 5:
-               val |= 0;
-               break;
-       case 6:
-               val |= 1;
-               break;
-       case 7:
-               val |= 2;
-               break;
-       case 8:
-               val |= 3;
-               break;
-       default:
-               return (-1);
-       }
-       switch (stopbits) {
-       case 0:
-               val |= 0;
-               break;          /* stop bits 1.5 */
-       case 1:
-               val |= 0;
-               break;
-       case 2:
-               val |= 4;
-               break;
-       default:
-               return (-1);
-       }
-       switch (parity) {
-       case 0:
-               val |= 0x00;
-               break;          /* None  */
-       case 1:
-               val |= 0x08;
-               break;          /* Odd   */
-       case 2:
-               val |= 0x18;
-               break;          /* Even  */
-       case 3:
-               val |= 0x28;
-               break;          /* Mark  */
-       case 4:
-               val |= 0x38;
-               break;          /* Space */
-       default:
-               return (-1);
-       }
-       ofsAddr = moxaTableAddr[port];
-       moxafunc(ofsAddr, FC_SetMode, val);
-       return (0);
-}
-
-int MoxaPortTxBufSize(int port)
-{
-       void __iomem *ofsAddr;
-       int size;
-
-       ofsAddr = moxaTableAddr[port];
-       size = readw(ofsAddr + TX_mask);
-       return (size);
-}
-
-int MoxaPortRxBufSize(int port)
-{
-       void __iomem *ofsAddr;
-       int size;
-
-       ofsAddr = moxaTableAddr[port];
-       size = readw(ofsAddr + RX_mask);
-       return (size);
-}
-
-int MoxaPortRxFree(int port)
-{
-       void __iomem *ofsAddr;
-       ushort rptr, wptr, mask;
-       int len;
-
-       ofsAddr = moxaTableAddr[port];
-       rptr = readw(ofsAddr + RXrptr);
-       wptr = readw(ofsAddr + RXwptr);
-       mask = readw(ofsAddr + RX_mask);
-       len = mask - ((wptr - rptr) & mask);
-       return (len);
-}
-int MoxaPortGetBrkCnt(int port)
-{
-       return (moxaBreakCnt[port]);
-}
-
-void MoxaPortSetXonXoff(int port, int xonValue, int xoffValue)
-{
-       void __iomem *ofsAddr;
-
-       ofsAddr = moxaTableAddr[port];
-       writew(xonValue, ofsAddr + FuncArg);
-       writew(xoffValue, ofsAddr + FuncArg1);
-       writew(FC_SetXonXoff, ofsAddr + FuncCode);
-       wait_finish(ofsAddr);
-}
-
-int MoxaPortIsTxHold(int port)
-{
-       void __iomem *ofsAddr;
-       int val;
-
-       ofsAddr = moxaTableAddr[port];
-       if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) ||
-           (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) {
-               moxafunc(ofsAddr, FC_GetCCSR, 0);
-               val = readw(ofsAddr + FuncArg);
-               if (val & 0x04)
-                       return (1);
-       } else {
-               if (readw(ofsAddr + FlagStat) & Tx_flowOff)
-                       return (1);
-       }
-       return (0);
-}
-#endif
index 83f604b19290706f3a04577c463a4cfeec029a0a..a61fb6da5d03f0b757b93c45893f01a8d031ddc8 100644 (file)
@@ -321,8 +321,6 @@ struct mxser_struct {
        unsigned long event;
        int count;              /* # of fd on device */
        int blocked_open;       /* # of blocked opens */
-       long session;           /* Session of opening process */
-       long pgrp;              /* pgrp of opening process */
        unsigned char *xmit_buf;
        int xmit_head;
        int xmit_tail;
@@ -1001,15 +999,12 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
                mxser_change_speed(info, NULL);
        }
 
-       info->session = process_session(current);
-       info->pgrp = process_group(current);
-
        /*
        status = mxser_get_msr(info->base, 0, info->port);
        mxser_check_modem_status(info, status);
        */
 
-/* unmark here for very high baud rate (ex. 921600 bps) used */
+       /* unmark here for very high baud rate (ex. 921600 bps) used */
        tty->low_latency = 1;
        return 0;
 }
@@ -1254,9 +1249,7 @@ static void mxser_flush_buffer(struct tty_struct *tty)
        spin_unlock_irqrestore(&info->slock, flags);
        /* above added by shinhay */
 
-       wake_up_interruptible(&tty->write_wait);
-       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
-               (tty->ldisc.write_wakeup) (tty);
+       tty_wakeup(tty);
 }
 
 static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
index 7e188a4d602a7060915a89eda89d95533bfc2636..9fe28497eae9ed51b8780673cd111456b1ff8aec 100644 (file)
 
 #define READ_MOXA_MUST_GDL(baseio)     inb((baseio)+MOXA_MUST_GDL_REGISTER)
 
-
-#ifndef INIT_WORK
-#define INIT_WORK(_work, _func, _data){        \
-       _data->tqueue.routine = _func;\
-       _data->tqueue.data = _data;\
-       }
-#endif
-
 #endif
index 1bb030b3a51a6ec3017cf2d21537ceef4f6f1fbf..9af07e4999d5f0cac406a3f2200adad82b27dcca 100644 (file)
 
 #include "mxser_new.h"
 
-#define        MXSER_VERSION   "2.0"
+#define        MXSER_VERSION   "2.0.1"         /* 1.9.15 */
 #define        MXSERMAJOR       174
 #define        MXSERCUMAJOR     175
 
-#define        MXSER_EVENT_TXLOW       1
-
 #define MXSER_BOARDS           4       /* Max. boards */
 #define MXSER_PORTS_PER_BOARD  8       /* Max. ports per board */
 #define MXSER_PORTS            (MXSER_BOARDS * MXSER_PORTS_PER_BOARD)
-#define MXSER_ISR_PASS_LIMIT   99999L
+#define MXSER_ISR_PASS_LIMIT   100
 
 #define        MXSER_ERR_IOADDR        -1
 #define        MXSER_ERR_IRQ           -2
 #define        MXSER_ERR_IRQ_CONFLIT   -3
 #define        MXSER_ERR_VECTOR        -4
 
+/*CheckIsMoxaMust return value*/
+#define MOXA_OTHER_UART                0x00
+#define MOXA_MUST_MU150_HWID   0x01
+#define MOXA_MUST_MU860_HWID   0x02
+
 #define WAKEUP_CHARS           256
 
 #define UART_MCR_AFE           0x20
@@ -176,6 +179,18 @@ static struct pci_device_id mxser_pcibrds[] = {
 };
 MODULE_DEVICE_TABLE(pci, mxser_pcibrds);
 
+static int mxvar_baud_table[] = {
+       0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400,
+       4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600
+};
+static unsigned int mxvar_baud_table1[] = {
+       0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
+       B4800, B9600, B19200, B38400, B57600, B115200, B230400, B460800, B921600
+};
+#define BAUD_TABLE_NO ARRAY_SIZE(mxvar_baud_table)
+
+#define B_SPEC B2000000
+
 static int ioaddr[MXSER_BOARDS] = { 0, 0, 0, 0 };
 static int ttymajor = MXSERMAJOR;
 static int calloutmajor = MXSERCUMAJOR;
@@ -237,8 +252,7 @@ struct mxser_port {
        long realbaud;
        int type;               /* UART type */
        int flags;              /* defined in tty.h */
-       long session;           /* Session of opening process */
-       long pgrp;              /* pgrp of opening process */
+       int speed;
 
        int x_char;             /* xon/xoff character */
        int IER;                /* Interrupt Enable Register */
@@ -267,14 +281,11 @@ struct mxser_port {
        int xmit_cnt;
 
        struct ktermios normal_termios;
-       struct ktermios callout_termios;
 
        struct mxser_mon mon_data;
 
        spinlock_t slock;
-       struct work_struct tqueue;
        wait_queue_head_t open_wait;
-       wait_queue_head_t close_wait;
        wait_queue_head_t delta_msr_wait;
 };
 
@@ -313,10 +324,9 @@ static int mxvar_diagflag;
 static unsigned char mxser_msr[MXSER_PORTS + 1];
 static struct mxser_mon_ext mon_data_ext;
 static int mxser_set_baud_method[MXSER_PORTS + 1];
-static spinlock_t gm_lock;
 
 #ifdef CONFIG_PCI
-static int CheckIsMoxaMust(int io)
+static int __devinit CheckIsMoxaMust(int io)
 {
        u8 oldmcr, hwid;
        int i;
@@ -360,15 +370,6 @@ static void process_txrx_fifo(struct mxser_port *info)
                        }
 }
 
-static void mxser_do_softint(struct work_struct *work)
-{
-       struct mxser_port *info = container_of(work, struct mxser_port, tqueue);
-       struct tty_struct *tty = info->tty;
-
-       if (test_and_clear_bit(MXSER_EVENT_TXLOW, &info->event))
-               tty_wakeup(tty);
-}
-
 static unsigned char mxser_get_msr(int baseaddr, int mode, int port)
 {
        unsigned char status = 0;
@@ -456,10 +457,10 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp,
 
 static int mxser_set_baud(struct mxser_port *info, long newspd)
 {
+       unsigned int i;
        int quot = 0;
        unsigned char cval;
        int ret = 0;
-       unsigned long flags;
 
        if (!info->tty || !info->tty->termios)
                return ret;
@@ -471,29 +472,34 @@ static int mxser_set_baud(struct mxser_port *info, long newspd)
                return 0;
 
        info->realbaud = newspd;
-       if (newspd == 134) {
-               quot = (2 * info->baud_base / 269);
-       } else if (newspd) {
-               quot = info->baud_base / newspd;
-               if (quot == 0)
-                       quot = 1;
+       for (i = 0; i < BAUD_TABLE_NO; i++)
+              if (newspd == mxvar_baud_table[i])
+                      break;
+       if (i == BAUD_TABLE_NO) {
+               quot = info->baud_base / info->speed;
+               if (info->speed <= 0 || info->speed > info->max_baud)
+                       quot = 0;
        } else {
-               quot = 0;
+               if (newspd == 134) {
+                       quot = (2 * info->baud_base / 269);
+               } else if (newspd) {
+                       quot = info->baud_base / newspd;
+                       if (quot == 0)
+                               quot = 1;
+               } else {
+                       quot = 0;
+               }
        }
 
        info->timeout = ((info->xmit_fifo_size * HZ * 10 * quot) / info->baud_base);
        info->timeout += HZ / 50;       /* Add .02 seconds of slop */
 
        if (quot) {
-               spin_lock_irqsave(&info->slock, flags);
                info->MCR |= UART_MCR_DTR;
                outb(info->MCR, info->ioaddr + UART_MCR);
-               spin_unlock_irqrestore(&info->slock, flags);
        } else {
-               spin_lock_irqsave(&info->slock, flags);
                info->MCR &= ~UART_MCR_DTR;
                outb(info->MCR, info->ioaddr + UART_MCR);
-               spin_unlock_irqrestore(&info->slock, flags);
                return ret;
        }
 
@@ -505,6 +511,18 @@ static int mxser_set_baud(struct mxser_port *info, long newspd)
        outb(quot >> 8, info->ioaddr + UART_DLM);       /* MS of divisor */
        outb(cval, info->ioaddr + UART_LCR);    /* reset DLAB */
 
+       if (i == BAUD_TABLE_NO) {
+               quot = info->baud_base % info->speed;
+               quot *= 8;
+               if ((quot % info->speed) > (info->speed / 2)) {
+                       quot /= info->speed;
+                       quot++;
+               } else {
+                       quot /= info->speed;
+               }
+               SET_MOXA_MUST_ENUM_VALUE(info->ioaddr, quot);
+       } else
+               SET_MOXA_MUST_ENUM_VALUE(info->ioaddr, 0);
 
        return ret;
 }
@@ -520,7 +538,6 @@ static int mxser_change_speed(struct mxser_port *info,
        int ret = 0;
        unsigned char status;
        long baud;
-       unsigned long flags;
 
        if (!info->tty || !info->tty->termios)
                return ret;
@@ -529,7 +546,10 @@ static int mxser_change_speed(struct mxser_port *info,
                return ret;
 
        if (mxser_set_baud_method[info->tty->index] == 0) {
-               baud = tty_get_baud_rate(info->tty);
+               if ((cflag & CBAUD) == B_SPEC)
+                       baud = info->speed;
+               else
+                       baud = tty_get_baud_rate(info->tty);
                mxser_set_baud(info, baud);
        }
 
@@ -612,8 +632,8 @@ static int mxser_change_speed(struct mxser_port *info,
                                                outb(info->IER, info->ioaddr +
                                                                UART_IER);
                                        }
-                                       set_bit(MXSER_EVENT_TXLOW, &info->event);
-                                       schedule_work(&info->tqueue);                           }
+                                       tty_wakeup(info->tty);
+                               }
                        } else {
                                if (!(status & UART_MSR_CTS)) {
                                        info->tty->hw_stopped = 1;
@@ -668,7 +688,6 @@ static int mxser_change_speed(struct mxser_port *info,
                }
        }
        if (info->board->chip_flag) {
-               spin_lock_irqsave(&info->slock, flags);
                SET_MOXA_MUST_XON1_VALUE(info->ioaddr, START_CHAR(info->tty));
                SET_MOXA_MUST_XOFF1_VALUE(info->ioaddr, STOP_CHAR(info->tty));
                if (I_IXON(info->tty)) {
@@ -681,7 +700,6 @@ static int mxser_change_speed(struct mxser_port *info,
                } else {
                        DISABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(info->ioaddr);
                }
-               spin_unlock_irqrestore(&info->slock, flags);
        }
 
 
@@ -708,7 +726,6 @@ static void mxser_check_modem_status(struct mxser_port *port, int status)
        if ((port->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
                if (status & UART_MSR_DCD)
                        wake_up_interruptible(&port->open_wait);
-               schedule_work(&port->tqueue);
        }
 
        if (port->flags & ASYNC_CTS_FLOW) {
@@ -724,8 +741,7 @@ static void mxser_check_modem_status(struct mxser_port *port, int status)
                                        outb(port->IER, port->ioaddr +
                                                        UART_IER);
                                }
-                               set_bit(MXSER_EVENT_TXLOW, &port->event);
-                               schedule_work(&port->tqueue);
+                               tty_wakeup(port->tty);
                        }
                } else {
                        if (!(status & UART_MSR_CTS)) {
@@ -836,10 +852,10 @@ static int mxser_startup(struct mxser_port *info)
        /*
         * and set the speed of the serial port
         */
-       spin_unlock_irqrestore(&info->slock, flags);
        mxser_change_speed(info, NULL);
-
        info->flags |= ASYNC_INITIALIZED;
+       spin_unlock_irqrestore(&info->slock, flags);
+
        return 0;
 }
 
@@ -909,11 +925,9 @@ static void mxser_shutdown(struct mxser_port *info)
 static int mxser_open(struct tty_struct *tty, struct file *filp)
 {
        struct mxser_port *info;
+       unsigned long flags;
        int retval, line;
 
-       /* initialize driver_data in case something fails */
-       tty->driver_data = NULL;
-
        line = tty->index;
        if (line == MXSER_PORTS)
                return 0;
@@ -928,7 +942,9 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
        /*
         * Start up serial port
         */
+       spin_lock_irqsave(&info->slock, flags);
        info->count++;
+       spin_unlock_irqrestore(&info->slock, flags);
        retval = mxser_startup(info);
        if (retval)
                return retval;
@@ -937,17 +953,6 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
        if (retval)
                return retval;
 
-       if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
-                       *tty->termios = info->normal_termios;
-               else
-                       *tty->termios = info->callout_termios;
-               mxser_change_speed(info, NULL);
-       }
-
-       info->session = process_session(current);
-       info->pgrp = process_group(current);
-
        /* unmark here for very high baud rate (ex. 921600 bps) used */
        tty->low_latency = 1;
        return 0;
@@ -1054,8 +1059,6 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
        }
 
        info->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
-       wake_up_interruptible(&info->close_wait);
-
 }
 
 static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count)
@@ -1222,6 +1225,7 @@ static int mxser_set_serial_info(struct mxser_port *info,
                struct serial_struct __user *new_info)
 {
        struct serial_struct new_serial;
+       unsigned long sl_flags;
        unsigned int flags;
        int retval = 0;
 
@@ -1264,8 +1268,11 @@ static int mxser_set_serial_info(struct mxser_port *info,
        process_txrx_fifo(info);
 
        if (info->flags & ASYNC_INITIALIZED) {
-               if (flags != (info->flags & ASYNC_SPD_MASK))
+               if (flags != (info->flags & ASYNC_SPD_MASK)) {
+                       spin_lock_irqsave(&info->slock, sl_flags);
                        mxser_change_speed(info, NULL);
+                       spin_unlock_irqrestore(&info->slock, sl_flags);
+               }
        } else
                retval = mxser_startup(info);
 
@@ -1373,11 +1380,10 @@ static int mxser_tiocmset(struct tty_struct *tty, struct file *file,
        return 0;
 }
 
-static int mxser_program_mode(int port)
+static int __init mxser_program_mode(int port)
 {
        int id, i, j, n;
 
-       spin_lock(&gm_lock);
        outb(0, port);
        outb(0, port);
        outb(0, port);
@@ -1385,7 +1391,6 @@ static int mxser_program_mode(int port)
        (void)inb(port);
        outb(0, port);
        (void)inb(port);
-       spin_unlock(&gm_lock);
 
        id = inb(port + 1) & 0x1F;
        if ((id != C168_ASIC_ID) &&
@@ -1410,7 +1415,7 @@ static int mxser_program_mode(int port)
        return id;
 }
 
-static void mxser_normal_mode(int port)
+static void __init mxser_normal_mode(int port)
 {
        int i, n;
 
@@ -1443,7 +1448,7 @@ static void mxser_normal_mode(int port)
 #define EN0_PORT       0x010   /* Rcv missed frame error counter RD */
 #define ENC_PAGE0      0x000   /* Select page 0 of chip registers   */
 #define ENC_PAGE3      0x0C0   /* Select page 3 of chip registers   */
-static int mxser_read_register(int port, unsigned short *regs)
+static int __init mxser_read_register(int port, unsigned short *regs)
 {
        int i, k, value, id;
        unsigned int j;
@@ -1644,6 +1649,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
        struct serial_icounter_struct __user *p_cuser;
        unsigned long templ;
        unsigned long flags;
+       unsigned int i;
        void __user *argp = (void __user *)arg;
        int retval;
 
@@ -1682,6 +1688,36 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
                return 0;
        }
 
+       if (cmd == MOXA_SET_SPECIAL_BAUD_RATE) {
+               int speed;
+
+               if (get_user(speed, (int __user *)argp))
+                       return -EFAULT;
+               if (speed <= 0 || speed > info->max_baud)
+                       return -EFAULT;
+               if (!info->tty || !info->tty->termios || !info->ioaddr)
+                       return 0;
+               info->tty->termios->c_cflag &= ~(CBAUD | CBAUDEX);
+               for (i = 0; i < BAUD_TABLE_NO; i++)
+                       if (speed == mxvar_baud_table[i])
+                               break;
+               if (i == BAUD_TABLE_NO) {
+                       info->tty->termios->c_cflag |= B_SPEC;
+               } else if (speed != 0)
+                       info->tty->termios->c_cflag |= mxvar_baud_table1[i];
+
+               info->speed = speed;
+               spin_lock_irqsave(&info->slock, flags);
+               mxser_change_speed(info, NULL);
+               spin_unlock_irqrestore(&info->slock, flags);
+
+               return 0;
+       } else if (cmd == MOXA_GET_SPECIAL_BAUD_RATE) {
+               if (copy_to_user(argp, &info->speed, sizeof(int)))
+                    return -EFAULT;
+               return 0;
+       }
+
        if (cmd != TIOCGSERIAL && cmd != TIOCMIWAIT && cmd != TIOCGICOUNT &&
                        test_bit(TTY_IO_ERROR, &tty->flags))
                return -EIO;
@@ -1799,7 +1835,9 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
                long baud;
                if (get_user(baud, (long __user *)argp))
                        return -EFAULT;
+               spin_lock_irqsave(&info->slock, flags);
                mxser_set_baud(info, baud);
+               spin_unlock_irqrestore(&info->slock, flags);
                return 0;
        }
        case MOXA_ASPP_GETBAUD:
@@ -1976,7 +2014,9 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
        if ((tty->termios->c_cflag != old_termios->c_cflag) ||
                        (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) {
 
+               spin_lock_irqsave(&info->slock, flags);
                mxser_change_speed(info, old_termios);
+               spin_unlock_irqrestore(&info->slock, flags);
 
                if ((old_termios->c_cflag & CRTSCTS) &&
                                !(tty->termios->c_cflag & CRTSCTS)) {
@@ -2066,7 +2106,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout)
 /*
  * This routine is called by tty_hangup() when a hangup is signaled.
  */
-void mxser_hangup(struct tty_struct *tty)
+static void mxser_hangup(struct tty_struct *tty)
 {
        struct mxser_port *info = tty->driver_data;
 
@@ -2105,9 +2145,6 @@ static void mxser_receive_chars(struct mxser_port *port, int *status)
        int cnt = 0;
        int recv_room;
        int max = 256;
-       unsigned long flags;
-
-       spin_lock_irqsave(&port->slock, flags);
 
        recv_room = tty->receive_room;
        if ((recv_room == 0) && (!port->ldisc_stop_rx))
@@ -2169,7 +2206,8 @@ intr_old:
                                } else if (*status & UART_LSR_OE) {
                                        flag = TTY_OVERRUN;
                                        port->icount.overrun++;
-                               }
+                               } else
+                                       flag = TTY_BREAK;
                        }
                        tty_insert_flip_char(tty, ch, flag);
                        cnt++;
@@ -2191,7 +2229,6 @@ end_intr:
        mxvar_log.rxcnt[port->tty->index] += cnt;
        port->mon_data.rxcnt += cnt;
        port->mon_data.up_rxcnt += cnt;
-       spin_unlock_irqrestore(&port->slock, flags);
 
        tty_flip_buffer_push(tty);
 }
@@ -2199,9 +2236,6 @@ end_intr:
 static void mxser_transmit_chars(struct mxser_port *port)
 {
        int count, cnt;
-       unsigned long flags;
-
-       spin_lock_irqsave(&port->slock, flags);
 
        if (port->x_char) {
                outb(port->x_char, port->ioaddr + UART_TX);
@@ -2210,11 +2244,11 @@ static void mxser_transmit_chars(struct mxser_port *port)
                port->mon_data.txcnt++;
                port->mon_data.up_txcnt++;
                port->icount.tx++;
-               goto unlock;
+               return;
        }
 
        if (port->xmit_buf == 0)
-               goto unlock;
+               return;
 
        if ((port->xmit_cnt <= 0) || port->tty->stopped ||
                        (port->tty->hw_stopped &&
@@ -2222,7 +2256,7 @@ static void mxser_transmit_chars(struct mxser_port *port)
                        (!port->board->chip_flag))) {
                port->IER &= ~UART_IER_THRI;
                outb(port->IER, port->ioaddr + UART_IER);
-               goto unlock;
+               return;
        }
 
        cnt = port->xmit_cnt;
@@ -2240,16 +2274,13 @@ static void mxser_transmit_chars(struct mxser_port *port)
        port->mon_data.up_txcnt += (cnt - port->xmit_cnt);
        port->icount.tx += (cnt - port->xmit_cnt);
 
-       if (port->xmit_cnt < WAKEUP_CHARS) {
-               set_bit(MXSER_EVENT_TXLOW, &port->event);
-               schedule_work(&port->tqueue);
-       }
+       if (port->xmit_cnt < WAKEUP_CHARS)
+               tty_wakeup(port->tty);
+
        if (port->xmit_cnt <= 0) {
                port->IER &= ~UART_IER_THRI;
                outb(port->IER, port->ioaddr + UART_IER);
        }
-unlock:
-       spin_unlock_irqrestore(&port->slock, flags);
 }
 
 /*
@@ -2261,8 +2292,7 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
        struct mxser_board *brd = NULL;
        struct mxser_port *port;
        int max, irqbits, bits, msr;
-       int pass_counter = 0;
-       unsigned int int_cnt;
+       unsigned int int_cnt, pass_counter = 0;
        int handled = IRQ_NONE;
 
        for (i = 0; i < MXSER_BOARDS; i++)
@@ -2276,7 +2306,7 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
        if (brd == NULL)
                goto irq_stop;
        max = brd->info->nports;
-       while (1) {
+       while (pass_counter++ < MXSER_ISR_PASS_LIMIT) {
                irqbits = inb(brd->vector) & brd->vector_mask;
                if (irqbits == brd->vector_mask)
                        break;
@@ -2290,12 +2320,16 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
                        port = &brd->ports[i];
 
                        int_cnt = 0;
+                       spin_lock(&port->slock);
                        do {
                                iir = inb(port->ioaddr + UART_IIR);
                                if (iir & UART_IIR_NO_INT)
                                        break;
                                iir &= MOXA_MUST_IIR_MASK;
-                               if (!port->tty) {
+                               if (!port->tty ||
+                                               (port->flags & ASYNC_CLOSING) ||
+                                               !(port->flags &
+                                                       ASYNC_INITIALIZED)) {
                                        status = inb(port->ioaddr + UART_LSR);
                                        outb(0x27, port->ioaddr + UART_FCR);
                                        inb(port->ioaddr + UART_MSR);
@@ -2341,9 +2375,8 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
                                                mxser_transmit_chars(port);
                                }
                        } while (int_cnt++ < MXSER_ISR_PASS_LIMIT);
+                       spin_unlock(&port->slock);
                }
-               if (pass_counter++ > MXSER_ISR_PASS_LIMIT)
-                       break;  /* Prevent infinite loops */
        }
 
 irq_stop:
@@ -2385,7 +2418,6 @@ static void mxser_release_res(struct mxser_board *brd, struct pci_dev *pdev,
 #ifdef CONFIG_PCI
                pci_release_region(pdev, 2);
                pci_release_region(pdev, 3);
-               pci_dev_put(pdev);
 #endif
        } else {
                release_region(brd->ports[0].ioaddr, 8 * brd->info->nports);
@@ -2420,11 +2452,10 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
                info->custom_divisor = info->baud_base * 16;
                info->close_delay = 5 * HZ / 10;
                info->closing_wait = 30 * HZ;
-               INIT_WORK(&info->tqueue, mxser_do_softint);
                info->normal_termios = mxvar_sdriver->init_termios;
                init_waitqueue_head(&info->open_wait);
-               init_waitqueue_head(&info->close_wait);
                init_waitqueue_head(&info->delta_msr_wait);
+               info->speed = 9600;
                memset(&info->mon_data, 0, sizeof(struct mxser_mon));
                info->err_shadow = 0;
                spin_lock_init(&info->slock);
@@ -2433,22 +2464,17 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
                outb(inb(info->ioaddr + UART_IER) & 0xf0,
                        info->ioaddr + UART_IER);
        }
-       /*
-        * Allocate the IRQ if necessary
-        */
 
-       retval = request_irq(brd->irq, mxser_interrupt,
-                       (brd->ports[0].flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED :
-                       IRQF_DISABLED, "mxser", brd);
+       retval = request_irq(brd->irq, mxser_interrupt, IRQF_SHARED, "mxser",
+                       brd);
        if (retval) {
                printk(KERN_ERR "Board %s: Request irq failed, IRQ (%d) may "
                        "conflict with another device.\n",
                        brd->info->name, brd->irq);
                /* We hold resources, we need to release them. */
                mxser_release_res(brd, pdev, 0);
-               return retval;
        }
-       return 0;
+       return retval;
 }
 
 static int __init mxser_get_ISA_conf(int cap, struct mxser_board *brd)
@@ -2633,8 +2659,9 @@ static int __devinit mxser_probe(struct pci_dev *pdev,
        }
 
        /* mxser_initbrd will hook ISR. */
-       if (mxser_initbrd(brd, pdev) < 0)
-               goto err_relvec;
+       retval = mxser_initbrd(brd, pdev);
+       if (retval)
+               goto err_null;
 
        for (i = 0; i < brd->info->nports; i++)
                tty_register_device(mxvar_sdriver, brd->idx + i, &pdev->dev);
@@ -2642,10 +2669,9 @@ static int __devinit mxser_probe(struct pci_dev *pdev,
        pci_set_drvdata(pdev, brd);
 
        return 0;
-err_relvec:
-       pci_release_region(pdev, 3);
 err_relio:
        pci_release_region(pdev, 2);
+err_null:
        brd->info = NULL;
 err:
        return retval;
@@ -2663,6 +2689,7 @@ static void __devexit mxser_remove(struct pci_dev *pdev)
                tty_unregister_device(mxvar_sdriver, brd->idx + i);
 
        mxser_release_res(brd, pdev, 1);
+       brd->info = NULL;
 }
 
 static struct pci_driver mxser_driver = {
@@ -2684,7 +2711,6 @@ static int __init mxser_module_init(void)
        mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 1);
        if (!mxvar_sdriver)
                return -ENOMEM;
-       spin_lock_init(&gm_lock);
 
        printk(KERN_INFO "MOXA Smartio/Industio family driver version %s\n",
                MXSER_VERSION);
index a08f0ecb09ba76deaba83d8aff1ed691621ca850..d42f7766c65292cf83f4eb44eb1bbf6ae1ab5ed3 100644 (file)
 #define RS422_MODE             2
 #define RS485_4WIRE_MODE       3
 #define OP_MODE_MASK           3
-// above add by Victor Yu. 01-05-2004
-
-#define TTY_THRESHOLD_THROTTLE  128
-
-#define LO_WATER               (TTY_FLIPBUF_SIZE)
-#define HI_WATER               (TTY_FLIPBUF_SIZE*2*3/4)
-
-// added by James. 03-11-2004.
-#define MOXA_SDS_GETICOUNTER   (MOXA + 68)
-#define MOXA_SDS_RSTICOUNTER   (MOXA + 69)
-// (above) added by James.
 
+#define MOXA_SDS_RSTICOUNTER   (MOXA + 69)
 #define MOXA_ASPP_OQUEUE       (MOXA + 70)
 #define MOXA_ASPP_SETBAUD      (MOXA + 71)
 #define MOXA_ASPP_GETBAUD      (MOXA + 72)
@@ -45,7 +35,8 @@
 #define MOXA_ASPP_LSTATUS      (MOXA + 74)
 #define MOXA_ASPP_MON_EXT      (MOXA + 75)
 #define MOXA_SET_BAUD_METHOD   (MOXA + 76)
-
+#define MOXA_SET_SPECIAL_BAUD_RATE     (MOXA + 77)
+#define MOXA_GET_SPECIAL_BAUD_RATE     (MOXA + 78)
 
 /* --------------------------------------------------- */
 
 #define NPPI_NOTIFY_SW_OVERRUN 0x08
 #define NPPI_NOTIFY_BREAK      0x10
 
-#define NPPI_NOTIFY_CTSHOLD         0x01       // Tx hold by CTS low
-#define NPPI_NOTIFY_DSRHOLD         0x02       // Tx hold by DSR low
-#define NPPI_NOTIFY_XOFFHOLD        0x08       // Tx hold by Xoff received
-#define NPPI_NOTIFY_XOFFXENT        0x10       // Xoff Sent
-
-//CheckIsMoxaMust return value
-#define MOXA_OTHER_UART                        0x00
-#define MOXA_MUST_MU150_HWID           0x01
-#define MOXA_MUST_MU860_HWID           0x02
-
-// follow just for Moxa Must chip define.
-//
-// when LCR register (offset 0x03) write following value,
-// the Must chip will enter enchance mode. And write value
-// on EFR (offset 0x02) bit 6,7 to change bank.
+#define NPPI_NOTIFY_CTSHOLD         0x01       /* Tx hold by CTS low */
+#define NPPI_NOTIFY_DSRHOLD         0x02       /* Tx hold by DSR low */
+#define NPPI_NOTIFY_XOFFHOLD        0x08       /* Tx hold by Xoff received */
+#define NPPI_NOTIFY_XOFFXENT        0x10       /* Xoff Sent */
+
+/* follow just for Moxa Must chip define. */
+/* */
+/* when LCR register (offset 0x03) write following value, */
+/* the Must chip will enter enchance mode. And write value */
+/* on EFR (offset 0x02) bit 6,7 to change bank. */
 #define MOXA_MUST_ENTER_ENCHANCE       0xBF
 
-// when enhance mode enable, access on general bank register
+/* when enhance mode enable, access on general bank register */
 #define MOXA_MUST_GDL_REGISTER         0x07
 #define MOXA_MUST_GDL_MASK             0x7F
 #define MOXA_MUST_GDL_HAS_BAD_DATA     0x80
 
-#define MOXA_MUST_LSR_RERR             0x80    // error in receive FIFO
-// enchance register bank select and enchance mode setting register
-// when LCR register equal to 0xBF
+#define MOXA_MUST_LSR_RERR             0x80    /* error in receive FIFO */
+/* enchance register bank select and enchance mode setting register */
+/* when LCR register equal to 0xBF */
 #define MOXA_MUST_EFR_REGISTER         0x02
-// enchance mode enable
+/* enchance mode enable */
 #define MOXA_MUST_EFR_EFRB_ENABLE      0x10
-// enchance reister bank set 0, 1, 2
+/* enchance reister bank set 0, 1, 2 */
 #define MOXA_MUST_EFR_BANK0            0x00
 #define MOXA_MUST_EFR_BANK1            0x40
 #define MOXA_MUST_EFR_BANK2            0x80
 #define MOXA_MUST_EFR_BANK3            0xC0
 #define MOXA_MUST_EFR_BANK_MASK                0xC0
 
-// set XON1 value register, when LCR=0xBF and change to bank0
+/* set XON1 value register, when LCR=0xBF and change to bank0 */
 #define MOXA_MUST_XON1_REGISTER                0x04
 
-// set XON2 value register, when LCR=0xBF and change to bank0
+/* set XON2 value register, when LCR=0xBF and change to bank0 */
 #define MOXA_MUST_XON2_REGISTER                0x05
 
-// set XOFF1 value register, when LCR=0xBF and change to bank0
+/* set XOFF1 value register, when LCR=0xBF and change to bank0 */
 #define MOXA_MUST_XOFF1_REGISTER       0x06
 
-// set XOFF2 value register, when LCR=0xBF and change to bank0
+/* set XOFF2 value register, when LCR=0xBF and change to bank0 */
 #define MOXA_MUST_XOFF2_REGISTER       0x07
 
 #define MOXA_MUST_RBRTL_REGISTER       0x04
 #define MOXA_MUST_ECR_REGISTER         0x06
 #define MOXA_MUST_CSR_REGISTER         0x07
 
-// good data mode enable
+/* good data mode enable */
 #define MOXA_MUST_FCR_GDA_MODE_ENABLE  0x20
-// only good data put into RxFIFO
+/* only good data put into RxFIFO */
 #define MOXA_MUST_FCR_GDA_ONLY_ENABLE  0x10
 
-// enable CTS interrupt
+/* enable CTS interrupt */
 #define MOXA_MUST_IER_ECTSI            0x80
-// enable RTS interrupt
+/* enable RTS interrupt */
 #define MOXA_MUST_IER_ERTSI            0x40
-// enable Xon/Xoff interrupt
+/* enable Xon/Xoff interrupt */
 #define MOXA_MUST_IER_XINT             0x20
-// enable GDA interrupt
+/* enable GDA interrupt */
 #define MOXA_MUST_IER_EGDAI            0x10
 
 #define MOXA_MUST_RECV_ISR             (UART_IER_RDI | MOXA_MUST_IER_EGDAI)
 
-// GDA interrupt pending
+/* GDA interrupt pending */
 #define MOXA_MUST_IIR_GDA              0x1C
 #define MOXA_MUST_IIR_RDA              0x04
 #define MOXA_MUST_IIR_RTO              0x0C
 #define MOXA_MUST_IIR_LSR              0x06
 
-// recieved Xon/Xoff or specical interrupt pending
+/* recieved Xon/Xoff or specical interrupt pending */
 #define MOXA_MUST_IIR_XSC              0x10
 
-// RTS/CTS change state interrupt pending
+/* RTS/CTS change state interrupt pending */
 #define MOXA_MUST_IIR_RTSCTS           0x20
 #define MOXA_MUST_IIR_MASK             0x3E
 
 #define MOXA_MUST_MCR_XON_ANY          0x80
 #define MOXA_MUST_MCR_TX_XON           0x08
 
-
-// software flow control on chip mask value
+/* software flow control on chip mask value */
 #define MOXA_MUST_EFR_SF_MASK          0x0F
-// send Xon1/Xoff1
+/* send Xon1/Xoff1 */
 #define MOXA_MUST_EFR_SF_TX1           0x08
-// send Xon2/Xoff2
+/* send Xon2/Xoff2 */
 #define MOXA_MUST_EFR_SF_TX2           0x04
-// send Xon1,Xon2/Xoff1,Xoff2
+/* send Xon1,Xon2/Xoff1,Xoff2 */
 #define MOXA_MUST_EFR_SF_TX12          0x0C
-// don't send Xon/Xoff
+/* don't send Xon/Xoff */
 #define MOXA_MUST_EFR_SF_TX_NO         0x00
-// Tx software flow control mask
+/* Tx software flow control mask */
 #define MOXA_MUST_EFR_SF_TX_MASK       0x0C
-// don't receive Xon/Xoff
+/* don't receive Xon/Xoff */
 #define MOXA_MUST_EFR_SF_RX_NO         0x00
-// receive Xon1/Xoff1
+/* receive Xon1/Xoff1 */
 #define MOXA_MUST_EFR_SF_RX1           0x02
-// receive Xon2/Xoff2
+/* receive Xon2/Xoff2 */
 #define MOXA_MUST_EFR_SF_RX2           0x01
-// receive Xon1,Xon2/Xoff1,Xoff2
+/* receive Xon1,Xon2/Xoff1,Xoff2 */
 #define MOXA_MUST_EFR_SF_RX12          0x03
-// Rx software flow control mask
+/* Rx software flow control mask */
 #define MOXA_MUST_EFR_SF_RX_MASK       0x03
 
-//#define MOXA_MUST_MIN_XOFFLIMIT               66
-//#define MOXA_MUST_MIN_XONLIMIT                20
-//#define ID1_RX_TRIG                   120
-
-
-#define CHECK_MOXA_MUST_XOFFLIMIT(info) {      \
-       if ( (info)->IsMoxaMustChipFlag &&      \
-        (info)->HandFlow.XoffLimit < MOXA_MUST_MIN_XOFFLIMIT ) {       \
-               (info)->HandFlow.XoffLimit = MOXA_MUST_MIN_XOFFLIMIT;   \
-               (info)->HandFlow.XonLimit = MOXA_MUST_MIN_XONLIMIT;     \
-       }       \
-}
-
-#define ENABLE_MOXA_MUST_ENCHANCE_MODE(baseio) { \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+#define ENABLE_MOXA_MUST_ENCHANCE_MODE(baseio) do {            \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr |= MOXA_MUST_EFR_EFRB_ENABLE;     \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define DISABLE_MOXA_MUST_ENCHANCE_MODE(baseio) {      \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr |= MOXA_MUST_EFR_EFRB_ENABLE;                     \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
+
+#define DISABLE_MOXA_MUST_ENCHANCE_MODE(baseio) do {           \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_EFRB_ENABLE;    \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_XON1_VALUE(baseio, Value) {      \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_EFRB_ENABLE;                    \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
+
+#define SET_MOXA_MUST_XON1_VALUE(baseio, Value) do {           \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK0;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_BANK_MASK;                      \
+       __efr |= MOXA_MUST_EFR_BANK0;                           \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
        outb((u8)(Value), (baseio)+MOXA_MUST_XON1_REGISTER);    \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
 
-#define SET_MOXA_MUST_XON2_VALUE(baseio, Value) {      \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+#define SET_MOXA_MUST_XOFF1_VALUE(baseio, Value) do {          \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK0;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb((u8)(Value), (baseio)+MOXA_MUST_XON2_REGISTER);    \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_XOFF1_VALUE(baseio, Value) {     \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK0;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_BANK_MASK;                      \
+       __efr |= MOXA_MUST_EFR_BANK0;                           \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
        outb((u8)(Value), (baseio)+MOXA_MUST_XOFF1_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
 
-#define SET_MOXA_MUST_XOFF2_VALUE(baseio, Value) {     \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK0;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb((u8)(Value), (baseio)+MOXA_MUST_XOFF2_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_RBRTL_VALUE(baseio, Value) {     \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK1;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb((u8)(Value), (baseio)+MOXA_MUST_RBRTL_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_RBRTH_VALUE(baseio, Value) {     \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK1;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb((u8)(Value), (baseio)+MOXA_MUST_RBRTH_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_RBRTI_VALUE(baseio, Value) {     \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK1;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb((u8)(Value), (baseio)+MOXA_MUST_RBRTI_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_THRTL_VALUE(baseio, Value) {     \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK1;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb((u8)(Value), (baseio)+MOXA_MUST_THRTL_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-//#define MOXA_MUST_RBRL_VALUE  4
-#define SET_MOXA_MUST_FIFO_VALUE(info) {       \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((info)->ioaddr+UART_LCR);        \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (info)->ioaddr+UART_LCR);        \
+#define SET_MOXA_MUST_FIFO_VALUE(info) do {                    \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((info)->ioaddr+UART_LCR);                \
+       outb(MOXA_MUST_ENTER_ENCHANCE, (info)->ioaddr+UART_LCR);\
        __efr = inb((info)->ioaddr+MOXA_MUST_EFR_REGISTER);     \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK1;   \
+       __efr &= ~MOXA_MUST_EFR_BANK_MASK;                      \
+       __efr |= MOXA_MUST_EFR_BANK1;                           \
        outb(__efr, (info)->ioaddr+MOXA_MUST_EFR_REGISTER);     \
-       outb((u8)((info)->rx_high_water), (info)->ioaddr+MOXA_MUST_RBRTH_REGISTER);     \
-       outb((u8)((info)->rx_trigger), (info)->ioaddr+MOXA_MUST_RBRTI_REGISTER);        \
-       outb((u8)((info)->rx_low_water), (info)->ioaddr+MOXA_MUST_RBRTL_REGISTER);      \
-       outb(__oldlcr, (info)->ioaddr+UART_LCR);        \
-}
-
-
-
-#define SET_MOXA_MUST_ENUM_VALUE(baseio, Value) {      \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       outb((u8)((info)->rx_high_water), (info)->ioaddr+       \
+                       MOXA_MUST_RBRTH_REGISTER);              \
+       outb((u8)((info)->rx_trigger), (info)->ioaddr+          \
+                       MOXA_MUST_RBRTI_REGISTER);              \
+       outb((u8)((info)->rx_low_water), (info)->ioaddr+        \
+                       MOXA_MUST_RBRTL_REGISTER);              \
+       outb(__oldlcr, (info)->ioaddr+UART_LCR);                \
+} while (0)
+
+#define SET_MOXA_MUST_ENUM_VALUE(baseio, Value) do {           \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK2;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_BANK_MASK;                      \
+       __efr |= MOXA_MUST_EFR_BANK2;                           \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
        outb((u8)(Value), (baseio)+MOXA_MUST_ENUM_REGISTER);    \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
 
-#define GET_MOXA_MUST_HARDWARE_ID(baseio, pId) {       \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_BANK_MASK;      \
-       __efr |= MOXA_MUST_EFR_BANK2;   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       *pId = inb((baseio)+MOXA_MUST_HWID_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_NO_SOFTWARE_FLOW_CONTROL(baseio) {       \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_MASK;        \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_JUST_TX_SOFTWARE_FLOW_CONTROL(baseio) {  \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+#define GET_MOXA_MUST_HARDWARE_ID(baseio, pId) do {            \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_MASK;        \
-       __efr |= MOXA_MUST_EFR_SF_TX1;  \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define ENABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) {    \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_BANK_MASK;                      \
+       __efr |= MOXA_MUST_EFR_BANK2;                           \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       *pId = inb((baseio)+MOXA_MUST_HWID_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
+
+#define SET_MOXA_MUST_NO_SOFTWARE_FLOW_CONTROL(baseio) do {    \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_TX_MASK;     \
-       __efr |= MOXA_MUST_EFR_SF_TX1;  \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define DISABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) {   \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_SF_MASK;                        \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
+
+#define ENABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) do { \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_TX_MASK;     \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define SET_MOXA_MUST_JUST_RX_SOFTWARE_FLOW_CONTROL(baseio) {  \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_SF_TX_MASK;                     \
+       __efr |= MOXA_MUST_EFR_SF_TX1;                          \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
+
+#define DISABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) do {        \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_MASK;        \
-       __efr |= MOXA_MUST_EFR_SF_RX1;  \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define ENABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) {    \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_SF_TX_MASK;                     \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
+
+#define ENABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) do { \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_RX_MASK;     \
-       __efr |= MOXA_MUST_EFR_SF_RX1;  \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define DISABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) {   \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_SF_RX_MASK;                     \
+       __efr |= MOXA_MUST_EFR_SF_RX1;                          \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
+
+#define DISABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) do {        \
+       u8      __oldlcr, __efr;                                \
+       __oldlcr = inb((baseio)+UART_LCR);                      \
        outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_RX_MASK;     \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define ENABLE_MOXA_MUST_TX_RX_SOFTWARE_FLOW_CONTROL(baseio) { \
-       u8      __oldlcr, __efr;        \
-       __oldlcr = inb((baseio)+UART_LCR);      \
-       outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR);      \
-       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);   \
-       __efr &= ~MOXA_MUST_EFR_SF_MASK;        \
-       __efr |= (MOXA_MUST_EFR_SF_RX1|MOXA_MUST_EFR_SF_TX1);   \
-       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);   \
-       outb(__oldlcr, (baseio)+UART_LCR);      \
-}
-
-#define ENABLE_MOXA_MUST_XON_ANY_FLOW_CONTROL(baseio) {        \
-       u8      __oldmcr;       \
-       __oldmcr = inb((baseio)+UART_MCR);      \
-       __oldmcr |= MOXA_MUST_MCR_XON_ANY;      \
-       outb(__oldmcr, (baseio)+UART_MCR);      \
-}
-
-#define DISABLE_MOXA_MUST_XON_ANY_FLOW_CONTROL(baseio) {       \
-       u8      __oldmcr;       \
-       __oldmcr = inb((baseio)+UART_MCR);      \
-       __oldmcr &= ~MOXA_MUST_MCR_XON_ANY;     \
-       outb(__oldmcr, (baseio)+UART_MCR);      \
-}
-
-#define READ_MOXA_MUST_GDL(baseio)     inb((baseio)+MOXA_MUST_GDL_REGISTER)
-
-
-#ifndef INIT_WORK
-#define INIT_WORK(_work, _func, _data){        \
-       _data->tqueue.routine = _func;\
-       _data->tqueue.data = _data;\
-       }
-#endif
+       __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER);           \
+       __efr &= ~MOXA_MUST_EFR_SF_RX_MASK;                     \
+       outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER);           \
+       outb(__oldlcr, (baseio)+UART_LCR);                      \
+} while (0)
 
 #endif
index dc6d4184145769b403122715154aa7470886ea00..fab1b7d42858ad5a258863a84b43cf12e150f500 100644 (file)
 #include <linux/slab.h>
 #include <linux/tty.h>
 #include <linux/errno.h>
-#include <linux/string.h>   /* used in new tty drivers */
-#include <linux/signal.h>   /* used in new tty drivers */
+#include <linux/string.h>      /* used in new tty drivers */
+#include <linux/signal.h>      /* used in new tty drivers */
 #include <linux/ioctl.h>
 #include <linux/n_r3964.h>
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <asm/uaccess.h>
 
-
-//#define DEBUG_QUEUE
+/*#define DEBUG_QUEUE*/
 
 /* Log successful handshake and protocol operations  */
-//#define DEBUG_PROTO_S
+/*#define DEBUG_PROTO_S*/
 
 /* Log handshake and protocol errors: */
-//#define DEBUG_PROTO_E
+/*#define DEBUG_PROTO_E*/
 
 /* Log Linediscipline operations (open, close, read, write...): */
-//#define DEBUG_LDISC
+/*#define DEBUG_LDISC*/
 
 /* Log module and memory operations (init, cleanup; kmalloc, kfree): */
-//#define DEBUG_MODUL
+/*#define DEBUG_MODUL*/
 
 /* Macro helpers for debug output: */
-#define TRACE(format, args...) printk("r3964: " format "\n" , ## args);
+#define TRACE(format, args...) printk("r3964: " format "\n" , ## args)
 
 #ifdef DEBUG_MODUL
-#define TRACE_M(format, args...) printk("r3964: " format "\n" , ## args);
+#define TRACE_M(format, args...) printk("r3964: " format "\n" , ## args)
 #else
-#define TRACE_M(fmt, arg...) /**/
+#define TRACE_M(fmt, arg...) do {} while (0)
 #endif
-
 #ifdef DEBUG_PROTO_S
-#define TRACE_PS(format, args...) printk("r3964: " format "\n" , ## args);
+#define TRACE_PS(format, args...) printk("r3964: " format "\n" , ## args)
 #else
-#define TRACE_PS(fmt, arg...) /**/
+#define TRACE_PS(fmt, arg...) do {} while (0)
 #endif
-
 #ifdef DEBUG_PROTO_E
-#define TRACE_PE(format, args...) printk("r3964: " format "\n" , ## args);
+#define TRACE_PE(format, args...) printk("r3964: " format "\n" , ## args)
 #else
-#define TRACE_PE(fmt, arg...) /**/
+#define TRACE_PE(fmt, arg...) do {} while (0)
 #endif
-
 #ifdef DEBUG_LDISC
-#define TRACE_L(format, args...) printk("r3964: " format "\n" , ## args);
+#define TRACE_L(format, args...) printk("r3964: " format "\n" , ## args)
 #else
-#define TRACE_L(fmt, arg...) /**/
+#define TRACE_L(fmt, arg...) do {} while (0)
 #endif
-
 #ifdef DEBUG_QUEUE
-#define TRACE_Q(format, args...) printk("r3964: " format "\n" , ## args);
+#define TRACE_Q(format, args...) printk("r3964: " format "\n" , ## args)
 #else
-#define TRACE_Q(fmt, arg...) /**/
+#define TRACE_Q(fmt, arg...) do {} while (0)
 #endif
-
 static void add_tx_queue(struct r3964_info *, struct r3964_block_header *);
 static void remove_from_tx_queue(struct r3964_info *pInfo, int error_code);
 static void put_char(struct r3964_info *pInfo, unsigned char ch);
@@ -126,937 +120,830 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c);
 static void receive_error(struct r3964_info *pInfo, const char flag);
 static void on_timeout(unsigned long priv);
 static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg);
-static int read_telegram(struct r3964_info *pInfo, struct pid *pid, unsigned char __user *buf);
+static int read_telegram(struct r3964_info *pInfo, struct pid *pid,
+               unsigned char __user * buf);
 static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg,
-             int error_code, struct r3964_block_header *pBlock);
-static struct r3964_message* remove_msg(struct r3964_info *pInfo, 
-             struct r3964_client_info *pClient);
-static void remove_client_block(struct r3964_info *pInfo, 
-                struct r3964_client_info *pClient);
+               int error_code, struct r3964_block_header *pBlock);
+static struct r3964_message *remove_msg(struct r3964_info *pInfo,
+               struct r3964_client_info *pClient);
+static void remove_client_block(struct r3964_info *pInfo,
+               struct r3964_client_info *pClient);
 
-static int  r3964_open(struct tty_struct *tty);
+static int r3964_open(struct tty_struct *tty);
 static void r3964_close(struct tty_struct *tty);
 static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
-                     unsigned char __user *buf, size_t nr);
-static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
-                      const unsigned char * buf, size_t nr);
-static int r3964_ioctl(struct tty_struct * tty, struct file * file,
-                       unsigned int cmd, unsigned long arg);
-static void r3964_set_termios(struct tty_struct *tty, struct ktermios * old);
-static unsigned int r3964_poll(struct tty_struct * tty, struct file * file,
-                     struct poll_table_struct  *wait);
+               unsigned char __user * buf, size_t nr);
+static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
+               const unsigned char *buf, size_t nr);
+static int r3964_ioctl(struct tty_struct *tty, struct file *file,
+               unsigned int cmd, unsigned long arg);
+static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old);
+static unsigned int r3964_poll(struct tty_struct *tty, struct file *file,
+               struct poll_table_struct *wait);
 static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp,
-                              char *fp, int count);
+               char *fp, int count);
 
 static struct tty_ldisc tty_ldisc_N_R3964 = {
-       .owner   = THIS_MODULE,
-       .magic  = TTY_LDISC_MAGIC, 
-       .name   = "R3964",
-       .open   = r3964_open,
-       .close  = r3964_close,
-       .read   = r3964_read,
-       .write  = r3964_write,
-       .ioctl  = r3964_ioctl,
+       .owner = THIS_MODULE,
+       .magic = TTY_LDISC_MAGIC,
+       .name = "R3964",
+       .open = r3964_open,
+       .close = r3964_close,
+       .read = r3964_read,
+       .write = r3964_write,
+       .ioctl = r3964_ioctl,
        .set_termios = r3964_set_termios,
-       .poll   = r3964_poll,            
+       .poll = r3964_poll,
        .receive_buf = r3964_receive_buf,
 };
 
-
-
 static void dump_block(const unsigned char *block, unsigned int length)
 {
-   unsigned int i,j;
-   char linebuf[16*3+1];
-   
-   for(i=0;i<length;i+=16)
-   {
-      for(j=0;(j<16) && (j+i<length);j++)
-      {
-         sprintf(linebuf+3*j,"%02x ",block[i+j]);
-      }
-      linebuf[3*j]='\0';
-      TRACE_PS("%s",linebuf);
-   }
+       unsigned int i, j;
+       char linebuf[16 * 3 + 1];
+
+       for (i = 0; i < length; i += 16) {
+               for (j = 0; (j < 16) && (j + i < length); j++) {
+                       sprintf(linebuf + 3 * j, "%02x ", block[i + j]);
+               }
+               linebuf[3 * j] = '\0';
+               TRACE_PS("%s", linebuf);
+       }
 }
 
-         
-
-
 /*************************************************************
  * Driver initialisation
  *************************************************************/
 
-
 /*************************************************************
  * Module support routines
  *************************************************************/
 
 static void __exit r3964_exit(void)
 {
-   int status;
-   
-   TRACE_M ("cleanup_module()");
-
-   status=tty_unregister_ldisc(N_R3964);
-   
-   if(status!=0)
-   {
-      printk(KERN_ERR "r3964: error unregistering linediscipline: %d\n", status);
-   }
-   else
-   {
-      TRACE_L("linediscipline successfully unregistered");
-   }
-   
+       int status;
+
+       TRACE_M("cleanup_module()");
+
+       status = tty_unregister_ldisc(N_R3964);
+
+       if (status != 0) {
+               printk(KERN_ERR "r3964: error unregistering linediscipline: "
+                               "%d\n", status);
+       } else {
+               TRACE_L("linediscipline successfully unregistered");
+       }
 }
 
 static int __init r3964_init(void)
 {
-   int status;
-   
-   printk ("r3964: Philips r3964 Driver $Revision: 1.10 $\n");
-
-   /*
-    * Register the tty line discipline
-    */
-   
-   status = tty_register_ldisc (N_R3964, &tty_ldisc_N_R3964);
-   if (status == 0)
-     {
-       TRACE_L("line discipline %d registered", N_R3964);
-       TRACE_L("flags=%x num=%x", tty_ldisc_N_R3964.flags, 
-               tty_ldisc_N_R3964.num);
-       TRACE_L("open=%p", tty_ldisc_N_R3964.open);
-       TRACE_L("tty_ldisc_N_R3964 = %p", &tty_ldisc_N_R3964);
-     }
-   else
-     {
-       printk (KERN_ERR "r3964: error registering line discipline: %d\n", status);
-     }
-   return status;
+       int status;
+
+       printk("r3964: Philips r3964 Driver $Revision: 1.10 $\n");
+
+       /*
+        * Register the tty line discipline
+        */
+
+       status = tty_register_ldisc(N_R3964, &tty_ldisc_N_R3964);
+       if (status == 0) {
+               TRACE_L("line discipline %d registered", N_R3964);
+               TRACE_L("flags=%x num=%x", tty_ldisc_N_R3964.flags,
+                       tty_ldisc_N_R3964.num);
+               TRACE_L("open=%p", tty_ldisc_N_R3964.open);
+               TRACE_L("tty_ldisc_N_R3964 = %p", &tty_ldisc_N_R3964);
+       } else {
+               printk(KERN_ERR "r3964: error registering line discipline: "
+                               "%d\n", status);
+       }
+       return status;
 }
 
 module_init(r3964_init);
 module_exit(r3964_exit);
 
-
 /*************************************************************
  * Protocol implementation routines
  *************************************************************/
 
-static void add_tx_queue(struct r3964_info *pInfo, struct r3964_block_header *pHeader)
+static void add_tx_queue(struct r3964_info *pInfo,
+                        struct r3964_block_header *pHeader)
 {
-   unsigned long flags;
-   
-   spin_lock_irqsave(&pInfo->lock, flags);
-
-   pHeader->next = NULL;
-
-   if(pInfo->tx_last == NULL)
-   {
-      pInfo->tx_first = pInfo->tx_last = pHeader;
-   }
-   else
-   {
-      pInfo->tx_last->next = pHeader;
-      pInfo->tx_last = pHeader;
-   }
-   
-   spin_unlock_irqrestore(&pInfo->lock, flags);
-
-   TRACE_Q("add_tx_queue %p, length %d, tx_first = %p", 
-          pHeader, pHeader->length, pInfo->tx_first );
+       unsigned long flags;
+
+       spin_lock_irqsave(&pInfo->lock, flags);
+
+       pHeader->next = NULL;
+
+       if (pInfo->tx_last == NULL) {
+               pInfo->tx_first = pInfo->tx_last = pHeader;
+       } else {
+               pInfo->tx_last->next = pHeader;
+               pInfo->tx_last = pHeader;
+       }
+
+       spin_unlock_irqrestore(&pInfo->lock, flags);
+
+       TRACE_Q("add_tx_queue %p, length %d, tx_first = %p",
+               pHeader, pHeader->length, pInfo->tx_first);
 }
 
 static void remove_from_tx_queue(struct r3964_info *pInfo, int error_code)
 {
-   struct r3964_block_header *pHeader;
-   unsigned long flags;
+       struct r3964_block_header *pHeader;
+       unsigned long flags;
 #ifdef DEBUG_QUEUE
-   struct r3964_block_header *pDump;
+       struct r3964_block_header *pDump;
 #endif
-   
-   pHeader = pInfo->tx_first;
 
-   if(pHeader==NULL)
-      return;
+       pHeader = pInfo->tx_first;
+
+       if (pHeader == NULL)
+               return;
 
 #ifdef DEBUG_QUEUE
-   printk("r3964: remove_from_tx_queue: %p, length %u - ",
-          pHeader, pHeader->length );
-   for(pDump=pHeader;pDump;pDump=pDump->next)
-        printk("%p ", pDump);
-   printk("\n");
+       printk("r3964: remove_from_tx_queue: %p, length %u - ",
+               pHeader, pHeader->length);
+       for (pDump = pHeader; pDump; pDump = pDump->next)
+               printk("%p ", pDump);
+       printk("\n");
 #endif
 
+       if (pHeader->owner) {
+               if (error_code) {
+                       add_msg(pHeader->owner, R3964_MSG_ACK, 0,
+                               error_code, NULL);
+               } else {
+                       add_msg(pHeader->owner, R3964_MSG_ACK, pHeader->length,
+                               error_code, NULL);
+               }
+               wake_up_interruptible(&pInfo->read_wait);
+       }
+
+       spin_lock_irqsave(&pInfo->lock, flags);
+
+       pInfo->tx_first = pHeader->next;
+       if (pInfo->tx_first == NULL) {
+               pInfo->tx_last = NULL;
+       }
+
+       spin_unlock_irqrestore(&pInfo->lock, flags);
+
+       kfree(pHeader);
+       TRACE_M("remove_from_tx_queue - kfree %p", pHeader);
 
-   if(pHeader->owner)
-   {
-      if(error_code)
-      {
-          add_msg(pHeader->owner, R3964_MSG_ACK, 0, 
-                  error_code, NULL);
-      }
-      else
-      {
-          add_msg(pHeader->owner, R3964_MSG_ACK, pHeader->length, 
-                  error_code, NULL);
-      }
-      wake_up_interruptible (&pInfo->read_wait);
-   }
-
-   spin_lock_irqsave(&pInfo->lock, flags);
-
-   pInfo->tx_first = pHeader->next;
-   if(pInfo->tx_first==NULL)
-   {
-      pInfo->tx_last = NULL;
-   }
-
-   spin_unlock_irqrestore(&pInfo->lock, flags);
-
-   kfree(pHeader);
-   TRACE_M("remove_from_tx_queue - kfree %p",pHeader);
-
-   TRACE_Q("remove_from_tx_queue: tx_first = %p, tx_last = %p",
-          pInfo->tx_first, pInfo->tx_last );
+       TRACE_Q("remove_from_tx_queue: tx_first = %p, tx_last = %p",
+               pInfo->tx_first, pInfo->tx_last);
 }
 
-static void add_rx_queue(struct r3964_info *pInfo, struct r3964_block_header *pHeader)
+static void add_rx_queue(struct r3964_info *pInfo,
+                        struct r3964_block_header *pHeader)
 {
-   unsigned long flags;
-   
-   spin_lock_irqsave(&pInfo->lock, flags);
-
-   pHeader->next = NULL;
-
-   if(pInfo->rx_last == NULL)
-   {
-      pInfo->rx_first = pInfo->rx_last = pHeader;
-   }
-   else
-   {
-      pInfo->rx_last->next = pHeader;
-      pInfo->rx_last = pHeader;
-   }
-   pInfo->blocks_in_rx_queue++;
-   
-   spin_unlock_irqrestore(&pInfo->lock, flags);
-
-   TRACE_Q("add_rx_queue: %p, length = %d, rx_first = %p, count = %d",
-          pHeader, pHeader->length,
-          pInfo->rx_first, pInfo->blocks_in_rx_queue);
+       unsigned long flags;
+
+       spin_lock_irqsave(&pInfo->lock, flags);
+
+       pHeader->next = NULL;
+
+       if (pInfo->rx_last == NULL) {
+               pInfo->rx_first = pInfo->rx_last = pHeader;
+       } else {
+               pInfo->rx_last->next = pHeader;
+               pInfo->rx_last = pHeader;
+       }
+       pInfo->blocks_in_rx_queue++;
+
+       spin_unlock_irqrestore(&pInfo->lock, flags);
+
+       TRACE_Q("add_rx_queue: %p, length = %d, rx_first = %p, count = %d",
+               pHeader, pHeader->length,
+               pInfo->rx_first, pInfo->blocks_in_rx_queue);
 }
 
 static void remove_from_rx_queue(struct r3964_info *pInfo,
-                 struct r3964_block_header *pHeader)
+                                struct r3964_block_header *pHeader)
 {
-   unsigned long flags;
-   struct r3964_block_header *pFind;
-   
-   if(pHeader==NULL)
-      return;
-
-   TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d",
-          pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue );
-   TRACE_Q("remove_from_rx_queue: %p, length %u",
-          pHeader, pHeader->length );
-
-   spin_lock_irqsave(&pInfo->lock, flags);
-
-   if(pInfo->rx_first == pHeader)
-   {
-      /* Remove the first block in the linked list: */
-      pInfo->rx_first = pHeader->next;
-      
-      if(pInfo->rx_first==NULL)
-      {
-         pInfo->rx_last = NULL;
-      }
-      pInfo->blocks_in_rx_queue--;
-   }
-   else 
-   {
-      /* Find block to remove: */
-      for(pFind=pInfo->rx_first; pFind; pFind=pFind->next)
-      {
-         if(pFind->next == pHeader) 
-         {
-            /* Got it. */
-            pFind->next = pHeader->next;
-            pInfo->blocks_in_rx_queue--;
-            if(pFind->next==NULL)
-            {
-               /* Oh, removed the last one! */
-               pInfo->rx_last = pFind;
-            }
-            break;
-         }
-      }
-   }
-
-   spin_unlock_irqrestore(&pInfo->lock, flags);
-
-   kfree(pHeader);
-   TRACE_M("remove_from_rx_queue - kfree %p",pHeader);
-
-   TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d",
-          pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue );
+       unsigned long flags;
+       struct r3964_block_header *pFind;
+
+       if (pHeader == NULL)
+               return;
+
+       TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d",
+               pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue);
+       TRACE_Q("remove_from_rx_queue: %p, length %u",
+               pHeader, pHeader->length);
+
+       spin_lock_irqsave(&pInfo->lock, flags);
+
+       if (pInfo->rx_first == pHeader) {
+               /* Remove the first block in the linked list: */
+               pInfo->rx_first = pHeader->next;
+
+               if (pInfo->rx_first == NULL) {
+                       pInfo->rx_last = NULL;
+               }
+               pInfo->blocks_in_rx_queue--;
+       } else {
+               /* Find block to remove: */
+               for (pFind = pInfo->rx_first; pFind; pFind = pFind->next) {
+                       if (pFind->next == pHeader) {
+                               /* Got it. */
+                               pFind->next = pHeader->next;
+                               pInfo->blocks_in_rx_queue--;
+                               if (pFind->next == NULL) {
+                                       /* Oh, removed the last one! */
+                                       pInfo->rx_last = pFind;
+                               }
+                               break;
+                       }
+               }
+       }
+
+       spin_unlock_irqrestore(&pInfo->lock, flags);
+
+       kfree(pHeader);
+       TRACE_M("remove_from_rx_queue - kfree %p", pHeader);
+
+       TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d",
+               pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue);
 }
 
 static void put_char(struct r3964_info *pInfo, unsigned char ch)
 {
-   struct tty_struct *tty = pInfo->tty;
+       struct tty_struct *tty = pInfo->tty;
 
-   if(tty==NULL)
-      return;
+       if (tty == NULL)
+               return;
 
-   if(tty->driver->put_char)
-   {
-      tty->driver->put_char(tty, ch);
-   }
-   pInfo->bcc ^= ch;
+       if (tty->driver->put_char) {
+               tty->driver->put_char(tty, ch);
+       }
+       pInfo->bcc ^= ch;
 }
 
 static void flush(struct r3964_info *pInfo)
 {
-   struct tty_struct *tty = pInfo->tty;
+       struct tty_struct *tty = pInfo->tty;
 
-   if(tty==NULL)
-      return;
+       if (tty == NULL)
+               return;
 
-   if(tty->driver->flush_chars)
-   {
-      tty->driver->flush_chars(tty);
-   }
+       if (tty->driver->flush_chars) {
+               tty->driver->flush_chars(tty);
+       }
 }
 
 static void trigger_transmit(struct r3964_info *pInfo)
 {
-   unsigned long flags;
-   
+       unsigned long flags;
 
-   spin_lock_irqsave(&pInfo->lock, flags);
+       spin_lock_irqsave(&pInfo->lock, flags);
 
-   if((pInfo->state == R3964_IDLE) && (pInfo->tx_first!=NULL))
-   {
-      pInfo->state = R3964_TX_REQUEST;
-      pInfo->nRetry=0;
-      pInfo->flags &= ~R3964_ERROR;
-      mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ);
+       if ((pInfo->state == R3964_IDLE) && (pInfo->tx_first != NULL)) {
+               pInfo->state = R3964_TX_REQUEST;
+               pInfo->nRetry = 0;
+               pInfo->flags &= ~R3964_ERROR;
+               mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ);
 
-      spin_unlock_irqrestore(&pInfo->lock, flags);
+               spin_unlock_irqrestore(&pInfo->lock, flags);
 
-      TRACE_PS("trigger_transmit - sent STX");
+               TRACE_PS("trigger_transmit - sent STX");
 
-      put_char(pInfo, STX);
-      flush(pInfo);
+               put_char(pInfo, STX);
+               flush(pInfo);
 
-      pInfo->bcc = 0;
-   }
-   else
-   {
-      spin_unlock_irqrestore(&pInfo->lock, flags);
-   }
+               pInfo->bcc = 0;
+       } else {
+               spin_unlock_irqrestore(&pInfo->lock, flags);
+       }
 }
 
 static void retry_transmit(struct r3964_info *pInfo)
 {
-   if(pInfo->nRetry<R3964_MAX_RETRIES)
-   {
-      TRACE_PE("transmission failed. Retry #%d", 
-             pInfo->nRetry);
-      pInfo->bcc = 0;
-      put_char(pInfo, STX);
-      flush(pInfo);
-      pInfo->state = R3964_TX_REQUEST;
-      pInfo->nRetry++;
-      mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ);
-   }
-   else
-   {
-      TRACE_PE("transmission failed after %d retries", 
-             R3964_MAX_RETRIES);
-
-      remove_from_tx_queue(pInfo, R3964_TX_FAIL);
-      
-      put_char(pInfo, NAK);
-      flush(pInfo);
-      pInfo->state = R3964_IDLE;
-
-      trigger_transmit(pInfo);
-   }
+       if (pInfo->nRetry < R3964_MAX_RETRIES) {
+               TRACE_PE("transmission failed. Retry #%d", pInfo->nRetry);
+               pInfo->bcc = 0;
+               put_char(pInfo, STX);
+               flush(pInfo);
+               pInfo->state = R3964_TX_REQUEST;
+               pInfo->nRetry++;
+               mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ);
+       } else {
+               TRACE_PE("transmission failed after %d retries",
+                        R3964_MAX_RETRIES);
+
+               remove_from_tx_queue(pInfo, R3964_TX_FAIL);
+
+               put_char(pInfo, NAK);
+               flush(pInfo);
+               pInfo->state = R3964_IDLE;
+
+               trigger_transmit(pInfo);
+       }
 }
 
-
 static void transmit_block(struct r3964_info *pInfo)
 {
-   struct tty_struct *tty = pInfo->tty;
-   struct r3964_block_header *pBlock = pInfo->tx_first;
-   int room=0;
-
-   if((tty==NULL) || (pBlock==NULL))
-   {
-      return;
-   }
-
-   if(tty->driver->write_room)
-      room=tty->driver->write_room(tty);
-
-   TRACE_PS("transmit_block %p, room %d, length %d", 
-          pBlock, room, pBlock->length);
-   
-   while(pInfo->tx_position < pBlock->length)
-   {
-      if(room<2)
-         break;
-      if(pBlock->data[pInfo->tx_position]==DLE)
-      {
-         /* send additional DLE char: */
-         put_char(pInfo, DLE);
-      }
-      put_char(pInfo, pBlock->data[pInfo->tx_position++]);
-      
-      room--;
-   }
-
-   if((pInfo->tx_position == pBlock->length) && (room>=3))
-   {
-      put_char(pInfo, DLE);
-      put_char(pInfo, ETX);
-      if(pInfo->flags & R3964_BCC)
-      {
-         put_char(pInfo, pInfo->bcc);
-      }
-      pInfo->state = R3964_WAIT_FOR_TX_ACK;
-      mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ);
-   }
-   flush(pInfo);
+       struct tty_struct *tty = pInfo->tty;
+       struct r3964_block_header *pBlock = pInfo->tx_first;
+       int room = 0;
+
+       if ((tty == NULL) || (pBlock == NULL)) {
+               return;
+       }
+
+       if (tty->driver->write_room)
+               room = tty->driver->write_room(tty);
+
+       TRACE_PS("transmit_block %p, room %d, length %d",
+                pBlock, room, pBlock->length);
+
+       while (pInfo->tx_position < pBlock->length) {
+               if (room < 2)
+                       break;
+
+               if (pBlock->data[pInfo->tx_position] == DLE) {
+                       /* send additional DLE char: */
+                       put_char(pInfo, DLE);
+               }
+               put_char(pInfo, pBlock->data[pInfo->tx_position++]);
+
+               room--;
+       }
+
+       if ((pInfo->tx_position == pBlock->length) && (room >= 3)) {
+               put_char(pInfo, DLE);
+               put_char(pInfo, ETX);
+               if (pInfo->flags & R3964_BCC) {
+                       put_char(pInfo, pInfo->bcc);
+               }
+               pInfo->state = R3964_WAIT_FOR_TX_ACK;
+               mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ);
+       }
+       flush(pInfo);
 }
 
 static void on_receive_block(struct r3964_info *pInfo)
 {
-   unsigned int length;
-   struct r3964_client_info *pClient;
-   struct r3964_block_header *pBlock;
-   
-   length=pInfo->rx_position;
-
-   /* compare byte checksum characters: */
-   if(pInfo->flags & R3964_BCC)
-   {
-      if(pInfo->bcc!=pInfo->last_rx)
-      {
-         TRACE_PE("checksum error - got %x but expected %x",
-                pInfo->last_rx, pInfo->bcc);
-         pInfo->flags |= R3964_CHECKSUM;
-      }
-   }
-
-   /* check for errors (parity, overrun,...): */
-   if(pInfo->flags & R3964_ERROR)
-   {
-      TRACE_PE("on_receive_block - transmission failed error %x",
-             pInfo->flags & R3964_ERROR);
-      
-      put_char(pInfo, NAK);
-      flush(pInfo);
-      if(pInfo->nRetry<R3964_MAX_RETRIES)
-      {
-         pInfo->state=R3964_WAIT_FOR_RX_REPEAT;
-         pInfo->nRetry++;
-        mod_timer(&pInfo->tmr, jiffies + R3964_TO_RX_PANIC);
-      }
-      else
-      {
-         TRACE_PE("on_receive_block - failed after max retries");
-         pInfo->state=R3964_IDLE;
-      }
-      return;
-   }
-
-   
-   /* received block; submit DLE: */
-   put_char(pInfo, DLE);
-   flush(pInfo);
-   del_timer_sync(&pInfo->tmr);
-   TRACE_PS(" rx success: got %d chars", length);
-
-   /* prepare struct r3964_block_header: */
-   pBlock = kmalloc(length+sizeof(struct r3964_block_header), GFP_KERNEL);
-   TRACE_M("on_receive_block - kmalloc %p",pBlock);
-
-   if(pBlock==NULL)
-      return;
-
-   pBlock->length = length;
-   pBlock->data   = ((unsigned char*)pBlock)+sizeof(struct r3964_block_header);
-   pBlock->locks  = 0;
-   pBlock->next   = NULL;
-   pBlock->owner  = NULL;
-
-   memcpy(pBlock->data, pInfo->rx_buf, length);
-
-   /* queue block into rx_queue: */
-   add_rx_queue(pInfo, pBlock);
-
-   /* notify attached client processes: */
-   for(pClient=pInfo->firstClient; pClient; pClient=pClient->next)
-   {
-      if(pClient->sig_flags & R3964_SIG_DATA)
-      {
-         add_msg(pClient, R3964_MSG_DATA, length, R3964_OK, pBlock);
-      }
-   }
-   wake_up_interruptible (&pInfo->read_wait);
-   
-   pInfo->state = R3964_IDLE;
-
-   trigger_transmit(pInfo);
-}
+       unsigned int length;
+       struct r3964_client_info *pClient;
+       struct r3964_block_header *pBlock;
+
+       length = pInfo->rx_position;
+
+       /* compare byte checksum characters: */
+       if (pInfo->flags & R3964_BCC) {
+               if (pInfo->bcc != pInfo->last_rx) {
+                       TRACE_PE("checksum error - got %x but expected %x",
+                                pInfo->last_rx, pInfo->bcc);
+                       pInfo->flags |= R3964_CHECKSUM;
+               }
+       }
+
+       /* check for errors (parity, overrun,...): */
+       if (pInfo->flags & R3964_ERROR) {
+               TRACE_PE("on_receive_block - transmission failed error %x",
+                        pInfo->flags & R3964_ERROR);
+
+               put_char(pInfo, NAK);
+               flush(pInfo);
+               if (pInfo->nRetry < R3964_MAX_RETRIES) {
+                       pInfo->state = R3964_WAIT_FOR_RX_REPEAT;
+                       pInfo->nRetry++;
+                       mod_timer(&pInfo->tmr, jiffies + R3964_TO_RX_PANIC);
+               } else {
+                       TRACE_PE("on_receive_block - failed after max retries");
+                       pInfo->state = R3964_IDLE;
+               }
+               return;
+       }
+
+       /* received block; submit DLE: */
+       put_char(pInfo, DLE);
+       flush(pInfo);
+       del_timer_sync(&pInfo->tmr);
+       TRACE_PS(" rx success: got %d chars", length);
+
+       /* prepare struct r3964_block_header: */
+       pBlock = kmalloc(length + sizeof(struct r3964_block_header),
+                       GFP_KERNEL);
+       TRACE_M("on_receive_block - kmalloc %p", pBlock);
+
+       if (pBlock == NULL)
+               return;
+
+       pBlock->length = length;
+       pBlock->data = ((unsigned char *)pBlock) +
+                       sizeof(struct r3964_block_header);
+       pBlock->locks = 0;
+       pBlock->next = NULL;
+       pBlock->owner = NULL;
+
+       memcpy(pBlock->data, pInfo->rx_buf, length);
+
+       /* queue block into rx_queue: */
+       add_rx_queue(pInfo, pBlock);
+
+       /* notify attached client processes: */
+       for (pClient = pInfo->firstClient; pClient; pClient = pClient->next) {
+               if (pClient->sig_flags & R3964_SIG_DATA) {
+                       add_msg(pClient, R3964_MSG_DATA, length, R3964_OK,
+                               pBlock);
+               }
+       }
+       wake_up_interruptible(&pInfo->read_wait);
 
+       pInfo->state = R3964_IDLE;
+
+       trigger_transmit(pInfo);
+}
 
 static void receive_char(struct r3964_info *pInfo, const unsigned char c)
 {
-   switch(pInfo->state)
-   {
-      case R3964_TX_REQUEST:
-         if(c==DLE)
-         {
-            TRACE_PS("TX_REQUEST - got DLE");
-
-            pInfo->state = R3964_TRANSMITTING;
-            pInfo->tx_position = 0;
-            
-            transmit_block(pInfo);
-         }
-         else if(c==STX)
-         {
-            if(pInfo->nRetry==0)
-            {
-               TRACE_PE("TX_REQUEST - init conflict");
-               if(pInfo->priority == R3964_SLAVE)
-               {
-                  goto start_receiving;
-               }
-            } 
-            else 
-            {
-               TRACE_PE("TX_REQUEST - secondary init conflict!?"
-                        " Switching to SLAVE mode for next rx.");
-               goto start_receiving;
-            }
-         }
-         else
-         {
-            TRACE_PE("TX_REQUEST - char != DLE: %x", c);
-            retry_transmit(pInfo);
-         }
-         break;
-      case R3964_TRANSMITTING:
-         if(c==NAK)
-         {
-            TRACE_PE("TRANSMITTING - got NAK");
-            retry_transmit(pInfo);
-         }
-         else
-         {
-            TRACE_PE("TRANSMITTING - got invalid char");
-            pInfo->state = R3964_WAIT_ZVZ_BEFORE_TX_RETRY;
-           mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
-         }
-         break;
-      case R3964_WAIT_FOR_TX_ACK:
-         if(c==DLE)
-         {
-            TRACE_PS("WAIT_FOR_TX_ACK - got DLE");
-            remove_from_tx_queue(pInfo, R3964_OK);
-            
-            pInfo->state = R3964_IDLE;
-            trigger_transmit(pInfo);
-         }
-         else
-         {
-            retry_transmit(pInfo);
-         }
-         break;
-      case R3964_WAIT_FOR_RX_REPEAT:
-         /* FALLTROUGH */
-      case R3964_IDLE:
-         if(c==STX)
-         {
-            /* Prevent rx_queue from overflow: */
-            if(pInfo->blocks_in_rx_queue >= R3964_MAX_BLOCKS_IN_RX_QUEUE)
-            {
-               TRACE_PE("IDLE - got STX but no space in rx_queue!");
-               pInfo->state=R3964_WAIT_FOR_RX_BUF;
-              mod_timer(&pInfo->tmr, jiffies + R3964_TO_NO_BUF);
-               break;
-            }
+       switch (pInfo->state) {
+       case R3964_TX_REQUEST:
+               if (c == DLE) {
+                       TRACE_PS("TX_REQUEST - got DLE");
+
+                       pInfo->state = R3964_TRANSMITTING;
+                       pInfo->tx_position = 0;
+
+                       transmit_block(pInfo);
+               } else if (c == STX) {
+                       if (pInfo->nRetry == 0) {
+                               TRACE_PE("TX_REQUEST - init conflict");
+                               if (pInfo->priority == R3964_SLAVE) {
+                                       goto start_receiving;
+                               }
+                       } else {
+                               TRACE_PE("TX_REQUEST - secondary init "
+                                       "conflict!? Switching to SLAVE mode "
+                                       "for next rx.");
+                               goto start_receiving;
+                       }
+               } else {
+                       TRACE_PE("TX_REQUEST - char != DLE: %x", c);
+                       retry_transmit(pInfo);
+               }
+               break;
+       case R3964_TRANSMITTING:
+               if (c == NAK) {
+                       TRACE_PE("TRANSMITTING - got NAK");
+                       retry_transmit(pInfo);
+               } else {
+                       TRACE_PE("TRANSMITTING - got invalid char");
+
+                       pInfo->state = R3964_WAIT_ZVZ_BEFORE_TX_RETRY;
+                       mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
+               }
+               break;
+       case R3964_WAIT_FOR_TX_ACK:
+               if (c == DLE) {
+                       TRACE_PS("WAIT_FOR_TX_ACK - got DLE");
+                       remove_from_tx_queue(pInfo, R3964_OK);
+
+                       pInfo->state = R3964_IDLE;
+                       trigger_transmit(pInfo);
+               } else {
+                       retry_transmit(pInfo);
+               }
+               break;
+       case R3964_WAIT_FOR_RX_REPEAT:
+               /* FALLTROUGH */
+       case R3964_IDLE:
+               if (c == STX) {
+                       /* Prevent rx_queue from overflow: */
+                       if (pInfo->blocks_in_rx_queue >=
+                           R3964_MAX_BLOCKS_IN_RX_QUEUE) {
+                               TRACE_PE("IDLE - got STX but no space in "
+                                               "rx_queue!");
+                               pInfo->state = R3964_WAIT_FOR_RX_BUF;
+                               mod_timer(&pInfo->tmr,
+                                         jiffies + R3964_TO_NO_BUF);
+                               break;
+                       }
 start_receiving:
-            /* Ok, start receiving: */
-            TRACE_PS("IDLE - got STX");
-            pInfo->rx_position = 0;
-            pInfo->last_rx = 0;
-            pInfo->flags &= ~R3964_ERROR;
-            pInfo->state=R3964_RECEIVING;
-           mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
-           pInfo->nRetry = 0;
-            put_char(pInfo, DLE);
-            flush(pInfo);
-            pInfo->bcc = 0;
-         }
-         break;
-      case R3964_RECEIVING:
-         if(pInfo->rx_position < RX_BUF_SIZE)
-         {
-            pInfo->bcc ^= c;
-            
-            if(c==DLE)
-            {
-               if(pInfo->last_rx==DLE)
-               {
-                  pInfo->last_rx = 0;
-                  goto char_to_buf;
-               }
-               pInfo->last_rx = DLE;
-               break;
-            } 
-            else if((c==ETX) && (pInfo->last_rx==DLE))
-            {
-               if(pInfo->flags & R3964_BCC)
-               {
-                  pInfo->state = R3964_WAIT_FOR_BCC;
-                 mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
-               }
-               else 
-               {
-                  on_receive_block(pInfo);
-               }
-            }
-            else
-            {
-               pInfo->last_rx = c;
+                       /* Ok, start receiving: */
+                       TRACE_PS("IDLE - got STX");
+                       pInfo->rx_position = 0;
+                       pInfo->last_rx = 0;
+                       pInfo->flags &= ~R3964_ERROR;
+                       pInfo->state = R3964_RECEIVING;
+                       mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
+                       pInfo->nRetry = 0;
+                       put_char(pInfo, DLE);
+                       flush(pInfo);
+                       pInfo->bcc = 0;
+               }
+               break;
+       case R3964_RECEIVING:
+               if (pInfo->rx_position < RX_BUF_SIZE) {
+                       pInfo->bcc ^= c;
+
+                       if (c == DLE) {
+                               if (pInfo->last_rx == DLE) {
+                                       pInfo->last_rx = 0;
+                                       goto char_to_buf;
+                               }
+                               pInfo->last_rx = DLE;
+                               break;
+                       } else if ((c == ETX) && (pInfo->last_rx == DLE)) {
+                               if (pInfo->flags & R3964_BCC) {
+                                       pInfo->state = R3964_WAIT_FOR_BCC;
+                                       mod_timer(&pInfo->tmr,
+                                                 jiffies + R3964_TO_ZVZ);
+                               } else {
+                                       on_receive_block(pInfo);
+                               }
+                       } else {
+                               pInfo->last_rx = c;
 char_to_buf:
-               pInfo->rx_buf[pInfo->rx_position++] = c;
-              mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
-            }
-         }
-        /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */ 
-         break;
-      case R3964_WAIT_FOR_BCC:
-         pInfo->last_rx = c;
-         on_receive_block(pInfo);
-         break;
-   }
+                               pInfo->rx_buf[pInfo->rx_position++] = c;
+                               mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
+                       }
+               }
+               /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */
+               break;
+       case R3964_WAIT_FOR_BCC:
+               pInfo->last_rx = c;
+               on_receive_block(pInfo);
+               break;
+       }
 }
 
 static void receive_error(struct r3964_info *pInfo, const char flag)
 {
-    switch (flag) 
-    {
-    case TTY_NORMAL:
-        break;
-    case TTY_BREAK:
-        TRACE_PE("received break")
-        pInfo->flags |= R3964_BREAK;
-        break;
-    case TTY_PARITY:
-        TRACE_PE("parity error")
-        pInfo->flags |= R3964_PARITY;
-        break;
-    case TTY_FRAME:
-        TRACE_PE("frame error")
-        pInfo->flags |= R3964_FRAME;
-        break;
-    case TTY_OVERRUN:
-        TRACE_PE("frame overrun")
-        pInfo->flags |= R3964_OVERRUN;
-        break;
-    default:
-        TRACE_PE("receive_error - unknown flag %d", flag);
-        pInfo->flags |= R3964_UNKNOWN;
-        break;
-    }
+       switch (flag) {
+       case TTY_NORMAL:
+               break;
+       case TTY_BREAK:
+               TRACE_PE("received break");
+               pInfo->flags |= R3964_BREAK;
+               break;
+       case TTY_PARITY:
+               TRACE_PE("parity error");
+               pInfo->flags |= R3964_PARITY;
+               break;
+       case TTY_FRAME:
+               TRACE_PE("frame error");
+               pInfo->flags |= R3964_FRAME;
+               break;
+       case TTY_OVERRUN:
+               TRACE_PE("frame overrun");
+               pInfo->flags |= R3964_OVERRUN;
+               break;
+       default:
+               TRACE_PE("receive_error - unknown flag %d", flag);
+               pInfo->flags |= R3964_UNKNOWN;
+               break;
+       }
 }
 
 static void on_timeout(unsigned long priv)
 {
-   struct r3964_info *pInfo = (void *)priv;
-
-   switch(pInfo->state)
-   {
-      case R3964_TX_REQUEST:
-         TRACE_PE("TX_REQUEST - timeout");
-         retry_transmit(pInfo);
-         break;
-      case R3964_WAIT_ZVZ_BEFORE_TX_RETRY:
-         put_char(pInfo, NAK);
-         flush(pInfo);
-         retry_transmit(pInfo);
-         break;
-      case R3964_WAIT_FOR_TX_ACK:
-         TRACE_PE("WAIT_FOR_TX_ACK - timeout");
-         retry_transmit(pInfo);
-         break;
-      case R3964_WAIT_FOR_RX_BUF:
-         TRACE_PE("WAIT_FOR_RX_BUF - timeout");
-         put_char(pInfo, NAK);
-         flush(pInfo);
-         pInfo->state=R3964_IDLE;
-         break;
-      case R3964_RECEIVING:
-         TRACE_PE("RECEIVING - timeout after %d chars", 
-                  pInfo->rx_position);
-         put_char(pInfo, NAK);
-         flush(pInfo);
-         pInfo->state=R3964_IDLE;
-         break;
-      case R3964_WAIT_FOR_RX_REPEAT:
-         TRACE_PE("WAIT_FOR_RX_REPEAT - timeout");
-         pInfo->state=R3964_IDLE;
-         break;
-      case R3964_WAIT_FOR_BCC:
-         TRACE_PE("WAIT_FOR_BCC - timeout");
-         put_char(pInfo, NAK);
-         flush(pInfo);
-         pInfo->state=R3964_IDLE;
-         break;
-   }
+       struct r3964_info *pInfo = (void *)priv;
+
+       switch (pInfo->state) {
+       case R3964_TX_REQUEST:
+               TRACE_PE("TX_REQUEST - timeout");
+               retry_transmit(pInfo);
+               break;
+       case R3964_WAIT_ZVZ_BEFORE_TX_RETRY:
+               put_char(pInfo, NAK);
+               flush(pInfo);
+               retry_transmit(pInfo);
+               break;
+       case R3964_WAIT_FOR_TX_ACK:
+               TRACE_PE("WAIT_FOR_TX_ACK - timeout");
+               retry_transmit(pInfo);
+               break;
+       case R3964_WAIT_FOR_RX_BUF:
+               TRACE_PE("WAIT_FOR_RX_BUF - timeout");
+               put_char(pInfo, NAK);
+               flush(pInfo);
+               pInfo->state = R3964_IDLE;
+               break;
+       case R3964_RECEIVING:
+               TRACE_PE("RECEIVING - timeout after %d chars",
+                        pInfo->rx_position);
+               put_char(pInfo, NAK);
+               flush(pInfo);
+               pInfo->state = R3964_IDLE;
+               break;
+       case R3964_WAIT_FOR_RX_REPEAT:
+               TRACE_PE("WAIT_FOR_RX_REPEAT - timeout");
+               pInfo->state = R3964_IDLE;
+               break;
+       case R3964_WAIT_FOR_BCC:
+               TRACE_PE("WAIT_FOR_BCC - timeout");
+               put_char(pInfo, NAK);
+               flush(pInfo);
+               pInfo->state = R3964_IDLE;
+               break;
+       }
 }
 
-static struct r3964_client_info *findClient(
-  struct r3964_info *pInfo, struct pid *pid)
+static struct r3964_client_info *findClient(struct r3964_info *pInfo,
+               struct pid *pid)
 {
-   struct r3964_client_info *pClient;
-   
-   for(pClient=pInfo->firstClient; pClient; pClient=pClient->next)
-   {
-      if(pClient->pid == pid)
-      {
-         return pClient;
-      }
-   }
-   return NULL;
+       struct r3964_client_info *pClient;
+
+       for (pClient = pInfo->firstClient; pClient; pClient = pClient->next) {
+               if (pClient->pid == pid) {
+                       return pClient;
+               }
+       }
+       return NULL;
 }
 
 static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg)
 {
-   struct r3964_client_info *pClient;
-   struct r3964_client_info **ppClient;
-   struct r3964_message *pMsg;
-   
-   if((arg & R3964_SIG_ALL)==0)
-   {
-      /* Remove client from client list */
-      for(ppClient=&pInfo->firstClient; *ppClient; ppClient=&(*ppClient)->next)
-      {
-         pClient = *ppClient;
-         
-         if(pClient->pid == pid)
-         {
-            TRACE_PS("removing client %d from client list", pid_nr(pid));
-            *ppClient = pClient->next;
-            while(pClient->msg_count)
-            {
-               pMsg=remove_msg(pInfo, pClient);
-               if(pMsg)
-               {
-                  kfree(pMsg);
-                  TRACE_M("enable_signals - msg kfree %p",pMsg);
-               }
-            }
-           put_pid(pClient->pid);
-            kfree(pClient);
-            TRACE_M("enable_signals - kfree %p",pClient);
-            return 0;
-         }
-      }
-      return -EINVAL;
-   }
-   else
-   {
-      pClient=findClient(pInfo, pid);
-      if(pClient)
-      {
-         /* update signal options */
-         pClient->sig_flags=arg;
-      } 
-      else 
-      {
-         /* add client to client list */
-         pClient=kmalloc(sizeof(struct r3964_client_info), GFP_KERNEL);
-         TRACE_M("enable_signals - kmalloc %p",pClient);
-         if(pClient==NULL)
-            return -ENOMEM;
-
-         TRACE_PS("add client %d to client list", pid_nr(pid));
-        spin_lock_init(&pClient->lock);
-         pClient->sig_flags=arg;
-         pClient->pid = get_pid(pid);
-         pClient->next=pInfo->firstClient;
-         pClient->first_msg = NULL;
-         pClient->last_msg = NULL;
-         pClient->next_block_to_read = NULL;
-         pClient->msg_count = 0;
-         pInfo->firstClient=pClient;
-      }
-   }
-
-   return 0;
+       struct r3964_client_info *pClient;
+       struct r3964_client_info **ppClient;
+       struct r3964_message *pMsg;
+
+       if ((arg & R3964_SIG_ALL) == 0) {
+               /* Remove client from client list */
+               for (ppClient = &pInfo->firstClient; *ppClient;
+                    ppClient = &(*ppClient)->next) {
+                       pClient = *ppClient;
+
+                       if (pClient->pid == pid) {
+                               TRACE_PS("removing client %d from client list",
+                                        pid_nr(pid));
+                               *ppClient = pClient->next;
+                               while (pClient->msg_count) {
+                                       pMsg = remove_msg(pInfo, pClient);
+                                       if (pMsg) {
+                                               kfree(pMsg);
+                                               TRACE_M("enable_signals - msg "
+                                                       "kfree %p", pMsg);
+                                       }
+                               }
+                               put_pid(pClient->pid);
+                               kfree(pClient);
+                               TRACE_M("enable_signals - kfree %p", pClient);
+                               return 0;
+                       }
+               }
+               return -EINVAL;
+       } else {
+               pClient = findClient(pInfo, pid);
+               if (pClient) {
+                       /* update signal options */
+                       pClient->sig_flags = arg;
+               } else {
+                       /* add client to client list */
+                       pClient = kmalloc(sizeof(struct r3964_client_info),
+                                       GFP_KERNEL);
+                       TRACE_M("enable_signals - kmalloc %p", pClient);
+                       if (pClient == NULL)
+                               return -ENOMEM;
+
+                       TRACE_PS("add client %d to client list", pid_nr(pid));
+                       spin_lock_init(&pClient->lock);
+                       pClient->sig_flags = arg;
+                       pClient->pid = get_pid(pid);
+                       pClient->next = pInfo->firstClient;
+                       pClient->first_msg = NULL;
+                       pClient->last_msg = NULL;
+                       pClient->next_block_to_read = NULL;
+                       pClient->msg_count = 0;
+                       pInfo->firstClient = pClient;
+               }
+       }
+
+       return 0;
 }
 
-static int read_telegram(struct r3964_info *pInfo, struct pid *pid, unsigned char __user *buf)
+static int read_telegram(struct r3964_info *pInfo, struct pid *pid,
+                        unsigned char __user * buf)
 {
-    struct r3964_client_info *pClient;
-    struct r3964_block_header *block;
-
-    if(!buf)
-    {
-        return -EINVAL;
-    }
-
-    pClient=findClient(pInfo,pid);
-    if(pClient==NULL)
-    {
-       return -EINVAL;
-    }
-    
-    block=pClient->next_block_to_read;
-    if(!block)
-    {
-       return 0;
-    }
-    else
-    {
-      if (copy_to_user (buf, block->data, block->length))
-       return -EFAULT;
-
-       remove_client_block(pInfo, pClient);
-       return block->length;
-    }
-
-    return -EINVAL;
+       struct r3964_client_info *pClient;
+       struct r3964_block_header *block;
+
+       if (!buf) {
+               return -EINVAL;
+       }
+
+       pClient = findClient(pInfo, pid);
+       if (pClient == NULL) {
+               return -EINVAL;
+       }
+
+       block = pClient->next_block_to_read;
+       if (!block) {
+               return 0;
+       } else {
+               if (copy_to_user(buf, block->data, block->length))
+                       return -EFAULT;
+
+               remove_client_block(pInfo, pClient);
+               return block->length;
+       }
+
+       return -EINVAL;
 }
 
 static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg,
-             int error_code, struct r3964_block_header *pBlock)
+               int error_code, struct r3964_block_header *pBlock)
 {
-   struct r3964_message *pMsg;
-   unsigned long flags;
-   
-   if(pClient->msg_count<R3964_MAX_MSG_COUNT-1)
-   {
+       struct r3964_message *pMsg;
+       unsigned long flags;
+
+       if (pClient->msg_count < R3964_MAX_MSG_COUNT - 1) {
 queue_the_message:
 
-      pMsg = kmalloc(sizeof(struct r3964_message),
-                    error_code?GFP_ATOMIC:GFP_KERNEL);
-      TRACE_M("add_msg - kmalloc %p",pMsg);
-      if(pMsg==NULL) {
-         return;
-      }
-
-      spin_lock_irqsave(&pClient->lock, flags);
-
-      pMsg->msg_id = msg_id;
-      pMsg->arg    = arg;
-      pMsg->error_code = error_code;
-      pMsg->block  = pBlock;
-      pMsg->next   = NULL;
-      
-      if(pClient->last_msg==NULL)
-      {
-         pClient->first_msg=pClient->last_msg=pMsg;
-      }
-      else
-      {
-         pClient->last_msg->next = pMsg;
-         pClient->last_msg=pMsg;
-      }
-
-      pClient->msg_count++;
-
-      if(pBlock!=NULL)
-      {
-         pBlock->locks++;
-      }
-      spin_unlock_irqrestore(&pClient->lock, flags);
-   }
-   else
-   {
-      if((pClient->last_msg->msg_id == R3964_MSG_ACK)
-                && (pClient->last_msg->error_code==R3964_OVERFLOW))
-      {
-         pClient->last_msg->arg++;
-                TRACE_PE("add_msg - inc prev OVERFLOW-msg");
-      }
-      else
-      {
-         msg_id = R3964_MSG_ACK;
-         arg = 0;
-                error_code = R3964_OVERFLOW;
-         pBlock = NULL;
-                TRACE_PE("add_msg - queue OVERFLOW-msg");
-         goto queue_the_message;
-      }
-   }
-   /* Send SIGIO signal to client process: */
-   if(pClient->sig_flags & R3964_USE_SIGIO)
-   {
-      kill_pid(pClient->pid, SIGIO, 1);
-   }
+               pMsg = kmalloc(sizeof(struct r3964_message),
+                               error_code ? GFP_ATOMIC : GFP_KERNEL);
+               TRACE_M("add_msg - kmalloc %p", pMsg);
+               if (pMsg == NULL) {
+                       return;
+               }
+
+               spin_lock_irqsave(&pClient->lock, flags);
+
+               pMsg->msg_id = msg_id;
+               pMsg->arg = arg;
+               pMsg->error_code = error_code;
+               pMsg->block = pBlock;
+               pMsg->next = NULL;
+
+               if (pClient->last_msg == NULL) {
+                       pClient->first_msg = pClient->last_msg = pMsg;
+               } else {
+                       pClient->last_msg->next = pMsg;
+                       pClient->last_msg = pMsg;
+               }
+
+               pClient->msg_count++;
+
+               if (pBlock != NULL) {
+                       pBlock->locks++;
+               }
+               spin_unlock_irqrestore(&pClient->lock, flags);
+       } else {
+               if ((pClient->last_msg->msg_id == R3964_MSG_ACK)
+                   && (pClient->last_msg->error_code == R3964_OVERFLOW)) {
+                       pClient->last_msg->arg++;
+                       TRACE_PE("add_msg - inc prev OVERFLOW-msg");
+               } else {
+                       msg_id = R3964_MSG_ACK;
+                       arg = 0;
+                       error_code = R3964_OVERFLOW;
+                       pBlock = NULL;
+                       TRACE_PE("add_msg - queue OVERFLOW-msg");
+                       goto queue_the_message;
+               }
+       }
+       /* Send SIGIO signal to client process: */
+       if (pClient->sig_flags & R3964_USE_SIGIO) {
+               kill_pid(pClient->pid, SIGIO, 1);
+       }
 }
 
 static struct r3964_message *remove_msg(struct r3964_info *pInfo,
-                       struct r3964_client_info *pClient)
+                                       struct r3964_client_info *pClient)
 {
-   struct r3964_message *pMsg=NULL;
-   unsigned long flags;
-
-   if(pClient->first_msg)
-   {
-      spin_lock_irqsave(&pClient->lock, flags);
-
-      pMsg = pClient->first_msg;
-      pClient->first_msg = pMsg->next;
-      if(pClient->first_msg==NULL)
-      {
-         pClient->last_msg = NULL;
-      }
-      
-      pClient->msg_count--;
-      if(pMsg->block)
-      {
-        remove_client_block(pInfo, pClient);
-        pClient->next_block_to_read = pMsg->block;
-      }
-      spin_unlock_irqrestore(&pClient->lock, flags);
-   }
-   return pMsg;
+       struct r3964_message *pMsg = NULL;
+       unsigned long flags;
+
+       if (pClient->first_msg) {
+               spin_lock_irqsave(&pClient->lock, flags);
+
+               pMsg = pClient->first_msg;
+               pClient->first_msg = pMsg->next;
+               if (pClient->first_msg == NULL) {
+                       pClient->last_msg = NULL;
+               }
+
+               pClient->msg_count--;
+               if (pMsg->block) {
+                       remove_client_block(pInfo, pClient);
+                       pClient->next_block_to_read = pMsg->block;
+               }
+               spin_unlock_irqrestore(&pClient->lock, flags);
+       }
+       return pMsg;
 }
 
-static void remove_client_block(struct r3964_info *pInfo, 
-                struct r3964_client_info *pClient)
+static void remove_client_block(struct r3964_info *pInfo,
+                               struct r3964_client_info *pClient)
 {
-    struct r3964_block_header *block;
-
-    TRACE_PS("remove_client_block PID %d", pid_nr(pClient->pid));
-
-    block=pClient->next_block_to_read;
-    if(block)
-    {
-        block->locks--;
-        if(block->locks==0)
-        {
-            remove_from_rx_queue(pInfo, block);
-        }
-    }
-    pClient->next_block_to_read = NULL;
-}
+       struct r3964_block_header *block;
+
+       TRACE_PS("remove_client_block PID %d", pid_nr(pClient->pid));
 
+       block = pClient->next_block_to_read;
+       if (block) {
+               block->locks--;
+               if (block->locks == 0) {
+                       remove_from_rx_queue(pInfo, block);
+               }
+       }
+       pClient->next_block_to_read = NULL;
+}
 
 /*************************************************************
  * Line discipline routines
@@ -1064,342 +951,320 @@ static void remove_client_block(struct r3964_info *pInfo,
 
 static int r3964_open(struct tty_struct *tty)
 {
-   struct r3964_info *pInfo;
-   
-   TRACE_L("open");
-   TRACE_L("tty=%p, PID=%d, disc_data=%p", 
-          tty, current->pid, tty->disc_data);
-   
-   pInfo=kmalloc(sizeof(struct r3964_info), GFP_KERNEL); 
-   TRACE_M("r3964_open - info kmalloc %p",pInfo);
-
-   if(!pInfo)
-   {
-      printk(KERN_ERR "r3964: failed to alloc info structure\n");
-      return -ENOMEM;
-   }
-
-   pInfo->rx_buf = kmalloc(RX_BUF_SIZE, GFP_KERNEL);
-   TRACE_M("r3964_open - rx_buf kmalloc %p",pInfo->rx_buf);
-
-   if(!pInfo->rx_buf)
-   {
-      printk(KERN_ERR "r3964: failed to alloc receive buffer\n");
-      kfree(pInfo);
-      TRACE_M("r3964_open - info kfree %p",pInfo);
-      return -ENOMEM;
-   }
-   
-   pInfo->tx_buf = kmalloc(TX_BUF_SIZE, GFP_KERNEL);
-   TRACE_M("r3964_open - tx_buf kmalloc %p",pInfo->tx_buf);
-
-   if(!pInfo->tx_buf)
-   {
-      printk(KERN_ERR "r3964: failed to alloc transmit buffer\n");
-      kfree(pInfo->rx_buf);
-      TRACE_M("r3964_open - rx_buf kfree %p",pInfo->rx_buf);
-      kfree(pInfo);
-      TRACE_M("r3964_open - info kfree %p",pInfo);
-      return -ENOMEM;
-   }
-
-   spin_lock_init(&pInfo->lock);
-   pInfo->tty = tty;
-   init_waitqueue_head (&pInfo->read_wait);
-   pInfo->priority = R3964_MASTER;
-   pInfo->rx_first = pInfo->rx_last = NULL;
-   pInfo->tx_first = pInfo->tx_last = NULL;
-   pInfo->rx_position = 0;
-   pInfo->tx_position = 0;
-   pInfo->last_rx = 0;
-   pInfo->blocks_in_rx_queue = 0;
-   pInfo->firstClient=NULL;
-   pInfo->state=R3964_IDLE;
-   pInfo->flags = R3964_DEBUG;
-   pInfo->nRetry = 0;
-   
-   tty->disc_data = pInfo;
-   tty->receive_room = 65536;
-
-   init_timer(&pInfo->tmr);
-   pInfo->tmr.data = (unsigned long)pInfo;
-   pInfo->tmr.function = on_timeout;
-
-   return 0;
+       struct r3964_info *pInfo;
+
+       TRACE_L("open");
+       TRACE_L("tty=%p, PID=%d, disc_data=%p",
+               tty, current->pid, tty->disc_data);
+
+       pInfo = kmalloc(sizeof(struct r3964_info), GFP_KERNEL);
+       TRACE_M("r3964_open - info kmalloc %p", pInfo);
+
+       if (!pInfo) {
+               printk(KERN_ERR "r3964: failed to alloc info structure\n");
+               return -ENOMEM;
+       }
+
+       pInfo->rx_buf = kmalloc(RX_BUF_SIZE, GFP_KERNEL);
+       TRACE_M("r3964_open - rx_buf kmalloc %p", pInfo->rx_buf);
+
+       if (!pInfo->rx_buf) {
+               printk(KERN_ERR "r3964: failed to alloc receive buffer\n");
+               kfree(pInfo);
+               TRACE_M("r3964_open - info kfree %p", pInfo);
+               return -ENOMEM;
+       }
+
+       pInfo->tx_buf = kmalloc(TX_BUF_SIZE, GFP_KERNEL);
+       TRACE_M("r3964_open - tx_buf kmalloc %p", pInfo->tx_buf);
+
+       if (!pInfo->tx_buf) {
+               printk(KERN_ERR "r3964: failed to alloc transmit buffer\n");
+               kfree(pInfo->rx_buf);
+               TRACE_M("r3964_open - rx_buf kfree %p", pInfo->rx_buf);
+               kfree(pInfo);
+               TRACE_M("r3964_open - info kfree %p", pInfo);
+               return -ENOMEM;
+       }
+
+       spin_lock_init(&pInfo->lock);
+       pInfo->tty = tty;
+       init_waitqueue_head(&pInfo->read_wait);
+       pInfo->priority = R3964_MASTER;
+       pInfo->rx_first = pInfo->rx_last = NULL;
+       pInfo->tx_first = pInfo->tx_last = NULL;
+       pInfo->rx_position = 0;
+       pInfo->tx_position = 0;
+       pInfo->last_rx = 0;
+       pInfo->blocks_in_rx_queue = 0;
+       pInfo->firstClient = NULL;
+       pInfo->state = R3964_IDLE;
+       pInfo->flags = R3964_DEBUG;
+       pInfo->nRetry = 0;
+
+       tty->disc_data = pInfo;
+       tty->receive_room = 65536;
+
+       init_timer(&pInfo->tmr);
+       pInfo->tmr.data = (unsigned long)pInfo;
+       pInfo->tmr.function = on_timeout;
+
+       return 0;
 }
 
 static void r3964_close(struct tty_struct *tty)
 {
-   struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
-   struct r3964_client_info *pClient, *pNext;
-   struct r3964_message *pMsg;
-   struct r3964_block_header *pHeader, *pNextHeader;
-   unsigned long flags;
-
-   TRACE_L("close");
-
-    /*
-     * Make sure that our task queue isn't activated.  If it
-     * is, take it out of the linked list.
-     */
-    del_timer_sync(&pInfo->tmr);
-
-   /* Remove client-structs and message queues: */
-    pClient=pInfo->firstClient;
-    while(pClient)
-    {
-       pNext=pClient->next;
-       while(pClient->msg_count)
-       {
-          pMsg=remove_msg(pInfo, pClient);
-          if(pMsg)
-          {
-             kfree(pMsg);
-             TRACE_M("r3964_close - msg kfree %p",pMsg);
-          }
-       }
-       put_pid(pClient->pid);
-       kfree(pClient);
-       TRACE_M("r3964_close - client kfree %p",pClient);
-       pClient=pNext;
-    }
-    /* Remove jobs from tx_queue: */
-        spin_lock_irqsave(&pInfo->lock, flags);
-       pHeader=pInfo->tx_first;
-       pInfo->tx_first=pInfo->tx_last=NULL;
+       struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data;
+       struct r3964_client_info *pClient, *pNext;
+       struct r3964_message *pMsg;
+       struct r3964_block_header *pHeader, *pNextHeader;
+       unsigned long flags;
+
+       TRACE_L("close");
+
+       /*
+        * Make sure that our task queue isn't activated.  If it
+        * is, take it out of the linked list.
+        */
+       del_timer_sync(&pInfo->tmr);
+
+       /* Remove client-structs and message queues: */
+       pClient = pInfo->firstClient;
+       while (pClient) {
+               pNext = pClient->next;
+               while (pClient->msg_count) {
+                       pMsg = remove_msg(pInfo, pClient);
+                       if (pMsg) {
+                               kfree(pMsg);
+                               TRACE_M("r3964_close - msg kfree %p", pMsg);
+                       }
+               }
+               put_pid(pClient->pid);
+               kfree(pClient);
+               TRACE_M("r3964_close - client kfree %p", pClient);
+               pClient = pNext;
+       }
+       /* Remove jobs from tx_queue: */
+       spin_lock_irqsave(&pInfo->lock, flags);
+       pHeader = pInfo->tx_first;
+       pInfo->tx_first = pInfo->tx_last = NULL;
        spin_unlock_irqrestore(&pInfo->lock, flags);
-       
-    while(pHeader)
-       {
-          pNextHeader=pHeader->next;
-          kfree(pHeader);
-          pHeader=pNextHeader;
+
+       while (pHeader) {
+               pNextHeader = pHeader->next;
+               kfree(pHeader);
+               pHeader = pNextHeader;
        }
 
-    /* Free buffers: */
-    wake_up_interruptible(&pInfo->read_wait);
-    kfree(pInfo->rx_buf);
-    TRACE_M("r3964_close - rx_buf kfree %p",pInfo->rx_buf);
-    kfree(pInfo->tx_buf);
-    TRACE_M("r3964_close - tx_buf kfree %p",pInfo->tx_buf);
-    kfree(pInfo);
-    TRACE_M("r3964_close - info kfree %p",pInfo);
+       /* Free buffers: */
+       wake_up_interruptible(&pInfo->read_wait);
+       kfree(pInfo->rx_buf);
+       TRACE_M("r3964_close - rx_buf kfree %p", pInfo->rx_buf);
+       kfree(pInfo->tx_buf);
+       TRACE_M("r3964_close - tx_buf kfree %p", pInfo->tx_buf);
+       kfree(pInfo);
+       TRACE_M("r3964_close - info kfree %p", pInfo);
 }
 
 static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
-                         unsigned char __user *buf, size_t nr)
+                         unsigned char __user * buf, size_t nr)
 {
-   struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
-   struct r3964_client_info *pClient;
-   struct r3964_message *pMsg;
-   struct r3964_client_message theMsg;
-   DECLARE_WAITQUEUE (wait, current);
-   
-   int count;
-   
-   TRACE_L("read()");
-   pClient=findClient(pInfo, task_pid(current));
-   if(pClient)
-   {
-      pMsg = remove_msg(pInfo, pClient);
-      if(pMsg==NULL)
-      {
-                /* no messages available. */
-         if (file->f_flags & O_NONBLOCK)
-                {
-            return -EAGAIN;
-                }
-         /* block until there is a message: */
-         add_wait_queue(&pInfo->read_wait, &wait);
+       struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data;
+       struct r3964_client_info *pClient;
+       struct r3964_message *pMsg;
+       struct r3964_client_message theMsg;
+       DECLARE_WAITQUEUE(wait, current);
+
+       int count;
+
+       TRACE_L("read()");
+
+       pClient = findClient(pInfo, task_pid(current));
+       if (pClient) {
+               pMsg = remove_msg(pInfo, pClient);
+               if (pMsg == NULL) {
+                       /* no messages available. */
+                       if (file->f_flags & O_NONBLOCK) {
+                               return -EAGAIN;
+                       }
+                       /* block until there is a message: */
+                       add_wait_queue(&pInfo->read_wait, &wait);
 repeat:
-         current->state = TASK_INTERRUPTIBLE;
-         pMsg = remove_msg(pInfo, pClient);
-        if (!pMsg && !signal_pending(current))
-                {
-            schedule();
-            goto repeat;
-         }
-         current->state = TASK_RUNNING;
-         remove_wait_queue(&pInfo->read_wait, &wait);
-      }
-      
-      /* If we still haven't got a message, we must have been signalled */
-
-      if (!pMsg) return -EINTR;
-
-      /* deliver msg to client process: */
-      theMsg.msg_id = pMsg->msg_id;
-      theMsg.arg    = pMsg->arg;
-      theMsg.error_code = pMsg->error_code;
-      count = sizeof(struct r3964_client_message);
-
-      kfree(pMsg);
-      TRACE_M("r3964_read - msg kfree %p",pMsg);
-
-      if (copy_to_user(buf,&theMsg, count))
-       return -EFAULT;
-
-      TRACE_PS("read - return %d", count);
-      return count;
-   }
-   return -EPERM;
+                       current->state = TASK_INTERRUPTIBLE;
+                       pMsg = remove_msg(pInfo, pClient);
+                       if (!pMsg && !signal_pending(current)) {
+                               schedule();
+                               goto repeat;
+                       }
+                       current->state = TASK_RUNNING;
+                       remove_wait_queue(&pInfo->read_wait, &wait);
+               }
+
+               /* If we still haven't got a message, we must have been signalled */
+
+               if (!pMsg)
+                       return -EINTR;
+
+               /* deliver msg to client process: */
+               theMsg.msg_id = pMsg->msg_id;
+               theMsg.arg = pMsg->arg;
+               theMsg.error_code = pMsg->error_code;
+               count = sizeof(struct r3964_client_message);
+
+               kfree(pMsg);
+               TRACE_M("r3964_read - msg kfree %p", pMsg);
+
+               if (copy_to_user(buf, &theMsg, count))
+                       return -EFAULT;
+
+               TRACE_PS("read - return %d", count);
+               return count;
+       }
+       return -EPERM;
 }
 
-static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
+static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
                           const unsigned char *data, size_t count)
 {
-   struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
-   struct r3964_block_header *pHeader;
-   struct r3964_client_info *pClient;
-   unsigned char *new_data;
-   
-   TRACE_L("write request, %d characters", count);
+       struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data;
+       struct r3964_block_header *pHeader;
+       struct r3964_client_info *pClient;
+       unsigned char *new_data;
+
+       TRACE_L("write request, %d characters", count);
 /* 
  * Verify the pointers 
  */
 
-   if(!pInfo)
-      return -EIO;
+       if (!pInfo)
+               return -EIO;
 
 /*
  * Ensure that the caller does not wish to send too much.
  */
-   if (count > R3964_MTU) 
-   {
-      if (pInfo->flags & R3964_DEBUG)
-      {
-         TRACE_L (KERN_WARNING
-                 "r3964_write: truncating user packet "
-                 "from %u to mtu %d", count, R3964_MTU);
-      }
-      count = R3964_MTU;
-   }
+       if (count > R3964_MTU) {
+               if (pInfo->flags & R3964_DEBUG) {
+                       TRACE_L(KERN_WARNING "r3964_write: truncating user "
+                               "packet from %u to mtu %d", count, R3964_MTU);
+               }
+               count = R3964_MTU;
+       }
 /*
  * Allocate a buffer for the data and copy it from the buffer with header prepended
  */
-   new_data = kmalloc (count+sizeof(struct r3964_block_header), GFP_KERNEL);
-   TRACE_M("r3964_write - kmalloc %p",new_data);
-   if (new_data == NULL) {
-      if (pInfo->flags & R3964_DEBUG)
-      {
-         printk (KERN_ERR
-               "r3964_write: no memory\n");
-      }
-      return -ENOSPC;
-   }
-   
-   pHeader = (struct r3964_block_header *)new_data;
-   pHeader->data = new_data + sizeof(struct r3964_block_header);
-   pHeader->length = count;
-   pHeader->locks = 0;
-   pHeader->owner = NULL;
-   
-   pClient=findClient(pInfo, task_pid(current));
-   if(pClient)
-   {
-      pHeader->owner = pClient;
-   }
-
-   memcpy(pHeader->data, data, count); /* We already verified this */
-
-   if(pInfo->flags & R3964_DEBUG)
-   {
-      dump_block(pHeader->data, count);
-   }
+       new_data = kmalloc(count + sizeof(struct r3964_block_header),
+                       GFP_KERNEL);
+       TRACE_M("r3964_write - kmalloc %p", new_data);
+       if (new_data == NULL) {
+               if (pInfo->flags & R3964_DEBUG) {
+                       printk(KERN_ERR "r3964_write: no memory\n");
+               }
+               return -ENOSPC;
+       }
+
+       pHeader = (struct r3964_block_header *)new_data;
+       pHeader->data = new_data + sizeof(struct r3964_block_header);
+       pHeader->length = count;
+       pHeader->locks = 0;
+       pHeader->owner = NULL;
+
+       pClient = findClient(pInfo, task_pid(current));
+       if (pClient) {
+               pHeader->owner = pClient;
+       }
+
+       memcpy(pHeader->data, data, count);     /* We already verified this */
+
+       if (pInfo->flags & R3964_DEBUG) {
+               dump_block(pHeader->data, count);
+       }
 
 /*
  * Add buffer to transmit-queue:
  */
-   add_tx_queue(pInfo, pHeader);
-   trigger_transmit(pInfo);
-   
-   return 0;
+       add_tx_queue(pInfo, pHeader);
+       trigger_transmit(pInfo);
+
+       return 0;
 }
 
-static int r3964_ioctl(struct tty_struct * tty, struct file * file,
-               unsigned int cmd, unsigned long arg)
+static int r3964_ioctl(struct tty_struct *tty, struct file *file,
+               unsigned int cmd, unsigned long arg)
 {
-   struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
-   if(pInfo==NULL)
-      return -EINVAL;
-   switch(cmd)
-   {
-      case R3964_ENABLE_SIGNALS:
-         return enable_signals(pInfo, task_pid(current), arg);
-      case R3964_SETPRIORITY:
-         if(arg<R3964_MASTER || arg>R3964_SLAVE)
-            return -EINVAL;
-         pInfo->priority = arg & 0xff;
-         return 0;
-      case R3964_USE_BCC:
-             if(arg)
-            pInfo->flags |= R3964_BCC;
-         else
-            pInfo->flags &= ~R3964_BCC;
-         return 0;
-      case R3964_READ_TELEGRAM:
-         return read_telegram(pInfo, task_pid(current), (unsigned char __user *)arg);
-      default:
-         return -ENOIOCTLCMD;
-   }
+       struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data;
+       if (pInfo == NULL)
+               return -EINVAL;
+       switch (cmd) {
+       case R3964_ENABLE_SIGNALS:
+               return enable_signals(pInfo, task_pid(current), arg);
+       case R3964_SETPRIORITY:
+               if (arg < R3964_MASTER || arg > R3964_SLAVE)
+                       return -EINVAL;
+               pInfo->priority = arg & 0xff;
+               return 0;
+       case R3964_USE_BCC:
+               if (arg)
+                       pInfo->flags |= R3964_BCC;
+               else
+                       pInfo->flags &= ~R3964_BCC;
+               return 0;
+       case R3964_READ_TELEGRAM:
+               return read_telegram(pInfo, task_pid(current),
+                               (unsigned char __user *)arg);
+       default:
+               return -ENOIOCTLCMD;
+       }
 }
 
-static void r3964_set_termios(struct tty_struct *tty, struct ktermios * old)
+static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
-   TRACE_L("set_termios");
+       TRACE_L("set_termios");
 }
 
 /* Called without the kernel lock held - fine */
-static unsigned int r3964_poll(struct tty_struct * tty, struct file * file,
-                     struct poll_table_struct *wait)
+static unsigned int r3964_poll(struct tty_struct *tty, struct file *file,
+                       struct poll_table_struct *wait)
 {
-   struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
-   struct r3964_client_info *pClient;
-   struct r3964_message *pMsg=NULL;
-   unsigned long flags;
-   int result = POLLOUT;
-
-   TRACE_L("POLL");
-
-   pClient=findClient(pInfo, task_pid(current));
-   if(pClient)
-     {
-       poll_wait(file, &pInfo->read_wait, wait);
-       spin_lock_irqsave(&pInfo->lock, flags);
-       pMsg=pClient->first_msg;
-       spin_unlock_irqrestore(&pInfo->lock, flags);
-       if(pMsg)
-          result |= POLLIN | POLLRDNORM;
-     }
-   else
-     {
-       result = -EINVAL;
-     }
-   return result;
+       struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data;
+       struct r3964_client_info *pClient;
+       struct r3964_message *pMsg = NULL;
+       unsigned long flags;
+       int result = POLLOUT;
+
+       TRACE_L("POLL");
+
+       pClient = findClient(pInfo, task_pid(current));
+       if (pClient) {
+               poll_wait(file, &pInfo->read_wait, wait);
+               spin_lock_irqsave(&pInfo->lock, flags);
+               pMsg = pClient->first_msg;
+               spin_unlock_irqrestore(&pInfo->lock, flags);
+               if (pMsg)
+                       result |= POLLIN | POLLRDNORM;
+       } else {
+               result = -EINVAL;
+       }
+       return result;
 }
 
 static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp,
-                              char *fp, int count)
+                       char *fp, int count)
 {
-   struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
-    const unsigned char *p;
-    char *f, flags = 0;
-    int i;
-
-    for (i=count, p = cp, f = fp; i; i--, p++) {
-        if (f)
-            flags = *f++;
-        if(flags==TTY_NORMAL)
-        {
-            receive_char(pInfo, *p);
-        }
-        else
-        {
-            receive_error(pInfo, flags);
-        }
-        
-    }
+       struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data;
+       const unsigned char *p;
+       char *f, flags = 0;
+       int i;
+
+       for (i = count, p = cp, f = fp; i; i--, p++) {
+               if (f)
+                       flags = *f++;
+               if (flags == TTY_NORMAL) {
+                       receive_char(pInfo, *p);
+               } else {
+                       receive_error(pInfo, flags);
+               }
+
+       }
 }
 
 MODULE_LICENSE("GPL");
index f108c136800a2ef3b2fcb990cc3d8aabf83b6ffe..4ab2c98f978cb5eab5321c3a3a7cde9ae6addfca 100644 (file)
@@ -887,10 +887,8 @@ static void bh_transmit(MGSLPC_INFO *info)
        if (debug_level >= DEBUG_LEVEL_BH)
                printk("bh_transmit() entry on %s\n", info->device_name);
 
-       if (tty) {
+       if (tty)
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
 }
 
 static void bh_status(MGSLPC_INFO *info)
index 645e20a06ece382149b0f0eff59812aeed1d6a59..1f0d7c60c94420fb98fd23791bc38ba1b8266b37 100644 (file)
@@ -154,7 +154,7 @@ static int raw_ctl_ioctl(struct inode *inode, struct file *filp,
                        goto out;
                }
 
-               if (rq.raw_minor < 0 || rq.raw_minor >= MAX_RAW_MINORS) {
+               if (rq.raw_minor <= 0 || rq.raw_minor >= MAX_RAW_MINORS) {
                        err = -EINVAL;
                        goto out;
                }
index eeda40c5e189067a547e1db2a5670a6756fc5a74..ebc76342712c1485da63b58eb01d83be38e34a4d 100644 (file)
@@ -162,13 +162,8 @@ void RIOTxEnable(char *en)
 
        rio_spin_unlock_irqrestore(&PortP->portSem, flags);
 
-       if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN)) {
-               rio_dprintk(RIO_DEBUG_INTR, "Waking up.... ldisc:%d (%d/%d)....", (int) (PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)), PortP->gs.wakeup_chars, PortP->gs.xmit_cnt);
-               if ((PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && PortP->gs.tty->ldisc.write_wakeup)
-                       (PortP->gs.tty->ldisc.write_wakeup) (PortP->gs.tty);
-               rio_dprintk(RIO_DEBUG_INTR, "(%d/%d)\n", PortP->gs.wakeup_chars, PortP->gs.xmit_cnt);
-               wake_up_interruptible(&PortP->gs.tty->write_wait);
-       }
+       if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN))
+               tty_wakeup(PortP->gs.tty);
 
 }
 
index e2a94bfb2a436dd5d24e68fb8388721351a6acdb..70145254fb9dff9af8acedcc169f791acdc00446 100644 (file)
@@ -1229,7 +1229,6 @@ static void rc_flush_buffer(struct tty_struct *tty)
        port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
        restore_flags(flags);
        
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 }
 
@@ -1570,10 +1569,8 @@ static void do_softint(struct work_struct *ugly_api)
        if(!(tty = port->tty)) 
                return;
 
-       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
+       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event))
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
 }
 
 static const struct tty_operations riscom_ops = {
index e94a62e30fc4f5c01be2343a28468675ba9ca8c8..106f225e745fa72f07a8689f11eff4f1b0bdcb06 100644 (file)
@@ -474,7 +474,6 @@ static void rp_do_transmit(struct r_port *info)
 
        if (info->xmit_cnt < WAKEUP_CHARS) {
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
 #ifdef ROCKETPORT_HAVE_POLL_WAIT
                wake_up_interruptible(&tty->poll_wait);
 #endif
@@ -1772,7 +1771,6 @@ static int rp_write(struct tty_struct *tty,
 end:
        if (info->xmit_cnt < WAKEUP_CHARS) {
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
 #ifdef ROCKETPORT_HAVE_POLL_WAIT
                wake_up_interruptible(&tty->poll_wait);
 #endif
@@ -1841,7 +1839,6 @@ static void rp_flush_buffer(struct tty_struct *tty)
        info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
        spin_unlock_irqrestore(&info->slock, flags);
 
-       wake_up_interruptible(&tty->write_wait);
 #ifdef ROCKETPORT_HAVE_POLL_WAIT
        wake_up_interruptible(&tty->poll_wait);
 #endif
index af50d32ae2c75a97fef06148de07d97c5713ef24..5fd314adc1f28d864805bea180d2f87a77d06741 100644 (file)
@@ -111,12 +111,13 @@ u_char initial_console_speed;
 
 /* This is the per-port data structure */
 struct cyclades_port cy_port[] = {
-      /* CARD#  */
-        {-1 },      /* ttyS0 */
-        {-1 },      /* ttyS1 */
-        {-1 },      /* ttyS2 */
-        {-1 },      /* ttyS3 */
+       /* CARD#  */
+       {-1},                   /* ttyS0 */
+       {-1},                   /* ttyS1 */
+       {-1},                   /* ttyS2 */
+       {-1},                   /* ttyS3 */
 };
+
 #define NR_PORTS        ARRAY_SIZE(cy_port)
 
 /*
@@ -128,42 +129,46 @@ struct cyclades_port cy_port[] = {
  *                                                  HI            VHI
  */
 static int baud_table[] = {
-           0,    50,    75,   110,   134,   150,   200,   300,   600,  1200,
-        1800,  2400,  4800,  9600, 19200, 38400, 57600, 76800,115200,150000,
-        0};
+       0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
+       1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 150000,
+       0
+};
 
 #if 0
-static char baud_co[] = {  /* 25 MHz clock option table */
-        /* value =>    00    01   02    03    04 */
-        /* divide by    8    32   128   512  2048 */
-        0x00,  0x04,  0x04,  0x04,  0x04,  0x04,  0x03,  0x03,  0x03,  0x02,
-        0x02,  0x02,  0x01,  0x01,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00};
+static char baud_co[] = {      /* 25 MHz clock option table */
+       /* value =>    00    01   02    03    04 */
+       /* divide by    8    32   128   512  2048 */
+       0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x02,
+       0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
 
-static char baud_bpr[] = {  /* 25 MHz baud rate period table */
-        0x00,  0xf5,  0xa3,  0x6f,  0x5c,  0x51,  0xf5,  0xa3,  0x51,  0xa3,
-        0x6d,  0x51,  0xa3,  0x51,  0xa3,  0x51,  0x36,  0x29,  0x1b,  0x15};
+static char baud_bpr[] = {     /* 25 MHz baud rate period table */
+       0x00, 0xf5, 0xa3, 0x6f, 0x5c, 0x51, 0xf5, 0xa3, 0x51, 0xa3,
+       0x6d, 0x51, 0xa3, 0x51, 0xa3, 0x51, 0x36, 0x29, 0x1b, 0x15
+};
 #endif
 
 /* I think 166 brd clocks 2401 at 20MHz.... */
 
 /* These values are written directly to tcor, and >> 5 for writing to rcor */
-static u_char baud_co[] = {  /* 20 MHz clock option table */
-        0x00,  0x80,  0x80,  0x80,  0x80,  0x80,  0x80,  0x60,  0x60,  0x40,
-        0x40,  0x40,  0x20,  0x20,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00};
+static u_char baud_co[] = {    /* 20 MHz clock option table */
+       0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x60, 0x60, 0x40,
+       0x40, 0x40, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
 
 /* These values written directly to tbpr/rbpr */
-static u_char baud_bpr[] = {  /* 20 MHz baud rate period table */
-        0x00,  0xc0,  0x80,  0x58,  0x6c,  0x40,  0xc0,  0x81,  0x40,  0x81,
-        0x57,  0x40,  0x81,  0x40,  0x81,  0x40,  0x2b,  0x20,  0x15,  0x10};
-
-static u_char baud_cor4[] = {  /* receive threshold */
-        0x0a,  0x0a,  0x0a,  0x0a,  0x0a,  0x0a,  0x0a,  0x0a,  0x0a,  0x0a,
-        0x0a,  0x0a,  0x0a,  0x09,  0x09,  0x08,  0x08,  0x08,  0x08,  0x07};
-
+static u_char baud_bpr[] = {   /* 20 MHz baud rate period table */
+       0x00, 0xc0, 0x80, 0x58, 0x6c, 0x40, 0xc0, 0x81, 0x40, 0x81,
+       0x57, 0x40, 0x81, 0x40, 0x81, 0x40, 0x2b, 0x20, 0x15, 0x10
+};
 
+static u_char baud_cor4[] = {  /* receive threshold */
+       0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a,
+       0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08, 0x07
+};
 
 static void shutdown(struct cyclades_port *);
-static int startup (struct cyclades_port *);
+static int startup(struct cyclades_port *);
 static void cy_throttle(struct tty_struct *);
 static void cy_unthrottle(struct tty_struct *);
 static void config_setup(struct cyclades_port *);
@@ -174,16 +179,16 @@ static void show_status(int);
 
 #ifdef CONFIG_REMOTE_DEBUG
 static void debug_setup(void);
-void queueDebugChar (int c);
+void queueDebugChar(int c);
 int getDebugChar(void);
 
 #define DEBUG_PORT     1
 #define DEBUG_LEN      256
 
 typedef struct {
-       int     in;
-       int     out;
-       unsigned char   buf[DEBUG_LEN];
+       int in;
+       int out;
+       unsigned char buf[DEBUG_LEN];
 } debugq;
 
 debugq debugiq;
@@ -196,7 +201,7 @@ debugq debugiq;
  * delay, but this wild guess will do for now.
  */
 
-void my_udelay (long us)
+void my_udelay(long us)
 {
        u_char x;
        volatile u_char *p = &x;
@@ -207,62 +212,73 @@ void my_udelay (long us)
                        x |= *p;
 }
 
-static inline int
-serial_paranoia_check(struct cyclades_port *info, char *name,
-                     const char *routine)
+static inline int serial_paranoia_check(struct cyclades_port *info, char *name,
+               const char *routine)
 {
 #ifdef SERIAL_PARANOIA_CHECK
-    static const char *badmagic =
-       "Warning: bad magic number for serial struct (%s) in %s\n";
-    static const char *badinfo =
-       "Warning: null cyclades_port for (%s) in %s\n";
-    static const char *badrange =
-       "Warning: cyclades_port out of range for (%s) in %s\n";
-
-    if (!info) {
-       printk(badinfo, name, routine);
-       return 1;
-    }
-
-    if( (long)info < (long)(&cy_port[0])
-    || (long)(&cy_port[NR_PORTS]) < (long)info ){
-       printk(badrange, name, routine);
-       return 1;
-    }
-
-    if (info->magic != CYCLADES_MAGIC) {
-       printk(badmagic, name, routine);
-       return 1;
-    }
+       if (!info) {
+               printk("Warning: null cyclades_port for (%s) in %s\n", name,
+                               routine);
+               return 1;
+       }
+
+       if ((long)info < (long)(&cy_port[0])
+           || (long)(&cy_port[NR_PORTS]) < (long)info) {
+               printk("Warning: cyclades_port out of range for (%s) in %s\n",
+                               name, routine);
+               return 1;
+       }
+
+       if (info->magic != CYCLADES_MAGIC) {
+               printk("Warning: bad magic number for serial struct (%s) in "
+                               "%s\n", name, routine);
+               return 1;
+       }
 #endif
        return 0;
-} /* serial_paranoia_check */
+}                              /* serial_paranoia_check */
 
 #if 0
 /* The following diagnostic routines allow the driver to spew
    information on the screen, even (especially!) during interrupts.
  */
-void
-SP(char *data){
-  unsigned long flags;
-    local_irq_save(flags);
-        console_print(data);
-    local_irq_restore(flags);
+void SP(char *data)
+{
+       unsigned long flags;
+       local_irq_save(flags);
+       console_print(data);
+       local_irq_restore(flags);
 }
+
 char scrn[2];
-void
-CP(char data){
-  unsigned long flags;
-    local_irq_save(flags);
-        scrn[0] = data;
-        console_print(scrn);
-    local_irq_restore(flags);
-}/* CP */
+void CP(char data)
+{
+       unsigned long flags;
+       local_irq_save(flags);
+       scrn[0] = data;
+       console_print(scrn);
+       local_irq_restore(flags);
+}                              /* CP */
 
-void CP1(int data) { (data<10)?  CP(data+'0'): CP(data+'A'-10); }/* CP1 */
-void CP2(int data) { CP1((data>>4) & 0x0f); CP1( data & 0x0f); }/* CP2 */
-void CP4(int data) { CP2((data>>8) & 0xff); CP2(data & 0xff); }/* CP4 */
-void CP8(long data) { CP4((data>>16) & 0xffff); CP4(data & 0xffff); }/* CP8 */
+void CP1(int data)
+{
+       (data < 10) ? CP(data + '0') : CP(data + 'A' - 10);
+}                              /* CP1 */
+void CP2(int data)
+{
+       CP1((data >> 4) & 0x0f);
+       CP1(data & 0x0f);
+}                              /* CP2 */
+void CP4(int data)
+{
+       CP2((data >> 8) & 0xff);
+       CP2(data & 0xff);
+}                              /* CP4 */
+void CP8(long data)
+{
+       CP4((data >> 16) & 0xffff);
+       CP4(data & 0xffff);
+}                              /* CP8 */
 #endif
 
 /* This routine waits up to 1000 micro-seconds for the previous
@@ -270,87 +286,78 @@ void CP8(long data) { CP4((data>>16) & 0xffff); CP4(data & 0xffff); }/* CP8 */
    new command.  An error is returned if the previous command
    didn't finish within the time limit.
  */
-u_short
-write_cy_cmd(volatile u_char *base_addr, u_char cmd)
+u_short write_cy_cmd(volatile u_char * base_addr, u_char cmd)
 {
-  unsigned long flags;
-  volatile int  i;
+       unsigned long flags;
+       volatile int i;
 
-    local_irq_save(flags);
+       local_irq_save(flags);
        /* Check to see that the previous command has completed */
-       for(i = 0 ; i < 100 ; i++){
-           if (base_addr[CyCCR] == 0){
-               break;
-           }
-           my_udelay(10L);
+       for (i = 0; i < 100; i++) {
+               if (base_addr[CyCCR] == 0) {
+                       break;
+               }
+               my_udelay(10L);
        }
        /* if the CCR never cleared, the previous command
-           didn't finish within the "reasonable time" */
-       if ( i == 10 ) {
-           local_irq_restore(flags);
-           return (-1);
+          didn't finish within the "reasonable time" */
+       if (i == 10) {
+               local_irq_restore(flags);
+               return (-1);
        }
 
        /* Issue the new command */
        base_addr[CyCCR] = cmd;
-    local_irq_restore(flags);
-    return(0);
-} /* write_cy_cmd */
-
+       local_irq_restore(flags);
+       return (0);
+}                              /* write_cy_cmd */
 
 /* cy_start and cy_stop provide software output flow control as a
    function of XON/XOFF, software CTS, and other such stuff. */
 
-static void
-cy_stop(struct tty_struct *tty)
+static void cy_stop(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
-  int channel;
-  unsigned long flags;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
+       int channel;
+       unsigned long flags;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_stop %s\n", tty->name); /* */
+       printk("cy_stop %s\n", tty->name);      /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_stop"))
-       return;
-       
-    channel = info->line;
+       if (serial_paranoia_check(info, tty->name, "cy_stop"))
+               return;
 
-    local_irq_save(flags);
-        base_addr[CyCAR] = (u_char)(channel); /* index channel */
-        base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy);
-    local_irq_restore(flags);
+       channel = info->line;
 
-    return;
-} /* cy_stop */
+       local_irq_save(flags);
+       base_addr[CyCAR] = (u_char) (channel);  /* index channel */
+       base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy);
+       local_irq_restore(flags);
+}                              /* cy_stop */
 
-static void
-cy_start(struct tty_struct *tty)
+static void cy_start(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
-  int channel;
-  unsigned long flags;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
+       int channel;
+       unsigned long flags;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_start %s\n", tty->name); /* */
+       printk("cy_start %s\n", tty->name);     /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_start"))
-       return;
-       
-    channel = info->line;
+       if (serial_paranoia_check(info, tty->name, "cy_start"))
+               return;
 
-    local_irq_save(flags);
-        base_addr[CyCAR] = (u_char)(channel);
-        base_addr[CyIER] |= CyTxMpty;
-    local_irq_restore(flags);
-
-    return;
-} /* cy_start */
+       channel = info->line;
 
+       local_irq_save(flags);
+       base_addr[CyCAR] = (u_char) (channel);
+       base_addr[CyIER] |= CyTxMpty;
+       local_irq_restore(flags);
+}                              /* cy_start */
 
 /*
  * This routine is used by the interrupt handler to schedule
@@ -358,332 +365,332 @@ cy_start(struct tty_struct *tty)
  * (also known as the "bottom half").  This can be called any
  * number of times for any channel without harm.
  */
-static inline void
-cy_sched_event(struct cyclades_port *info, int event)
+static inline void cy_sched_event(struct cyclades_port *info, int event)
 {
-    info->event |= 1 << event; /* remember what kind of event and who */
-    schedule_work(&info->tqueue);
-} /* cy_sched_event */
-
+       info->event |= 1 << event;      /* remember what kind of event and who */
+       schedule_work(&info->tqueue);
+}                              /* cy_sched_event */
 
 /* The real interrupt service routines are called
    whenever the card wants its hand held--chars
    received, out buffer empty, modem change, etc.
  */
-static irqreturn_t
-cd2401_rxerr_interrupt(int irq, void *dev_id)
+static irqreturn_t cd2401_rxerr_interrupt(int irq, void *dev_id)
 {
-    struct tty_struct *tty;
-    struct cyclades_port *info;
-    volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
-    unsigned char err, rfoc;
-    int channel;
-    char data;
-
-    /* determine the channel and change to that context */
-    channel = (u_short ) (base_addr[CyLICR] >> 2);
-    info = &cy_port[channel];
-    info->last_active = jiffies;
-
-    if ((err = base_addr[CyRISR]) & CyTIMEOUT) {
-       /* This is a receive timeout interrupt, ignore it */
-       base_addr[CyREOIR] = CyNOTRANS;
-       return IRQ_HANDLED;
-    }
-
-    /* Read a byte of data if there is any - assume the error
-     * is associated with this character */
+       struct tty_struct *tty;
+       struct cyclades_port *info;
+       volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
+       unsigned char err, rfoc;
+       int channel;
+       char data;
+
+       /* determine the channel and change to that context */
+       channel = (u_short) (base_addr[CyLICR] >> 2);
+       info = &cy_port[channel];
+       info->last_active = jiffies;
+
+       if ((err = base_addr[CyRISR]) & CyTIMEOUT) {
+               /* This is a receive timeout interrupt, ignore it */
+               base_addr[CyREOIR] = CyNOTRANS;
+               return IRQ_HANDLED;
+       }
 
-    if ((rfoc = base_addr[CyRFOC]) != 0)
-       data = base_addr[CyRDR];
-    else
-       data = 0;
+       /* Read a byte of data if there is any - assume the error
+        * is associated with this character */
 
-    /* if there is nowhere to put the data, discard it */
-    if(info->tty == 0) {
+       if ((rfoc = base_addr[CyRFOC]) != 0)
+               data = base_addr[CyRDR];
+       else
+               data = 0;
+
+       /* if there is nowhere to put the data, discard it */
+       if (info->tty == 0) {
+               base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
+               return IRQ_HANDLED;
+       } else {                /* there is an open port for this data */
+               tty = info->tty;
+               if (err & info->ignore_status_mask) {
+                       base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
+                       return IRQ_HANDLED;
+               }
+               if (tty_buffer_request_room(tty, 1) != 0) {
+                       if (err & info->read_status_mask) {
+                               if (err & CyBREAK) {
+                                       tty_insert_flip_char(tty, data,
+                                                            TTY_BREAK);
+                                       if (info->flags & ASYNC_SAK) {
+                                               do_SAK(tty);
+                                       }
+                               } else if (err & CyFRAME) {
+                                       tty_insert_flip_char(tty, data,
+                                                            TTY_FRAME);
+                               } else if (err & CyPARITY) {
+                                       tty_insert_flip_char(tty, data,
+                                                            TTY_PARITY);
+                               } else if (err & CyOVERRUN) {
+                                       tty_insert_flip_char(tty, 0,
+                                                            TTY_OVERRUN);
+                                       /*
+                                          If the flip buffer itself is
+                                          overflowing, we still loose
+                                          the next incoming character.
+                                        */
+                                       if (tty_buffer_request_room(tty, 1) !=
+                                           0) {
+                                               tty_insert_flip_char(tty, data,
+                                                                    TTY_FRAME);
+                                       }
+                                       /* These two conditions may imply */
+                                       /* a normal read should be done. */
+                                       /* else if(data & CyTIMEOUT) */
+                                       /* else if(data & CySPECHAR) */
+                               } else {
+                                       tty_insert_flip_char(tty, 0,
+                                                            TTY_NORMAL);
+                               }
+                       } else {
+                               tty_insert_flip_char(tty, data, TTY_NORMAL);
+                       }
+               } else {
+                       /* there was a software buffer overrun
+                          and nothing could be done about it!!! */
+               }
+       }
+       tty_schedule_flip(tty);
+       /* end of service */
        base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
        return IRQ_HANDLED;
-    }
-    else { /* there is an open port for this data */
-       tty = info->tty;
-       if(err & info->ignore_status_mask){
-           base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
-           return IRQ_HANDLED;
-       }
-       if (tty_buffer_request_room(tty, 1) != 0){
-           if (err & info->read_status_mask){
-               if(err & CyBREAK){
-                   tty_insert_flip_char(tty, data, TTY_BREAK);
-                   if (info->flags & ASYNC_SAK){
-                       do_SAK(tty);
-                   }
-               }else if(err & CyFRAME){
-                   tty_insert_flip_char(tty, data, TTY_FRAME);
-               }else if(err & CyPARITY){
-                   tty_insert_flip_char(tty, data, TTY_PARITY);
-               }else if(err & CyOVERRUN){
-                   tty_insert_flip_char(tty, 0, TTY_OVERRUN);
-                   /*
-                      If the flip buffer itself is
-                      overflowing, we still loose
-                      the next incoming character.
-                    */
-                   if (tty_buffer_request_room(tty, 1) != 0){
-                       tty_insert_flip_char(tty, data, TTY_FRAME);
-                   }
-               /* These two conditions may imply */
-               /* a normal read should be done. */
-               /* else if(data & CyTIMEOUT) */
-               /* else if(data & CySPECHAR) */
-               }else{
-                   tty_insert_flip_char(tty, 0, TTY_NORMAL);
-               }
-           }else{
-               tty_insert_flip_char(tty, data, TTY_NORMAL);
-           }
-       }else{
-           /* there was a software buffer overrun
-              and nothing could be done about it!!! */
-       }
-    }
-    tty_schedule_flip(tty);
-    /* end of service */
-    base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS;
-    return IRQ_HANDLED;
-} /* cy_rxerr_interrupt */
-
-static irqreturn_t
-cd2401_modem_interrupt(int irq, void *dev_id)
+}                              /* cy_rxerr_interrupt */
+
+static irqreturn_t cd2401_modem_interrupt(int irq, void *dev_id)
 {
-    struct cyclades_port *info;
-    volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
-    int channel;
-    int mdm_change;
-    int mdm_status;
-
-
-    /* determine the channel and change to that context */
-    channel = (u_short ) (base_addr[CyLICR] >> 2);
-    info = &cy_port[channel];
-    info->last_active = jiffies;
-
-    mdm_change = base_addr[CyMISR];
-    mdm_status = base_addr[CyMSVR1];
-
-    if(info->tty == 0){ /* nowhere to put the data, ignore it */
-       ;
-    }else{
-       if((mdm_change & CyDCD)
-       && (info->flags & ASYNC_CHECK_CD)){
-           if(mdm_status & CyDCD){
+       struct cyclades_port *info;
+       volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
+       int channel;
+       int mdm_change;
+       int mdm_status;
+
+       /* determine the channel and change to that context */
+       channel = (u_short) (base_addr[CyLICR] >> 2);
+       info = &cy_port[channel];
+       info->last_active = jiffies;
+
+       mdm_change = base_addr[CyMISR];
+       mdm_status = base_addr[CyMSVR1];
+
+       if (info->tty == 0) {   /* nowhere to put the data, ignore it */
+               ;
+       } else {
+               if ((mdm_change & CyDCD)
+                   && (info->flags & ASYNC_CHECK_CD)) {
+                       if (mdm_status & CyDCD) {
 /* CP('!'); */
-               cy_sched_event(info, Cy_EVENT_OPEN_WAKEUP);
-           } else {
+                               cy_sched_event(info, Cy_EVENT_OPEN_WAKEUP);
+                       } else {
 /* CP('@'); */
-               cy_sched_event(info, Cy_EVENT_HANGUP);
-           }
-       }
-       if((mdm_change & CyCTS)
-       && (info->flags & ASYNC_CTS_FLOW)){
-           if(info->tty->stopped){
-               if(mdm_status & CyCTS){
-                   /* !!! cy_start isn't used because... */
-                   info->tty->stopped = 0;
-                   base_addr[CyIER] |= CyTxMpty;
-                   cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP);
+                               cy_sched_event(info, Cy_EVENT_HANGUP);
+                       }
                }
-           }else{
-               if(!(mdm_status & CyCTS)){
-                   /* !!! cy_stop isn't used because... */
-                   info->tty->stopped = 1;
-                   base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy);
+               if ((mdm_change & CyCTS)
+                   && (info->flags & ASYNC_CTS_FLOW)) {
+                       if (info->tty->stopped) {
+                               if (mdm_status & CyCTS) {
+                                       /* !!! cy_start isn't used because... */
+                                       info->tty->stopped = 0;
+                                       base_addr[CyIER] |= CyTxMpty;
+                                       cy_sched_event(info,
+                                                      Cy_EVENT_WRITE_WAKEUP);
+                               }
+                       } else {
+                               if (!(mdm_status & CyCTS)) {
+                                       /* !!! cy_stop isn't used because... */
+                                       info->tty->stopped = 1;
+                                       base_addr[CyIER] &=
+                                           ~(CyTxMpty | CyTxRdy);
+                               }
+                       }
+               }
+               if (mdm_status & CyDSR) {
                }
-           }
-       }
-       if(mdm_status & CyDSR){
        }
-    }
-    base_addr[CyMEOIR] = 0;
-    return IRQ_HANDLED;
-} /* cy_modem_interrupt */
+       base_addr[CyMEOIR] = 0;
+       return IRQ_HANDLED;
+}                              /* cy_modem_interrupt */
 
-static irqreturn_t
-cd2401_tx_interrupt(int irq, void *dev_id)
+static irqreturn_t cd2401_tx_interrupt(int irq, void *dev_id)
 {
-    struct cyclades_port *info;
-    volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
-    int channel;
-    int char_count, saved_cnt;
-    int outch;
+       struct cyclades_port *info;
+       volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
+       int channel;
+       int char_count, saved_cnt;
+       int outch;
 
-    /* determine the channel and change to that context */
-    channel = (u_short ) (base_addr[CyLICR] >> 2);
+       /* determine the channel and change to that context */
+       channel = (u_short) (base_addr[CyLICR] >> 2);
 
 #ifdef CONFIG_REMOTE_DEBUG
-    if (channel == DEBUG_PORT) {
-       panic ("TxInt on debug port!!!");
-    }
+       if (channel == DEBUG_PORT) {
+               panic("TxInt on debug port!!!");
+       }
 #endif
 
-    info = &cy_port[channel];
+       info = &cy_port[channel];
 
-    /* validate the port number (as configured and open) */
-    if( (channel < 0) || (NR_PORTS <= channel) ){
-       base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy);
-       base_addr[CyTEOIR] = CyNOTRANS;
-       return IRQ_HANDLED;
-    }
-    info->last_active = jiffies;
-    if(info->tty == 0){
-       base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy);
-        if (info->xmit_cnt < WAKEUP_CHARS) {
-           cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP);
-        }
-       base_addr[CyTEOIR] = CyNOTRANS;
-       return IRQ_HANDLED;
-    }
-
-    /* load the on-chip space available for outbound data */
-    saved_cnt = char_count = base_addr[CyTFTC];
-
-    if(info->x_char) { /* send special char */
-       outch = info->x_char;
-       base_addr[CyTDR] = outch;
-       char_count--;
-       info->x_char = 0;
-    }
-
-    if (info->x_break){
-       /*  The Cirrus chip requires the "Embedded Transmit
-           Commands" of start break, delay, and end break
-           sequences to be sent.  The duration of the
-           break is given in TICs, which runs at HZ
-           (typically 100) and the PPR runs at 200 Hz,
-           so the delay is duration * 200/HZ, and thus a
-           break can run from 1/100 sec to about 5/4 sec.
-           Need to check these values - RGH 141095.
-        */
-       base_addr[CyTDR] = 0; /* start break */
-       base_addr[CyTDR] = 0x81;
-       base_addr[CyTDR] = 0; /* delay a bit */
-       base_addr[CyTDR] = 0x82;
-       base_addr[CyTDR] = info->x_break*200/HZ;
-       base_addr[CyTDR] = 0; /* terminate break */
-       base_addr[CyTDR] = 0x83;
-       char_count -= 7;
-       info->x_break = 0;
-    }
-
-    while (char_count > 0){
-       if (!info->xmit_cnt){
-           base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy);
-           break;
-       }
-       if (info->xmit_buf == 0){
-           base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy);
-           break;
-       }
-       if (info->tty->stopped || info->tty->hw_stopped){
-           base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy);
-           break;
-       }
-       /* Because the Embedded Transmit Commands have been
-          enabled, we must check to see if the escape
-          character, NULL, is being sent.  If it is, we
-          must ensure that there is room for it to be
-          doubled in the output stream.  Therefore we
-          no longer advance the pointer when the character
-          is fetched, but rather wait until after the check
-          for a NULL output character. (This is necessary
-          because there may not be room for the two chars
-          needed to send a NULL.
-        */
-       outch = info->xmit_buf[info->xmit_tail];
-       if( outch ){
-           info->xmit_cnt--;
-           info->xmit_tail = (info->xmit_tail + 1)
-                                     & (PAGE_SIZE - 1);
-           base_addr[CyTDR] = outch;
-           char_count--;
-       }else{
-           if(char_count > 1){
-               info->xmit_cnt--;
-               info->xmit_tail = (info->xmit_tail + 1)
-                                         & (PAGE_SIZE - 1);
+       /* validate the port number (as configured and open) */
+       if ((channel < 0) || (NR_PORTS <= channel)) {
+               base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy);
+               base_addr[CyTEOIR] = CyNOTRANS;
+               return IRQ_HANDLED;
+       }
+       info->last_active = jiffies;
+       if (info->tty == 0) {
+               base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy);
+               if (info->xmit_cnt < WAKEUP_CHARS) {
+                       cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP);
+               }
+               base_addr[CyTEOIR] = CyNOTRANS;
+               return IRQ_HANDLED;
+       }
+
+       /* load the on-chip space available for outbound data */
+       saved_cnt = char_count = base_addr[CyTFTC];
+
+       if (info->x_char) {     /* send special char */
+               outch = info->x_char;
                base_addr[CyTDR] = outch;
-               base_addr[CyTDR] = 0;
                char_count--;
-               char_count--;
-           }else{
-               break;
-           }
+               info->x_char = 0;
        }
-    }
 
-    if (info->xmit_cnt < WAKEUP_CHARS) {
-       cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP);
-    }
-    base_addr[CyTEOIR] = (char_count != saved_cnt) ? 0 : CyNOTRANS;
-    return IRQ_HANDLED;
-} /* cy_tx_interrupt */
+       if (info->x_break) {
+               /*  The Cirrus chip requires the "Embedded Transmit
+                  Commands" of start break, delay, and end break
+                  sequences to be sent.  The duration of the
+                  break is given in TICs, which runs at HZ
+                  (typically 100) and the PPR runs at 200 Hz,
+                  so the delay is duration * 200/HZ, and thus a
+                  break can run from 1/100 sec to about 5/4 sec.
+                  Need to check these values - RGH 141095.
+                */
+               base_addr[CyTDR] = 0;   /* start break */
+               base_addr[CyTDR] = 0x81;
+               base_addr[CyTDR] = 0;   /* delay a bit */
+               base_addr[CyTDR] = 0x82;
+               base_addr[CyTDR] = info->x_break * 200 / HZ;
+               base_addr[CyTDR] = 0;   /* terminate break */
+               base_addr[CyTDR] = 0x83;
+               char_count -= 7;
+               info->x_break = 0;
+       }
+
+       while (char_count > 0) {
+               if (!info->xmit_cnt) {
+                       base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy);
+                       break;
+               }
+               if (info->xmit_buf == 0) {
+                       base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy);
+                       break;
+               }
+               if (info->tty->stopped || info->tty->hw_stopped) {
+                       base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy);
+                       break;
+               }
+               /* Because the Embedded Transmit Commands have been
+                  enabled, we must check to see if the escape
+                  character, NULL, is being sent.  If it is, we
+                  must ensure that there is room for it to be
+                  doubled in the output stream.  Therefore we
+                  no longer advance the pointer when the character
+                  is fetched, but rather wait until after the check
+                  for a NULL output character. (This is necessary
+                  because there may not be room for the two chars
+                  needed to send a NULL.
+                */
+               outch = info->xmit_buf[info->xmit_tail];
+               if (outch) {
+                       info->xmit_cnt--;
+                       info->xmit_tail = (info->xmit_tail + 1)
+                           & (PAGE_SIZE - 1);
+                       base_addr[CyTDR] = outch;
+                       char_count--;
+               } else {
+                       if (char_count > 1) {
+                               info->xmit_cnt--;
+                               info->xmit_tail = (info->xmit_tail + 1)
+                                   & (PAGE_SIZE - 1);
+                               base_addr[CyTDR] = outch;
+                               base_addr[CyTDR] = 0;
+                               char_count--;
+                               char_count--;
+                       } else {
+                               break;
+                       }
+               }
+       }
+
+       if (info->xmit_cnt < WAKEUP_CHARS) {
+               cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP);
+       }
+       base_addr[CyTEOIR] = (char_count != saved_cnt) ? 0 : CyNOTRANS;
+       return IRQ_HANDLED;
+}                              /* cy_tx_interrupt */
 
-static irqreturn_t
-cd2401_rx_interrupt(int irq, void *dev_id)
+static irqreturn_t cd2401_rx_interrupt(int irq, void *dev_id)
 {
-    struct tty_struct *tty;
-    struct cyclades_port *info;
-    volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
-    int channel;
-    char data;
-    int char_count;
-    int save_cnt;
-    int len;
-
-    /* determine the channel and change to that context */
-    channel = (u_short ) (base_addr[CyLICR] >> 2);
-    info = &cy_port[channel];
-    info->last_active = jiffies;
-    save_cnt = char_count = base_addr[CyRFOC];
+       struct tty_struct *tty;
+       struct cyclades_port *info;
+       volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
+       int channel;
+       char data;
+       int char_count;
+       int save_cnt;
+       int len;
+
+       /* determine the channel and change to that context */
+       channel = (u_short) (base_addr[CyLICR] >> 2);
+       info = &cy_port[channel];
+       info->last_active = jiffies;
+       save_cnt = char_count = base_addr[CyRFOC];
 
 #ifdef CONFIG_REMOTE_DEBUG
-    if (channel == DEBUG_PORT) {
-       while (char_count--) {
-            data = base_addr[CyRDR];
-           queueDebugChar(data);
-       }
-    }
-    else
+       if (channel == DEBUG_PORT) {
+               while (char_count--) {
+                       data = base_addr[CyRDR];
+                       queueDebugChar(data);
+               }
+       } else
 #endif
-    /* if there is nowhere to put the data, discard it */
-    if(info->tty == 0){
-       while(char_count--){
-           data = base_addr[CyRDR];
-       }
-    }else{ /* there is an open port for this data */
-       tty = info->tty;
-       /* load # characters available from the chip */
+               /* if there is nowhere to put the data, discard it */
+       if (info->tty == 0) {
+               while (char_count--) {
+                       data = base_addr[CyRDR];
+               }
+       } else {                /* there is an open port for this data */
+               tty = info->tty;
+               /* load # characters available from the chip */
 
 #ifdef CYCLOM_ENABLE_MONITORING
-       ++info->mon.int_count;
-       info->mon.char_count += char_count;
-       if (char_count > info->mon.char_max)
-           info->mon.char_max = char_count;
-       info->mon.char_last = char_count;
-#endif
-       len = tty_buffer_request_room(tty, char_count);
-       while(len--){
-           data = base_addr[CyRDR];
-           tty_insert_flip_char(tty, data, TTY_NORMAL);
+               ++info->mon.int_count;
+               info->mon.char_count += char_count;
+               if (char_count > info->mon.char_max)
+                       info->mon.char_max = char_count;
+               info->mon.char_last = char_count;
+#endif
+               len = tty_buffer_request_room(tty, char_count);
+               while (len--) {
+                       data = base_addr[CyRDR];
+                       tty_insert_flip_char(tty, data, TTY_NORMAL);
 #ifdef CYCLOM_16Y_HACK
-           udelay(10L);
+                       udelay(10L);
 #endif
-        }
-       tty_schedule_flip(tty);
-    }
-    /* end of service */
-    base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS;
-    return IRQ_HANDLED;
-} /* cy_rx_interrupt */
+               }
+               tty_schedule_flip(tty);
+       }
+       /* end of service */
+       base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS;
+       return IRQ_HANDLED;
+}                              /* cy_rx_interrupt */
 
 /*
  * This routine is used to handle the "bottom half" processing for the
@@ -705,192 +712,188 @@ cd2401_rx_interrupt(int irq, void *dev_id)
  * structure) to the bottom half of the driver.  Previous kernels
  * had to poll every port to see if that port needed servicing.
  */
-static void
-do_softint(struct work_struct *ugly_api)
+static void do_softint(struct work_struct *ugly_api)
 {
-  struct cyclades_port *info = container_of(ugly_api, struct cyclades_port, tqueue);
-  struct tty_struct    *tty;
-
-    tty = info->tty;
-    if (!tty)
-       return;
+       struct cyclades_port *info =
+           container_of(ugly_api, struct cyclades_port, tqueue);
+       struct tty_struct *tty;
 
-    if (test_and_clear_bit(Cy_EVENT_HANGUP, &info->event)) {
-       tty_hangup(info->tty);
-       wake_up_interruptible(&info->open_wait);
-       info->flags &= ~ASYNC_NORMAL_ACTIVE;
-    }
-    if (test_and_clear_bit(Cy_EVENT_OPEN_WAKEUP, &info->event)) {
-       wake_up_interruptible(&info->open_wait);
-    }
-    if (test_and_clear_bit(Cy_EVENT_WRITE_WAKEUP, &info->event)) {
-       tty_wakeup(tty);
-    }
-} /* do_softint */
+       tty = info->tty;
+       if (!tty)
+               return;
 
+       if (test_and_clear_bit(Cy_EVENT_HANGUP, &info->event)) {
+               tty_hangup(info->tty);
+               wake_up_interruptible(&info->open_wait);
+               info->flags &= ~ASYNC_NORMAL_ACTIVE;
+       }
+       if (test_and_clear_bit(Cy_EVENT_OPEN_WAKEUP, &info->event)) {
+               wake_up_interruptible(&info->open_wait);
+       }
+       if (test_and_clear_bit(Cy_EVENT_WRITE_WAKEUP, &info->event)) {
+               tty_wakeup(tty);
+       }
+}                              /* do_softint */
 
 /* This is called whenever a port becomes active;
    interrupts are enabled and DTR & RTS are turned on.
  */
-static int
-startup(struct cyclades_port * info)
+static int startup(struct cyclades_port *info)
 {
-  unsigned long flags;
-  volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
-  int channel;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR;
+       int channel;
 
-    if (info->flags & ASYNC_INITIALIZED){
-       return 0;
-    }
+       if (info->flags & ASYNC_INITIALIZED) {
+               return 0;
+       }
 
-    if (!info->type){
-       if (info->tty){
-           set_bit(TTY_IO_ERROR, &info->tty->flags);
+       if (!info->type) {
+               if (info->tty) {
+                       set_bit(TTY_IO_ERROR, &info->tty->flags);
+               }
+               return 0;
        }
-       return 0;
-    }
-    if (!info->xmit_buf){
-       info->xmit_buf = (unsigned char *) get_zeroed_page (GFP_KERNEL);
-       if (!info->xmit_buf){
-           return -ENOMEM;
+       if (!info->xmit_buf) {
+               info->xmit_buf = (unsigned char *)get_zeroed_page(GFP_KERNEL);
+               if (!info->xmit_buf) {
+                       return -ENOMEM;
+               }
        }
-    }
 
-    config_setup(info);
+       config_setup(info);
 
-    channel = info->line;
+       channel = info->line;
 
 #ifdef SERIAL_DEBUG_OPEN
-    printk("startup channel %d\n", channel);
+       printk("startup channel %d\n", channel);
 #endif
 
-    local_irq_save(flags);
-       base_addr[CyCAR] = (u_char)channel;
-       write_cy_cmd(base_addr,CyENB_RCVR|CyENB_XMTR);
+       local_irq_save(flags);
+       base_addr[CyCAR] = (u_char) channel;
+       write_cy_cmd(base_addr, CyENB_RCVR | CyENB_XMTR);
 
-       base_addr[CyCAR] = (u_char)channel; /* !!! Is this needed? */
+       base_addr[CyCAR] = (u_char) channel;    /* !!! Is this needed? */
        base_addr[CyMSVR1] = CyRTS;
 /* CP('S');CP('1'); */
        base_addr[CyMSVR2] = CyDTR;
 
 #ifdef SERIAL_DEBUG_DTR
-        printk("cyc: %d: raising DTR\n", __LINE__);
-        printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]);
+       printk("cyc: %d: raising DTR\n", __LINE__);
+       printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1],
+              base_addr[CyMSVR2]);
 #endif
 
        base_addr[CyIER] |= CyRxData;
        info->flags |= ASYNC_INITIALIZED;
 
-       if (info->tty){
-           clear_bit(TTY_IO_ERROR, &info->tty->flags);
+       if (info->tty) {
+               clear_bit(TTY_IO_ERROR, &info->tty->flags);
        }
        info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
 
-    local_irq_restore(flags);
+       local_irq_restore(flags);
 
 #ifdef SERIAL_DEBUG_OPEN
-    printk(" done\n");
+       printk(" done\n");
 #endif
-    return 0;
-} /* startup */
+       return 0;
+}                              /* startup */
 
-void
-start_xmit( struct cyclades_port *info )
+void start_xmit(struct cyclades_port *info)
 {
-  unsigned long flags;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int channel;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
 
-    channel = info->line;
-    local_irq_save(flags);
+       channel = info->line;
+       local_irq_save(flags);
        base_addr[CyCAR] = channel;
        base_addr[CyIER] |= CyTxMpty;
-    local_irq_restore(flags);
-} /* start_xmit */
+       local_irq_restore(flags);
+}                              /* start_xmit */
 
 /*
  * This routine shuts down a serial port; interrupts are disabled,
  * and DTR is dropped if the hangup on close termio flag is on.
  */
-static void
-shutdown(struct cyclades_port * info)
+static void shutdown(struct cyclades_port *info)
 {
-  unsigned long flags;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int channel;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
 
-    if (!(info->flags & ASYNC_INITIALIZED)){
+       if (!(info->flags & ASYNC_INITIALIZED)) {
 /* CP('$'); */
-       return;
-    }
+               return;
+       }
 
-    channel = info->line;
+       channel = info->line;
 
 #ifdef SERIAL_DEBUG_OPEN
-    printk("shutdown channel %d\n", channel);
+       printk("shutdown channel %d\n", channel);
 #endif
 
-    /* !!! REALLY MUST WAIT FOR LAST CHARACTER TO BE
-       SENT BEFORE DROPPING THE LINE !!!  (Perhaps
-       set some flag that is read when XMTY happens.)
-       Other choices are to delay some fixed interval
-       or schedule some later processing.
-     */
-    local_irq_save(flags);
-       if (info->xmit_buf){
-           free_page((unsigned long) info->xmit_buf);
-           info->xmit_buf = NULL;
+       /* !!! REALLY MUST WAIT FOR LAST CHARACTER TO BE
+          SENT BEFORE DROPPING THE LINE !!!  (Perhaps
+          set some flag that is read when XMTY happens.)
+          Other choices are to delay some fixed interval
+          or schedule some later processing.
+        */
+       local_irq_save(flags);
+       if (info->xmit_buf) {
+               free_page((unsigned long)info->xmit_buf);
+               info->xmit_buf = NULL;
        }
 
-       base_addr[CyCAR] = (u_char)channel;
+       base_addr[CyCAR] = (u_char) channel;
        if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) {
-           base_addr[CyMSVR1] = 0;
+               base_addr[CyMSVR1] = 0;
 /* CP('C');CP('1'); */
-           base_addr[CyMSVR2] = 0;
+               base_addr[CyMSVR2] = 0;
 #ifdef SERIAL_DEBUG_DTR
-            printk("cyc: %d: dropping DTR\n", __LINE__);
-            printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]);
+               printk("cyc: %d: dropping DTR\n", __LINE__);
+               printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1],
+                      base_addr[CyMSVR2]);
 #endif
-        }
-       write_cy_cmd(base_addr,CyDIS_RCVR);
-         /* it may be appropriate to clear _XMIT at
-           some later date (after testing)!!! */
+       }
+       write_cy_cmd(base_addr, CyDIS_RCVR);
+       /* it may be appropriate to clear _XMIT at
+          some later date (after testing)!!! */
 
-       if (info->tty){
-           set_bit(TTY_IO_ERROR, &info->tty->flags);
+       if (info->tty) {
+               set_bit(TTY_IO_ERROR, &info->tty->flags);
        }
        info->flags &= ~ASYNC_INITIALIZED;
-    local_irq_restore(flags);
+       local_irq_restore(flags);
 
 #ifdef SERIAL_DEBUG_OPEN
-    printk(" done\n");
+       printk(" done\n");
 #endif
-    return;
-} /* shutdown */
+}                              /* shutdown */
 
 /*
  * This routine finds or computes the various line characteristics.
  */
-static void
-config_setup(struct cyclades_port * info)
+static void config_setup(struct cyclades_port *info)
 {
-  unsigned long flags;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int channel;
-  unsigned cflag;
-  int   i;
-  unsigned char ti, need_init_chan = 0;
-
-    if (!info->tty || !info->tty->termios){
-        return;
-    }
-    if (info->line == -1){
-        return;
-    }
-    cflag = info->tty->termios->c_cflag;
-
-    /* baud rate */
-    i = cflag & CBAUD;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
+       unsigned cflag;
+       int i;
+       unsigned char ti, need_init_chan = 0;
+
+       if (!info->tty || !info->tty->termios) {
+               return;
+       }
+       if (info->line == -1) {
+               return;
+       }
+       cflag = info->tty->termios->c_cflag;
+
+       /* baud rate */
+       i = cflag & CBAUD;
 #ifdef CBAUDEX
 /* Starting with kernel 1.1.65, there is direct support for
    higher baud rates.  The following code supports those
@@ -900,120 +903,123 @@ config_setup(struct cyclades_port * info)
    is still the possibility of supporting 75 kbit/sec with
    the Cyclades board.)
  */
-    if (i & CBAUDEX) {
-       if (i == B57600)
-           i = 16;
-       else if(i == B115200) 
-           i = 18;
+       if (i & CBAUDEX) {
+               if (i == B57600)
+                       i = 16;
+               else if (i == B115200)
+                       i = 18;
 #ifdef B78600
-       else if(i == B78600) 
-           i = 17;
+               else if (i == B78600)
+                       i = 17;
 #endif
-       else
-           info->tty->termios->c_cflag &= ~CBAUDEX;
-    }
-#endif
-    if (i == 15) {
-           if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
-                   i += 1;
-           if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
-                   i += 3;
-    }
-    /* Don't ever change the speed of the console port.  It will
-     * run at the speed specified in bootinfo, or at 19.2K */
-    /* Actually, it should run at whatever speed 166Bug was using */
-    /* Note info->timeout isn't used at present */
-    if (info != serial_console_info) {
-       info->tbpr = baud_bpr[i]; /* Tx BPR */
-       info->tco = baud_co[i]; /* Tx CO */
-       info->rbpr = baud_bpr[i]; /* Rx BPR */
-       info->rco = baud_co[i] >> 5; /* Rx CO */
-       if (baud_table[i] == 134) {
-            info->timeout = (info->xmit_fifo_size*HZ*30/269) + 2;
-            /* get it right for 134.5 baud */
-       } else if (baud_table[i]) {
-            info->timeout = (info->xmit_fifo_size*HZ*15/baud_table[i]) + 2;
-        /* this needs to be propagated into the card info */
+               else
+                       info->tty->termios->c_cflag &= ~CBAUDEX;
+       }
+#endif
+       if (i == 15) {
+               if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
+                       i += 1;
+               if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
+                       i += 3;
+       }
+       /* Don't ever change the speed of the console port.  It will
+        * run at the speed specified in bootinfo, or at 19.2K */
+       /* Actually, it should run at whatever speed 166Bug was using */
+       /* Note info->timeout isn't used at present */
+       if (info != serial_console_info) {
+               info->tbpr = baud_bpr[i];       /* Tx BPR */
+               info->tco = baud_co[i]; /* Tx CO */
+               info->rbpr = baud_bpr[i];       /* Rx BPR */
+               info->rco = baud_co[i] >> 5;    /* Rx CO */
+               if (baud_table[i] == 134) {
+                       info->timeout =
+                           (info->xmit_fifo_size * HZ * 30 / 269) + 2;
+                       /* get it right for 134.5 baud */
+               } else if (baud_table[i]) {
+                       info->timeout =
+                           (info->xmit_fifo_size * HZ * 15 / baud_table[i]) +
+                           2;
+                       /* this needs to be propagated into the card info */
+               } else {
+                       info->timeout = 0;
+               }
+       }
+       /* By tradition (is it a standard?) a baud rate of zero
+          implies the line should be/has been closed.  A bit
+          later in this routine such a test is performed. */
+
+       /* byte size and parity */
+       info->cor7 = 0;
+       info->cor6 = 0;
+       info->cor5 = 0;
+       info->cor4 = (info->default_threshold ? info->default_threshold : baud_cor4[i]);        /* receive threshold */
+       /* Following two lines added 101295, RGH. */
+       /* It is obviously wrong to access CyCORx, and not info->corx here,
+        * try and remember to fix it later! */
+       channel = info->line;
+       base_addr[CyCAR] = (u_char) channel;
+       if (C_CLOCAL(info->tty)) {
+               if (base_addr[CyIER] & CyMdmCh)
+                       base_addr[CyIER] &= ~CyMdmCh;   /* without modem intr */
+               /* ignore 1->0 modem transitions */
+               if (base_addr[CyCOR4] & (CyDSR | CyCTS | CyDCD))
+                       base_addr[CyCOR4] &= ~(CyDSR | CyCTS | CyDCD);
+               /* ignore 0->1 modem transitions */
+               if (base_addr[CyCOR5] & (CyDSR | CyCTS | CyDCD))
+                       base_addr[CyCOR5] &= ~(CyDSR | CyCTS | CyDCD);
        } else {
-            info->timeout = 0;
-       }
-    }
-    /* By tradition (is it a standard?) a baud rate of zero
-       implies the line should be/has been closed.  A bit
-       later in this routine such a test is performed. */
-
-    /* byte size and parity */
-    info->cor7 = 0;
-    info->cor6 = 0;
-    info->cor5 = 0;
-    info->cor4 = (info->default_threshold
-                 ? info->default_threshold
-                 : baud_cor4[i]); /* receive threshold */
-    /* Following two lines added 101295, RGH. */
-    /* It is obviously wrong to access CyCORx, and not info->corx here,
-     * try and remember to fix it later! */
-    channel = info->line;
-    base_addr[CyCAR] = (u_char)channel;
-    if (C_CLOCAL(info->tty)) {
-       if (base_addr[CyIER] & CyMdmCh)
-           base_addr[CyIER] &= ~CyMdmCh; /* without modem intr */
-                              /* ignore 1->0 modem transitions */
-       if (base_addr[CyCOR4] & (CyDSR|CyCTS|CyDCD))
-           base_addr[CyCOR4] &= ~(CyDSR|CyCTS|CyDCD);
-                              /* ignore 0->1 modem transitions */
-       if (base_addr[CyCOR5] & (CyDSR|CyCTS|CyDCD))
-           base_addr[CyCOR5] &= ~(CyDSR|CyCTS|CyDCD);
-    } else {
-       if ((base_addr[CyIER] & CyMdmCh) != CyMdmCh)
-           base_addr[CyIER] |= CyMdmCh; /* with modem intr */
-                              /* act on 1->0 modem transitions */
-       if ((base_addr[CyCOR4] & (CyDSR|CyCTS|CyDCD)) != (CyDSR|CyCTS|CyDCD))
-           base_addr[CyCOR4] |= CyDSR|CyCTS|CyDCD;
-                              /* act on 0->1 modem transitions */
-       if ((base_addr[CyCOR5] & (CyDSR|CyCTS|CyDCD)) != (CyDSR|CyCTS|CyDCD))
-           base_addr[CyCOR5] |= CyDSR|CyCTS|CyDCD;
-    }
-    info->cor3 = (cflag & CSTOPB) ? Cy_2_STOP : Cy_1_STOP;
-    info->cor2 = CyETC;
-    switch(cflag & CSIZE){
-    case CS5:
-        info->cor1 = Cy_5_BITS;
-        break;
-    case CS6:
-        info->cor1 = Cy_6_BITS;
-        break;
-    case CS7:
-        info->cor1 = Cy_7_BITS;
-        break;
-    case CS8:
-        info->cor1 = Cy_8_BITS;
-        break;
-    }
-    if (cflag & PARENB){
-        if (cflag & PARODD){
-            info->cor1 |= CyPARITY_O;
-        }else{
-            info->cor1 |= CyPARITY_E;
-        }
-    }else{
-        info->cor1 |= CyPARITY_NONE;
-    }
-       
-    /* CTS flow control flag */
+               if ((base_addr[CyIER] & CyMdmCh) != CyMdmCh)
+                       base_addr[CyIER] |= CyMdmCh;    /* with modem intr */
+               /* act on 1->0 modem transitions */
+               if ((base_addr[CyCOR4] & (CyDSR | CyCTS | CyDCD)) !=
+                   (CyDSR | CyCTS | CyDCD))
+                       base_addr[CyCOR4] |= CyDSR | CyCTS | CyDCD;
+               /* act on 0->1 modem transitions */
+               if ((base_addr[CyCOR5] & (CyDSR | CyCTS | CyDCD)) !=
+                   (CyDSR | CyCTS | CyDCD))
+                       base_addr[CyCOR5] |= CyDSR | CyCTS | CyDCD;
+       }
+       info->cor3 = (cflag & CSTOPB) ? Cy_2_STOP : Cy_1_STOP;
+       info->cor2 = CyETC;
+       switch (cflag & CSIZE) {
+       case CS5:
+               info->cor1 = Cy_5_BITS;
+               break;
+       case CS6:
+               info->cor1 = Cy_6_BITS;
+               break;
+       case CS7:
+               info->cor1 = Cy_7_BITS;
+               break;
+       case CS8:
+               info->cor1 = Cy_8_BITS;
+               break;
+       }
+       if (cflag & PARENB) {
+               if (cflag & PARODD) {
+                       info->cor1 |= CyPARITY_O;
+               } else {
+                       info->cor1 |= CyPARITY_E;
+               }
+       } else {
+               info->cor1 |= CyPARITY_NONE;
+       }
+
+       /* CTS flow control flag */
 #if 0
-    /* Don't complcate matters for now! RGH 141095 */
-    if (cflag & CRTSCTS){
-       info->flags |= ASYNC_CTS_FLOW;
-       info->cor2 |= CyCtsAE;
-    }else{
-       info->flags &= ~ASYNC_CTS_FLOW;
-       info->cor2 &= ~CyCtsAE;
-    }
-#endif
-    if (cflag & CLOCAL)
-       info->flags &= ~ASYNC_CHECK_CD;
-    else
-       info->flags |= ASYNC_CHECK_CD;
+       /* Don't complcate matters for now! RGH 141095 */
+       if (cflag & CRTSCTS) {
+               info->flags |= ASYNC_CTS_FLOW;
+               info->cor2 |= CyCtsAE;
+       } else {
+               info->flags &= ~ASYNC_CTS_FLOW;
+               info->cor2 &= ~CyCtsAE;
+       }
+#endif
+       if (cflag & CLOCAL)
+               info->flags &= ~ASYNC_CHECK_CD;
+       else
+               info->flags |= ASYNC_CHECK_CD;
 
      /***********************************************
        The hardware option, CyRtsAO, presents RTS when
@@ -1025,149 +1031,146 @@ config_setup(struct cyclades_port * info)
        cable.  Contact Marcio Saito for details.
      ***********************************************/
 
-    channel = info->line;
+       channel = info->line;
 
-    local_irq_save(flags);
-       base_addr[CyCAR] = (u_char)channel;
+       local_irq_save(flags);
+       base_addr[CyCAR] = (u_char) channel;
 
        /* CyCMR set once only in mvme167_init_serial() */
        if (base_addr[CyLICR] != channel << 2)
-           base_addr[CyLICR] = channel << 2;
+               base_addr[CyLICR] = channel << 2;
        if (base_addr[CyLIVR] != 0x5c)
-           base_addr[CyLIVR] = 0x5c;
+               base_addr[CyLIVR] = 0x5c;
 
-       /* tx and rx baud rate */
+       /* tx and rx baud rate */
 
        if (base_addr[CyCOR1] != info->cor1)
-           need_init_chan = 1;
+               need_init_chan = 1;
        if (base_addr[CyTCOR] != info->tco)
-           base_addr[CyTCOR] = info->tco;
+               base_addr[CyTCOR] = info->tco;
        if (base_addr[CyTBPR] != info->tbpr)
-           base_addr[CyTBPR] = info->tbpr;
+               base_addr[CyTBPR] = info->tbpr;
        if (base_addr[CyRCOR] != info->rco)
-           base_addr[CyRCOR] = info->rco;
+               base_addr[CyRCOR] = info->rco;
        if (base_addr[CyRBPR] != info->rbpr)
-           base_addr[CyRBPR] = info->rbpr;
+               base_addr[CyRBPR] = info->rbpr;
 
        /* set line characteristics  according configuration */
 
        if (base_addr[CySCHR1] != START_CHAR(info->tty))
-           base_addr[CySCHR1] = START_CHAR(info->tty);
+               base_addr[CySCHR1] = START_CHAR(info->tty);
        if (base_addr[CySCHR2] != STOP_CHAR(info->tty))
-           base_addr[CySCHR2] = STOP_CHAR(info->tty);
+               base_addr[CySCHR2] = STOP_CHAR(info->tty);
        if (base_addr[CySCRL] != START_CHAR(info->tty))
-           base_addr[CySCRL] = START_CHAR(info->tty);
+               base_addr[CySCRL] = START_CHAR(info->tty);
        if (base_addr[CySCRH] != START_CHAR(info->tty))
-           base_addr[CySCRH] = START_CHAR(info->tty);
+               base_addr[CySCRH] = START_CHAR(info->tty);
        if (base_addr[CyCOR1] != info->cor1)
-           base_addr[CyCOR1] = info->cor1;
+               base_addr[CyCOR1] = info->cor1;
        if (base_addr[CyCOR2] != info->cor2)
-           base_addr[CyCOR2] = info->cor2;
+               base_addr[CyCOR2] = info->cor2;
        if (base_addr[CyCOR3] != info->cor3)
-           base_addr[CyCOR3] = info->cor3;
+               base_addr[CyCOR3] = info->cor3;
        if (base_addr[CyCOR4] != info->cor4)
-           base_addr[CyCOR4] = info->cor4;
+               base_addr[CyCOR4] = info->cor4;
        if (base_addr[CyCOR5] != info->cor5)
-           base_addr[CyCOR5] = info->cor5;
+               base_addr[CyCOR5] = info->cor5;
        if (base_addr[CyCOR6] != info->cor6)
-           base_addr[CyCOR6] = info->cor6;
+               base_addr[CyCOR6] = info->cor6;
        if (base_addr[CyCOR7] != info->cor7)
-           base_addr[CyCOR7] = info->cor7;
+               base_addr[CyCOR7] = info->cor7;
 
        if (need_init_chan)
-           write_cy_cmd(base_addr,CyINIT_CHAN);
+               write_cy_cmd(base_addr, CyINIT_CHAN);
 
-       base_addr[CyCAR] = (u_char)channel; /* !!! Is this needed? */
+       base_addr[CyCAR] = (u_char) channel;    /* !!! Is this needed? */
 
        /* 2ms default rx timeout */
        ti = info->default_timeout ? info->default_timeout : 0x02;
        if (base_addr[CyRTPRL] != ti)
-           base_addr[CyRTPRL] = ti;
+               base_addr[CyRTPRL] = ti;
        if (base_addr[CyRTPRH] != 0)
-           base_addr[CyRTPRH] = 0;
+               base_addr[CyRTPRH] = 0;
 
        /* Set up RTS here also ????? RGH 141095 */
-       if(i == 0){ /* baud rate is zero, turn off line */
-           if ((base_addr[CyMSVR2] & CyDTR) == CyDTR)
-               base_addr[CyMSVR2] = 0;
+       if (i == 0) {           /* baud rate is zero, turn off line */
+               if ((base_addr[CyMSVR2] & CyDTR) == CyDTR)
+                       base_addr[CyMSVR2] = 0;
 #ifdef SERIAL_DEBUG_DTR
-            printk("cyc: %d: dropping DTR\n", __LINE__);
-            printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]);
+               printk("cyc: %d: dropping DTR\n", __LINE__);
+               printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1],
+                      base_addr[CyMSVR2]);
 #endif
-       }else{
-           if ((base_addr[CyMSVR2] & CyDTR) != CyDTR)
-               base_addr[CyMSVR2] = CyDTR;
+       } else {
+               if ((base_addr[CyMSVR2] & CyDTR) != CyDTR)
+                       base_addr[CyMSVR2] = CyDTR;
 #ifdef SERIAL_DEBUG_DTR
-            printk("cyc: %d: raising DTR\n", __LINE__);
-            printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]);
+               printk("cyc: %d: raising DTR\n", __LINE__);
+               printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1],
+                      base_addr[CyMSVR2]);
 #endif
        }
 
-       if (info->tty){
-           clear_bit(TTY_IO_ERROR, &info->tty->flags);
+       if (info->tty) {
+               clear_bit(TTY_IO_ERROR, &info->tty->flags);
        }
 
-    local_irq_restore(flags);
-
-} /* config_setup */
+       local_irq_restore(flags);
 
+}                              /* config_setup */
 
-static void
-cy_put_char(struct tty_struct *tty, unsigned char ch)
+static void cy_put_char(struct tty_struct *tty, unsigned char ch)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  unsigned long flags;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       unsigned long flags;
 
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_put_char %s(0x%02x)\n", tty->name, ch);
+       printk("cy_put_char %s(0x%02x)\n", tty->name, ch);
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_put_char"))
-       return;
+       if (serial_paranoia_check(info, tty->name, "cy_put_char"))
+               return;
 
-    if (!info->xmit_buf)
-       return;
+       if (!info->xmit_buf)
+               return;
 
-    local_irq_save(flags);
+       local_irq_save(flags);
        if (info->xmit_cnt >= PAGE_SIZE - 1) {
-           local_irq_restore(flags);
-           return;
+               local_irq_restore(flags);
+               return;
        }
 
        info->xmit_buf[info->xmit_head++] = ch;
        info->xmit_head &= PAGE_SIZE - 1;
        info->xmit_cnt++;
-    local_irq_restore(flags);
-} /* cy_put_char */
-
+       local_irq_restore(flags);
+}                              /* cy_put_char */
 
-static void
-cy_flush_chars(struct tty_struct *tty)
+static void cy_flush_chars(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  unsigned long flags;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int channel;
-                               
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
+
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_flush_chars %s\n", tty->name); /* */
+       printk("cy_flush_chars %s\n", tty->name);       /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_flush_chars"))
-       return;
+       if (serial_paranoia_check(info, tty->name, "cy_flush_chars"))
+               return;
 
-    if (info->xmit_cnt <= 0 || tty->stopped
-    || tty->hw_stopped || !info->xmit_buf)
-       return;
+       if (info->xmit_cnt <= 0 || tty->stopped
+           || tty->hw_stopped || !info->xmit_buf)
+               return;
 
-    channel = info->line;
+       channel = info->line;
 
-    local_irq_save(flags);
+       local_irq_save(flags);
        base_addr[CyCAR] = channel;
        base_addr[CyIER] |= CyTxMpty;
-    local_irq_restore(flags);
-} /* cy_flush_chars */
-
+       local_irq_restore(flags);
+}                              /* cy_flush_chars */
 
 /* This routine gets called when tty_write has put something into
     the write_queue.  If the port is not already transmitting stuff,
@@ -1175,650 +1178,616 @@ cy_flush_chars(struct tty_struct *tty)
     routine will then ensure that the characters are sent.  If the
     port is already active, there is no need to kick it.
  */
-static int
-cy_write(struct tty_struct * tty,
-           const unsigned char *buf, int count)
+static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  unsigned long flags;
-  int c, total = 0;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       unsigned long flags;
+       int c, total = 0;
 
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_write %s\n", tty->name); /* */
+       printk("cy_write %s\n", tty->name);     /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_write")){
-       return 0;
-    }
-       
-    if (!info->xmit_buf){
-        return 0;
-    }
-
-    while (1) {
-           local_irq_save(flags);
-           c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
-                                     SERIAL_XMIT_SIZE - info->xmit_head));
-           if (c <= 0) {
-                   local_irq_restore(flags);
-                   break;
-           }
-
-           memcpy(info->xmit_buf + info->xmit_head, buf, c);
-           info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
-           info->xmit_cnt += c;
-           local_irq_restore(flags);
-
-           buf += c;
-           count -= c;
-           total += c;
-    }
-
-    if (info->xmit_cnt
-    && !tty->stopped
-    && !tty->hw_stopped ) {
-        start_xmit(info);
-    }
-    return total;
-} /* cy_write */
+       if (serial_paranoia_check(info, tty->name, "cy_write")) {
+               return 0;
+       }
 
+       if (!info->xmit_buf) {
+               return 0;
+       }
 
-static int
-cy_write_room(struct tty_struct *tty)
+       while (1) {
+               local_irq_save(flags);
+               c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
+                                         SERIAL_XMIT_SIZE - info->xmit_head));
+               if (c <= 0) {
+                       local_irq_restore(flags);
+                       break;
+               }
+
+               memcpy(info->xmit_buf + info->xmit_head, buf, c);
+               info->xmit_head =
+                   (info->xmit_head + c) & (SERIAL_XMIT_SIZE - 1);
+               info->xmit_cnt += c;
+               local_irq_restore(flags);
+
+               buf += c;
+               count -= c;
+               total += c;
+       }
+
+       if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped) {
+               start_xmit(info);
+       }
+       return total;
+}                              /* cy_write */
+
+static int cy_write_room(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  int  ret;
-                               
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       int ret;
+
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_write_room %s\n", tty->name); /* */
+       printk("cy_write_room %s\n", tty->name);        /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_write_room"))
-       return 0;
-    ret = PAGE_SIZE - info->xmit_cnt - 1;
-    if (ret < 0)
-       ret = 0;
-    return ret;
-} /* cy_write_room */
-
+       if (serial_paranoia_check(info, tty->name, "cy_write_room"))
+               return 0;
+       ret = PAGE_SIZE - info->xmit_cnt - 1;
+       if (ret < 0)
+               ret = 0;
+       return ret;
+}                              /* cy_write_room */
 
-static int
-cy_chars_in_buffer(struct tty_struct *tty)
+static int cy_chars_in_buffer(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-                               
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt); /* */
+       printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt);        /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer"))
-       return 0;
-
-    return info->xmit_cnt;
-} /* cy_chars_in_buffer */
+       if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer"))
+               return 0;
 
+       return info->xmit_cnt;
+}                              /* cy_chars_in_buffer */
 
-static void
-cy_flush_buffer(struct tty_struct *tty)
+static void cy_flush_buffer(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  unsigned long flags;
-                               
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       unsigned long flags;
+
 #ifdef SERIAL_DEBUG_IO
-    printk("cy_flush_buffer %s\n", tty->name); /* */
+       printk("cy_flush_buffer %s\n", tty->name);      /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_flush_buffer"))
-       return;
-    local_irq_save(flags);
+       if (serial_paranoia_check(info, tty->name, "cy_flush_buffer"))
+               return;
+       local_irq_save(flags);
        info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
-    local_irq_restore(flags);
-    tty_wakeup(tty);
-} /* cy_flush_buffer */
-
+       local_irq_restore(flags);
+       tty_wakeup(tty);
+}                              /* cy_flush_buffer */
 
 /* This routine is called by the upper-layer tty layer to signal
    that incoming characters should be throttled or that the
    throttle should be released.
  */
-static void
-cy_throttle(struct tty_struct * tty)
+static void cy_throttle(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  unsigned long flags;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int channel;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
 
 #ifdef SERIAL_DEBUG_THROTTLE
-  char buf[64];
-       
-    printk("throttle %s: %d....\n", tty_name(tty, buf),
-          tty->ldisc.chars_in_buffer(tty));
-    printk("cy_throttle %s\n", tty->name);
+       char buf[64];
+
+       printk("throttle %s: %d....\n", tty_name(tty, buf),
+              tty->ldisc.chars_in_buffer(tty));
+       printk("cy_throttle %s\n", tty->name);
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_nthrottle")){
-           return;
-    }
+       if (serial_paranoia_check(info, tty->name, "cy_nthrottle")) {
+               return;
+       }
 
-    if (I_IXOFF(tty)) {
-       info->x_char = STOP_CHAR(tty);
-           /* Should use the "Send Special Character" feature!!! */
-    }
+       if (I_IXOFF(tty)) {
+               info->x_char = STOP_CHAR(tty);
+               /* Should use the "Send Special Character" feature!!! */
+       }
 
-    channel = info->line;
+       channel = info->line;
 
-    local_irq_save(flags);
-       base_addr[CyCAR] = (u_char)channel;
+       local_irq_save(flags);
+       base_addr[CyCAR] = (u_char) channel;
        base_addr[CyMSVR1] = 0;
-    local_irq_restore(flags);
-
-    return;
-} /* cy_throttle */
-
+       local_irq_restore(flags);
+}                              /* cy_throttle */
 
-static void
-cy_unthrottle(struct tty_struct * tty)
+static void cy_unthrottle(struct tty_struct *tty)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
-  unsigned long flags;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int channel;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
 
 #ifdef SERIAL_DEBUG_THROTTLE
-  char buf[64];
-       
-    printk("throttle %s: %d....\n", tty_name(tty, buf),
-          tty->ldisc.chars_in_buffer(tty));
-    printk("cy_unthrottle %s\n", tty->name);
+       char buf[64];
+
+       printk("throttle %s: %d....\n", tty_name(tty, buf),
+              tty->ldisc.chars_in_buffer(tty));
+       printk("cy_unthrottle %s\n", tty->name);
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_nthrottle")){
-           return;
-    }
+       if (serial_paranoia_check(info, tty->name, "cy_nthrottle")) {
+               return;
+       }
 
-    if (I_IXOFF(tty)) {
-       info->x_char = START_CHAR(tty);
-       /* Should use the "Send Special Character" feature!!! */
-    }
+       if (I_IXOFF(tty)) {
+               info->x_char = START_CHAR(tty);
+               /* Should use the "Send Special Character" feature!!! */
+       }
 
-    channel = info->line;
+       channel = info->line;
 
-    local_irq_save(flags);
-       base_addr[CyCAR] = (u_char)channel;
+       local_irq_save(flags);
+       base_addr[CyCAR] = (u_char) channel;
        base_addr[CyMSVR1] = CyRTS;
-    local_irq_restore(flags);
-
-    return;
-} /* cy_unthrottle */
+       local_irq_restore(flags);
+}                              /* cy_unthrottle */
 
 static int
-get_serial_info(struct cyclades_port * info,
-                           struct serial_struct __user * retinfo)
+get_serial_info(struct cyclades_port *info,
+               struct serial_struct __user * retinfo)
 {
-  struct serial_struct tmp;
+       struct serial_struct tmp;
 
 /* CP('g'); */
-    if (!retinfo)
-            return -EFAULT;
-    memset(&tmp, 0, sizeof(tmp));
-    tmp.type = info->type;
-    tmp.line = info->line;
-    tmp.port = info->line;
-    tmp.irq = 0;
-    tmp.flags = info->flags;
-    tmp.baud_base = 0;          /*!!!*/
-    tmp.close_delay = info->close_delay;
-    tmp.custom_divisor = 0;     /*!!!*/
-    tmp.hub6 = 0;               /*!!!*/
-    return copy_to_user(retinfo,&tmp,sizeof(*retinfo)) ? -EFAULT : 0;
-} /* get_serial_info */
+       if (!retinfo)
+               return -EFAULT;
+       memset(&tmp, 0, sizeof(tmp));
+       tmp.type = info->type;
+       tmp.line = info->line;
+       tmp.port = info->line;
+       tmp.irq = 0;
+       tmp.flags = info->flags;
+       tmp.baud_base = 0;      /*!!! */
+       tmp.close_delay = info->close_delay;
+       tmp.custom_divisor = 0; /*!!! */
+       tmp.hub6 = 0;           /*!!! */
+       return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0;
+}                              /* get_serial_info */
 
 static int
-set_serial_info(struct cyclades_port * info,
-                           struct serial_struct __user * new_info)
+set_serial_info(struct cyclades_port *info,
+               struct serial_struct __user * new_info)
 {
-  struct serial_struct new_serial;
-  struct cyclades_port old_info;
+       struct serial_struct new_serial;
+       struct cyclades_port old_info;
 
 /* CP('s'); */
-    if (!new_info)
-           return -EFAULT;
-    if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
-           return -EFAULT;
-    old_info = *info;
+       if (!new_info)
+               return -EFAULT;
+       if (copy_from_user(&new_serial, new_info, sizeof(new_serial)))
+               return -EFAULT;
+       old_info = *info;
+
+       if (!capable(CAP_SYS_ADMIN)) {
+               if ((new_serial.close_delay != info->close_delay) ||
+                   ((new_serial.flags & ASYNC_FLAGS & ~ASYNC_USR_MASK) !=
+                    (info->flags & ASYNC_FLAGS & ~ASYNC_USR_MASK)))
+                       return -EPERM;
+               info->flags = ((info->flags & ~ASYNC_USR_MASK) |
+                              (new_serial.flags & ASYNC_USR_MASK));
+               goto check_and_exit;
+       }
 
-    if (!capable(CAP_SYS_ADMIN)) {
-           if ((new_serial.close_delay != info->close_delay) ||
-               ((new_serial.flags & ASYNC_FLAGS & ~ASYNC_USR_MASK) !=
-                (info->flags & ASYNC_FLAGS & ~ASYNC_USR_MASK)))
-                   return -EPERM;
-           info->flags = ((info->flags & ~ASYNC_USR_MASK) |
-                          (new_serial.flags & ASYNC_USR_MASK));
-           goto check_and_exit;
-    }
+       /*
+        * OK, past this point, all the error checking has been done.
+        * At this point, we start making changes.....
+        */
 
+       info->flags = ((info->flags & ~ASYNC_FLAGS) |
+                      (new_serial.flags & ASYNC_FLAGS));
+       info->close_delay = new_serial.close_delay;
 
-    /*
-     * OK, past this point, all the error checking has been done.
-     * At this point, we start making changes.....
-     */
+check_and_exit:
+       if (info->flags & ASYNC_INITIALIZED) {
+               config_setup(info);
+               return 0;
+       }
+       return startup(info);
+}                              /* set_serial_info */
 
-    info->flags = ((info->flags & ~ASYNC_FLAGS) |
-                   (new_serial.flags & ASYNC_FLAGS));
-    info->close_delay = new_serial.close_delay;
+static int cy_tiocmget(struct tty_struct *tty, struct file *file)
+{
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       int channel;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       unsigned long flags;
+       unsigned char status;
 
+       channel = info->line;
 
-check_and_exit:
-    if (info->flags & ASYNC_INITIALIZED){
-       config_setup(info);
-       return 0;
-    }else{
-        return startup(info);
-    }
-} /* set_serial_info */
+       local_irq_save(flags);
+       base_addr[CyCAR] = (u_char) channel;
+       status = base_addr[CyMSVR1] | base_addr[CyMSVR2];
+       local_irq_restore(flags);
 
-static int
-cy_tiocmget(struct tty_struct *tty, struct file *file)
-{
-  struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
-  int channel;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  unsigned long flags;
-  unsigned char status;
-
-    channel = info->line;
-
-    local_irq_save(flags);
-        base_addr[CyCAR] = (u_char)channel;
-        status = base_addr[CyMSVR1] | base_addr[CyMSVR2];
-    local_irq_restore(flags);
-
-    return    ((status  & CyRTS) ? TIOCM_RTS : 0)
-            | ((status  & CyDTR) ? TIOCM_DTR : 0)
-            | ((status  & CyDCD) ? TIOCM_CAR : 0)
-            | ((status  & CyDSR) ? TIOCM_DSR : 0)
-            | ((status  & CyCTS) ? TIOCM_CTS : 0);
-} /* cy_tiocmget */
+       return ((status & CyRTS) ? TIOCM_RTS : 0)
+           | ((status & CyDTR) ? TIOCM_DTR : 0)
+           | ((status & CyDCD) ? TIOCM_CAR : 0)
+           | ((status & CyDSR) ? TIOCM_DSR : 0)
+           | ((status & CyCTS) ? TIOCM_CTS : 0);
+}                              /* cy_tiocmget */
 
 static int
 cy_tiocmset(struct tty_struct *tty, struct file *file,
            unsigned int set, unsigned int clear)
 {
-  struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
-  int channel;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  unsigned long flags;
-         
-    channel = info->line;
-
-       if (set & TIOCM_RTS){
-           local_irq_save(flags);
-               base_addr[CyCAR] = (u_char)channel;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       int channel;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       unsigned long flags;
+
+       channel = info->line;
+
+       if (set & TIOCM_RTS) {
+               local_irq_save(flags);
+               base_addr[CyCAR] = (u_char) channel;
                base_addr[CyMSVR1] = CyRTS;
-           local_irq_restore(flags);
+               local_irq_restore(flags);
        }
-       if (set & TIOCM_DTR){
-           local_irq_save(flags);
-           base_addr[CyCAR] = (u_char)channel;
+       if (set & TIOCM_DTR) {
+               local_irq_save(flags);
+               base_addr[CyCAR] = (u_char) channel;
 /* CP('S');CP('2'); */
-           base_addr[CyMSVR2] = CyDTR;
+               base_addr[CyMSVR2] = CyDTR;
 #ifdef SERIAL_DEBUG_DTR
-            printk("cyc: %d: raising DTR\n", __LINE__);
-            printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]);
+               printk("cyc: %d: raising DTR\n", __LINE__);
+               printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1],
+                      base_addr[CyMSVR2]);
 #endif
-           local_irq_restore(flags);
+               local_irq_restore(flags);
        }
 
-       if (clear & TIOCM_RTS){
-           local_irq_save(flags);
-               base_addr[CyCAR] = (u_char)channel;
+       if (clear & TIOCM_RTS) {
+               local_irq_save(flags);
+               base_addr[CyCAR] = (u_char) channel;
                base_addr[CyMSVR1] = 0;
-           local_irq_restore(flags);
+               local_irq_restore(flags);
        }
-       if (clear & TIOCM_DTR){
-           local_irq_save(flags);
-           base_addr[CyCAR] = (u_char)channel;
+       if (clear & TIOCM_DTR) {
+               local_irq_save(flags);
+               base_addr[CyCAR] = (u_char) channel;
 /* CP('C');CP('2'); */
-           base_addr[CyMSVR2] = 0;
+               base_addr[CyMSVR2] = 0;
 #ifdef SERIAL_DEBUG_DTR
-            printk("cyc: %d: dropping DTR\n", __LINE__);
-            printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]);
+               printk("cyc: %d: dropping DTR\n", __LINE__);
+               printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1],
+                      base_addr[CyMSVR2]);
 #endif
-           local_irq_restore(flags);
+               local_irq_restore(flags);
        }
 
-    return 0;
-} /* set_modem_info */
-
-static void
-send_break( struct cyclades_port * info, int duration)
-{ /* Let the transmit ISR take care of this (since it
-     requires stuffing characters into the output stream).
-   */
-    info->x_break = duration;
-    if (!info->xmit_cnt ) {
-       start_xmit(info);
-    }
-} /* send_break */
+       return 0;
+}                              /* set_modem_info */
+
+static void send_break(struct cyclades_port *info, int duration)
+{                              /* Let the transmit ISR take care of this (since it
+                                  requires stuffing characters into the output stream).
+                                */
+       info->x_break = duration;
+       if (!info->xmit_cnt) {
+               start_xmit(info);
+       }
+}                              /* send_break */
 
 static int
-get_mon_info(struct cyclades_port * info, struct cyclades_monitor __user * mon)
+get_mon_info(struct cyclades_port *info, struct cyclades_monitor __user * mon)
 {
 
-   if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor)))
-          return -EFAULT;
-   info->mon.int_count  = 0;
-   info->mon.char_count = 0;
-   info->mon.char_max   = 0;
-   info->mon.char_last  = 0;
-   return 0;
+       if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor)))
+               return -EFAULT;
+       info->mon.int_count = 0;
+       info->mon.char_count = 0;
+       info->mon.char_max = 0;
+       info->mon.char_last = 0;
+       return 0;
 }
 
-static int
-set_threshold(struct cyclades_port * info, unsigned long __user *arg)
+static int set_threshold(struct cyclades_port *info, unsigned long __user * arg)
 {
-   volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-   unsigned long value;
-   int channel;
-   
-   if (get_user(value, arg))
-          return -EFAULT;
-
-   channel = info->line;
-   info->cor4 &= ~CyREC_FIFO;
-   info->cor4 |= value & CyREC_FIFO;
-   base_addr[CyCOR4] = info->cor4;
-   return 0;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       unsigned long value;
+       int channel;
+
+       if (get_user(value, arg))
+               return -EFAULT;
+
+       channel = info->line;
+       info->cor4 &= ~CyREC_FIFO;
+       info->cor4 |= value & CyREC_FIFO;
+       base_addr[CyCOR4] = info->cor4;
+       return 0;
 }
 
 static int
-get_threshold(struct cyclades_port * info, unsigned long __user *value)
+get_threshold(struct cyclades_port *info, unsigned long __user * value)
 {
-   volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-   int channel;
-   unsigned long tmp;
-   
-   channel = info->line;
-
-   tmp = base_addr[CyCOR4] & CyREC_FIFO;
-   return put_user(tmp,value);
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
+       unsigned long tmp;
+
+       channel = info->line;
+
+       tmp = base_addr[CyCOR4] & CyREC_FIFO;
+       return put_user(tmp, value);
 }
 
 static int
-set_default_threshold(struct cyclades_port * info, unsigned long __user *arg)
+set_default_threshold(struct cyclades_port *info, unsigned long __user * arg)
 {
-   unsigned long value;
+       unsigned long value;
 
-   if (get_user(value, arg))
-       return -EFAULT;
+       if (get_user(value, arg))
+               return -EFAULT;
 
-   info->default_threshold = value & 0x0f;
-   return 0;
+       info->default_threshold = value & 0x0f;
+       return 0;
 }
 
 static int
-get_default_threshold(struct cyclades_port * info, unsigned long __user *value)
+get_default_threshold(struct cyclades_port *info, unsigned long __user * value)
 {
-   return put_user(info->default_threshold,value);
+       return put_user(info->default_threshold, value);
 }
 
-static int
-set_timeout(struct cyclades_port * info, unsigned long __user *arg)
+static int set_timeout(struct cyclades_port *info, unsigned long __user * arg)
 {
-   volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-   int channel;
-   unsigned long value;
-
-   if (get_user(value, arg))
-          return -EFAULT;
-   
-   channel = info->line;
-
-   base_addr[CyRTPRL] = value & 0xff;
-   base_addr[CyRTPRH] = (value >> 8) & 0xff;
-   return 0;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
+       unsigned long value;
+
+       if (get_user(value, arg))
+               return -EFAULT;
+
+       channel = info->line;
+
+       base_addr[CyRTPRL] = value & 0xff;
+       base_addr[CyRTPRH] = (value >> 8) & 0xff;
+       return 0;
 }
 
-static int
-get_timeout(struct cyclades_port * info, unsigned long __user *value)
+static int get_timeout(struct cyclades_port *info, unsigned long __user * value)
 {
-   volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-   int channel;
-   unsigned long tmp;
-   
-   channel = info->line;
-
-   tmp = base_addr[CyRTPRL];
-   return put_user(tmp,value);
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
+       unsigned long tmp;
+
+       channel = info->line;
+
+       tmp = base_addr[CyRTPRL];
+       return put_user(tmp, value);
 }
 
-static int
-set_default_timeout(struct cyclades_port * info, unsigned long value)
+static int set_default_timeout(struct cyclades_port *info, unsigned long value)
 {
-   info->default_timeout = value & 0xff;
-   return 0;
+       info->default_timeout = value & 0xff;
+       return 0;
 }
 
 static int
-get_default_timeout(struct cyclades_port * info, unsigned long __user *value)
+get_default_timeout(struct cyclades_port *info, unsigned long __user * value)
 {
-   return put_user(info->default_timeout,value);
+       return put_user(info->default_timeout, value);
 }
 
 static int
-cy_ioctl(struct tty_struct *tty, struct file * file,
-            unsigned int cmd, unsigned long arg)
+cy_ioctl(struct tty_struct *tty, struct file *file,
+        unsigned int cmd, unsigned long arg)
 {
-  unsigned long val;
-  struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
-  int ret_val = 0;
-  void __user *argp = (void __user *)arg;
+       unsigned long val;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       int ret_val = 0;
+       void __user *argp = (void __user *)arg;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */
-#endif
-
-    switch (cmd) {
-        case CYGETMON:
-            ret_val = get_mon_info(info, argp);
-           break;
-        case CYGETTHRESH:
-           ret_val = get_threshold(info, argp);
-           break;
-        case CYSETTHRESH:
-            ret_val = set_threshold(info, argp);
-           break;
-        case CYGETDEFTHRESH:
-           ret_val = get_default_threshold(info, argp);
-           break;
-        case CYSETDEFTHRESH:
-            ret_val = set_default_threshold(info, argp);
-           break;
-        case CYGETTIMEOUT:
-           ret_val = get_timeout(info, argp);
-           break;
-        case CYSETTIMEOUT:
-            ret_val = set_timeout(info, argp);
-           break;
-        case CYGETDEFTIMEOUT:
-           ret_val = get_default_timeout(info, argp);
-           break;
-        case CYSETDEFTIMEOUT:
-            ret_val = set_default_timeout(info, (unsigned long)arg);
-           break;
-        case TCSBRK:    /* SVID version: non-zero arg --> no break */
-           ret_val = tty_check_change(tty);
-           if (ret_val)
-                   break;
-            tty_wait_until_sent(tty,0);
-            if (!arg)
-                send_break(info, HZ/4); /* 1/4 second */
-            break;
-        case TCSBRKP:   /* support for POSIX tcsendbreak() */
-           ret_val = tty_check_change(tty);
-           if (ret_val)
+       printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg);       /* */
+#endif
+
+       switch (cmd) {
+       case CYGETMON:
+               ret_val = get_mon_info(info, argp);
+               break;
+       case CYGETTHRESH:
+               ret_val = get_threshold(info, argp);
+               break;
+       case CYSETTHRESH:
+               ret_val = set_threshold(info, argp);
+               break;
+       case CYGETDEFTHRESH:
+               ret_val = get_default_threshold(info, argp);
+               break;
+       case CYSETDEFTHRESH:
+               ret_val = set_default_threshold(info, argp);
+               break;
+       case CYGETTIMEOUT:
+               ret_val = get_timeout(info, argp);
+               break;
+       case CYSETTIMEOUT:
+               ret_val = set_timeout(info, argp);
+               break;
+       case CYGETDEFTIMEOUT:
+               ret_val = get_default_timeout(info, argp);
+               break;
+       case CYSETDEFTIMEOUT:
+               ret_val = set_default_timeout(info, (unsigned long)arg);
+               break;
+       case TCSBRK:            /* SVID version: non-zero arg --> no break */
+               ret_val = tty_check_change(tty);
+               if (ret_val)
+                       break;
+               tty_wait_until_sent(tty, 0);
+               if (!arg)
+                       send_break(info, HZ / 4);       /* 1/4 second */
+               break;
+       case TCSBRKP:           /* support for POSIX tcsendbreak() */
+               ret_val = tty_check_change(tty);
+               if (ret_val)
+                       break;
+               tty_wait_until_sent(tty, 0);
+               send_break(info, arg ? arg * (HZ / 10) : HZ / 4);
                break;
-            tty_wait_until_sent(tty,0);
-            send_break(info, arg ? arg*(HZ/10) : HZ/4);
-            break;
 
 /* The following commands are incompletely implemented!!! */
-        case TIOCGSOFTCAR:
-            ret_val = put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) argp);
-            break;
-        case TIOCSSOFTCAR:
-            ret_val = get_user(val, (unsigned long __user *) argp);
-           if (ret_val)
-                   break;
-            tty->termios->c_cflag =
-                    ((tty->termios->c_cflag & ~CLOCAL) | (val ? CLOCAL : 0));
-            break;
-        case TIOCGSERIAL:
-            ret_val = get_serial_info(info, argp);
-            break;
-        case TIOCSSERIAL:
-            ret_val = set_serial_info(info, argp);
-            break;
-        default:
-           ret_val = -ENOIOCTLCMD;
-    }
+       case TIOCGSOFTCAR:
+               ret_val =
+                   put_user(C_CLOCAL(tty) ? 1 : 0,
+                            (unsigned long __user *)argp);
+               break;
+       case TIOCSSOFTCAR:
+               ret_val = get_user(val, (unsigned long __user *)argp);
+               if (ret_val)
+                       break;
+               tty->termios->c_cflag =
+                   ((tty->termios->c_cflag & ~CLOCAL) | (val ? CLOCAL : 0));
+               break;
+       case TIOCGSERIAL:
+               ret_val = get_serial_info(info, argp);
+               break;
+       case TIOCSSERIAL:
+               ret_val = set_serial_info(info, argp);
+               break;
+       default:
+               ret_val = -ENOIOCTLCMD;
+       }
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_ioctl done\n");
+       printk("cy_ioctl done\n");
 #endif
 
-    return ret_val;
-} /* cy_ioctl */
-
+       return ret_val;
+}                              /* cy_ioctl */
 
-
-
-static void
-cy_set_termios(struct tty_struct *tty, struct ktermios * old_termios)
+static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
-  struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_set_termios %s\n", tty->name);
+       printk("cy_set_termios %s\n", tty->name);
 #endif
 
-    if (tty->termios->c_cflag == old_termios->c_cflag)
-        return;
-    config_setup(info);
+       if (tty->termios->c_cflag == old_termios->c_cflag)
+               return;
+       config_setup(info);
 
-    if ((old_termios->c_cflag & CRTSCTS) &&
-        !(tty->termios->c_cflag & CRTSCTS)) {
-            tty->stopped = 0;
-            cy_start(tty);
-    }
+       if ((old_termios->c_cflag & CRTSCTS) &&
+           !(tty->termios->c_cflag & CRTSCTS)) {
+               tty->stopped = 0;
+               cy_start(tty);
+       }
 #ifdef tytso_patch_94Nov25_1726
-    if (!(old_termios->c_cflag & CLOCAL) &&
-        (tty->termios->c_cflag & CLOCAL))
-            wake_up_interruptible(&info->open_wait);
+       if (!(old_termios->c_cflag & CLOCAL) &&
+           (tty->termios->c_cflag & CLOCAL))
+               wake_up_interruptible(&info->open_wait);
 #endif
+}                              /* cy_set_termios */
 
-    return;
-} /* cy_set_termios */
-
-
-static void
-cy_close(struct tty_struct * tty, struct file * filp)
+static void cy_close(struct tty_struct *tty, struct file *filp)
 {
-  struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
 
 /* CP('C'); */
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_close %s\n", tty->name);
+       printk("cy_close %s\n", tty->name);
 #endif
 
-    if (!info
-    || serial_paranoia_check(info, tty->name, "cy_close")){
-        return;
-    }
+       if (!info || serial_paranoia_check(info, tty->name, "cy_close")) {
+               return;
+       }
 #ifdef SERIAL_DEBUG_OPEN
-    printk("cy_close %s, count = %d\n", tty->name, info->count);
-#endif
-
-    if ((tty->count == 1) && (info->count != 1)) {
-       /*
-        * Uh, oh.  tty->count is 1, which means that the tty
-        * structure will be freed.  Info->count should always
-        * be one in these conditions.  If it's greater than
-        * one, we've got real problems, since it means the
-        * serial port won't be shutdown.
-        */
-       printk("cy_close: bad serial port count; tty->count is 1, "
-          "info->count is %d\n", info->count);
-       info->count = 1;
-    }
+       printk("cy_close %s, count = %d\n", tty->name, info->count);
+#endif
+
+       if ((tty->count == 1) && (info->count != 1)) {
+               /*
+                * Uh, oh.  tty->count is 1, which means that the tty
+                * structure will be freed.  Info->count should always
+                * be one in these conditions.  If it's greater than
+                * one, we've got real problems, since it means the
+                * serial port won't be shutdown.
+                */
+               printk("cy_close: bad serial port count; tty->count is 1, "
+                      "info->count is %d\n", info->count);
+               info->count = 1;
+       }
 #ifdef SERIAL_DEBUG_COUNT
-    printk("cyc: %d: decrementing count to %d\n", __LINE__, info->count - 1);
+       printk("cyc: %d: decrementing count to %d\n", __LINE__,
+              info->count - 1);
 #endif
-    if (--info->count < 0) {
-       printk("cy_close: bad serial port count for ttys%d: %d\n",
-              info->line, info->count);
+       if (--info->count < 0) {
+               printk("cy_close: bad serial port count for ttys%d: %d\n",
+                      info->line, info->count);
 #ifdef SERIAL_DEBUG_COUNT
-    printk("cyc: %d: setting count to 0\n", __LINE__);
+               printk("cyc: %d: setting count to 0\n", __LINE__);
 #endif
-       info->count = 0;
-    }
-    if (info->count)
-       return;
-    info->flags |= ASYNC_CLOSING;
-    if (info->flags & ASYNC_INITIALIZED)
-       tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
-    shutdown(info);
-    if (tty->driver->flush_buffer)
-       tty->driver->flush_buffer(tty);
-    tty_ldisc_flush(tty);
-    info->event = 0;
-    info->tty = NULL;
-    if (info->blocked_open) {
-       if (info->close_delay) {
-           msleep_interruptible(jiffies_to_msecs(info->close_delay));
+               info->count = 0;
        }
-       wake_up_interruptible(&info->open_wait);
-    }
-    info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
-    wake_up_interruptible(&info->close_wait);
+       if (info->count)
+               return;
+       info->flags |= ASYNC_CLOSING;
+       if (info->flags & ASYNC_INITIALIZED)
+               tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
+       shutdown(info);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
+       tty_ldisc_flush(tty);
+       info->event = 0;
+       info->tty = NULL;
+       if (info->blocked_open) {
+               if (info->close_delay) {
+                       msleep_interruptible(jiffies_to_msecs
+                                            (info->close_delay));
+               }
+               wake_up_interruptible(&info->open_wait);
+       }
+       info->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
+       wake_up_interruptible(&info->close_wait);
 
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_close done\n");
+       printk("cy_close done\n");
 #endif
-
-    return;
-} /* cy_close */
+}                              /* cy_close */
 
 /*
  * cy_hangup() --- called by tty_hangup() when a hangup is signaled.
  */
-void
-cy_hangup(struct tty_struct *tty)
+void cy_hangup(struct tty_struct *tty)
 {
-  struct cyclades_port * info = (struct cyclades_port *)tty->driver_data;
-       
+       struct cyclades_port *info = (struct cyclades_port *)tty->driver_data;
+
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_hangup %s\n", tty->name); /* */
+       printk("cy_hangup %s\n", tty->name);    /* */
 #endif
 
-    if (serial_paranoia_check(info, tty->name, "cy_hangup"))
-       return;
-    
-    shutdown(info);
+       if (serial_paranoia_check(info, tty->name, "cy_hangup"))
+               return;
+
+       shutdown(info);
 #if 0
-    info->event = 0;
-    info->count = 0;
+       info->event = 0;
+       info->count = 0;
 #ifdef SERIAL_DEBUG_COUNT
-    printk("cyc: %d: setting count to 0\n", __LINE__);
+       printk("cyc: %d: setting count to 0\n", __LINE__);
 #endif
-    info->tty = 0;
+       info->tty = 0;
 #endif
-    info->flags &= ~ASYNC_NORMAL_ACTIVE;
-    wake_up_interruptible(&info->open_wait);
-} /* cy_hangup */
-
-
+       info->flags &= ~ASYNC_NORMAL_ACTIVE;
+       wake_up_interruptible(&info->open_wait);
+}                              /* cy_hangup */
 
 /*
  * ------------------------------------------------------------
@@ -1827,177 +1796,180 @@ cy_hangup(struct tty_struct *tty)
  */
 
 static int
-block_til_ready(struct tty_struct *tty, struct file * filp,
-                           struct cyclades_port *info)
+block_til_ready(struct tty_struct *tty, struct file *filp,
+               struct cyclades_port *info)
 {
-  DECLARE_WAITQUEUE(wait, current);
-  unsigned long flags;
-  int channel;
-  int retval;
-  volatile u_char *base_addr = (u_char *)BASE_ADDR;
-
-    /*
-     * If the device is in the middle of being closed, then block
-     * until it's done, and then try again.
-     */
-    if (info->flags & ASYNC_CLOSING) {
-       interruptible_sleep_on(&info->close_wait);
-       if (info->flags & ASYNC_HUP_NOTIFY){
-           return -EAGAIN;
-       }else{
-           return -ERESTARTSYS;
-       }
-    }
-
-    /*
-     * If non-blocking mode is set, then make the check up front
-     * and then exit.
-     */
-    if (filp->f_flags & O_NONBLOCK) {
-       info->flags |= ASYNC_NORMAL_ACTIVE;
-       return 0;
-    }
-
-    /*
-     * Block waiting for the carrier detect and the line to become
-     * free (i.e., not in use by the callout).  While we are in
-     * this loop, info->count is dropped by one, so that
-     * cy_close() knows when to free things.  We restore it upon
-     * exit, either normal or abnormal.
-     */
-    retval = 0;
-    add_wait_queue(&info->open_wait, &wait);
+       DECLARE_WAITQUEUE(wait, current);
+       unsigned long flags;
+       int channel;
+       int retval;
+       volatile u_char *base_addr = (u_char *) BASE_ADDR;
+
+       /*
+        * If the device is in the middle of being closed, then block
+        * until it's done, and then try again.
+        */
+       if (info->flags & ASYNC_CLOSING) {
+               interruptible_sleep_on(&info->close_wait);
+               if (info->flags & ASYNC_HUP_NOTIFY) {
+                       return -EAGAIN;
+               } else {
+                       return -ERESTARTSYS;
+               }
+       }
+
+       /*
+        * If non-blocking mode is set, then make the check up front
+        * and then exit.
+        */
+       if (filp->f_flags & O_NONBLOCK) {
+               info->flags |= ASYNC_NORMAL_ACTIVE;
+               return 0;
+       }
+
+       /*
+        * Block waiting for the carrier detect and the line to become
+        * free (i.e., not in use by the callout).  While we are in
+        * this loop, info->count is dropped by one, so that
+        * cy_close() knows when to free things.  We restore it upon
+        * exit, either normal or abnormal.
+        */
+       retval = 0;
+       add_wait_queue(&info->open_wait, &wait);
 #ifdef SERIAL_DEBUG_OPEN
-    printk("block_til_ready before block: %s, count = %d\n",
-          tty->name, info->count);/**/
+       printk("block_til_ready before block: %s, count = %d\n",
+              tty->name, info->count);
+       /**/
 #endif
-    info->count--;
+           info->count--;
 #ifdef SERIAL_DEBUG_COUNT
-    printk("cyc: %d: decrementing count to %d\n", __LINE__, info->count);
+       printk("cyc: %d: decrementing count to %d\n", __LINE__, info->count);
 #endif
-    info->blocked_open++;
+       info->blocked_open++;
 
-    channel = info->line;
+       channel = info->line;
 
-    while (1) {
-       local_irq_save(flags);
-       base_addr[CyCAR] = (u_char)channel;
-       base_addr[CyMSVR1] = CyRTS;
+       while (1) {
+               local_irq_save(flags);
+               base_addr[CyCAR] = (u_char) channel;
+               base_addr[CyMSVR1] = CyRTS;
 /* CP('S');CP('4'); */
-       base_addr[CyMSVR2] = CyDTR;
+               base_addr[CyMSVR2] = CyDTR;
 #ifdef SERIAL_DEBUG_DTR
-       printk("cyc: %d: raising DTR\n", __LINE__);
-       printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]);
-#endif
-       local_irq_restore(flags);
-       set_current_state(TASK_INTERRUPTIBLE);
-       if (tty_hung_up_p(filp)
-       || !(info->flags & ASYNC_INITIALIZED) ){
-           if (info->flags & ASYNC_HUP_NOTIFY) {
-               retval = -EAGAIN;
-           }else{
-               retval = -ERESTARTSYS;
-           }
-           break;
-       }
-       local_irq_save(flags);
-           base_addr[CyCAR] = (u_char)channel;
+               printk("cyc: %d: raising DTR\n", __LINE__);
+               printk("     status: 0x%x, 0x%x\n", base_addr[CyMSVR1],
+                      base_addr[CyMSVR2]);
+#endif
+               local_irq_restore(flags);
+               set_current_state(TASK_INTERRUPTIBLE);
+               if (tty_hung_up_p(filp)
+                   || !(info->flags & ASYNC_INITIALIZED)) {
+                       if (info->flags & ASYNC_HUP_NOTIFY) {
+                               retval = -EAGAIN;
+                       } else {
+                               retval = -ERESTARTSYS;
+                       }
+                       break;
+               }
+               local_irq_save(flags);
+               base_addr[CyCAR] = (u_char) channel;
 /* CP('L');CP1(1 && C_CLOCAL(tty)); CP1(1 && (base_addr[CyMSVR1] & CyDCD) ); */
-           if (!(info->flags & ASYNC_CLOSING)
-           && (C_CLOCAL(tty)
-               || (base_addr[CyMSVR1] & CyDCD))) {
-                   local_irq_restore(flags);
-                   break;
-           }
-       local_irq_restore(flags);
-       if (signal_pending(current)) {
-           retval = -ERESTARTSYS;
-           break;
-       }
+               if (!(info->flags & ASYNC_CLOSING)
+                   && (C_CLOCAL(tty)
+                       || (base_addr[CyMSVR1] & CyDCD))) {
+                       local_irq_restore(flags);
+                       break;
+               }
+               local_irq_restore(flags);
+               if (signal_pending(current)) {
+                       retval = -ERESTARTSYS;
+                       break;
+               }
 #ifdef SERIAL_DEBUG_OPEN
-       printk("block_til_ready blocking: %s, count = %d\n",
-              tty->name, info->count);/**/
-#endif
-       schedule();
-    }
-    current->state = TASK_RUNNING;
-    remove_wait_queue(&info->open_wait, &wait);
-    if (!tty_hung_up_p(filp)){
-       info->count++;
+               printk("block_til_ready blocking: %s, count = %d\n",
+                      tty->name, info->count);
+               /**/
+#endif
+                   schedule();
+       }
+       current->state = TASK_RUNNING;
+       remove_wait_queue(&info->open_wait, &wait);
+       if (!tty_hung_up_p(filp)) {
+               info->count++;
 #ifdef SERIAL_DEBUG_COUNT
-    printk("cyc: %d: incrementing count to %d\n", __LINE__, info->count);
+               printk("cyc: %d: incrementing count to %d\n", __LINE__,
+                      info->count);
 #endif
-    }
-    info->blocked_open--;
+       }
+       info->blocked_open--;
 #ifdef SERIAL_DEBUG_OPEN
-    printk("block_til_ready after blocking: %s, count = %d\n",
-          tty->name, info->count);/**/
+       printk("block_til_ready after blocking: %s, count = %d\n",
+              tty->name, info->count);
+       /**/
 #endif
-    if (retval)
-           return retval;
-    info->flags |= ASYNC_NORMAL_ACTIVE;
-    return 0;
-} /* block_til_ready */
+           if (retval)
+               return retval;
+       info->flags |= ASYNC_NORMAL_ACTIVE;
+       return 0;
+}                              /* block_til_ready */
 
 /*
  * This routine is called whenever a serial port is opened.  It
  * performs the serial-specific initialization for the tty structure.
  */
-int
-cy_open(struct tty_struct *tty, struct file * filp)
+int cy_open(struct tty_struct *tty, struct file *filp)
 {
-  struct cyclades_port  *info;
-  int retval, line;
+       struct cyclades_port *info;
+       int retval, line;
 
 /* CP('O'); */
-    line = tty->index;
-    if ((line < 0) || (NR_PORTS <= line)){
-        return -ENODEV;
-    }
-    info = &cy_port[line];
-    if (info->line < 0){
-        return -ENODEV;
-    }
+       line = tty->index;
+       if ((line < 0) || (NR_PORTS <= line)) {
+               return -ENODEV;
+       }
+       info = &cy_port[line];
+       if (info->line < 0) {
+               return -ENODEV;
+       }
 #ifdef SERIAL_DEBUG_OTHER
-    printk("cy_open %s\n", tty->name); /* */
+       printk("cy_open %s\n", tty->name);      /* */
 #endif
-    if (serial_paranoia_check(info, tty->name, "cy_open")){
-        return -ENODEV;
-    }
+       if (serial_paranoia_check(info, tty->name, "cy_open")) {
+               return -ENODEV;
+       }
 #ifdef SERIAL_DEBUG_OPEN
-    printk("cy_open %s, count = %d\n", tty->name, info->count);/**/
+       printk("cy_open %s, count = %d\n", tty->name, info->count);
+       /**/
 #endif
-    info->count++;
+           info->count++;
 #ifdef SERIAL_DEBUG_COUNT
-    printk("cyc: %d: incrementing count to %d\n", __LINE__, info->count);
+       printk("cyc: %d: incrementing count to %d\n", __LINE__, info->count);
 #endif
-    tty->driver_data = info;
-    info->tty = tty;
+       tty->driver_data = info;
+       info->tty = tty;
 
-    /*
-     * Start up serial port
-     */
-    retval = startup(info);
-    if (retval){
-       return retval;
-    }
+       /*
+        * Start up serial port
+        */
+       retval = startup(info);
+       if (retval) {
+               return retval;
+       }
 
-    retval = block_til_ready(tty, filp, info);
-    if (retval) {
+       retval = block_til_ready(tty, filp, info);
+       if (retval) {
 #ifdef SERIAL_DEBUG_OPEN
-       printk("cy_open returning after block_til_ready with %d\n",
-              retval);
+               printk("cy_open returning after block_til_ready with %d\n",
+                      retval);
 #endif
-       return retval;
-    }
-
+               return retval;
+       }
 #ifdef SERIAL_DEBUG_OPEN
-    printk("cy_open done\n");/**/
+       printk("cy_open done\n");
+       /**/
 #endif
-    return 0;
-} /* cy_open */
-
-
+           return 0;
+}                              /* cy_open */
 
 /*
  * ---------------------------------------------------------------------
@@ -2012,11 +1984,10 @@ cy_open(struct tty_struct *tty, struct file * filp)
  * number, and identifies which options were configured into this
  * driver.
  */
-static void
-show_version(void)
+static void show_version(void)
 {
-    printk("MVME166/167 cd2401 driver\n");
-} /* show_version */
+       printk("MVME166/167 cd2401 driver\n");
+}                              /* show_version */
 
 /* initialize chips on card -- return number of valid
    chips (which is number of ports/4) */
@@ -2030,10 +2001,9 @@ show_version(void)
  * ... I wonder what I should do if this fails ...
  */
 
-void
-mvme167_serial_console_setup(int cflag)
+void mvme167_serial_console_setup(int cflag)
 {
-       volatile unsigned char* base_addr = (u_char *)BASE_ADDR;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
        int ch;
        u_char spd;
        u_char rcor, rbpr, badspeed = 0;
@@ -2062,21 +2032,21 @@ mvme167_serial_console_setup(int cflag)
 
        /* OK, we have chosen a speed, now reset and reinitialise */
 
-        my_udelay(20000L);     /* Allow time for any active o/p to complete */
-        if(base_addr[CyCCR] != 0x00){
-            local_irq_restore(flags);
-            /* printk(" chip is never idle (CCR != 0)\n"); */
-            return;
-        }
+       my_udelay(20000L);      /* Allow time for any active o/p to complete */
+       if (base_addr[CyCCR] != 0x00) {
+               local_irq_restore(flags);
+               /* printk(" chip is never idle (CCR != 0)\n"); */
+               return;
+       }
 
-        base_addr[CyCCR] = CyCHIP_RESET;       /* Reset the chip */
-        my_udelay(1000L);
+       base_addr[CyCCR] = CyCHIP_RESET;        /* Reset the chip */
+       my_udelay(1000L);
 
-        if(base_addr[CyGFRCR] == 0x00){
-            local_irq_restore(flags);
-            /* printk(" chip is not responding (GFRCR stayed 0)\n"); */
-            return;
-        }
+       if (base_addr[CyGFRCR] == 0x00) {
+               local_irq_restore(flags);
+               /* printk(" chip is not responding (GFRCR stayed 0)\n"); */
+               return;
+       }
 
        /*
         * System clock is 20Mhz, divided by 2048, so divide by 10 for a 1.0ms
@@ -2085,9 +2055,9 @@ mvme167_serial_console_setup(int cflag)
 
        base_addr[CyTPR] = 10;
 
-       base_addr[CyPILR1] = 0x01;    /* Interrupt level for modem change */
-       base_addr[CyPILR2] = 0x02;    /* Interrupt level for tx ints */
-       base_addr[CyPILR3] = 0x03;    /* Interrupt level for rx ints */
+       base_addr[CyPILR1] = 0x01;      /* Interrupt level for modem change */
+       base_addr[CyPILR2] = 0x02;      /* Interrupt level for tx ints */
+       base_addr[CyPILR3] = 0x03;      /* Interrupt level for rx ints */
 
        /*
         * Attempt to set up all channels to something reasonable, and
@@ -2095,11 +2065,11 @@ mvme167_serial_console_setup(int cflag)
         * the ammount of fiddling we have to do in normal running.
         */
 
-       for (ch = 3; ch >= 0 ; ch--) {
-               base_addr[CyCAR] = (u_char)ch;
+       for (ch = 3; ch >= 0; ch--) {
+               base_addr[CyCAR] = (u_char) ch;
                base_addr[CyIER] = 0;
                base_addr[CyCMR] = CyASYNC;
-               base_addr[CyLICR] = (u_char)ch << 2;
+               base_addr[CyLICR] = (u_char) ch << 2;
                base_addr[CyLIVR] = 0x5c;
                base_addr[CyTCOR] = baud_co[spd];
                base_addr[CyTBPR] = baud_bpr[spd];
@@ -2118,29 +2088,30 @@ mvme167_serial_console_setup(int cflag)
                base_addr[CyCOR7] = 0;
                base_addr[CyRTPRL] = 2;
                base_addr[CyRTPRH] = 0;
-               base_addr[CyMSVR1] = 0;
-               base_addr[CyMSVR2] = 0;
-               write_cy_cmd(base_addr,CyINIT_CHAN|CyDIS_RCVR|CyDIS_XMTR);
+               base_addr[CyMSVR1] = 0;
+               base_addr[CyMSVR2] = 0;
+               write_cy_cmd(base_addr, CyINIT_CHAN | CyDIS_RCVR | CyDIS_XMTR);
        }
 
        /*
         * Now do specials for channel zero....
         */
 
-        base_addr[CyMSVR1] = CyRTS;
-        base_addr[CyMSVR2] = CyDTR;
+       base_addr[CyMSVR1] = CyRTS;
+       base_addr[CyMSVR2] = CyDTR;
        base_addr[CyIER] = CyRxData;
-       write_cy_cmd(base_addr,CyENB_RCVR|CyENB_XMTR);
+       write_cy_cmd(base_addr, CyENB_RCVR | CyENB_XMTR);
 
        local_irq_restore(flags);
 
        my_udelay(20000L);      /* Let it all settle down */
 
-        printk("CD2401 initialised,  chip is rev 0x%02x\n", base_addr[CyGFRCR]);
+       printk("CD2401 initialised,  chip is rev 0x%02x\n", base_addr[CyGFRCR]);
        if (badspeed)
-               printk("  WARNING:  Failed to identify line speed, rcor=%02x,rbpr=%02x\n",
-                                       rcor >> 5, rbpr);
-} /* serial_console_init */
+               printk
+                   ("  WARNING:  Failed to identify line speed, rcor=%02x,rbpr=%02x\n",
+                    rcor >> 5, rbpr);
+}                              /* serial_console_init */
 
 static const struct tty_operations cy_ops = {
        .open = cy_open,
@@ -2161,6 +2132,7 @@ static const struct tty_operations cy_ops = {
        .tiocmget = cy_tiocmget,
        .tiocmset = cy_tiocmset,
 };
+
 /* The serial driver boot-time initialization code!
     Hardware I/O ports are mapped to character special devices on a
     first found, first allocated manner.  That is, this code searches
@@ -2177,214 +2149,214 @@ static const struct tty_operations cy_ops = {
     If there are more cards with more ports than have been statically
     allocated above, a warning is printed and the extra ports are ignored.
  */
-static int __init
-serial167_init(void)
+static int __init serial167_init(void)
 {
-  struct cyclades_port *info;
-  int ret = 0;
-  int good_ports = 0;
-  int port_num = 0;
-  int index;
-  int DefSpeed;
+       struct cyclades_port *info;
+       int ret = 0;
+       int good_ports = 0;
+       int port_num = 0;
+       int index;
+       int DefSpeed;
 #ifdef notyet
-  struct sigaction sa;
+       struct sigaction sa;
 #endif
 
-    if (!(mvme16x_config &MVME16x_CONFIG_GOT_CD2401))
-       return 0;
+       if (!(mvme16x_config & MVME16x_CONFIG_GOT_CD2401))
+               return 0;
 
-    cy_serial_driver = alloc_tty_driver(NR_PORTS);
-    if (!cy_serial_driver)
-       return -ENOMEM;
+       cy_serial_driver = alloc_tty_driver(NR_PORTS);
+       if (!cy_serial_driver)
+               return -ENOMEM;
 
 #if 0
-scrn[1] = '\0';
+       scrn[1] = '\0';
 #endif
 
-    show_version();
+       show_version();
 
-    /* Has "console=0,9600n8" been used in bootinfo to change speed? */
-    if (serial_console_cflag)
-       DefSpeed = serial_console_cflag & 0017;
-    else {
-       DefSpeed = initial_console_speed;
-       serial_console_info = &cy_port[0];
-       serial_console_cflag = DefSpeed | CS8;
+       /* Has "console=0,9600n8" been used in bootinfo to change speed? */
+       if (serial_console_cflag)
+               DefSpeed = serial_console_cflag & 0017;
+       else {
+               DefSpeed = initial_console_speed;
+               serial_console_info = &cy_port[0];
+               serial_console_cflag = DefSpeed | CS8;
 #if 0
-       serial_console = 64; /*callout_driver.minor_start*/
-#endif
-    }
-
-    /* Initialize the tty_driver structure */
-    
-    cy_serial_driver->owner = THIS_MODULE;
-    cy_serial_driver->name = "ttyS";
-    cy_serial_driver->major = TTY_MAJOR;
-    cy_serial_driver->minor_start = 64;
-    cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
-    cy_serial_driver->subtype = SERIAL_TYPE_NORMAL;
-    cy_serial_driver->init_termios = tty_std_termios;
-    cy_serial_driver->init_termios.c_cflag =
-           B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-    cy_serial_driver->flags = TTY_DRIVER_REAL_RAW;
-    tty_set_operations(cy_serial_driver, &cy_ops);
+               serial_console = 64;    /*callout_driver.minor_start */
+#endif
+       }
 
-    ret = tty_register_driver(cy_serial_driver);
-    if (ret) {
-           printk(KERN_ERR "Couldn't register MVME166/7 serial driver\n");
-           put_tty_driver(cy_serial_driver);
-           return ret;
-    }
+       /* Initialize the tty_driver structure */
 
-    port_num = 0;
-    info = cy_port;
-    for (index = 0; index < 1; index++) {
+       cy_serial_driver->owner = THIS_MODULE;
+       cy_serial_driver->name = "ttyS";
+       cy_serial_driver->major = TTY_MAJOR;
+       cy_serial_driver->minor_start = 64;
+       cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL;
+       cy_serial_driver->subtype = SERIAL_TYPE_NORMAL;
+       cy_serial_driver->init_termios = tty_std_termios;
+       cy_serial_driver->init_termios.c_cflag =
+           B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       cy_serial_driver->flags = TTY_DRIVER_REAL_RAW;
+       tty_set_operations(cy_serial_driver, &cy_ops);
+
+       ret = tty_register_driver(cy_serial_driver);
+       if (ret) {
+               printk(KERN_ERR "Couldn't register MVME166/7 serial driver\n");
+               put_tty_driver(cy_serial_driver);
+               return ret;
+       }
 
-       good_ports = 4;
+       port_num = 0;
+       info = cy_port;
+       for (index = 0; index < 1; index++) {
 
-       if(port_num < NR_PORTS){
-           while( good_ports-- && port_num < NR_PORTS){
+               good_ports = 4;
+
+               if (port_num < NR_PORTS) {
+                       while (good_ports-- && port_num < NR_PORTS) {
                /*** initialize port ***/
-               info->magic = CYCLADES_MAGIC;
-               info->type = PORT_CIRRUS;
-               info->card = index;
-               info->line = port_num;
-               info->flags = STD_COM_FLAGS;
-               info->tty = NULL;
-               info->xmit_fifo_size = 12;
-               info->cor1 = CyPARITY_NONE|Cy_8_BITS;
-               info->cor2 = CyETC;
-               info->cor3 = Cy_1_STOP;
-               info->cor4 = 0x08; /* _very_ small receive threshold */
-               info->cor5 = 0;
-               info->cor6 = 0;
-               info->cor7 = 0;
-               info->tbpr = baud_bpr[DefSpeed]; /* Tx BPR */
-               info->tco = baud_co[DefSpeed]; /* Tx CO */
-               info->rbpr = baud_bpr[DefSpeed]; /* Rx BPR */
-               info->rco = baud_co[DefSpeed] >> 5; /* Rx CO */
-               info->close_delay = 0;
-               info->x_char = 0;
-               info->event = 0;
-               info->count = 0;
+                               info->magic = CYCLADES_MAGIC;
+                               info->type = PORT_CIRRUS;
+                               info->card = index;
+                               info->line = port_num;
+                               info->flags = STD_COM_FLAGS;
+                               info->tty = NULL;
+                               info->xmit_fifo_size = 12;
+                               info->cor1 = CyPARITY_NONE | Cy_8_BITS;
+                               info->cor2 = CyETC;
+                               info->cor3 = Cy_1_STOP;
+                               info->cor4 = 0x08;      /* _very_ small receive threshold */
+                               info->cor5 = 0;
+                               info->cor6 = 0;
+                               info->cor7 = 0;
+                               info->tbpr = baud_bpr[DefSpeed];        /* Tx BPR */
+                               info->tco = baud_co[DefSpeed];  /* Tx CO */
+                               info->rbpr = baud_bpr[DefSpeed];        /* Rx BPR */
+                               info->rco = baud_co[DefSpeed] >> 5;     /* Rx CO */
+                               info->close_delay = 0;
+                               info->x_char = 0;
+                               info->event = 0;
+                               info->count = 0;
 #ifdef SERIAL_DEBUG_COUNT
-    printk("cyc: %d: setting count to 0\n", __LINE__);
-#endif
-               info->blocked_open = 0;
-               info->default_threshold = 0;
-               info->default_timeout = 0;
-               INIT_WORK(&info->tqueue, do_softint);
-               init_waitqueue_head(&info->open_wait);
-               init_waitqueue_head(&info->close_wait);
-               /* info->session */
-               /* info->pgrp */
+                               printk("cyc: %d: setting count to 0\n",
+                                      __LINE__);
+#endif
+                               info->blocked_open = 0;
+                               info->default_threshold = 0;
+                               info->default_timeout = 0;
+                               INIT_WORK(&info->tqueue, do_softint);
+                               init_waitqueue_head(&info->open_wait);
+                               init_waitqueue_head(&info->close_wait);
+                               /* info->session */
+                               /* info->pgrp */
 /*** !!!!!!!! this may expose new bugs !!!!!!!!! *********/
-               info->read_status_mask = CyTIMEOUT| CySPECHAR| CyBREAK
-                                       | CyPARITY| CyFRAME| CyOVERRUN;
-               /* info->timeout */
-
-               printk("ttyS%d ", info->line);
-               port_num++;info++;
-               if(!(port_num & 7)){
-                   printk("\n               ");
+                               info->read_status_mask =
+                                   CyTIMEOUT | CySPECHAR | CyBREAK | CyPARITY |
+                                   CyFRAME | CyOVERRUN;
+                               /* info->timeout */
+
+                               printk("ttyS%d ", info->line);
+                               port_num++;
+                               info++;
+                               if (!(port_num & 7)) {
+                                       printk("\n               ");
+                               }
+                       }
                }
-           }
-       }
-       printk("\n");
-    }
-    while( port_num < NR_PORTS){
-       info->line = -1;
-       port_num++;info++;
-    }
+               printk("\n");
+       }
+       while (port_num < NR_PORTS) {
+               info->line = -1;
+               port_num++;
+               info++;
+       }
 #ifdef CONFIG_REMOTE_DEBUG
-    debug_setup();
-#endif
-    ret = request_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt, 0,
-                               "cd2401_errors", cd2401_rxerr_interrupt);
-    if (ret) {
-           printk(KERN_ERR "Could't get cd2401_errors IRQ");
-           goto cleanup_serial_driver;
-    }
-
-    ret = request_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt, 0,
-                               "cd2401_modem", cd2401_modem_interrupt);
-    if (ret) {
-           printk(KERN_ERR "Could't get cd2401_modem IRQ");
-           goto cleanup_irq_cd2401_errors;
-    }
-
-    ret = request_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt, 0,
-                               "cd2401_txints", cd2401_tx_interrupt);
-    if (ret) {
-           printk(KERN_ERR "Could't get cd2401_txints IRQ");
-           goto cleanup_irq_cd2401_modem;
-    }
-
-    ret = request_irq(MVME167_IRQ_SER_RX, cd2401_rx_interrupt, 0,
-                               "cd2401_rxints", cd2401_rx_interrupt);
-    if (ret) {
-           printk(KERN_ERR "Could't get cd2401_rxints IRQ");
-           goto cleanup_irq_cd2401_txints;
-    }
-
-    /* Now we have registered the interrupt handlers, allow the interrupts */
-
-    pcc2chip[PccSCCMICR] = 0x15;               /* Serial ints are level 5 */
-    pcc2chip[PccSCCTICR] = 0x15;
-    pcc2chip[PccSCCRICR] = 0x15;
-
-    pcc2chip[PccIMLR] = 3;                     /* Allow PCC2 ints above 3!? */
-
-    return 0;
+       debug_setup();
+#endif
+       ret = request_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt, 0,
+                         "cd2401_errors", cd2401_rxerr_interrupt);
+       if (ret) {
+               printk(KERN_ERR "Could't get cd2401_errors IRQ");
+               goto cleanup_serial_driver;
+       }
+
+       ret = request_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt, 0,
+                         "cd2401_modem", cd2401_modem_interrupt);
+       if (ret) {
+               printk(KERN_ERR "Could't get cd2401_modem IRQ");
+               goto cleanup_irq_cd2401_errors;
+       }
+
+       ret = request_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt, 0,
+                         "cd2401_txints", cd2401_tx_interrupt);
+       if (ret) {
+               printk(KERN_ERR "Could't get cd2401_txints IRQ");
+               goto cleanup_irq_cd2401_modem;
+       }
+
+       ret = request_irq(MVME167_IRQ_SER_RX, cd2401_rx_interrupt, 0,
+                         "cd2401_rxints", cd2401_rx_interrupt);
+       if (ret) {
+               printk(KERN_ERR "Could't get cd2401_rxints IRQ");
+               goto cleanup_irq_cd2401_txints;
+       }
+
+       /* Now we have registered the interrupt handlers, allow the interrupts */
+
+       pcc2chip[PccSCCMICR] = 0x15;    /* Serial ints are level 5 */
+       pcc2chip[PccSCCTICR] = 0x15;
+       pcc2chip[PccSCCRICR] = 0x15;
+
+       pcc2chip[PccIMLR] = 3;  /* Allow PCC2 ints above 3!? */
+
+       return 0;
 cleanup_irq_cd2401_txints:
-    free_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt);
+       free_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt);
 cleanup_irq_cd2401_modem:
-    free_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt);
+       free_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt);
 cleanup_irq_cd2401_errors:
-    free_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt);
+       free_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt);
 cleanup_serial_driver:
-    if (tty_unregister_driver(cy_serial_driver))
-           printk(KERN_ERR "Couldn't unregister MVME166/7 serial driver\n");
-    put_tty_driver(cy_serial_driver);
-    return ret;
-} /* serial167_init */
+       if (tty_unregister_driver(cy_serial_driver))
+               printk(KERN_ERR
+                      "Couldn't unregister MVME166/7 serial driver\n");
+       put_tty_driver(cy_serial_driver);
+       return ret;
+}                              /* serial167_init */
 
 module_init(serial167_init);
 
-
 #ifdef CYCLOM_SHOW_STATUS
-static void
-show_status(int line_num)
+static void show_status(int line_num)
 {
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int channel;
-  struct cyclades_port * info;
-  unsigned long flags;
-
-    info = &cy_port[line_num];
-    channel = info->line;
-    printk("  channel %d\n", channel);/**/
-
-    printk(" cy_port\n");
-    printk("  card line flags = %d %d %x\n",
-                 info->card, info->line, info->flags);
-    printk("  *tty read_status_mask timeout xmit_fifo_size = %lx %x %x %x\n",
-                 (long)info->tty, info->read_status_mask,
-                 info->timeout, info->xmit_fifo_size);
-    printk("  cor1,cor2,cor3,cor4,cor5,cor6,cor7 = %x %x %x %x %x %x %x\n",
-             info->cor1, info->cor2, info->cor3, info->cor4, info->cor5,
-                       info->cor6, info->cor7);
-    printk("  tbpr,tco,rbpr,rco = %d %d %d %d\n",
-             info->tbpr, info->tco, info->rbpr, info->rco);
-    printk("  close_delay event count = %d %d %d\n",
-             info->close_delay, info->event, info->count);
-    printk("  x_char blocked_open = %x %x\n",
-             info->x_char, info->blocked_open);
-    printk("  open_wait = %lx %lx %lx\n",
-             (long)info->open_wait);
-
-
-    local_irq_save(flags);
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int channel;
+       struct cyclades_port *info;
+       unsigned long flags;
+
+       info = &cy_port[line_num];
+       channel = info->line;
+       printk("  channel %d\n", channel);
+       /**/ printk(" cy_port\n");
+       printk("  card line flags = %d %d %x\n",
+              info->card, info->line, info->flags);
+       printk
+           ("  *tty read_status_mask timeout xmit_fifo_size = %lx %x %x %x\n",
+            (long)info->tty, info->read_status_mask, info->timeout,
+            info->xmit_fifo_size);
+       printk("  cor1,cor2,cor3,cor4,cor5,cor6,cor7 = %x %x %x %x %x %x %x\n",
+              info->cor1, info->cor2, info->cor3, info->cor4, info->cor5,
+              info->cor6, info->cor7);
+       printk("  tbpr,tco,rbpr,rco = %d %d %d %d\n", info->tbpr, info->tco,
+              info->rbpr, info->rco);
+       printk("  close_delay event count = %d %d %d\n", info->close_delay,
+              info->event, info->count);
+       printk("  x_char blocked_open = %x %x\n", info->x_char,
+              info->blocked_open);
+       printk("  open_wait = %lx %lx %lx\n", (long)info->open_wait);
+
+       local_irq_save(flags);
 
 /* Global Registers */
 
@@ -2398,7 +2370,7 @@ show_status(int line_num)
        printk(" CyMIR %x\n", base_addr[CyMIR]);
        printk(" CyTPR %x\n", base_addr[CyTPR]);
 
-       base_addr[CyCAR] = (u_char)channel;
+       base_addr[CyCAR] = (u_char) channel;
 
 /* Virtual Registers */
 
@@ -2442,11 +2414,10 @@ show_status(int line_num)
        printk(" CyTBPR %x\n", base_addr[CyTBPR]);
        printk(" CyTCOR %x\n", base_addr[CyTCOR]);
 
-    local_irq_restore(flags);
-} /* show_status */
+       local_irq_restore(flags);
+}                              /* show_status */
 #endif
 
-
 #if 0
 /* Dummy routine in mvme16x/config.c for now */
 
@@ -2459,61 +2430,67 @@ void console_setup(char *str, int *ints)
        int cflag = 0;
 
        /* Sanity check. */
-       if (ints[0] > 3 || ints[1] > 3) return;
+       if (ints[0] > 3 || ints[1] > 3)
+               return;
 
        /* Get baud, bits and parity */
        baud = 2400;
        bits = 8;
        parity = 'n';
-       if (ints[2]) baud = ints[2];
+       if (ints[2])
+               baud = ints[2];
        if ((s = strchr(str, ','))) {
                do {
                        s++;
-               } while(*s >= '0' && *s <= '9');
-               if (*s) parity = *s++;
-               if (*s) bits   = *s - '0';
+               } while (*s >= '0' && *s <= '9');
+               if (*s)
+                       parity = *s++;
+               if (*s)
+                       bits = *s - '0';
        }
 
        /* Now construct a cflag setting. */
-       switch(baud) {
-               case 1200:
-                       cflag |= B1200;
-                       break;
-               case 9600:
-                       cflag |= B9600;
-                       break;
-               case 19200:
-                       cflag |= B19200;
-                       break;
-               case 38400:
-                       cflag |= B38400;
-                       break;
-               case 2400:
-               default:
-                       cflag |= B2400;
-                       break;
+       switch (baud) {
+       case 1200:
+               cflag |= B1200;
+               break;
+       case 9600:
+               cflag |= B9600;
+               break;
+       case 19200:
+               cflag |= B19200;
+               break;
+       case 38400:
+               cflag |= B38400;
+               break;
+       case 2400:
+       default:
+               cflag |= B2400;
+               break;
        }
-       switch(bits) {
-               case 7:
-                       cflag |= CS7;
-                       break;
-               default:
-               case 8:
-                       cflag |= CS8;
-                       break;
+       switch (bits) {
+       case 7:
+               cflag |= CS7;
+               break;
+       default:
+       case 8:
+               cflag |= CS8;
+               break;
        }
-       switch(parity) {
-               case 'o': case 'O':
-                       cflag |= PARODD;
-                       break;
-               case 'e': case 'E':
-                       cflag |= PARENB;
-                       break;
+       switch (parity) {
+       case 'o':
+       case 'O':
+               cflag |= PARODD;
+               break;
+       case 'e':
+       case 'E':
+               cflag |= PARENB;
+               break;
        }
 
        serial_console_info = &cy_port[ints[1]];
        serial_console_cflag = cflag;
-       serial_console = ints[1] + 64; /*callout_driver.minor_start*/
+       serial_console = ints[1] + 64;  /*callout_driver.minor_start */
 }
 #endif
 
@@ -2532,9 +2509,10 @@ void console_setup(char *str, int *ints)
  * The console must be locked when we get here.
  */
 
-void serial167_console_write(struct console *co, const char *str, unsigned count)
+void serial167_console_write(struct console *co, const char *str,
+                            unsigned count)
 {
-       volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
        unsigned long flags;
        volatile u_char sink;
        u_char ier;
@@ -2547,7 +2525,7 @@ void serial167_console_write(struct console *co, const char *str, unsigned count
        /* Ensure transmitter is enabled! */
 
        port = 0;
-       base_addr[CyCAR] = (u_char)port;
+       base_addr[CyCAR] = (u_char) port;
        while (base_addr[CyCCR])
                ;
        base_addr[CyCCR] = CyENB_XMTR;
@@ -2556,8 +2534,7 @@ void serial167_console_write(struct console *co, const char *str, unsigned count
        base_addr[CyIER] = CyTxMpty;
 
        while (1) {
-               if (pcc2chip[PccSCCTICR] & 0x20)
-               {
+               if (pcc2chip[PccSCCTICR] & 0x20) {
                        /* We have a Tx int. Acknowledge it */
                        sink = pcc2chip[PccTPIACKR];
                        if ((base_addr[CyLICR] >> 2) == port) {
@@ -2571,18 +2548,15 @@ void serial167_console_write(struct console *co, const char *str, unsigned count
                                        str++;
                                        i++;
                                        do_lf = 0;
-                               }
-                               else if (*str == '\n') {
+                               } else if (*str == '\n') {
                                        base_addr[CyTDR] = '\r';
                                        do_lf = 1;
-                               }
-                               else {
+                               } else {
                                        base_addr[CyTDR] = *str++;
                                        i++;
                                }
                                base_addr[CyTEOIR] = 0;
-                       }
-                       else
+                       } else
                                base_addr[CyTEOIR] = CyNOTRANS;
                }
        }
@@ -2592,45 +2566,44 @@ void serial167_console_write(struct console *co, const char *str, unsigned count
        local_irq_restore(flags);
 }
 
-static struct tty_driver *serial167_console_device(struct console *c, int *index)
+static struct tty_driver *serial167_console_device(struct console *c,
+                                                  int *index)
 {
        *index = c->index;
        return cy_serial_driver;
 }
 
-
 static int __init serial167_console_setup(struct console *co, char *options)
 {
        return 0;
 }
 
-
 static struct console sercons = {
-       .name           = "ttyS",
-       .write          = serial167_console_write,
-       .device         = serial167_console_device,
-       .setup          = serial167_console_setup,
-       .flags          = CON_PRINTBUFFER,
-       .index          = -1,
+       .name = "ttyS",
+       .write = serial167_console_write,
+       .device = serial167_console_device,
+       .setup = serial167_console_setup,
+       .flags = CON_PRINTBUFFER,
+       .index = -1,
 };
 
-
 static int __init serial167_console_init(void)
 {
        if (vme_brdtype == VME_TYPE_MVME166 ||
-                       vme_brdtype == VME_TYPE_MVME167 ||
-                       vme_brdtype == VME_TYPE_MVME177) {
+           vme_brdtype == VME_TYPE_MVME167 ||
+           vme_brdtype == VME_TYPE_MVME177) {
                mvme167_serial_console_setup(0);
                register_console(&sercons);
        }
        return 0;
 }
+
 console_initcall(serial167_console_init);
 
 #ifdef CONFIG_REMOTE_DEBUG
-void putDebugChar (int c)
+void putDebugChar(int c)
 {
-       volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
        unsigned long flags;
        volatile u_char sink;
        u_char ier;
@@ -2641,7 +2614,7 @@ void putDebugChar (int c)
        /* Ensure transmitter is enabled! */
 
        port = DEBUG_PORT;
-       base_addr[CyCAR] = (u_char)port;
+       base_addr[CyCAR] = (u_char) port;
        while (base_addr[CyCCR])
                ;
        base_addr[CyCCR] = CyENB_XMTR;
@@ -2650,16 +2623,14 @@ void putDebugChar (int c)
        base_addr[CyIER] = CyTxMpty;
 
        while (1) {
-               if (pcc2chip[PccSCCTICR] & 0x20)
-               {
+               if (pcc2chip[PccSCCTICR] & 0x20) {
                        /* We have a Tx int. Acknowledge it */
                        sink = pcc2chip[PccTPIACKR];
                        if ((base_addr[CyLICR] >> 2) == port) {
                                base_addr[CyTDR] = c;
                                base_addr[CyTEOIR] = 0;
                                break;
-                       }
-                       else
+                       } else
                                base_addr[CyTEOIR] = CyNOTRANS;
                }
        }
@@ -2671,7 +2642,7 @@ void putDebugChar (int c)
 
 int getDebugChar()
 {
-       volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
        unsigned long flags;
        volatile u_char sink;
        u_char ier;
@@ -2693,7 +2664,7 @@ int getDebugChar()
        /* Ensure receiver is enabled! */
 
        port = DEBUG_PORT;
-       base_addr[CyCAR] = (u_char)port;
+       base_addr[CyCAR] = (u_char) port;
 #if 0
        while (base_addr[CyCCR])
                ;
@@ -2703,31 +2674,30 @@ int getDebugChar()
        base_addr[CyIER] = CyRxData;
 
        while (1) {
-               if (pcc2chip[PccSCCRICR] & 0x20)
-               {
+               if (pcc2chip[PccSCCRICR] & 0x20) {
                        /* We have a Rx int. Acknowledge it */
                        sink = pcc2chip[PccRPIACKR];
                        if ((base_addr[CyLICR] >> 2) == port) {
                                int cnt = base_addr[CyRFOC];
-                               while (cnt-- > 0)
-                               {
+                               while (cnt-- > 0) {
                                        c = base_addr[CyRDR];
                                        if (c == 0)
-                                               printk ("!! debug char is null (cnt=%d) !!", cnt);
+                                               printk
+                                                   ("!! debug char is null (cnt=%d) !!",
+                                                    cnt);
                                        else
-                                               queueDebugChar (c);
+                                               queueDebugChar(c);
                                }
                                base_addr[CyREOIR] = 0;
                                i = debugiq.out;
                                if (i == debugiq.in)
-                                       panic ("Debug input queue empty!");
+                                       panic("Debug input queue empty!");
                                c = debugiq.buf[i];
                                if (++i == DEBUG_LEN)
                                        i = 0;
                                debugiq.out = i;
                                break;
-                       }
-                       else
+                       } else
                                base_addr[CyREOIR] = CyNOTRANS;
                }
        }
@@ -2739,7 +2709,7 @@ int getDebugChar()
        return (c);
 }
 
-void queueDebugChar (int c)
+void queueDebugChar(int c)
 {
        int i;
 
@@ -2751,73 +2721,71 @@ void queueDebugChar (int c)
                debugiq.in = i;
 }
 
-static void
-debug_setup()
+static void debug_setup()
 {
-  unsigned long flags;
-  volatile unsigned char *base_addr = (u_char *)BASE_ADDR;
-  int   i, cflag;
+       unsigned long flags;
+       volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
+       int i, cflag;
 
-    cflag = B19200;
+       cflag = B19200;
 
-    local_irq_save(flags);
+       local_irq_save(flags);
 
-    for (i = 0; i < 4; i++)
-    {
-       base_addr[CyCAR] = i;
-       base_addr[CyLICR] = i << 2;
-    }
+       for (i = 0; i < 4; i++) {
+               base_addr[CyCAR] = i;
+               base_addr[CyLICR] = i << 2;
+       }
 
-    debugiq.in = debugiq.out = 0;
+       debugiq.in = debugiq.out = 0;
 
-    base_addr[CyCAR] = DEBUG_PORT;
+       base_addr[CyCAR] = DEBUG_PORT;
 
-    /* baud rate */
-    i = cflag & CBAUD;
+       /* baud rate */
+       i = cflag & CBAUD;
 
-    base_addr[CyIER] = 0;
+       base_addr[CyIER] = 0;
 
-    base_addr[CyCMR] = CyASYNC;
-    base_addr[CyLICR] = DEBUG_PORT << 2;
-    base_addr[CyLIVR] = 0x5c;
+       base_addr[CyCMR] = CyASYNC;
+       base_addr[CyLICR] = DEBUG_PORT << 2;
+       base_addr[CyLIVR] = 0x5c;
 
-    /* tx and rx baud rate */
+       /* tx and rx baud rate */
 
-    base_addr[CyTCOR] = baud_co[i];
-    base_addr[CyTBPR] = baud_bpr[i];
-    base_addr[CyRCOR] = baud_co[i] >> 5;
-    base_addr[CyRBPR] = baud_bpr[i];
+       base_addr[CyTCOR] = baud_co[i];
+       base_addr[CyTBPR] = baud_bpr[i];
+       base_addr[CyRCOR] = baud_co[i] >> 5;
+       base_addr[CyRBPR] = baud_bpr[i];
 
-    /* set line characteristics  according configuration */
+       /* set line characteristics  according configuration */
 
-    base_addr[CySCHR1] = 0;
-    base_addr[CySCHR2] = 0;
-    base_addr[CySCRL] = 0;
-    base_addr[CySCRH] = 0;
-    base_addr[CyCOR1] = Cy_8_BITS | CyPARITY_NONE;
-    base_addr[CyCOR2] = 0;
-    base_addr[CyCOR3] = Cy_1_STOP;
-    base_addr[CyCOR4] = baud_cor4[i];
-    base_addr[CyCOR5] = 0;
-    base_addr[CyCOR6] = 0;
-    base_addr[CyCOR7] = 0;
+       base_addr[CySCHR1] = 0;
+       base_addr[CySCHR2] = 0;
+       base_addr[CySCRL] = 0;
+       base_addr[CySCRH] = 0;
+       base_addr[CyCOR1] = Cy_8_BITS | CyPARITY_NONE;
+       base_addr[CyCOR2] = 0;
+       base_addr[CyCOR3] = Cy_1_STOP;
+       base_addr[CyCOR4] = baud_cor4[i];
+       base_addr[CyCOR5] = 0;
+       base_addr[CyCOR6] = 0;
+       base_addr[CyCOR7] = 0;
 
-    write_cy_cmd(base_addr,CyINIT_CHAN);
-    write_cy_cmd(base_addr,CyENB_RCVR);
+       write_cy_cmd(base_addr, CyINIT_CHAN);
+       write_cy_cmd(base_addr, CyENB_RCVR);
 
-    base_addr[CyCAR] = DEBUG_PORT; /* !!! Is this needed? */
+       base_addr[CyCAR] = DEBUG_PORT;  /* !!! Is this needed? */
 
-    base_addr[CyRTPRL] = 2;
-    base_addr[CyRTPRH] = 0;
+       base_addr[CyRTPRL] = 2;
+       base_addr[CyRTPRH] = 0;
 
-    base_addr[CyMSVR1] = CyRTS;
-    base_addr[CyMSVR2] = CyDTR;
+       base_addr[CyMSVR1] = CyRTS;
+       base_addr[CyMSVR2] = CyDTR;
 
-    base_addr[CyIER] = CyRxData;
+       base_addr[CyIER] = CyRxData;
 
-    local_irq_restore(flags);
+       local_irq_restore(flags);
 
-} /* debug_setup */
+}                              /* debug_setup */
 
 #endif
 
index 20946f5127e0ca97b8b902fe3e22ae464722bcbf..92043c8f23554137d3f6c0a1c7c750049a12030e 100644 (file)
@@ -2350,10 +2350,8 @@ static void do_softint(struct work_struct *work)
                return;
        }
 
-       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
+       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event))
                tty_wakeup(tty);
-               //wake_up_interruptible(&tty->write_wait);
-       }
 
        func_exit();
 }
index 3fa625db9e4b133b6caf258ed442d2675dad18c5..bf76db1342c5883efe06d6f56230f8ea482f8c95 100644 (file)
@@ -1148,10 +1148,8 @@ static void mgsl_bh_transmit(struct mgsl_struct *info)
                printk( "%s(%d):mgsl_bh_transmit() entry on %s\n",
                        __FILE__,__LINE__,info->device_name);
 
-       if (tty) {
+       if (tty)
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
 
        /* if transmitter idle and loopmode_send_done_requested
         * then start echoing RxD to TxD
@@ -2340,7 +2338,6 @@ static void mgsl_flush_buffer(struct tty_struct *tty)
        del_timer(&info->tx_timer);     
        spin_unlock_irqrestore(&info->irq_spinlock,flags);
        
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 }
 
index 792c79c315e00292abc21e7febea957c171506c0..54af763518fefde65774091d6dc8591c025f53c1 100644 (file)
@@ -1045,7 +1045,6 @@ static void flush_buffer(struct tty_struct *tty)
                info->tx_count = 0;
        spin_unlock_irqrestore(&info->lock,flags);
 
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 }
 
@@ -1933,10 +1932,8 @@ static void bh_transmit(struct slgt_info *info)
        struct tty_struct *tty = info->tty;
 
        DBGBH(("%s bh_transmit\n", info->device_name));
-       if (tty) {
+       if (tty)
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
 }
 
 static void dsr_change(struct slgt_info *info)
index 8f4d67afe5bf99fe1daea30940640b2c1cbbbe72..ebde4e55233560eacc7513de2571e3b0213a3c47 100644 (file)
@@ -1258,7 +1258,6 @@ static void flush_buffer(struct tty_struct *tty)
        del_timer(&info->tx_timer);
        spin_unlock_irqrestore(&info->lock,flags);
 
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 }
 
@@ -2127,10 +2126,8 @@ void bh_transmit(SLMP_INFO *info)
                printk( "%s(%d):%s bh_transmit() entry\n",
                        __FILE__,__LINE__,info->device_name);
 
-       if (tty) {
+       if (tty)
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
 }
 
 void bh_status(SLMP_INFO *info)
index 7fd3cd5ddf2190269e206383ece44c481a889f78..3757610b7835d4952e992563821293e6cc781fcd 100644 (file)
@@ -88,9 +88,9 @@ static struct sysrq_key_op sysrq_loglevel_op = {
 #ifdef CONFIG_VT
 static void sysrq_handle_SAK(int key, struct tty_struct *tty)
 {
-       if (tty)
-               do_SAK(tty);
-       reset_vc(vc_cons[fg_console].d);
+       struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
+       PREPARE_WORK(SAK_work, vc_SAK);
+       schedule_work(SAK_work);
 }
 static struct sysrq_key_op sysrq_SAK_op = {
        .handler        = sysrq_handle_SAK,
index 07067c31c4ec7344237ce33165e85760b88afebb..c346ec5a3dc9e3eff49a992cc074f61a6bef9786 100644 (file)
@@ -68,6 +68,7 @@
 #include <linux/init.h>
 #include <linux/stat.h>
 #include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 
 #include <linux/toshiba.h>
 
@@ -298,12 +299,10 @@ static int tosh_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
  * Print the information for /proc/toshiba
  */
 #ifdef CONFIG_PROC_FS
-static int tosh_get_info(char *buffer, char **start, off_t fpos, int length)
+static int proc_toshiba_show(struct seq_file *m, void *v)
 {
-       char *temp;
        int key;
 
-       temp = buffer;
        key = tosh_fn_status();
 
        /* Arguments
@@ -314,8 +313,7 @@ static int tosh_get_info(char *buffer, char **start, off_t fpos, int length)
             4) BIOS date (in SCI date format)
             5) Fn Key status
        */
-
-       temp += sprintf(temp, "1.1 0x%04x %d.%d %d.%d 0x%04x 0x%02x\n",
+       seq_printf(m, "1.1 0x%04x %d.%d %d.%d 0x%04x 0x%02x\n",
                tosh_id,
                (tosh_sci & 0xff00)>>8,
                tosh_sci & 0xff,
@@ -323,9 +321,21 @@ static int tosh_get_info(char *buffer, char **start, off_t fpos, int length)
                tosh_bios & 0xff,
                tosh_date,
                key);
+       return 0;
+}
 
-       return temp-buffer;
+static int proc_toshiba_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, proc_toshiba_show, NULL);
 }
+
+static const struct file_operations proc_toshiba_fops = {
+       .owner          = THIS_MODULE,
+       .open           = proc_toshiba_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
 #endif
 
 
@@ -508,10 +518,15 @@ static int __init toshiba_init(void)
                return retval;
 
 #ifdef CONFIG_PROC_FS
-       /* register the proc entry */
-       if (create_proc_info_entry("toshiba", 0, NULL, tosh_get_info) == NULL) {
-               misc_deregister(&tosh_device);
-               return -ENOMEM;
+       {
+               struct proc_dir_entry *pde;
+
+               pde = create_proc_entry("toshiba", 0, NULL);
+               if (!pde) {
+                       misc_deregister(&tosh_device);
+                       return -ENOMEM;
+               }
+               pde->proc_fops = &proc_toshiba_fops;
        }
 #endif
 
index 47a6eacb10bc4c0c49dc54357be1f7adf9e36fd7..558ca927e32b1ebd4d9a7ea0c5b5b41b028b696b 100644 (file)
@@ -154,7 +154,7 @@ static int tty_release(struct inode *, struct file *);
 int tty_ioctl(struct inode * inode, struct file * file,
              unsigned int cmd, unsigned long arg);
 static int tty_fasync(int fd, struct file * filp, int on);
-static void release_mem(struct tty_struct *tty, int idx);
+static void release_tty(struct tty_struct *tty, int idx);
 
 /**
  *     alloc_tty_struct        -       allocate a tty object
@@ -1612,7 +1612,6 @@ void start_tty(struct tty_struct *tty)
 
        /* If we have a running line discipline it may need kicking */
        tty_wakeup(tty);
-       wake_up_interruptible(&tty->write_wait);
 }
 
 EXPORT_SYMBOL(start_tty);
@@ -2003,7 +2002,7 @@ static int init_dev(struct tty_driver *driver, int idx,
 
        /* 
         * All structures have been allocated, so now we install them.
-        * Failures after this point use release_mem to clean up, so 
+        * Failures after this point use release_tty to clean up, so
         * there's no need to null out the local pointers.
         */
        if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM)) {
@@ -2024,8 +2023,8 @@ static int init_dev(struct tty_driver *driver, int idx,
 
        /* 
         * Structures all installed ... call the ldisc open routines.
-        * If we fail here just call release_mem to clean up.  No need
-        * to decrement the use counts, as release_mem doesn't care.
+        * If we fail here just call release_tty to clean up.  No need
+        * to decrement the use counts, as release_tty doesn't care.
         */
 
        if (tty->ldisc.open) {
@@ -2095,17 +2094,17 @@ fail_no_mem:
        retval = -ENOMEM;
        goto end_init;
 
-       /* call the tty release_mem routine to clean out this slot */
+       /* call the tty release_tty routine to clean out this slot */
 release_mem_out:
        if (printk_ratelimit())
                printk(KERN_INFO "init_dev: ldisc open failed, "
                                 "clearing slot %d\n", idx);
-       release_mem(tty, idx);
+       release_tty(tty, idx);
        goto end_init;
 }
 
 /**
- *     release_mem             -       release tty structure memory
+ *     release_one_tty         -       release tty structure memory
  *
  *     Releases memory associated with a tty structure, and clears out the
  *     driver table slots. This function is called when a device is no longer
@@ -2117,37 +2116,14 @@ release_mem_out:
  *     of ttys that the driver keeps.
  *             FIXME: should we require tty_mutex is held here ??
  */
-
-static void release_mem(struct tty_struct *tty, int idx)
+static void release_one_tty(struct tty_struct *tty, int idx)
 {
-       struct tty_struct *o_tty;
-       struct ktermios *tp;
        int devpts = tty->driver->flags & TTY_DRIVER_DEVPTS_MEM;
-
-       if ((o_tty = tty->link) != NULL) {
-               if (!devpts)
-                       o_tty->driver->ttys[idx] = NULL;
-               if (o_tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
-                       tp = o_tty->termios;
-                       if (!devpts)
-                               o_tty->driver->termios[idx] = NULL;
-                       kfree(tp);
-
-                       tp = o_tty->termios_locked;
-                       if (!devpts)
-                               o_tty->driver->termios_locked[idx] = NULL;
-                       kfree(tp);
-               }
-               o_tty->magic = 0;
-               o_tty->driver->refcount--;
-               file_list_lock();
-               list_del_init(&o_tty->tty_files);
-               file_list_unlock();
-               free_tty_struct(o_tty);
-       }
+       struct ktermios *tp;
 
        if (!devpts)
                tty->driver->ttys[idx] = NULL;
+
        if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
                tp = tty->termios;
                if (!devpts)
@@ -2160,15 +2136,39 @@ static void release_mem(struct tty_struct *tty, int idx)
                kfree(tp);
        }
 
+
        tty->magic = 0;
        tty->driver->refcount--;
+
        file_list_lock();
        list_del_init(&tty->tty_files);
        file_list_unlock();
-       module_put(tty->driver->owner);
+
        free_tty_struct(tty);
 }
 
+/**
+ *     release_tty             -       release tty structure memory
+ *
+ *     Release both @tty and a possible linked partner (think pty pair),
+ *     and decrement the refcount of the backing module.
+ *
+ *     Locking:
+ *             tty_mutex - sometimes only
+ *             takes the file list lock internally when working on the list
+ *     of ttys that the driver keeps.
+ *             FIXME: should we require tty_mutex is held here ??
+ */
+static void release_tty(struct tty_struct *tty, int idx)
+{
+       struct tty_driver *driver = tty->driver;
+
+       if (tty->link)
+               release_one_tty(tty->link, idx);
+       release_one_tty(tty, idx);
+       module_put(driver->owner);
+}
+
 /*
  * Even releasing the tty structures is a tricky business.. We have
  * to be very careful that the structures are all released at the
@@ -2436,10 +2436,10 @@ static void release_dev(struct file * filp)
                tty_set_termios_ldisc(o_tty,N_TTY); 
        }
        /*
-        * The release_mem function takes care of the details of clearing
+        * The release_tty function takes care of the details of clearing
         * the slots and preserving the termios structure.
         */
-       release_mem(tty, idx);
+       release_tty(tty, idx);
 
 #ifdef CONFIG_UNIX98_PTYS
        /* Make this pty number available for reallocation */
@@ -3324,10 +3324,8 @@ int tty_ioctl(struct inode * inode, struct file * file,
  * Nasty bug: do_SAK is being called in interrupt context.  This can
  * deadlock.  We punt it up to process context.  AKPM - 16Mar2001
  */
-static void __do_SAK(struct work_struct *work)
+void __do_SAK(struct tty_struct *tty)
 {
-       struct tty_struct *tty =
-               container_of(work, struct tty_struct, SAK_work);
 #ifdef TTY_SOFT_SAK
        tty_hangup(tty);
 #else
@@ -3394,6 +3392,13 @@ static void __do_SAK(struct work_struct *work)
 #endif
 }
 
+static void do_SAK_work(struct work_struct *work)
+{
+       struct tty_struct *tty =
+               container_of(work, struct tty_struct, SAK_work);
+       __do_SAK(tty);
+}
+
 /*
  * The tq handling here is a little racy - tty->SAK_work may already be queued.
  * Fortunately we don't need to worry, because if ->SAK_work is already queued,
@@ -3404,7 +3409,7 @@ void do_SAK(struct tty_struct *tty)
 {
        if (!tty)
                return;
-       PREPARE_WORK(&tty->SAK_work, __do_SAK);
+       PREPARE_WORK(&tty->SAK_work, do_SAK_work);
        schedule_work(&tty->SAK_work);
 }
 
index dee47f40c6a3878656f5bcacddcabd98c34da676..fd471cb3338fbd1d008c936f5d44cfe5691a952b 100644 (file)
@@ -225,7 +225,7 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
 
 /**
  *     tty_termios_encode_baud_rate
- *     @termios: termios structure
+ *     @termios: ktermios structure holding user requested state
  *     @ispeed: input speed
  *     @ospeed: output speed
  *
@@ -233,7 +233,10 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
  *     used as a library helper for drivers os that they can report back
  *     the actual speed selected when it differs from the speed requested
  *
- *     For now input and output speed must agree.
+ *     For maximal back compatibility with legacy SYS5/POSIX *nix behaviour
+ *     we need to carefully set the bits when the user does not get the
+ *     desired speed. We allow small margins and preserve as much of possible
+ *     of the input intent to keep compatiblity.
  *
  *     Locking: Caller should hold termios lock. This is already held
  *     when calling this function from the driver termios handler.
@@ -242,32 +245,44 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
 void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud)
 {
        int i = 0;
-       int ifound = 0, ofound = 0;
+       int ifound = -1, ofound = -1;
+       int iclose = ibaud/50, oclose = obaud/50;
+       int ibinput = 0;
 
        termios->c_ispeed = ibaud;
        termios->c_ospeed = obaud;
 
+       /* If the user asked for a precise weird speed give a precise weird
+          answer. If they asked for a Bfoo speed they many have problems
+          digesting non-exact replies so fuzz a bit */
+
+       if ((termios->c_cflag & CBAUD) == BOTHER)
+               oclose = 0;
+       if (((termios->c_cflag >> IBSHIFT) & CBAUD) == BOTHER)
+               iclose = 0;
+       if ((termios->c_cflag >> IBSHIFT) & CBAUD)
+               ibinput = 1;    /* An input speed was specified */
+
        termios->c_cflag &= ~CBAUD;
-       /* Identical speed means no input encoding (ie B0 << IBSHIFT)*/
-       if (termios->c_ispeed == termios->c_ospeed)
-               ifound = 1;
 
        do {
-               if (obaud == baud_table[i]) {
+               if (obaud - oclose >= baud_table[i] && obaud + oclose <= baud_table[i]) {
                        termios->c_cflag |= baud_bits[i];
-                       ofound = 1;
-                       /* So that if ibaud == obaud we don't set it */
-                       continue;
+                       ofound = i;
                }
-               if (ibaud == baud_table[i]) {
-                       termios->c_cflag |= (baud_bits[i] << IBSHIFT);
-                       ifound = 1;
+               if (ibaud - iclose >= baud_table[i] && ibaud + iclose <= baud_table[i]) {
+                       /* For the case input == output don't set IBAUD bits if the user didn't do so */
+                       if (ofound != i || ibinput)
+                               termios->c_cflag |= (baud_bits[i] << IBSHIFT);
+                       ifound = i;
                }
        }
        while(++i < n_baud_table);
-       if (!ofound)
+       if (ofound == -1)
                termios->c_cflag |= BOTHER;
-       if (!ifound)
+       /* Set exact input bits only if the input and output differ or the
+          user already did */
+       if (ifound == -1 && (ibaud != obaud  || ibinput))
                termios->c_cflag |= (BOTHER << IBSHIFT);
 }
 
index 06c32a3e3ca42603df7470008711d9cc7b4fa5e1..13299b8fdbd673218e01494982d5c0e8df50d9c2 100644 (file)
@@ -136,9 +136,6 @@ const struct consw *conswitchp;
 #define DEFAULT_BELL_PITCH     750
 #define DEFAULT_BELL_DURATION  (HZ/8)
 
-extern void vcs_make_sysfs(struct tty_struct *tty);
-extern void vcs_remove_sysfs(struct tty_struct *tty);
-
 struct vc vc_cons [MAX_NR_CONSOLES];
 
 #ifndef VT_SINGLE_DRIVER
index dc8368ebb1ac932c2a8b18427b7197bdab371d82..3a5d301e783b062617f3e7043b42670e33ca2be2 100644 (file)
@@ -672,7 +672,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                vc->vt_mode = tmp;
                /* the frsig is ignored, so we set it to 0 */
                vc->vt_mode.frsig = 0;
-               put_pid(xchg(&vc->vt_pid, get_pid(task_pid(current))));
+               put_pid(vc->vt_pid);
+               vc->vt_pid = get_pid(task_pid(current));
                /* no switch is required -- saw@shade.msu.ru */
                vc->vt_newvt = -1;
                release_console_sem();
@@ -1063,12 +1064,35 @@ void reset_vc(struct vc_data *vc)
        vc->vt_mode.relsig = 0;
        vc->vt_mode.acqsig = 0;
        vc->vt_mode.frsig = 0;
-       put_pid(xchg(&vc->vt_pid, NULL));
+       put_pid(vc->vt_pid);
+       vc->vt_pid = NULL;
        vc->vt_newvt = -1;
        if (!in_interrupt())    /* Via keyboard.c:SAK() - akpm */
                reset_palette(vc);
 }
 
+void vc_SAK(struct work_struct *work)
+{
+       struct vc *vc_con =
+               container_of(work, struct vc, SAK_work);
+       struct vc_data *vc;
+       struct tty_struct *tty;
+
+       acquire_console_sem();
+       vc = vc_con->d;
+       if (vc) {
+               tty = vc->vc_tty;
+               /*
+                * SAK should also work in all raw modes and reset
+                * them properly.
+                */
+               if (tty)
+                       __do_SAK(tty);
+               reset_vc(vc);
+       }
+       release_console_sem();
+}
+
 /*
  * Performs the back end of a vt switch
  */
index 5c261e1f92b271e17094b05242c93959503dbad4..d8806e4f182984c841603d8d3d365c77d98c6cec 100644 (file)
@@ -233,6 +233,8 @@ edd_show_interface(struct edd_device *edev, char *buf)
 
 /**
  * edd_show_raw_data() - copies raw data to buffer for userspace to parse
+ * @edev: target edd_device
+ * @buf: output buffer
  *
  * Returns: number of bytes written, or -EINVAL on failure
  */
@@ -634,8 +636,8 @@ static decl_subsys(edd,&ktype_edd,NULL);
 
 /**
  * edd_dev_is_type() - is this EDD device a 'type' device?
- * @edev
- * @type - a host bus or interface identifier string per the EDD spec
+ * @edev: target edd_device
+ * @type: a host bus or interface identifier string per the EDD spec
  *
  * Returns 1 (TRUE) if it is a 'type' device, 0 otherwise.
  */
@@ -657,7 +659,7 @@ edd_dev_is_type(struct edd_device *edev, const char *type)
 
 /**
  * edd_get_pci_dev() - finds pci_dev that matches edev
- * @edev - edd_device
+ * @edev: edd_device
  *
  * Returns pci_dev if found, or NULL
  */
index aa049dab3d95c17609f3a1d54621f18a01896749..ad49bd823ebd11548696e43c66ee7392ac5a8306 100644 (file)
@@ -413,7 +413,6 @@ void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void
        while (p->name != NULL) {
                ent = create_proc_entry(p->name, p->mode, dir);
                if (!ent) return;
-               ent->nlink = 1;
                ent->data = data;
                ent->read_proc = p->read_proc;
                ent->write_proc = p->write_proc;
index 9291a86ca0537f279868ded87046d69a6ad18b5f..6ebfa27e4e16edadbe3a44e803a20c264dbb916d 100644 (file)
@@ -134,14 +134,13 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe,
        if (cqe >= 0xFFFFFFFF - 64 - additional_cqe)
                return ERR_PTR(-EINVAL);
 
-       my_cq = kmem_cache_alloc(cq_cache, GFP_KERNEL);
+       my_cq = kmem_cache_zalloc(cq_cache, GFP_KERNEL);
        if (!my_cq) {
                ehca_err(device, "Out of memory for ehca_cq struct device=%p",
                         device);
                return ERR_PTR(-ENOMEM);
        }
 
-       memset(my_cq, 0, sizeof(struct ehca_cq));
        memset(&param, 0, sizeof(struct ehca_alloc_cq_parms));
 
        spin_lock_init(&my_cq->spinlock);
index cfb362a1029caa979394fed9bc8fc54be60812ca..d22ab563633f0ed10c7cb476e5ebe5deec452ed0 100644 (file)
@@ -53,9 +53,8 @@ static struct ehca_mr *ehca_mr_new(void)
 {
        struct ehca_mr *me;
 
-       me = kmem_cache_alloc(mr_cache, GFP_KERNEL);
+       me = kmem_cache_zalloc(mr_cache, GFP_KERNEL);
        if (me) {
-               memset(me, 0, sizeof(struct ehca_mr));
                spin_lock_init(&me->mrlock);
        } else
                ehca_gen_err("alloc failed");
@@ -72,9 +71,8 @@ static struct ehca_mw *ehca_mw_new(void)
 {
        struct ehca_mw *me;
 
-       me = kmem_cache_alloc(mw_cache, GFP_KERNEL);
+       me = kmem_cache_zalloc(mw_cache, GFP_KERNEL);
        if (me) {
-               memset(me, 0, sizeof(struct ehca_mw));
                spin_lock_init(&me->mwlock);
        } else
                ehca_gen_err("alloc failed");
index d5345e5b3cd661a0de94104fb16bd4f1fca33c76..79d0591a80431eb487fad97590f1ecfa83f531b1 100644 (file)
@@ -50,14 +50,13 @@ struct ib_pd *ehca_alloc_pd(struct ib_device *device,
 {
        struct ehca_pd *pd;
 
-       pd = kmem_cache_alloc(pd_cache, GFP_KERNEL);
+       pd = kmem_cache_zalloc(pd_cache, GFP_KERNEL);
        if (!pd) {
                ehca_err(device, "device=%p context=%p out of memory",
                         device, context);
                return ERR_PTR(-ENOMEM);
        }
 
-       memset(pd, 0, sizeof(struct ehca_pd));
        pd->ownpid = current->tgid;
 
        /*
index 95efef921f1d9fed9543ca5b0f889af9c4f74862..df0516f2437989c2cf4d5c6faea9095de26332bf 100644 (file)
@@ -450,13 +450,12 @@ struct ib_qp *ehca_create_qp(struct ib_pd *pd,
        if (pd->uobject && udata)
                context = pd->uobject->context;
 
-       my_qp = kmem_cache_alloc(qp_cache, GFP_KERNEL);
+       my_qp = kmem_cache_zalloc(qp_cache, GFP_KERNEL);
        if (!my_qp) {
                ehca_err(pd->device, "pd=%p not enough memory to alloc qp", pd);
                return ERR_PTR(-ENOMEM);
        }
 
-       memset(my_qp, 0, sizeof(struct ehca_qp));
        memset (&parms, 0, sizeof(struct ehca_alloc_qp_parms));
        spin_lock_init(&my_qp->spinlock_s);
        spin_lock_init(&my_qp->spinlock_r);
index f68dbe6f7f04634ca7bf63688555de65be85f7f0..7b7a546323cfc1c2d65fea2663d1f3f50399f78e 100644 (file)
@@ -151,7 +151,6 @@ static int ns558_isa_probe(int io)
                return -ENOMEM;
        }
 
-       memset(ns558, 0, sizeof(struct ns558));
        ns558->io = io;
        ns558->size = 1 << i;
        ns558->gameport = port;
index b5e7f9c7d74e6bd5bac9c0e1126259fa1700038e..63e51dd6debe2a9b279ebb1281852a606f9d3301 100644 (file)
@@ -257,10 +257,10 @@ static inline void dump_urb(enum debuglevel level, const char *tag,
                        urb->transfer_flags);
                gig_dbg(level,
                        "  transfer_buffer=0x%08lx[%d], actual_length=%d, "
-                       "bandwidth=%d, setup_packet=0x%08lx,",
+                       "setup_packet=0x%08lx,",
                        (unsigned long) urb->transfer_buffer,
                        urb->transfer_buffer_length, urb->actual_length,
-                       urb->bandwidth, (unsigned long) urb->setup_packet);
+                       (unsigned long) urb->setup_packet);
                gig_dbg(level,
                        "  start_frame=%d, number_of_packets=%d, interval=%d, "
                        "error_count=%d,",
index 458b6462f93779c489440ecce018ead677145d5c..f13de20947e0bf74f74fe6d2aa43129818e5b4f8 100644 (file)
@@ -599,19 +599,9 @@ out:
 static void if_wake(unsigned long data)
 {
        struct cardstate *cs = (struct cardstate *) data;
-       struct tty_struct *tty;
-
-       tty = cs->tty;
-       if (!tty)
-               return;
-
-       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-           tty->ldisc.write_wakeup) {
-               gig_dbg(DEBUG_IF, "write wakeup call");
-               tty->ldisc.write_wakeup(tty);
-       }
 
-       wake_up_interruptible(&tty->write_wait);
+       if (cs->tty)
+               tty_wakeup(cs->tty);
 }
 
 /*** interface to common ***/
index fc80afe555b9e9063229dca25739aa5b33afe29a..ea5f30d4a5a23377bd2527211081b6bd0ff3e278 100644 (file)
@@ -1261,7 +1261,6 @@ isdn_tty_flush_buffer(struct tty_struct *tty)
        }
        isdn_tty_cleanup_xmit(info);
        info->xmit_count = 0;
-       wake_up_interruptible(&tty->write_wait);
        tty_wakeup(tty);
 }
 
index 8ca75e52f637021ea33f49d3c6a4175506313ecc..eb6653f69ce4dfc60111d5e34d9cbfd2fade4a1b 100644 (file)
@@ -516,7 +516,6 @@ static int __init via_pmu_dev_init(void)
                                        proc_get_irqstats, NULL);
                proc_pmu_options = create_proc_entry("options", 0600, proc_pmu_root);
                if (proc_pmu_options) {
-                       proc_pmu_options->nlink = 1;
                        proc_pmu_options->read_proc = proc_read_options;
                        proc_pmu_options->write_proc = proc_write_options;
                }
index 059704fbb753ada7df4f97da979071de1cac073a..5554adaa58f9be01d37bc5623f63384c084e69de 100644 (file)
@@ -666,7 +666,7 @@ static void bitmap_file_put(struct bitmap *bitmap)
 
        if (file) {
                struct inode *inode = file->f_path.dentry->d_inode;
-               invalidate_inode_pages(inode->i_mapping);
+               invalidate_mapping_pages(inode->i_mapping, 0, -1);
                fput(file);
        }
 }
index 862a984c2155c6d8a739f54f4007f90b1a20f13b..e10a9ee25fc508d30685ba8f8bdf51f114baf857 100644 (file)
@@ -562,7 +562,6 @@ jpg_fbuffer_alloc (struct file *file)
                        jpg_fbuffer_free(file);
                        return -ENOBUFS;
                }
-               memset((void *) mem, 0, PAGE_SIZE);
                fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem;
                fh->jpg_buffers.buffer[i].frag_tab_bus =
                    virt_to_bus((void *) mem);
index ea9d5f233c83037568350a82224d5870bda6a7ba..6a51e99a8079995adfb9183a0af21108eb0705ff 100644 (file)
@@ -72,11 +72,9 @@ static int hdpu_nexus_probe(struct platform_device *pdev)
                printk("Could not map slot id\n");
        hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root);
        hdpu_slot_id->read_proc = hdpu_slot_id_read;
-       hdpu_slot_id->nlink = 1;
 
        hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root);
        hdpu_chassis_id->read_proc = hdpu_chassis_id_read;
-       hdpu_chassis_id->nlink = 1;
        return 0;
 }
 
index b995a15b7526a43d12439ce955fb91579d4cff72..6a5a05d1f3923d81ee54ce2df63a0e2fca7f4d37 100644 (file)
@@ -309,7 +309,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
                ret = -ENODEV;
                goto out_pci;
        }
-       if (!request_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs),
+       if (!request_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs),
                            "ioc4_misc")) {
                printk(KERN_WARNING
                       "%s: Unable to request IOC4 misc region "
@@ -379,7 +379,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
        return 0;
 
 out_misc_region:
-       release_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs));
+       release_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs));
 out_pci:
        kfree(idd);
 out_idd:
@@ -418,7 +418,7 @@ ioc4_remove(struct pci_dev *pdev)
                       "Device removal may be incomplete.\n",
                       __FUNCTION__, pci_name(idd->idd_pdev));
        }
-       release_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs));
+       release_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs));
 
        /* Disable IOC4 and relinquish */
        pci_disable_device(pdev);
index 6d917a4daa9db24b4d9e7cb23281e1842cef9283..f9f2ce7806b0b3edc21a5d6763736f56329a4ee8 100644 (file)
@@ -278,7 +278,8 @@ static void block2mtd_free_device(struct block2mtd_dev *dev)
        kfree(dev->mtd.name);
 
        if (dev->blkdev) {
-               invalidate_inode_pages(dev->blkdev->bd_inode->i_mapping);
+               invalidate_mapping_pages(dev->blkdev->bd_inode->i_mapping,
+                                       0, -1);
                close_bdev_excl(dev->blkdev);
        }
 
index c6de566188e4d6db66667b1855031d90b9dc8524..0986f6c843e6974d87298c3b5f87d444d594858f 100644 (file)
@@ -83,7 +83,7 @@ struct ppp_file {
        int             dead;           /* unit/channel has been shut down */
 };
 
-#define PF_TO_X(pf, X)         ((X *)((char *)(pf) - offsetof(X, file)))
+#define PF_TO_X(pf, X)         container_of(pf, X, file)
 
 #define PF_TO_PPP(pf)          PF_TO_X(pf, struct ppp)
 #define PF_TO_CHANNEL(pf)      PF_TO_X(pf, struct channel)
index 8dac2ba82bb95ee748d6b69d5f56e02f4b30e329..9a731c101d102ed11305372a6416b9b92ac3d76c 100644 (file)
@@ -252,7 +252,6 @@ static int __init led_create_procfs(void)
        proc_pdc_root->owner = THIS_MODULE;
        ent = create_proc_entry("led", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root);
        if (!ent) return -1;
-       ent->nlink = 1;
        ent->data = (void *)LED_NOLCD; /* LED */
        ent->read_proc = led_proc_read;
        ent->write_proc = led_proc_write;
@@ -262,7 +261,6 @@ static int __init led_create_procfs(void)
        {
                ent = create_proc_entry("lcd", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root);
                if (!ent) return -1;
-               ent->nlink = 1;
                ent->data = (void *)LED_HASLCD; /* LCD */
                ent->read_proc = led_proc_read;
                ent->write_proc = led_proc_write;
index 3cfb0a3575e660938abc6070c9048563ddd7c287..5ea5bc70cb8215cf078bd38fe77ba82f34e80554 100644 (file)
@@ -4,7 +4,7 @@
 config PCI_MSI
        bool "Message Signaled Interrupts (MSI and MSI-X)"
        depends on PCI
-       depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64
+       depends on (X86_LOCAL_APIC && X86_IO_APIC) || IA64 || SPARC64
        help
           This allows device drivers to enable MSI (Message Signaled
           Interrupts).  Message Signaled Interrupts enable a device to
index 6b8c4cfd02a697a5f8e8f6dc68ab4ae7ed890b0d..31a633f6554769c46cd5676d13a758a104137738 100644 (file)
@@ -1,4 +1,3 @@
-extern struct bus_type pnp_bus_type;
 extern spinlock_t pnp_lock;
 void *pnp_alloc(long size);
 int pnp_interface_attach_device(struct pnp_dev *dev);
index 95b79685a9d1e1f72dbe6b36f68748c60c7bd034..3c2ab8394e3f987b71a555461e98c3c0b1a58e3e 100644 (file)
@@ -530,7 +530,6 @@ pnpbios_parse_compatible_ids(unsigned char *p, unsigned char *end, struct pnp_de
                        dev_id =  kzalloc(sizeof (struct pnp_id), GFP_KERNEL);
                        if (!dev_id)
                                return NULL;
-                       memset(dev_id, 0, sizeof(struct pnp_id));
                        pnpid32_to_pnpid(p[1] | p[2] << 8 | p[3] << 16 | p[4] << 24,id);
                        memcpy(&dev_id->id, id, 7);
                        pnp_add_id(dev_id, dev);
index 7bf7b2c88245358e023b1ddc8d97a19999b1a047..f935c1f71a583db4dff6d14937e972096717f0b7 100644 (file)
@@ -326,14 +326,17 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
        rio_mport_read_config_32(port, destid, hopcount, RIO_DST_OPS_CAR,
                                 &rdev->dst_ops);
 
-       if (rio_device_has_destid(port, rdev->src_ops, rdev->dst_ops)
-           && do_enum) {
-               rio_set_device_id(port, destid, hopcount, next_destid);
-               rdev->destid = next_destid++;
-               if (next_destid == port->host_deviceid)
-                       next_destid++;
+       if (rio_device_has_destid(port, rdev->src_ops, rdev->dst_ops)) {
+               if (do_enum) {
+                       rio_set_device_id(port, destid, hopcount, next_destid);
+                       rdev->destid = next_destid++;
+                       if (next_destid == port->host_deviceid)
+                               next_destid++;
+               } else
+                       rdev->destid = rio_get_device_id(port, destid, hopcount);
        } else
-               rdev->destid = rio_get_device_id(port, destid, hopcount);
+               /* Switch device has an associated destID */
+               rdev->destid = RIO_INVALID_DESTID;
 
        /* If a PE has both switch and other functions, show it as a switch */
        if (rio_is_switch(rdev)) {
@@ -347,7 +350,7 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
                }
                rswitch->switchid = next_switchid;
                rswitch->hopcount = hopcount;
-               rswitch->destid = 0xffff;
+               rswitch->destid = destid;
                /* Initialize switch route table */
                for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES; rdid++)
                        rswitch->route_table[rdid] = RIO_INVALID_ROUTE;
@@ -422,7 +425,7 @@ rio_sport_is_active(struct rio_mport *port, u16 destid, u8 hopcount, int sport)
 /**
  * rio_route_add_entry- Add a route entry to a switch routing table
  * @mport: Master port to send transaction
- * @rdev: Switch device
+ * @rswitch: Switch device
  * @table: Routing table ID
  * @route_destid: Destination ID to be routed
  * @route_port: Port number to be routed
@@ -434,18 +437,18 @@ rio_sport_is_active(struct rio_mport *port, u16 destid, u8 hopcount, int sport)
  * %RIO_GLOBAL_TABLE in @table. Returns %0 on success or %-EINVAL
  * on failure.
  */
-static int rio_route_add_entry(struct rio_mport *mport, struct rio_dev *rdev,
+static int rio_route_add_entry(struct rio_mport *mport, struct rio_switch *rswitch,
                               u16 table, u16 route_destid, u8 route_port)
 {
-       return rdev->rswitch->add_entry(mport, rdev->rswitch->destid,
-                                       rdev->rswitch->hopcount, table,
+       return rswitch->add_entry(mport, rswitch->destid,
+                                       rswitch->hopcount, table,
                                        route_destid, route_port);
 }
 
 /**
  * rio_route_get_entry- Read a route entry in a switch routing table
  * @mport: Master port to send transaction
- * @rdev: Switch device
+ * @rswitch: Switch device
  * @table: Routing table ID
  * @route_destid: Destination ID to be routed
  * @route_port: Pointer to read port number into
@@ -458,11 +461,11 @@ static int rio_route_add_entry(struct rio_mport *mport, struct rio_dev *rdev,
  * on failure.
  */
 static int
-rio_route_get_entry(struct rio_mport *mport, struct rio_dev *rdev, u16 table,
+rio_route_get_entry(struct rio_mport *mport, struct rio_switch *rswitch, u16 table,
                    u16 route_destid, u8 * route_port)
 {
-       return rdev->rswitch->get_entry(mport, rdev->rswitch->destid,
-                                       rdev->rswitch->hopcount, table,
+       return rswitch->get_entry(mport, rswitch->destid,
+                                       rswitch->hopcount, table,
                                        route_destid, route_port);
 }
 
@@ -552,6 +555,8 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port,
        int port_num;
        int num_ports;
        int cur_destid;
+       int sw_destid;
+       int sw_inport;
        struct rio_dev *rdev;
        u16 destid;
        int tmp;
@@ -594,15 +599,17 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port,
 
        if (rio_is_switch(rdev)) {
                next_switchid++;
+               sw_inport = rio_get_swpinfo_inport(port, RIO_ANY_DESTID, hopcount);
+               rio_route_add_entry(port, rdev->rswitch, RIO_GLOBAL_TABLE,
+                                   port->host_deviceid, sw_inport);
+               rdev->rswitch->route_table[port->host_deviceid] = sw_inport;
 
                for (destid = 0; destid < next_destid; destid++) {
-                       rio_route_add_entry(port, rdev, RIO_GLOBAL_TABLE,
-                                           destid, rio_get_swpinfo_inport(port,
-                                                                          RIO_ANY_DESTID,
-                                                                          hopcount));
-                       rdev->rswitch->route_table[destid] =
-                           rio_get_swpinfo_inport(port, RIO_ANY_DESTID,
-                                                  hopcount);
+                       if (destid == port->host_deviceid)
+                               continue;
+                       rio_route_add_entry(port, rdev->rswitch, RIO_GLOBAL_TABLE,
+                                           destid, sw_inport);
+                       rdev->rswitch->route_table[destid] = sw_inport;
                }
 
                num_ports =
@@ -610,9 +617,9 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port,
                pr_debug(
                    "RIO: found %s (vid %4.4x did %4.4x) with %d ports\n",
                    rio_name(rdev), rdev->vid, rdev->did, num_ports);
+               sw_destid = next_destid;
                for (port_num = 0; port_num < num_ports; port_num++) {
-                       if (rio_get_swpinfo_inport
-                           (port, RIO_ANY_DESTID, hopcount) == port_num)
+                       if (sw_inport == port_num)
                                continue;
 
                        cur_destid = next_destid;
@@ -622,7 +629,7 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port,
                                pr_debug(
                                    "RIO: scanning device on port %d\n",
                                    port_num);
-                               rio_route_add_entry(port, rdev,
+                               rio_route_add_entry(port, rdev->rswitch,
                                                    RIO_GLOBAL_TABLE,
                                                    RIO_ANY_DESTID, port_num);
 
@@ -633,7 +640,9 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port,
                                if (next_destid > cur_destid) {
                                        for (destid = cur_destid;
                                             destid < next_destid; destid++) {
-                                               rio_route_add_entry(port, rdev,
+                                               if (destid == port->host_deviceid)
+                                                       continue;
+                                               rio_route_add_entry(port, rdev->rswitch,
                                                                    RIO_GLOBAL_TABLE,
                                                                    destid,
                                                                    port_num);
@@ -641,10 +650,18 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port,
                                                    route_table[destid] =
                                                    port_num;
                                        }
-                                       rdev->rswitch->destid = cur_destid;
                                }
                        }
                }
+
+               /* Check for empty switch */
+               if (next_destid == sw_destid) {
+                       next_destid++;
+                       if (next_destid == port->host_deviceid)
+                               next_destid++;
+               }
+
+               rdev->rswitch->destid = sw_destid;
        } else
                pr_debug("RIO: found %s (vid %4.4x did %4.4x)\n",
                    rio_name(rdev), rdev->vid, rdev->did);
@@ -721,7 +738,7 @@ rio_disc_peer(struct rio_net *net, struct rio_mport *port, u16 destid,
                                    port_num);
                                for (ndestid = 0; ndestid < RIO_ANY_DESTID;
                                     ndestid++) {
-                                       rio_route_get_entry(port, rdev,
+                                       rio_route_get_entry(port, rdev->rswitch,
                                                            RIO_GLOBAL_TABLE,
                                                            ndestid,
                                                            &route_port);
@@ -797,6 +814,44 @@ static struct rio_net __devinit *rio_alloc_net(struct rio_mport *port)
        return net;
 }
 
+/**
+ * rio_update_route_tables- Updates route tables in switches
+ * @port: Master port associated with the RIO network
+ *
+ * For each enumerated device, ensure that each switch in a system
+ * has correct routing entries. Add routes for devices that where
+ * unknown dirung the first enumeration pass through the switch.
+ */
+static void rio_update_route_tables(struct rio_mport *port)
+{
+       struct rio_dev *rdev;
+       struct rio_switch *rswitch;
+       u8 sport;
+       u16 destid;
+
+       list_for_each_entry(rdev, &rio_devices, global_list) {
+
+               destid = (rio_is_switch(rdev))?rdev->rswitch->destid:rdev->destid;
+
+               list_for_each_entry(rswitch, &rio_switches, node) {
+
+                       if (rio_is_switch(rdev) && (rdev->rswitch == rswitch))
+                               continue;
+
+                       if (RIO_INVALID_ROUTE == rswitch->route_table[destid]) {
+
+                               sport = rio_get_swpinfo_inport(port,
+                                               rswitch->destid, rswitch->hopcount);
+
+                               if (rswitch->add_entry) {
+                                       rio_route_add_entry(port, rswitch, RIO_GLOBAL_TABLE, destid, sport);
+                                       rswitch->route_table[destid] = sport;
+                               }
+                       }
+               }
+       }
+}
+
 /**
  * rio_enum_mport- Start enumeration through a master port
  * @mport: Master port to send transactions
@@ -838,6 +893,7 @@ int rio_enum_mport(struct rio_mport *mport)
                        rc = -EBUSY;
                        goto out;
                }
+               rio_update_route_tables(mport);
                rio_clear_locks(mport);
        } else {
                printk(KERN_INFO "RIO: master port %d link inactive\n",
@@ -865,8 +921,8 @@ static void rio_build_route_tables(void)
            if (rio_is_switch(rdev))
                for (i = 0; i < RIO_MAX_ROUTE_ENTRIES; i++) {
                        if (rio_route_get_entry
-                           (rdev->net->hport, rdev, RIO_GLOBAL_TABLE, i,
-                            &sport) < 0)
+                           (rdev->net->hport, rdev->rswitch, RIO_GLOBAL_TABLE,
+                            i, &sport) < 0)
                                continue;
                        rdev->rswitch->route_table[i] = sport;
                }
index 09660e2ab051d6d9e9a313686fc894ca4cbfe6e3..4bbca500d3d212bf264ddff889da7c05b258b5f5 100644 (file)
@@ -1,4 +1,4 @@
-\#
+#
 # RTC class/drivers configuration
 #
 
@@ -95,6 +95,29 @@ config RTC_INTF_DEV_UIE_EMUL
 comment "RTC drivers"
        depends on RTC_CLASS
 
+# this 'CMOS' RTC driver is arch dependent because <asm-generic/rtc.h>
+# requires <asm/mc146818rtc.h> defining CMOS_READ/CMOS_WRITE, and a
+# global rtc_lock ... it's not yet just another platform_device.
+
+config RTC_DRV_CMOS
+       tristate "PC-style 'CMOS' real time clock"
+       depends on RTC_CLASS && (X86_PC || ALPHA || ARM26 || ARM \
+               || M32R || ATARI || POWERPC)
+       help
+         Say "yes" here to get direct support for the real time clock
+         found in every PC or ACPI-based system, and some other boards.
+         Specifically the original MC146818, compatibles like those in
+         PC south bridges, the DS12887 or M48T86, some multifunction
+         or LPC bus chips, and so on.
+
+         Your system will need to define the platform device used by
+         this driver, otherwise it won't be accessible.  This means
+         you can safely enable this driver if you don't know whether
+         or not your board has this kind of hardware.
+
+         This driver can also be built as a module. If so, the module
+         will be called rtc-cmos.
+
 config RTC_DRV_X1205
        tristate "Xicor/Intersil X1205"
        depends on RTC_CLASS && I2C
index e6beedacc96614ad329b82a9167d2e7b989e5de2..92bfe1b3a5faccb4122a7823cbf3720dc0d897eb 100644 (file)
@@ -15,6 +15,7 @@ obj-$(CONFIG_RTC_INTF_SYSFS)  += rtc-sysfs.o
 obj-$(CONFIG_RTC_INTF_PROC)    += rtc-proc.o
 obj-$(CONFIG_RTC_INTF_DEV)     += rtc-dev.o
 
+obj-$(CONFIG_RTC_DRV_CMOS)     += rtc-cmos.o
 obj-$(CONFIG_RTC_DRV_X1205)    += rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_ISL1208)  += rtc-isl1208.o
 obj-$(CONFIG_RTC_DRV_TEST)     += rtc-test.o
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
new file mode 100644 (file)
index 0000000..85bf795
--- /dev/null
@@ -0,0 +1,725 @@
+/*
+ * RTC class driver for "CMOS RTC":  PCs, ACPI, etc
+ *
+ * Copyright (C) 1996 Paul Gortmaker (drivers/char/rtc.c)
+ * Copyright (C) 2006 David Brownell (convert to new framework)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/*
+ * The original "cmos clock" chip was an MC146818 chip, now obsolete.
+ * That defined the register interface now provided by all PCs, some
+ * non-PC systems, and incorporated into ACPI.  Modern PC chipsets
+ * integrate an MC146818 clone in their southbridge, and boards use
+ * that instead of discrete clones like the DS12887 or M48T86.  There
+ * are also clones that connect using the LPC bus.
+ *
+ * That register API is also used directly by various other drivers
+ * (notably for integrated NVRAM), infrastructure (x86 has code to
+ * bypass the RTC framework, directly reading the RTC during boot
+ * and updating minutes/seconds for systems using NTP synch) and
+ * utilities (like userspace 'hwclock', if no /dev node exists).
+ *
+ * So **ALL** calls to CMOS_READ and CMOS_WRITE must be done with
+ * interrupts disabled, holding the global rtc_lock, to exclude those
+ * other drivers and utilities on correctly configured systems.
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/spinlock.h>
+#include <linux/platform_device.h>
+#include <linux/mod_devicetable.h>
+
+/* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
+#include <asm-generic/rtc.h>
+
+
+struct cmos_rtc {
+       struct rtc_device       *rtc;
+       struct device           *dev;
+       int                     irq;
+       struct resource         *iomem;
+
+       u8                      suspend_ctrl;
+
+       /* newer hardware extends the original register set */
+       u8                      day_alrm;
+       u8                      mon_alrm;
+       u8                      century;
+};
+
+/* both platform and pnp busses use negative numbers for invalid irqs */
+#define is_valid_irq(n)                ((n) >= 0)
+
+static const char driver_name[] = "rtc_cmos";
+
+/*----------------------------------------------------------------*/
+
+static int cmos_read_time(struct device *dev, struct rtc_time *t)
+{
+       /* REVISIT:  if the clock has a "century" register, use
+        * that instead of the heuristic in get_rtc_time().
+        * That'll make Y3K compatility (year > 2070) easy!
+        */
+       get_rtc_time(t);
+       return 0;
+}
+
+static int cmos_set_time(struct device *dev, struct rtc_time *t)
+{
+       /* REVISIT:  set the "century" register if available
+        *
+        * NOTE: this ignores the issue whereby updating the seconds
+        * takes effect exactly 500ms after we write the register.
+        * (Also queueing and other delays before we get this far.)
+        */
+       return set_rtc_time(t);
+}
+
+static int cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+       unsigned char   rtc_control;
+
+       if (!is_valid_irq(cmos->irq))
+               return -EIO;
+
+       /* Basic alarms only support hour, minute, and seconds fields.
+        * Some also support day and month, for alarms up to a year in
+        * the future.
+        */
+       t->time.tm_mday = -1;
+       t->time.tm_mon = -1;
+
+       spin_lock_irq(&rtc_lock);
+       t->time.tm_sec = CMOS_READ(RTC_SECONDS_ALARM);
+       t->time.tm_min = CMOS_READ(RTC_MINUTES_ALARM);
+       t->time.tm_hour = CMOS_READ(RTC_HOURS_ALARM);
+
+       if (cmos->day_alrm) {
+               t->time.tm_mday = CMOS_READ(cmos->day_alrm);
+               if (!t->time.tm_mday)
+                       t->time.tm_mday = -1;
+
+               if (cmos->mon_alrm) {
+                       t->time.tm_mon = CMOS_READ(cmos->mon_alrm);
+                       if (!t->time.tm_mon)
+                               t->time.tm_mon = -1;
+               }
+       }
+
+       rtc_control = CMOS_READ(RTC_CONTROL);
+       spin_unlock_irq(&rtc_lock);
+
+       /* REVISIT this assumes PC style usage:  always BCD */
+
+       if (((unsigned)t->time.tm_sec) < 0x60)
+               t->time.tm_sec = BCD2BIN(t->time.tm_sec);
+       else
+               t->time.tm_sec = -1;
+       if (((unsigned)t->time.tm_min) < 0x60)
+               t->time.tm_min = BCD2BIN(t->time.tm_min);
+       else
+               t->time.tm_min = -1;
+       if (((unsigned)t->time.tm_hour) < 0x24)
+               t->time.tm_hour = BCD2BIN(t->time.tm_hour);
+       else
+               t->time.tm_hour = -1;
+
+       if (cmos->day_alrm) {
+               if (((unsigned)t->time.tm_mday) <= 0x31)
+                       t->time.tm_mday = BCD2BIN(t->time.tm_mday);
+               else
+                       t->time.tm_mday = -1;
+               if (cmos->mon_alrm) {
+                       if (((unsigned)t->time.tm_mon) <= 0x12)
+                               t->time.tm_mon = BCD2BIN(t->time.tm_mon) - 1;
+                       else
+                               t->time.tm_mon = -1;
+               }
+       }
+       t->time.tm_year = -1;
+
+       t->enabled = !!(rtc_control & RTC_AIE);
+       t->pending = 0;
+
+       return 0;
+}
+
+static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+       unsigned char   mon, mday, hrs, min, sec;
+       unsigned char   rtc_control, rtc_intr;
+
+       if (!is_valid_irq(cmos->irq))
+               return -EIO;
+
+       /* REVISIT this assumes PC style usage:  always BCD */
+
+       /* Writing 0xff means "don't care" or "match all".  */
+
+       mon = t->time.tm_mon;
+       mon = (mon < 12) ? BIN2BCD(mon) : 0xff;
+       mon++;
+
+       mday = t->time.tm_mday;
+       mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff;
+
+       hrs = t->time.tm_hour;
+       hrs = (hrs < 24) ? BIN2BCD(hrs) : 0xff;
+
+       min = t->time.tm_min;
+       min = (min < 60) ? BIN2BCD(min) : 0xff;
+
+       sec = t->time.tm_sec;
+       sec = (sec < 60) ? BIN2BCD(sec) : 0xff;
+
+       spin_lock_irq(&rtc_lock);
+
+       /* next rtc irq must not be from previous alarm setting */
+       rtc_control = CMOS_READ(RTC_CONTROL);
+       rtc_control &= ~RTC_AIE;
+       CMOS_WRITE(rtc_control, RTC_CONTROL);
+       rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
+       if (rtc_intr)
+               rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr);
+
+       /* update alarm */
+       CMOS_WRITE(hrs, RTC_HOURS_ALARM);
+       CMOS_WRITE(min, RTC_MINUTES_ALARM);
+       CMOS_WRITE(sec, RTC_SECONDS_ALARM);
+
+       /* the system may support an "enhanced" alarm */
+       if (cmos->day_alrm) {
+               CMOS_WRITE(mday, cmos->day_alrm);
+               if (cmos->mon_alrm)
+                       CMOS_WRITE(mon, cmos->mon_alrm);
+       }
+
+       if (t->enabled) {
+               rtc_control |= RTC_AIE;
+               CMOS_WRITE(rtc_control, RTC_CONTROL);
+               rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
+               if (rtc_intr)
+                       rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr);
+       }
+
+       spin_unlock_irq(&rtc_lock);
+
+       return 0;
+}
+
+static int cmos_set_freq(struct device *dev, int freq)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+       int             f;
+       unsigned long   flags;
+
+       if (!is_valid_irq(cmos->irq))
+               return -ENXIO;
+
+       /* 0 = no irqs; 1 = 2^15 Hz ... 15 = 2^0 Hz */
+       f = ffs(freq);
+       if (f != 0) {
+               if (f-- > 16 || freq != (1 << f))
+                       return -EINVAL;
+               f = 16 - f;
+       }
+
+       spin_lock_irqsave(&rtc_lock, flags);
+       CMOS_WRITE(RTC_REF_CLCK_32KHZ | f, RTC_FREQ_SELECT);
+       spin_unlock_irqrestore(&rtc_lock, flags);
+
+       return 0;
+}
+
+#if defined(CONFIG_RTC_INTF_DEV) || defined(CONFIG_RTC_INTF_DEV_MODULE)
+
+static int
+cmos_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+       unsigned char   rtc_control, rtc_intr;
+       unsigned long   flags;
+
+       switch (cmd) {
+       case RTC_AIE_OFF:
+       case RTC_AIE_ON:
+       case RTC_UIE_OFF:
+       case RTC_UIE_ON:
+       case RTC_PIE_OFF:
+       case RTC_PIE_ON:
+               if (!is_valid_irq(cmos->irq))
+                       return -EINVAL;
+               break;
+       default:
+               return -ENOIOCTLCMD;
+       }
+
+       spin_lock_irqsave(&rtc_lock, flags);
+       rtc_control = CMOS_READ(RTC_CONTROL);
+       switch (cmd) {
+       case RTC_AIE_OFF:       /* alarm off */
+               rtc_control &= ~RTC_AIE;
+               break;
+       case RTC_AIE_ON:        /* alarm on */
+               rtc_control |= RTC_AIE;
+               break;
+       case RTC_UIE_OFF:       /* update off */
+               rtc_control &= ~RTC_UIE;
+               break;
+       case RTC_UIE_ON:        /* update on */
+               rtc_control |= RTC_UIE;
+               break;
+       case RTC_PIE_OFF:       /* periodic off */
+               rtc_control &= ~RTC_PIE;
+               break;
+       case RTC_PIE_ON:        /* periodic on */
+               rtc_control |= RTC_PIE;
+               break;
+       }
+       CMOS_WRITE(rtc_control, RTC_CONTROL);
+       rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
+       if (rtc_intr)
+               rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr);
+       spin_unlock_irqrestore(&rtc_lock, flags);
+       return 0;
+}
+
+#else
+#define        cmos_rtc_ioctl  NULL
+#endif
+
+#if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE)
+
+static int cmos_procfs(struct device *dev, struct seq_file *seq)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+       unsigned char   rtc_control, valid;
+
+       spin_lock_irq(&rtc_lock);
+       rtc_control = CMOS_READ(RTC_CONTROL);
+       valid = CMOS_READ(RTC_VALID);
+       spin_unlock_irq(&rtc_lock);
+
+       /* NOTE:  at least ICH6 reports battery status using a different
+        * (non-RTC) bit; and SQWE is ignored on many current systems.
+        */
+       return seq_printf(seq,
+                       "periodic_IRQ\t: %s\n"
+                       "update_IRQ\t: %s\n"
+                       // "square_wave\t: %s\n"
+                       // "BCD\t\t: %s\n"
+                       "DST_enable\t: %s\n"
+                       "periodic_freq\t: %d\n"
+                       "batt_status\t: %s\n",
+                       (rtc_control & RTC_PIE) ? "yes" : "no",
+                       (rtc_control & RTC_UIE) ? "yes" : "no",
+                       // (rtc_control & RTC_SQWE) ? "yes" : "no",
+                       // (rtc_control & RTC_DM_BINARY) ? "no" : "yes",
+                       (rtc_control & RTC_DST_EN) ? "yes" : "no",
+                       cmos->rtc->irq_freq,
+                       (valid & RTC_VRT) ? "okay" : "dead");
+}
+
+#else
+#define        cmos_procfs     NULL
+#endif
+
+static const struct rtc_class_ops cmos_rtc_ops = {
+       .ioctl          = cmos_rtc_ioctl,
+       .read_time      = cmos_read_time,
+       .set_time       = cmos_set_time,
+       .read_alarm     = cmos_read_alarm,
+       .set_alarm      = cmos_set_alarm,
+       .proc           = cmos_procfs,
+       .irq_set_freq   = cmos_set_freq,
+};
+
+/*----------------------------------------------------------------*/
+
+static struct cmos_rtc cmos_rtc;
+
+static irqreturn_t cmos_interrupt(int irq, void *p)
+{
+       u8              irqstat;
+
+       spin_lock(&rtc_lock);
+       irqstat = CMOS_READ(RTC_INTR_FLAGS);
+       spin_unlock(&rtc_lock);
+
+       if (irqstat) {
+               /* NOTE: irqstat may have e.g. RTC_PF set
+                * even when RTC_PIE is clear...
+                */
+               rtc_update_irq(p, 1, irqstat);
+               return IRQ_HANDLED;
+       } else
+               return IRQ_NONE;
+}
+
+#ifdef CONFIG_PNPACPI
+#define        is_pnpacpi()    1
+#define        INITSECTION
+
+#else
+#define        is_pnpacpi()    0
+#define        INITSECTION     __init
+#endif
+
+static int INITSECTION
+cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
+{
+       struct cmos_rtc_board_info      *info = dev->platform_data;
+       int                             retval = 0;
+       unsigned char                   rtc_control;
+
+       /* there can be only one ... */
+       if (cmos_rtc.dev)
+               return -EBUSY;
+
+       if (!ports)
+               return -ENODEV;
+
+       cmos_rtc.irq = rtc_irq;
+       cmos_rtc.iomem = ports;
+
+       /* For ACPI systems the info comes from the FADT.  On others,
+        * board specific setup provides it as appropriate.
+        */
+       if (info) {
+               cmos_rtc.day_alrm = info->rtc_day_alarm;
+               cmos_rtc.mon_alrm = info->rtc_mon_alarm;
+               cmos_rtc.century = info->rtc_century;
+       }
+
+       cmos_rtc.rtc = rtc_device_register(driver_name, dev,
+                               &cmos_rtc_ops, THIS_MODULE);
+       if (IS_ERR(cmos_rtc.rtc))
+               return PTR_ERR(cmos_rtc.rtc);
+
+       cmos_rtc.dev = dev;
+       dev_set_drvdata(dev, &cmos_rtc);
+
+       /* platform and pnp busses handle resources incompatibly.
+        *
+        * REVISIT for non-x86 systems we may need to handle io memory
+        * resources: ioremap them, and request_mem_region().
+        */
+       if (is_pnpacpi()) {
+               retval = request_resource(&ioport_resource, ports);
+               if (retval < 0) {
+                       dev_dbg(dev, "i/o registers already in use\n");
+                       goto cleanup0;
+               }
+       }
+       rename_region(ports, cmos_rtc.rtc->class_dev.class_id);
+
+       spin_lock_irq(&rtc_lock);
+
+       /* force periodic irq to CMOS reset default of 1024Hz;
+        *
+        * REVISIT it's been reported that at least one x86_64 ALI mobo
+        * doesn't use 32KHz here ... for portability we might need to
+        * do something about other clock frequencies.
+        */
+       CMOS_WRITE(RTC_REF_CLCK_32KHZ | 0x06, RTC_FREQ_SELECT);
+       cmos_rtc.rtc->irq_freq = 1024;
+
+       /* disable irqs.
+        *
+        * NOTE after changing RTC_xIE bits we always read INTR_FLAGS;
+        * allegedly some older rtcs need that to handle irqs properly
+        */
+       rtc_control = CMOS_READ(RTC_CONTROL);
+       rtc_control &= ~(RTC_PIE | RTC_AIE | RTC_UIE);
+       CMOS_WRITE(rtc_control, RTC_CONTROL);
+       CMOS_READ(RTC_INTR_FLAGS);
+
+       spin_unlock_irq(&rtc_lock);
+
+       /* FIXME teach the alarm code how to handle binary mode;
+        * <asm-generic/rtc.h> doesn't know 12-hour mode either.
+        */
+       if (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY))) {
+               dev_dbg(dev, "only 24-hr BCD mode supported\n");
+               retval = -ENXIO;
+               goto cleanup1;
+       }
+
+       if (is_valid_irq(rtc_irq))
+               retval = request_irq(rtc_irq, cmos_interrupt, IRQF_DISABLED,
+                               cmos_rtc.rtc->class_dev.class_id,
+                               &cmos_rtc.rtc->class_dev);
+       if (retval < 0) {
+               dev_dbg(dev, "IRQ %d is already in use\n", rtc_irq);
+               goto cleanup1;
+       }
+
+       /* REVISIT optionally make 50 or 114 bytes NVRAM available,
+        * like rtc-ds1553, rtc-ds1742 ... this will often include
+        * registers for century, and day/month alarm.
+        */
+
+       pr_info("%s: alarms up to one %s%s\n",
+                       cmos_rtc.rtc->class_dev.class_id,
+                       is_valid_irq(rtc_irq)
+                               ?  (cmos_rtc.mon_alrm
+                                       ? "year"
+                                       : (cmos_rtc.day_alrm
+                                               ? "month" : "day"))
+                               : "no",
+                       cmos_rtc.century ? ", y3k" : ""
+                       );
+
+       return 0;
+
+cleanup1:
+       rename_region(ports, NULL);
+cleanup0:
+       rtc_device_unregister(cmos_rtc.rtc);
+       return retval;
+}
+
+static void cmos_do_shutdown(void)
+{
+       unsigned char   rtc_control;
+
+       spin_lock_irq(&rtc_lock);
+       rtc_control = CMOS_READ(RTC_CONTROL);
+       rtc_control &= ~(RTC_PIE|RTC_AIE|RTC_UIE);
+       CMOS_WRITE(rtc_control, RTC_CONTROL);
+       CMOS_READ(RTC_INTR_FLAGS);
+       spin_unlock_irq(&rtc_lock);
+}
+
+static void __exit cmos_do_remove(struct device *dev)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+
+       cmos_do_shutdown();
+
+       if (is_pnpacpi())
+               release_resource(cmos->iomem);
+       rename_region(cmos->iomem, NULL);
+
+       if (is_valid_irq(cmos->irq))
+               free_irq(cmos->irq, &cmos_rtc.rtc->class_dev);
+
+       rtc_device_unregister(cmos_rtc.rtc);
+
+       cmos_rtc.dev = NULL;
+       dev_set_drvdata(dev, NULL);
+}
+
+#ifdef CONFIG_PM
+
+static int cmos_suspend(struct device *dev, pm_message_t mesg)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+       int             do_wake = device_may_wakeup(dev);
+       unsigned char   tmp, irqstat;
+
+       /* only the alarm might be a wakeup event source */
+       spin_lock_irq(&rtc_lock);
+       cmos->suspend_ctrl = tmp = CMOS_READ(RTC_CONTROL);
+       if (tmp & (RTC_PIE|RTC_AIE|RTC_UIE)) {
+               if (do_wake)
+                       tmp &= ~(RTC_PIE|RTC_UIE);
+               else
+                       tmp &= ~(RTC_PIE|RTC_AIE|RTC_UIE);
+               CMOS_WRITE(tmp, RTC_CONTROL);
+               irqstat = CMOS_READ(RTC_INTR_FLAGS);
+       } else
+               irqstat = 0;
+       spin_unlock_irq(&rtc_lock);
+
+       if (irqstat)
+               rtc_update_irq(&cmos->rtc->class_dev, 1, irqstat);
+
+       /* ACPI HOOK:  enable ACPI_EVENT_RTC when (tmp & RTC_AIE)
+        * ... it'd be best if we could do that under rtc_lock.
+        */
+
+       pr_debug("%s: suspend%s, ctrl %02x\n",
+                       cmos_rtc.rtc->class_dev.class_id,
+                       (tmp & RTC_AIE) ? ", alarm may wake" : "",
+                       tmp);
+
+       return 0;
+}
+
+static int cmos_resume(struct device *dev)
+{
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+       unsigned char   tmp = cmos->suspend_ctrl;
+
+       /* REVISIT:  a mechanism to resync the system clock (jiffies)
+        * on resume should be portable between platforms ...
+        */
+
+       /* re-enable any irqs previously active */
+       if (tmp & (RTC_PIE|RTC_AIE|RTC_UIE)) {
+
+               /* ACPI HOOK:  disable ACPI_EVENT_RTC when (tmp & RTC_AIE) */
+
+               spin_lock_irq(&rtc_lock);
+               CMOS_WRITE(tmp, RTC_CONTROL);
+               tmp = CMOS_READ(RTC_INTR_FLAGS);
+               spin_unlock_irq(&rtc_lock);
+               if (tmp)
+                       rtc_update_irq(&cmos->rtc->class_dev, 1, tmp);
+       }
+
+       pr_debug("%s: resume, ctrl %02x\n",
+                       cmos_rtc.rtc->class_dev.class_id,
+                       cmos->suspend_ctrl);
+
+
+       return 0;
+}
+
+#else
+#define        cmos_suspend    NULL
+#define        cmos_resume     NULL
+#endif
+
+/*----------------------------------------------------------------*/
+
+/* The "CMOS" RTC normally lives on the platform_bus.  On ACPI systems,
+ * the device node may alternatively be created as a PNP device.
+ */
+
+#ifdef CONFIG_PNPACPI
+
+#include <linux/pnp.h>
+
+static int __devinit
+cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
+{
+       /* REVISIT paranoia argues for a shutdown notifier, since PNP
+        * drivers can't provide shutdown() methods to disable IRQs.
+        * Or better yet, fix PNP to allow those methods...
+        */
+       return cmos_do_probe(&pnp->dev,
+                       &pnp->res.port_resource[0],
+                       pnp->res.irq_resource[0].start);
+}
+
+static void __exit cmos_pnp_remove(struct pnp_dev *pnp)
+{
+       cmos_do_remove(&pnp->dev);
+}
+
+#ifdef CONFIG_PM
+
+static int cmos_pnp_suspend(struct pnp_dev *pnp, pm_message_t mesg)
+{
+       return cmos_suspend(&pnp->dev, mesg);
+}
+
+static int cmos_pnp_resume(struct pnp_dev *pnp)
+{
+       return cmos_resume(&pnp->dev);
+}
+
+#else
+#define        cmos_pnp_suspend        NULL
+#define        cmos_pnp_resume         NULL
+#endif
+
+
+static const struct pnp_device_id rtc_ids[] = {
+       { .id = "PNP0b00", },
+       { .id = "PNP0b01", },
+       { .id = "PNP0b02", },
+       { },
+};
+MODULE_DEVICE_TABLE(pnp, rtc_ids);
+
+static struct pnp_driver cmos_pnp_driver = {
+       .name           = (char *) driver_name,
+       .id_table       = rtc_ids,
+       .probe          = cmos_pnp_probe,
+       .remove         = __exit_p(cmos_pnp_remove),
+
+       /* flag ensures resume() gets called, and stops syslog spam */
+       .flags          = PNP_DRIVER_RES_DO_NOT_CHANGE,
+       .suspend        = cmos_pnp_suspend,
+       .resume         = cmos_pnp_resume,
+};
+
+static int __init cmos_init(void)
+{
+       return pnp_register_driver(&cmos_pnp_driver);
+}
+module_init(cmos_init);
+
+static void __exit cmos_exit(void)
+{
+       pnp_unregister_driver(&cmos_pnp_driver);
+}
+module_exit(cmos_exit);
+
+#else  /* no PNPACPI */
+
+/*----------------------------------------------------------------*/
+
+/* Platform setup should have set up an RTC device, when PNPACPI is
+ * unavailable ... this is the normal case, common even on PCs.
+ */
+
+static int __init cmos_platform_probe(struct platform_device *pdev)
+{
+       return cmos_do_probe(&pdev->dev,
+                       platform_get_resource(pdev, IORESOURCE_IO, 0),
+                       platform_get_irq(pdev, 0));
+}
+
+static int __exit cmos_platform_remove(struct platform_device *pdev)
+{
+       cmos_do_remove(&pdev->dev);
+       return 0;
+}
+
+static void cmos_platform_shutdown(struct platform_device *pdev)
+{
+       cmos_do_shutdown();
+}
+
+static struct platform_driver cmos_platform_driver = {
+       .remove         = __exit_p(cmos_platform_remove),
+       .shutdown       = cmos_platform_shutdown,
+       .driver = {
+               .name           = (char *) driver_name,
+               .suspend        = cmos_suspend,
+               .resume         = cmos_resume,
+       }
+};
+
+static int __init cmos_init(void)
+{
+       return platform_driver_probe(&cmos_platform_driver,
+                       cmos_platform_probe);
+}
+module_init(cmos_init);
+
+static void __exit cmos_exit(void)
+{
+       platform_driver_unregister(&cmos_platform_driver);
+}
+module_exit(cmos_exit);
+
+
+#endif /* !PNPACPI */
+
+MODULE_AUTHOR("David Brownell");
+MODULE_DESCRIPTION("Driver for PC-style 'CMOS' RTCs");
+MODULE_LICENSE("GPL");
index b9e59bc9435aea3e3c6ad0dea4e903cde728b21a..2c785148d21e5e060334bb9296da7a03baa2458b 100644 (file)
@@ -1063,7 +1063,6 @@ int __init zcrypt_api_init(void)
                rc = -ENOMEM;
                goto out_misc;
        }
-       zcrypt_entry->nlink = 1;
        zcrypt_entry->data = NULL;
        zcrypt_entry->read_proc = zcrypt_status_read;
        zcrypt_entry->write_proc = zcrypt_status_write;
index b97dd15bdb9a1ecb7d0b15b3c6ffcbc49ff12200..ecca1046714efd213f57fce49a69bca391faf047 100644 (file)
@@ -1511,8 +1511,7 @@ lcs_txbuffer_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
        LCS_DBF_TEXT(5, trace, "txbuffcb");
        /* Put buffer back to pool. */
        lcs_release_buffer(channel, buffer);
-       card = (struct lcs_card *)
-               ((char *) channel - offsetof(struct lcs_card, write));
+       card = container_of(channel, struct lcs_card, write);
        if (netif_queue_stopped(card->dev) && netif_carrier_ok(card->dev))
                netif_wake_queue(card->dev);
        spin_lock(&card->lock);
@@ -1810,8 +1809,7 @@ lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
                LCS_DBF_TEXT(4, trace, "-eiogpkt");
                return;
        }
-       card = (struct lcs_card *)
-               ((char *) channel - offsetof(struct lcs_card, read));
+       card = container_of(channel, struct lcs_card, read);
        offset = 0;
        while (lcs_hdr->offset != 0) {
                if (lcs_hdr->offset <= 0 ||
index 98fcbb3d5560bad9463109915e64f75222558853..6349dd617f85cdd8807288597feda9d0cf736834 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/pci.h>
+#include <linux/device.h>
 
 #include <asm/system.h>
 #include <asm/sbus.h>
 #include <asm/bpp.h>
 #include <asm/irq.h>
 
+static ssize_t
+show_sbusobppath_attr(struct device * dev, struct device_attribute * attr, char * buf)
+{
+       struct sbus_dev *sbus;
+
+       sbus = to_sbus_device(dev);
+
+       return snprintf (buf, PAGE_SIZE, "%s\n", sbus->ofdev.node->full_name);
+}
+
+static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_sbusobppath_attr, NULL);
+
 struct sbus_bus *sbus_root;
 
 static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sdev)
 {
        unsigned long base;
        void *pval;
-       int len;
+       int len, err;
 
        sdev->prom_node = dp->node;
        strcpy(sdev->prom_name, dp->name);
@@ -66,6 +79,9 @@ static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sde
        if (of_device_register(&sdev->ofdev) != 0)
                printk(KERN_DEBUG "sbus: device registration error for %s!\n",
                       dp->path_component_name);
+
+       /* WE HAVE BEEN INVADED BY ALIENS! */
+       err = sysfs_create_file(&sdev->ofdev.dev.kobj, &dev_attr_obppath.attr);
 }
 
 static void __init sbus_bus_ranges_init(struct device_node *dp, struct sbus_bus *sbus)
index 640536ef77dcc398ec663cfe39830ba3e2c41e6b..9c37943108792af5723ff0a394dee6888ea26571 100644 (file)
@@ -3099,7 +3099,6 @@ allocate_cmd (Scsi_Cmnd *cmd) {
         real = get_zeroed_page(GFP_ATOMIC);
         if (real == 0)
                return NULL;
-        memset((void *)real, 0, 4096);
         cache_push(virt_to_phys((void *)real), 4096);
         cache_clear(virt_to_phys((void *)real), 4096);
         kernel_set_cachemode((void *)real, 4096, IOMAP_NOCACHE_SER);
index da94e126ca832d5e4d157c65c3b34acaab20620c..0cd7eed9196c44eec8065fd71be58d9c2359af0c 100644 (file)
@@ -1052,10 +1052,9 @@ static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
        struct asd_ascb *ascb;
        unsigned long flags;
 
-       ascb = kmem_cache_alloc(asd_ascb_cache, gfp_flags);
+       ascb = kmem_cache_zalloc(asd_ascb_cache, gfp_flags);
 
        if (ascb) {
-               memset(ascb, 0, sizeof(*ascb));
                ascb->dma_scb.size = sizeof(struct scb);
                ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
                                                     gfp_flags,
index f02f48a882a97b4150a7afe9eb403f1ce7f293fb..a1cd6e6a292aa887216837b77b6f2dc744b1a12f 100644 (file)
@@ -388,10 +388,9 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd,
        int err = 0;
        int write = (data_direction == DMA_TO_DEVICE);
 
-       sioc = kmem_cache_alloc(scsi_io_context_cache, gfp);
+       sioc = kmem_cache_zalloc(scsi_io_context_cache, gfp);
        if (!sioc)
                return DRIVER_ERROR << 24;
-       memset(sioc, 0, sizeof(*sioc));
 
        req = blk_get_request(sdev->request_queue, write, gfp);
        if (!req)
index 5261f0af8b101bcf4e1149caebdb484bbe92aa70..2964ca9df5a010f9cebb264e4115d5a588e5c234 100644 (file)
@@ -920,12 +920,16 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
 #ifdef __i386__
                outb(0xff, 0x080);
 #endif
-               scratch2 = serial_inp(up, UART_IER);
+               /*
+                * Mask out IER[7:4] bits for test as some UARTs (e.g. TL
+                * 16C754B) allow only to modify them if an EFR bit is set.
+                */
+               scratch2 = serial_inp(up, UART_IER) & 0x0f;
                serial_outp(up, UART_IER, 0x0F);
 #ifdef __i386__
                outb(0, 0x080);
 #endif
-               scratch3 = serial_inp(up, UART_IER);
+               scratch3 = serial_inp(up, UART_IER) & 0x0f;
                serial_outp(up, UART_IER, scratch);
                if (scratch2 != 0 || scratch3 != 0x0F) {
                        /*
index 52e2e64c6649dc25379994f6b1b119bc2d3b768f..a2dac378bda9199a94eeb2a5793cd989df360458 100644 (file)
@@ -677,6 +677,13 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
        /*
         * PLX
         */
+       {
+               .vendor         = PCI_VENDOR_ID_PLX,
+               .device         = PCI_DEVICE_ID_PLX_9030,
+               .subvendor      = PCI_SUBVENDOR_ID_PERLE,
+               .subdevice      = PCI_ANY_ID,
+               .setup          = pci_default_setup,
+       },
        {
                .vendor         = PCI_VENDOR_ID_PLX,
                .device         = PCI_DEVICE_ID_PLX_9050,
@@ -936,6 +943,7 @@ enum pci_board_num_t {
 
        pbn_b2_1_115200,
        pbn_b2_2_115200,
+       pbn_b2_4_115200,
        pbn_b2_8_115200,
 
        pbn_b2_1_460800,
@@ -1249,6 +1257,12 @@ static struct pciserial_board pci_boards[] __devinitdata = {
                .base_baud      = 115200,
                .uart_offset    = 8,
        },
+       [pbn_b2_4_115200] = {
+               .flags          = FL_BASE2,
+               .num_ports      = 4,
+               .base_baud      = 115200,
+               .uart_offset    = 8,
+       },
        [pbn_b2_8_115200] = {
                .flags          = FL_BASE2,
                .num_ports      = 8,
@@ -1990,6 +2004,10 @@ static struct pci_device_id serial_pci_tbl[] = {
        {       PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                pbn_panacom2 },
+       {       PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+               PCI_VENDOR_ID_ESDGMBH,
+               PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0,
+               pbn_b2_4_115200 },
        {       PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
                PCI_SUBVENDOR_ID_CHASE_PCIFAST,
                PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0, 
@@ -2378,6 +2396,15 @@ static struct pci_device_id serial_pci_tbl[] = {
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,   /* 135a.0811 */
                pbn_b2_2_115200 },
 
+       /*
+        * Perle PCI-RAS cards
+        */
+       {       PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+               PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4,
+               0, 0, pbn_b2_4_921600 },
+       {       PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+               PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
+               0, 0, pbn_b2_8_921600 },
        /*
         * These entries match devices with class COMMUNICATION_SERIAL,
         * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
index 2978c09860eeff81cbedebf0c52ca8e142bf946c..5cc6b91f8408d0c0fbc2e3bc00c7279643d71e84 100644 (file)
@@ -916,6 +916,11 @@ config SERIAL_TXX9
 config HAS_TXX9_SERIAL
        bool
 
+config SERIAL_TXX9_NR_UARTS
+       int "Maximum number of TMPTX39XX/49XX SIO ports"
+       depends on SERIAL_TXX9
+       default "6"
+
 config SERIAL_TXX9_CONSOLE
        bool "TMPTX39XX/49XX SIO Console support"
        depends on SERIAL_TXX9=y
index 42b050c46abed3c17572b1865e5ba9c2a3432dde..312bef6bd583ce92d1382cfb8bbefbb0ba834f32 100644 (file)
@@ -3173,12 +3173,8 @@ do_softint(void *private_)
        if (!tty)
                return;
 
-       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
-               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-                   tty->ldisc.write_wakeup)
-                       (tty->ldisc.write_wakeup)(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
+       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
+               tty_wakeup(tty);
 }
 
 static int
@@ -3798,11 +3794,7 @@ rs_flush_buffer(struct tty_struct *tty)
        info->xmit.head = info->xmit.tail = 0;
        restore_flags(flags);
 
-       wake_up_interruptible(&tty->write_wait);
-
-       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-           tty->ldisc.write_wakeup)
-               (tty->ldisc.write_wakeup)(tty);
+       tty_wakeup(tty);
 }
 
 /*
index c862f67c985af312b15f11d68cb29390688bfacb..f540212e7409fe79971c85bed38a93ea1ca4c988 100644 (file)
@@ -2685,7 +2685,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
                free_irq(control->ic_irq, soft);
                if (soft->is_ioc4_serial_addr) {
                        iounmap(soft->is_ioc4_serial_addr);
-                       release_region((unsigned long)
+                       release_mem_region((unsigned long)
                             soft->is_ioc4_serial_addr,
                                sizeof(struct ioc4_serial));
                }
@@ -2790,7 +2790,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
        /* request serial registers */
        tmp_addr1 = idd->idd_bar0 + IOC4_SERIAL_OFFSET;
 
-       if (!request_region(tmp_addr1, sizeof(struct ioc4_serial),
+       if (!request_mem_region(tmp_addr1, sizeof(struct ioc4_serial),
                                        "sioc4_uart")) {
                printk(KERN_WARNING
                        "ioc4 (%p): unable to get request region for "
@@ -2889,7 +2889,7 @@ out3:
 out2:
        if (serial)
                iounmap(serial);
-       release_region(tmp_addr1, sizeof(struct ioc4_serial));
+       release_mem_region(tmp_addr1, sizeof(struct ioc4_serial));
 out1:
 
        return ret;
index 7186a82c47595582dfe3de1dbac4b6bb283585ba..f4440d3293106a9d7930fe3b9a55e10e755dbb78 100644 (file)
@@ -37,6 +37,7 @@
  *     1.06    Do not insert a char caused previous overrun.
  *             Fix some spin_locks.
  *             Do not call uart_add_one_port for absent ports.
+ *     1.07    Use CONFIG_SERIAL_TXX9_NR_UARTS.  Cleanup.
  */
 
 #if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
@@ -58,9 +59,8 @@
 #include <linux/mutex.h>
 
 #include <asm/io.h>
-#include <asm/irq.h>
 
-static char *serial_version = "1.06";
+static char *serial_version = "1.07";
 static char *serial_name = "TX39/49 Serial driver";
 
 #define PASS_LIMIT     256
@@ -88,12 +88,7 @@ static char *serial_name = "TX39/49 Serial driver";
 /*
  * Number of serial ports
  */
-#ifdef ENABLE_SERIAL_TXX9_PCI
-#define NR_PCI_BOARDS  4
-#define UART_NR  (4 + NR_PCI_BOARDS)
-#else
-#define UART_NR  4
-#endif
+#define UART_NR  CONFIG_SERIAL_TXX9_NR_UARTS
 
 #define HIGH_BITS_OFFSET       ((sizeof(long)-sizeof(int))*8)
 
@@ -987,6 +982,7 @@ int __init early_serial_txx9_setup(struct uart_port *port)
 }
 
 #ifdef ENABLE_SERIAL_TXX9_PCI
+#ifdef CONFIG_PM
 /**
  *     serial_txx9_suspend_port - suspend one serial port
  *     @line:  serial line number
@@ -1008,6 +1004,7 @@ static void serial_txx9_resume_port(int line)
 {
        uart_resume_port(&serial_txx9_reg, &serial_txx9_ports[line].port);
 }
+#endif
 
 static DEFINE_MUTEX(serial_txx9_mutex);
 
@@ -1118,6 +1115,7 @@ static void __devexit pciserial_txx9_remove_one(struct pci_dev *dev)
        }
 }
 
+#ifdef CONFIG_PM
 static int pciserial_txx9_suspend_one(struct pci_dev *dev, pm_message_t state)
 {
        int line = (int)(long)pci_get_drvdata(dev);
@@ -1142,11 +1140,10 @@ static int pciserial_txx9_resume_one(struct pci_dev *dev)
        }
        return 0;
 }
+#endif
 
-static struct pci_device_id serial_txx9_pci_tbl[] = {
-       {       PCI_VENDOR_ID_TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC,
-               PCI_ANY_ID, PCI_ANY_ID,
-               0, 0, 0 },
+static const struct pci_device_id serial_txx9_pci_tbl[] = {
+       { PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC) },
        { 0, }
 };
 
@@ -1154,8 +1151,10 @@ static struct pci_driver serial_txx9_pci_driver = {
        .name           = "serial_txx9",
        .probe          = pciserial_txx9_init_one,
        .remove         = __devexit_p(pciserial_txx9_remove_one),
+#ifdef CONFIG_PM
        .suspend        = pciserial_txx9_suspend_one,
        .resume         = pciserial_txx9_resume_one,
+#endif
        .id_table       = serial_txx9_pci_tbl,
 };
 
index cd6b65333b71a51660471128e4128dd8d90116dc..2dd6eed50aa06ef3721811d364d32086206ee437 100644 (file)
@@ -654,7 +654,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
                ret = -ENODEV;
                goto out_pci;
        }
-       if (!request_region(idd->pma, IOC3_PCI_SIZE, "ioc3")) {
+       if (!request_mem_region(idd->pma, IOC3_PCI_SIZE, "ioc3")) {
                printk(KERN_WARNING
                       "%s: Unable to request IOC3 region "
                       "for pci_dev %s.\n",
@@ -744,7 +744,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
        return 0;
 
 out_misc_region:
-       release_region(idd->pma, IOC3_PCI_SIZE);
+       release_mem_region(idd->pma, IOC3_PCI_SIZE);
 out_pci:
        kfree(idd);
 out_idd:
@@ -785,7 +785,7 @@ static void ioc3_remove(struct pci_dev *pdev)
        if(idd->dual_irq)
                free_irq(idd->irq_eth, (void *)idd);
        iounmap(idd->vma);
-       release_region(idd->pma, IOC3_PCI_SIZE);
+       release_mem_region(idd->pma, IOC3_PCI_SIZE);
 
        /* Disable IOC3 and relinquish */
        pci_disable_device(pdev);
index fc3197273663e93c48f975cded7c748727ad0370..3d72aa5cfc713bb3b66dbe3c6b49ee8ceb25d0df 100644 (file)
@@ -626,10 +626,8 @@ static void do_softint(unsigned long private_)
        if (!tty)
                return;
 
-       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
+       if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
                tty_wakeup(tty);
-               wake_up_interruptible(&tty->write_wait);
-       }
 }
 
 static int zs_startup(struct dec_serial * info)
index f04a29a46646c8a38c13432674c62dea1c92b977..c6b6479fa4ddee3ec893288f85d7b66b38d27359 100644 (file)
@@ -1953,7 +1953,7 @@ static void invalidate_sub(struct lun *curlun)
        struct inode    *inode = filp->f_path.dentry->d_inode;
        unsigned long   rc;
 
-       rc = invalidate_inode_pages(inode->i_mapping);
+       rc = invalidate_mapping_pages(inode->i_mapping, 0, -1);
        VLDBG(curlun, "invalidate_inode_pages -> %ld\n", rc);
 }
 
index 408c3380d60203254b510c43a728da6214a42c7c..6ec8cf1a3ccb1cd14d39667231da28b36abdecdf 100644 (file)
@@ -1419,7 +1419,6 @@ int __devinit rndis_init (void)
                        return -EIO;
                }
 
-               rndis_connect_state [i]->nlink = 1;
                rndis_connect_state [i]->write_proc = rndis_proc_write;
                rndis_connect_state [i]->read_proc = rndis_proc_read;
                rndis_connect_state [i]->data = (void *)
index 282d82efc0b0a0e8280884ad7a041e3561b7bf80..f0ffb8907f292df3b9e39a32b92809e7ae498f06 100644 (file)
@@ -2163,9 +2163,8 @@ static void etrax_usb_add_to_bulk_sb_list(struct urb *urb, int epid)
 
        maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
 
-       sb_desc = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
+       sb_desc = kmem_cache_zalloc(usb_desc_cache, SLAB_FLAG);
        assert(sb_desc != NULL);
-       memset(sb_desc, 0, sizeof(USB_SB_Desc_t));
 
 
        if (usb_pipeout(urb->pipe)) {
index 2cbb239e63f8863688df8562805816d101b33754..68e66b33e7269bfd1ba3972aadaee6e64b09bd79 100644 (file)
@@ -624,12 +624,10 @@ static inline struct urb_priv *uhci_alloc_urb_priv(struct uhci_hcd *uhci,
 {
        struct urb_priv *urbp;
 
-       urbp = kmem_cache_alloc(uhci_up_cachep, GFP_ATOMIC);
+       urbp = kmem_cache_zalloc(uhci_up_cachep, GFP_ATOMIC);
        if (!urbp)
                return NULL;
 
-       memset((void *)urbp, 0, sizeof(*urbp));
-
        urbp->urb = urb;
        urb->hcpriv = urbp;
        
index 0b0fb51bad3e597ca0b829a746693a6540cd670b..d78692c01cfa3ca9a75749ee9a3fec6f5e92762f 100644 (file)
@@ -616,15 +616,7 @@ static void digi_wakeup_write_lock(struct work_struct *work)
 
 static void digi_wakeup_write( struct usb_serial_port *port )
 {
-
-       struct tty_struct *tty = port->tty;
-
-
-       /* wake up port processes */
-       wake_up_interruptible( &port->write_wait );
-
-       /* wake up line discipline */
-       tty_wakeup(tty);
+       tty_wakeup(port->tty);
 }
 
 
index da514cb785b3a0bb87c16dfff4423fddad411301..dd0b66a6ed5d00825a93c571d867f31abd61a183 100644 (file)
@@ -182,13 +182,8 @@ static void keyspan_pda_wakeup_write(struct work_struct *work)
        struct keyspan_pda_private *priv =
                container_of(work, struct keyspan_pda_private, wakeup_work);
        struct usb_serial_port *port = priv->port;
-       struct tty_struct *tty = port->tty;
 
-       /* wake up port processes */
-       wake_up_interruptible( &port->write_wait );
-
-       /* wake up line discipline */
-       tty_wakeup(tty);
+       tty_wakeup(port->tty);
 }
 
 static void keyspan_pda_request_unthrottle(struct work_struct *work)
index 6109c6704a738299992d741dc31fd9f94baff433..2d588fb82573f998aa6b899dae13a84fceff4e1b 100644 (file)
@@ -269,18 +269,8 @@ static void mos7720_bulk_out_data_callback(struct urb *urb)
 
        tty = mos7720_port->port->tty;
 
-       if (tty && mos7720_port->open) {
-               /* let the tty driver wakeup if it has a special *
-                * write_wakeup function */
-               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-                    tty->ldisc.write_wakeup)
-                       (tty->ldisc.write_wakeup)(tty);
-
-               /* tell the tty driver that something has changed */
-               wake_up_interruptible(&tty->write_wait);
-       }
-
-       /* schedule_work(&mos7720_port->port->work); */
+       if (tty && mos7720_port->open)
+               tty_wakeup(tty);
 }
 
 /*
index b2264a87617bdfdde5587bd3cee5cc2de82edc87..c6cca859af452706ccc4bc756877df4e81af1fc3 100644 (file)
@@ -755,18 +755,8 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
 
        tty = mos7840_port->port->tty;
 
-       if (tty && mos7840_port->open) {
-               /* let the tty driver wakeup if it has a special *
-                * write_wakeup function                         */
-
-               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP))
-                   && tty->ldisc.write_wakeup) {
-                       (tty->ldisc.write_wakeup) (tty);
-               }
-
-               /* tell the tty driver that something has changed */
-               wake_up_interruptible(&tty->write_wait);
-       }
+       if (tty && mos7840_port->open)
+               tty_wakeup(tty);
 
 }
 
index 0b07f6ae3367c286611695c9c7950c9afd2f0d56..48066ef3af05fa2356171a76932e8252b62b05e5 100644 (file)
@@ -110,9 +110,7 @@ struct sa1100fb_info {
 #endif
 };
 
-#define __type_entry(ptr,type,member) ((type *)((char *)(ptr)-offsetof(type,member)))
-
-#define TO_INF(ptr,member)     __type_entry(ptr,struct sa1100fb_info,member)
+#define TO_INF(ptr,member)     container_of(ptr,struct sa1100fb_info,member)
 
 #define SA1100_PALETTE_MODE_VAL(bpp)    (((bpp) & 0x018) << 9)
 
index 9f17b0cacdd02e42cf5e3c658a99e62f0738f120..6c78343cf69023e5220c6a50127b33325c0f1c97 100644 (file)
@@ -110,7 +110,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
 
        if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) {
                filemap_write_and_wait(inode->i_mapping);
-               invalidate_inode_pages(&inode->i_data);
+               invalidate_mapping_pages(&inode->i_data, 0, -1);
        }
 
        return res;
@@ -234,7 +234,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
                total += result;
        } while (count);
 
-               invalidate_inode_pages2(inode->i_mapping);
+       invalidate_inode_pages2(inode->i_mapping);
        return total;
 }
 
index 5e8e9d9ccb331ffe1a88c32f402a70eefca4ad18..11c59329ed0647837604dbd0a832dd2935db226b 100644 (file)
@@ -674,12 +674,6 @@ config ZISOFS
          necessary to create such a filesystem.  Say Y here if you want to be
          able to read such compressed CD-ROMs.
 
-config ZISOFS_FS
-# for fs/nls/Config.in
-       tristate
-       depends on ZISOFS
-       default ISO9660_FS
-
 config UDF_FS
        tristate "UDF file system support"
        help
index 55991e4132a7f30f778a7f86862b8992c59bafca..0b4ee0a5c83e809f07ca6a0a049e9521226782c0 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -132,7 +132,7 @@ static int aio_setup_ring(struct kioctx *ctx)
        dprintk("attempting mmap of %lu bytes\n", info->mmap_size);
        down_write(&ctx->mm->mmap_sem);
        info->mmap_base = do_mmap(NULL, 0, info->mmap_size, 
-                                 PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE,
+                                 PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE,
                                  0);
        if (IS_ERR((void *)info->mmap_base)) {
                up_write(&ctx->mm->mmap_sem);
@@ -211,11 +211,10 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
        if ((unsigned long)nr_events > aio_max_nr)
                return ERR_PTR(-EAGAIN);
 
-       ctx = kmem_cache_alloc(kioctx_cachep, GFP_KERNEL);
+       ctx = kmem_cache_zalloc(kioctx_cachep, GFP_KERNEL);
        if (!ctx)
                return ERR_PTR(-ENOMEM);
 
-       memset(ctx, 0, sizeof(*ctx));
        ctx->max_reqs = nr_events;
        mm = ctx->mm = current->mm;
        atomic_inc(&mm->mm_count);
index a4d933a51208c5bcbfdd182b2412c3b1d369c140..5810aa1339fdeb5d6d98dd857328998bcde733e5 100644 (file)
@@ -372,7 +372,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
        down_write(&current->mm->mmap_sem);
        current->mm->start_brk = do_mmap(NULL, 0, stack_size,
                                         PROT_READ | PROT_WRITE | PROT_EXEC,
-                                        MAP_PRIVATE | MAP_ANON | MAP_GROWSDOWN,
+                                        MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN,
                                         0);
 
        if (IS_ERR_VALUE(current->mm->start_brk)) {
index 1ad674fd348c4bfe6f130bc9a958a3c38338619c..7ff6e9346faed9f149948b8756934afbf79b9af6 100644 (file)
@@ -78,6 +78,7 @@ EXPORT_SYMBOL(__lock_buffer);
 
 void fastcall unlock_buffer(struct buffer_head *bh)
 {
+       smp_mb__before_clear_bit();
        clear_buffer_locked(bh);
        smp_mb__after_clear_bit();
        wake_up_bit(&bh->b_state, BH_Lock);
@@ -345,7 +346,7 @@ void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers)
         * We really want to use invalidate_inode_pages2() for
         * that, but not until that's cleaned up.
         */
-       invalidate_inode_pages(mapping);
+       invalidate_mapping_pages(mapping, 0, -1);
 }
 
 /*
index 1c82e9a7d7c8a799698e404e1b50b31031ac3021..db3b1a9c9a5b9d7ea36075a0d5e1d9df320ebb00 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mm.h>
 #include <linux/sysctl.h>
 #include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/stat.h>
 #include <linux/ctype.h>
@@ -84,15 +85,11 @@ static int do_reset_coda_cache_inv_stats( ctl_table * table, int write,
        return 0;
 }
 
-static int coda_vfs_stats_get_info( char * buffer, char ** start,
-                                   off_t offset, int length)
+static int proc_vfs_stats_show(struct seq_file *m, void *v)
 {
-       int len=0;
-       off_t begin;
        struct coda_vfs_stats * ps = & coda_vfs_stat;
   
-  /* this works as long as we are below 1024 characters! */
-       len += sprintf( buffer,
+       seq_printf(m,
                        "Coda VFS statistics\n"
                        "===================\n\n"
                        "File Operations:\n"
@@ -132,28 +129,14 @@ static int coda_vfs_stats_get_info( char * buffer, char ** start,
                        ps->rmdir,
                        ps->rename,
                        ps->permission); 
-
-       begin = offset;
-       *start = buffer + begin;
-       len -= begin;
-
-       if ( len > length )
-               len = length;
-       if ( len < 0 )
-               len = 0;
-
-       return len;
+       return 0;
 }
 
-static int coda_cache_inv_stats_get_info( char * buffer, char ** start,
-                                         off_t offset, int length)
+static int proc_cache_inv_stats_show(struct seq_file *m, void *v)
 {
-       int len=0;
-       off_t begin;
        struct coda_cache_inv_stats * ps = & coda_cache_inv_stat;
   
-       /* this works as long as we are below 1024 characters! */
-       len += sprintf( buffer,
+       seq_printf(m,
                        "Coda cache invalidation statistics\n"
                        "==================================\n\n"
                        "flush\t\t%9d\n"
@@ -170,19 +153,35 @@ static int coda_cache_inv_stats_get_info( char * buffer, char ** start,
                        ps->zap_vnode,
                        ps->purge_fid,
                        ps->replace );
-  
-       begin = offset;
-       *start = buffer + begin;
-       len -= begin;
+       return 0;
+}
 
-       if ( len > length )
-               len = length;
-       if ( len < 0 )
-               len = 0;
+static int proc_vfs_stats_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, proc_vfs_stats_show, NULL);
+}
 
-       return len;
+static int proc_cache_inv_stats_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, proc_cache_inv_stats_show, NULL);
 }
 
+static const struct file_operations proc_vfs_stats_fops = {
+       .owner          = THIS_MODULE,
+       .open           = proc_vfs_stats_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
+static const struct file_operations proc_cache_inv_stats_fops = {
+       .owner          = THIS_MODULE,
+       .open           = proc_cache_inv_stats_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
 static ctl_table coda_table[] = {
        {CODA_TIMEOUT, "timeout", &coda_timeout, sizeof(int), 0644, NULL, &proc_dointvec},
        {CODA_HARD, "hard", &coda_hard, sizeof(int), 0644, NULL, &proc_dointvec},
@@ -212,9 +211,6 @@ static struct proc_dir_entry* proc_fs_coda;
 
 #endif
 
-#define coda_proc_create(name,get_info) \
-       create_proc_info_entry(name, 0, proc_fs_coda, get_info)
-
 void coda_sysctl_init(void)
 {
        reset_coda_vfs_stats();
@@ -223,9 +219,15 @@ void coda_sysctl_init(void)
 #ifdef CONFIG_PROC_FS
        proc_fs_coda = proc_mkdir("coda", proc_root_fs);
        if (proc_fs_coda) {
+               struct proc_dir_entry *pde;
+
                proc_fs_coda->owner = THIS_MODULE;
-               coda_proc_create("vfs_stats", coda_vfs_stats_get_info);
-               coda_proc_create("cache_inv_stats", coda_cache_inv_stats_get_info);
+               pde = create_proc_entry("vfs_stats", 0, proc_fs_coda);
+               if (pde)
+                       pde->proc_fops = &proc_vfs_stats_fops;
+               pde = create_proc_entry("cache_inv_stats", 0, proc_fs_coda);
+               if (pde)
+                       pde->proc_fops = &proc_cache_inv_stats_fops;
        }
 #endif
 
index 1814ba446809ac79ea6ab911a60ac42d1e36d33d..9371ee20995405ca32a9c36cf6b418412b64f0ce 100644 (file)
@@ -72,11 +72,10 @@ static struct configfs_dirent *configfs_new_dirent(struct configfs_dirent * pare
 {
        struct configfs_dirent * sd;
 
-       sd = kmem_cache_alloc(configfs_dir_cachep, GFP_KERNEL);
+       sd = kmem_cache_zalloc(configfs_dir_cachep, GFP_KERNEL);
        if (!sd)
                return NULL;
 
-       memset(sd, 0, sizeof(*sd));
        atomic_set(&sd->s_count, 1);
        INIT_LIST_HEAD(&sd->s_links);
        INIT_LIST_HEAD(&sd->s_children);
index 5352b03ff5aa81f9af31c081965f7ae8dd81f90e..f858fef6e41cf32167b3b5d6634458fc62e8d1e7 100644 (file)
@@ -76,9 +76,7 @@ struct dlm_lkb *allocate_lkb(struct dlm_ls *ls)
 {
        struct dlm_lkb *lkb;
 
-       lkb = kmem_cache_alloc(lkb_cache, GFP_KERNEL);
-       if (lkb)
-               memset(lkb, 0, sizeof(*lkb));
+       lkb = kmem_cache_zalloc(lkb_cache, GFP_KERNEL);
        return lkb;
 }
 
index 0952cc474d9a57e08b495315200a73d9c93889e7..a561fb29e2037e9f238b269404b14da50fc087bd 100644 (file)
@@ -600,11 +600,10 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type)
 {
        struct dquot *dquot;
 
-       dquot = kmem_cache_alloc(dquot_cachep, GFP_NOFS);
+       dquot = kmem_cache_zalloc(dquot_cachep, GFP_NOFS);
        if(!dquot)
                return NODQUOT;
 
-       memset((caddr_t)dquot, 0, sizeof(struct dquot));
        mutex_init(&dquot->dq_lock);
        INIT_LIST_HEAD(&dquot->dq_free);
        INIT_LIST_HEAD(&dquot->dq_inuse);
index 4e4762389bdc560d993dfb42b3db9b664396e77f..03ea7696fe39435183b1b7a32770857fd39915c3 100644 (file)
@@ -20,7 +20,7 @@ static void drop_pagecache_sb(struct super_block *sb)
        list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
                if (inode->i_state & (I_FREEING|I_WILL_FREE))
                        continue;
-               invalidate_inode_pages(inode->i_mapping);
+               invalidate_mapping_pages(inode->i_mapping, 0, -1);
        }
        spin_unlock(&inode_lock);
 }
index a86a55ccf87488a9757cf8fb7ccb05143338f794..75bbfae5508124d024215937bedd877b27b3ee28 100644 (file)
@@ -1332,13 +1332,13 @@ int ecryptfs_write_headers(struct dentry *ecryptfs_dentry,
                goto out;
        }
        /* Released in this function */
-       page_virt = kmem_cache_alloc(ecryptfs_header_cache_0, GFP_USER);
+       page_virt = kmem_cache_zalloc(ecryptfs_header_cache_0, GFP_USER);
        if (!page_virt) {
                ecryptfs_printk(KERN_ERR, "Out of memory\n");
                rc = -ENOMEM;
                goto out;
        }
-       memset(page_virt, 0, PAGE_CACHE_SIZE);
+
        rc = ecryptfs_write_headers_virt(page_virt, crypt_stat,
                                         ecryptfs_dentry);
        if (unlikely(rc)) {
index c5a2e5298f155c0744f653ba8bbc6018f03179ed..779c3477d93c20f7020e3f93f94a4f57838569d7 100644 (file)
@@ -251,7 +251,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
        int lower_flags;
 
        /* Released in ecryptfs_release or end of function if failure */
-       file_info = kmem_cache_alloc(ecryptfs_file_info_cache, GFP_KERNEL);
+       file_info = kmem_cache_zalloc(ecryptfs_file_info_cache, GFP_KERNEL);
        ecryptfs_set_file_private(file, file_info);
        if (!file_info) {
                ecryptfs_printk(KERN_ERR,
@@ -259,7 +259,6 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
                rc = -ENOMEM;
                goto out;
        }
-       memset(file_info, 0, sizeof(*file_info));
        lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry);
        crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat;
        mount_crypt_stat = &ecryptfs_superblock_to_private(
index 11f5e5076aefdfc28ab40359b0fee3cca291e871..d4f02f3e18d799ba3992a59a1fd4646cc6d41074 100644 (file)
@@ -361,8 +361,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
                goto out;
        }
        /* Released in this function */
-       page_virt =
-           (char *)kmem_cache_alloc(ecryptfs_header_cache_2,
+       page_virt = kmem_cache_zalloc(ecryptfs_header_cache_2,
                                     GFP_USER);
        if (!page_virt) {
                rc = -ENOMEM;
@@ -370,7 +369,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
                                "Cannot ecryptfs_kmalloc a page\n");
                goto out_dput;
        }
-       memset(page_virt, 0, PAGE_CACHE_SIZE);
+
        rc = ecryptfs_read_header_region(page_virt, lower_dentry, nd->mnt);
        crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat;
        if (!ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_POLICY_APPLIED))
index 745c0f1bfbbdcbd1a2bd4ff2db8848bc572df1fe..80bccd5ff8e6671908b528e408aa9427b2c7fbf4 100644 (file)
@@ -207,14 +207,12 @@ parse_tag_3_packet(struct ecryptfs_crypt_stat *crypt_stat,
        /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or
         * at end of function upon failure */
        auth_tok_list_item =
-           kmem_cache_alloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL);
+           kmem_cache_zalloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL);
        if (!auth_tok_list_item) {
                ecryptfs_printk(KERN_ERR, "Unable to allocate memory\n");
                rc = -ENOMEM;
                goto out;
        }
-       memset(auth_tok_list_item, 0,
-              sizeof(struct ecryptfs_auth_tok_list_item));
        (*new_auth_tok) = &auth_tok_list_item->auth_tok;
 
        /* check for body size - one to two bytes */
index d0541ae8faba9f4df3c6420aba382a5a497baf51..fe41ab1566eec58365deda7916d5f5469de014c9 100644 (file)
@@ -378,15 +378,13 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent)
 
        /* Released in ecryptfs_put_super() */
        ecryptfs_set_superblock_private(sb,
-                                       kmem_cache_alloc(ecryptfs_sb_info_cache,
+                                       kmem_cache_zalloc(ecryptfs_sb_info_cache,
                                                         GFP_KERNEL));
        if (!ecryptfs_superblock_to_private(sb)) {
                ecryptfs_printk(KERN_WARNING, "Out of memory\n");
                rc = -ENOMEM;
                goto out;
        }
-       memset(ecryptfs_superblock_to_private(sb), 0,
-              sizeof(struct ecryptfs_sb_info));
        sb->s_op = &ecryptfs_sops;
        /* Released through deactivate_super(sb) from get_sb_nodev */
        sb->s_root = d_alloc(NULL, &(const struct qstr) {
@@ -402,7 +400,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent)
        /* Released in d_release when dput(sb->s_root) is called */
        /* through deactivate_super(sb) from get_sb_nodev() */
        ecryptfs_set_dentry_private(sb->s_root,
-                                   kmem_cache_alloc(ecryptfs_dentry_info_cache,
+                                   kmem_cache_zalloc(ecryptfs_dentry_info_cache,
                                                     GFP_KERNEL));
        if (!ecryptfs_dentry_to_private(sb->s_root)) {
                ecryptfs_printk(KERN_ERR,
@@ -410,8 +408,6 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent)
                rc = -ENOMEM;
                goto out;
        }
-       memset(ecryptfs_dentry_to_private(sb->s_root), 0,
-              sizeof(struct ecryptfs_dentry_info));
        rc = 0;
 out:
        /* Should be able to rely on deactivate_super called from
index 11fe93f7363c9dfb0cd05f52992ac0e6dd6bba9c..7e36c6f6f538adaf0bf4559e6de3b49579141c8e 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -405,12 +405,10 @@ int setup_arg_pages(struct linux_binprm *bprm,
                bprm->loader += stack_base;
        bprm->exec += stack_base;
 
-       mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
+       mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (!mpnt)
                return -ENOMEM;
 
-       memset(mpnt, 0, sizeof(*mpnt));
-
        down_write(&mm->mmap_sem);
        {
                mpnt->vm_mm = mm;
index 0b02ba9642d2e817cb908f0ae10a37c6ae8366c4..e89bfc8cf957f73ae8de1682482464efcb7672ae 100644 (file)
@@ -368,6 +368,14 @@ struct ext2_dir_entry_2 * ext2_find_entry (struct inode * dir,
                }
                if (++n >= npages)
                        n = 0;
+               /* next page is past the blocks we've got */
+               if (unlikely(n > (dir->i_blocks >> (PAGE_CACHE_SHIFT - 9)))) {
+                       ext2_error(dir->i_sb, __FUNCTION__,
+                               "dir %lu size %lld exceeds block count %llu",
+                               dir->i_ino, dir->i_size,
+                               (unsigned long long)dir->i_blocks);
+                       goto out;
+               }
        } while (n != start);
 out:
        return NULL;
index 6347c2dbdd819ad405082e83cbaa2966be185d77..daaa243eee9b906e3eb22ef27da831a6b8c3e05d 100644 (file)
@@ -708,10 +708,14 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
                set_opt(sbi->s_mount_opt, GRPID);
        if (def_mount_opts & EXT2_DEFM_UID16)
                set_opt(sbi->s_mount_opt, NO_UID32);
+#ifdef CONFIG_EXT2_FS_XATTR
        if (def_mount_opts & EXT2_DEFM_XATTR_USER)
                set_opt(sbi->s_mount_opt, XATTR_USER);
+#endif
+#ifdef CONFIG_EXT2_FS_POSIX_ACL
        if (def_mount_opts & EXT2_DEFM_ACL)
                set_opt(sbi->s_mount_opt, POSIX_ACL);
+#endif
        
        if (le16_to_cpu(sbi->s_es->s_errors) == EXT2_ERRORS_PANIC)
                set_opt(sbi->s_mount_opt, ERRORS_PANIC);
index beaf25f5112fd9f427a393bac3b9f12b634e14de..8a824f4ce5c608d231a6862b5a1c86de167d0882 100644 (file)
@@ -947,7 +947,7 @@ out:
 static int ext3_get_block(struct inode *inode, sector_t iblock,
                        struct buffer_head *bh_result, int create)
 {
-       handle_t *handle = journal_current_handle();
+       handle_t *handle = ext3_journal_current_handle();
        int ret = 0;
        unsigned max_blocks = bh_result->b_size >> inode->i_blkbits;
 
@@ -1717,7 +1717,7 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
        /*
         * Reacquire the handle: ext3_get_block() can restart the transaction
         */
-       handle = journal_current_handle();
+       handle = ext3_journal_current_handle();
 
 out_stop:
        if (handle) {
index 4df39c4315e170c64e12ca6755f456d6b19b1e39..a8e89328e66d1ca6754417afbf54696460b24797 100644 (file)
@@ -1618,21 +1618,6 @@ static int ext3_delete_entry (handle_t *handle,
        return -ENOENT;
 }
 
-/*
- * ext3_mark_inode_dirty is somewhat expensive, so unlike ext2 we
- * do not perform it in these functions.  We perform it at the call site,
- * if it is needed.
- */
-static inline void ext3_inc_count(handle_t *handle, struct inode *inode)
-{
-       inc_nlink(inode);
-}
-
-static inline void ext3_dec_count(handle_t *handle, struct inode *inode)
-{
-       drop_nlink(inode);
-}
-
 static int ext3_add_nondir(handle_t *handle,
                struct dentry *dentry, struct inode *inode)
 {
@@ -1642,7 +1627,7 @@ static int ext3_add_nondir(handle_t *handle,
                d_instantiate(dentry, inode);
                return 0;
        }
-       ext3_dec_count(handle, inode);
+       drop_nlink(inode);
        iput(inode);
        return err;
 }
@@ -2163,7 +2148,7 @@ retry:
                err = __page_symlink(inode, symname, l,
                                mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
                if (err) {
-                       ext3_dec_count(handle, inode);
+                       drop_nlink(inode);
                        ext3_mark_inode_dirty(handle, inode);
                        iput (inode);
                        goto out_stop;
@@ -2191,6 +2176,12 @@ static int ext3_link (struct dentry * old_dentry,
 
        if (inode->i_nlink >= EXT3_LINK_MAX)
                return -EMLINK;
+       /*
+        * Return -ENOENT if we've raced with unlink and i_nlink is 0.  Doing
+        * otherwise has the potential to corrupt the orphan inode list.
+        */
+       if (inode->i_nlink == 0)
+               return -ENOENT;
 
 retry:
        handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) +
@@ -2202,7 +2193,7 @@ retry:
                handle->h_sync = 1;
 
        inode->i_ctime = CURRENT_TIME_SEC;
-       ext3_inc_count(handle, inode);
+       inc_nlink(inode);
        atomic_inc(&inode->i_count);
 
        err = ext3_add_nondir(handle, dentry, inode);
index b34886734a44d0417221231ba454bd6aa5aba2a5..a0623a84a4b2a04db9653cd43ad3a69d77a63307 100644 (file)
@@ -1459,10 +1459,14 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
                set_opt(sbi->s_mount_opt, GRPID);
        if (def_mount_opts & EXT3_DEFM_UID16)
                set_opt(sbi->s_mount_opt, NO_UID32);
+#ifdef CONFIG_EXT3_FS_XATTR
        if (def_mount_opts & EXT3_DEFM_XATTR_USER)
                set_opt(sbi->s_mount_opt, XATTR_USER);
+#endif
+#ifdef CONFIG_EXT3_FS_POSIX_ACL
        if (def_mount_opts & EXT3_DEFM_ACL)
                set_opt(sbi->s_mount_opt, POSIX_ACL);
+#endif
        if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_DATA)
                sbi->s_mount_opt |= EXT3_MOUNT_JOURNAL_DATA;
        else if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_ORDERED)
@@ -2344,6 +2348,22 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
                                err = -EROFS;
                                goto restore_opts;
                        }
+
+                       /*
+                        * If we have an unprocessed orphan list hanging
+                        * around from a previously readonly bdev mount,
+                        * require a full umount/remount for now.
+                        */
+                       if (es->s_last_orphan) {
+                               printk(KERN_WARNING "EXT3-fs: %s: couldn't "
+                                      "remount RDWR because of unprocessed "
+                                      "orphan inode list.  Please "
+                                      "umount/remount instead.\n",
+                                      sb->s_id);
+                               err = -EINVAL;
+                               goto restore_opts;
+                       }
+
                        /*
                         * Mounting a RDONLY partition read-write, so reread
                         * and store the current valid flag.  (It may have
index a127cc03c9fa2868739ded1b98c7cd6d0d7ecc8b..fbff4b9e122a91781f84cef27db159b9b8534746 100644 (file)
@@ -946,7 +946,7 @@ out:
 static int ext4_get_block(struct inode *inode, sector_t iblock,
                        struct buffer_head *bh_result, int create)
 {
-       handle_t *handle = journal_current_handle();
+       handle_t *handle = ext4_journal_current_handle();
        int ret = 0;
        unsigned max_blocks = bh_result->b_size >> inode->i_blkbits;
 
@@ -1716,7 +1716,7 @@ static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb,
        /*
         * Reacquire the handle: ext4_get_block() can restart the transaction
         */
-       handle = journal_current_handle();
+       handle = ext4_journal_current_handle();
 
 out_stop:
        if (handle) {
index e5a74a5ac261f228ffaf4b057857f8d03f7a62c2..34b3448b40f91d608d80b4fb935e6fae218e35f8 100644 (file)
@@ -1616,21 +1616,6 @@ static int ext4_delete_entry (handle_t *handle,
        return -ENOENT;
 }
 
-/*
- * ext4_mark_inode_dirty is somewhat expensive, so unlike ext2 we
- * do not perform it in these functions.  We perform it at the call site,
- * if it is needed.
- */
-static inline void ext4_inc_count(handle_t *handle, struct inode *inode)
-{
-       inc_nlink(inode);
-}
-
-static inline void ext4_dec_count(handle_t *handle, struct inode *inode)
-{
-       drop_nlink(inode);
-}
-
 static int ext4_add_nondir(handle_t *handle,
                struct dentry *dentry, struct inode *inode)
 {
@@ -1640,7 +1625,7 @@ static int ext4_add_nondir(handle_t *handle,
                d_instantiate(dentry, inode);
                return 0;
        }
-       ext4_dec_count(handle, inode);
+       drop_nlink(inode);
        iput(inode);
        return err;
 }
@@ -2161,7 +2146,7 @@ retry:
                err = __page_symlink(inode, symname, l,
                                mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
                if (err) {
-                       ext4_dec_count(handle, inode);
+                       drop_nlink(inode);
                        ext4_mark_inode_dirty(handle, inode);
                        iput (inode);
                        goto out_stop;
@@ -2189,6 +2174,12 @@ static int ext4_link (struct dentry * old_dentry,
 
        if (inode->i_nlink >= EXT4_LINK_MAX)
                return -EMLINK;
+       /*
+        * Return -ENOENT if we've raced with unlink and i_nlink is 0.  Doing
+        * otherwise has the potential to corrupt the orphan inode list.
+        */
+       if (inode->i_nlink == 0)
+               return -ENOENT;
 
 retry:
        handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
@@ -2200,7 +2191,7 @@ retry:
                handle->h_sync = 1;
 
        inode->i_ctime = CURRENT_TIME_SEC;
-       ext4_inc_count(handle, inode);
+       inc_nlink(inode);
        atomic_inc(&inode->i_count);
 
        err = ext4_add_nondir(handle, dentry, inode);
index 486a641ca71b94fa0ed745a246d57285d01611e1..c63a18b574dd13326306b1129b0e7fe9b04cbe8b 100644 (file)
@@ -1518,10 +1518,14 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
                set_opt(sbi->s_mount_opt, GRPID);
        if (def_mount_opts & EXT4_DEFM_UID16)
                set_opt(sbi->s_mount_opt, NO_UID32);
+#ifdef CONFIG_EXT4DEV_FS_XATTR
        if (def_mount_opts & EXT4_DEFM_XATTR_USER)
                set_opt(sbi->s_mount_opt, XATTR_USER);
+#endif
+#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
        if (def_mount_opts & EXT4_DEFM_ACL)
                set_opt(sbi->s_mount_opt, POSIX_ACL);
+#endif
        if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA)
                sbi->s_mount_opt |= EXT4_MOUNT_JOURNAL_DATA;
        else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED)
@@ -2419,6 +2423,22 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data)
                                err = -EROFS;
                                goto restore_opts;
                        }
+
+                       /*
+                        * If we have an unprocessed orphan list hanging
+                        * around from a previously readonly bdev mount,
+                        * require a full umount/remount for now.
+                        */
+                       if (es->s_last_orphan) {
+                               printk(KERN_WARNING "EXT4-fs: %s: couldn't "
+                                      "remount RDWR because of unprocessed "
+                                      "orphan inode list.  Please "
+                                      "umount/remount instead.\n",
+                                      sb->s_id);
+                               err = -EINVAL;
+                               goto restore_opts;
+                       }
+
                        /*
                         * Mounting a RDONLY partition read-write, so reread
                         * and store the current valid flag.  (It may have
index f63efe1337ece4b2547bc62461436d1c84b58867..2fd06927e851674e14968cda55898ec832ab2ac0 100644 (file)
@@ -69,7 +69,7 @@ void fuse_finish_open(struct inode *inode, struct file *file,
        if (outarg->open_flags & FOPEN_DIRECT_IO)
                file->f_op = &fuse_direct_io_file_operations;
        if (!(outarg->open_flags & FOPEN_KEEP_CACHE))
-               invalidate_inode_pages(inode->i_mapping);
+               invalidate_mapping_pages(inode->i_mapping, 0, -1);
        ff->fh = outarg->fh;
        file->private_data = ff;
 }
index 12450d2b320e771b13b7191403e9c4dd1f8dbf82..220255110d768de88d500f5590345667a0e34f5a 100644 (file)
@@ -112,7 +112,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr)
 {
        struct fuse_conn *fc = get_fuse_conn(inode);
        if (S_ISREG(inode->i_mode) && i_size_read(inode) != attr->size)
-               invalidate_inode_pages(inode->i_mapping);
+               invalidate_mapping_pages(inode->i_mapping, 0, -1);
 
        inode->i_ino     = attr->ino;
        inode->i_mode    = (inode->i_mode & S_IFMT) + (attr->mode & 07777);
index 0e34d9918973126c710c227bf35197bac57c30cc..e62d4f620c5841c73b177f2022324b09442e1a13 100644 (file)
@@ -282,8 +282,7 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh,
                return;
        }
 
-       bd = kmem_cache_alloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL),
-       memset(bd, 0, sizeof(struct gfs2_bufdata));
+       bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL),
        bd->bd_bh = bh;
        bd->bd_gl = gl;
 
index 88099ab1a180121449cfc04d7ca3a0d26b9366ef..1445e3a56ed45695428a1633a344c2f5f6462d1b 100644 (file)
@@ -83,8 +83,6 @@
 
 /*======== HFS structures as they appear on the disk ========*/
 
-#define __packed __attribute__ ((packed))
-
 /* Pascal-style string of up to 31 characters */
 struct hfs_name {
        u8 len;
index 49205531a5006b0ce731908628c5d485afeed77c..fe99fe8db61a3cb279885cee2c73cf5743704604 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <linux/types.h>
 
-#define __packed __attribute__ ((packed))
-
 /* Some constants */
 #define HFSPLUS_SECTOR_SIZE        512
 #define HFSPLUS_SECTOR_SHIFT         9
index bf21dc6d0dbd752d243a2d3b6d92d2d554dc0381..e6d93070f1402e249f9f1be017b4831033eab1a4 100644 (file)
@@ -414,7 +414,8 @@ static void prune_icache(int nr_to_scan)
                        __iget(inode);
                        spin_unlock(&inode_lock);
                        if (remove_inode_buffers(inode))
-                               reap += invalidate_inode_pages(&inode->i_data);
+                               reap += invalidate_mapping_pages(&inode->i_data,
+                                                               0, -1);
                        iput(inode);
                        spin_lock(&inode_lock);
 
@@ -709,7 +710,7 @@ EXPORT_SYMBOL(iunique);
 struct inode *igrab(struct inode *inode)
 {
        spin_lock(&inode_lock);
-       if (!(inode->i_state & (I_FREEING|I_WILL_FREE)))
+       if (!(inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)))
                __iget(inode);
        else
                /*
@@ -1160,11 +1161,9 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
        struct inode *inode = dentry->d_inode;
        struct timespec now;
 
-       if (IS_RDONLY(inode))
-               return;
        if (inode->i_flags & S_NOATIME)
                return;
-       if (inode->i_sb->s_flags & MS_NOATIME)
+       if (IS_NOATIME(inode))
                return;
        if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
                return;
index 43baa1afa0218842ce0ded1007cec8d9f8c5ecf5..6ee20668850209157be503192066ae9d357d16dd 100644 (file)
@@ -296,7 +296,7 @@ jffs_setattr(struct dentry *dentry, struct iattr *iattr)
                inode->i_blocks = (inode->i_size + 511) >> 9;
 
                if (len) {
-                       invalidate_inode_pages(inode->i_mapping);
+                       invalidate_mapping_pages(inode->i_mapping, 0, -1);
                }
                inode->i_ctime = CURRENT_TIME_SEC;
                inode->i_mtime = inode->i_ctime;
@@ -1518,7 +1518,7 @@ jffs_file_write(struct file *filp, const char *buf, size_t count,
        }
        inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
        mark_inode_dirty(inode);
-       invalidate_inode_pages(inode->i_mapping);
+       invalidate_mapping_pages(inode->i_mapping, 0, -1);
 
  out_isem:
        return err;
index 5ef336c1103c2c4a4ecbb5c9bf96cf8923e15454..fd999cab7b57c07b7729aabb3d96d938e3d8f0d1 100644 (file)
@@ -53,9 +53,8 @@ static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
 
 struct vfsmount *alloc_vfsmnt(const char *name)
 {
-       struct vfsmount *mnt = kmem_cache_alloc(mnt_cache, GFP_KERNEL);
+       struct vfsmount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL);
        if (mnt) {
-               memset(mnt, 0, sizeof(struct vfsmount));
                atomic_set(&mnt->mnt_count, 1);
                INIT_LIST_HEAD(&mnt->mnt_hash);
                INIT_LIST_HEAD(&mnt->mnt_child);
index 3d73d94d93a7dd9321cdfe5d9750fcf25a836df5..ac32a2e8540c4fb2ac34c1c27286f1a0d624fbd1 100644 (file)
@@ -365,7 +365,7 @@ void delete_partition(struct gendisk *disk, int part)
        kobject_put(&p->kobj);
 }
 
-void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len)
+void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len, int flags)
 {
        struct hd_struct *p;
 
@@ -390,6 +390,15 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len)
        if (!disk->part_uevent_suppress)
                kobject_uevent(&p->kobj, KOBJ_ADD);
        sysfs_create_link(&p->kobj, &block_subsys.kset.kobj, "subsystem");
+       if (flags & ADDPART_FLAG_WHOLEDISK) {
+               static struct attribute addpartattr = {
+                       .name = "whole_disk",
+                       .mode = S_IRUSR | S_IRGRP | S_IROTH,
+                       .owner = THIS_MODULE,
+               };
+
+               sysfs_create_file(&p->kobj, &addpartattr);
+       }
        partition_sysfs_add_subdir(p);
        disk->part[part-1] = p;
 }
@@ -543,9 +552,9 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
                        printk(" %s: p%d exceeds device capacity\n",
                                disk->disk_name, p);
                }
-               add_partition(disk, p, from, size);
+               add_partition(disk, p, from, size, state->parts[p].flags);
 #ifdef CONFIG_BLK_DEV_MD
-               if (state->parts[p].flags)
+               if (state->parts[p].flags & ADDPART_FLAG_RAID)
                        md_autodetect_dev(bdev->bd_dev+p);
 #endif
        }
index 8c7af1777819e2b2d5cdeabc49ef87298ca89c19..4ccec4cd1367a304bac2c784d0ba7e794b3e98cc 100644 (file)
@@ -63,15 +63,25 @@ msdos_magic_present(unsigned char *p)
 #define AIX_LABEL_MAGIC4       0xC1
 static int aix_magic_present(unsigned char *p, struct block_device *bdev)
 {
+       struct partition *pt = (struct partition *) (p + 0x1be);
        Sector sect;
        unsigned char *d;
-       int ret = 0;
+       int slot, ret = 0;
 
-       if (p[0] != AIX_LABEL_MAGIC1 &&
-               p[1] != AIX_LABEL_MAGIC2 &&
-               p[2] != AIX_LABEL_MAGIC3 &&
-               p[3] != AIX_LABEL_MAGIC4)
+       if (!(p[0] == AIX_LABEL_MAGIC1 &&
+               p[1] == AIX_LABEL_MAGIC2 &&
+               p[2] == AIX_LABEL_MAGIC3 &&
+               p[3] == AIX_LABEL_MAGIC4))
                return 0;
+       /* Assume the partition table is valid if Linux partitions exists */
+       for (slot = 1; slot <= 4; slot++, pt++) {
+               if (pt->sys_ind == LINUX_SWAP_PARTITION ||
+                       pt->sys_ind == LINUX_RAID_PARTITION ||
+                       pt->sys_ind == LINUX_DATA_PARTITION ||
+                       pt->sys_ind == LINUX_LVM_PARTITION ||
+                       is_extended_partition(pt))
+                       return 0;
+       }
        d = read_dev_sector(bdev, 7, &sect);
        if (d) {
                if (d[0] == '_' && d[1] == 'L' && d[2] == 'V' && d[3] == 'M')
@@ -155,7 +165,7 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev,
 
                        put_partition(state, state->next, next, size);
                        if (SYS_IND(p) == LINUX_RAID_PARTITION)
-                               state->parts[state->next].flags = 1;
+                               state->parts[state->next].flags = ADDPART_FLAG_RAID;
                        loopct = 0;
                        if (++state->next == state->limit)
                                goto done;
index 6fa4ff8951042f8f0becd6318b5991668933de5b..ed5ac83fe83ab0f5ec0333b986b693e2ce70743f 100644 (file)
@@ -72,7 +72,7 @@ int sgi_partition(struct parsed_partitions *state, struct block_device *bdev)
                if (blocks) {
                        put_partition(state, slot, start, blocks);
                        if (be32_to_cpu(p->type) == LINUX_RAID_PARTITION)
-                               state->parts[slot].flags = 1;
+                               state->parts[slot].flags = ADDPART_FLAG_RAID;
                }
                slot++;
        }
index 0a5927c806ca7dbf2aaa244b577159b779a602d6..123f8b46c8ba7cfbfd3676b37b00a8fa07070e38 100644 (file)
@@ -80,8 +80,11 @@ int sun_partition(struct parsed_partitions *state, struct block_device *bdev)
                num_sectors = be32_to_cpu(p->num_sectors);
                if (num_sectors) {
                        put_partition(state, slot, st_sector, num_sectors);
+                       state->parts[slot].flags = 0;
                        if (label->infos[i].id == LINUX_RAID_PARTITION)
-                               state->parts[slot].flags = 1;
+                               state->parts[slot].flags |= ADDPART_FLAG_RAID;
+                       if (label->infos[i].id == SUN_WHOLE_DISK)
+                               state->parts[slot].flags |= ADDPART_FLAG_WHOLEDISK;
                }
                slot++;
        }
index 1a979ea3b379931973f79c4b70703df3f237c714..7fb37d6f2864859b82cb12062706f462af00ec28 100644 (file)
@@ -1810,17 +1810,21 @@ static int proc_base_fill_cache(struct file *filp, void *dirent, filldir_t filld
 static int proc_pid_io_accounting(struct task_struct *task, char *buffer)
 {
        return sprintf(buffer,
+#ifdef CONFIG_TASK_XACCT
                        "rchar: %llu\n"
                        "wchar: %llu\n"
                        "syscr: %llu\n"
                        "syscw: %llu\n"
+#endif
                        "read_bytes: %llu\n"
                        "write_bytes: %llu\n"
                        "cancelled_write_bytes: %llu\n",
+#ifdef CONFIG_TASK_XACCT
                        (unsigned long long)task->rchar,
                        (unsigned long long)task->wchar,
                        (unsigned long long)task->syscr,
                        (unsigned long long)task->syscw,
+#endif
                        (unsigned long long)task->ioac.read_bytes,
                        (unsigned long long)task->ioac.write_bytes,
                        (unsigned long long)task->ioac.cancelled_write_bytes);
index b37ce33f67eaf1c24b96bac8a2147e4ac94c2a08..5e2d4359c2927b6ad851a6607f5c955eec64d8ae 100644 (file)
@@ -121,16 +121,11 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
 {
        struct sysinfo i;
        int len;
-       unsigned long inactive;
-       unsigned long active;
-       unsigned long free;
        unsigned long committed;
        unsigned long allowed;
        struct vmalloc_info vmi;
        long cached;
 
-       get_zone_counts(&active, &inactive, &free);
-
 /*
  * display in kilobytes.
  */
@@ -187,8 +182,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
                K(i.bufferram),
                K(cached),
                K(total_swapcache_pages),
-               K(active),
-               K(inactive),
+               K(global_page_state(NR_ACTIVE)),
+               K(global_page_state(NR_INACTIVE)),
 #ifdef CONFIG_HIGHMEM
                K(i.totalhigh),
                K(i.freehigh),
@@ -672,7 +667,6 @@ void create_seq_entry(char *name, mode_t mode, const struct file_operations *f)
 
 void __init proc_misc_init(void)
 {
-       struct proc_dir_entry *entry;
        static struct {
                char *name;
                int (*read_proc)(char*,char**,off_t,int,int*,void*);
@@ -700,9 +694,12 @@ void __init proc_misc_init(void)
 
        /* And now for trickier ones */
 #ifdef CONFIG_PRINTK
-       entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
-       if (entry)
-               entry->proc_fops = &proc_kmsg_operations;
+       {
+               struct proc_dir_entry *entry;
+               entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
+               if (entry)
+                       entry->proc_fops = &proc_kmsg_operations;
+       }
 #endif
        create_seq_entry("devices", 0, &proc_devinfo_operations);
        create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
@@ -743,8 +740,11 @@ void __init proc_misc_init(void)
                proc_vmcore->proc_fops = &proc_vmcore_operations;
 #endif
 #ifdef CONFIG_MAGIC_SYSRQ
-       entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
-       if (entry)
-               entry->proc_fops = &proc_sysrq_trigger_operations;
+       {
+               struct proc_dir_entry *entry;
+               entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
+               if (entry)
+                       entry->proc_fops = &proc_sysrq_trigger_operations;
+       }
 #endif
 }
index 54ebbc84207f162f2f58a8d00a1e8403088d5fc0..b935a3dd4b6544cf8bbbd4ee5a26afe095d70273 100644 (file)
@@ -31,7 +31,7 @@ const struct address_space_operations ramfs_aops = {
        .readpage       = simple_readpage,
        .prepare_write  = simple_prepare_write,
        .commit_write   = simple_commit_write,
-       .set_page_dirty = __set_page_dirty_nobuffers,
+       .set_page_dirty = __set_page_dirty_no_writeback,
 };
 
 const struct file_operations ramfs_file_operations = {
index e9d6c47332826501c2857514c6ba334366856791..d05e09ac9a99763851d412688b04b9908ebeab25 100644 (file)
@@ -32,7 +32,7 @@ const struct address_space_operations ramfs_aops = {
        .readpage               = simple_readpage,
        .prepare_write          = simple_prepare_write,
        .commit_write           = simple_commit_write,
-       .set_page_dirty = __set_page_dirty_nobuffers,
+       .set_page_dirty         = __set_page_dirty_no_writeback,
 };
 
 const struct file_operations ramfs_file_operations = {
index 707ac21700d31d26ee85d85734e4c3138853dd70..bcb0ef2aae3d5f54588616102b0d220d1aa63d94 100644 (file)
@@ -274,9 +274,9 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
                                ret = do_sync_read(file, buf, count, pos);
                        if (ret > 0) {
                                fsnotify_access(file->f_path.dentry);
-                               current->rchar += ret;
+                               add_rchar(current, ret);
                        }
-                       current->syscr++;
+                       inc_syscr(current);
                }
        }
 
@@ -332,9 +332,9 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
                                ret = do_sync_write(file, buf, count, pos);
                        if (ret > 0) {
                                fsnotify_modify(file->f_path.dentry);
-                               current->wchar += ret;
+                               add_wchar(current, ret);
                        }
-                       current->syscw++;
+                       inc_syscw(current);
                }
        }
 
@@ -675,8 +675,8 @@ sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
        }
 
        if (ret > 0)
-               current->rchar += ret;
-       current->syscr++;
+               add_rchar(current, ret);
+       inc_syscr(current);
        return ret;
 }
 
@@ -696,8 +696,8 @@ sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
        }
 
        if (ret > 0)
-               current->wchar += ret;
-       current->syscw++;
+               add_wchar(current, ret);
+       inc_syscw(current);
        return ret;
 }
 
@@ -779,12 +779,12 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
        retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file);
 
        if (retval > 0) {
-               current->rchar += retval;
-               current->wchar += retval;
+               add_rchar(current, retval);
+               add_wchar(current, retval);
        }
-       current->syscr++;
-       current->syscw++;
 
+       inc_syscr(current);
+       inc_syscw(current);
        if (*ppos > max)
                retval = -EOVERFLOW;
 
index a4bcae8a9aff23f0835e996427d38036afb73c47..42261dbdf60f172270dff8c70c1942c50a2ce0b3 100644 (file)
@@ -61,7 +61,7 @@ static struct smb_request *smb_do_alloc_request(struct smb_sb_info *server,
        struct smb_request *req;
        unsigned char *buf = NULL;
 
-       req = kmem_cache_alloc(req_cachep, GFP_KERNEL);
+       req = kmem_cache_zalloc(req_cachep, GFP_KERNEL);
        VERBOSE("allocating request: %p\n", req);
        if (!req)
                goto out;
@@ -74,7 +74,6 @@ static struct smb_request *smb_do_alloc_request(struct smb_sb_info *server,
                }
        }
 
-       memset(req, 0, sizeof(struct smb_request));
        req->rq_buffer = buf;
        req->rq_bufsize = bufsize;
        req->rq_server = server;
index 9dcdf556c99c1d2b68f9bde966f2b4d393b05555..9e95e7abaf699e88c585540373e59597295a1cfa 100644 (file)
@@ -37,11 +37,10 @@ static struct sysfs_dirent * __sysfs_new_dirent(void * element)
 {
        struct sysfs_dirent * sd;
 
-       sd = kmem_cache_alloc(sysfs_dir_cachep, GFP_KERNEL);
+       sd = kmem_cache_zalloc(sysfs_dir_cachep, GFP_KERNEL);
        if (!sd)
                return NULL;
 
-       memset(sd, 0, sizeof(*sd));
        atomic_set(&sd->s_count, 1);
        atomic_set(&sd->s_event, 1);
        INIT_LIST_HEAD(&sd->s_children);
index 5f24c755f577d9fc48add5c52300f377ed2690e4..90d7c35d286703a86a4f1c59061b2212b2de367d 100644 (file)
@@ -49,7 +49,6 @@
 #define MADV_DOFORK    11              /* do inherit across fork */
 
 /* compatibility flags */
-#define MAP_ANON       MAP_ANONYMOUS
 #define MAP_FILE       0
 
 #endif /* __ALPHA_MMAN_H__ */
index 48348fe34c19bc5b6ace3fbfe7a88838033577c9..651ebb141b24c802be33fe1020f42813b9ef3bdd 100644 (file)
@@ -1,6 +1,20 @@
 #ifndef __ALPHA_PERCPU_H
 #define __ALPHA_PERCPU_H
 
+/*
+ * Increase the per cpu area for Alpha so that
+ * modules using percpu area can load.
+ */
+#ifdef CONFIG_MODULES
+# define PERCPU_MODULE_RESERVE 8192
+#else
+# define PERCPU_MODULE_RESERVE 0
+#endif
+
+#define PERCPU_ENOUGH_ROOM \
+       (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
+        PERCPU_MODULE_RESERVE)
+
 #include <asm-generic/percpu.h>
 
 #endif /* __ALPHA_PERCPU_H */
index 1cfd27f0ad7310278a062d602a7e24eccba4fb88..39e492c3bfa3fe33c78c20aa796c89888d6b702e 100644 (file)
@@ -66,24 +66,6 @@ struct termio {
 #define _VEOL2 6
 #define _VSWTC 7
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 /*     eof=^D          eol=\0          eol2=\0         erase=del
        werase=^W       kill=^U         reprint=^R      sxtc=\0
index 861092fbaa53283953bd41c9dbb6e840bb42ff02..800ba5254dafef9bff57c98a19dcb599b0982cbc 100644 (file)
@@ -85,7 +85,6 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
  * Write locks are easy - we just set bit 31.  When unlocking, we can
  * just write zero since the lock is exclusively held.
  */
-#define rwlock_is_locked(x)    (*((volatile unsigned int *)(x)) != 0)
 
 static inline void __raw_write_lock(raw_rwlock_t *rw)
 {
index 7b8f5e8ae063a0ad03e806f943e81aa19ea6cec9..329c324c4040c9c3fcb0a1302465a4ed88d49209 100644 (file)
@@ -49,24 +49,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*
index 5f420a0149f1d5dd133e17890d4a81ac2a8f0c74..c92df958802e304dd60fb92a8a92bbb1facf142b 100644 (file)
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs)
 
 /* We use 33-bit arithmetic here... */
 #define __range_ok(addr,size) ({ \
-       unsigned long flag, sum; \
+       unsigned long flag, roksum; \
        __chk_user_ptr(addr);   \
        __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
-               : "=&r" (flag), "=&r" (sum) \
+               : "=&r" (flag), "=&r" (roksum) \
                : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
                : "cc"); \
        flag; })
index 7b8f5e8ae063a0ad03e806f943e81aa19ea6cec9..329c324c4040c9c3fcb0a1302465a4ed88d49209 100644 (file)
@@ -49,24 +49,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*
index 19f798e338c974e17d317233950be3f4105af82a..ade76ec02995c96b48a4493aea5812523d3105af 100644 (file)
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs)
 }
 
 #define __range_ok(addr,size) ({                                       \
-       unsigned long flag, sum;                                        \
+       unsigned long flag, roksum;                                     \
        __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \
-               : "=&r" (flag), "=&r" (sum)                             \
+               : "=&r" (flag), "=&r" (roksum)                          \
                : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit)      \
                : "cc");                                                \
        flag; })
index 615bc0639e5ceb5e5b15f2bd8bd527d8224c9470..0152aba35154b5a8b53644e1466f30cd3748296e 100644 (file)
@@ -46,24 +46,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 /*     intr=^C         quit=^\         erase=del       kill=^U
        eof=^D          vtime=\0        vmin=\1         sxtc=\0
index a8e1e6cb7cd02f816823b22261808e53bbb290bd..27bfeca1b981a5b8fa343a76796aa38ef8f8c90e 100644 (file)
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem)
        unsigned long flags;
        int ret = 0;
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        if (read(&sem->waking) > 0) {
                dec(&sem->waking);
                ret = 1;
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem,
        int ret = 0;
        unsigned long flags;
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        if (read(&sem->waking) > 0) {
                dec(&sem->waking);
                ret = 1;
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem)
         int ret = 1;
        unsigned long flags;
 
-       local_save_flags(flags);
-       local_irq_disable();
+       local_irq_save(flags);
        if (read(&sem->waking) <= 0)
                inc(&sem->count);
        else {
index b869f6161aaa1c73e770fb2f238eecc7894654d9..fea0e8d57cb51883f5d0c31202ef33ed089f863d 100644 (file)
@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
   /* since Etrax doesn't have any atomic xchg instructions, we need to disable
      irq's (if enabled) and do it with move.d's */
   unsigned long flags,temp;
-  local_save_flags(flags); /* save flags, including irq enable bit */
-  local_irq_disable();             /* shut off irq's */
+  local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */
   switch (size) {
   case 1:
     *((unsigned char *)&temp) = x;
index 5ce1023c5d7b0b1389e41468c3af8a8eafbfcb0e..c9dbd4d43368c897c73408d5bfff4a5334351a0c 100644 (file)
@@ -40,24 +40,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_BT           15      /* bluetooth */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index 8840cf95e8ddc175c0795bf74579b938caea8d38..a62fb58723758faeef174533a1e867356f0da697 100644 (file)
@@ -51,24 +51,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 #include <asm-generic/termios.h>
 #endif
index 8078cbd2c0163878b44ace538a39422082b60cb2..30d8d33491dddd86466dc2df917270d8499c5415 100644 (file)
@@ -54,7 +54,7 @@
 #define __page_to_pfn(pg)                                      \
 ({     struct page *__pg = (pg);                               \
        int __sec = page_to_section(__pg);                      \
-       __pg - __section_mem_map_addr(__nr_to_section(__sec));  \
+       (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \
 })
 
 #define __pfn_to_page(pfn)                             \
index 3b41d2bb70da36bfd8d09a16dfb3f3e4581445b5..5e3dde2ee5adf37f5ccd62fa11f9b3878bc5a653 100644 (file)
@@ -36,7 +36,6 @@
 #define MADV_DOFORK    11              /* do inherit across fork */
 
 /* compatibility flags */
-#define MAP_ANON       MAP_ANONYMOUS
 #define MAP_FILE       0
 
 #endif
index e2319f992af298c7f8eaff5d0ec945256647b406..fb2925d08c491e21acff0564e960520eac178bb1 100644 (file)
@@ -49,24 +49,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*
index c57441bb290502c449e4217684711a3b11c34a3f..4dd272331361c7eb747305366810fc92c28b3b08 100644 (file)
@@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 /**
- * atomic_add_unless - add unless the number is a given value
+ * atomic_add_unless - add unless the number is already a given value
  * @v: pointer of type atomic_t
  * @a: the amount to add to v...
  * @u: ...unless v is equal to u.
  *
- * Atomically adds @a to @v, so long as it was not @u.
+ * Atomically adds @a to @v, so long as @v was not already @u.
  * Returns non-zero if @v was not @u, and zero otherwise.
  */
 #define atomic_add_unless(v, a, u)                             \
index 1c780fa1e762e966a6f6255dbf0e5bbf4a326e65..273b50629357bf15955b6c433a9d95f19af9dfbe 100644 (file)
@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word)
  *
  * This is defined the same way as
  * the libc and compiler builtin ffs routines, therefore
- * differs in spirit from the above ffz (man ffs).
+ * differs in spirit from the above ffz() (man ffs).
  */
 static inline int ffs(int x)
 {
@@ -388,7 +388,7 @@ static inline int ffs(int x)
  * fls - find last bit set
  * @x: the word to search
  *
- * This is defined the same way as ffs.
+ * This is defined the same way as ffs().
  */
 static inline int fls(int x)
 {
index 03f548536d6b1f421cec52c2438eb36802af2bd0..7c99678a8f863ab546568bb31ae25ac82c15c1f7 100644 (file)
@@ -39,24 +39,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 #include <linux/module.h>
 
index eef5133b9ce2a03b73b5f4c73f0e771a12b52aa8..70829ae3ad527729cf49e79be5dcd247d1fd9eb5 100644 (file)
@@ -54,10 +54,10 @@ extern struct movsl_mask {
  * This needs 33-bit arithmetic. We have a carry...
  */
 #define __range_ok(addr,size) ({ \
-       unsigned long flag,sum; \
+       unsigned long flag,roksum; \
        __chk_user_ptr(addr); \
        asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
-               :"=&r" (flag), "=r" (sum) \
+               :"=&r" (flag), "=r" (roksum) \
                :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \
        flag; })
 
index 42c95693240cfb618e7a47ef98656699291110c8..08750c2d3607b0f479e978cac60627d3dc7e0262 100644 (file)
@@ -46,24 +46,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS msgs */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 # ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index 4619ba5c372ed2941bf42d4cb1a6198f5bf1eafb..9a4a5d20160addb3f1e07db032b24f347d3d75ad 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_A_OUT_H
 #define _ASM_M32R_A_OUT_H
 
-/* orig : i386 2.4.18 */
-
 struct exec
 {
   unsigned long a_info;                /* Use macros N_MAGIC, etc for access */
index 06a83dc94648f9508782f5a14fef081256dfd9d0..81782c122da451b16fa2b650f8fbfc99d68ac3a2 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id$ */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 9a56f661bdb35ac9a359441e59ec2db615e6b564..f77214eff1368e858e207bae6c73dd763bda5780 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_BUGS_H
 #define _ASM_M32R_BUGS_H
 
-/* $Id$ */
-
 /*
  * This is included by init/main.c to check for architecture-dependent bugs.
  *
index 3c0b9a2e03bc828b2e3eba1d738586d5bb8e1d8c..10b2c1d11614995f12e23632efa0efbc690a3d6b 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_BYTEORDER_H
 #define _ASM_M32R_BYTEORDER_H
 
-/* $Id$ */
-
 #include <asm/types.h>
 
 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
index 9c2b2d9998bc9e13397cb28cc9d21f91e3a42214..40b3ee98193dbf5177299ee1cfb82c673e749a7d 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_CACHE_H
 #define _ASM_M32R_CACHE_H
 
-/* $Id$ */
-
 /* L1 cache line size */
 #define L1_CACHE_SHIFT         4
 #define L1_CACHE_BYTES         (1 << L1_CACHE_SHIFT)
index 56961a9511b2cea9a7f46b04fedc912799c2e05c..78587c958146f84991740a920b7178388b41202a 100644 (file)
@@ -67,4 +67,3 @@ do {                                                          \
        memcpy(dst, src, len)
 
 #endif /* _ASM_M32R_CACHEFLUSH_H */
-
index c19d927ff22d5bd54ff355af2d0196a18edc8846..7859d864f2c24cc3b7e664dc424f469229a3dbe0 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_CURRENT_H
 #define _ASM_M32R_CURRENT_H
 
-/* $Id$ */
-
 #include <linux/thread_info.h>
 
 struct task_struct;
@@ -15,4 +13,3 @@ static __inline__ struct task_struct *get_current(void)
 #define current        (get_current())
 
 #endif /* _ASM_M32R_CURRENT_H */
-
index f285eaee7d2739db9989931e22909af47c564412..164448d23850ec312843ba722d7962822f05444d 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_DELAY_H
 #define _ASM_M32R_DELAY_H
 
-/* $Id$ */
-
 /*
  * Copyright (C) 1993 Linus Torvalds
  *
index 7263b013b67ee031b8b136654d0a561756ecc667..52f6a22dd232c5ddc18af72d76431e4d0cf447f7 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_DMA_H
 #define _ASM_M32R_DMA_H
 
-/* $Id$ */
-
 #include <asm/io.h>
 
 /*
index 7a98520194a79cf0d6901e06dfb603b3399eae84..777149262aada2d5abfcc13a1659f3458b6ee77c 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef _ASM_M32R_ERRNO_H
 #define _ASM_M32R_ERRNO_H
 
-/* $Id$ */
-
 #include <asm-generic/errno.h>
 
 #endif /* _ASM_M32R_ERRNO_H */
-
index c82ebe8f250d6fadc84b913a1a48fc9af13bceab..4672a49e8760546f3b835d627359b9c0d62fd418 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_IDE_H
 #define _ASM_M32R_IDE_H
 
-/* $Id$ */
-
 /*
  *  linux/include/asm-m32r/ide.h
  *
@@ -15,6 +13,7 @@
 
 #ifdef __KERNEL__
 
+#include <asm/m32r.h>
 
 #ifndef MAX_HWIFS
 # ifdef CONFIG_BLK_DEV_IDEPCI
@@ -24,9 +23,6 @@
 # endif
 #endif
 
-#include <asm/m32r.h>
-
-
 #define IDE_ARCH_OBSOLETE_DEFAULTS
 
 static __inline__ int ide_default_irq(unsigned long base)
index b3508292246a65c8918c4679a196f06527d24e04..d23cfc45738a0c4bf3dc193f85114e811dfbda29 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef __ARCH_M32R_IOCTLS_H__
 #define __ARCH_M32R_IOCTLS_H__
 
-/* $Id$ */
-
-/* orig : i386 2.5.67 */
-
 #include <asm/ioctl.h>
 
 /* 0x54 is just a magic number to make these relatively unique ('T') */
@@ -85,4 +81,3 @@
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 #endif /* __ARCH_M32R_IOCTLS_H__ */
-
index 7c77fb0b1467291be0107d2cca24519c50570f8a..8d2d7c8ffdb02cf2518cf98e01b402fc749896d6 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_IPCBUF_H
 #define _ASM_M32R_IPCBUF_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 /*
  * The ipc64_perm structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
index 0524d89edb0f4709de3bdc42c5ecf00438f46d5e..fa94dc6410ea1129083a401f01558e5028e05c23 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef __M32R_KMAP_TYPES_H
 #define __M32R_KMAP_TYPES_H
 
-/* Dummy header just to define km_type. */
-
-
 #ifdef CONFIG_DEBUG_HIGHMEM
 # define D(n) __KM_FENCE_##n ,
 #else
@@ -30,4 +27,3 @@ D(13) KM_TYPE_NR
 #undef D
 
 #endif /* __M32R_KMAP_TYPES_H */
-
index cbdbc5891445e25e88658f38bb5a3348eaf57a13..2dc89d68b6d943b4aec5b1366825d52eb4aad565 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _M32104UT_M32104UT_PLD_H
+#define _M32104UT_M32104UT_PLD_H
+
 /*
  * include/asm-m32r/m32104ut/m32104ut_pld.h
  *
  * this archive for more details.
  */
 
-#ifndef _M32104UT_M32104UT_PLD_H
-#define _M32104UT_M32104UT_PLD_H
-
-
 #if defined(CONFIG_PLAT_M32104UT)
 #define PLD_PLAT_BASE          0x02c00000
 #else
@@ -35,7 +34,7 @@
 #define __reg8
 #define __reg16
 #define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /* CFC */
 #define        PLD_CFRSTCR             __reg16(PLD_BASE + 0x0000)
 #define PLD_SCTXB              __reg16(PLD_BASE + 0x3800c)
 #define PLD_SCRXB              __reg16(PLD_BASE + 0x3800e)
 
-#endif /* _M32104UT_M32104UT_PLD_H */
+#endif /* _M32104UT_M32104UT_PLD_H */
index f1e47ae1f891da668f3a5c1775ffc2faf9af6c84..aae810a4fb2c8bf480ccc5ab145d81d3813afac4 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _M32700UT_M32700UT_LAN_H
+#define _M32700UT_M32700UT_LAN_H
+
 /*
  * include/asm-m32r/m32700ut/m32700ut_lan.h
  *
@@ -8,14 +11,8 @@
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
- * $Id$
  */
 
-#ifndef _M32700UT_M32700UT_LAN_H
-#define _M32700UT_M32700UT_LAN_H
-
-
 #ifndef __ASSEMBLY__
 /*
  * C functions use non-cache address.
@@ -23,7 +20,7 @@
 #define M32700UT_LAN_BASE      (0x10000000 /* + NONCACHE_OFFSET */)
 #else
 #define M32700UT_LAN_BASE      (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /* ICU
  *  ICUISTS:   status register
 #define PLDI2CSTS_BB           0x00000010
 #define PLDI2CSTS_NOACK                0x00000001      /* 0:ack, 1:noack */
 
-#endif /* _M32700UT_M32700UT_LAN_H */
+#endif /* _M32700UT_M32700UT_LAN_H */
index e41c4aa48b4cba16d10f8a2bab9a9feab574d3c9..4c2489079788eaabb26994b4d47fdf4c0919e789 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _M32700UT_M32700UT_LCD_H
+#define _M32700UT_M32700UT_LCD_H
+
 /*
  * include/asm-m32r/m32700ut/m32700ut_lcd.h
  *
@@ -8,14 +11,8 @@
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
- * $Id$
  */
 
-#ifndef _M32700UT_M32700UT_LCD_H
-#define _M32700UT_M32700UT_LCD_H
-
-
 #ifndef __ASSEMBLY__
 /*
  * C functions use non-cache address.
@@ -23,7 +20,7 @@
 #define M32700UT_LCD_BASE      (0x10000000 /* + NONCACHE_OFFSET */)
 #else
 #define M32700UT_LCD_BASE      (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /*
  * ICU
@@ -55,4 +52,4 @@
 #define M32700UT_LCD_ICUCR19   __reg16(M32700UT_LCD_BASE + 0x300036)
 #define M32700UT_LCD_ICUCR21   __reg16(M32700UT_LCD_BASE + 0x30003a)
 
-#endif /* _M32700UT_M32700UT_LCD_H */
+#endif /* _M32700UT_M32700UT_LCD_H */
index a48c22c978ca14b9305cd3403b510c1d8392a727..d39121279a1a411ce4862268bca40e5daf42c574 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _M32700UT_M32700UT_PLD_H
+#define _M32700UT_M32700UT_PLD_H
+
 /*
  * include/asm-m32r/m32700ut/m32700ut_pld.h
  *
@@ -8,14 +11,8 @@
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
- * $Id$
  */
 
-#ifndef _M32700UT_M32700UT_PLD_H
-#define _M32700UT_M32700UT_PLD_H
-
-
 #if defined(CONFIG_PLAT_M32700UT_Alpha)
 #define PLD_PLAT_BASE          0x08c00000
 #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV)
@@ -37,7 +34,7 @@
 #define __reg8
 #define __reg16
 #define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /* CFC */
 #define        PLD_CFRSTCR             __reg16(PLD_BASE + 0x0000)
 #define PLD_SCTXB              __reg16(PLD_BASE + 0x3800c)
 #define PLD_SCRXB              __reg16(PLD_BASE + 0x3800e)
 
-#endif /* _M32700UT_M32700UT_PLD.H */
+#endif /* _M32700UT_M32700UT_PLD.H */
index 56a2b12f2bfcfea5eeab087e6d67062e5cb6af80..2624c9db72555196c0926cded6369e77889695dd 100644 (file)
@@ -1,18 +1,17 @@
+#ifndef _MAPPI2_PLD_H
+#define _MAPPI2_PLD_H
+
 /*
  * include/asm-m32r/mappi2/mappi2_pld.h
  *
  * Definitions for Extended IO Logic on MAPPI2 board.
- *  based on m32700ut_pld.h by
+ *  based on m32700ut_pld.h
  *
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
  */
 
-#ifndef _MAPPI2_PLD_H
-#define _MAPPI2_PLD_H
-
 #ifndef __ASSEMBLY__
 /* FIXME:
  * Some C functions use non-cache address, so can't define non-cache address.
@@ -26,7 +25,7 @@
 #define __reg8
 #define __reg16
 #define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /* CFC */
 #define        PLD_CFRSTCR             __reg16(PLD_BASE + 0x0000)
 
 #endif
 
-#endif /* _MAPPI2_PLD.H */
+#endif /* _MAPPI2_PLD.H */
index 92f10defaef8c7d5b1b93204eee3453240f4ce45..451c40ee70af88cd3bd648486d9e826bb07e11d0 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _MAPPI3_PLD_H
+#define _MAPPI3_PLD_H
+
 /*
  * include/asm-m32r/mappi3/mappi3_pld.h
  *
@@ -7,12 +10,8 @@
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
  */
 
-#ifndef _MAPPI3_PLD_H
-#define _MAPPI3_PLD_H
-
 #ifndef __ASSEMBLY__
 /* FIXME:
  * Some C functions use non-cache address, so can't define non-cache address.
@@ -26,7 +25,7 @@
 #define __reg8
 #define __reg16
 #define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /* CFC */
 #define        PLD_CFRSTCR             __reg16(PLD_BASE + 0x0000)
 /* Reset Control */
 #define PLD_REBOOT             __reg16(PLD_BASE + 0x38000)
 
-#endif /* _MAPPI3_PLD.H */
+#endif /* _MAPPI3_PLD.H */
index 755601d053ccfc254d58c54d2a25357f0e68296d..aa1b7bf84f5115afabcb6a1f890e082a17ca3ab4 100644 (file)
@@ -7,7 +7,6 @@
 #include <asm/io.h>
 
 #ifndef RTC_PORT
-// #define RTC_PORT(x) (0x70 + (x))
 #define RTC_PORT(x)    ((x))
 #define RTC_ALWAYS_BCD 1       /* RTC operates in binary mode */
 #endif
@@ -26,7 +25,5 @@ outb_p((val),RTC_PORT(1)); \
 })
 
 #define RTC_IRQ 8
-#if 0
-#endif
 
 #endif /* _ASM_MC146818RTC_H */
index 695a860c024fb0bd6c286f5739516563af831795..516a8973b1302c177643915c35ee248f5631e987 100644 (file)
@@ -3,8 +3,6 @@
 
 #include <asm-generic/mman.h>
 
-/* orig : i386 2.6.0-test6 */
-
 #define MAP_GROWSDOWN  0x0100          /* stack-like segment */
 #define MAP_DENYWRITE  0x0800          /* ETXTBSY */
 #define MAP_EXECUTABLE 0x1000          /* mark it as an executable */
index cf3f6d78ac66ab13bc056b2f01f9389ad71a8ea5..d9bd724479cf0a078ea9b92fa4f73045468a8234 100644 (file)
@@ -1,13 +1,14 @@
 #ifndef _ASM_M32R_MMU_H
 #define _ASM_M32R_MMU_H
 
-
 #if !defined(CONFIG_MMU)
+
 typedef struct {
        struct vm_list_struct   *vmlist;
        unsigned long           end_brk;
 } mm_context_t;
-#else
+
+#else /* CONFIG_MMU */
 
 /* Default "unsigned long" context */
 #ifndef CONFIG_SMP
@@ -16,5 +17,6 @@ typedef unsigned long mm_context_t;
 typedef unsigned long mm_context_t[NR_CPUS];
 #endif
 
-#endif  /* CONFIG_MMU */
-#endif  /* _ASM_M32R_MMU_H */
+#endif /* CONFIG_MMU */
+
+#endif /* _ASM_M32R_MMU_H */
index 542302eb6bcbf97d9e1bd87474c4ce3bbd6ee145..1f40d4a0acf1a4acd6d0a3764f5b9f09b9439a78 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef _ASM_M32R_MMU_CONTEXT_H
 #define _ASM_M32R_MMU_CONTEXT_H
-
 #ifdef __KERNEL__
 
-
 #include <asm/m32r.h>
 
 #define MMU_CONTEXT_ASID_MASK      (0x000000FF)
@@ -11,7 +9,6 @@
 #define MMU_CONTEXT_FIRST_VERSION  (0x00000100)
 #define NO_CONTEXT                 (0x00000000)
 
-
 #ifndef __ASSEMBLY__
 
 #include <asm/atomic.h>
@@ -147,7 +144,7 @@ static inline void switch_mm(struct mm_struct *prev,
 #define activate_mm(prev, next)        \
        switch_mm((prev), (next), NULL)
 
-#else
+#else /* not CONFIG_MMU */
 #define get_mmu_context(mm)             do { } while (0)
 #define init_new_context(tsk,mm)        (0)
 #define destroy_context(mm)             do { } while (0)
@@ -158,11 +155,9 @@ static inline void switch_mm(struct mm_struct *prev,
 #define deactivate_mm(mm,tsk)           do { } while (0)
 #define activate_mm(prev,next)          do { } while (0)
 #define enter_lazy_tlb(mm,tsk)          do { } while (0)
-#endif /* CONFIG_MMU */
-
+#endif /* not CONFIG_MMU */
 
 #endif /* not __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
-
 #endif /* _ASM_M32R_MMU_CONTEXT_H */
index 3f2541c92a7b06068c9debcb0256ec4864ae1a9c..eb73ee01121525c3a41be140ccf33dd9ee276d13 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_MODULE_H
 #define _ASM_M32R_MODULE_H
 
-/* $Id$ */
-
 struct mod_arch_specific { };
 
 #define Elf_Shdr       Elf32_Shdr
@@ -10,4 +8,3 @@ struct mod_arch_specific { };
 #define Elf_Ehdr       Elf32_Ehdr
 
 #endif /* _ASM_M32R_MODULE_H */
-
index 852ff52af4c2efb30668ecbf5828725eaaa9763c..0d5a877b813e4390c24edfe5e84ca007eb4df660 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_MSGBUF_H
 #define _ASM_M32R_MSGBUF_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 /*
  * The msqid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
index 7172d3d2e2603aeacc839de4e6cff97637b75aae..210f8056b80532ca8e6a740b5e2895108006d0c9 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_NAMEI_H
 #define _ASM_M32R_NAMEI_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 /*
  * linux/include/asm-m32r/namei.h
  *
index f53e10187c03f377bf3504b7fb44b820453c5a3c..a5f18dd1ab20b4d1c077d95aff19e057eb51d6cf 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _OPSPUT_OPSPUT_LAN_H
+#define _OPSPUT_OPSPUT_LAN_H
+
 /*
  * include/asm-m32r/opsput/opsput_lan.h
  *
@@ -8,14 +11,8 @@
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
- * $Id: opsput_lan.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
  */
 
-#ifndef _OPSPUT_OPSPUT_LAN_H
-#define _OPSPUT_OPSPUT_LAN_H
-
-
 #ifndef __ASSEMBLY__
 /*
  * C functions use non-cache address.
@@ -23,7 +20,7 @@
 #define OPSPUT_LAN_BASE        (0x10000000 /* + NONCACHE_OFFSET */)
 #else
 #define OPSPUT_LAN_BASE        (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /* ICU
  *  ICUISTS:   status register
@@ -52,4 +49,4 @@
 #define OPSPUT_LAN_ICUCR1      __reg16(OPSPUT_LAN_BASE + 0xc0010)
 #define OPSPUT_LAN_ICUCR3      __reg16(OPSPUT_LAN_BASE + 0xc0014)
 
-#endif /* _OPSPUT_OPSPUT_LAN_H */
+#endif /* _OPSPUT_OPSPUT_LAN_H */
index 99f296e1b61b6ee4bc4da2bbaaba0a3eefcdb63e..369c9f0832a6a5dfff94acc871eea2dfc31452bb 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _OPSPUT_OPSPUT_LCD_H
+#define _OPSPUT_OPSPUT_LCD_H
+
 /*
  * include/asm-m32r/opsput/opsput_lcd.h
  *
@@ -8,14 +11,8 @@
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
- * $Id: opsput_lcd.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
  */
 
-#ifndef _OPSPUT_OPSPUT_LCD_H
-#define _OPSPUT_OPSPUT_LCD_H
-
-
 #ifndef __ASSEMBLY__
 /*
  * C functions use non-cache address.
@@ -23,7 +20,7 @@
 #define OPSPUT_LCD_BASE        (0x10000000 /* + NONCACHE_OFFSET */)
 #else
 #define OPSPUT_LCD_BASE        (0x10000000 + NONCACHE_OFFSET)
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /*
  * ICU
@@ -55,4 +52,4 @@
 #define OPSPUT_LCD_ICUCR19     __reg16(OPSPUT_LCD_BASE + 0x300036)
 #define OPSPUT_LCD_ICUCR21     __reg16(OPSPUT_LCD_BASE + 0x30003a)
 
-#endif /* _OPSPUT_OPSPUT_LCD_H */
+#endif /* _OPSPUT_OPSPUT_LCD_H */
index a8d6452076f1576dd36c544082c4dcdc56b8056b..3f11ea1aac2d3605dc854be2e596e3b2490ed719 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _OPSPUT_OPSPUT_PLD_H
+#define _OPSPUT_OPSPUT_PLD_H
+
 /*
  * include/asm-m32r/opsput/opsput_pld.h
  *
@@ -8,14 +11,8 @@
  * This file is subject to the terms and conditions of the GNU General
  * Public License.  See the file "COPYING" in the main directory of
  * this archive for more details.
- *
- * $Id: opsput_pld.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
  */
 
-#ifndef _OPSPUT_OPSPUT_PLD_H
-#define _OPSPUT_OPSPUT_PLD_H
-
-
 #define PLD_PLAT_BASE          0x1cc00000
 
 #ifndef __ASSEMBLY__
@@ -31,7 +28,7 @@
 #define __reg8
 #define __reg16
 #define __reg32
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLY__ */
 
 /* CFC */
 #define        PLD_CFRSTCR             __reg16(PLD_BASE + 0x0000)
 #define PLD_SCTXB              __reg16(PLD_BASE + 0x3800c)
 #define PLD_SCRXB              __reg16(PLD_BASE + 0x3800e)
 
-#endif /* _OPSPUT_OPSPUT_PLD.H */
+#endif /* _OPSPUT_OPSPUT_PLD.H */
index 404a4c24007b3b4f5729c86ae90ba5fce8f8e50f..6f6ecf7d14a3550bafd331892704b75a0c51fe8c 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _ASM_M32R_PAGE_H
 #define _ASM_M32R_PAGE_H
 
-
 /* PAGE_SHIFT determines the page size */
 #define PAGE_SHIFT     12
 #define PAGE_SIZE      (1UL << PAGE_SHIFT)
@@ -57,9 +56,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
  * and CONFIG_HIGHMEM64G options in the kernel configuration.
  */
 
-
-/* This handles the memory map.. */
-
 #define __MEMORY_START  CONFIG_MEMORY_START
 #define __MEMORY_SIZE   CONFIG_MEMORY_SIZE
 
@@ -92,4 +88,3 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 
 #endif /* __KERNEL__ */
 #endif /* _ASM_M32R_PAGE_H */
-
index 750b938ccb52a5b5459bf254601ce7eaaeeb66bd..3e14026e39cdaf2a479d1a09dabaf9c2d6b514b8 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_PARAM_H
 #define _ASM_M32R_PARAM_H
 
-/* $Id$ */
-
-/* orig : i386 2.5.67 */
-
 #ifdef __KERNEL__
 # define HZ            100             /* Internal kernel timer frequency */
 # define USER_HZ       100             /* .. some user interfaces are in "ticks" */
index 00d7b6f39a33fac151cf1b9ca28877e296901762..fe785d167db6142d2af839368874bca5665254ec 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_PCI_H
 #define _ASM_M32R_PCI_H
 
-/* $Id$ */
-
 #include <asm-generic/pci.h>
 
 #define PCI_DMA_BUS_IS_PHYS    (1)
index e09a86c3cadf44bf4266eece984c47dbf390b804..943ba63c1ebcf7bb365f541b75b05828429c6e54 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_PGALLOC_H
 #define _ASM_M32R_PGALLOC_H
 
-/* $Id$ */
-
 #include <linux/mm.h>
 
 #include <asm/io.h>
@@ -74,4 +72,3 @@ static __inline__ void pte_free(struct page *pte)
 #define check_pgt_cache()      do { } while (0)
 
 #endif /* _ASM_M32R_PGALLOC_H */
-
index 84152760e0b56e90847b9eb49c3772459afbdc09..750925726a10bc73b14b2dcc7f693a6ed141c24a 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef _ASM_M32R_PGTABLE_2LEVEL_H
 #define _ASM_M32R_PGTABLE_2LEVEL_H
-
 #ifdef __KERNEL__
 
-
 /*
  * traditional M32R two-level paging structure:
  */
@@ -77,5 +75,4 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
 #define pgoff_to_pte(off)      ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE })
 
 #endif /* __KERNEL__ */
-
 #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */
index 47e7e85a3dc3f26b26dff2ca0d471752e1bd21e8..1caac65d208f244b327f9ea612562e5ebccc6c4b 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_POSIX_TYPES_H
 #define _ASM_M32R_POSIX_TYPES_H
 
-/* $Id$ */
-
-/* orig : i386, sh 2.4.18 */
-
 /*
  * This file is generally used by user-level software, so you need to
  * be a little careful about namespace pollution etc.  Also, we cannot
index 6b2b837c59782b910e3d679a3678f78296a4286f..0340633f3f4d23def1c11f78fa4184faa4df227f 100644 (file)
@@ -1,10 +1,6 @@
-/* $Id: rtc.h,v 1.1.1.1 2004/03/25 04:29:22 hitoshiy Exp $ */
-
 #ifndef __RTC_H__
 #define __RTC_H__
 
-
-
    /* Dallas DS1302 clock/calendar register numbers. */
 #  define RTC_SECONDS      0
 #  define RTC_MINUTES      1
index 09a10e43bf0f3bc7d3ae11a16f2a068262b0b0c5..c2de96cb69ed1940cf58510bfa6ec48977abbc66 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_SCATTERLIST_H
 #define _ASM_M32R_SCATTERLIST_H
 
-/* $Id$ */
-
 struct scatterlist {
     char *  address;    /* Location data is to be transferred to, NULL for
                          * highmem page */
index 6b969e53b8063b39a166ce8a041cf40fddb914ad..5e5d21c4908aed4efd88452abfe5a94032b8b1a6 100644 (file)
@@ -5,4 +5,3 @@
 #include <asm-generic/sections.h>
 
 #endif /* _M32R_SECTIONS_H */
-
index e45db68e6c2d79f751211c0dde863afc9e5cd45b..42b11aeb3249e630403fc0cb8702711624fd536a 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_SEGMENT_H
 #define _ASM_M32R_SEGMENT_H
 
-/* $Id$ */
-
-/* orig : i386 (2.4.18) */
-
 #define __KERNEL_CS    0x10
 #define __KERNEL_DS    0x18
 
index e69018e6ff711435ba9a9df5138ab491722d3778..c9873d6890e283cfd035a1d5be8b3e50981dc1ba 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_SEMBUF_H
 #define _ASM_M32R_SEMBUF_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 /*
  * The semid64_ds structure for m32r architecture.
  * Note extra padding because this structure is passed back and forth
index 6a0b32202d4e0ee901b3c93f44dcd87d7761a738..c637ab99239452f01ecd0ba853f7935f7299229a 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _ASM_M32R_SETUP_H
+#define _ASM_M32R_SETUP_H
+
 /*
  * This is set up by the setup-routine at boot-time
  */
@@ -32,3 +35,4 @@ extern unsigned long memory_end;
 
 #endif  /*  __KERNEL__  */
 
+#endif /* _ASM_M32R_SETUP_H */
index b84e897fa87bf6c41bf37ee62a5e43b1fd7f8363..b0cdf0aa7d654ca4a7aa8c0531323eed2c91eeaf 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_SHMBUF_H
 #define _ASM_M32R_SHMBUF_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 /*
  * The shmid64_ds structure for M32R architecture.
  * Note extra padding because this structure is passed back and forth
index db0019ba955d4458f64164f056cf2f1f7e15317a..35986d81a5285fd5aa23858513cf21b30e922ba7 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_SHMPARAM_H
 #define _ASM_M32R_SHMPARAM_H
 
-/* $Id$ */
-
 #define        SHMLBA PAGE_SIZE                 /* attach addr a multiple of this */
 
 #endif /* _ASM_M32R_SHMPARAM_H */
index 62537dc4dec903cd3f9cfdc1cb08f578df8c24c0..da4a9c36d09b9e224db4de75ff2f765acfb9cc64 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef _ASM_M32R_SIGCONTEXT_H
 #define _ASM_M32R_SIGCONTEXT_H
 
-/* $Id$ */
-
-
 struct sigcontext {
        /* CPU registers */
        /* Saved main processor registers. */
index 482202f2e77fac5425fe2d8fba8be28d61ca188e..7d9cd9ebfd0e50c8d700b32f766835c61ab5fab8 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _M32R_SIGINFO_H
 #define _M32R_SIGINFO_H
 
-/* $Id$ */
-
 #include <asm-generic/siginfo.h>
 
 #endif /* _M32R_SIGINFO_H */
index 65423bed32b1cadecac621de7f19b460d22c793a..937258686ba54982ebb7b94149a513ba21090241 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_SIGNAL_H
 #define _ASM_M32R_SIGNAL_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 #include <linux/types.h>
 #include <linux/time.h>
 #include <linux/compiler.h>
index 650d2558c304c1e271e034c54246e8203f6bc3e5..abd937ac5239ae91503275cea548652bf020db23 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef _ASM_M32R_SMP_H
 #define _ASM_M32R_SMP_H
 
-/* $Id$ */
-
-
 #ifdef CONFIG_SMP
 #ifndef __ASSEMBLY__
 
index 147a118442ac4fbd26d8af977a64533befe56842..f89962e231fedf296af9c4d3e76c55dc47f1da13 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_SOCKIOS_H
 #define _ASM_M32R_SOCKIOS_H
 
-/* $Id$ */
-
 /* Socket-level I/O control calls. */
 #define FIOSETOWN      0x8901
 #define SIOCSPGRP      0x8902
index 7e9941c45f4022e6ce30107de393a08e58c1eb92..83f52105c0e4a33f5ab282a78f9c25ce6f05a3bb 100644 (file)
@@ -20,4 +20,4 @@ typedef struct {
 
 #define __RAW_RW_LOCK_UNLOCKED         { RW_LOCK_BIAS }
 
-#endif
+#endif /* _ASM_M32R_SPINLOCK_TYPES_H */
index 05748fef4c8e232cf8069fa0eec7d62515a29313..da4518f82d6d31d71609d7a670924cbe79c88c2a 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_STAT_H
 #define _ASM_M32R_STAT_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 #include <asm/byteorder.h>
 
 struct __old_kernel_stat {
index cb54bcc2e677800bed20d8df4aced75e76e20d25..e61e2b0bfc1f4c423a84ca6e6c6b6de2905d4e24 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_STRING_H
 #define _ASM_M32R_STRING_H
 
-/* $Id$ */
-
 #define  __HAVE_ARCH_STRLEN
 extern size_t strlen(const char * s);
 
index d8d4b2c7a7d459400e4949203e68e4f39e70c28c..25f316f2b78dc8420efb405e94465fc56c81236f 100644 (file)
@@ -1,11 +1,8 @@
 #ifndef _ASM_M32R_SYSCALL_H
 #define _ASM_M32R_SYSCALL_H
 
-/* $Id$ */
-
 /* Definitions for the system call vector.  */
 #define SYSCALL_VECTOR          "2"
 #define SYSCALL_VECTOR_ADDRESS  "0xa0"
 
 #endif /* _ASM_M32R_SYSCALL_H */
-
index 4ce0619f6989024855782484766eb0adfa88cc78..99ee09889ff78578ca1c913e1c75a1ce4b65f319 100644 (file)
@@ -339,4 +339,4 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
 
 #define arch_align_stack(x) (x)
 
-#endif  /* _ASM_M32R_SYSTEM_H */
+#endif /* _ASM_M32R_SYSTEM_H */
index faf2bd0504c15153b84baa49ab3c507bdb738184..e402641dfbad20d8b2f5ac13711dcbf3fda54a2d 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_TERMBITS_H
 #define _ASM_M32R_TERMBITS_H
 
-/* $Id$ */
-
 #include <linux/posix_types.h>
 
 typedef unsigned char  cc_t;
@@ -184,4 +182,4 @@ struct ktermios {
 #define        TCSADRAIN       1
 #define        TCSAFLUSH       2
 
-#endif  /* _ASM_M32R_TERMBITS_H */
+#endif /* _ASM_M32R_TERMBITS_H */
index fc99d2e178d8c3c7878288e7ab09a2c2b1dcba1b..4943dd8db44de0e854a970ab6e92d54ccc2fb7d7 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _M32R_TERMIOS_H
 #define _M32R_TERMIOS_H
 
-/* orig : i386 2.6.0-test5 */
-
 #include <asm/termbits.h>
 #include <asm/ioctls.h>
 
@@ -41,24 +39,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 #include <linux/module.h>
 
index 019441c1d7a0ef4feaff5523a6435d58283057ab..bb9fe4feb12d51847cf0a42de2183699b270b41c 100644 (file)
@@ -1,15 +1,12 @@
 #ifndef _ASM_M32R_TIMEX_H
 #define _ASM_M32R_TIMEX_H
 
-/* $Id$ */
-
 /*
  * linux/include/asm-m32r/timex.h
  *
  * m32r architecture timex specifications
  */
 
-
 #define CLOCK_TICK_RATE        (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE)
 #define CLOCK_TICK_FACTOR      20      /* Factor of both 1000000 and CLOCK_TICK_RATE */
 
index ae4494960593312b5c8d4813192c7f9e0639b421..3d37ac002bcc6e2a9329de1df0a644297aee9249 100644 (file)
@@ -98,4 +98,3 @@ static __inline__ void __flush_tlb_all(void)
 extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
 
 #endif /* _ASM_M32R_TLBFLUSH_H */
-
index fcf24c64c3ba4650d001dbf9dfa770583df51bed..27d3eb539c50ddf16bbea835d11fcd7359bbf703 100644 (file)
@@ -3,10 +3,6 @@
 
 #ifndef __ASSEMBLY__
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 typedef unsigned short umode_t;
 
 /*
@@ -59,4 +55,4 @@ typedef u64 dma64_addr_t;
 
 #endif /* __KERNEL__ */
 
-#endif  /* _ASM_M32R_TYPES_H */
+#endif /* _ASM_M32R_TYPES_H */
index 26e978c7e3b40a060c0d3e80f1ef41cf5923635a..bd8c83765a5c66361c8bfc35e0ee172ec5cd3f87 100644 (file)
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s)
  * This needs 33-bit arithmetic. We have a carry...
  */
 #define __range_ok(addr,size) ({                                       \
-       unsigned long flag, sum;                                        \
+       unsigned long flag, roksum;                                     \
        __chk_user_ptr(addr);                                           \
        asm (                                                           \
                "       cmpu    %1, %1    ; clear cbit\n"               \
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s)
                "       subx    %0, %0\n"                               \
                "       cmpu    %4, %1\n"                               \
                "       subx    %0, %5\n"                               \
-               : "=&r" (flag), "=r" (sum)                              \
+               : "=&r" (flag), "=r" (roksum)                           \
                : "1" (addr), "r" ((int)(size)),                        \
                  "r" (current_thread_info()->addr_limit.seg), "r" (0)  \
                : "cbit" );                                             \
index 2de709a5c53c16b91f2fb52fe0d4cb2e27484524..09324741eec39780f483212f00fda95b75c5ffa9 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_UCONTEXT_H
 #define _ASM_M32R_UCONTEXT_H
 
-/* orig : i386 2.4.18 */
-
 struct ucontext {
        unsigned long     uc_flags;
        struct ucontext  *uc_link;
index 3aef9ac8d3aa06ee716805fc4522563ee8607427..fccc180c3913ff84a67af1139d0bc43a3eeed3a5 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef _ASM_M32R_UNALIGNED_H
 #define _ASM_M32R_UNALIGNED_H
 
-/* $Id$ */
-
-/* orig : generic 2.4.18 */
-
 /*
  * For the benefit of those who are trying to port Linux to another
  * architecture, here are some C-language equivalents.
@@ -12,7 +8,6 @@
 
 #include <asm/string.h>
 
-
 #define get_unaligned(ptr) \
   ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
 
@@ -21,5 +16,4 @@
      memmove((ptr), &__tmp, sizeof(*(ptr)));           \
      (void)0; })
 
-
-#endif  /* _ASM_M32R_UNALIGNED_H */
+#endif /* _ASM_M32R_UNALIGNED_H */
index 5b66bd3c6ed663cd6cb9d9dd4f7cba21eaec66f7..cbbd53762ea64f17e71ff772c2bc5429eb6cd14f 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_UNISTD_H
 #define _ASM_M32R_UNISTD_H
 
-/* $Id$ */
-
 /*
  * This file contains the system call numbers.
  */
index 1ad4ded8483b48a1af31452fe8b7a2370c1e3fba..035258d713d00f5ebb2508fda4261f956d7855e6 100644 (file)
@@ -1,12 +1,6 @@
 #ifndef _ASM_M32R_USER_H
 #define _ASM_M32R_USER_H
 
-/* $Id$ */
-
-/* orig : sh 2.4.18
- * mod  : remove fpu registers
- */
-
 #include <linux/types.h>
 #include <asm/ptrace.h>
 #include <asm/page.h>
index 533163447cc9d3f711d256c144bb6095b982b0f9..a1b63061c06fee0a28571f13d100f72e95fe8f4e 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_VGA_H
 #define _ASM_M32R_VGA_H
 
-/* $Id$ */
-
 /*
  *     Access to VGA videoram
  *
@@ -19,4 +17,4 @@
 #define vga_readb(x) (*(x))
 #define vga_writeb(x,y) (*(y) = (x))
 
-#endif  /* _ASM_M32R_VGA_H */
+#endif /* _ASM_M32R_VGA_H */
index fd960dc9bf7663f1758d5f4ed7f58356372d8c30..6d525259df3ed0e1effb85afc62ef886ca9c9fe2 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_M32R_XOR_H
 #define _ASM_M32R_XOR_H
 
-/* $Id$ */
-
 #include <asm-generic/xor.h>
 
 #endif  /* _ASM_M32R_XOR_H */
index 7ac6259b68dfbfeac50c5cb20304828b31e03395..ddfab96403cb93fdc1d6f4897cccaf0cc74672bf 100644 (file)
@@ -226,6 +226,21 @@ extern unsigned int fp_debugprint;
        .previous
 .endm
 
+/* work around binutils idiocy */
+old_gas=-1
+.irp    gas_ident.x .x
+old_gas=old_gas+1
+.endr
+.if !old_gas
+.irp   m b,w,l
+.macro getuser.\m src,dest,label,addr
+       getuser .\m,\src,\dest,\label,\addr
+.endm
+.macro putuser.\m src,dest,label,addr
+       putuser .\m,\src,\dest,\label,\addr
+.endm
+.endr
+.endif
 
 .macro movestack       nr,arg1,arg2,arg3,arg4,arg5
        .if     \nr
index 857f0c9a9120c650ed05ecbbf8e857dadf312449..00edabd7616869015ce4751f190de23483738d2b 100644 (file)
@@ -49,24 +49,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*
index d7c0b109bd457c55d2baeb80132a1bad6b8f9ff6..8c56ccab4849ca0c86dfba77281d0e52d6ee0b4e 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _M68K_USER_H
 #define _M68K_USER_H
 
-#include <asm/page.h>
-
 /* Core file format: The core file is written in such a way that gdb
    can understand it and provide useful information to the user (under
    linux we use the 'trad-core' bfd).  There are quite a number of
index 046cf686bee7f74a773877ec658c29e8d8d10e2a..e4d6f1fb1cf765c5ca8e23c3e8438f39ebcc0e2d 100644 (file)
@@ -72,7 +72,6 @@
 #define MADV_DOFORK    11              /* do inherit across fork */
 
 /* compatibility flags */
-#define MAP_ANON       MAP_ANONYMOUS
 #define MAP_FILE       0
 
 #endif /* _ASM_MMAN_H */
index 4906204d34fe75edbf6dbfb8d71cf9a5fc000166..2ce07f4be369f3637de4e438fa3e274125feeff0 100644 (file)
@@ -87,24 +87,6 @@ struct termio {
 #define TIOCM_OUT2     0x4000
 #define TIOCM_LOOP     0x8000
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6               /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved fo Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15      /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 #include <linux/string.h>
index 0ef15ee0f17ef8e21eaaf394838ed3cd5e965bb3..defe752cc996011164ee1600bd04e67441561fed 100644 (file)
@@ -55,7 +55,6 @@
 #define MADV_64M_PAGES  26              /* Use 64 Megabyte pages */
 
 /* compatibility flags */
-#define MAP_ANON       MAP_ANONYMOUS
 #define MAP_FILE       0
 #define MAP_VARIABLE   0
 
index 6965e8f6c3e162ae653bed05d4a17ab97923b27b..5345b34204759d2dc257df39005757537fd4787a 100644 (file)
@@ -39,24 +39,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index 7f80a019b6a00310b572d3c57d5a955148b41e06..2c14fea07c8aa92ae9bc320553103dac8d255e67 100644 (file)
@@ -71,24 +71,6 @@ struct termio {
 #define _VEOL2 8
 #define _VSWTC 9
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 /*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^U  */
 #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 
index a4c2d550dad4268e97836bda9ea6d6f48416cf8a..dca6a6cc103f58e9bbc96de28edd3cc9d96200bd 100644 (file)
@@ -13,7 +13,6 @@
 
 #ifdef __KERNEL__
 
-#include <linux/vmalloc.h>
 #include <asm/page.h>
 
 #define IO_SPACE_LIMIT 0xffffffff
@@ -41,70 +40,6 @@ static inline void * phys_to_virt(unsigned long address)
         return __io_virt(address);
 }
 
-extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
-
-static inline void * ioremap (unsigned long offset, unsigned long size)
-{
-        return __ioremap(offset, size, 0);
-}
-
-/*
- * This one maps high address device memory and turns off caching for that area.
- * it's useful if some control registers are in such an area and write combining
- * or read caching is not desirable:
- */
-static inline void * ioremap_nocache (unsigned long offset, unsigned long size)
-{
-        return __ioremap(offset, size, 0);
-}
-
-extern void iounmap(void *addr);
-
-/*
- * IO bus memory addresses are also 1:1 with the physical address
- */
-#define virt_to_bus virt_to_phys
-#define bus_to_virt phys_to_virt
-
-/*
- * readX/writeX() are used to access memory mapped devices. On some
- * architectures the memory mapped IO stuff needs to be accessed
- * differently.
- */
-
-#define readb(addr) (*(volatile unsigned char *) __io_virt(addr))
-#define readw(addr) (*(volatile unsigned short *) __io_virt(addr))
-#define readl(addr) (*(volatile unsigned int *) __io_virt(addr))
-#define readq(addr) (*(volatile unsigned long long *) __io_virt(addr))
-
-#define readb_relaxed(addr) readb(addr)
-#define readw_relaxed(addr) readw(addr)
-#define readl_relaxed(addr) readl(addr)
-#define readq_relaxed(addr) readq(addr)
-#define __raw_readb readb
-#define __raw_readw readw
-#define __raw_readl readl
-#define __raw_readq readq
-
-#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b))
-#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b))
-#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b))
-#define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b))
-#define __raw_writeb writeb
-#define __raw_writew writew
-#define __raw_writel writel
-#define __raw_writeq writeq
-
-#define memset_io(a,b,c)        memset(__io_virt(a),(b),(c))
-#define memcpy_fromio(a,b,c)    memcpy((a),__io_virt(b),(c))
-#define memcpy_toio(a,b,c)      memcpy(__io_virt(a),(b),(c))
-
-#define inb_p(addr) readb(addr)
-#define inb(addr) readb(addr)
-
-#define outb(x,addr) ((void) writeb(x,addr))
-#define outb_p(x,addr) outb(x,addr)
-
 #define mmiowb()       do { } while (0)
 
 /*
index 62b23caf370e09e7c70da9af92a10c373c7e1ed4..a3480e25eb4b3ff2af0f388227d924c8326ba1d6 100644 (file)
@@ -47,24 +47,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index 44edfd471443cd2682630040e1a4645bca99a914..e7c8f86ef8902b9ca28fb76896b21059d99181f2 100644 (file)
@@ -39,24 +39,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index 4a9c7fb411bc02b9d4bdb1abfcbaa592fa59f7cd..dc44e6ed3a7ccb55c1285b5979b716710945ca80 100644 (file)
@@ -50,24 +50,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15      /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index cab0b851b8b11164e8504313526603ffafaf410b..c23e74a0eaa8d4021c101a6bb4c3a5922ddfb4b2 100644 (file)
@@ -256,6 +256,35 @@ extern void iounmap(volatile void __iomem *addr);
 #define iowrite16(val,X)               writew(val,X)
 #define iowrite32(val,X)               writel(val,X)
 
+static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count)
+{
+       insb((unsigned long __force)port, buf, count);
+}
+static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count)
+{
+       insw((unsigned long __force)port, buf, count);
+}
+
+static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count)
+{
+       insl((unsigned long __force)port, buf, count);
+}
+
+static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count)
+{
+       outsb((unsigned long __force)port, buf, count);
+}
+
+static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count)
+{
+       outsw((unsigned long __force)port, buf, count);
+}
+
+static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count)
+{
+       outsl((unsigned long __force)port, buf, count);
+}
+
 /* Create a virtual mapping cookie for an IO port range */
 extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
 extern void ioport_unmap(void __iomem *);
index d05f83c809893c404a9fc897fdf5164fbac6fbc9..d767f206ab33317988868a41a804d68054760019 100644 (file)
@@ -45,24 +45,6 @@ struct winsize {
        unsigned short ws_ypixel;
 };
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 #include <linux/module.h>
 
index 905e59b4a737537bbfe835b5512aaadcdf0c6f4a..5d233b42fe135b87b51d9c2f3e1339554ce8e7f5 100644 (file)
@@ -46,6 +46,10 @@ extern void irq_install_pre_handler(int virt_irq,
 #define irq_canonicalize(irq)  (irq)
 extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap);
 extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino);
+extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
+                                   unsigned int msi_devino_start,
+                                   unsigned int msi_devino_end);
+extern void sun4v_destroy_msi(unsigned int virt_irq);
 extern unsigned int sbus_build_irq(void *sbus, unsigned int ino);
 
 static __inline__ void set_softint(unsigned long bits)
index dcfa7629358c396c9e977447ee24f56b31cd799e..7a246d8a1828b7f98cea9d9b10ff21e9e862c485 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/pci.h>
 #include <linux/ioport.h>
 #include <linux/spinlock.h>
+#include <linux/msi.h>
 
 #include <asm/io.h>
 #include <asm/page.h>
@@ -177,6 +178,24 @@ struct pci_pbm_info {
        int                             is_66mhz_capable;
        int                             all_devs_66mhz;
 
+#ifdef CONFIG_PCI_MSI
+       /* MSI info.  */
+       u32                             msiq_num;
+       u32                             msiq_ent_count;
+       u32                             msiq_first;
+       u32                             msiq_first_devino;
+       u32                             msi_num;
+       u32                             msi_first;
+       u32                             msi_data_mask;
+       u32                             msix_data_width;
+       u64                             msi32_start;
+       u64                             msi64_start;
+       u32                             msi32_len;
+       u32                             msi64_len;
+       void                            *msi_queues;
+       unsigned long                   *msi_bitmap;
+#endif /* !(CONFIG_PCI_MSI) */
+
        /* This PBM's streaming buffer. */
        struct pci_strbuf               stc;
 
@@ -213,6 +232,12 @@ struct pci_controller_info {
        void (*base_address_update)(struct pci_dev *, int);
        void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *);
 
+#ifdef CONFIG_PCI_MSI
+       int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev,
+                            struct msi_desc *entry);
+       void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev);
+#endif
+
        /* Now things for the actual PCI bus probes. */
        struct pci_ops                  *pci_ops;
        unsigned int                    pci_first_busno;
@@ -231,6 +256,9 @@ struct pcidev_cookie {
        int num_prom_regs;
        struct linux_prom_pci_registers prom_assignments[PROMREG_MAX];
        int num_prom_assignments;
+#ifdef CONFIG_PCI_MSI
+       unsigned int                    msi_num;
+#endif
 };
 
 /* Currently these are the same across all PCI controllers
index ee26a071c67776074f9386249c8b3af040370077..f05d390993d5d4c953727a240577e28e6649efa2 100644 (file)
@@ -45,24 +45,6 @@ struct winsize {
        unsigned short ws_ypixel;
 };
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 #include <linux/module.h>
 
index 99711134e477a2bae4a4ddb9c80961363b458f19..d3b90b7ac3e9820921272b12642f193803b142f5 100644 (file)
@@ -11,7 +11,7 @@ extern long elf_aux_hwcap;
 
 #define elf_check_arch(x) (1)
 
-#ifdef CONFIG_64_BIT
+#ifdef CONFIG_64BIT
 #define ELF_CLASS ELFCLASS64
 #else
 #define ELF_CLASS ELFCLASS32
index 10609af376c0339af5f22bafe48c918a2103a34f..31c2d4d685bd7692677db195bb4738642dea8459 100644 (file)
@@ -13,6 +13,7 @@
 struct arch_thread {
         unsigned long debugregs[8];
         int debugregs_seq;
+        unsigned long fs;
         struct faultinfo faultinfo;
 };
 
@@ -25,8 +26,9 @@ extern inline void rep_nop(void)
 #define cpu_relax()   rep_nop()
 
 #define INIT_ARCH_THREAD { .debugregs                  = { [ 0 ... 7 ] = 0 }, \
-                           .debugregs_seq      = 0, \
-                           .faultinfo          = { 0, 0, 0 } }
+                           .debugregs_seq      = 0,                           \
+                          .fs                  = 0, \
+                          .faultinfo           = { 0, 0, 0 } }
 
 static inline void arch_flush_thread(struct arch_thread *thread)
 {
index 03b4af4ac09a3c82509e93dc835ee84bb7f7d111..bf61d17de3f72d776a2f5ba3e6e1017c6884101d 100644 (file)
@@ -81,9 +81,10 @@ static inline void arch_switch_to_tt(struct task_struct *from,
 {
 }
 
-static inline void arch_switch_to_skas(struct task_struct *from,
-                                       struct task_struct *to)
-{
-}
+extern void arch_switch_to_skas(struct task_struct *from,
+                               struct task_struct *to);
+
+extern long arch_prctl_skas(struct task_struct *task, int code,
+                           unsigned long __user *addr);
 
 #endif
index 79e97b59806e1720cbd49e93b757fa3bfb9654d6..c2c2b1d5877618f49ce3b6a2829c340fa1e2b7a4 100644 (file)
@@ -39,24 +39,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index 443b225537f0bd61ecc4e18f22b5d0997a67bdb1..35ee59b78329853d78e13e45aad641a2daa2d033 100644 (file)
@@ -39,24 +39,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* line disciplines */
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14      /* synchronous PPP */
-#define N_HCI          15  /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index c0eac519840b2d1d15a4c0751d20293649bbe9b0..8079e29c14fd4ca1212bea28ac313b523a67b5d3 100644 (file)
  * Uhhuh, this needs 65-bit arithmetic. We have a carry..
  */
 #define __range_not_ok(addr,size) ({ \
-       unsigned long flag,sum; \
+       unsigned long flag,roksum; \
        __chk_user_ptr(addr); \
        asm("# range_ok\n\r" \
                "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0"  \
-               :"=&r" (flag), "=r" (sum) \
+               :"=&r" (flag), "=r" (roksum) \
                :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \
        flag; })
 
index ba394cbb48071b03ddc789f21bf80fef84d50eb1..9b92620c8a1ed262d3b10a9cb44dd0b746feacc8 100644 (file)
@@ -79,7 +79,6 @@
 #define MADV_DOFORK    11              /* do inherit across fork */
 
 /* compatibility flags */
-#define MAP_ANON       MAP_ANONYMOUS
 #define MAP_FILE       0
 
 #endif /* _XTENSA_MMAN_H */
index 83c6aed1d1154655e2a516b5fa2007e4f87e25f3..f14b42c8dac06b320363f88ea97863049397092e 100644 (file)
@@ -52,25 +52,6 @@ struct termio {
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
-/* Line disciplines */
-
-#define N_TTY          0
-#define N_SLIP         1
-#define N_MOUSE                2
-#define N_PPP          3
-#define N_STRIP                4
-#define N_AX25         5
-#define N_X25          6       /* X.25 async */
-#define N_6PACK                7
-#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964                9       /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA         11      /* Linux IR - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC         13      /* synchronous HDLC */
-#define N_SYNC_PPP     14
-#define N_HCI          15      /* Bluetooth HCI UART */
-
 #ifdef __KERNEL__
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
index 683513e310de229e5b84d7ebf218fd0ca9b822ab..bb881c3219fa205434c92799d5a324d92ea6c003 100644 (file)
@@ -156,7 +156,6 @@ header-y += video_encoder.h
 header-y += videotext.h
 header-y += vt.h
 header-y += wireless.h
-header-y += xattr.h
 header-y += x25.h
 
 unifdef-y += acct.h
@@ -336,6 +335,7 @@ unifdef-y += wait.h
 unifdef-y += wanrouter.h
 unifdef-y += watchdog.h
 unifdef-y += wireless.h
+unifdef-y += xattr.h
 unifdef-y += xfrm.h
 
 objhdr-y += version.h
index 56499ab9e32ee9f1bb1a72adab6a856c781cb4a1..79bedddfd9ca15c02d9fa91793d24027fa5f6b8c 100644 (file)
@@ -1,7 +1,5 @@
 header-y += big_endian.h
 header-y += little_endian.h
-header-y += pdp_endian.h
 
 unifdef-y += generic.h
-unifdef-y += swabb.h
 unifdef-y += swab.h
diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h
deleted file mode 100644 (file)
index 618631c..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H
-#define _LINUX_BYTEORDER_PDP_ENDIAN_H
-
-/*
- * Could have been named NUXI-endian, but we use the same name as in glibc.
- * hopefully only the PDP and its evolutions (old VAXen in compatibility mode)
- * should ever use this braindead byteorder.
- * This file *should* work, but has not been tested.
- *
- * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412
- *
- * I thought vaxen were NUXI-endian, but was told they were correct-endian
- * (little-endian), though indeed there existed NUXI-endian machines
- * (DEC PDP-11 and old VAXen in compatibility mode).
- * This makes this file a bit useless, but as a proof-of-concept.
- *
- * But what does a __u64 look like: is it 34127856 or 78563412 ???
- * I don't dare imagine! Hence, no 64-bit byteorder support yet.
- * Hopefully, there 64-bit pdp-endian support shouldn't ever be required.
- *
- */
-
-#ifndef __PDP_ENDIAN
-#define __PDP_ENDIAN 3412
-#endif
-#ifndef __PDP_ENDIAN_BITFIELD
-#define __PDP_ENDIAN_BITFIELD
-#endif
-
-#include <linux/byteorder/swab.h>
-#include <linux/byteorder/swabb.h>
-
-#define __constant_htonl(x) ___constant_swahb32((x))
-#define __constant_ntohl(x) ___constant_swahb32((x))
-#define __constant_htons(x) ___constant_swab16((x))
-#define __constant_ntohs(x) ___constant_swab16((x))
-#define __constant_cpu_to_le64(x) I DON'T KNOW
-#define __constant_le64_to_cpu(x) I DON'T KNOW
-#define __constant_cpu_to_le32(x) ___constant_swahw32((x))
-#define __constant_le32_to_cpu(x) ___constant_swahw32((x))
-#define __constant_cpu_to_le16(x) ((__u16)(x)
-#define __constant_le16_to_cpu(x) ((__u16)(x)
-#define __constant_cpu_to_be64(x) I DON'T KNOW
-#define __constant_be64_to_cpu(x) I DON'T KNOW
-#define __constant_cpu_to_be32(x) ___constant_swahb32((x))
-#define __constant_be32_to_cpu(x) ___constant_swahb32((x))
-#define __constant_cpu_to_be16(x) ___constant_swab16((x))
-#define __constant_be16_to_cpu(x) ___constant_swab16((x))
-#define __cpu_to_le64(x) I DON'T KNOW
-#define __le64_to_cpu(x) I DON'T KNOW
-#define __cpu_to_le32(x) ___swahw32((x))
-#define __le32_to_cpu(x) ___swahw32((x))
-#define __cpu_to_le16(x) ((__u16)(x)
-#define __le16_to_cpu(x) ((__u16)(x)
-#define __cpu_to_be64(x) I DON'T KNOW
-#define __be64_to_cpu(x) I DON'T KNOW
-#define __cpu_to_be32(x) __swahb32((x))
-#define __be32_to_cpu(x) __swahb32((x))
-#define __cpu_to_be16(x) __swab16((x))
-#define __be16_to_cpu(x) __swab16((x))
-#define __cpu_to_le64p(x) I DON'T KNOW
-#define __le64_to_cpup(x) I DON'T KNOW
-#define __cpu_to_le32p(x) ___swahw32p((x))
-#define __le32_to_cpup(x) ___swahw32p((x))
-#define __cpu_to_le16p(x) (*(__u16*)(x))
-#define __le16_to_cpup(x) (*(__u16*)(x))
-#define __cpu_to_be64p(x) I DON'T KNOW
-#define __be64_to_cpup(x) I DON'T KNOW
-#define __cpu_to_be32p(x) __swahb32p((x))
-#define __be32_to_cpup(x) __swahb32p((x))
-#define __cpu_to_be16p(x) __swab16p((x))
-#define __be16_to_cpup(x) __swab16p((x))
-#define __cpu_to_le64s(x) I DON'T KNOW
-#define __le64_to_cpus(x) I DON'T KNOW
-#define __cpu_to_le32s(x) ___swahw32s((x))
-#define __le32_to_cpus(x) ___swahw32s((x))
-#define __cpu_to_le16s(x) do {} while (0)
-#define __le16_to_cpus(x) do {} while (0)
-#define __cpu_to_be64s(x) I DON'T KNOW
-#define __be64_to_cpus(x) I DON'T KNOW
-#define __cpu_to_be32s(x) __swahb32s((x))
-#define __be32_to_cpus(x) __swahb32s((x))
-#define __cpu_to_be16s(x) __swab16s((x))
-#define __be16_to_cpus(x) __swab16s((x))
-
-#include <linux/byteorder/generic.h>
-
-#endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */
index ae5e5f914bf4a082b1f12e3956f4e868011710db..8c780c7d779e134fd9d42531b8f2e8d61b2badb4 100644 (file)
@@ -25,6 +25,8 @@
  *
  */
 
+#include <linux/types.h>
+
 #define ___swahw32(x) \
 ({ \
        __u32 __x = (x); \
 /*
  * Allow constant folding
  */
-#if defined(__GNUC__) && defined(__OPTIMIZE__)
-#  define __swahw32(x) \
+#define __swahw32(x) \
 (__builtin_constant_p((__u32)(x)) ? \
  ___swahw32((x)) : \
  __fswahw32((x)))
-#  define __swahb32(x) \
+#define __swahb32(x) \
 (__builtin_constant_p((__u32)(x)) ? \
  ___swahb32((x)) : \
  __fswahb32((x)))
-#else
-#  define __swahw32(x) __fswahw32(x)
-#  define __swahb32(x) __fswahb32(x)
-#endif /* OPTIMIZE */
 
 
 static inline __u32 __fswahw32(__u32 x)
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr)
  */
 #endif /* __BYTEORDER_HAS_U64__ */
 
-#if defined(__KERNEL__)
 #define swahw32 __swahw32
 #define swahb32 __swahb32
 #define swahw32p __swahw32p
 #define swahb32p __swahb32p
 #define swahw32s __swahw32s
 #define swahb32s __swahb32s
-#endif
 
 #endif /* _LINUX_BYTEORDER_SWABB_H */
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h
new file mode 100644 (file)
index 0000000..0bc45e6
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ *    Filename: cfag12864b.h
+ *     Version: 0.1.0
+ * Description: cfag12864b LCD driver header
+ *     License: GPLv2
+ *
+ *      Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ *        Date: 2006-10-12
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef _CFAG12864B_H_
+#define _CFAG12864B_H_
+
+#define CFAG12864B_WIDTH       (128)
+#define CFAG12864B_HEIGHT      (64)
+#define CFAG12864B_CONTROLLERS (2)
+#define CFAG12864B_PAGES       (8)
+#define CFAG12864B_ADDRESSES   (64)
+#define CFAG12864B_SIZE                ((CFAG12864B_CONTROLLERS) * \
+                               (CFAG12864B_PAGES) * \
+                               (CFAG12864B_ADDRESSES))
+
+/*
+ * The driver will blit this buffer to the LCD
+ *
+ * Its size is CFAG12864B_SIZE.
+ */
+extern unsigned char * cfag12864b_buffer;
+
+/*
+ * Get the refresh rate of the LCD
+ *
+ * Returns the refresh rate (hertzs).
+ */
+extern unsigned int cfag12864b_getrate(void);
+
+/*
+ * Enable refreshing
+ *
+ * Returns 0 if successful (anyone was using it),
+ * or != 0 if failed (someone is using it).
+ */
+extern unsigned char cfag12864b_enable(void);
+
+/*
+ * Disable refreshing
+ *
+ * You should call this only when you finish using the LCD.
+ */
+extern void cfag12864b_disable(void);
+
+/*
+ * Is enabled refreshing? (is anyone using the module?)
+ *
+ * Returns 0 if refreshing is not enabled (anyone is using it),
+ * or != 0 if refreshing is enabled (someone is using it).
+ *
+ * Useful for buffer read-only modules.
+ */
+extern unsigned char cfag12864b_isenabled(void);
+
+#endif /* _CFAG12864B_H_ */
+
index 6e1c44a935d411e5bbd5793b163d9082960d2196..9008eabb9c3ded7440e75c3d2b2c6c4c9c5f7e01 100644 (file)
 #define __inline__     __inline__      __attribute__((always_inline))
 #define __inline       __inline        __attribute__((always_inline))
 #define __deprecated                   __attribute__((deprecated))
+#define __packed                       __attribute__((packed))
+#define __weak                         __attribute__((weak))
+#define __naked                                __attribute__((naked))
+#define __noreturn                     __attribute__((noreturn))
+#define __pure                         __attribute__((pure))
+#define __aligned(x)                   __attribute__((aligned(x)))
+#define __printf(a,b)                  __attribute__((format(printf,a,b)))
 #define  noinline                      __attribute__((noinline))
 #define __attribute_pure__             __attribute__((pure))
 #define __attribute_const__            __attribute__((__const__))
index 7d0420274de00d26b86d6d986631860bb158d5d3..de25ee3b79196b1daa7d95ccb871f32652eb1a8a 100644 (file)
@@ -21,6 +21,7 @@ struct vc_data;
 struct console_font_op;
 struct console_font;
 struct module;
+struct tty_struct;
 
 /*
  * this is what the terminal answers to a ESC-Z or csi0c query.
@@ -132,6 +133,9 @@ static inline void resume_console(void) {}
 int mda_console_init(void);
 void prom_con_init(void);
 
+void vcs_make_sysfs(struct tty_struct *tty);
+void vcs_remove_sysfs(struct tty_struct *tty);
+
 /* Some debug stub to catch some of the obvious races in the VT code */
 #if 1
 #define WARN_CONSOLE_UNLOCKED()        WARN_ON(!is_console_locked() && !oops_in_progress)
index ed6c0fee1ac76fa5af1e0ed27c26a6b6fbc86395..a86162b26c0dde5a349a81129e67b74f1506d821 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/wait.h>
 #include <linux/vt.h>
+#include <linux/workqueue.h>
 
 struct vt_struct;
 
@@ -103,6 +104,7 @@ struct vc_data {
 
 struct vc {
        struct vc_data *d;
+       struct work_struct SAK_work;
 
        /* might add  scrmem, vt_struct, kbd  at some time,
           to have everything in one place - the disadvantage
@@ -110,6 +112,7 @@ struct vc {
 };
 
 extern struct vc vc_cons [MAX_NR_CONSOLES];
+extern void vc_SAK(struct work_struct *work);
 
 #define CUR_DEF                0
 #define CUR_NONE       1
index 1410e5330c8daafb1a9e781dca9c56c5e1c4a0e5..20fd1619ccfb0914c7e1e895c48240e0f42a45fb 100644 (file)
@@ -169,6 +169,7 @@ extern int dir_notify_enable;
 #define IS_DIRSYNC(inode)      (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \
                                        ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
 #define IS_MANDLOCK(inode)     __IS_FLG(inode, MS_MANDLOCK)
+#define IS_NOATIME(inode)   __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
 
 #define IS_NOQUOTA(inode)      ((inode)->i_flags & S_NOQUOTA)
 #define IS_APPEND(inode)       ((inode)->i_flags & S_APPEND)
@@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int);
 extern int invalidate_inodes(struct super_block *);
 unsigned long invalidate_mapping_pages(struct address_space *mapping,
                                        pgoff_t start, pgoff_t end);
-unsigned long invalidate_inode_pages(struct address_space *mapping);
+
+static inline unsigned long __deprecated
+invalidate_inode_pages(struct address_space *mapping)
+{
+       return invalidate_mapping_pages(mapping, 0, ~0UL);
+}
+
 static inline void invalidate_remote_inode(struct inode *inode)
 {
        if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
            S_ISLNK(inode->i_mode))
-               invalidate_inode_pages(inode->i_mapping);
+               invalidate_mapping_pages(inode->i_mapping, 0, -1);
 }
 extern int invalidate_inode_pages2(struct address_space *mapping);
 extern int invalidate_inode_pages2_range(struct address_space *mapping,
index 0a022b2f63fc0fa95fa35df16784e2fcaef225b3..2c65da7cabb2a25acc1c42c067a3770872f29141 100644 (file)
@@ -20,7 +20,11 @@ enum {
        LINUX_EXTENDED_PARTITION = 0x85,
        WIN98_EXTENDED_PARTITION = 0x0f,
 
+       SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION,
+
        LINUX_SWAP_PARTITION = 0x82,
+       LINUX_DATA_PARTITION = 0x83,
+       LINUX_LVM_PARTITION = 0x8e,
        LINUX_RAID_PARTITION = 0xfd,    /* autodetect RAID partition */
 
        SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
@@ -400,10 +404,14 @@ struct unixware_disklabel {
 
 #ifdef __KERNEL__
 
+#define ADDPART_FLAG_NONE      0
+#define ADDPART_FLAG_RAID      1
+#define ADDPART_FLAG_WHOLEDISK 2
+
 char *disk_name (struct gendisk *hd, int part, char *buf);
 
 extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
-extern void add_partition(struct gendisk *, int, sector_t, sector_t);
+extern void add_partition(struct gendisk *, int, sector_t, sector_t, int);
 extern void delete_partition(struct gendisk *, int);
 
 extern struct gendisk *alloc_disk_node(int minors, int node_id);
index 063799ea6be084c6125633c6c9f6e2cc72bd837e..2a7d15bcde4684a8b40a4f7aaf65e2e0177faf39 100644 (file)
@@ -85,8 +85,10 @@ struct vm_area_struct;
 
 static inline enum zone_type gfp_zone(gfp_t flags)
 {
+#ifdef CONFIG_ZONE_DMA
        if (flags & __GFP_DMA)
                return ZONE_DMA;
+#endif
 #ifdef CONFIG_ZONE_DMA32
        if (flags & __GFP_DMA32)
                return ZONE_DMA32;
index 5a593a1dec1efd7f53ab6ac58349db9b996157d2..c65f5107d512c4a2df0e3373616772849c9e383b 100644 (file)
@@ -172,7 +172,7 @@ void __init parse_early_param(void);
  * module_init() - driver initialization entry point
  * @x: function to be run at kernel boot time or module insertion
  * 
- * module_init() will either be called during do_initcalls (if
+ * module_init() will either be called during do_initcalls() (if
  * builtin) or at module insertion time (if a module).  There can only
  * be one per module.
  */
index 9e419ebfc98b86c009ec2a51823bc880d0c226cd..c244a0cc9319bc37dfaee08d2c385b638dcbc990 100644 (file)
@@ -43,12 +43,6 @@ void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset,
                                    unsigned long size);
 void devm_iounmap(struct device *dev, void __iomem *addr);
 
-void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
-void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
-void __iomem * const * pcim_iomap_table(struct pci_dev *pdev);
-
-int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
-
 /**
  *     check_signature         -       find BIOS signatures
  *     @io_addr: mmio address to check
index 63fb18dcac3075fb0e75eef911b947e49309b32d..e91dce75bbcc74ecdf905b897ccced8a090c0063 100644 (file)
@@ -176,6 +176,7 @@ static inline void console_verbose(void)
 }
 
 extern void bust_spinlocks(int yes);
+extern void wake_up_klogd(void);
 extern int oops_in_progress;           /* If set, an oops, panic(), BUG() or die() is in progress */
 extern int panic_timeout;
 extern int panic_on_oops;
@@ -200,6 +201,7 @@ extern enum system_states {
 #define TAINT_FORCED_RMMOD             (1<<3)
 #define TAINT_MACHINE_CHECK            (1<<4)
 #define TAINT_BAD_PAGE                 (1<<5)
+#define TAINT_USER                     (1<<6)
 
 extern void dump_stack(void);
 
@@ -312,6 +314,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
        (void)__tmp; \
 })
 
+struct sysinfo;
+extern int do_sysinfo(struct sysinfo *info);
+
 #endif /* __KERNEL__ */
 
 #define SI_LOAD_SHIFT  16
index 48eccd865bd8add9d9353f13771eab89745f0000..404f4464cb1aaf255b58c818a865ae4de2e103c7 100644 (file)
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo)
  * @buffer: the data to be added.
  * @len: the length of the data to be added.
  *
- * This function copies at most 'len' bytes from the 'buffer' into
+ * This function copies at most @len bytes from the @buffer into
  * the FIFO depending on the free space, and returns the number of
  * bytes copied.
  */
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo,
  * @buffer: where the data must be copied.
  * @len: the size of the destination buffer.
  *
- * This function copies at most 'len' bytes from the FIFO into the
- * 'buffer' and returns the number of copied bytes.
+ * This function copies at most @len bytes from the FIFO into the
+ * @buffer and returns the number of copied bytes.
  */
 static inline unsigned int kfifo_get(struct kfifo *fifo,
                                     unsigned char *buffer, unsigned int len)
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h
new file mode 100644 (file)
index 0000000..8047d4b
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ *    Filename: ks0108.h
+ *     Version: 0.1.0
+ * Description: ks0108 LCD Controller driver header
+ *     License: GPLv2
+ *
+ *      Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
+ *        Date: 2006-10-31
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef _KS0108_H_
+#define _KS0108_H_
+
+/* Write a byte to the data port */
+extern void ks0108_writedata(unsigned char byte);
+
+/* Write a byte to the control port */
+extern void ks0108_writecontrol(unsigned char byte);
+
+/* Set the controller's current display state (0..1) */
+extern void ks0108_displaystate(unsigned char state);
+
+/* Set the controller's current startline (0..63) */
+extern void ks0108_startline(unsigned char startline);
+
+/* Set the controller's current address (0..63) */
+extern void ks0108_address(unsigned char address);
+
+/* Set the controller's current page (0..7) */
+extern void ks0108_page(unsigned char page);
+
+#endif /* _KS0108_H_ */
index 611f17f79eefe32f78605589f175db8a77616474..7444a63262318934415604a98b96d94c5bd5964b 100644 (file)
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
  * @add1:      addend1
  * @add2:      addend2
  *
- * Returns the sum of addend1 and addend2
+ * Returns the sum of @add1 and @add2.
  */
 static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
 {
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
  * @kt:                addend
  * @nsec:      the scalar nsec value to add
  *
- * Returns the sum of kt and nsec in ktime_t format
+ * Returns the sum of @kt and @nsec in ktime_t format
  */
 extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
 
@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
  * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
  * @kt:                the ktime_t variable to convert
  *
- * Returns the scalar nanoseconds representation of kt
+ * Returns the scalar nanoseconds representation of @kt
  */
 static inline s64 ktime_to_ns(const ktime_t kt)
 {
index 611059d633f4a9fcf2ec435309564b4b4bb0b126..f9d71eab05eecc9a7d3891d346b86aa58d24233b 100644 (file)
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next)
 /**
  * list_del - deletes entry from list.
  * @entry: the element to delete from the list.
- * Note: list_empty on entry does not return true after this, the entry is
+ * Note: list_empty() on entry does not return true after this, the entry is
  * in an undefined state.
  */
 #ifndef CONFIG_DEBUG_LIST
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry);
  * list_del_rcu - deletes entry from list without re-initialization
  * @entry: the element to delete from the list.
  *
- * Note: list_empty on entry does not return true after this,
+ * Note: list_empty() on entry does not return true after this,
  * the entry is in an undefined state. It is useful for RCU based
  * lockfree traversal.
  *
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry)
  * list_replace - replace old entry by new one
  * @old : the element to be replaced
  * @new : the new element to insert
- * Note: if 'old' was empty, it will be overwritten.
+ *
+ * If @old was empty, it will be overwritten.
  */
 static inline void list_replace(struct list_head *old,
                                struct list_head *new)
@@ -359,6 +360,62 @@ static inline void list_splice_init(struct list_head *list,
        }
 }
 
+/**
+ * list_splice_init_rcu - splice an RCU-protected list into an existing list.
+ * @list:      the RCU-protected list to splice
+ * @head:      the place in the list to splice the first list into
+ * @sync:      function to sync: synchronize_rcu(), synchronize_sched(), ...
+ *
+ * @head can be RCU-read traversed concurrently with this function.
+ *
+ * Note that this function blocks.
+ *
+ * Important note: the caller must take whatever action is necessary to
+ *     prevent any other updates to @head.  In principle, it is possible
+ *     to modify the list as soon as sync() begins execution.
+ *     If this sort of thing becomes necessary, an alternative version
+ *     based on call_rcu() could be created.  But only if -really-
+ *     needed -- there is no shortage of RCU API members.
+ */
+static inline void list_splice_init_rcu(struct list_head *list,
+                                       struct list_head *head,
+                                       void (*sync)(void))
+{
+       struct list_head *first = list->next;
+       struct list_head *last = list->prev;
+       struct list_head *at = head->next;
+
+       if (list_empty(head))
+               return;
+
+       /* "first" and "last" tracking list, so initialize it. */
+
+       INIT_LIST_HEAD(list);
+
+       /*
+        * At this point, the list body still points to the source list.
+        * Wait for any readers to finish using the list before splicing
+        * the list body into the new list.  Any new readers will see
+        * an empty list.
+        */
+
+       sync();
+
+       /*
+        * Readers are finished with the source list, so perform splice.
+        * The order is important if the new list is global and accessible
+        * to concurrent RCU readers.  Note that RCU readers are not
+        * permitted to traverse the prev pointers without excluding
+        * this function.
+        */
+
+       last->next = at;
+       smp_wmb();
+       head->next = first;
+       first->prev = head;
+       at->prev = last;
+}
+
 /**
  * list_entry - get the struct for this entry
  * @ptr:       the &struct list_head pointer.
@@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list,
             pos = list_entry(pos->member.prev, typeof(*pos), member))
 
 /**
- * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue
+ * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
  * @pos:       the type * to use as a start point
  * @head:      the head of the list
  * @member:    the name of the list_struct within the struct.
  *
- * Prepares a pos entry for use as a start point in list_for_each_entry_continue.
+ * Prepares a pos entry for use as a start point in list_for_each_entry_continue().
  */
 #define list_prepare_entry(pos, head, member) \
        ((pos) ? : list_entry(head, typeof(*pos), member))
index ea097dddc44f791d34a599aa12b3a251413aa47d..7e1160dde5e7cd052fcf67ac2852f7ecc1bb7062 100644 (file)
@@ -132,6 +132,7 @@ struct lock_list {
        struct list_head                entry;
        struct lock_class               *class;
        struct stack_trace              trace;
+       int                             distance;
 };
 
 /*
index 432b2fa249290343702eabfbc8c031d84a697e39..bdc01127dced03198620b72441d3b38a49eb3a16 100644 (file)
 #ifdef __KERNEL__
 #include <linux/spinlock.h>            /* spinlock_t */
 extern spinlock_t rtc_lock;            /* serialize CMOS RAM access */
+
+/* Some RTCs extend the mc146818 register set to support alarms of more
+ * than 24 hours in the future; or dates that include a century code.
+ * This platform_data structure can pass this information to the driver.
+ */
+struct cmos_rtc_board_info {
+       u8      rtc_day_alarm;          /* zero, or register index */
+       u8      rtc_mon_alarm;          /* zero, or register index */
+       u8      rtc_century;            /* zero, or register index */
+};
 #endif
 
 /**********************************************************************
index bb793a4c8e9ecd514aad6b40e3b01c26b42c43a4..77a76101dcd996c26d284b10274af21b091bbb16 100644 (file)
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
 /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */
 #ifdef NODE_NOT_IN_PAGEFLAGS
 #define ZONEID_SHIFT           (SECTIONS_SHIFT + ZONES_SHIFT)
+#define ZONEID_PGOFF           ((SECTIONS_PGOFF < ZONES_PGOFF)? \
+                                               SECTIONS_PGOFF : ZONES_PGOFF)
 #else
 #define ZONEID_SHIFT           (NODES_SHIFT + ZONES_SHIFT)
+#define ZONEID_PGOFF           ((NODES_PGOFF < ZONES_PGOFF)? \
+                                               NODES_PGOFF : ZONES_PGOFF)
 #endif
 
-#if ZONES_WIDTH > 0
-#define ZONEID_PGSHIFT         ZONES_PGSHIFT
-#else
-#define ZONEID_PGSHIFT         NODES_PGOFF
-#endif
+#define ZONEID_PGSHIFT         (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
 
 #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
 #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page)
  */
 static inline int page_zone_id(struct page *page)
 {
-       BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK);
        return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK;
 }
 
@@ -786,6 +785,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
 extern void do_invalidatepage(struct page *page, unsigned long offset);
 
 int __set_page_dirty_nobuffers(struct page *page);
+int __set_page_dirty_no_writeback(struct page *page);
 int redirty_page_for_writepage(struct writeback_control *wbc,
                                struct page *page);
 int FASTCALL(set_page_dirty(struct page *page));
index 3b6723dfaff38f50bb8fa75e9b99072d9c2d69ba..895bc4e93039cdba7f6585b484abed3b9eb4a920 100644 (file)
@@ -1,30 +1,29 @@
-
 static inline void
 add_page_to_active_list(struct zone *zone, struct page *page)
 {
        list_add(&page->lru, &zone->active_list);
-       zone->nr_active++;
+       __inc_zone_state(zone, NR_ACTIVE);
 }
 
 static inline void
 add_page_to_inactive_list(struct zone *zone, struct page *page)
 {
        list_add(&page->lru, &zone->inactive_list);
-       zone->nr_inactive++;
+       __inc_zone_state(zone, NR_INACTIVE);
 }
 
 static inline void
 del_page_from_active_list(struct zone *zone, struct page *page)
 {
        list_del(&page->lru);
-       zone->nr_active--;
+       __dec_zone_state(zone, NR_ACTIVE);
 }
 
 static inline void
 del_page_from_inactive_list(struct zone *zone, struct page *page)
 {
        list_del(&page->lru);
-       zone->nr_inactive--;
+       __dec_zone_state(zone, NR_INACTIVE);
 }
 
 static inline void
@@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page)
        list_del(&page->lru);
        if (PageActive(page)) {
                __ClearPageActive(page);
-               zone->nr_active--;
+               __dec_zone_state(zone, NR_ACTIVE);
        } else {
-               zone->nr_inactive--;
+               __dec_zone_state(zone, NR_INACTIVE);
        }
 }
 
index b262f47961fbe8a439cc218cd62b20122c5ac957..ee9e3143df4fd0ab8b723a6bf14a7fd28f71e9f6 100644 (file)
@@ -47,15 +47,20 @@ struct zone_padding {
 #endif
 
 enum zone_stat_item {
+       /* First 128 byte cacheline (assuming 64 bit words) */
+       NR_FREE_PAGES,
+       NR_INACTIVE,
+       NR_ACTIVE,
        NR_ANON_PAGES,  /* Mapped anonymous pages */
        NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
                           only modified from process context */
        NR_FILE_PAGES,
-       NR_SLAB_RECLAIMABLE,
-       NR_SLAB_UNRECLAIMABLE,
-       NR_PAGETABLE,   /* used for pagetables */
        NR_FILE_DIRTY,
        NR_WRITEBACK,
+       /* Second 128 byte cacheline */
+       NR_SLAB_RECLAIMABLE,
+       NR_SLAB_UNRECLAIMABLE,
+       NR_PAGETABLE,           /* used for pagetables */
        NR_UNSTABLE_NFS,        /* NFS unstable pages */
        NR_BOUNCE,
        NR_VMSCAN_WRITE,
@@ -91,6 +96,7 @@ struct per_cpu_pageset {
 #endif
 
 enum zone_type {
+#ifdef CONFIG_ZONE_DMA
        /*
         * ZONE_DMA is used when there are devices that are not able
         * to do DMA to all of addressable memory (ZONE_NORMAL). Then we
@@ -111,6 +117,7 @@ enum zone_type {
         *                      <16M.
         */
        ZONE_DMA,
+#endif
 #ifdef CONFIG_ZONE_DMA32
        /*
         * x86_64 needs two ZONE_DMAs because it supports devices that are
@@ -147,15 +154,30 @@ enum zone_type {
  * match the requested limits. See gfp_zone() in include/linux/gfp.h
  */
 
-#if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM)
+/*
+ * Count the active zones.  Note that the use of defined(X) outside
+ * #if and family is not necessarily defined so ensure we cannot use
+ * it later.  Use __ZONE_COUNT to work out how many shift bits we need.
+ */
+#define __ZONE_COUNT (                 \
+         defined(CONFIG_ZONE_DMA)      \
+       + defined(CONFIG_ZONE_DMA32)    \
+       + 1                             \
+       + defined(CONFIG_HIGHMEM)       \
+)
+#if __ZONE_COUNT < 2
+#define ZONES_SHIFT 0
+#elif __ZONE_COUNT <= 2
 #define ZONES_SHIFT 1
-#else
+#elif __ZONE_COUNT <= 4
 #define ZONES_SHIFT 2
+#else
+#error ZONES_SHIFT -- too many zones configured adjust calculation
 #endif
+#undef __ZONE_COUNT
 
 struct zone {
        /* Fields commonly accessed by the page allocator */
-       unsigned long           free_pages;
        unsigned long           pages_min, pages_low, pages_high;
        /*
         * We don't know if the memory that we're going to allocate will be freeable
@@ -197,8 +219,6 @@ struct zone {
        struct list_head        inactive_list;
        unsigned long           nr_scan_active;
        unsigned long           nr_scan_inactive;
-       unsigned long           nr_active;
-       unsigned long           nr_inactive;
        unsigned long           pages_scanned;     /* since last reclaim */
        int                     all_unreclaimable; /* All pages pinned */
 
@@ -442,8 +462,6 @@ typedef struct pglist_data {
 
 #include <linux/memory_hotplug.h>
 
-void __get_zone_counts(unsigned long *active, unsigned long *inactive,
-                       unsigned long *free, struct pglist_data *pgdat);
 void get_zone_counts(unsigned long *active, unsigned long *inactive,
                        unsigned long *free);
 void build_all_zonelists(void);
@@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone)
 
 static inline int is_dma(struct zone *zone)
 {
+#ifdef CONFIG_ZONE_DMA
        return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
+#else
+       return 0;
+#endif
 }
 
 /* These two functions are used to setup the per zone pages min values */
index 1b7e178b0d8472549de308667343b15d4f44aa56..dab69afee2fa457b3d6feaf8bda7d3701d71c4ca 100644 (file)
@@ -43,9 +43,8 @@ struct vfsmount {
        struct super_block *mnt_sb;     /* pointer to superblock */
        struct list_head mnt_mounts;    /* list of children, anchored here */
        struct list_head mnt_child;     /* and going through their mnt_child */
-       atomic_t mnt_count;
        int mnt_flags;
-       int mnt_expiry_mark;            /* true if marked for expiry */
+       /* 4 bytes hole on 64bits arches */
        char *mnt_devname;              /* Name of device e.g. /dev/dsk/hda1 */
        struct list_head mnt_list;
        struct list_head mnt_expire;    /* link in fs-specific expiry list */
@@ -54,6 +53,13 @@ struct vfsmount {
        struct list_head mnt_slave;     /* slave list entry */
        struct vfsmount *mnt_master;    /* slave is on master->mnt_slave_list */
        struct mnt_namespace *mnt_ns;   /* containing namespace */
+       /*
+        * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount
+        * to let these frequently modified fields in a separate cache line
+        * (so that reads of mnt_flags wont ping-pong on SMP machines)
+        */
+       atomic_t mnt_count;
+       int mnt_expiry_mark;            /* true if marked for expiry */
        int mnt_pinned;
 };
 
index 9e3042e7e1cc3514ba07d4d4774cad421daaa6d1..98c8765a488e831cad0e35adef583fcf0c93cbe2 100644 (file)
@@ -840,6 +840,11 @@ enum pci_fixup_pass {
 
 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
 
+void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
+void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
+void __iomem * const * pcim_iomap_table(struct pci_dev *pdev);
+int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
+
 extern int pci_pci_problems;
 #define PCIPCI_FAIL            1       /* No PCI PCI DMA */
 #define PCIPCI_TRITON          2
index e67b68ca235a45181eb4769f6fb8adbea05910e5..8fb9c3e06eefa62e778a3d09f2f54b94c58003e2 100644 (file)
 #define PCI_DEVICE_ID_PLX_R753         0x1152
 #define PCI_DEVICE_ID_PLX_OLITEC       0x1187
 #define PCI_DEVICE_ID_PLX_PCI200SYN    0x3196
+#define PCI_DEVICE_ID_PLX_9030          0x9030
 #define PCI_DEVICE_ID_PLX_9050         0x9050
 #define PCI_DEVICE_ID_PLX_9080         0x9080
 #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001
 #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8
 #define PCI_DEVICE_ID_LML_33R10                0x8a02
 
+#define PCI_VENDOR_ID_ESDGMBH          0x12fe
+#define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111
 
 #define PCI_VENDOR_ID_SIIG             0x131f
 #define PCI_SUBVENDOR_ID_SIIG          0x131f
 #define PCI_DEVICE_ID_MOXA_C168                0x1680
 #define PCI_DEVICE_ID_MOXA_CP168U      0x1681
 #define PCI_DEVICE_ID_MOXA_CP168EL     0x1682
+#define PCI_DEVICE_ID_MOXA_CP204J      0x2040
+#define PCI_DEVICE_ID_MOXA_C218                0x2180
+#define PCI_DEVICE_ID_MOXA_C320                0x3200
 
 #define PCI_VENDOR_ID_CCD              0x1397
 #define PCI_DEVICE_ID_CCD_2BD0         0x2bd0
 
 #define PCI_VENDOR_ID_CHELSIO          0x1425
 
+#define PCI_SUBVENDOR_ID_PERLE          0x155f
+#define PCI_SUBDEVICE_ID_PCI_RAS4       0xf001
+#define PCI_SUBDEVICE_ID_PCI_RAS8       0xf010
+
 
 #define PCI_VENDOR_ID_SYBA             0x1592
 #define PCI_DEVICE_ID_SYBA_2P_EPP      0x0782
index ab8a8dd8d64c5f55c88bd28c05d7439875239b72..9a5226f0f169789c5040d68b5a888de8484829ff 100644 (file)
@@ -352,6 +352,8 @@ struct pnp_protocol {
        (dev) = protocol_to_pnp_dev((dev)->protocol_list.next))
 
 
+extern struct bus_type pnp_bus_type;
+
 #if defined(CONFIG_PNP)
 
 /* device management */
index 966c35851b2e784a445bac96e1458554ab8784de..66a96814d614c7dd23c4371d80a54a1a829b6a84 100644 (file)
@@ -2,7 +2,10 @@
   File: linux/reiserfs_xattr.h
 */
 
-#include <linux/xattr.h>
+#ifndef _LINUX_REISERFS_XATTR_H
+#define _LINUX_REISERFS_XATTR_H
+
+#include <linux/types.h>
 
 /* Magic value in header */
 #define REISERFS_XATTR_MAGIC 0x52465841        /* "RFXA" */
@@ -13,7 +16,18 @@ struct reiserfs_xattr_header {
 };
 
 #ifdef __KERNEL__
+
 #include <linux/init.h>
+#include <linux/list.h>
+#include <linux/rwsem.h>
+#include <linux/reiserfs_fs_i.h>
+#include <linux/reiserfs_fs.h>
+
+struct inode;
+struct dentry;
+struct iattr;
+struct super_block;
+struct nameidata;
 
 struct reiserfs_xattr_handler {
        char *prefix;
@@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int);
 
 extern struct reiserfs_xattr_handler user_handler;
 extern struct reiserfs_xattr_handler trusted_handler;
-#ifdef CONFIG_REISERFS_FS_SECURITY
 extern struct reiserfs_xattr_handler security_handler;
-#endif
 
 int reiserfs_xattr_register_handlers(void) __init;
 void reiserfs_xattr_unregister_handlers(void);
@@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
 static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
 {
 }
-#endif
+#endif  /*  CONFIG_REISERFS_FS_XATTR  */
+
+#endif  /*  __KERNEL__  */
 
-#endif                         /* __KERNEL__ */
+#endif  /*  _LINUX_REISERFS_XATTR_H  */
index c6a48bfc8b14700b5dee19e9b6630744c5187129..759a0f97bec23db4e26bddcfe124e095ced54b3a 100644 (file)
@@ -24,7 +24,7 @@
 /*
  * Tracks changes to rchan/rchan_buf structs
  */
-#define RELAYFS_CHANNEL_VERSION                6
+#define RELAYFS_CHANNEL_VERSION                7
 
 /*
  * Per-cpu relay channel buffer
@@ -64,6 +64,10 @@ struct rchan
        void *private_data;             /* for user-defined data */
        size_t last_toobig;             /* tried to log event > subbuf size */
        struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */
+       int is_global;                  /* One global buffer ? */
+       struct list_head list;          /* for channel list */
+       struct dentry *parent;          /* parent dentry passed to open */
+       char base_filename[NAME_MAX];   /* saved base filename */
 };
 
 /*
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename,
                         struct dentry *parent,
                         size_t subbuf_size,
                         size_t n_subbufs,
-                        struct rchan_callbacks *cb);
+                        struct rchan_callbacks *cb,
+                        void *private_data);
 extern void relay_close(struct rchan *chan);
 extern void relay_flush(struct rchan *chan);
 extern void relay_subbufs_consumed(struct rchan *chan,
index d93857056cb99b1a45de079ab9e8101231d3f003..68e3f6853fa69a1950f106e6fd60ec37233865d9 100644 (file)
@@ -25,6 +25,7 @@
 
 #define RIO_ANY_DESTID         0xff
 #define RIO_NO_HOPCOUNT                -1
+#define RIO_INVALID_DESTID     0xffff
 
 #define RIO_MAX_MPORT_RESOURCES        16
 #define RIO_MAX_DEV_RESOURCES  16
index 4463735351904f039b1c3239f6161f52ce88ad77..76c8e2dc48dd3833969d2da24b9c7dbdd6bcc306 100644 (file)
@@ -1013,8 +1013,10 @@ struct task_struct {
  * to a stack based synchronous wait) if its doing sync IO.
  */
        wait_queue_t *io_wait;
+#ifdef CONFIG_TASK_XACCT
 /* i/o counters(bytes read/written, #syscalls */
        u64 rchar, wchar, syscr, syscw;
+#endif
        struct task_io_accounting ioac;
 #if defined(CONFIG_TASK_XACCT)
        u64 acct_rss_mem1;      /* accumulated rss usage */
@@ -1649,6 +1651,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
 
 extern void normalize_rt_tasks(void);
 
+#ifdef CONFIG_TASK_XACCT
+static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
+{
+       tsk->rchar += amt;
+}
+
+static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
+{
+       tsk->wchar += amt;
+}
+
+static inline void inc_syscr(struct task_struct *tsk)
+{
+       tsk->syscr++;
+}
+
+static inline void inc_syscw(struct task_struct *tsk)
+{
+       tsk->syscw++;
+}
+#else
+static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
+{
+}
+
+static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
+{
+}
+
+static inline void inc_syscr(struct task_struct *tsk)
+{
+}
+
+static inline void inc_syscw(struct task_struct *tsk)
+{
+}
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif
index 83cdefae993165cce7e8601dc127fcb520420161..c554f60f18e4e1b3399973360bed004c8affdcab 100644 (file)
@@ -492,7 +492,7 @@ struct request_sock;
  *     Note that the fown_struct, @fown, is never outside the context of a
  *     struct file, so the file structure (and associated security information)
  *     can always be obtained:
- *             (struct file *)((long)fown - offsetof(struct file,f_owner));
+ *             container_of(fown, struct file, f_owner)
  *     @tsk contains the structure of task receiving signal.
  *     @fown contains the file owner information.
  *     @sig is the signal that will be sent.  When 0, kernel sends SIGIO.
index 4b463e66ddeab265d0c1b48cc092e2e594dd46b6..5e4364644ed13eedadbb3e11256f44b63886b618 100644 (file)
@@ -19,7 +19,9 @@
 struct cache_sizes {
        size_t                  cs_size;
        struct kmem_cache       *cs_cachep;
+#ifdef CONFIG_ZONE_DMA
        struct kmem_cache       *cs_dmacachep;
+#endif
 };
 extern struct cache_sizes malloc_sizes[];
 
@@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags)
                        __you_cannot_kmalloc_that_much();
                }
 found:
-               return kmem_cache_alloc((flags & GFP_DMA) ?
-                       malloc_sizes[i].cs_dmacachep :
-                       malloc_sizes[i].cs_cachep, flags);
+#ifdef CONFIG_ZONE_DMA
+               if (flags & GFP_DMA)
+                       return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep,
+                                               flags);
+#endif
+               return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags);
        }
        return __kmalloc(size, flags);
 }
@@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags)
                        __you_cannot_kzalloc_that_much();
                }
 found:
-               return kmem_cache_zalloc((flags & GFP_DMA) ?
-                       malloc_sizes[i].cs_dmacachep :
-                       malloc_sizes[i].cs_cachep, flags);
+#ifdef CONFIG_ZONE_DMA
+               if (flags & GFP_DMA)
+                       return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep,
+                                               flags);
+#endif
+               return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags);
        }
        return __kzalloc(size, flags);
 }
@@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
                        __you_cannot_kmalloc_that_much();
                }
 found:
-               return kmem_cache_alloc_node((flags & GFP_DMA) ?
-                       malloc_sizes[i].cs_dmacachep :
-                       malloc_sizes[i].cs_cachep, flags, node);
+#ifdef CONFIG_ZONE_DMA
+               if (flags & GFP_DMA)
+                       return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep,
+                                               flags, node);
+#endif
+               return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep,
+                                               flags, node);
        }
        return __kmalloc_node(size, flags, node);
 }
index fcd35a210e7f7d5eed13b7c4e243b4ee3a9c7a50..28157a36e6ccd69ce4ae091fe835162364813e7c 100644 (file)
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage {
                                /* _SS_MAXSIZE value minus size of ss_family */
 } __attribute__ ((aligned(_K_SS_ALIGNSIZE)));  /* force desired alignment */
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#ifdef __KERNEL__
 
 #include <asm/socket.h>                        /* arch-dependent defines       */
 #include <linux/sockios.h>             /* the SIOCxxx I/O controls     */
index 94b767d6427561297772ad556d9466333f424732..61fef376ed2e6161299719f8b3a7cfaf4f246b33 100644 (file)
@@ -228,15 +228,30 @@ do {                                                              \
 # define read_unlock_irq(lock)         _read_unlock_irq(lock)
 # define write_unlock_irq(lock)                _write_unlock_irq(lock)
 #else
-# define spin_unlock(lock)             __raw_spin_unlock(&(lock)->raw_lock)
-# define read_unlock(lock)             __raw_read_unlock(&(lock)->raw_lock)
-# define write_unlock(lock)            __raw_write_unlock(&(lock)->raw_lock)
-# define spin_unlock_irq(lock) \
-    do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
-# define read_unlock_irq(lock) \
-    do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
-# define write_unlock_irq(lock) \
-    do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
+# define spin_unlock(lock) \
+    do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0)
+# define read_unlock(lock) \
+    do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0)
+# define write_unlock(lock) \
+    do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0)
+# define spin_unlock_irq(lock)                 \
+do {                                           \
+       __raw_spin_unlock(&(lock)->raw_lock);   \
+       __release(lock);                        \
+       local_irq_enable();                     \
+} while (0)
+# define read_unlock_irq(lock)                 \
+do {                                           \
+       __raw_read_unlock(&(lock)->raw_lock);   \
+       __release(lock);                        \
+       local_irq_enable();                     \
+} while (0)
+# define write_unlock_irq(lock)                        \
+do {                                           \
+       __raw_write_unlock(&(lock)->raw_lock);  \
+       __release(lock);                        \
+       local_irq_enable();                     \
+} while (0)
 #endif
 
 #define spin_unlock_irqrestore(lock, flags) \
index 679ef0d70b6b1bae44fb4d9a60af100b1ec2d8fb..4f8539ccff6cf8addcf9d3561d58d5ba8b518c26 100644 (file)
@@ -7,7 +7,7 @@
 
 #endif
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#ifdef __KERNEL__
 
 #define S_IFMT  00170000
 #define S_IFSOCK 0140000
index 5423559a44a6833b336e5b29b5863abdd5ccfe6a..006868881346b771eb471c91a4cde68047f3edc6 100644 (file)
@@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *
 extern unsigned long totalram_pages;
 extern unsigned long totalreserve_pages;
 extern long nr_swap_pages;
-extern unsigned int nr_free_pages(void);
-extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat);
 extern unsigned int nr_free_buffer_pages(void);
 extern unsigned int nr_free_pagecache_pages(void);
 
+/* Definition of global_page_state not available yet */
+#define nr_free_pages() global_page_state(NR_FREE_PAGES)
+
+
 /* linux/mm/swap.c */
 extern void FASTCALL(lru_cache_add(struct page *));
 extern void FASTCALL(lru_cache_add_active(struct page *));
index a5b739967b74f46f745526952b1c947c236cf75a..55cee172d723914eed0770f178f95ae6bd7b122b 100644 (file)
@@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b)
  * lhs == rhs: return 0
  * lhs > rhs:  return >0
  */
-static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs)
+static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs)
 {
        if (lhs->tv_sec < rhs->tv_sec)
                return -1;
@@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs)
        return lhs->tv_nsec - rhs->tv_nsec;
 }
 
-static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs)
+static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs)
 {
        if (lhs->tv_sec < rhs->tv_sec)
                return -1;
index db501dc23c299e52af3ac357cd7af05478465d23..9a24e500c3113291b9304e218b935fdc300ab87a 100644 (file)
@@ -255,10 +255,10 @@ struct time_interpolator {
        u8 jitter;                      /* if set compensate for fluctuations */
        u32 nsec_per_cyc;               /* set by register_time_interpolator() */
        void *addr;                     /* address of counter or function */
-       u64 mask;                       /* mask the valid bits of the counter */
+       cycles_t mask;                  /* mask the valid bits of the counter */
        unsigned long offset;           /* nsec offset at last update of interpolator */
        u64 last_counter;               /* counter value in units of the counter at last update */
-       u64 last_cycle;                 /* Last timer value if TIME_SOURCE_JITTER is set */
+       cycles_t last_cycle;            /* Last timer value if TIME_SOURCE_JITTER is set */
        u64 frequency;                  /* frequency in counts/second */
        long drift;                     /* drift in parts-per-million (or -1) */
        unsigned long skips;            /* skips forward */
index 65cbcf22c31e1e8ab7aef22b3b8da180825cf7cc..8427c9e98e6b9772c26f071e94116979711b5a5b 100644 (file)
 #define NR_PTYS        CONFIG_LEGACY_PTY_COUNT   /* Number of legacy ptys */
 #define NR_UNIX98_PTY_DEFAULT  4096      /* Default maximum for Unix98 ptys */
 #define NR_UNIX98_PTY_MAX      (1 << MINORBITS) /* Absolute limit */
-#define NR_LDISCS              16
+#define NR_LDISCS              17
+
+/* line disciplines */
+#define N_TTY          0
+#define N_SLIP         1
+#define N_MOUSE                2
+#define N_PPP          3
+#define N_STRIP                4
+#define N_AX25         5
+#define N_X25          6       /* X.25 async */
+#define N_6PACK                7
+#define N_MASC         8       /* Reserved for Mobitex module <kaz@cafe.net> */
+#define N_R3964                9       /* Reserved for Simatic R3964 module */
+#define N_PROFIBUS_FDL 10      /* Reserved for Profibus <Dave@mvhi.com> */
+#define N_IRDA         11      /* Linux IrDa - http://irda.sourceforge.net/ */
+#define N_SMSBLOCK     12      /* SMS block mode - for talking to GSM data */
+                               /* cards about SMS messages */
+#define N_HDLC         13      /* synchronous HDLC */
+#define N_SYNC_PPP     14      /* synchronous PPP */
+#define N_HCI          15      /* Bluetooth HCI UART */
+#define N_GIGASET_M101 16      /* Siemens Gigaset M101 serial DECT adapter */
 
 /*
  * This character is the same as _POSIX_VDISABLE: it cannot be used as
@@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty);
 extern void tty_unhangup(struct file *filp);
 extern int tty_hung_up_p(struct file * filp);
 extern void do_SAK(struct tty_struct *tty);
+extern void __do_SAK(struct tty_struct *tty);
 extern void disassociate_ctty(int priv);
 extern void tty_flip_buffer_push(struct tty_struct *tty);
 extern speed_t tty_get_baud_rate(struct tty_struct *tty);
index 5e9803ed17fc4dd9c167c13541bbe209063ec7a6..acb1f105870c9f4f2535259d46bfa9371ab1a612 100644 (file)
@@ -3,20 +3,15 @@
 
 #include <linux/types.h>
 #include <linux/percpu.h>
+#include <linux/mm.h>
 #include <linux/mmzone.h>
 #include <asm/atomic.h>
 
-#ifdef CONFIG_VM_EVENT_COUNTERS
-/*
- * Light weight per cpu counter implementation.
- *
- * Counters should only be incremented.  You need to set EMBEDDED
- * to disable VM_EVENT_COUNTERS.  Things like procps (vmstat,
- * top, etc) use /proc/vmstat and depend on these counters.
- *
- * Counters are handled completely inline. On many platforms the code
- * generated will simply be the increment of a global address.
- */
+#ifdef CONFIG_ZONE_DMA
+#define DMA_ZONE(xx) xx##_DMA,
+#else
+#define DMA_ZONE(xx)
+#endif
 
 #ifdef CONFIG_ZONE_DMA32
 #define DMA32_ZONE(xx) xx##_DMA32,
@@ -30,7 +25,7 @@
 #define HIGHMEM_ZONE(xx)
 #endif
 
-#define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx)
+#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx)
 
 enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
                FOR_ALL_ZONES(PGALLOC),
@@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
                NR_VM_EVENT_ITEMS
 };
 
+#ifdef CONFIG_VM_EVENT_COUNTERS
+/*
+ * Light weight per cpu counter implementation.
+ *
+ * Counters should only be incremented and no critical kernel component
+ * should rely on the counter values.
+ *
+ * Counters are handled completely inline. On many platforms the code
+ * generated will simply be the increment of a global address.
+ */
+
 struct vm_event_state {
        unsigned long event[NR_VM_EVENT_ITEMS];
 };
@@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu)
 #else
 
 /* Disable counters */
-#define get_cpu_vm_events(e)   0L
-#define count_vm_event(e)      do { } while (0)
-#define count_vm_events(e,d)   do { } while (0)
-#define __count_vm_event(e)    do { } while (0)
-#define __count_vm_events(e,d) do { } while (0)
-#define vm_events_fold_cpu(x)  do { } while (0)
+static inline void count_vm_event(enum vm_event_item item)
+{
+}
+static inline void count_vm_events(enum vm_event_item item, long delta)
+{
+}
+static inline void __count_vm_event(enum vm_event_item item)
+{
+}
+static inline void __count_vm_events(enum vm_event_item item, long delta)
+{
+}
+static inline void all_vm_events(unsigned long *ret)
+{
+}
+static inline void vm_events_fold_cpu(int cpu)
+{
+}
 
 #endif /* CONFIG_VM_EVENT_COUNTERS */
 
 #define __count_zone_vm_events(item, zone, delta) \
-                       __count_vm_events(item##_DMA + zone_idx(zone), delta)
+               __count_vm_events(item##_NORMAL - ZONE_NORMAL + \
+               zone_idx(zone), delta)
 
 /*
  * Zone based page accounting with per cpu differentials.
@@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node,
        struct zone *zones = NODE_DATA(node)->node_zones;
 
        return
+#ifdef CONFIG_ZONE_DMA
+               zone_page_state(&zones[ZONE_DMA], item) +
+#endif
 #ifdef CONFIG_ZONE_DMA32
                zone_page_state(&zones[ZONE_DMA32], item) +
 #endif
-               zone_page_state(&zones[ZONE_NORMAL], item) +
 #ifdef CONFIG_HIGHMEM
                zone_page_state(&zones[ZONE_HIGHMEM], item) +
 #endif
-               zone_page_state(&zones[ZONE_DMA], item);
+               zone_page_state(&zones[ZONE_NORMAL], item);
 }
 
 extern void zone_statistics(struct zonelist *, struct zone *);
@@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item);
 void dec_zone_page_state(struct page *, enum zone_stat_item);
 
 extern void inc_zone_state(struct zone *, enum zone_stat_item);
+extern void __inc_zone_state(struct zone *, enum zone_stat_item);
+extern void dec_zone_state(struct zone *, enum zone_stat_item);
+extern void __dec_zone_state(struct zone *, enum zone_stat_item);
 
 void refresh_cpu_vm_stats(int);
 void refresh_vm_stats(void);
@@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page,
        __inc_zone_state(page_zone(page), item);
 }
 
+static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
+{
+       atomic_long_dec(&zone->vm_stat[item]);
+       atomic_long_dec(&vm_stat[item]);
+}
+
 static inline void __dec_zone_page_state(struct page *page,
                        enum zone_stat_item item)
 {
index 0e7f1e20ea45345d24a3d383256ddb798ec4fced..def131a5ac70085f685b527c6de0f23fccae4d0e 100644 (file)
 #define XATTR_CREATE   0x1     /* set value, fail if attr already exists */
 #define XATTR_REPLACE  0x2     /* set value, fail if attr does not exist */
 
+#ifdef  __KERNEL__
+
+#include <linux/types.h>
+
 /* Namespaces */
 #define XATTR_OS2_PREFIX "os2."
 #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
@@ -29,6 +33,8 @@
 #define XATTR_USER_PREFIX "user."
 #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
 
+struct inode;
+struct dentry;
 
 struct xattr_handler {
        char *prefix;
@@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz
 int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags);
 int generic_removexattr(struct dentry *dentry, const char *name);
 
+#endif  /*  __KERNEL__  */
+
 #endif /* _LINUX_XATTR_H */
index 0c775fceb675b052bece78b80c885aaf64f0723e..0689e004a281e3b2fdcc7f8e1d5d6770b9b63180 100644 (file)
@@ -558,10 +558,9 @@ struct sas_task {
 static inline struct sas_task *sas_alloc_task(gfp_t flags)
 {
        extern struct kmem_cache *sas_task_cache;
-       struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags);
+       struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
 
        if (task) {
-               memset(task, 0, sizeof(*task));
                INIT_LIST_HEAD(&task->list);
                spin_lock_init(&task->task_state_lock);
                task->task_state_flags = SAS_TASK_STATE_PENDING;
index a3f83e2c8250bf6ebf0a8429ed707a270531f769..ad33c979e0b32d3e2f2c1a21bc641003b02ad1fd 100644 (file)
@@ -192,6 +192,24 @@ config TASK_DELAY_ACCT
 
          Say N if unsure.
 
+config TASK_XACCT
+       bool "Enable extended accounting over taskstats (EXPERIMENTAL)"
+       depends on TASKSTATS
+       help
+         Collect extended task accounting data and send the data
+         to userland for processing over the taskstats interface.
+
+         Say N if unsure.
+
+config TASK_IO_ACCOUNTING
+       bool "Enable per-task storage I/O accounting (EXPERIMENTAL)"
+       depends on TASK_XACCT
+       help
+         Collect information on the number of bytes of storage I/O which this
+         task has caused.
+
+         Say N if unsure.
+
 config UTS_NS
        bool "UTS Namespaces"
        default n
@@ -280,8 +298,12 @@ config RELAY
 
          If unsure, say N.
 
+if BLK_DEV_INITRD
+
 source "usr/Kconfig"
 
+endif
+
 config CC_OPTIMIZE_FOR_SIZE
        bool "Optimize for size (Look out for broken compilers!)"
        default y
@@ -295,24 +317,6 @@ config CC_OPTIMIZE_FOR_SIZE
 
          If unsure, say N.
 
-config TASK_XACCT
-       bool "Enable extended accounting over taskstats (EXPERIMENTAL)"
-       depends on TASKSTATS
-       help
-         Collect extended task accounting data and send the data
-         to userland for processing over the taskstats interface.
-
-         Say N if unsure.
-
-config TASK_IO_ACCOUNTING
-       bool "Enable per-task storage I/O accounting (EXPERIMENTAL)"
-       depends on TASK_XACCT
-       help
-         Collect information on the number of bytes of storage I/O which this
-         task has caused.
-
-         Say N if unsure.
-
 config SYSCTL
        bool
 
index 633a268d270d3cc8bfa906c1a22476caa9645360..0154aea1e52d874814c05cb2a9c83d83bc48af71 100644 (file)
@@ -2,7 +2,12 @@
 # Makefile for the linux kernel.
 #
 
-obj-y                          := main.o version.o mounts.o initramfs.o
+obj-y                          := main.o version.o mounts.o
+ifneq ($(CONFIG_BLK_DEV_INITRD),y)
+obj-y                          += noinitramfs.o
+else
+obj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
+endif
 obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
 
 mounts-y                       := do_mounts.o
index 4fa0f7977de1a16db501d91c3c9b062cb7898c2d..00eff7a110854d5706ff51205f5ef06a7a267d27 100644 (file)
@@ -491,6 +491,17 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only)
        return message;
 }
 
+static int __initdata do_retain_initrd;
+
+static int __init retain_initrd_param(char *str)
+{
+       if (*str)
+               return 0;
+       do_retain_initrd = 1;
+       return 1;
+}
+__setup("retain_initrd", retain_initrd_param);
+
 extern char __initramfs_start[], __initramfs_end[];
 #ifdef CONFIG_BLK_DEV_INITRD
 #include <linux/initrd.h>
@@ -501,7 +512,11 @@ static void __init free_initrd(void)
 #ifdef CONFIG_KEXEC
        unsigned long crashk_start = (unsigned long)__va(crashk_res.start);
        unsigned long crashk_end   = (unsigned long)__va(crashk_res.end);
+#endif
+       if (do_retain_initrd)
+               goto skip;
 
+#ifdef CONFIG_KEXEC
        /*
         * If the initrd region is overlapped with crashkernel reserved region,
         * free only memory that is not part of crashkernel region.
@@ -519,7 +534,7 @@ static void __init free_initrd(void)
        } else
 #endif
                free_initrd_mem(initrd_start, initrd_end);
-
+skip:
        initrd_start = 0;
        initrd_end = 0;
 }
index 8b4a7d76916235df139b98bd41019a228615a2dd..4e88bddfbebfd03fe5fb6359179b8ef690c750f7 100644 (file)
@@ -395,11 +395,6 @@ static void __init smp_init(void)
        /* Any cleanup work */
        printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus());
        smp_cpus_done(max_cpus);
-#if 0
-       /* Get other processors into their bootup holding patterns. */
-
-       smp_commence();
-#endif
 }
 
 #endif
diff --git a/init/noinitramfs.c b/init/noinitramfs.c
new file mode 100644 (file)
index 0000000..f4c1a3a
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * init/noinitramfs.c
+ *
+ * Copyright (C) 2006, NXP Semiconductors, All Rights Reserved
+ * Author: Jean-Paul Saman <jean-paul.saman@nxp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include <linux/init.h>
+#include <linux/stat.h>
+#include <linux/kdev_t.h>
+#include <linux/syscalls.h>
+
+/*
+ * Create a simple rootfs that is similar to the default initramfs
+ */
+static int __init default_rootfs(void)
+{
+       int err;
+
+       err = sys_mkdir("/dev", 0755);
+       if (err < 0)
+               goto out;
+
+       err = sys_mknod((const char __user *) "/dev/console",
+                       S_IFCHR | S_IRUSR | S_IWUSR,
+                       new_encode_dev(MKDEV(5, 1)));
+       if (err < 0)
+               goto out;
+
+       err = sys_mkdir("/root", 0700);
+       if (err < 0)
+               goto out;
+
+       return 0;
+
+out:
+       printk(KERN_WARNING "Failed to create a rootfs\n");
+       return err;
+}
+rootfs_initcall(default_rootfs);
index a9b7a227b8d4c7bde79998048206b96fef1f57ed..0c97cb746160980733569830b1944451f9d33a22 100644 (file)
@@ -150,7 +150,7 @@ void free_ipc_ns(struct kref *kref)
  *     ipc_init        -       initialise IPC subsystem
  *
  *     The various system5 IPC resources (semaphores, messages and shared
- *     memory are initialised
+ *     memory) are initialised
  */
  
 static int __init ipc_init(void)
@@ -207,8 +207,7 @@ void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size)
 #ifdef CONFIG_PROC_FS
 static struct file_operations sysvipc_proc_fops;
 /**
- *     ipc_init_proc_interface -  Create a proc interface for sysipc types
- *                                using a seq_file interface.
+ *     ipc_init_proc_interface -  Create a proc interface for sysipc types using a seq_file interface.
  *     @path: Path in procfs
  *     @header: Banner to be printed at the beginning of the file.
  *     @ids: ipc id table to iterate.
@@ -417,7 +416,7 @@ void* ipc_alloc(int size)
  *     @ptr: pointer returned by ipc_alloc
  *     @size: size of block
  *
- *     Free a block created with ipc_alloc. The caller must know the size
+ *     Free a block created with ipc_alloc(). The caller must know the size
  *     used in the allocation call.
  */
 
@@ -524,7 +523,7 @@ static void ipc_do_vfree(struct work_struct *work)
  * @head: RCU callback structure for queued work
  * 
  * Since RCU callback function is called in bh,
- * we need to defer the vfree to schedule_work
+ * we need to defer the vfree to schedule_work().
  */
 static void ipc_schedule_free(struct rcu_head *head)
 {
@@ -541,7 +540,7 @@ static void ipc_schedule_free(struct rcu_head *head)
  * ipc_immediate_free - free ipc + rcu space
  * @head: RCU callback structure that contains pointer to be freed
  *
- * Free from the RCU callback context
+ * Free from the RCU callback context.
  */
 static void ipc_immediate_free(struct rcu_head *head)
 {
@@ -603,8 +602,8 @@ int ipcperms (struct kern_ipc_perm *ipcp, short flag)
  *     @in: kernel permissions
  *     @out: new style IPC permissions
  *
- *     Turn the kernel object 'in' into a set of permissions descriptions
- *     for returning to userspace (out).
+ *     Turn the kernel object @in into a set of permissions descriptions
+ *     for returning to userspace (@out).
  */
  
 
@@ -624,8 +623,8 @@ void kernel_to_ipc64_perm (struct kern_ipc_perm *in, struct ipc64_perm *out)
  *     @in: new style IPC permissions
  *     @out: old style IPC permissions
  *
- *     Turn the new style permissions object in into a compatibility
- *     object and store it into the 'out' pointer.
+ *     Turn the new style permissions object @in into a compatibility
+ *     object and store it into the @out pointer.
  */
  
 void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out)
@@ -722,7 +721,7 @@ int ipc_checkid(struct ipc_ids* ids, struct kern_ipc_perm* ipcp, int uid)
  *     @cmd: pointer to command
  *
  *     Return IPC_64 for new style IPC and IPC_OLD for old style IPC. 
- *     The cmd value is turned from an encoding command and version into
+ *     The @cmd value is turned from an encoding command and version into
  *     just the command code.
  */
  
index 9c8c23227c7f28970f64de6e21cab6e8bfa08415..87865f8b4ce3ecdebad12707c6867a302bedee69 100644 (file)
@@ -1601,8 +1601,8 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb,
 
 int audit_filter_user(struct netlink_skb_parms *cb, int type)
 {
+       enum audit_state state = AUDIT_DISABLED;
        struct audit_entry *e;
-       enum audit_state   state;
        int ret = 1;
 
        rcu_read_lock();
index 6952dd057300f637e68a059ba1f299d8464ae9f8..cebb4c28c039b0cd9ad14592557d324b0ffac899 100644 (file)
@@ -1016,3 +1016,69 @@ asmlinkage long compat_sys_migrate_pages(compat_pid_t pid,
        return sys_migrate_pages(pid, nr_bits + 1, old, new);
 }
 #endif
+
+struct compat_sysinfo {
+       s32 uptime;
+       u32 loads[3];
+       u32 totalram;
+       u32 freeram;
+       u32 sharedram;
+       u32 bufferram;
+       u32 totalswap;
+       u32 freeswap;
+       u16 procs;
+       u16 pad;
+       u32 totalhigh;
+       u32 freehigh;
+       u32 mem_unit;
+       char _f[20-2*sizeof(u32)-sizeof(int)];
+};
+
+asmlinkage long
+compat_sys_sysinfo(struct compat_sysinfo __user *info)
+{
+       struct sysinfo s;
+
+       do_sysinfo(&s);
+
+       /* Check to see if any memory value is too large for 32-bit and scale
+        *  down if needed
+        */
+       if ((s.totalram >> 32) || (s.totalswap >> 32)) {
+               int bitcount = 0;
+
+               while (s.mem_unit < PAGE_SIZE) {
+                       s.mem_unit <<= 1;
+                       bitcount++;
+               }
+
+               s.totalram >>= bitcount;
+               s.freeram >>= bitcount;
+               s.sharedram >>= bitcount;
+               s.bufferram >>= bitcount;
+               s.totalswap >>= bitcount;
+               s.freeswap >>= bitcount;
+               s.totalhigh >>= bitcount;
+               s.freehigh >>= bitcount;
+       }
+
+       if (!access_ok(VERIFY_WRITE, info, sizeof(struct compat_sysinfo)) ||
+           __put_user (s.uptime, &info->uptime) ||
+           __put_user (s.loads[0], &info->loads[0]) ||
+           __put_user (s.loads[1], &info->loads[1]) ||
+           __put_user (s.loads[2], &info->loads[2]) ||
+           __put_user (s.totalram, &info->totalram) ||
+           __put_user (s.freeram, &info->freeram) ||
+           __put_user (s.sharedram, &info->sharedram) ||
+           __put_user (s.bufferram, &info->bufferram) ||
+           __put_user (s.totalswap, &info->totalswap) ||
+           __put_user (s.freeswap, &info->freeswap) ||
+           __put_user (s.procs, &info->procs) ||
+           __put_user (s.totalhigh, &info->totalhigh) ||
+           __put_user (s.freehigh, &info->freehigh) ||
+           __put_user (s.mem_unit, &info->mem_unit))
+               return -EFAULT;
+
+       return 0;
+}
+
index 7406fe6966f908cb547fba3de5fcf5d566f831ea..3d4206ada5c9d970c0806348a75424f30f7adbac 100644 (file)
@@ -309,6 +309,8 @@ void enable_nonboot_cpus(void)
        mutex_lock(&cpu_add_remove_lock);
        cpu_hotplug_disabled = 0;
        mutex_unlock(&cpu_add_remove_lock);
+       if (cpus_empty(frozen_cpus))
+               return;
 
        printk("Enabling non-boot CPUs ...\n");
        for_each_cpu_mask(cpu, frozen_cpus) {
index fec12eb124716f7e05e2564f241beef2049834cb..bc71fdfcd8a78d4a6b0f466b11f55cb8354bacdd 100644 (file)
@@ -257,8 +257,7 @@ static int has_stopped_jobs(int pgrp)
 }
 
 /**
- * reparent_to_init - Reparent the calling kernel thread to the init task
- * of the pid space that the thread belongs to.
+ * reparent_to_init - Reparent the calling kernel thread to the init task of the pid space that the thread belongs to.
  *
  * If a kernel thread is launched as a result of a system call, or if
  * it ever exits, it should generally reparent itself to init so that
index d57118da73ff04cfecc4b09b689c7bf74191dcc6..80284eb488ced61808dedf0b999af2f55c494d28 100644 (file)
@@ -1038,10 +1038,12 @@ static struct task_struct *copy_process(unsigned long clone_flags,
        p->utime = cputime_zero;
        p->stime = cputime_zero;
        p->sched_time = 0;
+#ifdef CONFIG_TASK_XACCT
        p->rchar = 0;           /* I/O counter: bytes read */
        p->wchar = 0;           /* I/O counter: bytes written */
        p->syscr = 0;           /* I/O counter: read syscalls */
        p->syscw = 0;           /* I/O counter: write syscalls */
+#endif
        task_io_accounting_init(p);
        acct_clear_integrals(p);
 
index d0ba190dfeb6b9ae81c98f135515b19a145f8206..f44e499e8fcab4130bfa1a77558aabaf24458fe2 100644 (file)
@@ -102,7 +102,7 @@ static DEFINE_PER_CPU(struct hrtimer_base, hrtimer_bases[MAX_HRTIMER_BASES]) =
  *
  * The function calculates the monotonic clock from the realtime
  * clock and the wall_to_monotonic offset and stores the result
- * in normalized timespec format in the variable pointed to by ts.
+ * in normalized timespec format in the variable pointed to by @ts.
  */
 void ktime_get_ts(struct timespec *ts)
 {
@@ -583,8 +583,8 @@ EXPORT_SYMBOL_GPL(hrtimer_init);
  * @which_clock: which clock to query
  * @tp:                 pointer to timespec variable to store the resolution
  *
- * Store the resolution of the clock selected by which_clock in the
- * variable pointed to by tp.
+ * Store the resolution of the clock selected by @which_clock in the
+ * variable pointed to by @tp.
  */
 int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp)
 {
index 1dab0ac3f79782a129dc5736ac8d838ee9d4ba01..681c52dbfe229bbffc32db74c395f3f149738ed4 100644 (file)
@@ -1,5 +1,5 @@
 
-obj-y := handle.o manage.o spurious.o resend.o chip.o
+obj-y := handle.o manage.o spurious.o resend.o chip.o devres.o
 obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o
 obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o
diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c
new file mode 100644 (file)
index 0000000..85a430d
--- /dev/null
@@ -0,0 +1,88 @@
+#include <linux/module.h>
+#include <linux/interrupt.h>
+
+/*
+ * Device resource management aware IRQ request/free implementation.
+ */
+struct irq_devres {
+       unsigned int irq;
+       void *dev_id;
+};
+
+static void devm_irq_release(struct device *dev, void *res)
+{
+       struct irq_devres *this = res;
+
+       free_irq(this->irq, this->dev_id);
+}
+
+static int devm_irq_match(struct device *dev, void *res, void *data)
+{
+       struct irq_devres *this = res, *match = data;
+
+       return this->irq == match->irq && this->dev_id == match->dev_id;
+}
+
+/**
+ *     devm_request_irq - allocate an interrupt line for a managed device
+ *     @dev: device to request interrupt for
+ *     @irq: Interrupt line to allocate
+ *     @handler: Function to be called when the IRQ occurs
+ *     @irqflags: Interrupt type flags
+ *     @devname: An ascii name for the claiming device
+ *     @dev_id: A cookie passed back to the handler function
+ *
+ *     Except for the extra @dev argument, this function takes the
+ *     same arguments and performs the same function as
+ *     request_irq().  IRQs requested with this function will be
+ *     automatically freed on driver detach.
+ *
+ *     If an IRQ allocated with this function needs to be freed
+ *     separately, dev_free_irq() must be used.
+ */
+int devm_request_irq(struct device *dev, unsigned int irq,
+                    irq_handler_t handler, unsigned long irqflags,
+                    const char *devname, void *dev_id)
+{
+       struct irq_devres *dr;
+       int rc;
+
+       dr = devres_alloc(devm_irq_release, sizeof(struct irq_devres),
+                         GFP_KERNEL);
+       if (!dr)
+               return -ENOMEM;
+
+       rc = request_irq(irq, handler, irqflags, devname, dev_id);
+       if (rc) {
+               kfree(dr);
+               return rc;
+       }
+
+       dr->irq = irq;
+       dr->dev_id = dev_id;
+       devres_add(dev, dr);
+
+       return 0;
+}
+EXPORT_SYMBOL(devm_request_irq);
+
+/**
+ *     devm_free_irq - free an interrupt
+ *     @dev: device to free interrupt for
+ *     @irq: Interrupt line to free
+ *     @dev_id: Device identity to free
+ *
+ *     Except for the extra @dev argument, this function takes the
+ *     same arguments and performs the same function as free_irq().
+ *     This function instead of free_irq() should be used to manually
+ *     free IRQs allocated with dev_request_irq().
+ */
+void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id)
+{
+       struct irq_devres match_data = { irq, dev_id };
+
+       free_irq(irq, dev_id);
+       WARN_ON(devres_destroy(dev, devm_irq_release, devm_irq_match,
+                              &match_data));
+}
+EXPORT_SYMBOL(devm_free_irq);
index c4b7ed1cebf7560bf1dc56bf861d1a0b36e69149..8b961adc3bd2d8f27cc14b2b0701e93522e2c232 100644 (file)
@@ -482,89 +482,3 @@ int request_irq(unsigned int irq, irq_handler_t handler,
        return retval;
 }
 EXPORT_SYMBOL(request_irq);
-
-/*
- * Device resource management aware IRQ request/free implementation.
- */
-struct irq_devres {
-       unsigned int irq;
-       void *dev_id;
-};
-
-static void devm_irq_release(struct device *dev, void *res)
-{
-       struct irq_devres *this = res;
-
-       free_irq(this->irq, this->dev_id);
-}
-
-static int devm_irq_match(struct device *dev, void *res, void *data)
-{
-       struct irq_devres *this = res, *match = data;
-
-       return this->irq == match->irq && this->dev_id == match->dev_id;
-}
-
-/**
- *     devm_request_irq - allocate an interrupt line for a managed device
- *     @dev: device to request interrupt for
- *     @irq: Interrupt line to allocate
- *     @handler: Function to be called when the IRQ occurs
- *     @irqflags: Interrupt type flags
- *     @devname: An ascii name for the claiming device
- *     @dev_id: A cookie passed back to the handler function
- *
- *     Except for the extra @dev argument, this function takes the
- *     same arguments and performs the same function as
- *     request_irq().  IRQs requested with this function will be
- *     automatically freed on driver detach.
- *
- *     If an IRQ allocated with this function needs to be freed
- *     separately, dev_free_irq() must be used.
- */
-int devm_request_irq(struct device *dev, unsigned int irq,
-                    irq_handler_t handler, unsigned long irqflags,
-                    const char *devname, void *dev_id)
-{
-       struct irq_devres *dr;
-       int rc;
-
-       dr = devres_alloc(devm_irq_release, sizeof(struct irq_devres),
-                         GFP_KERNEL);
-       if (!dr)
-               return -ENOMEM;
-
-       rc = request_irq(irq, handler, irqflags, devname, dev_id);
-       if (rc) {
-               kfree(dr);
-               return rc;
-       }
-
-       dr->irq = irq;
-       dr->dev_id = dev_id;
-       devres_add(dev, dr);
-
-       return 0;
-}
-EXPORT_SYMBOL(devm_request_irq);
-
-/**
- *     devm_free_irq - free an interrupt
- *     @dev: device to free interrupt for
- *     @irq: Interrupt line to free
- *     @dev_id: Device identity to free
- *
- *     Except for the extra @dev argument, this function takes the
- *     same arguments and performs the same function as free_irq().
- *     This function instead of free_irq() should be used to manually
- *     free IRQs allocated with dev_request_irq().
- */
-void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id)
-{
-       struct irq_devres match_data = { irq, dev_id };
-
-       free_irq(irq, dev_id);
-       WARN_ON(devres_destroy(dev, devm_irq_release, devm_irq_match,
-                              &match_data));
-}
-EXPORT_SYMBOL(devm_free_irq);
index 61f5c717a8f579cbe5dd3c9b3991b7ef2fb5cead..6d3be06e8ce6362d2f2e106452c9c5383ebc6cfc 100644 (file)
@@ -136,7 +136,6 @@ void register_irq_proc(unsigned int irq)
                entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir);
 
                if (entry) {
-                       entry->nlink = 1;
                        entry->data = (void *)(long)irq;
                        entry->read_proc = irq_affinity_read_proc;
                        entry->write_proc = irq_affinity_write_proc;
index 5d1d907378a299ad6c6aab16b15d55d1248f296e..cee419143fd47bb410b0cf80e7762a0f02ffbfce 100644 (file)
@@ -32,8 +32,8 @@
  * @gfp_mask: get_free_pages mask, passed to kmalloc()
  * @lock: the lock to be used to protect the fifo buffer
  *
- * Do NOT pass the kfifo to kfifo_free() after use ! Simply free the
- * struct kfifo with kfree().
+ * Do NOT pass the kfifo to kfifo_free() after use! Simply free the
+ * &struct kfifo with kfree().
  */
 struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
                         gfp_t gfp_mask, spinlock_t *lock)
@@ -108,7 +108,7 @@ EXPORT_SYMBOL(kfifo_free);
  * @buffer: the data to be added.
  * @len: the length of the data to be added.
  *
- * This function copies at most 'len' bytes from the 'buffer' into
+ * This function copies at most @len bytes from the @buffer into
  * the FIFO depending on the free space, and returns the number of
  * bytes copied.
  *
@@ -155,8 +155,8 @@ EXPORT_SYMBOL(__kfifo_put);
  * @buffer: where the data must be copied.
  * @len: the size of the destination buffer.
  *
- * This function copies at most 'len' bytes from the FIFO into the
- * 'buffer' and returns the number of copied bytes.
+ * This function copies at most @len bytes from the FIFO into the
+ * @buffer and returns the number of copied bytes.
  *
  * Note that with only one concurrent reader and one concurrent
  * writer, you don't need extra locking to use these functions.
index 1db8c72d0d380c637b18e3951df45f32291ceeda..87c50ccd1d4e93850373d23c8d96b46a93cc0688 100644 (file)
@@ -50,7 +50,7 @@ static struct kthread_stop_info kthread_stop_info;
 /**
  * kthread_should_stop - should this kthread return now?
  *
- * When someone calls kthread_stop on your kthread, it will be woken
+ * When someone calls kthread_stop() on your kthread, it will be woken
  * and this will return true.  You should then return, and your return
  * value will be passed through to kthread_stop().
  */
@@ -143,7 +143,7 @@ static void keventd_create_kthread(struct work_struct *work)
  * it.  See also kthread_run(), kthread_create_on_cpu().
  *
  * When woken, the thread will run @threadfn() with @data as its
- * argument. @threadfn can either call do_exit() directly if it is a
+ * argument. @threadfn() can either call do_exit() directly if it is a
  * standalone thread for which noone will call kthread_stop(), or
  * return when 'kthread_should_stop()' is true (which means
  * kthread_stop() has been called).  The return value should be zero
@@ -192,7 +192,7 @@ EXPORT_SYMBOL(kthread_create);
  *
  * Description: This function is equivalent to set_cpus_allowed(),
  * except that @cpu doesn't need to be online, and the thread must be
- * stopped (i.e., just returned from kthread_create().
+ * stopped (i.e., just returned from kthread_create()).
  */
 void kthread_bind(struct task_struct *k, unsigned int cpu)
 {
index 509efd49540f9beb09ddf347725690f939e09aa2..592c576d77a7c325cb4edfa4d496f244764b5ae5 100644 (file)
@@ -70,6 +70,9 @@ static int graph_lock(void)
 
 static inline int graph_unlock(void)
 {
+       if (debug_locks && !__raw_spin_is_locked(&lockdep_lock))
+               return DEBUG_LOCKS_WARN_ON(1);
+
        __raw_spin_unlock(&lockdep_lock);
        return 0;
 }
@@ -487,7 +490,7 @@ static void print_lock_dependencies(struct lock_class *class, int depth)
  * Add a new dependency to the head of the list:
  */
 static int add_lock_to_list(struct lock_class *class, struct lock_class *this,
-                           struct list_head *head, unsigned long ip)
+                           struct list_head *head, unsigned long ip, int distance)
 {
        struct lock_list *entry;
        /*
@@ -499,6 +502,7 @@ static int add_lock_to_list(struct lock_class *class, struct lock_class *this,
                return 0;
 
        entry->class = this;
+       entry->distance = distance;
        if (!save_trace(&entry->trace))
                return 0;
 
@@ -712,6 +716,9 @@ find_usage_backwards(struct lock_class *source, unsigned int depth)
        struct lock_list *entry;
        int ret;
 
+       if (!__raw_spin_is_locked(&lockdep_lock))
+               return DEBUG_LOCKS_WARN_ON(1);
+
        if (depth > max_recursion_depth)
                max_recursion_depth = depth;
        if (depth >= RECURSION_LIMIT)
@@ -900,7 +907,7 @@ check_deadlock(struct task_struct *curr, struct held_lock *next,
  */
 static int
 check_prev_add(struct task_struct *curr, struct held_lock *prev,
-              struct held_lock *next)
+              struct held_lock *next, int distance)
 {
        struct lock_list *entry;
        int ret;
@@ -978,8 +985,11 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
         *  L2 added to its dependency list, due to the first chain.)
         */
        list_for_each_entry(entry, &prev->class->locks_after, entry) {
-               if (entry->class == next->class)
+               if (entry->class == next->class) {
+                       if (distance == 1)
+                               entry->distance = 1;
                        return 2;
+               }
        }
 
        /*
@@ -987,12 +997,13 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
         * to the previous lock's dependency list:
         */
        ret = add_lock_to_list(prev->class, next->class,
-                              &prev->class->locks_after, next->acquire_ip);
+                              &prev->class->locks_after, next->acquire_ip, distance);
+
        if (!ret)
                return 0;
 
        ret = add_lock_to_list(next->class, prev->class,
-                              &next->class->locks_before, next->acquire_ip);
+                              &next->class->locks_before, next->acquire_ip, distance);
        if (!ret)
                return 0;
 
@@ -1040,13 +1051,14 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)
                goto out_bug;
 
        for (;;) {
+               int distance = curr->lockdep_depth - depth + 1;
                hlock = curr->held_locks + depth-1;
                /*
                 * Only non-recursive-read entries get new dependencies
                 * added:
                 */
                if (hlock->read != 2) {
-                       if (!check_prev_add(curr, hlock, next))
+                       if (!check_prev_add(curr, hlock, next, distance))
                                return 0;
                        /*
                         * Stop after the first non-trylock entry,
@@ -1293,7 +1305,8 @@ out_unlock_set:
        if (!subclass || force)
                lock->class_cache = class;
 
-       DEBUG_LOCKS_WARN_ON(class->subclass != subclass);
+       if (DEBUG_LOCKS_WARN_ON(class->subclass != subclass))
+               return NULL;
 
        return class;
 }
@@ -1308,7 +1321,8 @@ static inline int lookup_chain_cache(u64 chain_key, struct lock_class *class)
        struct list_head *hash_head = chainhashentry(chain_key);
        struct lock_chain *chain;
 
-       DEBUG_LOCKS_WARN_ON(!irqs_disabled());
+       if (DEBUG_LOCKS_WARN_ON(!irqs_disabled()))
+               return 0;
        /*
         * We can walk it lock-free, because entries only get added
         * to the hash:
@@ -1394,7 +1408,9 @@ static void check_chain_key(struct task_struct *curr)
                        return;
                }
                id = hlock->class - lock_classes;
-               DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS);
+               if (DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS))
+                       return;
+
                if (prev_hlock && (prev_hlock->irq_context !=
                                                        hlock->irq_context))
                        chain_key = 0;
@@ -2205,7 +2221,11 @@ out_calc_hash:
                        if (!check_prevs_add(curr, hlock))
                                return 0;
                graph_unlock();
-       }
+       } else
+               /* after lookup_chain_cache(): */
+               if (unlikely(!debug_locks))
+                       return 0;
+
        curr->lockdep_depth++;
        check_chain_key(curr);
        if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) {
@@ -2214,6 +2234,7 @@ out_calc_hash:
                printk("turning off the locking correctness validator.\n");
                return 0;
        }
+
        if (unlikely(curr->lockdep_depth > max_lockdep_depth))
                max_lockdep_depth = curr->lockdep_depth;
 
@@ -2764,4 +2785,3 @@ void debug_show_held_locks(struct task_struct *task)
 }
 
 EXPORT_SYMBOL_GPL(debug_show_held_locks);
-
index b554b40a4aa6ca1872f7225a47bc2829300e24b5..88fc611b3ae907a3677a2549b4c809f187729b8c 100644 (file)
@@ -77,12 +77,29 @@ static unsigned long count_backward_deps(struct lock_class *class)
        return ret;
 }
 
+static void print_name(struct seq_file *m, struct lock_class *class)
+{
+       char str[128];
+       const char *name = class->name;
+
+       if (!name) {
+               name = __get_key_name(class->key, str);
+               seq_printf(m, "%s", name);
+       } else{
+               seq_printf(m, "%s", name);
+               if (class->name_version > 1)
+                       seq_printf(m, "#%d", class->name_version);
+               if (class->subclass)
+                       seq_printf(m, "/%d", class->subclass);
+       }
+}
+
 static int l_show(struct seq_file *m, void *v)
 {
        unsigned long nr_forward_deps, nr_backward_deps;
        struct lock_class *class = m->private;
-       char str[128], c1, c2, c3, c4;
-       const char *name;
+       struct lock_list *entry;
+       char c1, c2, c3, c4;
 
        seq_printf(m, "%p", class->key);
 #ifdef CONFIG_DEBUG_LOCKDEP
@@ -97,16 +114,16 @@ static int l_show(struct seq_file *m, void *v)
        get_usage_chars(class, &c1, &c2, &c3, &c4);
        seq_printf(m, " %c%c%c%c", c1, c2, c3, c4);
 
-       name = class->name;
-       if (!name) {
-               name = __get_key_name(class->key, str);
-               seq_printf(m, ": %s", name);
-       } else{
-               seq_printf(m, ": %s", name);
-               if (class->name_version > 1)
-                       seq_printf(m, "#%d", class->name_version);
-               if (class->subclass)
-                       seq_printf(m, "/%d", class->subclass);
+       seq_printf(m, ": ");
+       print_name(m, class);
+       seq_puts(m, "\n");
+
+       list_for_each_entry(entry, &class->locks_after, entry) {
+               if (entry->distance == 1) {
+                       seq_printf(m, " -> [%p] ", entry->class);
+                       print_name(m, entry->class);
+                       seq_puts(m, "\n");
+               }
        }
        seq_puts(m, "\n");
 
@@ -227,7 +244,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
 
                sum_forward_deps += count_forward_deps(class);
        }
-#ifdef CONFIG_LOCKDEP_DEBUG
+#ifdef CONFIG_DEBUG_LOCKDEP
        DEBUG_LOCKS_WARN_ON(debug_atomic_read(&nr_unused_locks) != nr_unused);
 #endif
        seq_printf(m, " lock-classes:                  %11lu [max: %lu]\n",
index 525e365f72390bb3fb4601c0be4c4bd81214eceb..623d1828259a9a4f1b9f7b6776bf0ea3b339c75d 100644 (file)
@@ -150,6 +150,7 @@ EXPORT_SYMBOL(panic);
  *  'R' - User forced a module unload.
  *  'M' - Machine had a machine check experience.
  *  'B' - System has hit bad_page.
+ *  'U' - Userspace-defined naughtiness.
  *
  *     The string is overwritten by the next call to print_taint().
  */
@@ -158,13 +159,14 @@ const char *print_tainted(void)
 {
        static char buf[20];
        if (tainted) {
-               snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c",
+               snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c",
                        tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
                        tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
                        tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
                        tainted & TAINT_FORCED_RMMOD ? 'R' : ' ',
                        tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
-                       tainted & TAINT_BAD_PAGE ? 'B' : ' ');
+                       tainted & TAINT_BAD_PAGE ? 'B' : ' ',
+                       tainted & TAINT_USER ? 'U' : ' ');
        }
        else
                snprintf(buf, sizeof(buf), "Not tainted");
index 5fe87de10ff07ae1afbecc8e076360c4f6005424..a1bf616178394f1906a11bb2bb063d16cb3b5902 100644 (file)
@@ -399,10 +399,9 @@ EXPORT_SYMBOL_GPL(register_posix_clock);
 static struct k_itimer * alloc_posix_timer(void)
 {
        struct k_itimer *tmr;
-       tmr = kmem_cache_alloc(posix_timers_cache, GFP_KERNEL);
+       tmr = kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL);
        if (!tmr)
                return tmr;
-       memset(tmr, 0, sizeof (struct k_itimer));
        if (unlikely(!(tmr->sigq = sigqueue_alloc()))) {
                kmem_cache_free(posix_timers_cache, tmr);
                tmr = NULL;
index 88fc5d7ac737402c18db0306049b5873effeed55..406b20adb27ad820a455b93a836ab636cbf65436 100644 (file)
@@ -87,52 +87,24 @@ static inline void platform_finish(void)
        }
 }
 
+static void unprepare_processes(void)
+{
+       thaw_processes();
+       pm_restore_console();
+}
+
 static int prepare_processes(void)
 {
        int error = 0;
 
        pm_prepare_console();
-
-       error = disable_nonboot_cpus();
-       if (error)
-               goto enable_cpus;
-
        if (freeze_processes()) {
                error = -EBUSY;
-               goto thaw;
+               unprepare_processes();
        }
-
-       if (pm_disk_mode == PM_DISK_TESTPROC) {
-               printk("swsusp debug: Waiting for 5 seconds.\n");
-               mdelay(5000);
-               goto thaw;
-       }
-
-       error = platform_prepare();
-       if (error)
-               goto thaw;
-
-       /* Free memory before shutting down devices. */
-       if (!(error = swsusp_shrink_memory()))
-               return 0;
-
-       platform_finish();
- thaw:
-       thaw_processes();
- enable_cpus:
-       enable_nonboot_cpus();
-       pm_restore_console();
        return error;
 }
 
-static void unprepare_processes(void)
-{
-       platform_finish();
-       thaw_processes();
-       enable_nonboot_cpus();
-       pm_restore_console();
-}
-
 /**
  *     pm_suspend_disk - The granpappy of hibernation power management.
  *
@@ -150,29 +122,45 @@ int pm_suspend_disk(void)
        if (error)
                return error;
 
-       if (pm_disk_mode == PM_DISK_TESTPROC)
-               return 0;
+       if (pm_disk_mode == PM_DISK_TESTPROC) {
+               printk("swsusp debug: Waiting for 5 seconds.\n");
+               mdelay(5000);
+               goto Thaw;
+       }
+       /* Free memory before shutting down devices. */
+       error = swsusp_shrink_memory();
+       if (error)
+               goto Thaw;
+
+       error = platform_prepare();
+       if (error)
+               goto Thaw;
 
        suspend_console();
        error = device_suspend(PMSG_FREEZE);
        if (error) {
-               resume_console();
-               printk("Some devices failed to suspend\n");
-               goto Thaw;
+               printk(KERN_ERR "PM: Some devices failed to suspend\n");
+               goto Resume_devices;
        }
+       error = disable_nonboot_cpus();
+       if (error)
+               goto Enable_cpus;
 
        if (pm_disk_mode == PM_DISK_TEST) {
                printk("swsusp debug: Waiting for 5 seconds.\n");
                mdelay(5000);
-               goto Done;
+               goto Enable_cpus;
        }
 
        pr_debug("PM: snapshotting memory.\n");
        in_suspend = 1;
-       if ((error = swsusp_suspend()))
-               goto Done;
+       error = swsusp_suspend();
+       if (error)
+               goto Enable_cpus;
 
        if (in_suspend) {
+               enable_nonboot_cpus();
+               platform_finish();
                device_resume();
                resume_console();
                pr_debug("PM: writing image.\n");
@@ -188,7 +176,10 @@ int pm_suspend_disk(void)
        }
 
        swsusp_free();
- Done:
+ Enable_cpus:
+       enable_nonboot_cpus();
+ Resume_devices:
+       platform_finish();
        device_resume();
        resume_console();
  Thaw:
@@ -237,19 +228,28 @@ static int software_resume(void)
 
        pr_debug("PM: Checking swsusp image.\n");
 
-       if ((error = swsusp_check()))
+       error = swsusp_check();
+       if (error)
                goto Done;
 
        pr_debug("PM: Preparing processes for restore.\n");
 
-       if ((error = prepare_processes())) {
+       error = prepare_processes();
+       if (error) {
                swsusp_close();
                goto Done;
        }
 
+       error = platform_prepare();
+       if (error) {
+               swsusp_free();
+               goto Thaw;
+       }
+
        pr_debug("PM: Reading swsusp image.\n");
 
-       if ((error = swsusp_read())) {
+       error = swsusp_read();
+       if (error) {
                swsusp_free();
                goto Thaw;
        }
@@ -257,21 +257,22 @@ static int software_resume(void)
        pr_debug("PM: Preparing devices for restore.\n");
 
        suspend_console();
-       if ((error = device_suspend(PMSG_PRETHAW))) {
-               resume_console();
-               printk("Some devices failed to suspend\n");
-               swsusp_free();
-               goto Thaw;
-       }
+       error = device_suspend(PMSG_PRETHAW);
+       if (error)
+               goto Free;
 
-       mb();
+       error = disable_nonboot_cpus();
+       if (!error)
+               swsusp_resume();
 
-       pr_debug("PM: Restoring saved image.\n");
-       swsusp_resume();
-       pr_debug("PM: Restore failed, recovering.n");
+       enable_nonboot_cpus();
+ Free:
+       swsusp_free();
+       platform_finish();
        device_resume();
        resume_console();
  Thaw:
+       printk(KERN_ERR "PM: Restore failed, recovering.\n");
        unprepare_processes();
  Done:
        /* For success case, the suspend path will release the lock */
index ff3a6182f5f0df3fb479cbd56092dd0ee8e1ff2e..e1c4131204698fd891af0b8046406ae4fd0ff76a 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/cpu.h>
 #include <linux/resume-trace.h>
 #include <linux/freezer.h>
+#include <linux/vmstat.h>
 
 #include "power.h"
 
@@ -43,6 +44,11 @@ void pm_set_ops(struct pm_ops * ops)
        mutex_unlock(&pm_mutex);
 }
 
+static inline void pm_finish(suspend_state_t state)
+{
+       if (pm_ops->finish)
+               pm_ops->finish(state);
+}
 
 /**
  *     suspend_prepare - Do prep work before entering low-power state.
@@ -63,16 +69,13 @@ static int suspend_prepare(suspend_state_t state)
 
        pm_prepare_console();
 
-       error = disable_nonboot_cpus();
-       if (error)
-               goto Enable_cpu;
-
        if (freeze_processes()) {
                error = -EAGAIN;
                goto Thaw;
        }
 
-       if ((free_pages = nr_free_pages()) < FREE_PAGE_NUMBER) {
+       if ((free_pages = global_page_state(NR_FREE_PAGES))
+                       < FREE_PAGE_NUMBER) {
                pr_debug("PM: free some memory\n");
                shrink_all_memory(FREE_PAGE_NUMBER - free_pages);
                if (nr_free_pages() < FREE_PAGE_NUMBER) {
@@ -88,18 +91,22 @@ static int suspend_prepare(suspend_state_t state)
        }
 
        suspend_console();
-       if ((error = device_suspend(PMSG_SUSPEND))) {
+       error = device_suspend(PMSG_SUSPEND);
+       if (error) {
                printk(KERN_ERR "Some devices failed to suspend\n");
-               goto Finish;
+               goto Resume_devices;
        }
-       return 0;
- Finish:
-       if (pm_ops->finish)
-               pm_ops->finish(state);
+       error = disable_nonboot_cpus();
+       if (!error)
+               return 0;
+
+       enable_nonboot_cpus();
+ Resume_devices:
+       pm_finish(state);
+       device_resume();
+       resume_console();
  Thaw:
        thaw_processes();
- Enable_cpu:
-       enable_nonboot_cpus();
        pm_restore_console();
        return error;
 }
@@ -134,12 +141,11 @@ int suspend_enter(suspend_state_t state)
 
 static void suspend_finish(suspend_state_t state)
 {
+       enable_nonboot_cpus();
+       pm_finish(state);
        device_resume();
        resume_console();
        thaw_processes();
-       enable_nonboot_cpus();
-       if (pm_ops && pm_ops->finish)
-               pm_ops->finish(state);
        pm_restore_console();
 }
 
index c024606221c4f9d6dd7ba35f3634f9f944fda23e..fc53ad06812843d346a777711b97a7f4698c76e3 100644 (file)
@@ -591,7 +591,7 @@ static unsigned int count_free_highmem_pages(void)
 
        for_each_zone(zone)
                if (populated_zone(zone) && is_highmem(zone))
-                       cnt += zone->free_pages;
+                       cnt += zone_page_state(zone, NR_FREE_PAGES);
 
        return cnt;
 }
@@ -869,7 +869,7 @@ static int enough_free_mem(unsigned int nr_pages, unsigned int nr_highmem)
        for_each_zone(zone) {
                meta += snapshot_additional_pages(zone);
                if (!is_highmem(zone))
-                       free += zone->free_pages;
+                       free += zone_page_state(zone, NR_FREE_PAGES);
        }
 
        nr_pages += count_pages_for_highmem(nr_highmem);
index 31aa0390c777d186652fe1b5dc3bfb4aafbaa338..7fb834397a0d5f97701f0e604b138cb473647011 100644 (file)
@@ -230,9 +230,10 @@ int swsusp_shrink_memory(void)
                for_each_zone (zone)
                        if (populated_zone(zone)) {
                                if (is_highmem(zone)) {
-                                       highmem_size -= zone->free_pages;
+                                       highmem_size -=
+                                       zone_page_state(zone, NR_FREE_PAGES);
                                } else {
-                                       tmp -= zone->free_pages;
+                                       tmp -= zone_page_state(zone, NR_FREE_PAGES);
                                        tmp += zone->lowmem_reserve[ZONE_NORMAL];
                                        tmp += snapshot_additional_pages(zone);
                                }
index f7b7a785a5c60a35e133daa036f7b9667ce3d718..dd09efe7df54352fac2a621c3cef33286dd4d63a 100644 (file)
@@ -37,6 +37,7 @@ static struct snapshot_data {
        int mode;
        char frozen;
        char ready;
+       char platform_suspend;
 } snapshot_state;
 
 static atomic_t device_available = ATOMIC_INIT(1);
@@ -66,6 +67,7 @@ static int snapshot_open(struct inode *inode, struct file *filp)
        data->bitmap = NULL;
        data->frozen = 0;
        data->ready = 0;
+       data->platform_suspend = 0;
 
        return 0;
 }
@@ -122,6 +124,92 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf,
        return res;
 }
 
+static inline int platform_prepare(void)
+{
+       int error = 0;
+
+       if (pm_ops && pm_ops->prepare)
+               error = pm_ops->prepare(PM_SUSPEND_DISK);
+
+       return error;
+}
+
+static inline void platform_finish(void)
+{
+       if (pm_ops && pm_ops->finish)
+               pm_ops->finish(PM_SUSPEND_DISK);
+}
+
+static inline int snapshot_suspend(int platform_suspend)
+{
+       int error;
+
+       mutex_lock(&pm_mutex);
+       /* Free memory before shutting down devices. */
+       error = swsusp_shrink_memory();
+       if (error)
+               goto Finish;
+
+       if (platform_suspend) {
+               error = platform_prepare();
+               if (error)
+                       goto Finish;
+       }
+       suspend_console();
+       error = device_suspend(PMSG_FREEZE);
+       if (error)
+               goto Resume_devices;
+
+       error = disable_nonboot_cpus();
+       if (!error) {
+               in_suspend = 1;
+               error = swsusp_suspend();
+       }
+       enable_nonboot_cpus();
+ Resume_devices:
+       if (platform_suspend)
+               platform_finish();
+
+       device_resume();
+       resume_console();
+ Finish:
+       mutex_unlock(&pm_mutex);
+       return error;
+}
+
+static inline int snapshot_restore(int platform_suspend)
+{
+       int error;
+
+       mutex_lock(&pm_mutex);
+       pm_prepare_console();
+       if (platform_suspend) {
+               error = platform_prepare();
+               if (error)
+                       goto Finish;
+       }
+       suspend_console();
+       error = device_suspend(PMSG_PRETHAW);
+       if (error)
+               goto Resume_devices;
+
+       error = disable_nonboot_cpus();
+       if (!error)
+               error = swsusp_resume();
+
+       enable_nonboot_cpus();
+ Resume_devices:
+       if (platform_suspend)
+               platform_finish();
+
+       device_resume();
+       resume_console();
+ Finish:
+       pm_restore_console();
+       mutex_unlock(&pm_mutex);
+       return error;
+}
+
 static int snapshot_ioctl(struct inode *inode, struct file *filp,
                           unsigned int cmd, unsigned long arg)
 {
@@ -145,14 +233,9 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
                if (data->frozen)
                        break;
                mutex_lock(&pm_mutex);
-               error = disable_nonboot_cpus();
-               if (!error) {
-                       error = freeze_processes();
-                       if (error) {
-                               thaw_processes();
-                               enable_nonboot_cpus();
-                               error = -EBUSY;
-                       }
+               if (freeze_processes()) {
+                       thaw_processes();
+                       error = -EBUSY;
                }
                mutex_unlock(&pm_mutex);
                if (!error)
@@ -164,7 +247,6 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
                        break;
                mutex_lock(&pm_mutex);
                thaw_processes();
-               enable_nonboot_cpus();
                mutex_unlock(&pm_mutex);
                data->frozen = 0;
                break;
@@ -174,20 +256,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
                        error = -EPERM;
                        break;
                }
-               mutex_lock(&pm_mutex);
-               /* Free memory before shutting down devices. */
-               error = swsusp_shrink_memory();
-               if (!error) {
-                       suspend_console();
-                       error = device_suspend(PMSG_FREEZE);
-                       if (!error) {
-                               in_suspend = 1;
-                               error = swsusp_suspend();
-                               device_resume();
-                       }
-                       resume_console();
-               }
-               mutex_unlock(&pm_mutex);
+               error = snapshot_suspend(data->platform_suspend);
                if (!error)
                        error = put_user(in_suspend, (unsigned int __user *)arg);
                if (!error)
@@ -201,17 +270,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
                        error = -EPERM;
                        break;
                }
-               mutex_lock(&pm_mutex);
-               pm_prepare_console();
-               suspend_console();
-               error = device_suspend(PMSG_PRETHAW);
-               if (!error) {
-                       error = swsusp_resume();
-                       device_resume();
-               }
-               resume_console();
-               pm_restore_console();
-               mutex_unlock(&pm_mutex);
+               error = snapshot_restore(data->platform_suspend);
                break;
 
        case SNAPSHOT_FREE:
@@ -282,6 +341,11 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
                break;
 
        case SNAPSHOT_S2RAM:
+               if (!pm_ops) {
+                       error = -ENOSYS;
+                       break;
+               }
+
                if (!data->frozen) {
                        error = -EPERM;
                        break;
@@ -319,28 +383,35 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
                break;
 
        case SNAPSHOT_PMOPS:
+               error = -EINVAL;
+
                switch (arg) {
 
                case PMOPS_PREPARE:
-                       if (pm_ops->prepare) {
-                               error = pm_ops->prepare(PM_SUSPEND_DISK);
+                       if (pm_ops && pm_ops->enter) {
+                               data->platform_suspend = 1;
+                               error = 0;
+                       } else {
+                               error = -ENOSYS;
                        }
                        break;
 
                case PMOPS_ENTER:
-                       kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
-                       error = pm_ops->enter(PM_SUSPEND_DISK);
+                       if (data->platform_suspend) {
+                               kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
+                               error = pm_ops->enter(PM_SUSPEND_DISK);
+                               error = 0;
+                       }
                        break;
 
                case PMOPS_FINISH:
-                       if (pm_ops && pm_ops->finish) {
-                               pm_ops->finish(PM_SUSPEND_DISK);
-                       }
+                       if (data->platform_suspend)
+                               error = 0;
+
                        break;
 
                default:
                        printk(KERN_ERR "SNAPSHOT_PMOPS: invalid argument %ld\n", arg);
-                       error = -EINVAL;
 
                }
                break;
index c770e1a4e882289f66ae0e54451ba186f09c03d2..0c151877ff71ad117e2d751e34ce528606d7eea2 100644 (file)
@@ -483,7 +483,7 @@ static int have_callable_console(void)
  * printk - print a kernel message
  * @fmt: format string
  *
- * This is printk.  It can be called from any context.  We want it to work.
+ * This is printk().  It can be called from any context.  We want it to work.
  *
  * We try to grab the console_sem.  If we succeed, it's easy - we log the output and
  * call the console drivers.  If we fail to get the semaphore we place the output
@@ -529,7 +529,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
                zap_locks();
 
        /* This stops the holder of console_sem just where we want him */
-       local_irq_save(flags);
+       raw_local_irq_save(flags);
        lockdep_off();
        spin_lock(&logbuf_lock);
        printk_cpu = smp_processor_id();
@@ -618,7 +618,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
                        up(&console_sem);
                }
                lockdep_on();
-               local_irq_restore(flags);
+               raw_local_irq_restore(flags);
        } else {
                /*
                 * Someone else owns the drivers.  We drop the spinlock, which
@@ -628,7 +628,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
                printk_cpu = UINT_MAX;
                spin_unlock(&logbuf_lock);
                lockdep_on();
-               local_irq_restore(flags);
+               raw_local_irq_restore(flags);
        }
 
        preempt_enable();
@@ -783,6 +783,12 @@ int is_console_locked(void)
        return console_locked;
 }
 
+void wake_up_klogd(void)
+{
+       if (!oops_in_progress && waitqueue_active(&log_wait))
+               wake_up_interruptible(&log_wait);
+}
+
 /**
  * release_console_sem - unlock the console system
  *
@@ -825,8 +831,8 @@ void release_console_sem(void)
        console_locked = 0;
        up(&console_sem);
        spin_unlock_irqrestore(&logbuf_lock, flags);
-       if (wake_klogd && !oops_in_progress && waitqueue_active(&log_wait))
-               wake_up_interruptible(&log_wait);
+       if (wake_klogd)
+               wake_up_klogd();
 }
 EXPORT_SYMBOL(release_console_sem);
 
index d6579d511069130980196be79005f2724a01b8d3..9bfadb248dd877b009e49710db79957f13188c5d 100644 (file)
@@ -449,7 +449,6 @@ void create_prof_cpu_mask(struct proc_dir_entry *root_irq_dir)
        /* create /proc/irq/prof_cpu_mask */
        if (!(entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir)))
                return;
-       entry->nlink = 1;
        entry->data = (void *)&prof_cpu_mask;
        entry->read_proc = prof_cpu_mask_read_proc;
        entry->write_proc = prof_cpu_mask_write_proc;
index 284e2e8b4eed0e0d31ea1a5d5fb9f732f0a16d67..ef8a935710a27be3edc6c940f77878d2895d6434 100644 (file)
@@ -7,6 +7,8 @@
  * Copyright (C) 1999-2005 - Karim Yaghmour (karim@opersys.com)
  *
  * Moved to kernel/relay.c by Paul Mundt, 2006.
+ * November 2006 - CPU hotplug support by Mathieu Desnoyers
+ *     (mathieu.desnoyers@polymtl.ca)
  *
  * This file is released under the GPL.
  */
 #include <linux/relay.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>
+#include <linux/cpu.h>
+
+/* list of open channels, for cpu hotplug */
+static DEFINE_MUTEX(relay_channels_mutex);
+static LIST_HEAD(relay_channels);
 
 /*
  * close() vm_op implementation for relay file mapping.
@@ -187,6 +194,7 @@ void relay_destroy_buf(struct rchan_buf *buf)
                        __free_page(buf->page_array[i]);
                kfree(buf->page_array);
        }
+       chan->buf[buf->cpu] = NULL;
        kfree(buf->padding);
        kfree(buf);
        kref_put(&chan->kref, relay_destroy_channel);
@@ -320,7 +328,7 @@ static void wakeup_readers(struct work_struct *work)
  *     @buf: the channel buffer
  *     @init: 1 if this is a first-time initialization
  *
- *     See relay_reset for description of effect.
+ *     See relay_reset() for description of effect.
  */
 static void __relay_reset(struct rchan_buf *buf, unsigned int init)
 {
@@ -356,57 +364,75 @@ static void __relay_reset(struct rchan_buf *buf, unsigned int init)
  *     and restarting the channel in its initial state.  The buffers
  *     are not freed, so any mappings are still in effect.
  *
- *     NOTE: Care should be taken that the channel isn't actually
+ *     NOTE. Care should be taken that the channel isn't actually
  *     being used by anything when this call is made.
  */
 void relay_reset(struct rchan *chan)
 {
        unsigned int i;
-       struct rchan_buf *prev = NULL;
 
        if (!chan)
                return;
 
-       for (i = 0; i < NR_CPUS; i++) {
-               if (!chan->buf[i] || chan->buf[i] == prev)
-                       break;
-               __relay_reset(chan->buf[i], 0);
-               prev = chan->buf[i];
+       if (chan->is_global && chan->buf[0]) {
+               __relay_reset(chan->buf[0], 0);
+               return;
        }
+
+       mutex_lock(&relay_channels_mutex);
+       for_each_online_cpu(i)
+               if (chan->buf[i])
+                       __relay_reset(chan->buf[i], 0);
+       mutex_unlock(&relay_channels_mutex);
 }
 EXPORT_SYMBOL_GPL(relay_reset);
 
 /*
  *     relay_open_buf - create a new relay channel buffer
  *
- *     Internal - used by relay_open().
+ *     used by relay_open() and CPU hotplug.
  */
-static struct rchan_buf *relay_open_buf(struct rchan *chan,
-                                       const char *filename,
-                                       struct dentry *parent,
-                                       int *is_global)
+static struct rchan_buf *relay_open_buf(struct rchan *chan, unsigned int cpu)
 {
-       struct rchan_buf *buf;
+       struct rchan_buf *buf = NULL;
        struct dentry *dentry;
+       char *tmpname;
 
-       if (*is_global)
+       if (chan->is_global)
                return chan->buf[0];
 
+       tmpname = kzalloc(NAME_MAX + 1, GFP_KERNEL);
+       if (!tmpname)
+               goto end;
+       snprintf(tmpname, NAME_MAX, "%s%d", chan->base_filename, cpu);
+
        buf = relay_create_buf(chan);
        if (!buf)
-               return NULL;
+               goto free_name;
+
+       buf->cpu = cpu;
+       __relay_reset(buf, 1);
 
        /* Create file in fs */
-       dentry = chan->cb->create_buf_file(filename, parent, S_IRUSR,
-                                          buf, is_global);
-       if (!dentry) {
-               relay_destroy_buf(buf);
-               return NULL;
-       }
+       dentry = chan->cb->create_buf_file(tmpname, chan->parent, S_IRUSR,
+                                          buf, &chan->is_global);
+       if (!dentry)
+               goto free_buf;
 
        buf->dentry = dentry;
-       __relay_reset(buf, 1);
 
+       if(chan->is_global) {
+               chan->buf[0] = buf;
+               buf->cpu = 0;
+       }
+
+       goto free_name;
+
+free_buf:
+       relay_destroy_buf(buf);
+free_name:
+       kfree(tmpname);
+end:
        return buf;
 }
 
@@ -447,6 +473,47 @@ static void setup_callbacks(struct rchan *chan,
        chan->cb = cb;
 }
 
+/**
+ *
+ *     relay_hotcpu_callback - CPU hotplug callback
+ *     @nb: notifier block
+ *     @action: hotplug action to take
+ *     @hcpu: CPU number
+ *
+ *     Returns the success/failure of the operation. (NOTIFY_OK, NOTIFY_BAD)
+ */
+static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb,
+                               unsigned long action,
+                               void *hcpu)
+{
+       unsigned int hotcpu = (unsigned long)hcpu;
+       struct rchan *chan;
+
+       switch(action) {
+       case CPU_UP_PREPARE:
+               mutex_lock(&relay_channels_mutex);
+               list_for_each_entry(chan, &relay_channels, list) {
+                       if (chan->buf[hotcpu])
+                               continue;
+                       chan->buf[hotcpu] = relay_open_buf(chan, hotcpu);
+                       if(!chan->buf[hotcpu]) {
+                               printk(KERN_ERR
+                                       "relay_hotcpu_callback: cpu %d buffer "
+                                       "creation failed\n", hotcpu);
+                               mutex_unlock(&relay_channels_mutex);
+                               return NOTIFY_BAD;
+                       }
+               }
+               mutex_unlock(&relay_channels_mutex);
+               break;
+       case CPU_DEAD:
+               /* No need to flush the cpu : will be flushed upon
+                * final relay_flush() call. */
+               break;
+       }
+       return NOTIFY_OK;
+}
+
 /**
  *     relay_open - create a new relay channel
  *     @base_filename: base name of files to create
@@ -454,25 +521,24 @@ static void setup_callbacks(struct rchan *chan,
  *     @subbuf_size: size of sub-buffers
  *     @n_subbufs: number of sub-buffers
  *     @cb: client callback functions
+ *     @private_data: user-defined data
  *
  *     Returns channel pointer if successful, %NULL otherwise.
  *
  *     Creates a channel buffer for each cpu using the sizes and
  *     attributes specified.  The created channel buffer files
  *     will be named base_filename0...base_filenameN-1.  File
- *     permissions will be S_IRUSR.
+ *     permissions will be %S_IRUSR.
  */
 struct rchan *relay_open(const char *base_filename,
                         struct dentry *parent,
                         size_t subbuf_size,
                         size_t n_subbufs,
-                        struct rchan_callbacks *cb)
+                        struct rchan_callbacks *cb,
+                        void *private_data)
 {
        unsigned int i;
        struct rchan *chan;
-       char *tmpname;
-       int is_global = 0;
-
        if (!base_filename)
                return NULL;
 
@@ -487,38 +553,32 @@ struct rchan *relay_open(const char *base_filename,
        chan->n_subbufs = n_subbufs;
        chan->subbuf_size = subbuf_size;
        chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs);
+       chan->parent = parent;
+       chan->private_data = private_data;
+       strlcpy(chan->base_filename, base_filename, NAME_MAX);
        setup_callbacks(chan, cb);
        kref_init(&chan->kref);
 
-       tmpname = kmalloc(NAME_MAX + 1, GFP_KERNEL);
-       if (!tmpname)
-               goto free_chan;
-
+       mutex_lock(&relay_channels_mutex);
        for_each_online_cpu(i) {
-               sprintf(tmpname, "%s%d", base_filename, i);
-               chan->buf[i] = relay_open_buf(chan, tmpname, parent,
-                                             &is_global);
+               chan->buf[i] = relay_open_buf(chan, i);
                if (!chan->buf[i])
                        goto free_bufs;
-
-               chan->buf[i]->cpu = i;
        }
+       list_add(&chan->list, &relay_channels);
+       mutex_unlock(&relay_channels_mutex);
 
-       kfree(tmpname);
        return chan;
 
 free_bufs:
-       for (i = 0; i < NR_CPUS; i++) {
+       for_each_online_cpu(i) {
                if (!chan->buf[i])
                        break;
                relay_close_buf(chan->buf[i]);
-               if (is_global)
-                       break;
        }
-       kfree(tmpname);
 
-free_chan:
        kref_put(&chan->kref, relay_destroy_channel);
+       mutex_unlock(&relay_channels_mutex);
        return NULL;
 }
 EXPORT_SYMBOL_GPL(relay_open);
@@ -588,7 +648,7 @@ EXPORT_SYMBOL_GPL(relay_switch_subbuf);
  *     subbufs_consumed should be the number of sub-buffers newly consumed,
  *     not the total consumed.
  *
- *     NOTE: Kernel clients don't need to call this function if the channel
+ *     NOTE. Kernel clients don't need to call this function if the channel
  *     mode is 'overwrite'.
  */
 void relay_subbufs_consumed(struct rchan *chan,
@@ -619,24 +679,26 @@ EXPORT_SYMBOL_GPL(relay_subbufs_consumed);
 void relay_close(struct rchan *chan)
 {
        unsigned int i;
-       struct rchan_buf *prev = NULL;
 
        if (!chan)
                return;
 
-       for (i = 0; i < NR_CPUS; i++) {
-               if (!chan->buf[i] || chan->buf[i] == prev)
-                       break;
-               relay_close_buf(chan->buf[i]);
-               prev = chan->buf[i];
-       }
+       mutex_lock(&relay_channels_mutex);
+       if (chan->is_global && chan->buf[0])
+               relay_close_buf(chan->buf[0]);
+       else
+               for_each_possible_cpu(i)
+                       if (chan->buf[i])
+                               relay_close_buf(chan->buf[i]);
 
        if (chan->last_toobig)
                printk(KERN_WARNING "relay: one or more items not logged "
                       "[item size (%Zd) > sub-buffer size (%Zd)]\n",
                       chan->last_toobig, chan->subbuf_size);
 
+       list_del(&chan->list);
        kref_put(&chan->kref, relay_destroy_channel);
+       mutex_unlock(&relay_channels_mutex);
 }
 EXPORT_SYMBOL_GPL(relay_close);
 
@@ -649,17 +711,20 @@ EXPORT_SYMBOL_GPL(relay_close);
 void relay_flush(struct rchan *chan)
 {
        unsigned int i;
-       struct rchan_buf *prev = NULL;
 
        if (!chan)
                return;
 
-       for (i = 0; i < NR_CPUS; i++) {
-               if (!chan->buf[i] || chan->buf[i] == prev)
-                       break;
-               relay_switch_subbuf(chan->buf[i], 0);
-               prev = chan->buf[i];
+       if (chan->is_global && chan->buf[0]) {
+               relay_switch_subbuf(chan->buf[0], 0);
+               return;
        }
+
+       mutex_lock(&relay_channels_mutex);
+       for_each_possible_cpu(i)
+               if (chan->buf[i])
+                       relay_switch_subbuf(chan->buf[i], 0);
+       mutex_unlock(&relay_channels_mutex);
 }
 EXPORT_SYMBOL_GPL(relay_flush);
 
@@ -684,7 +749,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
  *     @filp: the file
  *     @vma: the vma describing what to map
  *
- *     Calls upon relay_mmap_buf to map the file into user space.
+ *     Calls upon relay_mmap_buf() to map the file into user space.
  */
 static int relay_file_mmap(struct file *filp, struct vm_area_struct *vma)
 {
@@ -826,7 +891,7 @@ static size_t relay_file_read_subbuf_avail(size_t read_pos,
  *     @read_pos: file read position
  *     @buf: relay channel buffer
  *
- *     If the read_pos is in the middle of padding, return the
+ *     If the @read_pos is in the middle of padding, return the
  *     position of the first actually available byte, otherwise
  *     return the original value.
  */
@@ -1022,3 +1087,12 @@ const struct file_operations relay_file_operations = {
        .sendfile       = relay_file_sendfile,
 };
 EXPORT_SYMBOL_GPL(relay_file_operations);
+
+static __init int relay_init(void)
+{
+
+       hotcpu_notifier(relay_hotcpu_callback, 0);
+       return 0;
+}
+
+module_init(relay_init);
index cca93cc0dd7d8ba7272b1ea4782e87c97bfe1a09..1fd67e16cd315388a67ba085dad46bb266bb5d93 100644 (file)
 
 #include <asm/unistd.h>
 
+/*
+ * Scheduler clock - returns current time in nanosec units.
+ * This is default implementation.
+ * Architectures and sub-architectures can override this.
+ */
+unsigned long long __attribute__((weak)) sched_clock(void)
+{
+       return (unsigned long long)jiffies * (1000000000 / HZ);
+}
+
 /*
  * Convert user-nice values [ -20 ... 0 ... 19 ]
  * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
@@ -4193,13 +4203,12 @@ static void __setscheduler(struct task_struct *p, int policy, int prio)
 }
 
 /**
- * sched_setscheduler - change the scheduling policy and/or RT priority of
- * a thread.
+ * sched_setscheduler - change the scheduling policy and/or RT priority of a thread.
  * @p: the task in question.
  * @policy: new policy.
  * @param: structure containing the new RT priority.
  *
- * NOTE: the task may be already dead
+ * NOTE that the task may be already dead.
  */
 int sched_setscheduler(struct task_struct *p, int policy,
                       struct sched_param *param)
@@ -4567,7 +4576,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
 /**
  * sys_sched_yield - yield the current processor to other threads.
  *
- * this function yields the current CPU by moving the calling thread
+ * This function yields the current CPU by moving the calling thread
  * to the expired array. If there are no other threads running on this
  * CPU then this function will return.
  */
@@ -4694,7 +4703,7 @@ EXPORT_SYMBOL(cond_resched_softirq);
 /**
  * yield - yield the current processor to other threads.
  *
- * this is a shortcut for kernel-space yielding - it marks the
+ * This is a shortcut for kernel-space yielding - it marks the
  * thread runnable and calls sys_sched_yield().
  */
 void __sched yield(void)
index 5630255d2e2a958f6e58eea4596a62b0dea3f91a..228fdb5c01d12a0b1b409b1819a95a4c8d223840 100644 (file)
@@ -1119,19 +1119,18 @@ kill_pg_info(int sig, struct siginfo *info, pid_t pgrp)
 int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
 {
        int error;
-       int acquired_tasklist_lock = 0;
        struct task_struct *p;
 
        rcu_read_lock();
-       if (unlikely(sig_needs_tasklist(sig))) {
+       if (unlikely(sig_needs_tasklist(sig)))
                read_lock(&tasklist_lock);
-               acquired_tasklist_lock = 1;
-       }
+
        p = pid_task(pid, PIDTYPE_PID);
        error = -ESRCH;
        if (p)
                error = group_send_sig_info(sig, info, p);
-       if (unlikely(acquired_tasklist_lock))
+
+       if (unlikely(sig_needs_tasklist(sig)))
                read_unlock(&tasklist_lock);
        rcu_read_unlock();
        return error;
@@ -2283,7 +2282,7 @@ static int do_tkill(int tgid, int pid, int sig)
  *  @pid: the PID of the thread
  *  @sig: signal to be sent
  *
- *  This syscall also checks the tgid and returns -ESRCH even if the PID
+ *  This syscall also checks the @tgid and returns -ESRCH even if the PID
  *  exists but it's not belonging to the target process anymore. This
  *  method solves the problem of threads exiting and PIDs getting reused.
  */
index 6e2101dec0fcfc9e95c52a1ac53bc6898b976edf..e1024383314de0428e4739e0f9c782330ecd63d5 100644 (file)
@@ -215,7 +215,7 @@ EXPORT_SYMBOL_GPL(atomic_notifier_chain_unregister);
  *     This routine uses RCU to synchronize with changes to the chain.
  *
  *     If the return value of the notifier can be and'ed
- *     with %NOTIFY_STOP_MASK then atomic_notifier_call_chain
+ *     with %NOTIFY_STOP_MASK then atomic_notifier_call_chain()
  *     will return immediately, with the return value of
  *     the notifier function which halted execution.
  *     Otherwise the return value is the return value
@@ -313,7 +313,7 @@ EXPORT_SYMBOL_GPL(blocking_notifier_chain_unregister);
  *     run in a process context, so they are allowed to block.
  *
  *     If the return value of the notifier can be and'ed
- *     with %NOTIFY_STOP_MASK then blocking_notifier_call_chain
+ *     with %NOTIFY_STOP_MASK then blocking_notifier_call_chain()
  *     will return immediately, with the return value of
  *     the notifier function which halted execution.
  *     Otherwise the return value is the return value
@@ -393,7 +393,7 @@ EXPORT_SYMBOL_GPL(raw_notifier_chain_unregister);
  *     All locking must be provided by the caller.
  *
  *     If the return value of the notifier can be and'ed
- *     with %NOTIFY_STOP_MASK then raw_notifier_call_chain
+ *     with %NOTIFY_STOP_MASK then raw_notifier_call_chain()
  *     will return immediately, with the return value of
  *     the notifier function which halted execution.
  *     Otherwise the return value is the return value
@@ -487,7 +487,7 @@ EXPORT_SYMBOL_GPL(srcu_notifier_chain_unregister);
  *     run in a process context, so they are allowed to block.
  *
  *     If the return value of the notifier can be and'ed
- *     with %NOTIFY_STOP_MASK then srcu_notifier_call_chain
+ *     with %NOTIFY_STOP_MASK then srcu_notifier_call_chain()
  *     will return immediately, with the return value of
  *     the notifier function which halted execution.
  *     Otherwise the return value is the return value
@@ -538,7 +538,7 @@ EXPORT_SYMBOL_GPL(srcu_init_notifier_head);
  *     Registers a function with the list of functions
  *     to be called at reboot time.
  *
- *     Currently always returns zero, as blocking_notifier_chain_register
+ *     Currently always returns zero, as blocking_notifier_chain_register()
  *     always returns zero.
  */
  
index 600b33358ded97ea54e90b6cc39dafef8e03fa40..e0ac6cd79fcf6955c6105815b4c8ab4d9d53e97f 100644 (file)
@@ -151,6 +151,8 @@ static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
 #ifdef CONFIG_PROC_SYSCTL
 static int proc_do_cad_pid(ctl_table *table, int write, struct file *filp,
                  void __user *buffer, size_t *lenp, loff_t *ppos);
+static int proc_dointvec_taint(ctl_table *table, int write, struct file *filp,
+                              void __user *buffer, size_t *lenp, loff_t *ppos);
 #endif
 
 static ctl_table root_table[];
@@ -174,6 +176,7 @@ extern ctl_table inotify_table[];
 int sysctl_legacy_va_layout;
 #endif
 
+
 static void *get_uts(ctl_table *table, int write)
 {
        char *which = table->data;
@@ -344,14 +347,16 @@ static ctl_table kern_table[] = {
                .proc_handler   = &proc_dostring,
                .strategy       = &sysctl_string,
        },
+#ifdef CONFIG_PROC_SYSCTL
        {
                .ctl_name       = KERN_TAINTED,
                .procname       = "tainted",
                .data           = &tainted,
                .maxlen         = sizeof(int),
-               .mode           = 0444,
-               .proc_handler   = &proc_dointvec,
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_taint,
        },
+#endif
        {
                .ctl_name       = KERN_CAP_BSET,
                .procname       = "cap-bound",
@@ -1681,13 +1686,12 @@ static int _proc_do_string(void* data, int maxlen, int write,
        size_t len;
        char __user *p;
        char c;
-       
-       if (!data || !maxlen || !*lenp ||
-           (*ppos && !write)) {
+
+       if (!data || !maxlen || !*lenp) {
                *lenp = 0;
                return 0;
        }
-       
+
        if (write) {
                len = 0;
                p = buffer;
@@ -1708,6 +1712,15 @@ static int _proc_do_string(void* data, int maxlen, int write,
                len = strlen(data);
                if (len > maxlen)
                        len = maxlen;
+
+               if (*ppos > len) {
+                       *lenp = 0;
+                       return 0;
+               }
+
+               data += *ppos;
+               len  -= *ppos;
+
                if (len > *lenp)
                        len = *lenp;
                if (len)
@@ -1927,6 +1940,7 @@ int proc_dointvec(ctl_table *table, int write, struct file *filp,
 
 #define OP_SET 0
 #define OP_AND 1
+#define OP_OR  2
 
 static int do_proc_dointvec_bset_conv(int *negp, unsigned long *lvalp,
                                      int *valp,
@@ -1938,6 +1952,7 @@ static int do_proc_dointvec_bset_conv(int *negp, unsigned long *lvalp,
                switch(op) {
                case OP_SET:    *valp = val; break;
                case OP_AND:    *valp &= val; break;
+               case OP_OR:     *valp |= val; break;
                }
        } else {
                int val = *valp;
@@ -1961,7 +1976,7 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp,
 {
        int op;
 
-       if (!capable(CAP_SYS_MODULE)) {
+       if (write && !capable(CAP_SYS_MODULE)) {
                return -EPERM;
        }
 
@@ -1970,6 +1985,22 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp,
                                do_proc_dointvec_bset_conv,&op);
 }
 
+/*
+ *     Taint values can only be increased
+ */
+static int proc_dointvec_taint(ctl_table *table, int write, struct file *filp,
+                              void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+       int op;
+
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
+
+       op = OP_OR;
+       return do_proc_dointvec(table,write,filp,buffer,lenp,ppos,
+                               do_proc_dointvec_bset_conv,&op);
+}
+
 struct do_proc_dointvec_minmax_conv_param {
        int *min;
        int *max;
@@ -2553,17 +2584,23 @@ int sysctl_jiffies(ctl_table *table, int __user *name, int nlen,
                void __user *oldval, size_t __user *oldlenp,
                void __user *newval, size_t newlen)
 {
-       if (oldval) {
+       if (oldval && oldlenp) {
                size_t olen;
-               if (oldlenp) { 
-                       if (get_user(olen, oldlenp))
+
+               if (get_user(olen, oldlenp))
+                       return -EFAULT;
+               if (olen) {
+                       int val;
+
+                       if (olen < sizeof(int))
+                               return -EINVAL;
+
+                       val = *(int *)(table->data) / HZ;
+                       if (put_user(val, (int __user *)oldval))
+                               return -EFAULT;
+                       if (put_user(sizeof(int), oldlenp))
                                return -EFAULT;
-                       if (olen!=sizeof(int))
-                               return -EINVAL; 
                }
-               if (put_user(*(int *)(table->data)/HZ, (int __user *)oldval) ||
-                   (oldlenp && put_user(sizeof(int),oldlenp)))
-                       return -EFAULT;
        }
        if (newval && newlen) { 
                int new;
@@ -2581,17 +2618,23 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen,
                void __user *oldval, size_t __user *oldlenp,
                void __user *newval, size_t newlen)
 {
-       if (oldval) {
+       if (oldval && oldlenp) {
                size_t olen;
-               if (oldlenp) { 
-                       if (get_user(olen, oldlenp))
+
+               if (get_user(olen, oldlenp))
+                       return -EFAULT;
+               if (olen) {
+                       int val;
+
+                       if (olen < sizeof(int))
+                               return -EINVAL;
+
+                       val = jiffies_to_msecs(*(int *)(table->data));
+                       if (put_user(val, (int __user *)oldval))
+                               return -EFAULT;
+                       if (put_user(sizeof(int), oldlenp))
                                return -EFAULT;
-                       if (olen!=sizeof(int))
-                               return -EINVAL; 
                }
-               if (put_user(jiffies_to_msecs(*(int *)(table->data)), (int __user *)oldval) ||
-                   (oldlenp && put_user(sizeof(int),oldlenp)))
-                       return -EFAULT;
        }
        if (newval && newlen) { 
                int new;
@@ -2732,12 +2775,14 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
 {
        return -ENOSYS;
 }
+#ifdef CONFIG_SYSVIPC
 static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
                void __user *oldval, size_t __user *oldlenp,
                void __user *newval, size_t newlen)
 {
        return -ENOSYS;
 }
+#endif
 #endif /* CONFIG_SYSCTL_SYSCALL */
 
 /*
index 22504afc0d34b48bf10e216c72b33c3be4470598..d9ef176c4e092eebf93acc31dd14dcbd362603c0 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/sysdev.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */
 
 /* XXX - Would like a better way for initializing curr_clocksource */
 extern struct clocksource clocksource_jiffies;
index c2a8ccfc288210fb45a3ae199c94572edbbc72b4..8533c379608281070f7d74c6afcef953ccfd4327 100644 (file)
@@ -85,7 +85,7 @@ static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = &boot_tvec_bases;
  * @j: the time in (absolute) jiffies that should be rounded
  * @cpu: the processor number on which the timeout will happen
  *
- * __round_jiffies rounds an absolute time in the future (in jiffies)
+ * __round_jiffies() rounds an absolute time in the future (in jiffies)
  * up or down to (approximately) full seconds. This is useful for timers
  * for which the exact time they fire does not matter too much, as long as
  * they fire approximately every X seconds.
@@ -98,7 +98,7 @@ static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = &boot_tvec_bases;
  * processors firing at the exact same time, which could lead
  * to lock contention or spurious cache line bouncing.
  *
- * The return value is the rounded version of the "j" parameter.
+ * The return value is the rounded version of the @j parameter.
  */
 unsigned long __round_jiffies(unsigned long j, int cpu)
 {
@@ -142,7 +142,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies);
  * @j: the time in (relative) jiffies that should be rounded
  * @cpu: the processor number on which the timeout will happen
  *
- * __round_jiffies_relative rounds a time delta  in the future (in jiffies)
+ * __round_jiffies_relative() rounds a time delta  in the future (in jiffies)
  * up or down to (approximately) full seconds. This is useful for timers
  * for which the exact time they fire does not matter too much, as long as
  * they fire approximately every X seconds.
@@ -155,7 +155,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies);
  * processors firing at the exact same time, which could lead
  * to lock contention or spurious cache line bouncing.
  *
- * The return value is the rounded version of the "j" parameter.
+ * The return value is the rounded version of the @j parameter.
  */
 unsigned long __round_jiffies_relative(unsigned long j, int cpu)
 {
@@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies_relative);
  * round_jiffies - function to round jiffies to a full second
  * @j: the time in (absolute) jiffies that should be rounded
  *
- * round_jiffies rounds an absolute time in the future (in jiffies)
+ * round_jiffies() rounds an absolute time in the future (in jiffies)
  * up or down to (approximately) full seconds. This is useful for timers
  * for which the exact time they fire does not matter too much, as long as
  * they fire approximately every X seconds.
@@ -182,7 +182,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies_relative);
  * at the same time, rather than at various times spread out. The goal
  * of this is to have the CPU wake up less, which saves power.
  *
- * The return value is the rounded version of the "j" parameter.
+ * The return value is the rounded version of the @j parameter.
  */
 unsigned long round_jiffies(unsigned long j)
 {
@@ -194,7 +194,7 @@ EXPORT_SYMBOL_GPL(round_jiffies);
  * round_jiffies_relative - function to round jiffies to a full second
  * @j: the time in (relative) jiffies that should be rounded
  *
- * round_jiffies_relative rounds a time delta  in the future (in jiffies)
+ * round_jiffies_relative() rounds a time delta  in the future (in jiffies)
  * up or down to (approximately) full seconds. This is useful for timers
  * for which the exact time they fire does not matter too much, as long as
  * they fire approximately every X seconds.
@@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(round_jiffies);
  * at the same time, rather than at various times spread out. The goal
  * of this is to have the CPU wake up less, which saves power.
  *
- * The return value is the rounded version of the "j" parameter.
+ * The return value is the rounded version of the @j parameter.
  */
 unsigned long round_jiffies_relative(unsigned long j)
 {
@@ -387,7 +387,7 @@ void add_timer_on(struct timer_list *timer, int cpu)
  * @timer: the timer to be modified
  * @expires: new timeout in jiffies
  *
- * mod_timer is a more efficient way to update the expire field of an
+ * mod_timer() is a more efficient way to update the expire field of an
  * active timer (if the timer is inactive it will be activated)
  *
  * mod_timer(timer, expires) is equivalent to:
@@ -490,7 +490,7 @@ out:
  * the timer it also makes sure the handler has finished executing on other
  * CPUs.
  *
- * Synchronization rules: callers must prevent restarting of the timer,
+ * Synchronization rules: Callers must prevent restarting of the timer,
  * otherwise this function is meaningless. It must not be called from
  * interrupt contexts. The caller must not hold locks which would prevent
  * completion of the timer's handler. The timer's handler must not call
@@ -1392,17 +1392,16 @@ asmlinkage long sys_gettid(void)
 }
 
 /**
- * sys_sysinfo - fill in sysinfo struct
+ * do_sysinfo - fill in sysinfo struct
  * @info: pointer to buffer to fill
  */ 
-asmlinkage long sys_sysinfo(struct sysinfo __user *info)
+int do_sysinfo(struct sysinfo *info)
 {
-       struct sysinfo val;
        unsigned long mem_total, sav_total;
        unsigned int mem_unit, bitcount;
        unsigned long seq;
 
-       memset((char *)&val, 0, sizeof(struct sysinfo));
+       memset(info, 0, sizeof(struct sysinfo));
 
        do {
                struct timespec tp;
@@ -1422,17 +1421,17 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info)
                        tp.tv_nsec = tp.tv_nsec - NSEC_PER_SEC;
                        tp.tv_sec++;
                }
-               val.uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
+               info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
 
-               val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
-               val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
-               val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
+               info->loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
+               info->loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
+               info->loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
 
-               val.procs = nr_threads;
+               info->procs = nr_threads;
        } while (read_seqretry(&xtime_lock, seq));
 
-       si_meminfo(&val);
-       si_swapinfo(&val);
+       si_meminfo(info);
+       si_swapinfo(info);
 
        /*
         * If the sum of all the available memory (i.e. ram + swap)
@@ -1443,11 +1442,11 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info)
         *  -Erik Andersen <andersee@debian.org>
         */
 
-       mem_total = val.totalram + val.totalswap;
-       if (mem_total < val.totalram || mem_total < val.totalswap)
+       mem_total = info->totalram + info->totalswap;
+       if (mem_total < info->totalram || mem_total < info->totalswap)
                goto out;
        bitcount = 0;
-       mem_unit = val.mem_unit;
+       mem_unit = info->mem_unit;
        while (mem_unit > 1) {
                bitcount++;
                mem_unit >>= 1;
@@ -1459,22 +1458,31 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info)
 
        /*
         * If mem_total did not overflow, multiply all memory values by
-        * val.mem_unit and set it to 1.  This leaves things compatible
+        * info->mem_unit and set it to 1.  This leaves things compatible
         * with 2.2.x, and also retains compatibility with earlier 2.4.x
         * kernels...
         */
 
-       val.mem_unit = 1;
-       val.totalram <<= bitcount;
-       val.freeram <<= bitcount;
-       val.sharedram <<= bitcount;
-       val.bufferram <<= bitcount;
-       val.totalswap <<= bitcount;
-       val.freeswap <<= bitcount;
-       val.totalhigh <<= bitcount;
-       val.freehigh <<= bitcount;
+       info->mem_unit = 1;
+       info->totalram <<= bitcount;
+       info->freeram <<= bitcount;
+       info->sharedram <<= bitcount;
+       info->bufferram <<= bitcount;
+       info->totalswap <<= bitcount;
+       info->freeswap <<= bitcount;
+       info->totalhigh <<= bitcount;
+       info->freehigh <<= bitcount;
+
+out:
+       return 0;
+}
+
+asmlinkage long sys_sysinfo(struct sysinfo __user *info)
+{
+       struct sysinfo val;
+
+       do_sysinfo(&val);
 
- out:
        if (copy_to_user(info, &val, sizeof(struct sysinfo)))
                return -EFAULT;
 
@@ -1624,7 +1632,7 @@ struct time_interpolator *time_interpolator __read_mostly;
 static struct time_interpolator *time_interpolator_list __read_mostly;
 static DEFINE_SPINLOCK(time_interpolator_lock);
 
-static inline u64 time_interpolator_get_cycles(unsigned int src)
+static inline cycles_t time_interpolator_get_cycles(unsigned int src)
 {
        unsigned long (*x)(void);
 
@@ -1650,8 +1658,8 @@ static inline u64 time_interpolator_get_counter(int writelock)
 
        if (time_interpolator->jitter)
        {
-               u64 lcycle;
-               u64 now;
+               cycles_t lcycle;
+               cycles_t now;
 
                do {
                        lcycle = time_interpolator->last_cycle;
index a3da07c5af2835f57f094cddd20e731a8a77bdb5..020d1fff57dce7839735bf7df6362a57ff747b55 100644 (file)
@@ -656,8 +656,7 @@ void flush_scheduled_work(void)
 EXPORT_SYMBOL(flush_scheduled_work);
 
 /**
- * cancel_rearming_delayed_workqueue - reliably kill off a delayed
- *                     work whose handler rearms the delayed work.
+ * cancel_rearming_delayed_workqueue - reliably kill off a delayed work whose handler rearms the delayed work.
  * @wq:   the controlling workqueue structure
  * @dwork: the delayed work struct
  */
@@ -670,8 +669,7 @@ void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
 EXPORT_SYMBOL(cancel_rearming_delayed_workqueue);
 
 /**
- * cancel_rearming_delayed_work - reliably kill off a delayed keventd
- *                     work whose handler rearms the delayed work.
+ * cancel_rearming_delayed_work - reliably kill off a delayed keventd work whose handler rearms the delayed work.
  * @dwork: the delayed work struct
  */
 void cancel_rearming_delayed_work(struct delayed_work *dwork)
index 9b03581cdecb3d746186e1c0fa1ab2685cdbcfcc..384249915047f0e28f8f82c10caa6b9795f4fb3b 100644 (file)
@@ -101,9 +101,14 @@ config TEXTSEARCH_FSM
 config PLIST
        boolean
 
-config IOMAP_COPY
+config HAS_IOMEM
        boolean
-       depends on !UML
+       depends on !NO_IOMEM
+       default y
+
+config HAS_IOPORT
+       boolean
+       depends on HAS_IOMEM && !NO_IOPORT
        default y
 
 endmenu
index 5c2681875b9ac31b1a363c63d909120cbc82b930..356a5ab8279c397db62fbf20951b8af94b1e9ae8 100644 (file)
@@ -181,19 +181,11 @@ config DEBUG_MUTEXES
         This feature allows mutex semantics violations to be detected and
         reported.
 
-config DEBUG_RWSEMS
-       bool "RW-sem debugging: basic checks"
-       depends on DEBUG_KERNEL
-       help
-        This feature allows read-write semaphore semantics violations to
-        be detected and reported.
-
 config DEBUG_LOCK_ALLOC
        bool "Lock debugging: detect incorrect freeing of live locks"
        depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
        select DEBUG_SPINLOCK
        select DEBUG_MUTEXES
-       select DEBUG_RWSEMS
        select LOCKDEP
        help
         This feature will check whether any held lock (spinlock, rwlock,
@@ -209,7 +201,6 @@ config PROVE_LOCKING
        select LOCKDEP
        select DEBUG_SPINLOCK
        select DEBUG_MUTEXES
-       select DEBUG_RWSEMS
        select DEBUG_LOCK_ALLOC
        default n
        help
index 3b605da448f4548719503f89a80e73ce788dd4b6..992a39ef9ffd2167ac3a7e63dabefcf1715a5edb 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 lib-y := ctype.o string.o vsprintf.o cmdline.o \
-        bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
+        rbtree.o radix-tree.o dump_stack.o \
         idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \
         sha1.o irq_regs.o reciprocal_div.o
 
@@ -12,14 +12,15 @@ lib-$(CONFIG_SMP) += cpumask.o
 
 lib-y  += kobject.o kref.o kobject_uevent.o klist.o
 
-obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o iomap.o
+obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o bust_spinlocks.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
 CFLAGS_kobject_uevent.o += -DDEBUG
 endif
 
-obj-$(CONFIG_IOMAP_COPY) += iomap_copy.o
+obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
+obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
index 037fa9aa2ed77f554296c7f1f4b64f769fdd2a73..ee6e58fce8f75f675c2688294b07e01655a4396e 100644 (file)
@@ -95,7 +95,7 @@ void __bitmap_complement(unsigned long *dst, const unsigned long *src, int bits)
 }
 EXPORT_SYMBOL(__bitmap_complement);
 
-/*
+/**
  * __bitmap_shift_right - logical right shift of the bits in a bitmap
  *   @dst - destination bitmap
  *   @src - source bitmap
@@ -139,7 +139,7 @@ void __bitmap_shift_right(unsigned long *dst,
 EXPORT_SYMBOL(__bitmap_shift_right);
 
 
-/*
+/**
  * __bitmap_shift_left - logical left shift of the bits in a bitmap
  *   @dst - destination bitmap
  *   @src - source bitmap
@@ -529,7 +529,7 @@ int bitmap_parselist(const char *bp, unsigned long *maskp, int nmaskbits)
 }
 EXPORT_SYMBOL(bitmap_parselist);
 
-/*
+/**
  * bitmap_pos_to_ord(buf, pos, bits)
  *     @buf: pointer to a bitmap
  *     @pos: a bit position in @buf (0 <= @pos < @bits)
@@ -804,7 +804,7 @@ EXPORT_SYMBOL(bitmap_find_free_region);
  *     @pos: beginning of bit region to release
  *     @order: region size (log base 2 of number of bits) to release
  *
- * This is the complement to __bitmap_find_free_region and releases
+ * This is the complement to __bitmap_find_free_region() and releases
  * the found region (by clearing it in the bitmap).
  *
  * No return value.
index a2055bc3ef623d1b2f4659bdbd7dfe729ae47aa6..accb3565816993630ab98bc7818f3afe75307fa5 100644 (file)
 #include <linux/vt_kern.h>
 
 
-void bust_spinlocks(int yes)
+void __attribute__((weak)) bust_spinlocks(int yes)
 {
        if (yes) {
                oops_in_progress = 1;
        } else {
-               int loglevel_save = console_loglevel;
 #ifdef CONFIG_VT
                unblank_screen();
 #endif
                oops_in_progress = 0;
-               /*
-                * OK, the message is on the console.  Now we call printk()
-                * without oops_in_progress set so that printk() will give klogd
-                * and the blanked console a poke.  Hold onto your hats...
-                */
-               console_loglevel = 15;          /* NMI oopser may have shut the console up */
-               printk(" ");
-               console_loglevel = loglevel_save;
+               wake_up_klogd();
        }
 }
 
index 8a5b5303bd4f7a78187b4138eb08945c6333c10c..f596c08d213a0726c5f395209a3e20d730c3ea2c 100644 (file)
@@ -43,10 +43,10 @@ static int get_range(char **str, int *pint)
  *     comma as well.
  *
  *     Return values:
- *     0 : no int in string
- *     1 : int found, no subsequent comma
- *     2 : int found including a subsequent comma
- *     3 : hyphen found to denote a range
+ *     0 - no int in string
+ *     1 - int found, no subsequent comma
+ *     2 - int found including a subsequent comma
+ *     3 - hyphen found to denote a range
  */
 
 int get_option (char **str, int *pint)
diff --git a/lib/devres.c b/lib/devres.c
new file mode 100644 (file)
index 0000000..2a668dd
--- /dev/null
@@ -0,0 +1,300 @@
+#include <linux/pci.h>
+#include <linux/io.h>
+#include <linux/module.h>
+
+static void devm_ioremap_release(struct device *dev, void *res)
+{
+       iounmap(*(void __iomem **)res);
+}
+
+static int devm_ioremap_match(struct device *dev, void *res, void *match_data)
+{
+       return *(void **)res == match_data;
+}
+
+/**
+ * devm_ioremap - Managed ioremap()
+ * @dev: Generic device to remap IO address for
+ * @offset: BUS offset to map
+ * @size: Size of map
+ *
+ * Managed ioremap().  Map is automatically unmapped on driver detach.
+ */
+void __iomem *devm_ioremap(struct device *dev, unsigned long offset,
+                          unsigned long size)
+{
+       void __iomem **ptr, *addr;
+
+       ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL);
+       if (!ptr)
+               return NULL;
+
+       addr = ioremap(offset, size);
+       if (addr) {
+               *ptr = addr;
+               devres_add(dev, ptr);
+       } else
+               devres_free(ptr);
+
+       return addr;
+}
+EXPORT_SYMBOL(devm_ioremap);
+
+/**
+ * devm_ioremap_nocache - Managed ioremap_nocache()
+ * @dev: Generic device to remap IO address for
+ * @offset: BUS offset to map
+ * @size: Size of map
+ *
+ * Managed ioremap_nocache().  Map is automatically unmapped on driver
+ * detach.
+ */
+void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset,
+                                  unsigned long size)
+{
+       void __iomem **ptr, *addr;
+
+       ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL);
+       if (!ptr)
+               return NULL;
+
+       addr = ioremap_nocache(offset, size);
+       if (addr) {
+               *ptr = addr;
+               devres_add(dev, ptr);
+       } else
+               devres_free(ptr);
+
+       return addr;
+}
+EXPORT_SYMBOL(devm_ioremap_nocache);
+
+/**
+ * devm_iounmap - Managed iounmap()
+ * @dev: Generic device to unmap for
+ * @addr: Address to unmap
+ *
+ * Managed iounmap().  @addr must have been mapped using devm_ioremap*().
+ */
+void devm_iounmap(struct device *dev, void __iomem *addr)
+{
+       iounmap(addr);
+       WARN_ON(devres_destroy(dev, devm_ioremap_release, devm_ioremap_match,
+                              (void *)addr));
+}
+EXPORT_SYMBOL(devm_iounmap);
+
+#ifdef CONFIG_HAS_IOPORT
+/*
+ * Generic iomap devres
+ */
+static void devm_ioport_map_release(struct device *dev, void *res)
+{
+       ioport_unmap(*(void __iomem **)res);
+}
+
+static int devm_ioport_map_match(struct device *dev, void *res,
+                                void *match_data)
+{
+       return *(void **)res == match_data;
+}
+
+/**
+ * devm_ioport_map - Managed ioport_map()
+ * @dev: Generic device to map ioport for
+ * @port: Port to map
+ * @nr: Number of ports to map
+ *
+ * Managed ioport_map().  Map is automatically unmapped on driver
+ * detach.
+ */
+void __iomem * devm_ioport_map(struct device *dev, unsigned long port,
+                              unsigned int nr)
+{
+       void __iomem **ptr, *addr;
+
+       ptr = devres_alloc(devm_ioport_map_release, sizeof(*ptr), GFP_KERNEL);
+       if (!ptr)
+               return NULL;
+
+       addr = ioport_map(port, nr);
+       if (addr) {
+               *ptr = addr;
+               devres_add(dev, ptr);
+       } else
+               devres_free(ptr);
+
+       return addr;
+}
+EXPORT_SYMBOL(devm_ioport_map);
+
+/**
+ * devm_ioport_unmap - Managed ioport_unmap()
+ * @dev: Generic device to unmap for
+ * @addr: Address to unmap
+ *
+ * Managed ioport_unmap().  @addr must have been mapped using
+ * devm_ioport_map().
+ */
+void devm_ioport_unmap(struct device *dev, void __iomem *addr)
+{
+       ioport_unmap(addr);
+       WARN_ON(devres_destroy(dev, devm_ioport_map_release,
+                              devm_ioport_map_match, (void *)addr));
+}
+EXPORT_SYMBOL(devm_ioport_unmap);
+
+#ifdef CONFIG_PCI
+/*
+ * PCI iomap devres
+ */
+#define PCIM_IOMAP_MAX PCI_ROM_RESOURCE
+
+struct pcim_iomap_devres {
+       void __iomem *table[PCIM_IOMAP_MAX];
+};
+
+static void pcim_iomap_release(struct device *gendev, void *res)
+{
+       struct pci_dev *dev = container_of(gendev, struct pci_dev, dev);
+       struct pcim_iomap_devres *this = res;
+       int i;
+
+       for (i = 0; i < PCIM_IOMAP_MAX; i++)
+               if (this->table[i])
+                       pci_iounmap(dev, this->table[i]);
+}
+
+/**
+ * pcim_iomap_table - access iomap allocation table
+ * @pdev: PCI device to access iomap table for
+ *
+ * Access iomap allocation table for @dev.  If iomap table doesn't
+ * exist and @pdev is managed, it will be allocated.  All iomaps
+ * recorded in the iomap table are automatically unmapped on driver
+ * detach.
+ *
+ * This function might sleep when the table is first allocated but can
+ * be safely called without context and guaranteed to succed once
+ * allocated.
+ */
+void __iomem * const * pcim_iomap_table(struct pci_dev *pdev)
+{
+       struct pcim_iomap_devres *dr, *new_dr;
+
+       dr = devres_find(&pdev->dev, pcim_iomap_release, NULL, NULL);
+       if (dr)
+               return dr->table;
+
+       new_dr = devres_alloc(pcim_iomap_release, sizeof(*new_dr), GFP_KERNEL);
+       if (!new_dr)
+               return NULL;
+       dr = devres_get(&pdev->dev, new_dr, NULL, NULL);
+       return dr->table;
+}
+EXPORT_SYMBOL(pcim_iomap_table);
+
+/**
+ * pcim_iomap - Managed pcim_iomap()
+ * @pdev: PCI device to iomap for
+ * @bar: BAR to iomap
+ * @maxlen: Maximum length of iomap
+ *
+ * Managed pci_iomap().  Map is automatically unmapped on driver
+ * detach.
+ */
+void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen)
+{
+       void __iomem **tbl;
+
+       BUG_ON(bar >= PCIM_IOMAP_MAX);
+
+       tbl = (void __iomem **)pcim_iomap_table(pdev);
+       if (!tbl || tbl[bar])   /* duplicate mappings not allowed */
+               return NULL;
+
+       tbl[bar] = pci_iomap(pdev, bar, maxlen);
+       return tbl[bar];
+}
+EXPORT_SYMBOL(pcim_iomap);
+
+/**
+ * pcim_iounmap - Managed pci_iounmap()
+ * @pdev: PCI device to iounmap for
+ * @addr: Address to unmap
+ *
+ * Managed pci_iounmap().  @addr must have been mapped using pcim_iomap().
+ */
+void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr)
+{
+       void __iomem **tbl;
+       int i;
+
+       pci_iounmap(pdev, addr);
+
+       tbl = (void __iomem **)pcim_iomap_table(pdev);
+       BUG_ON(!tbl);
+
+       for (i = 0; i < PCIM_IOMAP_MAX; i++)
+               if (tbl[i] == addr) {
+                       tbl[i] = NULL;
+                       return;
+               }
+       WARN_ON(1);
+}
+EXPORT_SYMBOL(pcim_iounmap);
+
+/**
+ * pcim_iomap_regions - Request and iomap PCI BARs
+ * @pdev: PCI device to map IO resources for
+ * @mask: Mask of BARs to request and iomap
+ * @name: Name used when requesting regions
+ *
+ * Request and iomap regions specified by @mask.
+ */
+int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name)
+{
+       void __iomem * const *iomap;
+       int i, rc;
+
+       iomap = pcim_iomap_table(pdev);
+       if (!iomap)
+               return -ENOMEM;
+
+       for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+               unsigned long len;
+
+               if (!(mask & (1 << i)))
+                       continue;
+
+               rc = -EINVAL;
+               len = pci_resource_len(pdev, i);
+               if (!len)
+                       goto err_inval;
+
+               rc = pci_request_region(pdev, i, name);
+               if (rc)
+                       goto err_region;
+
+               rc = -ENOMEM;
+               if (!pcim_iomap(pdev, i, 0))
+                       goto err_iomap;
+       }
+
+       return 0;
+
+ err_iomap:
+       pcim_iounmap(pdev, iomap[i]);
+ err_region:
+       pci_release_region(pdev, i);
+ err_inval:
+       while (--i >= 0) {
+               pcim_iounmap(pdev, iomap[i]);
+               pci_release_region(pdev, i);
+       }
+
+       return rc;
+}
+EXPORT_SYMBOL(pcim_iomap_regions);
+#endif
+#endif
index 71853531d3b0f6be6c0db0420ca8d646dd884469..305117ca2d415a1adf91700fe34a06d88028de67 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -329,8 +329,8 @@ static void sub_remove(struct idr *idp, int shift, int id)
 
 /**
  * idr_remove - remove the given id and free it's slot
- * idp: idr handle
- * id: uniqueue key
+ * @idp: idr handle
+ * @id: unique key
  */
 void idr_remove(struct idr *idp, int id)
 {
index 4990c736bc4b6864df839b45b85dcfa8b3d361e2..4d43f37c01544de2b19e46bd259bdbe3fc5b7caf 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/pci.h>
 #include <linux/io.h>
 
-#ifdef CONFIG_GENERIC_IOMAP
 #include <linux/module.h>
 
 /*
@@ -256,298 +255,3 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
 }
 EXPORT_SYMBOL(pci_iomap);
 EXPORT_SYMBOL(pci_iounmap);
-
-#endif /* CONFIG_GENERIC_IOMAP */
-
-/*
- * Generic iomap devres
- */
-static void devm_ioport_map_release(struct device *dev, void *res)
-{
-       ioport_unmap(*(void __iomem **)res);
-}
-
-static int devm_ioport_map_match(struct device *dev, void *res,
-                                void *match_data)
-{
-       return *(void **)res == match_data;
-}
-
-/**
- * devm_ioport_map - Managed ioport_map()
- * @dev: Generic device to map ioport for
- * @port: Port to map
- * @nr: Number of ports to map
- *
- * Managed ioport_map().  Map is automatically unmapped on driver
- * detach.
- */
-void __iomem * devm_ioport_map(struct device *dev, unsigned long port,
-                              unsigned int nr)
-{
-       void __iomem **ptr, *addr;
-
-       ptr = devres_alloc(devm_ioport_map_release, sizeof(*ptr), GFP_KERNEL);
-       if (!ptr)
-               return NULL;
-
-       addr = ioport_map(port, nr);
-       if (addr) {
-               *ptr = addr;
-               devres_add(dev, ptr);
-       } else
-               devres_free(ptr);
-
-       return addr;
-}
-EXPORT_SYMBOL(devm_ioport_map);
-
-/**
- * devm_ioport_unmap - Managed ioport_unmap()
- * @dev: Generic device to unmap for
- * @addr: Address to unmap
- *
- * Managed ioport_unmap().  @addr must have been mapped using
- * devm_ioport_map().
- */
-void devm_ioport_unmap(struct device *dev, void __iomem *addr)
-{
-       ioport_unmap(addr);
-       WARN_ON(devres_destroy(dev, devm_ioport_map_release,
-                              devm_ioport_map_match, (void *)addr));
-}
-EXPORT_SYMBOL(devm_ioport_unmap);
-
-static void devm_ioremap_release(struct device *dev, void *res)
-{
-       iounmap(*(void __iomem **)res);
-}
-
-static int devm_ioremap_match(struct device *dev, void *res, void *match_data)
-{
-       return *(void **)res == match_data;
-}
-
-/**
- * devm_ioremap - Managed ioremap()
- * @dev: Generic device to remap IO address for
- * @offset: BUS offset to map
- * @size: Size of map
- *
- * Managed ioremap().  Map is automatically unmapped on driver detach.
- */
-void __iomem *devm_ioremap(struct device *dev, unsigned long offset,
-                          unsigned long size)
-{
-       void __iomem **ptr, *addr;
-
-       ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL);
-       if (!ptr)
-               return NULL;
-
-       addr = ioremap(offset, size);
-       if (addr) {
-               *ptr = addr;
-               devres_add(dev, ptr);
-       } else
-               devres_free(ptr);
-
-       return addr;
-}
-EXPORT_SYMBOL(devm_ioremap);
-
-/**
- * devm_ioremap_nocache - Managed ioremap_nocache()
- * @dev: Generic device to remap IO address for
- * @offset: BUS offset to map
- * @size: Size of map
- *
- * Managed ioremap_nocache().  Map is automatically unmapped on driver
- * detach.
- */
-void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset,
-                                  unsigned long size)
-{
-       void __iomem **ptr, *addr;
-
-       ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL);
-       if (!ptr)
-               return NULL;
-
-       addr = ioremap_nocache(offset, size);
-       if (addr) {
-               *ptr = addr;
-               devres_add(dev, ptr);
-       } else
-               devres_free(ptr);
-
-       return addr;
-}
-EXPORT_SYMBOL(devm_ioremap_nocache);
-
-/**
- * devm_iounmap - Managed iounmap()
- * @dev: Generic device to unmap for
- * @addr: Address to unmap
- *
- * Managed iounmap().  @addr must have been mapped using devm_ioremap*().
- */
-void devm_iounmap(struct device *dev, void __iomem *addr)
-{
-       iounmap(addr);
-       WARN_ON(devres_destroy(dev, devm_ioremap_release, devm_ioremap_match,
-                              (void *)addr));
-}
-EXPORT_SYMBOL(devm_iounmap);
-
-/*
- * PCI iomap devres
- */
-#define PCIM_IOMAP_MAX PCI_ROM_RESOURCE
-
-struct pcim_iomap_devres {
-       void __iomem *table[PCIM_IOMAP_MAX];
-};
-
-static void pcim_iomap_release(struct device *gendev, void *res)
-{
-       struct pci_dev *dev = container_of(gendev, struct pci_dev, dev);
-       struct pcim_iomap_devres *this = res;
-       int i;
-
-       for (i = 0; i < PCIM_IOMAP_MAX; i++)
-               if (this->table[i])
-                       pci_iounmap(dev, this->table[i]);
-}
-
-/**
- * pcim_iomap_table - access iomap allocation table
- * @pdev: PCI device to access iomap table for
- *
- * Access iomap allocation table for @dev.  If iomap table doesn't
- * exist and @pdev is managed, it will be allocated.  All iomaps
- * recorded in the iomap table are automatically unmapped on driver
- * detach.
- *
- * This function might sleep when the table is first allocated but can
- * be safely called without context and guaranteed to succed once
- * allocated.
- */
-void __iomem * const * pcim_iomap_table(struct pci_dev *pdev)
-{
-       struct pcim_iomap_devres *dr, *new_dr;
-
-       dr = devres_find(&pdev->dev, pcim_iomap_release, NULL, NULL);
-       if (dr)
-               return dr->table;
-
-       new_dr = devres_alloc(pcim_iomap_release, sizeof(*new_dr), GFP_KERNEL);
-       if (!new_dr)
-               return NULL;
-       dr = devres_get(&pdev->dev, new_dr, NULL, NULL);
-       return dr->table;
-}
-EXPORT_SYMBOL(pcim_iomap_table);
-
-/**
- * pcim_iomap - Managed pcim_iomap()
- * @pdev: PCI device to iomap for
- * @bar: BAR to iomap
- * @maxlen: Maximum length of iomap
- *
- * Managed pci_iomap().  Map is automatically unmapped on driver
- * detach.
- */
-void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen)
-{
-       void __iomem **tbl;
-
-       BUG_ON(bar >= PCIM_IOMAP_MAX);
-
-       tbl = (void __iomem **)pcim_iomap_table(pdev);
-       if (!tbl || tbl[bar])   /* duplicate mappings not allowed */
-               return NULL;
-
-       tbl[bar] = pci_iomap(pdev, bar, maxlen);
-       return tbl[bar];
-}
-EXPORT_SYMBOL(pcim_iomap);
-
-/**
- * pcim_iounmap - Managed pci_iounmap()
- * @pdev: PCI device to iounmap for
- * @addr: Address to unmap
- *
- * Managed pci_iounmap().  @addr must have been mapped using pcim_iomap().
- */
-void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr)
-{
-       void __iomem **tbl;
-       int i;
-
-       pci_iounmap(pdev, addr);
-
-       tbl = (void __iomem **)pcim_iomap_table(pdev);
-       BUG_ON(!tbl);
-
-       for (i = 0; i < PCIM_IOMAP_MAX; i++)
-               if (tbl[i] == addr) {
-                       tbl[i] = NULL;
-                       return;
-               }
-       WARN_ON(1);
-}
-EXPORT_SYMBOL(pcim_iounmap);
-
-/**
- * pcim_iomap_regions - Request and iomap PCI BARs
- * @pdev: PCI device to map IO resources for
- * @mask: Mask of BARs to request and iomap
- * @name: Name used when requesting regions
- *
- * Request and iomap regions specified by @mask.
- */
-int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name)
-{
-       void __iomem * const *iomap;
-       int i, rc;
-
-       iomap = pcim_iomap_table(pdev);
-       if (!iomap)
-               return -ENOMEM;
-
-       for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
-               unsigned long len;
-
-               if (!(mask & (1 << i)))
-                       continue;
-
-               rc = -EINVAL;
-               len = pci_resource_len(pdev, i);
-               if (!len)
-                       goto err_inval;
-
-               rc = pci_request_region(pdev, i, name);
-               if (rc)
-                       goto err_region;
-
-               rc = -ENOMEM;
-               if (!pcim_iomap(pdev, i, 0))
-                       goto err_iomap;
-       }
-
-       return 0;
-
- err_iomap:
-       pcim_iounmap(pdev, iomap[i]);
- err_region:
-       pci_release_region(pdev, i);
- err_inval:
-       while (--i >= 0) {
-               pcim_iounmap(pdev, iomap[i]);
-               pci_release_region(pdev, i);
-       }
-
-       return rc;
-}
-EXPORT_SYMBOL(pcim_iomap_regions);
index c2917ffe8bf11a024c34eb8729a9e87872bcfb5d..2782f49e906ec3e2315028041ca54681239e55a7 100644 (file)
@@ -97,11 +97,12 @@ static void fill_kobj_path(struct kobject *kobj, char *path, int length)
 }
 
 /**
- * kobject_get_path - generate and return the path associated with a given kobj
- * and kset pair.  The result must be freed by the caller with kfree().
+ * kobject_get_path - generate and return the path associated with a given kobj and kset pair.
  *
  * @kobj:      kobject in question, with which to build the path
  * @gfp_mask:  the allocation type used to allocate the path
+ *
+ * The result must be freed by the caller with kfree().
  */
 char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask)
 {
index 1cdabe3065f932d1edde271b2421ce6844ccb84c..4c45fd50e91367041d825a1146291a829b900eff 100644 (file)
@@ -20,8 +20,8 @@
 #define K3  0x8F1BBCDCL                        /* Rounds 40-59: sqrt(5) * 2^30 */
 #define K4  0xCA62C1D6L                        /* Rounds 60-79: sqrt(10) * 2^30 */
 
-/*
- * sha_transform: single block SHA1 transform
+/**
+ * sha_transform - single block SHA1 transform
  *
  * @digest: 160 bit digest to update
  * @data:   512 bits of data to hash
@@ -80,9 +80,8 @@ void sha_transform(__u32 *digest, const char *in, __u32 *W)
 }
 EXPORT_SYMBOL(sha_transform);
 
-/*
- * sha_init: initialize the vectors for a SHA1 digest
- *
+/**
+ * sha_init - initialize the vectors for a SHA1 digest
  * @buf: vector to initialize
  */
 void sha_init(__u32 *buf)
index 488788b341cb01960b92163b9326ec85c2a33445..961567894d16b89a208244ea957e44a3d9afd668 100644 (file)
@@ -27,7 +27,7 @@ static void generic_swap(void *a, void *b, int size)
        } while (--size > 0);
 }
 
-/*
+/**
  * sort - sort an array of elements
  * @base: pointer to data to sort
  * @num: number of elements
index a485d75962af5f7a6bbb4f819aa780c812fe25ca..bab440fb0dfcb99dfe46453350f7b6e9298c89eb 100644 (file)
@@ -160,7 +160,7 @@ EXPORT_SYMBOL(strcat);
  * @src: The string to append to it
  * @count: The maximum numbers of bytes to copy
  *
- * Note that in contrast to strncpy, strncat ensures the result is
+ * Note that in contrast to strncpy(), strncat() ensures the result is
  * terminated.
  */
 char *strncat(char *dest, const char *src, size_t count)
@@ -366,8 +366,7 @@ EXPORT_SYMBOL(strnlen);
 
 #ifndef __HAVE_ARCH_STRSPN
 /**
- * strspn - Calculate the length of the initial substring of @s which only
- *     contain letters in @accept
+ * strspn - Calculate the length of the initial substring of @s which only contain letters in @accept
  * @s: The string to be searched
  * @accept: The string to search for
  */
@@ -394,8 +393,7 @@ EXPORT_SYMBOL(strspn);
 
 #ifndef __HAVE_ARCH_STRCSPN
 /**
- * strcspn - Calculate the length of the initial substring of @s which does
- *     not contain letters in @reject
+ * strcspn - Calculate the length of the initial substring of @s which does not contain letters in @reject
  * @s: The string to be searched
  * @reject: The string to avoid
  */
index 98bcadc0118523faeaf8443d4aeb248520c9798d..9e2a002c5b543305105c69a77410177882538b1b 100644 (file)
@@ -218,7 +218,7 @@ static unsigned int get_linear_data(unsigned int consumed, const u8 **dst,
  * Call textsearch_next() to retrieve subsequent matches.
  *
  * Returns the position of first occurrence of the pattern or
- * UINT_MAX if no occurrence was found.
+ * %UINT_MAX if no occurrence was found.
  */ 
 unsigned int textsearch_find_continuous(struct ts_config *conf,
                                        struct ts_state *state,
index bed7229378f2da073be0c25eda0a30bf07146380..44f0e339a9474cd9499d13177a8ae823a172951f 100644 (file)
@@ -247,12 +247,12 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i
  * be generated for the given input, excluding the trailing
  * '\0', as per ISO C99. If you want to have the exact
  * number of characters written into @buf as return value
- * (not including the trailing '\0'), use vscnprintf. If the
+ * (not including the trailing '\0'), use vscnprintf(). If the
  * return is greater than or equal to @size, the resulting
  * string is truncated.
  *
  * Call this function if you are already dealing with a va_list.
- * You probably want snprintf instead.
+ * You probably want snprintf() instead.
  */
 int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
 {
@@ -509,7 +509,7 @@ EXPORT_SYMBOL(vsnprintf);
  * returns 0.
  *
  * Call this function if you are already dealing with a va_list.
- * You probably want scnprintf instead.
+ * You probably want scnprintf() instead.
  */
 int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
 {
@@ -577,11 +577,11 @@ EXPORT_SYMBOL(scnprintf);
  * @args: Arguments for the format string
  *
  * The function returns the number of characters written
- * into @buf. Use vsnprintf or vscnprintf in order to avoid
+ * into @buf. Use vsnprintf() or vscnprintf() in order to avoid
  * buffer overflows.
  *
  * Call this function if you are already dealing with a va_list.
- * You probably want sprintf instead.
+ * You probably want sprintf() instead.
  */
 int vsprintf(char *buf, const char *fmt, va_list args)
 {
@@ -597,7 +597,7 @@ EXPORT_SYMBOL(vsprintf);
  * @...: Arguments for the format string
  *
  * The function returns the number of characters written
- * into @buf. Use snprintf or scnprintf in order to avoid
+ * into @buf. Use snprintf() or scnprintf() in order to avoid
  * buffer overflows.
  */
 int sprintf(char * buf, const char *fmt, ...)
index db7c55de92cdc2ded0583d1ccc5239bdb4828d00..7942b333e46cd46c11ac0f4a849c7b98efeee58e 100644 (file)
@@ -157,3 +157,9 @@ config RESOURCES_64BIT
        default 64BIT
        help
          This option allows memory and IO resources to be 64 bit.
+
+config ZONE_DMA_FLAG
+       int
+       default "0" if !ZONE_DMA
+       default "1"
+
index f30ef28405d34a4fbd6c81f096d1248ed84a6491..00414849a86712c40ce174c900fe9b67cc9eb096 100644 (file)
@@ -327,7 +327,7 @@ EXPORT_SYMBOL(sync_page_range);
  * @pos:       beginning offset in pages to write
  * @count:     number of bytes to write
  *
- * Note: Holding i_mutex across sync_page_range_nolock is not a good idea
+ * Note: Holding i_mutex across sync_page_range_nolock() is not a good idea
  * as it forces O_SYNC writers to different parts of the same file
  * to be serialised right until io completion.
  */
@@ -784,7 +784,7 @@ unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
  * @mapping: target address_space
  * @index: the page index
  *
- * Same as grab_cache_page, but do not wait if the page is unavailable.
+ * Same as grab_cache_page(), but do not wait if the page is unavailable.
  * This is intended for speculative data generators, where the data can
  * be regenerated if the page couldn't be grabbed.  This routine should
  * be safe to call while holding the lock for another page.
index 0206e7e5018c8998c87349706fe1fcfb5644933c..51e1c1995fec1d87a1e8e80d4518008d4ec4f4f1 100644 (file)
@@ -47,7 +47,8 @@ unsigned int nr_free_highpages (void)
        unsigned int pages = 0;
 
        for_each_online_pgdat(pgdat)
-               pages += pgdat->node_zones[ZONE_HIGHMEM].free_pages;
+               pages += zone_page_state(&pgdat->node_zones[ZONE_HIGHMEM],
+                       NR_FREE_PAGES);
 
        return pages;
 }
index ef09f0acb1d8efc25fed1a524cada7cab48d40ef..072c1135ad372f4f6dd5dc8931794db01a816fa7 100644 (file)
@@ -678,7 +678,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
                                if (pte_dirty(ptent))
                                        set_page_dirty(page);
                                if (pte_young(ptent))
-                                       mark_page_accessed(page);
+                                       SetPageReferenced(page);
                                file_rss--;
                        }
                        page_remove_rmap(page, vma);
@@ -1531,8 +1531,6 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
                        if (vma->vm_ops->page_mkwrite(vma, old_page) < 0)
                                goto unwritable_page;
 
-                       page_cache_release(old_page);
-
                        /*
                         * Since we dropped the lock we need to revalidate
                         * the PTE as someone else may have changed it.  If
@@ -1541,6 +1539,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
                         */
                        page_table = pte_offset_map_lock(mm, pmd, address,
                                                         &ptl);
+                       page_cache_release(old_page);
                        if (!pte_same(*page_table, orig_pte))
                                goto unlock;
                }
@@ -1776,9 +1775,7 @@ restart:
 }
 
 /**
- * unmap_mapping_range - unmap the portion of all mmaps
- * in the specified address_space corresponding to the specified
- * page range in the underlying file.
+ * unmap_mapping_range - unmap the portion of all mmaps in the specified address_space corresponding to the specified page range in the underlying file.
  * @mapping: the address space containing mmaps to be unmapped.
  * @holebegin: byte in first page to unmap, relative to the start of
  * the underlying file.  This will be rounded down to a PAGE_SIZE
index c2aec0e1090d03d540dc43d5b35388b044679c81..259a706bd83ec5d3392b37dcf093b2c3ec953145 100644 (file)
@@ -105,7 +105,7 @@ static struct kmem_cache *sn_cache;
 
 /* Highest zone. An specific allocation for a zone below that is not
    policied. */
-enum zone_type policy_zone = ZONE_DMA;
+enum zone_type policy_zone = 0;
 
 struct mempolicy default_policy = {
        .refcnt = ATOMIC_INIT(1), /* never free it */
index ccd8cb8cd41f59fc19e2198bfb2862ad72d62ff9..cc1ca86dfc2496b6e0cae7703d4a6dc4f4f97150 100644 (file)
@@ -46,9 +46,9 @@ static void free_pool(mempool_t *pool)
  * @pool_data: optional private data available to the user-defined functions.
  *
  * this function creates and allocates a guaranteed size, preallocated
- * memory pool. The pool can be used from the mempool_alloc and mempool_free
+ * memory pool. The pool can be used from the mempool_alloc() and mempool_free()
  * functions. This function might sleep. Both the alloc_fn() and the free_fn()
- * functions might sleep - as long as the mempool_alloc function is not called
+ * functions might sleep - as long as the mempool_alloc() function is not called
  * from IRQ contexts.
  */
 mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
@@ -195,7 +195,7 @@ EXPORT_SYMBOL(mempool_destroy);
  *             mempool_create().
  * @gfp_mask:  the usual allocation bitmask.
  *
- * this function only sleeps if the alloc_fn function sleeps or
+ * this function only sleeps if the alloc_fn() function sleeps or
  * returns NULL. Note that due to preallocation, this function
  * *never* fails when called from process contexts. (it might
  * fail if called from an IRQ context.)
index be0efbde4994f5454198384ce274b62eb827adc4..f7e088f5a309eff3a03c8da5ad4ca4b37ecd5518 100644 (file)
@@ -515,7 +515,7 @@ static int __cpuinit
 ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
 {
        writeback_set_ratelimit();
-       return 0;
+       return NOTIFY_DONE;
 }
 
 static struct notifier_block __cpuinitdata ratelimit_nb = {
@@ -549,9 +549,7 @@ void __init page_writeback_init(void)
 }
 
 /**
- * generic_writepages - walk the list of dirty pages of the given
- *                      address space and writepage() all of them.
- *
+ * generic_writepages - walk the list of dirty pages of the given address space and writepage() all of them.
  * @mapping: address space structure to write
  * @wbc: subtract the number of written pages from *@wbc->nr_to_write
  *
@@ -698,7 +696,6 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
 
 /**
  * write_one_page - write out a single page and optionally wait on I/O
- *
  * @page: the page to write
  * @wait: if true, wait on writeout
  *
@@ -736,6 +733,16 @@ int write_one_page(struct page *page, int wait)
 }
 EXPORT_SYMBOL(write_one_page);
 
+/*
+ * For address_spaces which do not use buffers nor write back.
+ */
+int __set_page_dirty_no_writeback(struct page *page)
+{
+       if (!PageDirty(page))
+               SetPageDirty(page);
+       return 0;
+}
+
 /*
  * For address_spaces which do not use buffers.  Just tag the page as dirty in
  * its radix tree.
index f12052dc23ff673d98ad183b750875c53f7d7f78..d461b23a27a1176decc9229edf45c8ae1c388472 100644 (file)
@@ -73,7 +73,9 @@ static void __free_pages_ok(struct page *page, unsigned int order);
  * don't need any ZONE_NORMAL reservation
  */
 int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
+#ifdef CONFIG_ZONE_DMA
         256,
+#endif
 #ifdef CONFIG_ZONE_DMA32
         256,
 #endif
@@ -85,7 +87,9 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
 EXPORT_SYMBOL(totalram_pages);
 
 static char * const zone_names[MAX_NR_ZONES] = {
+#ifdef CONFIG_ZONE_DMA
         "DMA",
+#endif
 #ifdef CONFIG_ZONE_DMA32
         "DMA32",
 #endif
@@ -395,7 +399,7 @@ static inline void __free_one_page(struct page *page,
        VM_BUG_ON(page_idx & (order_size - 1));
        VM_BUG_ON(bad_range(zone, page));
 
-       zone->free_pages += order_size;
+       __mod_zone_page_state(zone, NR_FREE_PAGES, order_size);
        while (order < MAX_ORDER-1) {
                unsigned long combined_idx;
                struct free_area *area;
@@ -631,7 +635,7 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order)
                list_del(&page->lru);
                rmv_page_order(page);
                area->nr_free--;
-               zone->free_pages -= 1UL << order;
+               __mod_zone_page_state(zone, NR_FREE_PAGES, - (1UL << order));
                expand(zone, page, order, current_order, area);
                return page;
        }
@@ -989,7 +993,8 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
                      int classzone_idx, int alloc_flags)
 {
        /* free_pages my go negative - that's OK */
-       long min = mark, free_pages = z->free_pages - (1 << order) + 1;
+       long min = mark;
+       long free_pages = zone_page_state(z, NR_FREE_PAGES) - (1 << order) + 1;
        int o;
 
        if (alloc_flags & ALLOC_HIGH)
@@ -1439,35 +1444,6 @@ fastcall void free_pages(unsigned long addr, unsigned int order)
 
 EXPORT_SYMBOL(free_pages);
 
-/*
- * Total amount of free (allocatable) RAM:
- */
-unsigned int nr_free_pages(void)
-{
-       unsigned int sum = 0;
-       struct zone *zone;
-
-       for_each_zone(zone)
-               sum += zone->free_pages;
-
-       return sum;
-}
-
-EXPORT_SYMBOL(nr_free_pages);
-
-#ifdef CONFIG_NUMA
-unsigned int nr_free_pages_pgdat(pg_data_t *pgdat)
-{
-       unsigned int sum = 0;
-       enum zone_type i;
-
-       for (i = 0; i < MAX_NR_ZONES; i++)
-               sum += pgdat->node_zones[i].free_pages;
-
-       return sum;
-}
-#endif
-
 static unsigned int nr_free_zone_pages(int offset)
 {
        /* Just pick one node, since fallback list is circular */
@@ -1514,7 +1490,7 @@ void si_meminfo(struct sysinfo *val)
 {
        val->totalram = totalram_pages;
        val->sharedram = 0;
-       val->freeram = nr_free_pages();
+       val->freeram = global_page_state(NR_FREE_PAGES);
        val->bufferram = nr_blockdev_pages();
        val->totalhigh = totalhigh_pages;
        val->freehigh = nr_free_highpages();
@@ -1529,10 +1505,11 @@ void si_meminfo_node(struct sysinfo *val, int nid)
        pg_data_t *pgdat = NODE_DATA(nid);
 
        val->totalram = pgdat->node_present_pages;
-       val->freeram = nr_free_pages_pgdat(pgdat);
+       val->freeram = node_page_state(nid, NR_FREE_PAGES);
 #ifdef CONFIG_HIGHMEM
        val->totalhigh = pgdat->node_zones[ZONE_HIGHMEM].present_pages;
-       val->freehigh = pgdat->node_zones[ZONE_HIGHMEM].free_pages;
+       val->freehigh = zone_page_state(&pgdat->node_zones[ZONE_HIGHMEM],
+                       NR_FREE_PAGES);
 #else
        val->totalhigh = 0;
        val->freehigh = 0;
@@ -1551,9 +1528,6 @@ void si_meminfo_node(struct sysinfo *val, int nid)
 void show_free_areas(void)
 {
        int cpu;
-       unsigned long active;
-       unsigned long inactive;
-       unsigned long free;
        struct zone *zone;
 
        for_each_zone(zone) {
@@ -1577,16 +1551,14 @@ void show_free_areas(void)
                }
        }
 
-       get_zone_counts(&active, &inactive, &free);
-
        printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu unstable:%lu\n"
-               " free:%u slab:%lu mapped:%lu pagetables:%lu bounce:%lu\n",
-               active,
-               inactive,
+               " free:%lu slab:%lu mapped:%lu pagetables:%lu bounce:%lu\n",
+               global_page_state(NR_ACTIVE),
+               global_page_state(NR_INACTIVE),
                global_page_state(NR_FILE_DIRTY),
                global_page_state(NR_WRITEBACK),
                global_page_state(NR_UNSTABLE_NFS),
-               nr_free_pages(),
+               global_page_state(NR_FREE_PAGES),
                global_page_state(NR_SLAB_RECLAIMABLE) +
                        global_page_state(NR_SLAB_UNRECLAIMABLE),
                global_page_state(NR_FILE_MAPPED),
@@ -1612,12 +1584,12 @@ void show_free_areas(void)
                        " all_unreclaimable? %s"
                        "\n",
                        zone->name,
-                       K(zone->free_pages),
+                       K(zone_page_state(zone, NR_FREE_PAGES)),
                        K(zone->pages_min),
                        K(zone->pages_low),
                        K(zone->pages_high),
-                       K(zone->nr_active),
-                       K(zone->nr_inactive),
+                       K(zone_page_state(zone, NR_ACTIVE)),
+                       K(zone_page_state(zone, NR_INACTIVE)),
                        K(zone->present_pages),
                        zone->pages_scanned,
                        (zone->all_unreclaimable ? "yes" : "no")
@@ -2651,11 +2623,11 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat,
                                "  %s zone: %lu pages exceeds realsize %lu\n",
                                zone_names[j], memmap_pages, realsize);
 
-               /* Account for reserved DMA pages */
-               if (j == ZONE_DMA && realsize > dma_reserve) {
+               /* Account for reserved pages */
+               if (j == 0 && realsize > dma_reserve) {
                        realsize -= dma_reserve;
-                       printk(KERN_DEBUG "  DMA zone: %lu pages reserved\n",
-                                                               dma_reserve);
+                       printk(KERN_DEBUG "  %s zone: %lu pages reserved\n",
+                                       zone_names[0], dma_reserve);
                }
 
                if (!is_highmem_idx(j))
@@ -2675,7 +2647,6 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat,
                spin_lock_init(&zone->lru_lock);
                zone_seqlock_init(zone);
                zone->zone_pgdat = pgdat;
-               zone->free_pages = 0;
 
                zone->prev_priority = DEF_PRIORITY;
 
@@ -2684,8 +2655,6 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat,
                INIT_LIST_HEAD(&zone->inactive_list);
                zone->nr_scan_active = 0;
                zone->nr_scan_inactive = 0;
-               zone->nr_active = 0;
-               zone->nr_inactive = 0;
                zap_zone_vm_stats(zone);
                atomic_set(&zone->reclaim_in_progress, 0);
                if (!size)
@@ -2877,20 +2846,23 @@ static void __init sort_node_map(void)
                        cmp_node_active_region, NULL);
 }
 
-/* Find the lowest pfn for a node. This depends on a sorted early_node_map */
+/* Find the lowest pfn for a node */
 unsigned long __init find_min_pfn_for_node(unsigned long nid)
 {
        int i;
-
-       /* Regions in the early_node_map can be in any order */
-       sort_node_map();
+       unsigned long min_pfn = ULONG_MAX;
 
        /* Assuming a sorted map, the first range found has the starting pfn */
        for_each_active_range_index_in_nid(i, nid)
-               return early_node_map[i].start_pfn;
+               min_pfn = min(min_pfn, early_node_map[i].start_pfn);
 
-       printk(KERN_WARNING "Could not find start_pfn for node %lu\n", nid);
-       return 0;
+       if (min_pfn == ULONG_MAX) {
+               printk(KERN_WARNING
+                       "Could not find start_pfn for node %lu\n", nid);
+               return 0;
+       }
+
+       return min_pfn;
 }
 
 /**
@@ -2939,6 +2911,9 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn)
        unsigned long nid;
        enum zone_type i;
 
+       /* Sort early_node_map as initialisation assumes it is sorted */
+       sort_node_map();
+
        /* Record where the zone boundaries are */
        memset(arch_zone_lowest_possible_pfn, 0,
                                sizeof(arch_zone_lowest_possible_pfn));
index 0f539e8e827a7a1b0956c30d30ea89434b02bc26..93d9ee692fd8b193b12ba207f69f900c831e404d 100644 (file)
@@ -575,10 +575,6 @@ void handle_ra_miss(struct address_space *mapping,
  */
 unsigned long max_sane_readahead(unsigned long nr)
 {
-       unsigned long active;
-       unsigned long inactive;
-       unsigned long free;
-
-       __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id()));
-       return min(nr, (inactive + free) / 2);
+       return min(nr, (node_page_state(numa_node_id(), NR_INACTIVE)
+               + node_page_state(numa_node_id(), NR_FREE_PAGES)) / 2);
 }
index 70da7a0981bfbad9683b5e9b0747277256a678ff..b38e17169271b3664dd35f7281048eb116ef37b1 100644 (file)
@@ -2316,7 +2316,7 @@ static void destroy_inodecache(void)
 
 static const struct address_space_operations shmem_aops = {
        .writepage      = shmem_writepage,
-       .set_page_dirty = __set_page_dirty_nobuffers,
+       .set_page_dirty = __set_page_dirty_no_writeback,
 #ifdef CONFIG_TMPFS
        .prepare_write  = shmem_prepare_write,
        .commit_write   = simple_commit_write,
index c6100628a6ef7be2325a55e18f69b80a5a0f2006..70784b848b69b475718f0090033770b7c17b511b 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -793,8 +793,10 @@ static inline struct kmem_cache *__find_general_cachep(size_t size,
         * has cs_{dma,}cachep==NULL. Thus no special case
         * for large kmalloc calls required.
         */
+#ifdef CONFIG_ZONE_DMA
        if (unlikely(gfpflags & GFP_DMA))
                return csizep->cs_dmacachep;
+#endif
        return csizep->cs_cachep;
 }
 
@@ -1493,13 +1495,15 @@ void __init kmem_cache_init(void)
                                        ARCH_KMALLOC_FLAGS|SLAB_PANIC,
                                        NULL, NULL);
                }
-
-               sizes->cs_dmacachep = kmem_cache_create(names->name_dma,
+#ifdef CONFIG_ZONE_DMA
+               sizes->cs_dmacachep = kmem_cache_create(
+                                       names->name_dma,
                                        sizes->cs_size,
                                        ARCH_KMALLOC_MINALIGN,
                                        ARCH_KMALLOC_FLAGS|SLAB_CACHE_DMA|
                                                SLAB_PANIC,
                                        NULL, NULL);
+#endif
                sizes++;
                names++;
        }
@@ -2321,7 +2325,7 @@ kmem_cache_create (const char *name, size_t size, size_t align,
        cachep->slab_size = slab_size;
        cachep->flags = flags;
        cachep->gfpflags = 0;
-       if (flags & SLAB_CACHE_DMA)
+       if (CONFIG_ZONE_DMA_FLAG && (flags & SLAB_CACHE_DMA))
                cachep->gfpflags |= GFP_DMA;
        cachep->buffer_size = size;
        cachep->reciprocal_buffer_size = reciprocal_value(size);
@@ -2516,7 +2520,7 @@ EXPORT_SYMBOL(kmem_cache_shrink);
  * kmem_cache_destroy - delete a cache
  * @cachep: the cache to destroy
  *
- * Remove a struct kmem_cache object from the slab cache.
+ * Remove a &struct kmem_cache object from the slab cache.
  *
  * It is expected this function will be called by a module when it is
  * unloaded.  This will remove the cache completely, and avoid a duplicate
@@ -2643,10 +2647,12 @@ static void cache_init_objs(struct kmem_cache *cachep,
 
 static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags)
 {
-       if (flags & GFP_DMA)
-               BUG_ON(!(cachep->gfpflags & GFP_DMA));
-       else
-               BUG_ON(cachep->gfpflags & GFP_DMA);
+       if (CONFIG_ZONE_DMA_FLAG) {
+               if (flags & GFP_DMA)
+                       BUG_ON(!(cachep->gfpflags & GFP_DMA));
+               else
+                       BUG_ON(cachep->gfpflags & GFP_DMA);
+       }
 }
 
 static void *slab_get_obj(struct kmem_cache *cachep, struct slab *slabp,
@@ -2814,19 +2820,11 @@ failed:
  */
 static void kfree_debugcheck(const void *objp)
 {
-       struct page *page;
-
        if (!virt_addr_valid(objp)) {
                printk(KERN_ERR "kfree_debugcheck: out of range ptr %lxh.\n",
                       (unsigned long)objp);
                BUG();
        }
-       page = virt_to_page(objp);
-       if (!PageSlab(page)) {
-               printk(KERN_ERR "kfree_debugcheck: bad ptr %lxh.\n",
-                      (unsigned long)objp);
-               BUG();
-       }
 }
 
 static inline void verify_redzone_free(struct kmem_cache *cache, void *obj)
@@ -3197,35 +3195,6 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
        return objp;
 }
 
-static __always_inline void *__cache_alloc(struct kmem_cache *cachep,
-                                               gfp_t flags, void *caller)
-{
-       unsigned long save_flags;
-       void *objp = NULL;
-
-       cache_alloc_debugcheck_before(cachep, flags);
-
-       local_irq_save(save_flags);
-
-       if (unlikely(NUMA_BUILD &&
-                       current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY)))
-               objp = alternate_node_alloc(cachep, flags);
-
-       if (!objp)
-               objp = ____cache_alloc(cachep, flags);
-       /*
-        * We may just have run out of memory on the local node.
-        * ____cache_alloc_node() knows how to locate memory on other nodes
-        */
-       if (NUMA_BUILD && !objp)
-               objp = ____cache_alloc_node(cachep, flags, numa_node_id());
-       local_irq_restore(save_flags);
-       objp = cache_alloc_debugcheck_after(cachep, flags, objp,
-                                           caller);
-       prefetchw(objp);
-       return objp;
-}
-
 #ifdef CONFIG_NUMA
 /*
  * Try allocating on another node if PF_SPREAD_SLAB|PF_MEMPOLICY.
@@ -3257,14 +3226,20 @@ static void *alternate_node_alloc(struct kmem_cache *cachep, gfp_t flags)
  * allocator to do its reclaim / fallback magic. We then insert the
  * slab into the proper nodelist and then allocate from it.
  */
-void *fallback_alloc(struct kmem_cache *cache, gfp_t flags)
+static void *fallback_alloc(struct kmem_cache *cache, gfp_t flags)
 {
-       struct zonelist *zonelist = &NODE_DATA(slab_node(current->mempolicy))
-                                       ->node_zonelists[gfp_zone(flags)];
+       struct zonelist *zonelist;
+       gfp_t local_flags;
        struct zone **z;
        void *obj = NULL;
        int nid;
-       gfp_t local_flags = (flags & GFP_LEVEL_MASK);
+
+       if (flags & __GFP_THISNODE)
+               return NULL;
+
+       zonelist = &NODE_DATA(slab_node(current->mempolicy))
+                       ->node_zonelists[gfp_zone(flags)];
+       local_flags = (flags & GFP_LEVEL_MASK);
 
 retry:
        /*
@@ -3374,16 +3349,110 @@ must_grow:
        if (x)
                goto retry;
 
-       if (!(flags & __GFP_THISNODE))
-               /* Unable to grow the cache. Fall back to other nodes. */
-               return fallback_alloc(cachep, flags);
-
-       return NULL;
+       return fallback_alloc(cachep, flags);
 
 done:
        return obj;
 }
-#endif
+
+/**
+ * kmem_cache_alloc_node - Allocate an object on the specified node
+ * @cachep: The cache to allocate from.
+ * @flags: See kmalloc().
+ * @nodeid: node number of the target node.
+ * @caller: return address of caller, used for debug information
+ *
+ * Identical to kmem_cache_alloc but it will allocate memory on the given
+ * node, which can improve the performance for cpu bound structures.
+ *
+ * Fallback to other node is possible if __GFP_THISNODE is not set.
+ */
+static __always_inline void *
+__cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
+                  void *caller)
+{
+       unsigned long save_flags;
+       void *ptr;
+
+       cache_alloc_debugcheck_before(cachep, flags);
+       local_irq_save(save_flags);
+
+       if (unlikely(nodeid == -1))
+               nodeid = numa_node_id();
+
+       if (unlikely(!cachep->nodelists[nodeid])) {
+               /* Node not bootstrapped yet */
+               ptr = fallback_alloc(cachep, flags);
+               goto out;
+       }
+
+       if (nodeid == numa_node_id()) {
+               /*
+                * Use the locally cached objects if possible.
+                * However ____cache_alloc does not allow fallback
+                * to other nodes. It may fail while we still have
+                * objects on other nodes available.
+                */
+               ptr = ____cache_alloc(cachep, flags);
+               if (ptr)
+                       goto out;
+       }
+       /* ___cache_alloc_node can fall back to other nodes */
+       ptr = ____cache_alloc_node(cachep, flags, nodeid);
+  out:
+       local_irq_restore(save_flags);
+       ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller);
+
+       return ptr;
+}
+
+static __always_inline void *
+__do_cache_alloc(struct kmem_cache *cache, gfp_t flags)
+{
+       void *objp;
+
+       if (unlikely(current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY))) {
+               objp = alternate_node_alloc(cache, flags);
+               if (objp)
+                       goto out;
+       }
+       objp = ____cache_alloc(cache, flags);
+
+       /*
+        * We may just have run out of memory on the local node.
+        * ____cache_alloc_node() knows how to locate memory on other nodes
+        */
+       if (!objp)
+               objp = ____cache_alloc_node(cache, flags, numa_node_id());
+
+  out:
+       return objp;
+}
+#else
+
+static __always_inline void *
+__do_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
+{
+       return ____cache_alloc(cachep, flags);
+}
+
+#endif /* CONFIG_NUMA */
+
+static __always_inline void *
+__cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
+{
+       unsigned long save_flags;
+       void *objp;
+
+       cache_alloc_debugcheck_before(cachep, flags);
+       local_irq_save(save_flags);
+       objp = __do_cache_alloc(cachep, flags);
+       local_irq_restore(save_flags);
+       objp = cache_alloc_debugcheck_after(cachep, flags, objp, caller);
+       prefetchw(objp);
+
+       return objp;
+}
 
 /*
  * Caller needs to acquire correct kmem_list's list_lock
@@ -3582,57 +3651,6 @@ out:
 }
 
 #ifdef CONFIG_NUMA
-/**
- * kmem_cache_alloc_node - Allocate an object on the specified node
- * @cachep: The cache to allocate from.
- * @flags: See kmalloc().
- * @nodeid: node number of the target node.
- * @caller: return address of caller, used for debug information
- *
- * Identical to kmem_cache_alloc but it will allocate memory on the given
- * node, which can improve the performance for cpu bound structures.
- *
- * Fallback to other node is possible if __GFP_THISNODE is not set.
- */
-static __always_inline void *
-__cache_alloc_node(struct kmem_cache *cachep, gfp_t flags,
-               int nodeid, void *caller)
-{
-       unsigned long save_flags;
-       void *ptr = NULL;
-
-       cache_alloc_debugcheck_before(cachep, flags);
-       local_irq_save(save_flags);
-
-       if (unlikely(nodeid == -1))
-               nodeid = numa_node_id();
-
-       if (likely(cachep->nodelists[nodeid])) {
-               if (nodeid == numa_node_id()) {
-                       /*
-                        * Use the locally cached objects if possible.
-                        * However ____cache_alloc does not allow fallback
-                        * to other nodes. It may fail while we still have
-                        * objects on other nodes available.
-                        */
-                       ptr = ____cache_alloc(cachep, flags);
-               }
-               if (!ptr) {
-                       /* ___cache_alloc_node can fall back to other nodes */
-                       ptr = ____cache_alloc_node(cachep, flags, nodeid);
-               }
-       } else {
-               /* Node not bootstrapped yet */
-               if (!(flags & __GFP_THISNODE))
-                       ptr = fallback_alloc(cachep, flags);
-       }
-
-       local_irq_restore(save_flags);
-       ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller);
-
-       return ptr;
-}
-
 void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
 {
        return __cache_alloc_node(cachep, flags, nodeid,
@@ -3733,6 +3751,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
        BUG_ON(virt_to_cache(objp) != cachep);
 
        local_irq_save(flags);
+       debug_check_no_locks_freed(objp, obj_size(cachep));
        __cache_free(cachep, objp);
        local_irq_restore(flags);
 }
@@ -4017,18 +4036,17 @@ void drain_array(struct kmem_cache *cachep, struct kmem_list3 *l3,
  * If we cannot acquire the cache chain mutex then just give up - we'll try
  * again on the next iteration.
  */
-static void cache_reap(struct work_struct *unused)
+static void cache_reap(struct work_struct *w)
 {
        struct kmem_cache *searchp;
        struct kmem_list3 *l3;
        int node = numa_node_id();
+       struct delayed_work *work =
+               container_of(w, struct delayed_work, work);
 
-       if (!mutex_trylock(&cache_chain_mutex)) {
+       if (!mutex_trylock(&cache_chain_mutex))
                /* Give up. Setup the next iteration. */
-               schedule_delayed_work(&__get_cpu_var(reap_work),
-                                     round_jiffies_relative(REAPTIMEOUT_CPUC));
-               return;
-       }
+               goto out;
 
        list_for_each_entry(searchp, &cache_chain, next) {
                check_irq_on();
@@ -4071,9 +4089,9 @@ next:
        mutex_unlock(&cache_chain_mutex);
        next_reap_node();
        refresh_cpu_vm_stats(smp_processor_id());
+out:
        /* Set up the next iteration */
-       schedule_delayed_work(&__get_cpu_var(reap_work),
-               round_jiffies_relative(REAPTIMEOUT_CPUC));
+       schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_CPUC));
 }
 
 #ifdef CONFIG_PROC_FS
index 5df947de7654461d43f1ba0a7ab80b46747239c8..ebf3fcb4115b8c664e54e4c47e02968ed93ab0be 100644 (file)
@@ -85,7 +85,7 @@ EXPORT_SYMBOL(cancel_dirty_page);
  *
  * We need to bale out if page->mapping is no longer equal to the original
  * mapping.  This happens a) when the VM reclaimed the page while we waited on
- * its lock, b) when a concurrent invalidate_inode_pages got there first and
+ * its lock, b) when a concurrent invalidate_mapping_pages got there first and
  * c) when tmpfs swizzles a page between a tmpfs inode and swapper_space.
  */
 static void
@@ -106,7 +106,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
 }
 
 /*
- * This is for invalidate_inode_pages().  That function can be called at
+ * This is for invalidate_mapping_pages().  That function can be called at
  * any time, and is not supposed to throw away dirty pages.  But pages can
  * be marked dirty at any time too, so use remove_mapping which safely
  * discards clean, unused pages.
@@ -310,12 +310,7 @@ unlock:
        }
        return ret;
 }
-
-unsigned long invalidate_inode_pages(struct address_space *mapping)
-{
-       return invalidate_mapping_pages(mapping, 0, ~0UL);
-}
-EXPORT_SYMBOL(invalidate_inode_pages);
+EXPORT_SYMBOL(invalidate_mapping_pages);
 
 /*
  * This is like invalidate_complete_page(), except it ignores the page's
index 86897ee792d6b4a2f8e00a94cf4b12e2c1d6f075..9eef486da9093469fa6a101b05be786a02f0ed14 100644 (file)
@@ -699,7 +699,7 @@ finished:
  *     that it is big enough to cover the vma. Will return failure if
  *     that criteria isn't met.
  *
- *     Similar to remap_pfn_range (see mm/memory.c)
+ *     Similar to remap_pfn_range() (see mm/memory.c)
  */
 int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
                                                unsigned long pgoff)
index 7430df68cb64aaf2856c7158920442c77fe1cf27..0655d5fe73e82c164043bf99958397602d6846c7 100644 (file)
@@ -679,7 +679,7 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
                nr_taken = isolate_lru_pages(sc->swap_cluster_max,
                                             &zone->inactive_list,
                                             &page_list, &nr_scan);
-               zone->nr_inactive -= nr_taken;
+               __mod_zone_page_state(zone, NR_INACTIVE, -nr_taken);
                zone->pages_scanned += nr_scan;
                spin_unlock_irq(&zone->lru_lock);
 
@@ -740,7 +740,8 @@ static inline void note_zone_scanning_priority(struct zone *zone, int priority)
 
 static inline int zone_is_near_oom(struct zone *zone)
 {
-       return zone->pages_scanned >= (zone->nr_active + zone->nr_inactive)*3;
+       return zone->pages_scanned >= (zone_page_state(zone, NR_ACTIVE)
+                               + zone_page_state(zone, NR_INACTIVE))*3;
 }
 
 /*
@@ -825,7 +826,7 @@ force_reclaim_mapped:
        pgmoved = isolate_lru_pages(nr_pages, &zone->active_list,
                                    &l_hold, &pgscanned);
        zone->pages_scanned += pgscanned;
-       zone->nr_active -= pgmoved;
+       __mod_zone_page_state(zone, NR_ACTIVE, -pgmoved);
        spin_unlock_irq(&zone->lru_lock);
 
        while (!list_empty(&l_hold)) {
@@ -857,7 +858,7 @@ force_reclaim_mapped:
                list_move(&page->lru, &zone->inactive_list);
                pgmoved++;
                if (!pagevec_add(&pvec, page)) {
-                       zone->nr_inactive += pgmoved;
+                       __mod_zone_page_state(zone, NR_INACTIVE, pgmoved);
                        spin_unlock_irq(&zone->lru_lock);
                        pgdeactivate += pgmoved;
                        pgmoved = 0;
@@ -867,7 +868,7 @@ force_reclaim_mapped:
                        spin_lock_irq(&zone->lru_lock);
                }
        }
-       zone->nr_inactive += pgmoved;
+       __mod_zone_page_state(zone, NR_INACTIVE, pgmoved);
        pgdeactivate += pgmoved;
        if (buffer_heads_over_limit) {
                spin_unlock_irq(&zone->lru_lock);
@@ -885,14 +886,14 @@ force_reclaim_mapped:
                list_move(&page->lru, &zone->active_list);
                pgmoved++;
                if (!pagevec_add(&pvec, page)) {
-                       zone->nr_active += pgmoved;
+                       __mod_zone_page_state(zone, NR_ACTIVE, pgmoved);
                        pgmoved = 0;
                        spin_unlock_irq(&zone->lru_lock);
                        __pagevec_release(&pvec);
                        spin_lock_irq(&zone->lru_lock);
                }
        }
-       zone->nr_active += pgmoved;
+       __mod_zone_page_state(zone, NR_ACTIVE, pgmoved);
 
        __count_zone_vm_events(PGREFILL, zone, pgscanned);
        __count_vm_events(PGDEACTIVATE, pgdeactivate);
@@ -918,14 +919,16 @@ static unsigned long shrink_zone(int priority, struct zone *zone,
         * Add one to `nr_to_scan' just to make sure that the kernel will
         * slowly sift through the active list.
         */
-       zone->nr_scan_active += (zone->nr_active >> priority) + 1;
+       zone->nr_scan_active +=
+               (zone_page_state(zone, NR_ACTIVE) >> priority) + 1;
        nr_active = zone->nr_scan_active;
        if (nr_active >= sc->swap_cluster_max)
                zone->nr_scan_active = 0;
        else
                nr_active = 0;
 
-       zone->nr_scan_inactive += (zone->nr_inactive >> priority) + 1;
+       zone->nr_scan_inactive +=
+               (zone_page_state(zone, NR_INACTIVE) >> priority) + 1;
        nr_inactive = zone->nr_scan_inactive;
        if (nr_inactive >= sc->swap_cluster_max)
                zone->nr_scan_inactive = 0;
@@ -1037,7 +1040,8 @@ unsigned long try_to_free_pages(struct zone **zones, gfp_t gfp_mask)
                if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL))
                        continue;
 
-               lru_pages += zone->nr_active + zone->nr_inactive;
+               lru_pages += zone_page_state(zone, NR_ACTIVE)
+                               + zone_page_state(zone, NR_INACTIVE);
        }
 
        for (priority = DEF_PRIORITY; priority >= 0; priority--) {
@@ -1182,7 +1186,8 @@ loop_again:
                for (i = 0; i <= end_zone; i++) {
                        struct zone *zone = pgdat->node_zones + i;
 
-                       lru_pages += zone->nr_active + zone->nr_inactive;
+                       lru_pages += zone_page_state(zone, NR_ACTIVE)
+                                       + zone_page_state(zone, NR_INACTIVE);
                }
 
                /*
@@ -1219,8 +1224,9 @@ loop_again:
                        if (zone->all_unreclaimable)
                                continue;
                        if (nr_slab == 0 && zone->pages_scanned >=
-                                   (zone->nr_active + zone->nr_inactive) * 6)
-                               zone->all_unreclaimable = 1;
+                               (zone_page_state(zone, NR_ACTIVE)
+                               + zone_page_state(zone, NR_INACTIVE)) * 6)
+                                       zone->all_unreclaimable = 1;
                        /*
                         * If we've done a decent amount of scanning and
                         * the reclaim ratio is low, start doing writepage
@@ -1385,18 +1391,22 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int prio,
 
                /* For pass = 0 we don't shrink the active list */
                if (pass > 0) {
-                       zone->nr_scan_active += (zone->nr_active >> prio) + 1;
+                       zone->nr_scan_active +=
+                               (zone_page_state(zone, NR_ACTIVE) >> prio) + 1;
                        if (zone->nr_scan_active >= nr_pages || pass > 3) {
                                zone->nr_scan_active = 0;
-                               nr_to_scan = min(nr_pages, zone->nr_active);
+                               nr_to_scan = min(nr_pages,
+                                       zone_page_state(zone, NR_ACTIVE));
                                shrink_active_list(nr_to_scan, zone, sc, prio);
                        }
                }
 
-               zone->nr_scan_inactive += (zone->nr_inactive >> prio) + 1;
+               zone->nr_scan_inactive +=
+                       (zone_page_state(zone, NR_INACTIVE) >> prio) + 1;
                if (zone->nr_scan_inactive >= nr_pages || pass > 3) {
                        zone->nr_scan_inactive = 0;
-                       nr_to_scan = min(nr_pages, zone->nr_inactive);
+                       nr_to_scan = min(nr_pages,
+                               zone_page_state(zone, NR_INACTIVE));
                        ret += shrink_inactive_list(nr_to_scan, zone, sc);
                        if (ret >= nr_pages)
                                return ret;
@@ -1408,12 +1418,7 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int prio,
 
 static unsigned long count_lru_pages(void)
 {
-       struct zone *zone;
-       unsigned long ret = 0;
-
-       for_each_zone(zone)
-               ret += zone->nr_active + zone->nr_inactive;
-       return ret;
+       return global_page_state(NR_ACTIVE) + global_page_state(NR_INACTIVE);
 }
 
 /*
index dc005a0c96ae5a0162b9da79e43d663c61c9422a..6c488d6ac425d948b7b77d78a6cac899be16af6a 100644 (file)
 #include <linux/module.h>
 #include <linux/cpu.h>
 
-void __get_zone_counts(unsigned long *active, unsigned long *inactive,
-                       unsigned long *free, struct pglist_data *pgdat)
-{
-       struct zone *zones = pgdat->node_zones;
-       int i;
-
-       *active = 0;
-       *inactive = 0;
-       *free = 0;
-       for (i = 0; i < MAX_NR_ZONES; i++) {
-               *active += zones[i].nr_active;
-               *inactive += zones[i].nr_inactive;
-               *free += zones[i].free_pages;
-       }
-}
-
-void get_zone_counts(unsigned long *active,
-               unsigned long *inactive, unsigned long *free)
-{
-       struct pglist_data *pgdat;
-
-       *active = 0;
-       *inactive = 0;
-       *free = 0;
-       for_each_online_pgdat(pgdat) {
-               unsigned long l, m, n;
-               __get_zone_counts(&l, &m, &n, pgdat);
-               *active += l;
-               *inactive += m;
-               *free += n;
-       }
-}
-
 #ifdef CONFIG_VM_EVENT_COUNTERS
 DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}};
 EXPORT_PER_CPU_SYMBOL(vm_event_states);
@@ -239,7 +206,7 @@ EXPORT_SYMBOL(mod_zone_page_state);
  * in between and therefore the atomicity vs. interrupt cannot be exploited
  * in a useful way here.
  */
-static void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
+void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
 {
        struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id());
        s8 *p = pcp->vm_stat_diff + item;
@@ -260,9 +227,8 @@ void __inc_zone_page_state(struct page *page, enum zone_stat_item item)
 }
 EXPORT_SYMBOL(__inc_zone_page_state);
 
-void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
+void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
 {
-       struct zone *zone = page_zone(page);
        struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id());
        s8 *p = pcp->vm_stat_diff + item;
 
@@ -275,6 +241,11 @@ void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
                *p = overstep;
        }
 }
+
+void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
+{
+       __dec_zone_state(page_zone(page), item);
+}
 EXPORT_SYMBOL(__dec_zone_page_state);
 
 void inc_zone_state(struct zone *zone, enum zone_stat_item item)
@@ -437,6 +408,12 @@ const struct seq_operations fragmentation_op = {
        .show   = frag_show,
 };
 
+#ifdef CONFIG_ZONE_DMA
+#define TEXT_FOR_DMA(xx) xx "_dma",
+#else
+#define TEXT_FOR_DMA(xx)
+#endif
+
 #ifdef CONFIG_ZONE_DMA32
 #define TEXT_FOR_DMA32(xx) xx "_dma32",
 #else
@@ -449,19 +426,22 @@ const struct seq_operations fragmentation_op = {
 #define TEXT_FOR_HIGHMEM(xx)
 #endif
 
-#define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \
+#define TEXTS_FOR_ZONES(xx) TEXT_FOR_DMA(xx) TEXT_FOR_DMA32(xx) xx "_normal", \
                                        TEXT_FOR_HIGHMEM(xx)
 
 static const char * const vmstat_text[] = {
        /* Zoned VM counters */
+       "nr_free_pages",
+       "nr_active",
+       "nr_inactive",
        "nr_anon_pages",
        "nr_mapped",
        "nr_file_pages",
+       "nr_dirty",
+       "nr_writeback",
        "nr_slab_reclaimable",
        "nr_slab_unreclaimable",
        "nr_page_table_pages",
-       "nr_dirty",
-       "nr_writeback",
        "nr_unstable",
        "nr_bounce",
        "nr_vmscan_write",
@@ -529,17 +509,13 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
                           "\n        min      %lu"
                           "\n        low      %lu"
                           "\n        high     %lu"
-                          "\n        active   %lu"
-                          "\n        inactive %lu"
                           "\n        scanned  %lu (a: %lu i: %lu)"
                           "\n        spanned  %lu"
                           "\n        present  %lu",
-                          zone->free_pages,
+                          zone_page_state(zone, NR_FREE_PAGES),
                           zone->pages_min,
                           zone->pages_low,
                           zone->pages_high,
-                          zone->nr_active,
-                          zone->nr_inactive,
                           zone->pages_scanned,
                           zone->nr_scan_active, zone->nr_scan_inactive,
                           zone->spanned_pages,
@@ -562,12 +538,6 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
                        int j;
 
                        pageset = zone_pcp(zone, i);
-                       for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) {
-                               if (pageset->pcp[j].count)
-                                       break;
-                       }
-                       if (j == ARRAY_SIZE(pageset->pcp))
-                               continue;
                        for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) {
                                seq_printf(m,
                                           "\n    cpu: %i pcp: %i"
index 0ab9a981fc6d84a1ac28f1f72f975f500f6bf304..61dd9d3951f1017697fe223a988e876466c5194d 100644 (file)
@@ -132,10 +132,9 @@ void * dst_alloc(struct dst_ops * ops)
                if (ops->gc())
                        return NULL;
        }
-       dst = kmem_cache_alloc(ops->kmem_cachep, GFP_ATOMIC);
+       dst = kmem_cache_zalloc(ops->kmem_cachep, GFP_ATOMIC);
        if (!dst)
                return NULL;
-       memset(dst, 0, ops->entry_size);
        atomic_set(&dst->__refcnt, 0);
        dst->ops = ops;
        dst->lastuse = jiffies;
index c5f161e7957ba3b405df4b5b18050f6afc9d9c11..c08d69650566ed613b4ff706e6fab9014ab8a7b3 100644 (file)
@@ -251,12 +251,10 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl)
                        goto out_entries;
        }
 
-       n = kmem_cache_alloc(tbl->kmem_cachep, GFP_ATOMIC);
+       n = kmem_cache_zalloc(tbl->kmem_cachep, GFP_ATOMIC);
        if (!n)
                goto out_entries;
 
-       memset(n, 0, tbl->entry_size);
-
        skb_queue_head_init(&n->arp_queue);
        rwlock_init(&n->lock);
        n->updated        = n->used = now;
index 0542015922d672b8702082a49eaf3088c38b2146..780a141f8342c93c880b53245cbddaa2103cdc7b 100644 (file)
@@ -593,12 +593,10 @@ create:
 
 replace:
        err = -ENOBUFS;
-       new_f = kmem_cache_alloc(dn_hash_kmem, GFP_KERNEL);
+       new_f = kmem_cache_zalloc(dn_hash_kmem, GFP_KERNEL);
        if (new_f == NULL)
                goto out;
 
-       memset(new_f, 0, sizeof(struct dn_fib_node));
-
        new_f->fn_key = key;
        new_f->fn_type = type;
        new_f->fn_scope = r->rtm_scope;
index a099000cd132a13dd4774ed8c5a1edfd536ad233..604f5b585104e02e9238dd2a1230a7e21be17017 100644 (file)
@@ -479,20 +479,18 @@ static struct mfc_cache *ipmr_cache_find(__be32 origin, __be32 mcastgrp)
  */
 static struct mfc_cache *ipmr_cache_alloc(void)
 {
-       struct mfc_cache *c=kmem_cache_alloc(mrt_cachep, GFP_KERNEL);
+       struct mfc_cache *c=kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
        if(c==NULL)
                return NULL;
-       memset(c, 0, sizeof(*c));
        c->mfc_un.res.minvif = MAXVIFS;
        return c;
 }
 
 static struct mfc_cache *ipmr_cache_alloc_unres(void)
 {
-       struct mfc_cache *c=kmem_cache_alloc(mrt_cachep, GFP_ATOMIC);
+       struct mfc_cache *c=kmem_cache_zalloc(mrt_cachep, GFP_ATOMIC);
        if(c==NULL)
                return NULL;
-       memset(c, 0, sizeof(*c));
        skb_queue_head_init(&c->mfc_un.unres.unresolved);
        c->mfc_un.unres.expires = jiffies + 10*HZ;
        return c;
index 6feeb1f1c9cc37227f467b9d5af3fff5804a0bcd..0b5e03476ce4de91b2317de8666c0ebe02a05d36 100644 (file)
@@ -603,13 +603,12 @@ ip_vs_conn_new(int proto, __be32 caddr, __be16 cport, __be32 vaddr, __be16 vport
        struct ip_vs_conn *cp;
        struct ip_vs_protocol *pp = ip_vs_proto_get(proto);
 
-       cp = kmem_cache_alloc(ip_vs_conn_cachep, GFP_ATOMIC);
+       cp = kmem_cache_zalloc(ip_vs_conn_cachep, GFP_ATOMIC);
        if (cp == NULL) {
                IP_VS_ERR_RL("ip_vs_conn_new: no memory available.\n");
                return NULL;
        }
 
-       memset(cp, 0, sizeof(*cp));
        INIT_LIST_HEAD(&cp->c_list);
        init_timer(&cp->timer);
        cp->timer.data     = (unsigned long)cp;
index 2e6e42199f21415c9e32025c163f9aa595c6d134..04e466d53c0b8f399469d5936654337ecf5e2482 100644 (file)
@@ -638,14 +638,13 @@ struct ip_conntrack *ip_conntrack_alloc(struct ip_conntrack_tuple *orig,
                }
        }
 
-       conntrack = kmem_cache_alloc(ip_conntrack_cachep, GFP_ATOMIC);
+       conntrack = kmem_cache_zalloc(ip_conntrack_cachep, GFP_ATOMIC);
        if (!conntrack) {
                DEBUGP("Can't allocate conntrack.\n");
                atomic_dec(&ip_conntrack_count);
                return ERR_PTR(-ENOMEM);
        }
 
-       memset(conntrack, 0, sizeof(*conntrack));
        atomic_set(&conntrack->ct_general.use, 1);
        conntrack->ct_general.destroy = destroy_conntrack;
        conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig;
index 8c9024890bbe17479ffe22c4a7e8166bb737cddc..f4d7be77eb0fefa93446010f9c335655c18fa654 100644 (file)
@@ -150,8 +150,7 @@ static __inline__ struct fib6_node * node_alloc(void)
 {
        struct fib6_node *fn;
 
-       if ((fn = kmem_cache_alloc(fib6_node_kmem, GFP_ATOMIC)) != NULL)
-               memset(fn, 0, sizeof(struct fib6_node));
+       fn = kmem_cache_zalloc(fib6_node_kmem, GFP_ATOMIC);
 
        return fn;
 }
index b97511655649b7078cf7877f1220d158119d96e9..f7fb29d5a0c728ea83cad16b54bfe6671b06d81d 100644 (file)
@@ -979,11 +979,10 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
 {
        struct sctp_chunk *retval;
 
-       retval = kmem_cache_alloc(sctp_chunk_cachep, GFP_ATOMIC);
+       retval = kmem_cache_zalloc(sctp_chunk_cachep, GFP_ATOMIC);
 
        if (!retval)
                goto nodata;
-       memset(retval, 0, sizeof(struct sctp_chunk));
 
        if (!sk) {
                SCTP_DEBUG_PRINTK("chunkifying skb %p w/o an sk\n", skb);
index f50a70f550b39b37566269d466eaebd33de50ea6..c9b4d3631101b34785b3ab8eabb7add39ee9c079 100755 (executable)
@@ -83,7 +83,7 @@ use strict;
 #  * my_function
 #  **/
 #
-# If the Description: header tag is ommitted, then there must be a blank line
+# If the Description: header tag is omitted, then there must be a blank line
 # after the last parameter specification.
 # e.g.
 # /**
@@ -265,7 +265,7 @@ my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
 my $doc_end = '\*/';
 my $doc_com = '\s*\*\s*';
 my $doc_decl = $doc_com.'(\w+)';
-my $doc_sect = $doc_com.'(['.$doc_special.']?[\w ]+):(.*)';
+my $doc_sect = $doc_com.'(['.$doc_special.']?[\w\s]+):(.*)';
 my $doc_content = $doc_com.'(.*)';
 my $doc_block = $doc_com.'DOC:\s*(.*)?';
 
@@ -365,7 +365,7 @@ sub dump_section {
 #  parameterlist => @list of parameters
 #  parameterdescs => %parameter descriptions
 #  sectionlist => @list of sections
-#  sections => %descriont descriptions
+#  sections => %section descriptions
 #
 
 sub output_highlight {
@@ -583,14 +583,14 @@ sub output_function_xml(%) {
     $id = "API-".$args{'function'};
     $id =~ s/[^A-Za-z0-9]/-/g;
 
-    print "<refentry>\n";
+    print "<refentry id=\"$id\">\n";
     print "<refentryinfo>\n";
     print " <title>LINUX</title>\n";
     print " <productname>Kernel Hackers Manual</productname>\n";
     print " <date>$man_date</date>\n";
     print "</refentryinfo>\n";
     print "<refmeta>\n";
-    print " <refentrytitle><phrase id=\"$id\">".$args{'function'}."</phrase></refentrytitle>\n";
+    print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
@@ -659,14 +659,14 @@ sub output_struct_xml(%) {
     $id = "API-struct-".$args{'struct'};
     $id =~ s/[^A-Za-z0-9]/-/g;
 
-    print "<refentry>\n";
+    print "<refentry id=\"$id\">\n";
     print "<refentryinfo>\n";
     print " <title>LINUX</title>\n";
     print " <productname>Kernel Hackers Manual</productname>\n";
     print " <date>$man_date</date>\n";
     print "</refentryinfo>\n";
     print "<refmeta>\n";
-    print " <refentrytitle><phrase id=\"$id\">".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
+    print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
@@ -743,14 +743,14 @@ sub output_enum_xml(%) {
     $id = "API-enum-".$args{'enum'};
     $id =~ s/[^A-Za-z0-9]/-/g;
 
-    print "<refentry>\n";
+    print "<refentry id=\"$id\">\n";
     print "<refentryinfo>\n";
     print " <title>LINUX</title>\n";
     print " <productname>Kernel Hackers Manual</productname>\n";
     print " <date>$man_date</date>\n";
     print "</refentryinfo>\n";
     print "<refmeta>\n";
-    print " <refentrytitle><phrase id=\"$id\">enum ".$args{'enum'}."</phrase></refentrytitle>\n";
+    print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
@@ -809,14 +809,14 @@ sub output_typedef_xml(%) {
     $id = "API-typedef-".$args{'typedef'};
     $id =~ s/[^A-Za-z0-9]/-/g;
 
-    print "<refentry>\n";
+    print "<refentry id=\"$id\">\n";
     print "<refentryinfo>\n";
     print " <title>LINUX</title>\n";
     print " <productname>Kernel Hackers Manual</productname>\n";
     print " <date>$man_date</date>\n";
     print "</refentryinfo>\n";
     print "<refmeta>\n";
-    print " <refentrytitle><phrase id=\"$id\">typedef ".$args{'typedef'}."</phrase></refentrytitle>\n";
+    print " <refentrytitle><phrase>typedef ".$args{'typedef'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
@@ -953,7 +953,11 @@ sub output_function_man(%) {
     print $args{'function'}." \\- ".$args{'purpose'}."\n";
 
     print ".SH SYNOPSIS\n";
-    print ".B \"".$args{'functiontype'}."\" ".$args{'function'}."\n";
+    if ($args{'functiontype'} ne "") {
+       print ".B \"".$args{'functiontype'}."\" ".$args{'function'}."\n";
+    } else {
+       print ".B \"".$args{'function'}."\n";
+    }
     $count = 0;
     my $parenth = "(";
     my $post = ",";
@@ -1118,13 +1122,19 @@ sub output_intro_man(%) {
 sub output_function_text(%) {
     my %args = %{$_[0]};
     my ($parameter, $section);
+    my $start;
 
     print "Name:\n\n";
     print $args{'function'}." - ".$args{'purpose'}."\n";
 
     print "\nSynopsis:\n\n";
-    my $start=$args{'functiontype'}." ".$args{'function'}." (";
+    if ($args{'functiontype'} ne "") {
+       $start = $args{'functiontype'}." ".$args{'function'}." (";
+    } else {
+       $start = $args{'function'}." (";
+    }
     print $start;
+
     my $count = 0;
     foreach my $parameter (@{$args{'parameterlist'}}) {
        $type = $args{'parametertypes'}{$parameter};
@@ -1433,7 +1443,7 @@ sub create_parameterlist($$$) {
        } elsif ($arg =~ m/\(.*\*/) {
            # pointer-to-function
            $arg =~ tr/#/,/;
-           $arg =~ m/[^\(]+\(\*([^\)]+)\)/;
+           $arg =~ m/[^\(]+\(\*\s*([^\)]+)\)/;
            $param = $1;
            $type = $arg;
            $type =~ s/([^\(]+\(\*)$param/$1/;
@@ -1536,7 +1546,7 @@ sub dump_function($$) {
     $prototype =~ s/^__always_inline +//;
     $prototype =~ s/^noinline +//;
     $prototype =~ s/__devinit +//;
-    $prototype =~ s/^#define +//; #ak added
+    $prototype =~ s/^#define\s+//; #ak added
     $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//;
 
     # Yes, this truly is vile.  We are looking for:
@@ -1710,6 +1720,7 @@ sub process_file($) {
     my $file;
     my $identifier;
     my $func;
+    my $descr;
     my $initial_section_counter = $section_counter;
 
     if (defined($ENV{'SRCTREE'})) {
@@ -1753,7 +1764,12 @@ sub process_file($) {
 
                $state = 2;
                if (/-(.*)/) {
-                   $declaration_purpose = xml_escape($1);
+                   # strip leading/trailing/multiple spaces #RDD:T:
+                   $descr= $1;
+                   $descr =~ s/^\s*//;
+                   $descr =~ s/\s*$//;
+                   $descr =~ s/\s+/ /;
+                   $declaration_purpose = xml_escape($descr);
                } else {
                    $declaration_purpose = "";
                }
index e7c0b5e2066bbb532995ba0758516c236b60c1d1..da8caf10ef9745b5f222117e9e236960c2f4e643 100644 (file)
@@ -332,11 +332,10 @@ static struct avc_node *avc_alloc_node(void)
 {
        struct avc_node *node;
 
-       node = kmem_cache_alloc(avc_node_cachep, GFP_ATOMIC);
+       node = kmem_cache_zalloc(avc_node_cachep, GFP_ATOMIC);
        if (!node)
                goto out;
 
-       memset(node, 0, sizeof(*node));
        INIT_RCU_HEAD(&node->rhead);
        INIT_LIST_HEAD(&node->list);
        atomic_set(&node->ae.used, 1);
index 65fb5e8ea9419ba1dc984c728d2614721f7bbf9b..35eb8de892fc513bd187ad3c5acbce9cd271ebd1 100644 (file)
@@ -181,11 +181,10 @@ static int inode_alloc_security(struct inode *inode)
        struct task_security_struct *tsec = current->security;
        struct inode_security_struct *isec;
 
-       isec = kmem_cache_alloc(sel_inode_cache, GFP_KERNEL);
+       isec = kmem_cache_zalloc(sel_inode_cache, GFP_KERNEL);
        if (!isec)
                return -ENOMEM;
 
-       memset(isec, 0, sizeof(*isec));
        mutex_init(&isec->lock);
        INIT_LIST_HEAD(&isec->list);
        isec->inode = inode;
@@ -2655,7 +2654,7 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk,
        struct file_security_struct *fsec;
 
        /* struct fown_struct is never outside the context of a struct file */
-        file = (struct file *)((long)fown - offsetof(struct file,f_owner));
+        file = container_of(fown, struct file, f_owner);
 
        tsec = tsk->security;
        fsec = file->f_security;
index ebb993c5c244d3e5fb72468eee758fe40550e23a..9142073319c0085fcd07f87291510f3033f20bf2 100644 (file)
@@ -36,10 +36,9 @@ avtab_insert_node(struct avtab *h, int hvalue,
                  struct avtab_key *key, struct avtab_datum *datum)
 {
        struct avtab_node * newnode;
-       newnode = kmem_cache_alloc(avtab_node_cachep, GFP_KERNEL);
+       newnode = kmem_cache_zalloc(avtab_node_cachep, GFP_KERNEL);
        if (newnode == NULL)
                return NULL;
-       memset(newnode, 0, sizeof(struct avtab_node));
        newnode->key = *key;
        newnode->datum = *datum;
        if (prev) {
index a0588c21324ac6ae98fbfccbf286139c1a97d582..4c419300305d34de140cd9c5c87399906883a3a4 100644 (file)
@@ -5,6 +5,20 @@
 #
 # Prompt user for primary drivers.
 
+config OBSOLETE_OSS
+       bool "Obsolete OSS drivers"
+       depends on SOUND_PRIME
+       help
+         This option enables support for obsolete OSS drivers that
+         are scheduled for removal in the near future since there
+         are ALSA drivers for the same hardware.
+
+         Please contact Adrian Bunk <bunk@stusta.de> if you had to
+         say Y here because your soundcard is not properly supported
+         by ALSA.
+
+         If unsure, say N.
+
 config SOUND_BT878
        tristate "BT878 audio dma"
        depends on SOUND_PRIME && PCI
@@ -33,7 +47,7 @@ config SOUND_BCM_CS4297A
 
 config SOUND_ES1371
        tristate "Creative Ensoniq AudioPCI 97 (ES1371)"
-       depends on SOUND_PRIME && PCI
+       depends on SOUND_PRIME && PCI && OBSOLETE_OSS
        help
          Say Y or M if you have a PCI sound card utilizing the Ensoniq
          ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if
@@ -705,18 +719,6 @@ config AEDSP16_SBPRO
 
 endchoice
 
-config AEDSP16_MPU401
-       bool "Audio Excel DSP 16 (MPU401 emulation)"
-       depends on SOUND_AEDSP16 && SOUND_MPU401
-       help
-         Answer Y if you want your audio card to emulate the MPU-401 midi
-         interface. You should then also say Y to "MPU-401 support".
-
-         Note that the I/O base for MPU-401 support of aedsp16 is the same
-         you have selected for "MPU-401 support". If you are using this
-         driver as a module you have to specify the MPU I/O base address with
-         the parameter 'mpu_base=0xNNN'.
-
 config SOUND_VIDC
        tristate "VIDC 16-bit sound"
        depends on ARM && (ARCH_ACORN || ARCH_CLPS7500) && SOUND_OSS
index cb845580fe031ee54efcf5f19acac2a8fa025173..18e149f52a8869b6b2b22600afe17ddb194e89e7 100644 (file)
@@ -14,7 +14,7 @@ config DMASOUND_ATARI
 
 config DMASOUND_PMAC
        tristate "PowerMac DMA sound support"
-       depends on PPC32 && PPC_PMAC && SOUND && I2C
+       depends on PPC32 && PPC_PMAC && SOUND && I2C && OBSOLETE_OSS
        select DMASOUND
        help
          If you want to use the internal audio of your PowerMac in Linux,
index 382702ad663bea2fd72ba169556c147693a92b4a..201f27f8cbaf1c6b266b68f3a915c3edce50b67b 100644 (file)
@@ -7,7 +7,7 @@ PHONY += klibcdirs
 
 
 # Generate builtin.o based on initramfs_data.o
-obj-y := initramfs_data.o
+obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o
 
 # initramfs_data.o contains the initramfs_data.cpio.gz image.
 # The image is included using .incbin, a dependency which is not
index 83acd6cc0b3cd70325ec383eb8fdc309918a0a98..8365db6cfe06449246ef5156a4a886d7e14fbdbc 100644 (file)
@@ -14,6 +14,7 @@
  * Original work by Jeff Garzik
  *
  * External file lists, symlink, pipe and fifo support by Thayne Harbaugh
+ * Hard link support by Luciano Rocha
  */
 
 #define xstr(s) #s
@@ -286,16 +287,19 @@ static int cpio_mknod_line(const char *line)
        return rc;
 }
 
-/* Not marked static to keep the compiler quiet, as no one uses this yet... */
 static int cpio_mkfile(const char *name, const char *location,
-                       unsigned int mode, uid_t uid, gid_t gid)
+                       unsigned int mode, uid_t uid, gid_t gid,
+                       unsigned int nlinks)
 {
        char s[256];
        char *filebuf = NULL;
        struct stat buf;
+       long size;
        int file = -1;
        int retval;
        int rc = -1;
+       int namesize;
+       int i;
 
        mode |= S_IFREG;
 
@@ -323,29 +327,41 @@ static int cpio_mkfile(const char *name, const char *location,
                goto error;
        }
 
-       sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX"
-              "%08X%08X%08X%08X%08X%08X%08X",
-               "070701",               /* magic */
-               ino++,                  /* ino */
-               mode,                   /* mode */
-               (long) uid,             /* uid */
-               (long) gid,             /* gid */
-               1,                      /* nlink */
-               (long) buf.st_mtime,    /* mtime */
-               (int) buf.st_size,      /* filesize */
-               3,                      /* major */
-               1,                      /* minor */
-               0,                      /* rmajor */
-               0,                      /* rminor */
-               (unsigned)strlen(name) + 1,/* namesize */
-               0);                     /* chksum */
-       push_hdr(s);
-       push_string(name);
-       push_pad();
+       size = 0;
+       for (i = 1; i <= nlinks; i++) {
+               /* data goes on last link */
+               if (i == nlinks) size = buf.st_size;
+
+               namesize = strlen(name) + 1;
+               sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX"
+                      "%08lX%08X%08X%08X%08X%08X%08X",
+                       "070701",               /* magic */
+                       ino,                    /* ino */
+                       mode,                   /* mode */
+                       (long) uid,             /* uid */
+                       (long) gid,             /* gid */
+                       nlinks,                 /* nlink */
+                       (long) buf.st_mtime,    /* mtime */
+                       size,                   /* filesize */
+                       3,                      /* major */
+                       1,                      /* minor */
+                       0,                      /* rmajor */
+                       0,                      /* rminor */
+                       namesize,               /* namesize */
+                       0);                     /* chksum */
+               push_hdr(s);
+               push_string(name);
+               push_pad();
+
+               if (size) {
+                       fwrite(filebuf, size, 1, stdout);
+                       offset += size;
+                       push_pad();
+               }
 
-       fwrite(filebuf, buf.st_size, 1, stdout);
-       offset += buf.st_size;
-       push_pad();
+               name += namesize;
+       }
+       ino++;
        rc = 0;
        
 error:
@@ -357,18 +373,51 @@ error:
 static int cpio_mkfile_line(const char *line)
 {
        char name[PATH_MAX + 1];
+       char *dname = NULL; /* malloc'ed buffer for hard links */
        char location[PATH_MAX + 1];
        unsigned int mode;
        int uid;
        int gid;
+       int nlinks = 1;
+       int end = 0, dname_len = 0;
        int rc = -1;
 
-       if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, location, &mode, &uid, &gid)) {
+       if (5 > sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX)
+                               "s %o %d %d %n",
+                               name, location, &mode, &uid, &gid, &end)) {
                fprintf(stderr, "Unrecognized file format '%s'", line);
                goto fail;
        }
-       rc = cpio_mkfile(name, location, mode, uid, gid);
+       if (end && isgraph(line[end])) {
+               int len;
+               int nend;
+
+               dname = malloc(strlen(line));
+               if (!dname) {
+                       fprintf (stderr, "out of memory (%d)\n", dname_len);
+                       goto fail;
+               }
+
+               dname_len = strlen(name) + 1;
+               memcpy(dname, name, dname_len);
+
+               do {
+                       nend = 0;
+                       if (sscanf(line + end, "%" str(PATH_MAX) "s %n",
+                                       name, &nend) < 1)
+                               break;
+                       len = strlen(name) + 1;
+                       memcpy(dname + dname_len, name, len);
+                       dname_len += len;
+                       nlinks++;
+                       end += nend;
+               } while (isgraph(line[end]));
+       } else {
+               dname = name;
+       }
+       rc = cpio_mkfile(dname, location, mode, uid, gid, nlinks);
  fail:
+       if (dname_len) free(dname);
        return rc;
 }
 
@@ -381,22 +430,23 @@ void usage(const char *prog)
                "describe the files to be included in the initramfs archive:\n"
                "\n"
                "# a comment\n"
-               "file <name> <location> <mode> <uid> <gid>\n"
+               "file <name> <location> <mode> <uid> <gid> [<hard links>]\n"
                "dir <name> <mode> <uid> <gid>\n"
                "nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n"
                "slink <name> <target> <mode> <uid> <gid>\n"
                "pipe <name> <mode> <uid> <gid>\n"
                "sock <name> <mode> <uid> <gid>\n"
                "\n"
-               "<name>      name of the file/dir/nod/etc in the archive\n"
-               "<location>  location of the file in the current filesystem\n"
-               "<target>    link target\n"
-               "<mode>      mode/permissions of the file\n"
-               "<uid>       user id (0=root)\n"
-               "<gid>       group id (0=root)\n"
-               "<dev_type>  device type (b=block, c=character)\n"
-               "<maj>       major number of nod\n"
-               "<min>       minor number of nod\n"
+               "<name>       name of the file/dir/nod/etc in the archive\n"
+               "<location>   location of the file in the current filesystem\n"
+               "<target>     link target\n"
+               "<mode>       mode/permissions of the file\n"
+               "<uid>        user id (0=root)\n"
+               "<gid>        group id (0=root)\n"
+               "<dev_type>   device type (b=block, c=character)\n"
+               "<maj>        major number of nod\n"
+               "<min>        minor number of nod\n"
+               "<hard links> space separated list of other links to file\n"
                "\n"
                "example:\n"
                "# A simple initramfs\n"