From 87fc8d1bb10cd459024a742c6a10961fefcef18f Mon Sep 17 00:00:00 2001 From: Planet-Lab Support Date: Mon, 8 Aug 2005 20:49:13 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'vserver'. --- Documentation/DocBook/librs.tmpl | 287 + Documentation/DocBook/mtdnand.tmpl | 1318 +++++ Documentation/PCIEBUS-HOWTO.txt | 217 + Documentation/README.cycladesZ | 8 + Documentation/SecurityBugs | 38 + Documentation/aoe/aoe.txt | 84 + Documentation/aoe/autoload.sh | 17 + Documentation/aoe/mkdevs.sh | 36 + Documentation/aoe/mkshelf.sh | 25 + Documentation/aoe/status.sh | 28 + Documentation/arm/Samsung-S3C24XX/Suspend.txt | 106 + Documentation/atomic_ops.txt | 456 ++ Documentation/cdrom/packet-writing.txt | 86 + Documentation/cpu-freq/cpufreq-nforce2.txt | 19 + Documentation/dvb/README.dibusb | 247 + Documentation/dvb/get_dvb_firmware | 339 ++ Documentation/dvb/udev.txt | 46 + Documentation/feature-removal-schedule.txt | 17 + Documentation/filesystems/sysfs-pci.txt | 88 + Documentation/fujitsu/frv/README.txt | 51 + Documentation/fujitsu/frv/atomic-ops.txt | 134 + Documentation/fujitsu/frv/booting.txt | 181 + Documentation/fujitsu/frv/clock.txt | 65 + Documentation/fujitsu/frv/configuring.txt | 125 + Documentation/fujitsu/frv/features.txt | 310 + Documentation/fujitsu/frv/gdbinit | 102 + Documentation/fujitsu/frv/gdbstub.txt | 130 + Documentation/fujitsu/frv/mmu-layout.txt | 306 + Documentation/i2c/chips/smsc47b397.txt | 146 + Documentation/i2c/i2c-stub | 33 + Documentation/ia64/serial.txt | 144 + Documentation/ibm-acpi.txt | 474 ++ Documentation/infiniband/ipoib.txt | 56 + Documentation/infiniband/sysfs.txt | 66 + Documentation/infiniband/user_mad.txt | 99 + Documentation/ioctl/cdrom.txt | 966 ++++ Documentation/ioctl/hdio.txt | 965 ++++ Documentation/keys.txt | 836 +++ Documentation/networking/README.ipw2100 | 179 + Documentation/networking/README.ipw2200 | 194 + Documentation/networking/proc_net_tcp.txt | 47 + Documentation/nommu-mmap.txt | 141 + Documentation/power/kernel_threads.txt | 41 + Documentation/power/video_extension.txt | 34 + Documentation/powerpc/cpu_features.txt | 56 + .../powerpc/eeh-pci-error-recovery.txt | 332 ++ Documentation/prio_tree.txt | 107 + Documentation/s390/monreader.txt | 197 + Documentation/scsi/ChangeLog.1992-1997 | 2023 +++++++ Documentation/seclvl.txt | 97 + Documentation/sound/alsa/Bt87x.txt | 78 + Documentation/sparse.txt | 72 + Documentation/stable_api_nonsense.txt | 193 + Documentation/usb/gadget_serial.txt | 332 ++ Documentation/w1/w1.generic | 19 + arch/arm/boot/compressed/head-sharpsl.S | 92 + arch/arm/common/icst307.c | 161 + arch/arm/common/rtctime.c | 502 ++ arch/arm/common/scoop.c | 134 + arch/arm/configs/iq80332_defconfig | 864 +++ arch/arm/configs/omap_h2_1610_defconfig | 935 +++ arch/arm/configs/simpad_defconfig | 896 +++ arch/arm/kernel/smp.c | 396 ++ arch/arm/lib/io-readsl.S | 78 + arch/arm/mach-clps711x/Makefile.boot | 7 + arch/arm/mach-clps711x/common.h | 11 + arch/arm/mach-clps7500/Makefile.boot | 2 + arch/arm/mach-ebsa110/Makefile.boot | 4 + arch/arm/mach-epxa10db/Makefile.boot | 2 + arch/arm/mach-footbridge/Makefile.boot | 4 + arch/arm/mach-footbridge/co285.c | 38 + arch/arm/mach-footbridge/common.c | 205 + arch/arm/mach-footbridge/common.h | 9 + arch/arm/mach-footbridge/dc21285-timer.c | 68 + arch/arm/mach-footbridge/ebsa285.c | 24 + arch/arm/mach-footbridge/isa-timer.c | 94 + arch/arm/mach-footbridge/isa.c | 48 + arch/arm/mach-footbridge/personal.c | 23 + arch/arm/mach-h720x/Makefile.boot | 2 + arch/arm/mach-h720x/common.h | 29 + arch/arm/mach-imx/Makefile.boot | 2 + arch/arm/mach-integrator/Makefile.boot | 4 + arch/arm/mach-integrator/common.h | 2 + arch/arm/mach-iop3xx/Makefile.boot | 9 + arch/arm/mach-iop3xx/iq80332-mm.c | 36 + arch/arm/mach-iop3xx/iq80332-pci.c | 125 + arch/arm/mach-ixp2000/Makefile.boot | 3 + arch/arm/mach-ixp4xx/Makefile.boot | 3 + arch/arm/mach-ixp4xx/gtwx5715-pci.c | 101 + arch/arm/mach-ixp4xx/gtwx5715-setup.c | 153 + arch/arm/mach-ixp4xx/ixdpg425-pci.c | 65 + arch/arm/mach-l7200/Makefile.boot | 2 + arch/arm/mach-lh7a40x/Makefile.boot | 4 + arch/arm/mach-lh7a40x/common.h | 14 + arch/arm/mach-omap/Makefile.boot | 4 + arch/arm/mach-omap/clock.c | 955 ++++ arch/arm/mach-omap/clock.h | 106 + arch/arm/mach-omap/pm.c | 621 ++ arch/arm/mach-omap/sleep.S | 314 + arch/arm/mach-pxa/Makefile.boot | 2 + arch/arm/mach-pxa/corgi.c | 337 ++ arch/arm/mach-pxa/corgi_ssp.c | 248 + arch/arm/mach-pxa/ssp.c | 319 ++ arch/arm/mach-rpc/Makefile.boot | 4 + arch/arm/mach-s3c2410/Makefile.boot | 3 + arch/arm/mach-s3c2410/mach-rx3715.c | 124 + arch/arm/mach-s3c2410/pm.c | 667 +++ arch/arm/mach-s3c2410/pm.h | 59 + arch/arm/mach-s3c2410/sleep.S | 180 + arch/arm/mach-sa1100/Makefile.boot | 7 + arch/arm/mach-shark/Makefile.boot | 2 + arch/arm/mach-versatile/Kconfig | 16 + arch/arm/mach-versatile/Makefile.boot | 4 + arch/arm/mach-versatile/core.h | 50 + arch/arm/mach-versatile/versatile_ab.c | 45 + arch/arm/mach-versatile/versatile_pb.c | 109 + arch/arm26/kernel/calls.S | 265 + arch/arm26/kernel/head.S | 113 + arch/arm26/lib/io-readsl.S | 78 + arch/arm26/lib/io-readsw.S | 107 + arch/arm26/lib/io-writesw.S | 127 + arch/arm26/machine/latches.c | 72 + arch/arm26/mm/memc.c | 202 + arch/arm26/mm/small_page.c | 194 + arch/cris/arch-v10/kernel/crisksyms.c | 17 + arch/frv/Kconfig | 501 ++ arch/frv/Makefile | 118 + arch/frv/boot/Makefile | 73 + arch/frv/kernel/Makefile | 22 + arch/frv/kernel/break.S | 720 +++ arch/frv/kernel/cmode.S | 190 + arch/frv/kernel/debug-stub.c | 259 + arch/frv/kernel/dma.c | 464 ++ arch/frv/kernel/entry-table.S | 295 + arch/frv/kernel/entry.S | 1428 +++++ arch/frv/kernel/frv_ksyms.c | 124 + arch/frv/kernel/gdb-io.c | 216 + arch/frv/kernel/gdb-io.h | 55 + arch/frv/kernel/gdb-stub.c | 2084 +++++++ arch/frv/kernel/head-mmu-fr451.S | 374 ++ arch/frv/kernel/head-uc-fr401.S | 311 + arch/frv/kernel/head-uc-fr451.S | 174 + arch/frv/kernel/head-uc-fr555.S | 347 ++ arch/frv/kernel/head.S | 639 +++ arch/frv/kernel/head.inc | 50 + arch/frv/kernel/init_task.c | 39 + arch/frv/kernel/irq-mb93091.c | 116 + arch/frv/kernel/irq-mb93093.c | 99 + arch/frv/kernel/irq-mb93493.c | 108 + arch/frv/kernel/irq-routing.c | 291 + arch/frv/kernel/irq.c | 764 +++ arch/frv/kernel/kernel_thread.S | 77 + arch/frv/kernel/local.h | 56 + arch/frv/kernel/pm-mb93093.c | 66 + arch/frv/kernel/pm.c | 432 ++ arch/frv/kernel/process.c | 388 ++ arch/frv/kernel/ptrace.c | 764 +++ arch/frv/kernel/semaphore.c | 156 + arch/frv/kernel/setup.c | 1197 ++++ arch/frv/kernel/signal.c | 589 ++ arch/frv/kernel/sleep.S | 374 ++ arch/frv/kernel/switch_to.S | 496 ++ arch/frv/kernel/sys_frv.c | 214 + arch/frv/kernel/sysctl.c | 206 + arch/frv/kernel/time.c | 234 + arch/frv/kernel/traps.c | 431 ++ arch/frv/kernel/uaccess.c | 95 + arch/frv/kernel/vmlinux.lds.S | 187 + arch/frv/lib/Makefile | 8 + arch/frv/lib/__ashldi3.S | 40 + arch/frv/lib/__ashrdi3.S | 41 + arch/frv/lib/__lshrdi3.S | 40 + arch/frv/lib/__muldi3.S | 32 + arch/frv/lib/__negdi2.S | 28 + arch/frv/lib/atomic-ops.S | 265 + arch/frv/lib/cache.S | 98 + arch/frv/lib/checksum.c | 148 + arch/frv/lib/insl_ns.S | 52 + arch/frv/lib/insl_sw.S | 40 + arch/frv/lib/memcpy.S | 135 + arch/frv/lib/memset.S | 182 + arch/frv/lib/outsl_ns.S | 59 + arch/frv/lib/outsl_sw.S | 45 + arch/frv/mb93090-mb00/Makefile | 13 + arch/frv/mb93090-mb00/pci-dma-nommu.c | 152 + arch/frv/mb93090-mb00/pci-dma.c | 105 + arch/frv/mb93090-mb00/pci-frv.c | 288 + arch/frv/mb93090-mb00/pci-frv.h | 47 + arch/frv/mb93090-mb00/pci-irq.c | 70 + arch/frv/mb93090-mb00/pci-vdk.c | 467 ++ arch/frv/mm/Makefile | 9 + arch/frv/mm/cache-page.c | 66 + arch/frv/mm/dma-alloc.c | 188 + arch/frv/mm/elf-fdpic.c | 123 + arch/frv/mm/extable.c | 91 + arch/frv/mm/fault.c | 325 ++ arch/frv/mm/highmem.c | 33 + arch/frv/mm/init.c | 241 + arch/frv/mm/kmap.c | 62 + arch/frv/mm/mmu-context.c | 208 + arch/frv/mm/pgalloc.c | 159 + arch/frv/mm/tlb-flush.S | 185 + arch/frv/mm/tlb-miss.S | 631 ++ arch/frv/mm/unaligned.c | 218 + arch/i386/kernel/acpi/earlyquirk.c | 51 + arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 509 ++ .../i386/kernel/cpu/cpufreq/cpufreq-nforce2.c | 466 ++ .../kernel/cpu/cpufreq/speedstep-est-common.h | 25 + arch/i386/kernel/cpu/intel_cacheinfo.c | 140 + arch/i386/kernel/crash_dump.c | 105 + arch/i386/kernel/quirks.c | 50 + arch/i386/oprofile/backtrace.c | 124 + arch/ia64/hp/common/hwsw_iommu.c | 185 + arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c | 3 + arch/ia64/kernel/domain.c | 382 ++ arch/ia64/kernel/topology.c | 92 + arch/ia64/oprofile/backtrace.c | 150 + arch/ia64/sn/include/ioerror.h | 81 + arch/ia64/sn/include/pci/pcibr_provider.h | 149 + .../sn/include/pci/pcibus_provider_defs.h | 43 + arch/ia64/sn/include/pci/pcidev.h | 54 + arch/ia64/sn/include/pci/pic.h | 261 + arch/ia64/sn/include/pci/tiocp.h | 256 + arch/ia64/sn/include/tio.h | 37 + arch/ia64/sn/include/xtalk/hubdev.h | 67 + arch/ia64/sn/include/xtalk/xbow.h | 291 + arch/ia64/sn/include/xtalk/xwidgetdev.h | 70 + arch/ia64/sn/kernel/bte_error.c | 188 + arch/ia64/sn/kernel/huberror.c | 201 + arch/ia64/sn/kernel/io_init.c | 410 ++ arch/ia64/sn/kernel/iomv.c | 75 + arch/ia64/sn/kernel/klconflib.c | 108 + arch/ia64/sn/pci/Makefile | 10 + arch/ia64/sn/pci/pci_dma.c | 477 ++ arch/ia64/sn/pci/pcibr/Makefile | 11 + arch/ia64/sn/pci/pcibr/pcibr_ate.c | 188 + arch/ia64/sn/pci/pcibr/pcibr_dma.c | 379 ++ arch/ia64/sn/pci/pcibr/pcibr_provider.c | 170 + arch/ia64/sn/pci/pcibr/pcibr_reg.c | 282 + arch/m32r/Kconfig.debug | 34 + arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB | 249 + arch/m32r/mappi2/defconfig.vdec2 | 698 +++ arch/m32r/mappi2/dot.gdbinit.vdec2 | 233 + arch/m68k/configs/amiga_defconfig | 964 ++++ arch/m68k/configs/apollo_defconfig | 821 +++ arch/m68k/configs/atari_defconfig | 876 +++ arch/m68k/configs/bvme6000_defconfig | 820 +++ arch/m68k/configs/hp300_defconfig | 820 +++ arch/m68k/configs/mac_defconfig | 899 +++ arch/m68k/configs/mvme147_defconfig | 839 +++ arch/m68k/configs/mvme16x_defconfig | 838 +++ arch/m68k/configs/q40_defconfig | 911 +++ arch/m68k/configs/sun3_defconfig | 826 +++ arch/m68k/configs/sun3x_defconfig | 836 +++ arch/m68knommu/lib/delay.c | 18 + .../m68knommu/platform/5272/CANCam/crt0_ram.S | 154 + .../m68knommu/platform/5272/SCALES/crt0_ram.S | 154 + .../platform/527x/M5271EVB/crt0_ram.S | 166 + .../platform/527x/M5275EVB/crt0_ram.S | 166 + arch/m68knommu/platform/527x/Makefile | 21 + arch/m68knommu/platform/527x/config.c | 82 + .../platform/528x/M5282EVB/crt0_ram.S | 171 + arch/m68knommu/platform/528x/Makefile | 21 + arch/m68knommu/platform/528x/config.c | 82 + .../m68knommu/platform/528x/senTec/crt0_ram.S | 180 + arch/m68knommu/platform/5307/head.S | 253 + arch/m68knommu/platform/5307/pit.c | 88 + arch/mips/au1000/common/platform.c | 54 + arch/mips/configs/db1550_defconfig | 906 +++ arch/mips/configs/ocelot_3_defconfig | 846 +++ arch/mips/kernel/irix5sys.S | 1041 ++++ arch/mips/kernel/irq-msc01.c | 189 + arch/mips/kernel/irq-rm9000.c | 149 + arch/mips/kernel/signal-common.h | 137 + arch/mips/lib/iomap.c | 78 + arch/mips/mm/dma-ip32.c | 382 ++ arch/mips/mm/tlbex-fault.S | 28 + arch/mips/mm/tlbex.c | 1177 ++++ arch/mips/momentum/ocelot_3/Makefile | 8 + arch/mips/momentum/ocelot_3/int-handler.S | 137 + arch/mips/momentum/ocelot_3/irq.c | 81 + arch/mips/momentum/ocelot_3/ocelot_3_fpga.h | 57 + arch/mips/momentum/ocelot_3/prom.c | 248 + arch/mips/momentum/ocelot_3/reset.c | 60 + arch/mips/momentum/ocelot_3/setup.c | 399 ++ arch/mips/oprofile/Kconfig | 23 + arch/mips/oprofile/Makefile | 15 + arch/mips/oprofile/common.c | 106 + arch/mips/oprofile/op_impl.h | 37 + arch/mips/oprofile/op_model_rm9000.c | 137 + arch/mips/pci/fixup-ocelot3.c | 41 + arch/mips/pci/fixup-sb1250.c | 24 + arch/mips/pci/fixup-vr4133.c | 204 + arch/mips/sgi-ip27/ip27-dbgio.c | 60 + arch/mips/sgi-ip32/ip32-memory.c | 49 + arch/mips/vr41xx/nec-cmbvr4133/Makefile | 8 + arch/mips/vr41xx/nec-cmbvr4133/init.c | 78 + arch/mips/vr41xx/nec-cmbvr4133/irq.c | 114 + arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c | 250 + arch/mips/vr41xx/nec-cmbvr4133/setup.c | 108 + arch/parisc/install.sh | 38 + arch/parisc/kernel/topology.c | 37 + arch/parisc/lib/fixup.S | 89 + arch/parisc/lib/iomap.c | 422 ++ arch/parisc/lib/memcpy.c | 530 ++ arch/ppc/boot/include/mpsc_defs.h | 146 + arch/ppc/boot/simple/misc-chestnut.S | 41 + arch/ppc/boot/simple/misc-cpci690.c | 15 + arch/ppc/boot/simple/misc-katana.c | 15 + arch/ppc/configs/chestnut_defconfig | 739 +++ arch/ppc/configs/cpci690_defconfig | 686 +++ arch/ppc/configs/katana_defconfig | 691 +++ arch/ppc/configs/luan_defconfig | 668 +++ arch/ppc/configs/mpc8540_ads_defconfig | 707 +++ arch/ppc/configs/mpc8555_cds_defconfig | 718 +++ arch/ppc/configs/mpc8560_ads_defconfig | 719 +++ arch/ppc/configs/stx_gp3_defconfig | 972 ++++ arch/ppc/kernel/machine_kexec.c | 132 + arch/ppc/kernel/perfmon.c | 93 + arch/ppc/kernel/perfmon_fsl_booke.c | 222 + arch/ppc/kernel/relocate_kernel.S | 127 + arch/ppc/oprofile/common.c | 161 + arch/ppc/oprofile/op_impl.h | 45 + arch/ppc/oprofile/op_model_fsl_booke.c | 184 + arch/ppc/platforms/4xx/ibm440sp.c | 131 + arch/ppc/platforms/4xx/ibm440sp.h | 64 + arch/ppc/platforms/4xx/luan.c | 387 ++ arch/ppc/platforms/4xx/luan.h | 80 + arch/ppc/platforms/4xx/virtex-ii_pro.c | 60 + arch/ppc/platforms/4xx/virtex-ii_pro.h | 99 + arch/ppc/platforms/4xx/xilinx_ml300.c | 164 + arch/ppc/platforms/4xx/xilinx_ml300.h | 47 + .../4xx/xparameters/xparameters_ml300.h | 310 + arch/ppc/platforms/85xx/mpc85xx_devices.c | 552 ++ arch/ppc/platforms/85xx/mpc85xx_sys.c | 118 + arch/ppc/platforms/85xx/stx_gp3.c | 381 ++ arch/ppc/platforms/85xx/stx_gp3.h | 74 + arch/ppc/platforms/chestnut.c | 623 ++ arch/ppc/platforms/chestnut.h | 128 + arch/ppc/platforms/cpci690.c | 512 ++ arch/ppc/platforms/cpci690.h | 73 + arch/ppc/platforms/katana.c | 684 +++ arch/ppc/platforms/katana.h | 233 + arch/ppc/platforms/pmac_cache.S | 325 ++ arch/ppc/syslib/gen550.h | 16 + arch/ppc/syslib/ibm440sp_common.c | 71 + arch/ppc/syslib/ibm440sp_common.h | 25 + arch/ppc/syslib/mv64x60_dbg.c | 123 + arch/ppc/syslib/mv64x60_win.c | 1168 ++++ arch/ppc/syslib/ppc403_pic.c | 127 + arch/ppc/syslib/ppc_sys.c | 103 + arch/ppc/syslib/xilinx_pic.c | 142 + arch/ppc64/configs/maple_defconfig | 921 +++ arch/ppc64/kernel/iSeries_smp.c | 152 + arch/ppc64/kernel/kprobes.c | 266 + arch/ppc64/kernel/maple_pci.c | 527 ++ arch/ppc64/kernel/maple_setup.c | 241 + arch/ppc64/kernel/maple_time.c | 226 + arch/ppc64/kernel/mpic.c | 861 +++ arch/ppc64/kernel/mpic.h | 267 + arch/ppc64/kernel/pSeries_smp.c | 382 ++ arch/ppc64/kernel/pci_direct_iommu.c | 89 + arch/ppc64/lib/sstep.c | 141 + arch/ppc64/xmon/setjmp.S | 73 + arch/sh/boards/renesas/edosk7705/Makefile | 10 + arch/sh/boards/renesas/edosk7705/io.c | 94 + arch/sh/boards/renesas/edosk7705/setup.c | 60 + arch/sh/boards/se/73180/Makefile | 7 + arch/sh/boards/se/73180/io.c | 265 + arch/sh/boards/se/73180/irq.c | 137 + arch/sh/boards/se/73180/led.c | 67 + arch/sh/boards/se/73180/setup.c | 68 + arch/sh/boards/sh03/Makefile | 6 + arch/sh/boards/sh03/led.c | 49 + arch/sh/boards/sh03/rtc.c | 146 + arch/sh/boards/sh03/setup.c | 72 + arch/sh/boards/superh/microdev/Makefile | 8 + arch/sh/boards/superh/microdev/io.c | 370 ++ arch/sh/boards/superh/microdev/irq.c | 200 + arch/sh/boards/superh/microdev/led.c | 102 + arch/sh/boards/superh/microdev/setup.c | 278 + arch/sh/configs/microdev_defconfig | 680 +++ arch/sh/configs/se73180_defconfig | 430 ++ arch/sh/configs/se7705_defconfig | 645 +++ arch/sh/configs/sh03_defconfig | 936 +++ arch/sh/drivers/pci/fixups-sh03.c | 61 + arch/sh/drivers/pci/ops-sh03.c | 45 + arch/sh/kernel/asm-offsets.c | 32 + arch/sh/kernel/cpu/sh2/probe.c | 39 + arch/sh/kernel/cpu/sh3/probe.c | 97 + arch/sh/kernel/cpu/sh4/probe.c | 138 + arch/sh/lib/memcpy-sh4.S | 800 +++ arch/sh/mm/cache-sh7705.c | 222 + arch/sh/mm/pg-sh7705.c | 137 + arch/sh/oprofile/op_model_sh7750.c | 286 + arch/sh/tools/gen-mach-types | 49 + arch/sparc64/prom/cif.S | 225 + arch/um/Kconfig_i386 | 24 + arch/um/Kconfig_x86_64 | 15 + arch/um/Makefile-x86_64 | 1 + arch/um/drivers/stderr_console.c | 45 + arch/um/include/elf_user.h | 19 + arch/um/include/registers.h | 27 + arch/um/include/sysdep-i386/signal.h | 25 + arch/um/include/sysdep-x86_64/checksum.h | 151 + arch/um/include/sysdep-x86_64/ptrace.h | 260 + arch/um/include/sysdep-x86_64/ptrace_user.h | 70 + arch/um/include/sysdep-x86_64/sigcontext.h | 49 + arch/um/include/sysdep-x86_64/signal.h | 27 + arch/um/include/sysdep-x86_64/syscalls.h | 91 + arch/um/kernel/skas/include/mmu-skas.h | 24 + arch/um/kernel/skas/include/mode-skas.h | 39 + arch/um/kernel/skas/include/mode_kern-skas.h | 53 + arch/um/kernel/skas/include/uaccess-skas.h | 40 + arch/um/kernel/skas/util/mk_ptregs-i386.c | 51 + arch/um/kernel/skas/util/mk_ptregs-x86_64.c | 68 + arch/um/kernel/tt/include/mmu-tt.h | 23 + arch/um/kernel/tt/include/mode-tt.h | 38 + arch/um/kernel/tt/include/mode_kern-tt.h | 53 + arch/um/kernel/tt/include/uaccess-tt.h | 71 + arch/um/os-Linux/elf_aux.c | 66 + arch/um/os-Linux/signal.c | 48 + arch/um/os-Linux/sys-i386/Makefile | 11 + arch/um/os-Linux/sys-i386/registers.c | 115 + arch/um/os-Linux/sys-x86_64/Makefile | 11 + arch/um/os-Linux/sys-x86_64/registers.c | 82 + arch/um/sys-i386/delay.c | 14 + arch/um/sys-i386/signal.c | 376 ++ arch/um/sys-x86_64/Makefile | 39 + arch/um/sys-x86_64/bugs.c | 122 + arch/um/sys-x86_64/delay.c | 26 + arch/um/sys-x86_64/fault.c | 23 + arch/um/sys-x86_64/mem.c | 25 + arch/um/sys-x86_64/ptrace.c | 138 + arch/um/sys-x86_64/ptrace_user.c | 64 + arch/um/sys-x86_64/sigcontext.c | 39 + arch/um/sys-x86_64/signal.c | 276 + arch/um/sys-x86_64/syscalls.c | 191 + arch/um/sys-x86_64/sysrq.c | 49 + arch/um/sys-x86_64/util/Makefile | 10 + arch/um/sys-x86_64/util/mk_sc.c | 58 + arch/um/sys-x86_64/util/mk_thread_kern.c | 21 + arch/um/sys-x86_64/util/mk_thread_user.c | 30 + arch/x86_64/kernel/genapic.c | 82 + arch/x86_64/kernel/genapic_cluster.c | 130 + arch/x86_64/kernel/genapic_flat.c | 127 + arch/x86_64/kernel/kprobes.c | 481 ++ arch/x86_64/kernel/machine_kexec.c | 246 + arch/x86_64/kernel/mce_intel.c | 99 + arch/x86_64/kernel/relocate_kernel.S | 141 + arch/x86_64/mm/srat.c | 217 + crypto/anubis.c | 719 +++ drivers/acpi/container.c | 298 + drivers/acpi/ibm_acpi.c | 1242 ++++ drivers/acpi/processor_core.c | 989 ++++ drivers/acpi/processor_idle.c | 1017 ++++ drivers/acpi/processor_perflib.c | 666 +++ drivers/acpi/processor_thermal.c | 406 ++ drivers/acpi/processor_throttling.c | 351 ++ drivers/acpi/video.c | 1988 +++++++ drivers/base/attribute_container.c | 376 ++ drivers/base/transport_class.c | 257 + drivers/block/aoe/Makefile | 6 + drivers/block/aoe/aoe.h | 166 + drivers/block/aoe/aoeblk.c | 265 + drivers/block/aoe/aoechr.c | 279 + drivers/block/aoe/aoecmd.c | 627 ++ drivers/block/aoe/aoedev.c | 180 + drivers/block/aoe/aoemain.c | 112 + drivers/block/aoe/aoenet.c | 172 + drivers/block/pktcdvd.c | 2679 +++++++++ drivers/bluetooth/bpa10x.c | 657 +++ drivers/char/drm/ati_pcigart.c | 208 + drivers/char/drm/drm_agpsupport.c | 439 ++ drivers/char/drm/drm_auth.c | 230 + drivers/char/drm/drm_bufs.c | 1270 +++++ drivers/char/drm/drm_context.c | 578 ++ drivers/char/drm/drm_dma.c | 180 + drivers/char/drm/drm_drawable.c | 56 + drivers/char/drm/drm_drv.c | 545 ++ drivers/char/drm/drm_fops.c | 449 ++ drivers/char/drm/drm_init.c | 52 + drivers/char/drm/drm_ioctl.c | 370 ++ drivers/char/drm/drm_irq.c | 370 ++ drivers/char/drm/drm_lock.c | 303 + drivers/char/drm/drm_memory.c | 181 + drivers/char/drm/drm_pci.c | 140 + drivers/char/drm/drm_proc.c | 539 ++ drivers/char/drm/drm_scatter.c | 231 + drivers/char/drm/drm_stub.c | 259 + drivers/char/drm/drm_sysfs.c | 208 + drivers/char/drm/drm_vm.c | 678 +++ drivers/char/drm/tdfx_drv.h | 50 + drivers/char/ds1302.c | 354 ++ drivers/char/mxser.h | 450 ++ drivers/char/s3c2410-rtc.c | 587 ++ drivers/char/watchdog/s3c2410_wdt.c | 516 ++ drivers/cpufreq/cpufreq_stats.c | 334 ++ drivers/crypto/Kconfig | 23 + drivers/crypto/Makefile | 7 + drivers/crypto/padlock-aes.c | 468 ++ drivers/crypto/padlock-generic.c | 63 + drivers/crypto/padlock.h | 36 + drivers/dio/dio-driver.c | 163 + drivers/dio/dio-sysfs.c | 77 + drivers/i2c/algos/i2c-algo-sgi.c | 189 + drivers/i2c/algos/i2c-algo-sibyte.c | 225 + drivers/i2c/busses/i2c-amd756-s4882.c | 264 + drivers/i2c/busses/i2c-au1550.c | 435 ++ drivers/i2c/busses/i2c-au1550.h | 32 + drivers/i2c/busses/i2c-s3c2410.c | 926 +++ drivers/i2c/busses/i2c-sibyte.c | 71 + drivers/i2c/busses/i2c-stub.c | 125 + drivers/i2c/chips/adm1026.c | 1779 ++++++ drivers/i2c/chips/lm63.c | 567 ++ drivers/i2c/chips/lm87.c | 812 +++ drivers/i2c/chips/pc87360.c | 1298 +++++ drivers/i2c/chips/smsc47b397.c | 353 ++ drivers/ide/cris/Makefile | 3 + drivers/ide/cris/ide-v10.c | 859 +++ drivers/ide/pci/it821x.c | 812 +++ drivers/infiniband/Kconfig | 14 + drivers/infiniband/Makefile | 3 + drivers/infiniband/core/Makefile | 12 + drivers/infiniband/core/agent.c | 399 ++ drivers/infiniband/core/agent.h | 55 + drivers/infiniband/core/agent_priv.h | 64 + drivers/infiniband/core/cache.c | 363 ++ drivers/infiniband/core/core_priv.h | 52 + drivers/infiniband/core/device.c | 614 ++ drivers/infiniband/core/fmr_pool.c | 507 ++ drivers/infiniband/core/mad.c | 2689 +++++++++ drivers/infiniband/core/mad_priv.h | 195 + drivers/infiniband/core/packer.c | 201 + drivers/infiniband/core/sa_query.c | 866 +++ drivers/infiniband/core/smi.c | 234 + drivers/infiniband/core/smi.h | 67 + drivers/infiniband/core/sysfs.c | 762 +++ drivers/infiniband/core/ud_header.c | 365 ++ drivers/infiniband/core/user_mad.c | 840 +++ drivers/infiniband/core/verbs.c | 434 ++ drivers/infiniband/hw/mthca/Kconfig | 16 + drivers/infiniband/hw/mthca/Makefile | 12 + drivers/infiniband/hw/mthca/mthca_allocator.c | 179 + drivers/infiniband/hw/mthca/mthca_av.c | 219 + drivers/infiniband/hw/mthca/mthca_cmd.c | 1764 ++++++ drivers/infiniband/hw/mthca/mthca_cmd.h | 296 + .../infiniband/hw/mthca/mthca_config_reg.h | 50 + drivers/infiniband/hw/mthca/mthca_cq.c | 841 +++ drivers/infiniband/hw/mthca/mthca_dev.h | 410 ++ drivers/infiniband/hw/mthca/mthca_doorbell.h | 83 + drivers/infiniband/hw/mthca/mthca_eq.c | 744 +++ drivers/infiniband/hw/mthca/mthca_mad.c | 323 ++ drivers/infiniband/hw/mthca/mthca_main.c | 1126 ++++ drivers/infiniband/hw/mthca/mthca_mcg.c | 376 ++ drivers/infiniband/hw/mthca/mthca_memfree.c | 206 + drivers/infiniband/hw/mthca/mthca_memfree.h | 122 + drivers/infiniband/hw/mthca/mthca_mr.c | 396 ++ drivers/infiniband/hw/mthca/mthca_pd.c | 80 + drivers/infiniband/hw/mthca/mthca_profile.c | 261 + drivers/infiniband/hw/mthca/mthca_profile.h | 58 + drivers/infiniband/hw/mthca/mthca_provider.c | 658 +++ drivers/infiniband/hw/mthca/mthca_provider.h | 228 + drivers/infiniband/hw/mthca/mthca_qp.c | 1615 ++++++ drivers/infiniband/hw/mthca/mthca_reset.c | 232 + drivers/infiniband/include/ib_cache.h | 103 + drivers/infiniband/include/ib_fmr_pool.h | 92 + drivers/infiniband/include/ib_mad.h | 404 ++ drivers/infiniband/include/ib_pack.h | 245 + drivers/infiniband/include/ib_sa.h | 308 + drivers/infiniband/include/ib_smi.h | 96 + drivers/infiniband/include/ib_user_mad.h | 123 + drivers/infiniband/include/ib_verbs.h | 1259 ++++ drivers/infiniband/ulp/ipoib/Kconfig | 33 + drivers/infiniband/ulp/ipoib/Makefile | 11 + drivers/infiniband/ulp/ipoib/ipoib.h | 353 ++ drivers/infiniband/ulp/ipoib/ipoib_fs.c | 287 + drivers/infiniband/ulp/ipoib/ipoib_ib.c | 666 +++ drivers/infiniband/ulp/ipoib/ipoib_main.c | 1079 ++++ .../infiniband/ulp/ipoib/ipoib_multicast.c | 985 ++++ drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 261 + drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 177 + drivers/input/mouse/alps.c | 424 ++ drivers/input/mouse/alps.h | 17 + drivers/input/serio/i8042-x86ia64io.h | 308 + drivers/input/serio/libps2.c | 305 + drivers/md/faulty.c | 343 ++ drivers/md/raid6altivec.uc | 126 + drivers/media/dvb/b2c2/b2c2-common.c | 214 + drivers/media/dvb/b2c2/b2c2-usb-core.c | 538 ++ drivers/media/dvb/bt8xx/dst.c | 1089 ++++ drivers/media/dvb/bt8xx/dst.h | 40 + drivers/media/dvb/bt8xx/dst_priv.h | 37 + drivers/media/dvb/cinergyT2/Kconfig | 85 + drivers/media/dvb/cinergyT2/Makefile | 3 + drivers/media/dvb/cinergyT2/cinergyT2.c | 973 ++++ drivers/media/dvb/dibusb/Kconfig | 57 + drivers/media/dvb/dibusb/Makefile | 3 + drivers/media/dvb/dibusb/dvb-dibusb-core.c | 480 ++ drivers/media/dvb/dibusb/dvb-dibusb-dvb.c | 205 + drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c | 598 ++ .../media/dvb/dibusb/dvb-dibusb-firmware.c | 85 + drivers/media/dvb/dibusb/dvb-dibusb-pid.c | 80 + drivers/media/dvb/dibusb/dvb-dibusb-remote.c | 197 + drivers/media/dvb/dibusb/dvb-dibusb-usb.c | 263 + drivers/media/dvb/dibusb/dvb-dibusb.h | 351 ++ drivers/media/dvb/frontends/at76c651.h | 47 + drivers/media/dvb/frontends/cx22700.c | 445 ++ drivers/media/dvb/frontends/cx22700.h | 41 + drivers/media/dvb/frontends/cx22702.c | 532 ++ drivers/media/dvb/frontends/cx22702.h | 46 + drivers/media/dvb/frontends/cx24110.h | 45 + drivers/media/dvb/frontends/dib3000-common.c | 145 + drivers/media/dvb/frontends/dib3000-common.h | 153 + drivers/media/dvb/frontends/dib3000.h | 55 + drivers/media/dvb/frontends/dib3000mb.c | 833 +++ drivers/media/dvb/frontends/dib3000mb_priv.h | 467 ++ drivers/media/dvb/frontends/dib3000mc.c | 860 +++ drivers/media/dvb/frontends/dib3000mc_priv.h | 439 ++ drivers/media/dvb/frontends/dvb_dummy_fe.h | 32 + drivers/media/dvb/frontends/l64781.c | 607 ++ drivers/media/dvb/frontends/l64781.h | 43 + drivers/media/dvb/frontends/mt312_priv.h | 162 + drivers/media/dvb/frontends/mt352.c | 558 ++ drivers/media/dvb/frontends/mt352.h | 58 + drivers/media/dvb/frontends/mt352_priv.h | 127 + drivers/media/dvb/frontends/nxt2002.c | 670 +++ drivers/media/dvb/frontends/nxt2002.h | 23 + drivers/media/dvb/frontends/nxt6000_priv.h | 265 + drivers/media/dvb/frontends/sp8870.c | 613 ++ drivers/media/dvb/frontends/sp8870.h | 45 + drivers/media/dvb/frontends/sp887x.h | 29 + drivers/media/dvb/frontends/stv0297.c | 783 +++ drivers/media/dvb/frontends/stv0297.h | 41 + drivers/media/dvb/frontends/stv0299.h | 104 + drivers/media/dvb/frontends/tda10021.c | 483 ++ drivers/media/dvb/frontends/tda10021.h | 43 + drivers/media/dvb/frontends/tda1004x.h | 56 + drivers/media/dvb/frontends/tda8083.c | 490 ++ drivers/media/dvb/frontends/tda8083.h | 45 + drivers/media/dvb/frontends/tda80xx.c | 749 +++ drivers/media/dvb/frontends/tda80xx.h | 51 + drivers/media/dvb/frontends/ves1820.h | 52 + drivers/media/dvb/frontends/ves1x93.h | 50 + drivers/media/dvb/ttusb-dec/ttusbdecfe.c | 255 + drivers/media/dvb/ttusb-dec/ttusbdecfe.h | 38 + drivers/media/video/arv.c | 916 +++ drivers/media/video/cx88/cx88-blackbird.c | 904 +++ drivers/media/video/cx88/cx88-dvb.c | 338 ++ drivers/media/video/cx88/cx88-mpeg.c | 468 ++ drivers/media/video/saa7134/saa7134-dvb.c | 91 + drivers/media/video/saa7134/saa7134-empress.c | 394 ++ drivers/media/video/tveeprom.c | 577 ++ drivers/media/video/video-buf-dvb.c | 248 + drivers/mmc/wbsd.c | 1596 ++++++ drivers/mmc/wbsd.h | 177 + drivers/mtd/chips/fwh_lock.h | 107 + drivers/mtd/devices/block2mtd.c | 495 ++ drivers/mtd/maps/bast-flash.c | 227 + drivers/mtd/maps/chestnut.c | 91 + drivers/mtd/maps/ipaq-flash.c | 464 ++ drivers/mtd/maps/ocotea.c | 154 + drivers/mtd/maps/sharpsl-flash.c | 101 + drivers/mtd/maps/ts5500_flash.c | 141 + drivers/mtd/maps/walnut.c | 122 + drivers/mtd/nand/h1910.c | 208 + drivers/mtd/nand/nandsim.c | 1613 ++++++ drivers/mtd/nand/rtc_from4.c | 559 ++ drivers/mtd/nand/s3c2410.c | 704 +++ drivers/mtd/nand/sharpsl.c | 260 + drivers/net/arcnet/capmode.c | 296 + drivers/net/cris/Makefile | 1 + drivers/net/cris/eth_v10.c | 1836 ++++++ drivers/net/sk98lin/skethtool.c | 555 ++ drivers/pci/pci-acpi.c | 209 + drivers/pci/pcie/Kconfig | 38 + drivers/pci/pcie/Makefile | 7 + drivers/pci/pcie/portdrv.h | 41 + drivers/pci/pcie/portdrv_bus.c | 77 + drivers/pci/pcie/portdrv_core.c | 434 ++ drivers/pci/pcie/portdrv_pci.c | 122 + drivers/pci/rom.c | 225 + drivers/pcmcia/au1000_db1x00.c | 288 + drivers/pcmcia/au1000_generic.h | 150 + drivers/pcmcia/au1000_xxs1500.c | 191 + drivers/pcmcia/m32r_cfc.c | 879 +++ drivers/pcmcia/m32r_cfc.h | 83 + drivers/pcmcia/m32r_pcc.c | 816 +++ drivers/pcmcia/m32r_pcc.h | 65 + drivers/pcmcia/pcmcia_compat.c | 145 + drivers/pcmcia/pxa2xx_sharpsl.c | 264 + drivers/pcmcia/rsrc_nonstatic.c | 818 +++ drivers/pcmcia/vrc4171_card.c | 744 +++ drivers/pcmcia/vrc4173_cardu.c | 622 ++ drivers/pcmcia/vrc4173_cardu.h | 247 + drivers/pnp/pnpacpi/Kconfig | 18 + drivers/pnp/pnpacpi/Makefile | 5 + drivers/pnp/pnpacpi/core.c | 258 + drivers/pnp/pnpacpi/pnpacpi.h | 13 + drivers/pnp/pnpacpi/rsparser.c | 820 +++ drivers/s390/char/monreader.c | 662 +++ drivers/s390/char/sclp_quiesce.c | 114 + drivers/s390/char/vmlogrdr.c | 920 +++ drivers/s390/char/vmwatchdog.c | 292 + drivers/scsi/a100u2w.c | 1202 ++++ drivers/scsi/a100u2w.h | 416 ++ drivers/scsi/ahci.c | 1045 ++++ drivers/scsi/aic7xxx/aic79xx_pci.h | 70 + drivers/scsi/aic7xxx/aic7xxx_pci.h | 124 + drivers/scsi/gdth_kcompat.h | 21 + drivers/scsi/initio.c | 3184 +++++++++++ drivers/scsi/initio.h | 739 +++ drivers/scsi/lpfc/Makefile | 7 + drivers/scsi/lpfc/lpfc.h | 449 ++ drivers/scsi/lpfc/lpfc_compat.h | 120 + drivers/scsi/lpfc/lpfc_crtn.h | 265 + drivers/scsi/lpfc/lpfc_ct.c | 1288 +++++ drivers/scsi/lpfc/lpfc_disc.h | 270 + drivers/scsi/lpfc/lpfc_els.c | 3235 +++++++++++ drivers/scsi/lpfc/lpfc_hbadisc.c | 2703 +++++++++ drivers/scsi/lpfc/lpfc_hw.h | 2688 +++++++++ drivers/scsi/lpfc/lpfc_init.c | 1345 +++++ drivers/scsi/lpfc/lpfc_logmsg.h | 46 + drivers/scsi/lpfc/lpfc_mbox.c | 672 +++ drivers/scsi/lpfc/lpfc_mem.c | 192 + drivers/scsi/lpfc/lpfc_nportdisc.c | 2145 +++++++ drivers/scsi/lpfc/lpfc_scsi.h | 92 + drivers/scsi/lpfc/lpfc_sli.c | 3349 +++++++++++ drivers/scsi/lpfc/lpfc_sli.h | 218 + drivers/scsi/lpfc/lpfc_version.h | 37 + drivers/scsi/ql1040_fw.h | 2099 +++++++ drivers/scsi/sata_qstor.c | 700 +++ drivers/scsi/sata_uli.c | 283 + drivers/scsi/scsi_transport_iscsi.c | 388 ++ drivers/serial/8250_early.c | 255 + drivers/serial/8250_hp300.c | 329 ++ drivers/serial/crisv10.c | 5061 +++++++++++++++++ drivers/serial/crisv10.h | 137 + drivers/serial/imx.c | 902 +++ drivers/serial/m32r_sio.c | 1373 +++++ drivers/serial/m32r_sio.h | 56 + drivers/serial/m32r_sio_reg.h | 343 ++ drivers/serial/mpsc.c | 1832 ++++++ drivers/serial/mpsc.h | 289 + drivers/serial/serial_txx9.c | 1171 ++++ drivers/usb/atm/Kconfig | 30 + drivers/usb/atm/Makefile | 7 + drivers/usb/atm/speedtch.c | 863 +++ drivers/usb/atm/usb_atm.c | 1201 ++++ drivers/usb/atm/usb_atm.h | 160 + drivers/usb/host/hc_crisv10.c | 4574 +++++++++++++++ drivers/usb/host/hc_crisv10.h | 289 + drivers/usb/host/ohci-au1xxx.c | 362 ++ drivers/usb/host/ohci-pxa27x.c | 455 ++ drivers/usb/host/sl811-hcd.c | 1905 +++++++ drivers/usb/host/sl811.h | 270 + drivers/usb/media/pwc/Makefile | 20 + drivers/usb/media/pwc/pwc-ctrl.c | 1630 ++++++ drivers/usb/media/pwc/pwc-if.c | 2211 +++++++ drivers/usb/media/pwc/pwc-ioctl.h | 292 + drivers/usb/media/pwc/pwc-kiara.c | 891 +++ drivers/usb/media/pwc/pwc-timon.c | 1446 +++++ drivers/usb/media/pwc/pwc-uncompress.c | 147 + drivers/usb/media/pwc/pwc.h | 278 + drivers/usb/media/sn9c102_hv7131d.c | 271 + drivers/usb/media/sn9c102_mi0343.c | 363 ++ drivers/usb/misc/idmouse.c | 443 ++ drivers/usb/misc/phidgetkit.c | 581 ++ drivers/usb/serial/cypress_m8.c | 1222 ++++ drivers/usb/serial/cypress_m8.h | 55 + drivers/usb/serial/garmin_gps.c | 1541 +++++ drivers/usb/serial/ipw.c | 491 ++ drivers/usb/serial/ti_fw_3410.h | 885 +++ drivers/usb/serial/ti_fw_5052.h | 885 +++ drivers/usb/serial/ti_usb_3410_5052.c | 1842 ++++++ drivers/usb/serial/ti_usb_3410_5052.h | 224 + drivers/video/au1100fb.c | 676 +++ drivers/video/au1100fb.h | 381 ++ drivers/video/backlight/Kconfig | 52 + drivers/video/backlight/Makefile | 5 + drivers/video/backlight/backlight.c | 264 + drivers/video/backlight/corgi_bl.c | 198 + drivers/video/backlight/lcd.c | 263 + drivers/video/bt431.h | 236 + drivers/video/bt455.h | 95 + drivers/video/console/bitblit.c | 395 ++ drivers/video/console/tileblit.c | 147 + drivers/video/intelfb/Makefile | 8 + drivers/video/intelfb/intelfb.h | 278 + drivers/video/intelfb/intelfbdrv.c | 1557 +++++ drivers/video/intelfb/intelfbdrv.h | 69 + drivers/video/intelfb/intelfbhw.c | 1753 ++++++ drivers/video/intelfb/intelfbhw.h | 567 ++ drivers/video/pmag-aa-fb.c | 514 ++ drivers/video/savage/Makefile | 8 + drivers/video/savage/savagefb-i2c.c | 277 + drivers/video/savage/savagefb.c | 2276 ++++++++ drivers/video/savage/savagefb.h | 354 ++ drivers/video/savage/savagefb_accel.c | 140 + drivers/video/w100fb.c | 1864 ++++++ drivers/video/w100fb.h | 615 ++ fs/affs/affs.h | 304 + fs/binfmt_elf_fdpic.c | 1101 ++++ fs/cifs/readdir.c | 648 +++ fs/debugfs/Makefile | 4 + fs/debugfs/file.c | 262 + fs/debugfs/inode.c | 328 ++ fs/hfs/attr.c | 121 + fs/nfsd/nfs4callback.c | 583 ++ fs/ntfs/aops.h | 109 + fs/ntfs/runlist.c | 1438 +++++ fs/ntfs/runlist.h | 89 + fs/proc/internal.h | 48 + fs/proc/mmu.c | 67 + fs/proc/nommu.c | 135 + fs/proc/vmcore.c | 239 + fs/xfs/Kconfig | 85 + fs/xfs/linux-2.6/xfs_export.c | 130 + include/acpi/container.h | 13 + include/asm-alpha/cputime.h | 6 + include/asm-arm/arch-cl7500/debug-macro.S | 31 + include/asm-arm/arch-cl7500/entry-macro.S | 3 + include/asm-arm/arch-clps711x/debug-macro.S | 46 + include/asm-arm/arch-clps711x/entry-macro.S | 51 + include/asm-arm/arch-ebsa110/debug-macro.S | 34 + include/asm-arm/arch-ebsa110/entry-macro.S | 33 + include/asm-arm/arch-ebsa285/debug-macro.S | 66 + include/asm-arm/arch-ebsa285/entry-macro.S | 105 + include/asm-arm/arch-epxa10db/debug-macro.S | 41 + include/asm-arm/arch-epxa10db/entry-macro.S | 25 + include/asm-arm/arch-h720x/debug-macro.S | 40 + include/asm-arm/arch-h720x/entry-macro.S | 60 + include/asm-arm/arch-imx/debug-macro.S | 34 + include/asm-arm/arch-imx/entry-macro.S | 29 + include/asm-arm/arch-integrator/debug-macro.S | 38 + include/asm-arm/arch-integrator/entry-macro.S | 36 + include/asm-arm/arch-iop3xx/debug-macro.S | 48 + include/asm-arm/arch-iop3xx/entry-macro.S | 56 + include/asm-arm/arch-iop3xx/iq80332.h | 23 + include/asm-arm/arch-ixp2000/debug-macro.S | 40 + include/asm-arm/arch-ixp2000/entry-macro.S | 54 + include/asm-arm/arch-ixp4xx/debug-macro.S | 34 + include/asm-arm/arch-ixp4xx/entry-macro.S | 39 + include/asm-arm/arch-ixp4xx/gtwx5715.h | 120 + include/asm-arm/arch-l7200/debug-macro.S | 40 + include/asm-arm/arch-l7200/entry-macro.S | 29 + include/asm-arm/arch-lh7a40x/debug-macro.S | 39 + include/asm-arm/arch-lh7a40x/entry-macro.S | 67 + include/asm-arm/arch-omap/cpu.h | 183 + include/asm-arm/arch-omap/debug-macro.S | 45 + include/asm-arm/arch-omap/entry-macro.S | 32 + include/asm-arm/arch-omap/omap16xx.h | 179 + include/asm-arm/arch-omap/tc.h | 64 + include/asm-arm/arch-pxa/audio.h | 16 + include/asm-arm/arch-pxa/corgi.h | 150 + include/asm-arm/arch-pxa/debug-macro.S | 36 + include/asm-arm/arch-pxa/entry-macro.S | 31 + include/asm-arm/arch-pxa/ssp.h | 47 + include/asm-arm/arch-rpc/debug-macro.S | 35 + include/asm-arm/arch-rpc/entry-macro.S | 3 + include/asm-arm/arch-s3c2410/bast-pmu.h | 43 + include/asm-arm/arch-s3c2410/debug-macro.S | 97 + include/asm-arm/arch-s3c2410/entry-macro.S | 116 + include/asm-arm/arch-s3c2410/idle.h | 28 + include/asm-arm/arch-s3c2410/iic.h | 36 + include/asm-arm/arch-sa1100/debug-macro.S | 57 + include/asm-arm/arch-sa1100/entry-macro.S | 41 + include/asm-arm/arch-shark/debug-macro.S | 31 + include/asm-arm/arch-shark/entry-macro.S | 35 + include/asm-arm/arch-versatile/debug-macro.S | 39 + include/asm-arm/arch-versatile/entry-macro.S | 35 + include/asm-arm/cpu.h | 25 + include/asm-arm/cputime.h | 6 + include/asm-arm/hardware/entry-macro-iomd.S | 145 + include/asm-arm/hardware/icst307.h | 38 + include/asm-arm/hardware/scoop.h | 47 + include/asm-arm/mach/irda.h | 20 + include/asm-arm/rtc.h | 45 + include/asm-arm26/cputime.h | 6 + include/asm-arm26/dma-mapping.h | 2 + include/asm-cris/cputime.h | 6 + include/asm-frv/a.out.h | 5 + include/asm-frv/atomic.h | 417 ++ include/asm-frv/ax88796.h | 22 + include/asm-frv/bitops.h | 341 ++ include/asm-frv/bug.h | 51 + include/asm-frv/bugs.h | 14 + include/asm-frv/busctl-regs.h | 41 + include/asm-frv/byteorder.h | 13 + include/asm-frv/cache.h | 24 + include/asm-frv/cacheflush.h | 91 + include/asm-frv/checksum.h | 183 + include/asm-frv/cpu-irqs.h | 87 + include/asm-frv/cpumask.h | 6 + include/asm-frv/cputime.h | 6 + include/asm-frv/current.h | 30 + include/asm-frv/delay.h | 50 + include/asm-frv/div64.h | 1 + include/asm-frv/dm9000.h | 37 + include/asm-frv/dma-mapping.h | 184 + include/asm-frv/dma.h | 129 + include/asm-frv/elf.h | 147 + include/asm-frv/errno.h | 7 + include/asm-frv/fcntl.h | 88 + include/asm-frv/fpu.h | 12 + include/asm-frv/gdb-stub.h | 118 + include/asm-frv/gpio-regs.h | 116 + include/asm-frv/hardirq.h | 30 + include/asm-frv/highmem.h | 183 + include/asm-frv/hw_irq.h | 16 + include/asm-frv/ide.h | 43 + include/asm-frv/init.h | 12 + include/asm-frv/io.h | 290 + include/asm-frv/ioctl.h | 80 + include/asm-frv/ioctls.h | 82 + include/asm-frv/ipc.h | 33 + include/asm-frv/ipcbuf.h | 30 + include/asm-frv/irc-regs.h | 53 + include/asm-frv/irq-routing.h | 70 + include/asm-frv/irq.h | 44 + include/asm-frv/kmap_types.h | 29 + include/asm-frv/linkage.h | 7 + include/asm-frv/local.h | 6 + include/asm-frv/math-emu.h | 301 + include/asm-frv/mb-regs.h | 185 + include/asm-frv/mb86943a.h | 39 + include/asm-frv/mb93091-fpga-irqs.h | 44 + include/asm-frv/mb93093-fpga-irqs.h | 31 + include/asm-frv/mb93493-irqs.h | 52 + include/asm-frv/mb93493-regs.h | 279 + include/asm-frv/mem-layout.h | 78 + include/asm-frv/mman.h | 44 + include/asm-frv/mmu.h | 42 + include/asm-frv/mmu_context.h | 50 + include/asm-frv/module.h | 20 + include/asm-frv/msgbuf.h | 32 + include/asm-frv/namei.h | 18 + include/asm-frv/page.h | 105 + include/asm-frv/param.h | 23 + include/asm-frv/pci.h | 108 + include/asm-frv/percpu.h | 6 + include/asm-frv/pgalloc.h | 64 + include/asm-frv/pgtable.h | 554 ++ include/asm-frv/poll.h | 23 + include/asm-frv/posix_types.h | 66 + include/asm-frv/processor.h | 153 + include/asm-frv/ptrace.h | 86 + include/asm-frv/registers.h | 255 + include/asm-frv/resource.h | 7 + include/asm-frv/scatterlist.h | 32 + include/asm-frv/sections.h | 46 + include/asm-frv/segment.h | 46 + include/asm-frv/semaphore.h | 161 + include/asm-frv/sembuf.h | 26 + include/asm-frv/serial-regs.h | 44 + include/asm-frv/serial.h | 19 + include/asm-frv/setup.h | 25 + include/asm-frv/shmbuf.h | 43 + include/asm-frv/shmparam.h | 7 + include/asm-frv/sigcontext.h | 26 + include/asm-frv/siginfo.h | 12 + include/asm-frv/signal.h | 187 + include/asm-frv/smp.h | 10 + include/asm-frv/socket.h | 51 + include/asm-frv/sockios.h | 13 + include/asm-frv/spinlock.h | 17 + include/asm-frv/spr-regs.h | 401 ++ include/asm-frv/stat.h | 100 + include/asm-frv/statfs.h | 7 + include/asm-frv/string.h | 51 + include/asm-frv/suspend.h | 20 + include/asm-frv/system.h | 126 + include/asm-frv/termbits.h | 177 + include/asm-frv/termios.h | 74 + include/asm-frv/thread_info.h | 159 + include/asm-frv/timer-regs.h | 106 + include/asm-frv/timex.h | 25 + include/asm-frv/tlb.h | 23 + include/asm-frv/tlbflush.h | 76 + include/asm-frv/topology.h | 14 + include/asm-frv/types.h | 74 + include/asm-frv/uaccess.h | 317 ++ include/asm-frv/ucontext.h | 12 + include/asm-frv/unaligned.h | 203 + include/asm-frv/unistd.h | 501 ++ include/asm-frv/user.h | 80 + include/asm-frv/virtconvert.h | 42 + include/asm-generic/4level-fixup.h | 34 + include/asm-generic/cputime.h | 64 + include/asm-generic/pgtable-nopmd.h | 60 + include/asm-generic/pgtable-nopud.h | 56 + include/asm-generic/resource.h | 60 + include/asm-generic/termios.h | 69 + include/asm-h8300/cputime.h | 6 + include/asm-i386/cputime.h | 6 + include/asm-i386/pci-direct.h | 1 + include/asm-ia64/cputime.h | 6 + include/asm-ia64/machvec_hpzx1_swiotlb.h | 43 + include/asm-ia64/sn/l1.h | 36 + include/asm-ia64/sn/shub_mmr.h | 199 + include/asm-ia64/sn/shubio.h | 3476 +++++++++++ include/asm-m32r/cputime.h | 6 + include/asm-m68k/cputime.h | 6 + include/asm-m68k/hp300hw.h | 25 + include/asm-m68knommu/cputime.h | 6 + include/asm-m68knommu/m527xsim.h | 38 + include/asm-m68knommu/m528xsim.h | 36 + include/asm-m68knommu/mcfcache.h | 125 + include/asm-mips/compiler.h | 17 + include/asm-mips/cpu-info.h | 81 + include/asm-mips/cputime.h | 6 + include/asm-mips/dec/serial.h | 36 + include/asm-mips/interrupt.h | 134 + include/asm-mips/m48t37.h | 35 + include/asm-mips/mach-ip22/spaces.h | 55 + .../mach-ip32/cpu-feature-overrides.h | 41 + include/asm-mips/mach-ip32/spaces.h | 42 + .../mach-mips/cpu-feature-overrides.h | 64 + .../mach-ocelot3/cpu-feature-overrides.h | 47 + .../mach-sibyte/cpu-feature-overrides.h | 38 + include/asm-mips/msc01_ic.h | 151 + include/asm-mips/reg.h | 129 + include/asm-mips/tx4927/smsc_fdc37m81x.h | 69 + include/asm-mips/vr41xx/cmbvr4133.h | 61 + include/asm-parisc/cputime.h | 6 + include/asm-ppc/cputime.h | 6 + include/asm-ppc/perfmon.h | 22 + include/asm-ppc/ppc_sys.h | 65 + include/asm-ppc/xparameters.h | 18 + include/asm-ppc64/cputime.h | 6 + include/asm-ppc64/kdebug.h | 43 + include/asm-ppc64/kprobes.h | 56 + include/asm-ppc64/lppaca.h | 132 + include/asm-ppc64/sstep.h | 13 + include/asm-s390/cputime.h | 168 + include/asm-sh/cputime.h | 6 + include/asm-sh/edosk7705/io.h | 30 + include/asm-sh/irq-sh73180.h | 350 ++ include/asm-sh/microdev/io.h | 53 + include/asm-sh/microdev/irq.h | 72 + include/asm-sh/se73180/io.h | 32 + include/asm-sh/se73180/se73180.h | 62 + include/asm-sh/sh03/io.h | 46 + include/asm-sh/sh03/sh03.h | 18 + include/asm-sh64/cputime.h | 6 + include/asm-sparc/cputime.h | 6 + include/asm-sparc64/cputime.h | 6 + include/asm-um/apic.h | 4 + include/asm-um/archparam-x86_64.h | 62 + include/asm-um/calling.h | 9 + include/asm-um/cputime.h | 6 + include/asm-um/dwarf2.h | 11 + include/asm-um/module-x86_64.h | 30 + include/asm-um/pda.h | 31 + include/asm-um/pgtable-2level.h | 83 + include/asm-um/pgtable-3level.h | 172 + include/asm-um/prctl.h | 6 + include/asm-um/processor-x86_64.h | 36 + include/asm-um/ptrace-x86_64.h | 75 + include/asm-um/sigcontext-x86_64.h | 22 + include/asm-um/system-x86_64.h | 23 + include/asm-um/vm-flags-i386.h | 14 + include/asm-um/vm-flags-x86_64.h | 33 + include/asm-v850/cputime.h | 6 + include/asm-x86_64/cputime.h | 6 + include/asm-x86_64/crash.h | 75 + include/asm-x86_64/genapic.h | 35 + include/asm-x86_64/ipi.h | 113 + include/asm-x86_64/kexec.h | 25 + include/asm-x86_64/kprobes.h | 61 + include/asm-x86_64/mach_apic.h | 29 + include/linux/attribute_container.h | 73 + include/linux/backlight.h | 57 + include/linux/crash_dump.h | 34 + include/linux/debugfs.h | 90 + include/linux/elf-fdpic.h | 68 + include/linux/fsl_devices.h | 78 + include/linux/i2c-algo-sgi.h | 27 + include/linux/i2c-algo-sibyte.h | 33 + include/linux/if_infiniband.h | 29 + include/linux/key-ui.h | 97 + include/linux/key.h | 286 + include/linux/keyctl.h | 39 + include/linux/kfifo.h | 157 + include/linux/kobject_uevent.h | 57 + include/linux/lcd.h | 56 + include/linux/libps2.h | 50 + include/linux/mtd/xip.h | 107 + include/linux/netfilter_bridge/ebt_ulog.h | 36 + include/linux/netfilter_ipv4/ipt_CLUSTERIP.h | 32 + include/linux/netfilter_ipv4/ipt_CONNMARK.h | 25 + include/linux/netfilter_ipv4/ipt_connmark.h | 18 + include/linux/netfilter_ipv4/ipt_hashlimit.h | 40 + include/linux/nodemask.h | 326 ++ include/linux/pci-acpi.h | 61 + include/linux/pcieport_if.h | 74 + include/linux/pktcdvd.h | 275 + include/linux/rslib.h | 105 + include/linux/scatterlist.h | 14 + include/linux/serial_8250.h | 28 + include/linux/tc_act/tc_ipt.h | 21 + include/linux/tc_act/tc_mirred.h | 28 + include/linux/tc_act/tc_pedit.h | 36 + include/linux/transport_class.h | 77 + include/linux/usb_sl811.h | 26 + include/linux/via.h | 22 + include/media/tveeprom.h | 23 + include/media/video-buf-dvb.h | 34 + include/net/act_api.h | 119 + include/net/sch_generic.h | 175 + include/net/tc_act/tc_ipt.h | 16 + include/net/tc_act/tc_mirred.h | 15 + include/net/tc_act/tc_pedit.h | 14 + include/net/x25device.h | 17 + include/scsi/scsi_transport_iscsi.h | 178 + include/video/w100fb.h | 21 + init/calibrate.c | 79 + kernel/irq/Makefile | 5 + kernel/irq/autoprobe.c | 188 + kernel/irq/handle.c | 204 + kernel/irq/internals.h | 18 + kernel/irq/manage.c | 347 ++ kernel/irq/proc.c | 155 + kernel/irq/spurious.c | 96 + kernel/kfifo.c | 168 + kernel/ksysfs.c | 56 + kernel/module-verify-sig.c | 442 ++ kernel/sys_ni.c | 84 + kernel/wait.c | 246 + lib/find_next_bit.c | 55 + lib/kernel_lock.c | 126 + lib/kobject_uevent.c | 369 ++ lib/prio_tree.c | 484 ++ lib/reed_solomon/Makefile | 6 + lib/reed_solomon/decode_rs.c | 272 + lib/reed_solomon/encode_rs.c | 54 + lib/reed_solomon/reed_solomon.c | 335 ++ mm/internal.h | 13 + net/appletalk/dev.c | 43 + net/bridge/netfilter/ebt_ulog.c | 295 + net/ipv4/netfilter/ipt_CLUSTERIP.c | 760 +++ net/ipv4/netfilter/ipt_CONNMARK.c | 118 + net/ipv4/netfilter/ipt_connmark.c | 81 + net/ipv4/netfilter/ipt_hashlimit.c | 713 +++ net/sched/ipt.c | 378 ++ net/sched/mirred.c | 306 + net/sched/pedit.c | 290 + scripts/gen_initramfs_list.sh | 118 + scripts/kconfig/util.c | 109 + security/keys/Makefile | 14 + security/keys/compat.c | 78 + security/keys/internal.h | 123 + security/keys/key.c | 1039 ++++ security/keys/keyctl.c | 987 ++++ security/keys/keyring.c | 895 +++ security/keys/proc.c | 251 + security/keys/process_keys.c | 640 +++ security/keys/request_key.c | 337 ++ security/keys/user_defined.c | 191 + security/seclvl.c | 747 +++ sound/mips/Kconfig | 15 + sound/mips/Makefile | 8 + sound/mips/au1x00.c | 686 +++ sound/oss/au1550_ac97.c | 2119 +++++++ sound/pci/ca0106/Makefile | 3 + sound/pci/ca0106/ca0106.h | 549 ++ sound/pci/ca0106/ca0106_main.c | 1274 +++++ sound/pci/ca0106/ca0106_mixer.c | 634 +++ sound/pci/ca0106/ca0106_proc.c | 436 ++ sound/pci/emu10k1/emu10k1x.c | 1644 ++++++ sound/pci/emu10k1/timer.c | 99 + sound/pci/ice1712/prodigy192.c | 524 ++ sound/pci/ice1712/prodigy192.h | 11 + sound/pci/ice1712/stac946x.h | 25 + sound/pci/via82xx_modem.c | 1256 ++++ sound/usb/usx2y/usx2yhwdeppcm.c | 807 +++ sound/usb/usx2y/usx2yhwdeppcm.h | 21 + 1177 files changed, 329913 insertions(+) create mode 100644 Documentation/DocBook/librs.tmpl create mode 100644 Documentation/DocBook/mtdnand.tmpl create mode 100644 Documentation/PCIEBUS-HOWTO.txt create mode 100644 Documentation/README.cycladesZ create mode 100644 Documentation/SecurityBugs create mode 100644 Documentation/aoe/aoe.txt create mode 100644 Documentation/aoe/autoload.sh create mode 100644 Documentation/aoe/mkdevs.sh create mode 100644 Documentation/aoe/mkshelf.sh create mode 100644 Documentation/aoe/status.sh create mode 100644 Documentation/arm/Samsung-S3C24XX/Suspend.txt create mode 100644 Documentation/atomic_ops.txt create mode 100644 Documentation/cdrom/packet-writing.txt create mode 100644 Documentation/cpu-freq/cpufreq-nforce2.txt create mode 100644 Documentation/dvb/README.dibusb create mode 100644 Documentation/dvb/get_dvb_firmware create mode 100644 Documentation/dvb/udev.txt create mode 100644 Documentation/feature-removal-schedule.txt create mode 100644 Documentation/filesystems/sysfs-pci.txt create mode 100644 Documentation/fujitsu/frv/README.txt create mode 100644 Documentation/fujitsu/frv/atomic-ops.txt create mode 100644 Documentation/fujitsu/frv/booting.txt create mode 100644 Documentation/fujitsu/frv/clock.txt create mode 100644 Documentation/fujitsu/frv/configuring.txt create mode 100644 Documentation/fujitsu/frv/features.txt create mode 100644 Documentation/fujitsu/frv/gdbinit create mode 100644 Documentation/fujitsu/frv/gdbstub.txt create mode 100644 Documentation/fujitsu/frv/mmu-layout.txt create mode 100644 Documentation/i2c/chips/smsc47b397.txt create mode 100644 Documentation/i2c/i2c-stub create mode 100644 Documentation/ia64/serial.txt create mode 100644 Documentation/ibm-acpi.txt create mode 100644 Documentation/infiniband/ipoib.txt create mode 100644 Documentation/infiniband/sysfs.txt create mode 100644 Documentation/infiniband/user_mad.txt create mode 100644 Documentation/ioctl/cdrom.txt create mode 100644 Documentation/ioctl/hdio.txt create mode 100644 Documentation/keys.txt create mode 100644 Documentation/networking/README.ipw2100 create mode 100644 Documentation/networking/README.ipw2200 create mode 100644 Documentation/networking/proc_net_tcp.txt create mode 100644 Documentation/nommu-mmap.txt create mode 100644 Documentation/power/kernel_threads.txt create mode 100644 Documentation/power/video_extension.txt create mode 100644 Documentation/powerpc/cpu_features.txt create mode 100644 Documentation/powerpc/eeh-pci-error-recovery.txt create mode 100644 Documentation/prio_tree.txt create mode 100644 Documentation/s390/monreader.txt create mode 100644 Documentation/scsi/ChangeLog.1992-1997 create mode 100644 Documentation/seclvl.txt create mode 100644 Documentation/sound/alsa/Bt87x.txt create mode 100644 Documentation/sparse.txt create mode 100644 Documentation/stable_api_nonsense.txt create mode 100644 Documentation/usb/gadget_serial.txt create mode 100644 Documentation/w1/w1.generic create mode 100644 arch/arm/boot/compressed/head-sharpsl.S create mode 100644 arch/arm/common/icst307.c create mode 100644 arch/arm/common/rtctime.c create mode 100644 arch/arm/common/scoop.c create mode 100644 arch/arm/configs/iq80332_defconfig create mode 100644 arch/arm/configs/omap_h2_1610_defconfig create mode 100644 arch/arm/configs/simpad_defconfig create mode 100644 arch/arm/kernel/smp.c create mode 100644 arch/arm/lib/io-readsl.S create mode 100644 arch/arm/mach-clps711x/Makefile.boot create mode 100644 arch/arm/mach-clps711x/common.h create mode 100644 arch/arm/mach-clps7500/Makefile.boot create mode 100644 arch/arm/mach-ebsa110/Makefile.boot create mode 100644 arch/arm/mach-epxa10db/Makefile.boot create mode 100644 arch/arm/mach-footbridge/Makefile.boot create mode 100644 arch/arm/mach-footbridge/co285.c create mode 100644 arch/arm/mach-footbridge/common.c create mode 100644 arch/arm/mach-footbridge/common.h create mode 100644 arch/arm/mach-footbridge/dc21285-timer.c create mode 100644 arch/arm/mach-footbridge/ebsa285.c create mode 100644 arch/arm/mach-footbridge/isa-timer.c create mode 100644 arch/arm/mach-footbridge/isa.c create mode 100644 arch/arm/mach-footbridge/personal.c create mode 100644 arch/arm/mach-h720x/Makefile.boot create mode 100644 arch/arm/mach-h720x/common.h create mode 100644 arch/arm/mach-imx/Makefile.boot create mode 100644 arch/arm/mach-integrator/Makefile.boot create mode 100644 arch/arm/mach-integrator/common.h create mode 100644 arch/arm/mach-iop3xx/Makefile.boot create mode 100644 arch/arm/mach-iop3xx/iq80332-mm.c create mode 100644 arch/arm/mach-iop3xx/iq80332-pci.c create mode 100644 arch/arm/mach-ixp2000/Makefile.boot create mode 100644 arch/arm/mach-ixp4xx/Makefile.boot create mode 100644 arch/arm/mach-ixp4xx/gtwx5715-pci.c create mode 100644 arch/arm/mach-ixp4xx/gtwx5715-setup.c create mode 100644 arch/arm/mach-ixp4xx/ixdpg425-pci.c create mode 100644 arch/arm/mach-l7200/Makefile.boot create mode 100644 arch/arm/mach-lh7a40x/Makefile.boot create mode 100644 arch/arm/mach-lh7a40x/common.h create mode 100644 arch/arm/mach-omap/Makefile.boot create mode 100644 arch/arm/mach-omap/clock.c create mode 100644 arch/arm/mach-omap/clock.h create mode 100644 arch/arm/mach-omap/pm.c create mode 100644 arch/arm/mach-omap/sleep.S create mode 100644 arch/arm/mach-pxa/Makefile.boot create mode 100644 arch/arm/mach-pxa/corgi.c create mode 100644 arch/arm/mach-pxa/corgi_ssp.c create mode 100644 arch/arm/mach-pxa/ssp.c create mode 100644 arch/arm/mach-rpc/Makefile.boot create mode 100644 arch/arm/mach-s3c2410/Makefile.boot create mode 100644 arch/arm/mach-s3c2410/mach-rx3715.c create mode 100644 arch/arm/mach-s3c2410/pm.c create mode 100644 arch/arm/mach-s3c2410/pm.h create mode 100644 arch/arm/mach-s3c2410/sleep.S create mode 100644 arch/arm/mach-sa1100/Makefile.boot create mode 100644 arch/arm/mach-shark/Makefile.boot create mode 100644 arch/arm/mach-versatile/Kconfig create mode 100644 arch/arm/mach-versatile/Makefile.boot create mode 100644 arch/arm/mach-versatile/core.h create mode 100644 arch/arm/mach-versatile/versatile_ab.c create mode 100644 arch/arm/mach-versatile/versatile_pb.c create mode 100644 arch/arm26/kernel/calls.S create mode 100644 arch/arm26/kernel/head.S create mode 100644 arch/arm26/lib/io-readsl.S create mode 100644 arch/arm26/lib/io-readsw.S create mode 100644 arch/arm26/lib/io-writesw.S create mode 100644 arch/arm26/machine/latches.c create mode 100644 arch/arm26/mm/memc.c create mode 100644 arch/arm26/mm/small_page.c create mode 100644 arch/cris/arch-v10/kernel/crisksyms.c create mode 100644 arch/frv/Kconfig create mode 100644 arch/frv/Makefile create mode 100644 arch/frv/boot/Makefile create mode 100644 arch/frv/kernel/Makefile create mode 100644 arch/frv/kernel/break.S create mode 100644 arch/frv/kernel/cmode.S create mode 100644 arch/frv/kernel/debug-stub.c create mode 100644 arch/frv/kernel/dma.c create mode 100644 arch/frv/kernel/entry-table.S create mode 100644 arch/frv/kernel/entry.S create mode 100644 arch/frv/kernel/frv_ksyms.c create mode 100644 arch/frv/kernel/gdb-io.c create mode 100644 arch/frv/kernel/gdb-io.h create mode 100644 arch/frv/kernel/gdb-stub.c create mode 100644 arch/frv/kernel/head-mmu-fr451.S create mode 100644 arch/frv/kernel/head-uc-fr401.S create mode 100644 arch/frv/kernel/head-uc-fr451.S create mode 100644 arch/frv/kernel/head-uc-fr555.S create mode 100644 arch/frv/kernel/head.S create mode 100644 arch/frv/kernel/head.inc create mode 100644 arch/frv/kernel/init_task.c create mode 100644 arch/frv/kernel/irq-mb93091.c create mode 100644 arch/frv/kernel/irq-mb93093.c create mode 100644 arch/frv/kernel/irq-mb93493.c create mode 100644 arch/frv/kernel/irq-routing.c create mode 100644 arch/frv/kernel/irq.c create mode 100644 arch/frv/kernel/kernel_thread.S create mode 100644 arch/frv/kernel/local.h create mode 100644 arch/frv/kernel/pm-mb93093.c create mode 100644 arch/frv/kernel/pm.c create mode 100644 arch/frv/kernel/process.c create mode 100644 arch/frv/kernel/ptrace.c create mode 100644 arch/frv/kernel/semaphore.c create mode 100644 arch/frv/kernel/setup.c create mode 100644 arch/frv/kernel/signal.c create mode 100644 arch/frv/kernel/sleep.S create mode 100644 arch/frv/kernel/switch_to.S create mode 100644 arch/frv/kernel/sys_frv.c create mode 100644 arch/frv/kernel/sysctl.c create mode 100644 arch/frv/kernel/time.c create mode 100644 arch/frv/kernel/traps.c create mode 100644 arch/frv/kernel/uaccess.c create mode 100644 arch/frv/kernel/vmlinux.lds.S create mode 100644 arch/frv/lib/Makefile create mode 100644 arch/frv/lib/__ashldi3.S create mode 100644 arch/frv/lib/__ashrdi3.S create mode 100644 arch/frv/lib/__lshrdi3.S create mode 100644 arch/frv/lib/__muldi3.S create mode 100644 arch/frv/lib/__negdi2.S create mode 100644 arch/frv/lib/atomic-ops.S create mode 100644 arch/frv/lib/cache.S create mode 100644 arch/frv/lib/checksum.c create mode 100644 arch/frv/lib/insl_ns.S create mode 100644 arch/frv/lib/insl_sw.S create mode 100644 arch/frv/lib/memcpy.S create mode 100644 arch/frv/lib/memset.S create mode 100644 arch/frv/lib/outsl_ns.S create mode 100644 arch/frv/lib/outsl_sw.S create mode 100644 arch/frv/mb93090-mb00/Makefile create mode 100644 arch/frv/mb93090-mb00/pci-dma-nommu.c create mode 100644 arch/frv/mb93090-mb00/pci-dma.c create mode 100644 arch/frv/mb93090-mb00/pci-frv.c create mode 100644 arch/frv/mb93090-mb00/pci-frv.h create mode 100644 arch/frv/mb93090-mb00/pci-irq.c create mode 100644 arch/frv/mb93090-mb00/pci-vdk.c create mode 100644 arch/frv/mm/Makefile create mode 100644 arch/frv/mm/cache-page.c create mode 100644 arch/frv/mm/dma-alloc.c create mode 100644 arch/frv/mm/elf-fdpic.c create mode 100644 arch/frv/mm/extable.c create mode 100644 arch/frv/mm/fault.c create mode 100644 arch/frv/mm/highmem.c create mode 100644 arch/frv/mm/init.c create mode 100644 arch/frv/mm/kmap.c create mode 100644 arch/frv/mm/mmu-context.c create mode 100644 arch/frv/mm/pgalloc.c create mode 100644 arch/frv/mm/tlb-flush.S create mode 100644 arch/frv/mm/tlb-miss.S create mode 100644 arch/frv/mm/unaligned.c create mode 100644 arch/i386/kernel/acpi/earlyquirk.c create mode 100644 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c create mode 100644 arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c create mode 100644 arch/i386/kernel/cpu/cpufreq/speedstep-est-common.h create mode 100644 arch/i386/kernel/cpu/intel_cacheinfo.c create mode 100644 arch/i386/kernel/crash_dump.c create mode 100644 arch/i386/kernel/quirks.c create mode 100644 arch/i386/oprofile/backtrace.c create mode 100644 arch/ia64/hp/common/hwsw_iommu.c create mode 100644 arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c create mode 100644 arch/ia64/kernel/domain.c create mode 100644 arch/ia64/kernel/topology.c create mode 100644 arch/ia64/oprofile/backtrace.c create mode 100644 arch/ia64/sn/include/ioerror.h create mode 100644 arch/ia64/sn/include/pci/pcibr_provider.h create mode 100644 arch/ia64/sn/include/pci/pcibus_provider_defs.h create mode 100644 arch/ia64/sn/include/pci/pcidev.h create mode 100644 arch/ia64/sn/include/pci/pic.h create mode 100644 arch/ia64/sn/include/pci/tiocp.h create mode 100644 arch/ia64/sn/include/tio.h create mode 100644 arch/ia64/sn/include/xtalk/hubdev.h create mode 100644 arch/ia64/sn/include/xtalk/xbow.h create mode 100644 arch/ia64/sn/include/xtalk/xwidgetdev.h create mode 100644 arch/ia64/sn/kernel/bte_error.c create mode 100644 arch/ia64/sn/kernel/huberror.c create mode 100644 arch/ia64/sn/kernel/io_init.c create mode 100644 arch/ia64/sn/kernel/iomv.c create mode 100644 arch/ia64/sn/kernel/klconflib.c create mode 100644 arch/ia64/sn/pci/Makefile create mode 100644 arch/ia64/sn/pci/pci_dma.c create mode 100644 arch/ia64/sn/pci/pcibr/Makefile create mode 100644 arch/ia64/sn/pci/pcibr/pcibr_ate.c create mode 100644 arch/ia64/sn/pci/pcibr/pcibr_dma.c create mode 100644 arch/ia64/sn/pci/pcibr/pcibr_provider.c create mode 100644 arch/ia64/sn/pci/pcibr/pcibr_reg.c create mode 100644 arch/m32r/Kconfig.debug create mode 100644 arch/m32r/m32700ut/dot.gdbinit_400MHz_32MB create mode 100644 arch/m32r/mappi2/defconfig.vdec2 create mode 100644 arch/m32r/mappi2/dot.gdbinit.vdec2 create mode 100644 arch/m68k/configs/amiga_defconfig create mode 100644 arch/m68k/configs/apollo_defconfig create mode 100644 arch/m68k/configs/atari_defconfig create mode 100644 arch/m68k/configs/bvme6000_defconfig create mode 100644 arch/m68k/configs/hp300_defconfig create mode 100644 arch/m68k/configs/mac_defconfig create mode 100644 arch/m68k/configs/mvme147_defconfig create mode 100644 arch/m68k/configs/mvme16x_defconfig create mode 100644 arch/m68k/configs/q40_defconfig create mode 100644 arch/m68k/configs/sun3_defconfig create mode 100644 arch/m68k/configs/sun3x_defconfig create mode 100644 arch/m68knommu/lib/delay.c create mode 100644 arch/m68knommu/platform/5272/CANCam/crt0_ram.S create mode 100644 arch/m68knommu/platform/5272/SCALES/crt0_ram.S create mode 100644 arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S create mode 100644 arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S create mode 100644 arch/m68knommu/platform/527x/Makefile create mode 100644 arch/m68knommu/platform/527x/config.c create mode 100644 arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S create mode 100644 arch/m68knommu/platform/528x/Makefile create mode 100644 arch/m68knommu/platform/528x/config.c create mode 100644 arch/m68knommu/platform/528x/senTec/crt0_ram.S create mode 100644 arch/m68knommu/platform/5307/head.S create mode 100644 arch/m68knommu/platform/5307/pit.c create mode 100644 arch/mips/au1000/common/platform.c create mode 100644 arch/mips/configs/db1550_defconfig create mode 100644 arch/mips/configs/ocelot_3_defconfig create mode 100644 arch/mips/kernel/irix5sys.S create mode 100644 arch/mips/kernel/irq-msc01.c create mode 100644 arch/mips/kernel/irq-rm9000.c create mode 100644 arch/mips/kernel/signal-common.h create mode 100644 arch/mips/lib/iomap.c create mode 100644 arch/mips/mm/dma-ip32.c create mode 100644 arch/mips/mm/tlbex-fault.S create mode 100644 arch/mips/mm/tlbex.c create mode 100644 arch/mips/momentum/ocelot_3/Makefile create mode 100644 arch/mips/momentum/ocelot_3/int-handler.S create mode 100644 arch/mips/momentum/ocelot_3/irq.c create mode 100644 arch/mips/momentum/ocelot_3/ocelot_3_fpga.h create mode 100644 arch/mips/momentum/ocelot_3/prom.c create mode 100644 arch/mips/momentum/ocelot_3/reset.c create mode 100644 arch/mips/momentum/ocelot_3/setup.c create mode 100644 arch/mips/oprofile/Kconfig create mode 100644 arch/mips/oprofile/Makefile create mode 100644 arch/mips/oprofile/common.c create mode 100644 arch/mips/oprofile/op_impl.h create mode 100644 arch/mips/oprofile/op_model_rm9000.c create mode 100644 arch/mips/pci/fixup-ocelot3.c create mode 100644 arch/mips/pci/fixup-sb1250.c create mode 100644 arch/mips/pci/fixup-vr4133.c create mode 100644 arch/mips/sgi-ip27/ip27-dbgio.c create mode 100644 arch/mips/sgi-ip32/ip32-memory.c create mode 100644 arch/mips/vr41xx/nec-cmbvr4133/Makefile create mode 100644 arch/mips/vr41xx/nec-cmbvr4133/init.c create mode 100644 arch/mips/vr41xx/nec-cmbvr4133/irq.c create mode 100644 arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c create mode 100644 arch/mips/vr41xx/nec-cmbvr4133/setup.c create mode 100644 arch/parisc/install.sh create mode 100644 arch/parisc/kernel/topology.c create mode 100644 arch/parisc/lib/fixup.S create mode 100644 arch/parisc/lib/iomap.c create mode 100644 arch/parisc/lib/memcpy.c create mode 100644 arch/ppc/boot/include/mpsc_defs.h create mode 100644 arch/ppc/boot/simple/misc-chestnut.S create mode 100644 arch/ppc/boot/simple/misc-cpci690.c create mode 100644 arch/ppc/boot/simple/misc-katana.c create mode 100644 arch/ppc/configs/chestnut_defconfig create mode 100644 arch/ppc/configs/cpci690_defconfig create mode 100644 arch/ppc/configs/katana_defconfig create mode 100644 arch/ppc/configs/luan_defconfig create mode 100644 arch/ppc/configs/mpc8540_ads_defconfig create mode 100644 arch/ppc/configs/mpc8555_cds_defconfig create mode 100644 arch/ppc/configs/mpc8560_ads_defconfig create mode 100644 arch/ppc/configs/stx_gp3_defconfig create mode 100644 arch/ppc/kernel/machine_kexec.c create mode 100644 arch/ppc/kernel/perfmon.c create mode 100644 arch/ppc/kernel/perfmon_fsl_booke.c create mode 100644 arch/ppc/kernel/relocate_kernel.S create mode 100644 arch/ppc/oprofile/common.c create mode 100644 arch/ppc/oprofile/op_impl.h create mode 100644 arch/ppc/oprofile/op_model_fsl_booke.c create mode 100644 arch/ppc/platforms/4xx/ibm440sp.c create mode 100644 arch/ppc/platforms/4xx/ibm440sp.h create mode 100644 arch/ppc/platforms/4xx/luan.c create mode 100644 arch/ppc/platforms/4xx/luan.h create mode 100644 arch/ppc/platforms/4xx/virtex-ii_pro.c create mode 100644 arch/ppc/platforms/4xx/virtex-ii_pro.h create mode 100644 arch/ppc/platforms/4xx/xilinx_ml300.c create mode 100644 arch/ppc/platforms/4xx/xilinx_ml300.h create mode 100644 arch/ppc/platforms/4xx/xparameters/xparameters_ml300.h create mode 100644 arch/ppc/platforms/85xx/mpc85xx_devices.c create mode 100644 arch/ppc/platforms/85xx/mpc85xx_sys.c create mode 100644 arch/ppc/platforms/85xx/stx_gp3.c create mode 100644 arch/ppc/platforms/85xx/stx_gp3.h create mode 100644 arch/ppc/platforms/chestnut.c create mode 100644 arch/ppc/platforms/chestnut.h create mode 100644 arch/ppc/platforms/cpci690.c create mode 100644 arch/ppc/platforms/cpci690.h create mode 100644 arch/ppc/platforms/katana.c create mode 100644 arch/ppc/platforms/katana.h create mode 100644 arch/ppc/platforms/pmac_cache.S create mode 100644 arch/ppc/syslib/gen550.h create mode 100644 arch/ppc/syslib/ibm440sp_common.c create mode 100644 arch/ppc/syslib/ibm440sp_common.h create mode 100644 arch/ppc/syslib/mv64x60_dbg.c create mode 100644 arch/ppc/syslib/mv64x60_win.c create mode 100644 arch/ppc/syslib/ppc403_pic.c create mode 100644 arch/ppc/syslib/ppc_sys.c create mode 100644 arch/ppc/syslib/xilinx_pic.c create mode 100644 arch/ppc64/configs/maple_defconfig create mode 100644 arch/ppc64/kernel/iSeries_smp.c create mode 100644 arch/ppc64/kernel/kprobes.c create mode 100644 arch/ppc64/kernel/maple_pci.c create mode 100644 arch/ppc64/kernel/maple_setup.c create mode 100644 arch/ppc64/kernel/maple_time.c create mode 100644 arch/ppc64/kernel/mpic.c create mode 100644 arch/ppc64/kernel/mpic.h create mode 100644 arch/ppc64/kernel/pSeries_smp.c create mode 100644 arch/ppc64/kernel/pci_direct_iommu.c create mode 100644 arch/ppc64/lib/sstep.c create mode 100644 arch/ppc64/xmon/setjmp.S create mode 100644 arch/sh/boards/renesas/edosk7705/Makefile create mode 100644 arch/sh/boards/renesas/edosk7705/io.c create mode 100644 arch/sh/boards/renesas/edosk7705/setup.c create mode 100644 arch/sh/boards/se/73180/Makefile create mode 100644 arch/sh/boards/se/73180/io.c create mode 100644 arch/sh/boards/se/73180/irq.c create mode 100644 arch/sh/boards/se/73180/led.c create mode 100644 arch/sh/boards/se/73180/setup.c create mode 100644 arch/sh/boards/sh03/Makefile create mode 100644 arch/sh/boards/sh03/led.c create mode 100644 arch/sh/boards/sh03/rtc.c create mode 100644 arch/sh/boards/sh03/setup.c create mode 100644 arch/sh/boards/superh/microdev/Makefile create mode 100644 arch/sh/boards/superh/microdev/io.c create mode 100644 arch/sh/boards/superh/microdev/irq.c create mode 100644 arch/sh/boards/superh/microdev/led.c create mode 100644 arch/sh/boards/superh/microdev/setup.c create mode 100644 arch/sh/configs/microdev_defconfig create mode 100644 arch/sh/configs/se73180_defconfig create mode 100644 arch/sh/configs/se7705_defconfig create mode 100644 arch/sh/configs/sh03_defconfig create mode 100644 arch/sh/drivers/pci/fixups-sh03.c create mode 100644 arch/sh/drivers/pci/ops-sh03.c create mode 100644 arch/sh/kernel/asm-offsets.c create mode 100644 arch/sh/kernel/cpu/sh2/probe.c create mode 100644 arch/sh/kernel/cpu/sh3/probe.c create mode 100644 arch/sh/kernel/cpu/sh4/probe.c create mode 100644 arch/sh/lib/memcpy-sh4.S create mode 100644 arch/sh/mm/cache-sh7705.c create mode 100644 arch/sh/mm/pg-sh7705.c create mode 100644 arch/sh/oprofile/op_model_sh7750.c create mode 100644 arch/sh/tools/gen-mach-types create mode 100644 arch/sparc64/prom/cif.S create mode 100644 arch/um/Kconfig_i386 create mode 100644 arch/um/Kconfig_x86_64 create mode 100644 arch/um/Makefile-x86_64 create mode 100644 arch/um/drivers/stderr_console.c create mode 100644 arch/um/include/elf_user.h create mode 100644 arch/um/include/registers.h create mode 100644 arch/um/include/sysdep-i386/signal.h create mode 100644 arch/um/include/sysdep-x86_64/checksum.h create mode 100644 arch/um/include/sysdep-x86_64/ptrace.h create mode 100644 arch/um/include/sysdep-x86_64/ptrace_user.h create mode 100644 arch/um/include/sysdep-x86_64/sigcontext.h create mode 100644 arch/um/include/sysdep-x86_64/signal.h create mode 100644 arch/um/include/sysdep-x86_64/syscalls.h create mode 100644 arch/um/kernel/skas/include/mmu-skas.h create mode 100644 arch/um/kernel/skas/include/mode-skas.h create mode 100644 arch/um/kernel/skas/include/mode_kern-skas.h create mode 100644 arch/um/kernel/skas/include/uaccess-skas.h create mode 100644 arch/um/kernel/skas/util/mk_ptregs-i386.c create mode 100644 arch/um/kernel/skas/util/mk_ptregs-x86_64.c create mode 100644 arch/um/kernel/tt/include/mmu-tt.h create mode 100644 arch/um/kernel/tt/include/mode-tt.h create mode 100644 arch/um/kernel/tt/include/mode_kern-tt.h create mode 100644 arch/um/kernel/tt/include/uaccess-tt.h create mode 100644 arch/um/os-Linux/elf_aux.c create mode 100644 arch/um/os-Linux/signal.c create mode 100644 arch/um/os-Linux/sys-i386/Makefile create mode 100644 arch/um/os-Linux/sys-i386/registers.c create mode 100644 arch/um/os-Linux/sys-x86_64/Makefile create mode 100644 arch/um/os-Linux/sys-x86_64/registers.c create mode 100644 arch/um/sys-i386/delay.c create mode 100644 arch/um/sys-i386/signal.c create mode 100644 arch/um/sys-x86_64/Makefile create mode 100644 arch/um/sys-x86_64/bugs.c create mode 100644 arch/um/sys-x86_64/delay.c create mode 100644 arch/um/sys-x86_64/fault.c create mode 100644 arch/um/sys-x86_64/mem.c create mode 100644 arch/um/sys-x86_64/ptrace.c create mode 100644 arch/um/sys-x86_64/ptrace_user.c create mode 100644 arch/um/sys-x86_64/sigcontext.c create mode 100644 arch/um/sys-x86_64/signal.c create mode 100644 arch/um/sys-x86_64/syscalls.c create mode 100644 arch/um/sys-x86_64/sysrq.c create mode 100644 arch/um/sys-x86_64/util/Makefile create mode 100644 arch/um/sys-x86_64/util/mk_sc.c create mode 100644 arch/um/sys-x86_64/util/mk_thread_kern.c create mode 100644 arch/um/sys-x86_64/util/mk_thread_user.c create mode 100644 arch/x86_64/kernel/genapic.c create mode 100644 arch/x86_64/kernel/genapic_cluster.c create mode 100644 arch/x86_64/kernel/genapic_flat.c create mode 100644 arch/x86_64/kernel/kprobes.c create mode 100644 arch/x86_64/kernel/machine_kexec.c create mode 100644 arch/x86_64/kernel/mce_intel.c create mode 100644 arch/x86_64/kernel/relocate_kernel.S create mode 100644 arch/x86_64/mm/srat.c create mode 100644 crypto/anubis.c create mode 100644 drivers/acpi/container.c create mode 100644 drivers/acpi/ibm_acpi.c create mode 100644 drivers/acpi/processor_core.c create mode 100644 drivers/acpi/processor_idle.c create mode 100644 drivers/acpi/processor_perflib.c create mode 100644 drivers/acpi/processor_thermal.c create mode 100644 drivers/acpi/processor_throttling.c create mode 100644 drivers/acpi/video.c create mode 100644 drivers/base/attribute_container.c create mode 100644 drivers/base/transport_class.c create mode 100644 drivers/block/aoe/Makefile create mode 100644 drivers/block/aoe/aoe.h create mode 100644 drivers/block/aoe/aoeblk.c create mode 100644 drivers/block/aoe/aoechr.c create mode 100644 drivers/block/aoe/aoecmd.c create mode 100644 drivers/block/aoe/aoedev.c create mode 100644 drivers/block/aoe/aoemain.c create mode 100644 drivers/block/aoe/aoenet.c create mode 100644 drivers/block/pktcdvd.c create mode 100644 drivers/bluetooth/bpa10x.c create mode 100644 drivers/char/drm/ati_pcigart.c create mode 100644 drivers/char/drm/drm_agpsupport.c create mode 100644 drivers/char/drm/drm_auth.c create mode 100644 drivers/char/drm/drm_bufs.c create mode 100644 drivers/char/drm/drm_context.c create mode 100644 drivers/char/drm/drm_dma.c create mode 100644 drivers/char/drm/drm_drawable.c create mode 100644 drivers/char/drm/drm_drv.c create mode 100644 drivers/char/drm/drm_fops.c create mode 100644 drivers/char/drm/drm_init.c create mode 100644 drivers/char/drm/drm_ioctl.c create mode 100644 drivers/char/drm/drm_irq.c create mode 100644 drivers/char/drm/drm_lock.c create mode 100644 drivers/char/drm/drm_memory.c create mode 100644 drivers/char/drm/drm_pci.c create mode 100644 drivers/char/drm/drm_proc.c create mode 100644 drivers/char/drm/drm_scatter.c create mode 100644 drivers/char/drm/drm_stub.c create mode 100644 drivers/char/drm/drm_sysfs.c create mode 100644 drivers/char/drm/drm_vm.c create mode 100644 drivers/char/drm/tdfx_drv.h create mode 100644 drivers/char/ds1302.c create mode 100644 drivers/char/mxser.h create mode 100644 drivers/char/s3c2410-rtc.c create mode 100644 drivers/char/watchdog/s3c2410_wdt.c create mode 100644 drivers/cpufreq/cpufreq_stats.c create mode 100644 drivers/crypto/Kconfig create mode 100644 drivers/crypto/Makefile create mode 100644 drivers/crypto/padlock-aes.c create mode 100644 drivers/crypto/padlock-generic.c create mode 100644 drivers/crypto/padlock.h create mode 100644 drivers/dio/dio-driver.c create mode 100644 drivers/dio/dio-sysfs.c create mode 100644 drivers/i2c/algos/i2c-algo-sgi.c create mode 100644 drivers/i2c/algos/i2c-algo-sibyte.c create mode 100644 drivers/i2c/busses/i2c-amd756-s4882.c create mode 100644 drivers/i2c/busses/i2c-au1550.c create mode 100644 drivers/i2c/busses/i2c-au1550.h create mode 100644 drivers/i2c/busses/i2c-s3c2410.c create mode 100644 drivers/i2c/busses/i2c-sibyte.c create mode 100644 drivers/i2c/busses/i2c-stub.c create mode 100644 drivers/i2c/chips/adm1026.c create mode 100644 drivers/i2c/chips/lm63.c create mode 100644 drivers/i2c/chips/lm87.c create mode 100644 drivers/i2c/chips/pc87360.c create mode 100644 drivers/i2c/chips/smsc47b397.c create mode 100644 drivers/ide/cris/Makefile create mode 100644 drivers/ide/cris/ide-v10.c create mode 100644 drivers/ide/pci/it821x.c create mode 100644 drivers/infiniband/Kconfig create mode 100644 drivers/infiniband/Makefile create mode 100644 drivers/infiniband/core/Makefile create mode 100644 drivers/infiniband/core/agent.c create mode 100644 drivers/infiniband/core/agent.h create mode 100644 drivers/infiniband/core/agent_priv.h create mode 100644 drivers/infiniband/core/cache.c create mode 100644 drivers/infiniband/core/core_priv.h create mode 100644 drivers/infiniband/core/device.c create mode 100644 drivers/infiniband/core/fmr_pool.c create mode 100644 drivers/infiniband/core/mad.c create mode 100644 drivers/infiniband/core/mad_priv.h create mode 100644 drivers/infiniband/core/packer.c create mode 100644 drivers/infiniband/core/sa_query.c create mode 100644 drivers/infiniband/core/smi.c create mode 100644 drivers/infiniband/core/smi.h create mode 100644 drivers/infiniband/core/sysfs.c create mode 100644 drivers/infiniband/core/ud_header.c create mode 100644 drivers/infiniband/core/user_mad.c create mode 100644 drivers/infiniband/core/verbs.c create mode 100644 drivers/infiniband/hw/mthca/Kconfig create mode 100644 drivers/infiniband/hw/mthca/Makefile create mode 100644 drivers/infiniband/hw/mthca/mthca_allocator.c create mode 100644 drivers/infiniband/hw/mthca/mthca_av.c create mode 100644 drivers/infiniband/hw/mthca/mthca_cmd.c create mode 100644 drivers/infiniband/hw/mthca/mthca_cmd.h create mode 100644 drivers/infiniband/hw/mthca/mthca_config_reg.h create mode 100644 drivers/infiniband/hw/mthca/mthca_cq.c create mode 100644 drivers/infiniband/hw/mthca/mthca_dev.h create mode 100644 drivers/infiniband/hw/mthca/mthca_doorbell.h create mode 100644 drivers/infiniband/hw/mthca/mthca_eq.c create mode 100644 drivers/infiniband/hw/mthca/mthca_mad.c create mode 100644 drivers/infiniband/hw/mthca/mthca_main.c create mode 100644 drivers/infiniband/hw/mthca/mthca_mcg.c create mode 100644 drivers/infiniband/hw/mthca/mthca_memfree.c create mode 100644 drivers/infiniband/hw/mthca/mthca_memfree.h create mode 100644 drivers/infiniband/hw/mthca/mthca_mr.c create mode 100644 drivers/infiniband/hw/mthca/mthca_pd.c create mode 100644 drivers/infiniband/hw/mthca/mthca_profile.c create mode 100644 drivers/infiniband/hw/mthca/mthca_profile.h create mode 100644 drivers/infiniband/hw/mthca/mthca_provider.c create mode 100644 drivers/infiniband/hw/mthca/mthca_provider.h create mode 100644 drivers/infiniband/hw/mthca/mthca_qp.c create mode 100644 drivers/infiniband/hw/mthca/mthca_reset.c create mode 100644 drivers/infiniband/include/ib_cache.h create mode 100644 drivers/infiniband/include/ib_fmr_pool.h create mode 100644 drivers/infiniband/include/ib_mad.h create mode 100644 drivers/infiniband/include/ib_pack.h create mode 100644 drivers/infiniband/include/ib_sa.h create mode 100644 drivers/infiniband/include/ib_smi.h create mode 100644 drivers/infiniband/include/ib_user_mad.h create mode 100644 drivers/infiniband/include/ib_verbs.h create mode 100644 drivers/infiniband/ulp/ipoib/Kconfig create mode 100644 drivers/infiniband/ulp/ipoib/Makefile create mode 100644 drivers/infiniband/ulp/ipoib/ipoib.h create mode 100644 drivers/infiniband/ulp/ipoib/ipoib_fs.c create mode 100644 drivers/infiniband/ulp/ipoib/ipoib_ib.c create mode 100644 drivers/infiniband/ulp/ipoib/ipoib_main.c create mode 100644 drivers/infiniband/ulp/ipoib/ipoib_multicast.c create mode 100644 drivers/infiniband/ulp/ipoib/ipoib_verbs.c create mode 100644 drivers/infiniband/ulp/ipoib/ipoib_vlan.c create mode 100644 drivers/input/mouse/alps.c create mode 100644 drivers/input/mouse/alps.h create mode 100644 drivers/input/serio/i8042-x86ia64io.h create mode 100644 drivers/input/serio/libps2.c create mode 100644 drivers/md/faulty.c create mode 100644 drivers/md/raid6altivec.uc create mode 100644 drivers/media/dvb/b2c2/b2c2-common.c create mode 100644 drivers/media/dvb/b2c2/b2c2-usb-core.c create mode 100644 drivers/media/dvb/bt8xx/dst.c create mode 100644 drivers/media/dvb/bt8xx/dst.h create mode 100644 drivers/media/dvb/bt8xx/dst_priv.h create mode 100644 drivers/media/dvb/cinergyT2/Kconfig create mode 100644 drivers/media/dvb/cinergyT2/Makefile create mode 100644 drivers/media/dvb/cinergyT2/cinergyT2.c create mode 100644 drivers/media/dvb/dibusb/Kconfig create mode 100644 drivers/media/dvb/dibusb/Makefile create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-core.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-dvb.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-firmware.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-pid.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-remote.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-usb.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb.h create mode 100644 drivers/media/dvb/frontends/at76c651.h create mode 100644 drivers/media/dvb/frontends/cx22700.c create mode 100644 drivers/media/dvb/frontends/cx22700.h create mode 100644 drivers/media/dvb/frontends/cx22702.c create mode 100644 drivers/media/dvb/frontends/cx22702.h create mode 100644 drivers/media/dvb/frontends/cx24110.h create mode 100644 drivers/media/dvb/frontends/dib3000-common.c create mode 100644 drivers/media/dvb/frontends/dib3000-common.h create mode 100644 drivers/media/dvb/frontends/dib3000.h create mode 100644 drivers/media/dvb/frontends/dib3000mb.c create mode 100644 drivers/media/dvb/frontends/dib3000mb_priv.h create mode 100644 drivers/media/dvb/frontends/dib3000mc.c create mode 100644 drivers/media/dvb/frontends/dib3000mc_priv.h create mode 100644 drivers/media/dvb/frontends/dvb_dummy_fe.h create mode 100644 drivers/media/dvb/frontends/l64781.c create mode 100644 drivers/media/dvb/frontends/l64781.h create mode 100644 drivers/media/dvb/frontends/mt312_priv.h create mode 100644 drivers/media/dvb/frontends/mt352.c create mode 100644 drivers/media/dvb/frontends/mt352.h create mode 100644 drivers/media/dvb/frontends/mt352_priv.h create mode 100644 drivers/media/dvb/frontends/nxt2002.c create mode 100644 drivers/media/dvb/frontends/nxt2002.h create mode 100644 drivers/media/dvb/frontends/nxt6000_priv.h create mode 100644 drivers/media/dvb/frontends/sp8870.c create mode 100644 drivers/media/dvb/frontends/sp8870.h create mode 100644 drivers/media/dvb/frontends/sp887x.h create mode 100644 drivers/media/dvb/frontends/stv0297.c create mode 100644 drivers/media/dvb/frontends/stv0297.h create mode 100644 drivers/media/dvb/frontends/stv0299.h create mode 100644 drivers/media/dvb/frontends/tda10021.c create mode 100644 drivers/media/dvb/frontends/tda10021.h create mode 100644 drivers/media/dvb/frontends/tda1004x.h create mode 100644 drivers/media/dvb/frontends/tda8083.c create mode 100644 drivers/media/dvb/frontends/tda8083.h create mode 100644 drivers/media/dvb/frontends/tda80xx.c create mode 100644 drivers/media/dvb/frontends/tda80xx.h create mode 100644 drivers/media/dvb/frontends/ves1820.h create mode 100644 drivers/media/dvb/frontends/ves1x93.h create mode 100644 drivers/media/dvb/ttusb-dec/ttusbdecfe.c create mode 100644 drivers/media/dvb/ttusb-dec/ttusbdecfe.h create mode 100644 drivers/media/video/arv.c create mode 100644 drivers/media/video/cx88/cx88-blackbird.c create mode 100644 drivers/media/video/cx88/cx88-dvb.c create mode 100644 drivers/media/video/cx88/cx88-mpeg.c create mode 100644 drivers/media/video/saa7134/saa7134-dvb.c create mode 100644 drivers/media/video/saa7134/saa7134-empress.c create mode 100644 drivers/media/video/tveeprom.c create mode 100644 drivers/media/video/video-buf-dvb.c create mode 100644 drivers/mmc/wbsd.c create mode 100644 drivers/mmc/wbsd.h create mode 100644 drivers/mtd/chips/fwh_lock.h create mode 100644 drivers/mtd/devices/block2mtd.c create mode 100644 drivers/mtd/maps/bast-flash.c create mode 100644 drivers/mtd/maps/chestnut.c create mode 100644 drivers/mtd/maps/ipaq-flash.c create mode 100644 drivers/mtd/maps/ocotea.c create mode 100644 drivers/mtd/maps/sharpsl-flash.c create mode 100644 drivers/mtd/maps/ts5500_flash.c create mode 100644 drivers/mtd/maps/walnut.c create mode 100644 drivers/mtd/nand/h1910.c create mode 100644 drivers/mtd/nand/nandsim.c create mode 100644 drivers/mtd/nand/rtc_from4.c create mode 100644 drivers/mtd/nand/s3c2410.c create mode 100755 drivers/mtd/nand/sharpsl.c create mode 100644 drivers/net/arcnet/capmode.c create mode 100644 drivers/net/cris/Makefile create mode 100644 drivers/net/cris/eth_v10.c create mode 100644 drivers/net/sk98lin/skethtool.c create mode 100644 drivers/pci/pci-acpi.c create mode 100644 drivers/pci/pcie/Kconfig create mode 100644 drivers/pci/pcie/Makefile create mode 100644 drivers/pci/pcie/portdrv.h create mode 100644 drivers/pci/pcie/portdrv_bus.c create mode 100644 drivers/pci/pcie/portdrv_core.c create mode 100644 drivers/pci/pcie/portdrv_pci.c create mode 100644 drivers/pci/rom.c create mode 100644 drivers/pcmcia/au1000_db1x00.c create mode 100644 drivers/pcmcia/au1000_generic.h create mode 100644 drivers/pcmcia/au1000_xxs1500.c create mode 100644 drivers/pcmcia/m32r_cfc.c create mode 100644 drivers/pcmcia/m32r_cfc.h create mode 100644 drivers/pcmcia/m32r_pcc.c create mode 100644 drivers/pcmcia/m32r_pcc.h create mode 100644 drivers/pcmcia/pcmcia_compat.c create mode 100644 drivers/pcmcia/pxa2xx_sharpsl.c create mode 100644 drivers/pcmcia/rsrc_nonstatic.c create mode 100644 drivers/pcmcia/vrc4171_card.c create mode 100644 drivers/pcmcia/vrc4173_cardu.c create mode 100644 drivers/pcmcia/vrc4173_cardu.h create mode 100644 drivers/pnp/pnpacpi/Kconfig create mode 100644 drivers/pnp/pnpacpi/Makefile create mode 100644 drivers/pnp/pnpacpi/core.c create mode 100644 drivers/pnp/pnpacpi/pnpacpi.h create mode 100644 drivers/pnp/pnpacpi/rsparser.c create mode 100644 drivers/s390/char/monreader.c create mode 100644 drivers/s390/char/sclp_quiesce.c create mode 100644 drivers/s390/char/vmlogrdr.c create mode 100644 drivers/s390/char/vmwatchdog.c create mode 100644 drivers/scsi/a100u2w.c create mode 100644 drivers/scsi/a100u2w.h create mode 100644 drivers/scsi/ahci.c create mode 100644 drivers/scsi/aic7xxx/aic79xx_pci.h create mode 100644 drivers/scsi/aic7xxx/aic7xxx_pci.h create mode 100644 drivers/scsi/gdth_kcompat.h create mode 100644 drivers/scsi/initio.c create mode 100644 drivers/scsi/initio.h create mode 100644 drivers/scsi/lpfc/Makefile create mode 100644 drivers/scsi/lpfc/lpfc.h create mode 100644 drivers/scsi/lpfc/lpfc_compat.h create mode 100644 drivers/scsi/lpfc/lpfc_crtn.h create mode 100644 drivers/scsi/lpfc/lpfc_ct.c create mode 100644 drivers/scsi/lpfc/lpfc_disc.h create mode 100644 drivers/scsi/lpfc/lpfc_els.c create mode 100644 drivers/scsi/lpfc/lpfc_hbadisc.c create mode 100644 drivers/scsi/lpfc/lpfc_hw.h create mode 100644 drivers/scsi/lpfc/lpfc_init.c create mode 100644 drivers/scsi/lpfc/lpfc_logmsg.h create mode 100644 drivers/scsi/lpfc/lpfc_mbox.c create mode 100644 drivers/scsi/lpfc/lpfc_mem.c create mode 100644 drivers/scsi/lpfc/lpfc_nportdisc.c create mode 100644 drivers/scsi/lpfc/lpfc_scsi.h create mode 100644 drivers/scsi/lpfc/lpfc_sli.c create mode 100644 drivers/scsi/lpfc/lpfc_sli.h create mode 100644 drivers/scsi/lpfc/lpfc_version.h create mode 100644 drivers/scsi/ql1040_fw.h create mode 100644 drivers/scsi/sata_qstor.c create mode 100644 drivers/scsi/sata_uli.c create mode 100644 drivers/scsi/scsi_transport_iscsi.c create mode 100644 drivers/serial/8250_early.c create mode 100644 drivers/serial/8250_hp300.c create mode 100644 drivers/serial/crisv10.c create mode 100644 drivers/serial/crisv10.h create mode 100644 drivers/serial/imx.c create mode 100644 drivers/serial/m32r_sio.c create mode 100644 drivers/serial/m32r_sio.h create mode 100644 drivers/serial/m32r_sio_reg.h create mode 100644 drivers/serial/mpsc.c create mode 100644 drivers/serial/mpsc.h create mode 100644 drivers/serial/serial_txx9.c create mode 100644 drivers/usb/atm/Kconfig create mode 100644 drivers/usb/atm/Makefile create mode 100644 drivers/usb/atm/speedtch.c create mode 100644 drivers/usb/atm/usb_atm.c create mode 100644 drivers/usb/atm/usb_atm.h create mode 100644 drivers/usb/host/hc_crisv10.c create mode 100644 drivers/usb/host/hc_crisv10.h create mode 100644 drivers/usb/host/ohci-au1xxx.c create mode 100644 drivers/usb/host/ohci-pxa27x.c create mode 100644 drivers/usb/host/sl811-hcd.c create mode 100644 drivers/usb/host/sl811.h create mode 100644 drivers/usb/media/pwc/Makefile create mode 100644 drivers/usb/media/pwc/pwc-ctrl.c create mode 100644 drivers/usb/media/pwc/pwc-if.c create mode 100644 drivers/usb/media/pwc/pwc-ioctl.h create mode 100644 drivers/usb/media/pwc/pwc-kiara.c create mode 100644 drivers/usb/media/pwc/pwc-timon.c create mode 100644 drivers/usb/media/pwc/pwc-uncompress.c create mode 100644 drivers/usb/media/pwc/pwc.h create mode 100644 drivers/usb/media/sn9c102_hv7131d.c create mode 100644 drivers/usb/media/sn9c102_mi0343.c create mode 100644 drivers/usb/misc/idmouse.c create mode 100644 drivers/usb/misc/phidgetkit.c create mode 100644 drivers/usb/serial/cypress_m8.c create mode 100644 drivers/usb/serial/cypress_m8.h create mode 100644 drivers/usb/serial/garmin_gps.c create mode 100644 drivers/usb/serial/ipw.c create mode 100644 drivers/usb/serial/ti_fw_3410.h create mode 100644 drivers/usb/serial/ti_fw_5052.h create mode 100644 drivers/usb/serial/ti_usb_3410_5052.c create mode 100644 drivers/usb/serial/ti_usb_3410_5052.h create mode 100644 drivers/video/au1100fb.c create mode 100644 drivers/video/au1100fb.h create mode 100644 drivers/video/backlight/Kconfig create mode 100644 drivers/video/backlight/Makefile create mode 100644 drivers/video/backlight/backlight.c create mode 100644 drivers/video/backlight/corgi_bl.c create mode 100644 drivers/video/backlight/lcd.c create mode 100644 drivers/video/bt431.h create mode 100644 drivers/video/bt455.h create mode 100644 drivers/video/console/bitblit.c create mode 100644 drivers/video/console/tileblit.c create mode 100644 drivers/video/intelfb/Makefile create mode 100644 drivers/video/intelfb/intelfb.h create mode 100644 drivers/video/intelfb/intelfbdrv.c create mode 100644 drivers/video/intelfb/intelfbdrv.h create mode 100644 drivers/video/intelfb/intelfbhw.c create mode 100644 drivers/video/intelfb/intelfbhw.h create mode 100644 drivers/video/pmag-aa-fb.c create mode 100644 drivers/video/savage/Makefile create mode 100644 drivers/video/savage/savagefb-i2c.c create mode 100644 drivers/video/savage/savagefb.c create mode 100644 drivers/video/savage/savagefb.h create mode 100644 drivers/video/savage/savagefb_accel.c create mode 100644 drivers/video/w100fb.c create mode 100644 drivers/video/w100fb.h create mode 100644 fs/affs/affs.h create mode 100644 fs/binfmt_elf_fdpic.c create mode 100644 fs/cifs/readdir.c create mode 100644 fs/debugfs/Makefile create mode 100644 fs/debugfs/file.c create mode 100644 fs/debugfs/inode.c create mode 100644 fs/hfs/attr.c create mode 100644 fs/nfsd/nfs4callback.c create mode 100644 fs/ntfs/aops.h create mode 100644 fs/ntfs/runlist.c create mode 100644 fs/ntfs/runlist.h create mode 100644 fs/proc/internal.h create mode 100644 fs/proc/mmu.c create mode 100644 fs/proc/nommu.c create mode 100644 fs/proc/vmcore.c create mode 100644 fs/xfs/Kconfig create mode 100644 fs/xfs/linux-2.6/xfs_export.c create mode 100644 include/acpi/container.h create mode 100644 include/asm-alpha/cputime.h create mode 100644 include/asm-arm/arch-cl7500/debug-macro.S create mode 100644 include/asm-arm/arch-cl7500/entry-macro.S create mode 100644 include/asm-arm/arch-clps711x/debug-macro.S create mode 100644 include/asm-arm/arch-clps711x/entry-macro.S create mode 100644 include/asm-arm/arch-ebsa110/debug-macro.S create mode 100644 include/asm-arm/arch-ebsa110/entry-macro.S create mode 100644 include/asm-arm/arch-ebsa285/debug-macro.S create mode 100644 include/asm-arm/arch-ebsa285/entry-macro.S create mode 100644 include/asm-arm/arch-epxa10db/debug-macro.S create mode 100644 include/asm-arm/arch-epxa10db/entry-macro.S create mode 100644 include/asm-arm/arch-h720x/debug-macro.S create mode 100644 include/asm-arm/arch-h720x/entry-macro.S create mode 100644 include/asm-arm/arch-imx/debug-macro.S create mode 100644 include/asm-arm/arch-imx/entry-macro.S create mode 100644 include/asm-arm/arch-integrator/debug-macro.S create mode 100644 include/asm-arm/arch-integrator/entry-macro.S create mode 100644 include/asm-arm/arch-iop3xx/debug-macro.S create mode 100644 include/asm-arm/arch-iop3xx/entry-macro.S create mode 100644 include/asm-arm/arch-iop3xx/iq80332.h create mode 100644 include/asm-arm/arch-ixp2000/debug-macro.S create mode 100644 include/asm-arm/arch-ixp2000/entry-macro.S create mode 100644 include/asm-arm/arch-ixp4xx/debug-macro.S create mode 100644 include/asm-arm/arch-ixp4xx/entry-macro.S create mode 100644 include/asm-arm/arch-ixp4xx/gtwx5715.h create mode 100644 include/asm-arm/arch-l7200/debug-macro.S create mode 100644 include/asm-arm/arch-l7200/entry-macro.S create mode 100644 include/asm-arm/arch-lh7a40x/debug-macro.S create mode 100644 include/asm-arm/arch-lh7a40x/entry-macro.S create mode 100644 include/asm-arm/arch-omap/cpu.h create mode 100644 include/asm-arm/arch-omap/debug-macro.S create mode 100644 include/asm-arm/arch-omap/entry-macro.S create mode 100644 include/asm-arm/arch-omap/omap16xx.h create mode 100644 include/asm-arm/arch-omap/tc.h create mode 100644 include/asm-arm/arch-pxa/audio.h create mode 100644 include/asm-arm/arch-pxa/corgi.h create mode 100644 include/asm-arm/arch-pxa/debug-macro.S create mode 100644 include/asm-arm/arch-pxa/entry-macro.S create mode 100644 include/asm-arm/arch-pxa/ssp.h create mode 100644 include/asm-arm/arch-rpc/debug-macro.S create mode 100644 include/asm-arm/arch-rpc/entry-macro.S create mode 100644 include/asm-arm/arch-s3c2410/bast-pmu.h create mode 100644 include/asm-arm/arch-s3c2410/debug-macro.S create mode 100644 include/asm-arm/arch-s3c2410/entry-macro.S create mode 100644 include/asm-arm/arch-s3c2410/idle.h create mode 100644 include/asm-arm/arch-s3c2410/iic.h create mode 100644 include/asm-arm/arch-sa1100/debug-macro.S create mode 100644 include/asm-arm/arch-sa1100/entry-macro.S create mode 100644 include/asm-arm/arch-shark/debug-macro.S create mode 100644 include/asm-arm/arch-shark/entry-macro.S create mode 100644 include/asm-arm/arch-versatile/debug-macro.S create mode 100644 include/asm-arm/arch-versatile/entry-macro.S create mode 100644 include/asm-arm/cpu.h create mode 100644 include/asm-arm/cputime.h create mode 100644 include/asm-arm/hardware/entry-macro-iomd.S create mode 100644 include/asm-arm/hardware/icst307.h create mode 100644 include/asm-arm/hardware/scoop.h create mode 100644 include/asm-arm/mach/irda.h create mode 100644 include/asm-arm/rtc.h create mode 100644 include/asm-arm26/cputime.h create mode 100644 include/asm-arm26/dma-mapping.h create mode 100644 include/asm-cris/cputime.h create mode 100644 include/asm-frv/a.out.h create mode 100644 include/asm-frv/atomic.h create mode 100644 include/asm-frv/ax88796.h create mode 100644 include/asm-frv/bitops.h create mode 100644 include/asm-frv/bug.h create mode 100644 include/asm-frv/bugs.h create mode 100644 include/asm-frv/busctl-regs.h create mode 100644 include/asm-frv/byteorder.h create mode 100644 include/asm-frv/cache.h create mode 100644 include/asm-frv/cacheflush.h create mode 100644 include/asm-frv/checksum.h create mode 100644 include/asm-frv/cpu-irqs.h create mode 100644 include/asm-frv/cpumask.h create mode 100644 include/asm-frv/cputime.h create mode 100644 include/asm-frv/current.h create mode 100644 include/asm-frv/delay.h create mode 100644 include/asm-frv/div64.h create mode 100644 include/asm-frv/dm9000.h create mode 100644 include/asm-frv/dma-mapping.h create mode 100644 include/asm-frv/dma.h create mode 100644 include/asm-frv/elf.h create mode 100644 include/asm-frv/errno.h create mode 100644 include/asm-frv/fcntl.h create mode 100644 include/asm-frv/fpu.h create mode 100644 include/asm-frv/gdb-stub.h create mode 100644 include/asm-frv/gpio-regs.h create mode 100644 include/asm-frv/hardirq.h create mode 100644 include/asm-frv/highmem.h create mode 100644 include/asm-frv/hw_irq.h create mode 100644 include/asm-frv/ide.h create mode 100644 include/asm-frv/init.h create mode 100644 include/asm-frv/io.h create mode 100644 include/asm-frv/ioctl.h create mode 100644 include/asm-frv/ioctls.h create mode 100644 include/asm-frv/ipc.h create mode 100644 include/asm-frv/ipcbuf.h create mode 100644 include/asm-frv/irc-regs.h create mode 100644 include/asm-frv/irq-routing.h create mode 100644 include/asm-frv/irq.h create mode 100644 include/asm-frv/kmap_types.h create mode 100644 include/asm-frv/linkage.h create mode 100644 include/asm-frv/local.h create mode 100644 include/asm-frv/math-emu.h create mode 100644 include/asm-frv/mb-regs.h create mode 100644 include/asm-frv/mb86943a.h create mode 100644 include/asm-frv/mb93091-fpga-irqs.h create mode 100644 include/asm-frv/mb93093-fpga-irqs.h create mode 100644 include/asm-frv/mb93493-irqs.h create mode 100644 include/asm-frv/mb93493-regs.h create mode 100644 include/asm-frv/mem-layout.h create mode 100644 include/asm-frv/mman.h create mode 100644 include/asm-frv/mmu.h create mode 100644 include/asm-frv/mmu_context.h create mode 100644 include/asm-frv/module.h create mode 100644 include/asm-frv/msgbuf.h create mode 100644 include/asm-frv/namei.h create mode 100644 include/asm-frv/page.h create mode 100644 include/asm-frv/param.h create mode 100644 include/asm-frv/pci.h create mode 100644 include/asm-frv/percpu.h create mode 100644 include/asm-frv/pgalloc.h create mode 100644 include/asm-frv/pgtable.h create mode 100644 include/asm-frv/poll.h create mode 100644 include/asm-frv/posix_types.h create mode 100644 include/asm-frv/processor.h create mode 100644 include/asm-frv/ptrace.h create mode 100644 include/asm-frv/registers.h create mode 100644 include/asm-frv/resource.h create mode 100644 include/asm-frv/scatterlist.h create mode 100644 include/asm-frv/sections.h create mode 100644 include/asm-frv/segment.h create mode 100644 include/asm-frv/semaphore.h create mode 100644 include/asm-frv/sembuf.h create mode 100644 include/asm-frv/serial-regs.h create mode 100644 include/asm-frv/serial.h create mode 100644 include/asm-frv/setup.h create mode 100644 include/asm-frv/shmbuf.h create mode 100644 include/asm-frv/shmparam.h create mode 100644 include/asm-frv/sigcontext.h create mode 100644 include/asm-frv/siginfo.h create mode 100644 include/asm-frv/signal.h create mode 100644 include/asm-frv/smp.h create mode 100644 include/asm-frv/socket.h create mode 100644 include/asm-frv/sockios.h create mode 100644 include/asm-frv/spinlock.h create mode 100644 include/asm-frv/spr-regs.h create mode 100644 include/asm-frv/stat.h create mode 100644 include/asm-frv/statfs.h create mode 100644 include/asm-frv/string.h create mode 100644 include/asm-frv/suspend.h create mode 100644 include/asm-frv/system.h create mode 100644 include/asm-frv/termbits.h create mode 100644 include/asm-frv/termios.h create mode 100644 include/asm-frv/thread_info.h create mode 100644 include/asm-frv/timer-regs.h create mode 100644 include/asm-frv/timex.h create mode 100644 include/asm-frv/tlb.h create mode 100644 include/asm-frv/tlbflush.h create mode 100644 include/asm-frv/topology.h create mode 100644 include/asm-frv/types.h create mode 100644 include/asm-frv/uaccess.h create mode 100644 include/asm-frv/ucontext.h create mode 100644 include/asm-frv/unaligned.h create mode 100644 include/asm-frv/unistd.h create mode 100644 include/asm-frv/user.h create mode 100644 include/asm-frv/virtconvert.h create mode 100644 include/asm-generic/4level-fixup.h create mode 100644 include/asm-generic/cputime.h create mode 100644 include/asm-generic/pgtable-nopmd.h create mode 100644 include/asm-generic/pgtable-nopud.h create mode 100644 include/asm-generic/resource.h create mode 100644 include/asm-generic/termios.h create mode 100644 include/asm-h8300/cputime.h create mode 100644 include/asm-i386/cputime.h create mode 100644 include/asm-i386/pci-direct.h create mode 100644 include/asm-ia64/cputime.h create mode 100644 include/asm-ia64/machvec_hpzx1_swiotlb.h create mode 100644 include/asm-ia64/sn/l1.h create mode 100644 include/asm-ia64/sn/shub_mmr.h create mode 100644 include/asm-ia64/sn/shubio.h create mode 100644 include/asm-m32r/cputime.h create mode 100644 include/asm-m68k/cputime.h create mode 100644 include/asm-m68k/hp300hw.h create mode 100644 include/asm-m68knommu/cputime.h create mode 100644 include/asm-m68knommu/m527xsim.h create mode 100644 include/asm-m68knommu/m528xsim.h create mode 100644 include/asm-m68knommu/mcfcache.h create mode 100644 include/asm-mips/compiler.h create mode 100644 include/asm-mips/cpu-info.h create mode 100644 include/asm-mips/cputime.h create mode 100644 include/asm-mips/dec/serial.h create mode 100644 include/asm-mips/interrupt.h create mode 100644 include/asm-mips/m48t37.h create mode 100644 include/asm-mips/mach-ip22/spaces.h create mode 100644 include/asm-mips/mach-ip32/cpu-feature-overrides.h create mode 100644 include/asm-mips/mach-ip32/spaces.h create mode 100644 include/asm-mips/mach-mips/cpu-feature-overrides.h create mode 100644 include/asm-mips/mach-ocelot3/cpu-feature-overrides.h create mode 100644 include/asm-mips/mach-sibyte/cpu-feature-overrides.h create mode 100644 include/asm-mips/msc01_ic.h create mode 100644 include/asm-mips/reg.h create mode 100644 include/asm-mips/tx4927/smsc_fdc37m81x.h create mode 100644 include/asm-mips/vr41xx/cmbvr4133.h create mode 100644 include/asm-parisc/cputime.h create mode 100644 include/asm-ppc/cputime.h create mode 100644 include/asm-ppc/perfmon.h create mode 100644 include/asm-ppc/ppc_sys.h create mode 100644 include/asm-ppc/xparameters.h create mode 100644 include/asm-ppc64/cputime.h create mode 100644 include/asm-ppc64/kdebug.h create mode 100644 include/asm-ppc64/kprobes.h create mode 100644 include/asm-ppc64/lppaca.h create mode 100644 include/asm-ppc64/sstep.h create mode 100644 include/asm-s390/cputime.h create mode 100644 include/asm-sh/cputime.h create mode 100644 include/asm-sh/edosk7705/io.h create mode 100644 include/asm-sh/irq-sh73180.h create mode 100644 include/asm-sh/microdev/io.h create mode 100644 include/asm-sh/microdev/irq.h create mode 100644 include/asm-sh/se73180/io.h create mode 100644 include/asm-sh/se73180/se73180.h create mode 100644 include/asm-sh/sh03/io.h create mode 100644 include/asm-sh/sh03/sh03.h create mode 100644 include/asm-sh64/cputime.h create mode 100644 include/asm-sparc/cputime.h create mode 100644 include/asm-sparc64/cputime.h create mode 100644 include/asm-um/apic.h create mode 100644 include/asm-um/archparam-x86_64.h create mode 100644 include/asm-um/calling.h create mode 100644 include/asm-um/cputime.h create mode 100644 include/asm-um/dwarf2.h create mode 100644 include/asm-um/module-x86_64.h create mode 100644 include/asm-um/pda.h create mode 100644 include/asm-um/pgtable-2level.h create mode 100644 include/asm-um/pgtable-3level.h create mode 100644 include/asm-um/prctl.h create mode 100644 include/asm-um/processor-x86_64.h create mode 100644 include/asm-um/ptrace-x86_64.h create mode 100644 include/asm-um/sigcontext-x86_64.h create mode 100644 include/asm-um/system-x86_64.h create mode 100644 include/asm-um/vm-flags-i386.h create mode 100644 include/asm-um/vm-flags-x86_64.h create mode 100644 include/asm-v850/cputime.h create mode 100644 include/asm-x86_64/cputime.h create mode 100644 include/asm-x86_64/crash.h create mode 100644 include/asm-x86_64/genapic.h create mode 100644 include/asm-x86_64/ipi.h create mode 100644 include/asm-x86_64/kexec.h create mode 100644 include/asm-x86_64/kprobes.h create mode 100644 include/asm-x86_64/mach_apic.h create mode 100644 include/linux/attribute_container.h create mode 100644 include/linux/backlight.h create mode 100644 include/linux/crash_dump.h create mode 100644 include/linux/debugfs.h create mode 100644 include/linux/elf-fdpic.h create mode 100644 include/linux/fsl_devices.h create mode 100644 include/linux/i2c-algo-sgi.h create mode 100644 include/linux/i2c-algo-sibyte.h create mode 100644 include/linux/if_infiniband.h create mode 100644 include/linux/key-ui.h create mode 100644 include/linux/key.h create mode 100644 include/linux/keyctl.h create mode 100644 include/linux/kfifo.h create mode 100644 include/linux/kobject_uevent.h create mode 100644 include/linux/lcd.h create mode 100644 include/linux/libps2.h create mode 100644 include/linux/mtd/xip.h create mode 100644 include/linux/netfilter_bridge/ebt_ulog.h create mode 100644 include/linux/netfilter_ipv4/ipt_CLUSTERIP.h create mode 100644 include/linux/netfilter_ipv4/ipt_CONNMARK.h create mode 100644 include/linux/netfilter_ipv4/ipt_connmark.h create mode 100644 include/linux/netfilter_ipv4/ipt_hashlimit.h create mode 100644 include/linux/nodemask.h create mode 100644 include/linux/pci-acpi.h create mode 100644 include/linux/pcieport_if.h create mode 100644 include/linux/pktcdvd.h create mode 100644 include/linux/rslib.h create mode 100644 include/linux/scatterlist.h create mode 100644 include/linux/serial_8250.h create mode 100644 include/linux/tc_act/tc_ipt.h create mode 100644 include/linux/tc_act/tc_mirred.h create mode 100644 include/linux/tc_act/tc_pedit.h create mode 100644 include/linux/transport_class.h create mode 100644 include/linux/usb_sl811.h create mode 100644 include/linux/via.h create mode 100644 include/media/tveeprom.h create mode 100644 include/media/video-buf-dvb.h create mode 100644 include/net/act_api.h create mode 100644 include/net/sch_generic.h create mode 100644 include/net/tc_act/tc_ipt.h create mode 100644 include/net/tc_act/tc_mirred.h create mode 100644 include/net/tc_act/tc_pedit.h create mode 100644 include/net/x25device.h create mode 100644 include/scsi/scsi_transport_iscsi.h create mode 100644 include/video/w100fb.h create mode 100644 init/calibrate.c create mode 100644 kernel/irq/Makefile create mode 100644 kernel/irq/autoprobe.c create mode 100644 kernel/irq/handle.c create mode 100644 kernel/irq/internals.h create mode 100644 kernel/irq/manage.c create mode 100644 kernel/irq/proc.c create mode 100644 kernel/irq/spurious.c create mode 100644 kernel/kfifo.c create mode 100644 kernel/ksysfs.c create mode 100644 kernel/module-verify-sig.c create mode 100644 kernel/sys_ni.c create mode 100644 kernel/wait.c create mode 100644 lib/find_next_bit.c create mode 100644 lib/kernel_lock.c create mode 100644 lib/kobject_uevent.c create mode 100644 lib/prio_tree.c create mode 100644 lib/reed_solomon/Makefile create mode 100644 lib/reed_solomon/decode_rs.c create mode 100644 lib/reed_solomon/encode_rs.c create mode 100644 lib/reed_solomon/reed_solomon.c create mode 100644 mm/internal.h create mode 100644 net/appletalk/dev.c create mode 100644 net/bridge/netfilter/ebt_ulog.c create mode 100644 net/ipv4/netfilter/ipt_CLUSTERIP.c create mode 100644 net/ipv4/netfilter/ipt_CONNMARK.c create mode 100644 net/ipv4/netfilter/ipt_connmark.c create mode 100644 net/ipv4/netfilter/ipt_hashlimit.c create mode 100644 net/sched/ipt.c create mode 100644 net/sched/mirred.c create mode 100644 net/sched/pedit.c create mode 100644 scripts/gen_initramfs_list.sh create mode 100644 scripts/kconfig/util.c create mode 100644 security/keys/Makefile create mode 100644 security/keys/compat.c create mode 100644 security/keys/internal.h create mode 100644 security/keys/key.c create mode 100644 security/keys/keyctl.c create mode 100644 security/keys/keyring.c create mode 100644 security/keys/proc.c create mode 100644 security/keys/process_keys.c create mode 100644 security/keys/request_key.c create mode 100644 security/keys/user_defined.c create mode 100644 security/seclvl.c create mode 100644 sound/mips/Kconfig create mode 100644 sound/mips/Makefile create mode 100644 sound/mips/au1x00.c create mode 100644 sound/oss/au1550_ac97.c create mode 100644 sound/pci/ca0106/Makefile create mode 100644 sound/pci/ca0106/ca0106.h create mode 100644 sound/pci/ca0106/ca0106_main.c create mode 100644 sound/pci/ca0106/ca0106_mixer.c create mode 100644 sound/pci/ca0106/ca0106_proc.c create mode 100644 sound/pci/emu10k1/emu10k1x.c create mode 100644 sound/pci/emu10k1/timer.c create mode 100644 sound/pci/ice1712/prodigy192.c create mode 100644 sound/pci/ice1712/prodigy192.h create mode 100644 sound/pci/ice1712/stac946x.h create mode 100644 sound/pci/via82xx_modem.c create mode 100644 sound/usb/usx2y/usx2yhwdeppcm.c create mode 100644 sound/usb/usx2y/usx2yhwdeppcm.h diff --git a/Documentation/DocBook/librs.tmpl b/Documentation/DocBook/librs.tmpl new file mode 100644 index 000000000..be482c030 --- /dev/null +++ b/Documentation/DocBook/librs.tmpl @@ -0,0 +1,287 @@ + + + + + Reed-Solomon Library Programming Interface + + + + Thomas + Gleixner + +
+ tglx@linutronix.de +
+
+
+
+ + + 2004 + Thomas Gleixner + + + + + This documentation is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + + + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + + For more details see the file COPYING in the source + distribution of Linux. + + +
+ + + + + Introduction + + The generic Reed-Solomon Library provides encoding, decoding + and error correction functions. + + + Reed-Solomon codes are used in communication and storage + applications to ensure data integrity. + + + This documentation is provided for developers who want to utilize + the functions provided by the library. + + + + + Known Bugs And Assumptions + + None. + + + + + Usage + + This chapter provides examples how to use the library. + + + Initializing + + The init function init_rs returns a pointer to a + rs decoder structure, which holds the necessary + information for encoding, decoding and error correction + with the given polynomial. It either uses an existing + matching decoder or creates a new one. On creation all + the lookup tables for fast en/decoding are created. + The function may take a while, so make sure not to + call it in critical code paths. + + +/* the Reed Solomon control structure */ +static struct rs_control *rs_decoder; + +/* Symbolsize is 10 (bits) + * Primitve polynomial is x^10+x^3+1 + * first consecutive root is 0 + * primitve element to generate roots = 1 + * generator polinomial degree (number of roots) = 6 + */ +rs_decoder = init_rs (10, 0x409, 0, 1, 6); + + + + Encoding + + The encoder calculates the Reed-Solomon code over + the given data length and stores the result in + the parity buffer. Note that the parity buffer must + be initialized before calling the encoder. + + + The expanded data can be inverted on the fly by + providing a non zero inversion mask. The expanded data is + XOR'ed with the mask. This is used e.g. for FLASH + ECC, where the all 0xFF is inverted to an all 0x00. + The Reed-Solomon code for all 0x00 is all 0x00. The + code is inverted before storing to FLASH so it is 0xFF + too. This prevent's that reading from an erased FLASH + results in ECC errors. + + + The databytes are expanded to the given symbol size + on the fly. There is no support for encoding continuous + bitstreams with a symbol size != 8 at the moment. If + it is necessary it should be not a big deal to implement + such functionality. + + +/* Parity buffer. Size = number of roots */ +uint16_t par[6]; +/* Initialize the parity buffer */ +memset(par, 0, sizeof(par)); +/* Encode 512 byte in data8. Store parity in buffer par */ +encode_rs8 (rs_decoder, data8, 512, par, 0); + + + + Decoding + + The decoder calculates the syndrome over + the given data length and the received parity symbols + and corrects errors in the data. + + + If a syndrome is available from a hardware decoder + then the syndrome calculation is skipped. + + + The correction of the data buffer can be suppressed + by providing a correction pattern buffer and an error + location buffer to the decoder. The decoder stores the + calculated error location and the correction bitmask + in the given buffers. This is useful for hardware + decoders which use a weird bit ordering scheme. + + + The databytes are expanded to the given symbol size + on the fly. There is no support for decoding continuous + bitstreams with a symbolsize != 8 at the moment. If + it is necessary it should be not a big deal to implement + such functionality. + + + + + Decoding with syndrome calculation, direct data correction + + +/* Parity buffer. Size = number of roots */ +uint16_t par[6]; +uint8_t data[512]; +int numerr; +/* Receive data */ +..... +/* Receive parity */ +..... +/* Decode 512 byte in data8.*/ +numerr = decode_rs8 (rs_decoder, data8, par, 512, NULL, 0, NULL, 0, NULL); + + + + + + Decoding with syndrome given by hardware decoder, direct data correction + + +/* Parity buffer. Size = number of roots */ +uint16_t par[6], syn[6]; +uint8_t data[512]; +int numerr; +/* Receive data */ +..... +/* Receive parity */ +..... +/* Get syndrome from hardware decoder */ +..... +/* Decode 512 byte in data8.*/ +numerr = decode_rs8 (rs_decoder, data8, par, 512, syn, 0, NULL, 0, NULL); + + + + + + Decoding with syndrome given by hardware decoder, no direct data correction. + + + Note: It's not necessary to give data and received parity to the decoder. + + +/* Parity buffer. Size = number of roots */ +uint16_t par[6], syn[6], corr[8]; +uint8_t data[512]; +int numerr, errpos[8]; +/* Receive data */ +..... +/* Receive parity */ +..... +/* Get syndrome from hardware decoder */ +..... +/* Decode 512 byte in data8.*/ +numerr = decode_rs8 (rs_decoder, NULL, NULL, 512, syn, 0, errpos, 0, corr); +for (i = 0; i < numerr; i++) { + do_error_correction_in_your_buffer(errpos[i], corr[i]); +} + + + + + Cleanup + + The function free_rs frees the allocated resources, + if the caller is the last user of the decoder. + + +/* Release resources */ +free_rs(rs_decoder); + + + + + + + Structures + + This chapter contains the autogenerated documentation of the structures which are + used in the Reed-Solomon Library and are relevant for a developer. + +!Iinclude/linux/rslib.h + + + + Public Functions Provided + + This chapter contains the autogenerated documentation of the Reed-Solomon functions + which are exported. + +!Elib/reed_solomon/reed_solomon.c + + + + Credits + + The library code for encoding and decoding was written by Phil Karn. + + + Copyright 2002, Phil Karn, KA9Q + May be used under the terms of the GNU General Public License (GPL) + + + The wrapper functions and interfaces are written by Thomas Gleixner + + + Many users have provided bugfixes, improvements and helping hands for testing. + Thanks a lot. + + + The following people have contributed to this document: + + + Thomas Gleixnertglx@linutronix.de + + +
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl new file mode 100644 index 000000000..435bb5245 --- /dev/null +++ b/Documentation/DocBook/mtdnand.tmpl @@ -0,0 +1,1318 @@ + + + + + MTD NAND Driver Programming Interface + + + + Thomas + Gleixner + +
+ tglx@linutronix.de +
+
+
+
+ + + 2004 + Thomas Gleixner + + + + + This documentation is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + + + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + + + + For more details see the file COPYING in the source + distribution of Linux. + + +
+ + + + + Introduction + + The generic NAND driver supports almost all NAND and AG-AND based + chips and connects them to the Memory Technology Devices (MTD) + subsystem of the Linux Kernel. + + + This documentation is provided for developers who want to implement + board drivers or filesystem drivers suitable for NAND devices. + + + + + Known Bugs And Assumptions + + None. + + + + + Documentation hints + + The function and structure docs are autogenerated. Each function and + struct member has a short description which is marked with an [XXX] identifier. + The following chapters explain the meaning of those identifiers. + + + Function identifiers [XXX] + + The functions are marked with [XXX] identifiers in the short + comment. The identifiers explain the usage and scope of the + functions. Following identifiers are used: + + + + [MTD Interface] + These functions provide the interface to the MTD kernel API. + They are not replacable and provide functionality + which is complete hardware independent. + + + [NAND Interface] + These functions are exported and provide the interface to the NAND kernel API. + + + [GENERIC] + Generic functions are not replacable and provide functionality + which is complete hardware independent. + + + [DEFAULT] + Default functions provide hardware related functionality which is suitable + for most of the implementations. These functions can be replaced by the + board driver if neccecary. Those functions are called via pointers in the + NAND chip description structure. The board driver can set the functions which + should be replaced by board dependend functions before calling nand_scan(). + If the function pointer is NULL on entry to nand_scan() then the pointer + is set to the default function which is suitable for the detected chip type. + + + + + Struct member identifiers [XXX] + + The struct members are marked with [XXX] identifiers in the + comment. The identifiers explain the usage and scope of the + members. Following identifiers are used: + + + + [INTERN] + These members are for NAND driver internal use only and must not be + modified. Most of these values are calculated from the chip geometry + information which is evaluated during nand_scan(). + + + [REPLACEABLE] + Replaceable members hold hardware related functions which can be + provided by the board driver. The board driver can set the functions which + should be replaced by board dependend functions before calling nand_scan(). + If the function pointer is NULL on entry to nand_scan() then the pointer + is set to the default function which is suitable for the detected chip type. + + + [BOARDSPECIFIC] + Board specific members hold hardware related information which must + be provided by the board driver. The board driver must set the function + pointers and datafields before calling nand_scan(). + + + [OPTIONAL] + Optional members can hold information relevant for the board driver. The + generic NAND driver code does not use this information. + + + + + + + Basic board driver + + For most boards it will be sufficient to provide just the + basic functions and fill out some really board dependend + members in the nand chip description structure. + See drivers/mtd/nand/skeleton for reference. + + + Basic defines + + At least you have to provide a mtd structure and + a storage for the ioremap'ed chip address. + You can allocate the mtd structure using kmalloc + or you can allocate it statically. + In case of static allocation you have to allocate + a nand_chip structure too. + + + Kmalloc based example + + +static struct mtd_info *board_mtd; +static unsigned long baseaddr; + + + Static example + + +static struct mtd_info board_mtd; +static struct nand_chip board_chip; +static unsigned long baseaddr; + + + + Partition defines + + If you want to divide your device into parititions, then + enable the configuration switch CONFIG_MTD_PARITIONS and define + a paritioning scheme suitable to your board. + + +#define NUM_PARTITIONS 2 +static struct mtd_partition partition_info[] = { + { .name = "Flash partition 1", + .offset = 0, + .size = 8 * 1024 * 1024 }, + { .name = "Flash partition 2", + .offset = MTDPART_OFS_NEXT, + .size = MTDPART_SIZ_FULL }, +}; + + + + Hardware control function + + The hardware control function provides access to the + control pins of the NAND chip(s). + The access can be done by GPIO pins or by address lines. + If you use address lines, make sure that the timing + requirements are met. + + + GPIO based example + + +static void board_hwcontrol(struct mtd_info *mtd, int cmd) +{ + switch(cmd){ + case NAND_CTL_SETCLE: /* Set CLE pin high */ break; + case NAND_CTL_CLRCLE: /* Set CLE pin low */ break; + case NAND_CTL_SETALE: /* Set ALE pin high */ break; + case NAND_CTL_CLRALE: /* Set ALE pin low */ break; + case NAND_CTL_SETNCE: /* Set nCE pin low */ break; + case NAND_CTL_CLRNCE: /* Set nCE pin high */ break; + } +} + + + Address lines based example. It's assumed that the + nCE pin is driven by a chip select decoder. + + +static void board_hwcontrol(struct mtd_info *mtd, int cmd) +{ + struct nand_chip *this = (struct nand_chip *) mtd->priv; + switch(cmd){ + case NAND_CTL_SETCLE: this->IO_ADDR_W |= CLE_ADRR_BIT; break; + case NAND_CTL_CLRCLE: this->IO_ADDR_W &= ~CLE_ADRR_BIT; break; + case NAND_CTL_SETALE: this->IO_ADDR_W |= ALE_ADRR_BIT; break; + case NAND_CTL_CLRALE: this->IO_ADDR_W &= ~ALE_ADRR_BIT; break; + } +} + + + + Device ready function + + If the hardware interface has the ready busy pin of the NAND chip connected to a + GPIO or other accesible I/O pin, this function is used to read back the state of the + pin. The function has no arguments and should return 0, if the device is busy (R/B pin + is low) and 1, if the device is ready (R/B pin is high). + If the hardware interface does not give access to the ready busy pin, then + the function must not be defined and the function pointer this->dev_ready is set to NULL. + + + + Init function + + The init function allocates memory and sets up all the board + specific parameters and function pointers. When everything + is set up nand_scan() is called. This function tries to + detect and identify then chip. If a chip is found all the + internal data fields are initialized accordingly. + The structure(s) have to be zeroed out first and then filled with the neccecary + information about the device. + + +int __init board_init (void) +{ + struct nand_chip *this; + int err = 0; + + /* Allocate memory for MTD device structure and private data */ + board_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), GFP_KERNEL); + if (!board_mtd) { + printk ("Unable to allocate NAND MTD device structure.\n"); + err = -ENOMEM; + goto out; + } + + /* Initialize structures */ + memset ((char *) board_mtd, 0, sizeof(struct mtd_info) + sizeof(struct nand_chip)); + + /* map physical adress */ + baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024); + if(!baseaddr){ + printk("Ioremap to access NAND chip failed\n"); + err = -EIO; + goto out_mtd; + } + + /* Get pointer to private data */ + this = (struct nand_chip *) (); + /* Link the private data with the MTD structure */ + board_mtd->priv = this; + + /* Set address of NAND IO lines */ + this->IO_ADDR_R = baseaddr; + this->IO_ADDR_W = baseaddr; + /* Reference hardware control function */ + this->hwcontrol = board_hwcontrol; + /* Set command delay time, see datasheet for correct value */ + this->chip_delay = CHIP_DEPENDEND_COMMAND_DELAY; + /* Assign the device ready function, if available */ + this->dev_ready = board_dev_ready; + this->eccmode = NAND_ECC_SOFT; + + /* Scan to find existance of the device */ + if (nand_scan (board_mtd, 1)) { + err = -ENXIO; + goto out_ior; + } + + add_mtd_partitions(board_mtd, partition_info, NUM_PARTITIONS); + goto out; + +out_ior: + iounmap((void *)baseaddr); +out_mtd: + kfree (board_mtd); +out: + return err; +} +module_init(board_init); + + + + Exit function + + The exit function is only neccecary if the driver is + compiled as a module. It releases all resources which + are held by the chip driver and unregisters the partitions + in the MTD layer. + + +#ifdef MODULE +static void __exit board_cleanup (void) +{ + /* Release resources, unregister device */ + nand_release (board_mtd); + + /* unmap physical adress */ + iounmap((void *)baseaddr); + + /* Free the MTD device structure */ + kfree (board_mtd); +} +module_exit(board_cleanup); +#endif + + + + + + Advanced board driver functions + + This chapter describes the advanced functionality of the NAND + driver. For a list of functions which can be overridden by the board + driver see the documentation of the nand_chip structure. + + + Multiple chip control + + The nand driver can control chip arrays. Therefor the + board driver must provide an own select_chip function. This + function must (de)select the requested chip. + The function pointer in the nand_chip structure must + be set before calling nand_scan(). The maxchip parameter + of nand_scan() defines the maximum number of chips to + scan for. Make sure that the select_chip function can + handle the requested number of chips. + + + The nand driver concatenates the chips to one virtual + chip and provides this virtual chip to the MTD layer. + + + Note: The driver can only handle linear chip arrays + of equally sized chips. There is no support for + parallel arrays which extend the buswidth. + + + GPIO based example + + +static void board_select_chip (struct mtd_info *mtd, int chip) +{ + /* Deselect all chips, set all nCE pins high */ + GPIO(BOARD_NAND_NCE) |= 0xff; + if (chip >= 0) + GPIO(BOARD_NAND_NCE) &= ~ (1 << chip); +} + + + Address lines based example. + Its assumed that the nCE pins are connected to an + address decoder. + + +static void board_select_chip (struct mtd_info *mtd, int chip) +{ + struct nand_chip *this = (struct nand_chip *) mtd->priv; + + /* Deselect all chips */ + this->IO_ADDR_R &= ~BOARD_NAND_ADDR_MASK; + this->IO_ADDR_W &= ~BOARD_NAND_ADDR_MASK; + switch (chip) { + case 0: + this->IO_ADDR_R |= BOARD_NAND_ADDR_CHIP0; + this->IO_ADDR_W |= BOARD_NAND_ADDR_CHIP0; + break; + .... + case n: + this->IO_ADDR_R |= BOARD_NAND_ADDR_CHIPn; + this->IO_ADDR_W |= BOARD_NAND_ADDR_CHIPn; + break; + } +} + + + + Hardware ECC support + + Functions and constants + + The nand driver supports three different types of + hardware ECC. + + NAND_ECC_HW3_256 + Hardware ECC generator providing 3 bytes ECC per + 256 byte. + + NAND_ECC_HW3_512 + Hardware ECC generator providing 3 bytes ECC per + 512 byte. + + NAND_ECC_HW6_512 + Hardware ECC generator providing 6 bytes ECC per + 512 byte. + + NAND_ECC_HW8_512 + Hardware ECC generator providing 6 bytes ECC per + 512 byte. + + + If your hardware generator has a different functionality + add it at the appropriate place in nand_base.c + + + The board driver must provide following functions: + + enable_hwecc + This function is called before reading / writing to + the chip. Reset or initialize the hardware generator + in this function. The function is called with an + argument which let you distinguish between read + and write operations. + + calculate_ecc + This function is called after read / write from / to + the chip. Transfer the ECC from the hardware to + the buffer. If the option NAND_HWECC_SYNDROME is set + then the function is only called on write. See below. + + correct_data + In case of an ECC error this function is called for + error detection and correction. Return 1 respectively 2 + in case the error can be corrected. If the error is + not correctable return -1. If your hardware generator + matches the default algorithm of the nand_ecc software + generator then use the correction function provided + by nand_ecc instead of implementing duplicated code. + + + + + + Hardware ECC with syndrome calculation + + Many hardware ECC implementations provide Reed-Solomon + codes and calculate an error syndrome on read. The syndrome + must be converted to a standard Reed-Solomon syndrome + before calling the error correction code in the generic + Reed-Solomon library. + + + The ECC bytes must be placed immidiately after the data + bytes in order to make the syndrome generator work. This + is contrary to the usual layout used by software ECC. The + seperation of data and out of band area is not longer + possible. The nand driver code handles this layout and + the remaining free bytes in the oob area are managed by + the autoplacement code. Provide a matching oob-layout + in this case. See rts_from4.c and diskonchip.c for + implementation reference. In those cases we must also + use bad block tables on FLASH, because the ECC layout is + interferring with the bad block marker positions. + See bad block table support for details. + + + + + Bad block table support + + Most NAND chips mark the bad blocks at a defined + position in the spare area. Those blocks must + not be erased under any circumstances as the bad + block information would be lost. + It is possible to check the bad block mark each + time when the blocks are accessed by reading the + spare area of the first page in the block. This + is time consuming so a bad block table is used. + + + The nand driver supports various types of bad block + tables. + + Per device + The bad block table contains all bad block information + of the device which can consist of multiple chips. + + Per chip + A bad block table is used per chip and contains the + bad block information for this particular chip. + + Fixed offset + The bad block table is located at a fixed offset + in the chip (device). This applies to various + DiskOnChip devices. + + Automatic placed + The bad block table is automatically placed and + detected either at the end or at the beginning + of a chip (device) + + Mirrored tables + The bad block table is mirrored on the chip (device) to + allow updates of the bad block table without data loss. + + + + + nand_scan() calls the function nand_default_bbt(). + nand_default_bbt() selects appropriate default + bad block table desriptors depending on the chip information + which was retrieved by nand_scan(). + + + The standard policy is scanning the device for bad + blocks and build a ram based bad block table which + allows faster access than always checking the + bad block information on the flash chip itself. + + + Flash based tables + + It may be desired or neccecary to keep a bad block table in FLASH. + For AG-AND chips this is mandatory, as they have no factory marked + bad blocks. They have factory marked good blocks. The marker pattern + is erased when the block is erased to be reused. So in case of + powerloss before writing the pattern back to the chip this block + would be lost and added to the bad blocks. Therefor we scan the + chip(s) when we detect them the first time for good blocks and + store this information in a bad block table before erasing any + of the blocks. + + + The blocks in which the tables are stored are procteted against + accidental access by marking them bad in the memory bad block + table. The bad block table managment functions are allowed + to circumvernt this protection. + + + The simplest way to activate the FLASH based bad block table support + is to set the option NAND_USE_FLASH_BBT in the option field of + the nand chip structure before calling nand_scan(). For AG-AND + chips is this done by default. + This activates the default FLASH based bad block table functionality + of the NAND driver. The default bad block table options are + + Store bad block table per chip + Use 2 bits per block + Automatic placement at the end of the chip + Use mirrored tables with version numbers + Reserve 4 blocks at the end of the chip + + + + + User defined tables + + User defined tables are created by filling out a + nand_bbt_descr structure and storing the pointer in the + nand_chip structure member bbt_td before calling nand_scan(). + If a mirror table is neccecary a second structure must be + created and a pointer to this structure must be stored + in bbt_md inside the nand_chip structure. If the bbt_md + member is set to NULL then only the main table is used + and no scan for the mirrored table is performed. + + + The most important field in the nand_bbt_descr structure + is the options field. The options define most of the + table properties. Use the predefined constants from + nand.h to define the options. + + Number of bits per block + The supported number of bits is 1, 2, 4, 8. + Table per chip + Setting the constant NAND_BBT_PERCHIP selects that + a bad block table is managed for each chip in a chip array. + If this option is not set then a per device bad block table + is used. + Table location is absolute + Use the option constant NAND_BBT_ABSPAGE and + define the absolute page number where the bad block + table starts in the field pages. If you have selected bad block + tables per chip and you have a multi chip array then the start page + must be given for each chip in the chip array. Note: there is no scan + for a table ident pattern performed, so the fields + pattern, veroffs, offs, len can be left uninitialized + Table location is automatically detected + The table can either be located in the first or the last good + blocks of the chip (device). Set NAND_BBT_LASTBLOCK to place + the bad block table at the end of the chip (device). The + bad block tables are marked and identified by a pattern which + is stored in the spare area of the first page in the block which + holds the bad block table. Store a pointer to the pattern + in the pattern field. Further the length of the pattern has to be + stored in len and the offset in the spare area must be given + in the offs member of the nand_bbt_descr stucture. For mirrored + bad block tables different patterns are mandatory. + Table creation + Set the option NAND_BBT_CREATE to enable the table creation + if no table can be found during the scan. Usually this is done only + once if a new chip is found. + Table write support + Set the option NAND_BBT_WRITE to enable the table write support. + This allows the update of the bad block table(s) in case a block has + to be marked bad due to wear. The MTD interface function block_markbad + is calling the update function of the bad block table. If the write + support is enabled then the table is updated on FLASH. + + Note: Write support should only be enabled for mirrored tables with + version control. + + Table version control + Set the option NAND_BBT_VERSION to enable the table version control. + It's highly recommended to enable this for mirrored tables with write + support. It makes sure that the risk of loosing the bad block + table information is reduced to the loss of the information about the + one worn out block which should be marked bad. The version is stored in + 4 consecutive bytes in the spare area of the device. The position of + the version number is defined by the member veroffs in the bad block table + descriptor. + Save block contents on write + + In case that the block which holds the bad block table does contain + other useful information, set the option NAND_BBT_SAVECONTENT. When + the bad block table is written then the whole block is read the bad + block table is updated and the block is erased and everything is + written back. If this option is not set only the bad block table + is written and everything else in the block is ignored and erased. + + Number of reserved blocks + + For automatic placement some blocks must be reserved for + bad block table storage. The number of reserved blocks is defined + in the maxblocks member of the babd block table description structure. + Reserving 4 blocks for mirrored tables should be a reasonable number. + This also limits the number of blocks which are scanned for the bad + block table ident pattern. + + + + + + + Spare area (auto)placement + + The nand driver implements different possibilities for + placement of filesystem data in the spare area, + + Placement defined by fs driver + Automatic placement + + The default placement function is automatic placement. The + nand driver has built in default placement schemes for the + various chiptypes. If due to hardware ECC functionality the + default placement does not fit then the board driver can + provide a own placement scheme. + + + File system drivers can provide a own placement scheme which + is used instead of the default placement scheme. + + + Placement schemes are defined by a nand_oobinfo structure + +struct nand_oobinfo { + int useecc; + int eccbytes; + int eccpos[24]; + int oobfree[8][2]; +}; + + + useecc + The useecc member controls the ecc and placement function. The header + file include/mtd/mtd-abi.h contains constants to select ecc and + placement. MTD_NANDECC_OFF switches off the ecc complete. This is + not recommended and available for testing and diagnosis only. + MTD_NANDECC_PLACE selects caller defined placement, MTD_NANDECC_AUTOPLACE + selects automatic placement. + + eccbytes + The eccbytes member defines the number of ecc bytes per page. + + eccpos + The eccpos array holds the byte offsets in the spare area where + the ecc codes are placed. + + oobfree + The oobfree array defines the areas in the spare area which can be + used for automatic placement. The information is given in the format + {offset, size}. offset defines the start of the usable area, size the + length in bytes. More than one area can be defined. The list is terminated + by an {0, 0} entry. + + + + + Placement defined by fs driver + + The calling function provides a pointer to a nand_oobinfo + structure which defines the ecc placement. For writes the + caller must provide a spare area buffer along with the + data buffer. The spare area buffer size is (number of pages) * + (size of spare area). For reads the buffer size is + (number of pages) * ((size of spare area) + (number of ecc + steps per page) * sizeof (int)). The driver stores the + result of the ecc check for each tuple in the spare buffer. + The storage sequence is + + + <spare data page 0><ecc result 0>...<ecc result n> + + + ... + + + <spare data page n><ecc result 0>...<ecc result n> + + + This is a legacy mode used by YAFFS1. + + + If the spare area buffer is NULL then only the ECC placement is + done according to the given scheme in the nand_oobinfo structure. + + + + Automatic placement + + Automatic placement uses the built in defaults to place the + ecc bytes in the spare area. If filesystem data have to be stored / + read into the spare area then the calling function must provide a + buffer. The buffer size per page is determined by the oobfree array in + the nand_oobinfo structure. + + + If the spare area buffer is NULL then only the ECC placement is + done according to the default builtin scheme. + + + + User space placement selection + + All non ecc functions like mtd->read and mtd->write use an internal + structure, which can be set by an ioctl. This structure is preset + to the autoplacement default. + + ioctl (fd, MEMSETOOBSEL, oobsel); + + oobsel is a pointer to a user supplied structure of type + nand_oobconfig. The contents of this structure must match the + criteria of the filesystem, which will be used. See an example in utils/nandwrite.c. + + + + + Spare area autoplacement default schemes + + 256 byte pagesize + + +Offset +Content +Comment + + +0x00 +ECC byte 0 +Error correction code byte 0 + + +0x01 +ECC byte 1 +Error correction code byte 1 + + +0x02 +ECC byte 2 +Error correction code byte 2 + + +0x03 +Autoplace 0 + + + +0x04 +Autoplace 1 + + + +0x05 +Bad block marker +If any bit in this byte is zero, then this block is bad. +This applies only to the first page in a block. In the remaining +pages this byte is reserved + + +0x06 +Autoplace 2 + + + +0x07 +Autoplace 3 + + + + + + 512 byte pagesize + + +Offset +Content +Comment + + +0x00 +ECC byte 0 +Error correction code byte 0 of the lower 256 Byte data in +this page + + +0x01 +ECC byte 1 +Error correction code byte 1 of the lower 256 Bytes of data +in this page + + +0x02 +ECC byte 2 +Error correction code byte 2 of the lower 256 Bytes of data +in this page + + +0x03 +ECC byte 3 +Error correction code byte 0 of the upper 256 Bytes of data +in this page + + +0x04 +reserved +reserved + + +0x05 +Bad block marker +If any bit in this byte is zero, then this block is bad. +This applies only to the first page in a block. In the remaining +pages this byte is reserved + + +0x06 +ECC byte 4 +Error correction code byte 1 of the upper 256 Bytes of data +in this page + + +0x07 +ECC byte 5 +Error correction code byte 2 of the upper 256 Bytes of data +in this page + + +0x08 - 0x0F +Autoplace 0 - 7 + + + + + + 2048 byte pagesize + + +Offset +Content +Comment + + +0x00 +Bad block marker +If any bit in this byte is zero, then this block is bad. +This applies only to the first page in a block. In the remaining +pages this byte is reserved + + +0x01 +Reserved +Reserved + + +0x02-0x27 +Autoplace 0 - 37 + + + +0x28 +ECC byte 0 +Error correction code byte 0 of the first 256 Byte data in +this page + + +0x29 +ECC byte 1 +Error correction code byte 1 of the first 256 Bytes of data +in this page + + +0x2A +ECC byte 2 +Error correction code byte 2 of the first 256 Bytes data in +this page + + +0x2B +ECC byte 3 +Error correction code byte 0 of the second 256 Bytes of data +in this page + + +0x2C +ECC byte 4 +Error correction code byte 1 of the second 256 Bytes of data +in this page + + +0x2D +ECC byte 5 +Error correction code byte 2 of the second 256 Bytes of data +in this page + + +0x2E +ECC byte 6 +Error correction code byte 0 of the third 256 Bytes of data +in this page + + +0x2F +ECC byte 7 +Error correction code byte 1 of the third 256 Bytes of data +in this page + + +0x30 +ECC byte 8 +Error correction code byte 2 of the third 256 Bytes of data +in this page + + +0x31 +ECC byte 9 +Error correction code byte 0 of the fourth 256 Bytes of data +in this page + + +0x32 +ECC byte 10 +Error correction code byte 1 of the fourth 256 Bytes of data +in this page + + +0x33 +ECC byte 11 +Error correction code byte 2 of the fourth 256 Bytes of data +in this page + + +0x34 +ECC byte 12 +Error correction code byte 0 of the fifth 256 Bytes of data +in this page + + +0x35 +ECC byte 13 +Error correction code byte 1 of the fifth 256 Bytes of data +in this page + + +0x36 +ECC byte 14 +Error correction code byte 2 of the fifth 256 Bytes of data +in this page + + +0x37 +ECC byte 15 +Error correction code byte 0 of the sixt 256 Bytes of data +in this page + + +0x38 +ECC byte 16 +Error correction code byte 1 of the sixt 256 Bytes of data +in this page + + +0x39 +ECC byte 17 +Error correction code byte 2 of the sixt 256 Bytes of data +in this page + + +0x3A +ECC byte 18 +Error correction code byte 0 of the seventh 256 Bytes of +data in this page + + +0x3B +ECC byte 19 +Error correction code byte 1 of the seventh 256 Bytes of +data in this page + + +0x3C +ECC byte 20 +Error correction code byte 2 of the seventh 256 Bytes of +data in this page + + +0x3D +ECC byte 21 +Error correction code byte 0 of the eigth 256 Bytes of data +in this page + + +0x3E +ECC byte 22 +Error correction code byte 1 of the eigth 256 Bytes of data +in this page + + +0x3F +ECC byte 23 +Error correction code byte 2 of the eigth 256 Bytes of data +in this page + + + + + + + + Filesystem support + + The NAND driver provides all neccecary functions for a + filesystem via the MTD interface. + + + Filesystems must be aware of the NAND pecularities and + restrictions. One major restrictions of NAND Flash is, that you cannot + write as often as you want to a page. The consecutive writes to a page, + before erasing it again, are restricted to 1-3 writes, depending on the + manufacturers specifications. This applies similar to the spare area. + + + Therefor NAND aware filesystems must either write in page size chunks + or hold a writebuffer to collect smaller writes until they sum up to + pagesize. Available NAND aware filesystems: JFFS2, YAFFS. + + + The spare area usage to store filesystem data is controlled by + the spare area placement functionality which is described in one + of the earlier chapters. + + + + Tools + + The MTD project provides a couple of helpful tools to handle NAND Flash. + + flasherase, flasheraseall: Erase and format FLASH partitions + nandwrite: write filesystem images to NAND FLASH + nanddump: dump the contents of a NAND FLASH partitions + + + + These tools are aware of the NAND restrictions. Please use those tools + instead of complaining about errors which are caused by non NAND aware + access methods. + + + + + Constants + + This chapter describes the constants which might be relevant for a driver developer. + + + Chip option constants + + Constants for chip id table + + These constants are defined in nand.h. They are ored together to describe + the chip functionality. + +/* Chip can not auto increment pages */ +#define NAND_NO_AUTOINCR 0x00000001 +/* Buswitdh is 16 bit */ +#define NAND_BUSWIDTH_16 0x00000002 +/* Device supports partial programming without padding */ +#define NAND_NO_PADDING 0x00000004 +/* Chip has cache program function */ +#define NAND_CACHEPRG 0x00000008 +/* Chip has copy back function */ +#define NAND_COPYBACK 0x00000010 +/* AND Chip which has 4 banks and a confusing page / block + * assignment. See Renesas datasheet for further information */ +#define NAND_IS_AND 0x00000020 +/* Chip has a array of 4 pages which can be read without + * additional ready /busy waits */ +#define NAND_4PAGE_ARRAY 0x00000040 + + + + + Constants for runtime options + + These constants are defined in nand.h. They are ored together to describe + the functionality. + +/* Use a flash based bad block table. This option is parsed by the + * default bad block table function (nand_default_bbt). */ +#define NAND_USE_FLASH_BBT 0x00010000 +/* The hw ecc generator provides a syndrome instead a ecc value on read + * This can only work if we have the ecc bytes directly behind the + * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ +#define NAND_HWECC_SYNDROME 0x00020000 + + + + + + + ECC selection constants + + Use these constants to select the ECC algorithm. + +/* No ECC. Usage is not recommended ! */ +#define NAND_ECC_NONE 0 +/* Software ECC 3 byte ECC per 256 Byte data */ +#define NAND_ECC_SOFT 1 +/* Hardware ECC 3 byte ECC per 256 Byte data */ +#define NAND_ECC_HW3_256 2 +/* Hardware ECC 3 byte ECC per 512 Byte data */ +#define NAND_ECC_HW3_512 3 +/* Hardware ECC 6 byte ECC per 512 Byte data */ +#define NAND_ECC_HW6_512 4 +/* Hardware ECC 6 byte ECC per 512 Byte data */ +#define NAND_ECC_HW8_512 6 + + + + + + Hardware control related constants + + These constants describe the requested hardware access function when + the boardspecific hardware control function is called + +/* Select the chip by setting nCE to low */ +#define NAND_CTL_SETNCE 1 +/* Deselect the chip by setting nCE to high */ +#define NAND_CTL_CLRNCE 2 +/* Select the command latch by setting CLE to high */ +#define NAND_CTL_SETCLE 3 +/* Deselect the command latch by setting CLE to low */ +#define NAND_CTL_CLRCLE 4 +/* Select the address latch by setting ALE to high */ +#define NAND_CTL_SETALE 5 +/* Deselect the address latch by setting ALE to low */ +#define NAND_CTL_CLRALE 6 +/* Set write protection by setting WP to high. Not used! */ +#define NAND_CTL_SETWP 7 +/* Clear write protection by setting WP to low. Not used! */ +#define NAND_CTL_CLRWP 8 + + + + + + Bad block table related constants + + These constants describe the options used for bad block + table descriptors. + +/* Options for the bad block table descriptors */ + +/* The number of bits used per block in the bbt on the device */ +#define NAND_BBT_NRBITS_MSK 0x0000000F +#define NAND_BBT_1BIT 0x00000001 +#define NAND_BBT_2BIT 0x00000002 +#define NAND_BBT_4BIT 0x00000004 +#define NAND_BBT_8BIT 0x00000008 +/* The bad block table is in the last good block of the device */ +#define NAND_BBT_LASTBLOCK 0x00000010 +/* The bbt is at the given page, else we must scan for the bbt */ +#define NAND_BBT_ABSPAGE 0x00000020 +/* The bbt is at the given page, else we must scan for the bbt */ +#define NAND_BBT_SEARCH 0x00000040 +/* bbt is stored per chip on multichip devices */ +#define NAND_BBT_PERCHIP 0x00000080 +/* bbt has a version counter at offset veroffs */ +#define NAND_BBT_VERSION 0x00000100 +/* Create a bbt if none axists */ +#define NAND_BBT_CREATE 0x00000200 +/* Search good / bad pattern through all pages of a block */ +#define NAND_BBT_SCANALLPAGES 0x00000400 +/* Scan block empty during good / bad block scan */ +#define NAND_BBT_SCANEMPTY 0x00000800 +/* Write bbt if neccecary */ +#define NAND_BBT_WRITE 0x00001000 +/* Read and write back block contents when writing bbt */ +#define NAND_BBT_SAVECONTENT 0x00002000 + + + + + + + + Structures + + This chapter contains the autogenerated documentation of the structures which are + used in the NAND driver and might be relevant for a driver developer. Each + struct member has a short description which is marked with an [XXX] identifier. + See the chapter "Documentation hints" for an explanation. + +!Iinclude/linux/mtd/nand.h + + + + Public Functions Provided + + This chapter contains the autogenerated documentation of the NAND kernel API functions + which are exported. Each function has a short description which is marked with an [XXX] identifier. + See the chapter "Documentation hints" for an explanation. + +!Edrivers/mtd/nand/nand_base.c +!Edrivers/mtd/nand/nand_bbt.c +!Edrivers/mtd/nand/nand_ecc.c + + + + Internal Functions Provided + + This chapter contains the autogenerated documentation of the NAND driver internal functions. + Each function has a short description which is marked with an [XXX] identifier. + See the chapter "Documentation hints" for an explanation. + The functions marked with [DEFAULT] might be relevant for a board driver developer. + +!Idrivers/mtd/nand/nand_base.c +!Idrivers/mtd/nand/nand_bbt.c +!Idrivers/mtd/nand/nand_ecc.c + + + + Credits + + The following people have contributed to the NAND driver: + + Steven J. Hillsjhill@realitydiluted.com + David Woodhousedwmw2@infradead.org + Thomas Gleixnertglx@linutronix.de + + A lot of users have provided bugfixes, improvements and helping hands for testing. + Thanks a lot. + + + The following people have contributed to this document: + + Thomas Gleixnertglx@linutronix.de + + + +
diff --git a/Documentation/PCIEBUS-HOWTO.txt b/Documentation/PCIEBUS-HOWTO.txt new file mode 100644 index 000000000..c93f42a74 --- /dev/null +++ b/Documentation/PCIEBUS-HOWTO.txt @@ -0,0 +1,217 @@ + The PCI Express Port Bus Driver Guide HOWTO + Tom L Nguyen tom.l.nguyen@intel.com + 11/03/2004 + +1. About this guide + +This guide describes the basics of the PCI Express Port Bus driver +and provides information on how to enable the service drivers to +register/unregister with the PCI Express Port Bus Driver. + +2. Copyright 2004 Intel Corporation + +3. What is the PCI Express Port Bus Driver + +A PCI Express Port is a logical PCI-PCI Bridge structure. There +are two types of PCI Express Port: the Root Port and the Switch +Port. The Root Port originates a PCI Express link from a PCI Express +Root Complex and the Switch Port connects PCI Express links to +internal logical PCI buses. The Switch Port, which has its secondary +bus representing the switch's internal routing logic, is called the +switch's Upstream Port. The switch's Downstream Port is bridging from +switch's internal routing bus to a bus representing the downstream +PCI Express link from the PCI Express Switch. + +A PCI Express Port can provide up to four distinct functions, +referred to in this document as services, depending on its port type. +PCI Express Port's services include native hotplug support (HP), +power management event support (PME), advanced error reporting +support (AER), and virtual channel support (VC). These services may +be handled by a single complex driver or be individually distributed +and handled by corresponding service drivers. + +4. Why use the PCI Express Port Bus Driver? + +In existing Linux kernels, the Linux Device Driver Model allows a +physical device to be handled by only a single driver. The PCI +Express Port is a PCI-PCI Bridge device with multiple distinct +services. To maintain a clean and simple solution each service +may have its own software service driver. In this case several +service drivers will compete for a single PCI-PCI Bridge device. +For example, if the PCI Express Root Port native hotplug service +driver is loaded first, it claims a PCI-PCI Bridge Root Port. The +kernel therefore does not load other service drivers for that Root +Port. In other words, it is impossible to have multiple service +drivers load and run on a PCI-PCI Bridge device simultaneously +using the current driver model. + +To enable multiple service drivers running simultaneously requires +having a PCI Express Port Bus driver, which manages all populated +PCI Express Ports and distributes all provided service requests +to the corresponding service drivers as required. Some key +advantages of using the PCI Express Port Bus driver are listed below: + + - Allow multiple service drivers to run simultaneously on + a PCI-PCI Bridge Port device. + + - Allow service drivers implemented in an independent + staged approach. + + - Allow one service driver to run on multiple PCI-PCI Bridge + Port devices. + + - Manage and distribute resources of a PCI-PCI Bridge Port + device to requested service drivers. + +5. Configuring the PCI Express Port Bus Driver vs. Service Drivers + +5.1 Including the PCI Express Port Bus Driver Support into the Kernel + +Including the PCI Express Port Bus driver depends on whether the PCI +Express support is included in the kernel config. The kernel will +automatically include the PCI Express Port Bus driver as a kernel +driver when the PCI Express support is enabled in the kernel. + +5.2 Enabling Service Driver Support + +PCI device drivers are implemented based on Linux Device Driver Model. +All service drivers are PCI device drivers. As discussed above, it is +impossible to load any service driver once the kernel has loaded the +PCI Express Port Bus Driver. To meet the PCI Express Port Bus Driver +Model requires some minimal changes on existing service drivers that +imposes no impact on the functionality of existing service drivers. + +A service driver is required to use the two APIs shown below to +register its service with the PCI Express Port Bus driver (see +section 5.2.1 & 5.2.2). It is important that a service driver +initializes the pcie_port_service_driver data structure, included in +header file /include/linux/pcieport_if.h, before calling these APIs. +Failure to do so will result an identity mismatch, which prevents +the PCI Express Port Bus driver from loading a service driver. + +5.2.1 pcie_port_service_register + +int pcie_port_service_register(struct pcie_port_service_driver *new) + +This API replaces the Linux Driver Model's pci_module_init API. A +service driver should always calls pcie_port_service_register at +module init. Note that after service driver being loaded, calls +such as pci_enable_device(dev) and pci_set_master(dev) are no longer +necessary since these calls are executed by the PCI Port Bus driver. + +5.2.2 pcie_port_service_unregister + +void pcie_port_service_unregister(struct pcie_port_service_driver *new) + +pcie_port_service_unregister replaces the Linux Driver Model's +pci_unregister_driver. It's always called by service driver when a +module exits. + +5.2.3 Sample Code + +Below is sample service driver code to initialize the port service +driver data structure. + +static struct pcie_port_service_id service_id[] = { { + .vendor = PCI_ANY_ID, + .device = PCI_ANY_ID, + .port_type = PCIE_RC_PORT, + .service_type = PCIE_PORT_SERVICE_AER, + }, { /* end: all zeroes */ } +}; + +static struct pcie_port_service_driver root_aerdrv = { + .name = (char *)device_name, + .id_table = &service_id[0], + + .probe = aerdrv_load, + .remove = aerdrv_unload, + + .suspend = aerdrv_suspend, + .resume = aerdrv_resume, +}; + +Below is a sample code for registering/unregistering a service +driver. + +static int __init aerdrv_service_init(void) +{ + int retval = 0; + + retval = pcie_port_service_register(&root_aerdrv); + if (!retval) { + /* + * FIX ME + */ + } + return retval; +} + +static void __exit aerdrv_service_exit(void) +{ + pcie_port_service_unregister(&root_aerdrv); +} + +module_init(aerdrv_service_init); +module_exit(aerdrv_service_exit); + +6. Possible Resource Conflicts + +Since all service drivers of a PCI-PCI Bridge Port device are +allowed to run simultaneously, below lists a few of possible resource +conflicts with proposed solutions. + +6.1 MSI Vector Resource + +The MSI capability structure enables a device software driver to call +pci_enable_msi to request MSI based interrupts. Once MSI interrupts +are enabled on a device, it stays in this mode until a device driver +calls pci_disable_msi to disable MSI interrupts and revert back to +INTx emulation mode. Since service drivers of the same PCI-PCI Bridge +port share the same physical device, if an individual service driver +calls pci_enable_msi/pci_disable_msi it may result unpredictable +behavior. For example, two service drivers run simultaneously on the +same physical Root Port. Both service drivers call pci_enable_msi to +request MSI based interrupts. A service driver may not know whether +any other service drivers have run on this Root Port. If either one +of them calls pci_disable_msi, it puts the other service driver +in a wrong interrupt mode. + +To avoid this situation all service drivers are not permitted to +switch interrupt mode on its device. The PCI Express Port Bus driver +is responsible for determining the interrupt mode and this should be +transparent to service drivers. Service drivers need to know only +the vector IRQ assigned to the field irq of struct pcie_device, which +is passed in when the PCI Express Port Bus driver probes each service +driver. Service drivers should use (struct pcie_device*)dev->irq to +call request_irq/free_irq. In addition, the interrupt mode is stored +in the field interrupt_mode of struct pcie_device. + +6.2 MSI-X Vector Resources + +Similar to the MSI a device driver for an MSI-X capable device can +call pci_enable_msix to request MSI-X interrupts. All service drivers +are not permitted to switch interrupt mode on its device. The PCI +Express Port Bus driver is responsible for determining the interrupt +mode and this should be transparent to service drivers. Any attempt +by service driver to call pci_enable_msix/pci_disable_msix may +result unpredictable behavior. Service drivers should use +(struct pcie_device*)dev->irq and call request_irq/free_irq. + +6.3 PCI Memory/IO Mapped Regions + +Service drivers for PCI Express Power Management (PME), Advanced +Error Reporting (AER), Hot-Plug (HP) and Virtual Channel (VC) access +PCI configuration space on the PCI Express port. In all cases the +registers accessed are independent of each other. This patch assumes +that all service drivers will be well behaved and not overwrite +other service driver's configuration settings. + +6.4 PCI Config Registers + +Each service driver runs its PCI config operations on its own +capability structure except the PCI Express capability structure, in +which Root Control register and Device Control register are shared +between PME and AER. This patch assumes that all service drivers +will be well behaved and not overwrite other service driver's +configuration settings. diff --git a/Documentation/README.cycladesZ b/Documentation/README.cycladesZ new file mode 100644 index 000000000..024a69443 --- /dev/null +++ b/Documentation/README.cycladesZ @@ -0,0 +1,8 @@ + +The Cyclades-Z must have firmware loaded onto the card before it will +operate. This operation should be performed during system startup, + +The firmware, loader program and the latest device driver code are +available from Cyclades at + ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/ + diff --git a/Documentation/SecurityBugs b/Documentation/SecurityBugs new file mode 100644 index 000000000..26c3b3635 --- /dev/null +++ b/Documentation/SecurityBugs @@ -0,0 +1,38 @@ +Linux kernel developers take security very seriously. As such, we'd +like to know when a security bug is found so that it can be fixed and +disclosed as quickly as possible. Please report security bugs to the +Linux kernel security team. + +1) Contact + +The Linux kernel security team can be contacted by email at +. This is a private list of security officers +who will help verify the bug report and develop and release a fix. +It is possible that the security team will bring in extra help from +area maintainers to understand and fix the security vulnerability. + +As it is with any bug, the more information provided the easier it +will be to diagnose and fix. Please review the procedure outlined in +REPORTING-BUGS if you are unclear about what information is helpful. +Any exploit code is very helpful and will not be released without +consent from the reporter unless it has already been made public. + +2) Disclosure + +The goal of the Linux kernel security team is to work with the +bug submitter to bug resolution as well as disclosure. We prefer +to fully disclose the bug as soon as possible. It is reasonable to +delay disclosure when the bug or the fix is not yet fully understood, +the solution is not well-tested or for vendor coordination. However, we +expect these delays to be short, measurable in days, not weeks or months. +A disclosure date is negotiated by the security team working with the +bug submitter as well as vendors. However, the kernel security team +holds the final say when setting a disclosure date. The timeframe for +disclosure is from immediate (esp. if it's already publically known) +to a few weeks. As a basic default policy, we expect report date to +disclosure date to be on the order of 7 days. + +3) Non-disclosure agreements + +The Linux kernel security team is not a formal body and therefore unable +to enter any non-disclosure agreements. diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt new file mode 100644 index 000000000..7af899ffd --- /dev/null +++ b/Documentation/aoe/aoe.txt @@ -0,0 +1,84 @@ +The EtherDrive (R) HOWTO for users of 2.6 kernels is found at ... + + http://www.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html + + It has many tips and hints! + +CREATING DEVICE NODES + + Users of udev should find device nodes created automatically. Two + scripts are provided in Documentation/aoe as examples of static + device node creation for using the aoe driver. + + rm -rf /dev/etherd + sh Documentation/aoe/mkdevs.sh /dev/etherd + + ... or to make just one shelf's worth of block device nodes ... + + sh Documentation/aoe/mkshelf.sh /dev/etherd 0 + + There is also an autoload script that shows how to edit + /etc/modprobe.conf to ensure that the aoe module is loaded when + necessary. + +USING DEVICE NODES + + "cat /dev/etherd/err" blocks, waiting for error diagnostic output, + like any retransmitted packets. + + "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to + limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from + untrusted networks should be ignored as a matter of security. + + "echo > /dev/etherd/discover" tells the driver to find out what AoE + devices are available. + + These character devices may disappear and be replaced by sysfs + counterparts, so distribution maintainers are encouraged to create + scripts that use these devices. + + The block devices are named like this: + + e{shelf}.{slot} + e{shelf}.{slot}p{part} + + ... so that "e0.2" is the third blade from the left (slot 2) in the + first shelf (shelf address zero). That's the whole disk. The first + partition on that disk would be "e0.2p1". + +USING SYSFS + + Each aoe block device in /sys/block has the extra attributes of + state, mac, and netif. The state attribute is "up" when the device + is ready for I/O and "down" if detected but unusable. The + "down,closewait" state shows that the device is still open and + cannot come up again until it has been closed. + + The mac attribute is the ethernet address of the remote AoE device. + The netif attribute is the network interface on the localhost + through which we are communicating with the remote AoE device. + + There is a script in this directory that formats this information + in a convenient way. + + root@makki root# sh Documentation/aoe/status.sh + e10.0 eth3 up + e10.1 eth3 up + e10.2 eth3 up + e10.3 eth3 up + e10.4 eth3 up + e10.5 eth3 up + e10.6 eth3 up + e10.7 eth3 up + e10.8 eth3 up + e10.9 eth3 up + e4.0 eth1 up + e4.1 eth1 up + e4.2 eth1 up + e4.3 eth1 up + e4.4 eth1 up + e4.5 eth1 up + e4.6 eth1 up + e4.7 eth1 up + e4.8 eth1 up + e4.9 eth1 up diff --git a/Documentation/aoe/autoload.sh b/Documentation/aoe/autoload.sh new file mode 100644 index 000000000..78dad1334 --- /dev/null +++ b/Documentation/aoe/autoload.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# set aoe to autoload by installing the +# aliases in /etc/modprobe.conf + +f=/etc/modprobe.conf + +if test ! -r $f || test ! -w $f; then + echo "cannot configure $f for module autoloading" 1>&2 + exit 1 +fi + +grep major-152 $f >/dev/null +if [ $? = 1 ]; then + echo alias block-major-152 aoe >> $f + echo alias char-major-152 aoe >> $f +fi + diff --git a/Documentation/aoe/mkdevs.sh b/Documentation/aoe/mkdevs.sh new file mode 100644 index 000000000..6ce70703e --- /dev/null +++ b/Documentation/aoe/mkdevs.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +n_shelves=${n_shelves:-10} +n_partitions=${n_partitions:-16} + +if test "$#" != "1"; then + echo "Usage: sh `basename $0` {dir}" 1>&2 + exit 1 +fi +dir=$1 + +MAJOR=152 + +echo "Creating AoE devnode files in $dir ..." + +set -e + +mkdir -p $dir + +# (Status info is in sysfs. See status.sh.) +# rm -f $dir/stat +# mknod -m 0400 $dir/stat c $MAJOR 1 +rm -f $dir/err +mknod -m 0400 $dir/err c $MAJOR 2 +rm -f $dir/discover +mknod -m 0200 $dir/discover c $MAJOR 3 +rm -f $dir/interfaces +mknod -m 0200 $dir/interfaces c $MAJOR 4 + +export n_partitions +mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'` +i=0 +while test $i -lt $n_shelves; do + sh -xc "sh $mkshelf $dir $i" + i=`expr $i + 1` +done diff --git a/Documentation/aoe/mkshelf.sh b/Documentation/aoe/mkshelf.sh new file mode 100644 index 000000000..40932836b --- /dev/null +++ b/Documentation/aoe/mkshelf.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +if test "$#" != "2"; then + echo "Usage: sh `basename $0` {dir} {shelfaddress}" 1>&2 + exit 1 +fi +n_partitions=${n_partitions:-16} +dir=$1 +shelf=$2 +MAJOR=152 + +set -e + +minor=`echo 10 \* $shelf \* $n_partitions | bc` +endp=`echo $n_partitions - 1 | bc` +for slot in `seq 0 9`; do + for part in `seq 0 $endp`; do + name=e$shelf.$slot + test "$part" != "0" && name=${name}p$part + rm -f $dir/$name + mknod -m 0660 $dir/$name b $MAJOR $minor + + minor=`expr $minor + 1` + done +done diff --git a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh new file mode 100644 index 000000000..8934ccc44 --- /dev/null +++ b/Documentation/aoe/status.sh @@ -0,0 +1,28 @@ +#! /bin/sh +# collate and present sysfs information about AoE storage + +set -e +format="%8s\t%8s\t%8s\n" +me=`basename $0` + +# printf "$format" device mac netif state + +test -z "`mount | grep sysfs`" && { + echo "$me Error: sysfs is not mounted" 1>&2 + exit 1 +} +test -z "`lsmod | grep '^aoe'`" && { + echo "$me Error: aoe module is not loaded" 1>&2 + exit 1 +} + +for d in `ls -d /sys/block/etherd* 2>/dev/null | grep -v p` end; do + # maybe ls comes up empty, so we use "end" + test $d = end && continue + + dev=`echo "$d" | sed 's/.*!//'` + printf "$format" \ + "$dev" \ + "`cat \"$d/netif\"`" \ + "`cat \"$d/state\"`" +done | sort diff --git a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/Samsung-S3C24XX/Suspend.txt new file mode 100644 index 000000000..e12bc3284 --- /dev/null +++ b/Documentation/arm/Samsung-S3C24XX/Suspend.txt @@ -0,0 +1,106 @@ + S3C24XX Suspend Support + ======================= + + +Introduction +------------ + + The S3C2410 supports a low-power suspend mode, where the SDRAM is kept + in Self-Refresh mode, and all but the essential peripheral blocks are + powered down. For more information on how this works, please look + at the S3C2410 datasheets from Samsung. + + +Requirements +------------ + + 1) A bootloader that can support the necessary resume operation + + 2) Support for at least 1 source for resume + + 3) CONFIG_PM enabled in the kernel + + 4) Any peripherals that are going to be powered down at the same + time require suspend/resume support. + + +Resuming +-------- + + The S3C2410 user manual defines the process of sending the CPU to + sleep and how it resumes. The default behaviour of the Linux code + is to set the GSTATUS3 register to the physical address of the + code to resume Linux operation. + + GSTATUS4 is currently left alone by the sleep code, and is free to + use for any other purposes (for example, the EB2410ITX uses this to + save memory configuration in). + + +Machine Support +--------------- + + The machine specific functions must call the s3c2410_pm_init() function + to say that its bootloader is capable of resuming. This can be as + simple as adding the following to the machine's definition: + + INITMACHINE(s3c2410_pm_init) + + A board can do its own setup before calling s3c2410_pm_init, if it + needs to setup anything else for power management support. + + There is currently no support for over-riding the default method of + saving the resume address, if your board requires it, then contact + the maintainer and discuss what is required. + + Note, the original method of adding an late_initcall() is wrong, + and will end up initialising all compiled machines' pm init! + + +Debugging +--------- + + There are several important things to remember when using PM suspend: + + 1) The uart drivers will disable the clocks to the UART blocks when + suspending, which means that use of printascii() or similar direct + access to the UARTs will cause the debug to stop. + + 2) Whilst the pm code itself will attempt to re-enable the UART clocks, + care should be taken that any external clock sources that the UARTs + rely on are still enabled at that point. + + +Configuration +------------- + + The S3C2410 specific configuration in `System Type` defines various + aspects of how the S3C2410 suspend and resume support is configured + + `S3C2410 PM Suspend debug` + + This option prints messages to the serial console before and after + the actual suspend, giving detailed information on what is + happening + + + `S3C2410 PM Suspend Memory CRC` + + Allows the entire memory to be checksummed before and after the + suspend to see if there has been any corruption of the contents. + + This support requires the CRC32 function to be enabled. + + + `S3C2410 PM Suspend CRC Chunksize (KiB)` + + Defines the size of memory each CRC chunk covers. A smaller value + will mean that the CRC data block will take more memory, but will + identify any faults with better precision + + +Document Author +--------------- + +Ben Dooks, (c) 2004 Simtec Electronics + diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt new file mode 100644 index 000000000..8eedaa24f --- /dev/null +++ b/Documentation/atomic_ops.txt @@ -0,0 +1,456 @@ + Semantics and Behavior of Atomic and + Bitmask Operations + + David S. Miller + + This document is intended to serve as a guide to Linux port +maintainers on how to implement atomic counter, bitops, and spinlock +interfaces properly. + + The atomic_t type should be defined as a signed integer. +Also, it should be made opaque such that any kind of cast to a normal +C integer type will fail. Something like the following should +suffice: + + typedef struct { volatile int counter; } atomic_t; + + The first operations to implement for atomic_t's are the +initializers and plain reads. + + #define ATOMIC_INIT(i) { (i) } + #define atomic_set(v, i) ((v)->counter = (i)) + +The first macro is used in definitions, such as: + +static atomic_t my_counter = ATOMIC_INIT(1); + +The second interface can be used at runtime, as in: + + struct foo { atomic_t counter; }; + ... + + struct foo *k; + + k = kmalloc(sizeof(*k), GFP_KERNEL); + if (!k) + return -ENOMEM; + atomic_set(&k->counter, 0); + +Next, we have: + + #define atomic_read(v) ((v)->counter) + +which simply reads the current value of the counter. + +Now, we move onto the actual atomic operation interfaces. + + void atomic_add(int i, atomic_t *v); + void atomic_sub(int i, atomic_t *v); + void atomic_inc(atomic_t *v); + void atomic_dec(atomic_t *v); + +These four routines add and subtract integral values to/from the given +atomic_t value. The first two routines pass explicit integers by +which to make the adjustment, whereas the latter two use an implicit +adjustment value of "1". + +One very important aspect of these two routines is that they DO NOT +require any explicit memory barriers. They need only perform the +atomic_t counter update in an SMP safe manner. + +Next, we have: + + int atomic_inc_return(atomic_t *v); + int atomic_dec_return(atomic_t *v); + +These routines add 1 and subtract 1, respectively, from the given +atomic_t and return the new counter value after the operation is +performed. + +Unlike the above routines, it is required that explicit memory +barriers are performed before and after the operation. It must be +done such that all memory operations before and after the atomic +operation calls are strongly ordered with respect to the atomic +operation itself. + +For example, it should behave as if a smp_mb() call existed both +before and after the atomic operation. + +If the atomic instructions used in an implementation provide explicit +memory barrier semantics which satisfy the above requirements, that is +fine as well. + +Let's move on: + + int atomic_add_return(int i, atomic_t *v); + int atomic_sub_return(int i, atomic_t *v); + +These behave just like atomic_{inc,dec}_return() except that an +explicit counter adjustment is given instead of the implicit "1". +This means that like atomic_{inc,dec}_return(), the memory barrier +semantics are required. + +Next: + + int atomic_inc_and_test(atomic_t *v); + int atomic_dec_and_test(atomic_t *v); + +These two routines increment and decrement by 1, respectively, the +given atomic counter. They return a boolean indicating whether the +resulting counter value was zero or not. + +It requires explicit memory barrier semantics around the operation as +above. + + int atomic_sub_and_test(int i, atomic_t *v); + +This is identical to atomic_dec_and_test() except that an explicit +decrement is given instead of the implicit "1". It requires explicit +memory barrier semantics around the operation. + + int atomic_add_negative(int i, atomic_t *v); + +The given increment is added to the given atomic counter value. A +boolean is return which indicates whether the resulting counter value +is negative. It requires explicit memory barrier semantics around the +operation. + +If a caller requires memory barrier semantics around an atomic_t +operation which does not return a value, a set of interfaces are +defined which accomplish this: + + void smp_mb__before_atomic_dec(void); + void smp_mb__after_atomic_dec(void); + void smp_mb__before_atomic_inc(void); + void smp_mb__after_atomic_dec(void); + +For example, smp_mb__before_atomic_dec() can be used like so: + + obj->dead = 1; + smp_mb__before_atomic_dec(); + atomic_dec(&obj->ref_count); + +It makes sure that all memory operations preceeding the atomic_dec() +call are strongly ordered with respect to the atomic counter +operation. In the above example, it guarentees that the assignment of +"1" to obj->dead will be globally visible to other cpus before the +atomic counter decrement. + +Without the explicitl smp_mb__before_atomic_dec() call, the +implementation could legally allow the atomic counter update visible +to other cpus before the "obj->dead = 1;" assignment. + +The other three interfaces listed are used to provide explicit +ordering with respect to memory operations after an atomic_dec() call +(smp_mb__after_atomic_dec()) and around atomic_inc() calls +(smp_mb__{before,after}_atomic_inc()). + +A missing memory barrier in the cases where they are required by the +atomic_t implementation above can have disasterous results. Here is +an example, which follows a pattern occuring frequently in the Linux +kernel. It is the use of atomic counters to implement reference +counting, and it works such that once the counter falls to zero it can +be guarenteed that no other entity can be accessing the object: + +static void obj_list_add(struct obj *obj) +{ + obj->active = 1; + list_add(&obj->list); +} + +static void obj_list_del(struct obj *obj) +{ + list_del(&obj->list); + obj->active = 0; +} + +static void obj_destroy(struct obj *obj) +{ + BUG_ON(obj->active); + kfree(obj); +} + +struct obj *obj_list_peek(struct list_head *head) +{ + if (!list_empty(head)) { + struct obj *obj; + + obj = list_entry(head->next, struct obj, list); + atomic_inc(&obj->refcnt); + return obj; + } + return NULL; +} + +void obj_poke(void) +{ + struct obj *obj; + + spin_lock(&global_list_lock); + obj = obj_list_peek(&global_list); + spin_unlock(&global_list_lock); + + if (obj) { + obj->ops->poke(obj); + if (atomic_dec_and_test(&obj->refcnt)) + obj_destroy(obj); + } +} + +void obj_timeout(struct obj *obj) +{ + spin_lock(&global_list_lock); + obj_list_del(obj); + spin_unlock(&global_list_lock); + + if (atomic_dec_and_test(&obj->refcnt)) + obj_destroy(obj); +} + +(This is a simplification of the ARP queue management in the + generic neighbour discover code of the networking. Olaf Kirch + found a bug wrt. memory barriers in kfree_skb() that exposed + the atomic_t memory barrier requirements quite clearly.) + +Given the above scheme, it must be the case that the obj->active +update done by the obj list deletion be visible to other processors +before the atomic counter decrement is performed. + +Otherwise, the counter could fall to zero, yet obj->active would still +be set, thus triggering the assertion in obj_destroy(). The error +sequence looks like this: + + cpu 0 cpu 1 + obj_poke() obj_timeout() + obj = obj_list_peek(); + ... gains ref to obj, refcnt=2 + obj_list_del(obj); + obj->active = 0 ... + ... visibility delayed ... + atomic_dec_and_test() + ... refcnt drops to 1 ... + atomic_dec_and_test() + ... refcount drops to 0 ... + obj_destroy() + BUG() triggers since obj->active + still seen as one + obj->active update visibility occurs + +With the memory barrier semantics required of the atomic_t operations +which return values, the above sequence of memory visibility can never +happen. Specifically, in the above case the atomic_dec_and_test() +counter decrement would not become globally visible until the +obj->active update does. + +As a historical note, 32-bit Sparc used to only allow usage of +24-bits of it's atomic_t type. This was because it used 8 bits +as a spinlock for SMP safety. Sparc32 lacked a "compare and swap" +type instruction. However, 32-bit Sparc has since been moved over +to a "hash table of spinlocks" scheme, that allows the full 32-bit +counter to be realized. Essentially, an array of spinlocks are +indexed into based upon the address of the atomic_t being operated +on, and that lock protects the atomic operation. Parisc uses the +same scheme. + +Another note is that the atomic_t operations returning values are +extremely slow on an old 386. + +We will now cover the atomic bitmask operations. You will find that +their SMP and memory barrier semantics are similar in shape and scope +to the atomic_t ops above. + +Native atomic bit operations are defined to operate on objects aligned +to the size of an "unsigned long" C data type, and are least of that +size. The endianness of the bits within each "unsigned long" are the +native endianness of the cpu. + + void set_bit(unsigned long nr, volatils unsigned long *addr); + void clear_bit(unsigned long nr, volatils unsigned long *addr); + void change_bit(unsigned long nr, volatils unsigned long *addr); + +These routines set, clear, and change, respectively, the bit number +indicated by "nr" on the bit mask pointed to by "ADDR". + +They must execute atomically, yet there are no implicit memory barrier +semantics required of these interfaces. + + int test_and_set_bit(unsigned long nr, volatils unsigned long *addr); + int test_and_clear_bit(unsigned long nr, volatils unsigned long *addr); + int test_and_change_bit(unsigned long nr, volatils unsigned long *addr); + +Like the above, except that these routines return a boolean which +indicates whether the changed bit was set _BEFORE_ the atomic bit +operation. + +WARNING! It is incredibly important that the value be a boolean, +ie. "0" or "1". Do not try to be fancy and save a few instructions by +declaring the above to return "long" and just returning something like +"old_val & mask" because that will not work. + +For one thing, this return value gets truncated to int in many code +paths using these interfaces, so on 64-bit if the bit is set in the +upper 32-bits then testers will never see that. + +One great example of where this problem crops up are the thread_info +flag operations. Routines such as test_and_set_ti_thread_flag() chop +the return value into an int. There are other places where things +like this occur as well. + +These routines, like the atomic_t counter operations returning values, +require explicit memory barrier semantics around their execution. All +memory operations before the atomic bit operation call must be made +visible globally before the atomic bit operation is made visible. +Likewise, the atomic bit operation must be visible globally before any +subsequent memory operation is made visible. For example: + + obj->dead = 1; + if (test_and_set_bit(0, &obj->flags)) + /* ... */; + obj->killed = 1; + +The implementation of test_and_set_bit() must guarentee that +"obj->dead = 1;" is visible to cpus before the atomic memory operation +done by test_and_set_bit() becomes visible. Likewise, the atomic +memory operation done by test_and_set_bit() must become visible before +"obj->killed = 1;" is visible. + +Finally there is the basic operation: + + int test_bit(unsigned long nr, __const__ volatile unsigned long *addr); + +Which returns a boolean indicating if bit "nr" is set in the bitmask +pointed to by "addr". + +If explicit memory barriers are required around clear_bit() (which +does not return a value, and thus does not need to provide memory +barrier semantics), two interfaces are provided: + + void smp_mb__before_clear_bit(void); + void smp_mb__after_clear_bit(void); + +They are used as follows, and are akin to their atomic_t operation +brothers: + + /* All memory operations before this call will + * be globally visible before the clear_bit(). + */ + smp_mb__before_clear_bit(); + clear_bit( ... ); + + /* The clear_bit() will be visible before all + * subsequent memory operations. + */ + smp_mb__after_clear_bit(); + +Finally, there are non-atomic versions of the bitmask operations +provided. They are used in contexts where some other higher-level SMP +locking scheme is being used to protect the bitmask, and thus less +expensive non-atomic operations may be used in the implementation. +They have names similar to the above bitmask operation interfaces, +except that two underscores are prefixed to the interface name. + + void __set_bit(unsigned long nr, volatile unsigned long *addr); + void __clear_bit(unsigned long nr, volatile unsigned long *addr); + void __change_bit(unsigned long nr, volatile unsigned long *addr); + int __test_and_set_bit(unsigned long nr, volatile unsigned long *addr); + int __test_and_clear_bit(unsigned long nr, volatile unsigned long *addr); + int __test_and_change_bit(unsigned long nr, volatile unsigned long *addr); + +These non-atomic variants also do not require any special memory +barrier semantics. + +The routines xchg() and cmpxchg() need the same exact memory barriers +as the atomic and bit operations returning values. + +Spinlocks and rwlocks have memory barrier expectations as well. +The rule to follow is simple: + +1) When acquiring a lock, the implementation must make it globally + visible before any subsequent memory operation. + +2) When releasing a lock, the implementation must make it such that + all previous memory operations are globally visible before the + lock release. + +Which finally brings us to _atomic_dec_and_lock(). There is an +architecture-neutral version implemented in lib/dec_and_lock.c, +but most platforms will wish to optimize this in assembler. + + int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); + +Atomically decrement the given counter, and if will drop to zero +atomically acquire the given spinlock and perform the decrement +of the counter to zero. If it does not drop to zero, do nothing +with the spinlock. + +It is actually pretty simple to get the memory barrier correct. +Simply satisfy the spinlock grab requirements, which is make +sure the spinlock operation is globally visible before any +subsequent memory operation. + +We can demonstrate this operation more clearly if we define +an abstract atomic operation: + + long cas(long *mem, long old, long new); + +"cas" stands for "compare and swap". It atomically: + +1) Compares "old" with the value currently at "mem". +2) If they are equal, "new" is written to "mem". +3) Regardless, the current value at "mem" is returned. + +As an example usage, here is what an atomic counter update +might look like: + +void example_atomic_inc(long *counter) +{ + long old, new, ret; + + while (1) { + old = *counter; + new = old + 1; + + ret = cas(counter, old, new); + if (ret == old) + break; + } +} + +Let's use cas() in order to build a pseudo-C atomic_dec_and_lock(): + +int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +{ + long old, new, ret; + int went_to_zero; + + went_to_zero = 0; + while (1) { + old = atomic_read(atomic); + new = old - 1; + if (new == 0) { + went_to_zero = 1; + spin_lock(lock); + } + ret = cas(atomic, old, new); + if (ret == old) + break; + if (went_to_zero) { + spin_unlock(lock); + went_to_zero = 0; + } + } + + return went_to_zero; +} + +Now, as far as memory barriers go, as long as spin_lock() +strictly orders all subsequent memory operations (including +the cas()) with respect to itself, things will be fine. + +Said another way, _atomic_dec_and_lock() must guarentee that +a counter dropping to zero is never made visible before the +spinlock being acquired. + +Note that this also means that for the case where the counter +is not dropping to zero, there are no memory ordering +requirements. diff --git a/Documentation/cdrom/packet-writing.txt b/Documentation/cdrom/packet-writing.txt new file mode 100644 index 000000000..d34fcbca9 --- /dev/null +++ b/Documentation/cdrom/packet-writing.txt @@ -0,0 +1,86 @@ +Getting started quick +--------------------- + +- Select packet support in the block device section and UDF support in + the file system section. + +- Compile and install kernel and modules, reboot. + +- You need the udftools package (pktsetup, mkudffs, cdrwtool). + Download from http://sourceforge.net/projects/linux-udf/ + +- Grab a new CD-RW disc and format it (assuming CD-RW is hdc, substitute + as appropriate): + # cdrwtool -d /dev/hdc -q + +- Setup your writer + # pktsetup dev_name /dev/hdc + +- Now you can mount /dev/pktcdvd/dev_name and copy files to it. Enjoy! + # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime + + +Packet writing for DVD-RW media +------------------------------- + +DVD-RW discs can be written to much like CD-RW discs if they are in +the so called "restricted overwrite" mode. To put a disc in restricted +overwrite mode, run: + + # dvd+rw-format /dev/hdc + +You can then use the disc the same way you would use a CD-RW disc: + + # pktsetup dev_name /dev/hdc + # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime + + +Packet writing for DVD+RW media +------------------------------- + +According to the DVD+RW specification, a drive supporting DVD+RW discs +shall implement "true random writes with 2KB granularity", which means +that it should be possible to put any filesystem with a block size >= +2KB on such a disc. For example, it should be possible to do: + + # mkudffs /dev/hdc + # mount /dev/hdc /cdrom -t udf -o rw,noatime + +However, some drives don't follow the specification and expect the +host to perform aligned writes at 32KB boundaries. Other drives do +follow the specification, but suffer bad performance problems if the +writes are not 32KB aligned. + +Both problems can be solved by using the pktcdvd driver, which always +generates aligned writes. + + # pktsetup dev_name /dev/hdc + # mkudffs /dev/pktcdvd/dev_name + # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime + + +Notes +----- + +- CD-RW media can usually not be overwritten more than about 1000 + times, so to avoid unnecessary wear on the media, you should always + use the noatime mount option. + +- Defect management (ie automatic remapping of bad sectors) has not + been implemented yet, so you are likely to get at least some + filesystem corruption if the disc wears out. + +- Since the pktcdvd driver makes the disc appear as a regular block + device with a 2KB block size, you can put any filesystem you like on + the disc. For example, run: + + # /sbin/mke2fs /dev/pktcdvd/dev_name + + to create an ext2 filesystem on the disc. + + +Links +----- + +See http://fy.chalmers.se/~appro/linux/DVD+RW/ for more information +about DVD writing. diff --git a/Documentation/cpu-freq/cpufreq-nforce2.txt b/Documentation/cpu-freq/cpufreq-nforce2.txt new file mode 100644 index 000000000..9188337d8 --- /dev/null +++ b/Documentation/cpu-freq/cpufreq-nforce2.txt @@ -0,0 +1,19 @@ + +The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 plattforms. + +This works better than on other plattforms, because the FSB of the CPU +can be controlled independently from the PCI/AGP clock. + +The module has two options: + + fid: multiplier * 10 (for example 8.5 = 85) + min_fsb: minimum FSB + +If not set, fid is calculated from the current CPU speed and the FSB. +min_fsb defaults to FSB at boot time - 50 MHz. + +IMPORTANT: The available range is limited downwards! + Also the minimum available FSB can differ, for systems + booting with 200 MHz, 150 should always work. + + diff --git a/Documentation/dvb/README.dibusb b/Documentation/dvb/README.dibusb new file mode 100644 index 000000000..e3d650b81 --- /dev/null +++ b/Documentation/dvb/README.dibusb @@ -0,0 +1,247 @@ +Documentation for dib3000mb frontend driver and dibusb device driver +==================================================================== + +Copyright (C) 2004 Patrick Boettcher (patrick.boettcher@desy.de), + +dibusb and dib3000mb/mc drivers based on GPL code, which has + +Copyright (C) 2004 Amaury Demol for DiBcom (ademol@dibcom.fr) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, version 2. + + +Supported devices USB1.1 +======================== + +Produced and reselled by Twinhan: +--------------------------------- +- TwinhanDTV USB-Ter DVB-T Device (VP7041) + http://www.twinhan.com/product_terrestrial_3.asp + +- TwinhanDTV Magic Box (VP7041e) + http://www.twinhan.com/product_terrestrial_4.asp + +- HAMA DVB-T USB device + http://www.hama.de/portal/articleId*110620/action*2598 + +- CTS Portable (Chinese Television System) + http://www.2cts.tv/ctsportable/ + +- Unknown USB DVB-T device with vendor ID Hyper-Paltek + + +Produced and reselled by KWorld: +-------------------------------- +- KWorld V-Stream XPERT DTV DVB-T USB + http://www.kworld.com.tw/en/product/DVBT-USB/DVBT-USB.html + +- JetWay DTV DVB-T USB + http://www.jetway.com.tw/evisn/product/lcd-tv/DVT-USB/dtv-usb.htm + +- ADSTech Instant TV DVB-T USB + http://www.adstech.com/products/PTV-333/intro/PTV-333_intro.asp?pid=PTV-333 + + +Others: +------- +- Ultima Electronic/Artec T1 USB TVBOX (AN2135 and AN2235) + http://82.161.246.249/products-tvbox.html + +- Compro Videomate DVB-U2000 - DVB-T USB + http://www.comprousa.com/products/vmu2000.htm + +- Grandtec USB DVB-T + http://www.grand.com.tw/ + +- Avermedia AverTV DVBT USB + http://www.avermedia.com/ + +- DiBcom USB DVB-T reference device (non-public) + + +Supported devices USB2.0 +======================== +- Twinhan MagicBox II + http://www.twinhan.com/product_terrestrial_7.asp + +- Yakumo DVB-T mobile + http://www.yakumo.de/produkte/index.php?pid=1&ag=DVB-T + +- DiBcom USB2.0 DVB-T reference device (non-public) + + +0. NEWS: + 2004-12-06 - possibility for demod i2c-address probing + - new usb IDs (Compro,Artec) + 2004-11-23 - merged changes from DiB3000MC_ver2.1 + - revised the debugging + - possibility to deliver the complete TS for USB2.0 + 2004-11-21 - first working version of the dib3000mc/p frontend driver. + 2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke. + 2004-11-07 - added remote control support. Thanks to David Matthews. + 2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec) + - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD + - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems + better settled there (added xfer_ops-struct) + - created a common files for frontends (mc/p/mb) + 2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek) + 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks + to Amaury Demol for reporting + - changed usb TS transfer method (several urbs, stopping transfer + before setting a new pid) + 2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks + to Christian Motschke for reporting + 2004-09-05 - released the dibusb device and dib3000mb-frontend driver + + (old news for vp7041.c) + 2004-07-15 - found out, by accident, that the device has a TUA6010XS for + PLL + 2004-07-12 - figured out, that the driver should also work with the + CTS Portable (Chinese Television System) + 2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working + properly with firmware extracted from 2.422 + - #if for 2.6.4 (dvb), compile issue + - changed firmware handling, see vp7041.txt sec 1.1 + 2004-07-02 - some tuner modifications, v0.1, cleanups, first public + 2004-06-28 - now using the dvb_dmx_swfilter_packets, everything + runs fine now + 2004-06-27 - able to watch and switching channels (pre-alpha) + - no section filtering yet + 2004-06-06 - first TS received, but kernel oops :/ + 2004-05-14 - firmware loader is working + 2004-05-11 - start writing the driver + +1. How to use? +NOTE: This driver was developed using Linux 2.6.6., +it is working with 2.6.7, 2.6.8.1, 2.6.9 . + +Linux 2.4.x support is not planned, but patches are very welcome. + +NOTE: I'm using Debian testing, so the following explaination (especially +the hotplug-path) needn't match your system, but probably it will :). + +1.1. Firmware + +The USB driver needs to download a firmware to start working. + +You can either use "get_dvb_firmware dibusb" to download the firmware or you +can get it directly via + +for USB1.1 (AN2135) +http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-5.0.0.11.fw?rev=1.1&content-type=text/plain + +for USB1.1 (AN2235) (a few Artec T1 devices) +http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-an2235-1.fw?rev=1.1&content-type=text/plain + +for USB2.0 (FX2) +http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-6.0.0.5.fw?rev=1.1&content-type=text/plain + +1.2. Compiling + +Since the driver is in the linux kernel, activating the driver in +your favorite config-environment should sufficient. I recommend +to compile the driver as module. Hotplug does the rest. + +1.3. Loading the drivers + +Hotplug is able to load the driver, when it is needed (because you plugged +in the device). + +If you want to enable debug output, you have to load the driver manually and +from withing the dvb-kernel cvs repository. + +first have a look, which debug level are available: + +modinfo dib3000mb +modinfo dvb-dibusb + +modprobe dib3000mb debug= +modprobe dvb-dibusb debug= + +should do the trick. + +When the driver is loaded successfully, the firmware file was in +the right place and the device is connected, the "Power"-LED should be +turned on. + +At this point you should be able to start a dvb-capable application. For myself +I used mplayer, dvbscan, tzap and kaxtv, they are working. Using the device +as a slave device in vdr, was not working for me. Some work has to be done +(patches and comments are very welcome). + +2. Known problems and bugs + +TODO: +- signal-quality and strength calculations + +2.1. Adding support for devices + +It is not possible to determine the range of devices based on the DiBcom +reference designs. This is because the reference design of DiBcom can be sold +to thirds, without telling DiBcom (so done with the Twinhan VP7041 and +the HAMA device). + +When you think you have a device like this and the driver does not recognizes it, +please send the ****load*.inf and the ****cap*.inf of the Windows driver to me. + +Sometimes the Vendor or Product ID is identical to the ones of Twinhan, even +though it is not a Twinhan device (e.g. HAMA), then please send me the name +of the device. I will add it to this list in order to make this clear to +others. + +If you are familar with C you can also add the VID and PID of the device to +the dvb-dibusb.h-file and create a patch and send it over to me or to +the linux-dvb mailing list, _after_ you have tried compiling and modprobing +it. + +2.2. USB1.1 Bandwidth limitation + +Most of the current supported devices are USB1.1 and thus they have a +maximum bandwidth of about 5-6 MBit/s when connected to a USB2.0 hub. +This is not enough for receiving the complete transport stream of a +DVB-T channel (which can be about 16 MBit/s). Normally this is not a +problem, if you only want to watch TV, but watching a channel while +recording another channel on the same frequency simply does not work. +This applies to all USB1.1 DVB-T devices. + +A special problem of the dibusb for the USB1.1 is, that the USB control +IC has a problem with write accesses while having MPEG2-streaming +enabled. When you set another pid while receiving MPEG2-TS it happens, that +the stream is disturbed and probably data is lost (results in distortions of +the video or strange beeps within the audio stream). DiBcom is preparing a +firmware especially for Linux which perhaps solves the problem. + +Especially VDR users are victoms of this bug. VDR frequently requests new PIDs +due the automatic scanning (introduced in 1.3.x, afaik) and epg-scan. Disabling +these features is maybe a solution. Additionally this behaviour of VDR exceeds +the USB1.1 bandwidth. + +2.3. Comments + +Patches, comments and suggestions are very very welcome + +3. Acknowledgements + Amaury Demol (ademol@dibcom.fr) and Francois Kanounnikoff from DiBcom for + providing specs, code and help, on which the dvb-dibusb and dib3000mb are + based. + + David Matthews for identifying a new device type (Artec T1 with AN2235) + and for extending dibusb with remote control event handling. Thank you. + + Alex Woods for frequently answering question about usb and dvb + stuff, a big thank you + + Bernd Wagner for helping with huge bug reports and discussions. + + Some guys on the linux-dvb mailing list for encouraging me + + Peter Schildmann >peter.schildmann-nospam-at-web.de< for his + user-level firmware loader, which saves a lot of time + (when writing the vp7041 driver) + + Ulf Hermenau for helping me out with traditional chinese. + + André Smoktun and Christian Frömmel for supporting me with + hardware and listening to my problems very patient diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware new file mode 100644 index 000000000..e9964b71e --- /dev/null +++ b/Documentation/dvb/get_dvb_firmware @@ -0,0 +1,339 @@ +#!/usr/bin/perl +# DVB firmware extractor +# +# (c) 2004 Andrew de Quincey +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +use File::Temp qw/ tempdir /; +use IO::Handle; + +@components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t", "dec2540t", "dec3000s", "vp7041", "dibusb" ); + +# Check args +syntax() if (scalar(@ARGV) != 1); +$cid = $ARGV[0]; + +# Do it! +for($i=0; $i < scalar(@components); $i++) { + if ($cid eq $components[$i]) { + $outfile = eval($cid); + die $@ if $@; + print STDERR "Firmware $outfile extracted successfully. Now copy it to either /lib/firmware or /usr/lib/hotplug/firmware/ (depending on your hotplug version).\n"; + exit(0); + } +} + +# If we get here, it wasn't found +print STDERR "Unknown component \"$cid\"\n"; +syntax(); + + + + +# --------------------------------------------------------------- +# Firmware-specific extraction subroutines + +sub sp8870 { + my $sourcefile = "tt_Premium_217g.zip"; + my $url = "http://www.technotrend.de/new/217g/$sourcefile"; + my $hash = "53970ec17a538945a6d8cb608a7b3899"; + my $outfile = "dvb-fe-sp8870.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash); + copy("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $outfile); + + $outfile; +} + +sub sp887x { + my $sourcefile = "Dvbt1.3.57.6.zip"; + my $url = "http://www.avermedia.com/software/$sourcefile"; + my $cabfile = "DVBT Net Ver1.3.57.6/disk1/data1.cab"; + my $hash = "237938d53a7f834c05c42b894ca68ac3"; + my $outfile = "dvb-fe-sp887x.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + checkunshield(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + unshield("$tmpdir/$cabfile", $tmpdir); + verify("$tmpdir/sc_main.mc", $hash); + copy("$tmpdir/sc_main.mc", $outfile); + + $outfile; +} + +sub tda10045 { + my $sourcefile = "tt_budget_217g.zip"; + my $url = "http://www.technotrend.de/new/217g/$sourcefile"; + my $hash = "2105fd5bf37842fbcdfa4bfd58f3594a"; + my $outfile = "dvb-fe-tda10045.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + extract("$tmpdir/software/OEM/PCI/App/ttlcdacc.dll", 0x37ef9, 30555, "$tmpdir/fwtmp"); + verify("$tmpdir/fwtmp", $hash); + copy("$tmpdir/fwtmp", $outfile); + + $outfile; +} + +sub tda10046 { + my $sourcefile = "tt_budget_217g.zip"; + my $url = "http://www.technotrend.de/new/217g/$sourcefile"; + my $hash = "a25b579e37109af60f4a36c37893957c"; + my $outfile = "dvb-fe-tda10046.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + extract("$tmpdir/software/OEM/PCI/App/ttlcdacc.dll", 0x3f731, 24479, "$tmpdir/fwtmp"); + verify("$tmpdir/fwtmp", $hash); + copy("$tmpdir/fwtmp", $outfile); + + $outfile; +} + +sub av7110 { + my $sourcefile = "dvb-ttpci-01.fw-261c"; + my $url = "http://www.linuxtv.org/download/dvb/firmware/$sourcefile"; + my $hash = "7b263de6b0b92d2347319c65adc7d4fb"; + my $outfile = "dvb-ttpci-01.fw"; + + checkstandard(); + + wgetfile($sourcefile, $url); + verify($sourcefile, $hash); + copy($sourcefile, $outfile); + + $outfile; +} + +sub dec2000t { + my $sourcefile = "dec217g.exe"; + my $url = "http://hauppauge.lightpath.net/de/$sourcefile"; + my $hash = "bd86f458cee4a8f0a8ce2d20c66215a9"; + my $outfile = "dvb-ttusb-dec-2000t.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $hash); + copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_T.bin", $outfile); + + $outfile; +} + +sub dec2540t { + my $sourcefile = "dec217g.exe"; + my $url = "http://hauppauge.lightpath.net/de/$sourcefile"; + my $hash = "53e58f4f5b5c2930beee74a7681fed92"; + my $outfile = "dvb-ttusb-dec-2540t.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $hash); + copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_X.bin", $outfile); + + $outfile; +} + +sub dec3000s { + my $sourcefile = "dec217g.exe"; + my $url = "http://hauppauge.lightpath.net/de/$sourcefile"; + my $hash = "b013ececea83f4d6d8d2a29ac7c1b448"; + my $outfile = "dvb-ttusb-dec-3000s.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + verify("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $hash); + copy("$tmpdir/software/OEM/STB/App/Boot/STB_PC_S.bin", $outfile); + + $outfile; +} + +sub vp7041 { + my $sourcefile = "2.422.zip"; + my $url = "http://www.twinhan.com/files/driver/USB-Ter/$sourcefile"; + my $hash = "e88c9372d1f66609a3e7b072c53fbcfe"; + my $outfile = "dvb-vp7041-2.422.fw"; + my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); + + checkstandard(); + + wgetfile($sourcefile, $url); + unzip($sourcefile, $tmpdir); + extract("$tmpdir/VisionDTV/Drivers/Win2K&XP/UDTTload.sys", 12503, 3036, "$tmpdir/fwtmp1"); + extract("$tmpdir/VisionDTV/Drivers/Win2K&XP/UDTTload.sys", 2207, 10274, "$tmpdir/fwtmp2"); + + my $CMD = "\000\001\000\222\177\000"; + my $PAD = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"; + my ($FW); + open $FW, ">$tmpdir/fwtmp3"; + print $FW "$CMD\001$PAD"; + print $FW "$CMD\001$PAD"; + appendfile($FW, "$tmpdir/fwtmp1"); + print $FW "$CMD\000$PAD"; + print $FW "$CMD\001$PAD"; + appendfile($FW, "$tmpdir/fwtmp2"); + print $FW "$CMD\001$PAD"; + print $FW "$CMD\000$PAD"; + close($FW); + + verify("$tmpdir/fwtmp3", $hash); + copy("$tmpdir/fwtmp3", $outfile); + + $outfile; +} + +sub dibusb { + my $url = "http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-5.0.0.11.fw?rev=1.1&content-type=text/plain"; + my $outfile = "dvb-dibusb-5.0.0.11.fw"; + my $hash = "fa490295a527360ca16dcdf3224ca243"; + + checkstandard(); + + wgetfile($outfile, $url); + verify($outfile,$hash); + + $outfile; +} + +# --------------------------------------------------------------- +# Utilities + +sub checkstandard { + if (system("which unzip > /dev/null 2>&1")) { + die "This firmware requires the unzip command - see ftp://ftp.info-zip.org/pub/infozip/UnZip.html\n"; + } + if (system("which md5sum > /dev/null 2>&1")) { + die "This firmware requires the md5sum command - see http://www.gnu.org/software/coreutils/\n"; + } + if (system("which wget > /dev/null 2>&1")) { + die "This firmware requires the wget command - see http://wget.sunsite.dk/\n"; + } +} + +sub checkunshield { + if (system("which unshield > /dev/null 2>&1")) { + die "This firmware requires the unshield command - see http://sourceforge.net/projects/synce/\n"; + } +} + +sub wgetfile { + my ($sourcefile, $url) = @_; + + if (! -f $sourcefile) { + system("wget -O \"$sourcefile\" \"$url\"") and die "wget failed - unable to download firmware"; + } +} + +sub unzip { + my ($sourcefile, $todir) = @_; + + $status = system("unzip -q -o -d \"$todir\" \"$sourcefile\" 2>/dev/null" ); + if ((($status >> 8) > 2) || (($status & 0xff) != 0)) { + die ("unzip failed - unable to extract firmware"); + } +} + +sub unshield { + my ($sourcefile, $todir) = @_; + + system("unshield -d \"$todir\" \"$sourcefile\" > /dev/null" ) and die ("unshield failed - unable to extract firmware"); +} + +sub verify { + my ($filename, $hash) = @_; + my ($testhash); + + open(CMD, "md5sum \"$filename\"|"); + $testhash = ; + $testhash =~ /([a-zA-Z0-9]*)/; + $testhash = $1; + close CMD; + die "Hash of extracted file does not match!\n" if ($testhash ne $hash); +} + +sub copy { + my ($from, $to) = @_; + + system("cp -f \"$from\" \"$to\"") and die ("cp failed"); +} + +sub extract { + my ($infile, $offset, $length, $outfile) = @_; + my ($chunklength, $buf, $rcount); + + open INFILE, "<$infile"; + open OUTFILE, ">$outfile"; + sysseek(INFILE, $offset, SEEK_SET); + while($length > 0) { + # Calc chunk size + $chunklength = 2048; + $chunklength = $length if ($chunklength > $length); + + $rcount = sysread(INFILE, $buf, $chunklength); + die "Ran out of data\n" if ($rcount != $chunklength); + syswrite(OUTFILE, $buf); + $length -= $rcount; + } + close INFILE; + close OUTFILE; +} + +sub appendfile { + my ($FH, $infile) = @_; + my ($buf); + + open INFILE, "<$infile"; + while(1) { + $rcount = sysread(INFILE, $buf, 2048); + last if ($rcount == 0); + print $FH $buf; + } + close(INFILE); +} + +sub syntax() { + print STDERR "syntax: get_dvb_firmware \n"; + print STDERR "Supported components:\n"; + for($i=0; $i < scalar(@components); $i++) { + print STDERR "\t" . $components[$i] . "\n"; + } + exit(1); +} diff --git a/Documentation/dvb/udev.txt b/Documentation/dvb/udev.txt new file mode 100644 index 000000000..68ee224b6 --- /dev/null +++ b/Documentation/dvb/udev.txt @@ -0,0 +1,46 @@ +The DVB subsystem currently registers to the sysfs subsystem using the +"class_simple" interface. + +This means that only the basic informations like module loading parameters +are presented through sysfs. Other things that might be interesting are +currently *not* available. + +Nevertheless it's now possible to add proper udev rules so that the +DVB device nodes are created automatically. + +We assume that you have udev already up and running and that have been +creating the DVB device nodes manually up to now due to the missing sysfs +support. + +0. Don't forget to disable your current method of creating the +device nodes manually. + +1. Unfortunately, you'll need a helper script to transform the kernel +sysfs device name into the well known dvb adapter / device naming scheme. +The script should be called "dvb.sh" and should be placed into a script +dir where udev can execute it, most likely /etc/udev/scripts/ + +So, create a new file /etc/udev/scripts/dvb.sh and add the following: +------------------------------schnipp------------------------------------------------ +#!/bin/sh +/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,' +------------------------------schnipp------------------------------------------------ + +Don't forget to make the script executable with "chmod". + +1. You need to create a proper udev rule that will create the device nodes +like you know them. All real distributions out there scan the /etc/udev/rules.d +directory for rule files. The main udev configuration file /etc/udev/udev.conf +will tell you the directory where the rules are, most likely it's /etc/udev/rules.d/ + +Create a new rule file in that directory called "dvb.rule" and add the following line: +------------------------------schnipp------------------------------------------------ +KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c" +------------------------------schnipp------------------------------------------------ + +If you want more control over the device nodes (for example a special group membership) +have a look at "man udev". + +For every device that registers to the sysfs subsystem with a "dvb" prefix, +the helper script /etc/udev/scripts/dvb.sh is invoked, which will then +create the proper device node in your /dev/ directory. diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt new file mode 100644 index 000000000..2da4a39e5 --- /dev/null +++ b/Documentation/feature-removal-schedule.txt @@ -0,0 +1,17 @@ +The following is a list of files and features that are going to be +removed in the kernel source tree. Every entry should contain what +exactly is going away, why it is happening, and who is going to be doing +the work. When the feature is removed from the kernel, it should also +be removed from this file. + +--------------------------- + +What: devfs +When: July 2005 +Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfs + function calls throughout the kernel tree +Why: It has been unmaintained for a number of years, has unfixable + races, contains a naming policy within the kernel that is + against the LSB, and can be replaced by using udev. +Who: Greg Kroah-Hartman + diff --git a/Documentation/filesystems/sysfs-pci.txt b/Documentation/filesystems/sysfs-pci.txt new file mode 100644 index 000000000..e97d024ea --- /dev/null +++ b/Documentation/filesystems/sysfs-pci.txt @@ -0,0 +1,88 @@ +Accessing PCI device resources through sysfs + +sysfs, usually mounted at /sys, provides access to PCI resources on platforms +that support it. For example, a given bus might look like this: + + /sys/devices/pci0000:17 + |-- 0000:17:00.0 + | |-- class + | |-- config + | |-- detach_state + | |-- device + | |-- irq + | |-- local_cpus + | |-- resource + | |-- resource0 + | |-- resource1 + | |-- resource2 + | |-- rom + | |-- subsystem_device + | |-- subsystem_vendor + | `-- vendor + `-- detach_state + +The topmost element describes the PCI domain and bus number. In this case, +the domain number is 0000 and the bus number is 17 (both values are in hex). +This bus contains a single function device in slot 0. The domain and bus +numbers are reproduced for convenience. Under the device directory are several +files, each with their own function. + + file function + ---- -------- + class PCI class (ascii, ro) + config PCI config space (binary, rw) + detach_state connection status (bool, rw) + device PCI device (ascii, ro) + irq IRQ number (ascii, ro) + local_cpus nearby CPU mask (cpumask, ro) + resource PCI resource host addresses (ascii, ro) + resource0..N PCI resource N, if present (binary, mmap) + rom PCI ROM resource, if present (binary, ro) + subsystem_device PCI subsystem device (ascii, ro) + subsystem_vendor PCI subsystem vendor (ascii, ro) + vendor PCI vendor (ascii, ro) + + ro - read only file + rw - file is readable and writable + mmap - file is mmapable + ascii - file contains ascii text + binary - file contains binary data + cpumask - file contains a cpumask type + +The read only files are informational, writes to them will be ignored. +Writable files can be used to perform actions on the device (e.g. changing +config space, detaching a device). mmapable files are available via an +mmap of the file at offset 0 and can be used to do actual device programming +from userspace. Note that some platforms don't support mmapping of certain +resources, so be sure to check the return value from any attempted mmap. + +Accessing legacy resources through sysfs + +Legacy I/O port and ISA memory resources are also provided in sysfs if the +underlying platform supports them. They're located in the PCI class heirarchy, +e.g. + + /sys/class/pci_bus/0000:17/ + |-- bridge -> ../../../devices/pci0000:17 + |-- cpuaffinity + |-- legacy_io + `-- legacy_mem + +The legacy_io file is a read/write file that can be used by applications to +do legacy port I/O. The application should open the file, seek to the desired +port (e.g. 0x3e8) and do a read or a write of 1, 2 or 4 bytes. The legacy_mem +file should be mmapped with an offset corresponding to the memory offset +desired, e.g. 0xa0000 for the VGA frame buffer. The application can then +simply dereference the returned pointer (after checking for errors of course) +to access legacy memory space. + +Supporting PCI access on new platforms + +In order to support PCI resource mapping as described above, Linux platform +code must define HAVE_PCI_MMAP and provide a pci_mmap_page_range function. +Platforms are free to only support subsets of the mmap functionality, but +useful return codes should be provided. + +Legacy resources are protected by the HAVE_PCI_LEGACY define. Platforms +wishing to support legacy functionality should define it and provide +pci_legacy_read, pci_legacy_write and pci_mmap_legacy_page_range functions. \ No newline at end of file diff --git a/Documentation/fujitsu/frv/README.txt b/Documentation/fujitsu/frv/README.txt new file mode 100644 index 000000000..a984faa96 --- /dev/null +++ b/Documentation/fujitsu/frv/README.txt @@ -0,0 +1,51 @@ + ================================ + Fujitsu FR-V LINUX DOCUMENTATION + ================================ + +This directory contains documentation for the Fujitsu FR-V CPU architecture +port of Linux. + +The following documents are available: + + (*) features.txt + + A description of the basic features inherent in this architecture port. + + + (*) configuring.txt + + A summary of the configuration options particular to this architecture. + + + (*) booting.txt + + A description of how to boot the kernel image and a summary of the kernel + command line options. + + + (*) gdbstub.txt + + A description of how to debug the kernel using GDB attached by serial + port, and a summary of the services available. + + + (*) mmu-layout.txt + + A description of the virtual and physical memory layout used in the + MMU linux kernel, and the registers used to support it. + + + (*) gdbinit + + An example .gdbinit file for use with GDB. It includes macros for viewing + MMU state on the FR451. See mmu-layout.txt for more information. + + + (*) clock.txt + + A description of the CPU clock scaling interface. + + + (*) atomic-ops.txt + + A description of how the FR-V kernel's atomic operations work. diff --git a/Documentation/fujitsu/frv/atomic-ops.txt b/Documentation/fujitsu/frv/atomic-ops.txt new file mode 100644 index 000000000..96638e9b9 --- /dev/null +++ b/Documentation/fujitsu/frv/atomic-ops.txt @@ -0,0 +1,134 @@ + ===================================== + FUJITSU FR-V KERNEL ATOMIC OPERATIONS + ===================================== + +On the FR-V CPUs, there is only one atomic Read-Modify-Write operation: the SWAP/SWAPI +instruction. Unfortunately, this alone can't be used to implement the following operations: + + (*) Atomic add to memory + + (*) Atomic subtract from memory + + (*) Atomic bit modification (set, clear or invert) + + (*) Atomic compare and exchange + +On such CPUs, the standard way of emulating such operations in uniprocessor mode is to disable +interrupts, but on the FR-V CPUs, modifying the PSR takes a lot of clock cycles, and it has to be +done twice. This means the CPU runs for a relatively long time with interrupts disabled, +potentially having a great effect on interrupt latency. + + +============= +NEW ALGORITHM +============= + +To get around this, the following algorithm has been implemented. It operates in a way similar to +the LL/SC instruction pairs supported on a number of platforms. + + (*) The CCCR.CC3 register is reserved within the kernel to act as an atomic modify abort flag. + + (*) In the exception prologues run on kernel->kernel entry, CCCR.CC3 is set to 0 (Undefined + state). + + (*) All atomic operations can then be broken down into the following algorithm: + + (1) Set ICC3.Z to true and set CC3 to True (ORCC/CKEQ/ORCR). + + (2) Load the value currently in the memory to be modified into a register. + + (3) Make changes to the value. + + (4) If CC3 is still True, simultaneously and atomically (by VLIW packing): + + (a) Store the modified value back to memory. + + (b) Set ICC3.Z to false (CORCC on GR29 is sufficient for this - GR29 holds the current + task pointer in the kernel, and so is guaranteed to be non-zero). + + (5) If ICC3.Z is still true, go back to step (1). + +This works in a non-SMP environment because any interrupt or other exception that happens between +steps (1) and (4) will set CC3 to the Undefined, thus aborting the store in (4a), and causing the +condition in ICC3 to remain with the Z flag set, thus causing step (5) to loop back to step (1). + + +This algorithm suffers from two problems: + + (1) The condition CCCR.CC3 is cleared unconditionally by an exception, irrespective of whether or + not any changes were made to the target memory location during that exception. + + (2) The branch from step (5) back to step (1) may have to happen more than once until the store + manages to take place. In theory, this loop could cycle forever because there are too many + interrupts coming in, but it's unlikely. + + +======= +EXAMPLE +======= + +Taking an example from include/asm-frv/atomic.h: + + static inline int atomic_add_return(int i, atomic_t *v) + { + unsigned long val; + + asm("0: \n" + +It starts by setting ICC3.Z to true for later use, and also transforming that into CC3 being in the +True state. + + " orcc gr0,gr0,gr0,icc3 \n" <-- (1) + " ckeq icc3,cc7 \n" <-- (1) + +Then it does the load. Note that the final phase of step (1) is done at the same time as the +load. The VLIW packing ensures they are done simultaneously. The ".p" on the load must not be +removed without swapping the order of these two instructions. + + " ld.p %M0,%1 \n" <-- (2) + " orcr cc7,cc7,cc3 \n" <-- (1) + +Then the proposed modification is generated. Note that the old value can be retained if required +(such as in test_and_set_bit()). + + " add%I2 %1,%2,%1 \n" <-- (3) + +Then it attempts to store the value back, contingent on no exception having cleared CC3 since it +was set to True. + + " cst.p %1,%M0 ,cc3,#1 \n" <-- (4a) + +It simultaneously records the success or failure of the store in ICC3.Z. + + " corcc gr29,gr29,gr0 ,cc3,#1 \n" <-- (4b) + +Such that the branch can then be taken if the operation was aborted. + + " beq icc3,#0,0b \n" <-- (5) + : "+U"(v->counter), "=&r"(val) + : "NPr"(i) + : "memory", "cc7", "cc3", "icc3" + ); + + return val; + } + + +============= +CONFIGURATION +============= + +The atomic ops implementation can be made inline or out-of-line by changing the +CONFIG_FRV_OUTOFLINE_ATOMIC_OPS configuration variable. Making it out-of-line has a number of +advantages: + + - The resulting kernel image may be smaller + - Debugging is easier as atomic ops can just be stepped over and they can be breakpointed + +Keeping it inline also has a number of advantages: + + - The resulting kernel may be Faster + - no out-of-line function calls need to be made + - the compiler doesn't have half its registers clobbered by making a call + +The out-of-line implementations live in arch/frv/lib/atomic-ops.S. diff --git a/Documentation/fujitsu/frv/booting.txt b/Documentation/fujitsu/frv/booting.txt new file mode 100644 index 000000000..4e229056e --- /dev/null +++ b/Documentation/fujitsu/frv/booting.txt @@ -0,0 +1,181 @@ + ========================= + BOOTING FR-V LINUX KERNEL + ========================= + +====================== +PROVIDING A FILESYSTEM +====================== + +First of all, a root filesystem must be made available. This can be done in +one of two ways: + + (1) NFS Export + + A filesystem should be constructed in a directory on an NFS server that + the target board can reach. This directory should then be NFS exported + such that the target board can read and write into it as root. + + (2) Flash Filesystem (JFFS2 Recommended) + + In this case, the image must be stored or built up on flash before it + can be used. A complete image can be built using the mkfs.jffs2 or + similar program and then downloaded and stored into flash by RedBoot. + + +======================== +LOADING THE KERNEL IMAGE +======================== + +The kernel will need to be loaded into RAM by RedBoot (or by some alternative +boot loader) before it can be run. The kernel image (arch/frv/boot/Image) may +be loaded in one of three ways: + + (1) Load from Flash + + This is the simplest. RedBoot can store an image in the flash (see the + RedBoot documentation) and then load it back into RAM. RedBoot keeps + track of the load address, entry point and size, so the command to do + this is simply: + + fis load linux + + The image is then ready to be executed. + + (2) Load by TFTP + + The following command will download a raw binary kernel image from the + default server (as negotiated by BOOTP) and store it into RAM: + + load -b 0x00100000 -r /tftpboot/image.bin + + The image is then ready to be executed. + + (3) Load by Y-Modem + + The following command will download a raw binary kernel image across the + serial port that RedBoot is currently using: + + load -m ymodem -b 0x00100000 -r zImage + + The serial client (such as minicom) must then be told to transmit the + program by Y-Modem. + + When finished, the image will then be ready to be executed. + + +================== +BOOTING THE KERNEL +================== + +Boot the image with the following RedBoot command: + + exec -c "" 0x00100000 + +For example: + + exec -c "console=ttySM0,115200 ip=:::::dhcp root=/dev/mtdblock2 rw" + +This will start the kernel running. Note that if the GDB-stub is compiled in, +then the kernel will immediately wait for GDB to connect over serial before +doing anything else. See the section on kernel debugging with GDB. + +The kernel command line tells the kernel where its console is and +how to find its root filesystem. This is made up of the following components, +separated by spaces: + + (*) console=ttyS[,[[[]]]] + + This specifies that the system console should output through on-chip + serial port (which can be "0" or "1"). + + is a standard baud rate between 1200 and 115200 (default 9600). + + is a parity setting of "N", "O", "E", "M" or "S" for None, Odd, + Even, Mark or Space. "None" is the default. + + is "7" or "8" for the number of bits per character. "8" is the + default. + + is "r" to use flow control (XCTS on serial port 2 only). The + default is to not use flow control. + + For example: + + console=ttyS0,115200 + + To use the first on-chip serial port at baud rate 115200, no parity, 8 + bits, and no flow control. + + (*) root=/dev/ + + This specifies the device upon which the root filesystem resides. For + example: + + /dev/nfs NFS root filesystem + /dev/mtdblock3 Fourth RedBoot partition on the System Flash + + (*) rw + + Start with the root filesystem mounted Read/Write. + + The remaining components are all optional: + + (*) ip=:::::: + + Configure the network interface. If is "off" then should + specify the IP address for the network device . provide + the hostname for the device. + + If is "bootp" or "dhcp", then all of these parameters will be + discovered by consulting a BOOTP or DHCP server. + + For example, the following might be used: + + ip=192.168.73.12::::frv:eth0:off + + This sets the IP address on the VDK motherboard RTL8029 ethernet chipset + (eth0) to be 192.168.73.12, and sets the board's hostname to be "frv". + + (*) nfsroot=:[,v] + + This is mandatory if "root=/dev/nfs" is given as an option. It tells the + kernel the IP address of the NFS server providing its root filesystem, + and the pathname on that server of the filesystem. + + The NFS version to use can also be specified. v2 and v3 are supported by + Linux. + + For example: + + nfsroot=192.168.73.1:/nfsroot-frv + + (*) profile=1 + + Turns on the kernel profiler (accessible through /proc/profile). + + (*) console=gdb0 + + This can be used as an alternative to the "console=ttyS..." listed + above. I tells the kernel to pass the console output to GDB if the + gdbstub is compiled in to the kernel. + + If this is used, then the gdbstub passes the text to GDB, which then + simply dumps it to its standard output. + + (*) mem=M + + Normally the kernel will work out how much SDRAM it has by reading the + SDRAM controller registers. That can be overridden with this + option. This allows the kernel to be told that it has megabytes of + memory available. + + (*) init= [ [ [ ...]]] + + This tells the kernel what program to run initially. By default this is + /sbin/init, but /sbin/sash or /bin/sh are common alternatives. + + (*) vdc=... + + This option configures the MB93493 companion chip visual display + driver. Please see Documentation/fujitsu/mb93493/vdc.txt for more + information. diff --git a/Documentation/fujitsu/frv/clock.txt b/Documentation/fujitsu/frv/clock.txt new file mode 100644 index 000000000..c72d350e1 --- /dev/null +++ b/Documentation/fujitsu/frv/clock.txt @@ -0,0 +1,65 @@ +Clock scaling +------------- + +The kernel supports scaling of CLCK.CMODE, CLCK.CM and CLKC.P0 clock +registers. If built with CONFIG_PM and CONFIG_SYSCTL options enabled, four +extra files will appear in the directory /proc/sys/pm/. Reading these files +will show: + + p0 -- current value of the P0 bit in CLKC register. + cm -- current value of the CM bits in CLKC register. + cmode -- current value of the CMODE bits in CLKC register. + +On all boards, the 'p0' file should also be writable, and either '1' or '0' +can be rewritten, to set or clear the CLKC_P0 bit respectively, hence +controlling whether the resource bus rate clock is halved. + +The 'cm' file should also be available on all boards. '0' can be written to it +to shift the board into High-Speed mode (normal), and '1' can be written to +shift the board into Medium-Speed mode. Selecting Low-Speed mode is not +supported by this interface, even though some CPUs do support it. + +On the boards with FR405 CPU (i.e. CB60 and CB70), the 'cmode' file is also +writable, allowing the CPU core speed (and other clock speeds) to be +controlled from userspace. + + +Determining current and possible settings +----------------------------------------- + +The current state and the available masks can be found in /proc/cpuinfo. For +example, on the CB70: + + # cat /proc/cpuinfo + CPU-Series: fr400 + CPU-Core: fr405, gr0-31, BE, CCCR + CPU: mb93405 + MMU: Prot + FP-Media: fr0-31, Media + System: mb93091-cb70, mb93090-mb00 + PM-Controls: cmode=0xd31f, cm=0x3, p0=0x3, suspend=0x9 + PM-Status: cmode=3, cm=0, p0=0 + Clock-In: 50.00 MHz + Clock-Core: 300.00 MHz + Clock-SDRAM: 100.00 MHz + Clock-CBus: 100.00 MHz + Clock-Res: 50.00 MHz + Clock-Ext: 50.00 MHz + Clock-DSU: 25.00 MHz + BogoMips: 300.00 + +And on the PDK, the PM lines look like the following: + + PM-Controls: cm=0x3, p0=0x3, suspend=0x9 + PM-Status: cmode=9, cm=0, p0=0 + +The PM-Controls line, if present, will indicate which /proc/sys/pm files can +be set to what values. The specification values are bitmasks; so, for example, +"suspend=0x9" indicates that 0 and 3 can be written validly to +/proc/sys/pm/suspend. + +The PM-Controls line will only be present if CONFIG_PM is configured to Y. + +The PM-Status line indicates which clock controls are set to which value. If +the file can be read, then the suspend value must be 0, and so that's not +included. diff --git a/Documentation/fujitsu/frv/configuring.txt b/Documentation/fujitsu/frv/configuring.txt new file mode 100644 index 000000000..36e76a233 --- /dev/null +++ b/Documentation/fujitsu/frv/configuring.txt @@ -0,0 +1,125 @@ + ======================================= + FUJITSU FR-V LINUX KERNEL CONFIGURATION + ======================================= + +===================== +CONFIGURATION OPTIONS +===================== + +The most important setting is in the "MMU support options" tab (the first +presented in the configuration tools available): + + (*) "Kernel Type" + + This options allows selection of normal, MMU-requiring linux, and uClinux + (which doesn't require an MMU and doesn't have inter-process protection). + +There are a number of settings in the "Processor type and features" section of +the kernel configuration that need to be considered. + + (*) "CPU" + + The register and instruction sets at the core of the processor. This can + only be set to "FR40x/45x/55x" at the moment - but this permits usage of + the kernel with MB93091 CB10, CB11, CB30, CB41, CB60, CB70 and CB451 + CPU boards, and with the MB93093 PDK board. + + (*) "System" + + This option allows a choice of basic system. This governs the peripherals + that are expected to be available. + + (*) "Motherboard" + + This specifies the type of motherboard being used, and the peripherals + upon it. Currently only "MB93090-MB00" can be set here. + + (*) "Default cache-write mode" + + This controls the initial data cache write management mode. By default + Write-Through is selected, but Write-Back (Copy-Back) can also be + selected. This can be changed dynamically once the kernel is running (see + features.txt). + +There are some architecture specific configuration options in the "General +Setup" section of the kernel configuration too: + + (*) "Reserve memory uncached for (PCI) DMA" + + This requests that a uClinux kernel set aside some memory in an uncached + window for the use as consistent DMA memory (mainly for PCI). At least a + megabyte will be allocated in this way, possibly more. Any memory so + reserved will not be available for normal allocations. + + (*) "Kernel support for ELF-FDPIC binaries" + + This enables the binary-format driver for the new FDPIC ELF binaries that + this platform normally uses. These binaries are totally relocatable - + their separate sections can relocated independently, allowing them to be + shared on uClinux where possible. This should normally be enabled. + + (*) "Kernel image protection" + + This makes the protection register governing access to the core kernel + image prohibit access by userspace programs. This option is available on + uClinux only. + +There are also a number of settings in the "Kernel Hacking" section of the +kernel configuration especially for debugging a kernel on this +architecture. See the "gdbstub.txt" file for information about those. + + +====================== +DEFAULT CONFIGURATIONS +====================== + +The kernel sources include a number of example default configurations: + + (*) defconfig-mb93091 + + Default configuration for the MB93091-VDK with both CPU board and + MB93090-MB00 motherboard running uClinux. + + + (*) defconfig-mb93091-fb + + Default configuration for the MB93091-VDK with CPU board, + MB93090-MB00 motherboard, and DAV board running uClinux. + Includes framebuffer driver. + + + (*) defconfig-mb93093 + + Default configuration for the MB93093-PDK board running uClinux. + + + (*) defconfig-cb70-standalone + + Default configuration for the MB93091-VDK with only CB70 CPU board + running uClinux. This will use the CB70's DM9000 for network access. + + + (*) defconfig-mmu + + Default configuration for the MB93091-VDK with both CB451 CPU board and + MB93090-MB00 motherboard running MMU linux. + + (*) defconfig-mmu-audio + + Default configuration for the MB93091-VDK with CB451 CPU board, DAV + board, and MB93090-MB00 motherboard running MMU linux. Includes + audio driver. + + (*) defconfig-mmu-fb + + Default configuration for the MB93091-VDK with CB451 CPU board, DAV + board, and MB93090-MB00 motherboard running MMU linux. Includes + framebuffer driver. + + (*) defconfig-mmu-standalone + + Default configuration for the MB93091-VDK with only CB451 CPU board + running MMU linux. + + + diff --git a/Documentation/fujitsu/frv/features.txt b/Documentation/fujitsu/frv/features.txt new file mode 100644 index 000000000..fa20c0e72 --- /dev/null +++ b/Documentation/fujitsu/frv/features.txt @@ -0,0 +1,310 @@ + =========================== + FUJITSU FR-V LINUX FEATURES + =========================== + +This kernel port has a number of features of which the user should be aware: + + (*) Linux and uClinux + + The FR-V architecture port supports both normal MMU linux and uClinux out + of the same sources. + + + (*) CPU support + + Support for the FR401, FR403, FR405, FR451 and FR555 CPUs should work with + the same uClinux kernel configuration. + + In normal (MMU) Linux mode, only the FR451 CPU will work as that is the + only one with a suitably featured CPU. + + The kernel is written and compiled with the assumption that only the + bottom 32 GR registers and no FR registers will be used by the kernel + itself, however all extra userspace registers will be saved on context + switch. Note that since most CPUs can't support lazy switching, no attempt + is made to do lazy register saving where that would be possible (FR555 + only currently). + + + (*) Board support + + The board on which the kernel will run can be configured on the "Processor + type and features" configuration tab. + + Set the System to "MB93093-PDK" to boot from the MB93093 (FR403) PDK. + + Set the System to "MB93091-VDK" to boot from the CB11, CB30, CB41, CB60, + CB70 or CB451 VDK boards. Set the Motherboard setting to "MB93090-MB00" to + boot with the standard ATA90590B VDK motherboard, and set it to "None" to + boot without any motherboard. + + + (*) Binary Formats + + The only userspace binary format supported is FDPIC ELF. Normal ELF, FLAT + and AOUT binaries are not supported for this architecture. + + FDPIC ELF supports shared library and program interpreter facilities. + + + (*) Scheduler Speed + + The kernel scheduler runs at 100Hz irrespective of the clock speed on this + architecture. This value is set in asm/param.h (see the HZ macro defined + there). + + + (*) Normal (MMU) Linux Memory Layout. + + See mmu-layout.txt in this directory for a description of the normal linux + memory layout + + See include/asm-frv/mem-layout.h for constants pertaining to the memory + layout. + + See include/asm-frv/mb-regs.h for the constants pertaining to the I/O bus + controller configuration. + + + (*) uClinux Memory Layout + + The memory layout used by the uClinux kernel is as follows: + + 0x00000000 - 0x00000FFF Null pointer catch page + 0x20000000 - 0x200FFFFF CS2# [PDK] FPGA + 0xC0000000 - 0xCFFFFFFF SDRAM + 0xC0000000 Base of Linux kernel image + 0xE0000000 - 0xEFFFFFFF CS2# [VDK] SLBUS/PCI window + 0xF0000000 - 0xF0FFFFFF CS5# MB93493 CSC area (DAV daughter board) + 0xF1000000 - 0xF1FFFFFF CS7# [CB70/CB451] CPU-card PCMCIA port space + 0xFC000000 - 0xFC0FFFFF CS1# [VDK] MB86943 config space + 0xFC100000 - 0xFC1FFFFF CS6# [CB70/CB451] CPU-card DM9000 NIC space + 0xFC100000 - 0xFC1FFFFF CS6# [PDK] AX88796 NIC space + 0xFC200000 - 0xFC2FFFFF CS3# MB93493 CSR area (DAV daughter board) + 0xFD000000 - 0xFDFFFFFF CS4# [CB70/CB451] CPU-card extra flash space + 0xFE000000 - 0xFEFFFFFF Internal CPU peripherals + 0xFF000000 - 0xFF1FFFFF CS0# Flash 1 + 0xFF200000 - 0xFF3FFFFF CS0# Flash 2 + 0xFFC00000 - 0xFFC0001F CS0# [VDK] FPGA + + The kernel reads the size of the SDRAM from the memory bus controller + registers by default. + + The kernel initialisation code (1) adjusts the SDRAM base addresses to + move the SDRAM to desired address, (2) moves the kernel image down to the + bottom of SDRAM, (3) adjusts the bus controller registers to move I/O + windows, and (4) rearranges the protection registers to protect all of + this. + + The reasons for doing this are: (1) the page at address 0 should be + inaccessible so that NULL pointer errors can be caught; and (2) the bottom + three quarters are left unoccupied so that an FR-V CPU with an MMU can use + it for virtual userspace mappings. + + See include/asm-frv/mem-layout.h for constants pertaining to the memory + layout. + + See include/asm-frv/mb-regs.h for the constants pertaining to the I/O bus + controller configuration. + + + (*) uClinux Memory Protection + + A DAMPR register is used to cover the entire region used for I/O + (0xE0000000 - 0xFFFFFFFF). This permits the kernel to make uncached + accesses to this region. Userspace is not permitted to access it. + + The DAMPR/IAMPR protection registers not in use for any other purpose are + tiled over the top of the SDRAM such that: + + (1) The core kernel image is covered by as small a tile as possible + granting only the kernel access to the underlying data, whilst + making sure no SDRAM is actually made unavailable by this approach. + + (2) All other tiles are arranged to permit userspace access to the rest + of the SDRAM. + + Barring point (1), there is nothing to protect kernel data against + userspace damage - but this is uClinux. + + + (*) Exceptions and Fixups + + Since the FR40x and FR55x CPUs that do not have full MMUs generate + imprecise data error exceptions, there are currently no automatic fixup + services available in uClinux. This includes misaligned memory access + fixups. + + Userspace EFAULT errors can be trapped by issuing a MEMBAR instruction and + forcing the fault to happen there. + + On the FR451, however, data exceptions are mostly precise, and so + exception fixup handling is implemented as normal. + + + (*) Userspace Breakpoints + + The ptrace() system call supports the following userspace debugging + features: + + (1) Hardware assisted single step. + + (2) Breakpoint via the FR-V "BREAK" instruction. + + (3) Breakpoint via the FR-V "TIRA GR0, #1" instruction. + + (4) Syscall entry/exit trap. + + Each of the above generates a SIGTRAP. + + + (*) On-Chip Serial Ports + + The FR-V on-chip serial ports are made available as ttyS0 and ttyS1. Note + that if the GDB stub is compiled in, ttyS1 will not actually be available + as it will be being used for the GDB stub. + + These ports can be made by: + + mknod /dev/ttyS0 c 4 64 + mknod /dev/ttyS1 c 4 65 + + + (*) Maskable Interrupts + + Level 15 (Non-maskable) interrupts are dealt with by the GDB stub if + present, and cause a panic if not. If the GDB stub is present, ttyS1's + interrupts are rated at level 15. + + All other interrupts are distributed over the set of available priorities + so that no IRQs are shared where possible. The arch interrupt handling + routines attempt to disentangle the various sources available through the + CPU's own multiplexor, and those on off-CPU peripherals. + + + (*) Accessing PCI Devices + + Where PCI is available, care must be taken when dealing with drivers that + access PCI devices. PCI devices present their data in little-endian form, + but the CPU sees it in big-endian form. The macros in asm/io.h try to get + this right, but may not under all circumstances... + + + (*) Ax88796 Ethernet Driver + + The MB93093 PDK board has an Ax88796 ethernet chipset (an NE2000 clone). A + driver has been written to deal specifically with this. The driver + provides MII services for the card. + + The driver can be configured by running make xconfig, and going to: + + (*) Network device support + - turn on "Network device support" + (*) Ethernet (10 or 100Mbit) + - turn on "Ethernet (10 or 100Mbit)" + - turn on "AX88796 NE2000 compatible chipset" + + The driver can be found in: + + drivers/net/ax88796.c + include/asm/ax88796.h + + + (*) WorkRAM Driver + + This driver provides a character device that permits access to the WorkRAM + that can be found on the FR451 CPU. Each page is accessible through a + separate minor number, thereby permitting each page to have its own + filesystem permissions set on the device file. + + The device files should be: + + mknod /dev/frv/workram0 c 240 0 + mknod /dev/frv/workram1 c 240 1 + mknod /dev/frv/workram2 c 240 2 + ... + + The driver will not permit the opening of any device file that does not + correspond to at least a partial page of WorkRAM. So the first device file + is the only one available on the FR451. If any other CPU is detected, none + of the devices will be openable. + + The devices can be accessed with read, write and llseek, and can also be + mmapped. If they're mmapped, they will only map at the appropriate + 0x7e8nnnnn address on linux and at the 0xfe8nnnnn address on uClinux. If + MAP_FIXED is not specified, the appropriate address will be chosen anyway. + + The mappings must be MAP_SHARED not MAP_PRIVATE, and must not be + PROT_EXEC. They must also start at file offset 0, and must not be longer + than one page in size. + + This driver can be configured by running make xconfig, and going to: + + (*) Character devices + - turn on "Fujitsu FR-V CPU WorkRAM support" + + + (*) Dynamic data cache write mode changing + + It is possible to view and to change the data cache's write mode through + the /proc/sys/frv/cache-mode file while the kernel is running. There are + two modes available: + + NAME MEANING + ===== ========================================== + wthru Data cache is in Write-Through mode + wback Data cache is in Write-Back/Copy-Back mode + + To read the cache mode: + + # cat /proc/sys/frv/cache-mode + wthru + + To change the cache mode: + + # echo wback >/proc/sys/frv/cache-mode + # cat /proc/sys/frv/cache-mode + wback + + + (*) MMU Context IDs and Pinning + + On MMU Linux the CPU supports the concept of a context ID in its MMU to + make it more efficient (TLB entries are labelled with a context ID to link + them to specific tasks). + + Normally once a context ID is allocated, it will remain affixed to a task + or CLONE_VM'd group of tasks for as long as it exists. However, since the + kernel is capable of supporting more tasks than there are possible ID + numbers, the kernel will pass context IDs from one task to another if + there are insufficient available. + + The context ID currently in use by a task can be viewed in /proc: + + # grep CXNR /proc/1/status + CXNR: 1 + + Note that kernel threads do not have a userspace context, and so will not + show a CXNR entry in that file. + + Under some circumstances, however, it is desirable to pin a context ID on + a process such that the kernel won't pass it on. This can be done by + writing the process ID of the target process to a special file: + + # echo 17 >/proc/sys/frv/pin-cxnr + + Reading from the file will then show the context ID pinned. + + # cat /proc/sys/frv/pin-cxnr + 4 + + The context ID will remain pinned as long as any process is using that + context, i.e.: when the all the subscribing processes have exited or + exec'd; or when an unpinning request happens: + + # echo 0 >/proc/sys/frv/pin-cxnr + + When there isn't a pinned context, the file shows -1: + + # cat /proc/sys/frv/pin-cxnr + -1 diff --git a/Documentation/fujitsu/frv/gdbinit b/Documentation/fujitsu/frv/gdbinit new file mode 100644 index 000000000..51517b6f3 --- /dev/null +++ b/Documentation/fujitsu/frv/gdbinit @@ -0,0 +1,102 @@ +set remotebreak 1 + +define _amr + +printf "AMRx DAMR IAMR \n" +printf "==== ===================== =====================\n" +printf "amr0 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x0].L,__debug_mmu.damr[0x0].P,__debug_mmu.iamr[0x0].L,__debug_mmu.iamr[0x0].P +printf "amr1 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x1].L,__debug_mmu.damr[0x1].P,__debug_mmu.iamr[0x1].L,__debug_mmu.iamr[0x1].P +printf "amr2 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x2].L,__debug_mmu.damr[0x2].P,__debug_mmu.iamr[0x2].L,__debug_mmu.iamr[0x2].P +printf "amr3 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x3].L,__debug_mmu.damr[0x3].P,__debug_mmu.iamr[0x3].L,__debug_mmu.iamr[0x3].P +printf "amr4 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x4].L,__debug_mmu.damr[0x4].P,__debug_mmu.iamr[0x4].L,__debug_mmu.iamr[0x4].P +printf "amr5 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x5].L,__debug_mmu.damr[0x5].P,__debug_mmu.iamr[0x5].L,__debug_mmu.iamr[0x5].P +printf "amr6 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x6].L,__debug_mmu.damr[0x6].P,__debug_mmu.iamr[0x6].L,__debug_mmu.iamr[0x6].P +printf "amr7 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x7].L,__debug_mmu.damr[0x7].P,__debug_mmu.iamr[0x7].L,__debug_mmu.iamr[0x7].P + +printf "amr8 : L:%08lx P:%08lx\n",__debug_mmu.damr[0x8].L,__debug_mmu.damr[0x8].P +printf "amr9 : L:%08lx P:%08lx\n",__debug_mmu.damr[0x9].L,__debug_mmu.damr[0x9].P +printf "amr10: L:%08lx P:%08lx\n",__debug_mmu.damr[0xa].L,__debug_mmu.damr[0xa].P +printf "amr11: L:%08lx P:%08lx\n",__debug_mmu.damr[0xb].L,__debug_mmu.damr[0xb].P + +end + + +define _tlb +printf "tlb[0x00]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x0].L,__debug_mmu.tlb[0x0].P,__debug_mmu.tlb[0x40+0x0].L,__debug_mmu.tlb[0x40+0x0].P +printf "tlb[0x01]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x1].L,__debug_mmu.tlb[0x1].P,__debug_mmu.tlb[0x40+0x1].L,__debug_mmu.tlb[0x40+0x1].P +printf "tlb[0x02]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x2].L,__debug_mmu.tlb[0x2].P,__debug_mmu.tlb[0x40+0x2].L,__debug_mmu.tlb[0x40+0x2].P +printf "tlb[0x03]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x3].L,__debug_mmu.tlb[0x3].P,__debug_mmu.tlb[0x40+0x3].L,__debug_mmu.tlb[0x40+0x3].P +printf "tlb[0x04]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x4].L,__debug_mmu.tlb[0x4].P,__debug_mmu.tlb[0x40+0x4].L,__debug_mmu.tlb[0x40+0x4].P +printf "tlb[0x05]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x5].L,__debug_mmu.tlb[0x5].P,__debug_mmu.tlb[0x40+0x5].L,__debug_mmu.tlb[0x40+0x5].P +printf "tlb[0x06]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x6].L,__debug_mmu.tlb[0x6].P,__debug_mmu.tlb[0x40+0x6].L,__debug_mmu.tlb[0x40+0x6].P +printf "tlb[0x07]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x7].L,__debug_mmu.tlb[0x7].P,__debug_mmu.tlb[0x40+0x7].L,__debug_mmu.tlb[0x40+0x7].P +printf "tlb[0x08]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x8].L,__debug_mmu.tlb[0x8].P,__debug_mmu.tlb[0x40+0x8].L,__debug_mmu.tlb[0x40+0x8].P +printf "tlb[0x09]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x9].L,__debug_mmu.tlb[0x9].P,__debug_mmu.tlb[0x40+0x9].L,__debug_mmu.tlb[0x40+0x9].P +printf "tlb[0x0a]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0xa].L,__debug_mmu.tlb[0xa].P,__debug_mmu.tlb[0x40+0xa].L,__debug_mmu.tlb[0x40+0xa].P +printf "tlb[0x0b]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0xb].L,__debug_mmu.tlb[0xb].P,__debug_mmu.tlb[0x40+0xb].L,__debug_mmu.tlb[0x40+0xb].P +printf "tlb[0x0c]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0xc].L,__debug_mmu.tlb[0xc].P,__debug_mmu.tlb[0x40+0xc].L,__debug_mmu.tlb[0x40+0xc].P +printf "tlb[0x0d]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0xd].L,__debug_mmu.tlb[0xd].P,__debug_mmu.tlb[0x40+0xd].L,__debug_mmu.tlb[0x40+0xd].P +printf "tlb[0x0e]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0xe].L,__debug_mmu.tlb[0xe].P,__debug_mmu.tlb[0x40+0xe].L,__debug_mmu.tlb[0x40+0xe].P +printf "tlb[0x0f]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0xf].L,__debug_mmu.tlb[0xf].P,__debug_mmu.tlb[0x40+0xf].L,__debug_mmu.tlb[0x40+0xf].P +printf "tlb[0x10]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x10].L,__debug_mmu.tlb[0x10].P,__debug_mmu.tlb[0x40+0x10].L,__debug_mmu.tlb[0x40+0x10].P +printf "tlb[0x11]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x11].L,__debug_mmu.tlb[0x11].P,__debug_mmu.tlb[0x40+0x11].L,__debug_mmu.tlb[0x40+0x11].P +printf "tlb[0x12]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x12].L,__debug_mmu.tlb[0x12].P,__debug_mmu.tlb[0x40+0x12].L,__debug_mmu.tlb[0x40+0x12].P +printf "tlb[0x13]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x13].L,__debug_mmu.tlb[0x13].P,__debug_mmu.tlb[0x40+0x13].L,__debug_mmu.tlb[0x40+0x13].P +printf "tlb[0x14]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x14].L,__debug_mmu.tlb[0x14].P,__debug_mmu.tlb[0x40+0x14].L,__debug_mmu.tlb[0x40+0x14].P +printf "tlb[0x15]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x15].L,__debug_mmu.tlb[0x15].P,__debug_mmu.tlb[0x40+0x15].L,__debug_mmu.tlb[0x40+0x15].P +printf "tlb[0x16]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x16].L,__debug_mmu.tlb[0x16].P,__debug_mmu.tlb[0x40+0x16].L,__debug_mmu.tlb[0x40+0x16].P +printf "tlb[0x17]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x17].L,__debug_mmu.tlb[0x17].P,__debug_mmu.tlb[0x40+0x17].L,__debug_mmu.tlb[0x40+0x17].P +printf "tlb[0x18]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x18].L,__debug_mmu.tlb[0x18].P,__debug_mmu.tlb[0x40+0x18].L,__debug_mmu.tlb[0x40+0x18].P +printf "tlb[0x19]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x19].L,__debug_mmu.tlb[0x19].P,__debug_mmu.tlb[0x40+0x19].L,__debug_mmu.tlb[0x40+0x19].P +printf "tlb[0x1a]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x1a].L,__debug_mmu.tlb[0x1a].P,__debug_mmu.tlb[0x40+0x1a].L,__debug_mmu.tlb[0x40+0x1a].P +printf "tlb[0x1b]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x1b].L,__debug_mmu.tlb[0x1b].P,__debug_mmu.tlb[0x40+0x1b].L,__debug_mmu.tlb[0x40+0x1b].P +printf "tlb[0x1c]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x1c].L,__debug_mmu.tlb[0x1c].P,__debug_mmu.tlb[0x40+0x1c].L,__debug_mmu.tlb[0x40+0x1c].P +printf "tlb[0x1d]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x1d].L,__debug_mmu.tlb[0x1d].P,__debug_mmu.tlb[0x40+0x1d].L,__debug_mmu.tlb[0x40+0x1d].P +printf "tlb[0x1e]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x1e].L,__debug_mmu.tlb[0x1e].P,__debug_mmu.tlb[0x40+0x1e].L,__debug_mmu.tlb[0x40+0x1e].P +printf "tlb[0x1f]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x1f].L,__debug_mmu.tlb[0x1f].P,__debug_mmu.tlb[0x40+0x1f].L,__debug_mmu.tlb[0x40+0x1f].P +printf "tlb[0x20]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x20].L,__debug_mmu.tlb[0x20].P,__debug_mmu.tlb[0x40+0x20].L,__debug_mmu.tlb[0x40+0x20].P +printf "tlb[0x21]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x21].L,__debug_mmu.tlb[0x21].P,__debug_mmu.tlb[0x40+0x21].L,__debug_mmu.tlb[0x40+0x21].P +printf "tlb[0x22]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x22].L,__debug_mmu.tlb[0x22].P,__debug_mmu.tlb[0x40+0x22].L,__debug_mmu.tlb[0x40+0x22].P +printf "tlb[0x23]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x23].L,__debug_mmu.tlb[0x23].P,__debug_mmu.tlb[0x40+0x23].L,__debug_mmu.tlb[0x40+0x23].P +printf "tlb[0x24]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x24].L,__debug_mmu.tlb[0x24].P,__debug_mmu.tlb[0x40+0x24].L,__debug_mmu.tlb[0x40+0x24].P +printf "tlb[0x25]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x25].L,__debug_mmu.tlb[0x25].P,__debug_mmu.tlb[0x40+0x25].L,__debug_mmu.tlb[0x40+0x25].P +printf "tlb[0x26]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x26].L,__debug_mmu.tlb[0x26].P,__debug_mmu.tlb[0x40+0x26].L,__debug_mmu.tlb[0x40+0x26].P +printf "tlb[0x27]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x27].L,__debug_mmu.tlb[0x27].P,__debug_mmu.tlb[0x40+0x27].L,__debug_mmu.tlb[0x40+0x27].P +printf "tlb[0x28]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x28].L,__debug_mmu.tlb[0x28].P,__debug_mmu.tlb[0x40+0x28].L,__debug_mmu.tlb[0x40+0x28].P +printf "tlb[0x29]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x29].L,__debug_mmu.tlb[0x29].P,__debug_mmu.tlb[0x40+0x29].L,__debug_mmu.tlb[0x40+0x29].P +printf "tlb[0x2a]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x2a].L,__debug_mmu.tlb[0x2a].P,__debug_mmu.tlb[0x40+0x2a].L,__debug_mmu.tlb[0x40+0x2a].P +printf "tlb[0x2b]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x2b].L,__debug_mmu.tlb[0x2b].P,__debug_mmu.tlb[0x40+0x2b].L,__debug_mmu.tlb[0x40+0x2b].P +printf "tlb[0x2c]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x2c].L,__debug_mmu.tlb[0x2c].P,__debug_mmu.tlb[0x40+0x2c].L,__debug_mmu.tlb[0x40+0x2c].P +printf "tlb[0x2d]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x2d].L,__debug_mmu.tlb[0x2d].P,__debug_mmu.tlb[0x40+0x2d].L,__debug_mmu.tlb[0x40+0x2d].P +printf "tlb[0x2e]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x2e].L,__debug_mmu.tlb[0x2e].P,__debug_mmu.tlb[0x40+0x2e].L,__debug_mmu.tlb[0x40+0x2e].P +printf "tlb[0x2f]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x2f].L,__debug_mmu.tlb[0x2f].P,__debug_mmu.tlb[0x40+0x2f].L,__debug_mmu.tlb[0x40+0x2f].P +printf "tlb[0x30]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x30].L,__debug_mmu.tlb[0x30].P,__debug_mmu.tlb[0x40+0x30].L,__debug_mmu.tlb[0x40+0x30].P +printf "tlb[0x31]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x31].L,__debug_mmu.tlb[0x31].P,__debug_mmu.tlb[0x40+0x31].L,__debug_mmu.tlb[0x40+0x31].P +printf "tlb[0x32]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x32].L,__debug_mmu.tlb[0x32].P,__debug_mmu.tlb[0x40+0x32].L,__debug_mmu.tlb[0x40+0x32].P +printf "tlb[0x33]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x33].L,__debug_mmu.tlb[0x33].P,__debug_mmu.tlb[0x40+0x33].L,__debug_mmu.tlb[0x40+0x33].P +printf "tlb[0x34]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x34].L,__debug_mmu.tlb[0x34].P,__debug_mmu.tlb[0x40+0x34].L,__debug_mmu.tlb[0x40+0x34].P +printf "tlb[0x35]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x35].L,__debug_mmu.tlb[0x35].P,__debug_mmu.tlb[0x40+0x35].L,__debug_mmu.tlb[0x40+0x35].P +printf "tlb[0x36]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x36].L,__debug_mmu.tlb[0x36].P,__debug_mmu.tlb[0x40+0x36].L,__debug_mmu.tlb[0x40+0x36].P +printf "tlb[0x37]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x37].L,__debug_mmu.tlb[0x37].P,__debug_mmu.tlb[0x40+0x37].L,__debug_mmu.tlb[0x40+0x37].P +printf "tlb[0x38]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x38].L,__debug_mmu.tlb[0x38].P,__debug_mmu.tlb[0x40+0x38].L,__debug_mmu.tlb[0x40+0x38].P +printf "tlb[0x39]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x39].L,__debug_mmu.tlb[0x39].P,__debug_mmu.tlb[0x40+0x39].L,__debug_mmu.tlb[0x40+0x39].P +printf "tlb[0x3a]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x3a].L,__debug_mmu.tlb[0x3a].P,__debug_mmu.tlb[0x40+0x3a].L,__debug_mmu.tlb[0x40+0x3a].P +printf "tlb[0x3b]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x3b].L,__debug_mmu.tlb[0x3b].P,__debug_mmu.tlb[0x40+0x3b].L,__debug_mmu.tlb[0x40+0x3b].P +printf "tlb[0x3c]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x3c].L,__debug_mmu.tlb[0x3c].P,__debug_mmu.tlb[0x40+0x3c].L,__debug_mmu.tlb[0x40+0x3c].P +printf "tlb[0x3d]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x3d].L,__debug_mmu.tlb[0x3d].P,__debug_mmu.tlb[0x40+0x3d].L,__debug_mmu.tlb[0x40+0x3d].P +printf "tlb[0x3e]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x3e].L,__debug_mmu.tlb[0x3e].P,__debug_mmu.tlb[0x40+0x3e].L,__debug_mmu.tlb[0x40+0x3e].P +printf "tlb[0x3f]: %08lx %08lx %08lx %08lx\n",__debug_mmu.tlb[0x3f].L,__debug_mmu.tlb[0x3f].P,__debug_mmu.tlb[0x40+0x3f].L,__debug_mmu.tlb[0x40+0x3f].P +end + + +define _pgd +p (pgd_t[0x40])*(pgd_t*)(__debug_mmu.damr[0x3].L) +end + +define _ptd_i +p (pte_t[0x1000])*(pte_t*)(__debug_mmu.damr[0x4].L) +end + +define _ptd_d +p (pte_t[0x1000])*(pte_t*)(__debug_mmu.damr[0x5].L) +end diff --git a/Documentation/fujitsu/frv/gdbstub.txt b/Documentation/fujitsu/frv/gdbstub.txt new file mode 100644 index 000000000..6ce5aa9ab --- /dev/null +++ b/Documentation/fujitsu/frv/gdbstub.txt @@ -0,0 +1,130 @@ + ==================== + DEBUGGING FR-V LINUX + ==================== + + +The kernel contains a GDB stub that talks GDB remote protocol across a serial +port. This permits GDB to single step through the kernel, set breakpoints and +trap exceptions that happen in kernel space and interrupt execution. It also +permits the NMI interrupt button or serial port events to jump the kernel into +the debugger. + +On the CPUs that have on-chip UARTs (FR400, FR403, FR405, FR555), the +GDB stub hijacks a serial port for its own purposes, and makes it +generate level 15 interrupts (NMI). The kernel proper cannot see the serial +port in question under these conditions. + +On the MB93091-VDK CPU boards, the GDB stub uses UART1, which would otherwise +be /dev/ttyS1. On the MB93093-PDK, the GDB stub uses UART0. Therefore, on the +PDK there is no externally accessible serial port and the serial port to +which the touch screen is attached becomes /dev/ttyS0. + +Note that the GDB stub runs entirely within CPU debug mode, and so should not +incur any exceptions or interrupts whilst it is active. In particular, note +that the clock will lose time since it is implemented in software. + + +================== +KERNEL PREPARATION +================== + +Firstly, a debuggable kernel must be built. To do this, unpack the kernel tree +and copy the configuration that you wish to use to .config. Then reconfigure +the following things on the "Kernel Hacking" tab: + + (*) "Include debugging information" + + Set this to "Y". This causes all C and Assembly files to be compiled + to include debugging information. + + (*) "In-kernel GDB stub" + + Set this to "Y". This causes the GDB stub to be compiled into the + kernel. + + (*) "Immediate activation" + + Set this to "Y" if you want the GDB stub to activate as soon as possible + and wait for GDB to connect. This allows you to start tracing right from + the beginning of start_kernel() in init/main.c. + + (*) "Console through GDB stub" + + Set this to "Y" if you wish to be able to use "console=gdb0" on the + command line. That tells the kernel to pass system console messages to + GDB (which then prints them on its standard output). This is useful when + debugging the serial drivers that'd otherwise be used to pass console + messages to the outside world. + +Then build as usual, download to the board and execute. Note that if +"Immediate activation" was selected, then the kernel will wait for GDB to +attach. If not, then the kernel will boot immediately and GDB will have to +interupt it or wait for an exception to occur if before doing anything with +the kernel. + + +========================= +KERNEL DEBUGGING WITH GDB +========================= + +Set the serial port on the computer that's going to run GDB to the appropriate +baud rate. Assuming the board's debug port is connected to ttyS0/COM1 on the +computer doing the debugging: + + stty -F /dev/ttyS0 115200 + +Then start GDB in the base of the kernel tree: + + frv-uclinux-gdb linux [uClinux] + +Or: + + frv-uclinux-gdb vmlinux [MMU linux] + +When the prompt appears: + + GNU gdb frv-031024 + Copyright 2003 Free Software Foundation, Inc. + GDB is free software, covered by the GNU General Public License, and you are + welcome to change it and/or distribute copies of it under certain conditions. + Type "show copying" to see the conditions. + There is absolutely no warranty for GDB. Type "show warranty" for details. + This GDB was configured as "--host=i686-pc-linux-gnu --target=frv-uclinux"... + (gdb) + +Attach to the board like this: + + (gdb) target remote /dev/ttyS0 + Remote debugging using /dev/ttyS0 + start_kernel () at init/main.c:395 + (gdb) + +This should show the appropriate lines from the source too. The kernel can +then be debugged almost as if it's any other program. + + +=============================== +INTERRUPTING THE RUNNING KERNEL +=============================== + +The kernel can be interrupted whilst it is running, causing a jump back to the +GDB stub and the debugger: + + (*) Pressing Ctrl-C in GDB. This will cause GDB to try and interrupt the + kernel by sending an RS232 BREAK over the serial line to the GDB + stub. This will (mostly) immediately interrupt the kernel and return it + to the debugger. + + (*) Pressing the NMI button on the board will also cause a jump into the + debugger. + + (*) Setting a software breakpoint. This sets a break instruction at the + desired location which the GDB stub then traps the exception for. + + (*) Setting a hardware breakpoint. The GDB stub is capable of using the IBAR + and DBAR registers to assist debugging. + +Furthermore, the GDB stub will intercept a number of exceptions automatically +if they are caused by kernel execution. It will also intercept BUG() macro +invokation. + diff --git a/Documentation/fujitsu/frv/mmu-layout.txt b/Documentation/fujitsu/frv/mmu-layout.txt new file mode 100644 index 000000000..11dcc5679 --- /dev/null +++ b/Documentation/fujitsu/frv/mmu-layout.txt @@ -0,0 +1,306 @@ + ================================= + FR451 MMU LINUX MEMORY MANAGEMENT + ================================= + +============ +MMU HARDWARE +============ + +FR451 MMU Linux puts the MMU into EDAT mode whilst running. This means that it uses both the SAT +registers and the DAT TLB to perform address translation. + +There are 8 IAMLR/IAMPR register pairs and 16 DAMLR/DAMPR register pairs for SAT mode. + +In DAT mode, there is also a TLB organised in cache format as 64 lines x 2 ways. Each line spans a +16KB range of addresses, but can match a larger region. + + +=========================== +MEMORY MANAGEMENT REGISTERS +=========================== + +Certain control registers are used by the kernel memory management routines: + + REGISTERS USAGE + ====================== ================================================== + IAMR0, DAMR0 Kernel image and data mappings + IAMR1, DAMR1 First-chance TLB lookup mapping + DAMR2 Page attachment for cache flush by page + DAMR3 Current PGD mapping + SCR0, DAMR4 Instruction TLB PGE/PTD cache + SCR1, DAMR5 Data TLB PGE/PTD cache + DAMR6-10 kmap_atomic() mappings + DAMR11 I/O mapping + CXNR mm_struct context ID + TTBR Page directory (PGD) pointer (physical address) + + +===================== +GENERAL MEMORY LAYOUT +===================== + +The physical memory layout is as follows: + + PHYSICAL ADDRESS CONTROLLER DEVICE + =================== ============== ======================================= + 00000000 - BFFFFFFF SDRAM SDRAM area + E0000000 - EFFFFFFF L-BUS CS2# VDK SLBUS/PCI window + F0000000 - F0FFFFFF L-BUS CS5# MB93493 CSC area (DAV daughter board) + F1000000 - F1FFFFFF L-BUS CS7# (CB70 CPU-card PCMCIA port I/O space) + FC000000 - FC0FFFFF L-BUS CS1# VDK MB86943 config space + FC100000 - FC1FFFFF L-BUS CS6# DM9000 NIC I/O space + FC200000 - FC2FFFFF L-BUS CS3# MB93493 CSR area (DAV daughter board) + FD000000 - FDFFFFFF L-BUS CS4# (CB70 CPU-card extra flash space) + FE000000 - FEFFFFFF Internal CPU peripherals + FF000000 - FF1FFFFF L-BUS CS0# Flash 1 + FF200000 - FF3FFFFF L-BUS CS0# Flash 2 + FFC00000 - FFC0001F L-BUS CS0# FPGA + +The virtual memory layout is: + + VIRTUAL ADDRESS PHYSICAL TRANSLATOR FLAGS SIZE OCCUPATION + ================= ======== ============== ======= ======= =================================== + 00004000-BFFFFFFF various TLB,xAMR1 D-N-??V 3GB Userspace + C0000000-CFFFFFFF 00000000 xAMPR0 -L-S--V 256MB Kernel image and data + D0000000-D7FFFFFF various TLB,xAMR1 D-NS??V 128MB vmalloc area + D8000000-DBFFFFFF various TLB,xAMR1 D-NS??V 64MB kmap() area + DC000000-DCFFFFFF various TLB 1MB Secondary kmap_atomic() frame + DD000000-DD27FFFF various DAMR 160KB Primary kmap_atomic() frame + DD040000 DAMR2/IAMR2 -L-S--V page Page cache flush attachment point + DD080000 DAMR3 -L-SC-V page Page Directory (PGD) + DD0C0000 DAMR4 -L-SC-V page Cached insn TLB Page Table lookup + DD100000 DAMR5 -L-SC-V page Cached data TLB Page Table lookup + DD140000 DAMR6 -L-S--V page kmap_atomic(KM_BOUNCE_READ) + DD180000 DAMR7 -L-S--V page kmap_atomic(KM_SKB_SUNRPC_DATA) + DD1C0000 DAMR8 -L-S--V page kmap_atomic(KM_SKB_DATA_SOFTIRQ) + DD200000 DAMR9 -L-S--V page kmap_atomic(KM_USER0) + DD240000 DAMR10 -L-S--V page kmap_atomic(KM_USER1) + E0000000-FFFFFFFF E0000000 DAMR11 -L-SC-V 512MB I/O region + +IAMPR1 and DAMPR1 are used as an extension to the TLB. + + +==================== +KMAP AND KMAP_ATOMIC +==================== + +To access pages in the page cache (which may not be directly accessible if highmem is available), +the kernel calls kmap(), does the access and then calls kunmap(); or it calls kmap_atomic(), does +the access and then calls kunmap_atomic(). + +kmap() creates an attachment between an arbitrary inaccessible page and a range of virtual +addresses by installing a PTE in a special page table. The kernel can then access this page as it +wills. When it's finished, the kernel calls kunmap() to clear the PTE. + +kmap_atomic() does something slightly different. In the interests of speed, it chooses one of two +strategies: + + (1) If possible, kmap_atomic() attaches the requested page to one of DAMPR5 through DAMPR10 + register pairs; and the matching kunmap_atomic() clears the DAMPR. This makes high memory + support really fast as there's no need to flush the TLB or modify the page tables. The DAMLR + registers being used for this are preset during boot and don't change over the lifetime of the + process. There's a direct mapping between the first few kmap_atomic() types, DAMR number and + virtual address slot. + + However, there are more kmap_atomic() types defined than there are DAMR registers available, + so we fall back to: + + (2) kmap_atomic() uses a slot in the secondary frame (determined by the type parameter), and then + locks an entry in the TLB to translate that slot to the specified page. The number of slots is + obviously limited, and their positions are controlled such that each slot is matched by a + different line in the TLB. kunmap() ejects the entry from the TLB. + +Note that the first three kmap atomic types are really just declared as placeholders. The DAMPR +registers involved are actually modified directly. + +Also note that kmap() itself may sleep, kmap_atomic() may never sleep and both always succeed; +furthermore, a driver using kmap() may sleep before calling kunmap(), but may not sleep before +calling kunmap_atomic() if it had previously called kmap_atomic(). + + +=============================== +USING MORE THAN 256MB OF MEMORY +=============================== + +The kernel cannot access more than 256MB of memory directly. The physical layout, however, permits +up to 3GB of SDRAM (possibly 3.25GB) to be made available. By using CONFIG_HIGHMEM, the kernel can +allow userspace (by way of page tables) and itself (by way of kmap) to deal with the memory +allocation. + +External devices can, of course, still DMA to and from all of the SDRAM, even if the kernel can't +see it directly. The kernel translates page references into real addresses for communicating to the +devices. + + +=================== +PAGE TABLE TOPOLOGY +=================== + +The page tables are arranged in 2-layer format. There is a middle layer (PMD) that would be used in +3-layer format tables but that is folded into the top layer (PGD) and so consumes no extra memory +or processing power. + + +------+ PGD PMD + | TTBR |--->+-------------------+ + +------+ | | : STE | + | PGE0 | PME0 : STE | + | | : STE | + +-------------------+ Page Table + | | : STE -------------->+--------+ +0x0000 + | PGE1 | PME0 : STE -----------+ | PTE0 | + | | : STE -------+ | +--------+ + +-------------------+ | | | PTE63 | + | | : STE | | +-->+--------+ +0x0100 + | PGE2 | PME0 : STE | | | PTE64 | + | | : STE | | +--------+ + +-------------------+ | | PTE127 | + | | : STE | +------>+--------+ +0x0200 + | PGE3 | PME0 : STE | | PTE128 | + | | : STE | +--------+ + +-------------------+ | PTE191 | + +--------+ +0x0300 + +Each Page Directory (PGD) is 16KB (page size) in size and is divided into 64 entries (PGEs). Each +PGE contains one Page Mid Directory (PMD). + +Each PMD is 256 bytes in size and contains a single entry (PME). Each PME holds 64 FR451 MMU +segment table entries of 4 bytes apiece. Each PME "points to" a page table. In practice, each STE +points to a subset of the page table, the first to PT+0x0000, the second to PT+0x0100, the third to +PT+0x200, and so on. + +Each PGE and PME covers 64MB of the total virtual address space. + +Each Page Table (PTD) is 16KB (page size) in size, and is divided into 4096 entries (PTEs). Each +entry can point to one 16KB page. In practice, each Linux page table is subdivided into 64 FR451 +MMU page tables. But they are all grouped together to make management easier, in particular rmap +support is then trivial. + +Grouping page tables in this fashion makes PGE caching in SCR0/SCR1 more efficient because the +coverage of the cached item is greater. + +Page tables for the vmalloc area are allocated at boot time and shared between all mm_structs. + + +================= +USER SPACE LAYOUT +================= + +For MMU capable Linux, the regions userspace code are allowed to access are kept entirely separate +from those dedicated to the kernel: + + VIRTUAL ADDRESS SIZE PURPOSE + ================= ===== =================================== + 00000000-00003fff 4KB NULL pointer access trap + 00004000-01ffffff ~32MB lower mmap space (grows up) + 02000000-021fffff 2MB Stack space (grows down from top) + 02200000-nnnnnnnn Executable mapping + nnnnnnnn- brk space (grows up) + -bfffffff upper mmap space (grows down) + +This is so arranged so as to make best use of the 16KB page tables and the way in which PGEs/PMEs +are cached by the TLB handler. The lower mmap space is filled first, and then the upper mmap space +is filled. + + +=============================== +GDB-STUB MMU DEBUGGING SERVICES +=============================== + +The gdb-stub included in this kernel provides a number of services to aid in the debugging of MMU +related kernel services: + + (*) Every time the kernel stops, certain state information is dumped into __debug_mmu. This + variable is defined in arch/frv/kernel/gdb-stub.c. Note that the gdbinit file in this + directory has some useful macros for dealing with this. + + (*) __debug_mmu.tlb[] + + This receives the current TLB contents. This can be viewed with the _tlb GDB macro: + + (gdb) _tlb + tlb[0x00]: 01000005 00718203 01000002 00718203 + tlb[0x01]: 01004002 006d4201 01004005 006d4203 + tlb[0x02]: 01008002 006d0201 01008006 00004200 + tlb[0x03]: 0100c006 007f4202 0100c002 0064c202 + tlb[0x04]: 01110005 00774201 01110002 00774201 + tlb[0x05]: 01114005 00770201 01114002 00770201 + tlb[0x06]: 01118002 0076c201 01118005 0076c201 + ... + tlb[0x3d]: 010f4002 00790200 001f4002 0054ca02 + tlb[0x3e]: 010f8005 0078c201 010f8002 0078c201 + tlb[0x3f]: 001fc002 0056ca01 001fc005 00538a01 + + (*) __debug_mmu.iamr[] + (*) __debug_mmu.damr[] + + These receive the current IAMR and DAMR contents. These can be viewed with with the _amr + GDB macro: + + (gdb) _amr + AMRx DAMR IAMR + ==== ===================== ===================== + amr0 : L:c0000000 P:00000cb9 : L:c0000000 P:000004b9 + amr1 : L:01070005 P:006f9203 : L:0102c005 P:006a1201 + amr2 : L:d8d00000 P:00000000 : L:d8d00000 P:00000000 + amr3 : L:d8d04000 P:00534c0d : L:00000000 P:00000000 + amr4 : L:d8d08000 P:00554c0d : L:00000000 P:00000000 + amr5 : L:d8d0c000 P:00554c0d : L:00000000 P:00000000 + amr6 : L:d8d10000 P:00000000 : L:00000000 P:00000000 + amr7 : L:d8d14000 P:00000000 : L:00000000 P:00000000 + amr8 : L:d8d18000 P:00000000 + amr9 : L:d8d1c000 P:00000000 + amr10: L:d8d20000 P:00000000 + amr11: L:e0000000 P:e0000ccd + + (*) The current task's page directory is bound to DAMR3. + + This can be viewed with the _pgd GDB macro: + + (gdb) _pgd + $3 = {{pge = {{ste = {0x554001, 0x554101, 0x554201, 0x554301, 0x554401, + 0x554501, 0x554601, 0x554701, 0x554801, 0x554901, 0x554a01, + 0x554b01, 0x554c01, 0x554d01, 0x554e01, 0x554f01, 0x555001, + 0x555101, 0x555201, 0x555301, 0x555401, 0x555501, 0x555601, + 0x555701, 0x555801, 0x555901, 0x555a01, 0x555b01, 0x555c01, + 0x555d01, 0x555e01, 0x555f01, 0x556001, 0x556101, 0x556201, + 0x556301, 0x556401, 0x556501, 0x556601, 0x556701, 0x556801, + 0x556901, 0x556a01, 0x556b01, 0x556c01, 0x556d01, 0x556e01, + 0x556f01, 0x557001, 0x557101, 0x557201, 0x557301, 0x557401, + 0x557501, 0x557601, 0x557701, 0x557801, 0x557901, 0x557a01, + 0x557b01, 0x557c01, 0x557d01, 0x557e01, 0x557f01}}}}, {pge = {{ + ste = {0x0 }}}} , {pge = {{ste = { + 0x248001, 0x248101, 0x248201, 0x248301, 0x248401, 0x248501, + 0x248601, 0x248701, 0x248801, 0x248901, 0x248a01, 0x248b01, + 0x248c01, 0x248d01, 0x248e01, 0x248f01, 0x249001, 0x249101, + 0x249201, 0x249301, 0x249401, 0x249501, 0x249601, 0x249701, + 0x249801, 0x249901, 0x249a01, 0x249b01, 0x249c01, 0x249d01, + 0x249e01, 0x249f01, 0x24a001, 0x24a101, 0x24a201, 0x24a301, + 0x24a401, 0x24a501, 0x24a601, 0x24a701, 0x24a801, 0x24a901, + 0x24aa01, 0x24ab01, 0x24ac01, 0x24ad01, 0x24ae01, 0x24af01, + 0x24b001, 0x24b101, 0x24b201, 0x24b301, 0x24b401, 0x24b501, + 0x24b601, 0x24b701, 0x24b801, 0x24b901, 0x24ba01, 0x24bb01, + 0x24bc01, 0x24bd01, 0x24be01, 0x24bf01}}}}, {pge = {{ste = { + 0x0 }}}} } + + (*) The PTD last used by the instruction TLB miss handler is attached to DAMR4. + (*) The PTD last used by the data TLB miss handler is attached to DAMR5. + + These can be viewed with the _ptd_i and _ptd_d GDB macros: + + (gdb) _ptd_d + $5 = {{pte = 0x0} , {pte = 0x539b01}, { + pte = 0x0} , {pte = 0x719303}, {pte = 0x6d5303}, { + pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, { + pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x6a1303}, { + pte = 0x0} , {pte = 0x709303}, {pte = 0x0}, {pte = 0x0}, + {pte = 0x6fd303}, {pte = 0x6f9303}, {pte = 0x6f5303}, {pte = 0x0}, { + pte = 0x6ed303}, {pte = 0x531b01}, {pte = 0x50db01}, { + pte = 0x0} , {pte = 0x5303}, {pte = 0x7f5303}, { + pte = 0x509b01}, {pte = 0x505b01}, {pte = 0x7c9303}, {pte = 0x7b9303}, { + pte = 0x7b5303}, {pte = 0x7b1303}, {pte = 0x7ad303}, {pte = 0x0}, { + pte = 0x0}, {pte = 0x7a1303}, {pte = 0x0}, {pte = 0x795303}, {pte = 0x0}, { + pte = 0x78d303}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, { + pte = 0x0}, {pte = 0x775303}, {pte = 0x771303}, {pte = 0x76d303}, { + pte = 0x0}, {pte = 0x765303}, {pte = 0x7c5303}, {pte = 0x501b01}, { + pte = 0x4f1b01}, {pte = 0x4edb01}, {pte = 0x0}, {pte = 0x4f9b01}, { + pte = 0x4fdb01}, {pte = 0x0} } diff --git a/Documentation/i2c/chips/smsc47b397.txt b/Documentation/i2c/chips/smsc47b397.txt new file mode 100644 index 000000000..389edae7f --- /dev/null +++ b/Documentation/i2c/chips/smsc47b397.txt @@ -0,0 +1,146 @@ +November 23, 2004 + +The following specification describes the SMSC LPC47B397-NC sensor chip +(for which there is no public datasheet available). This document was +provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected +by Mark M. Hoffman . + +* * * * * + +Methods for detecting the HP SIO and reading the thermal data on a dc7100. + +The thermal information on the dc7100 is contained in the SIO Hardware Monitor +(HWM). The information is accessed through an index/data pair. The index/data +pair is located at the HWM Base Address + 0 and the HWM Base Address + 1. The +HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB) +and 0x61 (LSB). Currently we are using 0x480 for the HWM Base Address and +0x480 and 0x481 for the index/data pair. + +Reading temperature information. +The temperature information is located in the following registers: +Temp1 0x25 (Currently, this reflects the CPU temp on all systems). +Temp2 0x26 +Temp3 0x27 +Temp4 0x80 + +Programming Example +The following is an example of how to read the HWM temperature registers: +MOV DX,480H +MOV AX,25H +OUT DX,AL +MOV DX,481H +IN AL,DX + +AL contains the data in hex, the temperature in Celsius is the decimal +equivalent. + +Ex: If AL contains 0x2A, the temperature is 42 degrees C. + +Reading tach information. +The fan speed information is located in the following registers: + LSB MSB +Tach1 0x28 0x29 (Currently, this reflects the CPU + fan speed on all systems). +Tach2 0x2A 0x2B +Tach3 0x2C 0x2D +Tach4 0x2E 0x2F + +Important!!! +Reading the tach LSB locks the tach MSB. +The LSB Must be read first. + +How to convert the tach reading to RPM. +The tach reading (TCount) is given by: (Tach MSB * 256) + (Tach LSB) +The SIO counts the number of 90kHz (11.111us) pulses per revolution. +RPM = 60/(TCount * 11.111us) + +Example: +Reg 0x28 = 0x9B +Reg 0x29 = 0x08 + +TCount = 0x89B = 2203 + +RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM + +Obtaining the SIO version. + +CONFIGURATION SEQUENCE +To program the configuration registers, the following sequence must be followed: +1. Enter Configuration Mode +2. Configure the Configuration Registers +3. Exit Configuration Mode. + +Enter Configuration Mode +To place the chip into the Configuration State The config key (0x55) is written +to the CONFIG PORT (0x2E). + +Configuration Mode +In configuration mode, the INDEX PORT is located at the CONFIG PORT address and +the DATA PORT is at INDEX PORT address + 1. + +The desired configuration registers are accessed in two steps: +a. Write the index of the Logical Device Number Configuration Register + (i.e., 0x07) to the INDEX PORT and then write the number of the + desired logical device to the DATA PORT. + +b. Write the address of the desired configuration register within the + logical device to the INDEX PORT and then write or read the config- + uration register through the DATA PORT. + +Note: If accessing the Global Configuration Registers, step (a) is not required. + +Exit Configuration Mode +To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E). +The chip returns to the RUN State. (This is important). + +Programming Example +The following is an example of how to read the SIO Device ID located at 0x20 + +; ENTER CONFIGURATION MODE +MOV DX,02EH +MOV AX,055H +OUT DX,AL +; GLOBAL CONFIGURATION REGISTER +MOV DX,02EH +MOV AL,20H +OUT DX,AL +; READ THE DATA +MOV DX,02FH +IN AL,DX +; EXIT CONFIGURATION MODE +MOV DX,02EH +MOV AX,0AAH +OUT DX,AL + +The registers of interest for identifying the SIO on the dc7100 are Device ID +(0x20) and Device Rev (0x21). + +The Device ID will read 0X6F +The Device Rev currently reads 0x01 + +Obtaining the HWM Base Address. +The following is an example of how to read the HWM Base Address located in +Logical Device 8. + +; ENTER CONFIGURATION MODE +MOV DX,02EH +MOV AX,055H +OUT DX,AL +; CONFIGURE REGISTER CRE0, +; LOGICAL DEVICE 8 +MOV DX,02EH +MOV AL,07H +OUT DX,AL ;Point to LD# Config Reg +MOV DX,02FH +MOV AL, 08H +OUT DX,AL;Point to Logical Device 8 +; +MOV DX,02EH +MOV AL,60H +OUT DX,AL ; Point to HWM Base Addr MSB +MOV DX,02FH +IN AL,DX ; Get MSB of HWM Base Addr +; EXIT CONFIGURATION MODE +MOV DX,02EH +MOV AX,0AAH +OUT DX,AL diff --git a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub new file mode 100644 index 000000000..2626ba926 --- /dev/null +++ b/Documentation/i2c/i2c-stub @@ -0,0 +1,33 @@ +MODULE: i2c-stub + +DESCRIPTION: + +This module is a very simple fake I2C/SMBus driver. It implements three +types of SMBus commands: write quick, (r/w) byte data, and (r/w) word data. + +No hardware is needed nor associated with this module. It will accept write +quick commands to all addresses; it will respond to the other commands (also +to all addresses) by reading from or writing to an array in memory. It will +also spam the kernel logs for every command it handles. + +The typical use-case is like this: + 1. load this module + 2. use i2cset (from lm_sensors project) to pre-load some data + 3. load the target sensors chip driver module + 4. observe its behavior in the kernel log + +CAVEATS: + +There are independent arrays for byte/data and word/data commands. Depending +on if/how a target driver mixes them, you'll need to be careful. + +If your target driver polls some byte or word waiting for it to change, the +stub could lock it up. Use i2cset to unlock it. + +If the hardware for your driver has banked registers (e.g. Winbond sensors +chips) this module will not work well - although it could be extended to +support that pretty easily. + +If you spam it hard enough, printk can be lossy. This module really wants +something like relayfs. + diff --git a/Documentation/ia64/serial.txt b/Documentation/ia64/serial.txt new file mode 100644 index 000000000..f51eb4bc2 --- /dev/null +++ b/Documentation/ia64/serial.txt @@ -0,0 +1,144 @@ +SERIAL DEVICE NAMING + + As of 2.6.10, serial devices on ia64 are named based on the + order of ACPI and PCI enumeration. The first device in the + ACPI namespace (if any) becomes /dev/ttyS0, the second becomes + /dev/ttyS1, etc., and PCI devices are named sequentially + starting after the ACPI devices. + + Prior to 2.6.10, there were confusing exceptions to this: + + - Firmware on some machines (mostly from HP) provides an HCDP + table[1] that tells the kernel about devices that can be used + as a serial console. If the user specified "console=ttyS0" + or the EFI ConOut path contained only UART devices, the + kernel registered the device described by the HCDP as + /dev/ttyS0. + + - If there was no HCDP, we assumed there were UARTs at the + legacy COM port addresses (I/O ports 0x3f8 and 0x2f8), so + the kernel registered those as /dev/ttyS0 and /dev/ttyS1. + + Any additional ACPI or PCI devices were registered sequentially + after /dev/ttyS0 as they were discovered. + + With an HCDP, device names changed depending on EFI configuration + and "console=" arguments. Without an HCDP, device names didn't + change, but we registered devices that might not really exist. + + For example, an HP rx1600 with a single built-in serial port + (described in the ACPI namespace) plus an MP[2] (a PCI device) has + these ports: + + pre-2.6.10 pre-2.6.10 + MMIO (EFI console (EFI console + address on builtin) on MP port) 2.6.10 + ========== ========== ========== ====== + builtin 0xff5e0000 ttyS0 ttyS1 ttyS0 + MP UPS 0xf8031000 ttyS1 ttyS2 ttyS1 + MP Console 0xf8030000 ttyS2 ttyS0 ttyS2 + MP 2 0xf8030010 ttyS3 ttyS3 ttyS3 + MP 3 0xf8030038 ttyS4 ttyS4 ttyS4 + +CONSOLE SELECTION + + EFI knows what your console devices are, but it doesn't tell the + kernel quite enough to actually locate them. The DIG64 HCDP + table[1] does tell the kernel where potential serial console + devices are, but not all firmware supplies it. Also, EFI supports + multiple simultaneous consoles and doesn't tell the kernel which + should be the "primary" one. + + So how do you tell Linux which console device to use? + + - If your firmware supplies the HCDP, it is simplest to + configure EFI with a single device (either a UART or a VGA + card) as the console. Then you don't need to tell Linux + anything; the kernel will automatically use the EFI console. + + (This works only in 2.6.6 or later; prior to that you had + to specify "console=ttyS0" to get a serial console.) + + - Without an HCDP, Linux defaults to a VGA console unless you + specify a "console=" argument. + + NOTE: Don't assume that a serial console device will be /dev/ttyS0. + It might be ttyS1, ttyS2, etc. Make sure you have the appropriate + entries in /etc/inittab (for getty) and /etc/securetty (to allow + root login). + +EARLY SERIAL CONSOLE + + The kernel can't start using a serial console until it knows where + the device lives. Normally this happens when the driver enumerates + all the serial devices, which can happen a minute or more after the + kernel starts booting. + + 2.6.10 and later kernels have an "early uart" driver that works + very early in the boot process. The kernel will automatically use + this if the user supplies an argument like "console=uart,io,0x3f8", + or if the EFI console path contains only a UART device and the + firmware supplies an HCDP. + +TROUBLESHOOTING SERIAL CONSOLE PROBLEMS + + No kernel output after elilo prints "Uncompressing Linux... done": + + - You specified "console=ttyS0" but Linux changed the device + to which ttyS0 refers. Configure exactly one EFI console + device[3] and remove the "console=" option. + + - The EFI console path contains both a VGA device and a UART. + EFI and elilo use both, but Linux defaults to VGA. Remove + the VGA device from the EFI console path[3]. + + - Multiple UARTs selected as EFI console devices. EFI and + elilo use all selected devices, but Linux uses only one. + Make sure only one UART is selected in the EFI console + path[3]. + + - You're connected to an HP MP port[2] but have a non-MP UART + selected as EFI console device. EFI uses the MP as a + console device even when it isn't explicitly selected. + Either move the console cable to the non-MP UART, or change + the EFI console path[3] to the MP UART. + + Long pause (60+ seconds) between "Uncompressing Linux... done" and + start of kernel output: + + - No early console because you used "console=ttyS". Remove + the "console=" option if your firmware supplies an HCDP. + + - If you don't have an HCDP, the kernel doesn't know where + your console lives until the driver discovers serial + devices. Use "console=uart, io,0x3f8" (or appropriate + address for your machine). + + Kernel and init script output works fine, but no "login:" prompt: + + - Add getty entry to /etc/inittab for console tty. Look for + the "Adding console on ttyS" message that tells you which + device is the console. + + "login:" prompt, but can't login as root: + + - Add entry to /etc/securetty for console tty. + + + +[1] http://www.dig64.org/specifications/DIG64_PCDPv20.pdf + The table was originally defined as the "HCDP" for "Headless + Console/Debug Port." The current version is the "PCDP" for + "Primary Console and Debug Port Devices." + +[2] The HP MP (management processor) is a PCI device that provides + several UARTs. One of the UARTs is often used as a console; the + EFI Boot Manager identifies it as "Acpi(HWP0002,700)/Pci(...)/Uart". + The external connection is usually a 25-pin connector, and a + special dongle converts that to three 9-pin connectors, one of + which is labelled "Console." + +[3] EFI console devices are configured using the EFI Boot Manager + "Boot option maintenance" menu. You may have to interrupt the + boot sequence to use this menu, and you will have to reset the + box after changing console configuration. diff --git a/Documentation/ibm-acpi.txt b/Documentation/ibm-acpi.txt new file mode 100644 index 000000000..c437b1aef --- /dev/null +++ b/Documentation/ibm-acpi.txt @@ -0,0 +1,474 @@ + IBM ThinkPad ACPI Extras Driver + + Version 0.8 + 8 November 2004 + + Borislav Deianov + http://ibm-acpi.sf.net/ + + +This is a Linux ACPI driver for the IBM ThinkPad laptops. It aims to +support various features of these laptops which are accessible through +the ACPI framework but not otherwise supported by the generic Linux +ACPI drivers. + + +Status +------ + +The features currently supported are the following (see below for +detailed description): + + - Fn key combinations + - Bluetooth enable and disable + - video output switching, expansion control + - ThinkLight on and off + - limited docking and undocking + - UltraBay eject + - Experimental: CMOS control + - Experimental: LED control + - Experimental: ACPI sounds + +A compatibility table by model and feature is maintained on the web +site, http://ibm-acpi.sf.net/. I appreciate any success or failure +reports, especially if they add to or correct the compatibility table. +Please include the following information in your report: + + - ThinkPad model name + - a copy of your DSDT, from /proc/acpi/dsdt + - which driver features work and which don't + - the observed behavior of non-working features + +Any other comments or patches are also more than welcome. + + +Installation +------------ + +If you are compiling this driver as included in the Linux kernel +sources, simply enable the CONFIG_ACPI_IBM option (Power Management / +ACPI / IBM ThinkPad Laptop Extras). The rest of this section describes +how to install this driver when downloaded from the web site. + +First, you need to get a kernel with ACPI support up and running. +Please refer to http://acpi.sourceforge.net/ for help with this +step. How successful you will be depends a lot on you ThinkPad model, +the kernel you are using and any additional patches applied. The +kernel provided with your distribution may not be good enough. I +needed to compile a 2.6.7 kernel with the 20040715 ACPI patch to get +ACPI working reliably on my ThinkPad X40. Old ThinkPad models may not +be supported at all. + +Assuming you have the basic ACPI support working (e.g. you can see the +/proc/acpi directory), follow the following steps to install this +driver: + + - unpack the archive: + + tar xzvf ibm-acpi-x.y.tar.gz; cd ibm-acpi-x.y + + - compile the driver: + + make + + - install the module in your kernel modules directory: + + make install + + - load the module: + + modprobe ibm_acpi + +After loading the module, check the "dmesg" output for any error messages. + + +Features +-------- + +The driver creates the /proc/acpi/ibm directory. There is a file under +that directory for each feature described below. Note that while the +driver is still in the alpha stage, the exact proc file format and +commands supported by the various features is guaranteed to change +frequently. + +Driver Version -- /proc/acpi/ibm/driver +-------------------------------------- + +The driver name and version. No commands can be written to this file. + +Hot Keys -- /proc/acpi/ibm/hotkey +--------------------------------- + +Without this driver, only the Fn-F4 key (sleep button) generates an +ACPI event. With the driver loaded, the hotkey feature enabled and the +mask set (see below), the various hot keys generate ACPI events in the +following format: + + ibm/hotkey HKEY 00000080 0000xxxx + +The last four digits vary depending on the key combination pressed. +All labeled Fn-Fx key combinations generate distinct events. In +addition, the lid microswitch and some docking station buttons may +also generate such events. + +The following commands can be written to this file: + + echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature + echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature + echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys + echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys + ... any other 4-hex-digit mask ... + echo reset > /proc/acpi/ibm/hotkey -- restore the original mask + +The bit mask allows some control over which hot keys generate ACPI +events. Not all bits in the mask can be modified. Not all bits that +can be modified do anything. Not all hot keys can be individually +controlled by the mask. Most recent ThinkPad models honor the +following bits (assuming the hot keys feature has been enabled): + + key bit behavior when set behavior when unset + + Fn-F3 always generates ACPI event + Fn-F4 always generates ACPI event + Fn-F5 0010 generate ACPI event enable/disable Bluetooth + Fn-F7 0040 generate ACPI event switch LCD and external display + Fn-F8 0080 generate ACPI event expand screen or none + Fn-F9 0100 generate ACPI event none + Fn-F12 always generates ACPI event + +Some models do not support all of the above. For example, the T30 does +not support Fn-F5 and Fn-F9. Other models do not support the mask at +all. On those models, hot keys cannot be controlled individually. + +Note that enabling ACPI events for some keys prevents their default +behavior. For example, if events for Fn-F5 are enabled, that key will +no longer enable/disable Bluetooth by itself. This can still be done +from an acpid handler for the ibm/hotkey event. + +Note also that not all Fn key combinations are supported through +ACPI. For example, on the X40, the brightness, volume and "Access IBM" +buttons do not generate ACPI events even with this driver. They *can* +be used through the "ThinkPad Buttons" utility, see +http://www.nongnu.org/tpb/ + +Bluetooth -- /proc/acpi/ibm/bluetooth +------------------------------------- + +This feature shows the presence and current state of a Bluetooth +device. If Bluetooth is installed, the following commands can be used: + + echo enable > /proc/acpi/ibm/bluetooth + echo disable > /proc/acpi/ibm/bluetooth + +Video output control -- /proc/acpi/ibm/video +-------------------------------------------- + +This feature allows control over the devices used for video output - +LCD, CRT or DVI (if available). The following commands are available: + + echo lcd_enable > /proc/acpi/ibm/video + echo lcd_disable > /proc/acpi/ibm/video + echo crt_enable > /proc/acpi/ibm/video + echo crt_disable > /proc/acpi/ibm/video + echo dvi_enable > /proc/acpi/ibm/video + echo dvi_disable > /proc/acpi/ibm/video + echo auto_enable > /proc/acpi/ibm/video + echo auto_disable > /proc/acpi/ibm/video + echo expand_toggle > /proc/acpi/ibm/video + echo video_switch > /proc/acpi/ibm/video + +Each video output device can be enabled or disabled individually. +Reading /proc/acpi/ibm/video shows the status of each device. + +Automatic video switching can be enabled or disabled. When automatic +video switching is enabled, certain events (e.g. opening the lid, +docking or undocking) cause the video output device to change +automatically. While this can be useful, it also causes flickering +and, on the X40, video corruption. By disabling automatic switching, +the flickering or video corruption can be avoided. + +The video_switch command cycles through the available video outputs +(it sumulates the behavior of Fn-F7). + +Video expansion can be toggled through this feature. This controls +whether the display is expanded to fill the entire LCD screen when a +mode with less than full resolution is used. Note that the current +video expansion status cannot be determined through this feature. + +Note that on many models (particularly those using Radeon graphics +chips) the X driver configures the video card in a way which prevents +Fn-F7 from working. This also disables the video output switching +features of this driver, as it uses the same ACPI methods as +Fn-F7. Video switching on the console should still work. + +ThinkLight control -- /proc/acpi/ibm/light +------------------------------------------ + +The current status of the ThinkLight can be found in this file. A few +models which do not make the status available will show it as +"unknown". The available commands are: + + echo on > /proc/acpi/ibm/light + echo off > /proc/acpi/ibm/light + +Docking / Undocking -- /proc/acpi/ibm/dock +------------------------------------------ + +Docking and undocking (e.g. with the X4 UltraBase) requires some +actions to be taken by the operating system to safely make or break +the electrical connections with the dock. + +The docking feature of this driver generates the following ACPI events: + + ibm/dock GDCK 00000003 00000001 -- eject request + ibm/dock GDCK 00000003 00000002 -- undocked + ibm/dock GDCK 00000000 00000003 -- docked + +NOTE: These events will only be generated if the laptop was docked +when originally booted. This is due to the current lack of support for +hot plugging of devices in the Linux ACPI framework. If the laptop was +booted while not in the dock, the following message is shown in the +logs: "ibm_acpi: dock device not present". No dock-related events are +generated but the dock and undock commands described below still +work. They can be executed manually or triggered by Fn key +combinations (see the example acpid configuration files included in +the driver tarball package available on the web site). + +When the eject request button on the dock is pressed, the first event +above is generated. The handler for this event should issue the +following command: + + echo undock > /proc/acpi/ibm/dock + +After the LED on the dock goes off, it is safe to eject the laptop. +Note: if you pressed this key by mistake, go ahead and eject the +laptop, then dock it back in. Otherwise, the dock may not function as +expected. + +When the laptop is docked, the third event above is generated. The +handler for this event should issue the following command to fully +enable the dock: + + echo dock > /proc/acpi/ibm/dock + +The contents of the /proc/acpi/ibm/dock file shows the current status +of the dock, as provided by the ACPI framework. + +The docking support in this driver does not take care of enabling or +disabling any other devices you may have attached to the dock. For +example, a CD drive plugged into the UltraBase needs to be disabled or +enabled separately. See the provided example acpid configuration files +for how this can be accomplished. + +There is no support yet for PCI devices that may be attached to a +docking station, e.g. in the ThinkPad Dock II. The driver currently +does not recognize, enable or disable such devices. This means that +the only docking stations currently supported are the X-series +UltraBase docks and "dumb" port replicators like the Mini Dock (the +latter don't need any ACPI support, actually). + +UltraBay Eject -- /proc/acpi/ibm/bay +------------------------------------ + +Inserting or ejecting an UltraBay device requires some actions to be +taken by the operating system to safely make or break the electrical +connections with the device. + +This feature generates the following ACPI events: + + ibm/bay MSTR 00000003 00000000 -- eject request + ibm/bay MSTR 00000001 00000000 -- eject lever inserted + +NOTE: These events will only be generated if the UltraBay was present +when the laptop was originally booted (on the X series, the UltraBay +is in the dock, so it may not be present if the laptop was undocked). +This is due to the current lack of support for hot plugging of devices +in the Linux ACPI framework. If the laptop was booted without the +UltraBay, the following message is shown in the logs: "ibm_acpi: bay +device not present". No bay-related events are generated but the eject +command described below still works. It can be executed manually or +triggered by a hot key combination. + +Sliding the eject lever generates the first event shown above. The +handler for this event should take whatever actions are necessary to +shut down the device in the UltraBay (e.g. call idectl), then issue +the following command: + + echo eject > /proc/acpi/ibm/bay + +After the LED on the UltraBay goes off, it is safe to pull out the +device. + +When the eject lever is inserted, the second event above is +generated. The handler for this event should take whatever actions are +necessary to enable the UltraBay device (e.g. call idectl). + +The contents of the /proc/acpi/ibm/bay file shows the current status +of the UltraBay, as provided by the ACPI framework. + +Experimental Features +--------------------- + +The following features are marked experimental because using them +involves guessing the correct values of some parameters. Guessing +incorrectly may have undesirable effects like crashing your +ThinkPad. USE THESE WITH CAUTION! To activate them, you'll need to +supply the experimental=1 parameter when loading the module. + +Experimental: CMOS control - /proc/acpi/ibm/cmos +------------------------------------------------ + +This feature is used internally by the ACPI firmware to control the +ThinkLight on most newer ThinkPad models. It appears that it can also +control LCD brightness, sounds volume and more, but only on some +models. + +The commands are non-negative integer numbers: + + echo 0 >/proc/acpi/ibm/cmos + echo 1 >/proc/acpi/ibm/cmos + echo 2 >/proc/acpi/ibm/cmos + ... + +The range of numbers which are used internally by various models is 0 +to 21, but it's possible that numbers outside this range have +interesting behavior. Here is the behavior on the X40 (tpb is the +ThinkPad Buttons utility): + + 0 - no effect but tpb reports "Volume down" + 1 - no effect but tpb reports "Volume up" + 2 - no effect but tpb reports "Mute on" + 3 - simulate pressing the "Access IBM" button + 4 - LCD brightness up + 5 - LCD brightness down + 11 - toggle screen expansion + 12 - ThinkLight on + 13 - ThinkLight off + 14 - no effect but tpb reports ThinkLight status change + +If you try this feature, please send me a report similar to the +above. On models which allow control of LCD brightness or sound +volume, I'd like to provide this functionality in an user-friendly +way, but first I need a way to identify the models which this is +possible. + +Experimental: LED control - /proc/acpi/ibm/LED +---------------------------------------------- + +Some of the LED indicators can be controlled through this feature. The +available commands are: + + echo on >/proc/acpi/ibm/led + echo off >/proc/acpi/ibm/led + echo blink >/proc/acpi/ibm/led + +The parameter is a non-negative integer. The range of LED +numbers used internally by various models is 0 to 7 but it's possible +that numbers outside this range are also valid. Here is the mapping on +the X40: + + 0 - power + 1 - battery (orange) + 2 - battery (green) + 3 - UltraBase + 4 - UltraBay + 7 - standby + +All of the above can be turned on and off and can be made to blink. + +If you try this feature, please send me a report similar to the +above. I'd like to provide this functionality in an user-friendly way, +but first I need to identify the which numbers correspond to which +LEDs on various models. + +Experimental: ACPI sounds - /proc/acpi/ibm/beep +----------------------------------------------- + +The BEEP method is used internally by the ACPI firmware to provide +audible alerts in various situtation. This feature allows the same +sounds to be triggered manually. + +The commands are non-negative integer numbers: + + echo 0 >/proc/acpi/ibm/beep + echo 1 >/proc/acpi/ibm/beep + echo 2 >/proc/acpi/ibm/beep + ... + +The range of numbers which are used internally by various models is 0 +to 17, but it's possible that numbers outside this range are also +valid. Here is the behavior on the X40: + + 2 - two beeps, pause, third beep + 3 - single beep + 4 - "unable" + 5 - single beep + 6 - "AC/DC" + 7 - high-pitched beep + 9 - three short beeps + 10 - very long beep + 12 - low-pitched beep + +(I've only been able to identify a couple of them). + +If you try this feature, please send me a report similar to the +above. I'd like to provide this functionality in an user-friendly way, +but first I need to identify the which numbers correspond to which +sounds on various models. + + +Multiple Command, Module Parameters +----------------------------------- + +Multiple commands can be written to the proc files in one shot by +separating them with commas, for example: + + echo enable,0xffff > /proc/acpi/ibm/hotkey + echo lcd_disable,crt_enable > /proc/acpi/ibm/video + +Commands can also be specified when loading the ibm_acpi module, for +example: + + modprobe ibm_acpi hotkey=enable,0xffff video=auto_disable + + +Example Configuration +--------------------- + +The ACPI support in the kernel is intended to be used in conjunction +with a user-space daemon, acpid. The configuration files for this +daemon control what actions are taken in response to various ACPI +events. An example set of configuration files are included in the +config/ directory of the tarball package available on the web +site. Note that these are provided for illustration purposes only and +may need to be adapted to your particular setup. + +The following utility scripts are used by the example action +scripts (included with ibm-acpi for completeness): + + /usr/local/sbin/idectl -- from the hdparm source distribution, + see http://www.ibiblio.org/pub/Linux/system/hardware + /usr/local/sbin/laptop_mode -- from the Linux kernel source + distribution, see Documentation/laptop-mode.txt + /sbin/service -- comes with Redhat/Fedora distributions + +Toan T Nguyen has written a SuSE powersave +script for the X20, included in config/usr/sbin/ibm_hotkeys_X20 + +Henrik Brix Andersen has written a Gentoo ACPI event +handler script for the X31. You can get the latest version from +http://dev.gentoo.org/~brix/files/x31.sh + +David Schweikert has written an alternative blank.sh +script which works on Debian systems, included in +configs/etc/acpi/actions/blank-debian.sh + + +TODO +---- + +I'd like to implement the following features but haven't yet found the +time and/or I don't yet know how to implement them: + +- UltraBay floppy drive support + diff --git a/Documentation/infiniband/ipoib.txt b/Documentation/infiniband/ipoib.txt new file mode 100644 index 000000000..18e184b56 --- /dev/null +++ b/Documentation/infiniband/ipoib.txt @@ -0,0 +1,56 @@ +IP OVER INFINIBAND + + The ib_ipoib driver is an implementation of the IP over InfiniBand + protocol as specified by the latest Internet-Drafts issued by the + IETF ipoib working group. It is a "native" implementation in the + sense of setting the interface type to ARPHRD_INFINIBAND and the + hardware address length to 20 (earlier proprietary implementations + masqueraded to the kernel as ethernet interfaces). + +Partitions and P_Keys + + When the IPoIB driver is loaded, it creates one interface for each + port using the P_Key at index 0. To create an interface with a + different P_Key, write the desired P_Key into the main interface's + /sys/class/net//create_child file. For example: + + echo 0x8001 > /sys/class/net/ib0/create_child + + This will create an interface named ib0.8001 with P_Key 0x8001. To + remove a subinterface, use the "delete_child" file: + + echo 0x8001 > /sys/class/net/ib0/delete_child + + The P_Key for any interface is given by the "pkey" file, and the + main interface for a subinterface is in "parent." + +Debugging Information + + By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set + to 'y', tracing messages are compiled into the driver. They are + turned on by setting the module parameters debug_level and + mcast_debug_level to 1. These parameters can be controlled at + runtime through files in /sys/module/ib_ipoib/. + + CONFIG_INFINIBAND_IPOIB_DEBUG also enables the "ipoib_debugfs" + virtual filesystem. By mounting this filesystem, for example with + + mkdir -p /ipoib_debugfs + mount -t ipoib_debugfs none /ipoib_debufs + + it is possible to get statistics about multicast groups from the + files /ipoib_debugfs/ib0_mcg and so on. + + The performance impact of this option is negligible, so it + is safe to enable this option with debug_level set to 0 for normal + operation. + + CONFIG_INFINIBAND_IPOIB_DEBUG_DATA enables even more debug output in + the data path when data_debug_level is set to 1. However, even with + the output disabled, enabling this configuration option will affect + performance, because it adds tests to the fast path. + +References + + IETF IP over InfiniBand (ipoib) Working Group + http://ietf.org/html.charters/ipoib-charter.html diff --git a/Documentation/infiniband/sysfs.txt b/Documentation/infiniband/sysfs.txt new file mode 100644 index 000000000..ddd519b72 --- /dev/null +++ b/Documentation/infiniband/sysfs.txt @@ -0,0 +1,66 @@ +SYSFS FILES + + For each InfiniBand device, the InfiniBand drivers create the + following files under /sys/class/infiniband/: + + node_type - Node type (CA, switch or router) + node_guid - Node GUID + sys_image_guid - System image GUID + + In addition, there is a "ports" subdirectory, with one subdirectory + for each port. For example, if mthca0 is a 2-port HCA, there will + be two directories: + + /sys/class/infiniband/mthca0/ports/1 + /sys/class/infiniband/mthca0/ports/2 + + (A switch will only have a single "0" subdirectory for switch port + 0; no subdirectory is created for normal switch ports) + + In each port subdirectory, the following files are created: + + cap_mask - Port capability mask + lid - Port LID + lid_mask_count - Port LID mask count + rate - Port data rate (active width * active speed) + sm_lid - Subnet manager LID for port's subnet + sm_sl - Subnet manager SL for port's subnet + state - Port state (DOWN, INIT, ARMED, ACTIVE or ACTIVE_DEFER) + phys_state - Port physical state (Sleep, Polling, LinkUp, etc) + + There is also a "counters" subdirectory, with files + + VL15_dropped + excessive_buffer_overrun_errors + link_downed + link_error_recovery + local_link_integrity_errors + port_rcv_constraint_errors + port_rcv_data + port_rcv_errors + port_rcv_packets + port_rcv_remote_physical_errors + port_rcv_switch_relay_errors + port_xmit_constraint_errors + port_xmit_data + port_xmit_discards + port_xmit_packets + symbol_error + + Each of these files contains the corresponding value from the port's + Performance Management PortCounters attribute, as described in + section 16.1.3.5 of the InfiniBand Architecture Specification. + + The "pkeys" and "gids" subdirectories contain one file for each + entry in the port's P_Key or GID table respectively. For example, + ports/1/pkeys/10 contains the value at index 10 in port 1's P_Key + table. + +MTHCA + + The Mellanox HCA driver also creates the files: + + hw_rev - Hardware revision number + fw_ver - Firmware version + hca_type - HCA type: "MT23108", "MT25208 (MT23108 compat mode)", + or "MT25208" diff --git a/Documentation/infiniband/user_mad.txt b/Documentation/infiniband/user_mad.txt new file mode 100644 index 000000000..cae0c83f1 --- /dev/null +++ b/Documentation/infiniband/user_mad.txt @@ -0,0 +1,99 @@ +USERSPACE MAD ACCESS + +Device files + + Each port of each InfiniBand device has a "umad" device and an + "issm" device attached. For example, a two-port HCA will have two + umad devices and two issm devices, while a switch will have one + device of each type (for switch port 0). + +Creating MAD agents + + A MAD agent can be created by filling in a struct ib_user_mad_reg_req + and then calling the IB_USER_MAD_REGISTER_AGENT ioctl on a file + descriptor for the appropriate device file. If the registration + request succeeds, a 32-bit id will be returned in the structure. + For example: + + struct ib_user_mad_reg_req req = { /* ... */ }; + ret = ioctl(fd, IB_USER_MAD_REGISTER_AGENT, (char *) &req); + if (!ret) + my_agent = req.id; + else + perror("agent register"); + + Agents can be unregistered with the IB_USER_MAD_UNREGISTER_AGENT + ioctl. Also, all agents registered through a file descriptor will + be unregistered when the descriptor is closed. + +Receiving MADs + + MADs are received using read(). The buffer passed to read() must be + large enough to hold at least one struct ib_user_mad. For example: + + struct ib_user_mad mad; + ret = read(fd, &mad, sizeof mad); + if (ret != sizeof mad) + perror("read"); + + In addition to the actual MAD contents, the other struct ib_user_mad + fields will be filled in with information on the received MAD. For + example, the remote LID will be in mad.lid. + + If a send times out, a receive will be generated with mad.status set + to ETIMEDOUT. Otherwise when a MAD has been successfully received, + mad.status will be 0. + + poll()/select() may be used to wait until a MAD can be read. + +Sending MADs + + MADs are sent using write(). The agent ID for sending should be + filled into the id field of the MAD, the destination LID should be + filled into the lid field, and so on. For example: + + struct ib_user_mad mad; + + /* fill in mad.data */ + + mad.id = my_agent; /* req.id from agent registration */ + mad.lid = my_dest; /* in network byte order... */ + /* etc. */ + + ret = write(fd, &mad, sizeof mad); + if (ret != sizeof mad) + perror("write"); + +Setting IsSM Capability Bit + + To set the IsSM capability bit for a port, simply open the + corresponding issm device file. If the IsSM bit is already set, + then the open call will block until the bit is cleared (or return + immediately with errno set to EAGAIN if the O_NONBLOCK flag is + passed to open()). The IsSM bit will be cleared when the issm file + is closed. No read, write or other operations can be performed on + the issm file. + +/dev files + + To create the appropriate character device files automatically with + udev, a rule like + + KERNEL="umad*", NAME="infiniband/%k" + KERNEL="issm*", NAME="infiniband/%k" + + can be used. This will create device nodes named + + /dev/infiniband/umad0 + /dev/infiniband/issm0 + + for the first port, and so on. The InfiniBand device and port + associated with these devices can be determined from the files + + /sys/class/infiniband_mad/umad0/ibdev + /sys/class/infiniband_mad/umad0/port + + and + + /sys/class/infiniband_mad/issm0/ibdev + /sys/class/infiniband_mad/issm0/port diff --git a/Documentation/ioctl/cdrom.txt b/Documentation/ioctl/cdrom.txt new file mode 100644 index 000000000..4ccdcc6fe --- /dev/null +++ b/Documentation/ioctl/cdrom.txt @@ -0,0 +1,966 @@ + Summary of CDROM ioctl calls. + ============================ + + Edward A. Falk + + November, 2004 + +This document attempts to describe the ioctl(2) calls supported by +the CDROM layer. These are by-and-large implemented (as of Linux 2.6) +in drivers/cdrom/cdrom.c and drivers/block/scsi_ioctl.c + +ioctl values are listed in . As of this writing, they +are as follows: + + CDROMPAUSE Pause Audio Operation + CDROMRESUME Resume paused Audio Operation + CDROMPLAYMSF Play Audio MSF (struct cdrom_msf) + CDROMPLAYTRKIND Play Audio Track/index (struct cdrom_ti) + CDROMREADTOCHDR Read TOC header (struct cdrom_tochdr) + CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry) + CDROMSTOP Stop the cdrom drive + CDROMSTART Start the cdrom drive + CDROMEJECT Ejects the cdrom media + CDROMVOLCTRL Control output volume (struct cdrom_volctrl) + CDROMSUBCHNL Read subchannel data (struct cdrom_subchnl) + CDROMREADMODE2 Read CDROM mode 2 data (2336 Bytes) + (struct cdrom_read) + CDROMREADMODE1 Read CDROM mode 1 data (2048 Bytes) + (struct cdrom_read) + CDROMREADAUDIO (struct cdrom_read_audio) + CDROMEJECT_SW enable(1)/disable(0) auto-ejecting + CDROMMULTISESSION Obtain the start-of-last-session + address of multi session disks + (struct cdrom_multisession) + CDROM_GET_MCN Obtain the "Universal Product Code" + if available (struct cdrom_mcn) + CDROM_GET_UPC Deprecated, use CDROM_GET_MCN instead. + CDROMRESET hard-reset the drive + CDROMVOLREAD Get the drive's volume setting + (struct cdrom_volctrl) + CDROMREADRAW read data in raw mode (2352 Bytes) + (struct cdrom_read) + CDROMREADCOOKED read data in cooked mode + CDROMSEEK seek msf address + CDROMPLAYBLK scsi-cd only, (struct cdrom_blk) + CDROMREADALL read all 2646 bytes + CDROMGETSPINDOWN return 4-bit spindown value + CDROMSETSPINDOWN set 4-bit spindown value + CDROMCLOSETRAY pendant of CDROMEJECT + CDROM_SET_OPTIONS Set behavior options + CDROM_CLEAR_OPTIONS Clear behavior options + CDROM_SELECT_SPEED Set the CD-ROM speed + CDROM_SELECT_DISC Select disc (for juke-boxes) + CDROM_MEDIA_CHANGED Check is media changed + CDROM_DRIVE_STATUS Get tray position, etc. + CDROM_DISC_STATUS Get disc type, etc. + CDROM_CHANGER_NSLOTS Get number of slots + CDROM_LOCKDOOR lock or unlock door + CDROM_DEBUG Turn debug messages on/off + CDROM_GET_CAPABILITY get capabilities + CDROMAUDIOBUFSIZ set the audio buffer size + DVD_READ_STRUCT Read structure + DVD_WRITE_STRUCT Write structure + DVD_AUTH Authentication + CDROM_SEND_PACKET send a packet to the drive + CDROM_NEXT_WRITABLE get next writable block + CDROM_LAST_WRITTEN get last block written on disc + + +The information that follows was determined from reading kernel source +code. It is likely that some corrections will be made over time. + + + + + + + +General: + + Unless otherwise specified, all ioctl calls return 0 on success + and -1 with errno set to an appropriate value on error. (Some + ioctls return non-negative data values.) + + Unless otherwise specified, all ioctl calls return -1 and set + errno to EFAULT on a failed attempt to copy data to or from user + address space. + + Individual drivers may return error codes not listed here. + + Unless otherwise specified, all data structures and constants + are defined in + + + + +CDROMPAUSE Pause Audio Operation + + usage: + + ioctl(fd, CDROMPAUSE, 0); + + inputs: none + + outputs: none + + error return: + ENOSYS cd drive not audio-capable. + + +CDROMRESUME Resume paused Audio Operation + + usage: + + ioctl(fd, CDROMRESUME, 0); + + inputs: none + + outputs: none + + error return: + ENOSYS cd drive not audio-capable. + + +CDROMPLAYMSF Play Audio MSF (struct cdrom_msf) + + usage: + + struct cdrom_msf msf; + ioctl(fd, CDROMPLAYMSF, &msf); + + inputs: + cdrom_msf structure, describing a segment of music to play + + outputs: none + + error return: + ENOSYS cd drive not audio-capable. + + notes: + MSF stands for minutes-seconds-frames + LBA stands for logical block address + + Segment is described as start and end times, where each time + is described as minutes:seconds:frames. A frame is 1/75 of + a second. + + +CDROMPLAYTRKIND Play Audio Track/index (struct cdrom_ti) + + usage: + + struct cdrom_ti ti; + ioctl(fd, CDROMPLAYTRKIND, &ti); + + inputs: + cdrom_ti structure, describing a segment of music to play + + outputs: none + + error return: + ENOSYS cd drive not audio-capable. + + notes: + Segment is described as start and end times, where each time + is described as a track and an index. + + + +CDROMREADTOCHDR Read TOC header (struct cdrom_tochdr) + + usage: + + cdrom_tochdr header; + ioctl(fd, CDROMREADTOCHDR, &header); + + inputs: + cdrom_tochdr structure + + outputs: + cdrom_tochdr structure + + error return: + ENOSYS cd drive not audio-capable. + + + +CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry) + + usage: + + struct cdrom_tocentry entry; + ioctl(fd, CDROMREADTOCENTRY, &entry); + + inputs: + cdrom_tocentry structure + + outputs: + cdrom_tocentry structure + + error return: + ENOSYS cd drive not audio-capable. + EINVAL entry.cdte_format not CDROM_MSF or CDROM_LBA + EINVAL requested track out of bounds + EIO I/O error reading TOC + + notes: + TOC stands for Table Of Contents + MSF stands for minutes-seconds-frames + LBA stands for logical block address + + + +CDROMSTOP Stop the cdrom drive + + usage: + + ioctl(fd, CDROMSTOP, 0); + + inputs: none + + outputs: none + + error return: + ENOSYS cd drive not audio-capable. + + notes: + Exact interpretation of this ioctl depends on the device, + but most seem to spin the drive down. + + +CDROMSTART Start the cdrom drive + + usage: + + ioctl(fd, CDROMSTART, 0); + + inputs: none + + outputs: none + + error return: + ENOSYS cd drive not audio-capable. + + notes: + Exact interpretation of this ioctl depends on the device, + but most seem to spin the drive up and/or close the tray. + Other devices ignore the ioctl completely. + + +CDROMEJECT Ejects the cdrom media + + usage: + + ioctl(fd, CDROMEJECT, 0); + + inputs: none + + outputs: none + + error returns: + ENOSYS cd drive not capable of ejecting + EBUSY other processes are accessing drive, or door is locked + + notes: + See CDROM_LOCKDOOR, below. + + + +CDROMCLOSETRAY pendant of CDROMEJECT + + usage: + + ioctl(fd, CDROMEJECT, 0); + + inputs: none + + outputs: none + + error returns: + ENOSYS cd drive not capable of ejecting + EBUSY other processes are accessing drive, or door is locked + + notes: + See CDROM_LOCKDOOR, below. + + + +CDROMVOLCTRL Control output volume (struct cdrom_volctrl) + + usage: + + struct cdrom_volctrl volume; + ioctl(fd, CDROMVOLCTRL, &volume); + + inputs: + cdrom_volctrl structure containing volumes for up to 4 + channels. + + outputs: none + + error return: + ENOSYS cd drive not audio-capable. + + + +CDROMVOLREAD Get the drive's volume setting + (struct cdrom_volctrl) + + usage: + + struct cdrom_volctrl volume; + ioctl(fd, CDROMVOLREAD, &volume); + + inputs: none + + outputs: + The current volume settings. + + error return: + ENOSYS cd drive not audio-capable. + + + +CDROMSUBCHNL Read subchannel data (struct cdrom_subchnl) + + usage: + + struct cdrom_subchnl q; + ioctl(fd, CDROMSUBCHNL, &q); + + inputs: + cdrom_subchnl structure + + outputs: + cdrom_subchnl structure + + error return: + ENOSYS cd drive not audio-capable. + EINVAL format not CDROM_MSF or CDROM_LBA + + notes: + Format is converted to CDROM_MSF on return + + + +CDROMREADRAW read data in raw mode (2352 Bytes) + (struct cdrom_read) + + usage: + + union { + struct cdrom_msf msf; /* input */ + char buffer[CD_FRAMESIZE_RAW]; /* return */ + } arg; + ioctl(fd, CDROMREADRAW, &arg); + + inputs: + cdrom_msf structure indicating an address to read. + Only the start values are significant. + + outputs: + Data written to address provided by user. + + error return: + EINVAL address less than 0, or msf less than 0:2:0 + ENOMEM out of memory + + notes: + As of 2.6.8.1, comments in indicate that this + ioctl accepts a cdrom_read structure, but actual source code + reads a cdrom_msf structure and writes a buffer of data to + the same address. + + MSF values are converted to LBA values via this formula: + + lba = (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET; + + + + +CDROMREADMODE1 Read CDROM mode 1 data (2048 Bytes) + (struct cdrom_read) + + notes: + Identical to CDROMREADRAW except that block size is + CD_FRAMESIZE (2048) bytes + + + +CDROMREADMODE2 Read CDROM mode 2 data (2336 Bytes) + (struct cdrom_read) + + notes: + Identical to CDROMREADRAW except that block size is + CD_FRAMESIZE_RAW0 (2336) bytes + + + +CDROMREADAUDIO (struct cdrom_read_audio) + + usage: + + struct cdrom_read_audio ra; + ioctl(fd, CDROMREADAUDIO, &ra); + + inputs: + cdrom_read_audio structure containing read start + point and length + + outputs: + audio data, returned to buffer indicated by ra + + error return: + EINVAL format not CDROM_MSF or CDROM_LBA + EINVAL nframes not in range [1 75] + ENXIO drive has no queue (probably means invalid fd) + ENOMEM out of memory + + +CDROMEJECT_SW enable(1)/disable(0) auto-ejecting + + usage: + + int val; + ioctl(fd, CDROMEJECT_SW, val); + + inputs: + Flag specifying auto-eject flag. + + outputs: none + + error return: + ENOSYS Drive is not capable of ejecting. + EBUSY Door is locked + + + + +CDROMMULTISESSION Obtain the start-of-last-session + address of multi session disks + (struct cdrom_multisession) + usage: + + struct cdrom_multisession ms_info; + ioctl(fd, CDROMMULTISESSION, &ms_info); + + inputs: + cdrom_multisession structure containing desired + format. + + outputs: + cdrom_multisession structure is filled with last_session + information. + + error return: + EINVAL format not CDROM_MSF or CDROM_LBA + + +CDROM_GET_MCN Obtain the "Universal Product Code" + if available (struct cdrom_mcn) + + usage: + + struct cdrom_mcn mcn; + ioctl(fd, CDROM_GET_MCN, &mcn); + + inputs: none + + outputs: + Universal Product Code + + error return: + ENOSYS Drive is not capable of reading MCN data. + + notes: + Source code comments state: + + The following function is implemented, although very few + audio discs give Universal Product Code information, which + should just be the Medium Catalog Number on the box. Note, + that the way the code is written on the CD is /not/ uniform + across all discs! + + + + +CDROM_GET_UPC CDROM_GET_MCN (deprecated) + + Not implemented, as of 2.6.8.1 + + + +CDROMRESET hard-reset the drive + + usage: + + ioctl(fd, CDROMRESET, 0); + + inputs: none + + outputs: none + + error return: + EACCES Access denied: requires CAP_SYS_ADMIN + ENOSYS Drive is not capable of resetting. + + + + +CDROMREADCOOKED read data in cooked mode + + usage: + + u8 buffer[CD_FRAMESIZE] + ioctl(fd, CDROMREADCOOKED, buffer); + + inputs: none + + outputs: + 2048 bytes of data, "cooked" mode. + + notes: + Not implemented on all drives. + + + + +CDROMREADALL read all 2646 bytes + + Same as CDROMREADCOOKED, but reads 2646 bytes. + + + +CDROMSEEK seek msf address + + usage: + + struct cdrom_msf msf; + ioctl(fd, CDROMSEEK, &msf); + + inputs: + MSF address to seek to. + + outputs: none + + + +CDROMPLAYBLK scsi-cd only, (struct cdrom_blk) + + usage: + + struct cdrom_blk blk; + ioctl(fd, CDROMPLAYBLK, &blk); + + inputs: + Region to play + + outputs: none + + + +CDROMGETSPINDOWN + + usage: + + char spindown; + ioctl(fd, CDROMGETSPINDOWN, &spindown); + + inputs: none + + outputs: + The value of the current 4-bit spindown value. + + + + +CDROMSETSPINDOWN + + usage: + + char spindown + ioctl(fd, CDROMSETSPINDOWN, &spindown); + + inputs: + 4-bit value used to control spindown (TODO: more detail here) + + outputs: none + + + + + +CDROM_SET_OPTIONS Set behavior options + + usage: + + int options; + ioctl(fd, CDROM_SET_OPTIONS, options); + + inputs: + New values for drive options. The logical 'or' of: + CDO_AUTO_CLOSE close tray on first open(2) + CDO_AUTO_EJECT open tray on last release + CDO_USE_FFLAGS use O_NONBLOCK information on open + CDO_LOCK lock tray on open files + CDO_CHECK_TYPE check type on open for data + + outputs: + Returns the resulting options settings in the + ioctl return value. Returns -1 on error. + + error return: + ENOSYS selected option(s) not supported by drive. + + + + +CDROM_CLEAR_OPTIONS Clear behavior options + + Same as CDROM_SET_OPTIONS, except that selected options are + turned off. + + + +CDROM_SELECT_SPEED Set the CD-ROM speed + + usage: + + int speed; + ioctl(fd, CDROM_SELECT_SPEED, speed); + + inputs: + New drive speed. + + outputs: none + + error return: + ENOSYS speed selection not supported by drive. + + + +CDROM_SELECT_DISC Select disc (for juke-boxes) + + usage: + + int disk; + ioctl(fd, CDROM_SELECT_DISC, disk); + + inputs: + Disk to load into drive. + + outputs: none + + error return: + EINVAL Disk number beyond capacity of drive + + + +CDROM_MEDIA_CHANGED Check is media changed + + usage: + + int slot; + ioctl(fd, CDROM_MEDIA_CHANGED, slot); + + inputs: + Slot number to be tested, always zero except for jukeboxes. + May also be special values CDSL_NONE or CDSL_CURRENT + + outputs: + Ioctl return value is 0 or 1 depending on whether the media + has been changed, or -1 on error. + + error returns: + ENOSYS Drive can't detect media change + EINVAL Slot number beyond capacity of drive + ENOMEM Out of memory + + + +CDROM_DRIVE_STATUS Get tray position, etc. + + usage: + + int slot; + ioctl(fd, CDROM_DRIVE_STATUS, slot); + + inputs: + Slot number to be tested, always zero except for jukeboxes. + May also be special values CDSL_NONE or CDSL_CURRENT + + outputs: + Ioctl return value will be one of the following values + from : + + CDS_NO_INFO Information not available. + CDS_NO_DISC + CDS_TRAY_OPEN + CDS_DRIVE_NOT_READY + CDS_DISC_OK + -1 error + + error returns: + ENOSYS Drive can't detect drive status + EINVAL Slot number beyond capacity of drive + ENOMEM Out of memory + + + + +CDROM_DISC_STATUS Get disc type, etc. + + usage: + + ioctl(fd, CDROM_DISC_STATUS, 0); + + inputs: none + + outputs: + Ioctl return value will be one of the following values + from : + CDS_NO_INFO + CDS_AUDIO + CDS_MIXED + CDS_XA_2_2 + CDS_XA_2_1 + CDS_DATA_1 + + error returns: none at present + + notes: + Source code comments state: + + Ok, this is where problems start. The current interface for + the CDROM_DISC_STATUS ioctl is flawed. It makes the false + assumption that CDs are all CDS_DATA_1 or all CDS_AUDIO, etc. + Unfortunatly, while this is often the case, it is also + very common for CDs to have some tracks with data, and some + tracks with audio. Just because I feel like it, I declare + the following to be the best way to cope. If the CD has + ANY data tracks on it, it will be returned as a data CD. + If it has any XA tracks, I will return it as that. Now I + could simplify this interface by combining these returns with + the above, but this more clearly demonstrates the problem + with the current interface. Too bad this wasn't designed + to use bitmasks... -Erik + + Well, now we have the option CDS_MIXED: a mixed-type CD. + User level programmers might feel the ioctl is not very + useful. + ---david + + + + +CDROM_CHANGER_NSLOTS Get number of slots + + usage: + + ioctl(fd, CDROM_CHANGER_NSLOTS, 0); + + inputs: none + + outputs: + The ioctl return value will be the number of slots in a + CD changer. Typically 1 for non-multi-disk devices. + + error returns: none + + + +CDROM_LOCKDOOR lock or unlock door + + usage: + + int lock; + ioctl(fd, CDROM_LOCKDOOR, lock); + + inputs: + Door lock flag, 1=lock, 0=unlock + + outputs: none + + error returns: + EDRIVE_CANT_DO_THIS Door lock function not supported. + EBUSY Attempt to unlock when multiple users + have the drive open and not CAP_SYS_ADMIN + + notes: + As of 2.6.8.1, the lock flag is a global lock, meaning that + all CD drives will be locked or unlocked together. This is + probably a bug. + + The EDRIVE_CANT_DO_THIS value is defined in + and is currently (2.6.8.1) the same as EOPNOTSUPP + + + +CDROM_DEBUG Turn debug messages on/off + + usage: + + int debug; + ioctl(fd, CDROM_DEBUG, debug); + + inputs: + Cdrom debug flag, 0=disable, 1=enable + + outputs: + The ioctl return value will be the new debug flag. + + error return: + EACCES Access denied: requires CAP_SYS_ADMIN + + + +CDROM_GET_CAPABILITY get capabilities + + usage: + + ioctl(fd, CDROM_GET_CAPABILITY, 0); + + inputs: none + + outputs: + The ioctl return value is the current device capability + flags. See CDC_CLOSE_TRAY, CDC_OPEN_TRAY, etc. + + + +CDROMAUDIOBUFSIZ set the audio buffer size + + usage: + + int arg; + ioctl(fd, CDROMAUDIOBUFSIZ, val); + + inputs: + New audio buffer size + + outputs: + The ioctl return value is the new audio buffer size, or -1 + on error. + + error return: + ENOSYS Not supported by this driver. + + notes: + Not supported by all drivers. + + + +DVD_READ_STRUCT Read structure + + usage: + + dvd_struct s; + ioctl(fd, DVD_READ_STRUCT, &s); + + inputs: + dvd_struct structure, containing: + type specifies the information desired, one of + DVD_STRUCT_PHYSICAL, DVD_STRUCT_COPYRIGHT, + DVD_STRUCT_DISCKEY, DVD_STRUCT_BCA, + DVD_STRUCT_MANUFACT + physical.layer_num desired layer, indexed from 0 + copyright.layer_num desired layer, indexed from 0 + disckey.agid + + outputs: + dvd_struct structure, containing: + physical for type == DVD_STRUCT_PHYSICAL + copyright for type == DVD_STRUCT_COPYRIGHT + disckey.value for type == DVD_STRUCT_DISCKEY + bca.{len,value} for type == DVD_STRUCT_BCA + manufact.{len,valu} for type == DVD_STRUCT_MANUFACT + + error returns: + EINVAL physical.layer_num exceeds number of layers + EIO Recieved invalid response from drive + + + +DVD_WRITE_STRUCT Write structure + + Not implemented, as of 2.6.8.1 + + + +DVD_AUTH Authentication + + usage: + + dvd_authinfo ai; + ioctl(fd, DVD_AUTH, &ai); + + inputs: + dvd_authinfo structure. See + + outputs: + dvd_authinfo structure. + + error return: + ENOTTY ai.type not recognized. + + + +CDROM_SEND_PACKET send a packet to the drive + + usage: + + struct cdrom_generic_command cgc; + ioctl(fd, CDROM_SEND_PACKET, &cgc); + + inputs: + cdrom_generic_command structure containing the packet to send. + + outputs: none + cdrom_generic_command structure containing results. + + error return: + EIO command failed. + EPERM Operation not permitted, either because a + write command was attempted on a drive which + is opened read-only, or because the command + requires CAP_SYS_RAWIO + EINVAL cgc.data_direction not set + + + +CDROM_NEXT_WRITABLE get next writable block + + usage: + + long next; + ioctl(fd, CDROM_NEXT_WRITABLE, &next); + + inputs: none + + outputs: + The next writable block. + + notes: + If the device does not support this ioctl directly, the + ioctl will return CDROM_LAST_WRITTEN + 7. + + + +CDROM_LAST_WRITTEN get last block written on disc + + usage: + + long last; + ioctl(fd, CDROM_LAST_WRITTEN, &last); + + inputs: none + + outputs: + The last block written on disc + + notes: + If the device does not support this ioctl directly, the + result is derived from the disc's table of contents. If the + table of contents can't be read, this ioctl returns an + error. diff --git a/Documentation/ioctl/hdio.txt b/Documentation/ioctl/hdio.txt new file mode 100644 index 000000000..c42d3b685 --- /dev/null +++ b/Documentation/ioctl/hdio.txt @@ -0,0 +1,965 @@ + Summary of HDIO_ ioctl calls. + ============================ + + Edward A. Falk + + November, 2004 + +This document attempts to describe the ioctl(2) calls supported by +the HD/IDE layer. These are by-and-large implemented (as of Linux 2.6) +in drivers/ide/ide.c and drivers/block/scsi_ioctl.c + +ioctl values are listed in . As of this writing, they +are as follows: + + ioctls that pass argument pointers to user space: + + HDIO_GETGEO get device geometry + HDIO_GET_UNMASKINTR get current unmask setting + HDIO_GET_MULTCOUNT get current IDE blockmode setting + HDIO_GET_QDMA get use-qdma flag + HDIO_SET_XFER set transfer rate via proc + HDIO_OBSOLETE_IDENTITY OBSOLETE, DO NOT USE + HDIO_GET_KEEPSETTINGS get keep-settings-on-reset flag + HDIO_GET_32BIT get current io_32bit setting + HDIO_GET_NOWERR get ignore-write-error flag + HDIO_GET_DMA get use-dma flag + HDIO_GET_NICE get nice flags + HDIO_GET_IDENTITY get IDE identification info + HDIO_GET_WCACHE get write cache mode on|off + HDIO_GET_ACOUSTIC get acoustic value + HDIO_GET_ADDRESS get sector addressing mode + HDIO_GET_BUSSTATE get the bus state of the hwif + HDIO_TRISTATE_HWIF execute a channel tristate + HDIO_DRIVE_RESET execute a device reset + HDIO_DRIVE_TASKFILE execute raw taskfile + HDIO_DRIVE_TASK execute task and special drive command + HDIO_DRIVE_CMD execute a special drive command + HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK + + ioctls that pass non-pointer values: + + HDIO_SET_MULTCOUNT change IDE blockmode + HDIO_SET_UNMASKINTR permit other irqs during I/O + HDIO_SET_KEEPSETTINGS keep ioctl settings on reset + HDIO_SET_32BIT change io_32bit flags + HDIO_SET_NOWERR change ignore-write-error flag + HDIO_SET_DMA change use-dma flag + HDIO_SET_PIO_MODE reconfig interface to new speed + HDIO_SCAN_HWIF register and (re)scan interface + HDIO_SET_NICE set nice flags + HDIO_UNREGISTER_HWIF unregister interface + HDIO_SET_WCACHE change write cache enable-disable + HDIO_SET_ACOUSTIC change acoustic behavior + HDIO_SET_BUSSTATE set the bus state of the hwif + HDIO_SET_QDMA change use-qdma flag + HDIO_SET_ADDRESS change lba addressing modes + + HDIO_SET_IDE_SCSI Set scsi emulation mode on/off + HDIO_SET_SCSI_IDE not implemented yet + + +The information that follows was determined from reading kernel source +code. It is likely that some corrections will be made over time. + + + + + + + +General: + + Unless otherwise specified, all ioctl calls return 0 on success + and -1 with errno set to an appropriate value on error. + + Unless otherwise specified, all ioctl calls return -1 and set + errno to EFAULT on a failed attempt to copy data to or from user + address space. + + Unless otherwise specified, all data structures and constants + are defined in + + + +HDIO_GETGEO get device geometry + + usage: + + struct hd_geometry geom; + ioctl(fd, HDIO_GETGEO, &geom); + + + inputs: none + + outputs: + + hd_geometry structure containing: + + heads number of heads + sectors number of sectors/track + cylinders number of cylinders, mod 65536 + start starting sector of this partition. + + + error returns: + EINVAL if the device is not a disk drive or floppy drive, + or if the user passes a null pointer + + + notes: + + Not particularly useful with modern disk drives, whose geometry + is a polite fiction anyway. Modern drives are addressed + purely by sector number nowadays (lba addressing), and the + drive geometry is an abstraction which is actually subject + to change. Currently (as of Nov 2004), the geometry values + are the "bios" values -- presumably the values the drive had + when Linux first booted. + + In addition, the cylinders field of the hd_geometry is an + unsigned short, meaning that on most architectures, this + ioctl will not return a meaningful value on drives with more + than 65535 tracks. + + The start field is unsigned long, meaning that it will not + contain a meaningful value for disks over 219 Gb in size. + + + + +HDIO_GET_UNMASKINTR get current unmask setting + + usage: + + long val; + ioctl(fd, HDIO_GET_UNMASKINTR, &val); + + inputs: none + + outputs: + The value of the drive's current unmask setting + + + +HDIO_SET_UNMASKINTR permit other irqs during I/O + + usage: + + unsigned long val; + ioctl(fd, HDIO_SET_UNMASKINTR, val); + + inputs: + New value for unmask flag + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 1] + EBUSY Controller busy + + + + +HDIO_GET_MULTCOUNT get current IDE blockmode setting + + usage: + + long val; + ioctl(fd, HDIO_GET_MULTCOUNT, &val); + + inputs: none + + outputs: + The value of the current IDE block mode setting. This + controls how many sectors the drive will transfer per + interrupt. + + + +HDIO_SET_MULTCOUNT change IDE blockmode + + usage: + + int val; + ioctl(fd, HDIO_SET_MULTCOUNT, val); + + inputs: + New value for IDE block mode setting. This controls how many + sectors the drive will transfer per interrupt. + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range supported by disk. + EBUSY Controller busy or blockmode already set. + EIO Drive did not accept new block mode. + + notes: + + Source code comments read: + + This is tightly woven into the driver->do_special can not + touch. DON'T do it again until a total personality rewrite + is committed. + + If blockmode has already been set, this ioctl will fail with + EBUSY + + + +HDIO_GET_QDMA get use-qdma flag + + Not implemented, as of 2.6.8.1 + + + +HDIO_SET_XFER set transfer rate via proc + + Not implemented, as of 2.6.8.1 + + + +HDIO_OBSOLETE_IDENTITY OBSOLETE, DO NOT USE + + Same as HDIO_GET_IDENTITY (see below), except that it only + returns the first 142 bytes of drive identity information. + + + +HDIO_GET_IDENTITY get IDE identification info + + usage: + + unsigned char identity[512]; + ioctl(fd, HDIO_GET_IDENTITY, identity); + + inputs: none + + outputs: + + ATA drive identity information. For full description, see + the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands in + the ATA specification. + + error returns: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + ENOMSG IDENTIFY DEVICE information not available + + notes: + + Returns information that was obtained when the drive was + probed. Some of this information is subject to change, and + this ioctl does not re-probe the drive to update the + information. + + This information is also available from /proc/ide/hdX/identify + + + +HDIO_GET_KEEPSETTINGS get keep-settings-on-reset flag + + usage: + + long val; + ioctl(fd, HDIO_GET_KEEPSETTINGS, &val); + + inputs: none + + outputs: + The value of the current "keep settings" flag + + notes: + + When set, indicates that kernel should restore settings + after a drive reset. + + + +HDIO_SET_KEEPSETTINGS keep ioctl settings on reset + + usage: + + long val; + ioctl(fd, HDIO_SET_KEEPSETTINGS, val); + + inputs: + New value for keep_settings flag + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 1] + EBUSY Controller busy + + + +HDIO_GET_32BIT get current io_32bit setting + + usage: + + long val; + ioctl(fd, HDIO_GET_32BIT, &val); + + inputs: none + + outputs: + The value of the current io_32bit setting + + notes: + + 0=16-bit, 1=32-bit, 2,3 = 32bit+sync + + + +HDIO_GET_NOWERR get ignore-write-error flag + + usage: + + long val; + ioctl(fd, HDIO_GET_NOWERR, &val); + + inputs: none + + outputs: + The value of the current ignore-write-error flag + + + +HDIO_GET_DMA get use-dma flag + + usage: + + long val; + ioctl(fd, HDIO_GET_DMA, &val); + + inputs: none + + outputs: + The value of the current use-dma flag + + + +HDIO_GET_NICE get nice flags + + usage: + + long nice; + ioctl(fd, HDIO_GET_NICE, &nice); + + inputs: none + + outputs: + + The drive's "nice" values. + + notes: + + Per-drive flags which determine when the system will give more + bandwidth to other devices sharing the same IDE bus. + See , near symbol IDE_NICE_DSC_OVERLAP. + + + + +HDIO_SET_NICE set nice flags + + usage: + + unsigned long nice; + ... + ioctl(fd, HDIO_SET_NICE, nice); + + inputs: + bitmask of nice flags. + + outputs: none + + error returns: + EACCES Access denied: requires CAP_SYS_ADMIN + EPERM Flags other than DSC_OVERLAP and NICE_1 set. + EPERM DSC_OVERLAP specified but not supported by drive + + notes: + + This ioctl sets the DSC_OVERLAP and NICE_1 flags from values + provided by the user. + + Nice flags are listed in , starting with + IDE_NICE_DSC_OVERLAP. These values represent shifts. + + + + + +HDIO_GET_WCACHE get write cache mode on|off + + usage: + + long val; + ioctl(fd, HDIO_GET_WCACHE, &val); + + inputs: none + + outputs: + The value of the current write cache mode + + + +HDIO_GET_ACOUSTIC get acoustic value + + usage: + + long val; + ioctl(fd, HDIO_GET_ACOUSTIC, &val); + + inputs: none + + outputs: + The value of the current acoustic settings + + notes: + + See HDIO_SET_ACOUSTIC + + + +HDIO_GET_ADDRESS + + usage: + + long val; + ioctl(fd, HDIO_GET_ADDRESS, &val); + + inputs: none + + outputs: + The value of the current addressing mode: + 0 = 28-bit + 1 = 48-bit + 2 = 48-bit doing 28-bit + 3 = 64-bit + + + +HDIO_GET_BUSSTATE get the bus state of the hwif + + usage: + + long state; + ioctl(fd, HDIO_SCAN_HWIF, &state); + + inputs: none + + outputs: + Current power state of the IDE bus. One of BUSSTATE_OFF, + BUSSTATE_ON, or BUSSTATE_TRISTATE + + error returns: + EACCES Access denied: requires CAP_SYS_ADMIN + + + + +HDIO_SET_BUSSTATE set the bus state of the hwif + + usage: + + int state; + ... + ioctl(fd, HDIO_SCAN_HWIF, state); + + inputs: + Desired IDE power state. One of BUSSTATE_OFF, BUSSTATE_ON, + or BUSSTATE_TRISTATE + + outputs: none + + error returns: + EACCES Access denied: requires CAP_SYS_RAWIO + EOPNOTSUPP Hardware interface does not support bus power control + + + + +HDIO_TRISTATE_HWIF execute a channel tristate + + Not implemented, as of 2.6.8.1. See HDIO_SET_BUSSTATE + + + +HDIO_DRIVE_RESET execute a device reset + + usage: + + int args[3] + ... + ioctl(fd, HDIO_DRIVE_RESET, args); + + inputs: none + + outputs: none + + error returns: + EACCES Access denied: requires CAP_SYS_ADMIN + + notes: + + Abort any current command, prevent anything else from being + queued, execute a reset on the device, and issue BLKRRPART + ioctl on the block device. + + Executes an ATAPI soft reset if applicable, otherwise + executes an ATA soft reset on the controller. + + + +HDIO_DRIVE_TASKFILE execute raw taskfile + + Note: If you don't have a copy of the ANSI ATA specification + handy, you should probably ignore this ioctl. + + Execute an ATA disk command directly by writing the "taskfile" + registers of the drive. Requires ADMIN and RAWIO access + privileges. + + usage: + + struct { + ide_task_request_t req_task; + u8 outbuf[OUTPUT_SIZE]; + u8 inbuf[INPUT_SIZE]; + } task; + memset(&task.req_task, 0, sizeof(task.req_task)); + task.req_task.out_size = sizeof(task.outbuf); + task.req_task.in_size = sizeof(task.inbuf); + ... + ioctl(fd, HDIO_DRIVE_TASKFILE, &task); + ... + + inputs: + + (See below for details on memory area passed to ioctl.) + + io_ports[8] values to be written to taskfile registers + hob_ports[8] high-order bytes, for extended commands. + out_flags flags indicating which registers are valid + in_flags flags indicating which registers should be returned + data_phase see below + req_cmd command type to be executed + out_size size of output buffer + outbuf buffer of data to be transmitted to disk + inbuf buffer of data to be received from disk (see [1]) + + outputs: + + io_ports[] values returned in the taskfile registers + hob_ports[] high-order bytes, for extended commands. + out_flags flags indicating which registers are valid (see [2]) + in_flags flags indicating which registers should be returned + outbuf buffer of data to be transmitted to disk (see [1]) + inbuf buffer of data to be received from disk + + error returns: + EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set. + ENOMSG Device is not a disk drive. + ENOMEM Unable to allocate memory for task + EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8) + EPERM req_cmd == TASKFILE_MULTI_OUT and drive + multi-count not yet set. + + + notes: + + [1] Currently (2.6.8), both the input and output buffers are + copied from the user and written back to the user, even when + not used. This may be a bug. + + [2] The out_flags and in_flags are returned to the user after + the ioctl completes. Currently (2.6.8) these are the same + as the input values, unchanged. In the future, they may have + more significance. + + Extreme caution should be used with using this ioctl. A + mistake can easily corrupt data or hang the system. + + The argument to the ioctl is a pointer to a region of memory + containing a ide_task_request_t structure, followed by an + optional buffer of data to be transmitted to the drive, + followed by an optional buffer to receive data from the drive. + + Command is passed to the disk drive via the ide_task_request_t + structure, which contains these fields: + + io_ports[8] values for the taskfile registers + hob_ports[8] high-order bytes, for extended commands + out_flags flags indicating which entries in the + io_ports[] and hob_ports[] arrays + contain valid values. Type ide_reg_valid_t. + in_flags flags indicating which entries in the + io_ports[] and hob_ports[] arrays + are expected to contain valid values + on return. + data_phase See below + req_cmd Command type, see below + out_size output (user->drive) buffer size, bytes + in_size input (drive->user) buffer size, bytes + + This ioctl does not necessarily respect all flags in the + out_flags and in_flags values -- some taskfile registers + may be written or read even if not requested in the flags. + Unused fields of io_ports[] and hob_ports[] should be set + to zero. + + The data_phase field describes the data transfer to be + performed. Value is one of: + + TASKFILE_IN + TASKFILE_MULTI_IN + TASKFILE_OUT + TASKFILE_MULTI_OUT + TASKFILE_IN_OUT + TASKFILE_IN_DMA + TASKFILE_IN_DMAQ + TASKFILE_OUT_DMA + TASKFILE_OUT_DMAQ + TASKFILE_P_IN + TASKFILE_P_IN_DMA + TASKFILE_P_IN_DMAQ + TASKFILE_P_OUT + TASKFILE_P_OUT_DMA + TASKFILE_P_OUT_DMAQ + + The req_cmd field classifies the command type. It may be + one of: + + IDE_DRIVE_TASK_NO_DATA + IDE_DRIVE_TASK_SET_XFER + IDE_DRIVE_TASK_IN + IDE_DRIVE_TASK_OUT + IDE_DRIVE_TASK_RAW_WRITE + + + + + + +HDIO_DRIVE_CMD execute a special drive command + + Note: If you don't have a copy of the ANSI ATA specification + handy, you should probably ignore this ioctl. + + usage: + + u8 args[4+XFER_SIZE]; + ... + ioctl(fd, HDIO_DRIVE_CMD, args); + + inputs: + + Taskfile register values: + args[0] COMMAND + args[1] SECTOR + args[2] FEATURE + args[3] NSECTOR + + outputs: + + args[] buffer is filled with register values followed by any + data returned by the disk. + args[0] status + args[1] error + args[2] NSECTOR + args[3] undefined + args[4+] NSECTOR * 512 bytes of data returned by the command. + + error returns: + EACCES Access denied: requires CAP_SYS_RAWIO + ENOMEM Unable to allocate memory for task + + notes: + + Taskfile registers IDE_LCYL, IDE_HCYL, and IDE_SELECT are + set to zero before executing the command. + + + +HDIO_DRIVE_TASK execute task and special drive command + + Note: If you don't have a copy of the ANSI ATA specification + handy, you should probably ignore this ioctl. + + usage: + + u8 args[7]; + ... + ioctl(fd, HDIO_DRIVE_TASK, args); + + inputs: + + Taskfile register values: + args[0] COMMAND + args[1] FEATURE + args[2] NSECTOR + args[3] SECTOR + args[4] LCYL + args[5] HCYL + args[6] SELECT + + outputs: + + Taskfile register values: + args[0] status + args[1] error + args[2] NSECTOR + args[3] SECTOR + args[4] LCYL + args[5] HCYL + args[6] SELECT + + error returns: + EACCES Access denied: requires CAP_SYS_RAWIO + ENOMEM Unable to allocate memory for task + + + + +HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK + + Not implemented, as of 2.6.8.1 + + + +HDIO_SET_32BIT change io_32bit flags + + usage: + + int val; + ioctl(fd, HDIO_SET_32BIT, val); + + inputs: + New value for io_32bit flag + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 3] + EBUSY Controller busy + + + + +HDIO_SET_NOWERR change ignore-write-error flag + + usage: + + int val; + ioctl(fd, HDIO_SET_NOWERR, val); + + inputs: + New value for ignore-write-error flag. Used for ignoring + WRERR_STAT + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 1] + EBUSY Controller busy + + + +HDIO_SET_DMA change use-dma flag + + usage: + + long val; + ioctl(fd, HDIO_SET_DMA, val); + + inputs: + New value for use-dma flag + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 1] + EBUSY Controller busy + + + +HDIO_SET_PIO_MODE reconfig interface to new speed + + usage: + + long val; + ioctl(fd, HDIO_SET_PIO_MODE, val); + + inputs: + New interface speed. + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 255] + EBUSY Controller busy + + + +HDIO_SCAN_HWIF register and (re)scan interface + + usage: + + int args[3] + ... + ioctl(fd, HDIO_SCAN_HWIF, args); + + inputs: + args[0] io address to probe + args[1] control address to probe + args[2] irq number + + outputs: none + + error returns: + EACCES Access denied: requires CAP_SYS_RAWIO + EIO Probe failed. + + notes: + + This ioctl initializes the addresses and irq for a disk + controller, probes for drives, and creates /proc/ide + interfaces as appropiate. + + + +HDIO_UNREGISTER_HWIF unregister interface + + usage: + + int index; + ioctl(fd, HDIO_UNREGISTER_HWIF, index); + + inputs: + index index of hardware interface to unregister + + outputs: none + + error returns: + EACCES Access denied: requires CAP_SYS_RAWIO + + notes: + + This ioctl removes a hardware interface from the kernel. + + Currently (2.6.8) this ioctl silently fails if any drive on + the interface is busy. + + + +HDIO_SET_WCACHE change write cache enable-disable + + usage: + + int val; + ioctl(fd, HDIO_SET_WCACHE, val); + + inputs: + New value for write cache enable + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 1] + EBUSY Controller busy + + + +HDIO_SET_ACOUSTIC change acoustic behavior + + usage: + + int val; + ioctl(fd, HDIO_SET_ACOUSTIC, val); + + inputs: + New value for drive acoustic settings + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 254] + EBUSY Controller busy + + + +HDIO_SET_QDMA change use-qdma flag + + Not implemented, as of 2.6.8.1 + + + +HDIO_SET_ADDRESS change lba addressing modes + + usage: + + int val; + ioctl(fd, HDIO_SET_ADDRESS, val); + + inputs: + New value for addressing mode + 0 = 28-bit + 1 = 48-bit + 2 = 48-bit doing 28-bit + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 2] + EBUSY Controller busy + EIO Drive does not support lba48 mode. + + +HDIO_SET_IDE_SCSI + + usage: + + long val; + ioctl(fd, HDIO_SET_IDE_SCSI, val); + + inputs: + New value for scsi emulation mode (?) + + outputs: none + + error return: + EINVAL (bdev != bdev->bd_contains) (not sure what this means) + EACCES Access denied: requires CAP_SYS_ADMIN + EINVAL value out of range [0 1] + EBUSY Controller busy + + + +HDIO_SET_SCSI_IDE + + Not implemented, as of 2.6.8.1 + + diff --git a/Documentation/keys.txt b/Documentation/keys.txt new file mode 100644 index 000000000..36cbb0dd0 --- /dev/null +++ b/Documentation/keys.txt @@ -0,0 +1,836 @@ + ============================ + KERNEL KEY RETENTION SERVICE + ============================ + +This service allows cryptographic keys, authentication tokens, cross-domain +user mappings, and similar to be cached in the kernel for the use of +filesystems other kernel services. + +Keyrings are permitted; these are a special type of key that can hold links to +other keys. Processes each have three standard keyring subscriptions that a +kernel service can search for relevant keys. + +The key service can be configured on by enabling: + + "Security options"/"Enable access key retention support" (CONFIG_KEYS) + +This document has the following sections: + + - Key overview + - Key service overview + - Key access permissions + - New procfs files + - Userspace system call interface + - Kernel services + - Defining a key type + - Request-key callback service + - Key access filesystem + + +============ +KEY OVERVIEW +============ + +In this context, keys represent units of cryptographic data, authentication +tokens, keyrings, etc.. These are represented in the kernel by struct key. + +Each key has a number of attributes: + + - A serial number. + - A type. + - A description (for matching a key in a search). + - Access control information. + - An expiry time. + - A payload. + - State. + + + (*) Each key is issued a serial number of type key_serial_t that is unique + for the lifetime of that key. All serial numbers are positive non-zero + 32-bit integers. + + Userspace programs can use a key's serial numbers as a way to gain access + to it, subject to permission checking. + + (*) Each key is of a defined "type". Types must be registered inside the + kernel by a kernel service (such as a filesystem) before keys of that + type can be added or used. Userspace programs cannot define new types + directly. + + Key types are represented in the kernel by struct key_type. This defines + a number of operations that can be performed on a key of that type. + + Should a type be removed from the system, all the keys of that type will + be invalidated. + + (*) Each key has a description. This should be a printable string. The key + type provides an operation to perform a match between the description on + a key and a criterion string. + + (*) Each key has an owner user ID, a group ID and a permissions mask. These + are used to control what a process may do to a key from userspace, and + whether a kernel service will be able to find the key. + + (*) Each key can be set to expire at a specific time by the key type's + instantiation function. Keys can also be immortal. + + (*) Each key can have a payload. This is a quantity of data that represent + the actual "key". In the case of a keyring, this is a list of keys to + which the keyring links; in the case of a user-defined key, it's an + arbitrary blob of data. + + Having a payload is not required; and the payload can, in fact, just be a + value stored in the struct key itself. + + When a key is instantiated, the key type's instantiation function is + called with a blob of data, and that then creates the key's payload in + some way. + + Similarly, when userspace wants to read back the contents of the key, if + permitted, another key type operation will be called to convert the key's + attached payload back into a blob of data. + + (*) Each key can be in one of a number of basic states: + + (*) Uninstantiated. The key exists, but does not have any data + attached. Keys being requested from userspace will be in this state. + + (*) Instantiated. This is the normal state. The key is fully formed, and + has data attached. + + (*) Negative. This is a relatively short-lived state. The key acts as a + note saying that a previous call out to userspace failed, and acts as + a throttle on key lookups. A negative key can be updated to a normal + state. + + (*) Expired. Keys can have lifetimes set. If their lifetime is exceeded, + they traverse to this state. An expired key can be updated back to a + normal state. + + (*) Revoked. A key is put in this state by userspace action. It can't be + found or operated upon (apart from by unlinking it). + + (*) Dead. The key's type was unregistered, and so the key is now useless. + + +==================== +KEY SERVICE OVERVIEW +==================== + +The key service provides a number of features besides keys: + + (*) The key service defines two special key types: + + (+) "keyring" + + Keyrings are special keys that contain a list of other keys. Keyring + lists can be modified using various system calls. Keyrings should not + be given a payload when created. + + (+) "user" + + A key of this type has a description and a payload that are arbitrary + blobs of data. These can be created, updated and read by userspace, + and aren't intended for use by kernel services. + + (*) Each process subscribes to three keyrings: a thread-specific keyring, a + process-specific keyring, and a session-specific keyring. + + The thread-specific keyring is discarded from the child when any sort of + clone, fork, vfork or execve occurs. A new keyring is created only when + required. + + The process-specific keyring is replaced with an empty one in the child + on clone, fork, vfork unless CLONE_THREAD is supplied, in which case it + is shared. execve also discards the process's process keyring and creates + a new one. + + The session-specific keyring is persistent across clone, fork, vfork and + execve, even when the latter executes a set-UID or set-GID binary. A + process can, however, replace its current session keyring with a new one + by using PR_JOIN_SESSION_KEYRING. It is permitted to request an anonymous + new one, or to attempt to create or join one of a specific name. + + The ownership of the thread and process-specific keyrings changes when + the real UID and GID of the thread changes. + + (*) Each user ID resident in the system holds two special keyrings: a user + specific keyring and a default user session keyring. The default session + keyring is initialised with a link to the user-specific keyring. + + When a process changes its real UID, if it used to have no session key, it + will be subscribed to the default session key for the new UID. + + If a process attempts to access its session key when it doesn't have one, + it will be subscribed to the default for its current UID. + + (*) Each user has two quotas against which the keys they own are tracked. One + limits the total number of keys and keyrings, the other limits the total + amount of description and payload space that can be consumed. + + The user can view information on this and other statistics through procfs + files. + + Process-specific and thread-specific keyrings are not counted towards a + user's quota. + + If a system call that modifies a key or keyring in some way would put the + user over quota, the operation is refused and error EDQUOT is returned. + + (*) There's a system call interface by which userspace programs can create + and manipulate keys and keyrings. + + (*) There's a kernel interface by which services can register types and + search for keys. + + (*) There's a way for the a search done from the kernel to call back to + userspace to request a key that can't be found in a process's keyrings. + + (*) An optional filesystem is available through which the key database can be + viewed and manipulated. + + +====================== +KEY ACCESS PERMISSIONS +====================== + +Keys have an owner user ID, a group access ID, and a permissions mask. The +mask has up to eight bits each for user, group and other access. Only five of +each set of eight bits are defined. These permissions granted are: + + (*) View + + This permits a key or keyring's attributes to be viewed - including key + type and description. + + (*) Read + + This permits a key's payload to be viewed or a keyring's list of linked + keys. + + (*) Write + + This permits a key's payload to be instantiated or updated, or it allows + a link to be added to or removed from a keyring. + + (*) Search + + This permits keyrings to be searched and keys to be found. Searches can + only recurse into nested keyrings that have search permission set. + + (*) Link + + This permits a key or keyring to be linked to. To create a link from a + keyring to a key, a process must have Write permission on the keyring and + Link permission on the key. + +For changing the ownership, group ID or permissions mask, being the owner of +the key or having the sysadmin capability is sufficient. + + +================ +NEW PROCFS FILES +================ + +Two files have been added to procfs by which an administrator can find out +about the status of the key service: + + (*) /proc/keys + + This lists all the keys on the system, giving information about their + type, description and permissions. The payload of the key is not + available this way: + + SERIAL FLAGS USAGE EXPY PERM UID GID TYPE DESCRIPTION: SUMMARY + 00000001 I----- 39 perm 1f0000 0 0 keyring _uid_ses.0: 1/4 + 00000002 I----- 2 perm 1f0000 0 0 keyring _uid.0: empty + 00000007 I----- 1 perm 1f0000 0 0 keyring _pid.1: empty + 0000018d I----- 1 perm 1f0000 0 0 keyring _pid.412: empty + 000004d2 I--Q-- 1 perm 1f0000 32 -1 keyring _uid.32: 1/4 + 000004d3 I--Q-- 3 perm 1f0000 32 -1 keyring _uid_ses.32: empty + 00000892 I--QU- 1 perm 1f0000 0 0 user metal:copper: 0 + 00000893 I--Q-N 1 35s 1f0000 0 0 user metal:silver: 0 + 00000894 I--Q-- 1 10h 1f0000 0 0 user metal:gold: 0 + + The flags are: + + I Instantiated + R Revoked + D Dead + Q Contributes to user's quota + U Under contruction by callback to userspace + N Negative key + + This file must be enabled at kernel configuration time as it allows anyone + to list the keys database. + + (*) /proc/key-users + + This file lists the tracking data for each user that has at least one key + on the system. Such data includes quota information and statistics: + + [root@andromeda root]# cat /proc/key-users + 0: 46 45/45 1/100 13/10000 + 29: 2 2/2 2/100 40/10000 + 32: 2 2/2 2/100 40/10000 + 38: 2 2/2 2/100 40/10000 + + The format of each line is + : User ID to which this applies + Structure refcount + / Total number of keys and number instantiated + / Key count quota + / Key size quota + + +=============================== +USERSPACE SYSTEM CALL INTERFACE +=============================== + +Userspace can manipulate keys directly through three new syscalls: add_key, +request_key and keyctl. The latter provides a number of functions for +manipulating keys. + +When referring to a key directly, userspace programs should use the key's +serial number (a positive 32-bit integer). However, there are some special +values available for referring to special keys and keyrings that relate to the +process making the call: + + CONSTANT VALUE KEY REFERENCED + ============================== ====== =========================== + KEY_SPEC_THREAD_KEYRING -1 thread-specific keyring + KEY_SPEC_PROCESS_KEYRING -2 process-specific keyring + KEY_SPEC_SESSION_KEYRING -3 session-specific keyring + KEY_SPEC_USER_KEYRING -4 UID-specific keyring + KEY_SPEC_USER_SESSION_KEYRING -5 UID-session keyring + KEY_SPEC_GROUP_KEYRING -6 GID-specific keyring + + +The main syscalls are: + + (*) Create a new key of given type, description and payload and add it to the + nominated keyring: + + key_serial_t add_key(const char *type, const char *desc, + const void *payload, size_t plen, + key_serial_t keyring); + + If a key of the same type and description as that proposed already exists + in the keyring, this will try to update it with the given payload, or it + will return error EEXIST if that function is not supported by the key + type. The process must also have permission to write to the key to be + able to update it. The new key will have all user permissions granted and + no group or third party permissions. + + Otherwise, this will attempt to create a new key of the specified type + and description, and to instantiate it with the supplied payload and + attach it to the keyring. In this case, an error will be generated if the + process does not have permission to write to the keyring. + + The payload is optional, and the pointer can be NULL if not required by + the type. The payload is plen in size, and plen can be zero for an empty + payload. + + A new keyring can be generated by setting type "keyring", the keyring + name as the description (or NULL) and setting the payload to NULL. + + User defined keys can be created by specifying type "user". It is + recommended that a user defined key's description by prefixed with a type + ID and a colon, such as "krb5tgt:" for a Kerberos 5 ticket granting + ticket. + + Any other type must have been registered with the kernel in advance by a + kernel service such as a filesystem. + + The ID of the new or updated key is returned if successful. + + + (*) Search the process's keyrings for a key, potentially calling out to + userspace to create it. + + key_serial_t request_key(const char *type, const char *description, + const char *callout_info, + key_serial_t dest_keyring); + + This function searches all the process's keyrings in the order thread, + process, session for a matching key. This works very much like + KEYCTL_SEARCH, including the optional attachment of the discovered key to + a keyring. + + If a key cannot be found, and if callout_info is not NULL, then + /sbin/request-key will be invoked in an attempt to obtain a key. The + callout_info string will be passed as an argument to the program. + + +The keyctl syscall functions are: + + (*) Map a special key ID to a real key ID for this process: + + key_serial_t keyctl(KEYCTL_GET_KEYRING_ID, key_serial_t id, + int create); + + The special key specified by "id" is looked up (with the key being + created if necessary) and the ID of the key or keyring thus found is + returned if it exists. + + If the key does not yet exist, the key will be created if "create" is + non-zero; and the error ENOKEY will be returned if "create" is zero. + + + (*) Replace the session keyring this process subscribes to with a new one: + + key_serial_t keyctl(KEYCTL_JOIN_SESSION_KEYRING, const char *name); + + If name is NULL, an anonymous keyring is created attached to the process + as its session keyring, displacing the old session keyring. + + If name is not NULL, if a keyring of that name exists, the process + attempts to attach it as the session keyring, returning an error if that + is not permitted; otherwise a new keyring of that name is created and + attached as the session keyring. + + To attach to a named keyring, the keyring must have search permission for + the process's ownership. + + The ID of the new session keyring is returned if successful. + + + (*) Update the specified key: + + long keyctl(KEYCTL_UPDATE, key_serial_t key, const void *payload, + size_t plen); + + This will try to update the specified key with the given payload, or it + will return error EOPNOTSUPP if that function is not supported by the key + type. The process must also have permission to write to the key to be + able to update it. + + The payload is of length plen, and may be absent or empty as for + add_key(). + + + (*) Revoke a key: + + long keyctl(KEYCTL_REVOKE, key_serial_t key); + + This makes a key unavailable for further operations. Further attempts to + use the key will be met with error EKEYREVOKED, and the key will no longer + be findable. + + + (*) Change the ownership of a key: + + long keyctl(KEYCTL_CHOWN, key_serial_t key, uid_t uid, gid_t gid); + + This function permits a key's owner and group ID to be changed. Either + one of uid or gid can be set to -1 to suppress that change. + + Only the superuser can change a key's owner to something other than the + key's current owner. Similarly, only the superuser can change a key's + group ID to something other than the calling process's group ID or one of + its group list members. + + + (*) Change the permissions mask on a key: + + long keyctl(KEYCTL_SETPERM, key_serial_t key, key_perm_t perm); + + This function permits the owner of a key or the superuser to change the + permissions mask on a key. + + Only bits the available bits are permitted; if any other bits are set, + error EINVAL will be returned. + + + (*) Describe a key: + + long keyctl(KEYCTL_DESCRIBE, key_serial_t key, char *buffer, + size_t buflen); + + This function returns a summary of the key's attributes (but not its + payload data) as a string in the buffer provided. + + Unless there's an error, it always returns the amount of data it could + produce, even if that's too big for the buffer, but it won't copy more + than requested to userspace. If the buffer pointer is NULL then no copy + will take place. + + A process must have view permission on the key for this function to be + successful. + + If successful, a string is placed in the buffer in the following format: + + ;;;; + + Where type and description are strings, uid and gid are decimal, and perm + is hexadecimal. A NUL character is included at the end of the string if + the buffer is sufficiently big. + + This can be parsed with + + sscanf(buffer, "%[^;];%d;%d;%o;%s", type, &uid, &gid, &mode, desc); + + + (*) Clear out a keyring: + + long keyctl(KEYCTL_CLEAR, key_serial_t keyring); + + This function clears the list of keys attached to a keyring. The calling + process must have write permission on the keyring, and it must be a + keyring (or else error ENOTDIR will result). + + + (*) Link a key into a keyring: + + long keyctl(KEYCTL_LINK, key_serial_t keyring, key_serial_t key); + + This function creates a link from the keyring to the key. The process + must have write permission on the keyring and must have link permission + on the key. + + Should the keyring not be a keyring, error ENOTDIR will result; and if + the keyring is full, error ENFILE will result. + + The link procedure checks the nesting of the keyrings, returning ELOOP if + it appears to deep or EDEADLK if the link would introduce a cycle. + + + (*) Unlink a key or keyring from another keyring: + + long keyctl(KEYCTL_UNLINK, key_serial_t keyring, key_serial_t key); + + This function looks through the keyring for the first link to the + specified key, and removes it if found. Subsequent links to that key are + ignored. The process must have write permission on the keyring. + + If the keyring is not a keyring, error ENOTDIR will result; and if the + key is not present, error ENOENT will be the result. + + + (*) Search a keyring tree for a key: + + key_serial_t keyctl(KEYCTL_SEARCH, key_serial_t keyring, + const char *type, const char *description, + key_serial_t dest_keyring); + + This searches the keyring tree headed by the specified keyring until a + key is found that matches the type and description criteria. Each keyring + is checked for keys before recursion into its children occurs. + + The process must have search permission on the top level keyring, or else + error EACCES will result. Only keyrings that the process has search + permission on will be recursed into, and only keys and keyrings for which + a process has search permission can be matched. If the specified keyring + is not a keyring, ENOTDIR will result. + + If the search succeeds, the function will attempt to link the found key + into the destination keyring if one is supplied (non-zero ID). All the + constraints applicable to KEYCTL_LINK apply in this case too. + + Error ENOKEY, EKEYREVOKED or EKEYEXPIRED will be returned if the search + fails. On success, the resulting key ID will be returned. + + + (*) Read the payload data from a key: + + key_serial_t keyctl(KEYCTL_READ, key_serial_t keyring, char *buffer, + size_t buflen); + + This function attempts to read the payload data from the specified key + into the buffer. The process must have read permission on the key to + succeed. + + The returned data will be processed for presentation by the key type. For + instance, a keyring will return an array of key_serial_t entries + representing the IDs of all the keys to which it is subscribed. The user + defined key type will return its data as is. If a key type does not + implement this function, error EOPNOTSUPP will result. + + As much of the data as can be fitted into the buffer will be copied to + userspace if the buffer pointer is not NULL. + + On a successful return, the function will always return the amount of + data available rather than the amount copied. + + + (*) Instantiate a partially constructed key. + + key_serial_t keyctl(KEYCTL_INSTANTIATE, key_serial_t key, + const void *payload, size_t plen, + key_serial_t keyring); + + If the kernel calls back to userspace to complete the instantiation of a + key, userspace should use this call to supply data for the key before the + invoked process returns, or else the key will be marked negative + automatically. + + The process must have write access on the key to be able to instantiate + it, and the key must be uninstantiated. + + If a keyring is specified (non-zero), the key will also be linked into + that keyring, however all the constraints applying in KEYCTL_LINK apply + in this case too. + + The payload and plen arguments describe the payload data as for add_key(). + + + (*) Negatively instantiate a partially constructed key. + + key_serial_t keyctl(KEYCTL_NEGATE, key_serial_t key, + unsigned timeout, key_serial_t keyring); + + If the kernel calls back to userspace to complete the instantiation of a + key, userspace should use this call mark the key as negative before the + invoked process returns if it is unable to fulfil the request. + + The process must have write access on the key to be able to instantiate + it, and the key must be uninstantiated. + + If a keyring is specified (non-zero), the key will also be linked into + that keyring, however all the constraints applying in KEYCTL_LINK apply + in this case too. + + +=============== +KERNEL SERVICES +=============== + +The kernel services for key managment are fairly simple to deal with. They can +be broken down into two areas: keys and key types. + +Dealing with keys is fairly straightforward. Firstly, the kernel service +registers its type, then it searches for a key of that type. It should retain +the key as long as it has need of it, and then it should release it. For a +filesystem or device file, a search would probably be performed during the +open call, and the key released upon close. How to deal with conflicting keys +due to two different users opening the same file is left to the filesystem +author to solve. + +When accessing a key's payload data, the key->lock should be at least read +locked, or else the data may be changed by update during the access. + +(*) To search for a key, call: + + struct key *request_key(const struct key_type *type, + const char *description, + const char *callout_string); + + This is used to request a key or keyring with a description that matches + the description specified according to the key type's match function. This + permits approximate matching to occur. If callout_string is not NULL, then + /sbin/request-key will be invoked in an attempt to obtain the key from + userspace. In that case, callout_string will be passed as an argument to + the program. + + Should the function fail error ENOKEY, EKEYEXPIRED or EKEYREVOKED will be + returned. + + +(*) When it is no longer required, the key should be released using: + + void key_put(struct key *key); + + This can be called from interrupt context. If CONFIG_KEYS is not set then + the argument will not be parsed. + + +(*) Extra references can be made to a key by calling the following function: + + struct key *key_get(struct key *key); + + These need to be disposed of by calling key_put() when they've been + finished with. The key pointer passed in will be returned. If the pointer + is NULL or CONFIG_KEYS is not set then the key will not be dereferenced and + no increment will take place. + + +(*) A key's serial number can be obtained by calling: + + key_serial_t key_serial(struct key *key); + + If key is NULL or if CONFIG_KEYS is not set then 0 will be returned (in the + latter case without parsing the argument). + + +(*) If a keyring was found in the search, this can be further searched by: + + struct key *keyring_search(struct key *keyring, + const struct key_type *type, + const char *description) + + This searches the keyring tree specified for a matching key. Error ENOKEY + is returned upon failure. If successful, the returned key will need to be + released. + + +(*) To check the validity of a key, this function can be called: + + int validate_key(struct key *key); + + This checks that the key in question hasn't expired or and hasn't been + revoked. Should the key be invalid, error EKEYEXPIRED or EKEYREVOKED will + be returned. If the key is NULL or if CONFIG_KEYS is not set then 0 will be + returned (in the latter case without parsing the argument). + + +(*) To register a key type, the following function should be called: + + int register_key_type(struct key_type *type); + + This will return error EEXIST if a type of the same name is already + present. + + +(*) To unregister a key type, call: + + void unregister_key_type(struct key_type *type); + + +=================== +DEFINING A KEY TYPE +=================== + +A kernel service may want to define its own key type. For instance, an AFS +filesystem might want to define a Kerberos 5 ticket key type. To do this, it +author fills in a struct key_type and registers it with the system. + +The structure has a number of fields, some of which are mandatory: + + (*) const char *name + + The name of the key type. This is used to translate a key type name + supplied by userspace into a pointer to the structure. + + + (*) size_t def_datalen + + This is optional - it supplies the default payload data length as + contributed to the quota. If the key type's payload is always or almost + always the same size, then this is a more efficient way to do things. + + The data length (and quota) on a particular key can always be changed + during instantiation or update by calling: + + int key_payload_reserve(struct key *key, size_t datalen); + + With the revised data length. Error EDQUOT will be returned if this is + not viable. + + + (*) int (*instantiate)(struct key *key, const void *data, size_t datalen); + + This method is called to attach a payload to a key during + construction. The payload attached need not bear any relation to the data + passed to this function. + + If the amount of data attached to the key differs from the size in + keytype->def_datalen, then key_payload_reserve() should be called. + + + (*) int (*duplicate)(struct key *key, const struct key *source); + + If this type of key can be duplicated, then this method should be + provided. It is called to copy the payload attached to the source into + the new key. The data length on the new key will have been updated and + the quota adjusted already. + + The source key will be locked against change on the source->sem, so it is + safe to sleep here. + + + (*) int (*update)(struct key *key, const void *data, size_t datalen); + + If this type of key can be updated, then this method should be + provided. It is called to update a key's payload from the blob of data + provided. + + key_payload_reserve() should be called if the data length might change + before any changes are actually made. Note that if this succeeds, the + type is committed to changing the key because it's already been altered, + so all memory allocation must be done first. + + The key will be locked against other changers on key->sem, so it is safe + to sleep here. + + key_payload_reserve() should be called with the key->lock write locked, + and the changes to the key's attached payload should be made before the + key is locked. + + + (*) int (*match)(const struct key *key, const void *desc); + + This method is called to match a key against a description. It should + return non-zero if the two match, zero if they don't. + + + (*) void (*destroy)(struct key *key); + + This method is optional. It is called to discard the payload data on a + key when it is being destroyed. + + + (*) void (*describe)(const struct key *key, struct seq_file *p); + + This method is optional. It is called during /proc/keys reading to + summarise a key in text form. + + + (*) long (*read)(const struct key *key, char __user *buffer, size_t buflen); + + This method is optional. It is called by KEYCTL_READ to translate the + key's payload into something a blob of data for userspace to deal + with. Ideally, the blob should be in the same format as that passed in to + the instantiate and update methods. + + If successful, the blob size that could be produced should be returned + rather than the size copied. + + +============================ +REQUEST-KEY CALLBACK SERVICE +============================ + +To create a new key, the kernel will attempt to execute the following command +line: + + /sbin/request-key create \ + + + is the key being constructed, and the three keyrings are the process +keyrings from the process that caused the search to be issued. These are +included for two reasons: + + (1) There may be an authentication token in one of the keyrings that is + required to obtain the key, eg: a Kerberos Ticket-Granting Ticket. + + (2) The new key should probably be cached in one of these rings. + +This program should set it UID and GID to those specified before attempting to +access any more keys. It may then look around for a user specific process to +hand the request off to (perhaps a path held in placed in another key by, for +example, the KDE desktop manager). + +The program (or whatever it calls) should finish construction of the key by +calling KEYCTL_INSTANTIATE, which also permits it to cache the key in one of +the keyrings (probably the session ring) before returning. Alternatively, the +key can be marked as negative with KEYCTL_NEGATE; this also permits the key to +be cached in one of the keyrings. + +If it returns with the key remaining in the unconstructed state, the key will +be marked as being negative, it will be added to the session keyring, and an +error will be returned to the key requestor. + +Supplementary information may be provided from whoever or whatever invoked +this service. This will be passed as the parameter. If no such +information was made available, then "-" will be passed as this parameter +instead. + + +Similarly, the kernel may attempt to update an expired or a soon to expire key +by executing: + + /sbin/request-key update \ + + +In this case, the program isn't required to actually attach the key to a ring; +the rings are provided for reference. diff --git a/Documentation/networking/README.ipw2100 b/Documentation/networking/README.ipw2100 new file mode 100644 index 000000000..93bba8b17 --- /dev/null +++ b/Documentation/networking/README.ipw2100 @@ -0,0 +1,179 @@ + +Intel PRO/Wireless 2100 802.11b Driver for Linux +README.ipw2100 + +October 13, 2004 + + +Release 0.56 Current Features +------------ ----- ----- ---- --- -- - + +- IBSS and BSS modes +- 802.11 fragmentation +- WEP (shared key and open) +- wireless extension support +- 802.1x EAP via xsupplicant +- Monitor/RFMon mode +- transmit power control +- long/short preamble support +- power states support (ACPI) + +TODO +------------ ----- ----- ---- --- -- - +- Fix bugs... The biggies: + C3 corruption + Fragmentation + + +Command Line Parameters +------------ ----- ----- ---- --- -- - + +If the driver is built as a module, the following optional parameters are used +by entering them on the command line with the modprobe command using this +syntax: + + modprobe ipw2100 [