Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
authorPaul Mackerras <paulus@samba.org>
Wed, 6 Feb 2008 11:08:37 +0000 (22:08 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 6 Feb 2008 11:08:37 +0000 (22:08 +1100)
707 files changed:
Documentation/DocBook/s390-drivers.tmpl
Documentation/Smack.txt [new file with mode: 0644]
Documentation/filesystems/proc.txt
Documentation/gpio.txt
Documentation/i2c/chips/pca9539
Documentation/ia64/aliasing-test.c
Documentation/kernel-parameters.txt
Documentation/pcmcia/driver-changes.txt
Documentation/pm_qos_interface.txt [new file with mode: 0644]
Documentation/sysctl/vm.txt
MAINTAINERS
arch/alpha/kernel/pci-noop.c
arch/alpha/kernel/pci_iommu.c
arch/alpha/kernel/setup.c
arch/alpha/kernel/systbls.S
arch/arm/Kconfig
arch/arm/kernel/calls.S
arch/arm/kernel/smp.c
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/generic.h
arch/arm/mach-pxa/gpio.c [new file with mode: 0644]
arch/arm/mach-pxa/irq.c
arch/arm/mm/ioremap.c
arch/arm/mm/pgd.c
arch/avr32/Kconfig
arch/avr32/kernel/syscall_table.S
arch/avr32/mach-at32ap/pio.c
arch/avr32/mach-at32ap/pio.h
arch/blackfin/mach-common/entry.S
arch/cris/Kconfig
arch/cris/arch-v10/Kconfig
arch/cris/arch-v10/drivers/Kconfig
arch/cris/arch-v10/kernel/entry.S
arch/cris/arch-v32/Kconfig
arch/cris/arch-v32/drivers/Kconfig
arch/cris/arch-v32/drivers/pci/dma.c
arch/frv/Kconfig
arch/frv/kernel/entry.S
arch/frv/kernel/vmlinux.lds.S
arch/frv/mm/mmu-context.c
arch/frv/mm/pgalloc.c
arch/ia64/hp/common/sba_iommu.c
arch/ia64/ia32/ia32_support.c
arch/ia64/kernel/efi.c
arch/ia64/kernel/entry.S
arch/ia64/kernel/fsyscall_gtod_data.h
arch/ia64/kernel/ia64_ksyms.c
arch/ia64/kernel/kprobes.c
arch/ia64/kernel/mca.c
arch/ia64/kernel/mca_asm.S
arch/ia64/kernel/mca_drv.c
arch/ia64/kernel/mca_drv.h
arch/ia64/kernel/mca_drv_asm.S
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/sal.c
arch/ia64/kernel/setup.c
arch/ia64/kernel/smpboot.c
arch/ia64/kernel/traps.c
arch/ia64/kernel/unaligned.c
arch/ia64/mm/fault.c
arch/ia64/sn/kernel/sn2/sn2_smp.c
arch/ia64/sn/kernel/sn2/sn_hwperf.c
arch/m32r/boot/compressed/m32r_sio.c
arch/m32r/kernel/syscall_table.S
arch/m68k/Kconfig
arch/m68k/Makefile
arch/m68k/amiga/Makefile
arch/m68k/amiga/amiga_ksyms.c [deleted file]
arch/m68k/amiga/amisound.c
arch/m68k/amiga/chipram.c
arch/m68k/amiga/config.c
arch/m68k/amiga/pcmcia.c
arch/m68k/atari/Makefile
arch/m68k/atari/ataints.c
arch/m68k/atari/atari_ksyms.c [deleted file]
arch/m68k/atari/atasound.c
arch/m68k/atari/config.c
arch/m68k/atari/debug.c
arch/m68k/atari/hades-pci.c
arch/m68k/atari/stdma.c
arch/m68k/atari/stram.c
arch/m68k/configs/mac_defconfig
arch/m68k/hp300/Makefile
arch/m68k/hp300/ksyms.c [deleted file]
arch/m68k/kernel/entry.S
arch/m68k/mac/Makefile
arch/m68k/mac/config.c
arch/m68k/mac/mac_ksyms.c [deleted file]
arch/m68k/mac/via.c
arch/m68k/mvme16x/Makefile
arch/m68k/mvme16x/config.c
arch/m68k/mvme16x/mvme16x_ksyms.c [deleted file]
arch/m68knommu/Kconfig.debug
arch/m68knommu/defconfig
arch/m68knommu/kernel/m68k_ksyms.c
arch/m68knommu/kernel/setup.c
arch/m68knommu/kernel/syscalltable.S
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/powerpc/Kconfig
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/dma_64.c
arch/powerpc/kernel/iommu.c
arch/powerpc/kernel/legacy_serial.c
arch/powerpc/kernel/vio.c
arch/powerpc/mm/mem.c
arch/powerpc/mm/pgtable_32.c
arch/powerpc/platforms/82xx/mpc8272_ads.c
arch/powerpc/platforms/82xx/pq2fads.c
arch/powerpc/platforms/cell/Kconfig
arch/powerpc/platforms/cell/axon_msi.c
arch/powerpc/platforms/cell/setup.c
arch/powerpc/platforms/cell/spufs/Makefile
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/platforms/cell/spufs/inode.c
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/sched.c
arch/powerpc/platforms/cell/spufs/spufs.h
arch/powerpc/platforms/cell/spufs/sputrace.c [new file with mode: 0644]
arch/powerpc/platforms/iseries/iommu.c
arch/powerpc/platforms/pseries/reconfig.c
arch/powerpc/sysdev/mpc8xx_pic.c
arch/ppc/mm/pgtable.c
arch/s390/Kconfig
arch/s390/Kconfig.debug
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/entry.S
arch/s390/kernel/entry64.S
arch/s390/kernel/ipl.c
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c
arch/s390/kernel/stacktrace.c
arch/s390/kernel/syscalls.S
arch/s390/kernel/traps.c
arch/s390/kernel/vmlinux.lds.S
arch/s390/mm/init.c
arch/s390/mm/vmem.c
arch/sh/kernel/syscalls_32.S
arch/sh/kernel/syscalls_64.S
arch/sparc/kernel/systbls.S
arch/sparc64/kernel/iommu.c
arch/sparc64/kernel/iommu_common.c
arch/sparc64/kernel/iommu_common.h
arch/sparc64/kernel/pci_sun4v.c
arch/sparc64/kernel/systbls.S
arch/um/Kconfig
arch/um/Kconfig.char
arch/um/Kconfig.debug
arch/um/Kconfig.net
arch/um/Makefile
arch/um/Makefile-tt [deleted file]
arch/um/defconfig
arch/um/drivers/line.c
arch/um/drivers/mconsole_kern.c
arch/um/drivers/mconsole_user.c
arch/um/drivers/net_kern.c
arch/um/drivers/net_user.c
arch/um/drivers/port_kern.c
arch/um/drivers/random.c
arch/um/drivers/slip_user.c
arch/um/drivers/slirp_user.c
arch/um/drivers/ssl.c
arch/um/drivers/stdio_console.c
arch/um/drivers/ubd_kern.c
arch/um/drivers/ubd_user.c
arch/um/drivers/vde_user.c
arch/um/include/arch.h
arch/um/include/as-layout.h
arch/um/include/chan_user.h
arch/um/include/common-offsets.h
arch/um/include/init.h
arch/um/include/irq_user.h
arch/um/include/kern_util.h
arch/um/include/mem_user.h
arch/um/include/misc_constants.h [deleted file]
arch/um/include/os.h
arch/um/include/ptrace_user.h
arch/um/include/registers.h
arch/um/include/signal_kern.h [deleted file]
arch/um/include/skas/mode-skas.h [deleted file]
arch/um/include/sysdep-i386/syscalls.h
arch/um/include/sysdep-x86_64/kernel-offsets.h
arch/um/include/sysdep-x86_64/syscalls.h
arch/um/include/um_mmu.h
arch/um/include/um_uaccess.h
arch/um/kernel/exec.c
arch/um/kernel/exitcode.c
arch/um/kernel/gmon_syms.c
arch/um/kernel/gprof_syms.c
arch/um/kernel/initrd.c
arch/um/kernel/irq.c
arch/um/kernel/ksyms.c
arch/um/kernel/mem.c
arch/um/kernel/physmem.c
arch/um/kernel/process.c
arch/um/kernel/reboot.c
arch/um/kernel/sigio.c
arch/um/kernel/signal.c
arch/um/kernel/skas/clone.c
arch/um/kernel/skas/mmu.c
arch/um/kernel/skas/process.c
arch/um/kernel/skas/syscall.c
arch/um/kernel/skas/uaccess.c
arch/um/kernel/smp.c
arch/um/kernel/syscall.c
arch/um/kernel/sysrq.c
arch/um/kernel/time.c
arch/um/kernel/tlb.c
arch/um/kernel/trap.c
arch/um/kernel/uaccess.c
arch/um/kernel/um_arch.c
arch/um/kernel/umid.c
arch/um/os-Linux/Makefile
arch/um/os-Linux/aio.c
arch/um/os-Linux/drivers/ethertap_user.c
arch/um/os-Linux/drivers/tuntap_user.c
arch/um/os-Linux/file.c
arch/um/os-Linux/helper.c
arch/um/os-Linux/irq.c
arch/um/os-Linux/main.c
arch/um/os-Linux/mem.c
arch/um/os-Linux/process.c
arch/um/os-Linux/registers.c
arch/um/os-Linux/sigio.c
arch/um/os-Linux/signal.c
arch/um/os-Linux/skas/Makefile
arch/um/os-Linux/skas/process.c
arch/um/os-Linux/skas/trap.c [deleted file]
arch/um/os-Linux/start_up.c
arch/um/os-Linux/trap.c [deleted file]
arch/um/os-Linux/tty.c
arch/um/os-Linux/tty_log.c
arch/um/os-Linux/util.c
arch/um/sys-i386/bug.c
arch/um/sys-i386/bugs.c
arch/um/sys-i386/ldt.c
arch/um/sys-i386/ptrace.c
arch/um/sys-i386/ptrace_user.c
arch/um/sys-i386/signal.c
arch/um/sys-i386/stub.S
arch/um/sys-i386/stub_segv.c
arch/um/sys-i386/sys_call_table.S
arch/um/sys-i386/tls.c
arch/um/sys-ppc/Makefile
arch/um/sys-x86_64/bug.c
arch/um/sys-x86_64/bugs.c
arch/um/sys-x86_64/ptrace.c
arch/um/sys-x86_64/ptrace_user.c
arch/um/sys-x86_64/signal.c
arch/um/sys-x86_64/stub.S
arch/um/sys-x86_64/stub_segv.c
arch/um/sys-x86_64/syscall_table.c
arch/um/sys-x86_64/syscalls.c
arch/um/sys-x86_64/sysrq.c
arch/um/sys-x86_64/um_module.c
arch/x86/Kconfig
arch/x86/ia32/ia32entry.S
arch/x86/kernel/pci-calgary_64.c
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/syscall_table_32.S
arch/x86/kvm/x86.c
arch/x86/lib/Makefile
arch/x86/lib/bitstr_64.c [deleted file]
arch/x86/mm/pageattr.c
arch/x86/mm/pgtable_32.c
arch/x86/pci/i386.c
drivers/Kconfig
drivers/Makefile
drivers/acpi/processor_idle.c
drivers/ata/sata_inic162x.c
drivers/base/Makefile
drivers/base/dmapool.c [deleted file]
drivers/bluetooth/bpa10x.c
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/btsdio.c
drivers/bluetooth/btuart_cs.c
drivers/bluetooth/hci_usb.c
drivers/cdrom/viocd.c
drivers/char/agp/agp.h
drivers/char/agp/alpha-agp.c
drivers/char/agp/amd-k7-agp.c
drivers/char/agp/backend.c
drivers/char/agp/compat_ioctl.c
drivers/char/agp/compat_ioctl.h
drivers/char/agp/frontend.c
drivers/char/agp/generic.c
drivers/char/agp/intel-agp.c
drivers/char/hw_random/core.c
drivers/char/misc.c
drivers/char/pcmcia/cm4000_cs.c
drivers/cpuidle/cpuidle.c
drivers/cpuidle/governors/ladder.c
drivers/cpuidle/governors/menu.c
drivers/dio/dio.c
drivers/gpio/Kconfig [new file with mode: 0644]
drivers/gpio/Makefile [new file with mode: 0644]
drivers/gpio/gpiolib.c [new file with mode: 0644]
drivers/gpio/mcp23s08.c [new file with mode: 0644]
drivers/gpio/pca9539.c [new file with mode: 0644]
drivers/gpio/pcf857x.c [new file with mode: 0644]
drivers/i2c/chips/Kconfig
drivers/ide/Kconfig
drivers/ide/arm/Makefile
drivers/ide/arm/icside.c
drivers/ide/arm/palm_bk3710.c [new file with mode: 0644]
drivers/ide/cris/ide-cris.c
drivers/ide/ide-acpi.c
drivers/ide/ide-cd.c
drivers/ide/ide-dma.c
drivers/ide/ide-floppy.c
drivers/ide/ide-generic.c
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide-lib.c
drivers/ide/ide-probe.c
drivers/ide/ide-proc.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
drivers/ide/ide.c
drivers/ide/legacy/buddha.c
drivers/ide/legacy/falconide.c
drivers/ide/legacy/gayle.c
drivers/ide/legacy/hd.c
drivers/ide/legacy/macide.c
drivers/ide/legacy/q40ide.c
drivers/ide/pci/Makefile
drivers/ide/pci/generic.c
drivers/ide/pci/siimage.c
drivers/infiniband/Kconfig
drivers/infiniband/Makefile
drivers/infiniband/core/cm.c
drivers/infiniband/core/fmr_pool.c
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/infiniband/hw/ehca/ehca_iverbs.h
drivers/infiniband/hw/ehca/ehca_main.c
drivers/infiniband/hw/ehca/ehca_reqs.c
drivers/infiniband/hw/ehca/ehca_sqp.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mthca/mthca_cmd.c
drivers/infiniband/hw/mthca/mthca_main.c
drivers/infiniband/hw/mthca/mthca_mr.c
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/hw/mthca/mthca_qp.c
drivers/infiniband/hw/mthca/mthca_srq.c
drivers/infiniband/hw/nes/Kconfig [new file with mode: 0644]
drivers/infiniband/hw/nes/Makefile [new file with mode: 0644]
drivers/infiniband/hw/nes/nes.c [new file with mode: 0644]
drivers/infiniband/hw/nes/nes.h [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_cm.c [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_cm.h [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_context.h [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_hw.c [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_hw.h [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_nic.c [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_user.h [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_utils.c [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_verbs.c [new file with mode: 0644]
drivers/infiniband/hw/nes/nes_verbs.h [new file with mode: 0644]
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h
drivers/leds/led-class.c
drivers/macintosh/mediabay.c
drivers/macintosh/via-macii.c
drivers/net/Kconfig
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/hamradio/dmascc.c
drivers/net/mlx4/fw.c
drivers/net/mlx4/fw.h
drivers/net/mlx4/main.c
drivers/net/mlx4/mr.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/nmclan_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/net/tun.c
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43/leds.c
drivers/net/wireless/b43/main.c
drivers/net/wireless/ipw2100.c
drivers/net/wireless/netwave_cs.c
drivers/net/wireless/wavelan_cs.c
drivers/nubus/Makefile
drivers/nubus/nubus.c
drivers/nubus/nubus_syms.c [deleted file]
drivers/nubus/proc.c
drivers/of/base.c
drivers/of/platform.c
drivers/parisc/ccio-dma.c
drivers/parisc/iommu-helpers.h
drivers/parisc/sba_iommu.c
drivers/pci/pci.c
drivers/pci/probe.c
drivers/pcmcia/at91_cf.c
drivers/pcmcia/cardbus.c
drivers/pcmcia/ds.c
drivers/pcmcia/i82092.c
drivers/pcmcia/i82365.c
drivers/pcmcia/m32r_cfc.c
drivers/pcmcia/m32r_pcc.c
drivers/pcmcia/m8xx_pcmcia.c
drivers/pcmcia/pcmcia_resource.c
drivers/pcmcia/rsrc_nonstatic.c
drivers/pcmcia/tcic.c
drivers/s390/block/dasd.c
drivers/s390/block/dasd_3990_erp.c
drivers/s390/block/dcssblk.c
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_vt220.c
drivers/s390/cio/ccwgroup.c
drivers/s390/cio/chsc.c
drivers/s390/cio/device_id.c
drivers/scsi/aacraid/linit.c
drivers/scsi/ide-scsi.c
drivers/scsi/pcmcia/fdomain_stub.c
drivers/scsi/scsi_lib.c
drivers/serial/8250.c
drivers/serial/8250_pci.c
drivers/serial/8250_pnp.c
drivers/serial/mcf.c
drivers/serial/mpsc.c
drivers/serial/s3c2410.c
drivers/serial/serial_core.c
drivers/serial/serial_cs.c
fs/Kconfig
fs/buffer.c
fs/cifs/inode.c
fs/compat.c
fs/direct-io.c
fs/ecryptfs/mmap.c
fs/eventpoll.c
fs/exec.c
fs/ext3/inode.c
fs/ext4/inode.c
fs/fs-writeback.c
fs/gfs2/bmap.c
fs/gfs2/ops_address.c
fs/hostfs/hostfs_user.c
fs/hugetlbfs/inode.c
fs/libfs.c
fs/mpage.c
fs/nfs/read.c
fs/nfs/write.c
fs/nfsd/auth.c
fs/ntfs/aops.c
fs/ntfs/compress.c
fs/ntfs/file.c
fs/ntfs/malloc.h
fs/ocfs2/alloc.c
fs/ocfs2/aops.c
fs/proc/array.c
fs/proc/base.c
fs/proc/internal.h
fs/proc/kcore.c
fs/proc/proc_misc.c
fs/proc/task_mmu.c
fs/reiserfs/inode.c
fs/smbfs/inode.c
fs/timerfd.c
fs/xattr.c
fs/xfs/linux-2.6/kmem.c
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_lrw.c
include/asm-alpha/atomic.h
include/asm-alpha/pci.h
include/asm-alpha/pgalloc.h
include/asm-alpha/tlb.h
include/asm-alpha/tlbflush.h
include/asm-alpha/unistd.h
include/asm-arm/arch-pxa/gpio.h
include/asm-arm/arch-pxa/pxa-regs.h
include/asm-arm/pgalloc.h
include/asm-arm/tlb.h
include/asm-avr32/arch-at32ap/at32ap700x.h
include/asm-avr32/arch-at32ap/gpio.h
include/asm-avr32/arch-at32ap/irq.h
include/asm-avr32/pgalloc.h
include/asm-avr32/unistd.h
include/asm-cris/bitops.h
include/asm-cris/pgalloc.h
include/asm-frv/dma-mapping.h
include/asm-frv/page.h
include/asm-frv/pgalloc.h
include/asm-frv/pgtable.h
include/asm-frv/scatterlist.h
include/asm-frv/unistd.h
include/asm-generic/4level-fixup.h
include/asm-generic/gpio.h
include/asm-generic/pgtable-nopmd.h
include/asm-generic/pgtable-nopud.h
include/asm-ia64/bitops.h
include/asm-ia64/gcc_intrin.h
include/asm-ia64/mca.h
include/asm-ia64/mca_asm.h
include/asm-ia64/pgalloc.h
include/asm-ia64/processor.h
include/asm-ia64/sal.h
include/asm-m32r/irq.h
include/asm-m32r/m32700ut/m32700ut_pld.h
include/asm-m32r/pgalloc.h
include/asm-m32r/unistd.h
include/asm-m68k/macintosh.h
include/asm-m68k/motorola_pgalloc.h
include/asm-m68k/sun3_pgalloc.h
include/asm-m68knommu/mcfne.h
include/asm-m68knommu/mcfsim.h
include/asm-m68knommu/mcftimer.h
include/asm-m68knommu/mcfuart.h
include/asm-m68knommu/system.h
include/asm-mips/pgalloc.h
include/asm-mips/processor.h
include/asm-parisc/pgalloc.h
include/asm-parisc/processor.h
include/asm-parisc/tlb.h
include/asm-powerpc/iommu.h
include/asm-powerpc/mediabay.h
include/asm-powerpc/nvram.h
include/asm-powerpc/pgalloc-32.h
include/asm-powerpc/pgalloc-64.h
include/asm-powerpc/processor.h
include/asm-powerpc/systbl.h
include/asm-powerpc/vio.h
include/asm-ppc/pgalloc.h
include/asm-s390/bitops.h
include/asm-s390/cacheflush.h
include/asm-s390/ccwgroup.h
include/asm-s390/pgalloc.h
include/asm-s390/pgtable.h
include/asm-s390/processor.h
include/asm-s390/tlb.h
include/asm-sh/pgalloc.h
include/asm-sh/unistd_32.h
include/asm-sh/unistd_64.h
include/asm-sparc/pgalloc.h
include/asm-sparc64/pgalloc.h
include/asm-sparc64/tlb.h
include/asm-um/a.out.h
include/asm-um/current.h
include/asm-um/elf-i386.h
include/asm-um/elf-x86_64.h
include/asm-um/fixmap.h
include/asm-um/ldt.h
include/asm-um/linkage.h
include/asm-um/mmu_context.h
include/asm-um/page.h
include/asm-um/param.h
include/asm-um/pgalloc.h
include/asm-um/pgtable-2level.h
include/asm-um/pgtable-3level.h
include/asm-um/pgtable.h
include/asm-um/processor-generic.h
include/asm-um/processor-i386.h
include/asm-um/thread_info.h
include/asm-um/tlb.h
include/asm-um/uaccess.h
include/asm-x86/bitops_64.h
include/asm-x86/highmem.h
include/asm-x86/pgalloc_32.h
include/asm-x86/pgalloc_64.h
include/asm-x86/pgtable_32.h
include/asm-x86/unistd_32.h
include/asm-x86/unistd_64.h
include/asm-xtensa/pgalloc.h
include/asm-xtensa/tlb.h
include/linux/Kbuild
include/linux/agp_backend.h
include/linux/agpgart.h
include/linux/capability.h
include/linux/compat.h
include/linux/device.h
include/linux/dma-mapping.h
include/linux/gfp.h
include/linux/highmem.h
include/linux/hrtimer.h
include/linux/hw_random.h
include/linux/i2c/pca9539.h [new file with mode: 0644]
include/linux/i2c/pcf857x.h [new file with mode: 0644]
include/linux/ide.h
include/linux/init_task.h
include/linux/iommu-helper.h [new file with mode: 0644]
include/linux/latency.h [deleted file]
include/linux/leds.h
include/linux/miscdevice.h
include/linux/mm.h
include/linux/mmzone.h
include/linux/mod_devicetable.h
include/linux/nubus.h
include/linux/of.h
include/linux/page-flags.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/pkt_cls.h
include/linux/pm_qos_params.h [new file with mode: 0644]
include/linux/prctl.h
include/linux/proc_fs.h
include/linux/reboot.h
include/linux/rtnetlink.h
include/linux/sched.h
include/linux/security.h
include/linux/serial_8250.h
include/linux/spi/mcp23s08.h [new file with mode: 0644]
include/linux/suspend.h
include/linux/swap.h
include/linux/swapops.h
include/linux/syscalls.h
include/linux/sysctl.h
include/linux/tc_ematch/tc_em_meta.h
include/linux/vmalloc.h
include/linux/wait.h
include/linux/writeback.h
include/linux/xattr.h
include/net/inet_hashtables.h
include/net/ip_fib.h
include/net/ipv6.h
include/net/netlabel.h
include/pcmcia/cs.h
include/pcmcia/cs_types.h
include/pcmcia/ss.h
init/Kconfig
kernel/Makefile
kernel/capability.c
kernel/exit.c
kernel/fork.c
kernel/hrtimer.c
kernel/latency.c [deleted file]
kernel/pm_qos_params.c [new file with mode: 0644]
kernel/posix-timers.c
kernel/power/disk.c
kernel/power/snapshot.c
kernel/signal.c
kernel/sys.c
kernel/sys_ni.c
kernel/sysctl.c
kernel/sysctl_check.c
lib/Makefile
lib/iommu-helper.c [new file with mode: 0644]
lib/radix-tree.c
lib/swiotlb.c
mm/Makefile
mm/dmapool.c [new file with mode: 0644]
mm/fadvise.c
mm/filemap.c
mm/filemap_xip.c
mm/fremap.c
mm/highmem.c
mm/hugetlb.c
mm/internal.h
mm/memory.c
mm/memory_hotplug.c
mm/migrate.c
mm/mmap.c
mm/nommu.c
mm/oom_kill.c
mm/page-writeback.c
mm/page_alloc.c
mm/page_io.c
mm/pagewalk.c [new file with mode: 0644]
mm/rmap.c
mm/shmem.c
mm/slob.c
mm/sparse.c
mm/swap.c
mm/swap_state.c
mm/swapfile.c
mm/tiny-shmem.c
mm/truncate.c
mm/vmalloc.c
mm/vmstat.c
net/bluetooth/hidp/core.c
net/bluetooth/rfcomm/tty.c
net/core/rtnetlink.c
net/ipv4/cipso_ipv4.c
net/ipv4/fib_trie.c
net/ipv4/icmp.c
net/ipv4/inet_hashtables.c
net/ipv4/xfrm4_mode_beet.c
net/ipv6/icmp.c
net/ipv6/inet6_hashtables.c
net/netlabel/netlabel_cipso_v4.c
net/netlabel/netlabel_cipso_v4.h
net/netlabel/netlabel_domainhash.h
net/netlabel/netlabel_kapi.c
net/sched/cls_flow.c
net/sched/em_meta.c
net/sctp/auth.c
net/sctp/sm_statefuns.c
security/Kconfig
security/Makefile
security/commoncap.c
security/dummy.c
security/security.c
security/selinux/hooks.c
security/smack/Kconfig [new file with mode: 0644]
security/smack/Makefile [new file with mode: 0644]
security/smack/smack.h [new file with mode: 0644]
security/smack/smack_access.c [new file with mode: 0644]
security/smack/smack_lsm.c [new file with mode: 0644]
security/smack/smackfs.c [new file with mode: 0644]
sound/core/pcm_native.c

index 3d2f31b99dd9f081b2a3032d5551c153eb60ab0f..4acc73240a6d536ef044bf1dfc5a2abd6ae4296f 100644 (file)
@@ -59,7 +59,7 @@
    <title>Introduction</title>
   <para>
     This document describes the interfaces available for device drivers that
-    drive s390 based channel attached devices. This includes interfaces for
+    drive s390 based channel attached I/O devices. This includes interfaces for
     interaction with the hardware and interfaces for interacting with the
     common driver core. Those interfaces are provided by the s390 common I/O
     layer.
        The ccw bus typically contains the majority of devices available to
        a s390 system. Named after the channel command word (ccw), the basic
        command structure used to address its devices, the ccw bus contains
-       so-called channel attached devices. They are addressed via subchannels,
-       visible on the css bus. A device driver, however, will never interact
-       with the subchannel directly, but only via the device on the ccw bus,
+       so-called channel attached devices. They are addressed via I/O
+       subchannels, visible on the css bus. A device driver for
+       channel-attached devices, however, will never interact  with the
+       subchannel directly, but only via the I/O device on the ccw bus,
        the ccw device.
   </para>
     <sect1 id="channelIO">
 !Iinclude/asm-s390/ccwdev.h
 !Edrivers/s390/cio/device.c
 !Edrivers/s390/cio/device_ops.c
-!Edrivers/s390/cio/airq.c
     </sect1>
     <sect1 id="cmf">
      <title>The channel-measurement facility</title>
    </sect1>
   </chapter>
 
+  <chapter id="genericinterfaces">
+   <title>Generic interfaces</title>
+  <para>
+       Some interfaces are available to other drivers that do not necessarily
+       have anything to do with the busses described above, but still are
+       indirectly using basic infrastructure in the common I/O layer.
+       One example is the support for adapter interrupts.
+  </para>
+!Edrivers/s390/cio/airq.c
+  </chapter>
+
 </book>
diff --git a/Documentation/Smack.txt b/Documentation/Smack.txt
new file mode 100644 (file)
index 0000000..989c2fc
--- /dev/null
@@ -0,0 +1,493 @@
+
+
+    "Good for you, you've decided to clean the elevator!"
+    - The Elevator, from Dark Star
+
+Smack is the the Simplified Mandatory Access Control Kernel.
+Smack is a kernel based implementation of mandatory access
+control that includes simplicity in its primary design goals.
+
+Smack is not the only Mandatory Access Control scheme
+available for Linux. Those new to Mandatory Access Control
+are encouraged to compare Smack with the other mechanisms
+available to determine which is best suited to the problem
+at hand.
+
+Smack consists of three major components:
+    - The kernel
+    - A start-up script and a few modified applications
+    - Configuration data
+
+The kernel component of Smack is implemented as a Linux
+Security Modules (LSM) module. It requires netlabel and
+works best with file systems that support extended attributes,
+although xattr support is not strictly required.
+It is safe to run a Smack kernel under a "vanilla" distribution.
+Smack kernels use the CIPSO IP option. Some network
+configurations are intolerant of IP options and can impede
+access to systems that use them as Smack does.
+
+The startup script etc-init.d-smack should be installed
+in /etc/init.d/smack and should be invoked early in the
+start-up process. On Fedora rc5.d/S02smack is recommended.
+This script ensures that certain devices have the correct
+Smack attributes and loads the Smack configuration if
+any is defined. This script invokes two programs that
+ensure configuration data is properly formatted. These
+programs are /usr/sbin/smackload and /usr/sin/smackcipso.
+The system will run just fine without these programs,
+but it will be difficult to set access rules properly.
+
+A version of "ls" that provides a "-M" option to display
+Smack labels on long listing is available.
+
+A hacked version of sshd that allows network logins by users
+with specific Smack labels is available. This version does
+not work for scp. You must set the /etc/ssh/sshd_config
+line:
+   UsePrivilegeSeparation no
+
+The format of /etc/smack/usr is:
+
+   username smack
+
+In keeping with the intent of Smack, configuration data is
+minimal and not strictly required. The most important
+configuration step is mounting the smackfs pseudo filesystem.
+
+Add this line to /etc/fstab:
+
+    smackfs /smack smackfs smackfsdef=* 0 0
+
+and create the /smack directory for mounting.
+
+Smack uses extended attributes (xattrs) to store file labels.
+The command to set a Smack label on a file is:
+
+    # attr -S -s SMACK64 -V "value" path
+
+NOTE: Smack labels are limited to 23 characters. The attr command
+      does not enforce this restriction and can be used to set
+      invalid Smack labels on files.
+
+If you don't do anything special all users will get the floor ("_")
+label when they log in. If you do want to log in via the hacked ssh
+at other labels use the attr command to set the smack value on the
+home directory and it's contents.
+
+You can add access rules in /etc/smack/accesses. They take the form:
+
+    subjectlabel objectlabel access
+
+access is a combination of the letters rwxa which specify the
+kind of access permitted a subject with subjectlabel on an
+object with objectlabel. If there is no rule no access is allowed.
+
+A process can see the smack label it is running with by
+reading /proc/self/attr/current. A privileged process can
+set the process smack by writing there.
+
+Look for additional programs on http://schaufler-ca.com
+
+From the Smack Whitepaper:
+
+The Simplified Mandatory Access Control Kernel
+
+Casey Schaufler
+casey@schaufler-ca.com
+
+Mandatory Access Control
+
+Computer systems employ a variety of schemes to constrain how information is
+shared among the people and services using the machine. Some of these schemes
+allow the program or user to decide what other programs or users are allowed
+access to pieces of data. These schemes are called discretionary access
+control mechanisms because the access control is specified at the discretion
+of the user. Other schemes do not leave the decision regarding what a user or
+program can access up to users or programs. These schemes are called mandatory
+access control mechanisms because you don't have a choice regarding the users
+or programs that have access to pieces of data.
+
+Bell & LaPadula
+
+From the middle of the 1980's until the turn of the century Mandatory Access
+Control (MAC) was very closely associated with the Bell & LaPadula security
+model, a mathematical description of the United States Department of Defense
+policy for marking paper documents. MAC in this form enjoyed a following
+within the Capital Beltway and Scandinavian supercomputer centers but was
+often sited as failing to address general needs.
+
+Domain Type Enforcement
+
+Around the turn of the century Domain Type Enforcement (DTE) became popular.
+This scheme organizes users, programs, and data into domains that are
+protected from each other. This scheme has been widely deployed as a component
+of popular Linux distributions. The administrative overhead required to
+maintain this scheme and the detailed understanding of the whole system
+necessary to provide a secure domain mapping leads to the scheme being
+disabled or used in limited ways in the majority of cases.
+
+Smack
+
+Smack is a Mandatory Access Control mechanism designed to provide useful MAC
+while avoiding the pitfalls of its predecessors. The limitations of Bell &
+LaPadula are addressed by providing a scheme whereby access can be controlled
+according to the requirements of the system and its purpose rather than those
+imposed by an arcane government policy. The complexity of Domain Type
+Enforcement and avoided by defining access controls in terms of the access
+modes already in use.
+
+Smack Terminology
+
+The jargon used to talk about Smack will be familiar to those who have dealt
+with other MAC systems and shouldn't be too difficult for the uninitiated to
+pick up. There are four terms that are used in a specific way and that are
+especially important:
+
+       Subject: A subject is an active entity on the computer system.
+       On Smack a subject is a task, which is in turn the basic unit
+       of execution.
+
+       Object: An object is a passive entity on the computer system.
+       On Smack files of all types, IPC, and tasks can be objects.
+
+       Access: Any attempt by a subject to put information into or get
+       information from an object is an access.
+
+       Label: Data that identifies the Mandatory Access Control
+       characteristics of a subject or an object.
+
+These definitions are consistent with the traditional use in the security
+community. There are also some terms from Linux that are likely to crop up:
+
+       Capability: A task that possesses a capability has permission to
+       violate an aspect of the system security policy, as identified by
+       the specific capability. A task that possesses one or more
+       capabilities is a privileged task, whereas a task with no
+       capabilities is an unprivileged task.
+
+       Privilege: A task that is allowed to violate the system security
+       policy is said to have privilege. As of this writing a task can
+       have privilege either by possessing capabilities or by having an
+       effective user of root.
+
+Smack Basics
+
+Smack is an extension to a Linux system. It enforces additional restrictions
+on what subjects can access which objects, based on the labels attached to
+each of the subject and the object.
+
+Labels
+
+Smack labels are ASCII character strings, one to twenty-three characters in
+length. Single character labels using special characters, that being anything
+other than a letter or digit, are reserved for use by the Smack development
+team. Smack labels are unstructured, case sensitive, and the only operation
+ever performed on them is comparison for equality. Smack labels cannot
+contain unprintable characters or the "/" (slash) character.
+
+There are some predefined labels:
+
+       _ Pronounced "floor", a single underscore character.
+       ^ Pronounced "hat", a single circumflex character.
+       * Pronounced "star", a single asterisk character.
+       ? Pronounced "huh", a single question mark character.
+
+Every task on a Smack system is assigned a label. System tasks, such as
+init(8) and systems daemons, are run with the floor ("_") label. User tasks
+are assigned labels according to the specification found in the
+/etc/smack/user configuration file.
+
+Access Rules
+
+Smack uses the traditional access modes of Linux. These modes are read,
+execute, write, and occasionally append. There are a few cases where the
+access mode may not be obvious. These include:
+
+       Signals: A signal is a write operation from the subject task to
+       the object task.
+       Internet Domain IPC: Transmission of a packet is considered a
+       write operation from the source task to the destination task.
+
+Smack restricts access based on the label attached to a subject and the label
+attached to the object it is trying to access. The rules enforced are, in
+order:
+
+       1. Any access requested by a task labeled "*" is denied.
+       2. A read or execute access requested by a task labeled "^"
+          is permitted.
+       3. A read or execute access requested on an object labeled "_"
+          is permitted.
+       4. Any access requested on an object labeled "*" is permitted.
+       5. Any access requested by a task on an object with the same
+          label is permitted.
+       6. Any access requested that is explicitly defined in the loaded
+          rule set is permitted.
+       7. Any other access is denied.
+
+Smack Access Rules
+
+With the isolation provided by Smack access separation is simple. There are
+many interesting cases where limited access by subjects to objects with
+different labels is desired. One example is the familiar spy model of
+sensitivity, where a scientist working on a highly classified project would be
+able to read documents of lower classifications and anything she writes will
+be "born" highly classified. To accommodate such schemes Smack includes a
+mechanism for specifying rules allowing access between labels.
+
+Access Rule Format
+
+The format of an access rule is:
+
+       subject-label object-label access
+
+Where subject-label is the Smack label of the task, object-label is the Smack
+label of the thing being accessed, and access is a string specifying the sort
+of access allowed. The Smack labels are limited to 23 characters. The access
+specification is searched for letters that describe access modes:
+
+       a: indicates that append access should be granted.
+       r: indicates that read access should be granted.
+       w: indicates that write access should be granted.
+       x: indicates that execute access should be granted.
+
+Uppercase values for the specification letters are allowed as well.
+Access mode specifications can be in any order. Examples of acceptable rules
+are:
+
+       TopSecret Secret  rx
+       Secret    Unclass R
+       Manager   Game    x
+       User      HR      w
+       New       Old     rRrRr
+       Closed    Off     -
+
+Examples of unacceptable rules are:
+
+       Top Secret Secret     rx
+       Ace        Ace        r
+       Odd        spells     waxbeans
+
+Spaces are not allowed in labels. Since a subject always has access to files
+with the same label specifying a rule for that case is pointless. Only
+valid letters (rwxaRWXA) and the dash ('-') character are allowed in
+access specifications. The dash is a placeholder, so "a-r" is the same
+as "ar". A lone dash is used to specify that no access should be allowed.
+
+Applying Access Rules
+
+The developers of Linux rarely define new sorts of things, usually importing
+schemes and concepts from other systems. Most often, the other systems are
+variants of Unix. Unix has many endearing properties, but consistency of
+access control models is not one of them. Smack strives to treat accesses as
+uniformly as is sensible while keeping with the spirit of the underlying
+mechanism.
+
+File system objects including files, directories, named pipes, symbolic links,
+and devices require access permissions that closely match those used by mode
+bit access. To open a file for reading read access is required on the file. To
+search a directory requires execute access. Creating a file with write access
+requires both read and write access on the containing directory. Deleting a
+file requires read and write access to the file and to the containing
+directory. It is possible that a user may be able to see that a file exists
+but not any of its attributes by the circumstance of having read access to the
+containing directory but not to the differently labeled file. This is an
+artifact of the file name being data in the directory, not a part of the file.
+
+IPC objects, message queues, semaphore sets, and memory segments exist in flat
+namespaces and access requests are only required to match the object in
+question.
+
+Process objects reflect tasks on the system and the Smack label used to access
+them is the same Smack label that the task would use for its own access
+attempts. Sending a signal via the kill() system call is a write operation
+from the signaler to the recipient. Debugging a process requires both reading
+and writing. Creating a new task is an internal operation that results in two
+tasks with identical Smack labels and requires no access checks.
+
+Sockets are data structures attached to processes and sending a packet from
+one process to another requires that the sender have write access to the
+receiver. The receiver is not required to have read access to the sender.
+
+Setting Access Rules
+
+The configuration file /etc/smack/accesses contains the rules to be set at
+system startup. The contents are written to the special file /smack/load.
+Rules can be written to /smack/load at any time and take effect immediately.
+For any pair of subject and object labels there can be only one rule, with the
+most recently specified overriding any earlier specification.
+
+The program smackload is provided to ensure data is formatted
+properly when written to /smack/load. This program reads lines
+of the form
+
+    subjectlabel objectlabel mode.
+
+Task Attribute
+
+The Smack label of a process can be read from /proc/<pid>/attr/current. A
+process can read its own Smack label from /proc/self/attr/current. A
+privileged process can change its own Smack label by writing to
+/proc/self/attr/current but not the label of another process.
+
+File Attribute
+
+The Smack label of a filesystem object is stored as an extended attribute
+named SMACK64 on the file. This attribute is in the security namespace. It can
+only be changed by a process with privilege.
+
+Privilege
+
+A process with CAP_MAC_OVERRIDE is privileged.
+
+Smack Networking
+
+As mentioned before, Smack enforces access control on network protocol
+transmissions. Every packet sent by a Smack process is tagged with its Smack
+label. This is done by adding a CIPSO tag to the header of the IP packet. Each
+packet received is expected to have a CIPSO tag that identifies the label and
+if it lacks such a tag the network ambient label is assumed. Before the packet
+is delivered a check is made to determine that a subject with the label on the
+packet has write access to the receiving process and if that is not the case
+the packet is dropped.
+
+CIPSO Configuration
+
+It is normally unnecessary to specify the CIPSO configuration. The default
+values used by the system handle all internal cases. Smack will compose CIPSO
+label values to match the Smack labels being used without administrative
+intervention. Unlabeled packets that come into the system will be given the
+ambient label.
+
+Smack requires configuration in the case where packets from a system that is
+not smack that speaks CIPSO may be encountered. Usually this will be a Trusted
+Solaris system, but there are other, less widely deployed systems out there.
+CIPSO provides 3 important values, a Domain Of Interpretation (DOI), a level,
+and a category set with each packet. The DOI is intended to identify a group
+of systems that use compatible labeling schemes, and the DOI specified on the
+smack system must match that of the remote system or packets will be
+discarded. The DOI is 3 by default. The value can be read from /smack/doi and
+can be changed by writing to /smack/doi.
+
+The label and category set are mapped to a Smack label as defined in
+/etc/smack/cipso.
+
+A Smack/CIPSO mapping has the form:
+
+       smack level [category [category]*]
+
+Smack does not expect the level or category sets to be related in any
+particular way and does not assume or assign accesses based on them. Some
+examples of mappings:
+
+       TopSecret 7
+       TS:A,B    7 1 2
+       SecBDE    5 2 4 6
+       RAFTERS   7 12 26
+
+The ":" and "," characters are permitted in a Smack label but have no special
+meaning.
+
+The mapping of Smack labels to CIPSO values is defined by writing to
+/smack/cipso. Again, the format of data written to this special file
+is highly restrictive, so the program smackcipso is provided to
+ensure the writes are done properly. This program takes mappings
+on the standard input and sends them to /smack/cipso properly.
+
+In addition to explicit mappings Smack supports direct CIPSO mappings. One
+CIPSO level is used to indicate that the category set passed in the packet is
+in fact an encoding of the Smack label. The level used is 250 by default. The
+value can be read from /smack/direct and changed by writing to /smack/direct.
+
+Socket Attributes
+
+There are two attributes that are associated with sockets. These attributes
+can only be set by privileged tasks, but any task can read them for their own
+sockets.
+
+       SMACK64IPIN: The Smack label of the task object. A privileged
+       program that will enforce policy may set this to the star label.
+
+       SMACK64IPOUT: The Smack label transmitted with outgoing packets.
+       A privileged program may set this to match the label of another
+       task with which it hopes to communicate.
+
+Writing Applications for Smack
+
+There are three sorts of applications that will run on a Smack system. How an
+application interacts with Smack will determine what it will have to do to
+work properly under Smack.
+
+Smack Ignorant Applications
+
+By far the majority of applications have no reason whatever to care about the
+unique properties of Smack. Since invoking a program has no impact on the
+Smack label associated with the process the only concern likely to arise is
+whether the process has execute access to the program.
+
+Smack Relevant Applications
+
+Some programs can be improved by teaching them about Smack, but do not make
+any security decisions themselves. The utility ls(1) is one example of such a
+program.
+
+Smack Enforcing Applications
+
+These are special programs that not only know about Smack, but participate in
+the enforcement of system policy. In most cases these are the programs that
+set up user sessions. There are also network services that provide information
+to processes running with various labels.
+
+File System Interfaces
+
+Smack maintains labels on file system objects using extended attributes. The
+Smack label of a file, directory, or other file system object can be obtained
+using getxattr(2).
+
+       len = getxattr("/", "security.SMACK64", value, sizeof (value));
+
+will put the Smack label of the root directory into value. A privileged
+process can set the Smack label of a file system object with setxattr(2).
+
+       len = strlen("Rubble");
+       rc = setxattr("/foo", "security.SMACK64", "Rubble", len, 0);
+
+will set the Smack label of /foo to "Rubble" if the program has appropriate
+privilege.
+
+Socket Interfaces
+
+The socket attributes can be read using fgetxattr(2).
+
+A privileged process can set the Smack label of outgoing packets with
+fsetxattr(2).
+
+       len = strlen("Rubble");
+       rc = fsetxattr(fd, "security.SMACK64IPOUT", "Rubble", len, 0);
+
+will set the Smack label "Rubble" on packets going out from the socket if the
+program has appropriate privilege.
+
+       rc = fsetxattr(fd, "security.SMACK64IPIN, "*", strlen("*"), 0);
+
+will set the Smack label "*" as the object label against which incoming
+packets will be checked if the program has appropriate privilege.
+
+Administration
+
+Smack supports some mount options:
+
+       smackfsdef=label: specifies the label to give files that lack
+       the Smack label extended attribute.
+
+       smackfsroot=label: specifies the label to assign the root of the
+       file system if it lacks the Smack extended attribute.
+
+       smackfshat=label: specifies a label that must have read access to
+       all labels set on the filesystem. Not yet enforced.
+
+       smackfsfloor=label: specifies a label to which all labels set on the
+       filesystem must have read access. Not yet enforced.
+
+These mount options apply to all file system types.
+
index 0b1b0c0086137c6bb07a1f220ccb6df7d31832b6..e2799b5fafea890153b2d94acb25a712fe6a2587 100644 (file)
@@ -1315,13 +1315,28 @@ for writeout by the pdflush daemons.  It is expressed in 100'ths of a second.
 Data which has been dirty in-memory for longer than this interval will be
 written out next time a pdflush daemon wakes up.
 
+highmem_is_dirtyable
+--------------------
+
+Only present if CONFIG_HIGHMEM is set.
+
+This defaults to 0 (false), meaning that the ratios set above are calculated
+as a percentage of lowmem only.  This protects against excessive scanning
+in page reclaim, swapping and general VM distress.
+
+Setting this to 1 can be useful on 32 bit machines where you want to make
+random changes within an MMAPed file that is larger than your available
+lowmem without causing large quantities of random IO.  Is is safe if the
+behavior of all programs running on the machine is known and memory will
+not be otherwise stressed.
+
 legacy_va_layout
 ----------------
 
 If non-zero, this sysctl disables the new 32-bit mmap mmap layout - the kernel
 will use the legacy (2.4) layout for all processes.
 
-lower_zone_protection
+lowmem_reserve_ratio
 ---------------------
 
 For some specialised workloads on highmem machines it is dangerous for
@@ -1341,25 +1356,71 @@ captured into pinned user memory.
 mechanism will also defend that region from allocations which could use
 highmem or lowmem).
 
-The `lower_zone_protection' tunable determines how aggressive the kernel is
-in defending these lower zones.  The default value is zero - no
-protection at all.
+The `lowmem_reserve_ratio' tunable determines how aggressive the kernel is
+in defending these lower zones.
 
 If you have a machine which uses highmem or ISA DMA and your
 applications are using mlock(), or if you are running with no swap then
-you probably should increase the lower_zone_protection setting.
-
-The units of this tunable are fairly vague.  It is approximately equal
-to "megabytes," so setting lower_zone_protection=100 will protect around 100
-megabytes of the lowmem zone from user allocations.  It will also make
-those 100 megabytes unavailable for use by applications and by
-pagecache, so there is a cost.
-
-The effects of this tunable may be observed by monitoring
-/proc/meminfo:LowFree.  Write a single huge file and observe the point
-at which LowFree ceases to fall.
-
-A reasonable value for lower_zone_protection is 100.
+you probably should change the lowmem_reserve_ratio setting.
+
+The lowmem_reserve_ratio is an array. You can see them by reading this file.
+-
+% cat /proc/sys/vm/lowmem_reserve_ratio
+256     256     32
+-
+Note: # of this elements is one fewer than number of zones. Because the highest
+      zone's value is not necessary for following calculation.
+
+But, these values are not used directly. The kernel calculates # of protection
+pages for each zones from them. These are shown as array of protection pages
+in /proc/zoneinfo like followings. (This is an example of x86-64 box).
+Each zone has an array of protection pages like this.
+
+-
+Node 0, zone      DMA
+  pages free     1355
+        min      3
+        low      3
+        high     4
+       :
+       :
+    numa_other   0
+        protection: (0, 2004, 2004, 2004)
+       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  pagesets
+    cpu: 0 pcp: 0
+        :
+-
+These protections are added to score to judge whether this zone should be used
+for page allocation or should be reclaimed.
+
+In this example, if normal pages (index=2) are required to this DMA zone and
+pages_high is used for watermark, the kernel judges this zone should not be
+used because pages_free(1355) is smaller than watermark + protection[2]
+(4 + 2004 = 2008). If this protection value is 0, this zone would be used for
+normal page requirement. If requirement is DMA zone(index=0), protection[0]
+(=0) is used.
+
+zone[i]'s protection[j] is calculated by following exprssion.
+
+(i < j):
+  zone[i]->protection[j]
+  = (total sums of present_pages from zone[i+1] to zone[j] on the node)
+    / lowmem_reserve_ratio[i];
+(i = j):
+   (should not be protected. = 0;
+(i > j):
+   (not necessary, but looks 0)
+
+The default values of lowmem_reserve_ratio[i] are
+    256 (if zone[i] means DMA or DMA32 zone)
+    32  (others).
+As above expression, they are reciprocal number of ratio.
+256 means 1/256. # of protection pages becomes about "0.39%" of total present
+pages of higher zones on the node.
+
+If you would like to protect more pages, smaller values are effective.
+The minimum value is 1 (1/1 -> 100%).
 
 page-cluster
 ------------
index 6bc2ba215df9a3eb4b41ff6f987e5fa294e47250..8da724e2a0ff795d450e8b0b7b61118d7bf604a6 100644 (file)
@@ -32,7 +32,7 @@ The exact capabilities of GPIOs vary between systems.  Common options:
   - Input values are likewise readable (1, 0).  Some chips support readback
     of pins configured as "output", which is very useful in such "wire-OR"
     cases (to support bidirectional signaling).  GPIO controllers may have
-    input de-glitch logic, sometimes with software controls.
+    input de-glitch/debounce logic, sometimes with software controls.
 
   - Inputs can often be used as IRQ signals, often edge triggered but
     sometimes level triggered.  Such IRQs may be configurable as system
@@ -60,10 +60,13 @@ used on a board that's wired differently.  Only least-common-denominator
 functionality can be very portable.  Other features are platform-specific,
 and that can be critical for glue logic.
 
-Plus, this doesn't define an implementation framework, just an interface.
+Plus, this doesn't require any implementation framework, just an interface.
 One platform might implement it as simple inline functions accessing chip
 registers; another might implement it by delegating through abstractions
-used for several very different kinds of GPIO controller.
+used for several very different kinds of GPIO controller.  (There is some
+optional code supporting such an implementation strategy, described later
+in this document, but drivers acting as clients to the GPIO interface must
+not care how it's implemented.)
 
 That said, if the convention is supported on their platform, drivers should
 use it when possible.  Platforms should declare GENERIC_GPIO support in
@@ -121,6 +124,11 @@ before tasking is enabled, as part of early board setup.
 For output GPIOs, the value provided becomes the initial output value.
 This helps avoid signal glitching during system startup.
 
+For compatibility with legacy interfaces to GPIOs, setting the direction
+of a GPIO implicitly requests that GPIO (see below) if it has not been
+requested already.  That compatibility may be removed in the future;
+explicitly requesting GPIOs is strongly preferred.
+
 Setting the direction can fail if the GPIO number is invalid, or when
 that particular GPIO can't be used in that mode.  It's generally a bad
 idea to rely on boot firmware to have set the direction correctly, since
@@ -133,6 +141,7 @@ Spinlock-Safe GPIO access
 -------------------------
 Most GPIO controllers can be accessed with memory read/write instructions.
 That doesn't need to sleep, and can safely be done from inside IRQ handlers.
+(That includes hardirq contexts on RT kernels.)
 
 Use these calls to access such GPIOs:
 
@@ -145,7 +154,7 @@ Use these calls to access such GPIOs:
 The values are boolean, zero for low, nonzero for high.  When reading the
 value of an output pin, the value returned should be what's seen on the
 pin ... that won't always match the specified output value, because of
-issues including wire-OR and output latencies.
+issues including open-drain signaling and output latencies.
 
 The get/set calls have no error returns because "invalid GPIO" should have
 been reported earlier from gpio_direction_*().  However, note that not all
@@ -170,7 +179,8 @@ get to the head of a queue to transmit a command and get its response.
 This requires sleeping, which can't be done from inside IRQ handlers.
 
 Platforms that support this type of GPIO distinguish them from other GPIOs
-by returning nonzero from this call:
+by returning nonzero from this call (which requires a valid GPIO number,
+either explicitly or implicitly requested):
 
        int gpio_cansleep(unsigned gpio);
 
@@ -209,8 +219,11 @@ before tasking is enabled, as part of early board setup.
 These calls serve two basic purposes.  One is marking the signals which
 are actually in use as GPIOs, for better diagnostics; systems may have
 several hundred potential GPIOs, but often only a dozen are used on any
-given board.  Another is to catch conflicts between drivers, reporting
-errors when drivers wrongly think they have exclusive use of that signal.
+given board.  Another is to catch conflicts, identifying errors when
+(a) two or more drivers wrongly think they have exclusive use of that
+signal, or (b) something wrongly believes it's safe to remove drivers
+needed to manage a signal that's in active use.  That is, requesting a
+GPIO can serve as a kind of lock.
 
 These two calls are optional because not not all current Linux platforms
 offer such functionality in their GPIO support; a valid implementation
@@ -223,6 +236,9 @@ Note that requesting a GPIO does NOT cause it to be configured in any
 way; it just marks that GPIO as in use.  Separate code must handle any
 pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown).
 
+Also note that it's your responsibility to have stopped using a GPIO
+before you free it.
+
 
 GPIOs mapped to IRQs
 --------------------
@@ -238,7 +254,7 @@ map between them using calls like:
 
 Those return either the corresponding number in the other namespace, or
 else a negative errno code if the mapping can't be done.  (For example,
-some GPIOs can't used as IRQs.)  It is an unchecked error to use a GPIO
+some GPIOs can't be used as IRQs.)  It is an unchecked error to use a GPIO
 number that wasn't set up as an input using gpio_direction_input(), or
 to use an IRQ number that didn't originally come from gpio_to_irq().
 
@@ -299,17 +315,110 @@ Related to multiplexing is configuration and enabling of the pullups or
 pulldowns integrated on some platforms.  Not all platforms support them,
 or support them in the same way; and any given board might use external
 pullups (or pulldowns) so that the on-chip ones should not be used.
+(When a circuit needs 5 kOhm, on-chip 100 kOhm resistors won't do.)
 
 There are other system-specific mechanisms that are not specified here,
 like the aforementioned options for input de-glitching and wire-OR output.
 Hardware may support reading or writing GPIOs in gangs, but that's usually
 configuration dependent:  for GPIOs sharing the same bank.  (GPIOs are
 commonly grouped in banks of 16 or 32, with a given SOC having several such
-banks.)  Some systems can trigger IRQs from output GPIOs.  Code relying on
-such mechanisms will necessarily be nonportable.
+banks.)  Some systems can trigger IRQs from output GPIOs, or read values
+from pins not managed as GPIOs.  Code relying on such mechanisms will
+necessarily be nonportable.
 
-Dynamic definition of GPIOs is not currently supported; for example, as
+Dynamic definition of GPIOs is not currently standard; for example, as
 a side effect of configuring an add-on board with some GPIO expanders.
 
 These calls are purely for kernel space, but a userspace API could be built
-on top of it.
+on top of them.
+
+
+GPIO implementor's framework (OPTIONAL)
+=======================================
+As noted earlier, there is an optional implementation framework making it
+easier for platforms to support different kinds of GPIO controller using
+the same programming interface.
+
+As a debugging aid, if debugfs is available a /sys/kernel/debug/gpio file
+will be found there.  That will list all the controllers registered through
+this framework, and the state of the GPIOs currently in use.
+
+
+Controller Drivers: gpio_chip
+-----------------------------
+In this framework each GPIO controller is packaged as a "struct gpio_chip"
+with information common to each controller of that type:
+
+ - methods to establish GPIO direction
+ - methods used to access GPIO values
+ - flag saying whether calls to its methods may sleep
+ - optional debugfs dump method (showing extra state like pullup config)
+ - label for diagnostics
+
+There is also per-instance data, which may come from device.platform_data:
+the number of its first GPIO, and how many GPIOs it exposes.
+
+The code implementing a gpio_chip should support multiple instances of the
+controller, possibly using the driver model.  That code will configure each
+gpio_chip and issue gpiochip_add().  Removing a GPIO controller should be
+rare; use gpiochip_remove() when it is unavoidable.
+
+Most often a gpio_chip is part of an instance-specific structure with state
+not exposed by the GPIO interfaces, such as addressing, power management,
+and more.  Chips such as codecs will have complex non-GPIO state,
+
+Any debugfs dump method should normally ignore signals which haven't been
+requested as GPIOs.  They can use gpiochip_is_requested(), which returns
+either NULL or the label associated with that GPIO when it was requested.
+
+
+Platform Support
+----------------
+To support this framework, a platform's Kconfig will "select HAVE_GPIO_LIB"
+and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
+three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
+They may also want to provide a custom value for ARCH_NR_GPIOS.
+
+Trivial implementations of those functions can directly use framework
+code, which always dispatches through the gpio_chip:
+
+  #define gpio_get_value       __gpio_get_value
+  #define gpio_set_value       __gpio_set_value
+  #define gpio_cansleep                __gpio_cansleep
+
+Fancier implementations could instead define those as inline functions with
+logic optimizing access to specific SOC-based GPIOs.  For example, if the
+referenced GPIO is the constant "12", getting or setting its value could
+cost as little as two or three instructions, never sleeping.  When such an
+optimization is not possible those calls must delegate to the framework
+code, costing at least a few dozen instructions.  For bitbanged I/O, such
+instruction savings can be significant.
+
+For SOCs, platform-specific code defines and registers gpio_chip instances
+for each bank of on-chip GPIOs.  Those GPIOs should be numbered/labeled to
+match chip vendor documentation, and directly match board schematics.  They
+may well start at zero and go up to a platform-specific limit.  Such GPIOs
+are normally integrated into platform initialization to make them always be
+available, from arch_initcall() or earlier; they can often serve as IRQs.
+
+
+Board Support
+-------------
+For external GPIO controllers -- such as I2C or SPI expanders, ASICs, multi
+function devices, FPGAs or CPLDs -- most often board-specific code handles
+registering controller devices and ensures that their drivers know what GPIO
+numbers to use with gpiochip_add().  Their numbers often start right after
+platform-specific GPIOs.
+
+For example, board setup code could create structures identifying the range
+of GPIOs that chip will expose, and passes them to each GPIO expander chip
+using platform_data.  Then the chip driver's probe() routine could pass that
+data to gpiochip_add().
+
+Initialization order can be important.  For example, when a device relies on
+an I2C-based GPIO, its probe() routine should only be called after that GPIO
+becomes available.  That may mean the device should not be registered until
+calls for that GPIO can work.  One way to address such dependencies is for
+such gpio_chip controllers to provide setup() and teardown() callbacks to
+board specific code; those board specific callbacks would register devices
+once all the necessary resources are available.
index c4fce6a135374377bcd5d6aa2277c25f5811914f..1d81c530c4a584f15e25ad85e31e57693acfff6f 100644 (file)
@@ -1,6 +1,9 @@
 Kernel driver pca9539
 =====================
 
+NOTE: this driver is deprecated and will be dropped soon, use
+drivers/gpio/pca9539.c instead.
+
 Supported chips:
   * Philips PCA9539
     Prefix: 'pca9539'
index 773a814d409361767da369070d2d7e5267536c16..d23610fb2ff9e0560580bf4332bc81ea0a249326 100644 (file)
@@ -16,6 +16,7 @@
 #include <fcntl.h>
 #include <fnmatch.h>
 #include <string.h>
+#include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -65,7 +66,7 @@ int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)
 {
        struct dirent **namelist;
        char *name, *path2;
-       int i, n, r, rc, result = 0;
+       int i, n, r, rc = 0, result = 0;
        struct stat buf;
 
        n = scandir(path, &namelist, 0, alphasort);
@@ -113,7 +114,7 @@ skip:
                free(namelist[i]);
        }
        free(namelist);
-       return rc;
+       return result;
 }
 
 char buf[1024];
@@ -149,7 +150,7 @@ int scan_rom(char *path, char *file)
 {
        struct dirent **namelist;
        char *name, *path2;
-       int i, n, r, rc, result = 0;
+       int i, n, r, rc = 0, result = 0;
        struct stat buf;
 
        n = scandir(path, &namelist, 0, alphasort);
@@ -180,7 +181,7 @@ int scan_rom(char *path, char *file)
                         * important thing is that no MCA happened.
                         */
                        if (rc > 0)
-                               fprintf(stderr, "PASS: %s read %ld bytes\n", path2, rc);
+                               fprintf(stderr, "PASS: %s read %d bytes\n", path2, rc);
                        else {
                                fprintf(stderr, "PASS: %s not readable\n", path2);
                                return rc;
@@ -201,10 +202,10 @@ skip:
                free(namelist[i]);
        }
        free(namelist);
-       return rc;
+       return result;
 }
 
-int main()
+int main(void)
 {
        int rc;
 
@@ -256,4 +257,6 @@ int main()
        scan_tree("/proc/bus/pci", "??.?", 0xA0000, 0x20000, 0);
        scan_tree("/proc/bus/pci", "??.?", 0xC0000, 0x40000, 1);
        scan_tree("/proc/bus/pci", "??.?", 0, 1024*1024, 0);
+
+       return rc;
 }
index 9ad4e6fc56fdb7a880e5276ea5f9b0c1d780778e..8fd5aa40585ff8419cc730104079ddd61b5ccb8e 100644 (file)
@@ -780,6 +780,9 @@ and is between 256 and 4096 characters. It is defined in the file
                        loop use the MONITOR/MWAIT idle loop anyways. Performance should be the same
                        as idle=poll.
 
+       ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
+                       Claim all unknown PCI IDE storage controllers.
+
        ignore_loglevel [KNL]
                        Ignore loglevel setting - this will print /all/
                        kernel messages to the console. Useful for debugging.
index 4739c5c3face33164587d55749eb3f2f98c3674d..96f155e687506096e0f694591aa3b9fd722e4a48 100644 (file)
@@ -33,8 +33,8 @@ This file details changes in 2.6 which affect PCMCIA card driver authors:
    and can be used (e.g. for SET_NETDEV_DEV) by using
    handle_to_dev(client_handle_t * handle).
 
-* Convert internal I/O port addresses to unsigned long (as of 2.6.11)
-   ioaddr_t should be replaced by kio_addr_t in PCMCIA card drivers.
+* Convert internal I/O port addresses to unsigned int (as of 2.6.11)
+   ioaddr_t should be replaced by unsigned int in PCMCIA card drivers.
 
 * irq_mask and irq_list parameters (as of 2.6.11)
    The irq_mask and irq_list parameters should no longer be used in
diff --git a/Documentation/pm_qos_interface.txt b/Documentation/pm_qos_interface.txt
new file mode 100644 (file)
index 0000000..49adb1a
--- /dev/null
@@ -0,0 +1,59 @@
+PM quality of Service interface.
+
+This interface provides a kernel and user mode interface for registering
+performance expectations by drivers, subsystems and user space applications on
+one of the parameters.
+
+Currently we have {cpu_dma_latency, network_latency, network_throughput} as the
+initial set of pm_qos parameters.
+
+The infrastructure exposes multiple misc device nodes one per implemented
+parameter.  The set of parameters implement is defined by pm_qos_power_init()
+and pm_qos_params.h.  This is done because having the available parameters
+being runtime configurable or changeable from a driver was seen as too easy to
+abuse.
+
+For each parameter a list of performance requirements is maintained along with
+an aggregated target value.  The aggregated target value is updated with
+changes to the requirement list or elements of the list.  Typically the
+aggregated target value is simply the max or min of the requirement values held
+in the parameter list elements.
+
+From kernel mode the use of this interface is simple:
+pm_qos_add_requirement(param_id, name, target_value):
+Will insert a named element in the list for that identified PM_QOS parameter
+with the target value.  Upon change to this list the new target is recomputed
+and any registered notifiers are called only if the target value is now
+different.
+
+pm_qos_update_requirement(param_id, name, new_target_value):
+Will search the list identified by the param_id for the named list element and
+then update its target value, calling the notification tree if the aggregated
+target is changed.  with that name is already registered.
+
+pm_qos_remove_requirement(param_id, name):
+Will search the identified list for the named element and remove it, after
+removal it will update the aggregate target and call the notification tree if
+the target was changed as a result of removing the named requirement.
+
+
+From user mode:
+Only processes can register a pm_qos requirement.  To provide for automatic
+cleanup for process the interface requires the process to register its
+parameter requirements in the following way:
+
+To register the default pm_qos target for the specific parameter, the process
+must open one of /dev/[cpu_dma_latency, network_latency, network_throughput]
+
+As long as the device node is held open that process has a registered
+requirement on the parameter.  The name of the requirement is "process_<PID>"
+derived from the current->pid from within the open system call.
+
+To change the requested target value the process needs to write a s32 value to
+the open device node.  This translates to a pm_qos_update_requirement call.
+
+To remove the user mode request for a target value simply close the device
+node.
+
+
+
index 6f31f0a247d03137b85955bf59d06a666e34b1a0..24eac1bc735d733df28901555eefe36217d5dd2a 100644 (file)
@@ -22,6 +22,7 @@ Currently, these files are in /proc/sys/vm:
 - dirty_background_ratio
 - dirty_expire_centisecs
 - dirty_writeback_centisecs
+- highmem_is_dirtyable   (only if CONFIG_HIGHMEM set)
 - max_map_count
 - min_free_kbytes
 - laptop_mode
@@ -40,9 +41,9 @@ Currently, these files are in /proc/sys/vm:
 ==============================================================
 
 dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
-dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode,
-block_dump, swap_token_timeout, drop-caches,
-hugepages_treat_as_movable:
+dirty_writeback_centisecs, highmem_is_dirtyable,
+vfs_cache_pressure, laptop_mode, block_dump, swap_token_timeout,
+drop-caches, hugepages_treat_as_movable:
 
 See Documentation/filesystems/proc.txt
 
index da30a72a839c21cc47676dfd24c04636dedee75c..4f3da8b56979c5365ab8403a90eaebd3ec3a378b 100644 (file)
@@ -2249,6 +2249,15 @@ L:       kvm-devel@lists.sourceforge.net
 W:     kvm.sourceforge.net
 S:     Supported
 
+KERNEL VIRTUAL MACHINE For Itanium(KVM/IA64)
+P:     Anthony Xu
+M:     anthony.xu@intel.com
+P:     Xiantao Zhang
+M:     xiantao.zhang@intel.com
+L:     kvm-ia64-devel@lists.sourceforge.net
+W:     kvm.sourceforge.net
+S:     Supported
+
 KEXEC
 P:     Eric Biederman
 M:     ebiederm@xmission.com
@@ -2681,6 +2690,16 @@ M:       James.Bottomley@HansenPartnership.com
 L:     linux-scsi@vger.kernel.org
 S:     Maintained
 
+NETEFFECT IWARP RNIC DRIVER (IW_NES)
+P:     Faisal Latif
+M:     flatif@neteffect.com
+P:     Glenn Streiff
+M:     gstreiff@neteffect.com
+L:     general@lists.openfabrics.org
+W:     http://www.neteffect.com
+S:     Supported
+F:     drivers/infiniband/hw/nes/
+
 NETEM NETWORK EMULATOR
 P:     Stephen Hemminger
 M:     shemminger@linux-foundation.org
index 468b76ce66a1304e4eeddc48663effbe8545f83e..8ac08311f5a51bd765145b461b76864f550d38f1 100644 (file)
@@ -165,7 +165,7 @@ dma_alloc_coherent(struct device *dev, size_t size,
        ret = (void *)__get_free_pages(gfp, get_order(size));
        if (ret) {
                memset(ret, 0, size);
-               *dma_handle = virt_to_bus(ret);
+               *dma_handle = virt_to_phys(ret);
        }
        return ret;
 }
@@ -184,7 +184,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
 
                BUG_ON(!sg_page(sg));
                va = sg_virt(sg);
-               sg_dma_address(sg) = (dma_addr_t)virt_to_bus(va);
+               sg_dma_address(sg) = (dma_addr_t)virt_to_phys(va);
                sg_dma_len(sg) = sg->length;
        }
 
index 2d00a08d3f0811d0f7b819475d6f858828d88496..26d3789dfdd0420bc4e7ce496995138b1decda14 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/bootmem.h>
 #include <linux/scatterlist.h>
 #include <linux/log2.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/io.h>
 #include <asm/hwrpb.h>
@@ -470,22 +471,29 @@ EXPORT_SYMBOL(pci_free_consistent);
 #define SG_ENT_PHYS_ADDRESS(SG) __pa(SG_ENT_VIRT_ADDRESS(SG))
 
 static void
-sg_classify(struct scatterlist *sg, struct scatterlist *end, int virt_ok)
+sg_classify(struct device *dev, struct scatterlist *sg, struct scatterlist *end,
+           int virt_ok)
 {
        unsigned long next_paddr;
        struct scatterlist *leader;
        long leader_flag, leader_length;
+       unsigned int max_seg_size;
 
        leader = sg;
        leader_flag = 0;
        leader_length = leader->length;
        next_paddr = SG_ENT_PHYS_ADDRESS(leader) + leader_length;
 
+       /* we will not marge sg without device. */
+       max_seg_size = dev ? dma_get_max_seg_size(dev) : 0;
        for (++sg; sg < end; ++sg) {
                unsigned long addr, len;
                addr = SG_ENT_PHYS_ADDRESS(sg);
                len = sg->length;
 
+               if (leader_length + len > max_seg_size)
+                       goto new_segment;
+
                if (next_paddr == addr) {
                        sg->dma_address = -1;
                        leader_length += len;
@@ -494,6 +502,7 @@ sg_classify(struct scatterlist *sg, struct scatterlist *end, int virt_ok)
                        leader_flag = 1;
                        leader_length += len;
                } else {
+new_segment:
                        leader->dma_address = leader_flag;
                        leader->dma_length = leader_length;
                        leader = sg;
@@ -512,7 +521,7 @@ sg_classify(struct scatterlist *sg, struct scatterlist *end, int virt_ok)
    in the blanks.  */
 
 static int
-sg_fill(struct scatterlist *leader, struct scatterlist *end,
+sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
        struct scatterlist *out, struct pci_iommu_arena *arena,
        dma_addr_t max_dma, int dac_allowed)
 {
@@ -562,8 +571,8 @@ sg_fill(struct scatterlist *leader, struct scatterlist *end,
 
                /* Otherwise, break up the remaining virtually contiguous
                   hunks into individual direct maps and retry.  */
-               sg_classify(leader, end, 0);
-               return sg_fill(leader, end, out, arena, max_dma, dac_allowed);
+               sg_classify(dev, leader, end, 0);
+               return sg_fill(dev, leader, end, out, arena, max_dma, dac_allowed);
        }
 
        out->dma_address = arena->dma_base + dma_ofs*PAGE_SIZE + paddr;
@@ -619,12 +628,15 @@ pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
        struct pci_iommu_arena *arena;
        dma_addr_t max_dma;
        int dac_allowed;
+       struct device *dev;
 
        if (direction == PCI_DMA_NONE)
                BUG();
 
        dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0;
 
+       dev = pdev ? &pdev->dev : NULL;
+
        /* Fast path single entry scatterlists.  */
        if (nents == 1) {
                sg->dma_length = sg->length;
@@ -638,7 +650,7 @@ pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
        end = sg + nents;
 
        /* First, prepare information about the entries.  */
-       sg_classify(sg, end, alpha_mv.mv_pci_tbi != 0);
+       sg_classify(dev, sg, end, alpha_mv.mv_pci_tbi != 0);
 
        /* Second, figure out where we're going to map things.  */
        if (alpha_mv.mv_pci_tbi) {
@@ -658,7 +670,7 @@ pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
        for (out = sg; sg < end; ++sg) {
                if ((int) sg->dma_address < 0)
                        continue;
-               if (sg_fill(sg, end, out, arena, max_dma, dac_allowed) < 0)
+               if (sg_fill(dev, sg, end, out, arena, max_dma, dac_allowed) < 0)
                        goto error;
                out++;
        }
index bd5e68cd61e84fb440bd0a618b6c90019d48fb75..beff6297f788a029aa7423bc2a615915a764126d 100644 (file)
@@ -58,7 +58,6 @@ static struct notifier_block alpha_panic_block = {
 #include <asm/system.h>
 #include <asm/hwrpb.h>
 #include <asm/dma.h>
-#include <asm/io.h>
 #include <asm/mmu_context.h>
 #include <asm/console.h>
 
index 79de99e32c35f91ad2fcebc0ab8513bc5fd612d7..ba914af18c4f30cc60d915277a04c9865d68308c 100644 (file)
@@ -495,7 +495,7 @@ sys_call_table:
        .quad sys_epoll_pwait
        .quad sys_utimensat                     /* 475 */
        .quad sys_signalfd
-       .quad sys_timerfd
+       .quad sys_ni_syscall
        .quad sys_eventfd
 
        .size sys_call_table, . - sys_call_table
index 64d19eff3faaacdf56eb0f6b6882518cf72d2bbb..e19e7744e366a3a8d14bbb7aa7fb5ab4d0d13986 100644 (file)
@@ -385,6 +385,7 @@ config ARCH_PXA
        depends on MMU
        select ARCH_MTD_XIP
        select GENERIC_GPIO
+       select HAVE_GPIO_LIB
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
        select TICK_ONESHOT
@@ -1122,6 +1123,8 @@ source "drivers/i2c/Kconfig"
 
 source "drivers/spi/Kconfig"
 
+source "drivers/gpio/Kconfig"
+
 source "drivers/w1/Kconfig"
 
 source "drivers/power/Kconfig"
index cecf658e362514e56fc0a56084ece50da5d8a0d2..283e14fff993dde1881b005aa6dbb1598e359780 100644 (file)
                CALL(sys_kexec_load)
                CALL(sys_utimensat)
                CALL(sys_signalfd)
-/* 350 */      CALL(sys_timerfd)
+/* 350 */      CALL(sys_ni_syscall)
                CALL(sys_eventfd)
                CALL(sys_fallocate)
 #ifndef syscalls_counted
index e9dfbab46cb65ef0a6e85d8aa90a9cc0cc0f1522..eefae1de334cabbb94ec07e0c85d2ac01795282f 100644 (file)
@@ -150,7 +150,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
        secondary_data.pgdir = 0;
 
        *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0);
-       pgd_free(pgd);
+       pgd_free(&init_mm, pgd);
 
        if (ret) {
                printk(KERN_CRIT "CPU%u: processor failed to boot\n", cpu);
index 8604938bd94897a78d40ca0b51ec6ee3e4587ccd..6e0c4f5b5ae663526a9daf2750149f7f6fe2b89b 100644 (file)
@@ -3,7 +3,8 @@
 #
 
 # Common support (must be linked before board specific support)
-obj-y                          += clock.o devices.o generic.o irq.o dma.o time.o
+obj-y                          += clock.o devices.o generic.o irq.o dma.o \
+                                  time.o gpio.o
 obj-$(CONFIG_PXA25x)           += pxa25x.o
 obj-$(CONFIG_PXA27x)           += pxa27x.o
 obj-$(CONFIG_PXA3xx)           += pxa3xx.o mfp.o smemc.o
index 76970598f55071faefa72df5ac6970db61b8d2fe..80721c610d41dee16f74ebdbeb72bb4c3be2b7cf 100644 (file)
@@ -32,7 +32,6 @@
 #include <asm/mach/map.h>
 
 #include <asm/arch/pxa-regs.h>
-#include <asm/arch/gpio.h>
 
 #include "generic.h"
 
@@ -66,97 +65,6 @@ unsigned int get_memclk_frequency_10khz(void)
 }
 EXPORT_SYMBOL(get_memclk_frequency_10khz);
 
-/*
- * Handy function to set GPIO alternate functions
- */
-int pxa_last_gpio;
-
-int pxa_gpio_mode(int gpio_mode)
-{
-       unsigned long flags;
-       int gpio = gpio_mode & GPIO_MD_MASK_NR;
-       int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
-       int gafr;
-
-       if (gpio > pxa_last_gpio)
-               return -EINVAL;
-
-       local_irq_save(flags);
-       if (gpio_mode & GPIO_DFLT_LOW)
-               GPCR(gpio) = GPIO_bit(gpio);
-       else if (gpio_mode & GPIO_DFLT_HIGH)
-               GPSR(gpio) = GPIO_bit(gpio);
-       if (gpio_mode & GPIO_MD_MASK_DIR)
-               GPDR(gpio) |= GPIO_bit(gpio);
-       else
-               GPDR(gpio) &= ~GPIO_bit(gpio);
-       gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
-       GAFR(gpio) = gafr |  (fn  << (((gpio) & 0xf)*2));
-       local_irq_restore(flags);
-
-       return 0;
-}
-
-EXPORT_SYMBOL(pxa_gpio_mode);
-
-int gpio_direction_input(unsigned gpio)
-{
-       unsigned long flags;
-       u32 mask;
-
-       if (gpio > pxa_last_gpio)
-               return -EINVAL;
-
-       mask = GPIO_bit(gpio);
-       local_irq_save(flags);
-       GPDR(gpio) &= ~mask;
-       local_irq_restore(flags);
-
-       return 0;
-}
-EXPORT_SYMBOL(gpio_direction_input);
-
-int gpio_direction_output(unsigned gpio, int value)
-{
-       unsigned long flags;
-       u32 mask;
-
-       if (gpio > pxa_last_gpio)
-               return -EINVAL;
-
-       mask = GPIO_bit(gpio);
-       local_irq_save(flags);
-       if (value)
-               GPSR(gpio) = mask;
-       else
-               GPCR(gpio) = mask;
-       GPDR(gpio) |= mask;
-       local_irq_restore(flags);
-
-       return 0;
-}
-EXPORT_SYMBOL(gpio_direction_output);
-
-/*
- * Return GPIO level
- */
-int pxa_gpio_get_value(unsigned gpio)
-{
-       return __gpio_get_value(gpio);
-}
-
-EXPORT_SYMBOL(pxa_gpio_get_value);
-
-/*
- * Set output GPIO level
- */
-void pxa_gpio_set_value(unsigned gpio, int value)
-{
-       __gpio_set_value(gpio, value);
-}
-
-EXPORT_SYMBOL(pxa_gpio_set_value);
-
 /*
  * Routine to safely enable or disable a clock in the CKEN
  */
@@ -172,7 +80,6 @@ void __pxa_set_cken(int clock, int enable)
 
        local_irq_restore(flags);
 }
-
 EXPORT_SYMBOL(__pxa_set_cken);
 
 /*
index 1a16ad3ecee6e8c5b9e535d8cb8bba0936406b05..b3d10b0e52a01478055cf4e26b5f312d49d52b65 100644 (file)
@@ -16,6 +16,7 @@ extern void __init pxa_init_irq_low(void);
 extern void __init pxa_init_irq_high(void);
 extern void __init pxa_init_irq_gpio(int gpio_nr);
 extern void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int));
+extern void __init pxa_init_gpio(int gpio_nr);
 extern void __init pxa25x_init_irq(void);
 extern void __init pxa27x_init_irq(void);
 extern void __init pxa3xx_init_irq(void);
diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
new file mode 100644 (file)
index 0000000..8638dd7
--- /dev/null
@@ -0,0 +1,197 @@
+/*
+ *  linux/arch/arm/mach-pxa/gpio.c
+ *
+ *  Generic PXA GPIO handling
+ *
+ *  Author:    Nicolas Pitre
+ *  Created:   Jun 15, 2001
+ *  Copyright: MontaVista Software Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+
+#include <asm/gpio.h>
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/arch/pxa-regs.h>
+
+#include "generic.h"
+
+
+struct pxa_gpio_chip {
+       struct gpio_chip chip;
+       void __iomem     *regbase;
+};
+
+int pxa_last_gpio;
+
+/*
+ * Configure pins for GPIO or other functions
+ */
+int pxa_gpio_mode(int gpio_mode)
+{
+       unsigned long flags;
+       int gpio = gpio_mode & GPIO_MD_MASK_NR;
+       int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
+       int gafr;
+
+       if (gpio > pxa_last_gpio)
+               return -EINVAL;
+
+       local_irq_save(flags);
+       if (gpio_mode & GPIO_DFLT_LOW)
+               GPCR(gpio) = GPIO_bit(gpio);
+       else if (gpio_mode & GPIO_DFLT_HIGH)
+               GPSR(gpio) = GPIO_bit(gpio);
+       if (gpio_mode & GPIO_MD_MASK_DIR)
+               GPDR(gpio) |= GPIO_bit(gpio);
+       else
+               GPDR(gpio) &= ~GPIO_bit(gpio);
+       gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
+       GAFR(gpio) = gafr |  (fn  << (((gpio) & 0xf)*2));
+       local_irq_restore(flags);
+
+       return 0;
+}
+EXPORT_SYMBOL(pxa_gpio_mode);
+
+static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
+{
+       unsigned long        flags;
+       u32                  mask = 1 << offset;
+       u32                  value;
+       struct pxa_gpio_chip *pxa;
+       void __iomem         *gpdr;
+
+       pxa = container_of(chip, struct pxa_gpio_chip, chip);
+       gpdr = pxa->regbase + GPDR_OFFSET;
+       local_irq_save(flags);
+       value = __raw_readl(gpdr);
+       value &= ~mask;
+       __raw_writel(value, gpdr);
+       local_irq_restore(flags);
+
+       return 0;
+}
+
+static int pxa_gpio_direction_output(struct gpio_chip *chip,
+                                       unsigned offset, int value)
+{
+       unsigned long        flags;
+       u32                  mask = 1 << offset;
+       u32                  tmp;
+       struct pxa_gpio_chip *pxa;
+       void __iomem         *gpdr;
+
+       pxa = container_of(chip, struct pxa_gpio_chip, chip);
+       __raw_writel(mask,
+                       pxa->regbase + (value ? GPSR_OFFSET : GPCR_OFFSET));
+       gpdr = pxa->regbase + GPDR_OFFSET;
+       local_irq_save(flags);
+       tmp = __raw_readl(gpdr);
+       tmp |= mask;
+       __raw_writel(tmp, gpdr);
+       local_irq_restore(flags);
+
+       return 0;
+}
+
+/*
+ * Return GPIO level
+ */
+static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
+{
+       u32                  mask = 1 << offset;
+       struct pxa_gpio_chip *pxa;
+
+       pxa = container_of(chip, struct pxa_gpio_chip, chip);
+       return __raw_readl(pxa->regbase + GPLR_OFFSET) & mask;
+}
+
+/*
+ * Set output GPIO level
+ */
+static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+{
+       u32                  mask = 1 << offset;
+       struct pxa_gpio_chip *pxa;
+
+       pxa = container_of(chip, struct pxa_gpio_chip, chip);
+
+       if (value)
+               __raw_writel(mask, pxa->regbase + GPSR_OFFSET);
+       else
+               __raw_writel(mask, pxa->regbase + GPCR_OFFSET);
+}
+
+static struct pxa_gpio_chip pxa_gpio_chip[] = {
+       [0] = {
+               .regbase = GPIO0_BASE,
+               .chip = {
+                       .label            = "gpio-0",
+                       .direction_input  = pxa_gpio_direction_input,
+                       .direction_output = pxa_gpio_direction_output,
+                       .get              = pxa_gpio_get,
+                       .set              = pxa_gpio_set,
+                       .base             = 0,
+                       .ngpio            = 32,
+               },
+       },
+       [1] = {
+               .regbase = GPIO1_BASE,
+               .chip = {
+                       .label            = "gpio-1",
+                       .direction_input  = pxa_gpio_direction_input,
+                       .direction_output = pxa_gpio_direction_output,
+                       .get              = pxa_gpio_get,
+                       .set              = pxa_gpio_set,
+                       .base             = 32,
+                       .ngpio            = 32,
+               },
+       },
+       [2] = {
+               .regbase = GPIO2_BASE,
+               .chip = {
+                       .label            = "gpio-2",
+                       .direction_input  = pxa_gpio_direction_input,
+                       .direction_output = pxa_gpio_direction_output,
+                       .get              = pxa_gpio_get,
+                       .set              = pxa_gpio_set,
+                       .base             = 64,
+                       .ngpio            = 32, /* 21 for PXA25x */
+               },
+       },
+#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+       [3] = {
+               .regbase = GPIO3_BASE,
+               .chip = {
+                       .label            = "gpio-3",
+                       .direction_input  = pxa_gpio_direction_input,
+                       .direction_output = pxa_gpio_direction_output,
+                       .get              = pxa_gpio_get,
+                       .set              = pxa_gpio_set,
+                       .base             = 96,
+                       .ngpio            = 32,
+               },
+       },
+#endif
+};
+
+void __init pxa_init_gpio(int gpio_nr)
+{
+       int i;
+
+       /* add a GPIO chip for each register bank.
+        * the last PXA25x register only contains 21 GPIOs
+        */
+       for (i = 0; i < gpio_nr; i += 32) {
+               if (i+32 > gpio_nr)
+                       pxa_gpio_chip[i/32].chip.ngpio = gpio_nr - i;
+               gpiochip_add(&pxa_gpio_chip[i/32].chip);
+       }
+}
index 5a1d5eef10a4cb6365b0d53ee3bd84b52f703a1e..36c6a68beca26e1fa895d6ebb2373bd4bdd0eed6 100644 (file)
@@ -311,6 +311,8 @@ void __init pxa_init_irq_gpio(int gpio_nr)
        /* Install handler for GPIO>=2 edge detect interrupts */
        set_irq_chip(IRQ_GPIO_2_x, &pxa_internal_chip_low);
        set_irq_chained_handler(IRQ_GPIO_2_x, pxa_gpio_demux_handler);
+
+       pxa_init_gpio(gpio_nr);
 }
 
 void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int))
index 75952779ce1991f68114dcbeef6a188c4c47d027..303a7ff6bfd2eeb3120164d9cc185e0973d600de 100644 (file)
@@ -162,7 +162,7 @@ static void unmap_area_sections(unsigned long virt, unsigned long size)
                         * Free the page table, if there was one.
                         */
                        if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_TABLE)
-                               pte_free_kernel(pmd_page_vaddr(pmd));
+                               pte_free_kernel(&init_mm, pmd_page_vaddr(pmd));
                }
 
                addr += PGDIR_SIZE;
index 50b9aed6000d8ede02f5df0175df8c8aa7e85c65..500c9610ab3085094ec48d012610b4f557136ec1 100644 (file)
@@ -65,14 +65,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
        return new_pgd;
 
 no_pte:
-       pmd_free(new_pmd);
+       pmd_free(mm, new_pmd);
 no_pmd:
        free_pages((unsigned long)new_pgd, 2);
 no_pgd:
        return NULL;
 }
 
-void free_pgd_slow(pgd_t *pgd)
+void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd)
 {
        pmd_t *pmd;
        struct page *pte;
@@ -94,8 +94,8 @@ void free_pgd_slow(pgd_t *pgd)
        pmd_clear(pmd);
        dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE);
        pte_lock_deinit(pte);
-       pte_free(pte);
-       pmd_free(pmd);
+       pte_free(mm, pte);
+       pmd_free(mm, pmd);
 free:
        free_pages((unsigned long) pgd, 2);
 }
index c816f29154c929be053fd48c6b48f98913779b30..28e0caf4156ca68bb066d8300fd1947264e28037 100644 (file)
@@ -82,6 +82,7 @@ config PLATFORM_AT32AP
        select SUBARCH_AVR32B
        select MMU
        select PERFORMANCE_COUNTERS
+       select HAVE_GPIO_LIB
 
 #
 # CPU types
index 75c81f2dd0b3a623fb19722dc961bd99e788ccc3..478bda4c4a09a9ac57f119b4c8529d970cbc48e2 100644 (file)
@@ -293,6 +293,6 @@ sys_call_table:
        .long   sys_shmctl
        .long   sys_utimensat
        .long   sys_signalfd
-       .long   sys_timerfd             /* 280 */
+       .long   sys_ni_syscall          /* 280, was sys_timerfd */
        .long   sys_eventfd
        .long   sys_ni_syscall          /* r8 is saturated at nr_syscalls */
index d61a02da898cd68bd08316474ee2c2762dfd8036..38a8fa31c0b5c8de591ae8f39a08c2e90d2a862b 100644 (file)
 #define MAX_NR_PIO_DEVICES             8
 
 struct pio_device {
+       struct gpio_chip chip;
        void __iomem *regs;
        const struct platform_device *pdev;
        struct clk *clk;
        u32 pinmux_mask;
-       u32 gpio_mask;
        char name[8];
 };
 
@@ -64,7 +64,8 @@ void __init at32_select_periph(unsigned int pin, unsigned int periph,
                goto fail;
        }
 
-       if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask))) {
+       if (unlikely(test_and_set_bit(pin_index, &pio->pinmux_mask)
+                        || gpiochip_is_requested(&pio->chip, pin_index))) {
                printk("%s: pin %u is busy\n", pio->name, pin_index);
                goto fail;
        }
@@ -79,9 +80,6 @@ void __init at32_select_periph(unsigned int pin, unsigned int periph,
        if (!(flags & AT32_GPIOF_PULLUP))
                pio_writel(pio, PUDR, mask);
 
-       /* gpio_request NOT allowed */
-       set_bit(pin_index, &pio->gpio_mask);
-
        return;
 
 fail:
@@ -130,9 +128,6 @@ void __init at32_select_gpio(unsigned int pin, unsigned long flags)
 
        pio_writel(pio, PER, mask);
 
-       /* gpio_request now allowed */
-       clear_bit(pin_index, &pio->gpio_mask);
-
        return;
 
 fail:
@@ -166,96 +161,50 @@ fail:
 
 /* GPIO API */
 
-int gpio_request(unsigned int gpio, const char *label)
+static int direction_input(struct gpio_chip *chip, unsigned offset)
 {
-       struct pio_device *pio;
-       unsigned int pin;
-
-       pio = gpio_to_pio(gpio);
-       if (!pio)
-               return -ENODEV;
+       struct pio_device *pio = container_of(chip, struct pio_device, chip);
+       u32 mask = 1 << offset;
 
-       pin = gpio & 0x1f;
-       if (test_and_set_bit(pin, &pio->gpio_mask))
-               return -EBUSY;
+       if (!(pio_readl(pio, PSR) & mask))
+               return -EINVAL;
 
+       pio_writel(pio, ODR, mask);
        return 0;
 }
-EXPORT_SYMBOL(gpio_request);
 
-void gpio_free(unsigned int gpio)
+static int gpio_get(struct gpio_chip *chip, unsigned offset)
 {
-       struct pio_device *pio;
-       unsigned int pin;
+       struct pio_device *pio = container_of(chip, struct pio_device, chip);
 
-       pio = gpio_to_pio(gpio);
-       if (!pio) {
-               printk(KERN_ERR
-                      "gpio: attempted to free invalid pin %u\n", gpio);
-               return;
-       }
-
-       pin = gpio & 0x1f;
-       if (!test_and_clear_bit(pin, &pio->gpio_mask))
-               printk(KERN_ERR "gpio: freeing free or non-gpio pin %s-%u\n",
-                      pio->name, pin);
+       return (pio_readl(pio, PDSR) >> offset) & 1;
 }
-EXPORT_SYMBOL(gpio_free);
 
-int gpio_direction_input(unsigned int gpio)
-{
-       struct pio_device *pio;
-       unsigned int pin;
-
-       pio = gpio_to_pio(gpio);
-       if (!pio)
-               return -ENODEV;
-
-       pin = gpio & 0x1f;
-       pio_writel(pio, ODR, 1 << pin);
-
-       return 0;
-}
-EXPORT_SYMBOL(gpio_direction_input);
+static void gpio_set(struct gpio_chip *chip, unsigned offset, int value);
 
-int gpio_direction_output(unsigned int gpio, int value)
+static int direction_output(struct gpio_chip *chip, unsigned offset, int value)
 {
-       struct pio_device *pio;
-       unsigned int pin;
-
-       pio = gpio_to_pio(gpio);
-       if (!pio)
-               return -ENODEV;
+       struct pio_device *pio = container_of(chip, struct pio_device, chip);
+       u32 mask = 1 << offset;
 
-       gpio_set_value(gpio, value);
-
-       pin = gpio & 0x1f;
-       pio_writel(pio, OER, 1 << pin);
+       if (!(pio_readl(pio, PSR) & mask))
+               return -EINVAL;
 
+       gpio_set(chip, offset, value);
+       pio_writel(pio, OER, mask);
        return 0;
 }
-EXPORT_SYMBOL(gpio_direction_output);
 
-int gpio_get_value(unsigned int gpio)
+static void gpio_set(struct gpio_chip *chip, unsigned offset, int value)
 {
-       struct pio_device *pio = &pio_dev[gpio >> 5];
+       struct pio_device *pio = container_of(chip, struct pio_device, chip);
+       u32 mask = 1 << offset;
 
-       return (pio_readl(pio, PDSR) >> (gpio & 0x1f)) & 1;
-}
-EXPORT_SYMBOL(gpio_get_value);
-
-void gpio_set_value(unsigned int gpio, int value)
-{
-       struct pio_device *pio = &pio_dev[gpio >> 5];
-       u32 mask;
-
-       mask = 1 << (gpio & 0x1f);
        if (value)
                pio_writel(pio, SODR, mask);
        else
                pio_writel(pio, CODR, mask);
 }
-EXPORT_SYMBOL(gpio_set_value);
 
 /*--------------------------------------------------------------------------*/
 
@@ -337,6 +286,63 @@ gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq)
        set_irq_chained_handler(irq, gpio_irq_handler);
 }
 
+/*--------------------------------------------------------------------------*/
+
+#ifdef CONFIG_DEBUG_FS
+
+#include <linux/seq_file.h>
+
+/*
+ * This shows more info than the generic gpio dump code:
+ * pullups, deglitching, open drain drive.
+ */
+static void pio_bank_show(struct seq_file *s, struct gpio_chip *chip)
+{
+       struct pio_device *pio = container_of(chip, struct pio_device, chip);
+       u32                     psr, osr, imr, pdsr, pusr, ifsr, mdsr;
+       unsigned                i;
+       u32                     mask;
+       char                    bank;
+
+       psr = pio_readl(pio, PSR);
+       osr = pio_readl(pio, OSR);
+       imr = pio_readl(pio, IMR);
+       pdsr = pio_readl(pio, PDSR);
+       pusr = pio_readl(pio, PUSR);
+       ifsr = pio_readl(pio, IFSR);
+       mdsr = pio_readl(pio, MDSR);
+
+       bank = 'A' + pio->pdev->id;
+
+       for (i = 0, mask = 1; i < 32; i++, mask <<= 1) {
+               const char *label;
+
+               label = gpiochip_is_requested(chip, i);
+               if (!label)
+                       continue;
+
+               seq_printf(s, " gpio-%-3d P%c%-2d (%-12s) %s %s %s",
+                       chip->base + i, bank, i,
+                       label,
+                       (osr & mask) ? "out" : "in ",
+                       (mask & pdsr) ? "hi" : "lo",
+                       (mask & pusr) ? "  " : "up");
+               if (ifsr & mask)
+                       seq_printf(s, " deglitch");
+               if ((osr & mdsr) & mask)
+                       seq_printf(s, " open-drain");
+               if (imr & mask)
+                       seq_printf(s, " irq-%d edge-both",
+                               gpio_to_irq(chip->base + i));
+               seq_printf(s, "\n");
+       }
+}
+
+#else
+#define pio_bank_show  NULL
+#endif
+
+
 /*--------------------------------------------------------------------------*/
 
 static int __init pio_probe(struct platform_device *pdev)
@@ -349,6 +355,18 @@ static int __init pio_probe(struct platform_device *pdev)
        pio = &pio_dev[pdev->id];
        BUG_ON(!pio->regs);
 
+       pio->chip.label = pio->name;
+       pio->chip.base = pdev->id * 32;
+       pio->chip.ngpio = 32;
+
+       pio->chip.direction_input = direction_input;
+       pio->chip.get = gpio_get;
+       pio->chip.direction_output = direction_output;
+       pio->chip.set = gpio_set;
+       pio->chip.dbg_show = pio_bank_show;
+
+       gpiochip_add(&pio->chip);
+
        gpio_irq_setup(pio, irq, gpio_irq_base);
 
        platform_set_drvdata(pdev, pio);
@@ -406,12 +424,6 @@ void __init at32_init_pio(struct platform_device *pdev)
        pio->pdev = pdev;
        pio->regs = ioremap(regs->start, regs->end - regs->start + 1);
 
-       /*
-        * request_gpio() is only valid for pins that have been
-        * explicitly configured as GPIO and not previously requested
-        */
-       pio->gpio_mask = ~0UL;
-
        /* start with irqs disabled and acked */
        pio_writel(pio, IDR, ~0UL);
        (void) pio_readl(pio, ISR);
index 50fa3aca32c58c23f471469e2def0c02767b2491..7795116a483af37707a66ae57c1f1da49e59a41a 100644 (file)
@@ -19,7 +19,7 @@
 #define PIO_OSR                                0x0018
 #define PIO_IFER                               0x0020
 #define PIO_IFDR                               0x0024
-#define PIO_ISFR                               0x0028
+#define PIO_IFSR                               0x0028
 #define PIO_SODR                               0x0030
 #define PIO_CODR                               0x0034
 #define PIO_ODSR                               0x0038
index 56ff51bc8c21c8a761dc75f334b9a00f223754a4..fdd9bf43361edf9c31eae8fc19a5bdbdb2666b06 100644 (file)
@@ -1373,7 +1373,7 @@ ENTRY(_sys_call_table)
        .long _sys_epoll_pwait
        .long _sys_utimensat
        .long _sys_signalfd
-       .long _sys_timerfd
+       .long _sys_ni_syscall
        .long _sys_eventfd      /* 350 */
        .long _sys_pread64
        .long _sys_pwrite64
index 7f0be4cd5e9a1568207fa9939a7f8816c1807035..27b082ac7f11e25e8d6b292b54af2c932f259217 100644 (file)
@@ -150,6 +150,7 @@ config ETRAX_FLASH_BUSWIDTH
          Width in bytes of the Flash bus (1, 2 or 4). Is usually 2.
 
 source arch/cris/arch-v10/Kconfig
+source arch/cris/arch-v32/Kconfig
 
 endmenu
 
@@ -157,8 +158,8 @@ source "net/Kconfig"
 
 # bring in ETRAX built-in drivers
 menu "Drivers for built-in interfaces"
-# arch/cris/arch is a symlink to correct arch (arch-v10 or arch-v32)
-source arch/cris/arch/drivers/Kconfig
+source arch/cris/arch-v10/drivers/Kconfig
+source arch/cris/arch-v32/drivers/Kconfig
 
 endmenu
 
index f1ce6f64401dd45c4e375a466146790f53aeb8eb..1d61faec77cd0b01241462104bf1747e3b6a508d 100644 (file)
@@ -1,3 +1,5 @@
+if ETRAX_ARCH_V10
+
 # ETRAX 100LX v1 has a MMU "feature" requiring a low mapping
 config CRIS_LOW_MAP
        bool
@@ -451,3 +453,5 @@ config ETRAX_POWERBUTTON_BIT
        default "25"
        help
          Configure where power button is connected.
+
+endif
index e3c0f29281496781f948b6e14414e53aea75eaab..96740ef497d4237ebffc65ffb79afe8a1bdc5f4c 100644 (file)
@@ -1,3 +1,5 @@
+if ETRAX_ARCH_V10
+
 config ETRAX_ETHERNET
        bool "Ethernet support"
        depends on ETRAX_ARCH_V10
@@ -806,3 +808,5 @@ config ETRAX_DS1302_TRICKLE_CHARGE
          1 = 2kohm, 2 = 4kohm, 3 = 4kohm
          4 = 1 diode, 8 = 2 diodes
          Allowed values are (increasing current): 0, 11, 10, 9, 7, 6, 5
+
+endif
index ec62c951fa3cc37a1dd709609cd1a9bfa669ef1a..d1361dc119e24d76b3042bd7b70fcb91bdde205a 100644 (file)
@@ -1167,7 +1167,7 @@ sys_call_table:
        .long sys_epoll_pwait
        .long sys_utimensat             /* 320 */
        .long sys_signalfd
-       .long sys_timerfd
+       .long sys_ni_syscall
        .long sys_eventfd
        .long sys_fallocate
 
index 4f79d8ed3e1c451ec122f0b29f93549f9cb3e166..d8acaa920e1c0de92bfc5cfe34be843e11c56563 100644 (file)
@@ -1,3 +1,5 @@
+if ETRAX_ARCH_V32
+
 config ETRAX_DRAM_VIRTUAL_BASE
        hex
        depends on ETRAX_ARCH_V32
@@ -294,3 +296,5 @@ config ETRAX_DEF_GIO_PE_OUT
        help
          Configures the initial data for the general port E bits.  Most
          products should use 00000 here.
+
+endif
index 9bccb5e2a9607b399245f3a42f9c558d325e16bd..c329cce2a0c3c28a5bff0e18587d8dc8f1ce2e14 100644 (file)
@@ -1,3 +1,5 @@
+if ETRAX_ARCH_V32
+
 config ETRAX_ETHERNET
        bool "Ethernet support"
        depends on ETRAX_ARCH_V32
@@ -610,3 +612,5 @@ config ETRAX_STREAMCOPROC
        help
          This option enables a driver for the stream co-processor
          for cryptographic operations.
+
+endif
index 66f9500fbc027609b5d431b89c702015e9913b4c..e0364654fc447f2a4eae7756a28d84775b7654a0 100644 (file)
@@ -93,7 +93,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
 
        dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
        if (!dev->dma_mem)
-               goto out;
+               goto iounmap_out;
        dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
        if (!dev->dma_mem->bitmap)
                goto free1_out;
@@ -110,6 +110,8 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
 
  free1_out:
        kfree(dev->dma_mem);
+ iounmap_out:
+       iounmap(mem_base);
  out:
        return 0;
 }
index bf0468cbe7130914e81f9dc82e1e1a5d53c2a25e..96f7d70f4473681dc3f155b31c00215a55267257 100644 (file)
@@ -138,6 +138,15 @@ config UCPAGE_OFFSET_C0000000
 
 endchoice
 
+config PAGE_OFFSET
+       hex
+       default 0x20000000 if UCPAGE_OFFSET_20000000
+       default 0x40000000 if UCPAGE_OFFSET_40000000
+       default 0x60000000 if UCPAGE_OFFSET_60000000
+       default 0x80000000 if UCPAGE_OFFSET_80000000
+       default 0xA0000000 if UCPAGE_OFFSET_A0000000
+       default 0xC0000000
+
 config PROTECT_KERNEL
        bool "Protect core kernel against userspace"
        depends on !MMU
index 99046b1f51c8f733c5c406f9985f7a3a3414a21e..ca6a345b87e401f7309e89c0a41702a91f38a35d 100644 (file)
@@ -1494,7 +1494,7 @@ sys_call_table:
        .long sys_epoll_pwait
        .long sys_utimensat             /* 320 */
        .long sys_signalfd
-       .long sys_timerfd
+       .long sys_ni_syscall
        .long sys_eventfd
        .long sys_fallocate
 
index f42b328b1dd0475e1af868308cdc000c89d40942..ef7527b8b0c77fabca307e5a0f614386d162c8ac 100644 (file)
@@ -13,7 +13,7 @@ ENTRY(_start)
 
 jiffies = jiffies_64 + 4;
 
-__page_offset = 0xc0000000;            /* start of area covered by struct pages */
+__page_offset = CONFIG_PAGE_OFFSET;    /* start of area covered by struct pages */
 __kernel_image_start = __page_offset;  /* address at which kernel image resides */
 
 SECTIONS
index 1530a4111e6d743345ff379d191ba7d6df06e9a3..81757d55a5b592fed1e38281edc0cbb6a256dff7 100644 (file)
@@ -181,7 +181,7 @@ int cxn_pin_by_pid(pid_t pid)
 
        /* get a handle on the mm_struct */
        read_lock(&tasklist_lock);
-       tsk = find_task_by_pid(pid);
+       tsk = find_task_by_vpid(pid);
        if (tsk) {
                ret = -EINVAL;
 
index 7787c3cc52c6923d58e305b4ae10c4e3ab6b87e1..1a2e5c8d03a9c7e639ab354705a08cb0916bb443 100644 (file)
@@ -140,7 +140,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
        return pgd;
 }
 
-void pgd_free(pgd_t *pgd)
+void pgd_free(struct mm_struct *mm, pgd_t *pgd)
 {
        /* in the non-PAE case, clear_page_tables() clears user pgd entries */
        quicklist_free(0, pgd_dtor, pgd);
index 45bf04eb7d705c2371d8907e8ec13cc7ab5d6be5..a94445422cc65d895eb76e4a417897bf067556d9 100644 (file)
@@ -1265,7 +1265,7 @@ sba_fill_pdir(
  * the sglist do both.
  */
 static SBA_INLINE int
-sba_coalesce_chunks( struct ioc *ioc,
+sba_coalesce_chunks(struct ioc *ioc, struct device *dev,
        struct scatterlist *startsg,
        int nents)
 {
@@ -1275,6 +1275,7 @@ sba_coalesce_chunks( struct ioc *ioc,
        struct scatterlist *dma_sg;        /* next DMA stream head */
        unsigned long dma_offset, dma_len; /* start/len of DMA stream */
        int n_mappings = 0;
+       unsigned int max_seg_size = dma_get_max_seg_size(dev);
 
        while (nents > 0) {
                unsigned long vaddr = (unsigned long) sba_sg_address(startsg);
@@ -1314,6 +1315,9 @@ sba_coalesce_chunks( struct ioc *ioc,
                            > DMA_CHUNK_SIZE)
                                break;
 
+                       if (dma_len + startsg->length > max_seg_size)
+                               break;
+
                        /*
                        ** Then look for virtually contiguous blocks.
                        **
@@ -1441,7 +1445,7 @@ int sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, int di
        ** w/o this association, we wouldn't have coherent DMA!
        ** Access to the virtual address is what forces a two pass algorithm.
        */
-       coalesced = sba_coalesce_chunks(ioc, sglist, nents);
+       coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents);
 
        /*
        ** Program the I/O Pdir
@@ -1871,7 +1875,7 @@ ioc_show(struct seq_file *s, void *v)
        return 0;
 }
 
-static struct seq_operations ioc_seq_ops = {
+static const struct seq_operations ioc_seq_ops = {
        .start = ioc_start,
        .next  = ioc_next,
        .stop  = ioc_stop,
index d1d50cd1c38a700318a02ab3678a7bb16eca743d..896b1ebbfb268381bc87eb2e766e9c75e7d75f84 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "ia32priv.h"
 
-extern void die_if_kernel (char *str, struct pt_regs *regs, long err);
+extern int die_if_kernel (char *str, struct pt_regs *regs, long err);
 
 struct exec_domain ia32_exec_domain;
 struct page *ia32_shared_page[NR_CPUS];
@@ -217,7 +217,8 @@ ia32_bad_interrupt (unsigned long int_num, struct pt_regs *regs)
 {
        siginfo_t siginfo;
 
-       die_if_kernel("Bad IA-32 interrupt", regs, int_num);
+       if (die_if_kernel("Bad IA-32 interrupt", regs, int_num))
+               return;
 
        siginfo.si_signo = SIGTRAP;
        siginfo.si_errno = int_num;     /* XXX is it OK to abuse si_errno like this? */
index 242d7934112009340e36724787477bffcda63175..919070a9aed7184c87ea43d83855963bb170d40e 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * Extensible Firmware Interface
  *
- * Based on Extensible Firmware Interface Specification version 0.9 April 30, 1999
+ * Based on Extensible Firmware Interface Specification version 0.9
+ * April 30, 1999
  *
  * Copyright (C) 1999 VA Linux Systems
  * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
@@ -48,145 +49,157 @@ static unsigned long mem_limit = ~0UL, max_addr = ~0UL, min_addr = 0UL;
 
 #define efi_call_virt(f, args...)      (*(f))(args)
 
-#define STUB_GET_TIME(prefix, adjust_arg)                                                        \
-static efi_status_t                                                                              \
-prefix##_get_time (efi_time_t *tm, efi_time_cap_t *tc)                                           \
-{                                                                                                \
-       struct ia64_fpreg fr[6];                                                                  \
-       efi_time_cap_t *atc = NULL;                                                               \
-       efi_status_t ret;                                                                         \
-                                                                                                 \
-       if (tc)                                                                                   \
-               atc = adjust_arg(tc);                                                             \
-       ia64_save_scratch_fpregs(fr);                                                             \
-       ret = efi_call_##prefix((efi_get_time_t *) __va(runtime->get_time), adjust_arg(tm), atc); \
-       ia64_load_scratch_fpregs(fr);                                                             \
-       return ret;                                                                               \
+#define STUB_GET_TIME(prefix, adjust_arg)                                     \
+static efi_status_t                                                           \
+prefix##_get_time (efi_time_t *tm, efi_time_cap_t *tc)                        \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_time_cap_t *atc = NULL;                                            \
+       efi_status_t ret;                                                      \
+                                                                              \
+       if (tc)                                                                \
+               atc = adjust_arg(tc);                                          \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix((efi_get_time_t *) __va(runtime->get_time),    \
+                               adjust_arg(tm), atc);                          \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_SET_TIME(prefix, adjust_arg)                                                      \
-static efi_status_t                                                                            \
-prefix##_set_time (efi_time_t *tm)                                                             \
-{                                                                                              \
-       struct ia64_fpreg fr[6];                                                                \
-       efi_status_t ret;                                                                       \
-                                                                                               \
-       ia64_save_scratch_fpregs(fr);                                                           \
-       ret = efi_call_##prefix((efi_set_time_t *) __va(runtime->set_time), adjust_arg(tm));    \
-       ia64_load_scratch_fpregs(fr);                                                           \
-       return ret;                                                                             \
+#define STUB_SET_TIME(prefix, adjust_arg)                                     \
+static efi_status_t                                                           \
+prefix##_set_time (efi_time_t *tm)                                            \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_status_t ret;                                                      \
+                                                                              \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix((efi_set_time_t *) __va(runtime->set_time),    \
+                               adjust_arg(tm));                               \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_GET_WAKEUP_TIME(prefix, adjust_arg)                                               \
-static efi_status_t                                                                            \
-prefix##_get_wakeup_time (efi_bool_t *enabled, efi_bool_t *pending, efi_time_t *tm)            \
-{                                                                                              \
-       struct ia64_fpreg fr[6];                                                                \
-       efi_status_t ret;                                                                       \
-                                                                                               \
-       ia64_save_scratch_fpregs(fr);                                                           \
-       ret = efi_call_##prefix((efi_get_wakeup_time_t *) __va(runtime->get_wakeup_time),       \
-                               adjust_arg(enabled), adjust_arg(pending), adjust_arg(tm));      \
-       ia64_load_scratch_fpregs(fr);                                                           \
-       return ret;                                                                             \
+#define STUB_GET_WAKEUP_TIME(prefix, adjust_arg)                              \
+static efi_status_t                                                           \
+prefix##_get_wakeup_time (efi_bool_t *enabled, efi_bool_t *pending,           \
+                         efi_time_t *tm)                                      \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_status_t ret;                                                      \
+                                                                              \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix(                                               \
+               (efi_get_wakeup_time_t *) __va(runtime->get_wakeup_time),      \
+               adjust_arg(enabled), adjust_arg(pending), adjust_arg(tm));     \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_SET_WAKEUP_TIME(prefix, adjust_arg)                                               \
-static efi_status_t                                                                            \
-prefix##_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm)                                  \
-{                                                                                              \
-       struct ia64_fpreg fr[6];                                                                \
-       efi_time_t *atm = NULL;                                                                 \
-       efi_status_t ret;                                                                       \
-                                                                                               \
-       if (tm)                                                                                 \
-               atm = adjust_arg(tm);                                                           \
-       ia64_save_scratch_fpregs(fr);                                                           \
-       ret = efi_call_##prefix((efi_set_wakeup_time_t *) __va(runtime->set_wakeup_time),       \
-                               enabled, atm);                                                  \
-       ia64_load_scratch_fpregs(fr);                                                           \
-       return ret;                                                                             \
+#define STUB_SET_WAKEUP_TIME(prefix, adjust_arg)                              \
+static efi_status_t                                                           \
+prefix##_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm)                 \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_time_t *atm = NULL;                                                \
+       efi_status_t ret;                                                      \
+                                                                              \
+       if (tm)                                                                \
+               atm = adjust_arg(tm);                                          \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix(                                               \
+               (efi_set_wakeup_time_t *) __va(runtime->set_wakeup_time),      \
+               enabled, atm);                                                 \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_GET_VARIABLE(prefix, adjust_arg)                                          \
-static efi_status_t                                                                    \
-prefix##_get_variable (efi_char16_t *name, efi_guid_t *vendor, u32 *attr,              \
-                      unsigned long *data_size, void *data)                            \
-{                                                                                      \
-       struct ia64_fpreg fr[6];                                                        \
-       u32 *aattr = NULL;                                                                      \
-       efi_status_t ret;                                                               \
-                                                                                       \
-       if (attr)                                                                       \
-               aattr = adjust_arg(attr);                                               \
-       ia64_save_scratch_fpregs(fr);                                                   \
-       ret = efi_call_##prefix((efi_get_variable_t *) __va(runtime->get_variable),     \
-                               adjust_arg(name), adjust_arg(vendor), aattr,            \
-                               adjust_arg(data_size), adjust_arg(data));               \
-       ia64_load_scratch_fpregs(fr);                                                   \
-       return ret;                                                                     \
+#define STUB_GET_VARIABLE(prefix, adjust_arg)                                 \
+static efi_status_t                                                           \
+prefix##_get_variable (efi_char16_t *name, efi_guid_t *vendor, u32 *attr,      \
+                      unsigned long *data_size, void *data)                   \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       u32 *aattr = NULL;                                                     \
+       efi_status_t ret;                                                      \
+                                                                              \
+       if (attr)                                                              \
+               aattr = adjust_arg(attr);                                      \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix(                                               \
+               (efi_get_variable_t *) __va(runtime->get_variable),            \
+               adjust_arg(name), adjust_arg(vendor), aattr,                   \
+               adjust_arg(data_size), adjust_arg(data));                      \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_GET_NEXT_VARIABLE(prefix, adjust_arg)                                             \
-static efi_status_t                                                                            \
-prefix##_get_next_variable (unsigned long *name_size, efi_char16_t *name, efi_guid_t *vendor)  \
-{                                                                                              \
-       struct ia64_fpreg fr[6];                                                                \
-       efi_status_t ret;                                                                       \
-                                                                                               \
-       ia64_save_scratch_fpregs(fr);                                                           \
-       ret = efi_call_##prefix((efi_get_next_variable_t *) __va(runtime->get_next_variable),   \
-                               adjust_arg(name_size), adjust_arg(name), adjust_arg(vendor));   \
-       ia64_load_scratch_fpregs(fr);                                                           \
-       return ret;                                                                             \
+#define STUB_GET_NEXT_VARIABLE(prefix, adjust_arg)                            \
+static efi_status_t                                                           \
+prefix##_get_next_variable (unsigned long *name_size, efi_char16_t *name,      \
+                           efi_guid_t *vendor)                                \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_status_t ret;                                                      \
+                                                                              \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix(                                               \
+               (efi_get_next_variable_t *) __va(runtime->get_next_variable),  \
+               adjust_arg(name_size), adjust_arg(name), adjust_arg(vendor));  \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_SET_VARIABLE(prefix, adjust_arg)                                          \
-static efi_status_t                                                                    \
-prefix##_set_variable (efi_char16_t *name, efi_guid_t *vendor, unsigned long attr,     \
-                      unsigned long data_size, void *data)                             \
-{                                                                                      \
-       struct ia64_fpreg fr[6];                                                        \
-       efi_status_t ret;                                                               \
-                                                                                       \
-       ia64_save_scratch_fpregs(fr);                                                   \
-       ret = efi_call_##prefix((efi_set_variable_t *) __va(runtime->set_variable),     \
-                               adjust_arg(name), adjust_arg(vendor), attr, data_size,  \
-                               adjust_arg(data));                                      \
-       ia64_load_scratch_fpregs(fr);                                                   \
-       return ret;                                                                     \
+#define STUB_SET_VARIABLE(prefix, adjust_arg)                                 \
+static efi_status_t                                                           \
+prefix##_set_variable (efi_char16_t *name, efi_guid_t *vendor,                \
+                      unsigned long attr, unsigned long data_size,            \
+                      void *data)                                             \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_status_t ret;                                                      \
+                                                                              \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix(                                               \
+               (efi_set_variable_t *) __va(runtime->set_variable),            \
+               adjust_arg(name), adjust_arg(vendor), attr, data_size,         \
+               adjust_arg(data));                                             \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_GET_NEXT_HIGH_MONO_COUNT(prefix, adjust_arg)                                      \
-static efi_status_t                                                                            \
-prefix##_get_next_high_mono_count (u32 *count)                                                 \
-{                                                                                              \
-       struct ia64_fpreg fr[6];                                                                \
-       efi_status_t ret;                                                                       \
-                                                                                               \
-       ia64_save_scratch_fpregs(fr);                                                           \
-       ret = efi_call_##prefix((efi_get_next_high_mono_count_t *)                              \
-                               __va(runtime->get_next_high_mono_count), adjust_arg(count));    \
-       ia64_load_scratch_fpregs(fr);                                                           \
-       return ret;                                                                             \
+#define STUB_GET_NEXT_HIGH_MONO_COUNT(prefix, adjust_arg)                     \
+static efi_status_t                                                           \
+prefix##_get_next_high_mono_count (u32 *count)                                \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_status_t ret;                                                      \
+                                                                              \
+       ia64_save_scratch_fpregs(fr);                                          \
+       ret = efi_call_##prefix((efi_get_next_high_mono_count_t *)             \
+                               __va(runtime->get_next_high_mono_count),       \
+                               adjust_arg(count));                            \
+       ia64_load_scratch_fpregs(fr);                                          \
+       return ret;                                                            \
 }
 
-#define STUB_RESET_SYSTEM(prefix, adjust_arg)                                  \
-static void                                                                    \
-prefix##_reset_system (int reset_type, efi_status_t status,                    \
-                      unsigned long data_size, efi_char16_t *data)             \
-{                                                                              \
-       struct ia64_fpreg fr[6];                                                \
-       efi_char16_t *adata = NULL;                                             \
-                                                                               \
-       if (data)                                                               \
-               adata = adjust_arg(data);                                       \
-                                                                               \
-       ia64_save_scratch_fpregs(fr);                                           \
-       efi_call_##prefix((efi_reset_system_t *) __va(runtime->reset_system),   \
-                         reset_type, status, data_size, adata);                \
-       /* should not return, but just in case... */                            \
-       ia64_load_scratch_fpregs(fr);                                           \
+#define STUB_RESET_SYSTEM(prefix, adjust_arg)                                 \
+static void                                                                   \
+prefix##_reset_system (int reset_type, efi_status_t status,                   \
+                      unsigned long data_size, efi_char16_t *data)            \
+{                                                                             \
+       struct ia64_fpreg fr[6];                                               \
+       efi_char16_t *adata = NULL;                                            \
+                                                                              \
+       if (data)                                                              \
+               adata = adjust_arg(data);                                      \
+                                                                              \
+       ia64_save_scratch_fpregs(fr);                                          \
+       efi_call_##prefix(                                                     \
+               (efi_reset_system_t *) __va(runtime->reset_system),            \
+               reset_type, status, data_size, adata);                         \
+       /* should not return, but just in case... */                           \
+       ia64_load_scratch_fpregs(fr);                                          \
 }
 
 #define phys_ptr(arg)  ((__typeof__(arg)) ia64_tpa(arg))
@@ -223,7 +236,8 @@ efi_gettimeofday (struct timespec *ts)
                return;
        }
 
-       ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second);
+       ts->tv_sec = mktime(tm.year, tm.month, tm.day,
+                           tm.hour, tm.minute, tm.second);
        ts->tv_nsec = tm.nanosecond;
 }
 
@@ -297,8 +311,8 @@ walk (efi_freemem_callback_t callback, void *arg, u64 attr)
 }
 
 /*
- * Walks the EFI memory map and calls CALLBACK once for each EFI memory descriptor that
- * has memory that is available for OS use.
+ * Walk the EFI memory map and call CALLBACK once for each EFI memory
+ * descriptor that has memory that is available for OS use.
  */
 void
 efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
@@ -307,8 +321,8 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
 }
 
 /*
- * Walks the EFI memory map and calls CALLBACK once for each EFI memory descriptor that
- * has memory that is available for uncached allocator.
+ * Walk the EFI memory map and call CALLBACK once for each EFI memory
+ * descriptor that has memory that is available for uncached allocator.
  */
 void
 efi_memmap_walk_uc (efi_freemem_callback_t callback, void *arg)
@@ -317,11 +331,10 @@ efi_memmap_walk_uc (efi_freemem_callback_t callback, void *arg)
 }
 
 /*
- * Look for the PAL_CODE region reported by EFI and maps it using an
+ * Look for the PAL_CODE region reported by EFI and map it using an
  * ITR to enable safe PAL calls in virtual mode.  See IA-64 Processor
  * Abstraction Layer chapter 11 in ADAG
  */
-
 void *
 efi_get_pal_addr (void)
 {
@@ -341,45 +354,47 @@ efi_get_pal_addr (void)
                        continue;
 
                if (++pal_code_count > 1) {
-                       printk(KERN_ERR "Too many EFI Pal Code memory ranges, dropped @ %lx\n",
-                              md->phys_addr);
+                       printk(KERN_ERR "Too many EFI Pal Code memory ranges, "
+                              "dropped @ %lx\n", md->phys_addr);
                        continue;
                }
                /*
-                * The only ITLB entry in region 7 that is used is the one installed by
-                * __start().  That entry covers a 64MB range.
+                * The only ITLB entry in region 7 that is used is the one
+                * installed by __start().  That entry covers a 64MB range.
                 */
                mask  = ~((1 << KERNEL_TR_PAGE_SHIFT) - 1);
                vaddr = PAGE_OFFSET + md->phys_addr;
 
                /*
-                * We must check that the PAL mapping won't overlap with the kernel
-                * mapping.
+                * We must check that the PAL mapping won't overlap with the
+                * kernel mapping.
                 *
-                * PAL code is guaranteed to be aligned on a power of 2 between 4k and
-                * 256KB and that only one ITR is needed to map it. This implies that the
-                * PAL code is always aligned on its size, i.e., the closest matching page
-                * size supported by the TLB. Therefore PAL code is guaranteed never to
-                * cross a 64MB unless it is bigger than 64MB (very unlikely!).  So for
-                * now the following test is enough to determine whether or not we need a
-                * dedicated ITR for the PAL code.
+                * PAL code is guaranteed to be aligned on a power of 2 between
+                * 4k and 256KB and that only one ITR is needed to map it. This
+                * implies that the PAL code is always aligned on its size,
+                * i.e., the closest matching page size supported by the TLB.
+                * Therefore PAL code is guaranteed never to cross a 64MB unless
+                * it is bigger than 64MB (very unlikely!).  So for now the
+                * following test is enough to determine whether or not we need
+                * a dedicated ITR for the PAL code.
                 */
                if ((vaddr & mask) == (KERNEL_START & mask)) {
-                       printk(KERN_INFO "%s: no need to install ITR for PAL code\n",
-                              __FUNCTION__);
+                       printk(KERN_INFO "%s: no need to install ITR for "
+                              "PAL code\n", __FUNCTION__);
                        continue;
                }
 
                if (efi_md_size(md) > IA64_GRANULE_SIZE)
-                       panic("Woah!  PAL code size bigger than a granule!");
+                       panic("Whoa!  PAL code size bigger than a granule!");
 
 #if EFI_DEBUG
                mask  = ~((1 << IA64_GRANULE_SHIFT) - 1);
 
-               printk(KERN_INFO "CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n",
-                       smp_processor_id(), md->phys_addr,
-                       md->phys_addr + efi_md_size(md),
-                       vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE);
+               printk(KERN_INFO "CPU %d: mapping PAL code "
+                       "[0x%lx-0x%lx) into [0x%lx-0x%lx)\n",
+                       smp_processor_id(), md->phys_addr,
+                       md->phys_addr + efi_md_size(md),
+                       vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE);
 #endif
                return __va(md->phys_addr);
        }
@@ -401,11 +416,11 @@ efi_map_pal_code (void)
         * Cannot write to CRx with PSR.ic=1
         */
        psr = ia64_clear_ic();
-       ia64_itr(0x1, IA64_TR_PALCODE, GRANULEROUNDDOWN((unsigned long) pal_vaddr),
+       ia64_itr(0x1, IA64_TR_PALCODE,
+                GRANULEROUNDDOWN((unsigned long) pal_vaddr),
                 pte_val(pfn_pte(__pa(pal_vaddr) >> PAGE_SHIFT, PAGE_KERNEL)),
                 IA64_GRANULE_SHIFT);
        ia64_set_psr(psr);              /* restore psr */
-       ia64_srlz_i();
 }
 
 void __init
@@ -418,7 +433,10 @@ efi_init (void)
        char *cp, vendor[100] = "unknown";
        int i;
 
-       /* it's too early to be able to use the standard kernel command line support... */
+       /*
+        * It's too early to be able to use the standard kernel command line
+        * support...
+        */
        for (cp = boot_command_line; *cp; ) {
                if (memcmp(cp, "mem=", 4) == 0) {
                        mem_limit = memparse(cp + 4, &cp);
@@ -434,9 +452,11 @@ efi_init (void)
                }
        }
        if (min_addr != 0UL)
-               printk(KERN_INFO "Ignoring memory below %luMB\n", min_addr >> 20);
+               printk(KERN_INFO "Ignoring memory below %luMB\n",
+                      min_addr >> 20);
        if (max_addr != ~0UL)
-               printk(KERN_INFO "Ignoring memory above %luMB\n", max_addr >> 20);
+               printk(KERN_INFO "Ignoring memory above %luMB\n",
+                      max_addr >> 20);
 
        efi.systab = __va(ia64_boot_param->efi_systab);
 
@@ -444,9 +464,9 @@ efi_init (void)
         * Verify the EFI Table
         */
        if (efi.systab == NULL)
-               panic("Woah! Can't find EFI system table.\n");
+               panic("Whoa! Can't find EFI system table.\n");
        if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
-               panic("Woah! EFI system table signature incorrect\n");
+               panic("Whoa! EFI system table signature incorrect\n");
        if ((efi.systab->hdr.revision >> 16) == 0)
                printk(KERN_WARNING "Warning: EFI system table version "
                       "%d.%02d, expected 1.00 or greater\n",
@@ -464,7 +484,8 @@ efi_init (void)
        }
 
        printk(KERN_INFO "EFI v%u.%.02u by %s:",
-              efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff, vendor);
+              efi.systab->hdr.revision >> 16,
+              efi.systab->hdr.revision & 0xffff, vendor);
 
        efi.mps        = EFI_INVALID_TABLE_ADDR;
        efi.acpi       = EFI_INVALID_TABLE_ADDR;
@@ -519,9 +540,12 @@ efi_init (void)
                efi_memory_desc_t *md;
                void *p;
 
-               for (i = 0, p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size) {
+               for (i = 0, p = efi_map_start; p < efi_map_end;
+                    ++i, p += efi_desc_size)
+               {
                        md = p;
-                       printk("mem%02u: type=%u, attr=0x%lx, range=[0x%016lx-0x%016lx) (%luMB)\n",
+                       printk("mem%02u: type=%u, attr=0x%lx, "
+                              "range=[0x%016lx-0x%016lx) (%luMB)\n",
                               i, md->type, md->attribute, md->phys_addr,
                               md->phys_addr + efi_md_size(md),
                               md->num_pages >> (20 - EFI_PAGE_SHIFT));
@@ -549,8 +573,8 @@ efi_enter_virtual_mode (void)
                md = p;
                if (md->attribute & EFI_MEMORY_RUNTIME) {
                        /*
-                        * Some descriptors have multiple bits set, so the order of
-                        * the tests is relevant.
+                        * Some descriptors have multiple bits set, so the
+                        * order of the tests is relevant.
                         */
                        if (md->attribute & EFI_MEMORY_WB) {
                                md->virt_addr = (u64) __va(md->phys_addr);
@@ -558,21 +582,26 @@ efi_enter_virtual_mode (void)
                                md->virt_addr = (u64) ioremap(md->phys_addr, 0);
                        } else if (md->attribute & EFI_MEMORY_WC) {
 #if 0
-                               md->virt_addr = ia64_remap(md->phys_addr, (_PAGE_A | _PAGE_P
-                                                                          | _PAGE_D
-                                                                          | _PAGE_MA_WC
-                                                                          | _PAGE_PL_0
-                                                                          | _PAGE_AR_RW));
+                               md->virt_addr = ia64_remap(md->phys_addr,
+                                                          (_PAGE_A |
+                                                           _PAGE_P |
+                                                           _PAGE_D |
+                                                           _PAGE_MA_WC |
+                                                           _PAGE_PL_0 |
+                                                           _PAGE_AR_RW));
 #else
                                printk(KERN_INFO "EFI_MEMORY_WC mapping\n");
                                md->virt_addr = (u64) ioremap(md->phys_addr, 0);
 #endif
                        } else if (md->attribute & EFI_MEMORY_WT) {
 #if 0
-                               md->virt_addr = ia64_remap(md->phys_addr, (_PAGE_A | _PAGE_P
-                                                                          | _PAGE_D | _PAGE_MA_WT
-                                                                          | _PAGE_PL_0
-                                                                          | _PAGE_AR_RW));
+                               md->virt_addr = ia64_remap(md->phys_addr,
+                                                          (_PAGE_A |
+                                                           _PAGE_P |
+                                                           _PAGE_D |
+                                                           _PAGE_MA_WT |
+                                                           _PAGE_PL_0 |
+                                                           _PAGE_AR_RW));
 #else
                                printk(KERN_INFO "EFI_MEMORY_WT mapping\n");
                                md->virt_addr = (u64) ioremap(md->phys_addr, 0);
@@ -583,16 +612,18 @@ efi_enter_virtual_mode (void)
 
        status = efi_call_phys(__va(runtime->set_virtual_address_map),
                               ia64_boot_param->efi_memmap_size,
-                              efi_desc_size, ia64_boot_param->efi_memdesc_version,
+                              efi_desc_size,
+                              ia64_boot_param->efi_memdesc_version,
                               ia64_boot_param->efi_memmap);
        if (status != EFI_SUCCESS) {
-               printk(KERN_WARNING "warning: unable to switch EFI into virtual mode "
-                      "(status=%lu)\n", status);
+               printk(KERN_WARNING "warning: unable to switch EFI into "
+                      "virtual mode (status=%lu)\n", status);
                return;
        }
 
        /*
-        * Now that EFI is in virtual mode, we call the EFI functions more efficiently:
+        * Now that EFI is in virtual mode, we call the EFI functions more
+        * efficiently:
         */
        efi.get_time = virt_get_time;
        efi.set_time = virt_set_time;
@@ -606,8 +637,8 @@ efi_enter_virtual_mode (void)
 }
 
 /*
- * Walk the EFI memory map looking for the I/O port range.  There can only be one entry of
- * this type, other I/O port ranges should be described via ACPI.
+ * Walk the EFI memory map looking for the I/O port range.  There can only be
+ * one entry of this type, other I/O port ranges should be described via ACPI.
  */
 u64
 efi_get_iobase (void)
@@ -678,7 +709,6 @@ efi_memmap_intersects (unsigned long phys_addr, unsigned long size)
 
        for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
                md = p;
-
                if (md->phys_addr < end && efi_md_end(md) > phys_addr)
                        return 1;
        }
@@ -731,7 +761,7 @@ efi_mem_attribute (unsigned long phys_addr, unsigned long size)
                if (!md || (md->attribute & ~EFI_MEMORY_RUNTIME) != attr)
                        return 0;
        } while (md);
-       return 0;
+       return 0;       /* never reached */
 }
 
 u64
@@ -767,7 +797,7 @@ kern_mem_attribute (unsigned long phys_addr, unsigned long size)
                if (!md || md->attribute != attr)
                        return 0;
        } while (md);
-       return 0;
+       return 0;       /* never reached */
 }
 EXPORT_SYMBOL(kern_mem_attribute);
 
@@ -883,7 +913,7 @@ efi_uart_console_only(void)
                                return 1;
                        uart = 0;
                }
-               hdr = (struct efi_generic_dev_path *) ((u8 *) hdr + hdr->length);
+               hdr = (struct efi_generic_dev_path *)((u8 *) hdr + hdr->length);
        }
        printk(KERN_ERR "Malformed %s value\n", name);
        return 0;
@@ -921,10 +951,12 @@ find_memmap_space (void)
                if (!efi_wb(md)) {
                        continue;
                }
-               if (pmd == NULL || !efi_wb(pmd) || efi_md_end(pmd) != md->phys_addr) {
+               if (pmd == NULL || !efi_wb(pmd) ||
+                   efi_md_end(pmd) != md->phys_addr) {
                        contig_low = GRANULEROUNDUP(md->phys_addr);
                        contig_high = efi_md_end(md);
-                       for (q = p + efi_desc_size; q < efi_map_end; q += efi_desc_size) {
+                       for (q = p + efi_desc_size; q < efi_map_end;
+                            q += efi_desc_size) {
                                check_md = q;
                                if (!efi_wb(check_md))
                                        break;
@@ -988,8 +1020,9 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
        for (p = efi_map_start; p < efi_map_end; pmd = md, p += efi_desc_size) {
                md = p;
                if (!efi_wb(md)) {
-                       if (efi_uc(md) && (md->type == EFI_CONVENTIONAL_MEMORY ||
-                                          md->type == EFI_BOOT_SERVICES_DATA)) {
+                       if (efi_uc(md) &&
+                           (md->type == EFI_CONVENTIONAL_MEMORY ||
+                            md->type == EFI_BOOT_SERVICES_DATA)) {
                                k->attribute = EFI_MEMORY_UC;
                                k->start = md->phys_addr;
                                k->num_pages = md->num_pages;
@@ -997,10 +1030,12 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
                        }
                        continue;
                }
-               if (pmd == NULL || !efi_wb(pmd) || efi_md_end(pmd) != md->phys_addr) {
+               if (pmd == NULL || !efi_wb(pmd) ||
+                   efi_md_end(pmd) != md->phys_addr) {
                        contig_low = GRANULEROUNDUP(md->phys_addr);
                        contig_high = efi_md_end(md);
-                       for (q = p + efi_desc_size; q < efi_map_end; q += efi_desc_size) {
+                       for (q = p + efi_desc_size; q < efi_map_end;
+                            q += efi_desc_size) {
                                check_md = q;
                                if (!efi_wb(check_md))
                                        break;
@@ -1025,13 +1060,17 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
                if (md->phys_addr < contig_low) {
                        lim = min(efi_md_end(md), contig_low);
                        if (efi_uc(md)) {
-                               if (k > kern_memmap && (k-1)->attribute == EFI_MEMORY_UC &&
+                               if (k > kern_memmap &&
+                                   (k-1)->attribute == EFI_MEMORY_UC &&
                                    kmd_end(k-1) == md->phys_addr) {
-                                       (k-1)->num_pages += (lim - md->phys_addr) >> EFI_PAGE_SHIFT;
+                                       (k-1)->num_pages +=
+                                               (lim - md->phys_addr)
+                                               >> EFI_PAGE_SHIFT;
                                } else {
                                        k->attribute = EFI_MEMORY_UC;
                                        k->start = md->phys_addr;
-                                       k->num_pages = (lim - md->phys_addr) >> EFI_PAGE_SHIFT;
+                                       k->num_pages = (lim - md->phys_addr)
+                                               >> EFI_PAGE_SHIFT;