Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus...
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:31:42 +0000 (09:31 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:31:42 +0000 (09:31 -0800)
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Add arch-specific walk_memory_remove() for 64-bit powerpc
  [POWERPC] Enable hotplug memory remove for 64-bit powerpc
  [POWERPC] Add remove_memory() for 64-bit powerpc
  [POWERPC] Make cell IOMMU fixed mapping printk more useful
  [POWERPC] Fix potential cell IOMMU bug when switching back to default DMA ops
  [POWERPC] Don't enable cell IOMMU fixed mapping if there are no dma-ranges
  [POWERPC] Fix cell IOMMU null pointer explosion on old firmwares
  [POWERPC] spufs: Fix timing dependent false return from spufs_run_spu
  [POWERPC] spufs: No need to have a runnable SPU for libassist update
  [POWERPC] spufs: Update SPU_Status[CISHP] in backing runcntl write
  [POWERPC] spufs: Fix state_mutex leaks
  [POWERPC] Disable G5 NAP mode during SMU commands on U3

759 files changed:
Documentation/accounting/getdelays.c
Documentation/aoe/mkdevs.sh
Documentation/aoe/udev-install.sh
Documentation/aoe/udev.txt
Documentation/feature-removal-schedule.txt
Documentation/filesystems/isofs.txt
Documentation/filesystems/vfs.txt
Documentation/kernel-parameters.txt
Documentation/mn10300/ABI.txt [new file with mode: 0644]
Documentation/mn10300/compartmentalisation.txt [new file with mode: 0644]
Documentation/thermal/sysfs-api.txt
MAINTAINERS
arch/alpha/Kconfig
arch/alpha/kernel/osf_sys.c
arch/alpha/kernel/process.c
arch/alpha/kernel/setup.c
arch/arm/Kconfig
arch/arm/kernel/process.c
arch/avr32/kernel/ocd.c
arch/avr32/mach-at32ap/at32ap700x.c
arch/blackfin/kernel/process.c
arch/blackfin/kernel/setup.c
arch/cris/Kconfig
arch/cris/kernel/setup.c
arch/frv/Kconfig
arch/frv/kernel/setup.c
arch/frv/mm/pgalloc.c
arch/h8300/Kconfig
arch/h8300/kernel/setup.c
arch/ia64/kernel/time.c
arch/m32r/Kconfig
arch/m32r/kernel/setup.c
arch/m68k/Kconfig
arch/m68k/kernel/process.c
arch/m68k/kernel/setup.c
arch/m68k/kernel/traps.c
arch/m68knommu/Kconfig
arch/m68knommu/kernel/setup.c
arch/mips/kernel/i8259.c
arch/mips/kernel/irixelf.c
arch/mips/kernel/irixsig.c
arch/mips/kernel/irq.c
arch/mips/kernel/sysirix.c
arch/mn10300/Kconfig [new file with mode: 0644]
arch/mn10300/Kconfig.debug [new file with mode: 0644]
arch/mn10300/Makefile [new file with mode: 0644]
arch/mn10300/boot/.gitignore [new file with mode: 0644]
arch/mn10300/boot/Makefile [new file with mode: 0644]
arch/mn10300/boot/compressed/Makefile [new file with mode: 0644]
arch/mn10300/boot/compressed/head.S [new file with mode: 0644]
arch/mn10300/boot/compressed/misc.c [new file with mode: 0644]
arch/mn10300/boot/compressed/misc.h [new file with mode: 0644]
arch/mn10300/boot/compressed/vmlinux.lds [new file with mode: 0644]
arch/mn10300/boot/install.sh [new file with mode: 0644]
arch/mn10300/boot/tools/build.c [new file with mode: 0644]
arch/mn10300/configs/asb2303_defconfig [new file with mode: 0644]
arch/mn10300/kernel/Makefile [new file with mode: 0644]
arch/mn10300/kernel/asm-offsets.c [new file with mode: 0644]
arch/mn10300/kernel/entry.S [new file with mode: 0644]
arch/mn10300/kernel/fpu-low.S [new file with mode: 0644]
arch/mn10300/kernel/fpu.c [new file with mode: 0644]
arch/mn10300/kernel/gdb-cache.S [new file with mode: 0644]
arch/mn10300/kernel/gdb-io-serial-low.S [new file with mode: 0644]
arch/mn10300/kernel/gdb-io-serial.c [new file with mode: 0644]
arch/mn10300/kernel/gdb-io-ttysm-low.S [new file with mode: 0644]
arch/mn10300/kernel/gdb-io-ttysm.c [new file with mode: 0644]
arch/mn10300/kernel/gdb-low.S [new file with mode: 0644]
arch/mn10300/kernel/gdb-stub.c [new file with mode: 0644]
arch/mn10300/kernel/head.S [new file with mode: 0644]
arch/mn10300/kernel/init_task.c [new file with mode: 0644]
arch/mn10300/kernel/internal.h [new file with mode: 0644]
arch/mn10300/kernel/io.c [new file with mode: 0644]
arch/mn10300/kernel/irq.c [new file with mode: 0644]
arch/mn10300/kernel/kernel_execve.S [new file with mode: 0644]
arch/mn10300/kernel/kprobes.c [new file with mode: 0644]
arch/mn10300/kernel/kthread.S [new file with mode: 0644]
arch/mn10300/kernel/mn10300-debug.c [new file with mode: 0644]
arch/mn10300/kernel/mn10300-serial-low.S [new file with mode: 0644]
arch/mn10300/kernel/mn10300-serial.c [new file with mode: 0644]
arch/mn10300/kernel/mn10300-serial.h [new file with mode: 0644]
arch/mn10300/kernel/mn10300-watchdog-low.S [new file with mode: 0644]
arch/mn10300/kernel/mn10300-watchdog.c [new file with mode: 0644]
arch/mn10300/kernel/mn10300_ksyms.c [new file with mode: 0644]
arch/mn10300/kernel/module.c [new file with mode: 0644]
arch/mn10300/kernel/process.c [new file with mode: 0644]
arch/mn10300/kernel/profile-low.S [new file with mode: 0644]
arch/mn10300/kernel/profile.c [new file with mode: 0644]
arch/mn10300/kernel/ptrace.c [new file with mode: 0644]
arch/mn10300/kernel/rtc.c [new file with mode: 0644]
arch/mn10300/kernel/semaphore.c [new file with mode: 0644]
arch/mn10300/kernel/setup.c [new file with mode: 0644]
arch/mn10300/kernel/sigframe.h [new file with mode: 0644]
arch/mn10300/kernel/signal.c [new file with mode: 0644]
arch/mn10300/kernel/switch_to.S [new file with mode: 0644]
arch/mn10300/kernel/sys_mn10300.c [new file with mode: 0644]
arch/mn10300/kernel/time.c [new file with mode: 0644]
arch/mn10300/kernel/traps.c [new file with mode: 0644]
arch/mn10300/kernel/vmlinux.lds.S [new file with mode: 0644]
arch/mn10300/lib/Makefile [new file with mode: 0644]
arch/mn10300/lib/__ashldi3.S [new file with mode: 0644]
arch/mn10300/lib/__ashrdi3.S [new file with mode: 0644]
arch/mn10300/lib/__lshrdi3.S [new file with mode: 0644]
arch/mn10300/lib/ashrdi3.c [new file with mode: 0644]
arch/mn10300/lib/bitops.c [new file with mode: 0644]
arch/mn10300/lib/checksum.c [new file with mode: 0644]
arch/mn10300/lib/delay.c [new file with mode: 0644]
arch/mn10300/lib/do_csum.S [new file with mode: 0644]
arch/mn10300/lib/internal.h [new file with mode: 0644]
arch/mn10300/lib/lshrdi3.c [new file with mode: 0644]
arch/mn10300/lib/memcpy.S [new file with mode: 0644]
arch/mn10300/lib/memmove.S [new file with mode: 0644]
arch/mn10300/lib/memset.S [new file with mode: 0644]
arch/mn10300/lib/negdi2.c [new file with mode: 0644]
arch/mn10300/lib/usercopy.c [new file with mode: 0644]
arch/mn10300/mm/Makefile [new file with mode: 0644]
arch/mn10300/mm/cache-flush-mn10300.S [new file with mode: 0644]
arch/mn10300/mm/cache-mn10300.S [new file with mode: 0644]
arch/mn10300/mm/cache.c [new file with mode: 0644]
arch/mn10300/mm/dma-alloc.c [new file with mode: 0644]
arch/mn10300/mm/extable.c [new file with mode: 0644]
arch/mn10300/mm/fault.c [new file with mode: 0644]
arch/mn10300/mm/init.c [new file with mode: 0644]
arch/mn10300/mm/misalignment.c [new file with mode: 0644]
arch/mn10300/mm/mmu-context.c [new file with mode: 0644]
arch/mn10300/mm/pgtable.c [new file with mode: 0644]
arch/mn10300/mm/tlb-mn10300.S [new file with mode: 0644]
arch/mn10300/oprofile/Kconfig [new file with mode: 0644]
arch/mn10300/oprofile/Makefile [new file with mode: 0644]
arch/mn10300/oprofile/op_model_null.c [new file with mode: 0644]
arch/mn10300/proc-mn103e010/Makefile [new file with mode: 0644]
arch/mn10300/proc-mn103e010/proc-init.c [new file with mode: 0644]
arch/mn10300/unit-asb2303/Makefile [new file with mode: 0644]
arch/mn10300/unit-asb2303/flash.c [new file with mode: 0644]
arch/mn10300/unit-asb2303/leds.c [new file with mode: 0644]
arch/mn10300/unit-asb2303/smc91111.c [new file with mode: 0644]
arch/mn10300/unit-asb2303/unit-init.c [new file with mode: 0644]
arch/mn10300/unit-asb2305/Makefile [new file with mode: 0644]
arch/mn10300/unit-asb2305/leds.c [new file with mode: 0644]
arch/mn10300/unit-asb2305/pci-asb2305.c [new file with mode: 0644]
arch/mn10300/unit-asb2305/pci-asb2305.h [new file with mode: 0644]
arch/mn10300/unit-asb2305/pci-iomap.c [new file with mode: 0644]
arch/mn10300/unit-asb2305/pci-irq.c [new file with mode: 0644]
arch/mn10300/unit-asb2305/pci.c [new file with mode: 0644]
arch/mn10300/unit-asb2305/unit-init.c [new file with mode: 0644]
arch/parisc/Kconfig
arch/parisc/kernel/setup.c
arch/powerpc/mm/pgtable_32.c
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/platforms/cell/spufs/inode.c
arch/ppc/kernel/setup.c
arch/ppc/mm/pgtable.c
arch/s390/kernel/traps.c
arch/s390/mm/pgtable.c
arch/sh/Kconfig
arch/sh/kernel/cpu/sh4/sq.c
arch/sparc/Kconfig
arch/sparc/kernel/process.c
arch/sparc/kernel/setup.c
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/mm/loadmmu.c
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/sparc64/Kconfig
arch/sparc64/kernel/Makefile
arch/sparc64/kernel/binfmt_aout32.c
arch/sparc64/kernel/binfmt_elf32.c [deleted file]
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/process.c
arch/sparc64/kernel/ptrace.c
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sys_sparc.c
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/systbls.S
arch/sparc64/solaris/misc.c
arch/um/Kconfig
arch/um/Kconfig.i386
arch/um/Kconfig.x86_64
arch/um/Makefile
arch/um/defconfig
arch/um/include/as-layout.h
arch/um/include/os.h
arch/um/include/tempfile.h [deleted file]
arch/um/include/um_mmu.h
arch/um/kernel/exec.c
arch/um/kernel/ksyms.c
arch/um/kernel/mem.c
arch/um/kernel/process.c
arch/um/kernel/skas/mmu.c
arch/um/kernel/um_arch.c
arch/um/os-Linux/aio.c
arch/um/os-Linux/drivers/ethertap_kern.c
arch/um/os-Linux/drivers/tuntap_kern.c
arch/um/os-Linux/include/file.h
arch/um/os-Linux/mem.c
arch/um/os-Linux/process.c
arch/um/os-Linux/signal.c
arch/um/os-Linux/skas/process.c
arch/um/os-Linux/sys-i386/Makefile
arch/um/os-Linux/sys-i386/registers.c
arch/um/os-Linux/sys-i386/task_size.c [new file with mode: 0644]
arch/um/os-Linux/sys-x86_64/Makefile
arch/um/os-Linux/sys-x86_64/registers.c
arch/um/os-Linux/sys-x86_64/task_size.c [new file with mode: 0644]
arch/um/os-Linux/uaccess.c
arch/um/os-Linux/user_syms.c
arch/um/os-Linux/util.c
arch/v850/Kconfig
arch/v850/kernel/procfs.c
arch/x86/Kconfig
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/setup_64.c
arch/x86/kernel/time_64.c
arch/x86/mm/pgtable_32.c
arch/xtensa/Kconfig
arch/xtensa/kernel/setup.c
drivers/acpi/Kconfig
drivers/acpi/blacklist.c
drivers/acpi/osl.c
drivers/acpi/processor_perflib.c
drivers/block/Kconfig
drivers/block/Makefile
drivers/block/aoe/aoe.h
drivers/block/aoe/aoeblk.c
drivers/block/aoe/aoechr.c
drivers/block/aoe/aoecmd.c
drivers/block/aoe/aoedev.c
drivers/block/aoe/aoemain.c
drivers/block/aoe/aoenet.c
drivers/block/brd.c [new file with mode: 0644]
drivers/block/nbd.c
drivers/block/rd.c [deleted file]
drivers/char/applicom.c
drivers/char/moxa.c
drivers/char/n_tty.c
drivers/char/rocket.c
drivers/char/tty_audit.c
drivers/char/tty_io.c
drivers/char/tty_ioctl.c
drivers/firmware/dmi_scan.c
drivers/ide/ppc/mpc8xx.c
drivers/input/joystick/analog.c
drivers/isdn/capi/capifs.c
drivers/isdn/hisax/amd7930_fn.c
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/leds-atmel-pwm.c [new file with mode: 0644]
drivers/lguest/lguest_device.c
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/misc/atmel_pwm.c [new file with mode: 0644]
drivers/net/Kconfig
drivers/net/smc91x.h
drivers/parport/Kconfig
drivers/parport/ieee1284_ops.c
drivers/pci/Makefile
drivers/pci/intel-iommu.c
drivers/pci/intel-iommu.h
drivers/serial/8250.c
drivers/serial/8250_early.c
drivers/serial/8250_gsc.c
drivers/serial/8250_hp300.c
drivers/serial/8250_hub6.c
drivers/serial/8250_pci.c
drivers/serial/Kconfig
drivers/serial/atmel_serial.c
drivers/serial/serial_core.c
drivers/thermal/Kconfig
drivers/thermal/thermal.c
drivers/usb/gadget/net2280.c
drivers/video/console/Kconfig
fs/Kconfig.binfmt
fs/adfs/super.c
fs/affs/super.c
fs/afs/security.c
fs/afs/super.c
fs/aio.c
fs/autofs/inode.c
fs/autofs4/inode.c
fs/befs/linuxvfs.c
fs/binfmt_aout.c
fs/binfmt_elf.c
fs/binfmt_flat.c
fs/binfmt_som.c
fs/buffer.c
fs/char_dev.c
fs/debugfs/file.c
fs/devpts/inode.c
fs/exec.c
fs/ext2/ext2.h
fs/ext2/super.c
fs/ext3/balloc.c
fs/ext3/ialloc.c
fs/ext3/resize.c
fs/ext3/super.c
fs/ext3/xattr.c
fs/fat/inode.c
fs/fcntl.c
fs/file_table.c
fs/fs-writeback.c
fs/fuse/inode.c
fs/hfsplus/unicode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/super.c
fs/hugetlbfs/inode.c
fs/inotify_user.c
fs/isofs/inode.c
fs/isofs/isofs.h
fs/jbd/commit.c
fs/libfs.c
fs/locks.c
fs/namei.c
fs/namespace.c
fs/ncpfs/inode.c
fs/ocfs2/cluster/endian.h [deleted file]
fs/ocfs2/cluster/nodemanager.c
fs/ocfs2/dlm/dlmast.c
fs/ocfs2/endian.h [deleted file]
fs/ocfs2/ocfs2.h
fs/open.c
fs/pipe.c
fs/proc/array.c
fs/proc/base.c
fs/proc/generic.c
fs/proc/inode.c
fs/proc/internal.h
fs/proc/kcore.c
fs/proc/nommu.c
fs/proc/proc_misc.c
fs/proc/proc_net.c
fs/proc/proc_sysctl.c
fs/proc/proc_tty.c
fs/proc/root.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c
fs/proc/vmcore.c
fs/read_write.c
fs/reiserfs/procfs.c
fs/reiserfs/super.c
fs/splice.c
fs/super.c
fs/udf/balloc.c
fs/udf/crc.c
fs/udf/dir.c
fs/udf/directory.c
fs/udf/file.c
fs/udf/ialloc.c
fs/udf/inode.c
fs/udf/misc.c
fs/udf/namei.c
fs/udf/partition.c
fs/udf/super.c
fs/udf/symlink.c
fs/udf/truncate.c
fs/udf/udf_i.h
fs/udf/udf_sb.h
fs/udf/udfdecl.h
fs/udf/udftime.c
fs/udf/unicode.c
fs/ufs/balloc.c
fs/ufs/cylinder.c
fs/ufs/dir.c
fs/ufs/file.c
fs/ufs/ialloc.c
fs/ufs/inode.c
fs/ufs/namei.c
fs/ufs/super.c
fs/ufs/symlink.c
fs/ufs/truncate.c
fs/ufs/ufs_fs.h [moved from include/linux/ufs_fs.h with 99% similarity]
fs/ufs/util.c
include/asm-alpha/a.out-core.h [new file with mode: 0644]
include/asm-alpha/a.out.h
include/asm-alpha/page.h
include/asm-alpha/param.h
include/asm-alpha/pgalloc.h
include/asm-alpha/processor.h
include/asm-arm/a.out-core.h [new file with mode: 0644]
include/asm-arm/a.out.h
include/asm-arm/mutex.h
include/asm-arm/page.h
include/asm-arm/pgalloc.h
include/asm-arm/posix_types.h
include/asm-arm/processor.h
include/asm-avr32/a.out.h
include/asm-avr32/arch-at32ap/board.h
include/asm-avr32/page.h
include/asm-avr32/pgalloc.h
include/asm-avr32/posix_types.h
include/asm-avr32/processor.h
include/asm-blackfin/a.out.h
include/asm-blackfin/posix_types.h
include/asm-blackfin/processor.h
include/asm-cris/a.out.h
include/asm-cris/page.h
include/asm-cris/param.h
include/asm-cris/pgalloc.h
include/asm-cris/posix_types.h
include/asm-cris/processor.h
include/asm-frv/a.out.h [deleted file]
include/asm-frv/page.h
include/asm-frv/param.h
include/asm-frv/pgalloc.h
include/asm-frv/posix_types.h
include/asm-generic/Kbuild.asm
include/asm-generic/iomap.h
include/asm-generic/mutex-dec.h
include/asm-generic/mutex-xchg.h
include/asm-generic/termios.h
include/asm-h8300/a.out.h
include/asm-h8300/param.h
include/asm-h8300/posix_types.h
include/asm-h8300/processor.h
include/asm-ia64/a.out.h
include/asm-ia64/page.h
include/asm-ia64/pgalloc.h
include/asm-m32r/a.out.h
include/asm-m32r/page.h
include/asm-m32r/param.h
include/asm-m32r/pgalloc.h
include/asm-m32r/posix_types.h
include/asm-m32r/processor.h
include/asm-m68k/a.out-core.h [new file with mode: 0644]
include/asm-m68k/a.out.h
include/asm-m68k/motorola_pgalloc.h
include/asm-m68k/page.h
include/asm-m68k/param.h
include/asm-m68k/posix_types.h
include/asm-m68k/processor.h
include/asm-m68k/sun3_pgalloc.h
include/asm-m68knommu/param.h
include/asm-mips/a.out.h
include/asm-mips/page.h
include/asm-mips/pgalloc.h
include/asm-mips/posix_types.h
include/asm-mips/processor.h
include/asm-mn10300/.gitignore [new file with mode: 0644]
include/asm-mn10300/Kbuild [new file with mode: 0644]
include/asm-mn10300/atomic.h [new file with mode: 0644]
include/asm-mn10300/auxvec.h [new file with mode: 0644]
include/asm-mn10300/bitops.h [new file with mode: 0644]
include/asm-mn10300/bug.h [new file with mode: 0644]
include/asm-mn10300/bugs.h [new file with mode: 0644]
include/asm-mn10300/busctl-regs.h [new file with mode: 0644]
include/asm-mn10300/byteorder.h [new file with mode: 0644]
include/asm-mn10300/cache.h [new file with mode: 0644]
include/asm-mn10300/cacheflush.h [new file with mode: 0644]
include/asm-mn10300/checksum.h [new file with mode: 0644]
include/asm-mn10300/cpu-regs.h [new file with mode: 0644]
include/asm-mn10300/cputime.h [new file with mode: 0644]
include/asm-mn10300/current.h [new file with mode: 0644]
include/asm-mn10300/delay.h [new file with mode: 0644]
include/asm-mn10300/device.h [new file with mode: 0644]
include/asm-mn10300/div64.h [new file with mode: 0644]
include/asm-mn10300/dma-mapping.h [new file with mode: 0644]
include/asm-mn10300/dma.h [new file with mode: 0644]
include/asm-mn10300/dmactl-regs.h [new file with mode: 0644]
include/asm-mn10300/elf.h [new file with mode: 0644]
include/asm-mn10300/emergency-restart.h [new file with mode: 0644]
include/asm-mn10300/errno.h [new file with mode: 0644]
include/asm-mn10300/exceptions.h [new file with mode: 0644]
include/asm-mn10300/fb.h [new file with mode: 0644]
include/asm-mn10300/fcntl.h [new file with mode: 0644]
include/asm-mn10300/fpu.h [new file with mode: 0644]
include/asm-mn10300/frame.inc [new file with mode: 0644]
include/asm-mn10300/futex.h [new file with mode: 0644]
include/asm-mn10300/gdb-stub.h [new file with mode: 0644]
include/asm-mn10300/hardirq.h [new file with mode: 0644]
include/asm-mn10300/highmem.h [new file with mode: 0644]
include/asm-mn10300/hw_irq.h [new file with mode: 0644]
include/asm-mn10300/ide.h [new file with mode: 0644]
include/asm-mn10300/intctl-regs.h [new file with mode: 0644]
include/asm-mn10300/io.h [new file with mode: 0644]
include/asm-mn10300/ioctl.h [new file with mode: 0644]
include/asm-mn10300/ioctls.h [new file with mode: 0644]
include/asm-mn10300/ipc.h [new file with mode: 0644]
include/asm-mn10300/ipcbuf.h [new file with mode: 0644]
include/asm-mn10300/irq.h [new file with mode: 0644]
include/asm-mn10300/irq_regs.h [new file with mode: 0644]
include/asm-mn10300/kdebug.h [new file with mode: 0644]
include/asm-mn10300/kmap_types.h [new file with mode: 0644]
include/asm-mn10300/kprobes.h [new file with mode: 0644]
include/asm-mn10300/linkage.h [new file with mode: 0644]
include/asm-mn10300/local.h [new file with mode: 0644]
include/asm-mn10300/mc146818rtc.h [new file with mode: 0644]
include/asm-mn10300/mman.h [new file with mode: 0644]
include/asm-mn10300/mmu.h [new file with mode: 0644]
include/asm-mn10300/mmu_context.h [new file with mode: 0644]
include/asm-mn10300/module.h [new file with mode: 0644]
include/asm-mn10300/msgbuf.h [new file with mode: 0644]
include/asm-mn10300/mutex.h [new file with mode: 0644]
include/asm-mn10300/namei.h [new file with mode: 0644]
include/asm-mn10300/nmi.h [new file with mode: 0644]
include/asm-mn10300/page.h [new file with mode: 0644]
include/asm-mn10300/page_offset.h [new file with mode: 0644]
include/asm-mn10300/param.h [new file with mode: 0644]
include/asm-mn10300/pci.h [new file with mode: 0644]
include/asm-mn10300/percpu.h [new file with mode: 0644]
include/asm-mn10300/pgalloc.h [new file with mode: 0644]
include/asm-mn10300/pgtable.h [new file with mode: 0644]
include/asm-mn10300/pio-regs.h [new file with mode: 0644]
include/asm-mn10300/poll.h [new file with mode: 0644]
include/asm-mn10300/posix_types.h [new file with mode: 0644]
include/asm-mn10300/proc-mn103e010/cache.h [new file with mode: 0644]
include/asm-mn10300/proc-mn103e010/clock.h [new file with mode: 0644]
include/asm-mn10300/proc-mn103e010/irq.h [new file with mode: 0644]
include/asm-mn10300/proc-mn103e010/proc.h [new file with mode: 0644]
include/asm-mn10300/processor.h [new file with mode: 0644]
include/asm-mn10300/ptrace.h [new file with mode: 0644]
include/asm-mn10300/reset-regs.h [new file with mode: 0644]
include/asm-mn10300/resource.h [new file with mode: 0644]
include/asm-mn10300/rtc-regs.h [new file with mode: 0644]
include/asm-mn10300/rtc.h [new file with mode: 0644]
include/asm-mn10300/scatterlist.h [new file with mode: 0644]
include/asm-mn10300/sections.h [new file with mode: 0644]
include/asm-mn10300/semaphore.h [new file with mode: 0644]
include/asm-mn10300/sembuf.h [new file with mode: 0644]
include/asm-mn10300/serial-regs.h [new file with mode: 0644]
include/asm-mn10300/serial.h [new file with mode: 0644]
include/asm-mn10300/setup.h [new file with mode: 0644]
include/asm-mn10300/shmbuf.h [new file with mode: 0644]
include/asm-mn10300/shmparam.h [new file with mode: 0644]
include/asm-mn10300/sigcontext.h [new file with mode: 0644]
include/asm-mn10300/siginfo.h [new file with mode: 0644]
include/asm-mn10300/signal.h [new file with mode: 0644]
include/asm-mn10300/smp.h [new file with mode: 0644]
include/asm-mn10300/socket.h [new file with mode: 0644]
include/asm-mn10300/sockios.h [new file with mode: 0644]
include/asm-mn10300/spinlock.h [new file with mode: 0644]
include/asm-mn10300/stat.h [new file with mode: 0644]
include/asm-mn10300/statfs.h [new file with mode: 0644]
include/asm-mn10300/string.h [new file with mode: 0644]
include/asm-mn10300/system.h [new file with mode: 0644]
include/asm-mn10300/termbits.h [new file with mode: 0644]
include/asm-mn10300/termios.h [new file with mode: 0644]
include/asm-mn10300/thread_info.h [new file with mode: 0644]
include/asm-mn10300/timer-regs.h [new file with mode: 0644]
include/asm-mn10300/timex.h [new file with mode: 0644]
include/asm-mn10300/tlb.h [new file with mode: 0644]
include/asm-mn10300/tlbflush.h [new file with mode: 0644]
include/asm-mn10300/topology.h [new file with mode: 0644]
include/asm-mn10300/types.h [new file with mode: 0644]
include/asm-mn10300/uaccess.h [new file with mode: 0644]
include/asm-mn10300/ucontext.h [new file with mode: 0644]
include/asm-mn10300/unaligned.h [new file with mode: 0644]
include/asm-mn10300/unistd.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2303/clock.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2303/leds.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2303/serial.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2303/smc91111.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2303/timex.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2305/clock.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2305/leds.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2305/serial.h [new file with mode: 0644]
include/asm-mn10300/unit-asb2305/timex.h [new file with mode: 0644]
include/asm-mn10300/user.h [new file with mode: 0644]
include/asm-mn10300/vga.h [new file with mode: 0644]
include/asm-mn10300/xor.h [new file with mode: 0644]
include/asm-parisc/a.out.h
include/asm-parisc/page.h
include/asm-parisc/pgalloc.h
include/asm-parisc/posix_types.h
include/asm-parisc/processor.h
include/asm-powerpc/a.out.h
include/asm-powerpc/page.h
include/asm-powerpc/pgalloc-32.h
include/asm-powerpc/pgalloc-64.h
include/asm-powerpc/posix_types.h
include/asm-powerpc/processor.h
include/asm-ppc/pgalloc.h
include/asm-s390/a.out.h
include/asm-s390/ioctls.h
include/asm-s390/page.h
include/asm-s390/pgalloc.h
include/asm-s390/processor.h
include/asm-s390/termbits.h
include/asm-s390/termios.h
include/asm-s390/tlb.h
include/asm-sh/a.out.h
include/asm-sh/page.h
include/asm-sh/pgalloc.h
include/asm-sh/processor_32.h
include/asm-sh/processor_64.h
include/asm-sparc/a.out-core.h [new file with mode: 0644]
include/asm-sparc/a.out.h
include/asm-sparc/page.h
include/asm-sparc/param.h
include/asm-sparc/pgalloc.h
include/asm-sparc/posix_types.h
include/asm-sparc/processor.h
include/asm-sparc/uaccess.h
include/asm-sparc64/a.out-core.h [new file with mode: 0644]
include/asm-sparc64/a.out.h
include/asm-sparc64/elf.h
include/asm-sparc64/page.h
include/asm-sparc64/pgalloc.h
include/asm-sparc64/posix_types.h
include/asm-sparc64/processor.h
include/asm-sparc64/ptrace.h
include/asm-sparc64/uaccess.h
include/asm-sparc64/user.h
include/asm-um/a.out-core.h [new file with mode: 0644]
include/asm-um/a.out.h
include/asm-um/fixmap.h
include/asm-um/page.h
include/asm-um/pgalloc.h
include/asm-um/processor-generic.h
include/asm-um/processor-x86_64.h
include/asm-v850/anna.h
include/asm-v850/as85ep1.h
include/asm-v850/fpga85e2c.h
include/asm-v850/param.h
include/asm-v850/posix_types.h
include/asm-v850/rte_cb.h
include/asm-v850/sim.h
include/asm-v850/sim85e2.h
include/asm-x86/a.out-core.h [new file with mode: 0644]
include/asm-x86/a.out.h
include/asm-x86/page_32.h
include/asm-x86/page_64.h
include/asm-x86/pgalloc_32.h
include/asm-x86/pgalloc_64.h
include/asm-x86/posix_types_32.h
include/asm-x86/processor.h
include/asm-xtensa/a.out.h
include/asm-xtensa/page.h
include/asm-xtensa/param.h
include/asm-xtensa/pgalloc.h
include/asm-xtensa/posix_types.h
include/asm-xtensa/processor.h
include/linux/Kbuild
include/linux/a.out.h
include/linux/atmel_pwm.h [new file with mode: 0644]
include/linux/byteorder/generic.h
include/linux/cpuset.h
include/linux/dmar.h
include/linux/dmi.h
include/linux/elf-em.h
include/linux/fs.h
include/linux/hrtimer.h
include/linux/hugetlb.h
include/linux/ipc.h
include/linux/ipc_namespace.h [new file with mode: 0644]
include/linux/irq.h
include/linux/jiffies.h
include/linux/kernel.h
include/linux/mm.h
include/linux/module.h
include/linux/mutex.h
include/linux/nbd.h
include/linux/pfkeyv2.h
include/linux/pid.h
include/linux/pid_namespace.h
include/linux/preempt.h
include/linux/proc_fs.h
include/linux/ptrace.h
include/linux/rcupreempt.h
include/linux/reiserfs_fs.h
include/linux/sched.h
include/linux/serial_core.h
include/linux/shmem_fs.h
include/linux/signal.h
include/linux/spinlock.h
include/linux/time.h
include/linux/timer.h
include/linux/types.h
include/linux/udf_fs.h
include/linux/udf_fs_sb.h
include/linux/utsname.h
include/net/ip6_fib.h
include/net/ip6_route.h
include/net/netfilter/nf_conntrack_extend.h
include/net/tipc/tipc_msg.h
init/Kconfig
init/main.c
ipc/Makefile
ipc/ipc_sysctl.c
ipc/mqueue.c
ipc/msg.c
ipc/namespace.c [new file with mode: 0644]
ipc/sem.c
ipc/shm.c
ipc/util.c
ipc/util.h
kernel/Makefile
kernel/cpu.c
kernel/cpuset.c
kernel/exit.c
kernel/fork.c
kernel/irq/chip.c
kernel/irq/handle.c
kernel/itimer.c
kernel/module.c
kernel/mutex-debug.c
kernel/mutex.c
kernel/nsproxy.c
kernel/params.c
kernel/pid.c
kernel/pid_namespace.c [new file with mode: 0644]
kernel/posix-cpu-timers.c
kernel/posix-timers.c
kernel/printk.c
kernel/profile.c
kernel/ptrace.c
kernel/rtmutex-debug.c
kernel/rtmutex_common.h
kernel/sched.c
kernel/signal.c
kernel/softirq.c
kernel/sys.c
kernel/sysctl.c
kernel/sysctl_check.c
kernel/time.c
kernel/time/clockevents.c
kernel/time/clocksource.c
kernel/time/tick-sched.c
kernel/time/timekeeping.c
kernel/timeconst.pl [new file with mode: 0644]
kernel/timer.c
kernel/user.c
kernel/user_namespace.c
kernel/wait.c
kernel/workqueue.c
lib/Kconfig.debug
lib/fault-inject.c
lib/iomap.c
lib/rwsem-spinlock.c
lib/semaphore-sleepers.c
lib/vsprintf.c
mm/filemap.c
mm/filemap_xip.c
mm/hugetlb.c
mm/memory.c
mm/page_alloc.c
mm/shmem.c
mm/vmalloc.c
net/Kconfig
net/can/af_can.c
net/can/raw.c
net/core/flow.c
net/decnet/dn_route.c
net/ipv4/netfilter/nf_nat_core.c
net/ipv4/route.c
net/iucv/af_iucv.c
net/iucv/iucv.c
net/netfilter/nf_conntrack_extend.c
net/netfilter/nf_conntrack_proto_tcp.c
net/netfilter/xt_iprange.c
net/sched/em_meta.c
net/tipc/addr.h
net/tipc/bcast.h
net/tipc/msg.h
net/tipc/socket.c
net/xfrm/xfrm_algo.c
scripts/checkpatch.pl
sound/oss/swarm_cs4297a.c
sound/oss/trident.c
virt/kvm/kvm_main.c

index d6cb1a86fd61ebcdf05b95d95e5517a891b2e63c..40121b5cca14cab3993000c53078ef2d8484f001 100644 (file)
@@ -168,7 +168,7 @@ int get_family_id(int sd)
                char buf[256];
        } ans;
 
-       int id, rc;
+       int id = 0, rc;
        struct nlattr *na;
        int rep_len;
 
@@ -209,7 +209,7 @@ void print_delayacct(struct taskstats *t)
 void task_context_switch_counts(struct taskstats *t)
 {
        printf("\n\nTask   %15s%15s\n"
-              "       %15lu%15lu\n",
+              "       %15llu%15llu\n",
               "voluntary", "nonvoluntary",
               t->nvcsw, t->nivcsw);
 }
@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
                        goto done;
                }
 
-               PRINTF("nlmsghdr size=%d, nlmsg_len=%d, rep_len=%d\n",
+               PRINTF("nlmsghdr size=%zu, nlmsg_len=%d, rep_len=%d\n",
                       sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len);
 
 
index 97374aacacb29120b5dfc8f788e4a9516584c8ed..44c0ab7024328d4229ef7609c2ae34aa4e730a1f 100644 (file)
@@ -29,6 +29,8 @@ rm -f $dir/interfaces
 mknod -m 0200 $dir/interfaces c $MAJOR 4
 rm -f $dir/revalidate
 mknod -m 0200 $dir/revalidate c $MAJOR 5
+rm -f $dir/flush
+mknod -m 0200 $dir/flush c $MAJOR 6
 
 export n_partitions
 mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'`
index 6449911c6a717d1b9ab8117c078e4f5f833b8557..15e86f58c0365974f8e550b74632010c951a1972 100644 (file)
@@ -23,7 +23,10 @@ fi
 # /etc/udev/rules.d
 #
 rules_d="`sed -n '/^udev_rules=/{ s!udev_rules=!!; s!\"!!g; p; }' $conf`"
-if test -z "$rules_d" || test ! -d "$rules_d"; then
+if test -z "$rules_d" ; then
+       rules_d=/etc/udev/rules.d
+fi
+if test ! -d "$rules_d"; then
        echo "$me Error: cannot find udev rules directory" 1>&2
        exit 1
 fi
index a7ed1dc4f331150e38793cd07439d80e7b1f643f..8686e789542ed0b6f3ccce8f54b1ef794c2f7fe4 100644 (file)
@@ -1,6 +1,7 @@
 # These rules tell udev what device nodes to create for aoe support.
-# They may be installed along the following lines (adjusted to what
-# you see on your system).
+# They may be installed along the following lines.  Check the section
+# 8 udev manpage to see whether your udev supports SUBSYSTEM, and
+# whether it uses one or two equal signs for SUBSYSTEM and KERNEL.
 # 
 #   ecashin@makki ~$ su
 #   Password:
 #  
 
 # aoe char devices
-SUBSYSTEM="aoe", KERNEL="discover",    NAME="etherd/%k", GROUP="disk", MODE="0220"
-SUBSYSTEM="aoe", KERNEL="err",         NAME="etherd/%k", GROUP="disk", MODE="0440"
-SUBSYSTEM="aoe", KERNEL="interfaces",  NAME="etherd/%k", GROUP="disk", MODE="0220"
-SUBSYSTEM="aoe", KERNEL="revalidate",  NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM=="aoe", KERNEL=="discover",  NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM=="aoe", KERNEL=="err",       NAME="etherd/%k", GROUP="disk", MODE="0440"
+SUBSYSTEM=="aoe", KERNEL=="interfaces",        NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM=="aoe", KERNEL=="revalidate",        NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM=="aoe", KERNEL=="flush",     NAME="etherd/%k", GROUP="disk", MODE="0220"
 
 # aoe block devices     
-KERNEL="etherd*",       NAME="%k", GROUP="disk"
+KERNEL=="etherd*",       NAME="%k", GROUP="disk"
index 17b1659bd3f8d6975245e9a99caddfda31aef7da..ce9503c892b525ea69ff41a5aec2f9c16cd65c71 100644 (file)
@@ -99,17 +99,6 @@ Who: Eric Biederman <ebiederm@xmission.com>
 
 ---------------------------
 
-What:  a.out interpreter support for ELF executables
-When:  2.6.25
-Files: fs/binfmt_elf.c
-Why:   Using a.out interpreters for ELF executables was a feature for
-       transition from a.out to ELF. But now it is unlikely to be still
-       needed anymore and removing it would simplify the hairy ELF
-       loader code.
-Who:   Andi Kleen <ak@suse.de>
-
----------------------------
-
 What:  remove EXPORT_SYMBOL(kernel_thread)
 When:  August 2006
 Files: arch/*/kernel/*_ksyms.c
@@ -192,14 +181,6 @@ Who:       Len Brown <len.brown@intel.com>
 
 ---------------------------
 
-What:  'time' kernel boot parameter
-When:  January 2008
-Why:   replaced by 'printk.time=<value>' so that printk timestamps can be
-       enabled or disabled as needed
-Who:   Randy Dunlap <randy.dunlap@oracle.com>
-
----------------------------
-
 What: libata spindown skipping and warning
 When: Dec 2008
 Why:  Some halt(8) implementations synchronize caches for and spin
index 758e50401c1635654fa073d9f9bcc8931ad8b9af..6973b980ca2a004ec9b5b7436ca1521fc5df9c67 100644 (file)
@@ -24,6 +24,7 @@ Mount options unique to the isofs filesystem.
   map=normal    Map non-Rock Ridge filenames to lower case
   map=acorn     As map=normal but also apply Acorn extensions if present
   mode=xxx      Sets the permissions on files to xxx
+  dmode=xxx     Sets the permissions on directories to xxx
   nojoliet      Ignore Joliet extensions if they are present.
   norock        Ignore Rock Ridge extensions if they are present.
   hide         Completely strip hidden files from the file system.
index bd55038b56f5464df637c618abe0a06318f39e72..81e5be6e6e356e8ab3feb4e92b972fd0862db1a9 100644 (file)
@@ -151,7 +151,7 @@ The get_sb() method has the following arguments:
   const char *dev_name: the device name we are mounting.
 
   void *data: arbitrary mount options, usually comes as an ASCII
-       string
+       string (see "Mount Options" section)
 
   struct vfsmount *mnt: a vfs-internal representation of a mount point
 
@@ -182,7 +182,7 @@ A fill_super() method implementation has the following arguments:
        must initialize this properly.
 
   void *data: arbitrary mount options, usually comes as an ASCII
-       string
+       string (see "Mount Options" section)
 
   int silent: whether or not to be silent on error
 
@@ -291,7 +291,8 @@ or bottom half).
 
   umount_begin: called when the VFS is unmounting a filesystem.
 
-  show_options: called by the VFS to show mount options for /proc/<pid>/mounts.
+  show_options: called by the VFS to show mount options for
+       /proc/<pid>/mounts.  (see "Mount Options" section)
 
   quota_read: called by the VFS to read from filesystem quota file.
 
@@ -969,6 +970,49 @@ manipulate dentries:
 For further information on dentry locking, please refer to the document
 Documentation/filesystems/dentry-locking.txt.
 
+Mount Options
+=============
+
+Parsing options
+---------------
+
+On mount and remount the filesystem is passed a string containing a
+comma separated list of mount options.  The options can have either of
+these forms:
+
+  option
+  option=value
+
+The <linux/parser.h> header defines an API that helps parse these
+options.  There are plenty of examples on how to use it in existing
+filesystems.
+
+Showing options
+---------------
+
+If a filesystem accepts mount options, it must define show_options()
+to show all the currently active options.  The rules are:
+
+  - options MUST be shown which are not default or their values differ
+    from the default
+
+  - options MAY be shown which are enabled by default or have their
+    default value
+
+Options used only internally between a mount helper and the kernel
+(such as file descriptors), or which only have an effect during the
+mounting (such as ones controlling the creation of a journal) are exempt
+from the above rules.
+
+The underlying reason for the above rules is to make sure, that a
+mount can be accurately replicated (e.g. umounting and mounting again)
+based on the information found in /proc/mounts.
+
+A simple method of saving options at mount/remount time and showing
+them is provided with the save_mount_options() and
+generic_show_options() helper functions.  Please note, that using
+these may have drawbacks.  For more info see header comments for these
+functions in fs/namespace.c.
 
 Resources
 =========
index 0dcbd266b44280188b8b3469d49c4c62b40e6934..a4fc7fc21439404c27a12bf718592bf0bf75c3d4 100644 (file)
@@ -1973,9 +1973,6 @@ and is between 256 and 4096 characters. It is defined in the file
                        <deci-seconds>: poll all this frequency
                        0: no polling (default)
 
-       time            Show timing data prefixed to each printk message line
-                       [deprecated, see 'printk.time']
-
        tipar.timeout=  [HW,PPT]
                        Set communications timeout in tenths of a second
                        (default 15).
diff --git a/Documentation/mn10300/ABI.txt b/Documentation/mn10300/ABI.txt
new file mode 100644 (file)
index 0000000..1fef1f0
--- /dev/null
@@ -0,0 +1,149 @@
+                          =========================
+                          MN10300 FUNCTION CALL ABI
+                          =========================
+
+=======
+GENERAL
+=======
+
+The MN10300/AM33 kernel runs in little-endian mode; big-endian mode is not
+supported.
+
+The stack grows downwards, and should always be 32-bit aligned. There are
+separate stack pointer registers for userspace and the kernel.
+
+
+================
+ARGUMENT PASSING
+================
+
+The first two arguments (assuming up to 32-bits per argument) to a function are
+passed in the D0 and D1 registers respectively; all other arguments are passed
+on the stack.
+
+If 64-bit arguments are being passed, then they are never split between
+registers and the stack. If the first argument is a 64-bit value, it will be
+passed in D0:D1. If the first argument is not a 64-bit value, but the second
+is, the second will be passed entirely on the stack and D1 will be unused.
+
+Arguments smaller than 32-bits are not coelesced within a register or a stack
+word. For example, two byte-sized arguments will always be passed in separate
+registers or word-sized stack slots.
+
+
+=================
+CALLING FUNCTIONS
+=================
+
+The caller must allocate twelve bytes on the stack for the callee's use before
+it inserts a CALL instruction. The CALL instruction will write into the TOS
+word, but won't actually modify the stack pointer; similarly, the RET
+instruction reads from the TOS word of the stack, but doesn't move the stack
+pointer beyond it.
+
+
+       Stack:
+       |               |
+       |               |
+       |---------------| SP+20
+       | 4th Arg       |
+       |---------------| SP+16
+       | 3rd Arg       |
+       |---------------| SP+12
+       | D1 Save Slot  |
+       |---------------| SP+8
+       | D0 Save Slot  |
+       |---------------| SP+4
+       | Return Addr   |
+       |---------------| SP
+       |               |
+       |               |
+
+
+The caller must leave space on the stack (hence an allocation of twelve bytes)
+in which the callee may store the first two arguments.
+
+
+============
+RETURN VALUE
+============
+
+The return value is passed in D0 for an integer (or D0:D1 for a 64-bit value),
+or A0 for a pointer.
+
+If the return value is a value larger than 64-bits, or is a structure or an
+array, then a hidden first argument will be passed to the callee by the caller:
+this will point to a piece of memory large enough to hold the result of the
+function. In this case, the callee will return the value in that piece of
+memory, and no value will be returned in D0 or A0.
+
+
+===================
+REGISTER CLOBBERING
+===================
+
+The values in certain registers may be clobbered by the callee, and other
+values must be saved:
+
+       Clobber:        D0-D1, A0-A1, E0-E3
+       Save:           D2-D3, A2-A3, E4-E7, SP
+
+All other non-supervisor-only registers are clobberable (such as MDR, MCRL,
+MCRH).
+
+
+=================
+SPECIAL REGISTERS
+=================
+
+Certain ordinary registers may carry special usage for the compiler:
+
+       A3:     Frame pointer
+       E2:     TLS pointer
+
+
+==========
+KERNEL ABI
+==========
+
+The kernel may use a slightly different ABI internally.
+
+ (*) E2
+
+     If CONFIG_MN10300_CURRENT_IN_E2 is defined, then the current task pointer
+     will be kept in the E2 register, and that register will be marked
+     unavailable for the compiler to use as a scratch register.
+
+     Normally the kernel uses something like:
+
+       MOV     SP,An
+       AND     0xFFFFE000,An
+       MOV     (An),Rm         // Rm holds current
+       MOV     (yyy,Rm)        // Access current->yyy
+
+     To find the address of current; but since this option permits current to
+     be carried globally in an register, it can use:
+
+       MOV     (yyy,E2)        // Access current->yyy
+
+     instead.
+
+
+===============
+SYSTEM CALL ABI
+===============
+
+System calls are called with the following convention:
+
+       REGISTER        ENTRY                   EXIT
+       =============== ======================= =======================
+       D0              Syscall number          Return value
+       A0              1st syscall argument    Saved
+       D1              2nd syscall argument    Saved
+       A3              3rd syscall argument    Saved
+       A2              4th syscall argument    Saved
+       D3              5th syscall argument    Saved
+       D2              6th syscall argument    Saved
+
+All other registers are saved.  The layout is a consequence of the way the MOVM
+instruction stores registers onto the stack.
diff --git a/Documentation/mn10300/compartmentalisation.txt b/Documentation/mn10300/compartmentalisation.txt
new file mode 100644 (file)
index 0000000..8958b51
--- /dev/null
@@ -0,0 +1,60 @@
+                  =========================================
+                  PART-SPECIFIC SOURCE COMPARTMENTALISATION
+                  =========================================
+
+The sources for various parts are compartmentalised at two different levels:
+
+ (1) Processor level
+
+     The "processor level" is a CPU core plus the other on-silicon
+     peripherals.
+
+     Processor-specific header files are divided among directories in a similar
+     way to the CPU level:
+
+       (*) include/asm-mn10300/proc-mn103e010/
+
+           Support for the AM33v2 CPU core.
+
+     The appropriate processor is selected by a CONFIG_MN10300_PROC_YYYY option
+     from the "Processor support" choice menu in the arch/mn10300/Kconfig file.
+
+
+ (2) Unit level
+
+     The "unit level" is a processor plus all the external peripherals
+     controlled by that processor.
+
+     Unit-specific header files are divided among directories in a similar way
+     to the CPU level; not only that, but specific sources may also be
+     segregated into separate directories under the arch directory:
+
+       (*) include/asm-mn10300/unit-asb2303/
+       (*) arch/mn10300/unit-asb2303/
+
+           Support for the ASB2303 board with an ASB2308 daughter board.
+
+       (*) include/asm-mn10300/unit-asb2305/
+       (*) arch/mn10300/unit-asb2305/
+
+           Support for the ASB2305 board.
+
+     The appropriate processor is selected by a CONFIG_MN10300_UNIT_ZZZZ option
+     from the "Unit type" choice menu in the arch/mn10300/Kconfig file.
+
+
+============
+COMPILE TIME
+============
+
+When the kernel is compiled, symbolic links will be made in the asm header file
+directory for this arch:
+
+       include/asm-mn10300/proc => include/asm-mn10300/proc-YYYY/
+       include/asm-mn10300/unit => include/asm-mn10300/unit-ZZZZ/
+
+So that the header files contained in those directories can be accessed without
+lots of #ifdef-age.
+
+The appropriate arch/mn10300/unit-ZZZZ directory will also be entered by the
+compilation process; all other unit-specific directories will be ignored.
index 5776e090359d028e614d251b7a72d727bb95d063..ba9c2da5a8c200fbb6a27b84c7a2f85a441e979d 100644 (file)
@@ -14,7 +14,7 @@ The generic thermal sysfs provides a set of interfaces for thermal zone devices
 and thermal cooling devices (fan, processor...) to register with the thermal management
 solution and to be a part of it.
 
-This how-to focusses on enabling new thermal zone and cooling devices to participate
+This how-to focuses on enabling new thermal zone and cooling devices to participate
 in thermal management.
 This solution is platform independent and any type of thermal zone devices and
 cooling devices should be able to make use of the infrastructure.
@@ -41,9 +41,9 @@ and throttle appropriate devices.
        name: the thermal zone name.
        trips: the total number of trip points this thermal zone supports.
        devdata: device private data
-       ops: thermal zone device callbacks.
+       ops: thermal zone device call-backs.
                .bind: bind the thermal zone device with a thermal cooling device.
-               .unbind: unbing the thermal zone device with a thermal cooling device.
+               .unbind: unbind the thermal zone device with a thermal cooling device.
                .get_temp: get the current temperature of the thermal zone.
                .get_mode: get the current mode (user/kernel) of the thermal zone.
                           "kernel" means thermal management is done in kernel.
@@ -69,7 +69,7 @@ and throttle appropriate devices.
        It tries to bind itself to all the thermal zone devices register at the same time.
        name: the cooling device name.
        devdata: device private data.
-       ops: thermal cooling devices callbacks.
+       ops: thermal cooling devices call-backs.
                .get_max_state: get the Maximum throttle state of the cooling device.
                .get_cur_state: get the Current throttle state of the cooling device.
                .set_cur_state: set the Current throttle state of the cooling device.
@@ -109,7 +109,6 @@ RO  read only value
 RW     read/write value
 
 All thermal sysfs attributes will be represented under /sys/class/thermal
-/sys/class/thermal/
 
 Thermal zone device sys I/F, created once it's registered:
 |thermal_zone[0-*]:
@@ -129,7 +128,7 @@ Thermal cooling device sys I/F, created once it's registered:
 These two dynamic attributes are created/removed in pairs.
 They represent the relationship between a thermal zone and its associated cooling device.
 They are created/removed for each
-thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful exection.
+thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful execution.
 
 |thermal_zone[0-*]
        |-----cdev[0-*]:                The [0-*]th cooling device in the current thermal zone
@@ -147,11 +146,11 @@ type                              Strings which represent the thermal zone type.
                                Optional
 
 temp                           Current temperature as reported by thermal zone (sensor)
-                               Unit: degree celsius
+                               Unit: degree Celsius
                                RO
                                Required
 
-mode                           One of the predifned values in [kernel, user]
+mode                           One of the predefined values in [kernel, user]
                                This file gives information about the algorithm
                                that is currently managing the thermal zone.
                                It can be either default kernel based algorithm
@@ -164,12 +163,12 @@ mode                              One of the predifned values in [kernel, user]
                                          charge of the thermal management.
 
 trip_point_[0-*]_temp          The temperature above which trip point will be fired
-                               Unit: degree celsius
+                               Unit: degree Celsius
                                RO
                                Optional
 
 trip_point_[0-*]_type          Strings which indicate the type of the trip point
-                               Eg. it can be one of critical, hot, passive,
+                               E.g. it can be one of critical, hot, passive,
                                    active[0-*] for ACPI thermal zone.
                                RO
                                Optional
@@ -179,7 +178,7 @@ cdev[0-*]                   Sysfs link to the thermal cooling device node where the sys I/F
                                RO
                                Optional
 
-cdev[0-*]_trip_point           The trip point with which cdev[0-*] is assocated in this thermal zone
+cdev[0-*]_trip_point           The trip point with which cdev[0-*] is associated in this thermal zone
                                -1 means the cooling device is not associated with any trip point.
                                RO
                                Optional
@@ -211,7 +210,7 @@ cur_state                   The current cooling state of this cooling device.
 
 ACPI thermal zone may support multiple trip points like critical/hot/passive/active.
 If an ACPI thermal zone supports critical, passive, active[0] and active[1] at the same time,
-it may register itself as a thermale_zone_device (thermal_zone1) with 4 trip points in all.
+it may register itself as a thermal_zone_device (thermal_zone1) with 4 trip points in all.
 It has one processor and one fan, which are both registered as thermal_cooling_device.
 If the processor is listed in _PSL method, and the fan is listed in _AL0 method,
 the sys I/F structure will be built like this:
index 2cdb591ac0807d6b5b1b6f10702ad5542c91f29f..a24631f4eab186236001b7b4b3b90798236206e2 100644 (file)
@@ -688,6 +688,12 @@ W: http://www.atmel.com/products/AT91/
 W:     http://www.at91.com/
 S:     Maintained
 
+ATMEL AT91 / AT32 SERIAL DRIVER
+P:     Haavard Skinnemoen
+M:     hskinnemoen@atmel.com
+L:     linux-kernel@vger.kernel.org
+S:     Supported
+
 ATMEL LCDFB DRIVER
 P:     Nicolas Ferre
 M:     nicolas.ferre@atmel.com
@@ -2614,6 +2620,15 @@ L:       linux-kernel@vger.kernel.org
 W:     http://www.linux-mm.org
 S:     Maintained
 
+MEI MN10300/AM33 PORT
+P:     David Howells
+M:     dhowells@redhat.com
+P:     Koichi Yasutake
+M:     yasutake.koichi@jp.panasonic.com
+L:     linux-am33-list@redhat.com
+W:     ftp://ftp.redhat.com/pub/redhat/gnupro/AM33/
+S:     Maintained
+
 MEMORY TECHNOLOGY DEVICES (MTD)
 P:     David Woodhouse
 M:     dwmw2@infradead.org
@@ -3245,6 +3260,11 @@ W:       http://rt2x00.serialmonkey.com/
 S:     Maintained
 F:     drivers/net/wireless/rt2x00/
 
+RAMDISK RAM BLOCK DEVICE DRIVER
+P:     Nick Piggin
+M:     npiggin@suse.de
+S:     Maintained
+
 RANDOM NUMBER DRIVER
 P:     Matt Mackall
 M:     mpm@selenic.com
@@ -3881,8 +3901,8 @@ L:        linux-scsi@vger.kernel.org
 S:     Maintained
 
 UDF FILESYSTEM
-P:     Ben Fennema
-M:     bfennema@falcon.csc.calpoly.edu
+P:     Jan Kara
+M:     jack@suse.cz
 W:     http://linux-udf.sourceforge.net
 S:     Maintained
 
index 01b10ab588a630b36c0290448ffa53d29bf03dfc..5b7dcd5a0e75b663e709b093bc2f4f21fb3d49b8 100644 (file)
@@ -67,6 +67,9 @@ config AUTO_IRQ_AFFINITY
        depends on SMP
        default y
 
+config ARCH_SUPPORTS_AOUT
+       def_bool y
+
 source "init/Kconfig"
 
 
@@ -612,6 +615,11 @@ config VERBOSE_MCHECK_ON
 
          Take the default (1) unless you want more control or more info.
 
+config HZ
+       int
+       default 1200 if ALPHA_RAWHIDE
+       default 1024
+
 source "drivers/pci/Kconfig"
 source "drivers/eisa/Kconfig"
 
index 72f9a619a66d8055b03df676979b0645879c7160..973c5c3705e3f08d2669d08f1a15ae0df44c85b8 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/utsname.h>
 #include <linux/time.h>
 #include <linux/timex.h>
index 92b61629fe3f5787fe11c2ed2eb319619524ebcb..96ed82fd9eef94b775de953ff41872cbdc266f3e 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/utsname.h>
 #include <linux/time.h>
 #include <linux/major.h>
@@ -317,68 +316,6 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
        return 0;
 }
 
-/*
- * Fill in the user structure for an ECOFF core dump.
- */
-void
-dump_thread(struct pt_regs * pt, struct user * dump)
-{
-       /* switch stack follows right below pt_regs: */
-       struct switch_stack * sw = ((struct switch_stack *) pt) - 1;
-
-       dump->magic = CMAGIC;
-       dump->start_code  = current->mm->start_code;
-       dump->start_data  = current->mm->start_data;
-       dump->start_stack = rdusp() & ~(PAGE_SIZE - 1);
-       dump->u_tsize = ((current->mm->end_code - dump->start_code)
-                        >> PAGE_SHIFT);
-       dump->u_dsize = ((current->mm->brk + PAGE_SIZE-1 - dump->start_data)
-                        >> PAGE_SHIFT);
-       dump->u_ssize = (current->mm->start_stack - dump->start_stack
-                        + PAGE_SIZE-1) >> PAGE_SHIFT;
-
-       /*
-        * We store the registers in an order/format that is
-        * compatible with DEC Unix/OSF/1 as this makes life easier
-        * for gdb.
-        */
-       dump->regs[EF_V0]  = pt->r0;
-       dump->regs[EF_T0]  = pt->r1;
-       dump->regs[EF_T1]  = pt->r2;
-       dump->regs[EF_T2]  = pt->r3;
-       dump->regs[EF_T3]  = pt->r4;
-       dump->regs[EF_T4]  = pt->r5;
-       dump->regs[EF_T5]  = pt->r6;
-       dump->regs[EF_T6]  = pt->r7;
-       dump->regs[EF_T7]  = pt->r8;
-       dump->regs[EF_S0]  = sw->r9;
-       dump->regs[EF_S1]  = sw->r10;
-       dump->regs[EF_S2]  = sw->r11;
-       dump->regs[EF_S3]  = sw->r12;
-       dump->regs[EF_S4]  = sw->r13;
-       dump->regs[EF_S5]  = sw->r14;
-       dump->regs[EF_S6]  = sw->r15;
-       dump->regs[EF_A3]  = pt->r19;
-       dump->regs[EF_A4]  = pt->r20;
-       dump->regs[EF_A5]  = pt->r21;
-       dump->regs[EF_T8]  = pt->r22;
-       dump->regs[EF_T9]  = pt->r23;
-       dump->regs[EF_T10] = pt->r24;
-       dump->regs[EF_T11] = pt->r25;
-       dump->regs[EF_RA]  = pt->r26;
-       dump->regs[EF_T12] = pt->r27;
-       dump->regs[EF_AT]  = pt->r28;
-       dump->regs[EF_SP]  = rdusp();
-       dump->regs[EF_PS]  = pt->ps;
-       dump->regs[EF_PC]  = pt->pc;
-       dump->regs[EF_GP]  = pt->gp;
-       dump->regs[EF_A0]  = pt->r16;
-       dump->regs[EF_A1]  = pt->r17;
-       dump->regs[EF_A2]  = pt->r18;
-       memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8);
-}
-EXPORT_SYMBOL(dump_thread);
-
 /*
  * Fill in the user structure for a ELF core dump.
  */
index 74c3466256586800730be7e19c94421a2050b877..a449e999027c8e663af133f956996c94a70197fc 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/screen_info.h>
 #include <linux/delay.h>
 #include <linux/mc146818rtc.h>
@@ -1472,7 +1471,7 @@ c_stop(struct seq_file *f, void *v)
 {
 }
 
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start  = c_start,
        .next   = c_next,
        .stop   = c_stop,
index e19e7744e366a3a8d14bbb7aa7fb5ab4d0d13986..4127af93c5f373fdf31e81f4d748bf60decc514a 100644 (file)
@@ -126,6 +126,9 @@ config GENERIC_CALIBRATE_DELAY
        bool
        default y
 
+config ARCH_SUPPORTS_AOUT
+       def_bool y
+
 config ARCH_MAY_HAVE_PC_FDC
        bool
 
index 4f1a03124a74ae4a543df710a8c3e6af3d0200ad..46bf2ede612840b84eb3f7994c4cc85ae0d4c076 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/unistd.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/interrupt.h>
@@ -367,35 +366,6 @@ int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
 }
 EXPORT_SYMBOL(dump_fpu);
 
-/*
- * fill in the user structure for a core dump..
- */
-void dump_thread(struct pt_regs * regs, struct user * dump)
-{
-       struct task_struct *tsk = current;
-
-       dump->magic = CMAGIC;
-       dump->start_code = tsk->mm->start_code;
-       dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1);
-
-       dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT;
-       dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;
-       dump->u_ssize = 0;
-
-       dump->u_debugreg[0] = tsk->thread.debug.bp[0].address;
-       dump->u_debugreg[1] = tsk->thread.debug.bp[1].address;
-       dump->u_debugreg[2] = tsk->thread.debug.bp[0].insn.arm;
-       dump->u_debugreg[3] = tsk->thread.debug.bp[1].insn.arm;
-       dump->u_debugreg[4] = tsk->thread.debug.nsaved;
-
-       if (dump->start_stack < 0x04000000)
-               dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;
-
-       dump->regs = *regs;
-       dump->u_fpvalid = dump_fpu (regs, &dump->u_fp);
-}
-EXPORT_SYMBOL(dump_thread);
-
 /*
  * Shuffle the argument into the correct register before calling the
  * thread function.  r1 is the thread argument, r2 is the pointer to
index c4f023294d750659e992b93afc1d22ca456065f6..1b0245d4e0ca6937292770d72cdeb410a20b8d7e 100644 (file)
@@ -90,25 +90,29 @@ static struct dentry *ocd_debugfs_DC;
 static struct dentry *ocd_debugfs_DS;
 static struct dentry *ocd_debugfs_count;
 
-static u64 ocd_DC_get(void *data)
+static int ocd_DC_get(void *data, u64 *val)
 {
-       return ocd_read(DC);
+       *val = ocd_read(DC);
+       return 0;
 }
-static void ocd_DC_set(void *data, u64 val)
+static int ocd_DC_set(void *data, u64 val)
 {
        ocd_write(DC, val);
+       return 0;
 }
 DEFINE_SIMPLE_ATTRIBUTE(fops_DC, ocd_DC_get, ocd_DC_set, "0x%08llx\n");
 
-static u64 ocd_DS_get(void *data)
+static int ocd_DS_get(void *data, u64 *val)
 {
-       return ocd_read(DS);
+       *val = ocd_read(DS);
+       return 0;
 }
 DEFINE_SIMPLE_ATTRIBUTE(fops_DS, ocd_DS_get, NULL, "0x%08llx\n");
 
-static u64 ocd_count_get(void *data)
+static int ocd_count_get(void *data, u64 *val)
 {
-       return ocd_count;
+       *val = ocd_count;
+       return 0;
 }
 DEFINE_SIMPLE_ATTRIBUTE(fops_count, ocd_count_get, NULL, "%lld\n");
 
index 14e61f05e1f6a4366a9992f70535c301108a97ed..7678fee9a885ecc8fc0d041dfe5cb14427fc7a75 100644 (file)
@@ -1185,6 +1185,59 @@ err_dup_modedb:
 }
 #endif
 
+/* --------------------------------------------------------------------
+ *  PWM
+ * -------------------------------------------------------------------- */
+static struct resource atmel_pwm0_resource[] __initdata = {
+       PBMEM(0xfff01400),
+       IRQ(24),
+};
+static struct clk atmel_pwm0_mck = {
+       .name           = "mck",
+       .parent         = &pbb_clk,
+       .mode           = pbb_clk_mode,
+       .get_rate       = pbb_clk_get_rate,
+       .index          = 5,
+};
+
+struct platform_device *__init at32_add_device_pwm(u32 mask)
+{
+       struct platform_device *pdev;
+
+       if (!mask)
+               return NULL;
+
+       pdev = platform_device_alloc("atmel_pwm", 0);
+       if (!pdev)
+               return NULL;
+
+       if (platform_device_add_resources(pdev, atmel_pwm0_resource,
+                               ARRAY_SIZE(atmel_pwm0_resource)))
+               goto out_free_pdev;
+
+       if (platform_device_add_data(pdev, &mask, sizeof(mask)))
+               goto out_free_pdev;
+
+       if (mask & (1 << 0))
+               select_peripheral(PA(28), PERIPH_A, 0);
+       if (mask & (1 << 1))
+               select_peripheral(PA(29), PERIPH_A, 0);
+       if (mask & (1 << 2))
+               select_peripheral(PA(21), PERIPH_B, 0);
+       if (mask & (1 << 3))
+               select_peripheral(PA(22), PERIPH_B, 0);
+
+       atmel_pwm0_mck.dev = &pdev->dev;
+
+       platform_device_add(pdev);
+
+       return pdev;
+
+out_free_pdev:
+       platform_device_put(pdev);
+       return NULL;
+}
+
 /* --------------------------------------------------------------------
  *  SSC
  * -------------------------------------------------------------------- */
@@ -1646,6 +1699,7 @@ struct clk *at32_clock_list[] = {
        &atmel_usart1_usart,
        &atmel_usart2_usart,
        &atmel_usart3_usart,
+       &atmel_pwm0_mck,
 #if defined(CONFIG_CPU_AT32AP7000)
        &macb0_hclk,
        &macb0_pclk,
index 023dc80af1875864d8f350334fd5858e0ea78799..6b8459c661631b1ce9364bb50a6da36c3103766a 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/smp_lock.h>
 #include <linux/unistd.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/uaccess.h>
 #include <linux/fs.h>
 #include <linux/err.h>
index 6e106b3d7729f2f8832107babf496d69ed6c4c91..289ea9d7fcdbb72763cb17b0136061ffefb0c3f3 100644 (file)
@@ -700,7 +700,7 @@ static void c_stop(struct seq_file *m, void *v)
 {
 }
 
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start = c_start,
        .next = c_next,
        .stop = c_stop,
index 27b082ac7f11e25e8d6b292b54af2c932f259217..ff078e60e76da8f2b9ef0753287b8407d44d277f 100644 (file)
@@ -55,6 +55,10 @@ config CRIS
        bool
        default y
 
+config HZ
+       int
+       default 100
+
 source "init/Kconfig"
 
 menu "General setup"
index 4da042e100a0ab3a61b22eb069a8013a04a92b1b..c34fb235b09f9214e243a44005ef42bbc555ac30 100644 (file)
@@ -180,7 +180,7 @@ static void c_stop(struct seq_file *m, void *v)
 
 extern int show_cpuinfo(struct seq_file *m, void *v);
 
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start = c_start,
        .next  = c_next,
        .stop  = c_stop,
index 96f7d70f4473681dc3f155b31c00215a55267257..9e561ede0925b6928bb44907c1bcde6ee4139d43 100644 (file)
@@ -57,6 +57,10 @@ config ARCH_HAS_ILOG2_U64
        bool
        default y
 
+config HZ
+       int
+       default 1000
+
 mainmenu "Fujitsu FR-V Kernel Configuration"
 
 source "init/Kconfig"
index 6c01464db699419a2b5e8068325c1791ad356188..0669e13823831d5b994ac6daa439bd346f8943b1 100644 (file)
@@ -1113,7 +1113,7 @@ static void c_stop(struct seq_file *m, void *v)
 {
 }
 
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start  = c_start,
        .next   = c_next,
        .stop   = c_stop,
index 1a2e5c8d03a9c7e639ab354705a08cb0916bb443..66f616fb4860a779d5cc1eafa68d48d41b4db0e2 100644 (file)
@@ -28,7 +28,7 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
        return pte;
 }
 
-struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
+pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
        struct page *page;
 
@@ -37,9 +37,11 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
 #else
        page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
 #endif
-       if (page)
+       if (page) {
                clear_highpage(page);
-       flush_dcache_page(page);
+               pgtable_page_ctor(page);
+               flush_dcache_page(page);
+       }
        return page;
 }
 
index dc61222e11207b1d802481aa4dfdd4fd788e20b8..f69e5ea385588d0c554fe5f0d3ca2ff82f8c2138 100644 (file)
@@ -65,6 +65,9 @@ config TIME_LOW_RES
        bool
        default y
 
+config ARCH_SUPPORTS_AOUT
+       def_bool y
+
 config NO_IOPORT
        def_bool y
 
@@ -79,6 +82,10 @@ config PCI
        bool
        default n
 
+config HZ
+       int
+       default 100
+
 source "init/Kconfig"
 
 source "arch/h8300/Kconfig.cpu"
index cd3734614d9df93cd21787e4adca354ef2a8ecc6..b1f25c20a5dbdb8f6c1a2c4a29e61546499ce3e7 100644 (file)
@@ -236,7 +236,7 @@ static void c_stop(struct seq_file *m, void *v)
 {
 }
 
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start  = c_start,
        .next   = c_next,
        .stop   = c_stop,
index 3ab04272097031c19f5000bb07c9e606412df2f7..17fda5293c6716392d17a62bc24329e759df8415 100644 (file)
@@ -49,13 +49,13 @@ EXPORT_SYMBOL(last_cli_ip);
 #endif
 
 static struct clocksource clocksource_itc = {
-        .name           = "itc",
-        .rating         = 350,
-        .read           = itc_get_cycles,
-        .mask           = CLOCKSOURCE_MASK(64),
-        .mult           = 0, /*to be caluclated*/
-        .shift          = 16,
-        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+       .name           = "itc",
+       .rating         = 350,
+       .read           = itc_get_cycles,
+       .mask           = CLOCKSOURCE_MASK(64),
+       .mult           = 0, /*to be calculated*/
+       .shift          = 16,
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 static struct clocksource *itc_clocksource;
 
index 795180b8fd8e6199e56d118fec12f09a3079eb35..d4679ab55b969c3fe8bfc4f88dfef02d618e1877 100644 (file)
@@ -35,6 +35,13 @@ config NO_IOPORT
 config NO_DMA
        def_bool y
 
+config ARCH_SUPPORTS_AOUT
+       def_bool y
+
+config HZ
+       int
+       default 100
+
 source "init/Kconfig"
 
 
index f1f5db0c40846b3b39e65368996dea3c80a952b7..0392112a5d702cd2859245967a7357640bada5e9 100644 (file)
@@ -369,7 +369,7 @@ static void c_stop(struct seq_file *m, void *v)
 {
 }
 
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start = c_start,
        .next = c_next,
        .stop = c_stop,
index ffabd01c45eb1e4309680210cd30821cf4591864..2b0ed89cd173728ddda8ad3ea201977c5ee0484c 100644 (file)
@@ -52,6 +52,13 @@ config NO_IOPORT
 config NO_DMA
        def_bool SUN3
 
+config ARCH_SUPPORTS_AOUT
+       def_bool y
+
+config HZ
+       int
+       default 100
+
 mainmenu "Linux/68k Kernel Configuration"
 
 source "init/Kconfig"
index f85b928ffac418080315ac0e6aa19038f388ae24..5de4e4ed76abd4daf3f2483c2df36d2ede861d74 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/reboot.h>
 #include <linux/init_task.h>
 #include <linux/mqueue.h>
@@ -315,53 +314,6 @@ int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
 }
 EXPORT_SYMBOL(dump_fpu);
 
-/*
- * fill in the user structure for a core dump..
- */
-void dump_thread(struct pt_regs * regs, struct user * dump)
-{
-       struct switch_stack *sw;
-
-/* changed the size calculations - should hopefully work better. lbt */
-       dump->magic = CMAGIC;
-       dump->start_code = 0;
-       dump->start_stack = rdusp() & ~(PAGE_SIZE - 1);
-       dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
-       dump->u_dsize = ((unsigned long) (current->mm->brk +
-                                         (PAGE_SIZE-1))) >> PAGE_SHIFT;
-       dump->u_dsize -= dump->u_tsize;
-       dump->u_ssize = 0;
-
-       if (dump->start_stack < TASK_SIZE)
-               dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
-
-       dump->u_ar0 = offsetof(struct user, regs);
-       sw = ((struct switch_stack *)regs) - 1;
-       dump->regs.d1 = regs->d1;
-       dump->regs.d2 = regs->d2;
-       dump->regs.d3 = regs->d3;
-       dump->regs.d4 = regs->d4;
-       dump->regs.d5 = regs->d5;
-       dump->regs.d6 = sw->d6;
-       dump->regs.d7 = sw->d7;
-       dump->regs.a0 = regs->a0;
-       dump->regs.a1 = regs->a1;
-       dump->regs.a2 = regs->a2;
-       dump->regs.a3 = sw->a3;
-       dump->regs.a4 = sw->a4;
-       dump->regs.a5 = sw->a5;
-       dump->regs.a6 = sw->a6;
-       dump->regs.d0 = regs->d0;
-       dump->regs.orig_d0 = regs->orig_d0;
-       dump->regs.stkadj = regs->stkadj;
-       dump->regs.sr = regs->sr;
-       dump->regs.pc = regs->pc;
-       dump->regs.fmtvec = (regs->format << 12) | regs->vector;
-       /* dump floating point stuff */
-       dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp);
-}
-EXPORT_SYMBOL(dump_thread);
-
 /*
  * sys_execve() executes a new program.
  */
index 9a06c48edcb3c47468a0db8163d116eaaa9d032c..bba650312fd9fa65ac73d3408017cee1e3fb2dce 100644 (file)
@@ -450,7 +450,7 @@ static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 static void c_stop(struct seq_file *m, void *v)
 {
 }
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start  = c_start,
        .next   = c_next,
        .stop   = c_stop,
index 97f556fa493290822dea1673986d1b269c23bcfe..fd4858e2dd638d456636dee4dcdc9b9134c34b3c 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/module.h>
-#include <linux/a.out.h>
 #include <linux/user.h>
 #include <linux/string.h>
 #include <linux/linkage.h>
index 6abbbb8aac5ebc733f7e4eb8cc8df3df6ef3959c..548a7b321633c670b358f190e2a92a54a694ba45 100644 (file)
@@ -64,6 +64,9 @@ config TIME_LOW_RES
 config NO_IOPORT
        def_bool y
 
+config ARCH_SUPPORTS_AOUT
+       def_bool y
+
 source "init/Kconfig"
 
 menu "Processor type and features"
@@ -522,6 +525,11 @@ config 4KSTACKS
          running more threads on a system and also reduces the pressure
          on the VM subsystem for higher order allocations.
 
+config HZ
+       int
+       default 1000 if CLEOPATRA
+       default 100
+
 comment "RAM configuration"
 
 config RAMBASE
index 156c6c662c7e87fa3feabf82cc83c6b9c10e6e7e..d6f0200316febaa7f8f1fb76c09c0b96e91b0ad1 100644 (file)
@@ -260,7 +260,7 @@ static void c_stop(struct seq_file *m, void *v)
 {
 }
 
-struct seq_operations cpuinfo_op = {
+const struct seq_operations cpuinfo_op = {
        .start  = c_start,
        .next   = c_next,
        .stop   = c_stop,
index 197d7977de356e603465f62e780f945eb3dbe16f..413bd1d37f5499171e4337b78ee62f387152d811 100644 (file)
@@ -338,8 +338,10 @@ void __init init_i8259_irqs(void)
 
        init_8259A(0);
 
-       for (i = I8259A_IRQ_BASE; i < I8259A_IRQ_BASE + 16; i++)
+       for (i = I8259A_IRQ_BASE; i < I8259A_IRQ_BASE + 16; i++) {
                set_irq_chip_and_handler(i, &i8259A_chip, handle_level_irq);
+               set_irq_probe(i);
+       }
 
        setup_irq(I8259A_IRQ_BASE + PIC_CASCADE_IR, &irq2);
 }
index 7852c7cdf29e7e5d575d049d5367a57ed4f21fe5..290d8e3a664d71bd71e2fb582dd004025a06b34d 100644 (file)
@@ -591,9 +591,9 @@ static void irix_map_prda_page(void)
                return;
 
        pp = (struct prda *) v;
-       pp->prda_sys.t_pid  = current->pid;
+       pp->prda_sys.t_pid  = task_pid_vnr(current);
        pp->prda_sys.t_prid = read_c0_prid();
-       pp->prda_sys.t_rpid = current->pid;
+       pp->prda_sys.t_rpid = task_pid_vnr(current);
 
        /* We leave the rest set to zero */
 }
@@ -1170,11 +1170,11 @@ static int irix_core_dump(long signr, struct pt_regs *regs, struct file *file, u
        prstatus.pr_info.si_signo = prstatus.pr_cursig = signr;
        prstatus.pr_sigpend = current->pending.signal.sig[0];
        prstatus.pr_sighold = current->blocked.sig[0];
-       psinfo.pr_pid = prstatus.pr_pid = current->pid;
-       psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid;
-       psinfo.pr_pgrp = prstatus.pr_pgrp = task_pgrp_nr(current);
-       psinfo.pr_sid = prstatus.pr_sid = task_session_nr(current);
-       if (current->pid == current->tgid) {
+       psinfo.pr_pid = prstatus.pr_pid = task_pid_vnr(current);
+       psinfo.pr_ppid = prstatus.pr_ppid = task_pid_vnr(current->parent);
+       psinfo.pr_pgrp = prstatus.pr_pgrp = task_pgrp_vnr(current);
+       psinfo.pr_sid = prstatus.pr_sid = task_session_vnr(current);
+       if (thread_group_leader(current)) {
                /*
                 * This is the record for the group leader.  Add in the
                 * cumulative times of previous dead threads.  This total
index 5b10ac133ec837b4ccd91844a42321d6a68769fd..0215c805a592849cf3bc529e5e3b1020a82e7dc5 100644 (file)
@@ -578,10 +578,11 @@ out:
 
 #define W_MASK      (W_EXITED | W_TRAPPED | W_STOPPED | W_CONT | W_NOHANG)
 
-asmlinkage int irix_waitsys(int type, int pid,
+asmlinkage int irix_waitsys(int type, int upid,
        struct irix5_siginfo __user *info, int options,
        struct rusage __user *ru)
 {
+       struct pid *pid = NULL;
        int flag, retval;
        DECLARE_WAITQUEUE(wait, current);
        struct task_struct *tsk;
@@ -604,6 +605,8 @@ asmlinkage int irix_waitsys(int type, int pid,
        if (type != IRIX_P_PID && type != IRIX_P_PGID && type != IRIX_P_ALL)
                return -EINVAL;
 
+       if (type != IRIX_P_ALL)
+               pid = find_get_pid(upid);
        add_wait_queue(&current->signal->wait_chldexit, &wait);
 repeat:
        flag = 0;
@@ -612,9 +615,9 @@ repeat:
        tsk = current;
        list_for_each(_p, &tsk->children) {
                p = list_entry(_p, struct task_struct, sibling);
-               if ((type == IRIX_P_PID) && p->pid != pid)
+               if ((type == IRIX_P_PID) && task_pid(p) != pid)
                        continue;
-               if ((type == IRIX_P_PGID) && task_pgrp_nr(p) != pid)
+               if ((type == IRIX_P_PGID) && task_pgrp(p) != pid)
                        continue;
                if ((p->exit_signal != SIGCHLD))
                        continue;
@@ -639,7 +642,7 @@ repeat:
 
                        retval = __put_user(SIGCHLD, &info->sig);
                        retval |= __put_user(0, &info->code);
-                       retval |= __put_user(p->pid, &info->stuff.procinfo.pid);
+                       retval |= __put_user(task_pid_vnr(p), &info->stuff.procinfo.pid);
                        retval |= __put_user((p->exit_code >> 8) & 0xff,
                                   &info->stuff.procinfo.procdata.child.status);
                        retval |= __put_user(p->utime, &info->stuff.procinfo.procdata.child.utime);
@@ -657,7 +660,7 @@ repeat:
                                getrusage(p, RUSAGE_BOTH, ru);
                        retval = __put_user(SIGCHLD, &info->sig);
                        retval |= __put_user(1, &info->code);      /* CLD_EXITED */
-                       retval |= __put_user(p->pid, &info->stuff.procinfo.pid);
+                       retval |= __put_user(task_pid_vnr(p), &info->stuff.procinfo.pid);
                        retval |= __put_user((p->exit_code >> 8) & 0xff,
                                   &info->stuff.procinfo.procdata.child.status);
                        retval |= __put_user(p->utime,
@@ -665,7 +668,7 @@ repeat:
                        retval |= __put_user(p->stime,
                                   &info->stuff.procinfo.procdata.child.stime);
                        if (retval)
-                               return retval;
+                               goto end_waitsys;
 
                        if (p->real_parent != p->parent) {
                                write_lock_irq(&tasklist_lock);
@@ -698,6 +701,7 @@ repeat:
 end_waitsys:
        current->state = TASK_RUNNING;
        remove_wait_queue(&current->signal->wait_chldexit, &wait);
+       put_pid(pid);
 
        return retval;
 }
index d06e9c9af7909f15637c081883cb282f482a90f7..e3309ff9ece402867d86d8fcaa03187c45c6ca00 100644 (file)
@@ -145,6 +145,11 @@ __setup("nokgdb", nokgdb);
 
 void __init init_IRQ(void)
 {
+       int i;
+
+       for (i = 0; i < NR_IRQS; i++)
+               set_irq_noprobe(i);
+
        arch_init_irq();
 
 #ifdef CONFIG_KGDB
index 22fd41e946b28c3d9e2a8a853c4951bcada5b629..d70c4e0e85fb3e81a86d4d77eade217b52007eac 100644 (file)
@@ -582,8 +582,8 @@ out:
 
 asmlinkage int irix_getpid(struct pt_regs *regs)
 {
-       regs->regs[3] = current->real_parent->pid;
-       return current->pid;
+       regs->regs[3] = task_pid_vnr(current->real_parent);
+       return task_pid_vnr(current);
 }
 
 asmlinkage int irix_getuid(struct pt_regs *regs)
@@ -763,11 +763,11 @@ asmlinkage int irix_setpgrp(int flags)
        printk("[%s:%d] setpgrp(%d) ", current->comm, current->pid, flags);
 #endif
        if(!flags)
-               error = task_pgrp_nr(current);
+               error = task_pgrp_vnr(current);
        else
                error = sys_setsid();
 #ifdef DEBUG_PROCGRPS
-       printk("returning %d\n", task_pgrp_nr(current));
+       printk("returning %d\n", error);
 #endif
 
        return error;
@@ -1093,10 +1093,10 @@ asmlinkage int irix_BSDsetpgrp(int pid, int pgrp)
               pid, pgrp);
 #endif
        if(!pid)
-               pid = current->pid;
+               pid = task_pid_vnr(current);
 
        /* Wheee, weird sysv thing... */
-       if ((pgrp == 0) && (pid == current->pid))
+       if ((pgrp == 0) && (pid == task_pid_vnr(current)))
                error = sys_setsid();
        else
                error = sys_setpgid(pid, pgrp);
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
new file mode 100644 (file)
index 0000000..eedc3a5
--- /dev/null
@@ -0,0 +1,381 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt.
+#
+
+mainmenu "Linux Kernel Configuration"
+
+config MN10300
+       def_bool y
+
+config AM33
+       def_bool y
+
+config MMU
+       def_bool y
+
+config HIGHMEM
+       def_bool n
+
+config NUMA
+       def_bool n
+
+config UID16
+       def_bool y
+
+config RWSEM_GENERIC_SPINLOCK
+       def_bool y
+
+config RWSEM_XCHGADD_ALGORITHM
+       bool
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       def_bool y
+
+config GENERIC_CALIBRATE_DELAY
+       def_bool y
+
+config GENERIC_FIND_NEXT_BIT
+       def_bool y
+
+config GENERIC_HWEIGHT
+       def_bool y
+
+config GENERIC_TIME
+       def_bool y
+
+config GENERIC_BUG
+       def_bool y
+
+config QUICKLIST
+       def_bool y
+
+config ARCH_HAS_ILOG2_U32
+       def_bool y
+
+config ARCH_SUPPORTS_AOUT
+       def_bool n
+
+# Use the generic interrupt handling code in kernel/irq/
+config GENERIC_HARDIRQS
+       def_bool y
+
+config HOTPLUG_CPU
+       def_bool n
+
+mainmenu "Matsushita MN10300/AM33 Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Matsushita MN10300 system setup"
+
+choice
+       prompt "Unit type"
+       default MN10300_UNIT_ASB2303
+       help
+         This option specifies board for which the kernel will be
+         compiled. It affects the external peripherals catered for.
+
+config MN10300_UNIT_ASB2303
+       bool "ASB2303"
+
+config MN10300_UNIT_ASB2305
+       bool "ASB2305"
+
+endchoice
+
+choice
+       prompt "Processor support"
+       default MN10300_PROC_MN103E010
+       help
+         This option specifies the processor for which the kernel will be
+         compiled. It affects the on-chip peripherals catered for.
+
+config MN10300_PROC_MN103E010
+       bool "MN103E010"
+       depends on MN10300_UNIT_ASB2303 || MN10300_UNIT_ASB2305
+       select MN10300_PROC_HAS_TTYSM0
+       select MN10300_PROC_HAS_TTYSM1
+       select MN10300_PROC_HAS_TTYSM2
+
+endchoice
+
+choice
+       prompt "Processor core support"
+       default MN10300_CPU_AM33V2
+       help
+         This option specifies the processor core for which the kernel will be
+         compiled. It affects the instruction set used.
+
+config MN10300_CPU_AM33V2
+       bool "AM33v2"
+
+endchoice
+
+config FPU
+       bool "FPU present"
+       default y
+       depends on MN10300_PROC_MN103E010
+
+choice
+       prompt "CPU Caching mode"
+       default MN10300_CACHE_WBACK
+       help
+         This option determines the caching mode for the kernel.
+
+         Write-Back caching mode involves the all reads and writes causing
+         the affected cacheline to be read into the cache first before being
+         operated upon. Memory is not then updated by a write until the cache
+         is filled and a cacheline needs to be displaced from the cache to
+         make room. Only at that point is it written back.
+
+         Write-Through caching only fetches cachelines from memory on a
+         read. Writes always get written directly to memory. If the affected
+         cacheline is also in cache, it will be updated too.
+
+         The final option is to turn of caching entirely.
+
+config MN10300_CACHE_WBACK
+       bool "Write-Back"
+
+config MN10300_CACHE_WTHRU
+       bool "Write-Through"
+
+config MN10300_CACHE_DISABLED
+       bool "Disabled"
+
+endchoice
+
+menu "Memory layout options"
+
+config KERNEL_RAM_BASE_ADDRESS
+       hex "Base address of kernel RAM"
+       default "0x90000000"
+
+config INTERRUPT_VECTOR_BASE
+       hex "Base address of vector table"
+       default "0x90000000"
+       help
+         The base address of the vector table will be programmed into
+          the TBR register. It must be on 16MiB address boundary.
+
+config KERNEL_TEXT_ADDRESS
+       hex "Base address of kernel"
+       default "0x90001000"
+
+config KERNEL_ZIMAGE_BASE_ADDRESS
+       hex "Base address of compressed vmlinux image"
+       default "0x90700000"
+
+endmenu
+
+config PREEMPT
+       bool "Preemptible Kernel"
+       help
+         This option reduces the latency of the kernel when reacting to
+         real-time or interactive events by allowing a low priority process to
+         be preempted even if it is in kernel mode executing a system call.
+         This allows applications to run more reliably even when the system is
+         under load.
+
+         Say Y here if you are building a kernel for a desktop, embedded
+         or real-time system.  Say N if you are unsure.
+
+config PREEMPT_BKL
+       bool "Preempt The Big Kernel Lock"
+       depends on PREEMPT
+       default y
+       help
+         This option reduces the latency of the kernel by making the
+         big kernel lock preemptible.
+
+         Say Y here if you are building a kernel for a desktop system.
+         Say N if you are unsure.
+
+config MN10300_CURRENT_IN_E2
+       bool "Hold current task address in E2 register"
+       default y
+       help
+         This option removes the E2/R2 register from the set available to gcc
+         for normal use and instead uses it to store the address of the
+         current process's task_struct whilst in the kernel.
+
+         This means the kernel doesn't need to calculate the address each time
+         "current" is used (take SP, AND with mask and dereference pointer
+         just to get the address), and instead can just use E2+offset
+         addressing each time.
+
+         This has no effect on userspace.
+
+config MN10300_USING_JTAG
+       bool "Using JTAG to debug kernel"
+       default y
+       help
+         This options indicates that JTAG will be used to debug the kernel. It
+         suppresses the use of certain hardware debugging features, such as
+         single-stepping, which are taken over completely by the JTAG unit.
+
+config MN10300_RTC
+       bool "Using MN10300 RTC"
+       depends on MN10300_PROC_MN103E010
+       default n
+       help
+
+         This option enables support for the RTC, thus enabling time to be
+         tracked, even when system is powered down. This is available on-chip
+         on the MN103E010.
+
+config MN10300_WD_TIMER
+       bool "Using MN10300 watchdog timer"
+       default y
+       help
+         This options indicates that the watchdog timer will be used.
+
+config PCI
+       bool "Use PCI"
+       depends on MN10300_UNIT_ASB2305
+       default y
+       help
+         Some systems (such as the ASB2305) have PCI onboard. If you have one
+         of these boards and you wish to use the PCI facilities, say Y here.
+
+         The PCI-HOWTO, available from
+         <http://www.tldp.org/docs.html#howto>, contains valuable
+         information about which PCI hardware does work under Linux and which
+         doesn't.
+
+source "drivers/pci/Kconfig"
+
+source "drivers/pcmcia/Kconfig"
+
+menu "MN10300 internal serial options"
+
+config MN10300_PROC_HAS_TTYSM0
+       bool
+       default n
+
+config MN10300_PROC_HAS_TTYSM1
+       bool
+       default n
+
+config MN10300_PROC_HAS_TTYSM2
+       bool
+       default n
+
+config MN10300_TTYSM
+       bool "Support for ttySM serial ports"
+       depends on MN10300
+       default y
+       select SERIAL_CORE
+       help
+         This option enables support for the on-chip serial ports that the
+         MN10300 has available.
+
+config MN10300_TTYSM_CONSOLE
+       bool "Support for console on ttySM serial ports"
+       depends on MN10300_TTYSM
+       select SERIAL_CORE_CONSOLE
+       help
+         This option enables support for a console on the on-chip serial ports
+         that the MN10300 has available.
+
+#
+# /dev/ttySM0
+#
+config MN10300_TTYSM0
+       bool "Enable SIF0 (/dev/ttySM0)"
+       depends on MN10300_TTYSM && MN10300_PROC_HAS_TTYSM0
+       help
+         Enable access to SIF0 through /dev/ttySM0 or gdb-stub
+
+choice
+       prompt "Select the timer to supply the clock for SIF0"
+       default MN10300_TTYSM0_TIMER8
+       depends on MN10300_TTYSM0
+
+config MN10300_TTYSM0_TIMER8
+       bool "Use timer 8 (16-bit)"
+
+config MN10300_TTYSM0_TIMER2
+       bool "Use timer 2 (8-bit)"
+
+endchoice
+
+#
+# /dev/ttySM1
+#
+config MN10300_TTYSM1
+       bool "Enable SIF1 (/dev/ttySM1)"
+       depends on MN10300_TTYSM && MN10300_PROC_HAS_TTYSM1
+       help
+         Enable access to SIF1 through /dev/ttySM1 or gdb-stub
+
+choice
+       prompt "Select the timer to supply the clock for SIF1"
+       default MN10300_TTYSM0_TIMER9
+       depends on MN10300_TTYSM1
+
+config MN10300_TTYSM1_TIMER9
+       bool "Use timer 9 (16-bit)"
+
+config MN10300_TTYSM1_TIMER3
+       bool "Use timer 3 (8-bit)"
+
+endchoice
+
+#
+# /dev/ttySM2
+#
+config MN10300_TTYSM2
+       bool "Enable SIF2 (/dev/ttySM2)"
+       depends on MN10300_TTYSM && MN10300_PROC_HAS_TTYSM2
+       help
+         Enable access to SIF2 through /dev/ttySM2 or gdb-stub
+
+choice
+       prompt "Select the timer to supply the clock for SIF2"
+       default MN10300_TTYSM0_TIMER10
+       depends on MN10300_TTYSM2
+
+config MN10300_TTYSM2_TIMER10
+       bool "Use timer 10 (16-bit)"
+
+endchoice
+
+config MN10300_TTYSM2_CTS
+       bool "Enable the use of the CTS line /dev/ttySM2"
+       depends on MN10300_TTYSM2
+
+endmenu
+
+source "mm/Kconfig"
+
+menu "Power management options"
+source kernel/power/Kconfig
+endmenu
+
+endmenu
+
+
+menu "Executable formats"
+
+source "fs/Kconfig.binfmt"
+
+endmenu
+
+source "net/Kconfig"
+
+source "drivers/Kconfig"
+
+source "fs/Kconfig"
+
+source "arch/mn10300/Kconfig.debug"
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
+source "arch/mn10300/oprofile/Kconfig"
diff --git a/arch/mn10300/Kconfig.debug b/arch/mn10300/Kconfig.debug
new file mode 100644 (file)
index 0000000..524e338
--- /dev/null
@@ -0,0 +1,135 @@
+menu "Kernel hacking"
+
+source "lib/Kconfig.debug"
+
+config DEBUG_STACKOVERFLOW
+       bool "Check for stack overflows"
+       depends on DEBUG_KERNEL
+
+config DEBUG_DECOMPRESS_KERNEL
+       bool "Using serial port during decompressing kernel"
+       depends on DEBUG_KERNEL
+       default n
+       help
+         If you say Y here you will confirm the start and the end of
+         decompressing Linux seeing "Uncompressing Linux... " and
+         "Ok, booting the kernel.\n" on console.
+
+config KPROBES
+       bool "Kprobes"
+       depends on DEBUG_KERNEL
+       help
+         Kprobes allows you to trap at almost any kernel address and
+         execute a callback function.  register_kprobe() establishes
+         a probepoint and specifies the callback.  Kprobes is useful
+         for kernel debugging, non-intrusive instrumentation and testing.
+         If in doubt, say "N".
+
+config GDBSTUB
+       bool "Remote GDB kernel debugging"
+       depends on DEBUG_KERNEL
+       select DEBUG_INFO
+       select FRAME_POINTER
+       help
+         If you say Y here, it will be possible to remotely debug the kernel
+         using gdb. This enlarges your kernel ELF image disk size by several
+         megabytes and requires a machine with more than 16 MB, better 32 MB
+         RAM to avoid excessive linking time. This is only useful for kernel
+         hackers. If unsure, say N.
+
+config GDBSTUB_IMMEDIATE
+       bool "Break into GDB stub immediately"
+       depends on GDBSTUB
+       help
+         If you say Y here, GDB stub will break into the program as soon as
+         possible, leaving the program counter at the beginning of
+         start_kernel() in init/main.c.
+
+config GDB_CONSOLE
+       bool "Console output to GDB"
+       depends on GDBSTUB
+       help
+         If you are using GDB for remote debugging over a serial port and
+         would like kernel messages to be formatted into GDB $O packets so
+         that GDB prints them as program output, say 'Y'.
+
+config GDBSTUB_DEBUGGING
+       bool "Debug GDB stub by messages to serial port"
+       depends on GDBSTUB
+       help
+         This causes debugging messages to be displayed at various points
+         during execution of the GDB stub routines. Such messages will be
+         displayed on ttyS0 if that isn't the GDB stub's port, or ttySM0
+         otherwise.
+
+config GDBSTUB_DEBUG_ENTRY
+       bool "Debug GDB stub entry"
+       depends on GDBSTUB_DEBUGGING
+       help
+         This option causes information to be displayed about entry to or exit
+         from the main GDB stub routine.
+
+config GDBSTUB_DEBUG_PROTOCOL
+       bool "Debug GDB stub protocol"
+       depends on GDBSTUB_DEBUGGING
+       help
+         This option causes information to be displayed about the GDB remote
+         protocol messages generated exchanged with GDB.
+
+config GDBSTUB_DEBUG_IO
+       bool "Debug GDB stub I/O"
+       depends on GDBSTUB_DEBUGGING
+       help
+         This option causes information to be displayed about GDB stub's
+         low-level I/O.
+
+config GDBSTUB_DEBUG_BREAKPOINT
+       bool "Debug GDB stub breakpoint management"
+       depends on GDBSTUB_DEBUGGING
+       help
+         This option causes information to be displayed about GDB stub's
+         breakpoint management.
+
+choice
+       prompt "GDB stub port"
+       default GDBSTUB_TTYSM0
+       depends on GDBSTUB
+       help
+         Select the serial port used for GDB-stub.
+
+config GDBSTUB_ON_TTYSM0
+       bool "/dev/ttySM0 [SIF0]"
+       depends on MN10300_TTYSM0
+       select GDBSTUB_ON_TTYSMx
+
+config GDBSTUB_ON_TTYSM1
+       bool "/dev/ttySM1 [SIF1]"
+       depends on MN10300_TTYSM1
+       select GDBSTUB_ON_TTYSMx
+
+config GDBSTUB_ON_TTYSM2
+       bool "/dev/ttySM2 [SIF2]"
+       depends on MN10300_TTYSM2
+       select GDBSTUB_ON_TTYSMx
+
+config GDBSTUB_ON_TTYS0
+       bool "/dev/ttyS0"
+       select GDBSTUB_ON_TTYSx
+
+config GDBSTUB_ON_TTYS1
+       bool "/dev/ttyS1"
+       select GDBSTUB_ON_TTYSx
+
+endchoice
+
+config GDBSTUB_ON_TTYSMx
+       bool
+       depends on GDBSTUB_ON_TTYSM0 || GDBSTUB_ON_TTYSM1 || GDBSTUB_ON_TTYSM2
+       default y
+
+config GDBSTUB_ON_TTYSx
+       bool
+       depends on GDBSTUB_ON_TTYS0 || GDBSTUB_ON_TTYS1
+       default y
+
+endmenu
diff --git a/arch/mn10300/Makefile b/arch/mn10300/Makefile
new file mode 100644 (file)
index 0000000..6673a28
--- /dev/null
@@ -0,0 +1,135 @@
+###############################################################################
+#
+# MN10300 Kernel makefile system specifications
+#
+# Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+# Modified by David Howells (dhowells@redhat.com)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public Licence
+# as published by the Free Software Foundation; either version
+# 2 of the Licence, or (at your option) any later version.
+#
+###############################################################################
+
+KBUILD_DEFCONFIG := asb2303_defconfig
+
+CCSPECS        := $(shell $(CC) -v 2>&1 | grep "^Reading specs from " | head -1 | cut -c20-)
+CCDIR  := $(strip $(patsubst %/specs,%,$(CCSPECS)))
+KBUILD_CPPFLAGS += -nostdinc -I$(CCDIR)/include
+
+LDFLAGS                :=
+OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
+#LDFLAGS_vmlinux := -Map linkmap.txt
+CHECKFLAGS     +=
+
+PROCESSOR      := unset
+UNIT           := unset
+
+KBUILD_CFLAGS  += -mam33 -mmem-funcs -DCPU=AM33
+KBUILD_AFLAGS  += -mam33 -DCPU=AM33
+
+ifeq ($(CONFIG_MN10300_CURRENT_IN_E2),y)
+KBUILD_CFLAGS  += -ffixed-e2 -fcall-saved-e5
+endif
+
+ifeq ($(CONFIG_MN10300_PROC_MN103E010),y)
+PROCESSOR      := mn103e010
+endif
+
+ifeq ($(CONFIG_MN10300_UNIT_ASB2303),y)
+UNIT           := asb2303
+endif
+ifeq ($(CONFIG_MN10300_UNIT_ASB2305),y)
+UNIT           := asb2305
+endif
+
+
+head-y         := arch/mn10300/kernel/head.o arch/mn10300/kernel/init_task.o
+
+core-y         += arch/mn10300/kernel/ arch/mn10300/mm/
+
+ifneq ($(PROCESSOR),unset)
+core-y         += arch/mn10300/proc-$(PROCESSOR)/
+endif
+ifneq ($(UNIT),unset)
+core-y         += arch/mn10300/unit-$(UNIT)/
+endif
+libs-y         += arch/mn10300/lib/
+
+drivers-$(CONFIG_OPROFILE)     += arch/mn10300/oprofile/
+
+boot := arch/mn10300/boot
+
+.PHONY: zImage
+
+KBUILD_IMAGE := $(boot)/zImage
+CLEAN_FILES += $(boot)/zImage
+CLEAN_FILES += $(boot)/compressed/vmlinux
+CLEAN_FILES += $(boot)/compressed/vmlinux.bin
+CLEAN_FILES += $(boot)/compressed/vmlinux.bin.gz
+
+zImage: vmlinux
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+
+all: zImage
+
+bootstrap:
+       $(Q)$(MAKEBOOT) bootstrap
+
+archclean:
+       $(Q)$(MAKE) $(clean)=arch/mn10300/proc-mn103e010
+       $(Q)$(MAKE) $(clean)=arch/mn10300/unit-asb2303
+       $(Q)$(MAKE) $(clean)=arch/mn10300/unit-asb2305
+
+define archhelp
+  echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
+endef
+
+# If you make sure the .S files get compiled with debug info,
+# uncomment the following to disable optimisations
+# that are unhelpful whilst debugging.
+ifdef CONFIG_DEBUG_INFO
+#KBUILD_CFLAGS += -O1
+KBUILD_AFLAGS  += -Wa,--gdwarf2
+endif
+
+###################################################################################################
+#
+# juggle some symlinks in the MN10300 asm include dir
+#
+#      Update machine proc and unit symlinks if something which affects
+#      them changed.  We use .proc / .unit to indicate when they were
+#      updated last, otherwise make uses the target directory mtime.
+#
+###################################################################################################
+
+# processor specific definitions
+include/asm-mn10300/.proc: $(wildcard include/config/proc/*.h) include/config/auto.conf
+       @echo '  SYMLINK include/asm-mn10300/proc -> include/asm-mn10300/proc-$(PROCESSOR)'
+ifneq ($(KBUILD_SRC),)
+       $(Q)mkdir -p include/asm-mn10300
+       $(Q)ln -fsn $(srctree)/include/asm-mn10300/proc-$(PROCESSOR) include/asm-mn10300/proc
+else
+       $(Q)ln -fsn proc-$(PROCESSOR) include/asm-mn10300/proc
+endif
+       @touch $@
+
+CLEAN_FILES += include/asm-mn10300/proc include/asm-mn10300/.proc
+
+prepare: include/asm-mn10300/.proc
+
+# unit specific definitions
+include/asm-mn10300/.unit: $(wildcard include/config/unit/*.h) include/config/auto.conf
+       @echo '  SYMLINK include/asm-mn10300/unit -> include/asm-mn10300/unit-$(UNIT)'
+ifneq ($(KBUILD_SRC),)
+       $(Q)mkdir -p include/asm-mn10300
+       $(Q)ln -fsn $(srctree)/include/asm-mn10300/unit-$(UNIT) include/asm-mn10300/unit
+else
+       $(Q)ln -fsn unit-$(UNIT) include/asm-mn10300/unit
+endif
+       @touch $@
+
+CLEAN_FILES += include/asm-mn10300/unit include/asm-mn10300/.unit
+
+prepare: include/asm-mn10300/.unit
diff --git a/arch/mn10300/boot/.gitignore b/arch/mn10300/boot/.gitignore
new file mode 100644 (file)
index 0000000..b6718de
--- /dev/null
@@ -0,0 +1 @@
+zImage
diff --git a/arch/mn10300/boot/Makefile b/arch/mn10300/boot/Makefile
new file mode 100644 (file)
index 0000000..36c9caf
--- /dev/null
@@ -0,0 +1,28 @@
+# MN10300 kernel compressor and wrapper
+#
+# Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+# Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+# Written by David Howells (dhowells@redhat.com)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public Licence
+# as published by the Free Software Foundation; either version
+# 2 of the Licence, or (at your option) any later version.
+#
+
+targets                := vmlinux.bin zImage
+
+subdir-        := compressed
+
+# ---------------------------------------------------------------------------
+
+
+$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
+       $(call if_changed,objcopy)
+       @echo 'Kernel: $@ is ready'
+
+$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
+       $(call if_changed,objcopy)
+
+$(obj)/compressed/vmlinux: FORCE
+       $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
diff --git a/arch/mn10300/boot/compressed/Makefile b/arch/mn10300/boot/compressed/Makefile
new file mode 100644 (file)
index 0000000..08a95e1
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# Create a compressed vmlinux image from the original vmlinux
+#
+
+targets                := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
+
+LDFLAGS_vmlinux := -Ttext $(CONFIG_KERNEL_ZIMAGE_BASE_ADDRESS) -e startup_32
+
+$(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
+       $(call if_changed,ld)
+       @:
+
+$(obj)/vmlinux.bin: vmlinux FORCE
+       $(call if_changed,objcopy)
+
+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
+       $(call if_changed,gzip)
+
+LDFLAGS_piggy.o := -r --format binary --oformat elf32-am33lin -T
+
+$(obj)/piggy.o: $(obj)/vmlinux.lds $(obj)/vmlinux.bin.gz FORCE
+       $(call if_changed,ld)
diff --git a/arch/mn10300/boot/compressed/head.S b/arch/mn10300/boot/compressed/head.S
new file mode 100644 (file)
index 0000000..502e1eb
--- /dev/null
@@ -0,0 +1,86 @@
+/* Boot entry point for a compressed MN10300 kernel
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+       .section        .text
+
+#define DEBUG
+
+#include <linux/linkage.h>
+#include <asm/cpu-regs.h>
+
+       .globl startup_32
+startup_32:
+       # first save off parameters from bootloader
+       mov     param_save_area,a0
+       mov     d0,(a0)
+       mov     d1,(4,a0)
+       mov     d2,(8,a0)
+
+       mov     sp,a3
+       mov     decomp_stack+0x2000-4,a0
+       mov     a0,sp
+
+       # invalidate and enable both of the caches
+       mov     CHCTR,a0
+       clr     d0
+       movhu   d0,(a0)                                 # turn off first
+       mov     CHCTR_ICINV|CHCTR_DCINV,d0
+       movhu   d0,(a0)
+       setlb
+       mov     (a0),d0
+       btst    CHCTR_ICBUSY|CHCTR_DCBUSY,d0            # wait till not busy
+       lne
+       mov     CHCTR_ICEN|CHCTR_DCEN|CHCTR_DCWTMD,d0   # writethru dcache
+       movhu   d0,(a0)                                 # enable
+
+       # clear the BSS area
+       mov     __bss_start,a0
+       mov     _end,a1
+       clr     d0
+bssclear:
+       cmp     a1,a0
+       bge     bssclear_end
+       movbu   d0,(a0)
+       inc     a0
+       bra     bssclear
+bssclear_end:
+
+       # decompress the kernel
+       call    decompress_kernel[],0
+
+       # disable caches again
+       mov     CHCTR,a0
+       clr     d0
+       movhu   d0,(a0)
+       setlb
+       mov     (a0),d0
+       btst    CHCTR_ICBUSY|CHCTR_DCBUSY,d0            # wait till not busy
+       lne
+
+       mov     param_save_area,a0
+       mov     (a0),d0
+       mov     (4,a0),d1
+       mov     (8,a0),d2
+
+       mov     a3,sp
+       mov     CONFIG_KERNEL_TEXT_ADDRESS,a0
+       jmp     (a0)
+
+       .data
+       .align          4
+param_save_area:
+       .rept 3
+       .word           0
+       .endr
+
+       .section        .bss
+       .align          4
+decomp_stack:
+       .space          0x2000
diff --git a/arch/mn10300/boot/compressed/misc.c b/arch/mn10300/boot/compressed/misc.c
new file mode 100644 (file)
index 0000000..ded207e
--- /dev/null
@@ -0,0 +1,429 @@
+/* MN10300 Miscellaneous helper routines for kernel decompressor
+ *
+ * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Modified by David Howells (dhowells@redhat.com)
+ * - Derived from arch/x86/boot/compressed/misc_32.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+#include <linux/compiler.h>
+#include <asm/serial-regs.h>
+#include "misc.h"
+
+#ifndef CONFIG_GDBSTUB_ON_TTYSx
+/* display 'Uncompressing Linux... ' messages on ttyS0 or ttyS1 */
+#if 1  /* ttyS0 */
+#define CYG_DEV_BASE   0xA6FB0000
+#else   /* ttyS1 */
+#define CYG_DEV_BASE   0xA6FC0000
+#endif
+
+#define CYG_DEV_THR    (*((volatile __u8*)(CYG_DEV_BASE + 0x00)))
+#define CYG_DEV_MCR    (*((volatile __u8*)(CYG_DEV_BASE + 0x10)))
+#define SIO_MCR_DTR    0x01
+#define SIO_MCR_RTS    0x02
+#define CYG_DEV_LSR    (*((volatile __u8*)(CYG_DEV_BASE + 0x14)))
+#define SIO_LSR_THRE   0x20            /* transmitter holding register empty */
+#define SIO_LSR_TEMT   0x40            /* transmitter register empty */
+#define CYG_DEV_MSR    (*((volatile __u8*)(CYG_DEV_BASE + 0x18)))
+#define SIO_MSR_CTS    0x10            /* clear to send */
+#define SIO_MSR_DSR    0x20            /* data set ready */
+
+#define LSR_WAIT_FOR(STATE) \
+       do { while (!(CYG_DEV_LSR & SIO_LSR_##STATE)) {} } while (0)
+#define FLOWCTL_QUERY(LINE) \
+       ({ CYG_DEV_MSR & SIO_MSR_##LINE; })
+#define FLOWCTL_WAIT_FOR(LINE) \
+       do { while (!(CYG_DEV_MSR & SIO_MSR_##LINE)) {} } while (0)
+#define FLOWCTL_CLEAR(LINE) \
+       do { CYG_DEV_MCR &= ~SIO_MCR_##LINE; } while (0)
+#define FLOWCTL_SET(LINE) \
+       do { CYG_DEV_MCR |= SIO_MCR_##LINE; } while (0)
+#endif
+
+/*
+ * gzip declarations
+ */
+
+#define OF(args)  args
+#define STATIC static
+
+#undef memset
+#undef memcpy
+
+static inline void *memset(const void *s, int c, size_t n)
+{
+       int i;
+       char *ss = (char *) s;
+
+       for (i = 0; i < n; i++)
+               ss[i] = c;
+       return (void *)s;
+}
+
+#define memzero(s, n) memset((s), 0, (n))
+
+static inline void *memcpy(void *__dest, const void *__src, size_t __n)
+{
+       int i;
+       const char *s = __src;
+       char *d = __dest;
+
+       for (i = 0; i < __n; i++)
+               d[i] = s[i];
+       return __dest;
+}
+
+typedef unsigned char  uch;
+typedef unsigned short ush;
+typedef unsigned long  ulg;
+
+#define WSIZE 0x8000   /* Window size must be at least 32k, and a power of
+                        * two */
+
+static uch *inbuf;     /* input buffer */
+static uch window[WSIZE]; /* sliding window buffer */
+
+static unsigned insize;        /* valid bytes in inbuf */
+static unsigned inptr; /* index of next byte to be processed in inbuf */
+static unsigned outcnt;        /* bytes in output buffer */
+
+/* gzip flag byte */
+#define ASCII_FLAG   0x01 /* bit 0 set: file probably ASCII text */
+#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
+#define EXTRA_FIELD  0x04 /* bit 2 set: extra field present */
+#define ORIG_NAME    0x08 /* bit 3 set: original file name present */
+#define COMMENT      0x10 /* bit 4 set: file comment present */
+#define ENCRYPTED    0x20 /* bit 5 set: file is encrypted */
+#define RESERVED     0xC0 /* bit 6,7:   reserved */
+
+/* Diagnostic functions */
+#ifdef DEBUG
+#  define Assert(cond, msg) { if (!(cond)) error(msg); }
+#  define Trace(x)     fprintf x
+#  define Tracev(x)    { if (verbose) fprintf x ; }
+#  define Tracevv(x)   { if (verbose > 1) fprintf x ; }
+#  define Tracec(c, x) { if (verbose && (c)) fprintf x ; }
+#  define Tracecv(c, x)        { if (verbose > 1 && (c)) fprintf x ; }
+#else
+#  define Assert(cond, msg)
+#  define Trace(x)
+#  define Tracev(x)
+#  define Tracevv(x)
+#  define Tracec(c, x)
+#  define Tracecv(c, x)
+#endif
+
+static int  fill_inbuf(void);
+static void flush_window(void);
+static void error(const char *) __attribute__((noreturn));
+static void kputs(const char *);
+
+static inline unsigned char get_byte(void)
+{
+       unsigned char ch = inptr < insize ? inbuf[inptr++] : fill_inbuf();
+
+#if 0
+       char hex[3];
+       hex[0] = ((ch & 0x0f) > 9) ?
+               ((ch & 0x0f) + 'A' - 0xa) : ((ch & 0x0f) + '0');
+       hex[1] = ((ch >> 4) > 9) ?
+               ((ch >> 4) + 'A' - 0xa) : ((ch >> 4) + '0');
+       hex[2] = 0;
+       kputs(hex);
+#endif
+       return ch;
+}
+
+/*
+ * This is set up by the setup-routine at boot-time
+ */
+#define EXT_MEM_K (*(unsigned short *)0x90002)
+#ifndef STANDARD_MEMORY_BIOS_CALL
+#define ALT_MEM_K (*(unsigned long *) 0x901e0)
+#endif
+#define SCREEN_INFO (*(struct screen_info *)0x90000)
+
+static long bytes_out;
+static uch *output_data;
+static unsigned long output_ptr;
+
+
+static void *malloc(int size);
+
+static inline void free(void *where)
+{      /* Don't care */
+}
+
+static unsigned long free_mem_ptr = (unsigned long) &end;
+static unsigned long free_mem_end_ptr = (unsigned long) &end + 0x90000;
+
+static inline void gzip_mark(void **ptr)
+{
+       kputs(".");
+       *ptr = (void *) free_mem_ptr;
+}
+
+static inline void gzip_release(void **ptr)
+{
+       free_mem_ptr = (unsigned long) *ptr;
+}
+
+#define INPLACE_MOVE_ROUTINE   0x1000
+#define LOW_BUFFER_START       0x2000
+#define LOW_BUFFER_END         0x90000
+#define LOW_BUFFER_SIZE                (LOW_BUFFER_END - LOW_BUFFER_START)
+#define HEAP_SIZE              0x3000
+static int high_loaded;
+static uch *high_buffer_start /* = (uch *)(((ulg)&end) + HEAP_SIZE)*/;
+
+static char *vidmem = (char *)0xb8000;
+static int lines, cols;
+
+#include "../../../../lib/inflate.c"
+
+static void *malloc(int size)
+{
+       void *p;
+
+       if (size < 0)
+               error("Malloc error\n");
+       if (!free_mem_ptr)
+               error("Memory error\n");
+
+       free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
+
+       p = (void *) free_mem_ptr;
+       free_mem_ptr += size;
+
+       if (free_mem_ptr >= free_mem_end_ptr)
+               error("\nOut of memory\n");
+
+       return p;
+}
+
+static inline void scroll(void)
+{
+       int i;
+
+       memcpy(vidmem, vidmem + cols * 2, (lines - 1) * cols * 2);
+       for (i = (lines - 1) * cols * 2; i < lines * cols * 2; i += 2)
+               vidmem[i] = ' ';
+}
+
+static inline void kputchar(unsigned char ch)
+{
+#ifdef CONFIG_MN10300_UNIT_ASB2305
+       while (SC0STR & SC01STR_TBF)
+               continue;
+
+       if (ch == 0x0a) {
+               SC0TXB = 0x0d;
+               while (SC0STR & SC01STR_TBF)
+                       continue;
+       }
+
+       SC0TXB = ch;
+
+#else
+       while (SC1STR & SC01STR_TBF)
+               continue;
+
+       if (ch == 0x0a) {
+               SC1TXB = 0x0d;
+               while (SC1STR & SC01STR_TBF)
+                       continue;
+       }
+
+       SC1TXB = ch;
+
+#endif
+}
+
+static void kputs(const char *s)
+{
+#ifdef CONFIG_DEBUG_DECOMPRESS_KERNEL
+#ifndef CONFIG_GDBSTUB_ON_TTYSx
+       char ch;
+
+       FLOWCTL_SET(DTR);
+
+       while (*s) {
+               LSR_WAIT_FOR(THRE);
+
+               ch = *s++;
+               if (ch == 0x0a) {
+                       CYG_DEV_THR = 0x0d;
+                       LSR_WAIT_FOR(THRE);
+               }
+               CYG_DEV_THR = ch;
+       }
+
+       FLOWCTL_CLEAR(DTR);
+#else
+
+       for (; *s; s++)
+               kputchar(*s);
+
+#endif
+#endif /* CONFIG_DEBUG_DECOMPRESS_KERNEL */
+}
+
+/* ===========================================================================
+ * Fill the input buffer. This is called only when the buffer is empty
+ * and at least one byte is really needed.
+ */
+static int fill_inbuf()
+{
+       if (insize != 0)
+               error("ran out of input data\n");
+
+       inbuf = input_data;
+       insize = input_len;
+       inptr = 1;
+       return inbuf[0];
+}
+
+/* ===========================================================================
+ * Write the output window window[0..outcnt-1] and update crc and bytes_out.
+ * (Used for the decompressed data only.)
+ */
+static void flush_window_low(void)
+{
+    ulg c = crc;         /* temporary variable */
+    unsigned n;
+    uch *in, *out, ch;
+
+    in = window;
+    out = &output_data[output_ptr];
+    for (n = 0; n < outcnt; n++) {
+           ch = *out++ = *in++;
+           c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
+    }
+    crc = c;
+    bytes_out += (ulg)outcnt;
+    output_ptr += (ulg)outcnt;
+    outcnt = 0;
+}
+
+static void flush_window_high(void)
+{
+    ulg c = crc;         /* temporary variable */
+    unsigned n;
+    uch *in,  ch;
+    in = window;
+    for (n = 0; n < outcnt; n++) {
+       ch = *output_data++ = *in++;
+       if ((ulg) output_data == LOW_BUFFER_END)
+               output_data = high_buffer_start;
+       c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
+    }
+    crc = c;
+    bytes_out += (ulg)outcnt;
+    outcnt = 0;
+}
+
+static void flush_window(void)
+{
+       if (high_loaded)
+               flush_window_high();
+       else
+               flush_window_low();
+}
+
+static void error(const char *x)
+{
+       kputs("\n\n");
+       kputs(x);
+       kputs("\n\n -- System halted");
+
+       while (1)
+               /* Halt */;
+}
+
+#define STACK_SIZE (4096)
+
+long user_stack[STACK_SIZE];
+
+struct {
+       long *a;
+       short b;
+} stack_start = { &user_stack[STACK_SIZE], 0 };
+
+void setup_normal_output_buffer(void)
+{
+#ifdef STANDARD_MEMORY_BIOS_CALL
+       if (EXT_MEM_K < 1024)
+               error("Less than 2MB of memory.\n");
+#else
+       if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < 1024)
+               error("Less than 2MB of memory.\n");
+#endif
+       output_data = (char *) 0x100000; /* Points to 1M */
+}
+
+struct moveparams {
+       uch *low_buffer_start;
+       int lcount;
+       uch *high_buffer_start;
+       int hcount;
+};
+
+void setup_output_buffer_if_we_run_high(struct moveparams *mv)
+{
+       high_buffer_start = (uch *)(((ulg) &end) + HEAP_SIZE);
+#ifdef STANDARD_MEMORY_BIOS_CALL
+       if (EXT_MEM_K < (3 * 1024))
+               error("Less than 4MB of memory.\n");
+#else
+       if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3 * 1024))
+               error("Less than 4MB of memory.\n");
+#endif
+       mv->low_buffer_start = output_data = (char *) LOW_BUFFER_START;
+       high_loaded = 1;
+       free_mem_end_ptr = (long) high_buffer_start;
+       if (0x100000 + LOW_BUFFER_SIZE > (ulg) high_buffer_start) {
+               high_buffer_start = (uch *)(0x100000 + LOW_BUFFER_SIZE);
+               mv->hcount = 0; /* say: we need not to move high_buffer */
+       } else {
+               mv->hcount = -1;
+       }
+       mv->high_buffer_start = high_buffer_start;
+}
+
+void close_output_buffer_if_we_run_high(struct moveparams *mv)
+{
+       mv->lcount = bytes_out;
+       if (bytes_out > LOW_BUFFER_SIZE) {
+               mv->lcount = LOW_BUFFER_SIZE;
+               if (mv->hcount)
+                       mv->hcount = bytes_out - LOW_BUFFER_SIZE;
+       } else {
+               mv->hcount = 0;
+       }
+}
+
+#undef DEBUGFLAG
+#ifdef DEBUGFLAG
+int debugflag;
+#endif
+
+int decompress_kernel(struct moveparams *mv)
+{
+#ifdef DEBUGFLAG
+       while (!debugflag)
+               barrier();
+#endif
+
+       output_data = (char *) CONFIG_KERNEL_TEXT_ADDRESS;
+
+       makecrc();
+       kputs("Uncompressing Linux... ");
+       gunzip();
+       kputs("Ok, booting the kernel.\n");
+       return 0;
+}
diff --git a/arch/mn10300/boot/compressed/misc.h b/arch/mn10300/boot/compressed/misc.h
new file mode 100644 (file)
index 0000000..da921cd
--- /dev/null
@@ -0,0 +1,18 @@
+/* Internal definitions for the MN10300 kernel decompressor
+ *
+ * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public Licence
+ * as published by the Free Software Foundation; either version
+ * 2 of the Licence, or (at your option) any later version.
+ */
+
+extern int end;
+
+/*
+ * vmlinux.lds
+ */
+extern char input_data[];
+extern int input_len;
diff --git a/arch/mn10300/boot/compressed/vmlinux.lds b/arch/mn10300/boot/compressed/vmlinux.lds
new file mode 100644 (file)
index 0000000..a084903
--- /dev/null
@@ -0,0 +1,9 @@
+SECTIONS
+{
+  .data : {
+       input_len = .;
+       LONG(input_data_end - input_data) input_data = .;
+       *(.data)
+       input_data_end = .;
+       }
+}
diff --git a/arch/mn10300/boot/install.sh b/arch/mn10300/boot/install.sh
new file mode 100644 (file)
index 0000000..072951c
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# arch/mn10300/boot/install -c.sh
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# Licence.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 1995 by Linus Torvalds
+#
+# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
+#
+# "make install -c" script for i386 architecture
+#
+# Arguments:
+#   $1 - kernel version
+#   $2 - kernel image file
+#   $3 - kernel map file
+#   $4 - default install -c path (blank if root directory)
+#   $5 - boot rom file
+#
+
+# User may have a custom install -c script
+
+rm -fr $4/../usr/include/linux $4/../usr/include/asm
+install -c -m 0755 $2 $4/vmlinuz
+install -c -m 0755 $5 $4/boot.rom
+install -c -m 0755 -d $4/../usr/include/linux
+cd $TOPDIR/include/linux
+for i in `find . -maxdepth 1 -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/linux
+done
+install -c -m 0755 -d $4/../usr/include/linux/byteorder
+cd $TOPDIR/include/linux/byteorder
+for i in `find . -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/linux/byteorder
+done
+install -c -m 0755 -d $4/../usr/include/linux/lockd
+cd $TOPDIR/include/linux/lockd
+for i in `find . -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/linux/lockd
+done
+install -c -m 0755 -d $4/../usr/include/linux/netfilter_ipv4
+cd $TOPDIR/include/linux/netfilter_ipv4
+for i in `find . -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/linux/netfilter_ipv4
+done
+install -c -m 0755 -d $4/../usr/include/linux/nfsd
+cd $TOPDIR/include/linux/nfsd
+for i in `find . -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/linux/nfsd/$i
+done
+install -c -m 0755 -d $4/../usr/include/linux/raid
+cd $TOPDIR/include/linux/raid
+for i in `find . -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/linux/raid
+done
+install -c -m 0755 -d $4/../usr/include/linux/sunrpc
+cd $TOPDIR/include/linux/sunrpc
+for i in `find . -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/linux/sunrpc
+done
+install -c -m 0755 -d $4/../usr/include/asm
+cd $TOPDIR/include/asm
+for i in `find . -name '*.h' -print`; do
+  install -c -m 0644 $i $4/../usr/include/asm
+done
diff --git a/arch/mn10300/boot/tools/build.c b/arch/mn10300/boot/tools/build.c
new file mode 100644 (file)
index 0000000..4f552ea
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ *  Copyright (C) 1991, 1992  Linus Torvalds
+ *  Copyright (C) 1997 Martin Mares
+ */
+
+/*
+ * This file builds a disk-image from three different files:
+ *
+ * - bootsect: exactly 512 bytes of 8086 machine code, loads the rest
+ * - setup: 8086 machine code, sets up system parm
+ * - system: 80386 code for actual system
+ *
+ * It does some checking that all files are of the correct type, and
+ * just writes the result to stdout, removing headers and padding to
+ * the right amount. It also writes some system data to stderr.
+ */
+
+/*
+ * Changes by tytso to allow root device specification
+ * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
+ * Cross compiling fixes by Gertjan van Wingerde, July 1996
+ * Rewritten by Martin Mares, April 1997
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <asm/boot.h>
+
+#define DEFAULT_MAJOR_ROOT 0
+#define DEFAULT_MINOR_ROOT 0
+
+/* Minimal number of setup sectors (see also bootsect.S) */
+#define SETUP_SECTS 4
+
+uint8_t buf[1024];
+int fd;
+int is_big_kernel;
+
+__attribute__((noreturn))
+void die(const char *str, ...)
+{
+       va_list args;
+       va_start(args, str);
+       vfprintf(stderr, str, args);
+       fputc('\n', stderr);
+       exit(1);
+}
+
+void file_open(const char *name)
+{
+       fd = open(name, O_RDONLY, 0);
+       if (fd < 0)
+               die("Unable to open `%s': %m", name);
+}
+
+__attribute__((noreturn))
+void usage(void)
+{
+       die("Usage: build [-b] bootsect setup system [rootdev] [> image]");
+}
+
+int main(int argc, char **argv)
+{
+       unsigned int i, c, sz, setup_sectors;
+       uint32_t sys_size;
+       uint8_t major_root, minor_root;
+       struct stat sb;
+
+       if (argc > 2 && !strcmp(argv[1], "-b")) {
+               is_big_kernel = 1;
+               argc--, argv++;
+       }
+       if ((argc < 4) || (argc > 5))
+               usage();
+       if (argc > 4) {
+               if (!strcmp(argv[4], "CURRENT")) {
+                       if (stat("/", &sb)) {
+                               perror("/");
+                               die("Couldn't stat /");
+                       }
+                       major_root = major(sb.st_dev);
+                       minor_root = minor(sb.st_dev);
+               } else if (strcmp(argv[4], "FLOPPY")) {
+                       if (stat(argv[4], &sb)) {
+                               perror(argv[4]);
+                               die("Couldn't stat root device.");
+                       }
+                       major_root = major(sb.st_rdev);
+                       minor_root = minor(sb.st_rdev);
+               } else {
+                       major_root = 0;
+                       minor_root = 0;
+               }
+       } else {
+               major_root = DEFAULT_MAJOR_ROOT;
+               minor_root = DEFAULT_MINOR_ROOT;
+       }
+       fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
+
+       file_open(argv[1]);
+       i = read(fd, buf, sizeof(buf));
+       fprintf(stderr, "Boot sector %d bytes.\n", i);
+       if (i != 512)
+               die("Boot block must be exactly 512 bytes");
+       if (buf[510] != 0x55 || buf[511] != 0xaa)
+               die("Boot block hasn't got boot flag (0xAA55)");
+       buf[508] = minor_root;
+       buf[509] = major_root;
+       if (write(1, buf, 512) != 512)
+               die("Write call failed");
+       close(fd);
+
+       /* Copy the setup code */
+       file_open(argv[2]);
+       for (i = 0; (c = read(fd, buf, sizeof(buf))) > 0; i += c)
+               if (write(1, buf, c) != c)
+                       die("Write call failed");
+       if (c != 0)
+               die("read-error on `setup'");
+       close(fd);
+
+       /* Pad unused space with zeros */
+       setup_sectors = (i + 511) / 512;
+       /* for compatibility with ancient versions of LILO. */
+       if (setup_sectors < SETUP_SECTS)
+               setup_sectors = SETUP_SECTS;
+       fprintf(stderr, "Setup is %d bytes.\n", i);
+       memset(buf, 0, sizeof(buf));
+       while (i < setup_sectors * 512) {
+               c = setup_sectors * 512 - i;
+               if (c > sizeof(buf))
+                       c = sizeof(buf);
+               if (write(1, buf, c) != c)
+                       die("Write call failed");
+               i += c;
+       }
+
+       file_open(argv[3]);
+       if (fstat(fd, &sb))
+               die("Unable to stat `%s': %m", argv[3]);
+       sz = sb.st_size;
+       fprintf(stderr, "System is %d kB\n", sz / 1024);
+       sys_size = (sz + 15) / 16;
+       /* 0x28000*16 = 2.5 MB, conservative estimate for the current maximum */
+       if (sys_size > (is_big_kernel ? 0x28000 : DEF_SYSSIZE))
+               die("System is too big. Try using %smodules.",
+                       is_big_kernel ? "" : "bzImage or ");
+       if (sys_size > 0xffff)
+               fprintf(stderr,
+                       "warning: kernel is too big for standalone boot "
+                       "from floppy\n");
+       while (sz > 0) {
+               int l, n;
+
+               l = (sz > sizeof(buf)) ? sizeof(buf) : sz;
+               n = read(fd, buf, l);
+               if (n != l) {
+                       if (n < 0)
+                               die("Error reading %s: %m", argv[3]);
+                       else
+                               die("%s: Unexpected EOF", argv[3]);
+               }
+               if (write(1, buf, l) != l)
+                       die("Write failed");
+               sz -= l;
+       }
+       close(fd);
+
+       /* Write sizes to the bootsector */
+       if (lseek(1, 497, SEEK_SET) != 497)
+               die("Output: seek failed");
+       buf[0] = setup_sectors;
+       if (write(1, buf, 1) != 1)
+               die("Write of setup sector count failed");
+       if (lseek(1, 500, SEEK_SET) != 500)
+               die("Output: seek failed");
+       buf[0] = (sys_size & 0xff);
+       buf[1] = ((sys_size >> 8) & 0xff);
+       if (write(1, buf, 2) != 2)
+               die("Write of image length failed");
+
+       return 0;
+}
diff --git a/arch/mn10300/configs/asb2303_defconfig b/arch/mn10300/configs/asb2303_defconfig
new file mode 100644 (file)
index 0000000..ca9876a
--- /dev/null
@@ -0,0 +1,558 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc2
+# Fri Nov 16 13:36:38 2007
+#
+CONFIG_MN10300=y
+CONFIG_AM33=y
+CONFIG_MMU=y
+# CONFIG_HIGHMEM is not set
+# CONFIG_NUMA is not set
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_BUG=y
+CONFIG_QUICKLIST=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+# CONFIG_ARCH_SUPPORTS_AOUT is not set
+CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_HOTPLUG_CPU is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# 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_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_FAIR_GROUP_SCHED is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# 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 is not set
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+# CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES is not set
+# CONFIG_BLOCK is not set
+
+#
+# Matsushita MN10300 system setup
+#
+CONFIG_MN10300_UNIT_ASB2303=y
+# CONFIG_MN10300_UNIT_ASB2305 is not set
+CONFIG_MN10300_PROC_MN103E010=y
+CONFIG_MN10300_CPU_AM33V2=y
+CONFIG_FPU=y
+CONFIG_MN10300_CACHE_WBACK=y
+# CONFIG_MN10300_CACHE_WTHRU is not set
+# CONFIG_MN10300_CACHE_DISABLED is not set
+
+#
+# Memory layout options
+#
+CONFIG_KERNEL_RAM_BASE_ADDRESS=0x90000000
+CONFIG_INTERRUPT_VECTOR_BASE=0x90000000
+CONFIG_KERNEL_TEXT_ADDRESS=0x90001000
+CONFIG_KERNEL_ZIMAGE_BASE_ADDRESS=0x90700000
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_BKL=y
+CONFIG_MN10300_CURRENT_IN_E2=y
+CONFIG_MN10300_USING_JTAG=y
+CONFIG_MN10300_RTC=y
+CONFIG_MN10300_WD_TIMER=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+
+#
+# MN10300 internal serial options
+#
+CONFIG_MN10300_PROC_HAS_TTYSM0=y
+CONFIG_MN10300_PROC_HAS_TTYSM1=y
+CONFIG_MN10300_PROC_HAS_TTYSM2=y
+CONFIG_MN10300_TTYSM=y
+CONFIG_MN10300_TTYSM_CONSOLE=y
+CONFIG_MN10300_TTYSM0=y
+CONFIG_MN10300_TTYSM0_TIMER8=y
+# CONFIG_MN10300_TTYSM0_TIMER2 is not set
+CONFIG_MN10300_TTYSM1=y
+CONFIG_MN10300_TTYSM1_TIMER9=y
+# CONFIG_MN10300_TTYSM1_TIMER3 is not set
+# CONFIG_MN10300_TTYSM2 is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_NR_QUICK=1
+CONFIG_VIRT_TO_BUS=y
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+
+#
+# Executable formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE 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 is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# 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
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# 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
+# 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_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# 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=y
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# 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=y
+CONFIG_MTD_CFI_I4=y
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# 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
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_SMC91X=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# 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
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+CONFIG_RTC=y
+# CONFIG_R3964 is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_RTC_CLASS is not set
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+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
+
+#
+# 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_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# 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_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_NETWORK_FILESYSTEMS=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_SUNRPC_BIND34 is not set
+# 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_NLS is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_SAMPLES is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+
+#
+# Profiling support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
diff --git a/arch/mn10300/kernel/Makefile b/arch/mn10300/kernel/Makefile
new file mode 100644 (file)
index 0000000..ef07c95
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# Makefile for the MN10300-specific core kernel code
+#
+extra-y := head.o init_task.o vmlinux.lds
+
+obj-y   := process.o semaphore.o signal.o entry.o fpu.o traps.o irq.o \
+          ptrace.o setup.o time.o sys_mn10300.o io.o kthread.o \
+          switch_to.o mn10300_ksyms.o kernel_execve.o
+
+obj-$(CONFIG_MN10300_WD_TIMER) += mn10300-watchdog.o mn10300-watchdog-low.o
+
+obj-$(CONFIG_FPU) += fpu-low.o
+
+obj-$(CONFIG_MN10300_TTYSM) += mn10300-serial.o mn10300-serial-low.o \
+                              mn10300-debug.o
+obj-$(CONFIG_GDBSTUB) += gdb-stub.o gdb-low.o
+obj-$(CONFIG_GDBSTUB_ON_TTYSx) += gdb-io-serial.o gdb-io-serial-low.o
+obj-$(CONFIG_GDBSTUB_ON_TTYSMx) += gdb-io-ttysm.o gdb-io-ttysm-low.o
+
+ifneq ($(CONFIG_MN10300_CACHE_DISABLED),y)
+obj-$(CONFIG_GDBSTUB) += gdb-cache.o
+endif
+
+obj-$(CONFIG_MN10300_RTC) += rtc.o
+obj-$(CONFIG_PROFILE) += profile.o profile-low.o
+obj-$(CONFIG_MODULES) += module.o
+obj-$(CONFIG_KPROBES) += kprobes.o
diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c
new file mode 100644 (file)
index 0000000..ee2d9f8
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Generate definitions needed by assembly language modules.
+ * This code generates raw asm output which is post-processed
+ * to extract and format the required data.
+ */
+
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/personality.h>
+#include <asm/ucontext.h>
+#include <asm/processor.h>
+#include <asm/thread_info.h>
+#include <asm/ptrace.h>
+#include "sigframe.h"
+#include "mn10300-serial.h"
+
+#define DEFINE(sym, val) \
+       asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define BLANK() asm volatile("\n->")
+
+#define OFFSET(sym, str, mem) \
+       DEFINE(sym, offsetof(struct str, mem));
+
+void foo(void)
+{
+       OFFSET(SIGCONTEXT_d0, sigcontext, d0);
+       OFFSET(SIGCONTEXT_d1, sigcontext, d1);
+       BLANK();
+
+       OFFSET(TI_task,                 thread_info, task);
+       OFFSET(TI_exec_domain,          thread_info, exec_domain);
+       OFFSET(TI_flags,                thread_info, flags);
+       OFFSET(TI_cpu,                  thread_info, cpu);
+       OFFSET(TI_preempt_count,        thread_info, preempt_count);
+       OFFSET(TI_addr_limit,           thread_info, addr_limit);
+       OFFSET(TI_restart_block,        thread_info, restart_block);
+       BLANK();
+
+       OFFSET(REG_D0,                  pt_regs, d0);
+       OFFSET(REG_D1,                  pt_regs, d1);
+       OFFSET(REG_D2,                  pt_regs, d2);
+       OFFSET(REG_D3,                  pt_regs, d3);
+       OFFSET(REG_A0,                  pt_regs, a0);
+       OFFSET(REG_A1,                  pt_regs, a1);
+       OFFSET(REG_A2,                  pt_regs, a2);
+       OFFSET(REG_A3,                  pt_regs, a3);
+       OFFSET(REG_E0,                  pt_regs, e0);
+       OFFSET(REG_E1,                  pt_regs, e1);
+       OFFSET(REG_E2,                  pt_regs, e2);
+       OFFSET(REG_E3,                  pt_regs, e3);
+       OFFSET(REG_E4,                  pt_regs, e4);
+       OFFSET(REG_E5,                  pt_regs, e5);
+       OFFSET(REG_E6,                  pt_regs, e6);
+       OFFSET(REG_E7,                  pt_regs, e7);
+       OFFSET(REG_SP,                  pt_regs, sp);
+       OFFSET(REG_EPSW,                pt_regs, epsw);
+       OFFSET(REG_PC,                  pt_regs, pc);
+       OFFSET(REG_LAR,                 pt_regs, lar);
+       OFFSET(REG_LIR,                 pt_regs, lir);
+       OFFSET(REG_MDR,                 pt_regs, mdr);
+       OFFSET(REG_MCVF,                pt_regs, mcvf);
+       OFFSET(REG_MCRL,                pt_regs, mcrl);
+       OFFSET(REG_MCRH,                pt_regs, mcrh);
+       OFFSET(REG_MDRQ,                pt_regs, mdrq);
+       OFFSET(REG_ORIG_D0,             pt_regs, orig_d0);
+       OFFSET(REG_NEXT,                pt_regs, next);
+       DEFINE(REG__END,                sizeof(struct pt_regs));
+       BLANK();
+
+       OFFSET(THREAD_UREGS,            thread_struct, uregs);
+       OFFSET(THREAD_PC,               thread_struct, pc);
+       OFFSET(THREAD_SP,               thread_struct, sp);
+       OFFSET(THREAD_A3,               thread_struct, a3);
+       OFFSET(THREAD_USP,              thread_struct, usp);
+       OFFSET(THREAD_FRAME,            thread_struct, __frame);
+       BLANK();
+
+       DEFINE(CLONE_VM_asm,            CLONE_VM);
+       DEFINE(CLONE_FS_asm,            CLONE_FS);
+       DEFINE(CLONE_FILES_asm,         CLONE_FILES);
+       DEFINE(CLONE_SIGHAND_asm,       CLONE_SIGHAND);
+       DEFINE(CLONE_UNTRACED_asm,      CLONE_UNTRACED);
+       DEFINE(SIGCHLD_asm,             SIGCHLD);
+       BLANK();
+
+       OFFSET(EXEC_DOMAIN_handler,     exec_domain, handler);
+       OFFSET(RT_SIGFRAME_sigcontext,  rt_sigframe, uc.uc_mcontext);
+
+       DEFINE(PAGE_SIZE_asm,           PAGE_SIZE);
+
+       OFFSET(__rx_buffer,             mn10300_serial_port, rx_buffer);
+       OFFSET(__rx_inp,                mn10300_serial_port, rx_inp);
+       OFFSET(__rx_outp,               mn10300_serial_port, rx_outp);
+       OFFSET(__tx_info_buffer,        mn10300_serial_port, uart.info);
+       OFFSET(__tx_xchar,              mn10300_serial_port, tx_xchar);
+       OFFSET(__tx_break,              mn10300_serial_port, tx_break);
+       OFFSET(__intr_flags,            mn10300_serial_port, intr_flags);
+       OFFSET(__rx_icr,                mn10300_serial_port, rx_icr);
+       OFFSET(__tx_icr,                mn10300_serial_port, tx_icr);
+       OFFSET(__tm_icr,                mn10300_serial_port, _tmicr);
+       OFFSET(__iobase,                mn10300_serial_port, _iobase);
+
+       DEFINE(__UART_XMIT_SIZE,        UART_XMIT_SIZE);
+       OFFSET(__xmit_buffer,           uart_info, xmit.buf);
+       OFFSET(__xmit_head,             uart_info, xmit.head);
+       OFFSET(__xmit_tail,             uart_info, xmit.tail);
+}
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
new file mode 100644 (file)
index 0000000..11de360
--- /dev/null
@@ -0,0 +1,721 @@
+###############################################################################
+#
+# MN10300 Exception and interrupt entry points
+#
+# Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
+# Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+# Modified by David Howells (dhowells@redhat.com)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public Licence
+# as published by the Free Software Foundation; either version
+# 2 of the Licence, or (at your option) any later version.
+#
+###############################################################################
+#include <linux/sys.h>
+#include <linux/linkage.h>
+#include <asm/smp.h>
+#include <asm/system.h>
+#include <asm/thread_info.h>
+#include <asm/intctl-regs.h>
+#include <asm/busctl-regs.h>
+#include <asm/timer-regs.h>
+#include <asm/unit/leds.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/errno.h>
+#include <asm/asm-offsets.h>
+#include <asm/frame.inc>
+
+#ifdef CONFIG_PREEMPT
+#define preempt_stop           __cli
+#else
+#define preempt_stop
+#define resume_kernel          restore_all
+#endif
+
+       .macro __cli
+       and     ~EPSW_IM,epsw
+       or      EPSW_IE|MN10300_CLI_LEVEL,epsw
+       nop
+       nop
+       nop
+       .endm
+       .macro __sti
+       or      EPSW_IE|EPSW_IM_7,epsw
+       .endm
+
+
+       .am33_2
+
+###############################################################################
+#
+# the return path for a forked child
+# - on entry, D0 holds the address of the previous task to run
+#
+###############################################################################
+ENTRY(ret_from_fork)
+       call    schedule_tail[],0
+       GET_THREAD_INFO a2
+
+       # return 0 to indicate child process
+       clr     d0
+       mov     d0,(REG_D0,fp)
+       jmp     syscall_exit
+
+###############################################################################
+#
+# system call handler
+#
+###############################################################################
+ENTRY(system_call)
+       add     -4,sp
+       SAVE_ALL
+       mov     d0,(REG_ORIG_D0,fp)
+       GET_THREAD_INFO a2
+       cmp     nr_syscalls,d0
+       bcc     syscall_badsys
+       btst    _TIF_SYSCALL_TRACE,(TI_flags,a2)
+       bne     syscall_trace_entry
+syscall_call:
+       add     d0,d0,a1
+       add     a1,a1
+       mov     (REG_A0,fp),d0
+       mov     (sys_call_table,a1),a0
+       calls   (a0)
+       mov     d0,(REG_D0,fp)
+syscall_exit:
+       # make sure we don't miss an interrupt setting need_resched or
+       # sigpending between sampling and the rti
+       __cli
+       mov     (TI_flags,a2),d2
+       btst    _TIF_ALLWORK_MASK,d2
+       bne     syscall_exit_work
+restore_all:
+       RESTORE_ALL
+
+###############################################################################
+#
+# perform work that needs to be done immediately before resumption and syscall
+# tracing
+#
+###############################################################################
+       ALIGN
+syscall_exit_work:
+       btst    _TIF_SYSCALL_TRACE,d2
+       beq     work_pending
+       __sti                           # could let do_syscall_trace() call
+                                       # schedule() instead
+       mov     fp,d0
+       mov     1,d1
+       call    do_syscall_trace[],0    # do_syscall_trace(regs,entryexit)
+       jmp     resume_userspace
+
+       ALIGN
+work_pending:
+       btst    _TIF_NEED_RESCHED,d2
+       beq     work_notifysig
+
+work_resched:
+       call    schedule[],0
+
+       # make sure we don't miss an interrupt setting need_resched or
+       # sigpending between sampling and the rti
+       __cli
+
+       # is there any work to be done other than syscall tracing?
+       mov     (TI_flags,a2),d2
+       btst    _TIF_WORK_MASK,d2
+       beq     restore_all
+       btst    _TIF_NEED_RESCHED,d2
+       bne     work_resched
+
+       # deal with pending signals and notify-resume requests
+work_notifysig:
+       mov     fp,d0
+       mov     d2,d1
+       call    do_notify_resume[],0
+       jmp     resume_userspace
+
+       # perform syscall entry tracing
+syscall_trace_entry:
+       mov     -ENOSYS,d0
+       mov     d0,(REG_D0,fp)
+       mov     fp,d0
+       clr     d1
+       call    do_syscall_trace[],0
+       mov     (REG_ORIG_D0,fp),d0
+       mov     (REG_D1,fp),d1
+       cmp     nr_syscalls,d0
+       bcs     syscall_call
+       jmp     syscall_exit
+
+syscall_badsys:
+       mov     -ENOSYS,d0
+       mov     d0,(REG_D0,fp)
+       jmp     resume_userspace
+
+       # userspace resumption stub bypassing syscall exit tracing
+       .globl  ret_from_exception, ret_from_intr
+       ALIGN
+ret_from_exception:
+       preempt_stop
+ret_from_intr:
+       GET_THREAD_INFO a2
+       mov     (REG_EPSW,fp),d0        # need to deliver signals before
+                                       # returning to userspace
+       and     EPSW_nSL,d0
+       beq     resume_kernel           # returning to supervisor mode
+
+ENTRY(resume_userspace)
+       # make sure we don't miss an interrupt setting need_resched or
+       # sigpending between sampling and the rti
+       __cli
+
+       # is there any work to be done on int/exception return?
+       mov     (TI_flags,a2),d2
+       btst    _TIF_WORK_MASK,d2
+       bne     work_pending
+       jmp     restore_all
+
+#ifdef CONFIG_PREEMPT
+ENTRY(resume_kernel)
+       mov     (TI_preempt_count,a2),d0        # non-zero preempt_count ?
+       cmp     0,d0
+       bne     restore_all
+
+need_resched:
+       btst    _TIF_NEED_RESCHED,(TI_flags,a2)
+       beq     restore_all
+       mov     (REG_EPSW,fp),d0
+       and     EPSW_IM,d0
+       cmp     EPSW_IM_7,d0            # interrupts off (exception path) ?
+       beq     restore_all
+       call    preempt_schedule_irq[],0
+       jmp     need_resched
+#endif
+
+
+###############################################################################
+#
+# IRQ handler entry point
+# - intended to be entered at multiple priorities
+#
+###############################################################################
+ENTRY(irq_handler)
+       add     -4,sp
+       SAVE_ALL
+
+       # it's not a syscall
+       mov     0xffffffff,d0
+       mov     d0,(REG_ORIG_D0,fp)
+
+       mov     fp,d0
+       call    do_IRQ[],0                      # do_IRQ(regs)
+
+       jmp     ret_from_intr
+
+###############################################################################
+#
+# Monitor Signal handler entry point
+#
+###############################################################################
+ENTRY(monitor_signal)
+       movbu   (0xae000001),d1
+       cmp     1,d1
+       beq     monsignal
+       ret     [],0
+
+monsignal:
+       or      EPSW_NMID,epsw
+       mov     d0,a0
+       mov     a0,sp
+       mov     (REG_EPSW,fp),d1
+       and     ~EPSW_nSL,d1
+       mov     d1,(REG_EPSW,fp)
+       movm    (sp),[d2,d3,a2,a3,exreg0,exreg1,exother]
+       mov     (sp),a1
+       mov     a1,usp
+       movm    (sp),[other]
+       add     4,sp
+here:  jmp     0x8e000008-here+0x8e000008
+
+###############################################################################
+#
+# Double Fault handler entry point
+# - note that there will not be a stack, D0/A0 will hold EPSW/PC as were
+#
+###############################################################################
+       .section .bss
+       .balign THREAD_SIZE
+       .space  THREAD_SIZE
+__df_stack:
+       .previous
+
+ENTRY(double_fault)
+       mov     a0,(__df_stack-4)       # PC as was
+       mov     d0,(__df_stack-8)       # EPSW as was
+       mn10300_set_dbfleds             # display 'db-f' on the LEDs
+       mov     0xaa55aa55,d0
+       mov     d0,(__df_stack-12)      # no ORIG_D0
+       mov     sp,a0                   # save corrupted SP
+       mov     __df_stack-12,sp        # emergency supervisor stack
+       SAVE_ALL
+       mov     a0,(REG_A0,fp)          # save corrupted SP as A0 (which got
+                                       # clobbered by the CPU)
+       mov     fp,d0
+       calls   do_double_fault
+double_fault_loop:
+       bra     double_fault_loop
+
+###############################################################################
+#
+# Bus Error handler entry point
+# - handle external (async) bus errors separately
+#
+###############################################################################
+ENTRY(raw_bus_error)
+       add     -4,sp
+       mov     d0,(sp)
+       mov     (BCBERR),d0             # what
+       btst    BCBERR_BEMR_DMA,d0      # see if it was an external bus error
+       beq     __common_exception_aux  # it wasn't
+
+       SAVE_ALL
+       mov     (BCBEAR),d1             # destination of erroneous access
+
+       mov     (REG_ORIG_D0,fp),d2
+       mov     d2,(REG_D0,fp)
+       mov     -1,d2
+       mov     d2,(REG_ORIG_D0,fp)
+
+       add     -4,sp
+       mov     fp,(12,sp)              # frame pointer
+       call    io_bus_error[],0
+       jmp     restore_all
+
+###############################################################################
+#
+# Miscellaneous exception entry points
+#
+###############################################################################
+ENTRY(nmi_handler)
+       add     -4,sp
+       mov     d0,(sp)
+       mov     (TBR),d0
+       bra     __common_exception_nonmi
+
+ENTRY(__common_exception)
+       add     -4,sp
+       mov     d0,(sp)
+
+__common_exception_aux:
+       mov     (TBR),d0
+       and     ~EPSW_NMID,epsw         # turn NMIs back on if not NMI
+       or      EPSW_IE,epsw
+
+__common_exception_nonmi:
+       and     0x0000FFFF,d0           # turn the exception code into a vector
+                                       # table index
+
+       btst    0x00000007,d0
+       bne     1f
+       cmp     0x00000400,d0
+       bge     1f
+
+       SAVE_ALL                        # build the stack frame
+
+       mov     (REG_D0,fp),a2          # get the exception number
+       mov     (REG_ORIG_D0,fp),d0
+       mov     d0,(REG_D0,fp)
+       mov     -1,d0
+       mov     d0,(REG_ORIG_D0,fp)
+
+#ifdef CONFIG_GDBSTUB
+       btst    0x01,(gdbstub_busy)
+       beq     2f
+       and     ~EPSW_IE,epsw
+       mov     fp,d0
+       mov     a2,d1
+       call    gdbstub_exception[],0   # gdbstub itself caused an exception
+       bra     restore_all
+2:
+#endif
+
+       mov     fp,d0                   # arg 0: stacked register file
+       mov     a2,d1                   # arg 1: exception number
+       lsr     1,a2
+
+       mov     (exception_table,a2),a2
+       calls   (a2)
+       jmp     ret_from_exception
+
+1:     pi                              # BUG() equivalent
+
+###############################################################################
+#
+# Exception handler functions table
+#
+###############################################################################
+       .data
+ENTRY(exception_table)
+       .rept   0x400>>1
+        .long  uninitialised_exception
+       .endr
+       .previous
+
+###############################################################################
+#
+# Change an entry in the exception table
+# - D0 exception code, D1 handler
+#
+###############################################################################
+ENTRY(set_excp_vector)
+       lsr     1,d0
+       add     exception_table,d0
+       mov     d1,(d0)
+       mov     4,d1
+#if defined(CONFIG_MN10300_CACHE_WBACK)
+       jmp     mn10300_dcache_flush_inv_range2
+#else
+       ret     [],0
+#endif
+
+###############################################################################
+#
+# System call table
+#
+###############################################################################
+       .data
+ENTRY(sys_call_table)
+       .long sys_restart_syscall       /* 0 */
+       .long sys_exit
+       .long sys_fork
+       .long sys_read
+       .long sys_write
+       .long sys_open          /* 5 */
+       .long sys_close
+       .long sys_waitpid
+       .long sys_creat
+       .long sys_link
+       .long sys_unlink        /* 10 */
+       .long sys_execve
+       .long sys_chdir
+       .long sys_time
+       .long sys_mknod
+       .long sys_chmod         /* 15 */
+       .long sys_lchown16
+       .long sys_ni_syscall    /* old break syscall holder */
+       .long sys_stat
+       .long sys_lseek
+       .long sys_getpid        /* 20 */
+       .long sys_mount
+       .long sys_oldumount
+       .long sys_setuid16
+       .long sys_getuid16
+       .long sys_stime         /* 25 */
+       .long sys_ptrace
+       .long sys_alarm
+       .long sys_fstat
+       .long sys_pause
+       .long sys_utime         /* 30 */
+       .long sys_ni_syscall    /* old stty syscall holder */
+       .long sys_ni_syscall    /* old gtty syscall holder */
+       .long sys_access
+       .long sys_nice
+       .long sys_ni_syscall    /* 35 - old ftime syscall holder */
+       .long sys_sync
+       .long sys_kill
+       .long sys_rename
+       .long sys_mkdir
+       .long sys_rmdir         /* 40 */
+       .long sys_dup
+       .long sys_pipe
+       .long sys_times
+       .long sys_ni_syscall    /* old prof syscall holder */
+       .long sys_brk           /* 45 */
+       .long sys_setgid16
+       .long sys_getgid16
+       .long sys_signal
+       .long sys_geteuid16
+       .long sys_getegid16     /* 50 */
+       .long sys_acct
+       .long sys_umount        /* recycled never used phys() */
+       .long sys_ni_syscall    /* old lock syscall holder */
+       .long sys_ioctl
+       .long sys_fcntl         /* 55 */
+       .long sys_ni_syscall    /* old mpx syscall holder */
+       .long sys_setpgid
+       .long sys_ni_syscall    /* old ulimit syscall holder */
+       .long sys_ni_syscall    /* old sys_olduname */
+       .long sys_umask         /* 60 */
+       .long sys_chroot
+       .long sys_ustat
+       .long sys_dup2
+       .long sys_getppid
+       .long sys_getpgrp       /* 65 */
+       .long sys_setsid
+       .long sys_sigaction
+       .long sys_sgetmask
+       .long sys_ssetmask
+       .long sys_setreuid16    /* 70 */
+       .long sys_setregid16
+       .long sys_sigsuspend
+       .long sys_sigpending
+       .long sys_sethostname
+       .long sys_setrlimit     /* 75 */
+       .long sys_old_getrlimit
+       .long sys_getrusage
+       .long sys_gettimeofday
+       .long sys_settimeofday
+       .long sys_getgroups16   /* 80 */
+       .long sys_setgroups16
+       .long old_select
+       .long sys_symlink
+       .long sys_lstat
+       .long sys_readlink      /* 85 */
+       .long sys_uselib
+       .long sys_swapon
+       .long sys_reboot
+       .long old_readdir
+       .long old_mmap          /* 90 */
+       .long sys_munmap
+       .long sys_truncate
+       .long sys_ftruncate
+       .long sys_fchmod
+       .long sys_fchown16      /* 95 */
+       .long sys_getpriority
+       .long sys_setpriority
+       .long sys_ni_syscall    /* old profil syscall holder */
+       .long sys_statfs
+       .long sys_fstatfs       /* 100 */
+       .long sys_ni_syscall    /* ioperm */
+       .long sys_socketcall
+       .long sys_syslog
+       .long sys_setitimer
+       .long sys_getitimer     /* 105 */
+       .long sys_newstat
+       .long sys_newlstat
+       .long sys_newfstat
+       .long sys_ni_syscall    /* old sys_uname */
+       .long sys_ni_syscall    /* 110 - iopl */
+       .long sys_vhangup
+       .long sys_ni_syscall    /* old "idle" system call */
+       .long sys_ni_syscall    /* vm86old */
+       .long sys_wait4
+       .long sys_swapoff       /* 115 */
+       .long sys_sysinfo
+       .long sys_ipc
+       .long sys_fsync
+       .long sys_sigreturn
+       .long sys_clone         /* 120 */
+       .long sys_setdomainname
+       .long sys_newuname
+       .long sys_ni_syscall    /* modify_ldt */
+       .long sys_adjtimex
+       .long sys_mprotect      /* 125 */
+       .long sys_sigprocmask
+       .long sys_ni_syscall    /* old "create_module" */
+       .long sys_init_module
+       .long sys_delete_module
+       .long sys_ni_syscall    /* 130: old "get_kernel_syms" */
+       .long sys_quotactl
+       .long sys_getpgid
+       .long sys_fchdir
+       .long sys_bdflush
+       .long sys_sysfs         /* 135 */
+       .long sys_personality
+       .long sys_ni_syscall