From f1227cd3e0e73c48b93368800aa89f4341103a00 Mon Sep 17 00:00:00 2001 From: Planet-Lab Support Date: Thu, 6 Oct 2005 18:53:24 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'before_fedora-2_6_12-1_1398_FC4_vserver-2_6_12_2-vs2_0_rc7_upgrade'. --- CREDITS | 86 +- Documentation/DocBook/kernel-hacking.tmpl | 4 +- Documentation/DocBook/libata.tmpl | 160 +- Documentation/DocBook/videobook.tmpl | 206 +- Documentation/SubmittingDrivers | 7 +- Documentation/SubmittingPatches | 8 +- Documentation/cachetlb.txt | 17 +- Documentation/cciss.txt | 29 +- Documentation/devices.txt | 99 +- Documentation/filesystems/proc.txt | 40 +- Documentation/filesystems/relayfs.txt | 812 + Documentation/i2c/porting-clients | 6 +- Documentation/i386/zero-page.txt | 10 +- Documentation/ioctl-number.txt | 4 +- Documentation/kernel-parameters.txt | 142 +- Documentation/networking/pktgen.txt | 291 +- Documentation/pci.txt | 9 +- Documentation/power/pci.txt | 35 +- Documentation/power/swsusp.txt | 50 - Documentation/power/video.txt | 163 +- Documentation/scsi/scsi_mid_low_api.txt | 48 +- .../sound/alsa/ALSA-Configuration.txt | 411 +- .../alsa/DocBook/writing-an-alsa-driver.tmpl | 616 +- Documentation/sysctl/kernel.txt | 20 + Documentation/sysrq.txt | 35 +- Documentation/usb/error-codes.txt | 29 +- Documentation/usb/philips.txt | 236 + Documentation/vm/hugetlbpage.txt | 264 +- MAINTAINERS | 362 +- Makefile | 89 +- arch/alpha/Kconfig | 10 +- arch/alpha/defconfig | 1 + arch/alpha/kernel/core_marvel.c | 2 +- arch/alpha/kernel/entry.S | 21 +- arch/alpha/kernel/osf_sys.c | 44 +- arch/alpha/kernel/ptrace.c | 5 +- arch/alpha/kernel/setup.c | 18 +- arch/alpha/kernel/signal.c | 12 +- arch/alpha/kernel/smc37c669.c | 2 +- arch/alpha/kernel/smp.c | 54 + arch/alpha/kernel/sys_dp264.c | 2 +- arch/alpha/kernel/systbls.S | 9 +- arch/alpha/kernel/time.c | 2 +- arch/alpha/lib/io.c | 594 + arch/alpha/mm/init.c | 8 +- arch/alpha/mm/numa.c | 10 +- arch/arm/Kconfig | 402 +- arch/arm/Makefile | 6 +- arch/arm/boot/compressed/Makefile | 4 - arch/arm/boot/compressed/head-xscale.S | 26 +- arch/arm/boot/compressed/head.S | 105 +- arch/arm/common/Makefile | 2 - arch/arm/common/sa1111.c | 60 +- arch/arm/configs/iq80310_defconfig | 768 + arch/arm/kernel/Makefile | 6 +- arch/arm/kernel/asm-offsets.c | 23 +- arch/arm/kernel/calls.S | 1 - arch/arm/kernel/debug.S | 687 +- arch/arm/kernel/ecard.c | 218 +- arch/arm/kernel/entry-armv.S | 2307 +- arch/arm/kernel/head.S | 377 +- arch/arm/kernel/irq.c | 140 +- arch/arm/kernel/process.c | 43 +- arch/arm/kernel/ptrace.c | 59 +- arch/arm/kernel/semaphore.c | 4 +- arch/arm/kernel/setup.c | 75 +- arch/arm/kernel/signal.c | 13 +- arch/arm/kernel/sys_arm.c | 31 +- arch/arm/kernel/time.c | 8 +- arch/arm/kernel/traps.c | 166 +- arch/arm/mach-clps7500/core.c | 11 +- arch/arm/mach-ebsa110/io.c | 87 +- arch/arm/mach-integrator/core.c | 8 +- arch/arm/mach-integrator/impd1.c | 15 +- arch/arm/mach-integrator/integrator_ap.c | 4 +- arch/arm/mach-integrator/integrator_cp.c | 27 +- arch/arm/mach-iop3xx/iop310-irq.c | 111 + arch/arm/mach-iop3xx/iop310-pci.c | 434 + arch/arm/mach-iop3xx/iq80310-irq.c | 139 + arch/arm/mach-iop3xx/iq80310-pci.c | 164 + arch/arm/mach-iop3xx/iq80310-time.c | 124 + arch/arm/mach-iop3xx/mm.c | 69 + arch/arm/mach-iop3xx/xs80200-irq.c | 63 + arch/arm/mach-lh7a40x/arch-lpd7a40x.c | 2 + arch/arm/mach-omap/Makefile | 2 - arch/arm/mach-omap/board-generic.c | 1 + arch/arm/mach-omap/board-innovator.c | 103 +- arch/arm/mach-omap/board-osk.c | 72 +- arch/arm/mach-omap/board-perseus2.c | 84 +- arch/arm/mach-omap/bus.c | 246 + arch/arm/mach-omap/dma.c | 55 +- arch/arm/mach-omap/gpio.c | 126 +- arch/arm/mach-omap/leds-perseus2.c | 102 + arch/arm/mach-pxa/Kconfig | 37 - arch/arm/mach-pxa/Makefile | 2 - arch/arm/mach-pxa/generic.c | 27 +- arch/arm/mach-pxa/idp.c | 160 +- arch/arm/mach-pxa/lubbock.c | 35 +- arch/arm/mach-pxa/pm.c | 72 +- arch/arm/mach-rpc/riscpc.c | 2 +- arch/arm/mach-s3c2410/Kconfig | 54 +- arch/arm/mach-s3c2410/Makefile | 4 - arch/arm/mach-s3c2410/mach-bast.c | 161 +- arch/arm/mach-s3c2410/mach-h1940.c | 16 +- arch/arm/mach-s3c2410/mach-vr1000.c | 127 +- arch/arm/mach-s3c2410/s3c2410.c | 30 +- arch/arm/mach-s3c2410/s3c2410.h | 23 +- arch/arm/mach-sa1100/Kconfig | 9 +- arch/arm/mach-sa1100/assabet.c | 8 +- arch/arm/mach-sa1100/badge4.c | 5 +- arch/arm/mach-sa1100/h3600.c | 2 +- arch/arm/mach-sa1100/shannon.c | 6 +- arch/arm/mach-shark/core.c | 2 + arch/arm/mach-versatile/core.c | 11 +- arch/arm/mm/Kconfig | 52 +- arch/arm/mm/consistent.c | 67 +- arch/arm/mm/fault-armv.c | 4 +- arch/arm/mm/init.c | 42 +- arch/arm/mm/ioremap.c | 2 +- arch/arm/mm/mm-armv.c | 101 +- arch/arm/mm/proc-sa1100.S | 44 +- arch/arm/mm/proc-xscale.S | 90 +- arch/arm/tools/mach-types | 100 +- arch/arm26/Kconfig | 9 +- arch/arm26/kernel/calls.S | 5 - arch/arm26/kernel/init_task.c | 6 +- arch/arm26/kernel/irq.c | 2 +- arch/arm26/kernel/process.c | 106 +- arch/arm26/kernel/ptrace.c | 7 +- arch/arm26/kernel/setup.c | 7 +- arch/arm26/mm/init.c | 10 +- arch/cris/Kconfig | 4 - arch/cris/arch-v10/drivers/Kconfig | 2 +- arch/cris/arch-v10/drivers/eeprom.c | 2 +- arch/cris/arch-v10/drivers/gpio.c | 2 +- arch/cris/arch-v10/kernel/fasttimer.c | 30 +- arch/cris/arch-v10/kernel/ptrace.c | 5 +- arch/cris/arch-v10/kernel/signal.c | 8 +- arch/cris/kernel/irq.c | 5 + arch/cris/kernel/setup.c | 2 + arch/h8300/Kconfig | 4 - arch/h8300/Makefile | 9 +- arch/h8300/kernel/process.c | 2 +- arch/h8300/kernel/ptrace.c | 5 +- arch/h8300/kernel/signal.c | 8 +- arch/h8300/kernel/syscalls.S | 15 - arch/i386/Kconfig | 139 +- arch/i386/Kconfig.debug | 17 +- arch/i386/Makefile | 21 +- arch/i386/boot/Makefile | 1 + arch/i386/boot/compressed/misc.c | 1 + arch/i386/boot/edd.S | 8 +- arch/i386/boot/setup.S | 8 +- arch/i386/boot/video.S | 18 +- arch/i386/defconfig | 2 + arch/i386/kernel/Makefile | 11 +- arch/i386/kernel/acpi/boot.c | 54 +- arch/i386/kernel/acpi/sleep.c | 12 +- arch/i386/kernel/acpi/wakeup.S | 4 +- arch/i386/kernel/apic.c | 34 +- arch/i386/kernel/apm.c | 37 +- arch/i386/kernel/asm-offsets.c | 7 +- arch/i386/kernel/cpu/common.c | 127 +- arch/i386/kernel/cpu/cpu.h | 1 + arch/i386/kernel/cpu/cpufreq/Makefile | 1 - arch/i386/kernel/cpu/cpufreq/gx-suspmod.c | 2 +- arch/i386/kernel/cpu/cpufreq/longhaul.c | 58 +- arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | 2 +- arch/i386/kernel/cpu/cpufreq/powernow-k7.c | 34 +- arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 138 +- arch/i386/kernel/cpu/cpufreq/powernow-k8.h | 24 +- .../kernel/cpu/cpufreq/speedstep-centrino.c | 160 +- arch/i386/kernel/cpu/cpufreq/speedstep-smi.c | 3 - arch/i386/kernel/cpu/intel.c | 66 +- arch/i386/kernel/cpu/mtrr/generic.c | 68 +- arch/i386/kernel/cpu/proc.c | 25 +- arch/i386/kernel/cpuid.c | 4 +- arch/i386/kernel/dmi_scan.c | 19 +- arch/i386/kernel/efi.c | 12 +- arch/i386/kernel/entry.S | 453 +- arch/i386/kernel/entry_trampoline.c | 75 + arch/i386/kernel/head.S | 12 +- arch/i386/kernel/i386_ksyms.c | 31 +- arch/i386/kernel/i387.c | 23 +- arch/i386/kernel/i8259.c | 23 +- arch/i386/kernel/io_apic.c | 27 +- arch/i386/kernel/irq.c | 5 +- arch/i386/kernel/mca.c | 21 +- arch/i386/kernel/microcode.c | 2 +- arch/i386/kernel/mpparse.c | 15 +- arch/i386/kernel/msr.c | 4 +- arch/i386/kernel/nmi.c | 26 +- arch/i386/kernel/numaq.c | 20 +- arch/i386/kernel/process.c | 90 +- arch/i386/kernel/ptrace.c | 183 +- arch/i386/kernel/reboot.c | 4 +- arch/i386/kernel/scx200.c | 62 +- arch/i386/kernel/setup.c | 176 +- arch/i386/kernel/signal.c | 65 +- arch/i386/kernel/smp.c | 34 +- arch/i386/kernel/smpboot.c | 87 +- arch/i386/kernel/srat.c | 94 +- arch/i386/kernel/syscall_table.S | 2 +- arch/i386/kernel/sysenter.c | 68 +- arch/i386/kernel/time_hpet.c | 59 +- arch/i386/kernel/timers/timer_tsc.c | 22 +- arch/i386/kernel/traps.c | 223 +- arch/i386/kernel/vm86.c | 41 +- arch/i386/kernel/vsyscall.lds.S | 3 +- arch/i386/lib/Makefile | 2 +- arch/i386/lib/delay.c | 2 +- arch/i386/lib/usercopy.c | 4 - arch/i386/mach-default/topology.c | 33 +- arch/i386/mach-visws/mpparse.c | 2 +- arch/i386/mach-voyager/voyager_basic.c | 2 + arch/i386/mach-voyager/voyager_smp.c | 61 +- arch/i386/mach-voyager/voyager_thread.c | 1 + arch/i386/math-emu/errors.c | 6 +- arch/i386/math-emu/fpu_aux.c | 2 +- arch/i386/math-emu/fpu_entry.c | 14 +- arch/i386/math-emu/fpu_proto.h | 2 + arch/i386/math-emu/fpu_system.h | 12 +- arch/i386/math-emu/get_address.c | 18 +- arch/i386/math-emu/load_store.c | 8 +- arch/i386/math-emu/reg_ld_str.c | 48 +- arch/i386/mm/discontig.c | 258 +- arch/i386/mm/fault.c | 17 +- arch/i386/mm/highmem.c | 8 +- arch/i386/mm/hugetlbpage.c | 35 +- arch/i386/mm/init.c | 82 +- arch/i386/mm/ioremap.c | 149 +- arch/i386/mm/mmap.c | 6 +- arch/i386/mm/pageattr.c | 57 +- arch/i386/mm/pgtable.c | 27 +- arch/i386/oprofile/op_model_p4.c | 9 +- arch/i386/pci/acpi.c | 17 +- arch/i386/pci/fixup.c | 26 +- arch/i386/pci/irq.c | 95 +- arch/i386/pci/mmconfig.c | 6 +- arch/i386/power/cpu.c | 3 +- arch/i386/power/pmdisk.S | 56 + arch/i386/power/swsusp.S | 36 +- arch/ia64/Kconfig | 93 +- arch/ia64/Makefile | 4 +- arch/ia64/configs/sn2_defconfig | 54 +- arch/ia64/defconfig | 51 +- arch/ia64/dig/Makefile | 5 + arch/ia64/hp/common/sba_iommu.c | 136 +- arch/ia64/ia32/binfmt_elf32.c | 32 +- arch/ia64/ia32/ia32_entry.S | 10 +- arch/ia64/ia32/ia32_signal.c | 70 +- arch/ia64/ia32/ia32priv.h | 32 +- arch/ia64/ia32/sys_ia32.c | 115 +- arch/ia64/kernel/Makefile | 4 +- arch/ia64/kernel/acpi.c | 166 +- arch/ia64/kernel/asm-offsets.c | 28 +- arch/ia64/kernel/efi.c | 59 +- arch/ia64/kernel/entry.S | 238 +- arch/ia64/kernel/fsys.S | 11 +- arch/ia64/kernel/head.S | 299 +- arch/ia64/kernel/ia64_ksyms.c | 3 - arch/ia64/kernel/iosapic.c | 383 +- arch/ia64/kernel/irq.c | 1011 +- arch/ia64/kernel/irq_ia64.c | 50 +- arch/ia64/kernel/ivt.S | 30 +- arch/ia64/kernel/mca.c | 83 +- arch/ia64/kernel/module.c | 10 +- arch/ia64/kernel/perfmon.c | 297 +- arch/ia64/kernel/process.c | 86 +- arch/ia64/kernel/ptrace.c | 752 +- arch/ia64/kernel/sal.c | 2 +- arch/ia64/kernel/setup.c | 119 +- arch/ia64/kernel/signal.c | 118 +- arch/ia64/kernel/smp.c | 3 +- arch/ia64/kernel/smpboot.c | 319 +- arch/ia64/kernel/sys_ia64.c | 30 +- arch/ia64/kernel/time.c | 2 +- arch/ia64/kernel/traps.c | 105 +- arch/ia64/kernel/unwind.c | 34 +- arch/ia64/mm/contig.c | 10 +- arch/ia64/mm/discontig.c | 108 +- arch/ia64/mm/fault.c | 18 +- arch/ia64/mm/hugetlbpage.c | 96 +- arch/ia64/mm/init.c | 126 +- arch/ia64/mm/tlb.c | 3 +- arch/ia64/pci/pci.c | 350 +- arch/ia64/sn/fakeprom/Makefile | 29 + arch/ia64/sn/fakeprom/README | 93 + arch/ia64/sn/fakeprom/fpmem.c | 252 + arch/ia64/sn/fakeprom/fpmem.h | 76 + arch/ia64/sn/fakeprom/fprom.lds | 103 + arch/ia64/sn/fakeprom/fpromasm.S | 395 + arch/ia64/sn/fakeprom/fw-emu.c | 775 + arch/ia64/sn/fakeprom/klgraph_init.c | 205 + arch/ia64/sn/fakeprom/main.c | 109 + arch/ia64/sn/fakeprom/make_textsym | 174 + arch/ia64/sn/fakeprom/runsim | 387 + arch/ia64/sn/io/Makefile | 13 + arch/ia64/sn/io/cdl.c | 79 + arch/ia64/sn/io/drivers/Makefile | 10 + arch/ia64/sn/io/drivers/ioconfig_bus.c | 382 + arch/ia64/sn/io/hwgfs/Makefile | 10 + arch/ia64/sn/io/hwgfs/hcl.c | 702 + arch/ia64/sn/io/hwgfs/hcl_util.c | 175 + arch/ia64/sn/io/hwgfs/interface.c | 325 + arch/ia64/sn/io/hwgfs/labelcl.c | 656 + arch/ia64/sn/io/hwgfs/ramfs.c | 208 + arch/ia64/sn/io/io.c | 739 + arch/ia64/sn/io/machvec/Makefile | 10 + arch/ia64/sn/io/machvec/iomv.c | 76 + arch/ia64/sn/io/machvec/pci.c | 52 + arch/ia64/sn/io/machvec/pci_bus_cvlink.c | 906 + arch/ia64/sn/io/machvec/pci_dma.c | 677 + arch/ia64/sn/io/platform_init/Makefile | 10 + arch/ia64/sn/io/platform_init/sgi_io_init.c | 174 + arch/ia64/sn/io/sn2/Makefile | 14 + arch/ia64/sn/io/sn2/bte_error.c | 217 + arch/ia64/sn/io/sn2/geo_op.c | 311 + arch/ia64/sn/io/sn2/klconflib.c | 572 + arch/ia64/sn/io/sn2/klgraph.c | 577 + arch/ia64/sn/io/sn2/l1_command.c | 131 + arch/ia64/sn/io/sn2/ml_SN_init.c | 109 + arch/ia64/sn/io/sn2/ml_SN_intr.c | 320 + arch/ia64/sn/io/sn2/ml_iograph.c | 770 + arch/ia64/sn/io/sn2/module.c | 236 + arch/ia64/sn/io/sn2/pcibr/Makefile | 16 + arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c | 178 + arch/ia64/sn/io/sn2/pcibr/pcibr_config.c | 195 + arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c | 2662 ++ arch/ia64/sn/io/sn2/pcibr/pcibr_error.c | 1873 + arch/ia64/sn/io/sn2/pcibr/pcibr_hints.c | 175 + arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c | 700 + arch/ia64/sn/io/sn2/pcibr/pcibr_reg.c | 879 + arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c | 887 + arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c | 1842 + arch/ia64/sn/io/sn2/pciio.c | 1004 + arch/ia64/sn/io/sn2/pic.c | 835 + arch/ia64/sn/io/sn2/shub.c | 246 + arch/ia64/sn/io/sn2/shub_intr.c | 259 + arch/ia64/sn/io/sn2/shuberror.c | 822 + arch/ia64/sn/io/sn2/shubio.c | 490 + arch/ia64/sn/io/sn2/xbow.c | 1020 + arch/ia64/sn/io/sn2/xtalk.c | 927 + arch/ia64/sn/io/snia_if.c | 108 + arch/ia64/sn/io/xswitch.c | 168 + arch/ia64/sn/kernel/Makefile | 8 +- arch/ia64/sn/kernel/bte.c | 22 +- arch/ia64/sn/kernel/irq.c | 33 +- arch/ia64/sn/kernel/mca.c | 34 +- arch/ia64/sn/kernel/setup.c | 157 +- arch/ia64/sn/kernel/sn2/prominfo_proc.c | 14 +- arch/ia64/sn/kernel/sn2/ptc_deadlock.S | 22 +- arch/ia64/sn/kernel/sn2/sn2_smp.c | 91 +- arch/ia64/sn/kernel/sn2/timer.c | 6 +- arch/ia64/sn/kernel/sn2/timer_interrupt.c | 1 + arch/m68k/Kconfig | 8 +- arch/m68k/atari/stdma.c | 10 +- arch/m68k/atari/stram.c | 5 +- arch/m68k/defconfig | 71 +- arch/m68k/kernel/ptrace.c | 5 +- arch/m68k/kernel/signal.c | 157 +- arch/m68knommu/Kconfig | 22 +- arch/m68knommu/kernel/process.c | 21 +- arch/m68knommu/kernel/ptrace.c | 5 +- arch/mips/Kconfig | 97 +- arch/mips/Makefile | 30 +- arch/mips/au1000/common/power.c | 2 +- arch/mips/configs/atlas_defconfig | 593 +- arch/mips/configs/capcella_defconfig | 52 +- arch/mips/configs/cobalt_defconfig | 53 +- arch/mips/configs/db1000_defconfig | 40 +- arch/mips/configs/db1100_defconfig | 40 +- arch/mips/configs/db1500_defconfig | 45 +- arch/mips/configs/ddb5476_defconfig | 52 +- arch/mips/configs/ddb5477_defconfig | 51 +- arch/mips/configs/decstation_defconfig | 52 +- arch/mips/configs/e55_defconfig | 52 +- arch/mips/configs/ev64120_defconfig | 51 +- arch/mips/configs/ev96100_defconfig | 50 +- arch/mips/configs/ip22_defconfig | 62 +- arch/mips/configs/ip27_defconfig | 54 +- arch/mips/configs/ip32_defconfig | 58 +- arch/mips/configs/it8172_defconfig | 52 +- arch/mips/configs/ivr_defconfig | 51 +- arch/mips/configs/jaguar-atx_defconfig | 45 +- arch/mips/configs/jmr3927_defconfig | 52 +- arch/mips/configs/lasat200_defconfig | 52 +- arch/mips/configs/malta_defconfig | 608 +- arch/mips/configs/mpc30x_defconfig | 52 +- arch/mips/configs/ocelot_c_defconfig | 51 +- arch/mips/configs/ocelot_defconfig | 50 +- arch/mips/configs/osprey_defconfig | 50 +- arch/mips/configs/pb1100_defconfig | 43 +- arch/mips/configs/pb1500_defconfig | 43 +- arch/mips/configs/pb1550_defconfig | 41 +- arch/mips/configs/rm200_defconfig | 74 +- arch/mips/configs/sb1250-swarm_defconfig | 56 +- arch/mips/configs/sead_defconfig | 50 +- arch/mips/configs/tb0226_defconfig | 53 +- arch/mips/configs/tb0229_defconfig | 85 +- arch/mips/configs/workpad_defconfig | 52 +- arch/mips/configs/yosemite_defconfig | 49 +- arch/mips/ddb5xxx/ddb5074/irq.c | 1 + arch/mips/defconfig | 62 +- arch/mips/jmr3927/rbhma3100/irq.c | 55 +- arch/mips/kernel/Makefile | 8 +- arch/mips/kernel/irixelf.c | 60 +- arch/mips/kernel/irixsig.c | 100 +- arch/mips/kernel/irq.c | 2 +- arch/mips/kernel/linux32.c | 19 +- arch/mips/kernel/mips_ksyms.c | 7 +- arch/mips/kernel/process.c | 45 +- arch/mips/kernel/ptrace.c | 46 +- arch/mips/kernel/ptrace32.c | 7 +- arch/mips/kernel/scall32-o32.S | 213 +- arch/mips/kernel/scall64-64.S | 12 +- arch/mips/kernel/scall64-n32.S | 4 +- arch/mips/kernel/scall64-o32.S | 75 +- arch/mips/kernel/semaphore.c | 3 +- arch/mips/kernel/setup.c | 27 +- arch/mips/kernel/signal.c | 152 +- arch/mips/kernel/signal32.c | 142 +- arch/mips/kernel/signal_n32.c | 51 +- arch/mips/kernel/smp.c | 24 +- arch/mips/kernel/syscall.c | 35 +- arch/mips/kernel/sysirix.c | 80 +- arch/mips/kernel/time.c | 3 +- arch/mips/kernel/traps.c | 38 +- arch/mips/mm/Makefile | 39 +- arch/mips/mm/init.c | 7 +- arch/mips/mm/pgtable.c | 1 - arch/mips/mm/sc-rm7k.c | 6 +- arch/mips/mm/tlb-sb1.c | 3 +- arch/mips/momentum/ocelot_c/irq.c | 3 +- arch/mips/momentum/ocelot_g/gt-irq.c | 1 - arch/mips/pci/Makefile | 3 +- arch/mips/pci/fixup-au1000.c | 13 - arch/mips/pci/ops-msc.c | 8 +- arch/mips/pci/ops-titan.c | 46 +- arch/mips/pci/pci-vr41xx.c | 90 +- arch/mips/pci/pci-vr41xx.h | 69 +- arch/mips/pci/pci.c | 6 +- arch/mips/pmc-sierra/yosemite/irq-handler.S | 31 +- arch/mips/pmc-sierra/yosemite/irq.c | 26 +- arch/mips/pmc-sierra/yosemite/prom.c | 10 +- arch/mips/pmc-sierra/yosemite/setup.c | 108 +- arch/mips/pmc-sierra/yosemite/setup.h | 9 +- arch/mips/sgi-ip22/ip22-setup.c | 6 +- arch/mips/sgi-ip32/ip32-irq.c | 2 +- arch/mips/sibyte/sb1250/irq.c | 79 +- arch/mips/sibyte/sb1250/irq_handler.S | 2 +- arch/mips/tx4927/common/tx4927_irq.c | 4 +- .../toshiba_rbtx4927/toshiba_rbtx4927_irq.c | 4 +- arch/mips/vr4181/common/irq.c | 2 +- arch/mips/vr41xx/casio-e55/setup.c | 13 +- arch/mips/vr41xx/common/bcu.c | 26 +- arch/mips/vr41xx/common/cmu.c | 69 +- arch/mips/vr41xx/common/giu.c | 2 +- arch/mips/vr41xx/common/icu.c | 2 +- arch/mips/vr41xx/common/init.c | 44 +- arch/mips/vr41xx/common/pmu.c | 56 +- arch/mips/vr41xx/common/vrc4173.c | 2 +- arch/mips/vr41xx/ibm-workpad/setup.c | 13 +- arch/mips/vr41xx/tanbac-tb0226/setup.c | 17 +- arch/mips/vr41xx/tanbac-tb0229/Makefile | 2 + arch/mips/vr41xx/tanbac-tb0229/setup.c | 18 +- arch/mips/vr41xx/victor-mpc30x/setup.c | 17 +- arch/mips/vr41xx/zao-capcella/setup.c | 18 +- arch/parisc/Kconfig | 38 +- arch/parisc/Makefile | 13 +- arch/parisc/configs/712_defconfig | 594 +- arch/parisc/configs/a500_defconfig | 203 +- arch/parisc/configs/b180_defconfig | 77 +- arch/parisc/configs/c3000_defconfig | 187 +- arch/parisc/kernel/Makefile | 4 +- arch/parisc/kernel/cache.c | 39 +- arch/parisc/kernel/entry.S | 40 +- arch/parisc/kernel/firmware.c | 178 +- arch/parisc/kernel/hardware.c | 24 +- arch/parisc/kernel/head.S | 43 +- arch/parisc/kernel/init_task.c | 12 +- arch/parisc/kernel/irq.c | 800 +- arch/parisc/kernel/pacache.S | 1132 +- arch/parisc/kernel/pci-dma.c | 24 +- arch/parisc/kernel/perf.c | 57 +- arch/parisc/kernel/process.c | 10 +- arch/parisc/kernel/processor.c | 2 +- arch/parisc/kernel/ptrace.c | 52 +- arch/parisc/kernel/real2.S | 3 +- arch/parisc/kernel/setup.c | 22 +- arch/parisc/kernel/signal.c | 43 +- arch/parisc/kernel/smp.c | 13 +- arch/parisc/kernel/sys_parisc.c | 25 +- arch/parisc/kernel/sys_parisc32.c | 93 +- arch/parisc/kernel/syscall_table.S | 19 +- arch/parisc/kernel/traps.c | 41 +- arch/parisc/kernel/vmlinux.lds.S | 11 +- arch/parisc/mm/init.c | 14 +- arch/ppc/4xx_io/serial_sicc.c | 117 +- arch/ppc/8260_io/Kconfig | 11 +- arch/ppc/8260_io/fcc_enet.c | 969 +- arch/ppc/8xx_io/cs4218_tdm.c | 28 +- arch/ppc/8xx_io/enet.c | 2 +- arch/ppc/Kconfig | 186 +- arch/ppc/Makefile | 39 +- arch/ppc/boot/common/misc-common.c | 16 +- arch/ppc/boot/include/serial.h | 4 +- arch/ppc/boot/include/zlib.h | 430 + arch/ppc/boot/lib/zlib.c | 2169 ++ arch/ppc/boot/simple/Makefile | 34 +- arch/ppc/boot/simple/chrpmap.S | 19 + arch/ppc/boot/simple/embed_config.c | 2 +- arch/ppc/boot/simple/head.S | 7 +- arch/ppc/boot/simple/legacy.S | 19 + arch/ppc/boot/simple/m8260_tty.c | 2 +- arch/ppc/boot/simple/misc-chestnut.S | 41 + arch/ppc/boot/simple/misc.c | 7 +- arch/ppc/boot/simple/mv64x60_tty.c | 360 - arch/ppc/configs/common_defconfig | 180 +- arch/ppc/configs/ev64260_defconfig | 444 +- arch/ppc/configs/ibmchrp_defconfig | 1 + arch/ppc/configs/pmac_defconfig | 364 +- arch/ppc/kernel/Makefile | 7 +- arch/ppc/kernel/align.c | 16 +- arch/ppc/kernel/asm-offsets.c | 5 - arch/ppc/kernel/cputable.c | 23 - arch/ppc/kernel/entry.S | 260 +- arch/ppc/kernel/head.S | 381 +- arch/ppc/kernel/head_44x.S | 229 +- arch/ppc/kernel/head_4xx.S | 184 +- arch/ppc/kernel/misc.S | 37 +- arch/ppc/kernel/ppc_ksyms.c | 6 +- arch/ppc/kernel/process.c | 11 + arch/ppc/kernel/ptrace.c | 45 +- arch/ppc/kernel/setup.c | 61 +- arch/ppc/kernel/signal.c | 120 +- arch/ppc/kernel/smp.c | 26 +- arch/ppc/kernel/syscalls.c | 10 +- arch/ppc/kernel/time.c | 24 +- arch/ppc/kernel/traps.c | 118 +- arch/ppc/kernel/vmlinux.lds.S | 8 - arch/ppc/lib/string.S | 13 +- arch/ppc/mm/hashtable.S | 2 +- arch/ppc/mm/init.c | 38 +- arch/ppc/mm/mmu_decl.h | 2 +- arch/ppc/mm/pgtable.c | 36 +- arch/ppc/platforms/4xx/Kconfig | 16 +- arch/ppc/platforms/4xx/Makefile | 2 - arch/ppc/platforms/4xx/ebony.c | 131 +- arch/ppc/platforms/4xx/ebony.h | 14 +- arch/ppc/platforms/4xx/ibm405gp.c | 9 - arch/ppc/platforms/4xx/ibm405gpr.c | 9 - arch/ppc/platforms/4xx/ibm440gp.c | 13 - arch/ppc/platforms/4xx/ibm440gx.c | 17 - arch/ppc/platforms/4xx/ibmnp405h.h | 4 +- arch/ppc/platforms/4xx/ibmstbx25.c | 9 - arch/ppc/platforms/4xx/ocotea.c | 15 +- arch/ppc/platforms/4xx/ocotea.h | 18 +- arch/ppc/platforms/4xx/redwood6.c | 50 +- arch/ppc/platforms/4xx/sycamore.c | 52 +- arch/ppc/platforms/85xx/mpc85xx_devices.c | 552 + arch/ppc/platforms/85xx/mpc85xx_sys.c | 118 + arch/ppc/platforms/Makefile | 14 +- arch/ppc/platforms/est8260_setup.c | 65 + arch/ppc/platforms/ev64260.c | 651 - arch/ppc/platforms/ev64260.h | 101 +- arch/ppc/platforms/lopec_pci.c | 99 + arch/ppc/platforms/lopec_serial.h | 39 + arch/ppc/platforms/lopec_setup.c | 378 + arch/ppc/platforms/mcpn765_serial.h | 64 + arch/ppc/platforms/mvme5100_pci.c | 121 + arch/ppc/platforms/mvme5100_serial.h | 54 + arch/ppc/platforms/mvme5100_setup.c | 284 + arch/ppc/platforms/pmac_cpufreq.c | 297 +- arch/ppc/platforms/pmac_feature.c | 596 +- arch/ppc/platforms/pmac_pic.c | 2 +- arch/ppc/platforms/pmac_setup.c | 60 +- arch/ppc/platforms/pmac_sleep.S | 47 +- arch/ppc/platforms/powerpmc250_serial.h | 40 + arch/ppc/platforms/pplus.c | 8 +- arch/ppc/platforms/pq2ads_setup.c | 66 + arch/ppc/platforms/prep_setup.c | 10 +- arch/ppc/platforms/prpmc750_serial.h | 43 + arch/ppc/platforms/prpmc800_serial.h | 49 + arch/ppc/platforms/rpx8260.c | 65 + arch/ppc/platforms/sandpoint.c | 13 +- arch/ppc/platforms/sbc82xx.c | 2 +- arch/ppc/syslib/Makefile | 38 +- arch/ppc/syslib/gt64260_pic.c | 261 +- arch/ppc/syslib/m8260_setup.c | 28 +- arch/ppc/syslib/m8xx_setup.c | 2 +- arch/ppc/syslib/mpc10x_common.c | 35 - arch/ppc/syslib/mv64360_pic.c | 426 - arch/ppc/syslib/mv64x60.c | 2392 -- arch/ppc/syslib/open_pic.c | 55 +- arch/ppc/syslib/ppc4xx_pic.c | 669 +- arch/ppc/syslib/prom_init.c | 159 +- arch/ppc64/Kconfig | 73 +- arch/ppc64/Makefile | 44 +- arch/ppc64/boot/Makefile | 29 +- arch/ppc64/boot/addSystemMap.c | 248 + arch/ppc64/boot/main.c | 9 +- arch/ppc64/configs/iSeries_defconfig | 189 +- arch/ppc64/kernel/HvLpEvent.c | 8 - arch/ppc64/kernel/LparData.c | 193 +- arch/ppc64/kernel/Makefile | 11 +- arch/ppc64/kernel/align.c | 4 +- arch/ppc64/kernel/asm-offsets.c | 48 +- arch/ppc64/kernel/chrp_setup.c | 464 + arch/ppc64/kernel/cputable.c | 3 - arch/ppc64/kernel/dma.c | 102 +- arch/ppc64/kernel/eeh.c | 63 +- arch/ppc64/kernel/entry.S | 30 +- arch/ppc64/kernel/head.S | 309 +- arch/ppc64/kernel/iSeries_pci.c | 11 +- arch/ppc64/kernel/iSeries_proc.c | 3 +- arch/ppc64/kernel/iSeries_setup.c | 211 +- arch/ppc64/kernel/idle.c | 32 +- arch/ppc64/kernel/ioctl32.c | 1 + arch/ppc64/kernel/iommu.c | 29 +- arch/ppc64/kernel/irq.c | 51 +- arch/ppc64/kernel/lparcfg.c | 32 +- arch/ppc64/kernel/misc.S | 99 +- arch/ppc64/kernel/module.c | 3 +- arch/ppc64/kernel/pSeries_htab.c | 408 + arch/ppc64/kernel/pSeries_lpar.c | 13 +- arch/ppc64/kernel/pSeries_nvram.c | 7 +- arch/ppc64/kernel/pSeries_pci.c | 38 +- arch/ppc64/kernel/pacaData.c | 37 +- arch/ppc64/kernel/pci.c | 215 +- arch/ppc64/kernel/pci.h | 7 +- arch/ppc64/kernel/pci_dn.c | 57 +- arch/ppc64/kernel/pmac_iommu.c | 305 + arch/ppc64/kernel/pmac_smp.c | 35 +- arch/ppc64/kernel/ppc_ksyms.c | 76 +- arch/ppc64/kernel/process.c | 81 +- arch/ppc64/kernel/prom.c | 618 +- arch/ppc64/kernel/ptrace.c | 25 +- arch/ppc64/kernel/ptrace32.c | 5 +- arch/ppc64/kernel/ras.c | 122 +- arch/ppc64/kernel/rtas-proc.c | 13 +- arch/ppc64/kernel/rtas.c | 63 +- arch/ppc64/kernel/rtas_flash.c | 28 +- arch/ppc64/kernel/rtasd.c | 73 +- arch/ppc64/kernel/rtc.c | 41 +- arch/ppc64/kernel/scanlog.c | 6 +- arch/ppc64/kernel/setup.c | 214 +- arch/ppc64/kernel/signal.c | 40 +- arch/ppc64/kernel/signal32.c | 79 +- arch/ppc64/kernel/smp.c | 156 +- arch/ppc64/kernel/stab.c | 281 + arch/ppc64/kernel/sys_ppc32.c | 102 +- arch/ppc64/kernel/syscalls.c | 76 +- arch/ppc64/kernel/sysfs.c | 128 +- arch/ppc64/kernel/time.c | 243 +- arch/ppc64/kernel/traps.c | 234 +- arch/ppc64/kernel/udbg.c | 5 +- arch/ppc64/kernel/vio.c | 73 +- arch/ppc64/kernel/viopath.c | 55 +- arch/ppc64/kernel/xics.c | 81 +- arch/ppc64/lib/Makefile | 2 +- arch/ppc64/mm/fault.c | 32 +- arch/ppc64/mm/hash_utils.c | 76 +- arch/ppc64/mm/hugetlbpage.c | 144 +- arch/ppc64/mm/init.c | 256 +- arch/ppc64/mm/numa.c | 211 +- arch/ppc64/mm/tlb.c | 11 +- arch/ppc64/oprofile/common.c | 47 +- arch/ppc64/oprofile/op_model_power4.c | 9 +- arch/ppc64/xmon/ppc-opc.c | 119 +- arch/ppc64/xmon/xmon.c | 123 +- arch/s390/Kconfig | 18 +- arch/s390/Makefile | 2 +- arch/s390/appldata/appldata_base.c | 76 +- arch/s390/appldata/appldata_os.c | 4 +- arch/s390/boot/install.sh | 24 +- arch/s390/defconfig | 38 +- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/binfmt_elf32.c | 12 +- arch/s390/kernel/compat_linux.c | 233 +- arch/s390/kernel/compat_signal.c | 30 +- arch/s390/kernel/compat_wrapper.S | 51 +- arch/s390/kernel/debug.c | 8 +- arch/s390/kernel/entry.S | 135 +- arch/s390/kernel/entry64.S | 128 +- arch/s390/kernel/module.c | 3 +- arch/s390/kernel/process.c | 6 +- arch/s390/kernel/ptrace.c | 86 +- arch/s390/kernel/s390_ksyms.c | 2 + arch/s390/kernel/setup.c | 412 +- arch/s390/kernel/signal.c | 10 +- arch/s390/kernel/smp.c | 146 +- arch/s390/kernel/sys_s390.c | 29 +- arch/s390/kernel/syscalls.S | 10 +- arch/s390/kernel/time.c | 65 +- arch/s390/kernel/traps.c | 2 +- arch/s390/mm/cmm.c | 21 +- arch/s390/mm/fault.c | 13 +- arch/s390/mm/init.c | 40 +- arch/sh/Kconfig | 36 +- arch/sh/Makefile | 7 - arch/sh/drivers/dma/dma-api.c | 2 +- arch/sh/drivers/pci/pci-sh7751.c | 10 +- arch/sh/drivers/pci/pci.c | 2 +- arch/sh/kernel/cpu/init.c | 2 +- arch/sh/kernel/cpu/sh4/sq.c | 4 +- arch/sh/kernel/irq.c | 631 +- arch/sh/kernel/process.c | 10 +- arch/sh/kernel/ptrace.c | 16 +- arch/sh/kernel/setup.c | 1 + arch/sh/kernel/sh_ksyms.c | 12 +- arch/sh/kernel/smp.c | 7 +- arch/sh/kernel/time.c | 35 +- arch/sh/lib/delay.c | 2 +- arch/sh/mm/cache-sh4.c | 40 +- arch/sh/mm/hugetlbpage.c | 11 +- arch/sh/mm/init.c | 2 + arch/sh/mm/pg-sh4.c | 8 +- arch/sh64/mm/hugetlbpage.c | 12 +- arch/sparc/Kconfig | 6 - arch/sparc/kernel/ioport.c | 4 +- arch/sparc/kernel/irq.c | 2 +- arch/sparc/kernel/muldiv.c | 11 +- arch/sparc/kernel/process.c | 32 +- arch/sparc/kernel/ptrace.c | 58 +- arch/sparc/kernel/signal.c | 25 +- arch/sparc/kernel/smp.c | 5 +- arch/sparc/kernel/sparc_ksyms.c | 27 +- arch/sparc/kernel/sun4c_irq.c | 17 +- arch/sparc/kernel/sun4d_irq.c | 2 +- arch/sparc/kernel/sun4m_smp.c | 4 +- arch/sparc/kernel/sys_sparc.c | 7 +- arch/sparc/kernel/sys_sunos.c | 6 +- arch/sparc/kernel/time.c | 4 +- arch/sparc/kernel/traps.c | 8 +- arch/sparc/kernel/unaligned.c | 23 +- arch/sparc/mm/fault.c | 20 +- arch/sparc/mm/init.c | 5 + arch/sparc/mm/io-unit.c | 18 +- arch/sparc/mm/iommu.c | 46 +- arch/sparc/mm/sun4c.c | 10 +- arch/sparc/prom/memory.c | 28 +- arch/sparc64/Kconfig | 69 +- arch/sparc64/Makefile | 4 +- arch/sparc64/defconfig | 88 +- arch/sparc64/kernel/auxio.c | 4 +- arch/sparc64/kernel/binfmt_aout32.c | 26 +- arch/sparc64/kernel/entry.S | 224 +- arch/sparc64/kernel/head.S | 83 +- arch/sparc64/kernel/ioctl32.c | 1 + arch/sparc64/kernel/irq.c | 10 +- arch/sparc64/kernel/module.c | 101 +- arch/sparc64/kernel/pci.c | 23 +- arch/sparc64/kernel/pci_psycho.c | 12 +- arch/sparc64/kernel/pci_schizo.c | 118 +- arch/sparc64/kernel/process.c | 23 +- arch/sparc64/kernel/ptrace.c | 110 +- arch/sparc64/kernel/sbus.c | 41 +- arch/sparc64/kernel/setup.c | 39 +- arch/sparc64/kernel/signal.c | 2 +- arch/sparc64/kernel/signal32.c | 61 +- arch/sparc64/kernel/smp.c | 183 +- arch/sparc64/kernel/sparc64_ksyms.c | 48 +- arch/sparc64/kernel/sys_sparc.c | 27 +- arch/sparc64/kernel/sys_sparc32.c | 856 +- arch/sparc64/kernel/sys_sunos32.c | 14 +- arch/sparc64/kernel/systbls.S | 22 +- arch/sparc64/kernel/time.c | 48 +- arch/sparc64/kernel/traps.c | 63 +- arch/sparc64/kernel/unaligned.c | 6 +- arch/sparc64/lib/Makefile | 4 +- arch/sparc64/lib/U3copy_in_user.S | 140 + arch/sparc64/lib/VIScopy.S | 1138 + arch/sparc64/lib/debuglocks.c | 78 +- arch/sparc64/lib/find_bit.c | 5 +- arch/sparc64/lib/rwlock.S | 85 + arch/sparc64/lib/splock.S | 35 + arch/sparc64/mm/fault.c | 10 +- arch/sparc64/mm/hugetlbpage.c | 80 +- arch/sparc64/mm/init.c | 176 +- arch/sparc64/prom/memory.c | 10 +- arch/um/Kconfig | 46 +- arch/um/Kconfig_char | 37 +- arch/um/Makefile | 163 +- arch/um/Makefile-i386 | 12 +- arch/um/Makefile-skas | 15 +- arch/um/defconfig | 84 +- arch/um/drivers/Makefile | 25 +- arch/um/drivers/chan_kern.c | 57 +- arch/um/drivers/chan_user.c | 65 +- arch/um/drivers/cow.h | 5 +- arch/um/drivers/cow_sys.h | 4 +- arch/um/drivers/cow_user.c | 9 +- arch/um/drivers/fd.c | 8 +- arch/um/drivers/hostaudio_user.c | 149 + arch/um/drivers/line.c | 598 +- arch/um/drivers/mcast_user.c | 47 +- arch/um/drivers/mconsole_kern.c | 13 +- arch/um/drivers/mmapper_kern.c | 27 +- arch/um/drivers/net_kern.c | 50 +- arch/um/drivers/net_user.c | 8 +- arch/um/drivers/null.c | 9 +- arch/um/drivers/port_kern.c | 45 +- arch/um/drivers/port_user.c | 11 +- arch/um/drivers/pty.c | 15 +- arch/um/drivers/slip_user.c | 156 +- arch/um/drivers/slirp_user.c | 104 +- arch/um/drivers/ssl.c | 148 +- arch/um/drivers/stdio_console.c | 166 +- arch/um/drivers/tty.c | 7 +- arch/um/drivers/ubd_kern.c | 719 +- arch/um/drivers/ubd_user.c | 304 +- arch/um/drivers/xterm.c | 24 +- arch/um/drivers/xterm_kern.c | 20 +- arch/um/dyn.lds.S | 167 + arch/um/include/Makefile | 7 + arch/um/include/hostaudio.h | 48 + arch/um/include/init.h | 34 +- arch/um/include/kern_util.h | 7 +- arch/um/include/line.h | 52 +- arch/um/include/mconsole.h | 2 +- arch/um/include/os.h | 3 +- arch/um/include/skas_ptrace.h | 15 +- arch/um/include/sysdep-i386/checksum.h | 51 +- arch/um/include/sysdep-i386/sigcontext.h | 21 +- arch/um/include/sysdep-i386/syscalls.h | 54 +- arch/um/include/ubd_user.h | 59 +- arch/um/include/um_uaccess.h | 15 +- arch/um/include/user_util.h | 4 + arch/um/kernel/Makefile | 48 +- arch/um/kernel/exec_kern.c | 11 +- arch/um/kernel/helper.c | 58 +- arch/um/kernel/irq.c | 17 +- arch/um/kernel/irq_user.c | 17 +- arch/um/kernel/ksyms.c | 5 +- arch/um/kernel/mem.c | 100 +- arch/um/kernel/mem_user.c | 6 +- arch/um/kernel/mprot.h | 6 + arch/um/kernel/physmem.c | 12 +- arch/um/kernel/process.c | 104 +- arch/um/kernel/process_kern.c | 95 +- arch/um/kernel/ptrace.c | 181 +- arch/um/kernel/sigio_kern.c | 2 +- arch/um/kernel/sigio_user.c | 30 +- arch/um/kernel/signal_kern.c | 88 +- arch/um/kernel/skas/Makefile | 9 +- arch/um/kernel/skas/exec_user.c | 63 + arch/um/kernel/skas/include/mmu.h | 27 + arch/um/kernel/skas/include/mode.h | 37 + arch/um/kernel/skas/include/mode_kern.h | 53 + arch/um/kernel/skas/include/skas.h | 15 +- arch/um/kernel/skas/include/uaccess.h | 40 + arch/um/kernel/skas/mem_user.c | 11 +- arch/um/kernel/skas/process.c | 224 +- arch/um/kernel/skas/process_kern.c | 21 +- arch/um/kernel/skas/syscall_user.c | 15 +- arch/um/kernel/skas/trap_user.c | 33 +- arch/um/kernel/skas/uaccess.c | 56 +- arch/um/kernel/skas/util/Makefile | 3 - arch/um/kernel/smp.c | 14 +- arch/um/kernel/syscall_kern.c | 155 +- arch/um/kernel/sysrq.c | 60 +- arch/um/kernel/time.c | 3 - arch/um/kernel/time_kern.c | 45 +- arch/um/kernel/trap_kern.c | 70 +- arch/um/kernel/trap_user.c | 37 +- arch/um/kernel/tt/Makefile | 20 +- arch/um/kernel/tt/exec_user.c | 7 +- arch/um/kernel/tt/include/mmu.h | 23 + arch/um/kernel/tt/include/mode.h | 38 + arch/um/kernel/tt/include/mode_kern.h | 53 + arch/um/kernel/tt/include/uaccess.h | 71 + arch/um/kernel/tt/mem.c | 10 +- arch/um/kernel/tt/process_kern.c | 123 +- arch/um/kernel/tt/ptproxy/Makefile | 5 +- arch/um/kernel/tt/ptproxy/proxy.c | 10 +- arch/um/kernel/tt/ptproxy/sysdep.c | 22 +- arch/um/kernel/tt/ptproxy/wait.c | 8 +- arch/um/kernel/tt/syscall_kern.c | 95 +- arch/um/kernel/tt/syscall_user.c | 48 +- arch/um/kernel/tt/tlb.c | 176 +- arch/um/kernel/tt/tracer.c | 103 +- arch/um/kernel/tt/trap_user.c | 17 +- arch/um/kernel/tt/uaccess.c | 12 +- arch/um/kernel/um_arch.c | 61 +- arch/um/kernel/umid.c | 19 +- arch/um/kernel/user_syms.c | 113 + arch/um/kernel/user_util.c | 17 +- arch/um/kernel/vmlinux.lds.S | 6 - arch/um/main.c | 195 + arch/um/os-Linux/Makefile | 10 +- arch/um/os-Linux/file.c | 2 +- arch/um/os-Linux/process.c | 14 +- arch/um/os-Linux/user_syms.c | 5 - arch/um/sys-i386/Makefile | 23 +- arch/um/sys-i386/extable.c | 30 + arch/um/sys-i386/ldt.c | 19 +- arch/um/sys-i386/ptrace_user.c | 27 +- arch/um/sys-i386/util/Makefile | 7 +- arch/um/sys-i386/util/mk_sc.c | 75 +- arch/um/sys-x86_64/util/mk_thread_kern.c | 21 + arch/um/sys-x86_64/util/mk_thread_user.c | 30 + arch/um/uml.lds.S | 92 + arch/um/util/Makefile | 7 +- arch/v850/Kconfig | 3 - arch/v850/kernel/fpga85e2c.c | 1 + arch/v850/kernel/ptrace.c | 3 +- arch/v850/kernel/setup.c | 1 + arch/x86_64/Kconfig | 122 +- arch/x86_64/Makefile | 2 - arch/x86_64/boot/setup.S | 8 +- arch/x86_64/defconfig | 235 +- arch/x86_64/ia32/fpu32.c | 2 +- arch/x86_64/ia32/ia32_aout.c | 24 +- arch/x86_64/ia32/ia32_binfmt.c | 16 +- arch/x86_64/ia32/ia32_signal.c | 76 +- arch/x86_64/ia32/ia32entry.S | 30 +- arch/x86_64/ia32/ptrace32.c | 4 +- arch/x86_64/ia32/sys_ia32.c | 236 +- arch/x86_64/ia32/syscall32.c | 85 +- arch/x86_64/kernel/Makefile | 6 +- arch/x86_64/kernel/Makefile-HEAD | 38 + arch/x86_64/kernel/acpi/sleep.c | 17 +- arch/x86_64/kernel/apic.c | 16 +- arch/x86_64/kernel/domain.c | 93 + arch/x86_64/kernel/e820.c | 101 +- arch/x86_64/kernel/head.S | 123 +- arch/x86_64/kernel/head64.c | 20 +- arch/x86_64/kernel/i387.c | 15 +- arch/x86_64/kernel/i8259.c | 16 +- arch/x86_64/kernel/init_task.c | 2 + arch/x86_64/kernel/io_apic.c | 109 +- arch/x86_64/kernel/mce.c | 74 +- arch/x86_64/kernel/module.c | 95 +- arch/x86_64/kernel/mpparse.c | 38 +- arch/x86_64/kernel/msr.c | 4 +- arch/x86_64/kernel/pci-gart.c | 26 +- arch/x86_64/kernel/process.c | 67 +- arch/x86_64/kernel/ptrace.c | 214 +- arch/x86_64/kernel/reboot.c | 60 +- arch/x86_64/kernel/setup.c | 373 +- arch/x86_64/kernel/setup64.c | 46 +- arch/x86_64/kernel/signal.c | 91 +- arch/x86_64/kernel/smp.c | 42 +- arch/x86_64/kernel/smpboot.c | 784 +- arch/x86_64/kernel/sys_x86_64.c | 97 +- arch/x86_64/kernel/time.c | 110 +- arch/x86_64/kernel/traps.c | 272 +- arch/x86_64/kernel/vmlinux.lds.S | 3 +- arch/x86_64/kernel/x8664_ksyms.c | 19 +- arch/x86_64/lib/csum-wrappers.c | 6 +- arch/x86_64/lib/io.c | 16 +- arch/x86_64/mm/Makefile | 1 - arch/x86_64/mm/fault.c | 151 +- arch/x86_64/mm/init.c | 175 +- arch/x86_64/mm/ioremap.c | 129 +- arch/x86_64/mm/numa.c | 51 +- arch/x86_64/mm/pageattr.c | 102 +- arch/x86_64/pci/mmconfig.c | 8 +- arch/xen/Kconfig | 2 - arch/xen/Makefile | 1 - arch/xen/i386/Kconfig | 9 - arch/xen/i386/kernel/Makefile | 4 +- arch/xen/i386/kernel/entry.S | 2 +- arch/xen/kernel/vmlinux.lds.S | 275 - configs/kernel-2.6.12-i686-planetlab.config | 215 +- .../kernel-2.6.12-i686-smp-planetlab.config | 1486 - .../kernel-2.6.12-i686-uml-planetlab.config | 547 - .../kernel-2.6.12-i686-xenU-planetlab.config | 975 - crypto/Kconfig | 62 +- crypto/Makefile | 1 - crypto/cipher.c | 121 +- crypto/deflate.c | 2 - crypto/scatterwalk.h | 22 +- crypto/sha1.c | 84 +- crypto/tcrypt.c | 18 +- crypto/tcrypt.h | 233 +- drivers/Kconfig | 2 - drivers/Makefile | 8 +- drivers/acpi/Kconfig | 80 +- drivers/acpi/ac.c | 18 +- drivers/acpi/asus_acpi.c | 22 +- drivers/acpi/battery.c | 2 +- drivers/acpi/bus.c | 8 +- drivers/acpi/button.c | 4 +- drivers/acpi/debug.c | 14 +- drivers/acpi/dispatcher/dsopcode.c | 15 +- drivers/acpi/ec.c | 141 +- drivers/acpi/event.c | 2 +- drivers/acpi/events/evxface.c | 6 +- drivers/acpi/executer/exoparg2.c | 12 +- drivers/acpi/fan.c | 33 +- drivers/acpi/namespace/nsalloc.c | 2 +- drivers/acpi/namespace/nsdumpdv.c | 2 +- drivers/acpi/namespace/nsload.c | 2 +- drivers/acpi/namespace/nswalk.c | 2 +- drivers/acpi/osl.c | 21 +- drivers/acpi/pci_irq.c | 146 +- drivers/acpi/pci_link.c | 80 +- drivers/acpi/pci_root.c | 4 +- drivers/acpi/power.c | 10 +- drivers/acpi/scan.c | 331 +- drivers/acpi/sleep/main.c | 2 +- drivers/acpi/tables/tbconvrt.c | 10 +- drivers/acpi/thermal.c | 31 +- drivers/acpi/toshiba_acpi.c | 6 +- drivers/acpi/utilities/utglobal.c | 20 +- drivers/atm/ambassador.c | 117 +- drivers/atm/firestream.c | 14 +- drivers/atm/fore200e.c | 185 +- drivers/atm/fore200e.h | 2 +- drivers/atm/he.c | 96 +- drivers/atm/horizon.c | 34 +- drivers/atm/idt77105.c | 4 +- drivers/atm/idt77252.c | 18 +- drivers/atm/iphase.c | 59 +- drivers/atm/lanai.c | 45 +- drivers/atm/suni.c | 2 +- drivers/base/Kconfig | 2 +- drivers/base/bus.c | 10 +- drivers/base/class.c | 104 +- drivers/base/class_simple.c | 23 +- drivers/base/core.c | 8 +- drivers/base/cpu.c | 16 +- drivers/base/dmapool.c | 2 +- drivers/base/driver.c | 13 +- drivers/base/firmware_class.c | 3 - drivers/base/init.c | 3 +- drivers/base/map.c | 21 +- drivers/base/node.c | 22 +- drivers/base/platform.c | 61 +- drivers/base/power/power.h | 17 +- drivers/base/power/resume.c | 11 +- drivers/base/power/runtime.c | 4 +- drivers/base/power/shutdown.c | 23 +- drivers/base/power/suspend.c | 27 +- drivers/base/sys.c | 42 +- drivers/block/DAC960.c | 138 +- drivers/block/Kconfig | 135 +- drivers/block/Makefile | 1 - drivers/block/as-iosched.c | 32 +- drivers/block/cciss.c | 248 +- drivers/block/cciss_scsi.c | 54 +- drivers/block/cfq-iosched.c | 41 +- drivers/block/cpqarray.c | 17 +- drivers/block/deadline-iosched.c | 14 +- drivers/block/elevator.c | 70 +- drivers/block/floppy.c | 39 +- drivers/block/genhd.c | 105 +- drivers/block/ida_cmd.h | 2 +- drivers/block/ioctl.c | 19 - drivers/block/ll_rw_blk.c | 334 +- drivers/block/loop.c | 196 +- drivers/block/paride/paride.c | 2 +- drivers/block/paride/pcd.c | 38 +- drivers/block/paride/pd.c | 46 +- drivers/block/paride/pf.c | 43 +- drivers/block/paride/pg.c | 35 +- drivers/block/paride/pt.c | 36 +- drivers/block/ps2esdi.c | 10 +- drivers/block/rd.c | 6 +- drivers/block/scsi_ioctl.c | 7 +- drivers/block/swim3.c | 2 +- drivers/block/umem.c | 4 +- drivers/block/viodasd.c | 8 +- drivers/block/xd.c | 10 +- drivers/bluetooth/bcm203x.c | 8 +- drivers/bluetooth/bfusb.c | 18 +- drivers/bluetooth/bt3c_cs.c | 25 +- drivers/bluetooth/hci_bcsp.c | 74 +- drivers/bluetooth/hci_ldisc.c | 13 +- drivers/bluetooth/hci_usb.c | 54 +- drivers/bluetooth/hci_usb.h | 4 +- drivers/cdrom/aztcd.c | 9 +- drivers/cdrom/cdrom.c | 28 +- drivers/cdrom/cdu31a.c | 722 +- drivers/cdrom/isp16.c | 18 +- drivers/cdrom/mcdx.c | 46 +- drivers/cdrom/viocd.c | 17 +- drivers/char/Kconfig | 69 +- drivers/char/Makefile | 11 +- drivers/char/agp/Kconfig | 28 +- drivers/char/agp/agp.h | 37 +- drivers/char/agp/ali-agp.c | 22 +- drivers/char/agp/alpha-agp.c | 7 +- drivers/char/agp/amd-k7-agp.c | 64 +- drivers/char/agp/amd64-agp.c | 73 +- drivers/char/agp/ati-agp.c | 18 +- drivers/char/agp/backend.c | 151 +- drivers/char/agp/efficeon-agp.c | 14 +- drivers/char/agp/generic.c | 512 +- drivers/char/agp/hp-agp.c | 22 +- drivers/char/agp/i460-agp.c | 25 +- drivers/char/agp/intel-agp.c | 84 +- drivers/char/agp/nvidia-agp.c | 7 +- drivers/char/agp/sis-agp.c | 20 +- drivers/char/agp/sworks-agp.c | 26 +- drivers/char/agp/uninorth-agp.c | 399 +- drivers/char/agp/via-agp.c | 38 +- drivers/char/applicom.c | 11 +- drivers/char/busmouse.c | 456 + drivers/char/busmouse.h | 27 + drivers/char/consolemap.c | 121 +- drivers/char/cyclades.c | 23 +- drivers/char/drm/Kconfig | 5 +- drivers/char/drm/drmP.h | 364 +- drivers/char/drm/drm_memory_debug.h | 4 +- drivers/char/drm/drm_os_linux.h | 9 +- drivers/char/drm/ffb_drv.c | 99 +- drivers/char/drm/gamma_dma.c | 12 +- drivers/char/drm/i810_dma.c | 231 +- drivers/char/drm/i830_dma.c | 214 +- drivers/char/drm/i830_drv.c | 99 +- drivers/char/drm/i830_irq.c | 10 +- drivers/char/drm/mga_dma.c | 95 +- drivers/char/drm/mga_drv.c | 93 +- drivers/char/drm/mga_drv.h | 28 +- drivers/char/drm/mga_irq.c | 3 +- drivers/char/drm/r128_cce.c | 21 +- drivers/char/drm/r128_drv.c | 88 +- drivers/char/drm/r128_drv.h | 39 +- drivers/char/drm/r128_irq.c | 3 +- drivers/char/drm/r128_state.c | 146 +- drivers/char/drm/radeon_cp.c | 400 +- drivers/char/drm/radeon_drm.h | 40 +- drivers/char/drm/radeon_drv.c | 92 +- drivers/char/drm/radeon_drv.h | 174 +- drivers/char/drm/radeon_irq.c | 26 +- drivers/char/drm/radeon_mem.c | 21 +- drivers/char/drm/radeon_state.c | 645 +- drivers/char/drm/sis_ds.c | 101 +- drivers/char/drm/sis_mm.c | 40 +- drivers/char/drm/tdfx_drv.c | 72 +- drivers/char/dtlk.c | 6 +- drivers/char/esp.c | 270 +- drivers/char/ftape/lowlevel/fdc-io.c | 70 +- drivers/char/ftape/lowlevel/ftape-init.c | 12 +- drivers/char/genrtc.c | 4 +- drivers/char/hangcheck-timer.c | 104 +- drivers/char/hvsi.c | 42 +- drivers/char/hw_random.c | 37 +- drivers/char/ip2main.c | 5 +- drivers/char/ipmi/ipmi_bt_sm.c | 1 + drivers/char/ipmi/ipmi_devintf.c | 20 +- drivers/char/ipmi/ipmi_msghandler.c | 193 +- drivers/char/ipmi/ipmi_si_intf.c | 265 +- drivers/char/ipmi/ipmi_watchdog.c | 51 +- drivers/char/isicom.c | 12 +- drivers/char/istallion.c | 76 +- drivers/char/keyboard.c | 54 +- drivers/char/lcd.c | 86 +- drivers/char/lp.c | 30 +- drivers/char/mem.c | 271 +- drivers/char/misc.c | 14 +- drivers/char/moxa.c | 4 +- drivers/char/mwave/3780i.c | 2 +- drivers/char/mwave/mwavedd.c | 10 +- drivers/char/mxser.c | 62 +- drivers/char/n_hdlc.c | 18 +- drivers/char/n_tty.c | 14 +- drivers/char/pcmcia/synclink_cs.c | 64 +- drivers/char/pty.c | 8 +- drivers/char/random.c | 1760 +- drivers/char/raw.c | 2 +- drivers/char/riscom8.h | 2 +- drivers/char/rtc.c | 116 +- drivers/char/selection.c | 54 +- drivers/char/sonypi.c | 447 +- drivers/char/specialix_io8.h | 2 +- drivers/char/stallion.c | 33 +- drivers/char/synclink.c | 4 +- drivers/char/synclinkmp.c | 26 +- drivers/char/sysrq.c | 65 +- drivers/char/tipar.c | 53 +- drivers/char/tty_io.c | 84 +- drivers/char/tty_ioctl.c | 6 +- drivers/char/vc_screen.c | 65 +- drivers/char/vt.c | 1930 +- drivers/char/vt_ioctl.c | 173 +- drivers/char/watchdog/Kconfig | 9 +- drivers/char/watchdog/Makefile | 13 +- drivers/char/watchdog/i8xx_tco.c | 35 +- drivers/char/watchdog/machzwd.c | 31 +- drivers/char/watchdog/pcwd_pci.c | 6 +- drivers/char/watchdog/pcwd_usb.c | 14 +- drivers/char/watchdog/sa1100_wdt.c | 2 +- drivers/char/watchdog/sc1200wdt.c | 6 +- drivers/char/watchdog/scx200_wdt.c | 42 +- drivers/cpufreq/cpufreq.c | 128 +- drivers/cpufreq/cpufreq_userspace.c | 400 +- drivers/dump/Makefile | 16 + drivers/dump/dump_arm.c | 250 + drivers/dump/dump_blockdev.c | 468 + drivers/dump/dump_execute.c | 142 + drivers/dump/dump_filters.c | 143 + drivers/dump/dump_fmt.c | 406 + drivers/dump/dump_gzip.c | 118 + drivers/dump/dump_i386.c | 344 + drivers/dump/dump_memdev.c | 640 + drivers/dump/dump_methods.h | 349 + drivers/dump/dump_netdev.c | 867 + drivers/dump/dump_overlay.c | 884 + drivers/dump/dump_ppc64.c | 436 + drivers/dump/dump_rle.c | 175 + drivers/dump/dump_scheme.c | 383 + drivers/dump/dump_setup.c | 830 + drivers/firmware/Kconfig | 4 +- drivers/firmware/efivars.c | 46 +- drivers/i2c/algos/i2c-algo-bit.c | 4 +- drivers/i2c/busses/Kconfig | 110 +- drivers/i2c/busses/Makefile | 3 - drivers/i2c/busses/i2c-ali1535.c | 7 +- drivers/i2c/busses/i2c-ali1563.c | 61 +- drivers/i2c/busses/i2c-ali15x3.c | 7 +- drivers/i2c/busses/i2c-amd756.c | 15 +- drivers/i2c/busses/i2c-amd8111.c | 2 +- drivers/i2c/busses/i2c-elektor.c | 10 +- drivers/i2c/busses/i2c-i801.c | 65 +- drivers/i2c/busses/i2c-ibm_iic.c | 6 +- drivers/i2c/busses/i2c-keywest.c | 7 +- drivers/i2c/busses/i2c-nforce2.c | 17 +- drivers/i2c/busses/i2c-piix4.c | 54 +- drivers/i2c/busses/i2c-sis5595.c | 15 +- drivers/i2c/busses/i2c-sis96x.c | 12 +- drivers/i2c/busses/i2c-viapro.c | 122 +- drivers/i2c/chips/Kconfig | 83 +- drivers/i2c/chips/Makefile | 7 - drivers/i2c/chips/adm1021.c | 25 +- drivers/i2c/chips/asb100.c | 37 +- drivers/i2c/chips/eeprom.c | 74 +- drivers/i2c/chips/fscher.c | 54 +- drivers/i2c/chips/gl518sm.c | 37 +- drivers/i2c/chips/it87.c | 334 +- drivers/i2c/chips/lm75.c | 12 +- drivers/i2c/chips/lm78.c | 90 +- drivers/i2c/chips/lm80.c | 44 +- drivers/i2c/chips/lm83.c | 15 +- drivers/i2c/chips/lm85.c | 230 +- drivers/i2c/chips/lm90.c | 98 +- drivers/i2c/chips/via686a.c | 68 +- drivers/i2c/chips/w83627hf.c | 108 +- drivers/i2c/chips/w83781d.c | 177 +- drivers/i2c/chips/w83l785ts.c | 12 +- drivers/i2c/i2c-core.c | 110 +- drivers/i2c/i2c-dev.c | 20 +- drivers/i2c/i2c-sensor.c | 167 + drivers/ide/Kconfig | 10 +- drivers/ide/Makefile | 3 +- drivers/ide/arm/icside.c | 39 +- drivers/ide/ide-cd.c | 349 +- drivers/ide/ide-cd.h | 4 - drivers/ide/ide-disk.c | 670 +- drivers/ide/ide-dma.c | 51 +- drivers/ide/ide-floppy.c | 218 +- drivers/ide/ide-io.c | 600 +- drivers/ide/ide-iops.c | 137 +- drivers/ide/ide-lib.c | 135 +- drivers/ide/ide-pnp.c | 9 +- drivers/ide/ide-probe.c | 247 +- drivers/ide/ide-proc.c | 265 +- drivers/ide/ide-tape.c | 285 +- drivers/ide/ide-taskfile.c | 41 +- drivers/ide/ide.c | 1050 +- drivers/ide/legacy/hd.c | 4 +- drivers/ide/legacy/ide-cs.c | 50 +- drivers/ide/pci/Makefile | 2 + drivers/ide/pci/aec62xx.c | 115 +- drivers/ide/pci/alim15x3.c | 5 +- drivers/ide/pci/amd74xx.c | 12 +- drivers/ide/pci/atiixp.c | 23 +- drivers/ide/pci/cmd64x.c | 87 +- drivers/ide/pci/cs5520.c | 12 +- drivers/ide/pci/cs5530.c | 3 +- drivers/ide/pci/generic.c | 131 +- drivers/ide/pci/hpt366.c | 507 +- drivers/ide/pci/it8172.c | 23 +- drivers/ide/pci/ns87415.c | 5 +- drivers/ide/pci/opti621.c | 26 +- drivers/ide/pci/pdc202xx_new.c | 133 +- drivers/ide/pci/pdc202xx_old.c | 151 +- drivers/ide/pci/piix.c | 79 +- drivers/ide/pci/rz1000.c | 3 +- drivers/ide/pci/sc1200.c | 5 +- drivers/ide/pci/serverworks.c | 76 +- drivers/ide/pci/sgiioc4.c | 59 +- drivers/ide/pci/siimage.c | 9 +- drivers/ide/pci/sis5513.c | 9 +- drivers/ide/pci/sl82c105.c | 5 +- drivers/ide/pci/slc90e66.c | 3 +- drivers/ide/pci/triflex.c | 4 +- drivers/ide/pci/trm290.c | 9 +- drivers/ide/pci/via82cxxx.c | 21 +- drivers/ide/ppc/pmac.c | 209 +- drivers/ide/setup-pci.c | 218 +- drivers/ieee1394/amdtp.c | 58 +- drivers/ieee1394/csr.c | 2 +- drivers/ieee1394/csr1212.c | 132 +- drivers/ieee1394/dv1394.c | 113 +- drivers/ieee1394/eth1394.c | 23 +- drivers/ieee1394/ieee1394_core.c | 82 +- drivers/ieee1394/ieee1394_core.h | 3 +- drivers/ieee1394/nodemgr.c | 188 +- drivers/ieee1394/nodemgr.h | 2 - drivers/ieee1394/ohci1394.c | 8 +- drivers/ieee1394/raw1394.c | 4024 +- drivers/ieee1394/sbp2.c | 93 +- drivers/ieee1394/video1394.c | 428 +- drivers/input/Kconfig | 27 +- drivers/input/evdev.c | 16 +- drivers/input/gameport/Kconfig | 32 +- drivers/input/gameport/ns558.c | 160 +- drivers/input/gameport/vortex.c | 82 +- drivers/input/input.c | 30 +- drivers/input/joydev.c | 37 +- drivers/input/joystick/adi.c | 122 +- drivers/input/joystick/analog.c | 102 +- drivers/input/joystick/gf2k.c | 92 +- drivers/input/joystick/grip.c | 103 +- drivers/input/joystick/grip_mp.c | 97 +- drivers/input/joystick/sidewinder.c | 157 +- drivers/input/keyboard/Kconfig | 115 +- drivers/input/keyboard/atkbd.c | 859 +- drivers/input/misc/Kconfig | 24 +- drivers/input/misc/pcspkr.c | 4 +- drivers/input/misc/uinput.c | 227 +- drivers/input/mouse/Kconfig | 38 +- drivers/input/mouse/Makefile | 3 +- drivers/input/mousedev.c | 58 +- drivers/input/serio/Kconfig | 65 +- drivers/input/serio/ambakmi.c | 4 +- drivers/input/serio/i8042-io.h | 51 +- drivers/input/serio/i8042.c | 631 +- drivers/input/serio/maceps2.c | 26 +- drivers/input/serio/sa1111ps2.c | 6 +- drivers/input/serio/serport.c | 107 +- drivers/input/tsdev.c | 11 +- drivers/isdn/act2000/act2000_isa.c | 7 +- drivers/isdn/act2000/module.c | 8 +- drivers/isdn/capi/capi.c | 14 +- drivers/isdn/capi/capidrv.c | 2 +- drivers/isdn/capi/kcapi.c | 4 +- drivers/isdn/capi/kcapi_proc.c | 10 +- drivers/isdn/hardware/avm/avm_cs.c | 30 +- drivers/isdn/hardware/eicon/capifunc.c | 10 +- drivers/isdn/hardware/eicon/dadapter.c | 6 +- drivers/isdn/hardware/eicon/di.c | 204 +- drivers/isdn/hardware/eicon/divamnt.c | 13 +- drivers/isdn/hardware/eicon/divasi.c | 5 +- drivers/isdn/hardware/eicon/divasmain.c | 8 +- drivers/isdn/hardware/eicon/divasproc.c | 3 +- drivers/isdn/hardware/eicon/message.c | 129 +- drivers/isdn/hardware/eicon/mntfunc.c | 6 +- drivers/isdn/hardware/eicon/os_4bri.c | 10 +- drivers/isdn/hisax/Kconfig | 6 - drivers/isdn/hisax/config.c | 18 +- drivers/isdn/hisax/elsa_cs.c | 29 +- drivers/isdn/hisax/hfc_usb.c | 2290 +- drivers/isdn/hisax/isdnhdlc.c | 2 +- drivers/isdn/hisax/st5481_b.c | 2 +- drivers/isdn/hisax/st5481_d.c | 2 +- drivers/isdn/hisax/st5481_usb.c | 4 +- drivers/isdn/hisax/teles_cs.c | 29 +- drivers/isdn/i4l/isdn_common.c | 28 +- drivers/isdn/i4l/isdn_net.c | 1 - drivers/isdn/i4l/isdn_net.h | 7 +- drivers/isdn/i4l/isdn_ppp.c | 35 +- drivers/isdn/icn/icn.c | 15 +- drivers/isdn/isdnloop/isdnloop.c | 4 +- drivers/isdn/pcbit/drv.c | 14 +- drivers/isdn/pcbit/module.c | 5 +- drivers/macintosh/Kconfig | 8 - drivers/macintosh/adb.c | 14 +- drivers/macintosh/macserial.h | 10 +- drivers/macintosh/mediabay.c | 39 +- drivers/macintosh/therm_adt746x.c | 135 +- drivers/macintosh/therm_pm72.c | 488 +- drivers/macintosh/via-pmu.c | 190 +- drivers/md/Kconfig | 33 +- drivers/md/Makefile | 33 - drivers/md/dm-ioctl.c | 27 +- drivers/md/dm-table.c | 32 +- drivers/md/dm.c | 132 +- drivers/md/dm.h | 28 +- drivers/md/linear.c | 43 +- drivers/md/md.c | 114 +- drivers/md/multipath.c | 17 +- drivers/md/raid1.c | 59 +- drivers/md/raid10.c | 16 +- drivers/md/raid5.c | 153 +- drivers/md/raid6main.c | 140 +- drivers/media/common/ir-common.c | 165 +- drivers/media/common/saa7146_fops.c | 16 +- drivers/media/common/saa7146_vbi.c | 135 +- drivers/media/common/saa7146_video.c | 198 +- drivers/media/dvb/b2c2/skystar2.c | 380 +- drivers/media/dvb/bt8xx/dvb-bt8xx.c | 305 +- drivers/media/dvb/dibusb/dvb-dibusb-pid.c | 80 + drivers/media/dvb/dvb-core/dmxdev.c | 258 +- drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 1768 +- drivers/media/dvb/dvb-core/dvb_demux.c | 487 +- drivers/media/dvb/dvb-core/dvb_net.c | 299 +- drivers/media/dvb/dvb-core/dvb_ringbuffer.c | 18 +- drivers/media/dvb/dvb-core/dvb_ringbuffer.h | 18 +- drivers/media/dvb/dvb-core/dvbdev.c | 76 +- drivers/media/dvb/frontends/Kconfig | 39 +- drivers/media/dvb/frontends/stv0299.c | 302 +- drivers/media/dvb/frontends/tda1004x.c | 359 +- drivers/media/dvb/ttpci/av7110.c | 1872 +- drivers/media/dvb/ttpci/av7110_av.c | 37 +- drivers/media/dvb/ttpci/av7110_ca.c | 24 +- drivers/media/dvb/ttpci/av7110_hw.c | 151 +- drivers/media/dvb/ttpci/av7110_ir.c | 117 +- .../media/dvb/ttusb-budget/dvb-ttusb-budget.c | 247 +- drivers/media/dvb/ttusb-dec/ttusb_dec.c | 350 +- drivers/media/radio/miropcm20-radio.c | 14 +- drivers/media/radio/radio-cadet.c | 8 +- drivers/media/radio/radio-gemtek.c | 6 +- drivers/media/radio/radio-typhoon.c | 12 +- drivers/media/radio/radio-zoltrix.c | 34 +- drivers/media/video/Kconfig | 22 +- drivers/media/video/Makefile | 2 - drivers/media/video/bttv-cards.c | 397 +- drivers/media/video/bttv-driver.c | 130 +- drivers/media/video/bttv-i2c.c | 58 +- drivers/media/video/bttv-risc.c | 10 +- drivers/media/video/bttv-vbi.c | 5 +- drivers/media/video/bttv.h | 11 +- drivers/media/video/bttvp.h | 30 +- drivers/media/video/bw-qcam.c | 16 +- drivers/media/video/c-qcam.c | 15 +- drivers/media/video/cpia.c | 2 +- drivers/media/video/cpia_usb.c | 8 +- drivers/media/video/cx88/cx88-cards.c | 393 +- drivers/media/video/cx88/cx88-i2c.c | 10 +- drivers/media/video/cx88/cx88-tvaudio.c | 457 +- drivers/media/video/cx88/cx88-vbi.c | 11 +- drivers/media/video/cx88/cx88-video.c | 52 +- drivers/media/video/cx88/cx88.h | 42 +- drivers/media/video/dpc7146.c | 9 +- drivers/media/video/hexium_gemini.c | 2 +- drivers/media/video/hexium_orion.c | 6 +- drivers/media/video/ir-kbd-gpio.c | 53 +- drivers/media/video/ir-kbd-i2c.c | 14 +- drivers/media/video/meye.c | 8 +- drivers/media/video/msp3400.c | 55 +- drivers/media/video/mxb.c | 6 +- drivers/media/video/planb.c | 24 +- drivers/media/video/pms.c | 8 +- drivers/media/video/saa5246a.c | 63 +- drivers/media/video/saa5246a.h | 2 +- drivers/media/video/saa5249.c | 68 +- drivers/media/video/saa7111.c | 5 +- drivers/media/video/saa7134/saa6752hs.c | 403 +- drivers/media/video/saa7134/saa7134-cards.c | 407 +- drivers/media/video/saa7134/saa7134-core.c | 121 +- drivers/media/video/saa7134/saa7134-i2c.c | 40 +- drivers/media/video/saa7134/saa7134-input.c | 61 +- drivers/media/video/saa7134/saa7134-oss.c | 6 +- drivers/media/video/saa7134/saa7134-ts.c | 7 +- drivers/media/video/saa7134/saa7134-tvaudio.c | 63 +- drivers/media/video/saa7134/saa7134-video.c | 77 +- drivers/media/video/saa7134/saa7134.h | 21 +- drivers/media/video/stradis.c | 18 +- drivers/media/video/tda7432.c | 13 +- drivers/media/video/tda9840.c | 13 +- drivers/media/video/tda9875.c | 5 +- drivers/media/video/tda9887.c | 53 +- drivers/media/video/tea6415c.c | 4 + drivers/media/video/tea6420.c | 4 + drivers/media/video/tvaudio.c | 64 +- drivers/media/video/tvmixer.c | 1 - drivers/media/video/video-buf.c | 15 +- drivers/media/video/videocodec.c | 2 +- drivers/media/video/videodev.c | 11 +- drivers/media/video/w9966.c | 12 +- drivers/media/video/zoran_driver.c | 130 +- drivers/media/video/zr36120.c | 52 +- drivers/message/fusion/ascq_tbl.c | 2416 ++ drivers/message/fusion/ascq_tbl.sh | 109 + drivers/message/fusion/isense.c | 119 + drivers/message/fusion/isense.h | 95 + drivers/message/fusion/mptbase.c | 7 +- drivers/message/fusion/mptbase.h | 12 +- drivers/message/fusion/mptctl.c | 626 +- drivers/message/fusion/mptlan.c | 6 +- drivers/message/fusion/mptscsih.c | 283 +- drivers/message/fusion/mptscsih.h | 8 + drivers/message/fusion/scsi3.h | 707 + drivers/message/fusion/scsiops.c | 309 + drivers/message/i2o/i2o_block.c | 92 +- drivers/message/i2o/i2o_config.c | 96 +- drivers/message/i2o/i2o_core.c | 3978 ++ drivers/message/i2o/i2o_proc.c | 24 +- drivers/message/i2o/i2o_scsi.c | 119 +- drivers/message/i2o/pci.c | 49 +- drivers/misc/Kconfig | 2 +- drivers/misc/ibmasm/ibmasmfs.c | 1 - drivers/misc/ibmasm/module.c | 7 +- drivers/mmc/mmc.c | 2 +- drivers/mtd/Kconfig | 41 +- drivers/mtd/chips/Kconfig | 20 +- drivers/mtd/chips/amd_flash.c | 4 +- drivers/mtd/chips/cfi_cmdset_0001.c | 342 +- drivers/mtd/chips/cfi_cmdset_0002.c | 32 +- drivers/mtd/chips/cfi_cmdset_0020.c | 8 +- drivers/mtd/chips/cfi_probe.c | 108 +- drivers/mtd/chips/chipreg.c | 2 +- drivers/mtd/chips/jedec.c | 16 +- drivers/mtd/chips/jedec_probe.c | 102 +- drivers/mtd/chips/map_ram.c | 8 +- drivers/mtd/chips/map_rom.c | 4 +- drivers/mtd/cmdlinepart.c | 6 +- drivers/mtd/devices/Kconfig | 26 +- drivers/mtd/devices/Makefile | 3 +- drivers/mtd/devices/blkmtd.c | 9 +- drivers/mtd/devices/doc2000.c | 30 +- drivers/mtd/devices/doc2001.c | 26 +- drivers/mtd/devices/doc2001plus.c | 30 +- drivers/mtd/devices/docprobe.c | 20 +- drivers/mtd/devices/ms02-nv.c | 8 +- drivers/mtd/devices/pmc551.c | 21 +- drivers/mtd/ftl.c | 2 +- drivers/mtd/inftlmount.c | 7 +- drivers/mtd/maps/Kconfig | 24 +- drivers/mtd/maps/Makefile | 4 +- drivers/mtd/maps/amd76xrom.c | 2 +- drivers/mtd/maps/chestnut.c | 91 + drivers/mtd/maps/cstm_mips_ixx.c | 2 +- drivers/mtd/maps/dilnetpc.c | 4 +- drivers/mtd/maps/ebony.c | 6 +- drivers/mtd/maps/elan-104nc.c | 4 +- drivers/mtd/maps/l440gx.c | 2 +- drivers/mtd/maps/netsc520.c | 2 +- drivers/mtd/maps/nettel.c | 20 +- drivers/mtd/maps/ocelot.c | 4 +- drivers/mtd/maps/octagon-5066.c | 2 +- drivers/mtd/maps/pci.c | 8 +- drivers/mtd/maps/pcmciamtd.c | 31 +- drivers/mtd/maps/physmap.c | 2 +- drivers/mtd/maps/sa1100-flash.c | 2 +- drivers/mtd/maps/sbc_gxx.c | 4 +- drivers/mtd/maps/sc520cdp.c | 2 +- drivers/mtd/maps/scb2_flash.c | 2 +- drivers/mtd/maps/scx200_docflash.c | 40 +- drivers/mtd/maps/sun_uflash.c | 6 +- drivers/mtd/maps/uclinux.c | 6 +- drivers/mtd/maps/vmax301.c | 2 +- drivers/mtd/mtdblock.c | 4 +- drivers/mtd/mtdchar.c | 26 +- drivers/mtd/mtdpart.c | 2 +- drivers/mtd/nand/Kconfig | 18 +- drivers/mtd/nand/Makefile | 4 +- drivers/mtd/nftlmount.c | 7 +- drivers/mtd/redboot.c | 32 +- drivers/net/3c501.c | 4 +- drivers/net/3c503.c | 73 +- drivers/net/3c505.c | 18 +- drivers/net/3c507.c | 154 +- drivers/net/3c509.c | 33 +- drivers/net/3c523.c | 4 +- drivers/net/3c527.c | 2 +- drivers/net/3c59x.c | 335 +- drivers/net/8139too.c | 117 +- drivers/net/82596.c | 8 +- drivers/net/8390.h | 1 - drivers/net/Kconfig | 216 +- drivers/net/Makefile | 9 +- drivers/net/Space.c | 13 +- drivers/net/ac3200.c | 66 +- drivers/net/appletalk/ltpc.c | 14 +- drivers/net/arcnet/arcnet.c | 292 +- drivers/net/arcnet/com90xx.c | 8 +- drivers/net/at1700.c | 6 +- drivers/net/b44.c | 38 +- drivers/net/b44.h | 17 +- drivers/net/bonding/bond_main.c | 76 +- drivers/net/cs89x0.c | 20 +- drivers/net/defxx.c | 2 +- drivers/net/dgrs.c | 22 +- drivers/net/e100.c | 192 +- drivers/net/e1000/e1000.h | 38 +- drivers/net/e1000/e1000_ethtool.c | 134 +- drivers/net/e1000/e1000_hw.c | 2308 +- drivers/net/e1000/e1000_hw.h | 589 +- drivers/net/e1000/e1000_main.c | 1325 +- drivers/net/e1000/e1000_param.c | 9 +- drivers/net/e2100.c | 26 +- drivers/net/eepro.c | 144 +- drivers/net/eepro100.c | 352 +- drivers/net/eexpress.c | 6 +- drivers/net/epic100.c | 10 +- drivers/net/eql.c | 4 + drivers/net/es3210.c | 38 +- drivers/net/eth16i.c | 8 +- drivers/net/ewrk3.c | 92 +- drivers/net/fealnx.c | 287 +- drivers/net/forcedeth.c | 406 +- drivers/net/gianfar.c | 147 +- drivers/net/gianfar.h | 7 +- drivers/net/gianfar_ethtool.c | 6 +- drivers/net/gt96100eth.c | 8 +- drivers/net/hamachi.c | 111 +- drivers/net/hamradio/Kconfig | 6 +- drivers/net/hamradio/baycom_epp.c | 187 +- drivers/net/hamradio/dmascc.c | 1899 +- drivers/net/hamradio/hdlcdrv.c | 52 +- drivers/net/hp-plus.c | 4 +- drivers/net/hp.c | 4 +- drivers/net/hp100.c | 83 +- drivers/net/ibmlana.c | 103 +- drivers/net/ibmveth.c | 48 +- drivers/net/irda/Kconfig | 12 +- drivers/net/irda/act200l-sir.c | 5 +- drivers/net/irda/act200l.c | 9 +- drivers/net/irda/actisys.c | 5 +- drivers/net/irda/ali-ircc.c | 74 +- drivers/net/irda/donauboe.c | 26 +- drivers/net/irda/girbil.c | 9 +- drivers/net/irda/irda-usb.c | 88 +- drivers/net/irda/irport.c | 194 +- drivers/net/irda/irtty-sir.c | 68 +- drivers/net/irda/ma600-sir.c | 18 +- drivers/net/irda/ma600.c | 9 +- drivers/net/irda/mcp2120.c | 9 +- drivers/net/irda/nsc-ircc.c | 100 +- drivers/net/irda/sir_dev.c | 29 +- drivers/net/irda/sir_kthread.c | 9 +- drivers/net/irda/smsc-ircc2.c | 162 +- drivers/net/irda/stir4200.c | 20 +- drivers/net/irda/tekram-sir.c | 9 +- drivers/net/irda/tekram.c | 13 +- drivers/net/irda/via-ircc.c | 56 +- drivers/net/irda/vlsi_ir.c | 118 +- drivers/net/irda/w83977af_ir.c | 34 +- drivers/net/iseries_veth.c | 63 +- drivers/net/ixgb/ixgb.h | 30 +- drivers/net/ixgb/ixgb_ee.c | 202 +- drivers/net/ixgb/ixgb_ee.h | 3 +- drivers/net/ixgb/ixgb_ethtool.c | 525 +- drivers/net/ixgb/ixgb_hw.c | 233 +- drivers/net/ixgb/ixgb_hw.h | 52 +- drivers/net/ixgb/ixgb_ids.h | 23 +- drivers/net/ixgb/ixgb_main.c | 881 +- drivers/net/ixgb/ixgb_osdep.h | 15 +- drivers/net/ixgb/ixgb_param.c | 318 +- drivers/net/jazzsonic.c | 217 +- drivers/net/lance.c | 9 +- drivers/net/lne390.c | 66 +- drivers/net/loopback.c | 4 +- drivers/net/lp486e.c | 22 +- drivers/net/macsonic.c | 1 - drivers/net/natsemi.c | 24 +- drivers/net/ne.c | 6 +- drivers/net/ne2.c | 6 +- drivers/net/ne2k-pci.c | 10 +- drivers/net/ne3210.c | 35 +- drivers/net/netconsole.c | 121 +- drivers/net/ni52.c | 8 +- drivers/net/ns83820.c | 74 +- drivers/net/pci-skeleton.c | 6 +- drivers/net/pcmcia/3c574_cs.c | 74 +- drivers/net/pcmcia/3c589_cs.c | 52 +- drivers/net/pcmcia/axnet_cs.c | 49 +- drivers/net/pcmcia/com20020_cs.c | 32 +- drivers/net/pcmcia/fmvj18x_cs.c | 48 +- drivers/net/pcmcia/ibmtr_cs.c | 37 +- drivers/net/pcmcia/nmclan_cs.c | 45 +- drivers/net/pcmcia/pcnet_cs.c | 102 +- drivers/net/pcmcia/smc91c92_cs.c | 85 +- drivers/net/pcmcia/xirc2ps_cs.c | 104 +- drivers/net/pcnet32.c | 65 +- drivers/net/plip.c | 4 +- drivers/net/ppp_async.c | 4 +- drivers/net/ppp_generic.c | 18 +- drivers/net/ppp_synctty.c | 2 +- drivers/net/pppoe.c | 133 +- drivers/net/pppox.c | 2 +- drivers/net/r8169.c | 1154 +- drivers/net/rrunner.c | 2 +- drivers/net/s2io.c | 3571 +- drivers/net/s2io.h | 433 +- drivers/net/sb1000.c | 28 +- drivers/net/sb1250-mac.c | 109 +- drivers/net/sgiseeq.c | 70 +- drivers/net/shaper.c | 40 +- drivers/net/sis900.c | 310 +- drivers/net/sk98lin/h/skdrv1st.h | 1 - drivers/net/sk98lin/h/skdrv2nd.h | 5 +- drivers/net/sk98lin/skge.c | 286 +- drivers/net/sk_mca.c | 126 +- drivers/net/sk_mca.h | 19 +- drivers/net/skfp/h/targetos.h | 2 +- drivers/net/skfp/skfddi.c | 125 +- drivers/net/skfp/smt.c | 7 + drivers/net/smc-mca.c | 41 +- drivers/net/smc-ultra.c | 40 +- drivers/net/smc-ultra32.c | 30 +- drivers/net/smc9194.c | 6 +- drivers/net/starfire.c | 99 +- drivers/net/sundance.c | 274 +- drivers/net/sungem.c | 1018 +- drivers/net/sungem.h | 82 +- drivers/net/sunhme.c | 22 +- drivers/net/tg3.c | 2816 +- drivers/net/tg3.h | 103 +- drivers/net/tlan.c | 94 +- drivers/net/tokenring/Kconfig | 2 +- drivers/net/tokenring/ibmtr.c | 164 +- drivers/net/tokenring/lanstreamer.c | 31 +- drivers/net/tokenring/olympic.c | 98 +- drivers/net/tokenring/smctr.c | 6 +- drivers/net/tulip/de2104x.c | 14 +- drivers/net/tulip/de4x5.c | 1 - drivers/net/tulip/dmfe.c | 21 +- drivers/net/tulip/interrupt.c | 2 +- drivers/net/tulip/media.c | 5 +- drivers/net/tulip/tulip.h | 2 +- drivers/net/tulip/tulip_core.c | 24 +- drivers/net/tulip/winbond-840.c | 19 +- drivers/net/tulip/xircom_tulip_cb.c | 31 +- drivers/net/tun.c | 315 +- drivers/net/typhoon.c | 269 +- drivers/net/via-rhine.c | 303 +- drivers/net/wan/Kconfig | 21 +- drivers/net/wan/c101.c | 3 + drivers/net/wan/cosa.c | 13 +- drivers/net/wan/cosa.h | 10 +- drivers/net/wan/dscc4.c | 121 +- drivers/net/wan/farsync.c | 11 +- drivers/net/wan/hd6457x.c | 2 +- drivers/net/wan/hostess_sv11.c | 6 +- drivers/net/wan/n2.c | 5 + drivers/net/wan/pc300_tty.c | 27 +- drivers/net/wan/sbni.c | 16 +- drivers/net/wan/sdla.c | 2 +- drivers/net/wan/sealevel.c | 10 +- drivers/net/wan/syncppp.c | 4 +- drivers/net/wan/wanxl.c | 38 +- drivers/net/wan/x25_asy.c | 22 +- drivers/net/wan/z85230.h | 2 +- drivers/net/wd.c | 44 +- drivers/net/wireless/Kconfig | 6 +- drivers/net/wireless/airo.c | 317 +- drivers/net/wireless/airo_cs.c | 34 +- drivers/net/wireless/arlan-proc.c | 15 +- drivers/net/wireless/atmel.c | 103 +- drivers/net/wireless/atmel_cs.c | 94 +- drivers/net/wireless/hermes.h | 64 +- drivers/net/wireless/orinoco.c | 3029 +- drivers/net/wireless/orinoco.h | 31 +- drivers/net/wireless/orinoco_pci.c | 126 +- drivers/net/wireless/orinoco_plx.c | 235 +- drivers/net/wireless/orinoco_tmd.c | 152 +- drivers/net/wireless/prism54/isl_38xx.c | 12 +- drivers/net/wireless/prism54/isl_ioctl.c | 58 +- drivers/net/wireless/prism54/isl_ioctl.h | 5 + drivers/net/wireless/prism54/islpci_dev.c | 7 +- drivers/net/wireless/prism54/islpci_dev.h | 2 + drivers/net/wireless/prism54/islpci_hotplug.c | 8 +- drivers/net/wireless/prism54/islpci_mgt.c | 2 - drivers/net/wireless/prism54/oid_mgt.c | 6 +- drivers/net/wireless/prism54/oid_mgt.h | 4 +- drivers/net/wireless/ray_cs.c | 45 +- drivers/net/wireless/strip.c | 22 +- drivers/net/yellowfin.c | 14 +- drivers/oprofile/buffer_sync.c | 71 +- drivers/oprofile/cpu_buffer.c | 158 +- drivers/oprofile/event_buffer.c | 7 +- drivers/oprofile/oprofile_files.c | 42 +- drivers/oprofile/oprofilefs.c | 3 +- drivers/parisc/ccio-dma.c | 74 +- drivers/parisc/superio.c | 109 +- drivers/parisc/wax.c | 68 +- drivers/parport/daisy.c | 2 +- drivers/parport/ieee1284.c | 2 +- drivers/parport/parport_pc.c | 141 +- drivers/parport/parport_serial.c | 92 +- drivers/parport/probe.c | 2 +- drivers/parport/procfs.c | 12 +- drivers/parport/share.c | 6 +- drivers/pci/Kconfig | 14 +- drivers/pci/Makefile | 6 - drivers/pci/hotplug.c | 126 +- drivers/pci/hotplug/cpci_hotplug.h | 2 +- drivers/pci/hotplug/cpci_hotplug_core.c | 429 +- drivers/pci/hotplug/cpci_hotplug_pci.c | 483 +- drivers/pci/hotplug/cpcihp_generic.c | 2 +- drivers/pci/hotplug/cpqphp_core.c | 4 +- drivers/pci/hotplug/cpqphp_pci.c | 30 +- drivers/pci/hotplug/ibmphp.h | 4 +- drivers/pci/hotplug/ibmphp_core.c | 804 +- drivers/pci/hotplug/ibmphp_hpc.c | 6 +- drivers/pci/hotplug/pci_hotplug_core.c | 5 - drivers/pci/hotplug/pciehp.h | 4 +- drivers/pci/hotplug/pciehp_core.c | 105 +- drivers/pci/hotplug/pciehp_ctrl.c | 3 +- drivers/pci/hotplug/pciehp_hpc.c | 179 +- drivers/pci/hotplug/pciehprm_acpi.c | 3 +- drivers/pci/hotplug/pcihp_skeleton.c | 2 +- drivers/pci/hotplug/rpadlpar_core.c | 10 +- drivers/pci/hotplug/rpaphp.h | 14 +- drivers/pci/hotplug/rpaphp_core.c | 49 +- drivers/pci/hotplug/rpaphp_pci.c | 129 +- drivers/pci/hotplug/rpaphp_slot.c | 15 +- drivers/pci/hotplug/rpaphp_vio.c | 4 +- drivers/pci/hotplug/shpchp.h | 2 +- drivers/pci/hotplug/shpchp_core.c | 3 +- drivers/pci/hotplug/shpchp_ctrl.c | 30 +- drivers/pci/hotplug/shpchprm_acpi.c | 7 +- drivers/pci/hotplug/shpchprm_legacy.c | 18 +- drivers/pci/msi.c | 74 +- drivers/pci/pci-driver.c | 43 +- drivers/pci/pci-sysfs.c | 262 +- drivers/pci/pci.c | 101 +- drivers/pci/pci.h | 35 +- drivers/pci/pci.ids | 1745 +- drivers/pci/probe.c | 165 +- drivers/pci/proc.c | 30 +- drivers/pci/quirks.c | 156 +- drivers/pci/search.c | 2 +- drivers/pcmcia/Kconfig | 44 +- drivers/pcmcia/Makefile | 18 +- drivers/pcmcia/cardbus.c | 45 +- drivers/pcmcia/cistpl.c | 50 +- drivers/pcmcia/cs.c | 607 +- drivers/pcmcia/cs_internal.h | 49 +- drivers/pcmcia/ds.c | 1377 +- drivers/pcmcia/i82092.c | 19 +- drivers/pcmcia/i82365.c | 57 +- drivers/pcmcia/rsrc_mgr.c | 1044 +- drivers/pcmcia/sa1100_generic.c | 2 +- drivers/pcmcia/sa1111_generic.c | 2 +- drivers/pcmcia/tcic.c | 39 +- drivers/pcmcia/yenta_socket.c | 17 +- drivers/pnp/isapnp/core.c | 55 +- drivers/pnp/pnpbios/Kconfig | 2 +- drivers/pnp/pnpbios/core.c | 21 +- drivers/s390/Kconfig | 2 +- drivers/s390/block/dasd.c | 106 +- drivers/s390/block/dasd_3990_erp.c | 42 +- drivers/s390/block/dasd_devmap.c | 86 +- drivers/s390/block/dasd_diag.c | 69 +- drivers/s390/block/dasd_eckd.c | 291 +- drivers/s390/block/dasd_erp.c | 10 +- drivers/s390/block/dasd_fba.c | 120 +- drivers/s390/block/dasd_genhd.c | 14 +- drivers/s390/block/dasd_int.h | 22 +- drivers/s390/char/Makefile | 2 +- drivers/s390/char/sclp.c | 1262 +- drivers/s390/char/tty3270.c | 6 +- drivers/s390/cio/chsc.c | 117 +- drivers/s390/cio/chsc.h | 16 +- drivers/s390/cio/cio.c | 44 +- drivers/s390/cio/cmf.c | 4 +- drivers/s390/cio/css.c | 16 +- drivers/s390/cio/device.c | 10 +- drivers/s390/cio/device_fsm.c | 66 +- drivers/s390/cio/device_id.c | 3 +- drivers/s390/cio/device_ops.c | 84 +- drivers/s390/cio/device_pgid.c | 10 +- drivers/s390/cio/qdio.c | 20 +- drivers/s390/cio/qdio.h | 6 +- drivers/s390/net/Makefile | 3 +- drivers/s390/net/ctcmain.c | 641 +- drivers/s390/net/ctctty.c | 12 +- drivers/s390/net/cu3088.c | 4 +- drivers/s390/net/iucv.c | 17 +- drivers/s390/net/lcs.c | 33 +- drivers/s390/net/qeth.h | 133 +- drivers/s390/net/qeth_main.c | 1297 +- drivers/s390/net/qeth_mpc.h | 5 +- drivers/s390/net/qeth_proc.c | 19 +- drivers/s390/net/qeth_sys.c | 201 +- drivers/s390/scsi/zfcp_aux.c | 42 +- drivers/s390/scsi/zfcp_def.h | 6 +- drivers/s390/scsi/zfcp_erp.c | 26 +- drivers/s390/scsi/zfcp_fsf.c | 73 +- drivers/s390/scsi/zfcp_sysfs_adapter.c | 6 - drivers/sbus/char/aurora.h | 2 +- drivers/sbus/char/bpp.c | 2 +- drivers/sbus/char/flash.c | 4 +- drivers/sbus/char/openprom.c | 10 +- drivers/sbus/char/riowatchdog.c | 2 +- drivers/sbus/char/rtc.c | 110 +- drivers/sbus/char/vfc_dev.c | 8 +- drivers/sbus/sbus.c | 16 - drivers/scsi/3w-xxxx.c | 366 +- drivers/scsi/3w-xxxx.h | 4 +- drivers/scsi/53c700.c | 139 +- drivers/scsi/53c700.h | 217 +- drivers/scsi/53c7xx.c | 23 +- drivers/scsi/BusLogic.c | 7 + drivers/scsi/Kconfig | 62 +- drivers/scsi/Makefile | 6 +- drivers/scsi/NCR53C9x.c | 20 +- drivers/scsi/NCR_D700.c | 52 +- drivers/scsi/NCR_Q720.c | 6 +- drivers/scsi/aacraid/README | 2 +- drivers/scsi/aacraid/aachba.c | 274 +- drivers/scsi/aacraid/aacraid.h | 217 +- drivers/scsi/aacraid/commctrl.c | 12 +- drivers/scsi/aacraid/comminit.c | 2 +- drivers/scsi/aacraid/commsup.c | 25 +- drivers/scsi/aacraid/linit.c | 117 +- drivers/scsi/aacraid/rkt.c | 21 +- drivers/scsi/aacraid/rx.c | 18 +- drivers/scsi/aacraid/sa.c | 28 +- drivers/scsi/advansys.c | 19 +- drivers/scsi/aha152x.c | 69 +- drivers/scsi/aha1542.c | 6 +- drivers/scsi/aic7xxx/aic7770_osm.c | 64 +- drivers/scsi/aic7xxx/aic79xx_osm.c | 60 +- drivers/scsi/aic7xxx/aic7xxx_osm.c | 3300 +- drivers/scsi/aic7xxx/aic7xxx_osm.h | 217 +- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 102 +- drivers/scsi/aic7xxx/aiclib.c | 1 + drivers/scsi/aic7xxx_old.c | 14 +- drivers/scsi/aic7xxx_old/aic7xxx_proc.c | 2 +- drivers/scsi/arm/acornscsi.c | 9 +- drivers/scsi/arm/arxescsi.c | 18 +- drivers/scsi/arm/cumana_2.c | 97 +- drivers/scsi/arm/eesox.c | 84 +- drivers/scsi/arm/fas216.c | 31 +- drivers/scsi/arm/powertec.c | 74 +- drivers/scsi/ata_piix.c | 37 +- drivers/scsi/atp870u.c | 345 +- drivers/scsi/constants.c | 946 +- drivers/scsi/cpqfcTSinit.c | 8 +- drivers/scsi/cpqfcTSworker.c | 16 +- drivers/scsi/dc390.h | 32 + drivers/scsi/dc395x.c | 91 +- drivers/scsi/dec_esp.c | 400 +- drivers/scsi/dpt_i2o.c | 6 +- drivers/scsi/dpti.h | 1 + drivers/scsi/eata.c | 3169 +- drivers/scsi/esp.c | 13 +- drivers/scsi/fd_mcs.c | 58 +- drivers/scsi/fdomain.c | 2 +- drivers/scsi/g_NCR5380.c | 14 +- drivers/scsi/gdth.c | 998 +- drivers/scsi/gdth.h | 41 + drivers/scsi/gdth_proc.c | 287 +- drivers/scsi/gdth_proc.h | 6 +- drivers/scsi/hosts.c | 90 +- drivers/scsi/ibmmca.c | 11 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 145 +- drivers/scsi/ide-scsi.c | 229 +- drivers/scsi/imm.c | 2 +- drivers/scsi/in2000.c | 2 +- drivers/scsi/ips.c | 261 +- drivers/scsi/ips.h | 12 +- drivers/scsi/jazz_esp.c | 95 +- drivers/scsi/lasi700.c | 40 +- drivers/scsi/libata-core.c | 830 +- drivers/scsi/libata-scsi.c | 65 +- drivers/scsi/libata.h | 3 +- drivers/scsi/lpfc/Makefile | 32 - drivers/scsi/lpfc/lpfc.h | 384 - drivers/scsi/lpfc/lpfc_compat.h | 97 - drivers/scsi/lpfc/lpfc_crtn.h | 216 - drivers/scsi/lpfc/lpfc_ct.c | 1237 - drivers/scsi/lpfc/lpfc_disc.h | 206 - drivers/scsi/lpfc/lpfc_els.c | 3258 -- drivers/scsi/lpfc/lpfc_hbadisc.c | 2537 -- drivers/scsi/lpfc/lpfc_hw.h | 2687 -- drivers/scsi/lpfc/lpfc_init.c | 1739 - drivers/scsi/lpfc/lpfc_logmsg.h | 41 - drivers/scsi/lpfc/lpfc_mbox.c | 646 - drivers/scsi/lpfc/lpfc_mem.c | 179 - drivers/scsi/lpfc/lpfc_nportdisc.c | 1842 - drivers/scsi/lpfc/lpfc_scsi.h | 157 - drivers/scsi/lpfc/lpfc_sli.c | 2885 -- drivers/scsi/lpfc/lpfc_sli.h | 216 - drivers/scsi/lpfc/lpfc_version.h | 32 - drivers/scsi/mac_scsi.c | 2 +- drivers/scsi/mca_53c9x.c | 4 +- drivers/scsi/megaraid/Kconfig.megaraid | 1 - drivers/scsi/ncr53c8xx.c | 522 +- drivers/scsi/nsp32.c | 16 +- drivers/scsi/nsp32.h | 1 - drivers/scsi/oktagon_esp.c | 2 + drivers/scsi/osst.c | 1025 +- drivers/scsi/pas16.c | 6 +- drivers/scsi/pci2000.c | 20 +- drivers/scsi/pcmcia/aha152x_stub.c | 33 +- drivers/scsi/pcmcia/fdomain_stub.c | 23 +- drivers/scsi/pcmcia/nsp_cs.c | 28 +- drivers/scsi/pcmcia/qlogic_stub.c | 26 +- drivers/scsi/pluto.c | 2 +- drivers/scsi/ppa.c | 2 +- drivers/scsi/psi240i.c | 8 +- drivers/scsi/qla1280.c | 168 +- drivers/scsi/qla2xxx/Makefile | 4 +- drivers/scsi/qla2xxx/ql2300.c | 2 +- drivers/scsi/qla2xxx/ql2300_fw.c | 13924 ++++--- drivers/scsi/qla2xxx/ql2322_fw.c | 13219 ++++--- drivers/scsi/qla2xxx/ql6312.c | 14 +- drivers/scsi/qla2xxx/ql6312_fw.c | 13577 ++++--- drivers/scsi/qla2xxx/qla_dbg.c | 11 +- drivers/scsi/qla2xxx/qla_def.h | 176 +- drivers/scsi/qla2xxx/qla_gbl.h | 70 +- drivers/scsi/qla2xxx/qla_init.c | 1610 +- drivers/scsi/qla2xxx/qla_inline.h | 17 + drivers/scsi/qla2xxx/qla_iocb.c | 195 +- drivers/scsi/qla2xxx/qla_isr.c | 213 +- drivers/scsi/qla2xxx/qla_mbx.c | 524 +- drivers/scsi/qla2xxx/qla_os.c | 3018 +- drivers/scsi/qla2xxx/qla_rscn.c | 2 +- drivers/scsi/qla2xxx/qla_sup.c | 93 +- drivers/scsi/qla2xxx/qla_version.h | 6 +- drivers/scsi/qlogicfas.c | 4 +- drivers/scsi/qlogicfc.c | 80 +- drivers/scsi/qlogicisp.c | 107 +- drivers/scsi/qlogicpti.c | 2 +- drivers/scsi/sata_promise.c | 82 +- drivers/scsi/sata_sil.c | 55 +- drivers/scsi/sata_sis.c | 12 +- drivers/scsi/sata_svw.c | 18 +- drivers/scsi/sata_via.c | 215 +- drivers/scsi/sata_vsc.c | 20 +- drivers/scsi/scsi.c | 147 +- drivers/scsi/scsi.h | 58 + drivers/scsi/scsi_debug.c | 489 +- drivers/scsi/scsi_devinfo.c | 6 +- drivers/scsi/scsi_error.c | 193 +- drivers/scsi/scsi_ioctl.c | 44 +- drivers/scsi/scsi_lib.c | 317 +- drivers/scsi/scsi_priv.h | 7 +- drivers/scsi/scsi_scan.c | 342 +- drivers/scsi/scsi_sysfs.c | 393 +- drivers/scsi/scsi_transport_fc.c | 1624 +- drivers/scsi/scsi_transport_spi.c | 635 +- drivers/scsi/scsicam.c | 18 +- drivers/scsi/sd.c | 258 +- drivers/scsi/seagate.c | 5 +- drivers/scsi/sg.c | 320 +- drivers/scsi/sim710.c | 25 +- drivers/scsi/sr.c | 16 +- drivers/scsi/sr_ioctl.c | 6 - drivers/scsi/st.c | 436 +- drivers/scsi/st.h | 19 +- drivers/scsi/sym53c416.c | 6 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 714 +- drivers/scsi/sym53c8xx_comm.h | 4 +- drivers/scsi/sym53c8xx_defs.h | 54 +- drivers/scsi/u14-34f.c | 2 +- drivers/scsi/ultrastor.c | 6 +- drivers/scsi/wd33c93.h | 2 - drivers/scsi/zalon.c | 44 +- drivers/serial/68328serial.h | 10 +- drivers/serial/68360serial.c | 8 +- drivers/serial/8250.c | 210 +- drivers/serial/8250_pci.c | 52 +- drivers/serial/8250_pnp.c | 6 +- drivers/serial/Kconfig | 72 +- drivers/serial/Makefile | 9 +- drivers/serial/amba-pl011.c | 16 +- drivers/serial/au1x00_uart.c | 67 +- drivers/serial/crisv10.h | 4 +- drivers/serial/icom.c | 89 +- drivers/serial/mcfserial.h | 4 +- drivers/serial/pmac_zilog.c | 4 +- drivers/serial/pxa.c | 18 +- drivers/serial/serial_core.c | 19 +- drivers/serial/sunsab.c | 123 +- drivers/serial/sunsu.c | 22 +- drivers/serial/sunzilog.c | 9 +- drivers/tc/zs.c | 643 +- drivers/tc/zs.h | 10 +- drivers/telephony/ixj.c | 131 +- drivers/telephony/ixj.h | 2 + drivers/usb/Kconfig | 28 - drivers/usb/Makefile | 9 +- drivers/usb/class/audio.c | 111 +- drivers/usb/class/bluetty.c | 10 +- drivers/usb/class/cdc-acm.c | 153 +- drivers/usb/class/usb-midi.c | 36 +- drivers/usb/class/usblp.c | 23 +- drivers/usb/core/buffer.c | 2 + drivers/usb/core/config.c | 12 +- drivers/usb/core/devices.c | 54 +- drivers/usb/core/devio.c | 373 +- drivers/usb/core/file.c | 66 +- drivers/usb/core/hcd-pci.c | 335 +- drivers/usb/core/hcd.c | 642 +- drivers/usb/core/hcd.h | 159 +- drivers/usb/core/hub.c | 739 +- drivers/usb/core/hub.h | 5 +- drivers/usb/core/inode.c | 4 +- drivers/usb/core/message.c | 124 +- drivers/usb/core/urb.c | 24 +- drivers/usb/core/usb.c | 144 +- drivers/usb/core/usb.h | 18 +- drivers/usb/gadget/Kconfig | 120 +- drivers/usb/gadget/dummy_hcd.c | 211 +- drivers/usb/gadget/epautoconf.c | 3 - drivers/usb/gadget/ether.c | 541 +- drivers/usb/gadget/file_storage.c | 72 +- drivers/usb/gadget/gadget_chips.h | 13 +- drivers/usb/gadget/inode.c | 32 +- drivers/usb/gadget/net2280.c | 27 +- drivers/usb/gadget/pxa2xx_udc.c | 280 +- drivers/usb/gadget/rndis.c | 195 +- drivers/usb/gadget/rndis.h | 165 +- drivers/usb/gadget/serial.c | 177 +- drivers/usb/gadget/zero.c | 59 +- drivers/usb/host/ehci-dbg.c | 32 +- drivers/usb/host/ehci-hcd.c | 281 +- drivers/usb/host/ehci-hub.c | 26 +- drivers/usb/host/ehci-mem.c | 42 +- drivers/usb/host/ehci-q.c | 105 +- drivers/usb/host/ehci-sched.c | 485 +- drivers/usb/host/ehci.h | 57 +- drivers/usb/host/ohci-dbg.c | 32 +- drivers/usb/host/ohci-hcd.c | 133 +- drivers/usb/host/ohci-hub.c | 34 +- drivers/usb/host/ohci-mem.c | 25 +- drivers/usb/host/ohci-omap.c | 309 +- drivers/usb/host/ohci-omap.h | 57 + drivers/usb/host/ohci-pci.c | 29 +- drivers/usb/host/ohci-q.c | 102 +- drivers/usb/host/ohci-sa1111.c | 142 +- drivers/usb/host/ohci.h | 82 +- drivers/usb/host/uhci-debug.c | 62 +- drivers/usb/host/uhci-hcd.c | 1760 +- drivers/usb/host/uhci-hcd.h | 83 +- drivers/usb/host/uhci-hub.c | 46 +- drivers/usb/image/mdc800.c | 93 +- drivers/usb/image/microtek.c | 14 +- drivers/usb/input/Kconfig | 23 +- drivers/usb/input/Makefile | 1 - drivers/usb/input/aiptek.c | 34 +- drivers/usb/input/ati_remote.c | 93 +- drivers/usb/input/hid-core.c | 407 +- drivers/usb/input/hiddev.c | 19 +- drivers/usb/input/kbtab.c | 6 +- drivers/usb/input/mtouchusb.c | 67 +- drivers/usb/input/powermate.c | 16 +- drivers/usb/input/wacom.c | 343 +- drivers/usb/media/Makefile | 2 +- drivers/usb/media/dabusb.c | 12 +- drivers/usb/media/ibmcam.c | 32 +- drivers/usb/media/konicawc.c | 20 +- drivers/usb/media/ov511.c | 40 +- drivers/usb/media/pwc-ctrl.c | 1644 + drivers/usb/media/pwc-if.c | 2193 ++ drivers/usb/media/pwc-ioctl.h | 279 + drivers/usb/media/pwc-misc.c | 146 + drivers/usb/media/pwc-uncompress.c | 180 + drivers/usb/media/pwc-uncompress.h | 84 + drivers/usb/media/pwc.h | 271 + drivers/usb/media/pwc_kiara.h | 270 + drivers/usb/media/pwc_nala.h | 66 + drivers/usb/media/pwc_timon.h | 270 + drivers/usb/media/se401.c | 43 +- drivers/usb/media/stv680.c | 3 +- drivers/usb/media/ultracam.c | 20 +- drivers/usb/media/usbvideo.c | 12 +- drivers/usb/media/vicam.c | 10 +- drivers/usb/media/w9968cf.c | 14 +- drivers/usb/media/w9968cf.h | 2 +- drivers/usb/misc/Kconfig | 37 +- drivers/usb/misc/Makefile | 4 +- drivers/usb/misc/auerswald.c | 66 +- drivers/usb/misc/cytherm.c | 2 +- drivers/usb/misc/emi26.c | 10 +- drivers/usb/misc/emi62.c | 6 +- drivers/usb/misc/legousbtower.c | 17 +- drivers/usb/misc/usbtest.c | 41 +- drivers/usb/misc/uss720.c | 15 +- drivers/usb/net/kaweth.c | 26 +- drivers/usb/net/pegasus.c | 373 +- drivers/usb/net/pegasus.h | 5 +- drivers/usb/net/rtl8150.c | 4 +- drivers/usb/net/usbnet.c | 1289 +- drivers/usb/serial/Kconfig | 62 - drivers/usb/serial/Makefile | 6 - drivers/usb/serial/belkin_sa.c | 9 +- drivers/usb/serial/cyberjack.c | 7 +- drivers/usb/serial/digi_acceleport.c | 31 +- drivers/usb/serial/empeg.c | 6 +- drivers/usb/serial/ezusb.c | 2 +- drivers/usb/serial/ftdi_sio.c | 347 +- drivers/usb/serial/ftdi_sio.h | 94 +- drivers/usb/serial/io_edgeport.c | 79 +- drivers/usb/serial/io_ti.c | 16 +- drivers/usb/serial/ipaq.c | 2 +- drivers/usb/serial/ir-usb.c | 2 +- drivers/usb/serial/keyspan.c | 18 +- drivers/usb/serial/keyspan_pda.c | 20 +- drivers/usb/serial/kl5kusb105.c | 50 +- drivers/usb/serial/kobil_sct.c | 16 +- drivers/usb/serial/mct_u232.c | 181 +- drivers/usb/serial/omninet.c | 5 +- drivers/usb/serial/pl2303.c | 55 +- drivers/usb/serial/pl2303.h | 3 - drivers/usb/serial/usb-serial.c | 59 +- drivers/usb/serial/usb-serial.h | 4 + drivers/usb/serial/visor.c | 59 +- drivers/usb/serial/visor.h | 13 +- drivers/usb/serial/whiteheat.c | 5 +- drivers/usb/storage/Kconfig | 45 +- drivers/usb/storage/datafab.c | 2 +- drivers/usb/storage/isd200.c | 2 +- drivers/usb/storage/jumpshot.c | 2 +- drivers/usb/storage/scsiglue.c | 126 +- drivers/usb/storage/scsiglue.h | 6 + drivers/usb/storage/sddr09.c | 2 +- drivers/usb/storage/shuttle_usbat.c | 1265 +- drivers/usb/storage/shuttle_usbat.h | 78 +- drivers/usb/storage/transport.c | 60 +- drivers/usb/storage/unusual_devs.h | 288 +- drivers/usb/storage/usb.c | 242 +- drivers/usb/storage/usb.h | 61 +- drivers/video/Kconfig | 563 +- drivers/video/Makefile | 158 +- drivers/video/acornfb.c | 2 +- drivers/video/aty/atyfb_base.c | 84 +- drivers/video/aty/mach64_cursor.c | 2 +- drivers/video/aty/radeon_accel.c | 67 +- drivers/video/aty/radeon_base.c | 760 +- drivers/video/aty/radeon_i2c.c | 6 - drivers/video/aty/radeon_monitor.c | 181 +- drivers/video/aty/radeon_pm.c | 2930 +- drivers/video/aty/radeonfb.h | 241 +- drivers/video/cirrusfb.c | 74 +- drivers/video/console/Kconfig | 51 +- drivers/video/console/Makefile | 12 +- drivers/video/console/dummycon.c | 2 +- drivers/video/console/fbcon.c | 321 +- drivers/video/console/fbcon.h | 10 +- drivers/video/console/mdacon.c | 28 +- drivers/video/console/newport_con.c | 86 +- drivers/video/console/promcon.c | 14 +- drivers/video/console/sticon.c | 12 +- drivers/video/console/sticore.c | 59 +- drivers/video/console/vgacon.c | 37 +- drivers/video/cyber2000fb.c | 23 +- drivers/video/fbmem.c | 194 +- drivers/video/hgafb.c | 18 +- drivers/video/i810/i810_gtf.c | 12 +- drivers/video/imsttfb.c | 21 +- drivers/video/kyro/fbdev.c | 49 +- drivers/video/logo/logo.c | 7 +- drivers/video/matrox/matroxfb_DAC1064.c | 25 +- drivers/video/matrox/matroxfb_base.c | 90 +- drivers/video/matrox/matroxfb_base.h | 7 +- drivers/video/matrox/matroxfb_crtc2.c | 2 +- drivers/video/modedb.c | 52 +- drivers/video/neofb.c | 61 +- drivers/video/pm2fb.c | 238 +- drivers/video/radeonfb.c | 85 +- drivers/video/riva/fbdev.c | 39 +- drivers/video/sa1100fb.c | 39 +- drivers/video/sis/300vtbl.h | 185 +- drivers/video/sis/310vtbl.h | 213 +- drivers/video/sis/init.c | 647 +- drivers/video/sis/init.h | 536 +- drivers/video/sis/init301.c | 1339 +- drivers/video/sis/init301.h | 158 +- drivers/video/sis/initdef.h | 26 +- drivers/video/sis/oem300.h | 36 +- drivers/video/sis/oem310.h | 2 +- drivers/video/sis/osdef.h | 25 +- drivers/video/sis/sis.h | 168 +- drivers/video/sis/sis_main.c | 315 +- drivers/video/sis/sis_main.h | 75 +- drivers/video/sis/vgatypes.h | 63 +- drivers/video/sis/vstruct.h | 19 +- drivers/video/skeletonfb.c | 20 +- drivers/video/sstfb.c | 23 +- drivers/video/tdfxfb.c | 182 +- drivers/video/tgafb.c | 6 +- drivers/video/tridentfb.c | 78 +- drivers/video/vesafb.c | 19 +- drivers/video/vfb.c | 16 +- drivers/video/vga16fb.c | 28 +- fs/Kconfig | 217 +- fs/Makefile | 4 +- fs/affs/amigaffs.c | 15 +- fs/affs/bitmap.c | 10 +- fs/affs/inode.c | 24 +- fs/affs/super.c | 20 +- fs/affs/symlink.c | 9 +- fs/afs/cmservice.c | 4 +- fs/afs/vlocation.c | 2 +- fs/aio.c | 80 +- fs/attr.c | 24 +- fs/autofs4/autofs_i.h | 15 +- fs/autofs4/expire.c | 16 +- fs/autofs4/inode.c | 2 - fs/autofs4/root.c | 2 - fs/autofs4/waitq.c | 23 +- fs/bad_inode.c | 19 +- fs/befs/debug.c | 2 - fs/bfs/dir.c | 14 +- fs/binfmt_aout.c | 34 +- fs/binfmt_elf.c | 201 +- fs/binfmt_em86.c | 2 +- fs/binfmt_flat.c | 9 +- fs/binfmt_misc.c | 5 +- fs/binfmt_script.c | 2 +- fs/binfmt_som.c | 5 +- fs/bio.c | 222 +- fs/block_dev.c | 7 +- fs/buffer.c | 149 +- fs/char_dev.c | 30 +- fs/cifs/AUTHORS | 24 +- fs/cifs/CHANGES | 69 +- fs/cifs/README | 63 +- fs/cifs/TODO | 30 +- fs/cifs/asn1.c | 7 +- fs/cifs/cifs_debug.c | 58 +- fs/cifs/cifsfs.c | 128 +- fs/cifs/cifsfs.h | 18 +- fs/cifs/cifsglob.h | 21 +- fs/cifs/cifspdu.h | 152 +- fs/cifs/cifsproto.h | 149 +- fs/cifs/cifssmb.c | 1239 +- fs/cifs/connect.c | 896 +- fs/cifs/dir.c | 192 +- fs/cifs/fcntl.c | 6 +- fs/cifs/file.c | 1955 +- fs/cifs/inode.c | 846 +- fs/cifs/link.c | 18 +- fs/cifs/misc.c | 175 +- fs/cifs/transport.c | 120 +- fs/coda/cnode.c | 2 +- fs/coda/inode.c | 4 +- fs/coda/psdev.c | 18 +- fs/coda/sysctl.c | 56 +- fs/coda/upcall.c | 8 +- fs/compat.c | 261 +- fs/compat_ioctl.c | 406 +- fs/dcache.c | 111 +- fs/devfs/base.c | 9 +- fs/devpts/inode.c | 63 +- fs/direct-io.c | 40 +- fs/dquot.c | 228 +- fs/eventpoll.c | 6 +- fs/exec.c | 164 +- fs/exportfs/expfs.c | 4 +- fs/ext2/acl.c | 6 +- fs/ext2/acl.h | 2 + fs/ext2/balloc.c | 39 +- fs/ext2/dir.c | 8 +- fs/ext2/ialloc.c | 11 +- fs/ext2/inode.c | 31 +- fs/ext2/ioctl.c | 4 +- fs/ext2/namei.c | 6 +- fs/ext2/super.c | 127 +- fs/ext2/xattr.c | 57 +- fs/ext2/xattr.h | 8 + fs/ext3/acl.c | 12 +- fs/ext3/balloc.c | 180 +- fs/ext3/dir.c | 2 +- fs/ext3/file.c | 16 +- fs/ext3/ialloc.c | 33 +- fs/ext3/inode.c | 304 +- fs/ext3/ioctl.c | 41 +- fs/ext3/namei.c | 23 +- fs/ext3/resize.c | 4 +- fs/ext3/super.c | 288 +- fs/ext3/xattr.c | 1260 +- fs/ext3/xattr.h | 5 +- fs/fat/dir.c | 750 +- fs/fat/file.c | 310 +- fs/fat/inode.c | 1182 +- fs/fcntl.c | 44 +- fs/file.c | 27 +- fs/file_table.c | 8 +- fs/fs-writeback.c | 24 +- fs/hfs/catalog.c | 10 +- fs/hfs/inode.c | 37 +- fs/hfs/super.c | 164 +- fs/hfsplus/bnode.c | 23 +- fs/hfsplus/brec.c | 10 +- fs/hfsplus/catalog.c | 47 +- fs/hfsplus/dir.c | 37 +- fs/hfsplus/inode.c | 16 +- fs/hfsplus/ioctl.c | 2 +- fs/hostfs/Makefile | 19 +- fs/hostfs/hostfs.h | 21 - fs/hostfs/hostfs_kern.c | 46 +- fs/hostfs/hostfs_user.c | 5 +- fs/hpfs/alloc.c | 4 +- fs/hpfs/hpfs.h | 12 +- fs/hpfs/hpfs_fn.h | 8 +- fs/hpfs/inode.c | 2 +- fs/hpfs/super.c | 6 +- fs/hppfs/Makefile | 10 + fs/hugetlbfs/inode.c | 15 +- fs/inode.c | 151 +- fs/ioctl.c | 109 +- fs/isofs/compress.c | 22 +- fs/isofs/dir.c | 13 +- fs/isofs/inode.c | 19 +- fs/isofs/namei.c | 13 +- fs/isofs/rock.c | 8 +- fs/jbd/commit.c | 179 +- fs/jbd/journal.c | 47 +- fs/jbd/transaction.c | 117 +- fs/jffs/inode-v23.c | 18 +- fs/jffs/intrep.c | 60 +- fs/jffs/jffs_fm.c | 12 +- fs/jffs2/Makefile | 3 +- fs/jffs2/background.c | 11 +- fs/jffs2/build.c | 53 +- fs/jffs2/compr.c | 12 +- fs/jffs2/compr_rtime.c | 12 +- fs/jffs2/compr_rubin.c | 18 +- fs/jffs2/compr_zlib.c | 16 +- fs/jffs2/erase.c | 15 +- fs/jffs2/file.c | 22 +- fs/jffs2/fs.c | 37 +- fs/jffs2/gc.c | 10 +- fs/jffs2/ioctl.c | 4 +- fs/jffs2/malloc.c | 4 +- fs/jffs2/nodelist.c | 42 +- fs/jffs2/nodelist.h | 40 +- fs/jffs2/nodemgmt.c | 80 +- fs/jffs2/os-linux.h | 29 +- fs/jffs2/read.c | 6 +- fs/jffs2/readinode.c | 10 +- fs/jffs2/scan.c | 15 +- fs/jffs2/super.c | 9 +- fs/jffs2/symlink.c | 4 +- fs/jffs2/wbuf.c | 165 +- fs/jffs2/write.c | 4 +- fs/jffs2/writev.c | 4 +- fs/jfs/acl.c | 3 +- fs/jfs/jfs_dmap.c | 12 +- fs/jfs/jfs_dtree.c | 10 +- fs/jfs/jfs_filsys.h | 1 - fs/jfs/jfs_imap.c | 80 +- fs/jfs/jfs_incore.h | 7 +- fs/jfs/jfs_inode.c | 2 - fs/jfs/jfs_logmgr.c | 159 +- fs/jfs/jfs_logmgr.h | 9 +- fs/jfs/jfs_metapage.c | 931 +- fs/jfs/jfs_metapage.h | 80 +- fs/jfs/jfs_mount.c | 5 + fs/jfs/jfs_txnmgr.c | 217 +- fs/jfs/jfs_umount.c | 16 +- fs/jfs/jfs_xtree.c | 63 +- fs/jfs/namei.c | 4 +- fs/jfs/super.c | 71 +- fs/jfs/xattr.c | 59 +- fs/libfs.c | 18 +- fs/lockd/clntproc.c | 31 +- fs/lockd/mon.c | 4 +- fs/lockd/svc.c | 49 +- fs/lockd/svclock.c | 1 + fs/locks.c | 88 +- fs/mbcache.c | 43 +- fs/mpage.c | 138 +- fs/namei.c | 461 +- fs/namespace.c | 84 +- fs/ncpfs/ncplib_kernel.c | 2 +- fs/nfs/dir.c | 444 +- fs/nfs/direct.c | 425 +- fs/nfs/file.c | 159 +- fs/nfs/idmap.c | 4 +- fs/nfs/inode.c | 172 +- fs/nfs/nfs4proc.c | 604 +- fs/nfs/nfs4state.c | 88 +- fs/nfs/nfs4xdr.c | 26 +- fs/nfs/nfsroot.c | 14 +- fs/nfs/proc.c | 72 +- fs/nfs/read.c | 21 +- fs/nfs/unlink.c | 12 +- fs/nfs/write.c | 47 +- fs/nfsd/auth.c | 8 +- fs/nfsd/export.c | 27 +- fs/nfsd/lockd.c | 2 +- fs/nfsd/nfs3xdr.c | 27 +- fs/nfsd/nfs4proc.c | 162 +- fs/nfsd/nfs4state.c | 1151 +- fs/nfsd/nfs4xdr.c | 346 +- fs/nfsd/nfsctl.c | 103 +- fs/nfsd/nfsfh.c | 11 +- fs/nfsd/nfsproc.c | 8 +- fs/nfsd/nfssvc.c | 96 +- fs/nfsd/nfsxdr.c | 6 +- fs/nfsd/vfs.c | 155 +- fs/ntfs/ChangeLog | 7 - fs/ntfs/aops.c | 2 +- fs/ntfs/compress.c | 2 +- fs/ntfs/debug.c | 10 +- fs/ntfs/mft.c | 3 +- fs/ntfs/super.c | 2 - fs/open.c | 43 +- fs/openpromfs/inode.c | 1 - fs/partitions/Kconfig | 6 +- fs/partitions/check.c | 8 +- fs/partitions/ibm.c | 3 +- fs/pipe.c | 231 +- fs/posix_acl.c | 6 +- fs/proc/Makefile | 4 +- fs/proc/array.c | 80 +- fs/proc/base.c | 403 +- fs/proc/generic.c | 16 +- fs/proc/inode.c | 50 +- fs/proc/kcore.c | 24 +- fs/proc/proc_misc.c | 133 +- fs/proc/proc_tty.c | 4 +- fs/proc/task_mmu.c | 141 +- fs/qnx4/inode.c | 10 +- fs/quota.c | 150 +- fs/quota_v2.c | 230 +- fs/ramfs/inode.c | 5 +- fs/read_write.c | 74 +- fs/readdir.c | 4 +- fs/reiserfs/bitmap.c | 21 +- fs/reiserfs/dir.c | 12 +- fs/reiserfs/do_balan.c | 6 +- fs/reiserfs/file.c | 33 +- fs/reiserfs/fix_node.c | 7 +- fs/reiserfs/ibalance.c | 4 +- fs/reiserfs/inode.c | 96 +- fs/reiserfs/ioctl.c | 8 +- fs/reiserfs/item_ops.c | 15 +- fs/reiserfs/journal.c | 44 +- fs/reiserfs/namei.c | 107 +- fs/reiserfs/objectid.c | 18 +- fs/reiserfs/prints.c | 75 +- fs/reiserfs/procfs.c | 4 +- fs/reiserfs/stree.c | 152 +- fs/reiserfs/super.c | 513 +- fs/reiserfs/xattr.c | 20 +- fs/relayfs/Makefile | 8 + fs/relayfs/inode.c | 629 + fs/relayfs/klog.c | 206 + fs/relayfs/relay.c | 1911 + fs/relayfs/relay_locking.c | 322 + fs/relayfs/relay_locking.h | 34 + fs/relayfs/relay_lockless.c | 541 + fs/relayfs/relay_lockless.h | 34 + fs/relayfs/resize.c | 1091 + fs/relayfs/resize.h | 51 + fs/select.c | 15 +- fs/smbfs/file.c | 7 +- fs/smbfs/inode.c | 5 +- fs/smbfs/proc.c | 11 +- fs/smbfs/proto.h | 8 +- fs/smbfs/request.c | 6 +- fs/smbfs/smbiod.c | 2 +- fs/super.c | 20 +- fs/sysfs/bin.c | 27 +- fs/sysfs/dir.c | 2 +- fs/sysfs/file.c | 52 +- fs/sysfs/inode.c | 8 +- fs/sysfs/mount.c | 20 +- fs/sysfs/sysfs.h | 3 +- fs/sysv/itree.c | 6 +- fs/udf/namei.c | 12 +- fs/udf/super.c | 5 +- fs/xattr.c | 22 +- fs/xfs/Makefile | 3 +- fs/xfs/linux-2.6/xfs_ioctl.c | 245 +- fs/xfs/linux-2.6/xfs_iops.c | 37 +- fs/xfs/linux-2.6/xfs_linux.h | 1 - fs/xfs/linux-2.6/xfs_lrw.c | 14 +- fs/xfs/linux-2.6/xfs_super.c | 116 +- fs/xfs/linux-2.6/xfs_sysctl.c | 28 +- fs/xfs/linux-2.6/xfs_vnode.c | 13 +- fs/xfs/linux-2.6/xfs_vnode.h | 5 +- fs/xfs/quota/xfs_qm_syscalls.c | 6 +- fs/xfs/xfs_acl.c | 45 +- fs/xfs/xfs_arch.h | 159 +- fs/xfs/xfs_attr.c | 2 +- fs/xfs/xfs_bmap.c | 2 +- fs/xfs/xfs_bmap_btree.c | 4 +- fs/xfs/xfs_bmap_btree.h | 4 +- fs/xfs/xfs_cap.c | 206 + fs/xfs/xfs_clnt.h | 7 +- fs/xfs/xfs_da_btree.c | 42 +- fs/xfs/xfs_dinode.h | 162 +- fs/xfs/xfs_fs.h | 3 +- fs/xfs/xfs_fsops.c | 18 +- fs/xfs/xfs_inode.c | 117 +- fs/xfs/xfs_inode.h | 24 +- fs/xfs/xfs_iomap.c | 30 +- fs/xfs/xfs_itable.c | 278 +- fs/xfs/xfs_log.c | 68 +- fs/xfs/xfs_log_recover.c | 40 +- fs/xfs/xfs_mac.c | 72 + fs/xfs/xfs_mount.c | 28 +- fs/xfs/xfs_mount.h | 31 +- fs/xfs/xfs_vfsops.c | 109 +- fs/xfs/xfs_vnodeops.c | 73 +- include/acpi/acpi_drivers.h | 5 +- include/acpi/acpiosxf.h | 2 +- include/acpi/actbl2.h | 83 +- include/acpi/platform/aclinux.h | 4 +- include/asm-alpha/bitops.h | 14 +- include/asm-alpha/cacheflush.h | 2 +- include/asm-alpha/io.h | 11 - include/asm-alpha/page.h | 3 - include/asm-alpha/pgalloc.h | 4 +- include/asm-alpha/pgtable.h | 23 +- include/asm-alpha/relay.h | 5 + include/asm-alpha/resource.h | 46 +- include/asm-alpha/signal.h | 25 +- include/asm-alpha/spinlock.h | 94 +- include/asm-alpha/system.h | 2 - include/asm-alpha/uaccess.h | 11 +- include/asm-alpha/unistd.h | 7 +- include/asm-arm/arch-integrator/platform.h | 112 +- include/asm-arm/arch-iop3xx/iop310-irqs.h | 80 + include/asm-arm/arch-iop3xx/iop310.h | 255 + include/asm-arm/arch-iop3xx/iq80310.h | 30 + include/asm-arm/arch-iop3xx/pmon.h | 50 + include/asm-arm/arch-lh7a40x/memory.h | 2 - include/asm-arm/arch-omap/bus.h | 102 + include/asm-arm/arch-omap/dma.h | 4 - include/asm-arm/arch-omap/hardware.h | 110 +- include/asm-arm/arch-omap/memory.h | 4 +- include/asm-arm/arch-omap/mux.h | 32 +- include/asm-arm/arch-pxa/irqs.h | 32 - include/asm-arm/arch-pxa/memory.h | 2 + include/asm-arm/arch-pxa/pxa-regs.h | 103 +- include/asm-arm/arch-s3c2410/memory.h | 8 +- include/asm-arm/arch-s3c2410/regs-serial.h | 17 +- include/asm-arm/atomic.h | 1 - include/asm-arm/cacheflush.h | 20 +- include/asm-arm/dma-mapping.h | 22 - include/asm-arm/ecard.h | 15 +- include/asm-arm/hardware/sa1111.h | 8 +- include/asm-arm/mach/arch.h | 2 +- include/asm-arm/page.h | 18 +- include/asm-arm/pgtable.h | 52 +- include/asm-arm/processor.h | 11 +- include/asm-arm/relay.h | 5 + include/asm-arm/resource.h | 47 +- include/asm-arm/spinlock.h | 8 - include/asm-arm/system.h | 5 - include/asm-arm/thread_info.h | 8 +- include/asm-arm/tlb.h | 42 +- include/asm-arm/uaccess.h | 3 +- include/asm-arm/unistd.h | 53 +- include/asm-arm26/atomic.h | 109 +- include/asm-arm26/cacheflush.h | 2 +- include/asm-arm26/pgtable.h | 19 +- include/asm-arm26/relay.h | 5 + include/asm-arm26/resource.h | 47 +- include/asm-arm26/tlb.h | 23 +- include/asm-arm26/uaccess.h | 40 +- include/asm-arm26/unistd.h | 321 +- include/asm-cris/cacheflush.h | 2 +- include/asm-cris/io.h | 11 - include/asm-cris/page.h | 7 +- include/asm-cris/pgtable.h | 8 +- include/asm-cris/relay.h | 5 + include/asm-cris/resource.h | 47 +- include/asm-cris/uaccess.h | 3 +- include/asm-cris/unistd.h | 2 +- include/asm-generic/bug.h | 8 +- include/asm-generic/pgtable.h | 159 +- include/asm-generic/relay.h | 76 + include/asm-generic/siginfo.h | 19 +- include/asm-generic/tlb.h | 13 +- include/asm-h8300/bitops.h | 2 +- include/asm-h8300/cacheflush.h | 2 +- include/asm-h8300/hardirq.h | 11 + include/asm-h8300/io.h | 11 - include/asm-h8300/page.h | 7 +- include/asm-h8300/pgtable.h | 9 - include/asm-h8300/processor.h | 5 + include/asm-h8300/relay.h | 5 + include/asm-h8300/resource.h | 47 +- include/asm-h8300/softirq.h | 20 + include/asm-h8300/thread_info.h | 1 - include/asm-h8300/uaccess.h | 3 +- include/asm-h8300/unistd.h | 305 +- include/asm-i386/acpi.h | 7 + include/asm-i386/agp.h | 10 - include/asm-i386/apic.h | 1 + include/asm-i386/atomic_kmap.h | 96 + include/asm-i386/cacheflush.h | 2 +- include/asm-i386/checksum.h | 18 +- include/asm-i386/cpu.h | 18 +- include/asm-i386/cpufeature.h | 6 +- include/asm-i386/desc.h | 15 +- include/asm-i386/dma-mapping.h | 2 +- include/asm-i386/dump.h | 93 + include/asm-i386/elf.h | 12 +- include/asm-i386/fixmap.h | 4 +- include/asm-i386/highmem.h | 23 +- include/asm-i386/hpet.h | 3 +- include/asm-i386/i387.h | 6 + include/asm-i386/kmap_types.h | 4 +- include/asm-i386/mach-numaq/mach_apic.h | 11 +- include/asm-i386/mmzone.h | 7 + include/asm-i386/module.h | 2 - include/asm-i386/mpspec.h | 1 + include/asm-i386/msr.h | 15 - include/asm-i386/page.h | 15 +- include/asm-i386/param.h | 10 + include/asm-i386/pgalloc.h | 21 +- include/asm-i386/pgtable-2level.h | 36 +- include/asm-i386/pgtable-3level.h | 35 +- include/asm-i386/pgtable.h | 42 +- include/asm-i386/processor.h | 46 +- include/asm-i386/relay.h | 101 + include/asm-i386/resource.h | 48 +- include/asm-i386/segment.h | 5 +- include/asm-i386/setup.h | 2 +- include/asm-i386/signal.h | 38 +- include/asm-i386/smp.h | 8 +- include/asm-i386/spinlock.h | 44 +- include/asm-i386/string.h | 124 +- include/asm-i386/suspend.h | 12 +- include/asm-i386/system.h | 9 +- include/asm-i386/thread_info.h | 8 +- include/asm-i386/timer.h | 1 - include/asm-i386/timex.h | 2 + include/asm-i386/uaccess.h | 68 +- include/asm-i386/unistd.h | 2 +- include/asm-ia64/acpi.h | 2 +- include/asm-ia64/cacheflush.h | 2 +- include/asm-ia64/gcc_intrin.h | 10 +- include/asm-ia64/iosapic.h | 4 - include/asm-ia64/machvec.h | 41 +- include/asm-ia64/machvec_sn2.h | 10 +- include/asm-ia64/page.h | 15 +- include/asm-ia64/pal.h | 88 +- include/asm-ia64/pci.h | 23 +- include/asm-ia64/pgalloc.h | 164 +- include/asm-ia64/pgtable.h | 76 +- include/asm-ia64/processor.h | 28 +- include/asm-ia64/relay.h | 5 + include/asm-ia64/resource.h | 54 +- include/asm-ia64/signal.h | 23 +- include/asm-ia64/smp.h | 50 +- include/asm-ia64/sn/addrs.h | 382 +- include/asm-ia64/sn/arch.h | 44 +- include/asm-ia64/sn/bte.h | 53 +- include/asm-ia64/sn/cdl.h | 42 + include/asm-ia64/sn/dmamap.h | 50 + include/asm-ia64/sn/driver.h | 91 + include/asm-ia64/sn/geo.h | 45 +- include/asm-ia64/sn/hcl.h | 107 + include/asm-ia64/sn/hcl_util.h | 21 + include/asm-ia64/sn/hwgfs.h | 36 + include/asm-ia64/sn/ifconfig_net.h | 32 + include/asm-ia64/sn/ioc4.h | 20 + include/asm-ia64/sn/ioconfig_bus.h | 27 + include/asm-ia64/sn/ioerror.h | 193 + include/asm-ia64/sn/ioerror_handling.h | 159 + include/asm-ia64/sn/iograph.h | 137 + include/asm-ia64/sn/klconfig.h | 2 +- include/asm-ia64/sn/kldir.h | 363 + include/asm-ia64/sn/ksys/elsc.h | 39 + include/asm-ia64/sn/ksys/l1.h | 141 + include/asm-ia64/sn/labelcl.h | 76 + include/asm-ia64/sn/leds.h | 1 - include/asm-ia64/sn/nodepda.h | 21 +- include/asm-ia64/sn/pci/bridge.h | 1895 + include/asm-ia64/sn/pci/pci_bus_cvlink.h | 70 + include/asm-ia64/sn/pci/pci_defs.h | 414 + include/asm-ia64/sn/pci/pcibr.h | 535 + include/asm-ia64/sn/pci/pcibr_private.h | 811 + include/asm-ia64/sn/pci/pciio.h | 746 + include/asm-ia64/sn/pci/pciio_private.h | 145 + include/asm-ia64/sn/pci/pic.h | 451 + include/asm-ia64/sn/pda.h | 26 +- include/asm-ia64/sn/pio.h | 99 + include/asm-ia64/sn/prio.h | 38 + include/asm-ia64/sn/rw_mmr.h | 9 +- include/asm-ia64/sn/sgi.h | 83 + include/asm-ia64/sn/slotnum.h | 16 + include/asm-ia64/sn/sn2/addrs.h | 169 + include/asm-ia64/sn/sn2/arch.h | 61 + include/asm-ia64/sn/sn2/geo.h | 108 + include/asm-ia64/sn/sn2/intr.h | 31 + include/asm-ia64/sn/sn2/io.h | 239 + include/asm-ia64/sn/sn2/shub.h | 36 + include/asm-ia64/sn/sn2/shub_md.h | 275 + include/asm-ia64/sn/sn2/shub_mmr.h | 31597 ++++++++++++++++ include/asm-ia64/sn/sn2/shub_mmr_t.h | 14829 ++++++++ include/asm-ia64/sn/sn2/shubio.h | 3609 ++ include/asm-ia64/sn/sn2/slotnum.h | 41 + include/asm-ia64/sn/sn2/sn_private.h | 245 + include/asm-ia64/sn/sn_cpuid.h | 36 +- include/asm-ia64/sn/sn_private.h | 13 + include/asm-ia64/sn/sn_sal.h | 264 +- include/asm-ia64/sn/types.h | 3 +- include/asm-ia64/sn/vector.h | 75 + include/asm-ia64/sn/xtalk/xbow.h | 675 + include/asm-ia64/sn/xtalk/xbow_info.h | 21 + include/asm-ia64/sn/xtalk/xswitch.h | 56 + include/asm-ia64/sn/xtalk/xtalk.h | 360 + include/asm-ia64/sn/xtalk/xtalk_private.h | 79 + include/asm-ia64/sn/xtalk/xtalkaddrs.h | 106 + include/asm-ia64/sn/xtalk/xwidget.h | 240 + include/asm-ia64/spinlock.h | 11 +- include/asm-ia64/system.h | 4 - include/asm-ia64/thread_info.h | 19 +- include/asm-ia64/tlb.h | 11 +- include/asm-ia64/uaccess.h | 42 +- include/asm-ia64/unistd.h | 19 +- include/asm-m68k/cacheflush.h | 15 +- include/asm-m68k/checksum.h | 52 +- include/asm-m68k/io.h | 14 - include/asm-m68k/ipc.h | 32 +- include/asm-m68k/motorola_pgtable.h | 2 +- include/asm-m68k/pgtable.h | 12 +- include/asm-m68k/relay.h | 5 + include/asm-m68k/resource.h | 47 +- include/asm-m68k/setup.h | 8 +- include/asm-m68k/signal.h | 30 +- include/asm-m68k/thread_info.h | 7 - include/asm-m68k/uaccess.h | 5 +- include/asm-m68k/unistd.h | 6 +- include/asm-m68knommu/atomic.h | 74 +- include/asm-m68knommu/bitops.h | 263 +- include/asm-m68knommu/cacheflush.h | 2 +- include/asm-m68knommu/page.h | 12 +- include/asm-m68knommu/pgtable.h | 9 - include/asm-m68knommu/relay.h | 5 + include/asm-m68knommu/uaccess.h | 3 +- include/asm-m68knommu/unistd.h | 6 +- include/asm-mips/bootinfo.h | 1 - include/asm-mips/cacheflush.h | 5 +- include/asm-mips/checksum.h | 10 +- include/asm-mips/hazards.h | 85 +- include/asm-mips/mach-au1x00/au1000.h | 2 - include/asm-mips/mach-db1x00/db1x00.h | 3 - include/asm-mips/mach-generic/ide.h | 82 +- include/asm-mips/mipsregs.h | 103 +- include/asm-mips/mmu_context.h | 28 +- include/asm-mips/mv64340.h | 1039 + include/asm-mips/pci.h | 11 +- include/asm-mips/pgtable-32.h | 4 +- include/asm-mips/pgtable-64.h | 2 +- include/asm-mips/pgtable.h | 34 +- include/asm-mips/processor.h | 11 + include/asm-mips/relay.h | 5 + include/asm-mips/resource.h | 57 +- include/asm-mips/spinlock.h | 11 +- include/asm-mips/stackframe.h | 20 +- include/asm-mips/system.h | 2 - include/asm-mips/thread_info.h | 1 - include/asm-mips/uaccess.h | 38 +- include/asm-mips/unistd.h | 12 +- include/asm-mips/vr41xx/vr41xx.h | 117 +- include/asm-mips/vr41xx/vrc4173.h | 2 - include/asm-mips64/relay.h | 5 + include/asm-parisc/bitops.h | 8 +- include/asm-parisc/cache.h | 1 - include/asm-parisc/cacheflush.h | 29 +- include/asm-parisc/checksum.h | 10 +- include/asm-parisc/dma-mapping.h | 2 +- include/asm-parisc/hardware.h | 6 +- include/asm-parisc/ide.h | 10 +- include/asm-parisc/module.h | 4 - include/asm-parisc/pdc.h | 15 +- include/asm-parisc/pgalloc.h | 9 +- include/asm-parisc/pgtable.h | 41 +- include/asm-parisc/processor.h | 3 + include/asm-parisc/relay.h | 5 + include/asm-parisc/resource.h | 48 +- include/asm-parisc/spinlock.h | 7 +- include/asm-parisc/system.h | 7 +- include/asm-parisc/uaccess.h | 30 +- include/asm-parisc/unistd.h | 7 +- include/asm-ppc/cacheflush.h | 2 +- include/asm-ppc/ibm44x.h | 158 +- include/asm-ppc/ibm4xx.h | 4 - include/asm-ppc/io.h | 54 +- include/asm-ppc/irq.h | 180 +- include/asm-ppc/machdep.h | 9 - include/asm-ppc/mmu.h | 54 +- include/asm-ppc/mpc10x.h | 8 +- include/asm-ppc/mpc8260.h | 4 +- include/asm-ppc/mv64x60.h | 345 - include/asm-ppc/mv64x60_defs.h | 973 - include/asm-ppc/ocp.h | 2 +- include/asm-ppc/page.h | 2 - include/asm-ppc/pci.h | 9 +- include/asm-ppc/pgtable.h | 195 +- include/asm-ppc/pmac_feature.h | 37 +- include/asm-ppc/ppcboot.h | 6 +- include/asm-ppc/processor.h | 8 +- include/asm-ppc/reg.h | 97 +- include/asm-ppc/reg_booke.h | 75 +- include/asm-ppc/relay.h | 5 + include/asm-ppc/resource.h | 44 +- include/asm-ppc/serial.h | 8 - include/asm-ppc/setup.h | 9 +- include/asm-ppc/smp.h | 1 + include/asm-ppc/spinlock.h | 49 +- include/asm-ppc/system.h | 7 +- include/asm-ppc/thread_info.h | 7 - include/asm-ppc/uaccess.h | 31 +- include/asm-ppc/uninorth.h | 56 +- include/asm-ppc/unistd.h | 23 +- include/asm-ppc64/bootx.h | 135 + include/asm-ppc64/cacheflush.h | 5 +- include/asm-ppc64/cputable.h | 62 +- include/asm-ppc64/eeh.h | 49 +- include/asm-ppc64/hardirq.h | 1 + include/asm-ppc64/io.h | 15 +- include/asm-ppc64/iommu.h | 19 +- include/asm-ppc64/ipc.h | 35 +- include/asm-ppc64/irq.h | 2 - include/asm-ppc64/machdep.h | 35 +- include/asm-ppc64/mmu.h | 212 +- include/asm-ppc64/mmu_context.h | 97 +- include/asm-ppc64/naca.h | 24 +- include/asm-ppc64/paca.h | 15 +- include/asm-ppc64/page.h | 68 +- include/asm-ppc64/pci-bridge.h | 31 +- include/asm-ppc64/pci.h | 137 +- include/asm-ppc64/pgalloc.h | 33 +- include/asm-ppc64/pgtable.h | 267 +- include/asm-ppc64/processor.h | 238 +- include/asm-ppc64/prom.h | 51 +- include/asm-ppc64/relay.h | 5 + include/asm-ppc64/resource.h | 53 +- include/asm-ppc64/rtas.h | 5 +- include/asm-ppc64/signal.h | 33 +- include/asm-ppc64/smp.h | 11 +- include/asm-ppc64/spinlock.h | 28 +- include/asm-ppc64/system.h | 3 +- include/asm-ppc64/systemcfg.h | 30 +- include/asm-ppc64/thread_info.h | 15 +- include/asm-ppc64/time.h | 15 +- include/asm-ppc64/uaccess.h | 34 +- include/asm-ppc64/unistd.h | 6 +- include/asm-ppc64/vio.h | 27 +- include/asm-s390/atomic.h | 4 - include/asm-s390/cacheflush.h | 2 +- include/asm-s390/debug.h | 2 +- include/asm-s390/page.h | 5 - include/asm-s390/pgalloc.h | 7 +- include/asm-s390/pgtable.h | 51 +- include/asm-s390/processor.h | 4 +- include/asm-s390/relay.h | 5 + include/asm-s390/resource.h | 47 +- include/asm-s390/smp.h | 25 - include/asm-s390/spinlock.h | 20 +- include/asm-s390/thread_info.h | 1 - include/asm-s390/uaccess.h | 12 +- include/asm-s390/unistd.h | 16 +- include/asm-sh/checksum.h | 14 +- include/asm-sh/cpu-sh2/cacheflush.h | 4 +- include/asm-sh/cpu-sh3/cacheflush.h | 6 +- include/asm-sh/cpu-sh4/cacheflush.h | 2 +- include/asm-sh/dma-mapping.h | 1 + include/asm-sh/irq.h | 3 +- include/asm-sh/mc146818rtc.h | 1 - include/asm-sh/pgalloc.h | 9 +- include/asm-sh/pgtable.h | 15 +- include/asm-sh/processor.h | 6 + include/asm-sh/relay.h | 5 + include/asm-sh/resource.h | 47 +- include/asm-sh/spinlock.h | 13 +- include/asm-sh/uaccess.h | 3 +- include/asm-sh/unistd.h | 2 +- include/asm-sh64/smplock.h | 77 + include/asm-sh64/softirq.h | 30 + include/asm-sparc/bitops.h | 8 +- include/asm-sparc/bug.h | 3 - include/asm-sparc/cacheflush.h | 14 +- include/asm-sparc/checksum.h | 14 +- include/asm-sparc/hardirq.h | 9 + include/asm-sparc/ipc.h | 33 +- include/asm-sparc/pgtable.h | 23 +- include/asm-sparc/pgtsrmmu.h | 1 - include/asm-sparc/processor.h | 6 + include/asm-sparc/relay.h | 5 + include/asm-sparc/resource.h | 44 +- include/asm-sparc/sbus.h | 2 - include/asm-sparc/signal.h | 19 +- include/asm-sparc/spinlock.h | 25 +- include/asm-sparc/system.h | 10 +- include/asm-sparc/thread_info.h | 1 - include/asm-sparc/uaccess.h | 22 +- include/asm-sparc/unistd.h | 9 +- include/asm-sparc64/atomic.h | 62 +- include/asm-sparc64/bitops.h | 46 +- include/asm-sparc64/bug.h | 3 - include/asm-sparc64/cacheflush.h | 41 +- include/asm-sparc64/checksum.h | 51 +- include/asm-sparc64/compat.h | 106 +- include/asm-sparc64/hardirq.h | 9 + include/asm-sparc64/ide.h | 10 +- include/asm-sparc64/io.h | 15 +- include/asm-sparc64/iommu.h | 2 - include/asm-sparc64/page.h | 32 +- include/asm-sparc64/pci.h | 5 +- include/asm-sparc64/pgalloc.h | 101 +- include/asm-sparc64/pgtable.h | 104 +- include/asm-sparc64/relay.h | 5 + include/asm-sparc64/resource.h | 46 +- include/asm-sparc64/siginfo.h | 35 +- include/asm-sparc64/signal.h | 24 +- include/asm-sparc64/spinlock.h | 55 +- include/asm-sparc64/thread_info.h | 1 - include/asm-sparc64/tlb.h | 13 +- include/asm-sparc64/uaccess.h | 16 +- include/asm-sparc64/unistd.h | 9 +- include/asm-um/archparam-i386.h | 141 + include/asm-um/common.lds.S | 9 +- include/asm-um/cpumask.h | 6 + include/asm-um/fixmap.h | 10 +- include/asm-um/init.h | 11 + include/asm-um/page.h | 117 +- include/asm-um/pgalloc.h | 24 +- include/asm-um/pgtable.h | 241 +- include/asm-um/processor-generic.h | 17 +- include/asm-um/processor-i386.h | 21 +- include/asm-um/smplock.h | 6 + include/asm-um/system-i386.h | 2 - include/asm-um/thread_info.h | 14 +- include/asm-um/timex.h | 2 + include/asm-um/uaccess.h | 4 +- include/asm-um/unistd.h | 106 +- include/asm-v850/cacheflush.h | 2 +- include/asm-v850/pgtable.h | 2 - include/asm-v850/relay.h | 5 + include/asm-v850/resource.h | 47 +- include/asm-v850/uaccess.h | 3 +- include/asm-v850/unistd.h | 2 +- include/asm-x86_64/acpi.h | 5 +- include/asm-x86_64/agp.h | 10 - include/asm-x86_64/apicdef.h | 2 +- include/asm-x86_64/bitops.h | 8 +- include/asm-x86_64/bootsetup.h | 3 +- include/asm-x86_64/cacheflush.h | 3 +- include/asm-x86_64/checksum.h | 8 +- include/asm-x86_64/compat.h | 5 - include/asm-x86_64/floppy.h | 2 +- include/asm-x86_64/hw_irq.h | 2 + include/asm-x86_64/i387.h | 10 + include/asm-x86_64/ia32.h | 8 +- include/asm-x86_64/ia32_unistd.h | 6 +- include/asm-x86_64/io.h | 41 +- include/asm-x86_64/mmu_context.h | 14 +- include/asm-x86_64/mpspec.h | 3 +- include/asm-x86_64/msr.h | 24 +- include/asm-x86_64/page.h | 23 +- include/asm-x86_64/pgalloc.h | 52 +- include/asm-x86_64/pgtable.h | 171 +- include/asm-x86_64/processor.h | 25 +- include/asm-x86_64/ptrace.h | 5 - include/asm-x86_64/relay.h | 5 + include/asm-x86_64/resource.h | 47 +- include/asm-x86_64/signal.h | 28 +- include/asm-x86_64/smp.h | 32 +- include/asm-x86_64/spinlock.h | 23 +- include/asm-x86_64/suspend.h | 1 + include/asm-x86_64/timex.h | 2 + include/asm-x86_64/topology.h | 13 +- include/asm-x86_64/uaccess.h | 37 +- include/asm-x86_64/unistd.h | 22 +- include/asm-xen/asm-i386/segment.h | 2 - include/linux/acct.h | 4 - include/linux/acpi.h | 45 +- include/linux/affs_fs.h | 89 + include/linux/ata.h | 2 - include/linux/atmdev.h | 32 +- include/linux/audit.h | 118 +- include/linux/auto_fs4.h | 2 +- include/linux/backing-dev.h | 41 +- include/linux/binfmts.h | 10 +- include/linux/bio.h | 11 +- include/linux/bitmap.h | 8 +- include/linux/blkdev.h | 45 +- include/linux/bootmem.h | 19 +- include/linux/buffer_head.h | 5 +- include/linux/capability.h | 8 +- include/linux/cdrom.h | 2 + include/linux/compat.h | 16 +- include/linux/compat_ioctl.h | 6 - include/linux/compiler-gcc3.h | 10 +- include/linux/compiler.h | 18 +- include/linux/console.h | 10 +- include/linux/cpu.h | 3 - include/linux/cpufreq.h | 71 +- include/linux/cpumask.h | 38 +- include/linux/crypto.h | 11 - include/linux/cyclades.h | 2 +- include/linux/dcache.h | 45 +- include/linux/delay.h | 1 - include/linux/device.h | 19 +- include/linux/devpts_fs.h | 3 +- include/linux/dtlk.h | 2 +- include/linux/dump.h | 385 + include/linux/dump_netdev.h | 80 + include/linux/dumpdev.h | 161 + include/linux/dvb/osd.h | 9 +- include/linux/dvb/video.h | 65 +- include/linux/edd.h | 2 +- include/linux/efi.h | 23 +- include/linux/elevator.h | 3 - include/linux/elf.h | 7 +- include/linux/ext2_fs.h | 1 - include/linux/ext3_fs.h | 22 +- include/linux/ext3_fs_i.h | 46 +- include/linux/ext3_jbd.h | 25 +- include/linux/fb.h | 38 +- include/linux/file.h | 4 +- include/linux/fs.h | 251 +- include/linux/gameport.h | 151 +- include/linux/generic_serial.h | 2 +- include/linux/gfp.h | 49 +- include/linux/hayesesp.h | 4 +- include/linux/highmem.h | 17 +- include/linux/hugetlb.h | 10 +- include/linux/i2c-id.h | 33 +- include/linux/i2c.h | 84 +- include/linux/i2o.h | 30 +- include/linux/ide.h | 147 +- include/linux/if.h | 2 +- include/linux/if_pppox.h | 19 +- include/linux/if_shaper.h | 2 +- include/linux/inetdevice.h | 2 - include/linux/init.h | 4 +- include/linux/init_task.h | 22 +- include/linux/interrupt.h | 34 +- include/linux/ip.h | 53 +- include/linux/ipmi.h | 63 + include/linux/ipmi_smi.h | 11 +- include/linux/irq.h | 6 +- include/linux/iso_fs.h | 147 + include/linux/ixjuser.h | 2 + include/linux/jbd.h | 29 +- include/linux/jffs2.h | 4 +- include/linux/jiffies.h | 8 - include/linux/kernel.h | 49 +- include/linux/kernel_stat.h | 20 +- include/linux/klog.h | 24 + include/linux/kobject.h | 5 - include/linux/libata.h | 129 +- include/linux/lockd/lockd.h | 2 + include/linux/major.h | 1 - include/linux/mbcache.h | 35 +- include/linux/mca.h | 14 +- include/linux/miscdevice.h | 6 +- include/linux/mm.h | 119 +- include/linux/mmzone.h | 54 +- include/linux/module.h | 38 +- include/linux/moduleparam.h | 22 +- include/linux/mount.h | 6 +- include/linux/msdos_fs.h | 302 +- include/linux/mtd/cfi.h | 14 +- include/linux/mtd/doc2000.h | 6 +- include/linux/mtd/flashchip.h | 4 +- include/linux/mtd/gen_probe.h | 2 +- include/linux/mtd/map.h | 4 +- include/linux/mtd/nand.h | 8 +- include/linux/namei.h | 4 +- include/linux/net.h | 47 +- include/linux/netdevice.h | 34 +- include/linux/netfilter.h | 42 +- include/linux/netfilter_arp/arp_tables.h | 8 +- include/linux/netfilter_ipv4/ip_conntrack.h | 185 +- .../linux/netfilter_ipv4/ip_conntrack_core.h | 7 - .../linux/netfilter_ipv4/ip_conntrack_pptp.h | 28 - .../netfilter_ipv4/ip_conntrack_proto_gre.h | 15 +- .../linux/netfilter_ipv4/ip_conntrack_tuple.h | 38 +- include/linux/netfilter_ipv4/ip_tables.h | 67 +- include/linux/netfilter_ipv6/ip6_tables.h | 8 +- include/linux/netlink.h | 10 +- include/linux/netpoll.h | 40 +- include/linux/nfs_fs.h | 82 +- include/linux/nfsd/nfsd.h | 17 +- include/linux/nfsd/state.h | 49 +- include/linux/nfsd/syscall.h | 19 - include/linux/nfsd/xdr4.h | 24 +- include/linux/notifier.h | 1 - include/linux/oprofile.h | 20 +- include/linux/page-flags.h | 52 +- include/linux/pagemap.h | 10 +- include/linux/parport.h | 12 +- include/linux/pci.h | 68 +- include/linux/pci_ids.h | 232 +- include/linux/percpu.h | 2 +- include/linux/personality.h | 7 +- include/linux/pkt_cls.h | 112 +- include/linux/pkt_sched.h | 9 +- include/linux/pm.h | 113 +- include/linux/poll.h | 10 +- include/linux/posix-timers.h | 93 +- include/linux/posix_acl.h | 6 +- include/linux/prctl.h | 1 - include/linux/proc_fs.h | 5 + include/linux/quota.h | 3 +- include/linux/quotaops.h | 2 +- include/linux/raid/linear.h | 7 +- include/linux/raid/raid5.h | 2 - include/linux/random.h | 15 +- include/linux/rcupdate.h | 37 +- include/linux/reiserfs_fs.h | 297 +- include/linux/reiserfs_fs_i.h | 5 +- include/linux/reiserfs_fs_sb.h | 6 +- include/linux/relayfs_fs.h | 686 + include/linux/rtnetlink.h | 23 +- include/linux/sched.h | 336 +- include/linux/security.h | 120 +- include/linux/selection.h | 23 +- include/linux/serial.h | 6 +- include/linux/serialP.h | 8 +- include/linux/serial_core.h | 39 - include/linux/serio.h | 106 +- include/linux/signal.h | 20 +- include/linux/skbuff.h | 153 +- include/linux/slab.h | 33 +- include/linux/smp_lock.h | 14 +- include/linux/socket.h | 3 +- include/linux/sockios.h | 2 +- include/linux/spinlock.h | 82 +- include/linux/sunrpc/auth.h | 23 +- include/linux/sunrpc/cache.h | 24 +- include/linux/sunrpc/clnt.h | 2 +- include/linux/sunrpc/gss_api.h | 14 +- include/linux/sunrpc/gss_asn1.h | 2 + include/linux/sunrpc/svcauth.h | 16 +- include/linux/sunrpc/xprt.h | 6 +- include/linux/suspend.h | 44 +- include/linux/swap.h | 2 +- include/linux/syscalls.h | 5 +- include/linux/sysctl.h | 40 +- include/linux/sysfs.h | 13 - include/linux/sysrq.h | 14 +- include/linux/tcp.h | 99 +- include/linux/time.h | 3 - include/linux/timex.h | 2 + include/linux/types.h | 2 + include/linux/usb.h | 125 +- include/linux/usbdevice_fs.h | 23 +- include/linux/videodev2.h | 147 +- include/linux/videotext.h | 85 +- include/linux/vmalloc.h | 5 +- include/linux/vs_context.h | 95 +- include/linux/vs_limit.h | 105 +- include/linux/vs_memory.h | 61 +- include/linux/vs_network.h | 122 +- include/linux/vs_sched.h | 37 - include/linux/vserver/context.h | 41 +- include/linux/vserver/context_cmd.h | 8 +- include/linux/vserver/cvirt.h | 7 - include/linux/vserver/cvirt_cmd.h | 29 +- include/linux/vserver/cvirt_def.h | 18 - include/linux/vserver/debug.h | 169 +- include/linux/vserver/dlimit.h | 36 +- include/linux/vserver/inode.h | 38 +- include/linux/vserver/legacy.h | 5 + include/linux/vserver/limit.h | 5 +- include/linux/vserver/namespace.h | 46 + include/linux/vserver/network.h | 37 +- include/linux/vserver/network_cmd.h | 22 +- include/linux/vserver/sched.h | 2 +- include/linux/vserver/sched_def.h | 19 - include/linux/vserver/switch.h | 4 +- include/linux/vserver/xid.h | 23 +- include/linux/vt_kern.h | 50 +- include/linux/wait.h | 66 +- include/linux/workqueue.h | 3 - include/linux/xfrm.h | 5 +- include/media/ir-common.h | 6 +- include/media/saa7146_vv.h | 28 +- include/net/addrconf.h | 9 +- include/net/af_unix.h | 3 + include/net/bluetooth/bluetooth.h | 1 + include/net/bluetooth/hci.h | 10 +- include/net/bluetooth/hci_core.h | 40 +- include/net/bluetooth/l2cap.h | 30 +- include/net/bluetooth/rfcomm.h | 62 +- include/net/bluetooth/sco.h | 10 +- include/net/checksum.h | 6 +- include/net/dst.h | 33 +- include/net/ip.h | 44 +- include/net/ipv6.h | 32 +- include/net/irda/ircomm_tty.h | 4 +- include/net/irda/irda.h | 29 +- include/net/irda/irda_device.h | 4 + include/net/irda/irlmp.h | 3 + include/net/neighbour.h | 3 +- include/net/pkt_cls.h | 384 +- include/net/pkt_sched.h | 6 +- include/net/route.h | 11 +- include/net/scm.h | 4 +- include/net/sctp/sctp.h | 49 +- include/net/snmp.h | 14 +- include/net/sock.h | 244 +- include/net/tcp.h | 313 +- include/net/xfrm.h | 32 +- include/pcmcia/cs_types.h | 27 +- include/pcmcia/ss.h | 76 +- include/rxrpc/call.h | 5 + include/scsi/scsi.h | 17 +- include/scsi/scsi_device.h | 34 +- include/scsi/scsi_devinfo.h | 1 - include/scsi/scsi_eh.h | 6 - include/scsi/scsi_host.h | 100 +- include/scsi/scsi_transport.h | 33 +- include/scsi/scsi_transport_fc.h | 415 +- include/scsi/scsi_transport_spi.h | 8 - include/sound/ac97_codec.h | 28 +- include/sound/ad1848.h | 9 + include/sound/asound.h | 6 +- include/sound/control.h | 16 +- include/sound/core.h | 55 +- include/sound/cs4231.h | 5 + include/sound/cs46xx.h | 4 +- include/sound/emu10k1.h | 205 +- include/sound/pcm.h | 91 +- include/sound/sndmagic.h | 218 + include/sound/trident.h | 14 +- include/sound/version.h | 4 +- include/sound/ymfpci.h | 25 +- include/video/radeon.h | 476 +- init/Kconfig | 104 +- init/Makefile | 5 +- init/calibrate.c | 8 +- init/initramfs.c | 19 +- init/kerntypes.c | 31 + init/main.c | 153 +- init/version.c | 9 +- ipc/compat_mq.c | 16 +- ipc/mqueue.c | 21 +- ipc/msg.c | 5 +- ipc/sem.c | 5 +- ipc/shm.c | 29 +- ipc/util.c | 3 + kernel/Makefile | 13 +- kernel/acct.c | 33 +- kernel/audit.c | 780 +- kernel/auditsc.c | 614 +- kernel/capability.c | 71 +- kernel/compat.c | 200 +- kernel/cpu.c | 7 +- kernel/cpuset.c | 1 - kernel/dma.c | 2 +- kernel/exit.c | 130 +- kernel/fork.c | 219 +- kernel/futex.c | 137 +- kernel/irq/handle.c | 16 +- kernel/irq/manage.c | 81 +- kernel/irq/spurious.c | 103 +- kernel/itimer.c | 228 +- kernel/kallsyms.c | 60 +- kernel/kthread.c | 27 +- kernel/module.c | 163 +- kernel/panic.c | 31 +- kernel/params.c | 235 +- kernel/pid.c | 2 +- kernel/posix-cpu-timers.c | 1 - kernel/posix-timers.c | 332 +- kernel/power/pm.c | 2 +- kernel/power/pmdisk.c | 1166 + kernel/power/poweroff.c | 3 +- kernel/power/swsusp.c | 776 +- kernel/printk.c | 243 +- kernel/profile.c | 1 - kernel/ptrace.c | 63 +- kernel/rcupdate.c | 67 +- kernel/sched.c | 1347 +- kernel/signal.c | 375 +- kernel/softirq.c | 32 +- kernel/sys.c | 123 +- kernel/sys_ni.c | 140 +- kernel/sysctl.c | 200 +- kernel/time.c | 72 +- kernel/timer.c | 132 +- kernel/user.c | 5 +- kernel/vserver/Kconfig | 100 +- kernel/vserver/Makefile | 4 +- kernel/vserver/context.c | 269 +- kernel/vserver/cvirt.c | 165 +- kernel/vserver/cvirt_init.h | 11 - kernel/vserver/cvirt_proc.h | 2 - kernel/vserver/dlimit.c | 260 +- kernel/vserver/helper.c | 114 +- kernel/vserver/init.c | 2 +- kernel/vserver/inode.c | 83 +- kernel/vserver/legacy.c | 69 +- kernel/vserver/limit.c | 25 +- kernel/vserver/limit_proc.h | 10 - kernel/vserver/namespace.c | 120 +- kernel/vserver/network.c | 318 +- kernel/vserver/proc.c | 78 +- kernel/vserver/sched.c | 137 +- kernel/vserver/sched_init.h | 9 - kernel/vserver/sched_proc.h | 2 - kernel/vserver/signal.c | 45 +- kernel/vserver/switch.c | 90 +- kernel/vserver/sysctl.c | 2 +- kernel/workqueue.c | 35 +- lib/Makefile | 8 +- lib/bitmap.c | 103 - lib/kobject.c | 25 +- lib/kobject_uevent.c | 1 - lib/rwsem-spinlock.c | 48 +- lib/rwsem.c | 20 +- lib/string.c | 34 +- lib/vsprintf.c | 4 +- lib/zlib_inflate/inffixed.h | 151 + mm/Makefile | 8 +- mm/bootmem.c | 11 +- mm/filemap.c | 221 +- mm/fremap.c | 45 +- mm/highmem.c | 25 +- mm/hugetlb.c | 7 +- mm/madvise.c | 15 +- mm/memory.c | 1360 +- mm/mempool.c | 53 +- mm/mincore.c | 53 +- mm/mlock.c | 65 +- mm/mmap.c | 684 +- mm/mprotect.c | 154 +- mm/mremap.c | 81 +- mm/msync.c | 189 +- mm/nommu.c | 1052 +- mm/oom_kill.c | 219 +- mm/page-writeback.c | 85 +- mm/page_alloc.c | 793 +- mm/pdflush.c | 6 +- mm/proc_mm.c | 174 + mm/readahead.c | 475 +- mm/rmap.c | 150 +- mm/shmem.c | 20 +- mm/slab.c | 304 +- mm/swap.c | 3 +- mm/swap_state.c | 58 +- mm/swapfile.c | 205 +- mm/truncate.c | 108 +- mm/usercopy.c | 302 + mm/vmalloc.c | 319 +- mm/vmscan.c | 253 +- net/802/fc.c | 41 +- net/802/tr.c | 35 +- net/8021q/vlan.c | 9 +- net/8021q/vlan.h | 1 + net/Kconfig | 37 +- net/appletalk/ddp.c | 57 +- net/atm/addr.c | 93 +- net/atm/br2684.c | 6 +- net/atm/clip.c | 19 +- net/atm/common.c | 108 +- net/atm/ioctl.c | 9 +- net/atm/lec.c | 448 +- net/atm/signaling.c | 41 +- net/atm/svc.c | 83 +- net/ax25/af_ax25.c | 57 +- net/ax25/ax25_route.c | 4 +- net/bluetooth/af_bluetooth.c | 44 + net/bluetooth/hci_conn.c | 23 +- net/bluetooth/hci_core.c | 49 +- net/bluetooth/hci_event.c | 67 +- net/bluetooth/hci_sock.c | 51 +- net/bluetooth/hci_sysfs.c | 2 +- net/bluetooth/l2cap.c | 77 +- net/bluetooth/rfcomm/core.c | 200 +- net/bluetooth/rfcomm/sock.c | 117 +- net/bluetooth/sco.c | 64 +- net/bridge/br.c | 10 +- net/bridge/br_device.c | 21 +- net/bridge/br_fdb.c | 193 +- net/bridge/br_if.c | 25 +- net/bridge/br_ioctl.c | 2 +- net/bridge/br_netfilter.c | 2 +- net/bridge/br_notify.c | 9 - net/bridge/br_private.h | 19 +- net/bridge/br_stp_if.c | 3 - net/bridge/netfilter/ebtables.c | 27 +- net/core/datagram.c | 47 +- net/core/dev.c | 225 +- net/core/dst.c | 48 +- net/core/iovec.c | 25 +- net/core/neighbour.c | 123 +- net/core/net-sysfs.c | 20 +- net/core/netfilter.c | 130 +- net/core/netpoll.c | 242 +- net/core/pktgen.c | 3773 +- net/core/rtnetlink.c | 121 +- net/core/scm.c | 1 + net/core/skbuff.c | 222 +- net/core/sock.c | 317 +- net/decnet/af_decnet.c | 69 +- net/decnet/dn_dev.c | 31 +- net/decnet/dn_nsp_in.c | 2 +- net/decnet/dn_route.c | 11 +- net/econet/af_econet.c | 45 +- net/ethernet/eth.c | 4 +- net/ipv4/Kconfig | 47 +- net/ipv4/Makefile | 5 - net/ipv4/af_inet.c | 124 +- net/ipv4/ah4.c | 6 +- net/ipv4/arp.c | 13 +- net/ipv4/devinet.c | 125 +- net/ipv4/esp4.c | 11 +- net/ipv4/fib_frontend.c | 6 +- net/ipv4/fib_hash.c | 140 +- net/ipv4/fib_semantics.c | 97 +- net/ipv4/icmp.c | 54 +- net/ipv4/igmp.c | 32 +- net/ipv4/ip_fragment.c | 25 +- net/ipv4/ip_gre.c | 20 +- net/ipv4/ip_input.c | 9 +- net/ipv4/ip_nat_dumb.c | 166 + net/ipv4/ip_output.c | 42 +- net/ipv4/ip_sockglue.c | 20 +- net/ipv4/ipcomp.c | 32 +- net/ipv4/ipconfig.c | 27 +- net/ipv4/ipip.c | 8 +- net/ipv4/ipmr.c | 6 +- net/ipv4/ipvs/ip_vs_core.c | 28 +- net/ipv4/ipvs/ip_vs_ctl.c | 31 +- net/ipv4/ipvs/ip_vs_sync.c | 24 +- net/ipv4/ipvs/ip_vs_xmit.c | 12 +- net/ipv4/netfilter/Kconfig | 129 +- net/ipv4/netfilter/Makefile | 25 +- net/ipv4/netfilter/arp_tables.c | 29 +- net/ipv4/netfilter/ip_conntrack_amanda.c | 56 +- net/ipv4/netfilter/ip_conntrack_core.c | 736 +- net/ipv4/netfilter/ip_conntrack_ftp.c | 171 +- net/ipv4/netfilter/ip_conntrack_pptp.c | 342 +- net/ipv4/netfilter/ip_conntrack_proto_gre.c | 162 +- net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 2 +- net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 2 +- net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 185 +- net/ipv4/netfilter/ip_conntrack_standalone.c | 226 +- net/ipv4/netfilter/ip_nat_core.c | 886 +- net/ipv4/netfilter/ip_nat_pptp.c | 445 +- net/ipv4/netfilter/ip_nat_proto_gre.c | 24 +- net/ipv4/netfilter/ip_nat_snmp_basic.c | 147 +- net/ipv4/netfilter/ip_nat_standalone.c | 165 +- net/ipv4/netfilter/ip_tables.c | 312 +- net/ipv4/netfilter/ipt_LOG.c | 20 +- net/ipv4/netfilter/ipt_MARK.c | 115 +- net/ipv4/netfilter/ipt_MASQUERADE.c | 20 +- net/ipv4/netfilter/ipt_REJECT.c | 163 +- net/ipv4/netfilter/ipt_ULOG.c | 4 +- net/ipv4/netfilter/ipt_helper.c | 16 +- net/ipv4/netfilter/iptable_mangle.c | 22 +- net/ipv4/netfilter/iptable_raw.c | 28 +- net/ipv4/protocol.c | 4 +- net/ipv4/raw.c | 76 +- net/ipv4/route.c | 848 +- net/ipv4/sysctl_net_ipv4.c | 17 - net/ipv4/tcp.c | 186 +- net/ipv4/tcp_diag.c | 7 - net/ipv4/tcp_input.c | 745 +- net/ipv4/tcp_ipv4.c | 256 +- net/ipv4/tcp_minisocks.c | 216 +- net/ipv4/tcp_output.c | 225 +- net/ipv4/tcp_timer.c | 45 +- net/ipv4/udp.c | 109 +- net/ipv4/xfrm4_policy.c | 129 +- net/ipv4/xfrm4_state.c | 4 +- net/ipv4/xfrm4_tunnel.c | 2 +- net/ipv6/addrconf.c | 181 +- net/ipv6/af_inet6.c | 84 +- net/ipv6/ah6.c | 6 +- net/ipv6/anycast.c | 36 +- net/ipv6/datagram.c | 4 +- net/ipv6/esp6.c | 21 +- net/ipv6/exthdrs.c | 77 + net/ipv6/icmp.c | 56 +- net/ipv6/ip6_flowlabel.c | 25 +- net/ipv6/ip6_input.c | 34 +- net/ipv6/ip6_output.c | 50 +- net/ipv6/ip6_tunnel.c | 12 +- net/ipv6/ipcomp6.c | 20 +- net/ipv6/ipv6_sockglue.c | 10 +- net/ipv6/ipv6_syms.c | 3 + net/ipv6/mcast.c | 34 +- net/ipv6/ndisc.c | 246 +- net/ipv6/netfilter/ip6_tables.c | 41 +- net/ipv6/netfilter/ip6t_LOG.c | 10 +- net/ipv6/netfilter/ip6table_raw.c | 3 +- net/ipv6/proc.c | 34 +- net/ipv6/raw.c | 109 +- net/ipv6/reassembly.c | 2 +- net/ipv6/route.c | 117 +- net/ipv6/sit.c | 10 +- net/ipv6/tcp_ipv6.c | 220 +- net/ipv6/udp.c | 46 +- net/ipv6/xfrm6_policy.c | 135 +- net/ipv6/xfrm6_state.c | 6 +- net/ipx/af_ipx.c | 91 +- net/irda/af_irda.c | 152 +- net/irda/discovery.c | 45 +- net/irda/ircomm/ircomm_core.c | 52 +- net/irda/ircomm/ircomm_tty.c | 107 +- net/irda/irda_device.c | 117 +- net/irda/iriap.c | 160 +- net/irda/irlap_event.c | 101 +- net/irda/irlmp.c | 199 +- net/key/af_key.c | 84 +- net/lapb/lapb_iface.c | 2 +- net/llc/af_llc.c | 72 +- net/netlink/af_netlink.c | 258 +- net/netrom/af_netrom.c | 100 +- net/netrom/nr_in.c | 8 +- net/packet/af_packet.c | 114 +- net/rose/af_rose.c | 104 +- net/rose/rose_route.c | 15 +- net/rxrpc/call.c | 15 +- net/rxrpc/connection.c | 4 +- net/rxrpc/rxrpc_syms.c | 1 + net/rxrpc/transport.c | 12 +- net/sched/Kconfig | 114 +- net/sched/Makefile | 17 +- net/sched/cls_api.c | 209 +- net/sched/cls_fw.c | 168 +- net/sched/cls_route.c | 344 +- net/sched/cls_rsvp.h | 102 +- net/sched/cls_tcindex.c | 373 +- net/sched/cls_u32.c | 162 +- net/sched/estimator.c | 2 +- net/sched/police.c | 186 +- net/sched/sch_api.c | 60 +- net/sched/sch_atm.c | 6 +- net/sched/sch_cbq.c | 84 +- net/sched/sch_generic.c | 11 +- net/sched/sch_gred.c | 15 +- net/sched/sch_hfsc.c | 48 +- net/sched/sch_htb.c | 64 +- net/sched/sch_ingress.c | 22 +- net/sched/sch_prio.c | 73 +- net/sched/sch_red.c | 2 +- net/sched/sch_tbf.c | 2 +- net/sctp/associola.c | 91 +- net/sctp/chunk.c | 10 +- net/sctp/endpointola.c | 61 +- net/sctp/inqueue.c | 39 +- net/sctp/ipv6.c | 106 +- net/sctp/output.c | 8 +- net/sctp/outqueue.c | 15 +- net/sctp/protocol.c | 82 +- net/sctp/sm_make_chunk.c | 180 +- net/sctp/sm_statefuns.c | 554 +- net/sctp/socket.c | 260 +- net/sctp/ulpevent.c | 17 +- net/sctp/ulpqueue.c | 24 +- net/socket.c | 61 +- net/sunrpc/auth.c | 205 +- net/sunrpc/auth_gss/auth_gss.c | 633 +- net/sunrpc/auth_gss/gss_generic_token.c | 35 + net/sunrpc/auth_gss/gss_krb5_crypto.c | 2 +- net/sunrpc/auth_gss/gss_krb5_mech.c | 108 +- net/sunrpc/auth_gss/gss_mech_switch.c | 20 +- net/sunrpc/auth_gss/svcauth_gss.c | 34 +- net/sunrpc/auth_unix.c | 87 +- net/sunrpc/cache.c | 49 +- net/sunrpc/clnt.c | 94 +- net/sunrpc/pmap_clnt.c | 11 +- net/sunrpc/rpc_pipe.c | 10 +- net/sunrpc/svcauth_unix.c | 116 +- net/sunrpc/svcsock.c | 7 +- net/sunrpc/xprt.c | 28 +- net/tux/accept.c | 6 +- net/tux/cachemiss.c | 3 +- net/tux/directory.c | 2 +- net/tux/input.c | 6 +- net/tux/logger.c | 2 +- net/tux/main.c | 2 +- net/tux/output.c | 4 +- net/tux/proto_ftp.c | 6 +- net/tux/proto_http.c | 2 +- net/unix/af_unix.c | 103 +- net/wanrouter/af_wanpipe.c | 61 +- net/x25/af_x25.c | 156 +- net/xfrm/Makefile | 3 +- net/xfrm/xfrm_policy.c | 168 +- net/xfrm/xfrm_state.c | 127 +- net/xfrm/xfrm_user.c | 112 +- scripts/Makefile.modinst | 5 +- scripts/kallsyms.c | 91 +- scripts/kconfig/.kxgettext.o.cmd | 48 + scripts/kconfig/Makefile | 24 +- scripts/kconfig/conf.c | 20 +- scripts/kconfig/confdata.c | 4 +- scripts/kconfig/kxgettext.o | Bin 0 -> 2324 bytes scripts/kconfig/mconf.c | 542 +- scripts/kernel-2.6-planetlab.spec | 1314 +- scripts/kernel-doc | 127 +- scripts/mkcompile_h | 4 +- scripts/reference_init.pl | 4 +- security/commoncap.c | 82 +- security/dummy.c | 86 +- security/security.c | 4 +- security/selinux/Kconfig | 32 +- security/selinux/avc.c | 306 +- security/selinux/hooks.c | 531 +- security/selinux/include/av_inherit.h | 73 +- security/selinux/include/av_perm_to_string.h | 462 +- security/selinux/include/av_permissions.h | 57 +- security/selinux/include/avc.h | 7 + security/selinux/include/class_to_string.h | 112 +- security/selinux/include/flask.h | 4 - security/selinux/include/objsec.h | 8 +- security/selinux/include/security.h | 13 +- security/selinux/netif.c | 2 +- security/selinux/selinuxfs.c | 164 +- security/selinux/ss/avtab.c | 61 +- security/selinux/ss/avtab.h | 6 + security/selinux/ss/conditional.c | 54 +- security/selinux/ss/ebitmap.c | 64 +- security/selinux/ss/mls.c | 729 +- security/selinux/ss/policydb.c | 862 +- security/selinux/ss/services.c | 286 +- security/selinux/ss/sidtab.c | 36 + sound/arm/sa11xx-uda1341.c | 10 +- sound/core/Kconfig | 24 +- sound/core/control.c | 366 +- sound/core/init.c | 178 +- sound/core/memory.c | 16 +- sound/core/oss/pcm_oss.c | 72 +- sound/core/oss/pcm_plugin.c | 49 +- sound/core/oss/route.c | 91 +- sound/core/pcm_lib.c | 117 +- sound/core/pcm_memory.c | 4 +- sound/core/pcm_native.c | 120 +- sound/core/rawmidi.c | 256 +- sound/core/rtctimer.c | 2 - sound/core/seq/Makefile | 2 - sound/core/seq/oss/seq_oss.c | 21 +- sound/core/seq/oss/seq_oss_init.c | 85 +- sound/core/seq/seq_clientmgr.c | 38 +- sound/core/seq/seq_dummy.c | 1 - sound/core/seq/seq_midi.c | 104 +- sound/core/sound.c | 36 +- sound/core/timer.c | 109 +- sound/drivers/mpu401/mpu401.c | 252 +- sound/drivers/mtpav.c | 7 +- sound/drivers/opl3/opl3_lib.c | 6 +- sound/drivers/opl3/opl3_seq.c | 4 +- sound/drivers/serial-u16550.c | 23 +- sound/drivers/vx/vx_core.c | 127 +- sound/isa/Kconfig | 42 +- sound/isa/ad1848/ad1848_lib.c | 34 +- sound/isa/als100.c | 4 +- sound/isa/cs423x/cs4231_lib.c | 46 +- sound/isa/cs423x/cs4236.c | 2 - sound/isa/es18xx.c | 16 +- sound/isa/gus/interwave.c | 2 - sound/isa/opl3sa2.c | 18 +- sound/isa/opti9xx/opti92x-ad1848.c | 12 +- sound/isa/sb/emu8000_patch.c | 4 +- sound/isa/sscape.c | 26 +- sound/isa/wavefront/wavefront.c | 6 +- sound/isa/wavefront/wavefront_fx.c | 3 +- sound/isa/wavefront/wavefront_synth.c | 238 +- sound/oss/Kconfig | 42 +- sound/oss/Makefile | 3 - sound/oss/ac97.c | 13 +- sound/oss/ac97.h | 16 + sound/oss/ac97_codec.c | 174 +- sound/oss/aci.c | 6 +- sound/oss/ad1816.c | 23 +- sound/oss/ad1848.c | 30 +- sound/oss/ad1889.c | 18 +- sound/oss/awe_wave.c | 14 +- sound/oss/cmpci.c | 133 +- sound/oss/dmasound/dac3550a.c | 4 + sound/oss/dmasound/dmasound_awacs.c | 9 +- sound/oss/gus_wave.c | 7 +- sound/oss/i810_audio.c | 149 +- sound/oss/maui.c | 4 +- sound/oss/midibuf.c | 2 +- sound/oss/mpu401.c | 4 +- sound/oss/nm256_audio.c | 14 +- sound/oss/opl3.c | 2 +- sound/oss/opl3sa2.c | 31 +- sound/oss/pss.c | 36 +- sound/oss/sb_card.c | 6 +- sound/oss/sequencer.c | 4 +- sound/oss/soundcard.c | 14 +- sound/oss/sscape.c | 16 +- sound/oss/sys_timer.c | 2 +- sound/oss/trident.c | 54 +- sound/oss/via82cxxx_audio.c | 220 +- sound/oss/vwsnd.c | 6 +- sound/oss/waveartist.c | 2 +- sound/oss/wavfront.c | 158 +- sound/oss/wf_midi.c | 2 +- sound/parisc/harmony.c | 1598 +- sound/pci/Kconfig | 57 +- sound/pci/ac97/ac97_codec.c | 1096 +- sound/pci/ac97/ac97_local.h | 41 +- sound/pci/ac97/ac97_patch.c | 347 +- sound/pci/ac97/ac97_pcm.c | 18 +- sound/pci/ac97/ac97_proc.c | 12 +- sound/pci/ali5451/ali5451.c | 13 +- sound/pci/als4000.c | 111 +- sound/pci/atiixp.c | 78 +- sound/pci/au88x0/au88x0.c | 22 +- sound/pci/au88x0/au88x0.h | 8 +- sound/pci/au88x0/au88x0_core.c | 60 +- sound/pci/au88x0/au88x0_eq.c | 58 +- sound/pci/au88x0/au88x0_game.c | 54 +- sound/pci/au88x0/au88x0_pcm.c | 110 +- sound/pci/azt3328.c | 140 +- sound/pci/bt87x.c | 153 +- sound/pci/cmipci.c | 188 +- sound/pci/cs4281.c | 101 +- sound/pci/cs46xx/cs46xx_lib.c | 164 +- sound/pci/cs46xx/dsp_spos_scb_lib.c | 12 +- sound/pci/emu10k1/emu10k1.c | 64 +- sound/pci/emu10k1/emu10k1_main.c | 207 +- sound/pci/emu10k1/emufx.c | 429 +- sound/pci/emu10k1/emumixer.c | 408 +- sound/pci/ens1370.c | 146 +- sound/pci/es1938.c | 73 +- sound/pci/es1968.c | 103 +- sound/pci/fm801.c | 2 +- sound/pci/ice1712/Makefile | 2 +- sound/pci/ice1712/aureon.c | 510 +- sound/pci/ice1712/aureon.h | 10 +- sound/pci/ice1712/delta.c | 3 - sound/pci/ice1712/envy24ht.h | 2 +- sound/pci/ice1712/ice1712.c | 32 +- sound/pci/ice1712/ice1712.h | 13 +- sound/pci/ice1712/ice1724.c | 80 +- sound/pci/ice1712/revo.c | 24 - sound/pci/intel8x0.c | 116 +- sound/pci/intel8x0m.c | 94 +- sound/pci/korg1212/korg1212.c | 90 +- sound/pci/maestro3.c | 42 +- sound/pci/mixart/mixart.c | 26 +- sound/pci/nm256/nm256.c | 10 +- sound/pci/rme32.c | 11 +- sound/pci/rme96.c | 10 +- sound/pci/rme9652/hdsp.c | 606 +- sound/pci/rme9652/rme9652.c | 2 +- sound/pci/sonicvibes.c | 59 +- sound/pci/trident/trident.c | 2 +- sound/pci/trident/trident_main.c | 136 +- sound/pci/via82xx.c | 236 +- sound/pci/vx222/vx222.c | 7 +- sound/pci/ymfpci/ymfpci.c | 150 +- sound/pci/ymfpci/ymfpci_main.c | 30 +- sound/pcmcia/pdaudiocf/pdaudiocf.c | 42 +- sound/pcmcia/pdaudiocf/pdaudiocf.h | 6 +- sound/pcmcia/pdaudiocf/pdaudiocf_core.c | 10 +- sound/pcmcia/vx/vxpocket.c | 10 +- sound/ppc/keywest.c | 2 + sound/ppc/pmac.c | 247 +- sound/ppc/pmac.h | 10 +- sound/ppc/powermac.c | 7 - sound/ppc/tumbler.c | 433 +- sound/sparc/cs4231.c | 23 +- sound/usb/usbaudio.c | 130 +- sound/usb/usbaudio.h | 16 +- sound/usb/usbmixer.c | 72 +- sound/usb/usbquirks.h | 250 +- 3853 files changed, 292150 insertions(+), 230065 deletions(-) create mode 100644 Documentation/filesystems/relayfs.txt create mode 100644 Documentation/usb/philips.txt create mode 100644 arch/alpha/lib/io.c create mode 100644 arch/arm/configs/iq80310_defconfig create mode 100644 arch/arm/mach-iop3xx/iop310-irq.c create mode 100644 arch/arm/mach-iop3xx/iop310-pci.c create mode 100644 arch/arm/mach-iop3xx/iq80310-irq.c create mode 100644 arch/arm/mach-iop3xx/iq80310-pci.c create mode 100644 arch/arm/mach-iop3xx/iq80310-time.c create mode 100644 arch/arm/mach-iop3xx/mm.c create mode 100644 arch/arm/mach-iop3xx/xs80200-irq.c create mode 100644 arch/arm/mach-omap/bus.c create mode 100644 arch/arm/mach-omap/leds-perseus2.c create mode 100644 arch/i386/kernel/entry_trampoline.c create mode 100644 arch/i386/power/pmdisk.S create mode 100644 arch/ia64/sn/fakeprom/Makefile create mode 100644 arch/ia64/sn/fakeprom/README create mode 100644 arch/ia64/sn/fakeprom/fpmem.c create mode 100644 arch/ia64/sn/fakeprom/fpmem.h create mode 100644 arch/ia64/sn/fakeprom/fprom.lds create mode 100644 arch/ia64/sn/fakeprom/fpromasm.S create mode 100644 arch/ia64/sn/fakeprom/fw-emu.c create mode 100644 arch/ia64/sn/fakeprom/klgraph_init.c create mode 100644 arch/ia64/sn/fakeprom/main.c create mode 100644 arch/ia64/sn/fakeprom/make_textsym create mode 100644 arch/ia64/sn/fakeprom/runsim create mode 100644 arch/ia64/sn/io/Makefile create mode 100644 arch/ia64/sn/io/cdl.c create mode 100644 arch/ia64/sn/io/drivers/Makefile create mode 100644 arch/ia64/sn/io/drivers/ioconfig_bus.c create mode 100644 arch/ia64/sn/io/hwgfs/Makefile create mode 100644 arch/ia64/sn/io/hwgfs/hcl.c create mode 100644 arch/ia64/sn/io/hwgfs/hcl_util.c create mode 100644 arch/ia64/sn/io/hwgfs/interface.c create mode 100644 arch/ia64/sn/io/hwgfs/labelcl.c create mode 100644 arch/ia64/sn/io/hwgfs/ramfs.c create mode 100644 arch/ia64/sn/io/io.c create mode 100644 arch/ia64/sn/io/machvec/Makefile create mode 100644 arch/ia64/sn/io/machvec/iomv.c create mode 100644 arch/ia64/sn/io/machvec/pci.c create mode 100644 arch/ia64/sn/io/machvec/pci_bus_cvlink.c create mode 100644 arch/ia64/sn/io/machvec/pci_dma.c create mode 100644 arch/ia64/sn/io/platform_init/Makefile create mode 100644 arch/ia64/sn/io/platform_init/sgi_io_init.c create mode 100644 arch/ia64/sn/io/sn2/Makefile create mode 100644 arch/ia64/sn/io/sn2/bte_error.c create mode 100644 arch/ia64/sn/io/sn2/geo_op.c create mode 100644 arch/ia64/sn/io/sn2/klconflib.c create mode 100644 arch/ia64/sn/io/sn2/klgraph.c create mode 100644 arch/ia64/sn/io/sn2/l1_command.c create mode 100644 arch/ia64/sn/io/sn2/ml_SN_init.c create mode 100644 arch/ia64/sn/io/sn2/ml_SN_intr.c create mode 100644 arch/ia64/sn/io/sn2/ml_iograph.c create mode 100644 arch/ia64/sn/io/sn2/module.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/Makefile create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_config.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_error.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_hints.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_reg.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c create mode 100644 arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c create mode 100644 arch/ia64/sn/io/sn2/pciio.c create mode 100644 arch/ia64/sn/io/sn2/pic.c create mode 100644 arch/ia64/sn/io/sn2/shub.c create mode 100644 arch/ia64/sn/io/sn2/shub_intr.c create mode 100644 arch/ia64/sn/io/sn2/shuberror.c create mode 100644 arch/ia64/sn/io/sn2/shubio.c create mode 100644 arch/ia64/sn/io/sn2/xbow.c create mode 100644 arch/ia64/sn/io/sn2/xtalk.c create mode 100644 arch/ia64/sn/io/snia_if.c create mode 100644 arch/ia64/sn/io/xswitch.c create mode 100644 arch/ppc/boot/include/zlib.h create mode 100644 arch/ppc/boot/lib/zlib.c create mode 100644 arch/ppc/boot/simple/chrpmap.S create mode 100644 arch/ppc/boot/simple/legacy.S create mode 100644 arch/ppc/boot/simple/misc-chestnut.S delete mode 100644 arch/ppc/boot/simple/mv64x60_tty.c 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/est8260_setup.c delete mode 100644 arch/ppc/platforms/ev64260.c create mode 100644 arch/ppc/platforms/lopec_pci.c create mode 100644 arch/ppc/platforms/lopec_serial.h create mode 100644 arch/ppc/platforms/lopec_setup.c create mode 100644 arch/ppc/platforms/mcpn765_serial.h create mode 100644 arch/ppc/platforms/mvme5100_pci.c create mode 100644 arch/ppc/platforms/mvme5100_serial.h create mode 100644 arch/ppc/platforms/mvme5100_setup.c create mode 100644 arch/ppc/platforms/powerpmc250_serial.h create mode 100644 arch/ppc/platforms/pq2ads_setup.c create mode 100644 arch/ppc/platforms/prpmc750_serial.h create mode 100644 arch/ppc/platforms/prpmc800_serial.h create mode 100644 arch/ppc/platforms/rpx8260.c delete mode 100644 arch/ppc/syslib/mv64360_pic.c delete mode 100644 arch/ppc/syslib/mv64x60.c create mode 100644 arch/ppc64/boot/addSystemMap.c create mode 100644 arch/ppc64/kernel/chrp_setup.c create mode 100644 arch/ppc64/kernel/pSeries_htab.c create mode 100644 arch/ppc64/kernel/pmac_iommu.c create mode 100644 arch/ppc64/kernel/stab.c create mode 100644 arch/sparc64/lib/U3copy_in_user.S create mode 100644 arch/sparc64/lib/VIScopy.S create mode 100644 arch/sparc64/lib/rwlock.S create mode 100644 arch/sparc64/lib/splock.S create mode 100644 arch/um/drivers/hostaudio_user.c create mode 100644 arch/um/dyn.lds.S create mode 100644 arch/um/include/Makefile create mode 100644 arch/um/include/hostaudio.h create mode 100644 arch/um/kernel/mprot.h create mode 100644 arch/um/kernel/skas/exec_user.c create mode 100644 arch/um/kernel/skas/include/mmu.h create mode 100644 arch/um/kernel/skas/include/mode.h create mode 100644 arch/um/kernel/skas/include/mode_kern.h create mode 100644 arch/um/kernel/skas/include/uaccess.h create mode 100644 arch/um/kernel/tt/include/mmu.h create mode 100644 arch/um/kernel/tt/include/mode.h create mode 100644 arch/um/kernel/tt/include/mode_kern.h create mode 100644 arch/um/kernel/tt/include/uaccess.h create mode 100644 arch/um/kernel/user_syms.c delete mode 100644 arch/um/kernel/vmlinux.lds.S create mode 100644 arch/um/main.c create mode 100644 arch/um/sys-i386/extable.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/um/uml.lds.S create mode 100644 arch/x86_64/kernel/Makefile-HEAD create mode 100644 arch/x86_64/kernel/domain.c delete mode 100644 arch/xen/kernel/vmlinux.lds.S delete mode 100644 configs/kernel-2.6.12-i686-smp-planetlab.config delete mode 100644 configs/kernel-2.6.12-i686-uml-planetlab.config delete mode 100644 configs/kernel-2.6.12-i686-xenU-planetlab.config create mode 100644 drivers/char/busmouse.c create mode 100644 drivers/char/busmouse.h create mode 100644 drivers/dump/Makefile create mode 100644 drivers/dump/dump_arm.c create mode 100644 drivers/dump/dump_blockdev.c create mode 100644 drivers/dump/dump_execute.c create mode 100644 drivers/dump/dump_filters.c create mode 100644 drivers/dump/dump_fmt.c create mode 100644 drivers/dump/dump_gzip.c create mode 100644 drivers/dump/dump_i386.c create mode 100644 drivers/dump/dump_memdev.c create mode 100644 drivers/dump/dump_methods.h create mode 100644 drivers/dump/dump_netdev.c create mode 100644 drivers/dump/dump_overlay.c create mode 100644 drivers/dump/dump_ppc64.c create mode 100644 drivers/dump/dump_rle.c create mode 100644 drivers/dump/dump_scheme.c create mode 100644 drivers/dump/dump_setup.c create mode 100644 drivers/i2c/i2c-sensor.c create mode 100644 drivers/media/dvb/dibusb/dvb-dibusb-pid.c create mode 100644 drivers/message/fusion/ascq_tbl.c create mode 100644 drivers/message/fusion/ascq_tbl.sh create mode 100644 drivers/message/fusion/isense.c create mode 100644 drivers/message/fusion/isense.h create mode 100644 drivers/message/fusion/scsi3.h create mode 100644 drivers/message/fusion/scsiops.c create mode 100644 drivers/message/i2o/i2o_core.c create mode 100644 drivers/mtd/maps/chestnut.c create mode 100644 drivers/scsi/dc390.h delete mode 100644 drivers/scsi/lpfc/Makefile delete mode 100644 drivers/scsi/lpfc/lpfc.h delete mode 100644 drivers/scsi/lpfc/lpfc_compat.h delete mode 100644 drivers/scsi/lpfc/lpfc_crtn.h delete mode 100644 drivers/scsi/lpfc/lpfc_ct.c delete mode 100644 drivers/scsi/lpfc/lpfc_disc.h delete mode 100644 drivers/scsi/lpfc/lpfc_els.c delete mode 100644 drivers/scsi/lpfc/lpfc_hbadisc.c delete mode 100644 drivers/scsi/lpfc/lpfc_hw.h delete mode 100644 drivers/scsi/lpfc/lpfc_init.c delete mode 100644 drivers/scsi/lpfc/lpfc_logmsg.h delete mode 100644 drivers/scsi/lpfc/lpfc_mbox.c delete mode 100644 drivers/scsi/lpfc/lpfc_mem.c delete mode 100644 drivers/scsi/lpfc/lpfc_nportdisc.c delete mode 100644 drivers/scsi/lpfc/lpfc_scsi.h delete mode 100644 drivers/scsi/lpfc/lpfc_sli.c delete mode 100644 drivers/scsi/lpfc/lpfc_sli.h delete mode 100644 drivers/scsi/lpfc/lpfc_version.h create mode 100644 drivers/usb/host/ohci-omap.h create mode 100644 drivers/usb/media/pwc-ctrl.c create mode 100644 drivers/usb/media/pwc-if.c create mode 100644 drivers/usb/media/pwc-ioctl.h create mode 100644 drivers/usb/media/pwc-misc.c create mode 100644 drivers/usb/media/pwc-uncompress.c create mode 100644 drivers/usb/media/pwc-uncompress.h create mode 100644 drivers/usb/media/pwc.h create mode 100644 drivers/usb/media/pwc_kiara.h create mode 100644 drivers/usb/media/pwc_nala.h create mode 100644 drivers/usb/media/pwc_timon.h create mode 100644 fs/relayfs/Makefile create mode 100644 fs/relayfs/inode.c create mode 100644 fs/relayfs/klog.c create mode 100644 fs/relayfs/relay.c create mode 100644 fs/relayfs/relay_locking.c create mode 100644 fs/relayfs/relay_locking.h create mode 100644 fs/relayfs/relay_lockless.c create mode 100644 fs/relayfs/relay_lockless.h create mode 100644 fs/relayfs/resize.c create mode 100644 fs/relayfs/resize.h create mode 100644 fs/xfs/xfs_cap.c create mode 100644 fs/xfs/xfs_mac.c create mode 100644 include/asm-alpha/relay.h create mode 100644 include/asm-arm/arch-iop3xx/iop310-irqs.h create mode 100644 include/asm-arm/arch-iop3xx/iop310.h create mode 100644 include/asm-arm/arch-iop3xx/iq80310.h create mode 100644 include/asm-arm/arch-iop3xx/pmon.h create mode 100644 include/asm-arm/arch-omap/bus.h create mode 100644 include/asm-arm/relay.h create mode 100644 include/asm-arm26/relay.h create mode 100644 include/asm-cris/relay.h create mode 100644 include/asm-generic/relay.h create mode 100644 include/asm-h8300/relay.h create mode 100644 include/asm-h8300/softirq.h create mode 100644 include/asm-i386/atomic_kmap.h create mode 100644 include/asm-i386/dump.h create mode 100644 include/asm-i386/relay.h create mode 100644 include/asm-ia64/relay.h create mode 100644 include/asm-ia64/sn/cdl.h create mode 100644 include/asm-ia64/sn/dmamap.h create mode 100644 include/asm-ia64/sn/driver.h create mode 100644 include/asm-ia64/sn/hcl.h create mode 100644 include/asm-ia64/sn/hcl_util.h create mode 100644 include/asm-ia64/sn/hwgfs.h create mode 100644 include/asm-ia64/sn/ifconfig_net.h create mode 100644 include/asm-ia64/sn/ioc4.h create mode 100644 include/asm-ia64/sn/ioconfig_bus.h create mode 100644 include/asm-ia64/sn/ioerror.h create mode 100644 include/asm-ia64/sn/ioerror_handling.h create mode 100644 include/asm-ia64/sn/iograph.h create mode 100644 include/asm-ia64/sn/kldir.h create mode 100644 include/asm-ia64/sn/ksys/elsc.h create mode 100644 include/asm-ia64/sn/ksys/l1.h create mode 100644 include/asm-ia64/sn/labelcl.h create mode 100644 include/asm-ia64/sn/pci/bridge.h create mode 100644 include/asm-ia64/sn/pci/pci_bus_cvlink.h create mode 100644 include/asm-ia64/sn/pci/pci_defs.h create mode 100644 include/asm-ia64/sn/pci/pcibr.h create mode 100644 include/asm-ia64/sn/pci/pcibr_private.h create mode 100644 include/asm-ia64/sn/pci/pciio.h create mode 100644 include/asm-ia64/sn/pci/pciio_private.h create mode 100644 include/asm-ia64/sn/pci/pic.h create mode 100644 include/asm-ia64/sn/pio.h create mode 100644 include/asm-ia64/sn/prio.h create mode 100644 include/asm-ia64/sn/sgi.h create mode 100644 include/asm-ia64/sn/slotnum.h create mode 100644 include/asm-ia64/sn/sn2/addrs.h create mode 100644 include/asm-ia64/sn/sn2/arch.h create mode 100644 include/asm-ia64/sn/sn2/geo.h create mode 100644 include/asm-ia64/sn/sn2/intr.h create mode 100644 include/asm-ia64/sn/sn2/io.h create mode 100644 include/asm-ia64/sn/sn2/shub.h create mode 100644 include/asm-ia64/sn/sn2/shub_md.h create mode 100644 include/asm-ia64/sn/sn2/shub_mmr.h create mode 100644 include/asm-ia64/sn/sn2/shub_mmr_t.h create mode 100644 include/asm-ia64/sn/sn2/shubio.h create mode 100644 include/asm-ia64/sn/sn2/slotnum.h create mode 100644 include/asm-ia64/sn/sn2/sn_private.h create mode 100644 include/asm-ia64/sn/sn_private.h create mode 100644 include/asm-ia64/sn/vector.h create mode 100644 include/asm-ia64/sn/xtalk/xbow.h create mode 100644 include/asm-ia64/sn/xtalk/xbow_info.h create mode 100644 include/asm-ia64/sn/xtalk/xswitch.h create mode 100644 include/asm-ia64/sn/xtalk/xtalk.h create mode 100644 include/asm-ia64/sn/xtalk/xtalk_private.h create mode 100644 include/asm-ia64/sn/xtalk/xtalkaddrs.h create mode 100644 include/asm-ia64/sn/xtalk/xwidget.h create mode 100644 include/asm-m68k/relay.h create mode 100644 include/asm-m68knommu/relay.h create mode 100644 include/asm-mips/mv64340.h create mode 100644 include/asm-mips/relay.h create mode 100644 include/asm-mips64/relay.h create mode 100644 include/asm-parisc/relay.h delete mode 100644 include/asm-ppc/mv64x60.h delete mode 100644 include/asm-ppc/mv64x60_defs.h create mode 100644 include/asm-ppc/relay.h create mode 100644 include/asm-ppc64/bootx.h create mode 100644 include/asm-ppc64/relay.h create mode 100644 include/asm-s390/relay.h create mode 100644 include/asm-sh/relay.h create mode 100644 include/asm-sh64/smplock.h create mode 100644 include/asm-sh64/softirq.h create mode 100644 include/asm-sparc/relay.h create mode 100644 include/asm-sparc64/relay.h create mode 100644 include/asm-um/cpumask.h create mode 100644 include/asm-um/init.h create mode 100644 include/asm-um/smplock.h create mode 100644 include/asm-v850/relay.h create mode 100644 include/asm-x86_64/relay.h create mode 100644 include/linux/dump.h create mode 100644 include/linux/dump_netdev.h create mode 100644 include/linux/dumpdev.h create mode 100644 include/linux/klog.h create mode 100644 include/linux/relayfs_fs.h create mode 100644 include/sound/sndmagic.h create mode 100644 init/kerntypes.c create mode 100644 kernel/power/pmdisk.c create mode 100644 lib/zlib_inflate/inffixed.h create mode 100644 mm/proc_mm.c create mode 100644 mm/usercopy.c create mode 100644 net/ipv4/ip_nat_dumb.c create mode 100644 scripts/kconfig/.kxgettext.o.cmd create mode 100644 scripts/kconfig/kxgettext.o diff --git a/CREDITS b/CREDITS index d65ffe5a4..c0bdfc51a 100644 --- a/CREDITS +++ b/CREDITS @@ -34,9 +34,8 @@ N: Dave Airlie E: airlied@linux.ie W: http://www.csn.ul.ie/~airlied D: NFS over TCP patches -D: in-kernel DRM Maintainer -S: Longford, Ireland -S: Sydney, Australia +S: University of Limerick +S: Ireland N: Tigran A. Aivazian E: tigran@veritas.com @@ -329,6 +328,8 @@ S: Brimson, MN 55602 S: USA N: Hennus Bergman +E: hennus@cybercomm.nl +W: http://www.cybercomm.nl/~hennus/ P: 1024/77D50909 76 99 FD 31 91 E1 96 1C 90 BB 22 80 62 F6 BD 63 D: Author and maintainer of the QIC-02 tape driver S: The Netherlands @@ -339,7 +340,7 @@ W: http://tomas.nocrew.org/ D: dsp56k device driver N: Ross Biro -E: ross.biro@gmail.com +E: bir7@leland.Stanford.Edu D: Original author of the Linux networking code N: Anton Blanchard @@ -804,21 +805,6 @@ S: One Dell Way S: Round Rock, TX 78682 S: USA -N: Ben Dooks -E: ben-linux@fluff.org -E: ben@simtec.co.uk -W: http://www.fluff.org/ben/ -W: http://www.simtec.co.uk/ -D: Samsung S3C2410/S3C2440 support, general ARM support -D: Maintaining Simtec Electronics development boards -S: Simtec Electronics -S: Avondale Drive -S: Tarleton -S: Preston -S: Lancs -S: PR4 6AX -S: United Kingdom - N: John G Dorsey E: john+@cs.cmu.edu D: ARM Linux ports to Assabet/Neponset, Spot @@ -840,11 +826,6 @@ E: cort@fsmlabs.com W: http://www.fsmlabs.com/linuxppcbk.html D: PowerPC -N: Daniel Drake -E: dsd@gentoo.org -D: USBAT02 CompactFlash support in usb-storage -S: UK - N: Oleg Drokin E: green@ccssu.crimea.ua W: http://www.ccssu.crimea.ua/~green @@ -882,12 +863,13 @@ S: Blacksburg, Virginia 24061 S: USA N: Randy Dunlap -E: rdunlap@xenotime.net +E: rddunlap@osdl.org W: http://www.xenotime.net/linux/linux.html W: http://www.linux-usb.org D: Linux-USB subsystem, USB core/UHCI/printer/storage drivers D: x86 SMP, ACPI, bootflag hacking -S: (ask for current address) +S: 12725 SW Millikan Way, Suite 400 +S: Beaverton, Oregon 97005 S: USA N: Bob Dunlop @@ -1098,7 +1080,7 @@ S: Brazil N: Kumar Gala E: kumar.gala@freescale.com -D: Embedded PowerPC 6xx/7xx/74xx/82xx/83xx/85xx support +D: Embedded PowerPC 6xx/7xx/74xx/82xx/85xx support S: Austin, Texas 78729 S: USA @@ -1829,8 +1811,7 @@ D: CYPRESS CY82C693 chipset IDE, Digital's PC-Alpha 164SX boards N: Greg Kroah-Hartman E: greg@kroah.com -E: gregkh@suse.de -W: http://www.kroah.com/linux/ +W: http://www.kroah.com/linux-usb/ D: USB Serial Converter driver framework, USB Handspring Visor driver D: ConnectTech WHITEHeat USB driver, Generic USB Serial driver D: USB I/O Edgeport driver, USB Serial IrDA driver @@ -1838,7 +1819,6 @@ D: USB Bluetooth driver, USB Skeleton driver D: bits and pieces of USB core code. D: PCI Hotplug core, PCI Hotplug Compaq driver modifications D: portions of the Linux Security Module (LSM) framework -D: parts of the driver core, debugfs. N: Russell Kroll E: rkroll@exploits.org @@ -1957,8 +1937,7 @@ S: Germany N: Colin Leroy E: colin@colino.net W: http://www.geekounet.org/ -D: PowerMac adt746x fan driver -D: Random fixing of various drivers (macintosh, usb, sound) +D: PowerMac adt7467 fan driver S: Toulouse S: France @@ -2042,17 +2021,6 @@ N: H.J. Lu E: hjl@gnu.ai.mit.edu D: GCC + libraries hacker -N: Michal Ludvig -E: michal@logix.cz -E: michal.ludvig@asterisk.co.nz -W: http://www.logix.cz/michal -P: 1024D/C45B2218 1162 6471 D391 76E0 9F99 29DA 0C3A 2509 C45B 2218 -D: VIA PadLock driver -D: Netfilter pkttype module -S: Asterisk Ltd. -S: Auckland -S: New Zealand - N: Tuomas J. Lukka E: Tuomas.Lukka@Helsinki.FI D: Original dual-monitor patches @@ -2475,9 +2443,13 @@ S: Potsdam, New York 13676 S: USA N: Dave Neuer -E: dave.neuer@pobox.com +E: dneuer@innovation-charter.com +E: mr_fred_smoothie@yahoo.com D: Helped implement support for Compaq's H31xx series iPAQs D: Other mostly minor tweaks & bugfixes +S: 325 E. Main St., Suite 3 +S: Carnegie, PA 15105 +S: USA N: Michael Neuffer E: mike@i-Connect.Net @@ -2955,10 +2927,10 @@ S: 03600 Karkkila S: Finland N: Deepak Saxena -E: dsaxena@plexity.net +E: deepak@csociety.purdue.edu D: I2O kernel layer (config, block, core, pci, net). I2O disk support for LILO -D: XScale(IOP, IXP) porting and other random ARM bits -S: Portland, OR +D: XScale(IOP310) porting +S: Tempe, Arizona N: Eric Schenk E: Eric.Schenk@dna.lth.se @@ -3184,14 +3156,6 @@ S: Department of Zoology, University of Washington S: Seattle, WA 98195-1800 S: USA -N: Eugene Surovegin -E: ebs@ebshome.net -W: http://kernel.ebshome.net/ -P: 1024D/AE5467F1 FF22 39F1 6728 89F6 6E6C 2365 7602 F33D AE54 67F1 -D: Embedded PowerPC 4xx: I2C, PIC and random hacks/fixes -S: Sunnyvale, California 94085 -S: USA - N: Corey Thomas E: corey@world.std.com W: http://world.std.com/~corey/index.html @@ -3294,7 +3258,6 @@ D: Author of the new e2fsck D: Author of job control and system call restart code D: Author of ramdisk device driver D: Author of loopback device driver -D: Author of /dev/random driver S: MIT Room E40-343 S: 1 Amherst Street S: Cambridge, Massachusetts 02139 @@ -3352,11 +3315,10 @@ S: Santa Clara, CA 95054 S: USA N: Matthias Urlichs -E: smurf@smurf.noris.de -E: smurf@debian.org -E: matthias@urlichs.de +E: urlichs@noris.de +E: urlichs@smurf.sub.org D: Consultant, developer, kernel hacker -D: In a previous life, worked on Streams/ISDN/BSD networking code for Linux +D: Playing with Streams, ISDN, and BSD networking code for Linux S: Schleiermacherstrasse 12 S: 90491 Nuernberg S: Germany @@ -3373,7 +3335,7 @@ D: Amiga Buddha and Catweasel chipset IDE D: Atari Falcon chipset IDE D: Amiga Gayle chipset IDE D: mipsel NEC DDB Vrc-5074 -S: Emiel Vlieberghlaan 2A/21 +S: Holsbeeksesteenweg 166 S: B-3010 Kessel-Lo S: Belgium @@ -3428,7 +3390,6 @@ N: Jeroen Vreeken E: pe1rxq@amsat.org W: http://www.chello.nl/~j.vreeken/ D: SE401 usb webcam driver -D: ZD1201 usb wireless lan driver S: Maastrichterweg 63 S: 5554 GG Valkenswaard S: The Netherlands @@ -3608,6 +3569,7 @@ S: The Netherlands N: David Woodhouse E: dwmw2@infradead.org +E: dwmw2@redhat.com D: ARCnet stuff, Applicom board driver, SO_BINDTODEVICE, D: some Alpha platform porting from 2.0, Memory Technology Devices, D: Acquire watchdog timer, PC speaker driver maintenance, diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index 49a9ef82d..1e8219d85 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl @@ -1,6 +1,4 @@ - - + diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index 6df1dfd18..92a405a0e 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl @@ -1,6 +1,4 @@ - - + @@ -14,7 +12,7 @@ - 2003-2005 + 2003 Jeff Garzik @@ -44,38 +42,30 @@ - - Introduction + + Thanks - libATA is a library used inside the Linux kernel to support ATA host - controllers and devices. libATA provides an ATA driver API, class - transports for ATA and ATAPI devices, and SCSI<->ATA translation - for ATA devices according to the T10 SAT specification. + The bulk of the ATA knowledge comes thanks to long conversations with + Andre Hedrick (www.linux-ide.org). - This Guide documents the libATA driver API, library functions, library - internals, and a couple sample ATA low-level drivers. + Thanks to Alan Cox for pointing out similarities + between SATA and SCSI, and in general for motivation to hack on + libata. + + + libata's device detection + method, ata_pio_devchk, and in general all the early probing was + based on extensive study of Hale Landis's probe/reset code in his + ATADRVR driver (www.ata-atapi.com). libata Driver API - - struct ata_port_operations is defined for every low-level libata - hardware driver, and it controls how the low-level driver - interfaces with the ATA and SCSI layers. - - - FIS-based drivers will hook into the system with ->qc_prep() and - ->qc_issue() high-level hooks. Hardware which behaves in a manner - similar to PCI IDE hardware may utilize several generic helpers, - defining at a bare minimum the bus I/O addresses of the ATA shadow - register blocks. - struct ata_port_operations - Disable ATA port void (*port_disable) (struct ata_port *); @@ -86,9 +76,6 @@ void (*port_disable) (struct ata_port *); unplug). - - - Post-IDENTIFY device configuration void (*dev_config) (struct ata_port *, struct ata_device *); @@ -99,9 +86,6 @@ void (*dev_config) (struct ata_port *, struct ata_device *); issue of SET FEATURES - XFER MODE, and prior to operation. - - - Set PIO/DMA mode void (*set_piomode) (struct ata_port *, struct ata_device *); void (*set_dmamode) (struct ata_port *, struct ata_device *); @@ -122,9 +106,6 @@ void (*post_set_mode) (struct ata_port *ap); ->set_dma_mode() is only called if DMA is possible. - - - Taskfile read/write void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf); void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); @@ -137,9 +118,6 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); taskfile register values. - - - ATA command execute void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); @@ -149,37 +127,17 @@ void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); ->tf_load(), to be initiated in hardware. - - - Per-cmd ATAPI DMA capabilities filter - -int (*check_atapi_dma) (struct ata_queued_cmd *qc); - - - -Allow low-level driver to filter ATA PACKET commands, returning a status -indicating whether or not it is OK to use DMA for the supplied PACKET -command. - - - - - Read specific ATA shadow registers u8 (*check_status)(struct ata_port *ap); -u8 (*check_altstatus)(struct ata_port *ap); -u8 (*check_err)(struct ata_port *ap); +void (*dev_select)(struct ata_port *ap, unsigned int device); - Reads the Status/AltStatus/Error ATA shadow register from - hardware. On some hardware, reading the Status register has - the side effect of clearing the interrupt condition. + Reads the Status ATA shadow register from hardware. On some + hardware, this has the side effect of clearing the interrupt + condition. - - - Select ATA device on bus void (*dev_select)(struct ata_port *ap, unsigned int device); @@ -187,13 +145,9 @@ void (*dev_select)(struct ata_port *ap, unsigned int device); Issues the low-level hardware command(s) that causes one of N hardware devices to be considered 'selected' (active and - available for use) on the ATA bus. This generally has no -meaning on FIS-based devices. + available for use) on the ATA bus. - - - Reset ATA bus void (*phy_reset) (struct ata_port *ap); @@ -206,31 +160,17 @@ void (*phy_reset) (struct ata_port *ap); functions ata_bus_reset() or sata_phy_reset() for this hook. - - - Control PCI IDE BMDMA engine void (*bmdma_setup) (struct ata_queued_cmd *qc); void (*bmdma_start) (struct ata_queued_cmd *qc); -void (*bmdma_stop) (struct ata_port *ap); -u8 (*bmdma_status) (struct ata_port *ap); -When setting up an IDE BMDMA transaction, these hooks arm -(->bmdma_setup), fire (->bmdma_start), and halt (->bmdma_stop) -the hardware's DMA engine. ->bmdma_status is used to read the standard -PCI IDE DMA Status register. + When setting up an IDE BMDMA transaction, these hooks arm + (->bmdma_setup) and fire (->bmdma_start) the hardware's DMA + engine. - -These hooks are typically either no-ops, or simply not implemented, in -FIS-based drivers. - - - - - High-level taskfile hooks void (*qc_prep) (struct ata_queued_cmd *qc); int (*qc_issue) (struct ata_queued_cmd *qc); @@ -248,26 +188,20 @@ int (*qc_issue) (struct ata_queued_cmd *qc); ->qc_issue is used to make a command active, once the hardware and S/G tables have been prepared. IDE BMDMA drivers use the helper function ata_qc_issue_prot() for taskfile protocol-based - dispatch. More advanced drivers implement their own ->qc_issue. + dispatch. More advanced drivers roll their own ->qc_issue + implementation, using this as the "issue new ATA command to + hardware" hook. - - - Timeout (error) handling void (*eng_timeout) (struct ata_port *ap); -This is a high level error handling function, called from the -error handling thread, when a command times out. Most newer -hardware will implement its own error handling code here. IDE BMDMA -drivers may use the helper function ata_eng_timeout(). + This is a high level error handling function, called from the + error handling thread, when a command times out. - - - Hardware interrupt handling irqreturn_t (*irq_handler)(int, void *, struct pt_regs *); void (*irq_clear) (struct ata_port *); @@ -280,9 +214,6 @@ void (*irq_clear) (struct ata_port *); is quiet. - - - SATA phy read/write u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, @@ -294,9 +225,6 @@ void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, if ->phy_reset hook called the sata_phy_reset() helper function. - - - Init and shutdown int (*port_start) (struct ata_port *ap); void (*port_stop) (struct ata_port *ap); @@ -310,17 +238,15 @@ void (*host_stop) (struct ata_host_set *host_set); tasks. + ->host_stop() is called when the rmmod or hot unplug process + begins. The hook must stop all hardware interrupts, DMA + engines, etc. + + ->port_stop() is called after ->host_stop(). It's sole function is to release DMA/memory resources, now that they are no longer actively being used. - - ->host_stop() is called after all ->port_stop() calls -have completed. The hook must finalize hardware shutdown, release DMA -and other resources, etc. - - - @@ -351,24 +277,4 @@ and other resources, etc. !Idrivers/scsi/sata_sil.c - - Thanks - - The bulk of the ATA knowledge comes thanks to long conversations with - Andre Hedrick (www.linux-ide.org), and long hours pondering the ATA - and SCSI specifications. - - - Thanks to Alan Cox for pointing out similarities - between SATA and SCSI, and in general for motivation to hack on - libata. - - - libata's device detection - method, ata_pio_devchk, and in general all the early probing was - based on extensive study of Hale Landis's probe/reset code in his - ATADRVR driver (www.ata-atapi.com). - - - diff --git a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl index 3ec6c8755..2c92b1836 100644 --- a/Documentation/DocBook/videobook.tmpl +++ b/Documentation/DocBook/videobook.tmpl @@ -1,6 +1,4 @@ - - + @@ -182,23 +180,23 @@ int __init myradio_init(struct video_init *v) - VFL_TYPE_RADIO/dev/radio{n} + VFL_TYPE_RADIO/dev/radio{n} Radio devices are assigned in this block. As with all of these selections the actual number assignment is done by the video layer accordijng to what is free. - VFL_TYPE_GRABBER/dev/video{n} + VFL_TYPE_GRABBER/dev/video{n} Video capture devices and also -- counter-intuitively for the name -- hardware video playback devices such as MPEG2 cards. - VFL_TYPE_VBI/dev/vbi{n} + VFL_TYPE_VBI/dev/vbi{n} The VBI devices capture the hidden lines on a television picture that carry further information like closed caption data, teletext (primarily in Europe) and now Intercast and the ATVEC internet television encodings. - VFL_TYPE_VTX/dev/vtx[n} + VFL_TYPE_VTX/dev/vtx[n} VTX is 'Videotext' also known as 'Teletext'. This is a system for sending numbered, 40x25, mostly textual page images over the hidden lines. Unlike the /dev/vbi interfaces, this is for 'smart' decoder @@ -303,25 +301,25 @@ static int radio_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - nameThe device text name. This is intended for the user. + nameThe device text name. This is intended for the user. - channelsThe number of different channels you can tune on + channelsThe number of different channels you can tune on this card. It could even by zero for a card that has no tuning capability. For our simple FM radio it is 1. An AM/FM radio would report 2. - audiosThe number of audio inputs on this device. For our + audiosThe number of audio inputs on this device. For our radio there is only one audio input. - minwidth,minheightThe smallest size the card is capable of capturing + minwidth,minheightThe smallest size the card is capable of capturing images in. We set these to zero. Radios do not capture pictures - maxwidth,maxheightThe largest image size the card is capable of + maxwidth,maxheightThe largest image size the card is capable of capturing. For our radio we report 0. - typeThis reports the capabilities of the device, and + typeThis reports the capabilities of the device, and matches the field we filled in in the struct video_device when registering. @@ -377,26 +375,26 @@ static int radio_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - int tunerThe number of the tuner in question + int tunerThe number of the tuner in question - char name[32]A text description of this tuner. "FM" will do fine. + char name[32]A text description of this tuner. "FM" will do fine. This is intended for the application. - u32 flags + u32 flags Tuner capability flags - u16 modeThe current reception mode + u16 modeThe current reception mode - u16 signalThe signal strength scaled between 0 and 65535. If + u16 signalThe signal strength scaled between 0 and 65535. If a device cannot tell the signal strength it should report 65535. Many simple cards contain only a signal/no signal bit. Such cards will report either 0 or 65535. - u32 rangelow, rangehigh + u32 rangelow, rangehigh The range of frequencies supported by the radio or TV. It is scaled according to the VIDEO_TUNER_LOW flag. @@ -410,20 +408,20 @@ static int radio_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - VIDEO_TUNER_PALA PAL TV tuner + VIDEO_TUNER_PALA PAL TV tuner - VIDEO_TUNER_NTSCAn NTSC (US) TV tuner + VIDEO_TUNER_NTSCAn NTSC (US) TV tuner - VIDEO_TUNER_SECAMA SECAM (French) TV tuner + VIDEO_TUNER_SECAMA SECAM (French) TV tuner - VIDEO_TUNER_LOW + VIDEO_TUNER_LOW The tuner frequency is scaled in 1/16th of a KHz steps. If not it is in 1/16th of a MHz steps - VIDEO_TUNER_NORMThe tuner can set its format + VIDEO_TUNER_NORMThe tuner can set its format - VIDEO_TUNER_STEREO_ONThe tuner is currently receiving a stereo signal + VIDEO_TUNER_STEREO_ONThe tuner is currently receiving a stereo signal @@ -433,13 +431,13 @@ static int radio_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - VIDEO_MODE_PALPAL Format + VIDEO_MODE_PALPAL Format - VIDEO_MODE_NTSCNTSC Format (USA) + VIDEO_MODE_NTSCNTSC Format (USA) - VIDEO_MODE_SECAMFrench Format + VIDEO_MODE_SECAMFrench Format - VIDEO_MODE_AUTOA device that does not need to do + VIDEO_MODE_AUTOA device that does not need to do TV format switching @@ -523,7 +521,7 @@ static unsigned long current_freq; if(copy_from_user(arg, &freq, sizeof(unsigned long))!=0) return -EFAULT; - if(hardware_set_freq(freq)<0) + if(hardware_set_freq(freq)<0) return -EINVAL; current_freq = freq; return 0; @@ -584,32 +582,32 @@ static int current_volume=0; - audioThe input the user wishes to query + audioThe input the user wishes to query - volumeThe volume setting on a scale of 0-65535 + volumeThe volume setting on a scale of 0-65535 - baseThe base level on a scale of 0-65535 + baseThe base level on a scale of 0-65535 - trebleThe treble level on a scale of 0-65535 + trebleThe treble level on a scale of 0-65535 - flagsThe features this audio device supports + flagsThe features this audio device supports - nameA text name to display to the user. We picked - "Radio" as it explains things quite nicely. + nameA text name to display to the user. We picked + "Radio" as it explains things quite nicely. - modeThe current reception mode for the audio + modeThe current reception mode for the audio We report MONO because our card is too stupid to know if it is in mono or stereo. - balanceThe stereo balance on a scale of 0-65535, 32768 is - middle. + balanceThe stereo balance on a scale of 0-65535, 32768 is + middle. - stepThe step by which the volume control jumps. This is + stepThe step by which the volume control jumps. This is used to help make it easy for applications to set - slider behaviour. + slider behaviour. @@ -619,15 +617,15 @@ static int current_volume=0; - VIDEO_AUDIO_MUTEThe audio is currently muted. We + VIDEO_AUDIO_MUTEThe audio is currently muted. We could fake this in our driver but we choose not to bother. - VIDEO_AUDIO_MUTABLEThe input has a mute option + VIDEO_AUDIO_MUTABLEThe input has a mute option - VIDEO_AUDIO_TREBLEThe input has a treble control + VIDEO_AUDIO_TREBLEThe input has a treble control - VIDEO_AUDIO_BASSThe input has a base control + VIDEO_AUDIO_BASSThe input has a base control @@ -637,13 +635,13 @@ static int current_volume=0; - VIDEO_SOUND_MONOMono sound + VIDEO_SOUND_MONOMono sound - VIDEO_SOUND_STEREOStereo sound + VIDEO_SOUND_STEREOStereo sound - VIDEO_SOUND_LANG1Alternative language 1 (TV specific) + VIDEO_SOUND_LANG1Alternative language 1 (TV specific) - VIDEO_SOUND_LANG2Alternative language 2 (TV specific) + VIDEO_SOUND_LANG2Alternative language 2 (TV specific) @@ -868,37 +866,37 @@ static struct video_device my_camera -VID_TYPE_CAPTUREWe support image capture +VID_TYPE_CAPTUREWe support image capture -VID_TYPE_TELETEXTA teletext capture device (vbi{n]) +VID_TYPE_TELETEXTA teletext capture device (vbi{n]) -VID_TYPE_OVERLAYThe image can be directly overlaid onto the - frame buffer +VID_TYPE_OVERLAYThe image can be directly overlaid onto the + frame buffer -VID_TYPE_CHROMAKEYChromakey can be used to select which parts - of the image to display +VID_TYPE_CHROMAKEYChromakey can be used to select which parts + of the image to display -VID_TYPE_CLIPPINGIt is possible to give the board a list of - rectangles to draw around. +VID_TYPE_CLIPPINGIt is possible to give the board a list of + rectangles to draw around. -VID_TYPE_FRAMERAMThe video capture goes into the video memory +VID_TYPE_FRAMERAMThe video capture goes into the video memory and actually changes it. Applications need to know this so they can clean up after the - card + card -VID_TYPE_SCALESThe image can be scaled to various sizes, - rather than being a single fixed size. +VID_TYPE_SCALESThe image can be scaled to various sizes, + rather than being a single fixed size. -VID_TYPE_MONOCHROMEThe capture will be monochrome. This isn't a +VID_TYPE_MONOCHROMEThe capture will be monochrome. This isn't a complete answer to the question since a mono camera on a colour capture card will still - produce mono output. + produce mono output. -VID_TYPE_SUBCAPTUREThe card allows only part of its field of +VID_TYPE_SUBCAPTUREThe card allows only part of its field of view to be captured. This enables applications to avoid copying all of a large image into memory when only some section is - relevant. + relevant. @@ -1209,18 +1207,18 @@ static int camera_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - channelThe channel number we are selecting + channelThe channel number we are selecting - nameThe name for this channel. This is intended + nameThe name for this channel. This is intended to describe the port to the user. Appropriate names are therefore things like "Camera" "SCART input" - flagsChannel properties + flagsChannel properties - typeInput type + typeInput type - normThe current television encoding being used + normThe current television encoding being used if relevant for this channel. @@ -1231,9 +1229,9 @@ static int camera_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - VIDEO_VC_TUNERChannel has a tuner. + VIDEO_VC_TUNERChannel has a tuner. - VIDEO_VC_AUDIOChannel has audio. + VIDEO_VC_AUDIOChannel has audio. @@ -1242,11 +1240,11 @@ static int camera_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - VIDEO_TYPE_TVTelevision input. + VIDEO_TYPE_TVTelevision input. - VIDEO_TYPE_CAMERAFixed camera input. + VIDEO_TYPE_CAMERAFixed camera input. - 0Type is unknown. + 0Type is unknown. @@ -1255,13 +1253,13 @@ static int camera_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - VIDEO_MODE_PALPAL encoded Television + VIDEO_MODE_PALPAL encoded Television - VIDEO_MODE_NTSCNTSC (US) encoded Television + VIDEO_MODE_NTSCNTSC (US) encoded Television - VIDEO_MODE_SECAMSECAM (French) Television + VIDEO_MODE_SECAMSECAM (French) Television - VIDEO_MODE_AUTOAutomatic switching, or format does not + VIDEO_MODE_AUTOAutomatic switching, or format does not matter @@ -1341,14 +1339,14 @@ static int camera_ioctl(struct video_device *dev, unsigned int cmd, void *arg) - GREYLinear greyscale. This is for simple cameras and the - like + GREYLinear greyscale. This is for simple cameras and the + like - RGB565The top 5 bits hold 32 red levels, the next six bits - hold green and the low 5 bits hold blue. + RGB565The top 5 bits hold 32 red levels, the next six bits + hold green and the low 5 bits hold blue. - RGB555The top bit is clear. The red green and blue levels - each occupy five bits. + RGB555The top bit is clear. The red green and blue levels + each occupy five bits. @@ -1479,32 +1477,32 @@ static struct video_buffer capture_fb; - widthThe width in pixels of the desired image. The card - may use a smaller size if this size is not available + widthThe width in pixels of the desired image. The card + may use a smaller size if this size is not available - heightThe height of the image. The card may use a smaller - size if this size is not available. + heightThe height of the image. The card may use a smaller + size if this size is not available. - x The X position of the top left of the window. This + x The X position of the top left of the window. This is in pixels relative to the left hand edge of the picture. Not all cards can display images aligned on any pixel boundary. If the position is unsuitable the card adjusts the image right and reduces the - width. + width. - y The Y position of the top left of the window. This + y The Y position of the top left of the window. This is counted in pixels relative to the top edge of the picture. As with the width if the card cannot display starting on this line it will adjust the - values. + values. - chromakeyThe colour (expressed in RGB32 format) for the - chromakey colour if chroma keying is being used. + chromakeyThe colour (expressed in RGB32 format) for the + chromakey colour if chroma keying is being used. - clipsAn array of rectangles that must not be drawn - over. + clipsAn array of rectangles that must not be drawn + over. - clipcountThe number of clips in this array. + clipcountThe number of clips in this array. @@ -1516,11 +1514,11 @@ static struct video_buffer capture_fb; - x, yCo-ordinates relative to the display + x, yCo-ordinates relative to the display - width, heightWidth and height in pixels + width, heightWidth and height in pixels - nextA spare field for the application to use + nextA spare field for the application to use @@ -1552,9 +1550,9 @@ static struct video_buffer capture_fb; struct video_window v; if(copy_from_user(&v, arg, sizeof(v))) return -EFAULT; - if(v.width > 640 || v.height > 480) + if(v.width > 640 || v.height > 480) return -EINVAL; - if(v.width < 16 || v.height < 16) + if(v.width < 16 || v.height < 16) return -EINVAL; hardware_set_key(v.chromakey); hardware_set_window(v); diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers index de3b252e7..2630629d7 100644 --- a/Documentation/SubmittingDrivers +++ b/Documentation/SubmittingDrivers @@ -118,18 +118,13 @@ Linux kernel mailing list: linux-kernel@vger.kernel.org [mail majordomo@vger.kernel.org to subscribe] -Linux Device Drivers, Third Edition (covers 2.6.10): - http://lwn.net/Kernel/LDD3/ (free version) - Kernel traffic: Weekly summary of kernel list activity (much easier to read) http://www.kerneltraffic.org/kernel-traffic/ LWN.net: Weekly summary of kernel development activity - http://lwn.net/ - 2.6 API changes: - http://lwn.net/Articles/2.6-kernel-api/ - Porting drivers from prior kernels to 2.6: + 2.6 driver porting information: http://lwn.net/Articles/driver-porting/ KernelTrap: diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 4d35562b1..9838d32b2 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -271,7 +271,7 @@ patch, which certifies that you wrote it or otherwise have the right to pass it on as a open-source patch. The rules are pretty simple: if you can certify the below: - Developer's Certificate of Origin 1.1 + Developer's Certificate of Origin 1.0 By making a contribution to this project, I certify that: @@ -291,12 +291,6 @@ can certify the below: person who certified (a), (b) or (c) and I have not modified it. - (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - then you just add a line saying Signed-off-by: Random J Developer diff --git a/Documentation/cachetlb.txt b/Documentation/cachetlb.txt index e132fb116..9e2f988a8 100644 --- a/Documentation/cachetlb.txt +++ b/Documentation/cachetlb.txt @@ -142,11 +142,6 @@ changes occur: The ia64 sn2 platform is one example of a platform that uses this interface. -8) void lazy_mmu_prot_update(pte_t pte) - This interface is called whenever the protection on - any user PTEs change. This interface provides a notification - to architecture specific code to take appropiate action. - Next, we have the cache flushing interfaces. In general, when Linux is changing an existing virtual-->physical mapping to a new value, @@ -160,7 +155,7 @@ the sequence will be in one of the following forms: change_range_of_page_tables(mm, start, end); flush_tlb_range(vma, start, end); - 3) flush_cache_page(vma, addr, pfn); + 3) flush_cache_page(vma, addr); set_pte(pte_pointer, new_pte_val); flush_tlb_page(vma, addr); @@ -208,7 +203,7 @@ Here are the routines, one by one: call flush_cache_page (see below) for each entry which may be modified. -3) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) +3) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr) This time we need to remove a PAGE_SIZE sized range from the cache. The 'vma' is the backing structure used by @@ -218,14 +213,8 @@ Here are the routines, one by one: executable (and thus could be in the 'instruction cache' in "Harvard" type cache layouts). - The 'pfn' indicates the physical page frame (shift this value - left by PAGE_SHIFT to get the physical address) that 'addr' - translates to. It is this mapping which should be removed from - the cache. - After running, there will be no entries in the cache for - 'vma->vm_mm' for virtual address 'addr' which translates - to 'pfn'. + 'vma->vm_mm' for virtual address 'addr'. This is used primarily during fault processing. diff --git a/Documentation/cciss.txt b/Documentation/cciss.txt index d599beb9d..5bbc54667 100644 --- a/Documentation/cciss.txt +++ b/Documentation/cciss.txt @@ -15,30 +15,26 @@ This driver is known to work with the following cards: * SA 6400 U320 Expansion Module * SA 6i * SA P600 - * SA P800 - * SA E400 -If nodes are not already created in the /dev/cciss directory, run as root: +If nodes are not already created in the /dev/cciss directory -# cd /dev -# ./MAKEDEV cciss +# mkdev.cciss [ctlrs] + +Where ctlrs is the number of controllers you have (defaults to 1 if not +specified). Device Naming: -------------- -You need some entries in /dev for the cciss device. The MAKEDEV script +You need some entries in /dev for the cciss device. The mkdev.cciss script can make device nodes for you automatically. Currently the device setup is as follows: Major numbers: 104 cciss0 105 cciss1 - 106 cciss2 - 105 cciss3 - 108 cciss4 - 109 cciss5 - 110 cciss6 - 111 cciss7 + 106 cciss2 + etc... Minor numbers: b7 b6 b5 b4 b3 b2 b1 b0 @@ -48,7 +44,7 @@ Minor numbers: | +-------------------- Logical Volume number -The device naming scheme is: +The suggested device naming scheme is: /dev/cciss/c0d0 Controller 0, disk 0, whole device /dev/cciss/c0d0p1 Controller 0, disk 0, partition 1 /dev/cciss/c0d0p2 Controller 0, disk 0, partition 2 @@ -120,13 +116,16 @@ from the adapter, informing the SCSI mid layer may not be necessary. Note that the naming convention of the /proc filesystem entries contains a number in addition to the driver name. (E.g. "cciss0" -instead of just "cciss" which you might expect.) +instead of just "cciss" which you might expect.) This is because +of changes to the 2.4 kernel PCI interface related to PCI hot plug +that imply the driver must register with the SCSI mid layer once per +adapter instance rather than once per driver. Note: ONLY sequential access devices and medium changers are presented as SCSI devices to the SCSI mid layer by the cciss driver. Specifically, physical SCSI disk drives are NOT presented to the SCSI mid layer. The physical SCSI disk drives are controlled directly by the array controller -hardware and it is important to prevent the kernel from attempting to directly +hardware and it is important to prevent the OS from attempting to directly access these devices too, as if the array controller were merely a SCSI controller in the same way that we are allowing it to access SCSI tape drives. diff --git a/Documentation/devices.txt b/Documentation/devices.txt index a3efd3cc0..60ce4ae9d 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt @@ -1,9 +1,9 @@ - LINUX ALLOCATED DEVICES (2.6+ version) + LINUX ALLOCATED DEVICES Maintained by Torben Mathiasen - Last revised: 25 January 2005 + Last revised: 04 August 2004 This list is the Linux Device List, the official registry of allocated device numbers and /dev directory nodes for the Linux operating @@ -24,8 +24,7 @@ platform only. Allocations marked (68k/Atari) apply to Linux/68k on the Atari platform only. The symbol {2.6} means the allocation is obsolete and scheduled for -removal once kernel version 2.6 (or equivalent) is released. Some of these -allocations have already been removed. +removal once kernel version 2.6 (or equivalent) is released. This document is in the public domain. The author requests, however, that semantically altered versions are not distributed without @@ -42,6 +41,13 @@ reply. **** DEVICE DRIVERS AUTHORS PLEASE READ THIS **** +THE DEVICE REGISTRY IS OFFICIALLY FROZEN FOR LINUS TORVALDS' KERNEL +TREE. At Linus' request, no more allocations will be made official +for Linus' kernel tree; the 3 June 2001 version of this list is the +official final version of this registry. At Alan Cox' request, +however, the registry will continue to be maintained for the -ac +series of kernels, and registrations will be accepted. + To have a major number allocated, or a minor number in situations where that applies (e.g. busmice), please contact me with the appropriate device information. Also, if you have additional @@ -431,8 +437,6 @@ Your cooperation is appreciated. 226 = /dev/systrace Systrace device 227 = /dev/mcelog X86_64 Machine Check Exception driver 228 = /dev/hpet HPET driver - 229 = /dev/fuse Fuse (virtual filesystem in user-space) - 230 = /dev/midishare MidiShare driver 240-254 Reserved for local use 255 Reserved for MISC_DYNAMIC_MINOR @@ -1173,7 +1177,7 @@ Your cooperation is appreciated. Requested by: andy@scramdisklinux.org - 65 char Sundance "plink" Transputer boards (obsolete, unused) + 65 char Sundance "plink" Transputer boards 0 = /dev/plink0 First plink device 1 = /dev/plink1 Second plink device 2 = /dev/plink2 Third plink device @@ -1523,12 +1527,12 @@ Your cooperation is appreciated. disks (see major number 3) except that the limit on partitions is 15. - 83 char Matrox mga_vid video driver - 0 = /dev/mga_vid0 1st video card - 1 = /dev/mga_vid1 2nd video card - 2 = /dev/mga_vid2 3rd video card - ... - 15 = /dev/mga_vid15 16th video card + 83 char Teletext/videotext interfaces {2.6} + 0 = /dev/vtx Teletext decoder + 16 = /dev/vttuner TV tuner on teletext interface + + Devices for the driver contained in the VideoteXt package. + More information on http://home.pages.de/~videotext/ 83 block I2O hard disk 0 = /dev/i2o/hdaw 49th I2O hard disk, whole disk @@ -1698,6 +1702,11 @@ Your cooperation is appreciated. 3 = /dev/ipauth Authentication control device/log file ... + 95 block IBM S/390 VM/ESA minidisk + 0 = /dev/msd0 First VM/ESA minidisk + 1 = /dev/msd1 Second VM/ESA minidisk + ... + 96 char Parallel port ATAPI tape devices 0 = /dev/pt0 First parallel port ATAPI tape 1 = /dev/pt1 Second parallel port ATAPI tape @@ -1734,14 +1743,10 @@ Your cooperation is appreciated. See http://stm.lbl.gov/comedi or http://www.llp.fu-berlin.de/. 98 block User-mode virtual block device - 0 = /dev/ubda First user-mode block device - 16 = /dev/udbb Second user-mode block device + 0 = /dev/ubd0 First user-mode block device + 1 = /dev/ubd1 Second user-mode block device ... - Partitions are handled in the same way as for IDE - disks (see major number 3) except that the limit on - partitions is 15. - This device is used by the user-mode virtual kernel port. 99 char Raw parallel ports @@ -2105,7 +2110,6 @@ Your cooperation is appreciated. disks (see major number 3) except that the limit on partitions is 15. -130 char (Misc devices) 130 block SCSI disk devices (160-175) 0 = /dev/sdfe 161st SCSI disk whole disk @@ -2543,12 +2547,7 @@ Your cooperation is appreciated. 0 = /dev/usb/lp0 First USB printer ... 15 = /dev/usb/lp15 16th USB printer - 16 = /dev/usb/mouse0 First USB mouse - ... - 31 = /dev/usb/mouse15 16th USB mouse - 32 = /dev/usb/ez0 First USB firmware loader - ... - 47 = /dev/usb/ez15 16th USB firmware loader + 32 = /dev/usb/mdc800 MDC800 USB camera 48 = /dev/usb/scanner0 First USB scanner ... 63 = /dev/usb/scanner15 16th USB scanner @@ -2556,11 +2555,22 @@ Your cooperation is appreciated. 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) -180 block USB block devices - 0 = /dev/uba First USB block device - 8 = /dev/ubb Second USB block device - 16 = /dev/ubc Thrid USB block device - ... + 96 = /dev/usb/hiddev0 1st USB HID device + ... + 111 = /dev/usb/hiddev15 16th USB HID device + 112 = /dev/usb/auer0 1st auerswald ISDN device + ... + 127 = /dev/usb/auer15 16th auerswald ISDN device + 128 = /dev/usb/brlvgr0 First Braille Voyager device + ... + 131 = /dev/usb/brlvgr3 Fourth Braille Voyager device + 144 = /dev/usb/lcd USB LCD device + 160 = /dev/usb/legousbtower0 1st USB Legotower device + ... + 175 = /dev/usb/legousbtower15 16th USB Legotower device + 240 = /dev/usb/dabusb0 First daubusb device + ... + 243 = /dev/usb/dabusb3 Fourth dabusb device 181 char Conrad Electronic parallel port radio clocks 0 = /dev/pcfclock0 First Conrad radio clock @@ -2751,12 +2761,8 @@ Your cooperation is appreciated. 45 = /dev/ttyMM1 Marvell MPSC - port 1 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0 ... - 47 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5 - 50 = /dev/ttyIOC40 Altix serial card - ... - 81 = /dev/ttyIOC431 Altix serial card - 82 = /dev/ttyVR0 NEC VR4100 series SIU - 83 = /dev/ttyVR1 NEC VR4100 series DSIU + 49 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5 + 205 char Low-density serial ports (alternate device) 0 = /dev/culu0 Callout device for ttyLU0 @@ -2782,18 +2788,12 @@ Your cooperation is appreciated. ... 39 = /dev/cudb7 Callout device for ttyDB7 40 = /dev/cusg0 Callout device for ttySG0 - 41 = /dev/ttycusmx0 Callout device for ttySMX0 - 42 = /dev/ttycusmx1 Callout device for ttySMX1 - 43 = /dev/ttycusmx2 Callout device for ttySMX2 + 41 = /dev/ttySMX0 Callout device for ttySMX0 + 42 = /dev/ttySMX1 Callout device for ttySMX1 + 43 = /dev/ttySMX2 Callout device for ttySMX2 46 = /dev/cucpm0 Callout device for ttyCPM0 ... 49 = /dev/cucpm5 Callout device for ttyCPM5 - 50 = /dev/cuioc40 Callout device for ttyIOC40 - ... - 81 = /dev/cuioc431 Callout device for ttyIOC431 - 82 = /dev/cuvr0 Callout device for ttyVR0 - 83 = /dev/cuvr1 Callout device for ttyVR1 - 206 char OnStream SC-x0 tape devices 0 = /dev/osst0 First OnStream SCSI tape, mode 0 @@ -3007,12 +3007,7 @@ Your cooperation is appreciated. ioctl()'s can be used to rewind the tape regardless of the device used to access it. -231 char InfiniBand MAD - 0 = /dev/infiniband/umad0 - 1 = /dev/infiniband/umad1 - ... - -232-239 UNASSIGNED +231-239 UNASSIGNED 240-254 char LOCAL/EXPERIMENTAL USE 240-254 block LOCAL/EXPERIMENTAL USE diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 6c98f2bd4..2c3fc3a27 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -909,6 +909,16 @@ nr_free_inodes Represents the number of free inodes. Ie. The number of inuse inodes is (nr_inodes - nr_free_inodes). +super-nr and super-max +---------------------- + +Again, super block structures are allocated by the kernel, but not freed. The +file super-max contains the maximum number of super block handlers, where +super-nr shows the number of currently allocated ones. + +Every mounted file system needs a super block, so if you plan to mount lots of +file systems, you may want to increase these numbers. + aio-nr and aio-max-nr --------------------- @@ -1699,13 +1709,12 @@ flush Writing to this file results in a flush of the routing cache. -gc_elasticity, gc_interval, gc_min_interval_ms, gc_timeout, gc_thresh ---------------------------------------------------------------------- +gc_elasticity, gc_interval, gc_min_interval, gc_tresh, gc_timeout, +gc_thresh, gc_thresh1, gc_thresh2, gc_thresh3 +-------------------------------------------------------------- Values to control the frequency and behavior of the garbage collection -algorithm for the routing cache. gc_min_interval is deprecated and replaced -by gc_min_interval_ms. - +algorithm for the routing cache. max_size -------- @@ -1744,25 +1753,18 @@ settings contain additional options to set garbage collection parameters. In the interface directories you'll find the following entries: -base_reachable_time, base_reachable_time_ms -------------------------------------------- +base_reachable_time +------------------- A base value used for computing the random reachable time value as specified in RFC2461. -Expression of base_reachable_time, which is deprecated, is in seconds. -Expression of base_reachable_time_ms is in milliseconds. - -retrans_time, retrans_time_ms ------------------------------ - -The time between retransmitted Neighbor Solicitation messages. -Used for address resolution and to determine if a neighbor is -unreachable. +retrans_time +------------ -Expression of retrans_time, which is deprecated, is in 1/100 seconds (for -IPv4) or in jiffies (for IPv6). -Expression of retrans_time_ms is in milliseconds. +The time, expressed in jiffies (1/100 sec), between retransmitted Neighbor +Solicitation messages. Used for address resolution and to determine if a +neighbor is unreachable. unres_qlen ---------- diff --git a/Documentation/filesystems/relayfs.txt b/Documentation/filesystems/relayfs.txt new file mode 100644 index 000000000..7397bdb23 --- /dev/null +++ b/Documentation/filesystems/relayfs.txt @@ -0,0 +1,812 @@ + +relayfs - a high-speed data relay filesystem +============================================ + +relayfs is a filesystem designed to provide an efficient mechanism for +tools and facilities to relay large amounts of data from kernel space +to user space. + +The main idea behind relayfs is that every data flow is put into a +separate "channel" and each channel is a file. In practice, each +channel is a separate memory buffer allocated from within kernel space +upon channel instantiation. Software needing to relay data to user +space would open a channel or a number of channels, depending on its +needs, and would log data to that channel. All the buffering and +locking mechanics are taken care of by relayfs. The actual format and +protocol used for each channel is up to relayfs' clients. + +relayfs makes no provisions for copying the same data to more than a +single channel. This is for the clients of the relay to take care of, +and so is any form of data filtering. The purpose is to keep relayfs +as simple as possible. + + +Usage +===== + +In addition to the relayfs kernel API described below, relayfs +implements basic file operations. Here are the file operations that +are available and some comments regarding their behavior: + +open() enables user to open an _existing_ channel. A channel can be + opened in blocking or non-blocking mode, and can be opened + for reading as well as for writing. Readers will by default + be auto-consuming. + +mmap() results in channel's memory buffer being mmapped into the + caller's memory space. + +read() since we are dealing with circular buffers, the user is only + allowed to read forward. Some apps may want to loop around + read() waiting for incoming data - if there is no data + available, read will put the reader on a wait queue until + data is available (blocking mode). Non-blocking reads return + -EAGAIN if data is not available. + + +write() writing from user space operates exactly as relay_write() does + (described below). + +poll() POLLIN/POLLRDNORM/POLLOUT/POLLWRNORM/POLLERR supported. + +close() decrements the channel's refcount. When the refcount reaches + 0 i.e. when no process or kernel client has the file open + (see relay_close() below), the channel buffer is freed. + + +In order for a user application to make use of relayfs files, the +relayfs filesystem must be mounted. For example, + + mount -t relayfs relayfs /mountpoint + + +The relayfs kernel API +====================== + +relayfs channels are implemented as circular buffers subdivided into +'sub-buffers'. kernel clients write data into the channel using +relay_write(), and are notified via a set of callbacks when +significant events occur within the channel. 'Significant events' +include: + +- a sub-buffer has been filled i.e. the current write won't fit into the + current sub-buffer, and a 'buffer-switch' is triggered, after which + the data is written into the next buffer (if the next buffer is + empty). The client is notified of this condition via two callbacks, + one providing an opportunity to perform start-of-buffer tasks, the + other end-of-buffer tasks. + +- data is ready for the client to process. The client can choose to + be notified either on a per-sub-buffer basis (bulk delivery) or + per-write basis (packet delivery). + +- data has been written to the channel from user space. The client can + use this notification to accept and process 'commands' sent to the + channel via write(2). + +- the channel has been opened/closed/mapped/unmapped from user space. + The client can use this notification to trigger actions within the + kernel application, such as enabling/disabling logging to the + channel. It can also return result codes from the callback, + indicating that the operation should fail e.g. in order to restrict + more than one user space open or mmap. + +- the channel needs resizing, or needs to update its + state based on the results of the resize. Resizing the channel is + up to the kernel client to actually perform. If the channel is + configured for resizing, the client is notified when the unread data + in the channel passes a preset threshold, giving it the opportunity + to allocate a new channel buffer and replace the old one. + +Reader objects +-------------- + +Channel readers use an opaque rchan_reader object to read from +channels. For VFS readers (those using read(2) to read from a +channel), these objects are automatically created and used internally; +only kernel clients that need to directly read from channels, or whose +userspace applications use mmap to access channel data, need to know +anything about rchan_readers - others may skip this section. + +A relay channel can have any number of readers, each represented by an +rchan_reader instance, which is used to encapsulate reader settings +and state. rchan_reader objects should be treated as opaque by kernel +clients. To create a reader object for directly accessing a channel +from kernel space, call the add_rchan_reader() kernel API function: + +rchan_reader *add_rchan_reader(rchan_id, auto_consume) + +This function returns an rchan_reader instance if successful, which +should then be passed to relay_read() when the kernel client is +interested in reading from the channel. + +The auto_consume parameter indicates whether a read done by this +reader will automatically 'consume' that portion of the unread channel +buffer when relay_read() is called (see below for more details). + +To close the reader, call + +remove_rchan_reader(reader) + +which will remove the reader from the list of current readers. + + +To create a reader object representing a userspace mmap reader in the +kernel application, call the add_map_reader() kernel API function: + +rchan_reader *add_map_reader(rchan_id) + +This function returns an rchan_reader instance if successful, whose +main purpose is as an argument to be passed into +relay_buffers_consumed() when the kernel client becomes aware that +data has been read by a user application using mmap to read from the +channel buffer. There is no auto_consume option in this case, since +only the kernel client/user application knows when data has been read. + +To close the map reader, call + +remove_map_reader(reader) + +which will remove the reader from the list of current readers. + +Consumed count +-------------- + +A relayfs channel is a circular buffer, which means that if there is +no reader reading from it or a reader reading too slowly, at some +point the channel writer will 'lap' the reader and data will be lost. +In normal use, readers will always be able to keep up with writers and +the buffer is thus never in danger of becoming full. In many +applications, it's sufficient to ensure that this is practically +speaking always the case, by making the buffers large enough. These +types of applications can basically open the channel as +RELAY_MODE_CONTINOUS (the default anyway) and not worry about the +meaning of 'consume' and skip the rest of this section. + +If it's important for the application that a kernel client never allow +writers to overwrite unread data, the channel should be opened using +RELAY_MODE_NO_OVERWRITE and must be kept apprised of the count of +bytes actually read by the (typically) user-space channel readers. +This count is referred to as the 'consumed count'. read(2) channel +readers automatically update the channel's 'consumed count' as they +read. If the usage mode is to have only read(2) readers, which is +typically the case, the kernel client doesn't need to worry about any +of the relayfs functions having to do with 'bytes consumed' and can +skip the rest of this section. (Note that it is possible to have +multiple read(2) or auto-consuming readers, but like having multiple +readers on a pipe, these readers will race with each other i.e. it's +supported, but doesn't make much sense). + +If the kernel client cannot rely on an auto-consuming reader to keep +the 'consumed count' up-to-date, then it must do so manually, by +making the appropriate calls to relay_buffers_consumed() or +relay_bytes_consumed(). In most cases, this should only be necessary +for bulk mmap clients - almost all packet clients should be covered by +having auto-consuming read(2) readers. For mmapped bulk clients, for +instance, there are no auto-consuming VFS readers, so the kernel +client needs to make the call to relay_buffers_consumed() after +sub-buffers are read. + +Kernel API +---------- + +Here's a summary of the API relayfs provides to in-kernel clients: + +int relay_open(channel_path, bufsize, nbufs, channel_flags, + channel_callbacks, start_reserve, end_reserve, + rchan_start_reserve, resize_min, resize_max, mode, + init_buf, init_buf_size) +int relay_write(channel_id, *data_ptr, count, time_delta_offset, **wrote) +rchan_reader *add_rchan_reader(channel_id, auto_consume) +int remove_rchan_reader(rchan_reader *reader) +rchan_reader *add_map_reader(channel_id) +int remove_map_reader(rchan_reader *reader) +int relay_read(reader, buf, count, wait, *actual_read_offset) +void relay_buffers_consumed(reader, buffers_consumed) +void relay_bytes_consumed(reader, bytes_consumed, read_offset) +int relay_bytes_avail(reader) +int rchan_full(reader) +int rchan_empty(reader) +int relay_info(channel_id, *channel_info) +int relay_close(channel_id) +int relay_realloc_buffer(channel_id, nbufs, async) +int relay_replace_buffer(channel_id) +int relay_reset(int rchan_id) + +---------- +int relay_open(channel_path, bufsize, nbufs, + channel_flags, channel_callbacks, start_reserve, + end_reserve, rchan_start_reserve, resize_min, resize_max, mode) + +relay_open() is used to create a new entry in relayfs. This new entry +is created according to channel_path. channel_path contains the +absolute path to the channel file on relayfs. If, for example, the +caller sets channel_path to "/xlog/9", a "xlog/9" entry will appear +within relayfs automatically and the "xlog" directory will be created +in the filesystem's root. relayfs does not implement any policy on +its content, except to disallow the opening of two channels using the +same file. There are, nevertheless a set of guidelines for using +relayfs. Basically, each facility using relayfs should use a top-level +directory identifying it. The entry created above, for example, +presumably belongs to the "xlog" software. + +The remaining parameters for relay_open() are as follows: + +- channel_flags - an ORed combination of attribute values controlling + common channel characteristics: + + - logging scheme - relayfs use 2 mutually exclusive schemes + for logging data to a channel. The 'lockless scheme' + reserves and writes data to a channel without the need of + any type of locking on the channel. This is the preferred + scheme, but may not be available on a given architecture (it + relies on the presence of a cmpxchg instruction). It's + specified by the RELAY_SCHEME_LOCKLESS flag. The 'locking + scheme' either obtains a lock on the channel for writing or + disables interrupts, depending on whether the channel was + opened for SMP or global usage (see below). It's specified + by the RELAY_SCHEME_LOCKING flag. While a client may want + to explicitly specify a particular scheme to use, it's more + convenient to specify RELAY_SCHEME_ANY for this flag, which + will allow relayfs to choose the best available scheme i.e. + lockless if supported. + + - overwrite mode (default is RELAY_MODE_CONTINUOUS) - + If RELAY_MODE_CONTINUOUS is specified, writes to the channel + will succeed regardless of whether there are up-to-date + consumers or not. If RELAY_MODE_NO_OVERWRITE is specified, + the channel becomes 'full' when the total amount of buffer + space unconsumed by readers equals or exceeds the total + buffer size. With the buffer in this state, writes to the + buffer will fail - clients need to check the return code from + relay_write() to determine if this is the case and act + accordingly - 0 or a negative value indicate the write failed. + + - SMP usage - this applies only when the locking scheme is in + use. If RELAY_USAGE_SMP is specified, it's assumed that the + channel will be used in a per-CPU fashion and consequently, + the only locking that will be done for writes is to disable + local irqs. If RELAY_USAGE_GLOBAL is specified, it's assumed + that writes to the buffer can occur within any CPU context, + and spinlock_irq_save will be used to lock the buffer. + + - delivery mode - if RELAY_DELIVERY_BULK is specified, the + client will be notified via its deliver() callback whenever a + sub-buffer has been filled. Alternatively, + RELAY_DELIVERY_PACKET will cause delivery to occur after the + completion of each write. See the description of the channel + callbacks below for more details. + + - timestamping - if RELAY_TIMESTAMP_TSC is specified and the + architecture supports it, efficient TSC 'timestamps' can be + associated with each write, otherwise more expensive + gettimeofday() timestamping is used. At the beginning of + each sub-buffer, a gettimeofday() timestamp and the current + TSC, if supported, are read, and are passed on to the client + via the buffer_start() callback. This allows correlation of + the current time with the current TSC for subsequent writes. + Each subsequent write is associated with a 'time delta', + which is either the current TSC, if the channel is using + TSCs, or the difference between the buffer_start gettimeofday + timestamp and the gettimeofday time read for the current + write. Note that relayfs never writes either a timestamp or + time delta into the buffer unless explicitly asked to (see + the description of relay_write() for details). + +- bufsize - the size of the 'sub-buffers' making up the circular channel + buffer. For the lockless scheme, this must be a power of 2. + +- nbufs - the number of 'sub-buffers' making up the circular + channel buffer. This must be a power of 2. + + The total size of the channel buffer is bufsize * nbufs rounded up + to the next kernel page size. If the lockless scheme is used, both + bufsize and nbufs must be a power of 2. If the locking scheme is + used, the bufsize can be anything and nbufs must be a power of 2. If + RELAY_SCHEME_ANY is used, the bufsize and nbufs should be a power of 2. + + NOTE: if nbufs is 1, relayfs will bypass the normal size + checks and will allocate an rvmalloced buffer of size bufsize. + This buffer will be freed when relay_close() is called, if the channel + isn't still being referenced. + +- callbacks - a table of callback functions called when events occur + within the data relay that clients need to know about: + + - int buffer_start(channel_id, current_write_pos, buffer_id, + start_time, start_tsc, using_tsc) - + + called at the beginning of a new sub-buffer, the + buffer_start() callback gives the client an opportunity to + write data into space reserved at the beginning of a + sub-buffer. The client should only write into the buffer + if it specified a value for start_reserve and/or + channel_start_reserve (see below) when the channel was + opened. In the latter case, the client can determine + whether to write its one-time rchan_start_reserve data by + examining the value of buffer_id, which will be 0 for the + first sub-buffer. The address that the client can write + to is contained in current_write_pos (the client by + definition knows how much it can write i.e. the value it + passed to relay_open() for start_reserve/ + channel_start_reserve). start_time contains the + gettimeofday() value for the start of the buffer and start + TSC contains the TSC read at the same time. The using_tsc + param indicates whether or not start_tsc is valid (it + wouldn't be if TSC timestamping isn't being used). + + The client should return the number of bytes it wrote to + the channel, 0 if none. + + - int buffer_end(channel_id, current_write_pos, end_of_buffer, + end_time, end_tsc, using_tsc) + + called at the end of a sub-buffer, the buffer_end() + callback gives the client an opportunity to perform + end-of-buffer processing. Note that the current_write_pos + is the position where the next write would occur, but + since the current write wouldn't fit (which is the trigger + for the buffer_end event), the buffer is considered full + even though there may be unused space at the end. The + end_of_buffer param pointer value can be used to determine + exactly the size of the unused space. The client should + only write into the buffer if it specified a value for + end_reserve when the channel was opened. If the client + doesn't write anything i.e. returns 0, the unused space at + the end of the sub-buffer is available via relay_info() - + this data may be needed by the client later if it needs to + process raw sub-buffers (an alternative would be to save + the unused bytes count value in end_reserve space at the + end of each sub-buffer during buffer_end processing and + read it when needed at a later time. The other + alternative would be to use read(2), which makes the + unused count invisible to the caller). end_time contains + the gettimeofday() value for the end of the buffer and end + TSC contains the TSC read at the same time. The using_tsc + param indicates whether or not end_tsc is valid (it + wouldn't be if TSC timestamping isn't being used). + + The client should return the number of bytes it wrote to + the channel, 0 if none. + + - void deliver(channel_id, from, len) + + called when data is ready for the client. This callback + is used to notify a client when a sub-buffer is complete + (in the case of bulk delivery) or a single write is + complete (packet delivery). A bulk delivery client might + wish to then signal a daemon that a sub-buffer is ready. + A packet delivery client might wish to process the packet + or send it elsewhere. The from param is a pointer to the + delivered data and len specifies how many bytes are ready. + + - void user_deliver(channel_id, from, len) + + called when data has been written to the channel from user + space. This callback is used to notify a client when a + successful write from userspace has occurred, independent + of whether bulk or packet delivery is in use. This can be + used to allow userspace programs to communicate with the + kernel client through the channel via out-of-band write(2) + 'commands' instead of via ioctls, for instance. The from + param is a pointer to the delivered data and len specifies + how many bytes are ready. Note that this callback occurs + after the bytes have been successfully written into the + channel, which means that channel readers must be able to + deal with the 'command' data which will appear in the + channel data stream just as any other userspace or + non-userspace write would. + + - int needs_resize(channel_id, resize_type, + suggested_buf_size, suggested_n_bufs) + + called when a channel's buffers are in danger of becoming + full i.e. the number of unread bytes in the channel passes + a preset threshold, or when the current capacity of a + channel's buffer is no longer needed. Also called to + notify the client when a channel's buffer has been + replaced. If resize_type is RELAY_RESIZE_EXPAND or + RELAY_RESIZE_SHRINK, the kernel client should arrange to + call relay_realloc_buffer() with the suggested buffer size + and buffer count, which will allocate (but will not + replace the old one) a new buffer of the recommended size + for the channel. When the allocation has completed, + needs_resize() is again called, this time with a + resize_type of RELAY_RESIZE_REPLACE. The kernel client + should then arrange to call relay_replace_buffer() to + actually replace the old channel buffer with the newly + allocated buffer. Finally, once the buffer replacement + has completed, needs_resize() is again called, this time + with a resize_type of RELAY_RESIZE_REPLACED, to inform the + client that the replacement is complete and additionally + confirming the current sub-buffer size and number of + sub-buffers. Note that a resize can be canceled if + relay_realloc_buffer() is called with the async param + non-zero and the resize conditions no longer hold. In + this case, the RELAY_RESIZE_REPLACED suggested number of + sub-buffers will be the same as the number of sub-buffers + that existed before the RELAY_RESIZE_SHRINK or EXPAND i.e. + values indicating that the resize didn't actually occur. + + - int fileop_notify(channel_id, struct file *filp, enum relay_fileop) + + called when a userspace file operation has occurred or + will occur on a relayfs channel file. These notifications + can be used by the kernel client to trigger actions within + the kernel client when the corresponding event occurs, + such as enabling logging only when a userspace application + opens or mmaps a relayfs file and disabling it again when + the file is closed or unmapped. The kernel client can + also return its own return value, which can affect the + outcome of file operation - returning 0 indicates that the + operation should succeed, and returning a negative value + indicates that the operation should be failed, and that + the returned value should be returned to the ultimate + caller e.g. returning -EPERM from the open fileop will + cause the open to fail with -EPERM. Among other things, + the return value can be used to restrict a relayfs file + from being opened or mmap'ed more than once. The currently + implemented fileops are: + + RELAY_FILE_OPEN - a relayfs file is being opened. Return + 0 to allow it to succeed, negative to + have it fail. A negative return value will + be passed on unmodified to the open fileop. + RELAY_FILE_CLOSE- a relayfs file is being closed. The return + value is ignored. + RELAY_FILE_MAP - a relayfs file is being mmap'ed. Return 0 + to allow it to succeed, negative to have + it fail. A negative return value will be + passed on unmodified to the mmap fileop. + RELAY_FILE_UNMAP- a relayfs file is being unmapped. The return + value is ignored. + + - void ioctl(rchan_id, cmd, arg) + + called when an ioctl call is made using a relayfs file + descriptor. The cmd and arg are passed along to this + callback unmodified for it to do as it wishes with. The + return value from this callback is used as the return value + of the ioctl call. + + If the callbacks param passed to relay_open() is NULL, a set of + default do-nothing callbacks will be defined for the channel. + Likewise, any NULL rchan_callback function contained in a non-NULL + callbacks struct will be filled in with a default callback function + that does nothing. + +- start_reserve - the number of bytes to be reserved at the start of + each sub-buffer. The client can do what it wants with this number + of bytes when the buffer_start() callback is invoked. Typically + clients would use this to write per-sub-buffer header data. + +- end_reserve - the number of bytes to be reserved at the end of each + sub-buffer. The client can do what it wants with this number of + bytes when the buffer_end() callback is invoked. Typically clients + would use this to write per-sub-buffer footer data. + +- channel_start_reserve - the number of bytes to be reserved, in + addition to start_reserve, at the beginning of the first sub-buffer + in the channel. The client can do what it wants with this number of + bytes when the buffer_start() callback is invoked. Typically + clients would use this to write per-channel header data. + +- resize_min - if set, this signifies that the channel is + auto-resizeable. The value specifies the size that the channel will + try to maintain as a normal working size, and that it won't go + below. The client makes use of the resizing callbacks and + relay_realloc_buffer() and relay_replace_buffer() to actually effect + the resize. + +- resize_max - if set, this signifies that the channel is + auto-resizeable. The value specifies the maximum size the channel + can have as a result of resizing. + +- mode - if non-zero, specifies the file permissions that will be given + to the channel file. If 0, the default rw user perms will be used. + +- init_buf - if non-NULL, rather than allocating the channel buffer, + this buffer will be used as the initial channel buffer. The kernel + API function relay_discard_init_buf() can later be used to have + relayfs allocate a normal mmappable channel buffer and switch over + to using it after copying the init_buf contents into it. Currently, + the size of init_buf must be exactly buf_size * n_bufs. The caller + is responsible for managing the init_buf memory. This feature is + typically used for init-time channel use and should normally be + specified as NULL. + +- init_buf_size - the total size of init_buf, if init_buf is specified + as non-NULL. Currently, the size of init_buf must be exactly + buf_size * n_bufs. + +Upon successful completion, relay_open() returns a channel id +to be used for all other operations with the relay. All buffers +managed by the relay are allocated using rvmalloc/rvfree to allow +for easy mmapping to user-space. + +---------- +int relay_write(channel_id, *data_ptr, count, time_delta_offset, **wrote_pos) + +relay_write() reserves space in the channel and writes count bytes of +data pointed to by data_ptr to it. Automatically performs any +necessary locking, depending on the scheme and SMP usage in effect (no +locking is done for the lockless scheme regardless of usage). It +returns the number of bytes written, or 0/negative on failure. If +time_delta_offset is >= 0, the internal time delta, the internal time +delta calculated when the slot was reserved will be written at that +offset. This is the TSC or gettimeofday() delta between the current +write and the beginning of the buffer, whichever method is being used +by the channel. Trying to write a count larger than the bufsize +specified to relay_open() (taking into account the reserved +start-of-buffer and end-of-buffer space as well) will fail. If +wrote_pos is non-NULL, it will receive the location the data was +written to, which may be needed for some applications but is not +normally interesting. Most applications should pass in NULL for this +param. + +---------- +struct rchan_reader *add_rchan_reader(int rchan_id, int auto_consume) + +add_rchan_reader creates and initializes a reader object for a +channel. An opaque rchan_reader object is returned on success, and is +passed to relay_read() when reading the channel. If the boolean +auto_consume parameter is 1, the reader is defined to be +auto-consuming. auto-consuming reader objects are automatically +created and used for VFS read(2) readers. + +---------- +void remove_rchan_reader(struct rchan_reader *reader) + +remove_rchan_reader finds and removes the given reader from the +channel. This function is used only by non-VFS read(2) readers. VFS +read(2) readers are automatically removed when the corresponding file +object is closed. + +---------- +reader add_map_reader(int rchan_id) + +Creates and initializes an rchan_reader object for channel map +readers, and is needed for updating relay_bytes/buffers_consumed() +when kernel clients become aware of the need to do so by their mmap +user clients. + +---------- +int remove_map_reader(reader) + +Finds and removes the given map reader from the channel. This function +is useful only for map readers. + +---------- +int relay_read(reader, buf, count, wait, *actual_read_offset) + +Reads count bytes from the channel, or as much as is available within +the sub-buffer currently being read. The read offset that will be +read from is the position contained within the reader object. If the +wait flag is set, buf is non-NULL, and there is nothing available, it +will wait until there is. If the wait flag is 0 and there is nothing +available, -EAGAIN is returned. If buf is NULL, the value returned is +the number of bytes that would have been read. actual_read_offset is +the value that should be passed as the read offset to +relay_bytes_consumed, needed only if the reader is not auto-consuming +and the channel is MODE_NO_OVERWRITE, but in any case, it must not be +NULL. + +---------- + +int relay_bytes_avail(reader) + +Returns the number of bytes available relative to the reader's current +read position within the corresponding sub-buffer, 0 if there is +nothing available. Note that this doesn't return the total bytes +available in the channel buffer - this is enough though to know if +anything is available, however, or how many bytes might be returned +from the next read. + +---------- +void relay_buffers_consumed(reader, buffers_consumed) + +Adds to the channel's consumed buffer count. buffers_consumed should +be the number of buffers newly consumed, not the total number +consumed. NOTE: kernel clients don't need to call this function if +the reader is auto-consuming or the channel is MODE_CONTINUOUS. + +In order for the relay to detect the 'buffers full' condition for a +channel, it must be kept up-to-date with respect to the number of +buffers consumed by the client. If the addition of the value of the +bufs_consumed param to the current bufs_consumed count for the channel +would exceed the bufs_produced count for the channel, the channel's +bufs_consumed count will be set to the bufs_produced count for the +channel. This allows clients to 'catch up' if necessary. + +---------- +void relay_bytes_consumed(reader, bytes_consumed, read_offset) + +Adds to the channel's consumed count. bytes_consumed should be the +number of bytes actually read e.g. return value of relay_read() and +the read_offset should be the actual offset the bytes were read from +e.g. the actual_read_offset set by relay_read(). NOTE: kernel clients +don't need to call this function if the reader is auto-consuming or +the channel is MODE_CONTINUOUS. + +In order for the relay to detect the 'buffers full' condition for a +channel, it must be kept up-to-date with respect to the number of +bytes consumed by the client. For packet clients, it makes more sense +to update after each read rather than after each complete sub-buffer +read. The bytes_consumed count updates bufs_consumed when a buffer +has been consumed so this count remains consistent. + +---------- +int relay_info(channel_id, *channel_info) + +relay_info() fills in an rchan_info struct with channel status and +attribute information such as usage modes, sub-buffer size and count, +the allocated size of the entire buffer, buffers produced and +consumed, current buffer id, count of writes lost due to buffers full +condition. + +The virtual address of the channel buffer is also available here, for +those clients that need it. + +Clients may need to know how many 'unused' bytes there are at the end +of a given sub-buffer. This would only be the case if the client 1) +didn't either write this count to the end of the sub-buffer or +otherwise note it (it's available as the difference between the buffer +end and current write pos params in the buffer_end callback) (if the +client returned 0 from the buffer_end callback, it's assumed that this +is indeed the case) 2) isn't using the read() system call to read the +buffer. In other words, if the client isn't annotating the stream and +is reading the buffer by mmaping it, this information would be needed +in order for the client to 'skip over' the unused bytes at the ends of +sub-buffers. + +Additionally, for the lockless scheme, clients may need to know +whether a particular sub-buffer is actually complete. An array of +boolean values, one per sub-buffer, contains non-zero if the buffer is +complete, non-zero otherwise. + +---------- +int relay_close(channel_id) + +relay_close() is used to close the channel. It finalizes the last +sub-buffer (the one currently being written to) and marks the channel +as finalized. The channel buffer and channel data structure are then +freed automatically when the last reference to the channel is given +up. + +---------- +int relay_realloc_buffer(channel_id, nbufs, async) + +Allocates a new channel buffer using the specified sub-buffer count +(note that resizing can't change sub-buffer sizes). If async is +non-zero, the allocation is done in the background using a work queue. +When the allocation has completed, the needs_resize() callback is +called with a resize_type of RELAY_RESIZE_REPLACE. This function +doesn't replace the old buffer with the new - see +relay_replace_buffer(). + +This function is called by kernel clients in response to a +needs_resize() callback call with a resize type of RELAY_RESIZE_EXPAND +or RELAY_RESIZE_SHRINK. That callback also includes a suggested +new_bufsize and new_nbufs which should be used when calling this +function. + +Returns 0 on success, or errcode if the channel is busy or if +the allocation couldn't happen for some reason. + +NOTE: if async is not set, this function should not be called with a +lock held, as it may sleep. + +---------- +int relay_replace_buffer(channel_id) + +Replaces the current channel buffer with the new buffer allocated by +relay_realloc_buffer and contained in the channel struct. When the +replacement is complete, the needs_resize() callback is called with +RELAY_RESIZE_REPLACED. This function is called by kernel clients in +response to a needs_resize() callback having a resize type of +RELAY_RESIZE_REPLACE. + +Returns 0 on success, or errcode if the channel is busy or if the +replacement or previous allocation didn't happen for some reason. + +NOTE: This function will not sleep, so can called in any context and +with locks held. The client should, however, ensure that the channel +isn't actively being read from or written to. + +---------- +int relay_reset(rchan_id) + +relay_reset() has the effect of erasing all data from the buffer and +restarting the channel in its initial state. The buffer itself is not +freed, so any mappings are still in effect. NOTE: Care should be +taken that the channnel isn't actually being used by anything when +this call is made. + +---------- +int rchan_full(reader) + +returns 1 if the channel is full with respect to the reader, 0 if not. + +---------- +int rchan_empty(reader) + +returns 1 if the channel is empty with respect to the reader, 0 if not. + +---------- +int relay_discard_init_buf(rchan_id) + +allocates an mmappable channel buffer, copies the contents of init_buf +into it, and sets the current channel buffer to the newly allocated +buffer. This function is used only in conjunction with the init_buf +and init_buf_size params to relay_open(), and is typically used when +the ability to write into the channel at init-time is needed. The +basic usage is to specify an init_buf and init_buf_size to relay_open, +then call this function when it's safe to switch over to a normally +allocated channel buffer. 'Safe' means that the caller is in a +context that can sleep and that nothing is actively writing to the +channel. Returns 0 if successful, negative otherwise. + + +Writing directly into the channel +================================= + +Using the relay_write() API function as described above is the +preferred means of writing into a channel. In some cases, however, +in-kernel clients might want to write directly into a relay channel +rather than have relay_write() copy it into the buffer on the client's +behalf. Clients wishing to do this should follow the model used to +implement relay_write itself. The general sequence is: + +- get a pointer to the channel via rchan_get(). This increments the + channel's reference count. +- call relay_lock_channel(). This will perform the proper locking for + the channel given the scheme in use and the SMP usage. +- reserve a slot in the channel via relay_reserve() +- write directly to the reserved address +- call relay_commit() to commit the write +- call relay_unlock_channel() +- call rchan_put() to release the channel reference + +In particular, clients should make sure they call rchan_get() and +rchan_put() and not hold on to references to the channel pointer. +Also, forgetting to use relay_lock_channel()/relay_unlock_channel() +has no effect if the lockless scheme is being used, but could result +in corrupted buffer contents if the locking scheme is used. + + +Limitations +=========== + +Writes made via the write() system call are currently limited to 2 +pages worth of data. There is no such limit on the in-kernel API +function relay_write(). + +User applications can currently only mmap the complete buffer (it +doesn't really make sense to mmap only part of it, given its purpose). + + +Latest version +============== + +The latest version can be found at: + +http://www.opersys.com/relayfs + +Example relayfs clients, such as dynamic printk and the Linux Trace +Toolkit, can also be found there. + + +Credits +======= + +The ideas and specs for relayfs came about as a result of discussions +on tracing involving the following: + +Michel Dagenais +Richard Moore +Bob Wisniewski +Karim Yaghmour +Tom Zanussi + +Also thanks to Hubertus Franke for a lot of useful suggestions and bug +reports, and for contributing the klog code. diff --git a/Documentation/i2c/porting-clients b/Documentation/i2c/porting-clients index 56404918e..18b9acef0 100644 --- a/Documentation/i2c/porting-clients +++ b/Documentation/i2c/porting-clients @@ -49,8 +49,9 @@ Technical changes: static void lm75_update_client(struct i2c_client *client); * [Sysctl] All sysctl stuff is of course gone (defines, ctl_table - and functions). Instead, you have to define show and set functions for - each sysfs file. Only define set for writable values. Take a look at an + and functions). Instead, right after the static id definition + line, you have to define show and set functions for each sysfs + file. Only define set for writable values. Take a look at an existing 2.6 driver for details (lm78 for example). Don't forget to define the attributes for each file (this is that step that links callback functions). Use the file names specified in @@ -85,7 +86,6 @@ Technical changes: Replace the sysctl directory registration by calls to device_create_file. Move the driver initialization before any sysfs file creation. - Drop client->id. * [Init] Limits must not be set by the driver (can be done later in user-space). Chip should not be reset default (although a module diff --git a/Documentation/i386/zero-page.txt b/Documentation/i386/zero-page.txt index df28c7416..30badb4e3 100644 --- a/Documentation/i386/zero-page.txt +++ b/Documentation/i386/zero-page.txt @@ -74,11 +74,7 @@ Offset Type Description 0x21c unsigned long INITRD_SIZE, size in bytes of ramdisk image 0x220 4 bytes (setup.S) 0x224 unsigned short setup.S heap end pointer -0x226 unsigned short zero_pad -0x228 unsigned long cmd_line_ptr -0x22c unsigned long ramdisk_max -0x230 16 bytes trampoline 0x290 - 0x2cf EDD_MBR_SIG_BUFFER (edd.S) -0x2d0 - 0xd00 E820MAP -0xd00 - 0xeff EDDBUF (edd.S) for disk signature read sector -0xd00 - 0xeeb EDDBUF (edd.S) for edd data +0x2d0 - 0x600 E820MAP +0x600 - 0x7ff EDDBUF (edd.S) for disk signature read sector +0x600 - 0x7eb EDDBUF (edd.S) for edd data diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index 769f925c8..bd7a19777 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl-number.txt @@ -72,7 +72,6 @@ Code Seq# Include File Comments 0x09 all linux/md.h 0x12 all linux/fs.h linux/blkpg.h -0x1b all InfiniBand Subsystem 0x20 all drivers/cdrom/cm206.h 0x22 all scsi/sg.h '#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem @@ -146,7 +145,7 @@ Code Seq# Include File Comments 'p' 40-7F linux/nvram.h 'p' 80-9F user-space parport -'q' 00-1F linux/serio.h +'q' 00-1F linux/videotext.h conflict! 'q' 80-FF Internet PhoneJACK, Internet LineJACK 'r' 00-1F linux/msdos_fs.h @@ -164,7 +163,6 @@ Code Seq# Include File Comments 'z' 40-7F CAN bus card 0x80 00-1F linux/fb.h -0x81 00-1F linux/videotext.h 0x89 00-06 asm-i386/sockios.h 0x89 0B-DF linux/sockios.h 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4924d387a..3db6c5095 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -51,7 +51,6 @@ restrictions referred to are that the relevant option is valid if: MOUSE Appropriate mouse support is enabled. MTD MTD support is enabled. NET Appropriate network support is enabled. - NUMA NUMA support is enabled. NFS Appropriate NFS support is enabled. OSS OSS sound support is enabled. PARIDE The ParIDE subsystem is enabled. @@ -67,22 +66,17 @@ restrictions referred to are that the relevant option is valid if: SCSI Appropriate SCSI support is enabled. A lot of drivers has their options described inside of Documentation/scsi/. - SELINUX SELinux support is enabled. SERIAL Serial support is enabled. SMP The kernel is an SMP kernel. SPARC Sparc architecture is enabled. SWSUSP Software suspension is enabled. TS Appropriate touchscreen support is enabled. USB USB support is enabled. - USBHID USB Human Interface Device support is enabled. V4L Video For Linux support is enabled. VGA The VGA console has been enabled. VT Virtual terminal support is enabled. WDT Watchdog support is enabled. XT IBM PC/XT MFM hard disk support is enabled. - X86-64 X86-64 architecture is enabled. - More X86-64 boot options can be found in - Documentation/x86_64/boot-options.txt . In addition, the following text indicates that the option: @@ -157,8 +151,6 @@ running once the system is up. debugging. After system has booted up, it can be set via /proc/acpi/debug_level. - acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT - ad1816= [HW,OSS] Format: ,,, See also Documentation/sound/oss/AD1816. @@ -231,19 +223,15 @@ running once the system is up. atascsi= [HW,SCSI] Atari SCSI - atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess, - EzKey and similar keyboards + atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess, EzKey + and similar keyboards atkbd.reset= [HW] Reset keyboard during initialization atkbd.set= [HW] Select keyboard code set Format: (2 = AT (default) 3 = PS/2) - atkbd.scroll= [HW] Enable scroll wheel on MS Office and similar - keyboards - - atkbd.softraw= [HW] Choose between synthetic and real raw mode - Format: (0 = real, 1 = synthetic (default)) + atkbd.scroll= [HW] Enable scroll wheel on MS Office and similar keyboards atkbd.softrepeat= [HW] Use software keyboard repeat @@ -300,14 +288,6 @@ running once the system is up. See header of drivers/cdrom/cdu31a.c. chandev= [HW,NET] Generic channel device initialisation - - checkreqprot [SELINUX] Set initial checkreqprot flag value. - Format: { "0" | "1" } - See security/selinux/Kconfig help text. - 0 -- check protection applied by kernel (includes any implied execute protection). - 1 -- check protection requested by application. - Default value is set via a kernel config option. - Value can be changed at runtime via /selinux/checkreqprot. clock= [BUGS=IA-32, HW] gettimeofday timesource override. Forces specified timesource (if avaliable) to be used @@ -406,7 +386,7 @@ running once the system is up. dtc3181e= [HW,SCSI] - earlyprintk= [IA-32, X86-64] + earlyprintk= [x86, x86_64] earlyprintk=vga earlyprintk=serial[,ttySn[,baudrate]] @@ -429,7 +409,7 @@ running once the system is up. edb= [HW,PS2] - edd= [EDD] + edd [EDD] Format: {"of[f]" | "sk[ipmbr]"} See comment in arch/i386/boot/edd.S @@ -448,14 +428,6 @@ running once the system is up. See Documentation/block/as-iosched.txt and Documentation/block/deadline-iosched.txt for details. - enforcing [SELINUX] Set initial enforcing status. - Format: {"0" | "1"} - See security/selinux/Kconfig help text. - 0 -- permissive (log only, no denials). - 1 -- enforcing (deny and log). - Default value is 0. - Value can be changed at runtime via /selinux/enforce. - es1370= [HW,OSS] Format: [,] See also header of sound/oss/es1370.c. @@ -507,10 +479,6 @@ running once the system is up. gvp11= [HW,SCSI] - hashdist= [KNL,NUMA] Large hashes allocated during boot - are distributed across NUMA nodes. Defaults on - for IA-64, off otherwise. - hcl= [IA-64] SGI's Hardware Graph compatibility layer hd= [EIDE] (E)IDE hard drive subsystem geometry @@ -538,11 +506,6 @@ running once the system is up. i8042.noaux [HW] Don't check for auxiliary (== mouse) port i8042.nomux [HW] Don't check presence of an active multiplexing controller - i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX - controllers - i8042.panicblink= - [HW] Frequency with which keyboard LEDs should blink - when kernel panics (default is 0.5 sec) i8042.reset [HW] Reset the controller during init and cleanup i8042.unlock [HW] Unlock (ignore) the keylock @@ -611,17 +574,26 @@ running once the system is up. ips= [HW,SCSI] Adaptec / IBM ServeRAID controller See header of drivers/scsi/ips.c. + irqfixup [HW] + When an interrupt is not handled search all handlers + for it. Intended to get systems with badly broken + firmware running. + + irqpoll [HW] + When an interrupt is not handled search all handlers + for it. Also check all handlers each timer + interrupt. Intended to get systems with badly broken + firmware running. + isapnp= [ISAPNP] Format: , , , isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler. - Format: ,..., + Format: , ..., This option can be used to specify one or more CPUs to isolate from the general SMP balancing and scheduling algorithms. The only way to move a process onto or off an "isolated" CPU is via the CPU affinity syscalls. - begins at 0 and the maximum value is - "number of CPUs in system - 1". This option is the preferred way to isolate CPUs. The alternative - manually setting the CPU mask of all tasks @@ -638,9 +610,6 @@ running once the system is up. keepinitrd [HW,ARM] - kstack=N [IA-32, X86-64] Print N words from the kernel stack - in oops dumps. - l2cr= [PPC] lapic [IA-32,APIC] Enable the local APIC even if BIOS disabled it. @@ -661,20 +630,6 @@ running once the system is up. logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver Format: - loglevel= All Kernel Messages with a loglevel smaller than the - console loglevel will be printed to the console. It can - also be changed with klogd or other programs. The - loglevels are defined as follows: - - 0 (KERN_EMERG) system is unusable - 1 (KERN_ALERT) action must be taken immediately - 2 (KERN_CRIT) critical conditions - 3 (KERN_ERR) error conditions - 4 (KERN_WARNING) warning conditions - 5 (KERN_NOTICE) normal but significant condition - 6 (KERN_INFO) informational - 7 (KERN_DEBUG) debug-level messages - log_buf_len=n Sets the size of the printk ring buffer, in bytes. Format is n, nk, nM. n must be a power of two. The default is set in kernel config. @@ -718,11 +673,7 @@ running once the system is up. mac53c9x= [HW,SCSI] Format: ,,,,,,, - - machvec= [IA64] - Force the use of a particular machine-vector (machvec) in a generic - kernel. Example: machvec=hpzx1_swiotlb - + mad16= [HW,OSS] Format: ,,,,,, @@ -817,10 +768,6 @@ running once the system is up. mtdparts= [MTD] See drivers/mtd/cmdline.c. - mtouchusb.raw_coordinates= - [HW] Make the MicroTouch USB driver use raw coordinates ('y', default) - or cooked coordinates ('n') - n2= [NET] SDL Inc. RISCom/N2 synchronous serial card NCR_D700= [HW,SCSI] @@ -870,7 +817,7 @@ running once the system is up. noexec [IA-64] - noexec [IA-32, X86-64] + noexec [i386, x86_64] noexec=on: enable non-executable mappings (default) noexec=off: disable nn-executable mappings @@ -882,13 +829,6 @@ running once the system is up. instruction doesn't work correctly and not to use it. - nohalt [IA-64] Tells the kernel not to use the power saving - function PAL_HALT_LIGHT when idle. This increases - power-consumption. On the positive side, it reduces - interrupt wake-up latency, which may improve performance - in certain environments such as networked servers or - real-time systems. - noirqdebug [IA-32] Disables the code which attempts to detect and disable unhandled interrupt sources. @@ -948,13 +888,6 @@ running once the system is up. panic= [KNL] Kernel behaviour on panic Format: - parkbd.port= [HW] Parallel port number the keyboard adapter is - connected to, default is 0. - Format: - parkbd.mode= [HW] Parallel port keyboard adapter mode of operation, - 0 for XT, 1 for AT (default is AT). - Format: - parport=0 [HW,PPT] Specify parallel ports. 0 disables. parport=auto Use 'auto' to force the driver to use parport=0xBBB[,IRQ[,DMA]] any IRQ/DMA settings detected (the @@ -1070,9 +1003,6 @@ running once the system is up. Format: { parport | timid | 0 } See also Documentation/parport.txt. - pnpacpi= [ACPI] - { off } - pnpbios= [ISAPNP] { on | off | curr | res | no-curr | no-res } @@ -1158,9 +1088,6 @@ running once the system is up. root= [KNL] Root filesystem - rootdelay= [KNL] Delay (in seconds) to pause before attempting to - mount the root filesystem - rootflags= [KNL] Set root filesystem mount option string rootfstype= [KNL] Set root filesystem type @@ -1198,17 +1125,11 @@ running once the system is up. scsi_logging= [SCSI] - selinux [SELINUX] Disable or enable SELinux at boot time. - Format: { "0" | "1" } - See security/selinux/Kconfig help text. - 0 -- disable. - 1 -- enable. - Default value is set via kernel config option. - If enabled at boot time, /selinux/disable can be used - later to disable prior to initial policy load. - serialnumber [BUGS=IA-32] + sf16fm= [HW] SF16FMI radio driver for Linux + Format: + sg_def_reserved_size= [SCSI] @@ -1403,6 +1324,9 @@ running once the system is up. sym53c416= [HW,SCSI] See header of drivers/scsi/sym53c416.c. + sym53c8xx= [HW,SCSI] + See Documentation/scsi/ncr53c8xx.txt. + t128= [HW,SCSI] See header of drivers/scsi/t128.c. @@ -1411,15 +1335,12 @@ running once the system is up. thash_entries= [KNL,NET] Set number of hash buckets for TCP connection - time Show timing data prefixed to each printk message line - - tipar.timeout= [HW,PPT] - Set communications timeout in tenths of a second - (default 15). - - tipar.delay= [HW,PPT] - Set inter-bit delay in microseconds (default 10). + tipar= [HW] + See header of drivers/char/tipar.c. + tiusb= [HW,USB] Texas Instruments' USB GraphLink (aka SilverLink) + Format: + tmc8xx= [HW,SCSI] See header of drivers/scsi/seagate.c. @@ -1450,9 +1371,6 @@ running once the system is up. Format: , usb-handoff [HW] Enable early USB BIOS -> OS handoff - - usbhid.mousepoll= - [USBHID] The interval which mice are to be polled at. video= [FB] Frame buffer configuration See Documentation/fb/modedb.txt. diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt index cc4b4d041..99c1485d7 100644 --- a/Documentation/networking/pktgen.txt +++ b/Documentation/networking/pktgen.txt @@ -1,214 +1,77 @@ - - - HOWTO for the linux packet generator - ------------------------------------ - -Date: 041221 - -Enable CONFIG_NET_PKTGEN to compile and build pktgen.o either in kernel -or as module. Module is preferred. insmod pktgen if needed. Once running -pktgen creates a thread on each CPU where each thread has affinty it's CPU. -Monitoring and controlling is done via /proc. Easiest to select a suitable -a sample script and configure. - -On a dual CPU: - -ps aux | grep pkt -root 129 0.3 0.0 0 0 ? SW 2003 523:20 [pktgen/0] -root 130 0.3 0.0 0 0 ? SW 2003 509:50 [pktgen/1] - - -For montoring and control pktgen creates: - /proc/net/pktgen/pgctrl - /proc/net/pktgen/kpktgend_X - /proc/net/pktgen/ethX - - -Viewing threads -=============== -/proc/net/pktgen/kpktgend_0 -Name: kpktgend_0 max_before_softirq: 10000 -Running: -Stopped: eth1 -Result: OK: max_before_softirq=10000 - -Most important the devices assigend to thread. Note! A device can only belong -to one thread. - - -Viewing devices -=============== - -Parm section holds configured info. Current hold running stats. -Result is printed after run or after interruption. Example: - -/proc/net/pktgen/eth1 - -Params: count 10000000 min_pkt_size: 60 max_pkt_size: 60 - frags: 0 delay: 0 clone_skb: 1000000 ifname: eth1 - flows: 0 flowlen: 0 - dst_min: 10.10.11.2 dst_max: - src_min: src_max: - src_mac: 00:00:00:00:00:00 dst_mac: 00:04:23:AC:FD:82 - udp_src_min: 9 udp_src_max: 9 udp_dst_min: 9 udp_dst_max: 9 - src_mac_count: 0 dst_mac_count: 0 - Flags: -Current: - pkts-sofar: 10000000 errors: 39664 - started: 1103053986245187us stopped: 1103053999346329us idle: 880401us - seq_num: 10000011 cur_dst_mac_offset: 0 cur_src_mac_offset: 0 - cur_saddr: 0x10a0a0a cur_daddr: 0x20b0a0a - cur_udp_dst: 9 cur_udp_src: 9 - flows: 0 -Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags) - 763292pps 390Mb/sec (390805504bps) errors: 39664 - -Confguring threads and devices -============================== -This is done via the /proc interface easiest done via pgset in the scripts - -Examples: - - pgset "clone_skb 1" sets the number of copies of the same packet - pgset "clone_skb 0" use single SKB for all transmits - pgset "pkt_size 9014" sets packet size to 9014 - pgset "frags 5" packet will consist of 5 fragments - pgset "count 200000" sets number of packets to send, set to zero - for continious sends untill explicitl stopped. - - pgset "delay 5000" adds delay to hard_start_xmit(). nanoseconds - - pgset "dst 10.0.0.1" sets IP destination address - (BEWARE! This generator is very aggressive!) - - pgset "dst_min 10.0.0.1" Same as dst - pgset "dst_max 10.0.0.254" Set the maximum destination IP. - pgset "src_min 10.0.0.1" Set the minimum (or only) source IP. - pgset "src_max 10.0.0.254" Set the maximum source IP. - pgset "dst6 fec0::1" IPV6 destination address - pgset "src6 fec0::2" IPV6 source address - pgset "dstmac 00:00:00:00:00:00" sets MAC destination address - pgset "srcmac 00:00:00:00:00:00" sets MAC source address - - pgset "src_mac_count 1" Sets the number of MACs we'll range through. - The 'minimum' MAC is what you set with srcmac. - - pgset "dst_mac_count 1" Sets the number of MACs we'll range through. - The 'minimum' MAC is what you set with dstmac. - - pgset "flag [name]" Set a flag to determine behaviour. Current flags - are: IPSRC_RND #IP Source is random (between min/max), - IPDST_RND, UDPSRC_RND, - UDPDST_RND, MACSRC_RND, MACDST_RND - - pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then - cycle through the port range. - - pgset "udp_src_max 9" set UDP source port max. - pgset "udp_dst_min 9" set UDP destination port min, If < udp_dst_max, then - cycle through the port range. - pgset "udp_dst_max 9" set UDP destination port max. - - pgset stop aborts injection. Also, ^C aborts generator. - - -Example scripts -=============== - -A collection of small tutorial scripts for pktgen is in expamples dir. - -pktgen.conf-1-1 # 1 CPU 1 dev -pktgen.conf-1-2 # 1 CPU 2 dev -pktgen.conf-2-1 # 2 CPU's 1 dev -pktgen.conf-2-2 # 2 CPU's 2 dev -pktgen.conf-1-1-rdos # 1 CPU 1 dev w. route DoS -pktgen.conf-1-1-ip6 # 1 CPU 1 dev ipv6 -pktgen.conf-1-1-ip6-rdos # 1 CPU 1 dev ipv6 w. route DoS -pktgen.conf-1-1-flows # 1 CPU 1 dev multiple flows. - -Run in shell: ./pktgen.conf-X-Y It does all the setup including sending. - - -Interrupt affinity -=================== -Note when adding devices to a specific CPU there good idea to also assign -/proc/irq/XX/smp_affinity so the TX-interrupts gets bound to the same CPU. -as this reduces cache bouncing when freeing skb's. - - -Current commands and configuration options -========================================== - -** Pgcontrol commands: - -start -stop - -** Thread commands: - -add_device -rem_device_all -max_before_softirq - - -** Device commands: - -count -clone_skb -debug - -frags -delay - -src_mac_count -dst_mac_count - -pkt_size -min_pkt_size -max_pkt_size - -udp_src_min -udp_src_max - -udp_dst_min -udp_dst_max - -flag - IPSRC_RND - TXSIZE_RND - IPDST_RND - UDPSRC_RND - UDPDST_RND - MACSRC_RND - MACDST_RND - -dst_min -dst_max - -src_min -src_max - -dst_mac -src_mac - -clear_counters - -dst6 -src6 - -flows -flowlen - -References: -ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ -ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/ - -Paper from Linux-Kongress in Erlangen 2004. -ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/pktgen_paper.pdf - -Thanks to: -Grant Grundler for testing on IA-64 and parisc, Harald Welte, Lennert Buytenhek -Stephen Hemminger, Andi Kleen, Dave Miller and many others. - - -Good luck with the linux net-development. \ No newline at end of file +How to use the Linux packet generator module. + +1. Enable CONFIG_NET_PKTGEN to compile and build pktgen.o, install it + in the place where insmod may find it. +2. Cut script "ipg" (see below). +3. Edit script to set preferred device and destination IP address. +3a. Create more scripts for different interfaces. Up to thirty-two + pktgen processes can be configured and run at once by using the + 32 /proc/net/pktgen/pg* files. +4. Run in shell: ". ipg" +5. After this two commands are defined: + A. "pg" to start generator and to get results. + B. "pgset" to change generator parameters. F.e. + pgset "clone_skb 100" sets the number of copies of the same packet + will be sent before a new packet is allocated + pgset "clone_skb 0" use multiple SKBs for packet generation + pgset "pkt_size 9014" sets packet size to 9014 + pgset "frags 5" packet will consist of 5 fragments + pgset "count 200000" sets number of packets to send, set to zero + for continuous sends until explicitly + stopped. + pgset "ipg 5000" sets artificial gap inserted between packets + to 5000 nanoseconds + pgset "dst 10.0.0.1" sets IP destination address + (BEWARE! This generator is very aggressive!) + pgset "dst_min 10.0.0.1" Same as dst + pgset "dst_max 10.0.0.254" Set the maximum destination IP. + pgset "src_min 10.0.0.1" Set the minimum (or only) source IP. + pgset "src_max 10.0.0.254" Set the maximum source IP. + pgset "dstmac 00:00:00:00:00:00" sets MAC destination address + pgset "srcmac 00:00:00:00:00:00" sets MAC source address + pgset "src_mac_count 1" Sets the number of MACs we'll range through. The + 'minimum' MAC is what you set with srcmac. + pgset "dst_mac_count 1" Sets the number of MACs we'll range through. The + 'minimum' MAC is what you set with dstmac. + pgset "flag [name]" Set a flag to determine behaviour. Current flags + are: IPSRC_RND #IP Source is random (between min/max), + IPDST_RND, UDPSRC_RND, + UDPDST_RND, MACSRC_RND, MACDST_RND + pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then + cycle through the port range. + pgset "udp_src_max 9" set UDP source port max. + pgset "udp_dst_min 9" set UDP destination port min, If < udp_dst_max, then + cycle through the port range. + pgset "udp_dst_max 9" set UDP destination port max. + pgset stop aborts injection + + Also, ^C aborts generator. + +---- cut here + +#! /bin/sh + +modprobe pktgen + +PGDEV=/proc/net/pktgen/pg0 + +function pgset() { + local result + + echo $1 > $PGDEV + + result=`cat $PGDEV | fgrep "Result: OK:"` + if [ "$result" = "" ]; then + cat $PGDEV | fgrep Result: + fi +} + +function pg() { + echo inject > $PGDEV + cat $PGDEV +} + +pgset "odev eth0" +pgset "dst 0.0.0.0" + +---- cut here diff --git a/Documentation/pci.txt b/Documentation/pci.txt index 62b1dc5d9..b0676d114 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt @@ -99,10 +99,10 @@ where all fields are passed in as hexadecimal values (no leading 0x). Users need pass only as many fields as necessary; vendor, device, subvendor, and subdevice fields default to PCI_ANY_ID (FFFFFFFF), class and classmask fields default to 0, and driver_data defaults to -0UL. Device drivers must initialize use_driver_data in the dynids struct -in their pci_driver struct prior to calling pci_register_driver in order -for the driver_data field to get passed to the driver. Otherwise, only a -0 is passed in that field. +0UL. Device drivers must call + pci_dynids_set_use_driver_data(pci_driver *, 1) +in order for the driver_data field to get passed to the driver. +Otherwise, only a 0 is passed in that field. When the driver exits, it just calls pci_unregister_driver() and the PCI layer automatically calls the remove hook for all devices handled by the driver. @@ -279,7 +279,6 @@ pci_for_each_dev_reverse() Superseded by pci_find_device_reverse() pci_for_each_bus() Superseded by pci_find_next_bus() pci_find_device() Superseded by pci_get_device() pci_find_subsys() Superseded by pci_get_subsys() -pci_find_slot() Superseded by pci_get_slot() pcibios_find_class() Superseded by pci_get_class() pci_find_class() Superseded by pci_get_class() pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*() diff --git a/Documentation/power/pci.txt b/Documentation/power/pci.txt index 35b1a7dae..c85428e7a 100644 --- a/Documentation/power/pci.txt +++ b/Documentation/power/pci.txt @@ -165,9 +165,40 @@ Description: These functions are intended for use by individual drivers, and are defined in struct pci_driver: - int (*suspend) (struct pci_dev *dev, pm_message_t state); + int (*save_state) (struct pci_dev *dev, u32 state); + int (*suspend) (struct pci_dev *dev, u32 state); int (*resume) (struct pci_dev *dev); - int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); + int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); + + +save_state +---------- + +Usage: + +if (dev->driver && dev->driver->save_state) + dev->driver->save_state(dev,state); + +The driver should use this callback to save device state. It should take into +account the current state of the device and the requested state in order to +avoid any unnecessary operations. + +For example, a video card that supports all 4 states (D0-D3), all controller +context is preserved when entering D1, but the screen is placed into a low power +state (blanked). + +The driver can also interpret this function as a notification that it may be +entering a sleep state in the near future. If it knows that the device cannot +enter the requested state, either because of lack of support for it, or because +the device is middle of some critical operation, then it should fail. + +This function should not be used to set any state in the device or the driver +because the device may not actually enter the sleep state (e.g. another driver +later causes causes a global state transition to fail). + +Note that in intermediate low power states, a device's I/O and memory spaces may +be disabled and may not be available in subsequent transitions to lower power +states. suspend diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index c7c3459fd..3b7172df0 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt @@ -15,9 +15,6 @@ From kernel/suspend.c: * If you change kernel command line between suspend and resume... * ...prepare for nasty fsck or worse. * - * If you change your hardware while system is suspended... - * ...well, it was not good idea. - * * (*) suspend/resume support is needed to make it safe. You need to append resume=/dev/your_swap_partition to kernel command @@ -186,50 +183,3 @@ firmware: tell bios to save state itself [needs BIOS-specific suspend "platform" is actually right thing to do, but "shutdown" is most reliable. - -Q: I do not understand why you have such strong objections to idea of -selective suspend. - -A: Do selective suspend during runtime power managment, that's okay. But -its useless for suspend-to-disk. (And I do not see how you could use -it for suspend-to-ram, I hope you do not want that). - -Lets see, so you suggest to - -* SUSPEND all but swap device and parents -* Snapshot -* Write image to disk -* SUSPEND swap device and parents -* Powerdown - -Oh no, that does not work, if swap device or its parents uses DMA, -you've corrupted data. You'd have to do - -* SUSPEND all but swap device and parents -* FREEZE swap device and parents -* Snapshot -* UNFREEZE swap device and parents -* Write -* SUSPEND swap device and parents - -Which means that you still need that FREEZE state, and you get more -complicated code. (And I have not yet introduce details like system -devices). - -Q: There don't seem to be any generally useful behavioral -distinctions between SUSPEND and FREEZE. - -A: Doing SUSPEND when you are asked to do FREEZE is always correct, -but it may be unneccessarily slow. If you want USB to stay simple, -slowness may not matter to you. It can always be fixed later. - -For devices like disk it does matter, you do not want to spindown for -FREEZE. - -Q: After resuming, system is paging heavilly, leading to very bad interactivity. - -A: Try running - -cat `cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u` > /dev/null - -after resume. swapoff -a; swapon -a may also be usefull. diff --git a/Documentation/power/video.txt b/Documentation/power/video.txt index 68734355d..ed8788e93 100644 --- a/Documentation/power/video.txt +++ b/Documentation/power/video.txt @@ -1,7 +1,7 @@ Video issues with S3 resume ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2003-2005, Pavel Machek + 2003-2004, Pavel Machek During S3 resume, hardware needs to be reinitialized. For most devices, this is easy, and kernel driver knows how to do @@ -11,160 +11,33 @@ boot video card. (Kernel usually does not even contain video card driver -- vesafb and vgacon are widely used). This is not problem for swsusp, because during swsusp resume, BIOS is -run normally so video card is normally initialized. S3 has absolutely -no chance of working with SMP/HT. Be sure it to turn it off before -testing (swsusp should work ok, OTOH). +run normally so video card is normally initialized. -There are a few types of systems where video works after S3 resume: +There are three types of systems where video works after S3 resume: -(1) systems where video state is preserved over S3. +* systems where video state is preserved over S3. (Athlon HP Omnibook xe3s) -(2) systems where it is possible to call the video BIOS during S3 - resume. Unfortunately, it is not correct to call the video BIOS at - that point, but it happens to work on some machines. Use - acpi_sleep=s3_bios. +* systems where it is possible to call video bios during S3 + resume. Unfortunately, it is not correct to call video BIOS at that + point, but it happens to work on some machines. Use + acpi_sleep=s3_bios (Athlon64 desktop system) -(3) systems that initialize video card into vga text mode and where - the BIOS works well enough to be able to set video mode. Use - acpi_sleep=s3_mode on these. +* systems that initialize video card into vga text mode and where BIOS + works well enough to be able to set video mode. Use + acpi_sleep=s3_mode on these. (Toshiba 4030cdt) -(4) on some systems s3_bios kicks video into text mode, and - acpi_sleep=s3_bios,s3_mode is needed. +* on some systems s3_bios kicks video into text mode, and + acpi_sleep=s3_bios,s3_mode is needed (Toshiba Satellite P10-554) -(5) radeon systems, where X can soft-boot your video card. You'll need - a new enough X, and a plain text console (no vesafb or radeonfb). See - http://www.doesi.gmxhome.de/linux/tm800s3/s3.html for more information. - Alternatively, you should use vbetool (6) instead. - -(6) other radeon systems, where vbetool is enough to bring system back - to life. It needs text console to be working. Do vbetool vbestate - save > /tmp/delme; echo 3 > /proc/acpi/sleep; vbetool post; vbetool - vbestate restore < /tmp/delme; setfont , and your video - should work. - -(7) on some systems, it is possible to boot most of kernel, and then - POSTing bios works. Ole Rohne has patch to do just that at - http://dev.gentoo.org/~marineam/patch-radeonfb-2.6.11-rc2-mm2. +* radeon systems, where X can soft-boot your video card. You'll need + patched X, and plain text console (no vesafb or radeonfb), see + http://www.doesi.gmxhome.de/linux/tm800s3/s3.html. (Acer TM 800) Now, if you pass acpi_sleep=something, and it does not work with your -bios, you'll get a hard crash during resume. Be careful. Also it is -safest to do your experiments with plain old VGA console. The vesafb -and radeonfb (etc) drivers have a tendency to crash the machine during -resume. +bios, you'll get hard crash during resume. Be carefull. -You may have a system where none of above works. At that point you +You may have system where none of above works. At that point you either invent another ugly hack that works, or write proper driver for your video card (good luck getting docs :-(). Maybe suspending from X (proper X, knowing your hardware, not XF68_FBcon) might have better chance of working. - -Table of known working systems: - -Model hack (or "how to do it") ------------------------------------------------------------------------------- -Acer Aspire 1406LC ole's late BIOS init (7), turn off DRI -Acer TM 242FX vbetool (6) -Acer TM C300 vga=normal (only suspend on console, not in X), vbetool (6) -Acer TM 4052LCi s3_bios (2) -Acer TM 636Lci s3_bios vga=normal (2) -Acer TM 650 (Radeon M7) vga=normal plus boot-radeon (5) gets text console back -Acer TM 660 ??? (*) -Acer TM 800 vga=normal, X patches, see webpage (5) or vbetool (6) -Acer TM 803 vga=normal, X patches, see webpage (5) or vbetool (6) -Acer TM 803LCi vga=normal, vbetool (6) -Arima W730a vbetool needed (6) -Asus L2400D s3_mode (3)(***) (S1 also works OK) -Asus L3350M (SiS 740) (6) -Asus L3800C (Radeon M7) s3_bios (2) (S1 also works OK) -Asus M6887Ne vga=normal, s3_bios (2), use radeon driver instead of fglrx in x.org -Athlon64 desktop prototype s3_bios (2) -Compal CL-50 ??? (*) -Compaq Armada E500 - P3-700 none (1) (S1 also works OK) -Compaq Evo N620c vga=normal, s3_bios (2) -Dell 600m, ATI R250 Lf none (1), but needs xorg-x11-6.8.1.902-1 -Dell D600, ATI RV250 vga=normal and X, or try vbestate (6) -Dell Inspiron 4000 ??? (*) -Dell Inspiron 500m ??? (*) -Dell Inspiron 600m ??? (*) -Dell Inspiron 8200 ??? (*) -Dell Inspiron 8500 ??? (*) -Dell Inspiron 8600 ??? (*) -eMachines athlon64 machines vbetool needed (6) (someone please get me model #s) -HP NC6000 s3_bios, may not use radeonfb (2); or vbetool (6) -HP NX7000 ??? (*) -HP Pavilion ZD7000 vbetool post needed, need open-source nv driver for X -HP Omnibook XE3 athlon version none (1) -HP Omnibook XE3GC none (1), video is S3 Savage/IX-MV -IBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 Savage/IX-MV, vesafb gets "interesting" but X work. -IBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with BIOS 1.04 2002-08-23, but not at all with BIOS 1.11 2004-11-05 :-(] -IBM TP R32 / Type 2658-MMG none (1) -IBM TP R40 2722B3G ??? (*) -IBM TP R50p / Type 1832-22U s3_bios (2) -IBM TP R51 none (1) -IBM TP T30 236681A ??? (*) -IBM TP T40 / Type 2373-MU4 none (1) -IBM TP T40p none (1) -IBM TP R40p s3_bios (2) -IBM TP T41p s3_bios (2), switch to X after resume -IBM TP T42 s3_bios (2) -IBM ThinkPad T42p (2373-GTG) s3_bios (2) -IBM TP X20 ??? (*) -IBM TP X30 s3_bios (2) -IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight. -IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4) -Medion MD4220 ??? (*) -Samsung P35 vbetool needed (6) -Sharp PC-AR10 (ATI rage) none (1) -Sony Vaio PCG-F403 ??? (*) -Sony Vaio PCG-N505SN ??? (*) -Sony Vaio vgn-s260 X or boot-radeon can init it (5) -Toshiba Libretto L5 none (1) -Toshiba Satellite 4030CDT s3_mode (3) -Toshiba Satellite 4080XCDT s3_mode (3) -Toshiba Satellite 4090XCDT ??? (*) -Toshiba Satellite P10-554 s3_bios,s3_mode (4)(****) -Uniwill 244IIO ??? (*) - - -(*) from http://www.ubuntulinux.org/wiki/HoaryPMResults, not sure - which options to use. If you know, please tell me. - -(***) To be tested with a newer kernel. - -(****) Not with SMP kernel, UP only. - -VBEtool details -~~~~~~~~~~~~~~~ -(with thanks to Carl-Daniel Hailfinger) - -First, boot into X and run the following script ONCE: -#!/bin/bash -statedir=/root/s3/state -mkdir -p $statedir -chvt 2 -sleep 1 -vbetool vbestate save >$statedir/vbe - - -To suspend and resume properly, call the following script as root: -#!/bin/bash -statedir=/root/s3/state -curcons=`fgconsole` -fuser /dev/tty$curcons 2>/dev/null|xargs ps -o comm= -p|grep -q X && chvt 2 -cat /dev/vcsa >$statedir/vcsa -sync -echo 3 >/proc/acpi/sleep -sync -vbetool post -vbetool vbestate restore <$statedir/vbe -cat $statedir/vcsa >/dev/vcsa -rckbd restart -chvt $[curcons%6+1] -chvt $curcons - - -Unless you change your graphics card or other hardware configuration, -the state once saved will be OK for every resume afterwards. -NOTE: The "rckbd restart" command may be different for your -distribution. Simply replace it with the command you would use to -set the fonts on screen. diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt index e41703d7d..e764129e7 100644 --- a/Documentation/scsi/scsi_mid_low_api.txt +++ b/Documentation/scsi/scsi_mid_low_api.txt @@ -363,8 +363,8 @@ and Adaptec have their own coding conventions. Mid level supplied functions ============================ These functions are supplied by the SCSI mid level for use by LLDs. -The names (i.e. entry points) of these functions are exported -so an LLD that is a module can access them. The kernel will +The names (i.e. entry points) of these functions are exported (mainly in +scsi_syms.c) so an LLD that is a module can access them. The kernel will arrange for the SCSI mid level to be loaded and initialized before any LLD is initialized. The functions below are listed alphabetically and their names all start with "scsi_". @@ -389,6 +389,8 @@ Summary: scsi_remove_host - detach and remove all SCSI devices owned by host scsi_report_bus_reset - report scsi _bus_ reset observed scsi_set_device - place device reference in host structure + scsi_to_pci_dma_dir - convert SCSI subsystem direction flag to PCI + scsi_to_sbus_dma_dir - convert SCSI subsystem direction flag to SBUS scsi_track_queue_full - track successive QUEUE_FULL events scsi_unblock_requests - allow further commands to be queued to given host scsi_unregister - [calls scsi_host_put()] @@ -754,6 +756,48 @@ void scsi_report_bus_reset(struct Scsi_Host * shost, int channel) void scsi_set_device(struct Scsi_Host * shost, struct device * dev) +/** + * scsi_to_pci_dma_dir - convert SCSI subsystem direction flag to PCI + * @scsi_data_direction: SCSI subsystem direction flag + * + * Returns DMA_TO_DEVICE given SCSI_DATA_WRITE, + * DMA_FROM_DEVICE given SCSI_DATA_READ + * DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN + * else returns DMA_NONE + * + * Might block: no + * + * Notes: The SCSI subsystem now uses the same values for these + * constants as the PCI subsystem so this function is a nop. + * The recommendation is not to use this conversion function anymore + * (in the 2.6 kernel series) as it is not needed. + * + * Defined in: drivers/scsi/scsi.h . + **/ +int scsi_to_pci_dma_dir(unsigned char scsi_data_direction) + + +/** + * scsi_to_sbus_dma_dir - convert SCSI subsystem direction flag to SBUS + * @scsi_data_direction: SCSI subsystem direction flag + * + * Returns DMA_TO_DEVICE given SCSI_DATA_WRITE, + * FROM_DEVICE given SCSI_DATA_READ + * DMA_BIDIRECTIONAL given SCSI_DATA_UNKNOWN + * else returns DMA_NONE + * + * Notes: The SCSI subsystem now uses the same values for these + * constants as the SBUS subsystem so this function is a nop. + * The recommendation is not to use this conversion function anymore + * (in the 2.6 kernel series) as it is not needed. + * + * Might block: no + * + * Defined in: drivers/scsi/scsi.h . + **/ +int scsi_to_sbus_dma_dir(unsigned char scsi_data_direction) + + /** * scsi_track_queue_full - track successive QUEUE_FULL events on given * device to determine if and when there is a need diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 71ef0498d..35b433121 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -7,75 +7,75 @@ Kernel Configuration ==================== -To enable ALSA support you need at least to build the kernel with -primary sound card support (CONFIG_SOUND). Since ALSA can emulate OSS, -you don't have to choose any of the OSS modules. - -Enable "OSS API emulation" (CONFIG_SND_OSSEMUL) and both OSS mixer and -PCM supports if you want to run OSS applications with ALSA. - -If you want to support the WaveTable functionality on cards such as -SB Live! then you need to enable "Sequencer support" +To enable the ALSA support, at least you need to build the kernel with +the primary sound card support (CONFIG_SOUND). Since ALSA can emulate +the OSS, you don't have to choose any of the OSS/Free modules. Please +enable "OSS API emulation" (CONFIG_SND_OSSEMUL) and both OSS mixer and +PCM supports if you want to run the OSS application with the ALSA. + +When you want to support the WaveTable functionality on some cards +such like SB Live!, you need to enable "Sequencer support" (CONFIG_SND_SEQUENCER). -To make ALSA debug messages more verbose, enable the "Verbose printk" -and "Debug" options. To check for memory leaks, turn on "Debug memory" -too. "Debug detection" will add checks for the detection of cards. +For getting more verbose debug messages, turn on "Verbose printk" and +"Debug" options. For checking the memory leaks, you can turn on +"Debug memory" option, too. "Debug detection" will put more +additional checks for the detection of cards. -Please note that all the ALSA ISA drivers support the Linux isapnp API -(if the card supports ISA PnP). You don't need to configure the cards -using isapnptools. +Please note that all the ALSA ISA drivers support Linux isapnp API (if +the card supports). You don't need to configure the PnP via +isapnptools. Creating ALSA devices ===================== -This depends on your distribution, but normally you use the /dev/MAKEDEV -script to create the necessary device nodes. On some systems you use a -script named 'snddevices'. +Use the /dev/MAKEDEV script to create the nessecary device nodes. Module parameters ================= -The user can load modules with options. If the module supports more than -one card and you have more than one card of the same type then you can -specify multiple values for the option separated by commas. - -Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. + A user can modify or set parameters at the load time of the module. If + the module supports more cards and you have got more than one card + of the same type, you may simply specify more values for the parameter, + delimited by commas. + + Note that module option names were changed in 0.9.0rc4. The 'snd_' + prefix was removed. Module snd ---------- - The core ALSA module. It is used by all ALSA card drivers. - It takes the following options which have global effects. + The module snd is the ALSA core module, which is used by all ALSA + card drivers. This takes the global options for creating devices, + etc. - major - major number for sound driver - - Default: 116 + major - major # for sound driver + - default is 116 cards_limit - - limiting card index for auto-loading (1-8) - - Default: 1 - - For auto-loading more than one card, specify this - option together with snd-card-X aliases. + - specifies card limit # for auto-loading (1-8) + - default is 1 + - for auto-loading more than 1 card, specify this option + together with snd-card-X aliases. device_mode - - permission mask for dynamic sound device filesystem - - This is available only when DEVFS is enabled - - Default: 0666 - - E.g.: device_mode=0660 + - specifies permission mask for dynamic sound device filesystem + (available only when DEVFS is enabled) + - default value = 0666 + - for example 'device_mode=0660' Module snd-pcm-oss ------------------ The PCM OSS emulation module. - This module takes options which change the mapping of devices. + This module takes the options to change the mapping of devices. dsp_map - PCM device number maps assigned to the 1st OSS device. - - Default: 0 + (default: 0) adsp_map - PCM device number maps assigned to the 2st OSS device. - - Default: 1 - nonblock_open - - Don't block opening busy PCM devices. + (default: 1) + nonblock_open - Don't block opening busy PCM devices. For example, when dsp_map=2, /dev/dsp will be mapped to PCM #2 of the card #0. Similarly, when adsp_map=0, /dev/adsp will be mapped @@ -91,39 +91,33 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-rawmidi ------------------ - This module takes options which change the mapping of devices. - similar to those of the snd-pcm-oss module. + This module takes the options to change the mapping of OSS + devices like snd-pcm-oss module. midi_map - MIDI device number maps assigned to the 1st OSS device. - - Default: 0 + (default: 0) amidi_map - MIDI device number maps assigned to the 2st OSS device. - - Default: 1 - - Common parameters for top sound card modules - -------------------------------------------- - - Each of top level sound card module takes the following options. - - index - index (slot #) of sound card - - Values: 0 through 7 or negative - - If nonnegative, assign that index number - - if negative, interpret as a bitmask of permissible - indices; the first free permitted index is assigned - - Default: -1 - id - card ID (identifier or name) - - Can be up to 15 characters long - - Default: the card type - - A directory by this name is created under /proc/asound/ - containing information about the card - - This ID can be used instead of the index number in - identifying the card - enable - enable card - - Default: enabled, for PCI and ISA PnP cards + (default: 1) + + Common parameters for top soundcard modules + ------------------------------------------- + + Each of top-level soundcard module takes some general options, + + index - 0-7 - index (slot #) for soundcard + - if not set or -1, first free index (slot #) is assigned + id - user identification for card (up to 15 chars) + - default expression is 'card' (for example card1) + - value is used for /proc/asound filesystem + - this value can be used by applications for identification + of card if user does not want identify card with index number + enable - enable card. (all cards enabled for PCI and ISA PnP cards + as default.) Module snd-ad1816a ------------------ - Module for sound cards based on Analog Devices AD1816A/AD1815 ISA chips. + Module for soundcards based on Analog Devices AD1816A/AD1815 ISA chips. port - port # for AD1816A chip (PnP setup) mpu_port - port # for MPU-401 UART (PnP setup) @@ -138,7 +132,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-ad1848 ----------------- - Module for sound cards based on AD1848/AD1847/CS4248 ISA chips. + Module for soundcards based on AD1848/AD1847/CS4248 ISA chips. port - port # for AD1848 chip irq - IRQ # for AD1848 chip @@ -153,8 +147,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for ALi M5451 PCI chip. pcm_channels - Number of hardware channels assigned for PCM - spdif - Support SPDIF I/O - - Default: disabled + spdif - Support SPDIF I/O (disabled by default) Module supports autoprobe and multiple chips (max 8). @@ -163,7 +156,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-als100 ----------------- - Module for sound cards based on Avance Logic ALS100/ALS120 ISA chips. + Module for soundcards based on Avance Logic ALS100/ALS120 ISA chips. port - port # for ALS100 (SB16) chip (PnP setup) irq - IRQ # for ALS100 (SB16) chip (PnP setup) @@ -178,7 +171,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-als4000 ------------------ - Module for sound cards based on Avance Logic ALS4000 PCI chip. + Module for soundcards based on Avance Logic ALS4000 PCI chip. joystick_port - port # for legacy joystick support. 0 = disabled (default), 1 = auto-detect @@ -191,8 +184,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for ATI IXP 150/200/250 AC97 controllers. ac97_clock - AC'97 clock (defalut = 48000) - ac97_quirk - AC'97 workaround for strange hardware - See the description of intel8x0 module for details. spdif_aclink - S/PDIF transfer over AC-link (default = 1) This module supports up to 8 cards and autoprobe. @@ -204,9 +195,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module supports up to 8 cards. - Note: The default index value of this module is -2, i.e. the first - slot is excluded. - Module snd-au8810, snd-au8820, snd-au8830 ----------------------------------------- @@ -236,7 +224,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-azt2320 ------------------ - Module for sound cards based on Aztech System AZT2320 ISA chip (PnP only). + Module for soundcards based on Aztech System AZT2320 ISA chip (PnP only). port - port # for AZT2320 chip (PnP setup) wss_port - port # for WSS (PnP setup) @@ -252,7 +240,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-azt3328 ------------------ - Module for sound cards based on Aztech AZF3328 PCI chip. + Module for soundcards based on Aztech AZF3328 PCI chip. joystick - Enable joystick (default off) @@ -264,25 +252,13 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for video cards based on Bt87x chips. digital_rate - Override the default digital rate (Hz) - load_all - Load the driver even if the card model isn't known - - Module supports up to 8 cards. - - Note: The default index value of this module is -2, i.e. the first - slot is excluded. - - Module snd-ca0106 - ----------------- - - Module for Creative Audigy LS and SB Live 24bit Module supports up to 8 cards. - Module snd-cmi8330 ------------------ - Module for sound cards based on C-Media CMI8330 ISA chips. + Module for soundcards based on C-Media CMI8330 ISA chips. wssport - port # for CMI8330 chip (WSS) wssirq - IRQ # for CMI8330 chip (WSS) @@ -297,7 +273,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-cmipci ----------------- - Module for C-Media CMI8338 and 8738 PCI sound cards. + Module for C-Media CMI8338 and 8738 PCI soundcards. mpu_port - 0x300,0x310,0x320,0x330, 0 = disable (default) fm_port - 0x388 (default), 0 = disable (default) @@ -310,7 +286,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-cs4231 ----------------- - Module for sound cards based on CS4231 ISA chips. + Module for soundcards based on CS4231 ISA chips. port - port # for CS4231 chip mpu_port - port # for MPU-401 UART (optional), -1 = disable @@ -327,7 +303,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-cs4232 ----------------- - Module for sound cards based on CS4232/CS4232A ISA chips. + Module for soundcards based on CS4232/CS4232A ISA chips. port - port # for CS4232 chip (PnP setup - 0x534) cport - control port # for CS4232 chip (PnP setup - 0x120,0x210,0xf00) @@ -347,7 +323,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-cs4236 ----------------- - Module for sound cards based on CS4235/CS4236/CS4236B/CS4237B/ + Module for soundcards based on CS4235/CS4236/CS4236B/CS4237B/ CS4238B/CS4239 ISA chips. port - port # for CS4236 chip (PnP setup - 0x534) @@ -380,7 +356,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-cs46xx ----------------- - Module for PCI sound cards based on CS4610/CS4612/CS4614/CS4615/CS4622/ + Module for PCI soundcards based on CS4610/CS4612/CS4614/CS4615/CS4622/ CS4624/CS4630/CS4280 PCI chips. external_amp - Force to enable external amplifer. @@ -413,14 +389,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-dummy ---------------- - Module for the dummy sound card. This "card" doesn't do any output + Module for the dummy soundcard. This soundcard doesn't do any output or input, but you may use this module for any application which - requires a sound card (like RealPlayer). + requires a soundcard (like RealPlayer). Module snd-emu10k1 ------------------ - Module for EMU10K1/EMU10k2 based PCI sound cards. + Module for EMU10K1/EMU10k2 based PCI soundcards. * Sound Blaster Live! * Sound Blaster PCI 512 * Emu APS (partially supported) @@ -450,17 +426,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. * Creative Card 5.1 (c) 2003 [0x3fc3/0x7cff] * Creative Card all ins and outs [0x3fff/0x7fff] - Module snd-emu10k1x - ------------------- - - Module for Creative Emu10k1X (SB Live Dell OEM version) - - Module supports up to 8 cards. - Module snd-ens1370 ------------------ - Module for Ensoniq AudioPCI ES1370 PCI sound cards. + Module for Ensoniq AudioPCI ES1370 PCI soundcards. * SoundBlaster PCI 64 * SoundBlaster PCI 128 @@ -471,7 +440,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-ens1371 ------------------ - Module for Ensoniq AudioPCI ES1371 PCI sound cards. + Module for Ensoniq AudioPCI ES1371 PCI soundcards. * SoundBlaster PCI 64 * SoundBlaster PCI 128 * SoundBlaster Vibra PCI @@ -484,7 +453,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-es968 ---------------- - Module for sound cards based on ESS ES968 chip (PnP only). + Module for soundcards based on ESS ES968 chip (PnP only). port - port # for ES968 (SB8) chip (PnP setup) irq - IRQ # for ES968 (SB8) chip (PnP setup) @@ -495,7 +464,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-es1688 ----------------- - Module for ESS AudioDrive ES-1688 and ES-688 sound cards. + Module for ESS AudioDrive ES-1688 and ES-688 soundcards. port - port # for ES-1688 chip (0x220,0x240,0x260) mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default) @@ -508,7 +477,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-es18xx ----------------- - Module for ESS AudioDrive ES-18xx sound cards. + Module for ESS AudioDrive ES-18xx soundcards. port - port # for ES-18xx chip (0x220,0x240,0x260) mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default) @@ -527,14 +496,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-es1938 ----------------- - Module for sound cards based on ESS Solo-1 (ES1938,ES1946) chips. + Module for soundcards based on ESS Solo-1 (ES1938,ES1946) chips. Module supports up to 8 cards and autoprobe. Module snd-es1968 ----------------- - Module for sound cards based on ESS Maestro-1/2/2E (ES1968/ES1978) chips. + Module for soundcards based on ESS Maestro-1/2/2E (ES1968/ES1978) chips. total_bufsize - total buffer size in kB (1-4096kB) pcm_substreams_p - playback channels (1-8, default=2) @@ -552,7 +521,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-fm801 ---------------- - Module for ForteMedia FM801 based PCI sound cards. + Module for ForteMedia FM801 based PCI soundcards. tea575x_tuner - Enable TEA575x tuner - 1 = MediaForte 256-PCS @@ -566,7 +535,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-gusclassic --------------------- - Module for Gravis UltraSound Classic sound card. + Module for Gravis UltraSound Classic soundcard. port - port # for GF1 chip (0x220,0x230,0x240,0x250,0x260) irq - IRQ # for GF1 chip (3,5,9,11,12,15) @@ -581,7 +550,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-gusextreme --------------------- - Module for Gravis UltraSound Extreme (Synergy ViperMax) sound card. + Module for Gravis UltraSound Extreme (Synergy ViperMax) soundcard. port - port # for ES-1688 chip (0x220,0x230,0x240,0x250,0x260) gf1_port - port # for GF1 chip (0x210,0x220,0x230,0x240,0x250,0x260,0x270) @@ -600,7 +569,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-gusmax ----------------- - Module for Gravis UltraSound MAX sound card. + Module for Gravis UltraSound MAX soundcard. port - port # for GF1 chip (0x220,0x230,0x240,0x250,0x260) irq - IRQ # for GF1 chip (3,5,9,11,12,15) @@ -612,49 +581,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module supports up to 8 cards and autoprobe. - Module snd-hda-intel - -------------------- - - Module for Intel HD Audio (ICH6, ICH6M, ICH7) - - model - force the model name - - Module supports up to 8 cards. - - Each codec may have a model table for different configurations. - If your machine isn't listed there, the default (usually minimal) - configuration is set up. You can pass "model=" option to - specify a certain model in such a case. There are different - models depending on the codec chip. - - Model name Description - ---------- ----------- - ALC880 - 3stack 3-jack in back and a headphone out - 3stack-digout 3-jack in back, a HP out and a SPDIF out - 5stack 5-jack in back, 2-jack in front - 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out - w810 3-jack - - CMI9880 - minimal 3-jack in back - min_fp 3-jack in back, 2-jack in front - full 6-jack in back, 2-jack in front - full_dig 6-jack in back, 2-jack in front, SPDIF I/O - allout 5-jack in back, 2-jack in front, SPDIF out - Module snd-hdsp --------------- Module for RME Hammerfall DSP audio interface(s) + precise_ptr - Enable precise pointer (doesn't work reliably). + (default = 0) + line_outs_monitor - Send all input and playback streams to line outs + by default. (default = 0) + force_firmware - Force a reload of the I/O box firmware + (default = 0) + Module supports up to 8 cards. - Note: The firmware data can be automatically loaded via hotplug - when CONFIG_FW_LOADER is set. Otherwise, you need to load - the firmware via hdsploader utility included in alsa-tools - package. - The firmware data is found in alsa-firmware package. + Note: you need to load the firmware via hdsploader utility included + in alsa-tools and alsa-firmware packages. Note: snd-page-alloc module does the job which snd-hammerfall-mem module did formerly. It will allocate the buffers in advance @@ -665,7 +607,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-ice1712 ------------------ - Module for Envy24 (ICE1712) based PCI sound cards. + Module for Envy24 (ICE1712) based PCI soundcards. * MidiMan M Audio Delta 1010 * MidiMan M Audio Delta 1010LT * MidiMan M Audio Delta DiO 2496 @@ -697,7 +639,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-ice1724 ------------------ - Module for Envy24HT (VT/ICE1724) based PCI sound cards. + Module for Envy24HT (VT/ICE1724) based PCI soundcards. * MidiMan M Audio Revolution 7.1 * AMP Ltd AUDIO2000 * TerraTec Aureon Sky-5.1, Space-7.1 @@ -719,21 +661,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. * ALi m5455 ac97_clock - AC'97 codec clock base (0 = auto-detect) - ac97_quirk - AC'97 workaround for strange hardware - The following strings are accepted: - default = don't override the default setting - disable = disable the quirk - hp_only = use headphone control as master - swap_hp = swap headphone and master controls - swap_surround = swap master and surround controls - ad_sharing = for AD1985, turn on OMS bit and use headphone - alc_jack = for ALC65x, turn on the jack sense mode - inv_eapd = inverted EAPD implementation - mute_led = bind EAPD bit for turning on/off mute LED - For backward compatibility, the corresponding integer - value -1, 0, ... are accepted, too. - buggy_irq - Enable workaround for buggy interrupts on some - motherboards (default off) + ac97_quirk - AC'97 workaround for strange hardware (-1 = default) + -1 = default, don't override + 0 = disable + 1 = use headphone control as master + 2 = swap headphone and master controls + 3 = for AD1985, turn on OMS bit and use headphone + 4 = for ALC65x, turn on the jack sense mode + 5 = inverted EAPD implementation + buggy_irq - Enable workaround for buggy interrupts on some + motherboards (default off) Module supports autoprobe and multiple bus-master chips (max 8). @@ -763,14 +700,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. This module supports up to 8 cards and autoprobe. - Note: The default index value of this module is -2, i.e. the first - slot is excluded. - Module snd-interwave -------------------- Module for Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32 - and other sound cards based on AMD InterWave (tm) chip. + and other soundcards based on AMD InterWave (tm) chip. port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260) irq - IRQ # for InterWave chip (3,5,9,11,12,15) @@ -787,8 +721,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-interwave-stb ------------------------ - Module for UltraSound 32-Pro (sound card from STB used by Compaq) - and other sound cards based on AMD InterWave (tm) chip with TEA6330T + Module for UltraSound 32-Pro (soundcard from STB used by Compaq) + and other soundcards based on AMD InterWave (tm) chip with TEA6330T circuit for extended control of bass, treble and master volume. port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260) @@ -834,18 +768,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-mixart ----------------- - Module for Digigram miXart8 sound cards. + Module for Digigram miXart8 soundcards. Module supports multiple cards. Note: One miXart8 board will be represented as 4 alsa cards. See MIXART.txt for details. - When the driver is compiled as a module and the hotplug firmware - is supported, the firmware data is loaded via hotplug automatically. - Install the necessary firmware files in alsa-firmware package. - When no hotplug fw loader is available, you need to load the - firmware via mixartloader utility in alsa-tools package. - Module snd-mpu401 ----------------- @@ -853,9 +781,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. port - port number or -1 (disable) irq - IRQ number or -1 (disable) - pnp - PnP detection - 0 = disable, 1 = enable (default) + acpipnp - ACPI PnP detection - 0 = disable, 1 = enable (default) - Module supports multiple devices (max 8) and PnP. + Module supports multiple devices (max 8) and ACPI PnP. If PnP is not + used (or ACPI not enabled), port and irq must be specified. Module snd-mtpav ---------------- @@ -922,7 +851,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-opl3sa2 ------------------ - Module for Yamaha OPL3-SA2/SA3 sound cards. + Module for Yamaha OPL3-SA2/SA3 soundcards. port - control port # for OPL3-SA chip (0x370) sb_port - SB port # for OPL3-SA chip (0x220,0x240) @@ -942,7 +871,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-opti92x-ad1848 ------------------------- - Module for sound cards based on OPTi 82c92x and Analog Devices AD1848 chips. + Module for soundcards based on OPTi 82c92x and Analog Devices AD1848 chips. Module works with OAK Mozart cards as well. port - port # for WSS chip (0x530,0xe80,0xf40,0x604) @@ -957,7 +886,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-opti92x-cs4231 ------------------------- - Module for sound cards based on OPTi 82c92x and Crystal CS4231 chips. + Module for soundcards based on OPTi 82c92x and Crystal CS4231 chips. port - port # for WSS chip (0x530,0xe80,0xf40,0x604) mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330) @@ -972,7 +901,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-opti93x ------------------ - Module for sound cards based on OPTi 82c93x chips. + Module for soundcards based on OPTi 82c93x chips. port - port # for WSS chip (0x530,0xe80,0xf40,0x604) mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330) @@ -1001,21 +930,21 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ---------------- Module for RME Digi32, Digi32 Pro and Digi32/8 (Sek'd Prodif32, - Prodif96 and Prodif Gold) sound cards. + Prodif96 and Prodif Gold) soundcards. Module supports up to 8 cards. Module snd-rme96 ---------------- - Module for RME Digi96, Digi96/8 and Digi96/8 PRO/PAD/PST sound cards. + Module for RME Digi96, Digi96/8 and Digi96/8 PRO/PAD/PST soundcards. Module supports up to 8 cards. Module snd-rme9652 ------------------ - Module for RME Digi9652 (Hammerfall, Hammerfall-Light) sound cards. + Module for RME Digi9652 (Hammerfall, Hammerfall-Light) soundcards. precise_ptr - Enable precise pointer (doesn't work reliably). (default = 0) @@ -1031,7 +960,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-sa11xx-uda1341 (on arm only) --------------------------------------- - Module for Philips UDA1341TS on Compaq iPAQ H3600 sound card. + Module for Philips UDA1341TS on Compaq iPAQ H3600 soundcard. Module supports only one card. Module has no enable and index options. @@ -1078,7 +1007,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-sgalaxy ------------------ - Module for Aztech Sound Galaxy sound card. + Module for Aztech Sound Galaxy soundcard. sbport - Port # for SB16 interface (0x220,0x240) wssport - Port # for WSS interface (0x530,0xe80,0xf40,0x604) @@ -1118,7 +1047,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-wavefront -------------------- - Module for Turtle Beach Maui, Tropez and Tropez+ sound cards. + Module for Turtle Beach Maui, Tropez and Tropez+ soundcards. cs4232_pcm_port - Port # for CS4232 PCM interface. cs4232_pcm_irq - IRQ # for CS4232 PCM interface (5,7,9,11,12,15). @@ -1138,7 +1067,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-sonicvibes --------------------- - Module for S3 SonicVibes PCI sound cards. + Module for S3 SonicVibes PCI soundcards. * PINE Schubert 32 PCI reverb - Reverb Enable - 1 = enable, 0 = disable (default) @@ -1170,7 +1099,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-trident ------------------ - Module for Trident 4DWave DX/NX sound cards. + Module for Trident 4DWave DX/NX soundcards. * Best Union Miss Melody 4DWave PCI * HIS 4DWave PCI * Warpspeed ONSpeed 4DWave PCI @@ -1253,18 +1182,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Note: for the MPU401 on VIA823x, use snd-mpu401 driver additonally. The mpu_port option is for VIA686 chips only. - Module snd-via82xx-modem - ------------------------ - - Module for VIA82xx AC97 modem - - ac97_clock - AC'97 codec clock base (default 48000Hz) - - Module supports up to 8 cards. - - Note: The default index value of this module is -2, i.e. the first - slot is excluded. - Module snd-virmidi ------------------ @@ -1286,12 +1203,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module supports up to 8 cards. - When the driver is compiled as a module and the hotplug firmware - is supported, the firmware data is loaded via hotplug automatically. - Install the necessary firmware files in alsa-firmware package. - When no hotplug fw loader is available, you need to load the - firmware via vxloader utility in alsa-tools package. To invoke - vxloader automatically, add the following to /etc/modprobe.conf + For loading the firmware, use vxloader utility in alsa-tools + and alsa-firmware packages. You can load the firmware automatically + by adding the following to /etc/modprobe.conf install snd-vx222 /sbin/modprobe --first-time -i snd-vx222 && /usr/bin/vxloader @@ -1308,6 +1222,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for Digigram VX-Pocket VX2 PCMCIA card. + irq_mask - IRQ bitmask, specifies the available IRQs as bits + (default = 0xffff, all available) + irq_list - List of available interrupts (default = -1, not specified) + 4 numbers must be given (if specified). ibl - Capture IBL size. (default = 0, minimum size) Module supports up to 8 cards. The module is compiled only when @@ -1316,11 +1234,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. To activate the driver via the card manager, you'll need to set up /etc/pcmcia/vxpocket.conf. See the sound/pcmcia/vx/vxpocket.c. - When the driver is compiled as a module and the hotplug firmware - is supported, the firmware data is loaded via hotplug automatically. - Install the necessary firmware files in alsa-firmware package. - When no hotplug fw loader is available, you need to load the - firmware via vxloader utility in alsa-tools package. + For loading the firmware, use vxloader utility in alsa-tools + and alsa-firmware packages. + + The irq_mask and irq_list are provided to avoid allocation of + specific IRQs. Usually you don't need to specify them. About capture IBL, see the description of snd-vx222 module. @@ -1331,6 +1249,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for Digigram VX-Pocket 440 PCMCIA card. + irq_mask - IRQ bitmask, specifies the available IRQs as bits + irq_list - List of available interrupts (default = -1, not specified) + 4 numbers must be given (if specified). ibl - Capture IBL size. (default = 0, minimum size) Module supports up to 8 cards. The module is compiled only when @@ -1339,11 +1260,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. To activate the driver via the card manager, you'll need to set up /etc/pcmcia/vxp440.conf. See the sound/pcmcia/vx/vxp440.c. - When the driver is compiled as a module and the hotplug firmware - is supported, the firmware data is loaded via hotplug automatically. - Install the necessary firmware files in alsa-firmware package. - When no hotplug fw loader is available, you need to load the - firmware via vxloader utility in alsa-tools package. + For loading the firmware, use vxloader utility in alsa-tools + and alsa-firmware packages. + + The irq_mask and irq_list are provided to avoid allocation of + specific IRQs. Usually you don't need to specify them. About capture IBL, see the description of snd-vx222 module. @@ -1369,7 +1290,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-pdaudiocf -------------------- - Module for Sound Core PDAudioCF sound card. + Module for Sound Core PDAudioCF soundcard. + + irq_mask - IRQ mask (PCMCIA type) + irq_list - List of available interrupts for this soundcard Note: the driver is build only when CONFIG_ISA is set. @@ -1392,7 +1316,7 @@ Module Autoloading Support The ALSA drivers can be loaded automatically on demand by defining module aliases. The string 'snd-card-%1' is requested for ALSA native -devices where %i is sound card number from zero to seven. +devices where %i is soundcard number from zero to seven. To auto-load an ALSA driver for OSS services, define the string 'sound-slot-%i' where %i means the slot number for OSS, which @@ -1405,16 +1329,16 @@ alias snd-card-0 snd-emu10k1 alias sound-slot-0 snd-emu10k1 ----- /etc/modprobe.conf -The available number of auto-loaded sound cards depends on the module +The available number of auto-loaded soundcards depends on the module option "cards_limit" of snd module. As default it's set to 1. To enable the auto-loading of multiple cards, specify the number of -sound cards in that option. +soundcards in that option. When multiple cards are available, it'd better to specify the index number for each card via module option, too, so that the order of cards is kept consistent. -An example configuration for two sound cards is like below: +An example configuration for two soundcards is like below: ----- /etc/modprobe.conf # ALSA portion @@ -1435,21 +1359,18 @@ In this example, the interwave card is always loaded as the first card ALSA PCM devices to OSS devices mapping ======================================= -/dev/snd/pcmC0D0[c|p] -> /dev/audio0 (/dev/audio) -> minor 4 -/dev/snd/pcmC0D0[c|p] -> /dev/dsp0 (/dev/dsp) -> minor 3 -/dev/snd/pcmC0D1[c|p] -> /dev/adsp0 (/dev/adsp) -> minor 12 -/dev/snd/pcmC1D0[c|p] -> /dev/audio1 -> minor 4+16 = 20 -/dev/snd/pcmC1D0[c|p] -> /dev/dsp1 -> minor 3+16 = 19 -/dev/snd/pcmC1D1[c|p] -> /dev/adsp1 -> minor 12+16 = 28 -/dev/snd/pcmC2D0[c|p] -> /dev/audio2 -> minor 4+32 = 36 -/dev/snd/pcmC2D0[c|p] -> /dev/dsp2 -> minor 3+32 = 39 -/dev/snd/pcmC2D1[c|p] -> /dev/adsp2 -> minor 12+32 = 44 - -The first number from /dev/snd/pcmC{X}D{Y}[c|p] expression means -sound card number and second means device number. The ALSA devices -have either 'c' or 'p' suffix indicating the direction, capture and -playback, respectively. - +/dev/snd/pcmC0D0 -> /dev/audio0 (/dev/audio) -> minor 4 +/dev/snd/pcmC0D0 -> /dev/dsp0 (/dev/dsp) -> minor 3 +/dev/snd/pcmC0D1 -> /dev/adsp0 (/dev/adsp) -> minor 12 +/dev/snd/pcmC1D0 -> /dev/audio1 -> minor 4+16 = 20 +/dev/snd/pcmC1D0 -> /dev/dsp1 -> minor 3+16 = 19 +/dev/snd/pcmC1D1 -> /dev/adsp1 -> minor 12+16 = 28 +/dev/snd/pcmC2D0 -> /dev/audio2 -> minor 4+32 = 36 +/dev/snd/pcmC2D0 -> /dev/dsp2 -> minor 3+32 = 39 +/dev/snd/pcmC2D1 -> /dev/adsp2 -> minor 12+32 = 44 + +The first number from /dev/snd/pcmC{X}D{Y} expression means soundcard number +and second means device number. Please note that the device mapping above may be varied via the module options of snd-pcm-oss module. diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index e78947530..d08c20d86 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl @@ -18,8 +18,8 @@ - March 6, 2005 - 0.3.4 + July 11, 2004 + 0.3.3 @@ -110,9 +110,9 @@ - One is the trees provided as a tarball or via cvs from the + One is the the trees provided as a tarball or via cvs from the ALSA's ftp site, and another is the 2.6 (or later) Linux kernel - tree. To synchronize both, the ALSA driver tree is split into + tree. To synchronize both, the ALSA driver tree is split to two different trees: alsa-kernel and alsa-driver. The former contains purely the source codes for the Linux 2.6 (or later) tree. This tree is designed only for compilation on 2.6 or @@ -397,12 +397,12 @@ #include #include - /* module parameters (see "Module Parameters") */ + // module parameters (see "Module Parameters") static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; - /* definition of the chip-specific record */ + // definition of the chip-specific record typedef struct snd_mychip mychip_t; struct snd_mychip { snd_card_t *card; @@ -410,26 +410,23 @@ // "PCI Resource Managements" }; - /* chip-specific destructor - * (see "PCI Resource Managements") - */ + // chip-specific destructor + // (see "PCI Resource Managements") static int snd_mychip_free(mychip_t *chip) { - .... // will be implemented later... + // will be implemented later... } - /* component-destructor - * (see "Management of Cards and Components") - */ + // component-destructor + // (see "Management of Cards and Components") static int snd_mychip_dev_free(snd_device_t *device) { mychip_t *chip = device->device_data; return snd_mychip_free(chip); } - /* chip-specific constructor - * (see "Management of Cards and Components") - */ + // chip-specific constructor + // (see "Management of Cards and Components") static int __devinit snd_mychip_create(snd_card_t *card, struct pci_dev *pci, mychip_t **rchip) @@ -444,9 +441,8 @@ // check PCI availability here // (see "PCI Resource Managements") - .... - /* allocate a chip-specific data with zero filled */ + // allocate a chip-specific data with zero filled chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; @@ -455,21 +451,17 @@ // rest of initialization here; will be implemented // later, see "PCI Resource Managements" - .... if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_mychip_free(chip); return err; } - - snd_card_set_dev(card, &pci->dev); - *rchip = chip; return 0; } - /* constructor -- see "Constructor" sub-section */ + // constructor -- see "Constructor" sub-section static int __devinit snd_mychip_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { @@ -478,7 +470,7 @@ mychip_t *chip; int err; - /* (1) */ + // (1) if (dev >= SNDRV_CARDS) return -ENODEV; if (!enable[dev]) { @@ -486,39 +478,39 @@ return -ENOENT; } - /* (2) */ + // (2) card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); if (card == NULL) return -ENOMEM; - /* (3) */ + // (3) if ((err = snd_mychip_create(card, pci, &chip)) < 0) { snd_card_free(card); return err; } - /* (4) */ + // (4) strcpy(card->driver, "My Chip"); strcpy(card->shortname, "My Own Chip 123"); sprintf(card->longname, "%s at 0x%lx irq %i", card->shortname, chip->ioport, chip->irq); - /* (5) */ - .... // implemented later + // (5) + // implemented later - /* (6) */ + // (6) if ((err = snd_card_register(card)) < 0) { snd_card_free(card); return err; } - /* (7) */ + // (7) pci_set_drvdata(pci, card); dev++; return 0; } - /* destructor -- see "Destructor" sub-section */ + // destructor -- see "Destructor" sub-section static void __devexit snd_mychip_remove(struct pci_dev *pci) { snd_card_free(pci_get_drvdata(pci)); @@ -751,7 +743,7 @@ - where the last one is necessary only when module options are + where the last twos are necessary only when module options are defined in the source file. If the codes are split to several files, the file without module options don't need them. @@ -766,7 +758,7 @@ - The ALSA interfaces like PCM or control API are defined in other + The ALSA interfaces like PCM or control API are define in other header files as <sound/xxx.h>. They have to be included after <sound/core.h>. @@ -1097,22 +1089,20 @@ static int snd_mychip_free(mychip_t *chip) { - /* disable hardware here if any */ - .... // (not implemented in this document) + // disable hardware here if any + // (not implemented in this document) - /* release the irq */ + // release the irq if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); - /* release the i/o ports & memory */ + // release the i/o ports pci_release_regions(chip->pci); - /* disable the PCI entry */ - pci_disable_device(chip->pci); - /* release the data */ + // release the data kfree(chip); return 0; } - /* chip-specific constructor */ + // chip-specific constructor static int __devinit snd_mychip_create(snd_card_t *card, struct pci_dev *pci, mychip_t **rchip) @@ -1125,32 +1115,27 @@ *rchip = NULL; - /* initialize the PCI entry */ + // check PCI availability (28bit DMA) if ((err = pci_enable_device(pci)) < 0) return err; - /* check PCI availability (28bit DMA) */ if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); - pci_disable_device(pci); return -ENXIO; } chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); - if (chip == NULL) { - pci_disable_device(pci); + if (chip == NULL) return -ENOMEM; - } - /* initialize the stuff */ + // initialize the stuff chip->card = card; chip->pci = pci; chip->irq = -1; - /* (1) PCI resource allocation */ + // (1) PCI resource allocation if ((err = pci_request_regions(pci, "My Chip")) < 0) { kfree(chip); - pci_disable_device(pci); return err; } chip->port = pci_resource_start(pci, 0); @@ -1163,22 +1148,19 @@ } chip->irq = pci->irq; - /* (2) initialization of the chip hardware */ - .... // (not implemented in this document) + // (2) initialization of the chip hardware + // (not implemented in this document) if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_mychip_free(chip); return err; } - - snd_card_set_dev(card, &pci->dev); - *rchip = chip; return 0; } - /* PCI IDs */ + // PCI IDs static struct pci_device_id snd_mychip_ids[] = { { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, @@ -1187,7 +1169,7 @@ }; MODULE_DEVICE_TABLE(pci, snd_mychip_ids); - /* pci_driver definition */ + // pci_driver definition static struct pci_driver driver = { .name = "My Own Chip", .id_table = snd_mychip_ids, @@ -1195,13 +1177,13 @@ .remove = __devexit_p(snd_mychip_remove), }; - /* initialization of the module */ + // initialization of the module static int __init alsa_card_mychip_init(void) { return pci_module_init(&driver); } - /* clean up the module */ + // clean up the module static void __exit alsa_card_mychip_exit(void) { pci_unregister_driver(&driver); @@ -1246,7 +1228,6 @@ if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); - pci_disable_device(pci); return -ENXIO; } @@ -1304,7 +1285,6 @@ port = pci_resource_start(pci, 0); @@ -1314,7 +1294,6 @@ - It will reserve the i/o port region of 8 bytes of the given PCI device. The returned value, chip->res_port, is allocated via kmalloc() by @@ -1454,11 +1433,6 @@ the native kfree() without wrapper. - - Don't forget to call pci_disable_device() - before all finished. - - And finally, release the chip-specific record. @@ -1488,7 +1462,7 @@ When the chip-data is assigned to the card using snd_device_new() with SNDRV_DEV_LOWLELVEL , its destructor is - called at the last. That is, it is assured that all other + called at the last. that is, it is assured that all other components like PCMs and controls have been already released. You don't have to call stopping PCMs, etc. explicitly, but just stop the hardware in the low-level. @@ -1511,7 +1485,7 @@ - and the allocation would be like below: + and the allocation would be (assuming its size is 512 bytes): @@ -1548,30 +1522,6 @@ -
- Registration of Device Struct - - At some point, typically after calling snd_device_new(), - you need to register the struct device of the chip - you're handling for udev and co. ALSA provides a macro for compatibility with - older kernels. Simply call like the following: - - -dev); -]]> - - - so that it stores the PCI's device pointer to the card. This will be - referred by ALSA core functions later when the devices are registered. - - - In the case of non-PCI, pass the proper device struct pointer of the BUS - instead. (In the case of legacy ISA without PnP, you don't have to do - anything.) - -
-
PCI Entries @@ -1851,9 +1801,8 @@ mychip_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - /* set up the hardware with the current configuration - * for example... - */ + // set up the hardware with the current configuration + // for example... mychip_set_sample_format(chip, runtime->format); mychip_set_sample_rate(chip, runtime->rate); mychip_set_channels(chip, runtime->channels); @@ -1886,7 +1835,7 @@ mychip_t *chip = snd_pcm_substream_chip(substream); unsigned int current_ptr; - /* get the current hardware pointer */ + // get the current hardware pointer current_ptr = mychip_get_hw_pointer(chip); return current_ptr; } @@ -1937,7 +1886,6 @@ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_mychip_capture_ops); /* pre-allocation of buffers */ - /* NOTE: this may fail */ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), 64*1024, 64*1024); @@ -1952,7 +1900,7 @@
Constructor - A pcm instance is allocated by snd_pcm_new() + A pcm instance is allocated snd_pcm_new() function. It would be better to create a constructor for pcm, namely, @@ -2120,19 +2068,18 @@ static void mychip_pcm_free(snd_pcm_t *pcm) { mychip_t *chip = snd_pcm_chip(pcm); - /* free your own data */ + // free your own data kfree(chip->my_private_pcm_data); - // do what you like else - .... + // do what you like else... } static int __devinit snd_mychip_new_pcm(mychip_t *chip) { snd_pcm_t *pcm; .... - /* allocate your own data */ + // allocate your own data chip->my_private_pcm_data = kmalloc(...); - /* set the destructor */ + // set the destructor pcm->private_data = chip; pcm->private_free = mychip_pcm_free; .... @@ -2237,8 +2184,7 @@ struct _snd_pcm_runtime { unsigned char *dma_area; /* DMA area */ dma_addr_t dma_addr; /* physical bus address (not accessible from main CPU) */ size_t dma_bytes; /* size of DMA area */ - - struct snd_dma_buffer *dma_buffer_p; /* allocated buffer */ + void *dma_private; /* private DMA data for the memory allocator */ #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) /* -- OSS things -- */ @@ -2253,7 +2199,7 @@ struct _snd_pcm_runtime { For the operators (callbacks) of each sound driver, most of these records are supposed to be read-only. Only the PCM - middle-layer changes / updates these info. The exceptions are + middle-layer changes / updates these info. The excpetions are the hardware description (hw), interrupt callbacks (transfer_ack_xxx), DMA buffer information, and the private data. Besides, if you use the standard buffer allocation @@ -2285,7 +2231,7 @@ struct _snd_pcm_runtime { runtime; ... - runtime->hw = snd_mychip_playback_hw; /* common definition */ + runtime->hw = snd_mychip_playback_hw; // common definition if (chip->model == VERY_OLD_ONE) runtime->hw.channels_max = 1; ]]> @@ -3011,9 +2957,6 @@ struct _snd_pcm_runtime { current appl_ptr for the internal buffer, and this callback is useful only for such a purpose. - - This callback is atomic. -
@@ -3087,7 +3030,7 @@ struct _snd_pcm_runtime { spin_lock(&chip->lock); .... if (pcm_irq_invoked(chip)) { - /* call updater, unlock before it */ + // call updater, unlock before it spin_unlock(&chip->lock); snd_pcm_period_elapsed(chip->substream); spin_lock(&chip->lock); @@ -3132,25 +3075,24 @@ struct _snd_pcm_runtime { .... if (pcm_irq_invoked(chip)) { unsigned int last_ptr, size; - /* get the current hardware pointer (in frames) */ + // get the current hardware pointer (in frames) last_ptr = get_hw_ptr(chip); - /* calculate the processed frames since the - * last update - */ + // calculate the processed frames since the + // last update if (last_ptr < chip->last_ptr) size = runtime->buffer_size + last_ptr - chip->last_ptr; else size = last_ptr - chip->last_ptr; - /* remember the last updated point */ + // remember the last updated point chip->last_ptr = last_ptr; - /* accumulate the size */ + // accumulate the size chip->size += size; - /* over the period boundary? */ + // over the period boundary? if (chip->size >= runtime->period_size) { - /* reset the accumulator */ + // reset the accumulator chip->size %= runtime->period_size; - /* call updater */ + // call updater spin_unlock(&chip->lock); snd_pcm_period_elapsed(substream); spin_lock(&chip->lock); @@ -3211,11 +3153,6 @@ struct _snd_pcm_runtime { udelay() or mdelay(). - - All three atomic callbacks (trigger, pointer, and ack) are - called with local interrupts disabled. - -
Constraints @@ -3261,7 +3198,7 @@ struct _snd_pcm_runtime { There are many different constraints. - Look in sound/pcm.h for a complete list. + Look in sound/asound.h for a complete list. You can even define your own constraint rules. For example, let's suppose my_chip can manage a substream of 1 channel if and only if the format is S16_LE, otherwise it supports any format @@ -3279,7 +3216,7 @@ struct _snd_pcm_runtime { snd_mask_t *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); snd_mask_t fmt; - snd_mask_any(&fmt); /* Init the struct */ + snd_mask_any(&fmt); // Init the struct if (c->min < 2) { fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE; return snd_mask_refine(f, &fmt); @@ -4077,7 +4014,7 @@ struct _snd_pcm_runtime { Both snd_ac97_write() and snd_ac97_update() functions are used to set a value to the given register - (AC97_XXX). The difference between them is + (AC97_XXX). The different between them is that snd_ac97_update() doesn't write a value if the given value has been already set, while snd_ac97_write() always rewrites the @@ -4163,8 +4100,8 @@ struct _snd_pcm_runtime { Proc Files The ALSA AC97 interface will create a proc file such as - /proc/asound/card0/codec97#0/ac97#0-0 and - ac97#0-0+regs. You can refer to these files to + /proc/asound/card0/ac97#0 and + ac97#0regs. You can refer to these files to see the current status and registers of the codec.
@@ -4211,6 +4148,18 @@ struct _snd_pcm_runtime { implementation of mpu401 stuff. For example, emu10k1 has its own mpu401 routines.
+ + + In this document, I won't explain the rawmidi interface API, + which is the basis of MPU401-UART implementation. + + + + For details, please check the source, + core/rawmidi.c, and examples such as + drivers/mpu401/mpu401_uart.c or + usb/usbmidi.c. +
@@ -4333,354 +4282,6 @@ struct _snd_pcm_runtime { - - - - - RawMIDI Interface - -
- Overview - - - The raw MIDI interface is used for hardware MIDI ports that can - be accessed as a byte stream. It is not used for synthesizer - chips that do not directly understand MIDI. - - - - ALSA handles file and buffer management. All you have to do is - to write some code to move data between the buffer and the - hardware. - - - - The rawmidi API is defined in - <sound/rawmidi.h>. - -
- -
- Constructor - - - To create a rawmidi device, call the - snd_rawmidi_new function: - - -card, "MyMIDI", 0, outs, ins, &rmidi); - if (err < 0) - return err; - rmidi->private_data = chip; - strcpy(rmidi->name, "My MIDI"); - rmidi->info_flags = SNDRV_RAWMIDI_INFO_OUTPUT | - SNDRV_RAWMIDI_INFO_INPUT | - SNDRV_RAWMIDI_INFO_DUPLEX; -]]> - - - - - - The first argument is the card pointer, the second argument is - the ID string. - - - - The third argument is the index of this component. You can - create up to 8 rawmidi devices. - - - - The fourth and fifth arguments are the number of output and - input substreams, respectively, of this device. (A substream is - the equivalent of a MIDI port.) - - - - Set the info_flags field to specify - the capabilities of the device. - Set SNDRV_RAWMIDI_INFO_OUTPUT if there is - at least one output port, - SNDRV_RAWMIDI_INFO_INPUT if there is at - least one input port, - and SNDRV_RAWMIDI_INFO_DUPLEX if the device - can handle output and input at the same time. - - - - After the rawmidi device is created, you need to set the - operators (callbacks) for each substream. There are helper - functions to set the operators for all substream of a device: - - - - - - - - - The operators are usually defined like this: - - - - - - These callbacks are explained in the Callbacks - section. - - - - If there is more than one substream, you should give each one a - unique name: - - -streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams) { - substream = list_entry(list, snd_rawmidi_substream_t, list); - sprintf(substream->name, "My MIDI Port %d", substream->number + 1); - } - /* same for SNDRV_RAWMIDI_STREAM_INPUT */ -]]> - - - -
- -
- Callbacks - - - In all callbacks, the private data that you've set for the - rawmidi device can be accessed as - substream->rmidi->private_data. - - - - - If there is more than one port, your callbacks can determine the - port index from the snd_rawmidi_substream_t data passed to each - callback: - - -number; -]]> - - - - -
- <function>open</function> callback - - - - - - - - - This is called when a substream is opened. - You can initialize the hardware here, but you should not yet - start transmitting/receiving data. - -
- -
- <function>close</function> callback - - - - - - - - - Guess what. - - - - The open and close - callbacks of a rawmidi device are serialized with a mutex, - and can sleep. - -
- -
- <function>trigger</function> callback for output - substreams - - - - - - - - - This is called with a nonzero up - parameter when there is some data in the substream buffer that - must be transmitted. - - - - To read data from the buffer, call - snd_rawmidi_transmit_peek. It will - return the number of bytes that have been read; this will be - less than the number of bytes requested when there is no more - data in the buffer. - After the data has been transmitted successfully, call - snd_rawmidi_transmit_ack to remove the - data from the substream buffer: - - - - - - - - - If you know beforehand that the hardware will accept data, you - can use the snd_rawmidi_transmit function - which reads some data and removes it from the buffer at once: - - - - - - - - - If you know beforehand how many bytes you can accept, you can - use a buffer size greater than one with the - snd_rawmidi_transmit* functions. - - - - The trigger callback must not sleep. If - the hardware FIFO is full before the substream buffer has been - emptied, you have to continue transmitting data later, either - in an interrupt handler, or with a timer if the hardware - doesn't have a MIDI transmit interrupt. - - - - The trigger callback is called with a - zero up parameter when the transmission - of data should be aborted. - -
- -
- <function>trigger</function> callback for input - substreams - - - - - - - - - This is called with a nonzero up - parameter to enable receiving data, or with a zero - up parameter do disable receiving data. - - - - The trigger callback must not sleep; the - actual reading of data from the device is usually done in an - interrupt handler. - - - - When data reception is enabled, your interrupt handler should - call snd_rawmidi_receive for all received - data: - - - - - - -
- -
- <function>drain</function> callback - - - - - - - - - This is only used with output substreams. This function should wait - until all data read from the substream buffer has been transmitted. - This ensures that the device can be closed and the driver unloaded - without losing data. - - - - This callback is optional. If you do not set - drain in the snd_rawmidi_ops_t - structure, ALSA will simply wait for 50 milliseconds - instead. - -
-
- -
- - @@ -4980,7 +4581,7 @@ struct _snd_pcm_runtime { where size is the byte size to be pre-allocated and the max is the maximal size to be changed via prealloc proc file. - The allocator will try to get as large area as possible + The allocator will try to get as the large area as possible within the given size. @@ -5202,7 +4803,7 @@ struct _snd_pcm_runtime { If your hardware supports the page table like emu10k1 or the buffer descriptors like via82xx, you can use the scatter-gather (SG) DMA. ALSA provides an interface for handling SG-buffers. - The API is provided in <sound/pcm.h>. + The API is provided in <sound/pcm_sgbuf.h>. @@ -5506,12 +5107,12 @@ struct _snd_pcm_runtime { Call snd_pcm_suspend_all() to suspend the running PCM streams. Save the register values if necessary. Stop the hardware if necessary. - Disable the PCI device by calling pci_disable_device(). + Set the power-state as D3hot by calling snd_power_change_state(). @@ -5540,18 +5141,18 @@ struct _snd_pcm_runtime { pm_private_data; - /* (2) */ + // (2) snd_pcm_suspend_all(chip->pcm); - /* (3) */ + // (3) snd_mychip_save_registers(chip); - /* (4) */ + // (4) snd_mychip_stop_hardware(chip); - /* (5) */ - pci_disable_device(chip->pci); + // (5) + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); return 0; } ]]> @@ -5571,6 +5172,8 @@ struct _snd_pcm_runtime { Resume the mixer, e.g. calling snd_ac97_resume(). Restart the hardware (if any). + Set the power-state as D0 by calling + snd_power_change_state(). @@ -5582,18 +5185,20 @@ struct _snd_pcm_runtime { pm_private_data; - /* (2) */ + // (2) pci_enable_device(chip->pci); - /* (3) */ + // (3) snd_mychip_reinit_chip(chip); - /* (4) */ + // (4) snd_mychip_restore_registers(chip); - /* (5) */ + // (5) snd_ac97_resume(chip->ac97); - /* (6) */ + // (6) snd_mychip_restart_chip(chip); + // (7) + snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } ]]> @@ -5709,15 +5314,19 @@ struct _snd_pcm_runtime { + + Here boot_devs is passed but simply ignored since we don't care + the number of parsed parameters. @@ -5814,10 +5423,7 @@ struct _snd_pcm_runtime { depends on SND select SND_PCM help - Say Y here to include support for Foobar XYZ soundcard. - - To compile this driver as a module, choose M here: the module - will be called snd-xyz. + Say 'Y' or 'M' to include support for Foobar XYZ soundcard. ]]> diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 351591769..65285a4c1 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -49,6 +49,7 @@ show up in /proc/sys/kernel: - shmmax [ sysv ipc ] - shmmni - stop-a [ SPARC only ] +- suid_dumpable - sysrq ==> Documentation/sysrq.txt - tainted - threads-max @@ -300,6 +301,25 @@ kernel. This value defaults to SHMMAX. ============================================================== +suid_dumpable: + +This value can be used to query and set the core dump mode for setuid +or otherwise protected/tainted binaries. The modes are + +0 - (default) - traditional behaviour. Any process which has changed + privilege levels or is execute only will not be dumped +1 - (debug) - all processes dump core when possible. The core dump is + owned by the current user and no security is applied. This is + intended for system debugging situations only. +2 - (suidsafe) - any binary which normally not be dumped is dumped + readable by root only. This allows the end user to remove + such a dump but not access it directly. For security reasons + core dumps in this mode will not overwrite one another or + other files. This mode is appropriate when adminstrators are + attempting to debug problems in a normal environment. + +============================================================== + tainted: Non-zero if the kernel has been tainted. Numeric values, which diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 92a55ec0a..e2ffee309 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt @@ -10,32 +10,13 @@ regardless of whatever else it is doing, unless it is completely locked up. * How do I enable the magic SysRq key? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You need to say "yes" to 'Magic SysRq key (CONFIG_MAGIC_SYSRQ)' when -configuring the kernel. When running a kernel with SysRq compiled in, -/proc/sys/kernel/sysrq controls the functions allowed to be invoked via -the SysRq key. By default the file contains 1 which means that every -possible SysRq request is allowed (in older versions SysRq was disabled -by default, and you were required to specifically enable it at run-time -but this is not the case any more). Here is the list of possible values -in /proc/sys/kernel/sysrq: - 0 - disable sysrq completely - 1 - enable all functions of sysrq - >1 - bitmask of allowed sysrq functions (see below for detailed function - description): - 2 - enable control of console logging level - 4 - enable control of keyboard (SAK, unraw) - 8 - enable debugging dumps of processes etc. - 16 - enable sync command - 32 - enable remount read-only - 64 - enable signalling of processes (term, kill, oom-kill) - 128 - allow reboot/poweroff - 256 - allow nicing of all RT tasks - -You can set the value in the file by the following command: - echo "number" >/proc/sys/kernel/sysrq - -Note that the value of /proc/sys/kernel/sysrq influences only the invocation -via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always -allowed. +configuring the kernel. When running on a kernel with SysRq compiled in, it +may be DISABLED at run-time using following command: + + echo "0" > /proc/sys/kernel/sysrq + +Note that previous versions disabled sysrq by default, and you were required +to specifically enable it at run-time. That is not the case any longer. * How do I use the magic SysRq key? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -96,8 +77,6 @@ On all - write a character to /proc/sysrq-trigger. eg: it so that only emergency messages like PANICs or OOPSes would make it to your console.) -'f' - Will call oom_kill to kill a memory hog process - 'e' - Send a SIGTERM to all processes, except for init. 'i' - Send a SIGKILL to all processes, except for init. diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt index 1e36f1661..09754b7d2 100644 --- a/Documentation/usb/error-codes.txt +++ b/Documentation/usb/error-codes.txt @@ -23,9 +23,6 @@ USB-specific: -ENODEV specified USB-device or bus doesn't exist --ENOENT specified interface or endpoint does not exist or - is not enabled - -ENXIO host controller driver does not support queuing of this type of urb. (treat as a host controller bug.) @@ -86,24 +83,7 @@ one or more packets could finish before an error stops further endpoint I/O. prescribed bus turn-around time c) unknown USB error --EILSEQ (*, **) a) CRC mismatch - b) no response packet received within the - prescribed bus turn-around time - c) unknown USB error - - Note that often the controller hardware does not - distinguish among cases a), b), and c), so a - driver cannot tell whether there was a protocol - error, a failure to respond (often caused by - device disconnect), or some other fault. - --ETIMEDOUT (**) No response packet received within the prescribed - bus turn-around time. This error may instead be - reported as -EPROTO or -EILSEQ. - - Note that the synchronous USB message functions - also use this code to indicate timeout expired - before the transfer completed. +-EILSEQ (*, **) CRC mismatch -EPIPE (**) Endpoint stalled. For non-control endpoints, reset this status with usb_clear_halt(). @@ -124,6 +104,8 @@ one or more packets could finish before an error stops further endpoint I/O. specified buffer, and URB_SHORT_NOT_OK was set in urb->transfer_flags. +-ETIMEDOUT (**) transfer timed out, NAK + -ENODEV Device was removed. Often preceded by a burst of other errors, since the hub driver does't detect device removal events immediately. @@ -161,7 +143,4 @@ usb_register(): usb_get_*/usb_set_*(): usb_control_msg(): usb_bulk_msg(): --ETIMEDOUT Timeout expired before the transfer completed. - In the future this code may change to -ETIME, - whose definition is a closer match to this sort - of error. + All USB errors (submit/status) can occur diff --git a/Documentation/usb/philips.txt b/Documentation/usb/philips.txt new file mode 100644 index 000000000..04a640d72 --- /dev/null +++ b/Documentation/usb/philips.txt @@ -0,0 +1,236 @@ +This file contains some additional information for the Philips and OEM webcams. +E-mail: webcam@smcc.demon.nl Last updated: 2004-01-19 +Site: http://www.smcc.demon.nl/webcam/ + +As of this moment, the following cameras are supported: + * Philips PCA645 + * Philips PCA646 + * Philips PCVC675 + * Philips PCVC680 + * Philips PCVC690 + * Philips PCVC720/40 + * Philips PCVC730 + * Philips PCVC740 + * Philips PCVC750 + * Askey VC010 + * Creative Labs Webcam 5 + * Creative Labs Webcam Pro Ex + * Logitech QuickCam 3000 Pro + * Logitech QuickCam 4000 Pro + * Logitech QuickCam Notebook Pro + * Logitech QuickCam Zoom + * Logitech QuickCam Orbit + * Logitech QuickCam Sphere + * Samsung MPC-C10 + * Samsung MPC-C30 + * Sotec Afina Eye + * AME CU-001 + * Visionite VCS-UM100 + * Visionite VCS-UC300 + +The main webpage for the Philips driver is at the address above. It contains +a lot of extra information, a FAQ, and the binary plugin 'PWCX'. This plugin +contains decompression routines that allow you to use higher image sizes and +framerates; in addition the webcam uses less bandwidth on the USB bus (handy +if you want to run more than 1 camera simultaneously). These routines fall +under a NDA, and may therefor not be distributed as source; however, its use +is completely optional. + +You can build this code either into your kernel, or as a module. I recommend +the latter, since it makes troubleshooting a lot easier. The built-in +microphone is supported through the USB Audio class. + +When you load the module you can set some default settings for the +camera; some programs depend on a particular image-size or -format and +don't know how to set it properly in the driver. The options are: + +size + Can be one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or + 'vga', for an image size of resp. 128x96, 160x120, 176x144, + 320x240, 352x288 and 640x480 (of course, only for those cameras that + support these resolutions). + +fps + Specifies the desired framerate. Is an integer in the range of 4-30. + +fbufs + This paramter specifies the number of internal buffers to use for storing + frames from the cam. This will help if the process that reads images from + the cam is a bit slow or momentarely busy. However, on slow machines it + only introduces lag, so choose carefully. The default is 3, which is + reasonable. You can set it between 2 and 5. + +mbufs + This is an integer between 1 and 10. It will tell the module the number of + buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends. + The default is 2, which is adequate for most applications (double + buffering). + + Should you experience a lot of 'Dumping frame...' messages during + grabbing with a tool that uses mmap(), you might want to increase if. + However, it doesn't really buffer images, it just gives you a bit more + slack when your program is behind. But you need a multi-threaded or + forked program to really take advantage of these buffers. + + The absolute maximum is 10, but don't set it too high! Every buffer takes + up 460 KB of RAM, so unless you have a lot of memory setting this to + something more than 4 is an absolute waste. This memory is only + allocated during open(), so nothing is wasted when the camera is not in + use. + +power_save + When power_save is enabled (set to 1), the module will try to shut down + the cam on close() and re-activate on open(). This will save power and + turn off the LED. Not all cameras support this though (the 645 and 646 + don't have power saving at all), and some models don't work either (they + will shut down, but never wake up). Consider this experimental. By + default this option is disabled. + +compression (only useful with the plugin) + With this option you can control the compression factor that the camera + uses to squeeze the image through the USB bus. You can set the + parameter between 0 and 3: + 0 = prefer uncompressed images; if the requested mode is not available + in an uncompressed format, the driver will silently switch to low + compression. + 1 = low compression. + 2 = medium compression. + 3 = high compression. + + High compression takes less bandwidth of course, but it could also + introduce some unwanted artefacts. The default is 2, medium compression. + See the FAQ on the website for an overview of which modes require + compression. + + The compression parameter does not apply to the 645 and 646 cameras + and OEM models derived from those (only a few). Most cams honour this + parameter. + +leds + This settings takes 2 integers, that define the on/off time for the LED + (in milliseconds). One of the interesting things that you can do with + this is let the LED blink while the camera is in use. This: + + leds=500,500 + + will blink the LED once every second. But with: + + leds=0,0 + + the LED never goes on, making it suitable for silent surveillance. + + By default the camera's LED is on solid while in use, and turned off + when the camera is not used anymore. + + This parameter works only with the ToUCam range of cameras (720, 730, 740, + 750) and OEMs. For other cameras this command is silently ignored, and + the LED cannot be controlled. + + Finally: this parameters does not take effect UNTIL the first time you + open the camera device. Until then, the LED remains on. + +dev_hint + A long standing problem with USB devices is their dynamic nature: you + never know what device a camera gets assigned; it depends on module load + order, the hub configuration, the order in which devices are plugged in, + and the phase of the moon (i.e. it can be random). With this option you + can give the driver a hint as to what video device node (/dev/videoX) it + should use with a specific camera. This is also handy if you have two + cameras of the same model. + + A camera is specified by its type (the number from the camera model, + like PCA645, PCVC750VC, etc) and optionally the serial number (visible + in /proc/bus/usb/devices). A hint consists of a string with the following + format: + + [type[.serialnumber]:]node + + The square brackets mean that both the type and the serialnumber are + optional, but a serialnumber cannot be specified without a type (which + would be rather pointless). The serialnumber is separated from the type + by a '.'; the node number by a ':'. + + This somewhat cryptic syntax is best explained by a few examples: + + dev_hint=3,5 The first detected cam gets assigned + /dev/video3, the second /dev/video5. Any + other cameras will get the first free + available slot (see below). + + dev_hint=645:1,680:2 The PCA645 camera will get /dev/video1, + and a PCVC680 /dev/video2. + + dev_hint=645.0123:3,645.4567:0 The PCA645 camera with serialnumber + 0123 goes to /dev/video3, the same + camera model with the 4567 serial + gets /dev/video0. + + dev_hint=750:1,4,5,6 The PCVC750 camera will get /dev/video1, the + next 3 Philips cams will use /dev/video4 + through /dev/video6. + + Some points worth knowing: + - Serialnumbers are case sensitive and must be written full, including + leading zeroes (it's treated as a string). + - If a device node is already occupied, registration will fail and + the webcam is not available. + - You can have up to 64 video devices; be sure to make enough device + nodes in /dev if you want to spread the numbers (this does not apply + to devfs). After /dev/video9 comes /dev/video10 (not /dev/videoA). + - If a camera does not match any dev_hint, it will simply get assigned + the first available device node, just as it used to be. + +trace + In order to better detect problems, it is now possible to turn on a + 'trace' of some of the calls the module makes; it logs all items in your + kernel log at debug level. + + The trace variable is a bitmask; each bit represents a certain feature. + If you want to trace something, look up the bit value(s) in the table + below, add the values together and supply that to the trace variable. + + Value Value Description Default + (dec) (hex) + 1 0x1 Module initialization; this will log messages On + while loading and unloading the module + + 2 0x2 probe() and disconnect() traces On + + 4 0x4 Trace open() and close() calls Off + + 8 0x8 read(), mmap() and associated ioctl() calls Off + + 16 0x10 Memory allocation of buffers, etc. Off + + 32 0x20 Showing underflow, overflow and Dumping frame On + messages + + 64 0x40 Show viewport and image sizes Off + + 128 0x80 PWCX debugging Off + + For example, to trace the open() & read() fuctions, sum 8 + 4 = 12, + so you would supply trace=12 during insmod or modprobe. If + you want to turn the initialization and probing tracing off, set trace=0. + The default value for trace is 35 (0x23). + + + +Example: + + # modprobe pwc size=cif fps=15 power_save=1 + +The fbufs, mbufs and trace parameters are global and apply to all connected +cameras. Each camera has its own set of buffers. + +size and fps only specify defaults when you open() the device; this is to +accommodate some tools that don't set the size. You can change these +settings after open() with the Video4Linux ioctl() calls. The default of +defaults is QCIF size at 10 fps. + +The compression parameter is semiglobal; it sets the initial compression +preference for all camera's, but this parameter can be set per camera with +the VIDIOCPWCSCQUAL ioctl() call. + +All parameters are optional. + diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index 1b9bcd1fe..47a7121b4 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt @@ -1,14 +1,14 @@ The intent of this file is to give a brief summary of hugetlbpage support in the Linux kernel. This support is built on top of multiple page size support -that is provided by most modern architectures. For example, i386 -architecture supports 4K and 4M (2M in PAE mode) page sizes, ia64 +that is provided by most of modern architectures. For example, IA-32 +architecture supports 4K and 4M (2M in PAE mode) page sizes, IA-64 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M, -256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical -translations. Typically this is a very scarce resource on processor. -Operating systems try to make best use of limited number of TLB resources. -This optimization is more critical now as bigger and bigger physical memories -(several GBs) are more readily available. +256M. A TLB is a cache of virtual-to-physical translations. Typically this +is a very scarce resource on processor. Operating systems try to make best +use of limited number of TLB resources. This optimization is more critical +now as bigger and bigger physical memories (several GBs) are more readily +available. Users can use the huge page support in Linux kernel by either using the mmap system call or standard SYSv shared memory system calls (shmget, shmat). @@ -98,187 +98,125 @@ a supplementary group and system admin needs to configure that gid into applications to use any combination of mmaps and shm* calls. Though the mount of filesystem will be required for using mmaps. -******************************************************************* - -/* - * Example of using hugepage memory in a user application using Sys V shared - * memory system calls. In this example the app is requesting 256MB of - * memory that is backed by huge pages. The application uses the flag - * SHM_HUGETLB in the shmget system call to inform the kernel that it is - * requesting hugepages. - * - * For the ia64 architecture, the Linux kernel reserves Region number 4 for - * hugepages. That means the addresses starting with 0x800000... will need - * to be specified. Specifying a fixed address is not required on ppc64, - * i386 or x86_64. - * - * Note: The default shared memory limit is quite low on many kernels, - * you may need to increase it via: - * - * echo 268435456 > /proc/sys/kernel/shmmax - * - * This will increase the maximum size per shared memory segment to 256MB. - * The other limit that you will hit eventually is shmall which is the - * total amount of shared memory in pages. To set it to 16GB on a system - * with a 4kB pagesize do: - * - * echo 4194304 > /proc/sys/kernel/shmall +/* Example of using hugepage in user application using Sys V shared memory + * system calls. In this example, app is requesting memory of size 256MB that + * is backed by huge pages. Application uses the flag SHM_HUGETLB in shmget + * system call to informt the kernel that it is requesting hugepages. For + * IA-64 architecture, Linux kernel reserves Region number 4 for hugepages. + * That means the addresses starting with 0x800000....will need to be + * specified. */ -#include -#include #include -#include #include +#include #include +#include -#ifndef SHM_HUGETLB +extern int errno; #define SHM_HUGETLB 04000 -#endif - -#define LENGTH (256UL*1024*1024) - -#define dprintf(x) printf(x) - -/* Only ia64 requires this */ -#ifdef __ia64__ -#define ADDR (void *)(0x8000000000000000UL) -#define SHMAT_FLAGS (SHM_RND) -#else -#define ADDR (void *)(0x0UL) -#define SHMAT_FLAGS (0) -#endif - -int main(void) +#define LPAGE_SIZE (256UL*1024UL*1024UL) +#define dprintf(x) printf(x) +#define ADDR (0x8000000000000000UL) +main() { - int shmid; - unsigned long i; - char *shmaddr; - - if ((shmid = shmget(2, LENGTH, - SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W)) < 0) { - perror("shmget"); - exit(1); - } - printf("shmid: 0x%x\n", shmid); - - shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); - if (shmaddr == (char *)-1) { - perror("Shared memory attach failure"); - shmctl(shmid, IPC_RMID, NULL); - exit(2); - } - printf("shmaddr: %p\n", shmaddr); - - dprintf("Starting the writes:\n"); - for (i = 0; i < LENGTH; i++) { - shmaddr[i] = (char)(i); - if (!(i % (1024 * 1024))) - dprintf("."); - } - dprintf("\n"); - - dprintf("Starting the Check..."); - for (i = 0; i < LENGTH; i++) - if (shmaddr[i] != (char)i) - printf("\nIndex %lu mismatched\n", i); - dprintf("Done.\n"); - - if (shmdt((const void *)shmaddr) != 0) { - perror("Detach failure"); - shmctl(shmid, IPC_RMID, NULL); - exit(3); - } - - shmctl(shmid, IPC_RMID, NULL); - - return 0; + int shmid; + int i, j, k; + volatile char *shmaddr; + + if ((shmid =shmget(2, LPAGE_SIZE, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W )) +< 0) { + perror("Failure:"); + exit(1); + } + printf("shmid: 0x%x\n", shmid); + shmaddr = shmat(shmid, (void *)ADDR, SHM_RND) ; + if (errno != 0) { + perror("Shared Memory Attach Failure:"); + exit(2); + } + printf("shmaddr: %p\n", shmaddr); + + dprintf("Starting the writes:\n"); + for (i=0;i -#include #include +#include #include #include +#include #define FILE_NAME "/mnt/hugepagefile" -#define LENGTH (256UL*1024*1024) +#define LENGTH (256*1024*1024) #define PROTECTION (PROT_READ | PROT_WRITE) +#define FLAGS MAP_SHARED |MAP_FIXED +#define ADDRESS (char *)(0x60000000UL + 0x8000000000000000UL) -/* Only ia64 requires this */ -#ifdef __ia64__ -#define ADDR (void *)(0x8000000000000000UL) -#define FLAGS (MAP_SHARED | MAP_FIXED) -#else -#define ADDR (void *)(0x0UL) -#define FLAGS (MAP_SHARED) -#endif +extern errno; -void check_bytes(char *addr) +check_bytes(char *addr) { - printf("First hex is %x\n", *((unsigned int *)addr)); + printf("First hex is %x\n", *((unsigned int *)addr)); } -void write_bytes(char *addr) +write_bytes(char *addr) { - unsigned long i; - - for (i = 0; i < LENGTH; i++) - *(addr + i) = (char)i; + int i; + for (i=0;i L: linux-kernel@vger.kernel.org S: Maintained -IEEE 1394 ETHERNET (eth1394) -L: linux1394-devel@lists.sourceforge.net -W: http://www.linux1394.org/ -S: Orphan - -IEEE 1394 SBP2 -L: linux1394-devel@lists.sourceforge.net -W: http://www.linux1394.org/ -S: Orphan - IEEE 1394 SUBSYSTEM P: Ben Collins M: bcollins@debian.org -P: Jody McIntyre -M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1111,15 +1057,13 @@ S: Maintained IEEE 1394 OHCI DRIVER P: Ben Collins M: bcollins@debian.org -P: Jody McIntyre -M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained IEEE 1394 PCILYNX DRIVER -P: Jody McIntyre -M: scjody@steamballoon.com +P: Andreas Bombe +M: andreas.bombe@munich.netsurf.de L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1127,8 +1071,6 @@ S: Maintained IEEE 1394 RAW I/O DRIVER P: Ben Collins M: bcollins@debian.org -P: Dan Dennedy -M: dan@dennedy.org L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1139,17 +1081,6 @@ M: lethal@chaoticdreams.org L: linux-fbdev-devel@lists.sourceforge.net S: Maintained -INFINIBAND SUBSYSTEM -P: Roland Dreier -M: roland@topspin.com -P: Sean Hefty -M: mshefty@ichips.intel.com -P: Hal Rosenstock -M: halr@voltaire.com -L: openib-general@openib.org -W: http://www.openib.org/ -S: Supported - INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS P: Vojtech Pavlik M: vojtech@suse.cz @@ -1209,6 +1140,13 @@ M: john.ronciak@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported +INTERMEZZO FILE SYSTEM +P: Cluster File Systems +M: intermezzo-devel@lists.sf.net +W: http://www.inter-mezzo.org/ +L: intermezzo-discuss@lists.sourceforge.net +S: Maintained + IOC3 DRIVER P: Ralf Baechle M: ralf@linux-mips.org @@ -1223,7 +1161,7 @@ S: Maintained IPX NETWORK LAYER P: Arnaldo Carvalho de Melo M: acme@conectiva.com.br -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org S: Maintained IRDA SUBSYSTEM @@ -1270,8 +1208,8 @@ S: Maintained JFS FILESYSTEM P: Dave Kleikamp M: shaggy@austin.ibm.com -L: jfs-discussion@lists.sourceforge.net -W: http://jfs.sourceforge.net/ +L: jfs-discussion@oss.software.ibm.com +W: http://oss.software.ibm.com/jfs/ S: Supported KCONFIG @@ -1406,7 +1344,7 @@ W: http://www.penguinppc.org/ L: linuxppc-embedded@ozlabs.org S: Maintained -LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX +LINUX FOR POWERPC EMBEDDED PPC85XX P: Kumar Gala M: kumar.gala@freescale.com W: http://www.penguinppc.org/ @@ -1501,7 +1439,7 @@ MARVELL MV64340 ETHERNET DRIVER P: Manish Lachwani M: Manish_Lachwani@pmc-sierra.com L: linux-mips@linux-mips.org -L: netdev@vger.kernel.org +L: netdev@oss.sgi.com S: Supported MATROX FRAMEBUFFER DRIVER @@ -1512,7 +1450,7 @@ S: Maintained MEMORY TECHNOLOGY DEVICES P: David Woodhouse -M: dwmw2@infradead.org +M: dwmw2@redhat.com W: http://www.linux-mtd.infradead.org/ L: linux-mtd@lists.infradead.org S: Maintained @@ -1611,13 +1549,13 @@ P: Andrew Morton M: akpm@osdl.org P: Jeff Garzik M: jgarzik@pobox.com -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org S: Maintained NETWORKING [GENERAL] P: Networking Team -M: netdev@vger.kernel.org -L: netdev@vger.kernel.org +M: netdev@oss.sgi.com +L: linux-net@vger.kernel.org S: Maintained NETWORKING [IPv4/IPv6] @@ -1633,7 +1571,7 @@ P: Hideaki YOSHIFUJI M: yoshfuji@linux-ipv6.org P: Patrick McHardy M: kaber@coreworks.de -L: netdev@vger.kernel.org +L: netdev@oss.sgi.com S: Maintained IPVS @@ -1641,6 +1579,7 @@ P: Wensong Zhang M: wensong@linux-vs.org P: Julian Anastasov M: ja@ssi.bg +L: lvs-users@linuxvirtualserver.org S: Maintained NFS CLIENT @@ -1653,7 +1592,7 @@ NI5010 NETWORK DRIVER P: Jan-Pascal van Best and Andreas Mohr M: Jan-Pascal van Best M: Andreas Mohr <100.30936@germany.net> -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org S: Maintained NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER @@ -1695,7 +1634,7 @@ P: Peter De Shrijver M: p2@ace.ulyssis.student.kuleuven.ac.be P: Mike Phillips M: mikep@linuxtr.net -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org L: linux-tr@linuxtr.net W: http://www.linuxtr.net S: Maintained @@ -1724,20 +1663,18 @@ P: Pavel Roskin M: proski@gnu.org P: David Gibson M: hermes@gibson.dropbear.id.au -L: orinoco-users@lists.sourceforge.net -L: orinoco-devel@lists.sourceforge.net -W: http://www.nongnu.org/orinoco/ +W: http://www.ozlabs.org/people/dgibson/dldwd S: Maintained PARALLEL PORT SUPPORT P: Phil Blundell -M: philb@gnu.org +M: Philip.Blundell@pobox.com P: Tim Waugh M: tim@cyberelk.net P: David Campbell M: campbell@torque.net P: Andrea Arcangeli -M: andrea@suse.de +M: andrea@e-mind.com L: linux-parport@lists.infradead.org W: http://people.redhat.com/twaugh/parport/ S: Maintained @@ -1780,14 +1717,14 @@ S: Maintained PCI SUBSYSTEM P: Greg Kroah-Hartman -M: gregkh@suse.de +M: greg@kroah.com L: linux-kernel@vger.kernel.org -L: linux-pci@atrey.karlin.mff.cuni.cz S: Supported PCI HOTPLUG CORE P: Greg Kroah-Hartman -M: gregkh@suse.de +M: greg@kroah.com +M: gregkh@us.ibm.com S: Supported PCI HOTPLUG COMPAQ DRIVER @@ -1802,7 +1739,7 @@ S: Unmaintained PCNET32 NETWORK DRIVER P: Thomas Bogendörfer M: tsbogend@alpha.franken.de -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org S: Maintained PHRAM MTD DRIVER @@ -1814,7 +1751,7 @@ S: Maintained POSIX CLOCKS and TIMERS P: George Anzinger M: george@mvista.com -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org S: Supported PNP SUPPORT @@ -1835,7 +1772,7 @@ S: Maintained PPP OVER ETHERNET P: Michal Ostrowski -M: mostrows@speakeasy.net +M: mostrows@styx.uwaterloo.ca S: Maintained PREEMPTIBLE KERNEL @@ -1849,7 +1786,7 @@ S: Supported PRISM54 WIRELESS DRIVER P: Prism54 Development Team M: prism54-private@prism54.org -L: netdev@vger.kernel.org +L: netdev@oss.sgi.com W: http://prism54.org S: Maintained @@ -1865,12 +1802,6 @@ M: nico@cam.org L: linux-arm-kernel@lists.arm.linux.org.uk S: Maintained -QLOGIC QLA2XXX FC-SCSI DRIVER -P: Andrew Vasquez -M: andrew.vasquez@qlogic.com -L: linux-scsi@vger.kernel.org -S: Supported - QNX4 FILESYSTEM P: Anders Larsen M: al@alarsen.net @@ -1879,14 +1810,14 @@ W: http://www.alarsen.net/linux/qnx4fs/ S: Maintained RADEON FRAMEBUFFER DISPLAY DRIVER -P: Benjamin Herrenschmidt -M: benh@kernel.crashing.org +P: Ani Joshi +M: ajoshi@shell.unixbox.com L: linux-fbdev-devel@lists.sourceforge.net S: Maintained RAGE128 FRAMEBUFFER DISPLAY DRIVER -P: Paul Mackerras -M: paulus@samba.org +P: Ani Joshi +M: ajoshi@shell.unixbox.com L: linux-fbdev-devel@lists.sourceforge.net S: Maintained @@ -1896,11 +1827,6 @@ M: corey@world.std.com L: linux-kernel@vger.kernel.org S: Maintained -RANDOM NUMBER DRIVER -P: Matt Mackall -M: mpm@selenic.com -S: Maintained - REAL TIME CLOCK DRIVER P: Paul Gortmaker M: p_gortmaker@yahoo.com @@ -1927,7 +1853,9 @@ L: linux-hams@vger.kernel.org S: Maintained RISCOM8 DRIVER -S: Orphan +P: Dmitry Gorodchanin +L: linux-kernel@vger.kernel.org +S: Maintained RTLINUX REALTIME LINUX P: Victor Yodaiken @@ -2007,11 +1935,6 @@ M: christer@weinigel.se W: http://www.weinigel.se S: Supported -SECURITY CONTACT -P: Security Officers -M: security@kernel.org -S: Supported - SELINUX SECURITY MODULE P: Stephen Smalley M: sds@epoch.ncsc.mil @@ -2041,20 +1964,6 @@ L: linux-visws-devel@lists.sf.net W: http://linux-visws.sf.net S: Maintained for 2.6. -SIMTEC EB110ATX (Chalice CATS) -P: Ben Dooks -P: Vincent Sanders -M: support@simtec.co.uk -W: http://www.simtec.co.uk/products/EB110ATX/ -S: Supported - -SIMTEC EB2410ITX (BAST) -P: Ben Dooks -P: Vincent Sanders -M: support@simtec.co.uk -W: http://www.simtec.co.uk/products/EB2410ITX/ -S: Supported - SIS 5513 IDE CONTROLLER DRIVER P: Lionel Bouton M: Lionel.Bouton@inet6.fr @@ -2063,11 +1972,10 @@ W: http://gyver.homeip.net/sis5513/index.html S: Maintained SIS 900/7016 FAST ETHERNET DRIVER -P: Daniele Venzano -M: venza@brownhat.org -W: http://www.brownhat.org/sis900.html -L: netdev@vger.kernel.org -S: Maintained +P: Ollie Lho +M: ollie@sis.com.tw +L: linux-net@vger.kernel.org +S: Supported SIS FRAMEBUFFER DRIVER P: Thomas Winischhofer @@ -2075,12 +1983,6 @@ M: thomas@winischhofer.net W: http://www.winischhofer.net/linuxsisvga.shtml S: Maintained -SIS USB2VGA DRIVER -P: Thomas Winischhofer -M: thomas@winischhofer.net -W: http://www.winischhofer.at/linuxsisusbvga.shtml -S: Maintained - SMSC47M1 HARDWARE MONITOR DRIVER P: Jean Delvare M: khali@linux-fr.org @@ -2125,7 +2027,7 @@ S: Maintained SONIC NETWORK DRIVER P: Thomas Bogendoerfer M: tsbogend@alpha.franken.de -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org S: Maintained SONY VAIO CONTROL DEVICE DRIVER @@ -2140,13 +2042,6 @@ M: perex@suse.cz L: alsa-devel@alsa-project.org S: Maintained -TPM DEVICE DRIVER -P: Kylene Hall -M: kjhall@us.ibm.com -W: http://tpmdd.sourceforge.net -L: tpmdd-devel@lists.sourceforge.net -S: Maintained - UltraSPARC (sparc64): P: David S. Miller M: davem@davemloft.net @@ -2160,13 +2055,6 @@ L: sparclinux@vger.kernel.org L: ultralinux@vger.kernel.org S: Maintained -SHARP LH SUPPORT (LH7952X & LH7A40X) -P: Marc Singer -M: elf@buici.com -W: http://projects.buici.com/arm -L: linux-arm-kernel@lists.arm.linux.org.uk -S: Maintained - SPARC (sparc32): P: William L. Irwin M: wli@holomorphy.com @@ -2176,13 +2064,14 @@ S: Maintained SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER P: Roger Wolff M: R.E.Wolff@BitWizard.nl +M: io8-linux@specialix.co.uk L: linux-kernel@vger.kernel.org ? S: Supported SPX NETWORK LAYER P: Jay Schulist M: jschlst@samba.org -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org S: Supported SRM (Alpha) environment access @@ -2222,10 +2111,9 @@ SUPERH64 (sh64) P: Paul Mundt M: lethal@linux-sh.org P: Richard Curnow -M: rc@rc0.org.uk +M: richard.curnow@superh.com L: linuxsh-shmedia-dev@lists.sourceforge.net W: http://www.linux-sh.org -W: http://www.rc0.org.uk/sh64 S: Maintained SUN3/3X @@ -2246,6 +2134,13 @@ P: Christoph Hellwig M: hch@infradead.org S: Maintained +TI GRAPH LINK USB (SilverLink) CABLE DRIVER +P: Romain Lievin +M: roms@lpg.ticalc.org +P: Julien Blache +M: jb@technologeek.org +S: Maintained + TI PARALLEL LINK CABLE DRIVER P: Romain Lievin M: roms@lpg.ticalc.org @@ -2261,7 +2156,7 @@ S: Maintained TOKEN-RING NETWORK DRIVER P: Mike Phillips M: mikep@linuxtr.net -L: netdev@vger.kernel.org +L: linux-net@vger.kernel.org L: linux-tr@linuxtr.net W: http://www.linuxtr.net S: Maintained @@ -2326,6 +2221,13 @@ L: linux_udf@hpesjro.fc.hp.com W: http://linux-udf.sourceforge.net S: Maintained +UMSDOS FILESYSTEM +P: Matija Nalis +M: Matija Nalis +L: linux-kernel@vger.kernel.org +W: http://linux.voyager.hr/umsdos/ +S: Maintained + UNIFORM CDROM DRIVER P: Jens Axboe M: axboe@suse.de @@ -2340,13 +2242,6 @@ L: linux-usb-users@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net S: Maintained -USB BLOCK DRIVER (UB ub) -P: Pete Zaitcev -M: zaitcev@redhat.com -L: linux-kernel@vger.kernel.org -L: linux-usb-devel@lists.sourceforge.net -S: Supported - USB BLUETOOTH TTY CONVERTER DRIVER P: Greg Kroah-Hartman M: greg@kroah.com @@ -2444,12 +2339,6 @@ L: linux-usb-devel@lists.sourceforge.net W: http://www.chello.nl/~j.vreeken/se401/ S: Maintained -USB SERIAL CYBERJACK DRIVER -P: Matthias Bruestle and Harald Welte -M: support@reiner-sct.com -W: http://www.reiner-sct.de/support/treiber_cyberjack.php -S: Maintained - USB SERIAL DIGI ACCELEPORT DRIVER P: Peter Berger and Al Borchers M: pberger@brimson.com @@ -2460,10 +2349,11 @@ S: Maintained USB SERIAL DRIVER P: Greg Kroah-Hartman -M: gregkh@suse.de +M: greg@kroah.com L: linux-usb-users@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net -S: Supported +S: Maintained +W: http://www.kroah.com/linux-usb/ USB SERIAL BELKIN F5U103 DRIVER P: William Greathouse @@ -2525,7 +2415,7 @@ S: Maintained USB SUBSYSTEM P: Greg Kroah-Hartman -M: gregkh@suse.de +M: greg@kroah.com L: linux-usb-users@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org @@ -2551,14 +2441,6 @@ L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-projects.org S: Maintained -USB ZD1201 DRIVER -P: Jeroen Vreeken -M: pe1rxq@amsat.org -L: linux-usb-users@lists.sourceforge.net -L: linux-usb-devel@lists.sourceforge.net -W: http://linux-lc100020.sourceforge.net -S: Maintained - USER-MODE LINUX P: Jeff Dike M: jdike@karaya.com @@ -2582,9 +2464,8 @@ P: Roger Luethi M: rl@hellgate.ch S: Maintained -UCLINUX (AND M68KNOMMU) +UCLINUX P: Greg Ungerer -M: gerg@uclinux.org M: gerg@snapgear.com P: David McCullough M: davidm@snapgear.com @@ -2617,8 +2498,7 @@ S: Maintained VIDEO FOR LINUX P: Gerd Knorr M: kraxel@bytesex.org -L: video4linux-list@redhat.com -S: Orphan +S: Maintained W1 DALLAS'S 1-WIRE BUS P: Evgeniy Polyakov @@ -2696,11 +2576,11 @@ M: jpr@f6fbb.org L: linux-hams@vger.kernel.org S: Maintained -YMFPCI YAMAHA PCI SOUND (Use ALSA instead) +YMFPCI YAMAHA PCI SOUND P: Pete Zaitcev M: zaitcev@yahoo.com L: linux-kernel@vger.kernel.org -S: Obsolete +S: Maintained Z8530 DRIVER FOR AX.25 P: Joerg Reuter diff --git a/Makefile b/Makefile index 1771b7dfd..1adf8b7f4 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 12 -EXTRAVERSION = -1.1_1398_FC4.1.planetlab -NAME=Woozy Numbat +SUBLEVEL = 10 +EXTRAVERSION = -1.771_FC2.2.planetlab +NAME=AC # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -18,7 +18,7 @@ MAKEFLAGS += --no-print-directory # # Most importantly: sub-Makefiles should only ever modify files in # their own directory. If in some directory we have a dependency on -# a file in another dir (which doesn't happen often, but it's often +# a file in another dir (which doesn't happen often, but it's of # unavoidable when linking the built-in.o targets which finally # turn into vmlinux), we will call a sub make in that other dir, and # after that we are sure that everything which is in that other dir @@ -67,7 +67,7 @@ endif # kbuild supports saving output files in a separate directory. -# To locate output files in a separate directory two syntaxes are supported. +# To locate output files in a separate directory two syntax'es are supported. # In both cases the working directory must be the root of the kernel src. # 1) O= # Use "make O=dir/to/store/output/files/" @@ -78,8 +78,7 @@ endif # export KBUILD_OUTPUT=dir/to/store/output/files/ # make # -# The O= assignment takes precedence over the KBUILD_OUTPUT environment -# variable. +# The O= assigment takes precedence over the KBUILD_OUTPUT environment variable. # KBUILD_SRC is set on invocation of make in OBJ directory @@ -150,13 +149,14 @@ space := $(nullstring) # end of line # careful not to include files twice if building in the source # directory. LOCALVERSION from the command line override all of this -localver := $(objtree)/localversion* $(srctree)/localversion* -localver := $(sort $(wildcard $(localver))) -# skip backup files (containing '~') -localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f))) +ifeq ($(objtree),$(srctree)) +localversion-files := $(wildcard $(srctree)/localversion*) +else +localversion-files := $(wildcard $(objtree)/localversion* $(srctree)/localversion*) +endif LOCALVERSION = $(subst $(space),, \ - $(shell cat /dev/null $(localver)) \ + $(shell cat /dev/null $(localversion-files:%~=)) \ $(patsubst "%",%,$(CONFIG_LOCALVERSION))) KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION) @@ -291,7 +291,7 @@ check_gcc = $(warning check_gcc is deprecated - use cc-option) \ $(call cc-option, $(1),$(2)) # cc-option-yn -# Usage: flag := $(call cc-option-yn, -march=winchip-c6) +# Usage: flag := $(call gcc-option-yn, -march=winchip-c6) cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) @@ -331,7 +331,6 @@ DEPMOD = /sbin/depmod KALLSYMS = scripts/kallsyms PERL = perl CHECK = sparse - CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) @@ -340,6 +339,7 @@ LDFLAGS_MODULE = -r CFLAGS_KERNEL = AFLAGS_KERNEL = +NOSTDINC_FLAGS = -nostdinc -iwithprefix include # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option @@ -349,8 +349,7 @@ LINUXINCLUDE := -Iinclude \ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ - -ffreestanding + -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \ @@ -390,7 +389,7 @@ scripts_basic: # using a seperate output directory. This allows convinient use # of make in output directory outputmakefile: - $(Q)if test ! $(srctree) -ef $(objtree); then \ + $(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \ $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ > $(objtree)/Makefile; \ @@ -533,27 +532,22 @@ endif include $(srctree)/arch/$(ARCH)/Makefile -# arch Makefile may override CC so keep this after arch Makefile is included -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) -CHECKFLAGS += $(NOSTDINC_FLAGS) - # warn about C99 declaration after statement CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) -# disable pointer signedness warnings in gcc 4.0 -CFLAGS += $(call cc-option,-Wno-pointer-sign,) - # Default kernel image to build when no specific target is given. # KBUILD_IMAGE may be overruled on the commandline or # set in the environment -# Also any assignments in arch/$(ARCH)/Makefile take precedence over +# Also any assingments in arch/$(ARCH)/Makefiel take precedence over # this default value export KBUILD_IMAGE ?= vmlinux # # INSTALL_PATH specifies where to place the updated kernel and system map -# images. Default is /boot, but you can set it to other values -export INSTALL_PATH ?= /boot +# images. Uncomment if you want to place them anywhere other than root. +# + +#export INSTALL_PATH=/boot # # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory @@ -903,7 +897,7 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r endif .PHONY: _modinst_post _modinst_post: _modinst_ - if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi + if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi else # CONFIG_MODULES @@ -956,7 +950,7 @@ CLEAN_FILES += vmlinux System.map \ MRPROPER_DIRS += include/config include2 MRPROPER_FILES += .config .config.old include/asm .version \ include/linux/autoconf.h include/linux/version.h \ - Module.symvers tags TAGS cscope* include/.asm-ignore + Module.symvers tags TAGS cscope* # clean - Delete most, but leave enough to build external modules # @@ -1101,17 +1095,9 @@ KBUILD_MODULES := 1 crmodverdir: $(Q)mkdir -p $(MODVERDIR) -.PHONY: $(objtree)/Module.symvers -$(objtree)/Module.symvers: - @test -e $(objtree)/Module.symvers || ( \ - echo; \ - echo " WARNING: Symbol version dump $(objtree)/Module.symvers"; \ - echo " is missing; modules will have no dependencies and modversions."; \ - echo ) - module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) .PHONY: $(module-dirs) modules -$(module-dirs): crmodverdir $(objtree)/Module.symvers +$(module-dirs): crmodverdir $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs) @@ -1149,30 +1135,20 @@ endif # KBUILD_EXTMOD # Generate tags for editors # --------------------------------------------------------------------------- -#We want __srctree to totally vanish out when KBUILD_OUTPUT is not set -#(which is the most common case IMHO) to avoid unneeded clutter in the big tags file. -#Adding $(srctree) adds about 20M on i386 to the size of the output file! - -ifeq ($(KBUILD_OUTPUT),) -__srctree = -else -__srctree = $(srctree)/ -endif - define all-sources - ( find $(__srctree) $(RCS_FIND_IGNORE) \ + ( find $(srctree) $(RCS_FIND_IGNORE) \ \( -name include -o -name arch \) -prune -o \ -name '*.[chS]' -print; \ - find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \ + find $(srctree)/arch/$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ + find $(srctree)/security/selinux/include $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(__srctree)include $(RCS_FIND_IGNORE) \ + find $(srctree)/include $(RCS_FIND_IGNORE) \ \( -name config -o -name 'asm-*' \) -prune \ -o -name '*.[chS]' -print; \ - find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ + find $(srctree)/include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ + find $(srctree)/include/asm-generic $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print ) endef @@ -1194,7 +1170,7 @@ cmd_TAGS = $(all-sources) | etags - quiet_cmd_tags = MAKE $@ define cmd_tags rm -f $@; \ - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \ + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ $(all-sources) | xargs ctags $$CTAGSF -a endef @@ -1238,9 +1214,6 @@ checkstack: $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ $(PERL) $(src)/scripts/checkstack.pl $(ARCH) -kernelrelease: - @echo $(KERNELRELEASE) - # FIXME Should go into a make.lib or something # =========================================================================== diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 55d9d8572..67ac95088 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -28,10 +28,6 @@ config RWSEM_XCHGADD_ALGORITHM bool default y -config GENERIC_CALIBRATE_DELAY - bool - default y - config GENERIC_ISA_DMA bool default y @@ -280,10 +276,6 @@ config ISA (MCA) or VESA. ISA is an older system, now being displaced by PCI; newer boards don't support it. If you have ISA, say Y, otherwise N. -config ISA_DMA_API - bool - default y - config PCI bool depends on !ALPHA_JENSEN @@ -493,7 +485,7 @@ config SMP singleprocessor machines. On a singleprocessor machine, the kernel will run faster if you say N here. - See also the , and the SMP-HOWTO + See also the , and the SMP-HOWTO available at . If you don't know what to do here, say N. diff --git a/arch/alpha/defconfig b/arch/alpha/defconfig index 5e39b7a7c..6ac8d4a7d 100644 --- a/arch/alpha/defconfig +++ b/arch/alpha/defconfig @@ -411,6 +411,7 @@ CONFIG_IP_NF_TARGET_MASQUERADE=m # CONFIG_IP_NF_TARGET_REDIRECT is not set # CONFIG_IP_NF_TARGET_NETMAP is not set # CONFIG_IP_NF_TARGET_SAME is not set +# CONFIG_IP_NF_NAT_LOCAL is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set CONFIG_IP_NF_NAT_IRC=m CONFIG_IP_NF_NAT_FTP=m diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c index 44866cb26..bb4fe0498 100644 --- a/arch/alpha/kernel/core_marvel.c +++ b/arch/alpha/kernel/core_marvel.c @@ -118,7 +118,7 @@ alloc_io7(unsigned int pe) io7 = alloc_bootmem(sizeof(*io7)); io7->pe = pe; - spin_lock_init(&io7->irq_lock); + io7->irq_lock = SPIN_LOCK_UNLOCKED; for (h = 0; h < 4; h++) { io7->ports[h].io7 = io7; diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 5e4de451d..f0927ee53 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -873,15 +873,22 @@ sys_getxgid: .globl sys_getxpid .ent sys_getxpid sys_getxpid: - lda $sp, -16($sp) - stq $26, 0($sp) .prologue 0 + ldq $2, TI_TASK($8) - lda $16, 96($sp) - jsr $26, do_getxpid - ldq $26, 0($sp) - - lda $sp, 16($sp) + /* See linux/kernel/timer.c sys_getppid for discussion + about this loop. */ + ldq $3, TASK_REAL_PARENT($2) +1: ldl $1, TASK_TGID($3) +#ifdef CONFIG_SMP + mov $3, $4 + mb + ldq $3, TASK_REAL_PARENT($2) + cmpeq $3, $4, $4 + beq $4, 1b +#endif + stq $1, 80($sp) + ldl $0, TASK_TGID($2) ret .end sys_getxpid diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 167fd89f8..dcad8d31d 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -437,10 +437,11 @@ asmlinkage int osf_getdomainname(char __user *name, int namelen) { unsigned len; - int i; + int i, error; - if (!access_ok(VERIFY_WRITE, name, namelen)) - return -EFAULT; + error = verify_area(VERIFY_WRITE, name, namelen); + if (error) + goto out; len = namelen; if (namelen > 32) @@ -453,10 +454,26 @@ osf_getdomainname(char __user *name, int namelen) break; } up_read(&uts_sem); + out: + return error; +} - return 0; +asmlinkage long +osf_shmat(int shmid, void __user *shmaddr, int shmflg) +{ + unsigned long raddr; + long err; + + err = do_shmat(shmid, shmaddr, shmflg, &raddr); + + /* + * This works because all user-level addresses are + * non-negative longs! + */ + return err ? err : (long)raddr; } + /* * The following stuff should move into a header file should it ever * be labeled "officially supported." Right now, there is just enough @@ -973,19 +990,18 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, char *bits; size_t size; long timeout; - int ret = -EINVAL; + int ret; timeout = MAX_SCHEDULE_TIMEOUT; if (tvp) { time_t sec, usec; - if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp)) - || __get_user(sec, &tvp->tv_sec) - || __get_user(usec, &tvp->tv_usec)) { - ret = -EFAULT; + if ((ret = verify_area(VERIFY_READ, tvp, sizeof(*tvp))) + || (ret = __get_user(sec, &tvp->tv_sec)) + || (ret = __get_user(usec, &tvp->tv_usec))) goto out_nofds; - } + ret = -EINVAL; if (sec < 0 || usec < 0) goto out_nofds; @@ -995,6 +1011,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, } } + ret = -EINVAL; if (n < 0 || n > current->files->max_fdset) goto out_nofds; @@ -1150,13 +1167,16 @@ osf_usleep_thread(struct timeval32 __user *sleep, struct timeval32 __user *remai if (get_tv32(&tmp, sleep)) goto fault; - ticks = timeval_to_jiffies(&tmp); + ticks = tmp.tv_usec; + ticks = (ticks + (1000000 / HZ) - 1) / (1000000 / HZ); + ticks += tmp.tv_sec * HZ; current->state = TASK_INTERRUPTIBLE; ticks = schedule_timeout(ticks); if (remain) { - jiffies_to_timeval(ticks, &tmp); + tmp.tv_sec = ticks / HZ; + tmp.tv_usec = ticks % HZ; if (put_tv32(remain, &tmp)) goto fault; } diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index fa36b5d1e..379617048 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -338,7 +337,7 @@ do_sys_ptrace(long request, long pid, long addr, long data, /* continue and stop at next (return from) syscall */ case PTRACE_CONT: /* restart after signal. */ ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); @@ -368,7 +367,7 @@ do_sys_ptrace(long request, long pid, long addr, long data, case PTRACE_SINGLESTEP: /* execute single instruction. */ ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; /* Mark single stepping. */ child->thread_info->bpt_nsaved = -1; diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index b4e5f8ff2..71d2205aa 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -111,6 +111,8 @@ struct alpha_machine_vector alpha_mv; int alpha_using_srm; #endif +unsigned char aux_device_present = 0xaa; + #define N(a) (sizeof(a)/sizeof(a[0])) static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, @@ -211,14 +213,14 @@ static void __init reserve_std_resources(void) { static struct resource standard_io_resources[] = { - { .name = "rtc", .start = -1, .end = -1 }, - { .name = "dma1", .start = 0x00, .end = 0x1f }, - { .name = "pic1", .start = 0x20, .end = 0x3f }, - { .name = "timer", .start = 0x40, .end = 0x5f }, - { .name = "keyboard", .start = 0x60, .end = 0x6f }, - { .name = "dma page reg", .start = 0x80, .end = 0x8f }, - { .name = "pic2", .start = 0xa0, .end = 0xbf }, - { .name = "dma2", .start = 0xc0, .end = 0xdf }, + { "rtc", -1, -1 }, + { "dma1", 0x00, 0x1f }, + { "pic1", 0x20, 0x3f }, + { "timer", 0x40, 0x5f }, + { "keyboard", 0x60, 0x6f }, + { "dma page reg", 0x80, 0x8f }, + { "pic2", 0xa0, 0xbf }, + { "dma2", 0xc0, 0xdf }, }; struct resource *io = &ioport_resource; diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 08fe8071a..974329cf0 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c @@ -91,7 +91,7 @@ osf_sigaction(int sig, const struct osf_sigaction __user *act, if (act) { old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || + if (verify_area(VERIFY_READ, act, sizeof(*act)) || __get_user(new_ka.sa.sa_handler, &act->sa_handler) || __get_user(new_ka.sa.sa_flags, &act->sa_flags)) return -EFAULT; @@ -103,7 +103,7 @@ osf_sigaction(int sig, const struct osf_sigaction __user *act, ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || + if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || __put_user(old_ka.sa.sa_flags, &oact->sa_flags)) return -EFAULT; @@ -298,7 +298,7 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs, sigset_t set; /* Verify that it's a good sigcontext before using it */ - if (!access_ok(VERIFY_READ, sc, sizeof(*sc))) + if (verify_area(VERIFY_READ, sc, sizeof(*sc))) goto give_sigsegv; if (__get_user(set.sig[0], &sc->sc_mask)) goto give_sigsegv; @@ -336,7 +336,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs, sigset_t set; /* Verify that it's a good ucontext_t before using it */ - if (!access_ok(VERIFY_READ, &frame->uc, sizeof(frame->uc))) + if (verify_area(VERIFY_READ, &frame->uc, sizeof(frame->uc))) goto give_sigsegv; if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) goto give_sigsegv; @@ -446,7 +446,7 @@ setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, oldsp = rdusp(); frame = get_sigframe(ka, oldsp, sizeof(*frame)); - if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) + if (verify_area(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; err |= setup_sigcontext(&frame->sc, regs, sw, set->sig[0], oldsp); @@ -497,7 +497,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, oldsp = rdusp(); frame = get_sigframe(ka, oldsp, sizeof(*frame)); - if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) + if (verify_area(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; err |= copy_siginfo_to_user(&frame->info, info); diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c index fd467b207..363267242 100644 --- a/arch/alpha/kernel/smc37c669.c +++ b/arch/alpha/kernel/smc37c669.c @@ -1104,7 +1104,7 @@ static int SMC37c669_xlate_drq( int drq ); -static __cacheline_aligned DEFINE_SPINLOCK(smc_lock); +static spinlock_t smc_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; /* **++ diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 8f1e78551..04a4d366b 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -78,6 +78,8 @@ static unsigned long hwrpb_cpu_present_mask __initdata = 0; int smp_num_probed; /* Internal processor count */ int smp_num_cpus = 1; /* Number that came online. */ +cycles_t cacheflush_time; +unsigned long cache_decay_ticks; extern void calibrate_delay(void); @@ -175,6 +177,57 @@ smp_callin(void) cpu_idle(); } + +/* + * Rough estimation for SMP scheduling, this is the number of cycles it + * takes for a fully memory-limited process to flush the SMP-local cache. + * + * We are not told how much cache there is, so we have to guess. + */ +static void __init +smp_tune_scheduling (int cpuid) +{ + struct percpu_struct *cpu; + unsigned long on_chip_cache; /* kB */ + unsigned long freq; /* Hz */ + unsigned long bandwidth = 350; /* MB/s */ + + cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset + + cpuid * hwrpb->processor_size); + switch (cpu->type) + { + case EV45_CPU: + on_chip_cache = 16 + 16; + break; + + case EV5_CPU: + case EV56_CPU: + on_chip_cache = 8 + 8 + 96; + break; + + case PCA56_CPU: + on_chip_cache = 16 + 8; + break; + + case EV6_CPU: + case EV67_CPU: + default: + on_chip_cache = 64 + 64; + break; + } + + freq = hwrpb->cycle_freq ? : est_cycle_freq; + + cacheflush_time = (freq / 1000000) * (on_chip_cache << 10) / bandwidth; + cache_decay_ticks = cacheflush_time / (freq / 1000) * HZ / 1000; + + printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n", + cacheflush_time/(freq/1000000), + (cacheflush_time*100/(freq/1000000)) % 100); + printk("task migration cache decay timeout: %ld msecs.\n", + (cache_decay_ticks + 1) * 1000 / HZ); +} + /* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ static int __init wait_for_txrdy (unsigned long cpumask) @@ -475,6 +528,7 @@ smp_prepare_cpus(unsigned int max_cpus) current_thread_info()->cpu = boot_cpuid; smp_store_cpu_info(boot_cpuid); + smp_tune_scheduling(boot_cpuid); smp_setup_percpu_timer(boot_cpuid); /* Nothing to do on a UP box, or when told not to. */ diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 9e36b07fa..6e334292b 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c @@ -43,7 +43,7 @@ static unsigned long cached_irq_mask; /* dp264 boards handle at max four CPUs */ static unsigned long cpu_irq_affinity[4] = { 0UL, 0UL, 0UL, 0UL }; -DEFINE_SPINLOCK(dp264_irq_lock); +spinlock_t dp264_irq_lock = SPIN_LOCK_UNLOCKED; static void tsunami_update_irq_hw(unsigned long mask) diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index 1e91291c3..b1eaa9c78 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S @@ -227,7 +227,7 @@ sys_call_table: .quad sys_semop .quad osf_utsname .quad sys_lchown - .quad sys_shmat + .quad osf_shmat .quad sys_shmctl /* 210 */ .quad sys_shmdt .quad sys_shmget @@ -299,7 +299,7 @@ sys_call_table: .quad alpha_ni_syscall /* 270 */ .quad alpha_ni_syscall .quad alpha_ni_syscall - .quad alpha_ni_syscall + .quad sys_vserver /* 273 sys_vserver */ .quad alpha_ni_syscall .quad alpha_ni_syscall /* 275 */ .quad alpha_ni_syscall @@ -455,7 +455,7 @@ sys_call_table: .quad sys_stat64 /* 425 */ .quad sys_lstat64 .quad sys_fstat64 - .quad sys_vserver /* sys_vserver */ + .quad sys_ni_syscall /* sys_vserver */ .quad sys_ni_syscall /* sys_mbind */ .quad sys_ni_syscall /* sys_get_mempolicy */ .quad sys_ni_syscall /* sys_set_mempolicy */ @@ -466,9 +466,6 @@ sys_call_table: .quad sys_mq_notify .quad sys_mq_getsetattr .quad sys_waitid - .quad sys_add_key - .quad sys_request_key /* 440 */ - .quad sys_keyctl .size sys_call_table, . - sys_call_table .type sys_call_table, @object diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index 8226c5cd7..e74677115 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c @@ -63,7 +63,7 @@ extern unsigned long wall_jiffies; /* kernel/timer.c */ static int set_rtc_mmss(unsigned long); -DEFINE_SPINLOCK(rtc_lock); +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; #define TICK_SIZE (tick_nsec / 1000) diff --git a/arch/alpha/lib/io.c b/arch/alpha/lib/io.c new file mode 100644 index 000000000..dedc51869 --- /dev/null +++ b/arch/alpha/lib/io.c @@ -0,0 +1,594 @@ +/* + * Alpha IO and memory functions.. Just expand the inlines in the header + * files.. + */ + +#include +#include +#include + +#include + +u8 _inb(unsigned long addr) +{ + return __inb(addr); +} + +u16 _inw(unsigned long addr) +{ + return __inw(addr); +} + +u32 _inl(unsigned long addr) +{ + return __inl(addr); +} + + +void _outb(u8 b, unsigned long addr) +{ + __outb(b, addr); +} + +void _outw(u16 b, unsigned long addr) +{ + __outw(b, addr); +} + +void _outl(u32 b, unsigned long addr) +{ + __outl(b, addr); +} + +u8 ___raw_readb(unsigned long addr) +{ + return __readb(addr); +} + +u16 ___raw_readw(unsigned long addr) +{ + return __readw(addr); +} + +u32 ___raw_readl(unsigned long addr) +{ + return __readl(addr); +} + +u64 ___raw_readq(unsigned long addr) +{ + return __readq(addr); +} + +u8 _readb(unsigned long addr) +{ + unsigned long r = __readb(addr); + mb(); + return r; +} + +u16 _readw(unsigned long addr) +{ + unsigned long r = __readw(addr); + mb(); + return r; +} + +u32 _readl(unsigned long addr) +{ + unsigned long r = __readl(addr); + mb(); + return r; +} + +u64 _readq(unsigned long addr) +{ + unsigned long r = __readq(addr); + mb(); + return r; +} + +void ___raw_writeb(u8 b, unsigned long addr) +{ + __writeb(b, addr); +} + +void ___raw_writew(u16 b, unsigned long addr) +{ + __writew(b, addr); +} + +void ___raw_writel(u32 b, unsigned long addr) +{ + __writel(b, addr); +} + +void ___raw_writeq(u64 b, unsigned long addr) +{ + __writeq(b, addr); +} + +void _writeb(u8 b, unsigned long addr) +{ + __writeb(b, addr); + mb(); +} + +void _writew(u16 b, unsigned long addr) +{ + __writew(b, addr); + mb(); +} + +void _writel(u32 b, unsigned long addr) +{ + __writel(b, addr); + mb(); +} + +void _writeq(u64 b, unsigned long addr) +{ + __writeq(b, addr); + mb(); +} + +/* + * Read COUNT 8-bit bytes from port PORT into memory starting at + * SRC. + */ +void insb (unsigned long port, void *dst, unsigned long count) +{ + while (((unsigned long)dst) & 0x3) { + if (!count) + return; + count--; + *(unsigned char *) dst = inb(port); + dst += 1; + } + + while (count >= 4) { + unsigned int w; + count -= 4; + w = inb(port); + w |= inb(port) << 8; + w |= inb(port) << 16; + w |= inb(port) << 24; + *(unsigned int *) dst = w; + dst += 4; + } + + while (count) { + --count; + *(unsigned char *) dst = inb(port); + dst += 1; + } +} + + +/* + * Read COUNT 16-bit words from port PORT into memory starting at + * SRC. SRC must be at least short aligned. This is used by the + * IDE driver to read disk sectors. Performance is important, but + * the interfaces seems to be slow: just using the inlined version + * of the inw() breaks things. + */ +void insw (unsigned long port, void *dst, unsigned long count) +{ + if (((unsigned long)dst) & 0x3) { + if (((unsigned long)dst) & 0x1) { + panic("insw: memory not short aligned"); + } + if (!count) + return; + count--; + *(unsigned short *) dst = inw(port); + dst += 2; + } + + while (count >= 2) { + unsigned int w; + count -= 2; + w = inw(port); + w |= inw(port) << 16; + *(unsigned int *) dst = w; + dst += 4; + } + + if (count) { + *(unsigned short*) dst = inw(port); + } +} + + +/* + * Read COUNT 32-bit words from port PORT into memory starting at + * SRC. Now works with any alignment in SRC. Performance is important, + * but the interfaces seems to be slow: just using the inlined version + * of the inl() breaks things. + */ +void insl (unsigned long port, void *dst, unsigned long count) +{ + unsigned int l = 0, l2; + + if (!count) + return; + + switch (((unsigned long) dst) & 0x3) + { + case 0x00: /* Buffer 32-bit aligned */ + while (count--) + { + *(unsigned int *) dst = inl(port); + dst += 4; + } + break; + + /* Assuming little endian Alphas in cases 0x01 -- 0x03 ... */ + + case 0x02: /* Buffer 16-bit aligned */ + --count; + + l = inl(port); + *(unsigned short *) dst = l; + dst += 2; + + while (count--) + { + l2 = inl(port); + *(unsigned int *) dst = l >> 16 | l2 << 16; + dst += 4; + l = l2; + } + *(unsigned short *) dst = l >> 16; + break; + + case 0x01: /* Buffer 8-bit aligned */ + --count; + + l = inl(port); + *(unsigned char *) dst = l; + dst += 1; + *(unsigned short *) dst = l >> 8; + dst += 2; + while (count--) + { + l2 = inl(port); + *(unsigned int *) dst = l >> 24 | l2 << 8; + dst += 4; + l = l2; + } + *(unsigned char *) dst = l >> 24; + break; + + case 0x03: /* Buffer 8-bit aligned */ + --count; + + l = inl(port); + *(unsigned char *) dst = l; + dst += 1; + while (count--) + { + l2 = inl(port); + *(unsigned int *) dst = l << 24 | l2 >> 8; + dst += 4; + l = l2; + } + *(unsigned short *) dst = l >> 8; + dst += 2; + *(unsigned char *) dst = l >> 24; + break; + } +} + + +/* + * Like insb but in the opposite direction. + * Don't worry as much about doing aligned memory transfers: + * doing byte reads the "slow" way isn't nearly as slow as + * doing byte writes the slow way (no r-m-w cycle). + */ +void outsb(unsigned long port, const void * src, unsigned long count) +{ + while (count) { + count--; + outb(*(char *)src, port); + src += 1; + } +} + +/* + * Like insw but in the opposite direction. This is used by the IDE + * driver to write disk sectors. Performance is important, but the + * interfaces seems to be slow: just using the inlined version of the + * outw() breaks things. + */ +void outsw (unsigned long port, const void *src, unsigned long count) +{ + if (((unsigned long)src) & 0x3) { + if (((unsigned long)src) & 0x1) { + panic("outsw: memory not short aligned"); + } + outw(*(unsigned short*)src, port); + src += 2; + --count; + } + + while (count >= 2) { + unsigned int w; + count -= 2; + w = *(unsigned int *) src; + src += 4; + outw(w >> 0, port); + outw(w >> 16, port); + } + + if (count) { + outw(*(unsigned short *) src, port); + } +} + + +/* + * Like insl but in the opposite direction. This is used by the IDE + * driver to write disk sectors. Works with any alignment in SRC. + * Performance is important, but the interfaces seems to be slow: + * just using the inlined version of the outl() breaks things. + */ +void outsl (unsigned long port, const void *src, unsigned long count) +{ + unsigned int l = 0, l2; + + if (!count) + return; + + switch (((unsigned long) src) & 0x3) + { + case 0x00: /* Buffer 32-bit aligned */ + while (count--) + { + outl(*(unsigned int *) src, port); + src += 4; + } + break; + + case 0x02: /* Buffer 16-bit aligned */ + --count; + + l = *(unsigned short *) src << 16; + src += 2; + + while (count--) + { + l2 = *(unsigned int *) src; + src += 4; + outl (l >> 16 | l2 << 16, port); + l = l2; + } + l2 = *(unsigned short *) src; + outl (l >> 16 | l2 << 16, port); + break; + + case 0x01: /* Buffer 8-bit aligned */ + --count; + + l = *(unsigned char *) src << 8; + src += 1; + l |= *(unsigned short *) src << 16; + src += 2; + while (count--) + { + l2 = *(unsigned int *) src; + src += 4; + outl (l >> 8 | l2 << 24, port); + l = l2; + } + l2 = *(unsigned char *) src; + outl (l >> 8 | l2 << 24, port); + break; + + case 0x03: /* Buffer 8-bit aligned */ + --count; + + l = *(unsigned char *) src << 24; + src += 1; + while (count--) + { + l2 = *(unsigned int *) src; + src += 4; + outl (l >> 24 | l2 << 8, port); + l = l2; + } + l2 = *(unsigned short *) src; + src += 2; + l2 |= *(unsigned char *) src << 16; + outl (l >> 24 | l2 << 8, port); + break; + } +} + + +/* + * Copy data from IO memory space to "real" memory space. + * This needs to be optimized. + */ +void _memcpy_fromio(void * to, unsigned long from, long count) +{ + /* Optimize co-aligned transfers. Everything else gets handled + a byte at a time. */ + + if (count >= 8 && ((unsigned long)to & 7) == (from & 7)) { + count -= 8; + do { + *(u64 *)to = __raw_readq(from); + count -= 8; + to += 8; + from += 8; + } while (count >= 0); + count += 8; + } + + if (count >= 4 && ((unsigned long)to & 3) == (from & 3)) { + count -= 4; + do { + *(u32 *)to = __raw_readl(from); + count -= 4; + to += 4; + from += 4; + } while (count >= 0); + count += 4; + } + + if (count >= 2 && ((unsigned long)to & 1) == (from & 1)) { + count -= 2; + do { + *(u16 *)to = __raw_readw(from); + count -= 2; + to += 2; + from += 2; + } while (count >= 0); + count += 2; + } + + while (count > 0) { + *(u8 *) to = __raw_readb(from); + count--; + to++; + from++; + } +} + +/* + * Copy data from "real" memory space to IO memory space. + * This needs to be optimized. + */ +void _memcpy_toio(unsigned long to, const void * from, long count) +{ + /* Optimize co-aligned transfers. Everything else gets handled + a byte at a time. */ + /* FIXME -- align FROM. */ + + if (count >= 8 && (to & 7) == ((unsigned long)from & 7)) { + count -= 8; + do { + __raw_writeq(*(const u64 *)from, to); + count -= 8; + to += 8; + from += 8; + } while (count >= 0); + count += 8; + } + + if (count >= 4 && (to & 3) == ((unsigned long)from & 3)) { + count -= 4; + do { + __raw_writel(*(const u32 *)from, to); + count -= 4; + to += 4; + from += 4; + } while (count >= 0); + count += 4; + } + + if (count >= 2 && (to & 1) == ((unsigned long)from & 1)) { + count -= 2; + do { + __raw_writew(*(const u16 *)from, to); + count -= 2; + to += 2; + from += 2; + } while (count >= 0); + count += 2; + } + + while (count > 0) { + __raw_writeb(*(const u8 *) from, to); + count--; + to++; + from++; + } + mb(); +} + +/* + * "memset" on IO memory space. + */ +void _memset_c_io(unsigned long to, unsigned long c, long count) +{ + /* Handle any initial odd byte */ + if (count > 0 && (to & 1)) { + __raw_writeb(c, to); + to++; + count--; + } + + /* Handle any initial odd halfword */ + if (count >= 2 && (to & 2)) { + __raw_writew(c, to); + to += 2; + count -= 2; + } + + /* Handle any initial odd word */ + if (count >= 4 && (to & 4)) { + __raw_writel(c, to); + to += 4; + count -= 4; + } + + /* Handle all full-sized quadwords: we're aligned + (or have a small count) */ + count -= 8; + if (count >= 0) { + do { + __raw_writeq(c, to); + to += 8; + count -= 8; + } while (count >= 0); + } + count += 8; + + /* The tail is word-aligned if we still have count >= 4 */ + if (count >= 4) { + __raw_writel(c, to); + to += 4; + count -= 4; + } + + /* The tail is half-word aligned if we have count >= 2 */ + if (count >= 2) { + __raw_writew(c, to); + to += 2; + count -= 2; + } + + /* And finally, one last byte.. */ + if (count) { + __raw_writeb(c, to); + } + mb(); +} + +void +scr_memcpyw(u16 *d, const u16 *s, unsigned int count) +{ + if (! __is_ioaddr((unsigned long) s)) { + /* Source is memory. */ + if (! __is_ioaddr((unsigned long) d)) + memcpy(d, s, count); + else + memcpy_toio(d, s, count); + } else { + /* Source is screen. */ + if (! __is_ioaddr((unsigned long) d)) + memcpy_fromio(d, s, count); + else { + /* FIXME: Should handle unaligned ops and + operation widening. */ + count /= 2; + while (count--) { + u16 tmp = __raw_readw((unsigned long)(s++)); + __raw_writew(tmp, (unsigned long)(d++)); + } + } + } +} diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 65320bd35..3ea81ca1c 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c @@ -20,7 +20,6 @@ #include #include /* max_low_pfn */ #include -#include #include #include @@ -43,9 +42,10 @@ pgd_alloc(struct mm_struct *mm) { pgd_t *ret, *init; - ret = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); + ret = (pgd_t *)__get_free_page(GFP_KERNEL); init = pgd_offset(&init_mm, 0UL); if (ret) { + clear_page(ret); #ifdef CONFIG_ALPHA_LARGE_VMALLOC memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, (PTRS_PER_PGD - USER_PTRS_PER_PGD - 1)*sizeof(pgd_t)); @@ -63,7 +63,9 @@ pgd_alloc(struct mm_struct *mm) pte_t * pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); + pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + if (pte) + clear_page(pte); return pte; } diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c index ba81c4422..a839578e9 100644 --- a/arch/alpha/mm/numa.c +++ b/arch/alpha/mm/numa.c @@ -246,7 +246,7 @@ setup_memory_node(int nid, void *kernel_end) reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start), bootmap_size); printk(" reserving pages %ld:%ld\n", bootmap_start, bootmap_start+PFN_UP(bootmap_size)); - node_set_online(nid); + numnodes++; } void __init @@ -256,7 +256,7 @@ setup_memory(void *kernel_end) show_mem_layout(); - nodes_clear(node_online_map); + numnodes = 0; min_low_pfn = ~0UL; max_low_pfn = 0UL; @@ -303,7 +303,7 @@ void __init paging_init(void) */ dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; - for_each_online_node(nid) { + for (nid = 0; nid < numnodes; nid++) { unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT; unsigned long end_pfn = node_bdata[nid].node_low_pfn; @@ -332,7 +332,7 @@ void __init mem_init(void) high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); reservedpages = 0; - for_each_online_node(nid) { + for (nid = 0; nid < numnodes; nid++) { /* * This will free up the bootmem, ie, slot 0 memory */ @@ -372,7 +372,7 @@ show_mem(void) printk("\nMem-info:\n"); show_free_areas(); printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); - for_each_online_node(nid) { + for (nid = 0; nid < numnodes; nid++) { struct page * lmem_map = node_mem_map(nid); i = node_spanned_pages(nid); while (i-- > 0) { diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c78bb3f13..dcd224655 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -57,10 +57,6 @@ config RWSEM_GENERIC_SPINLOCK config RWSEM_XCHGADD_ALGORITHM bool -config GENERIC_CALIBRATE_DELAY - bool - default y - config GENERIC_BUST_SPINLOCK bool @@ -71,9 +67,6 @@ config GENERIC_IOMAP bool default y -config FIQ - bool - source "init/Kconfig" menu "System Type" @@ -84,8 +77,6 @@ choice config ARCH_CLPS7500 bool "Cirrus-CL-PS7500FE" - select TIMER_ACORN - select ISA config ARCH_CLPS711X bool "CLPS711x/EP721x-based" @@ -97,7 +88,6 @@ config ARCH_CO285 config ARCH_EBSA110 bool "EBSA-110" - select ISA help This is an evaluation board for the StrongARM processor available from Digital. It has limited hardware on-board, including an onboard @@ -117,25 +107,18 @@ config ARCH_FOOTBRIDGE config ARCH_INTEGRATOR bool "Integrator" - select ARM_AMBA - select ICST525 config ARCH_IOP3XX bool "IOP3xx-based" - select PCI config ARCH_IXP4XX bool "IXP4xx-based" - select DMABOUNCE - select PCI config ARCH_IXP2000 bool "IXP2400/2800-based" - select PCI config ARCH_L7200 bool "LinkUp-L7200" - select FIQ help Say Y here if you intend to run this kernel on a LinkUp Systems L7200 Software Development Board which uses an ARM720T processor. @@ -144,37 +127,29 @@ config ARCH_L7200 If you have any questions or comments about the Linux kernel port - to this board, send e-mail to . + to this board, send e-mail to sjhill@cotw.com. config ARCH_PXA bool "PXA2xx-based" config ARCH_RPC bool "RiscPC" - select ARCH_ACORN - select FIQ - select TIMER_ACORN help On the Acorn Risc-PC, Linux can support the internal IDE disk and CD-ROM interface, serial and parallel port, and the floppy drive. config ARCH_SA1100 bool "SA1100-based" - select ISA - select DISCONTIGMEM config ARCH_S3C2410 bool "Samsung S3C2410" help Samsung S3C2410X CPU based systems, such as the Simtec Electronics - BAST (), the IPAQ 1940 or + BAST (http://www.simtec.co.uk/products/EB110ITX/), the IPAQ 1940 or the Samsung SMDK2410 development board (and derviatives). config ARCH_SHARK bool "Shark" - select ISA - select ISA_DMA - select PCI config ARCH_LH7A40X bool "Sharp LH7A40X" @@ -189,8 +164,6 @@ config ARCH_OMAP config ARCH_VERSATILE bool "Versatile" - select ARM_AMBA - select ICST307 help This enables support for ARM Ltd Versatile board. @@ -237,47 +210,63 @@ source "arch/arm/mach-versatile/Kconfig" # Definitions to make life easier config ARCH_ACORN bool + depends on ARCH_RPC + default y -source arch/arm/mm/Kconfig - -# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER -config XSCALE_PMU +config TIMER_ACORN bool - depends on CPU_XSCALE && !XSCALE_PMU_TIMER + depends on ARCH_ACORN || ARCH_CLPS7500 default y -endmenu +##################################################################### +# SA1111 support +config SA1111 + bool + depends on ASSABET_NEPONSET || SA1100_ADSBITSY || SA1100_BADGE4 || SA1100_CONSUS || SA1100_GRAPHICSMASTER || SA1100_JORNADA720 || ARCH_LUBBOCK || SA1100_PFS168 || SA1100_PT_SYSTEM3 || SA1100_XP860 + default y -source "arch/arm/common/Kconfig" +config SHARP_LOCOMO + bool + depends on SA1100_COLLIE + default y config FORCE_MAX_ZONEORDER int depends on SA1111 default "9" -menu "Bus support" - -config ARM_AMBA +config DMABOUNCE bool + depends on SA1111 || ARCH_IXP4XX + default y -config ISA - bool - help - Find out whether you have ISA slots on your motherboard. ISA is the - name of a bus system, i.e. the way the CPU talks to the other stuff - inside your box. Other bus systems are PCI, EISA, MicroChannel - (MCA) or VESA. ISA is an older system, now being displaced by PCI; - newer boards don't support it. If you have ISA, say Y, otherwise N. +source arch/arm/mm/Kconfig -config ISA_DMA +# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER +config XSCALE_PMU bool + depends on CPU_XSCALE && !XSCALE_PMU_TIMER + default y + +endmenu + +menu "General setup" -config ISA_DMA_API +# Select various configuration options depending on the machine type +config DISCONTIGMEM bool + depends on ARCH_EDB7211 || ARCH_SA1100 || (ARCH_LH7A40X && !LH7A40X_CONTIGMEM) default y + help + Say Y to support efficient handling of discontiguous physical memory, + for architectures which are either NUMA (Non-Uniform Memory Access) + or have huge holes in the physical address space for other reasons. + See for more. +# Now handle the bus types config PCI bool "PCI support" if ARCH_INTEGRATOR_AP + default y if ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_IXP2000 help Find out whether you have a PCI motherboard. PCI is the name of a bus system, i.e. the way the CPU talks to the other stuff inside @@ -295,125 +284,41 @@ config PCI_HOST_VIA82C505 depends on PCI && ARCH_SHARK default y -source "drivers/pci/Kconfig" - -source "drivers/pcmcia/Kconfig" - -endmenu - -menu "Kernel Features" - -config SMP - bool "Symmetric Multi-Processing (EXPERIMENTAL)" - depends on EXPERIMENTAL #&& n - help - This enables support for systems with more than one CPU. If you have - a system with only one CPU, like most personal computers, say N. If - you have a system with more than one CPU, say Y. - - If you say N here, the kernel will run on single and multiprocessor - machines, but will use only one CPU of a multiprocessor machine. If - you say Y here, the kernel will run on many, but not all, single - processor machines. On a single processor machine, the kernel will - run faster if you say N here. - - See also the , - , , - and the SMP-HOWTO available at - . - - If you don't know what to do here, say N. - -config NR_CPUS - int "Maximum number of CPUs (2-32)" - range 2 32 - depends on SMP - default "4" - -config PREEMPT - bool "Preemptible Kernel (EXPERIMENTAL)" - depends on EXPERIMENTAL - help - This option reduces the latency of the kernel when reacting to - real-time or interactive events by allowing a low priority process to - be preempted even if it is in kernel mode executing a system call. - This allows applications to run more reliably even when the system is - under load. - - Say Y here if you are building a kernel for a desktop, embedded - or real-time system. Say N if you are unsure. - -config DISCONTIGMEM +config ICST525 bool - default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM) - help - Say Y to support efficient handling of discontiguous physical memory, - for architectures which are either NUMA (Non-Uniform Memory Access) - or have huge holes in the physical address space for other reasons. - See for more. - -config LEDS - bool "Timer and CPU usage LEDs" - depends on ARCH_CDB89712 || ARCH_CO285 || ARCH_EBSA110 || \ - ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \ - ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ - ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ - ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE - help - If you say Y here, the LEDs on your machine will be used - to provide useful information about your current system status. - - If you are compiling a kernel for a NetWinder or EBSA-285, you will - be able to select which LEDs are active using the options below. If - you are compiling a kernel for the EBSA-110 or the LART however, the - red LED will simply flash regularly to indicate that the system is - still functional. It is safe to say Y here if you have a CATS - system, but the driver will do nothing. - -config LEDS_TIMER - bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \ - MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 - depends on LEDS - default y if ARCH_EBSA110 - help - If you say Y here, one of the system LEDs (the green one on the - NetWinder, the amber one on the EBSA285, or the red one on the LART) - will flash regularly to indicate that the system is still - operational. This is mainly useful to kernel hackers who are - debugging unstable kernels. - - The LART uses the same LED for both Timer LED and CPU usage LED - functions. You may choose to use both, but the Timer LED function - will overrule the CPU usage LED. + depends on ARCH_INTEGRATOR + default y -config LEDS_CPU - bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \ - !ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 - depends on LEDS - help - If you say Y here, the red LED will be used to give a good real - time indication of CPU usage, by lighting whenever the idle task - is not currently executing. +config ICST307 + bool + depends on ARCH_VERSATILE + default y - The LART uses the same LED for both Timer LED and CPU usage LED - functions. You may choose to use both, but the Timer LED function - will overrule the CPU usage LED. +config ARM_AMBA + bool + depends on ARCH_INTEGRATOR || ARCH_VERSATILE + default y -config ALIGNMENT_TRAP +config ISA bool - default y if !ARCH_EBSA110 + depends on FOOTBRIDGE_HOST || ARCH_SHARK || ARCH_CLPS7500 || ARCH_EBSA110 || ARCH_CDB89712 || ARCH_EDB7211 || ARCH_SA1100 || ARCH_MX1ADS + default y help - ARM processors can not fetch/store information which is not - naturally aligned on the bus, i.e., a 4 byte fetch must start at an - address divisible by 4. On 32-bit ARM processors, these non-aligned - fetch/store instructions will be emulated in software if you say - here, which has a severe performance impact. This is necessary for - correct operation of some network protocols. With an IP-only - configuration it is safe to say N, otherwise say Y. + Find out whether you have ISA slots on your motherboard. ISA is the + name of a bus system, i.e. the way the CPU talks to the other stuff + inside your box. Other bus systems are PCI, EISA, MicroChannel + (MCA) or VESA. ISA is an older system, now being displaced by PCI; + newer boards don't support it. If you have ISA, say Y, otherwise N. -endmenu +config ISA_DMA + bool + depends on FOOTBRIDGE_HOST || ARCH_SHARK + default y -menu "Boot options" +config FIQ + bool + depends on ARCH_ACORN || ARCH_L7200 + default y # Compressed boot loader in ROM. Yes, we really want to ask about # TEXT and BSS so we preserve their values in the config files. @@ -447,16 +352,6 @@ config ZBOOT_ROM Say Y here if you intend to execute your compressed kernel image (zImage) directly from ROM or flash. If unsure, say N. -config CMDLINE - string "Default kernel command string" - default "" - help - On some architectures (EBSA110 and CATS), there is currently no way - for the boot loader to pass arguments to the kernel. For these - architectures, you should supply some command-line options at build - time by entering them here. As a minimum, you should specify the - memory size and the root device (e.g., mem=64M root=/dev/nfs). - config XIP_KERNEL bool "Kernel Execute-In-Place from ROM" depends on !ZBOOT_ROM @@ -487,17 +382,27 @@ config XIP_PHYS_ADDR be linked for and stored to. This address is dependent on your own flash usage. -endmenu + Please note that, if you're using MTD, you must use a flash chip + that is NOT handled by MTD or the flash will be turned into non + data mode for status and query purposes which will instantaneously + crash the kernel. -if (ARCH_SA1100 || ARCH_INTEGRATOR) + MTD can however be used with a XIP kernel on the same flash chip + but only if the flash memory supports multiple partitions in + hardware, like with the Intel K3 flash parts, and only if the + kernel is not stored within the firrst hardware partition of the + chip. -menu "CPU Frequency scaling" + In any case, make sure that MTD support is configured out for + the first attempt. + +if (ARCH_SA1100 || ARCH_INTEGRATOR) source "drivers/cpufreq/Kconfig" config CPU_FREQ_SA1100 bool - depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_H3800 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT) + depends on CPU_FREQ && (SA1100_LART || SA1100_PLEB) default y config CPU_FREQ_SA1110 @@ -507,7 +412,7 @@ config CPU_FREQ_SA1110 config CPU_FREQ_INTEGRATOR tristate "CPUfreq driver for ARM Integrator CPUs" - depends on ARCH_INTEGRATOR && CPU_FREQ + depends on ARCH_INTEGRATOR && ICST525 && CPU_FREQ default y help This enables the CPUfreq driver for ARM Integrator CPUs. @@ -516,13 +421,13 @@ config CPU_FREQ_INTEGRATOR If in doubt, say Y. -endmenu - endif -menu "Floating point emulation" +source "drivers/pci/Kconfig" -comment "At least one emulation must be selected" +source "drivers/pcmcia/Kconfig" + +comment "At least one math emulation must be selected" config FPE_NWFPE bool "NWFPE math emulation" @@ -573,24 +478,9 @@ config VFP Say N if your target does not have VFP hardware. -endmenu - -menu "Userspace binary formats" - source "fs/Kconfig.binfmt" -config ARTHUR - tristate "RISC OS personality" - help - Say Y here to include the kernel code necessary if you want to run - Acorn RISC OS/Arthur binaries under Linux. This code is still very - experimental; if this sounds frightening, say N and sleep in peace. - You can also say M here to compile this support as a module (which - will be called arthur). - -endmenu - -menu "Power management options" +source "drivers/base/Kconfig" config PM bool "Power Management support" @@ -612,6 +502,19 @@ config PM will issue the hlt instruction if nothing is to be done, thereby sending the processor to sleep and saving power. +config PREEMPT + bool "Preemptible Kernel (EXPERIMENTAL)" + depends on CPU_32 && EXPERIMENTAL + help + This option reduces the latency of the kernel when reacting to + real-time or interactive events by allowing a low priority process to + be preempted even if it is in kernel mode executing a system call. + This allows applications to run more reliably even when the system is + under load. + + Say Y here if you are building a kernel for a desktop, embedded + or real-time system. Say N if you are unsure. + config APM tristate "Advanced Power Management Emulation" depends on PM @@ -671,46 +574,115 @@ config APM To compile this driver as a module, choose M here: the module will be called apm. -endmenu +config ARTHUR + tristate "RISC OS personality" + depends on CPU_32 + help + Say Y here to include the kernel code necessary if you want to run + Acorn RISC OS/Arthur binaries under Linux. This code is still very + experimental; if this sounds frightening, say N and sleep in peace. + You can also say M here to compile this support as a module (which + will be called arthur). -menu "Device Drivers" +config CMDLINE + string "Default kernel command string" + default "" + help + On some architectures (EBSA110 and CATS), there is currently no way + for the boot loader to pass arguments to the kernel. For these + architectures, you should supply some command-line options at build + time by entering them here. As a minimum, you should specify the + memory size and the root device (e.g., mem=64M root=/dev/nfs). -source "drivers/base/Kconfig" +config LEDS + bool "Timer and CPU usage LEDs" + depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX + help + If you say Y here, the LEDs on your machine will be used + to provide useful information about your current system status. + + If you are compiling a kernel for a NetWinder or EBSA-285, you will + be able to select which LEDs are active using the options below. If + you are compiling a kernel for the EBSA-110 or the LART however, the + red LED will simply flash regularly to indicate that the system is + still functional. It is safe to say Y here if you have a CATS + system, but the driver will do nothing. + +config LEDS_TIMER + bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX) + depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX + default y if ARCH_EBSA110 + help + If you say Y here, one of the system LEDs (the green one on the + NetWinder, the amber one on the EBSA285, or the red one on the LART) + will flash regularly to indicate that the system is still + operational. This is mainly useful to kernel hackers who are + debugging unstable kernels. + + The LART uses the same LED for both Timer LED and CPU usage LED + functions. You may choose to use both, but the Timer LED function + will overrule the CPU usage LED. + +config LEDS_CPU + bool "CPU usage LED" + depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX) + help + If you say Y here, the red LED will be used to give a good real + time indication of CPU usage, by lighting whenever the idle task + is not currently executing. + + The LART uses the same LED for both Timer LED and CPU usage LED + functions. You may choose to use both, but the Timer LED function + will overrule the CPU usage LED. + +config ALIGNMENT_TRAP + bool + depends on CPU_32 + default y if !ARCH_EBSA110 + help + ARM processors can not fetch/store information which is not + naturally aligned on the bus, i.e., a 4 byte fetch must start at an + address divisible by 4. On 32-bit ARM processors, these non-aligned + fetch/store instructions will be emulated in software if you say + here, which has a severe performance impact. This is necessary for + correct operation of some network protocols. With an IP-only + configuration it is safe to say N, otherwise say Y. + +endmenu + +source "drivers/parport/Kconfig" if ALIGNMENT_TRAP source "drivers/mtd/Kconfig" endif -source "drivers/parport/Kconfig" - source "drivers/pnp/Kconfig" source "drivers/block/Kconfig" +source "drivers/md/Kconfig" + source "drivers/acorn/block/Kconfig" -if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ - || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ - || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE +source "net/Kconfig" + +if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE source "drivers/ide/Kconfig" endif source "drivers/scsi/Kconfig" -source "drivers/md/Kconfig" - source "drivers/message/fusion/Kconfig" source "drivers/ieee1394/Kconfig" source "drivers/message/i2o/Kconfig" -source "net/Kconfig" - source "drivers/isdn/Kconfig" +# # input before char - char/joystick depends on it. As does USB. - +# source "drivers/input/Kconfig" source "drivers/char/Kconfig" @@ -719,24 +691,22 @@ source "drivers/i2c/Kconfig" #source "drivers/l3/Kconfig" -source "drivers/misc/Kconfig" - source "drivers/media/Kconfig" +source "fs/Kconfig" + +source "arch/arm/oprofile/Kconfig" + source "drivers/video/Kconfig" source "sound/Kconfig" +source "drivers/misc/Kconfig" + source "drivers/usb/Kconfig" source "drivers/mmc/Kconfig" -endmenu - -source "fs/Kconfig" - -source "arch/arm/oprofile/Kconfig" - source "arch/arm/Kconfig.debug" source "kernel/vserver/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 2277e3d17..8b9760b93 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -22,13 +22,15 @@ CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) -CPPFLAGS += -mbig-endian +CFLAGS += -mbig-endian AS += -EB LD += -EB +AFLAGS += -mbig-endian else -CPPFLAGS += -mlittle-endian +CFLAGS += -mlittle-endian AS += -EL LD += -EL +AFLAGS += -mlittle-endian endif comma = , diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 6b505ce41..55fcbb7af 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -46,10 +46,6 @@ ifeq ($(CONFIG_CPU_XSCALE),y) OBJS += head-xscale.o endif -ifeq ($(CONFIG_PXA_SHARPSL),y) -OBJS += head-sharpsl.o -endif - ifeq ($(CONFIG_DEBUG_ICEDCC),y) OBJS += ice-dcc.o endif diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S index d3fe25339..637e63773 100644 --- a/arch/arm/boot/compressed/head-xscale.S +++ b/arch/arm/boot/compressed/head-xscale.S @@ -34,23 +34,25 @@ __XScale_start: bic r0, r0, #0x1000 @ clear Icache mcr p15, 0, r0, c1, c0, 0 -#ifdef CONFIG_ARCH_LUBBOCK - mov r7, #MACH_TYPE_LUBBOCK +#ifdef CONFIG_ARCH_IQ80321 + mov r7, #MACH_TYPE_IQ80321 #endif -#ifdef CONFIG_ARCH_COTULLA_IDP - mov r7, #MACH_TYPE_COTULLA_IDP +#ifdef CONFIG_ARCH_IQ31244 + mov r7, #(MACH_TYPE_IQ31244 & 0xff) + orr r7, r7, #(MACH_TYPE_IQ31244 & 0xff00) +#endif + +#ifdef CONFIG_ARCH_IQ80331 + mov r7, #(MACH_TYPE_IQ80331 & 0xff) + orr r7, r7, #(MACH_TYPE_IQ80331 & 0xff00) #endif -#ifdef CONFIG_MACH_GTWX5715 - mov r7, #(MACH_TYPE_GTWX5715 & 0xff) - orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00) +#ifdef CONFIG_ARCH_LUBBOCK + mov r7, #MACH_TYPE_LUBBOCK #endif -#ifdef CONFIG_ARCH_IXP2000 - mov r1, #-1 - mov r0, #0xd6000000 - str r1, [r0, #0x14] - str r1, [r0, #0x18] +#ifdef CONFIG_ARCH_COTULLA_IDP + mov r7, #MACH_TYPE_COTULLA_IDP #endif diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 7c7f475e2..c0e7aff3d 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -18,30 +18,48 @@ * Please select one of the following when turning on debugging. */ #ifdef DEBUG - -#include - -#if defined(CONFIG_DEBUG_ICEDCC) +#if defined(CONFIG_DEBUG_DC21285_PORT) .macro loadsp, rb + mov \rb, #0x42000000 .endm - .macro writeb, ch, rb - mcr p14, 0, \ch, c0, c1, 0 + .macro writeb, rb + str \rb, [r3, #0x160] .endm -#else - .macro writeb, ch, rb - senduart \ch, \rb +#elif defined(CONFIG_DEBUG_ICEDCC) + .macro loadsp, rb .endm - -#if defined(CONFIG_FOOTBRIDGE) || \ - defined(CONFIG_ARCH_RPC) || \ - defined(CONFIG_ARCH_INTEGRATOR) || \ - defined(CONFIG_ARCH_PXA) || \ - defined(CONFIG_ARCH_IXP4XX) || \ - defined(CONFIG_ARCH_IXP2000) || \ - defined(CONFIG_ARCH_LH7A40X) || \ - defined(CONFIG_ARCH_OMAP) + .macro writeb, rb + mcr p14, 0, \rb, c0, c1, 0 + .endm +#elif defined(CONFIG_FOOTBRIDGE) + .macro loadsp, rb + mov \rb, #0x7c000000 + .endm + .macro writeb, rb + strb \rb, [r3, #0x3f8] + .endm +#elif defined(CONFIG_ARCH_RPC) .macro loadsp, rb - addruart \rb + mov \rb, #0x03000000 + orr \rb, \rb, #0x00010000 + .endm + .macro writeb, rb + strb \rb, [r3, #0x3f8 << 2] + .endm +#elif defined(CONFIG_ARCH_INTEGRATOR) + .macro loadsp, rb + mov \rb, #0x16000000 + .endm + .macro writeb, rb + strb \rb, [r3, #0] + .endm +#elif defined(CONFIG_ARCH_PXA) /* Xscale-type */ + .macro loadsp, rb + mov \rb, #0x40000000 + orr \rb, \rb, #0x00100000 + .endm + .macro writeb, rb + strb \rb, [r3, #0] .endm #elif defined(CONFIG_ARCH_SA1100) .macro loadsp, rb @@ -52,21 +70,64 @@ add \rb, \rb, #0x00010000 @ Ser1 # endif .endm + .macro writeb, rb + str \rb, [r3, #0x14] @ UTDR + .endm +#elif defined(CONFIG_ARCH_IXP4XX) + .macro loadsp, rb + mov \rb, #0xc8000000 + .endm + .macro writeb, rb + str \rb, [r3, #0] +#elif defined(CONFIG_ARCH_IXP2000) + .macro loadsp, rb + mov \rb, #0xc0000000 + orr \rb, \rb, #0x00030000 + .endm + .macro writeb, rb + str \rb, [r3, #0] + .endm +#elif defined(CONFIG_ARCH_LH7A40X) + .macro loadsp, rb + ldr \rb, =0x80000700 @ UART2 UARTBASE + .endm + .macro writeb, rb + strb \rb, [r3, #0] + .endm +#elif defined(CONFIG_ARCH_OMAP) + .macro loadsp, rb + mov \rb, #0xff000000 @ physical base address + add \rb, \rb, #0x00fb0000 +#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) + add \rb, \rb, #0x00000800 +#endif +#ifdef CONFIG_OMAP_LL_DEBUG_UART3 + add \rb, \rb, #0x00009000 +#endif + .endm + .macro writeb, rb + strb \rb, [r3] + .endm #elif defined(CONFIG_ARCH_IOP331) .macro loadsp, rb mov \rb, #0xff000000 orr \rb, \rb, #0x00ff0000 orr \rb, \rb, #0x0000f700 @ location of the UART .endm + .macro writeb, rb + str \rb, [r3, #0] + .endm #elif defined(CONFIG_ARCH_S3C2410) - .macro loadsp, rb + .macro loadsp, rb mov \rb, #0x50000000 add \rb, \rb, #0x4000 * CONFIG_S3C2410_LOWLEVEL_UART_PORT .endm + .macro writeb, rb + strb \rb, [r3, #0x20] + .endm #else #error no serial architecture defined #endif -#endif #endif .macro kputc,val @@ -673,7 +734,7 @@ puts: loadsp r3 1: ldrb r2, [r0], #1 teq r2, #0 moveq pc, lr -2: writeb r2, r3 +2: writeb r2 mov r1, #0x00020000 3: subs r1, r1, #1 bne 3b diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 11f20a43e..5b9f9eddd 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile @@ -11,5 +11,3 @@ obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o obj-$(CONFIG_DMABOUNCE) += dmabounce.o obj-$(CONFIG_TIMER_ACORN) += time-acorn.o obj-$(CONFIG_SHARP_LOCOMO) += locomo.o -obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o -obj-$(CONFIG_SHARP_SCOOP) += scoop.o diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 21fce3414..9525e804b 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -53,7 +53,7 @@ struct sa1111 { unsigned long phys; int irq; spinlock_t lock; - void __iomem *base; + void *base; }; /* @@ -141,16 +141,15 @@ static void sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { unsigned int stat0, stat1, i; - void __iomem *base = desc->data; - stat0 = sa1111_readl(base + SA1111_INTSTATCLR0); - stat1 = sa1111_readl(base + SA1111_INTSTATCLR1); + stat0 = sa1111_readl(desc->data + SA1111_INTSTATCLR0); + stat1 = sa1111_readl(desc->data + SA1111_INTSTATCLR1); - sa1111_writel(stat0, base + SA1111_INTSTATCLR0); + sa1111_writel(stat0, desc->data + SA1111_INTSTATCLR0); desc->chip->ack(irq); - sa1111_writel(stat1, base + SA1111_INTSTATCLR1); + sa1111_writel(stat1, desc->data + SA1111_INTSTATCLR1); if (stat0 == 0 && stat1 == 0) { do_bad_IRQ(irq, desc, regs); @@ -178,7 +177,7 @@ static void sa1111_ack_irq(unsigned int irq) static void sa1111_mask_lowirq(unsigned int irq) { - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ie0; ie0 = sa1111_readl(mapbase + SA1111_INTEN0); @@ -188,7 +187,7 @@ static void sa1111_mask_lowirq(unsigned int irq) static void sa1111_unmask_lowirq(unsigned int irq) { - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ie0; ie0 = sa1111_readl(mapbase + SA1111_INTEN0); @@ -206,7 +205,7 @@ static void sa1111_unmask_lowirq(unsigned int irq) static int sa1111_retrigger_lowirq(unsigned int irq) { unsigned int mask = SA1111_IRQMASK_LO(irq); - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ip0; int i; @@ -227,7 +226,7 @@ static int sa1111_retrigger_lowirq(unsigned int irq) static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) { unsigned int mask = SA1111_IRQMASK_LO(irq); - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ip0; if (flags == IRQT_PROBE) @@ -250,7 +249,7 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) { unsigned int mask = SA1111_IRQMASK_LO(irq); - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long we0; we0 = sa1111_readl(mapbase + SA1111_WAKEEN0); @@ -274,7 +273,7 @@ static struct irqchip sa1111_low_chip = { static void sa1111_mask_highirq(unsigned int irq) { - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ie1; ie1 = sa1111_readl(mapbase + SA1111_INTEN1); @@ -284,7 +283,7 @@ static void sa1111_mask_highirq(unsigned int irq) static void sa1111_unmask_highirq(unsigned int irq) { - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ie1; ie1 = sa1111_readl(mapbase + SA1111_INTEN1); @@ -302,7 +301,7 @@ static void sa1111_unmask_highirq(unsigned int irq) static int sa1111_retrigger_highirq(unsigned int irq) { unsigned int mask = SA1111_IRQMASK_HI(irq); - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ip1; int i; @@ -323,7 +322,7 @@ static int sa1111_retrigger_highirq(unsigned int irq) static int sa1111_type_highirq(unsigned int irq, unsigned int flags) { unsigned int mask = SA1111_IRQMASK_HI(irq); - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long ip1; if (flags == IRQT_PROBE) @@ -346,7 +345,7 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags) static int sa1111_wake_highirq(unsigned int irq, unsigned int on) { unsigned int mask = SA1111_IRQMASK_HI(irq); - void __iomem *mapbase = get_irq_chipdata(irq); + void *mapbase = get_irq_chipdata(irq); unsigned long we1; we1 = sa1111_readl(mapbase + SA1111_WAKEEN1); @@ -370,7 +369,7 @@ static struct irqchip sa1111_high_chip = { static void sa1111_setup_irq(struct sa1111 *sachip) { - void __iomem *irqbase = sachip->base + SA1111_INTC; + void *irqbase = sachip->base + SA1111_INTC; unsigned int irq; /* @@ -724,7 +723,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) static void __sa1111_remove(struct sa1111 *sachip) { struct list_head *l, *n; - void __iomem *irqbase = sachip->base + SA1111_INTC; + void *irqbase = sachip->base + SA1111_INTC; list_for_each_safe(l, n, &sachip->dev->children) { struct device *d = list_to_dev(l); @@ -798,15 +797,15 @@ struct sa1111_save_data { unsigned int wakeen1; }; -#ifdef CONFIG_PM +#ifdef CONFIG_PM -static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level) +static int sa1111_suspend(struct device *dev, u32 state, u32 level) { struct sa1111 *sachip = dev_get_drvdata(dev); struct sa1111_save_data *save; unsigned long flags; unsigned int val; - void __iomem *base; + char *base; if (level != SUSPEND_DISABLE) return 0; @@ -867,7 +866,7 @@ static int sa1111_resume(struct device *dev, u32 level) struct sa1111 *sachip = dev_get_drvdata(dev); struct sa1111_save_data *save; unsigned long flags, id; - void __iomem *base; + char *base; if (level != RESUME_ENABLE) return 0; @@ -923,10 +922,11 @@ static int sa1111_resume(struct device *dev, u32 level) return 0; } -#else -#define sa1111_suspend NULL -#define sa1111_resume NULL -#endif +#else /* !CONFIG_PM */ +#define sa1111_resume NULL +#define sa1111_suspend NULL +#endif /* !CONFIG_PM */ + static int sa1111_probe(struct device *dev) { @@ -1095,7 +1095,7 @@ void sa1111_set_io_dir(struct sa1111_dev *sadev, struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; - void __iomem *gpio = sachip->base + SA1111_GPIO; + void *gpio = sachip->base + SA1111_GPIO; #define MODIFY_BITS(port, mask, dir) \ if (mask) { \ @@ -1121,7 +1121,7 @@ void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v) struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; - void __iomem *gpio = sachip->base + SA1111_GPIO; + void *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PADWR, bits & 15, v); @@ -1135,7 +1135,7 @@ void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned i struct sa1111 *sachip = sa1111_chip_driver(sadev); unsigned long flags; unsigned int val; - void __iomem *gpio = sachip->base + SA1111_GPIO; + void *gpio = sachip->base + SA1111_GPIO; spin_lock_irqsave(&sachip->lock, flags); MODIFY_BITS(gpio + SA1111_GPIO_PASSR, bits & 15, v); @@ -1194,7 +1194,7 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv) return dev->devid == drv->devid; } -static int sa1111_bus_suspend(struct device *dev, pm_message_t state) +static int sa1111_bus_suspend(struct device *dev, u32 state) { struct sa1111_dev *sadev = SA1111_DEV(dev); struct sa1111_driver *drv = SA1111_DRV(dev->driver); diff --git a/arch/arm/configs/iq80310_defconfig b/arch/arm/configs/iq80310_defconfig new file mode 100644 index 000000000..e67d114f1 --- /dev/null +++ b/arch/arm/configs/iq80310_defconfig @@ -0,0 +1,768 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_ADIFCC is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +CONFIG_ARCH_IOP3XX=y +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set + +# +# CLPS711X/EP721X Implementations +# + +# +# Epxa10db +# + +# +# Footbridge Implementations +# + +# +# IOP3xx Implementation Options +# +CONFIG_ARCH_IQ80310=y +# CONFIG_ARCH_IQ80321 is not set +CONFIG_ARCH_IOP310=y +# CONFIG_ARCH_IOP321 is not set + +# +# IOP3xx Chipset Features +# +# CONFIG_IOP3XX_AAU is not set +# CONFIG_IOP3XX_DMA is not set +# CONFIG_IOP3XX_MU is not set +# CONFIG_IOP3XX_PMON is not set + +# +# ADIFCC Implementation Options +# + +# +# ADI Board Types +# + +# +# Intel PXA250/210 Implementations +# + +# +# SA11x0 Implementations +# + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_XS80200=y +CONFIG_CPU_32v5=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +CONFIG_XSCALE_PMU=y + +# +# General setup +# +CONFIG_PCI=y +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0x00060000 +CONFIG_ZBOOT_ROM_BSS=0xa1008000 +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# At least one math emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_PREEMPT is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp mem=32M root=/dev/nfs initrd=0xc0800000,4M" +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_REDBOOT_PARTS=y +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +CONFIG_MTD_IQ80310=y +# CONFIG_MTD_EDB7312 is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_PACKET is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set + +# +# IP: Netfilter Configuration +# +# CONFIG_IP_NF_CONNTRACK is not set +# CONFIG_IP_NF_QUEUE is not set +# CONFIG_IP_NF_IPTABLES is not set +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set +# CONFIG_IP_NF_COMPAT_IPFWADM is not set + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +# CONFIG_XFRM_USER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IPV6_SCTP__=y +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_LLC is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_SMC91X is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_DGRS is not set +CONFIG_EEPRO100=y +# CONFIG_EEPRO100_PIO is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices (depends on LLC=y) +# +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y + +# +# IDE, ATA and ATAPI Block devices +# +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_HD is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_IDEDISK_STROKE is not set +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +# CONFIG_BLK_DEV_IDEPCI is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN_BOOL is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Userland interfaces +# + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_SERIO is not set + +# +# Input Device Drivers +# + +# +# Character devices +# +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_DZ is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# I2C Hardware Sensors Mainboard support +# + +# +# I2C Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_QIC02_TAPE is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HANGCHECK_TIMER is not set + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=y + +# +# Video For Linux +# +# CONFIG_VIDEO_PROC_FS is not set + +# +# Video Adapters +# +# CONFIG_VIDEO_PMS is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set + +# +# Digital Video Broadcasting Devices +# +CONFIG_DVB=y +CONFIG_DVB_CORE=y + +# +# Supported Frontend Modules +# +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_ALPS_BSRV2 is not set +# CONFIG_DVB_ALPS_TDLB7 is not set +# CONFIG_DVB_ALPS_TDMB7 is not set +# CONFIG_DVB_ATMEL_AT76C651 is not set +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_GRUNDIG_29504_491 is not set +# CONFIG_DVB_GRUNDIG_29504_401 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA1004X is not set + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_DVB_AV7110 is not set +# CONFIG_DVB_BUDGET is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_SKYSTAR is not set +# CONFIG_VIDEO_BTCX is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS=y +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +# CONFIG_EXPORTFS is not set +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_GSS is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_NEC98_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Misc devices +# + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set + +# +# Console Switches +# +# CONFIG_SWITCHES is not set + +# +# USB support +# +# CONFIG_USB is not set +# CONFIG_USB_GADGET is not set + +# +# Bluetooth support +# +# CONFIG_BT is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 4a2af55e1..7c56c5589 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -18,7 +18,6 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o -obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_IWMMXT) += iwmmxt.o AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt @@ -31,3 +30,8 @@ head-y := head.o obj-$(CONFIG_DEBUG_LL) += debug.o extra-y := $(head-y) init_task.o vmlinux.lds + +# Spell out some dependencies that aren't automatically figured out +$(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h +$(obj)/entry-common.o: $(obj)/entry-header.S include/asm-arm/constants.h \ + $(obj)/calls.S diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index c1ff4d1f1..93525fdf2 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c @@ -59,31 +59,10 @@ int main(void) DEFINE(TI_CPU_DOMAIN, offsetof(struct thread_info, cpu_domain)); DEFINE(TI_CPU_SAVE, offsetof(struct thread_info, cpu_context)); DEFINE(TI_USED_CP, offsetof(struct thread_info, used_cp)); - DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); DEFINE(TI_IWMMXT_STATE, (offsetof(struct thread_info, fpstate)+4)&~7); BLANK(); - DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0)); - DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1)); - DEFINE(S_R2, offsetof(struct pt_regs, ARM_r2)); - DEFINE(S_R3, offsetof(struct pt_regs, ARM_r3)); - DEFINE(S_R4, offsetof(struct pt_regs, ARM_r4)); - DEFINE(S_R5, offsetof(struct pt_regs, ARM_r5)); - DEFINE(S_R6, offsetof(struct pt_regs, ARM_r6)); - DEFINE(S_R7, offsetof(struct pt_regs, ARM_r7)); - DEFINE(S_R8, offsetof(struct pt_regs, ARM_r8)); - DEFINE(S_R9, offsetof(struct pt_regs, ARM_r9)); - DEFINE(S_R10, offsetof(struct pt_regs, ARM_r10)); - DEFINE(S_FP, offsetof(struct pt_regs, ARM_fp)); - DEFINE(S_IP, offsetof(struct pt_regs, ARM_ip)); - DEFINE(S_SP, offsetof(struct pt_regs, ARM_sp)); - DEFINE(S_LR, offsetof(struct pt_regs, ARM_lr)); - DEFINE(S_PC, offsetof(struct pt_regs, ARM_pc)); - DEFINE(S_PSR, offsetof(struct pt_regs, ARM_cpsr)); - DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0)); - DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); - BLANK(); #if __LINUX_ARM_ARCH__ >= 6 DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); BLANK(); @@ -94,7 +73,7 @@ int main(void) DEFINE(VM_EXEC, VM_EXEC); BLANK(); DEFINE(PAGE_SZ, PAGE_SIZE); - DEFINE(VIRT_OFFSET, PAGE_OFFSET); + DEFINE(VIRT_OFFSET, PAGE_OFFSET); BLANK(); DEFINE(SYS_ERROR0, 0x9f0000); BLANK(); diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 458e281eb..e5d370c23 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -327,7 +327,6 @@ __syscall_start: /* 310 */ .long sys_request_key .long sys_keyctl .long sys_semtimedop - .long sys_vserver __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index caaa919ab..78146b6c3 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S @@ -1,5 +1,5 @@ /* - * linux/arch/arm/kernel/debug.S + * linux/arch/arm/kernel/debug-armv.S * * Copyright (C) 1994-1999 Russell King * @@ -20,8 +20,31 @@ * printk isn't working). For DEBUGGING ONLY!!! Do not leave * references to these in a production kernel! */ +#if defined(CONFIG_ARCH_RPC) + .macro addruart,rx + mov \rx, #0xe0000000 + orr \rx, \rx, #0x00010000 + orr \rx, \rx, #0x00000fe0 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx +1001: ldrb \rd, [\rx, #0x14] + and \rd, \rd, #0x60 + teq \rd, #0x60 + bne 1001b + .endm + + .macro waituart,rd,rx +1001: ldrb \rd, [\rx, #0x18] + tst \rd, #0x10 + beq 1001b + .endm -#if defined(CONFIG_DEBUG_ICEDCC) +#elif defined(CONFIG_DEBUG_ICEDCC) @@ debug using ARM EmbeddedICE DCC channel .macro addruart, rx .endm @@ -48,8 +71,666 @@ bne 1001b 1002: .endm + +#elif defined(CONFIG_ARCH_EBSA110) + .macro addruart,rx + mov \rx, #0xf0000000 + orr \rx, \rx, #0x00000be0 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx +1002: ldrb \rd, [\rx, #0x14] + and \rd, \rd, #0x60 + teq \rd, #0x60 + bne 1002b + .endm + + .macro waituart,rd,rx +1001: ldrb \rd, [\rx, #0x18] + tst \rd, #0x10 + beq 1001b + .endm + +#elif defined(CONFIG_ARCH_SHARK) + .macro addruart,rx + mov \rx, #0xe0000000 + orr \rx, \rx, #0x000003f8 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx + mov \rd, #0 +1001: add \rd, \rd, #1 + teq \rd, #0x10000 + bne 1001b + .endm + + .macro waituart,rd,rx + .endm + +#elif defined(CONFIG_FOOTBRIDGE) + +#include + +#ifndef CONFIG_DEBUG_DC21285_PORT + /* For NetWinder debugging */ + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x7c000000 @ physical + movne \rx, #0xff000000 @ virtual + orr \rx, \rx, #0x000003f8 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx +1002: ldrb \rd, [\rx, #0x5] + and \rd, \rd, #0x60 + teq \rd, #0x60 + bne 1002b + .endm + + .macro waituart,rd,rx +1001: ldrb \rd, [\rx, #0x6] + tst \rd, #0x10 + beq 1001b + .endm +#else + /* For EBSA285 debugging */ + .equ dc21285_high, ARMCSR_BASE & 0xff000000 + .equ dc21285_low, ARMCSR_BASE & 0x00ffffff + + .macro addruart,rx + mov \rx, #dc21285_high + .if dc21285_low + orr \rx, \rx, #dc21285_low + .endif + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0x160] @ UARTDR + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #0x178] @ UARTFLG + tst \rd, #1 << 3 + bne 1001b + .endm + + .macro waituart,rd,rx + .endm +#endif +#elif defined(CONFIG_ARCH_FTVPCI) + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + movne \rx, #0xe0000000 + moveq \rx, #0x10000000 + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0xc] + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #0x4] + tst \rd, #1 << 2 + beq 1001b + .endm + + .macro waituart,rd,rx + .endm + +#elif defined(CONFIG_ARCH_SA1100) + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x80000000 @ physical base address + movne \rx, #0xf8000000 @ virtual address + + @ We probe for the active serial port here, coherently with + @ the comment in include/asm-arm/arch-sa1100/uncompress.h. + @ We assume r1 can be clobbered. + + @ see if Ser3 is active + add \rx, \rx, #0x00050000 + ldr r1, [\rx, #UTCR3] + tst r1, #UTCR3_TXE + + @ if Ser3 is inactive, then try Ser1 + addeq \rx, \rx, #(0x00010000 - 0x00050000) + ldreq r1, [\rx, #UTCR3] + tsteq r1, #UTCR3_TXE + + @ if Ser1 is inactive, then try Ser2 + addeq \rx, \rx, #(0x00030000 - 0x00010000) + ldreq r1, [\rx, #UTCR3] + tsteq r1, #UTCR3_TXE + + @ if all ports are inactive, then there is nothing we can do + moveq pc, lr + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UTDR] + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #UTSR1] + tst \rd, #UTSR1_TNF + beq 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #UTSR1] + tst \rd, #UTSR1_TBY + bne 1001b + .endm + +#elif defined(CONFIG_ARCH_PXA) + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x40000000 @ physical + movne \rx, #io_p2v(0x40000000) @ virtual + orr \rx, \rx, #0x00100000 + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0] + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #0x14] + tst \rd, #(1 << 6) + beq 1002b + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #0x14] + tst \rd, #(1 << 5) + beq 1001b + .endm +#elif defined(CONFIG_ARCH_CLPS7500) + .macro addruart,rx + mov \rx, #0xe0000000 + orr \rx, \rx, #0x00010000 + orr \rx, \rx, #0x00000be0 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx + .endm + + .macro waituart,rd,rx +1001: ldrb \rd, [\rx, #0x14] + tst \rd, #0x20 + beq 1001b + .endm + +#elif defined(CONFIG_ARCH_L7200) + + .equ io_virt, IO_BASE + .equ io_phys, IO_START + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #io_phys @ physical base address + movne \rx, #io_virt @ virtual address + add \rx, \rx, #0x00044000 @ UART1 +@ add \rx, \rx, #0x00045000 @ UART2 + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0x0] @ UARTDR + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full + bne 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy + bne 1001b + .endm + +#elif defined(CONFIG_ARCH_INTEGRATOR) + +#include + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x16000000 @ physical base address + movne \rx, #0xf0000000 @ virtual base + addne \rx, \rx, #0x16000000 >> 4 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx, #UART01x_DR] + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full + bne 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy + bne 1001b + .endm + +#elif defined(CONFIG_ARCH_CLPS711X) + +#include + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #CLPS7111_PHYS_BASE + movne \rx, #CLPS7111_VIRT_BASE +#ifndef CONFIG_DEBUG_CLPS711X_UART2 + add \rx, \rx, #0x0000 @ UART1 +#else + add \rx, \rx, #0x1000 @ UART2 +#endif + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0x0480] @ UARTDR + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #0x0140] @ SYSFLGx + tst \rd, #1 << 11 @ UBUSYx + bne 1001b + .endm + + .macro busyuart,rd,rx + tst \rx, #0x1000 @ UART2 does not have CTS here + bne 1002f +1001: ldr \rd, [\rx, #0x0140] @ SYSFLGx + tst \rd, #1 << 8 @ CTS + bne 1001b +1002: + .endm + +#elif defined(CONFIG_ARCH_CAMELOT) + +#include +#define UART00_TYPE +#include + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + ldr \rx, =EXC_UART00_BASE @ physical base address + orrne \rx, \rx, #0xff000000 @ virtual base + orrne \rx, \rx, #0x00f00000 + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #UART_TD(0)] + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #UART_TSR(0)] + and \rd, \rd, #UART_TSR_TX_LEVEL_MSK + cmp \rd, #15 + beq 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #UART_TSR(0)] + ands \rd, \rd, #UART_TSR_TX_LEVEL_MSK + bne 1001b + .endm + +#elif defined(CONFIG_ARCH_IOP3XX) + + .macro addruart,rx + mov \rx, #0xfe000000 @ physical +#if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) + orr \rx, \rx, #0x00800000 @ location of the UART +#elif defined(CONFIG_ARCH_IOP331) + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x000fe000 @ Physical Base + movne \rx, #0 + orr \rx, \rx, #0xfe000000 + orr \rx, \rx, #0x00f00000 @ Virtual Base + orr \rx, \rx, #0x00001700 @ location of the UART +#else +#error Unknown IOP3XX implementation +#endif + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx +1002: ldrb \rd, [\rx, #0x5] + and \rd, \rd, #0x60 + teq \rd, #0x60 + bne 1002b + .endm + + .macro waituart,rd,rx +#if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331) +1001: ldrb \rd, [\rx, #0x6] + tst \rd, #0x10 + beq 1001b +#endif + .endm + +#elif defined(CONFIG_ARCH_IXP4XX) + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0xc8000000 + movne \rx, #0xff000000 + add \rx,\rx,#3 @ Uart regs are at off set of 3 if + @ byte writes used - Big Endian. + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro waituart,rd,rx +1002: ldrb \rd, [\rx, #0x14] + and \rd, \rd, #0x60 @ check THRE and TEMT bits + teq \rd, #0x60 + bne 1002b + .endm + + .macro busyuart,rd,rx + .endm + +#elif defined(CONFIG_ARCH_IXP2000) + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0xc0000000 @ Physical base + movne \rx, #0xfe000000 @ virtual base + orrne \rx, \rx, #0x00f00000 + orr \rx, \rx, #0x00030000 +#ifdef __ARMEB__ + orr \rx, \rx, #0x00000003 +#endif + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx +1002: ldrb \rd, [\rx, #0x14] + tst \rd, #0x20 + beq 1002b + .endm + + .macro waituart,rd,rx + nop + nop + nop + .endm + +#elif defined(CONFIG_ARCH_OMAP) + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0xff000000 @ physical base address + movne \rx, #0xfe000000 @ virtual base + orr \rx, \rx, #0x00fb0000 +#ifdef CONFIG_OMAP_LL_DEBUG_UART3 + orr \rx, \rx, #0x00009000 @ UART 3 +#endif +#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) + orr \rx, \rx, #0x00000800 @ UART 2 & 3 +#endif + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro busyuart,rd,rx +1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends + and \rd, \rd, #0x60 + teq \rd, #0x60 + beq 1002f + ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only + and \rd, \rd, #0x60 + teq \rd, #0x60 + bne 1001b +1002: + .endm + + .macro waituart,rd,rx + .endm + +#elif defined(CONFIG_ARCH_S3C2410) +#include +#include +#include +#define S3C2410_UART1_OFF (0x4000) +#define SHIFT_2440TXF (14-9) + + .macro addruart, rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 + ldreq \rx, = S3C2410_PA_UART + ldrne \rx, = S3C2410_VA_UART +#if CONFIG_DEBUG_S3C2410_UART != 0 + add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) +#endif + .endm + + .macro senduart,rd,rx + str \rd, [\rx, # S3C2410_UTXH ] + .endm + + .macro busyuart, rd, rx + ldr \rd, [ \rx, # S3C2410_UFCON ] + tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? + beq 1001f @ + @ FIFO enabled... +1003: + mrc p15, 0, \rd, c1, c0 + tst \rd, #1 + addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) + addne \rd, \rx, #(S3C2410_VA_GPIO - S3C2410_VA_UART) + bic \rd, \rd, #0xff000 + ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] + and \rd, \rd, #0x00ff0000 + teq \rd, #0x00440000 @ is it 2440? + + ldr \rd, [ \rx, # S3C2410_UFSTAT ] + moveq \rd, \rd, lsr #SHIFT_2440TXF + tst \rd, #S3C2410_UFSTAT_TXFULL + bne 1003b + b 1002f + +1001: + @ busy waiting for non fifo + ldr \rd, [ \rx, # S3C2410_UTRSTAT ] + tst \rd, #S3C2410_UTRSTAT_TXFE + beq 1001b + +1002: @ exit busyuart + .endm + + .macro waituart,rd,rx + + ldr \rd, [ \rx, # S3C2410_UFCON ] + tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? + beq 1001f @ + @ FIFO enabled... +1003: + mrc p15, 0, \rd, c1, c0 + tst \rd, #1 + addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) + addne \rd, \rx, #(S3C2410_VA_GPIO - S3C2410_VA_UART) + bic \rd, \rd, #0xff000 + ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] + and \rd, \rd, #0x00ff0000 + teq \rd, #0x00440000 @ is it 2440? + + ldr \rd, [ \rx, # S3C2410_UFSTAT ] + andne \rd, \rd, #S3C2410_UFSTAT_TXMASK + andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK + teq \rd, #0 + bne 1003b + b 1002f + +1001: + @ idle waiting for non fifo + ldr \rd, [ \rx, # S3C2410_UTRSTAT ] + tst \rd, #S3C2410_UTRSTAT_TXFE + beq 1001b + +1002: @ exit busyuart + .endm + +#elif defined(CONFIG_ARCH_LH7A40X) + @ It is not known if this will be appropriate for every 40x + @ board. + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + mov \rx, #0x00000700 @ offset from base + orreq \rx, \rx, #0x80000000 @ physical base + orrne \rx, \rx, #0xf8000000 @ virtual base + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] @ DATA + .endm + + .macro busyuart,rd,rx @ spin while busy +1001: ldr \rd, [\rx, #0x10] @ STATUS + tst \rd, #1 << 3 @ BUSY (TX FIFO not empty) + bne 1001b @ yes, spin + .endm + + .macro waituart,rd,rx @ wait for Tx FIFO room +1001: ldrb \rd, [\rx, #0x10] @ STATUS + tst \rd, #1 << 5 @ TXFF (TX FIFO full) + bne 1001b @ yes, spin + .endm + + +#elif defined(CONFIG_ARCH_VERSATILE) + +#include + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x10000000 + movne \rx, #0xf1000000 @ virtual base + orr \rx, \rx, #0x001F0000 + orr \rx, \rx, #0x00001000 + .endm + + .macro senduart,rd,rx + strb \rd, [\rx, #UART01x_DR] + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full + bne 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy + bne 1001b + .endm + +#elif defined(CONFIG_ARCH_IMX) + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x00000000 @ physical + movne \rx, #0xe0000000 @ virtual + orr \rx, \rx, #0x00200000 + orr \rx, \rx, #0x00006000 @ UART1 offset + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0x40] @ TXDATA + .endm + + .macro waituart,rd,rx + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #0x98] @ SR2 + tst \rd, #1 << 3 @ TXDC + beq 1002b @ wait until transmit done + .endm + +#elif defined(CONFIG_ARCH_H720X) + + .equ io_virt, IO_BASE + .equ io_phys, IO_START + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #io_phys @ physical base address + movne \rx, #io_virt @ virtual address + add \rx, \rx, #0x00020000 @ UART1 + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #0x0] @ UARTDR + + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full + bne 1001b + .endm + + .macro busyuart,rd,rx +1001: ldr \rd, [\rx, #0x18] @ UARTFLG + tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy + bne 1001b + .endm #else -#include +#error Unknown architecture #endif /* diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 3dc15b131..3f6b4b529 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c @@ -85,21 +85,27 @@ static struct expcard_blacklist __initdata blacklist[] = { }; asmlinkage extern int -ecard_loader_reset(unsigned long base, loader_t loader); +ecard_loader_reset(volatile unsigned char *pa, loader_t loader); asmlinkage extern int -ecard_loader_read(int off, unsigned long base, loader_t loader); +ecard_loader_read(int off, volatile unsigned char *pa, loader_t loader); -static inline unsigned short ecard_getu16(unsigned char *v) +static const struct ecard_id * +ecard_match_device(const struct ecard_id *ids, struct expansion_card *ec); + +static inline unsigned short +ecard_getu16(unsigned char *v) { return v[0] | v[1] << 8; } -static inline signed long ecard_gets24(unsigned char *v) +static inline signed long +ecard_gets24(unsigned char *v) { return v[0] | v[1] << 8 | v[2] << 16 | ((v[2] & 0x80) ? 0xff000000 : 0); } -static inline ecard_t *slot_to_ecard(unsigned int slot) +static inline ecard_t * +slot_to_ecard(unsigned int slot) { return slot < MAX_ECARDS ? slot_to_expcard[slot] : NULL; } @@ -116,31 +122,26 @@ static inline ecard_t *slot_to_ecard(unsigned int slot) * From a security standpoint, we trust the card vendors. This * may be a misplaced trust. */ +#define BUS_ADDR(x) ((((unsigned long)(x)) << 2) + IO_BASE) +#define POD_INT_ADDR(x) ((volatile unsigned char *)\ + ((BUS_ADDR((x)) - IO_BASE) + IO_START)) + static void ecard_task_reset(struct ecard_request *req) { struct expansion_card *ec = req->ec; - struct resource *res; - - res = ec->slot_no == 8 - ? &ec->resource[ECARD_RES_MEMC] - : ec->type == ECARD_EASI - ? &ec->resource[ECARD_RES_EASI] - : &ec->resource[ECARD_RES_IOCSYNC]; - - ecard_loader_reset(res->start, ec->loader); + if (ec->loader) + ecard_loader_reset(POD_INT_ADDR(ec->podaddr), ec->loader); } static void ecard_task_readbytes(struct ecard_request *req) { - struct expansion_card *ec = req->ec; - unsigned char *buf = req->buffer; + unsigned char *buf = (unsigned char *)req->buffer; + volatile unsigned char *base_addr = + (volatile unsigned char *)POD_INT_ADDR(req->ec->podaddr); unsigned int len = req->length; unsigned int off = req->address; - if (ec->slot_no == 8) { - void __iomem *base = (void __iomem *) - ec->resource[ECARD_RES_MEMC].start; - + if (req->ec->slot_no == 8) { /* * The card maintains an index which increments the address * into a 4096-byte page on each access. We need to keep @@ -160,7 +161,7 @@ static void ecard_task_readbytes(struct ecard_request *req) * greater than the offset, reset the hardware index counter. */ if (off == 0 || index > off) { - writeb(0, base); + *base_addr = 0; index = 0; } @@ -169,24 +170,21 @@ static void ecard_task_readbytes(struct ecard_request *req) * required offset. The read bytes are discarded. */ while (index < off) { - readb(base + page); + unsigned char byte; + byte = base_addr[page]; index += 1; } while (len--) { - *buf++ = readb(base + page); + *buf++ = base_addr[page]; index += 1; } } else { - unsigned long base = (ec->type == ECARD_EASI - ? &ec->resource[ECARD_RES_EASI] - : &ec->resource[ECARD_RES_IOCSYNC])->start; - void __iomem *pbase = (void __iomem *)base; - if (!req->use_loader || !ec->loader) { + if (!req->use_loader || !req->ec->loader) { off *= 4; while (len--) { - *buf++ = readb(pbase + off); + *buf++ = base_addr[off]; off += 4; } } else { @@ -196,8 +194,8 @@ static void ecard_task_readbytes(struct ecard_request *req) * expansion card loader programs. */ *(unsigned long *)0x108 = 0; - *buf++ = ecard_loader_read(off++, base, - ec->loader); + *buf++ = ecard_loader_read(off++, base_addr, + req->ec->loader); } } } @@ -228,7 +226,7 @@ static void ecard_init_pgtables(struct mm_struct *mm) */ pgd_t *src_pgd, *dst_pgd; - src_pgd = pgd_offset(mm, (unsigned long)IO_BASE); + src_pgd = pgd_offset(mm, IO_BASE); dst_pgd = pgd_offset(mm, IO_START); memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE)); @@ -408,7 +406,7 @@ static void ecard_def_irq_disable(ecard_t *ec, int irqnr) static int ecard_def_irq_pending(ecard_t *ec) { - return !ec->irqmask || readb(ec->irqaddr) & ec->irqmask; + return !ec->irqmask || ec->irqaddr[0] & ec->irqmask; } static void ecard_def_fiq_enable(ecard_t *ec, int fiqnr) @@ -423,7 +421,7 @@ static void ecard_def_fiq_disable(ecard_t *ec, int fiqnr) static int ecard_def_fiq_pending(ecard_t *ec) { - return !ec->fiqmask || readb(ec->fiqaddr) & ec->fiqmask; + return !ec->fiqmask || ec->fiqaddr[0] & ec->fiqmask; } static expansioncard_ops_t ecard_default_ops = { @@ -524,7 +522,7 @@ static void ecard_dump_irq_state(void) ec->ops->irqpending(ec) ? "" : "not "); else printk("irqaddr %p, mask = %02X, status = %02X\n", - ec->irqaddr, ec->irqmask, readb(ec->irqaddr)); + ec->irqaddr, ec->irqmask, *ec->irqaddr); } } @@ -677,7 +675,7 @@ static int __init ecard_probeirqhw(void) #define IO_EC_MEMC8_BASE 0 #endif -unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) +unsigned int ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) { unsigned long address = 0; int slot = ec->slot_no; @@ -781,89 +779,55 @@ static void ecard_proc_init(void) get_ecard_dev_info); } -#define ec_set_resource(ec,nr,st,sz) \ +#define ec_set_resource(ec,nr,st,sz,flg) \ do { \ (ec)->resource[nr].name = ec->dev.bus_id; \ (ec)->resource[nr].start = st; \ (ec)->resource[nr].end = (st) + (sz) - 1; \ - (ec)->resource[nr].flags = IORESOURCE_MEM; \ + (ec)->resource[nr].flags = flg; \ } while (0) -static void __init ecard_free_card(struct expansion_card *ec) -{ - int i; - - for (i = 0; i < ECARD_NUM_RESOURCES; i++) - if (ec->resource[i].flags) - release_resource(&ec->resource[i]); - - kfree(ec); -} - -static struct expansion_card *__init ecard_alloc_card(int type, int slot) +static void __init ecard_init_resources(struct expansion_card *ec) { - struct expansion_card *ec; - unsigned long base; + unsigned long base = PODSLOT_IOC4_BASE; + unsigned int slot = ec->slot_no; int i; - ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); - if (!ec) { - ec = ERR_PTR(-ENOMEM); - goto nomem; - } - - memset(ec, 0, sizeof(ecard_t)); - - ec->slot_no = slot; - ec->type = type; - ec->irq = NO_IRQ; - ec->fiq = NO_IRQ; - ec->dma = NO_DMA; - ec->ops = &ecard_default_ops; - - snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); - ec->dev.parent = NULL; - ec->dev.bus = &ecard_bus_type; - ec->dev.dma_mask = &ec->dma_mask; - ec->dma_mask = (u64)0xffffffff; - if (slot < 4) { ec_set_resource(ec, ECARD_RES_MEMC, PODSLOT_MEMC_BASE + (slot << 14), - PODSLOT_MEMC_SIZE); - base = PODSLOT_IOC0_BASE + (slot << 14); - } else - base = PODSLOT_IOC4_BASE + ((slot - 4) << 14); + PODSLOT_MEMC_SIZE, IORESOURCE_MEM); + base = PODSLOT_IOC0_BASE; + } #ifdef CONFIG_ARCH_RPC if (slot < 8) { ec_set_resource(ec, ECARD_RES_EASI, PODSLOT_EASI_BASE + (slot << 24), - PODSLOT_EASI_SIZE); + PODSLOT_EASI_SIZE, IORESOURCE_MEM); } if (slot == 8) { - ec_set_resource(ec, ECARD_RES_MEMC, NETSLOT_BASE, NETSLOT_SIZE); + ec_set_resource(ec, ECARD_RES_MEMC, NETSLOT_BASE, + NETSLOT_SIZE, IORESOURCE_MEM); } else #endif - for (i = 0; i <= ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) + for (i = 0; i <= ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) { ec_set_resource(ec, i + ECARD_RES_IOCSLOW, - base + (i << 19), PODSLOT_IOC_SIZE); + base + (slot << 14) + (i << 19), + PODSLOT_IOC_SIZE, IORESOURCE_MEM); + } for (i = 0; i < ECARD_NUM_RESOURCES; i++) { - if (ec->resource[i].flags && + if (ec->resource[i].start && request_resource(&iomem_resource, &ec->resource[i])) { printk(KERN_ERR "%s: resource(s) not available\n", ec->dev.bus_id); ec->resource[i].end -= ec->resource[i].start; ec->resource[i].start = 0; - ec->resource[i].flags = 0; } } - - nomem: - return ec; } static ssize_t ecard_show_irq(struct device *dev, char *buf) @@ -872,12 +836,16 @@ static ssize_t ecard_show_irq(struct device *dev, char *buf) return sprintf(buf, "%u\n", ec->irq); } +static DEVICE_ATTR(irq, S_IRUGO, ecard_show_irq, NULL); + static ssize_t ecard_show_dma(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->dma); } +static DEVICE_ATTR(dma, S_IRUGO, ecard_show_dma, NULL); + static ssize_t ecard_show_resources(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); @@ -893,33 +861,23 @@ static ssize_t ecard_show_resources(struct device *dev, char *buf) return str - buf; } +static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL); + static ssize_t ecard_show_vendor(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->cid.manufacturer); } +static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL); + static ssize_t ecard_show_device(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->cid.product); } -static ssize_t ecard_show_type(struct device *dev, char *buf) -{ - struct expansion_card *ec = ECARD_DEV(dev); - return sprintf(buf, "%s\n", ec->type == ECARD_EASI ? "EASI" : "IOC"); -} - -static struct device_attribute ecard_dev_attrs[] = { - __ATTR(device, S_IRUGO, ecard_show_device, NULL), - __ATTR(dma, S_IRUGO, ecard_show_dma, NULL), - __ATTR(irq, S_IRUGO, ecard_show_irq, NULL), - __ATTR(resource, S_IRUGO, ecard_show_resources, NULL), - __ATTR(type, S_IRUGO, ecard_show_type, NULL), - __ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL), - __ATTR_NULL, -}; +static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL); int ecard_request_resources(struct expansion_card *ec) @@ -969,13 +927,21 @@ ecard_probe(int slot, card_type_t type) ecard_t **ecp; ecard_t *ec; struct ex_ecid cid; - int i, rc; + int i, rc = -ENOMEM; - ec = ecard_alloc_card(type, slot); - if (IS_ERR(ec)) { - rc = PTR_ERR(ec); + ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); + if (!ec) goto nomem; - } + + memset(ec, 0, sizeof(ecard_t)); + + ec->slot_no = slot; + ec->type = type; + ec->irq = NO_IRQ; + ec->fiq = NO_IRQ; + ec->dma = NO_DMA; + ec->card_desc = NULL; + ec->ops = &ecard_default_ops; rc = -ENODEV; if ((ec->podaddr = ecard_address(ec, type, ECARD_SYNC)) == 0) @@ -998,7 +964,7 @@ ecard_probe(int slot, card_type_t type) ec->cid.fiqmask = cid.r_fiqmask; ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); ec->fiqaddr = - ec->irqaddr = (void __iomem *)ioaddr(ec->podaddr); + ec->irqaddr = (unsigned char *)ioaddr(ec->podaddr); if (ec->cid.is) { ec->irqmask = ec->cid.irqmask; @@ -1017,6 +983,14 @@ ecard_probe(int slot, card_type_t type) break; } + snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); + ec->dev.parent = NULL; + ec->dev.bus = &ecard_bus_type; + ec->dev.dma_mask = &ec->dma_mask; + ec->dma_mask = (u64)0xffffffff; + + ecard_init_resources(ec); + /* * hook the interrupt handlers */ @@ -1043,12 +1017,17 @@ ecard_probe(int slot, card_type_t type) slot_to_expcard[slot] = ec; device_register(&ec->dev); + device_create_file(&ec->dev, &dev_attr_dma); + device_create_file(&ec->dev, &dev_attr_irq); + device_create_file(&ec->dev, &dev_attr_resource); + device_create_file(&ec->dev, &dev_attr_vendor); + device_create_file(&ec->dev, &dev_attr_device); return 0; - nodev: - ecard_free_card(ec); - nomem: +nodev: + kfree(ec); +nomem: return rc; } @@ -1149,15 +1128,9 @@ static void ecard_drv_shutdown(struct device *dev) if (drv->shutdown) drv->shutdown(ec); ecard_release(ec); - - /* - * If this card has a loader, call the reset handler. - */ - if (ec->loader) { - req.fn = ecard_task_reset; - req.ec = ec; - ecard_call(&req); - } + req.fn = ecard_task_reset; + req.ec = ec; + ecard_call(&req); } int ecard_register_driver(struct ecard_driver *drv) @@ -1191,9 +1164,8 @@ static int ecard_match(struct device *_dev, struct device_driver *_drv) } struct bus_type ecard_bus_type = { - .name = "ecard", - .dev_attrs = ecard_dev_attrs, - .match = ecard_match, + .name = "ecard", + .match = ecard_match, }; static int ecard_bus_init(void) @@ -1204,7 +1176,7 @@ static int ecard_bus_init(void) postcore_initcall(ecard_bus_init); EXPORT_SYMBOL(ecard_readchunk); -EXPORT_SYMBOL(__ecard_address); +EXPORT_SYMBOL(ecard_address); EXPORT_SYMBOL(ecard_register_driver); EXPORT_SYMBOL(ecard_remove_driver); EXPORT_SYMBOL(ecard_bus_type); diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index e14278d59..44cd34784 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -14,383 +14,1282 @@ * it to save wrong values... Be aware! */ #include +#include +#include #include +#include #include -#include /* should be moved into entry-macro.S */ -#include /* should be moved into entry-macro.S */ -#include #include "entry-header.S" +#ifdef IOC_BASE +/* IOC / IOMD based hardware */ +#include + + .equ ioc_base_high, IOC_BASE & 0xff000000 + .equ ioc_base_low, IOC_BASE & 0x00ff0000 + .macro disable_fiq + mov r12, #ioc_base_high + .if ioc_base_low + orr r12, r12, #ioc_base_low + .endif + strb r12, [r12, #0x38] @ Disable FIQ register + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov r4, #ioc_base_high @ point at IOC + .if ioc_base_low + orr r4, r4, #ioc_base_low + .endif + ldrb \irqstat, [r4, #IOMD_IRQREQB] @ get high priority first + ldr \base, =irq_prio_h + teq \irqstat, #0 +#ifdef IOMD_BASE + ldreqb \irqstat, [r4, #IOMD_DMAREQ] @ get dma + addeq \base, \base, #256 @ irq_prio_h table size + teqeq \irqstat, #0 + bne 2406f +#endif + ldreqb \irqstat, [r4, #IOMD_IRQREQA] @ get low priority + addeq \base, \base, #256 @ irq_prio_d table size + teqeq \irqstat, #0 +#ifdef IOMD_IRQREQC + ldreqb \irqstat, [r4, #IOMD_IRQREQC] + addeq \base, \base, #256 @ irq_prio_l table size + teqeq \irqstat, #0 +#endif +#ifdef IOMD_IRQREQD + ldreqb \irqstat, [r4, #IOMD_IRQREQD] + addeq \base, \base, #256 @ irq_prio_lc table size + teqeq \irqstat, #0 +#endif +2406: ldrneb \irqnr, [\base, \irqstat] @ get IRQ number + .endm + +/* + * Interrupt table (incorporates priority). Please note that we + * rely on the order of these tables (see above code). + */ + .macro irq_prio_table +irq_prio_h: .byte 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 + .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10 +#ifdef IOMD_BASE +irq_prio_d: .byte 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 + .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16 +#endif +irq_prio_l: .byte 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 + .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 +#ifdef IOMD_IRQREQC +irq_prio_lc: .byte 24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27 + .byte 28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27 + .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 + .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 + .byte 30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27 + .byte 30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27 + .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 + .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 + .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31 +#endif +#ifdef IOMD_IRQREQD +irq_prio_ld: .byte 40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43 + .byte 44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43 + .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45 + .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45 + .byte 46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43 + .byte 46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43 + .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45 + .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 + .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47 +#endif + .endm + +#elif defined(CONFIG_ARCH_EBSA110) + +#define IRQ_STAT 0xff000000 /* read */ + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, stat, base, tmp + mov \base, #IRQ_STAT + ldrb \stat, [\base] @ get interrupts + mov \irqnr, #0 + tst \stat, #15 + addeq \irqnr, \irqnr, #4 + moveq \stat, \stat, lsr #4 + tst \stat, #3 + addeq \irqnr, \irqnr, #2 + moveq \stat, \stat, lsr #2 + tst \stat, #1 + addeq \irqnr, \irqnr, #1 + moveq \stat, \stat, lsr #1 + tst \stat, #1 @ bit 0 should be set + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_SHARK) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov r4, #0xe0000000 + + mov \irqstat, #0x0C + strb \irqstat, [r4, #0x20] @outb(0x0C, 0x20) /* Poll command */ + ldrb \irqnr, [r4, #0x20] @irq = inb(0x20) & 7 + and \irqstat, \irqnr, #0x80 + teq \irqstat, #0 + beq 43f + and \irqnr, \irqnr, #7 + teq \irqnr, #2 + bne 44f +43: mov \irqstat, #0x0C + strb \irqstat, [r4, #0xa0] @outb(0x0C, 0xA0) /* Poll command */ + ldrb \irqnr, [r4, #0xa0] @irq = (inb(0xA0) & 7) + 8 + and \irqstat, \irqnr, #0x80 + teq \irqstat, #0 + beq 44f + and \irqnr, \irqnr, #7 + add \irqnr, \irqnr, #8 +44: teq \irqstat, #0 + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_FOOTBRIDGE) +#include + + .macro disable_fiq + .endm + + .equ dc21285_high, ARMCSR_BASE & 0xff000000 + .equ dc21285_low, ARMCSR_BASE & 0x00ffffff + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov r4, #dc21285_high + .if dc21285_low + orr r4, r4, #dc21285_low + .endif + ldr \irqstat, [r4, #0x180] @ get interrupts + + mov \irqnr, #IRQ_SDRAMPARITY + tst \irqstat, #IRQ_MASK_SDRAMPARITY + bne 1001f + + tst \irqstat, #IRQ_MASK_UART_RX + movne \irqnr, #IRQ_CONRX + bne 1001f + + tst \irqstat, #IRQ_MASK_DMA1 + movne \irqnr, #IRQ_DMA1 + bne 1001f + + tst \irqstat, #IRQ_MASK_DMA2 + movne \irqnr, #IRQ_DMA2 + bne 1001f + + tst \irqstat, #IRQ_MASK_IN0 + movne \irqnr, #IRQ_IN0 + bne 1001f + + tst \irqstat, #IRQ_MASK_IN1 + movne \irqnr, #IRQ_IN1 + bne 1001f + + tst \irqstat, #IRQ_MASK_IN2 + movne \irqnr, #IRQ_IN2 + bne 1001f + + tst \irqstat, #IRQ_MASK_IN3 + movne \irqnr, #IRQ_IN3 + bne 1001f + + tst \irqstat, #IRQ_MASK_PCI + movne \irqnr, #IRQ_PCI + bne 1001f + + tst \irqstat, #IRQ_MASK_DOORBELLHOST + movne \irqnr, #IRQ_DOORBELLHOST + bne 1001f + + tst \irqstat, #IRQ_MASK_I2OINPOST + movne \irqnr, #IRQ_I2OINPOST + bne 1001f + + tst \irqstat, #IRQ_MASK_TIMER1 + movne \irqnr, #IRQ_TIMER1 + bne 1001f + + tst \irqstat, #IRQ_MASK_TIMER2 + movne \irqnr, #IRQ_TIMER2 + bne 1001f + + tst \irqstat, #IRQ_MASK_TIMER3 + movne \irqnr, #IRQ_TIMER3 + bne 1001f + + tst \irqstat, #IRQ_MASK_UART_TX + movne \irqnr, #IRQ_CONTX + bne 1001f + + tst \irqstat, #IRQ_MASK_PCI_ABORT + movne \irqnr, #IRQ_PCI_ABORT + bne 1001f + + tst \irqstat, #IRQ_MASK_PCI_SERR + movne \irqnr, #IRQ_PCI_SERR + bne 1001f + + tst \irqstat, #IRQ_MASK_DISCARD_TIMER + movne \irqnr, #IRQ_DISCARD_TIMER + bne 1001f + + tst \irqstat, #IRQ_MASK_PCI_DPERR + movne \irqnr, #IRQ_PCI_DPERR + bne 1001f + + tst \irqstat, #IRQ_MASK_PCI_PERR + movne \irqnr, #IRQ_PCI_PERR +1001: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_NEXUSPCI) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqstat, =INTCONT_BASE + ldr \base, =soft_irq_mask + ldr \irqstat, [\irqstat] @ get interrupts + ldr \base, [\base] + mov \irqnr, #0 + and \irqstat, \irqstat, \base @ mask out disabled ones +1001: tst \irqstat, #1 + addeq \irqnr, \irqnr, #1 + moveq \irqstat, \irqstat, lsr #1 + tsteq \irqnr, #32 + beq 1001b + teq \irqnr, #32 + .endm + + .macro irq_prio_table + .ltorg + .bss +ENTRY(soft_irq_mask) + .word 0 + .text + .endm + +#elif defined(CONFIG_ARCH_TBOX) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqstat, =0xffff7000 + ldr \irqstat, [\irqstat] @ get interrupts + ldr \base, =soft_irq_mask + ldr \base, [\base] + mov \irqnr, #0 + and \irqstat, \irqstat, \base @ mask out disabled ones +1001: tst \irqstat, #1 + addeq \irqnr, \irqnr, #1 + moveq \irqstat, \irqstat, lsr #1 + tsteq \irqnr, #32 + beq 1001b + teq \irqnr, #32 + .endm + + .macro irq_prio_table + .ltorg + .bss +ENTRY(soft_irq_mask) + .word 0 + .text + .endm + +#elif defined(CONFIG_ARCH_SA1100) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov r4, #0xfa000000 @ ICIP = 0xfa050000 + add r4, r4, #0x00050000 + ldr \irqstat, [r4] @ get irqs + ldr \irqnr, [r4, #4] @ ICMR = 0xfa050004 + ands \irqstat, \irqstat, \irqnr + mov \irqnr, #0 + beq 1001f + tst \irqstat, #0xff + moveq \irqstat, \irqstat, lsr #8 + addeq \irqnr, \irqnr, #8 + tsteq \irqstat, #0xff + moveq \irqstat, \irqstat, lsr #8 + addeq \irqnr, \irqnr, #8 + tsteq \irqstat, #0xff + moveq \irqstat, \irqstat, lsr #8 + addeq \irqnr, \irqnr, #8 + tst \irqstat, #0x0f + moveq \irqstat, \irqstat, lsr #4 + addeq \irqnr, \irqnr, #4 + tst \irqstat, #0x03 + moveq \irqstat, \irqstat, lsr #2 + addeq \irqnr, \irqnr, #2 + tst \irqstat, #0x01 + addeqs \irqnr, \irqnr, #1 +1001: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_L7200) +#include + + .equ irq_base_addr, IO_BASE_2 + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov \irqstat, #irq_base_addr @ Virt addr IRQ regs + add \irqstat, \irqstat, #0x00001000 @ Status reg + ldr \irqstat, [\irqstat, #0] @ get interrupts + mov \irqnr, #0 +1001: tst \irqstat, #1 + addeq \irqnr, \irqnr, #1 + moveq \irqstat, \irqstat, lsr #1 + tsteq \irqnr, #32 + beq 1001b + teq \irqnr, #32 + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_INTEGRATOR) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp +/* FIXME: should not be using soo many LDRs here */ + ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) + mov \irqnr, #IRQ_PIC_START + ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status + ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE) + teq \irqstat, #0 + ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)] + moveq \irqnr, #IRQ_CIC_START + +1001: tst \irqstat, #15 + bne 1002f + add \irqnr, \irqnr, #4 + movs \irqstat, \irqstat, lsr #4 + bne 1001b +1002: tst \irqstat, #1 + bne 1003f + add \irqnr, \irqnr, #1 + movs \irqstat, \irqstat, lsr #1 + bne 1002b +1003: /* EQ will be set if no irqs pending */ + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_VERSATILE) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) + ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status + mov \irqnr, #0 + teq \irqstat, #0 + beq 1003f + +1001: tst \irqstat, #15 + bne 1002f + add \irqnr, \irqnr, #4 + movs \irqstat, \irqstat, lsr #4 + bne 1001b +1002: tst \irqstat, #1 + bne 1003f + add \irqnr, \irqnr, #1 + movs \irqstat, \irqstat, lsr #1 + bne 1002b +1003: /* EQ will be set if no irqs pending */ + +@ clz \irqnr, \irqstat +@1003: /* EQ will be set if we reach MAXIRQNUM */ + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_CLPS711X) + +#include + + .macro disable_fiq + .endm + +#if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) +#error INTSR stride != INTMR stride +#endif + + .macro get_irqnr_and_base, irqnr, stat, base, mask + mov \base, #CLPS7111_BASE + ldr \stat, [\base, #INTSR1] + ldr \mask, [\base, #INTMR1] + mov \irqnr, #4 + mov \mask, \mask, lsl #16 + and \stat, \stat, \mask, lsr #16 + movs \stat, \stat, lsr #4 + bne 1001f + + add \base, \base, #INTSR2 - INTSR1 + ldr \stat, [\base, #INTSR1] + ldr \mask, [\base, #INTMR1] + mov \irqnr, #16 + mov \mask, \mask, lsl #16 + and \stat, \stat, \mask, lsr #16 + +1001: tst \stat, #255 + addeq \irqnr, \irqnr, #8 + moveq \stat, \stat, lsr #8 + tst \stat, #15 + addeq \irqnr, \irqnr, #4 + moveq \stat, \stat, lsr #4 + tst \stat, #3 + addeq \irqnr, \irqnr, #2 + moveq \stat, \stat, lsr #2 + tst \stat, #1 + addeq \irqnr, \irqnr, #1 + moveq \stat, \stat, lsr #1 + tst \stat, #1 @ bit 0 should be set + .endm + + .macro irq_prio_table + .endm + +#elif defined (CONFIG_ARCH_CAMELOT) +#include +#undef IRQ_MODE /* same name defined in asm/proc/ptrace.h */ +#include + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + + ldr \irqstat, =INT_ID(IO_ADDRESS(EXC_INT_CTRL00_BASE)) + ldr \irqnr,[\irqstat] + cmp \irqnr,#0 + subne \irqnr,\irqnr,#1 + + + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_IOP321) + .macro disable_fiq + .endm + + /* + * Note: only deal with normal interrupts, not FIQ + */ + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov \irqnr, #0 + mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC + cmp \irqstat, #0 + beq 1001f + clz \irqnr, \irqstat + mov \base, #31 + subs \irqnr,\base,\irqnr + add \irqnr,\irqnr,#IRQ_IOP321_DMA0_EOT +1001: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_IOP331) + .macro disable_fiq + .endm + + /* + * Note: only deal with normal interrupts, not FIQ + */ + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov \irqnr, #0 + mrc p6, 0, \irqstat, c4, c0, 0 @ Read IINTSRC0 + cmp \irqstat, #0 + bne 1002f + mrc p6, 0, \irqstat, c5, c0, 0 @ Read IINTSRC1 + cmp \irqstat, #0 + beq 1001f + clz \irqnr, \irqstat +/* + * mov \base, #31 + * subs \irqnr,\base,\irqnr + */ + rsbs \irqnr,\irqnr,#31 @ recommend by RMK + add \irqnr,\irqnr,#IRQ_IOP331_XINT8 + b 1001f +1002: clz \irqnr, \irqstat + mov \base, #31 + subs \irqnr,\base,\irqnr + add \irqnr,\irqnr,#IRQ_IOP331_DMA0_EOT +1001: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_PXA) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp +#ifdef CONFIG_PXA27x + mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP + mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR +#else + mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000 + add \base, \base, #0x00d00000 + ldr \irqstat, [\base, #0] @ ICIP + ldr \irqnr, [\base, #4] @ ICMR +#endif + ands \irqnr, \irqstat, \irqnr + beq 1001f + rsb \irqstat, \irqnr, #0 + and \irqstat, \irqstat, \irqnr + clz \irqnr, \irqstat + rsb \irqnr, \irqnr, #(31 - PXA_IRQ_SKIP) +1001: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_IXP2000) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + + mov \irqnr, #0x0 @clear out irqnr as default + mov \base, #0xfe000000 + orr \base, \base, #0x00ff0000 + orr \base, \base, #0x0000a000 + orr \base, \base, #0x08 + ldr \irqstat, [\base] @ get interrupts + mov \tmp, #IXP2000_VALID_IRQ_MASK & 0xff000000 + orr \tmp, \tmp, #IXP2000_VALID_IRQ_MASK & 0x00ff0000 + orr \tmp, \tmp, #IXP2000_VALID_IRQ_MASK & 0x0000ff00 + orr \tmp, \tmp, #IXP2000_VALID_IRQ_MASK & 0x000000ff + and \irqstat, \irqstat, \tmp + + cmp \irqstat, #0 + beq 1001f + + clz \irqnr, \irqstat + mov \base, #31 + subs \irqnr, \base, \irqnr + + /* + * We handle PCIA and PCIB here so we don't have an + * extra layer of code just to check these two bits. + */ + cmp \irqnr, #IRQ_IXP2000_PCI + bne 1001f + + mov \base, #0xfe000000 + orr \base, \base, #0x00fd0000 + orr \base, \base, #0x0000e100 + orr \base, \base, #0x00000058 + ldr \irqstat, [\base] + + mov \tmp, #(1<<26) + tst \irqstat, \tmp + movne \irqnr, #IRQ_IXP2000_PCIA + bne 1001f + + mov \tmp, #(1<<27) + tst \irqstat, \tmp + movne \irqnr, #IRQ_IXP2000_PCIB + +1001: + .endm + + .macro irq_prio_table + .endm + +#elif defined (CONFIG_ARCH_IXP4XX) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) + ldr \irqstat, [\irqstat] @ get interrupts + cmp \irqstat, #0 + beq 1002f + clz \irqnr, \irqstat + mov \base, #31 + subs \irqnr, \base, \irqnr + +/* +1001: tst \irqstat, #1 + addeq \irqnr, \irqnr, #1 + moveq \irqstat, \irqstat, lsr #1 + tsteq \irqnr, #32 + beq 1001b + teq \irqnr, #32 +*/ +1002: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_OMAP) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) + ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] + ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] + mov \irqstat, #0xffffffff + bic \tmp, \irqstat, \tmp + tst \irqnr, \tmp + beq 1510f + + ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] + cmp \irqnr, #0 + ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] + cmpeq \irqnr, #INT_IH2_IRQ + ldreq \base, =IO_ADDRESS(OMAP_IH2_BASE) + ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] + addeqs \irqnr, \irqnr, #32 +1510: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_S3C2410) + /* S3C2410X IRQ Handler, */ + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + +30000: + mov \tmp, #S3C2410_VA_IRQ + ldr \irqnr, [ \tmp, #0x14 ] @ get irq no + teq \irqnr, #4 + teqne \irqnr, #5 + beq 1002f @ external irq reg + teq \irqnr, #16 + beq 1003f @ lcd controller + + @ debug check to see if interrupt reported is the same + @ as the offset.... + + teq \irqnr, #0 + beq 20002f + ldr \irqstat, [ \tmp, #0x10 ] @ INTPND + mov \irqstat, \irqstat, lsr \irqnr + tst \irqstat, #1 + bne 20002f + +#if 1 + stmfd r13!, { r0 - r4 , r14 } + ldr r1, [ \tmp, #0x14 ] @ intoffset + ldr r2, [ \tmp, #0x10 ] @ INTPND + ldr r3, [ \tmp, #0x00 ] @ SRCPND + adr r0, 20003f + bl printk + b 20004f +#endif +20003: + .ascii "<7>irq: err - bad offset %d, intpnd=%08x, srcpnd=%08x\n" + .byte 0 + .align 4 +20004: + mov r1, #1 + mov \tmp, #S3C2410_VA_IRQ + ldmfd r13!, { r0 - r4 , r14 } + + @ try working out interript number for ourselves + mov \irqnr, #0 + ldr \irqstat, [ \tmp, #0x10 ] @ INTPND +10021: + movs \irqstat, \irqstat, lsr#1 + bcs 30000b @ try and re-start the proccess + add \irqnr, \irqnr, #1 + cmp \irqnr, #32 + ble 10021b + + @ found no interrupt, set Z flag and leave + movs \irqnr, #0 + b 1001f + +20005: +20002: @ exit + @ we base the s3c2410x interrupts at 16 and above to allow + @ isa peripherals to have their standard interrupts, also + @ ensure that Z flag is un-set on exit + + @ note, we cannot be sure if we get IRQ_EINT0 (0) that + @ there is simply no interrupt pending, so in all other + @ cases we jump to say we have found something, otherwise + @ we check to see if the interrupt really is assrted + adds \irqnr, \irqnr, #IRQ_EINT0 + teq \irqnr, #IRQ_EINT0 + bne 1001f @ exit + ldr \irqstat, [ \tmp, #0x10 ] @ INTPND + teq \irqstat, #0 + moveq \irqnr, #0 + b 1001f + + @ we get here from no main or external interrupts pending +1002: + add \tmp, \tmp, #S3C2410_VA_GPIO - S3C2410_VA_IRQ + ldr \irqstat, [ \tmp, # 0xa8 ] @ EXTINTPEND + ldr \irqnr, [ \tmp, # 0xa4 ] @ EXTINTMASK + + bic \irqstat, \irqstat, \irqnr @ clear masked irqs + + mov \irqnr, #IRQ_EINT4 @ start extint nos + mov \irqstat, \irqstat, lsr#4 @ ignore bottom 4 bits +10021: + movs \irqstat, \irqstat, lsr#1 + bcs 1004f + add \irqnr, \irqnr, #1 + cmp \irqnr, #IRQ_EINT23 + ble 10021b + + @ found no interrupt, set Z flag and leave + movs \irqnr, #0 + b 1001f + +1003: + @ lcd interrupt has been asserted... + add \tmp, \tmp, #S3C2410_VA_LCD - S3C2410_VA_IRQ + ldr \irqstat, [ \tmp, # 0x54 ] @ lcd int pending + + tst \irqstat, #2 + movne \irqnr, #IRQ_LCD_FRAME + tst \irqstat, #1 + movne \irqnr, #IRQ_LCD_FIFO + + @ fall through to exit with flags updated + +1004: @ ensure Z flag clear in case our MOVS shifted out the last bit + teq \irqnr, #0 +1001: + @ exit irq routine + .endm + + + /* currently don't need an disable_fiq macro */ + + .macro disable_fiq + .endm + + /* we don't have an irq priority table */ + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_LH7A400) + +# if defined (CONFIG_ARCH_LH7A404) +# error "LH7A400 and LH7A404 are mutually exclusive" +# endif + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov \irqnr, #0 + mov \base, #io_p2v(0x80000000) @ APB registers + ldr \irqstat, [\base, #0x500] @ PIC INTSR + +1001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry + bcs 1008f @ Bit set; irq found + add \irqnr, \irqnr, #1 + bne 1001b @ Until no bits + b 1009f @ Nothing? Hmm. +1008: movs \irqstat, #1 @ Force !Z +1009: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_LH7A404) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + mov \irqnr, #0 @ VIC1 irq base + mov \base, #io_p2v(0x80000000) @ APB registers + add \base, \base, #0x8000 + ldr \tmp, [\base, #0x0030] @ VIC1_VECTADDR + tst \tmp, #VA_VECTORED @ Direct vectored + bne 1002f + tst \tmp, #VA_VIC1DEFAULT @ Default vectored VIC1 + ldrne \irqstat, [\base, #0] @ VIC1_IRQSTATUS + bne 1001f + add \base, \base, #(0xa000 - 0x8000) + ldr \tmp, [\base, #0x0030] @ VIC2_VECTADDR + tst \tmp, #VA_VECTORED @ Direct vectored + bne 1002f + ldr \irqstat, [\base, #0] @ VIC2_IRQSTATUS + mov \irqnr, #32 @ VIC2 irq base + +1001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry + bcs 1008f @ Bit set; irq found + add \irqnr, \irqnr, #1 + bne 1001b @ Until no bits + b 1009f @ Nothing? Hmm. +1002: and \irqnr, \tmp, #0x3f @ Mask for valid bits +1008: movs \irqstat, #1 @ Force !Z + str \tmp, [\base, #0x0030] @ Clear vector +1009: + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_IMX) + + .macro disable_fiq + .endm +#define AITC_NIVECSR 0x40 + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqstat, =IO_ADDRESS(IMX_AITC_BASE) + @ Load offset & priority of the highest priority + @ interrupt pending. + ldr \irqnr, [\irqstat, #AITC_NIVECSR] + @ Shift off the priority leaving the offset or + @ "interrupt number" + mov \irqnr, \irqnr, lsr #16 + ldr \irqstat, =1 @ dummy compare + ldr \base, =0xFFFF // invalid interrupt + cmp \irqnr, \base + bne 1001f + ldr \irqstat, =0 +1001: + tst \irqstat, #1 @ to make the condition code = TRUE + .endm + + .macro irq_prio_table + .endm + +#elif defined(CONFIG_ARCH_H720X) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp +#if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202) + @ we could use the id register on H7202, but this is not + @ properly updated when we come back from asm_do_irq + @ without a previous return from interrupt + @ (see loops below in irq_svc, irq_usr) + @ We see unmasked pending ints only, as the masked pending ints + @ are not visible here + + mov \base, #0xf0000000 @ base register + orr \base, \base, #0x24000 @ irqbase + ldr \irqstat, [\base, #0x04] @ get interrupt status +#if defined (CONFIG_CPU_H7201) + ldr \tmp, =0x001fffff +#else + mvn \tmp, #0xc0000000 +#endif + and \irqstat, \irqstat, \tmp @ mask out unused ints + mov \irqnr, #0 + + mov \tmp, #0xff00 + orr \tmp, \tmp, #0xff + tst \irqstat, \tmp + addeq \irqnr, \irqnr, #16 + moveq \irqstat, \irqstat, lsr #16 + tst \irqstat, #255 + addeq \irqnr, \irqnr, #8 + moveq \irqstat, \irqstat, lsr #8 + tst \irqstat, #15 + addeq \irqnr, \irqnr, #4 + moveq \irqstat, \irqstat, lsr #4 + tst \irqstat, #3 + addeq \irqnr, \irqnr, #2 + moveq \irqstat, \irqstat, lsr #2 + tst \irqstat, #1 + addeq \irqnr, \irqnr, #1 + moveq \irqstat, \irqstat, lsr #1 + tst \irqstat, #1 @ bit 0 should be set + .endm + + .macro irq_prio_table + .endm + +#else +#error hynix processor selection missmatch +#endif +#else +#error Unknown architecture +#endif + /* * Invalid mode handlers */ - .macro inv_entry, sym, reason - sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go - stmia sp, {r0 - lr} @ Save XXX r0 - lr - ldr r4, .LC\sym - mov r1, #\reason - .endm - -__pabt_invalid: - inv_entry abt, BAD_PREFETCH - b 1f - -__dabt_invalid: - inv_entry abt, BAD_DATA - b 1f - -__irq_invalid: - inv_entry irq, BAD_IRQ - b 1f - -__und_invalid: - inv_entry und, BAD_UNDEFINSTR - -1: zero_fp - ldmia r4, {r5 - r7} @ Get XXX pc, cpsr, old_r0 - add r4, sp, #S_PC - stmia r4, {r5 - r7} @ Save XXX pc, cpsr, old_r0 - mov r0, sp - and r2, r6, #31 @ int mode - b bad_mode +__pabt_invalid: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go + stmia sp, {r0 - lr} @ Save XXX r0 - lr + ldr r4, .LCabt + mov r1, #BAD_PREFETCH + b 1f + +__dabt_invalid: sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - lr} @ Save SVC r0 - lr [lr *should* be intact] + ldr r4, .LCabt + mov r1, #BAD_DATA + b 1f + +__irq_invalid: sub sp, sp, #S_FRAME_SIZE @ Allocate space on stack for frame + stmfd sp, {r0 - lr} @ Save r0 - lr + ldr r4, .LCirq + mov r1, #BAD_IRQ + b 1f + +__und_invalid: sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - lr} + ldr r4, .LCund + mov r1, #BAD_UNDEFINSTR @ int reason + +1: zero_fp + ldmia r4, {r5 - r7} @ Get XXX pc, cpsr, old_r0 + add r4, sp, #S_PC + stmia r4, {r5 - r7} @ Save XXX pc, cpsr, old_r0 + mov r0, sp + and r2, r6, #31 @ int mode + b bad_mode /* * SVC mode handlers */ - .macro svc_entry, sym - sub sp, sp, #S_FRAME_SIZE - stmia sp, {r0 - r12} @ save r0 - r12 - ldr r2, .LC\sym - add r0, sp, #S_FRAME_SIZE - ldmia r2, {r2 - r4} @ get pc, cpsr - add r5, sp, #S_SP - mov r1, lr - - @ - @ We are now ready to fill in the remaining blanks on the stack: - @ - @ r0 - sp_svc - @ r1 - lr_svc - @ r2 - lr_, already fixed up for correct return/restart - @ r3 - spsr_ - @ r4 - orig_r0 (see pt_regs definition in ptrace.h) - @ - stmia r5, {r0 - r4} - .endm - - .align 5 -__dabt_svc: - svc_entry abt - - @ - @ get ready to re-enable interrupts if appropriate - @ - mrs r9, cpsr - tst r3, #PSR_I_BIT - biceq r9, r9, #PSR_I_BIT - - @ - @ Call the processor-specific abort handler: - @ - @ r2 - aborted context pc - @ r3 - aborted context cpsr - @ - @ The abort handler must return the aborted address in r0, and - @ the fault status register in r1. r9 must be preserved. - @ + .align 5 +__dabt_svc: sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - r12} @ save r0 - r12 + ldr r2, .LCabt + add r0, sp, #S_FRAME_SIZE + ldmia r2, {r2 - r4} @ get pc, cpsr + add r5, sp, #S_SP + mov r1, lr + stmia r5, {r0 - r4} @ save sp_SVC, lr_SVC, pc, cpsr, old_ro + mrs r9, cpsr @ Enable interrupts if they were + tst r3, #PSR_I_BIT + biceq r9, r9, #PSR_I_BIT @ previously +/* + * This routine must not corrupt r9 + */ #ifdef MULTI_ABORT - ldr r4, .LCprocfns - mov lr, pc - ldr pc, [r4] + ldr r4, .LCprocfns @ pass r2, r3 to + mov lr, pc @ processor code + ldr pc, [r4] @ call processor specific code #else - bl CPU_ABORT_HANDLER + bl CPU_ABORT_HANDLER #endif - - @ - @ set desired IRQ state, then call main handler - @ - msr cpsr_c, r9 - mov r2, sp - bl do_DataAbort - - @ - @ IRQs off again before pulling preserved data off the stack - @ - disable_irq - - @ - @ restore SPSR and restart the instruction - @ - ldr r0, [sp, #S_PSR] - msr spsr_cxsf, r0 - ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr - - .align 5 -__irq_svc: - svc_entry irq + msr cpsr_c, r9 + mov r2, sp + bl do_DataAbort + disable_irq r0 + ldr r0, [sp, #S_PSR] + msr spsr_cxsf, r0 + ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr + + .align 5 +__irq_svc: sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - r12} @ save r0 - r12 + ldr r7, .LCirq + add r5, sp, #S_FRAME_SIZE + ldmia r7, {r7 - r9} + add r4, sp, #S_SP + mov r6, lr + stmia r4, {r5, r6, r7, r8, r9} @ save sp_SVC, lr_SVC, pc, cpsr, old_ro #ifdef CONFIG_PREEMPT - get_thread_info r8 - ldr r9, [r8, #TI_PREEMPT] @ get preempt count - add r7, r9, #1 @ increment it - str r7, [r8, #TI_PREEMPT] + get_thread_info r8 + ldr r9, [r8, #TI_PREEMPT] @ get preempt count + add r7, r9, #1 @ increment it + str r7, [r8, #TI_PREEMPT] #endif -1: get_irqnr_and_base r0, r6, r5, lr - movne r1, sp - @ - @ routine called with r0 = irq number, r1 = struct pt_regs * - @ - adrne lr, 1b - bne asm_do_IRQ +1: get_irqnr_and_base r0, r6, r5, lr + movne r1, sp + @ + @ routine called with r0 = irq number, r1 = struct pt_regs * + @ + adrsvc ne, lr, 1b + bne asm_do_IRQ #ifdef CONFIG_PREEMPT - ldr r0, [r8, #TI_FLAGS] @ get flags - tst r0, #_TIF_NEED_RESCHED - blne svc_preempt + ldr r0, [r8, #TI_FLAGS] @ get flags + tst r0, #_TIF_NEED_RESCHED + blne svc_preempt preempt_return: - ldr r0, [r8, #TI_PREEMPT] @ read preempt value - teq r0, r7 - str r9, [r8, #TI_PREEMPT] @ restore preempt count - strne r0, [r0, -r0] @ bug() + ldr r0, [r8, #TI_PREEMPT] @ read preempt value + teq r0, r7 + str r9, [r8, #TI_PREEMPT] @ restore preempt count + strne r0, [r0, -r0] @ bug() #endif - ldr r0, [sp, #S_PSR] @ irqs are already disabled - msr spsr_cxsf, r0 - ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr + ldr r0, [sp, #S_PSR] @ irqs are already disabled + msr spsr_cxsf, r0 + ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr - .ltorg + .ltorg #ifdef CONFIG_PREEMPT -svc_preempt: - teq r9, #0 @ was preempt count = 0 - ldreq r6, .LCirq_stat - movne pc, lr @ no - ldr r0, [r6, #4] @ local_irq_count - ldr r1, [r6, #8] @ local_bh_count - adds r0, r0, r1 - movne pc, lr - mov r7, #0 @ preempt_schedule_irq - str r7, [r8, #TI_PREEMPT] @ expects preempt_count == 0 -1: bl preempt_schedule_irq @ irq en/disable is done inside - ldr r0, [r8, #TI_FLAGS] @ get new tasks TI_FLAGS - tst r0, #_TIF_NEED_RESCHED - beq preempt_return @ go again - b 1b +svc_preempt: teq r9, #0 @ was preempt count = 0 + ldreq r6, .LCirq_stat + movne pc, lr @ no + ldr r0, [r6, #4] @ local_irq_count + ldr r1, [r6, #8] @ local_bh_count + adds r0, r0, r1 + movne pc, lr + mov r7, #PREEMPT_ACTIVE + str r7, [r8, #TI_PREEMPT] @ set PREEMPT_ACTIVE +1: enable_irq r2 @ enable IRQs + bl schedule + disable_irq r0 @ disable IRQs + ldr r0, [r8, #TI_FLAGS] @ get new tasks TI_FLAGS + tst r0, #_TIF_NEED_RESCHED + beq preempt_return @ go again + b 1b #endif - .align 5 -__und_svc: - svc_entry und - - @ - @ call emulation code, which returns using r9 if it has emulated - @ the instruction, or the more conventional lr if we are to treat - @ this as a real undefined instruction - @ - @ r0 - instruction - @ - ldr r0, [r2, #-4] - adr r9, 1f - bl call_fpe - - mov r0, sp @ struct pt_regs *regs - bl do_undefinstr - - @ - @ IRQs off again before pulling preserved data off the stack - @ -1: disable_irq - - @ - @ restore SPSR and restart the instruction - @ - ldr lr, [sp, #S_PSR] @ Get SVC cpsr - msr spsr_cxsf, lr - ldmia sp, {r0 - pc}^ @ Restore SVC registers - - .align 5 -__pabt_svc: - svc_entry abt - - @ - @ re-enable interrupts if appropriate - @ - mrs r9, cpsr - tst r3, #PSR_I_BIT - biceq r9, r9, #PSR_I_BIT - msr cpsr_c, r9 - - @ - @ set args, then call main handler - @ - @ r0 - address of faulting instruction - @ r1 - pointer to registers on stack - @ - mov r0, r2 @ address (pc) - mov r1, sp @ regs - bl do_PrefetchAbort @ call abort handler - - @ - @ IRQs off again before pulling preserved data off the stack - @ - disable_irq - - @ - @ restore SPSR and restart the instruction - @ - ldr r0, [sp, #S_PSR] - msr spsr_cxsf, r0 - ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr - - .align 5 -.LCirq: - .word __temp_irq -.LCund: - .word __temp_und -.LCabt: - .word __temp_abt + .align 5 +__und_svc: sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - r12} @ save r0 - r12 + ldr r3, .LCund + mov r4, lr + ldmia r3, {r5 - r7} + add r3, sp, #S_FRAME_SIZE + add r2, sp, #S_SP + stmia r2, {r3 - r7} @ save sp_SVC, lr_SVC, pc, cpsr, old_ro + + ldr r0, [r5, #-4] @ r0 = instruction + adrsvc al, r9, 1f @ r9 = normal FP return + bl call_fpe @ lr = undefined instr return + + mov r0, sp @ struct pt_regs *regs + bl do_undefinstr + +1: disable_irq r0 + ldr lr, [sp, #S_PSR] @ Get SVC cpsr + msr spsr_cxsf, lr + ldmia sp, {r0 - pc}^ @ Restore SVC registers + + .align 5 +__pabt_svc: sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - r12} @ save r0 - r12 + ldr r2, .LCabt + add r0, sp, #S_FRAME_SIZE + ldmia r2, {r2 - r4} @ get pc, cpsr + add r5, sp, #S_SP + mov r1, lr + stmia r5, {r0 - r4} @ save sp_SVC, lr_SVC, pc, cpsr, old_ro + mrs r9, cpsr @ Enable interrupts if they were + tst r3, #PSR_I_BIT + biceq r9, r9, #PSR_I_BIT @ previously + msr cpsr_c, r9 + mov r0, r2 @ address (pc) + mov r1, sp @ regs + bl do_PrefetchAbort @ call abort handler + disable_irq r0 + ldr r0, [sp, #S_PSR] + msr spsr_cxsf, r0 + ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr + + .align 5 +.LCirq: .word __temp_irq +.LCund: .word __temp_und +.LCabt: .word __temp_abt #ifdef MULTI_ABORT -.LCprocfns: - .word processor +.LCprocfns: .word processor #endif -.LCfp: - .word fp_enter +.LCfp: .word fp_enter #ifdef CONFIG_PREEMPT -.LCirq_stat: - .word irq_stat +.LCirq_stat: .word irq_stat #endif + irq_prio_table + /* * User mode handlers */ - .macro usr_entry, sym - sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go - stmia sp, {r0 - r12} @ save r0 - r12 - ldr r7, .LC\sym - add r5, sp, #S_PC - ldmia r7, {r2 - r4} @ Get USR pc, cpsr - -#if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) - @ make sure our user space atomic helper is aborted - cmp r2, #VIRT_OFFSET - bichs r3, r3, #PSR_Z_BIT -#endif - - @ - @ We are now ready to fill in the remaining blanks on the stack: - @ - @ r2 - lr_, already fixed up for correct return/restart - @ r3 - spsr_ - @ r4 - orig_r0 (see pt_regs definition in ptrace.h) - @ - @ Also, separately save sp_usr and lr_usr - @ - stmia r5, {r2 - r4} - stmdb r5, {sp, lr}^ - - @ - @ Enable the alignment trap while in kernel mode - @ - alignment_trap r7, r0, __temp_\sym - - @ - @ Clear FP to mark the first stack frame - @ - zero_fp - .endm - - .align 5 -__dabt_usr: - usr_entry abt - - @ - @ Call the processor-specific abort handler: - @ - @ r2 - aborted context pc - @ r3 - aborted context cpsr - @ - @ The abort handler must return the aborted address in r0, and - @ the fault status register in r1. - @ + .align 5 +__dabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go + stmia sp, {r0 - r12} @ save r0 - r12 + ldr r7, .LCabt + add r5, sp, #S_PC + ldmia r7, {r2 - r4} @ Get USR pc, cpsr + stmia r5, {r2 - r4} @ Save USR pc, cpsr, old_r0 + stmdb r5, {sp, lr}^ + alignment_trap r7, r7, __temp_abt + zero_fp #ifdef MULTI_ABORT - ldr r4, .LCprocfns - mov lr, pc - ldr pc, [r4] + ldr r4, .LCprocfns @ pass r2, r3 to + mov lr, pc @ processor code + ldr pc, [r4] @ call processor specific code #else - bl CPU_ABORT_HANDLER + bl CPU_ABORT_HANDLER #endif - - @ - @ IRQs on, then call the main handler - @ - enable_irq - mov r2, sp - adr lr, ret_from_exception - b do_DataAbort - - .align 5 -__irq_usr: - usr_entry irq - + enable_irq r2 @ Enable interrupts + mov r2, sp + adrsvc al, lr, ret_from_exception + b do_DataAbort + + .align 5 +__irq_usr: sub sp, sp, #S_FRAME_SIZE + stmia sp, {r0 - r12} @ save r0 - r12 + ldr r4, .LCirq + add r8, sp, #S_PC + ldmia r4, {r5 - r7} @ get saved PC, SPSR + stmia r8, {r5 - r7} @ save pc, psr, old_r0 + stmdb r8, {sp, lr}^ + alignment_trap r4, r7, __temp_irq + zero_fp #ifdef CONFIG_PREEMPT - get_thread_info r8 - ldr r9, [r8, #TI_PREEMPT] @ get preempt count - add r7, r9, #1 @ increment it - str r7, [r8, #TI_PREEMPT] + get_thread_info r8 + ldr r9, [r8, #TI_PREEMPT] @ get preempt count + add r7, r9, #1 @ increment it + str r7, [r8, #TI_PREEMPT] #endif -1: get_irqnr_and_base r0, r6, r5, lr - movne r1, sp - adrne lr, 1b - @ - @ routine called with r0 = irq number, r1 = struct pt_regs * - @ - bne asm_do_IRQ +1: get_irqnr_and_base r0, r6, r5, lr + movne r1, sp + adrsvc ne, lr, 1b + @ + @ routine called with r0 = irq number, r1 = struct pt_regs * + @ + bne asm_do_IRQ #ifdef CONFIG_PREEMPT - ldr r0, [r8, #TI_PREEMPT] - teq r0, r7 - str r9, [r8, #TI_PREEMPT] - strne r0, [r0, -r0] - mov tsk, r8 + ldr r0, [r8, #TI_PREEMPT] + teq r0, r7 + str r9, [r8, #TI_PREEMPT] + strne r0, [r0, -r0] + mov tsk, r8 #else - get_thread_info tsk + get_thread_info tsk #endif - mov why, #0 - b ret_to_user - - .ltorg - - .align 5 -__und_usr: - usr_entry und - - tst r3, #PSR_T_BIT @ Thumb mode? - bne fpundefinstr @ ignore FP - sub r4, r2, #4 - - @ - @ fall through to the emulation code, which returns using r9 if - @ it has emulated the instruction, or the more conventional lr - @ if we are to treat this as a real undefined instruction - @ - @ r0 - instruction - @ -1: ldrt r0, [r4] - adr r9, ret_from_exception - adr lr, fpundefinstr - @ - @ fallthrough to call_fpe - @ + mov why, #0 + b ret_to_user + + .ltorg + + .align 5 +__und_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go + stmia sp, {r0 - r12} @ Save r0 - r12 + ldr r4, .LCund + add r8, sp, #S_PC + ldmia r4, {r5 - r7} + stmia r8, {r5 - r7} @ Save USR pc, cpsr, old_r0 + stmdb r8, {sp, lr}^ @ Save user sp, lr + alignment_trap r4, r7, __temp_und + zero_fp + tst r6, #PSR_T_BIT @ Thumb mode? + bne fpundefinstr @ ignore FP + sub r4, r5, #4 +1: ldrt r0, [r4] @ r0 = instruction + adrsvc al, r9, ret_from_exception @ r9 = normal FP return + adrsvc al, lr, fpundefinstr @ lr = undefined instr return /* * The out of line fixup for the ldrt above. */ - .section .fixup, "ax" -2: mov pc, r9 - .previous - .section __ex_table,"a" - .long 1b, 2b - .previous + .section .fixup, "ax" +2: mov pc, r9 + .previous + .section __ex_table,"a" + .long 1b, 2b + .previous /* + * r0 = instruction. + * * Check whether the instruction is a co-processor instruction. * If yes, we need to call the relevant co-processor handler. * @@ -401,95 +1300,98 @@ __und_usr: * for the ARM6/ARM7 SWI bug. * * Emulators may wish to make use of the following registers: - * r0 = instruction opcode. - * r2 = PC+4 - * r10 = this threads thread_info structure. + * r0 - instruction opcode. + * r10 - this threads thread_info structure. */ call_fpe: - tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 + tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 #if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) - and r8, r0, #0x0f000000 @ mask out op-code bits - teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)? + and r8, r0, #0x0f000000 @ mask out op-code bits + teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)? #endif - moveq pc, lr - get_thread_info r10 @ get current thread - and r8, r0, #0x00000f00 @ mask out CP number - mov r7, #1 - add r6, r10, #TI_USED_CP - strb r7, [r6, r8, lsr #8] @ set appropriate used_cp[] + moveq pc, lr + get_thread_info r10 @ get current thread + and r8, r0, #0x00000f00 @ mask out CP number + mov r7, #1 + add r6, r10, #TI_USED_CP + strb r7, [r6, r8, lsr #8] @ set appropriate used_cp[] #ifdef CONFIG_IWMMXT - @ Test if we need to give access to iWMMXt coprocessors - ldr r5, [r10, #TI_FLAGS] - rsbs r7, r8, #(1 << 8) @ CP 0 or 1 only - movcss r7, r5, lsr #(TIF_USING_IWMMXT + 1) - bcs iwmmxt_task_enable + @ Test if we need to give access to iWMMXt coprocessors + ldr r5, [r10, #TI_FLAGS] + rsbs r7, r8, #(1 << 8) @ CP 0 or 1 only + movcss r7, r5, lsr #(TIF_USING_IWMMXT + 1) + bcs iwmmxt_task_enable #endif - enable_irq - add pc, pc, r8, lsr #6 - mov r0, r0 - - mov pc, lr @ CP#0 - b do_fpe @ CP#1 (FPE) - b do_fpe @ CP#2 (FPE) - mov pc, lr @ CP#3 - mov pc, lr @ CP#4 - mov pc, lr @ CP#5 - mov pc, lr @ CP#6 - mov pc, lr @ CP#7 - mov pc, lr @ CP#8 - mov pc, lr @ CP#9 + enable_irq r7 + add pc, pc, r8, lsr #6 + mov r0, r0 + + mov pc, lr @ CP#0 + b do_fpe @ CP#1 (FPE) + b do_fpe @ CP#2 (FPE) + mov pc, lr @ CP#3 + mov pc, lr @ CP#4 + mov pc, lr @ CP#5 + mov pc, lr @ CP#6 + mov pc, lr @ CP#7 + mov pc, lr @ CP#8 + mov pc, lr @ CP#9 #ifdef CONFIG_VFP - b do_vfp @ CP#10 (VFP) - b do_vfp @ CP#11 (VFP) + b do_vfp @ CP#10 (VFP) + b do_vfp @ CP#11 (VFP) #else - mov pc, lr @ CP#10 (VFP) - mov pc, lr @ CP#11 (VFP) + mov pc, lr @ CP#10 (VFP) + mov pc, lr @ CP#11 (VFP) #endif - mov pc, lr @ CP#12 - mov pc, lr @ CP#13 - mov pc, lr @ CP#14 (Debug) - mov pc, lr @ CP#15 (Control) + mov pc, lr @ CP#12 + mov pc, lr @ CP#13 + mov pc, lr @ CP#14 (Debug) + mov pc, lr @ CP#15 (Control) -do_fpe: - ldr r4, .LCfp - add r10, r10, #TI_FPSTATE @ r10 = workspace - ldr pc, [r4] @ Call FP module USR entry point +do_fpe: ldr r4, .LCfp + add r10, r10, #TI_FPSTATE @ r10 = workspace + ldr pc, [r4] @ Call FP module USR entry point /* * The FP module is called with these registers set: * r0 = instruction - * r2 = PC+4 + * r5 = PC * r9 = normal "successful" return address * r10 = FP workspace * lr = unrecognised FP instruction return address */ - .data + .data ENTRY(fp_enter) - .word fpundefinstr - .text - -fpundefinstr: - mov r0, sp - adr lr, ret_from_exception - b do_undefinstr - - .align 5 -__pabt_usr: - usr_entry abt - - enable_irq @ Enable interrupts - mov r0, r2 @ address (pc) - mov r1, sp @ regs - bl do_PrefetchAbort @ call abort handler - /* fall through */ + .word fpundefinstr + .text + +fpundefinstr: mov r0, sp + adrsvc al, lr, ret_from_exception + b do_undefinstr + + .align 5 +__pabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go + stmia sp, {r0 - r12} @ Save r0 - r12 + ldr r4, .LCabt + add r8, sp, #S_PC + ldmia r4, {r5 - r7} @ Get USR pc, cpsr + stmia r8, {r5 - r7} @ Save USR pc, cpsr, old_r0 + stmdb r8, {sp, lr}^ @ Save sp_usr lr_usr + alignment_trap r4, r7, __temp_abt + zero_fp + enable_irq r0 @ Enable interrupts + mov r0, r5 @ address (pc) + mov r1, sp @ regs + bl do_PrefetchAbort @ call abort handler + /* fall through */ /* * This is the return code to user mode for abort handlers */ ENTRY(ret_from_exception) - get_thread_info tsk - mov why, #0 - b ret_to_user + get_thread_info tsk + mov why, #0 + b ret_to_user /* * Register switch for ARMv3 and ARMv4 processors @@ -497,369 +1399,212 @@ ENTRY(ret_from_exception) * previous and next are guaranteed not to be the same. */ ENTRY(__switch_to) - add ip, r1, #TI_CPU_SAVE - ldr r3, [r2, #TI_TP_VALUE] - stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack - ldr r6, [r2, #TI_CPU_DOMAIN]! + add ip, r1, #TI_CPU_SAVE + ldr r3, [r2, #TI_CPU_DOMAIN]! + stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack #if defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_IWMMXT) - mra r4, r5, acc0 - stmia ip, {r4, r5} -#endif -#if defined(CONFIG_HAS_TLS_REG) - mcr p15, 0, r3, c13, c0, 3 @ set TLS register -#elif !defined(CONFIG_TLS_REG_EMUL) - mov r4, #0xffff0fff - str r3, [r4, #-15] @ TLS val at 0xffff0ff0 + mra r4, r5, acc0 + stmia ip, {r4, r5} #endif - mcr p15, 0, r6, c3, c0, 0 @ Set domain register + mcr p15, 0, r3, c3, c0, 0 @ Set domain register #ifdef CONFIG_VFP - @ Always disable VFP so we can lazily save/restore the old - @ state. This occurs in the context of the previous thread. - VFPFMRX r4, FPEXC - bic r4, r4, #FPEXC_ENABLE - VFPFMXR FPEXC, r4 + @ Always disable VFP so we can lazily save/restore the old + @ state. This occurs in the context of the previous thread. + VFPFMRX r4, FPEXC + bic r4, r4, #FPEXC_ENABLE + VFPFMXR FPEXC, r4 #endif #if defined(CONFIG_IWMMXT) - bl iwmmxt_task_switch + bl iwmmxt_task_switch #elif defined(CONFIG_CPU_XSCALE) - add r4, r2, #40 @ cpu_context_save->extra - ldmib r4, {r4, r5} - mar acc0, r4, r5 + add r4, r2, #40 @ cpu_context_save->extra + ldmib r4, {r4, r5} + mar acc0, r4, r5 #endif - ldmib r2, {r4 - sl, fp, sp, pc} @ Load all regs saved previously - - __INIT + ldmib r2, {r4 - sl, fp, sp, pc} @ Load all regs saved previously + __INIT /* - * User helpers. - * - * These are segment of kernel provided user code reachable from user space - * at a fixed address in kernel memory. This is used to provide user space - * with some operations which require kernel help because of unimplemented - * native feature and/or instructions in many ARM CPUs. The idea is for - * this code to be executed directly in user mode for best efficiency but - * which is too intimate with the kernel counter part to be left to user - * libraries. In fact this code might even differ from one CPU to another - * depending on the available instruction set and restrictions like on - * SMP systems. In other words, the kernel reserves the right to change - * this code as needed without warning. Only the entry points and their - * results are guaranteed to be stable. - * - * Each segment is 32-byte aligned and will be moved to the top of the high - * vector page. New segments (if ever needed) must be added in front of - * existing ones. This mechanism should be used only for things that are - * really small and justified, and not be abused freely. - * - * User space is expected to implement those things inline when optimizing - * for a processor that has the necessary native support, but only if such - * resulting binaries are already to be incompatible with earlier ARM - * processors due to the use of unsupported instructions other than what - * is provided here. In other words don't make binaries unable to run on - * earlier processors just for the sake of not using these kernel helpers - * if your compiled code is not going to use the new instructions for other - * purpose. + * Vector stubs. NOTE that we only align 'vector_IRQ' to a cache line boundary, + * and we rely on each stub being exactly 48 (1.5 cache lines) in size. This + * means that we only ever load two cache lines for this code, or one if we're + * lucky. We also copy this code to 0x200 so that we can use branches in the + * vectors, rather than ldr's. */ - - .align 5 - .globl __kuser_helper_start -__kuser_helper_start: - -/* - * Reference prototype: - * - * int __kernel_cmpxchg(int oldval, int newval, int *ptr) - * - * Input: - * - * r0 = oldval - * r1 = newval - * r2 = ptr - * lr = return address - * - * Output: - * - * r0 = returned value (zero or non-zero) - * C flag = set if r0 == 0, clear if r0 != 0 - * - * Clobbered: - * - * r3, ip, flags - * - * Definition and user space usage example: - * - * typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr); - * #define __kernel_cmpxchg (*(__kernel_cmpxchg_t *)0xffff0fc0) - * - * Atomically store newval in *ptr if *ptr is equal to oldval for user space. - * Return zero if *ptr was changed or non-zero if no exchange happened. - * The C flag is also set if *ptr was changed to allow for assembly - * optimization in the calling code. - * - * For example, a user space atomic_add implementation could look like this: - * - * #define atomic_add(ptr, val) \ - * ({ register unsigned int *__ptr asm("r2") = (ptr); \ - * register unsigned int __result asm("r1"); \ - * asm volatile ( \ - * "1: @ atomic_add\n\t" \ - * "ldr r0, [r2]\n\t" \ - * "mov r3, #0xffff0fff\n\t" \ - * "add lr, pc, #4\n\t" \ - * "add r1, r0, %2\n\t" \ - * "add pc, r3, #(0xffff0fc0 - 0xffff0fff)\n\t" \ - * "bcc 1b" \ - * : "=&r" (__result) \ - * : "r" (__ptr), "rIL" (val) \ - * : "r0","r3","ip","lr","cc","memory" ); \ - * __result; }) - */ - -__kuser_cmpxchg: @ 0xffff0fc0 - -#if defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) - - /* - * Poor you. No fast solution possible... - * The kernel itself must perform the operation. - * A special ghost syscall is used for that (see traps.c). - */ - swi #0x9ffff0 - mov pc, lr - -#elif __LINUX_ARM_ARCH__ < 6 - - /* - * Theory of operation: - * - * We set the Z flag before loading oldval. If ever an exception - * occurs we can not be sure the loaded value will still be the same - * when the exception returns, therefore the user exception handler - * will clear the Z flag whenever the interrupted user code was - * actually from the kernel address space (see the usr_entry macro). - * - * The post-increment on the str is used to prevent a race with an - * exception happening just after the str instruction which would - * clear the Z flag although the exchange was done. - */ - teq ip, ip @ set Z flag - ldr ip, [r2] @ load current val - add r3, r2, #1 @ prepare store ptr - teqeq ip, r0 @ compare with oldval if still allowed - streq r1, [r3, #-1]! @ store newval if still allowed - subs r0, r2, r3 @ if r2 == r3 the str occured - mov pc, lr - -#else - - ldrex r3, [r2] - subs r3, r3, r0 - strexeq r3, r1, [r2] - rsbs r0, r3, #0 - mov pc, lr - -#endif - - .align 5 - -/* - * Reference prototype: - * - * int __kernel_get_tls(void) - * - * Input: - * - * lr = return address - * - * Output: - * - * r0 = TLS value - * - * Clobbered: - * - * the Z flag might be lost - * - * Definition and user space usage example: - * - * typedef int (__kernel_get_tls_t)(void); - * #define __kernel_get_tls (*(__kernel_get_tls_t *)0xffff0fe0) - * - * Get the TLS value as previously set via the __ARM_NR_set_tls syscall. - * - * This could be used as follows: - * - * #define __kernel_get_tls() \ - * ({ register unsigned int __val asm("r0"); \ - * asm( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #31" \ - * : "=r" (__val) : : "lr","cc" ); \ - * __val; }) - */ - -__kuser_get_tls: @ 0xffff0fe0 - -#if !defined(CONFIG_HAS_TLS_REG) && !defined(CONFIG_TLS_REG_EMUL) - - ldr r0, [pc, #(16 - 8)] @ TLS stored at 0xffff0ff0 - mov pc, lr - -#else - - mrc p15, 0, r0, c13, c0, 3 @ read TLS register - mov pc, lr - -#endif - - .rep 5 - .word 0 @ pad up to __kuser_helper_version - .endr - -/* - * Reference declaration: - * - * extern unsigned int __kernel_helper_version; - * - * Definition and user space usage example: - * - * #define __kernel_helper_version (*(unsigned int *)0xffff0ffc) - * - * User space may read this to determine the curent number of helpers - * available. - */ - -__kuser_helper_version: @ 0xffff0ffc - .word ((__kuser_helper_end - __kuser_helper_start) >> 5) - - .globl __kuser_helper_end -__kuser_helper_end: - - -/* - * Vector stubs. - * - * This code is copied to 0xffff0200 so we can use branches in the - * vectors, rather than ldr's. Note that this code must not - * exceed 0x300 bytes. - * - * Common stub entry macro: - * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC - */ - .macro vector_stub, name, sym, correction=0 - .align 5 - -vector_\name: - ldr r13, .LCs\sym - .if \correction - sub lr, lr, #\correction - .endif - str lr, [r13] @ save lr_IRQ - mrs lr, spsr - str lr, [r13, #4] @ save spsr_IRQ - @ - @ now branch to the relevant MODE handling routine - @ - mrs r13, cpsr - bic r13, r13, #MODE_MASK - orr r13, r13, #SVC_MODE - msr spsr_cxsf, r13 @ switch to SVC_32 mode - - and lr, lr, #15 - ldr lr, [pc, lr, lsl #2] - movs pc, lr @ Changes mode and branches - .endm - - .globl __stubs_start + .align 5 __stubs_start: /* * Interrupt dispatcher + * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC */ - vector_stub irq, irq, 4 - - .long __irq_usr @ 0 (USR_26 / USR_32) - .long __irq_invalid @ 1 (FIQ_26 / FIQ_32) - .long __irq_invalid @ 2 (IRQ_26 / IRQ_32) - .long __irq_svc @ 3 (SVC_26 / SVC_32) - .long __irq_invalid @ 4 - .long __irq_invalid @ 5 - .long __irq_invalid @ 6 - .long __irq_invalid @ 7 - .long __irq_invalid @ 8 - .long __irq_invalid @ 9 - .long __irq_invalid @ a - .long __irq_invalid @ b - .long __irq_invalid @ c - .long __irq_invalid @ d - .long __irq_invalid @ e - .long __irq_invalid @ f +vector_IRQ: @ + @ save mode specific registers + @ + ldr r13, .LCsirq + sub lr, lr, #4 + str lr, [r13] @ save lr_IRQ + mrs lr, spsr + str lr, [r13, #4] @ save spsr_IRQ + @ + @ now branch to the relevant MODE handling routine + @ + mrs r13, cpsr + bic r13, r13, #MODE_MASK + orr r13, r13, #MODE_SVC + msr spsr_cxsf, r13 @ switch to SVC_32 mode + + and lr, lr, #15 + ldr lr, [pc, lr, lsl #2] + movs pc, lr @ Changes mode and branches + +.LCtab_irq: .word __irq_usr @ 0 (USR_26 / USR_32) + .word __irq_invalid @ 1 (FIQ_26 / FIQ_32) + .word __irq_invalid @ 2 (IRQ_26 / IRQ_32) + .word __irq_svc @ 3 (SVC_26 / SVC_32) + .word __irq_invalid @ 4 + .word __irq_invalid @ 5 + .word __irq_invalid @ 6 + .word __irq_invalid @ 7 + .word __irq_invalid @ 8 + .word __irq_invalid @ 9 + .word __irq_invalid @ a + .word __irq_invalid @ b + .word __irq_invalid @ c + .word __irq_invalid @ d + .word __irq_invalid @ e + .word __irq_invalid @ f + + .align 5 /* - * Data abort dispatcher + * Data abort dispatcher - dispatches it to the correct handler for the processor mode * Enter in ABT mode, spsr = USR CPSR, lr = USR PC */ - vector_stub dabt, abt, 8 - - .long __dabt_usr @ 0 (USR_26 / USR_32) - .long __dabt_invalid @ 1 (FIQ_26 / FIQ_32) - .long __dabt_invalid @ 2 (IRQ_26 / IRQ_32) - .long __dabt_svc @ 3 (SVC_26 / SVC_32) - .long __dabt_invalid @ 4 - .long __dabt_invalid @ 5 - .long __dabt_invalid @ 6 - .long __dabt_invalid @ 7 - .long __dabt_invalid @ 8 - .long __dabt_invalid @ 9 - .long __dabt_invalid @ a - .long __dabt_invalid @ b - .long __dabt_invalid @ c - .long __dabt_invalid @ d - .long __dabt_invalid @ e - .long __dabt_invalid @ f +vector_data: @ + @ save mode specific registers + @ + ldr r13, .LCsabt + sub lr, lr, #8 + str lr, [r13] + mrs lr, spsr + str lr, [r13, #4] + @ + @ now branch to the relevant MODE handling routine + @ + mrs r13, cpsr + bic r13, r13, #MODE_MASK + orr r13, r13, #MODE_SVC + msr spsr_cxsf, r13 @ switch to SVC_32 mode + + and lr, lr, #15 + ldr lr, [pc, lr, lsl #2] + movs pc, lr @ Changes mode and branches + +.LCtab_dabt: .word __dabt_usr @ 0 (USR_26 / USR_32) + .word __dabt_invalid @ 1 (FIQ_26 / FIQ_32) + .word __dabt_invalid @ 2 (IRQ_26 / IRQ_32) + .word __dabt_svc @ 3 (SVC_26 / SVC_32) + .word __dabt_invalid @ 4 + .word __dabt_invalid @ 5 + .word __dabt_invalid @ 6 + .word __dabt_invalid @ 7 + .word __dabt_invalid @ 8 + .word __dabt_invalid @ 9 + .word __dabt_invalid @ a + .word __dabt_invalid @ b + .word __dabt_invalid @ c + .word __dabt_invalid @ d + .word __dabt_invalid @ e + .word __dabt_invalid @ f + + .align 5 /* - * Prefetch abort dispatcher + * Prefetch abort dispatcher - dispatches it to the correct handler for the processor mode * Enter in ABT mode, spsr = USR CPSR, lr = USR PC */ - vector_stub pabt, abt, 4 - - .long __pabt_usr @ 0 (USR_26 / USR_32) - .long __pabt_invalid @ 1 (FIQ_26 / FIQ_32) - .long __pabt_invalid @ 2 (IRQ_26 / IRQ_32) - .long __pabt_svc @ 3 (SVC_26 / SVC_32) - .long __pabt_invalid @ 4 - .long __pabt_invalid @ 5 - .long __pabt_invalid @ 6 - .long __pabt_invalid @ 7 - .long __pabt_invalid @ 8 - .long __pabt_invalid @ 9 - .long __pabt_invalid @ a - .long __pabt_invalid @ b - .long __pabt_invalid @ c - .long __pabt_invalid @ d - .long __pabt_invalid @ e - .long __pabt_invalid @ f +vector_prefetch: + @ + @ save mode specific registers + @ + ldr r13, .LCsabt + sub lr, lr, #4 + str lr, [r13] @ save lr_ABT + mrs lr, spsr + str lr, [r13, #4] @ save spsr_ABT + @ + @ now branch to the relevant MODE handling routine + @ + mrs r13, cpsr + bic r13, r13, #MODE_MASK + orr r13, r13, #MODE_SVC + msr spsr_cxsf, r13 @ switch to SVC_32 mode + + ands lr, lr, #15 + ldr lr, [pc, lr, lsl #2] + movs pc, lr + +.LCtab_pabt: .word __pabt_usr @ 0 (USR_26 / USR_32) + .word __pabt_invalid @ 1 (FIQ_26 / FIQ_32) + .word __pabt_invalid @ 2 (IRQ_26 / IRQ_32) + .word __pabt_svc @ 3 (SVC_26 / SVC_32) + .word __pabt_invalid @ 4 + .word __pabt_invalid @ 5 + .word __pabt_invalid @ 6 + .word __pabt_invalid @ 7 + .word __pabt_invalid @ 8 + .word __pabt_invalid @ 9 + .word __pabt_invalid @ a + .word __pabt_invalid @ b + .word __pabt_invalid @ c + .word __pabt_invalid @ d + .word __pabt_invalid @ e + .word __pabt_invalid @ f + + .align 5 /* - * Undef instr entry dispatcher + * Undef instr entry dispatcher - dispatches it to the correct handler for the processor mode * Enter in UND mode, spsr = SVC/USR CPSR, lr = SVC/USR PC */ - vector_stub und, und - - .long __und_usr @ 0 (USR_26 / USR_32) - .long __und_invalid @ 1 (FIQ_26 / FIQ_32) - .long __und_invalid @ 2 (IRQ_26 / IRQ_32) - .long __und_svc @ 3 (SVC_26 / SVC_32) - .long __und_invalid @ 4 - .long __und_invalid @ 5 - .long __und_invalid @ 6 - .long __und_invalid @ 7 - .long __und_invalid @ 8 - .long __und_invalid @ 9 - .long __und_invalid @ a - .long __und_invalid @ b - .long __und_invalid @ c - .long __und_invalid @ d - .long __und_invalid @ e - .long __und_invalid @ f - - .align 5 +vector_undefinstr: + @ + @ save mode specific registers + @ + ldr r13, .LCsund + str lr, [r13] @ save lr_UND + mrs lr, spsr + str lr, [r13, #4] @ save spsr_UND + @ + @ now branch to the relevant MODE handling routine + @ + mrs r13, cpsr + bic r13, r13, #MODE_MASK + orr r13, r13, #MODE_SVC + msr spsr_cxsf, r13 @ switch to SVC_32 mode + + and lr, lr, #15 + ldr lr, [pc, lr, lsl #2] + movs pc, lr @ Changes mode and branches + +.LCtab_und: .word __und_usr @ 0 (USR_26 / USR_32) + .word __und_invalid @ 1 (FIQ_26 / FIQ_32) + .word __und_invalid @ 2 (IRQ_26 / IRQ_32) + .word __und_svc @ 3 (SVC_26 / SVC_32) + .word __und_invalid @ 4 + .word __und_invalid @ 5 + .word __und_invalid @ 6 + .word __und_invalid @ 7 + .word __und_invalid @ 8 + .word __und_invalid @ 9 + .word __und_invalid @ a + .word __und_invalid @ b + .word __und_invalid @ c + .word __und_invalid @ d + .word __und_invalid @ e + .word __und_invalid @ f + + .align 5 /*============================================================================= * Undefined FIQs @@ -871,9 +1616,8 @@ __stubs_start: * other mode than FIQ... Ok you can switch to another mode, but you can't * get out of that mode without clobbering one register. */ -vector_fiq: - disable_fiq - subs pc, lr, #4 +vector_FIQ: disable_fiq + subs pc, lr, #4 /*============================================================================= * Address exception handler @@ -883,65 +1627,70 @@ vector_fiq: */ vector_addrexcptn: - b vector_addrexcptn + b vector_addrexcptn /* * We group all the following data together to optimise * for CPUs with separate I & D caches. */ - .align 5 + .align 5 -.LCvswi: - .word vector_swi +.LCvswi: .word vector_swi -.LCsirq: - .word __temp_irq -.LCsund: - .word __temp_und -.LCsabt: - .word __temp_abt +.LCsirq: .word __temp_irq +.LCsund: .word __temp_und +.LCsabt: .word __temp_abt - .globl __stubs_end __stubs_end: - .equ stubs_offset, __vectors_start + 0x200 - __stubs_start - - .globl __vectors_start -__vectors_start: - swi SYS_ERROR0 - b vector_und + stubs_offset - ldr pc, .LCvswi + stubs_offset - b vector_pabt + stubs_offset - b vector_dabt + stubs_offset - b vector_addrexcptn + stubs_offset - b vector_irq + stubs_offset - b vector_fiq + stubs_offset - - .globl __vectors_end -__vectors_end: - - .data + .equ __real_stubs_start, .LCvectors + 0x200 + +.LCvectors: swi SYS_ERROR0 + b __real_stubs_start + (vector_undefinstr - __stubs_start) + ldr pc, __real_stubs_start + (.LCvswi - __stubs_start) + b __real_stubs_start + (vector_prefetch - __stubs_start) + b __real_stubs_start + (vector_data - __stubs_start) + b __real_stubs_start + (vector_addrexcptn - __stubs_start) + b __real_stubs_start + (vector_IRQ - __stubs_start) + b __real_stubs_start + (vector_FIQ - __stubs_start) + +ENTRY(__trap_init) + stmfd sp!, {r4 - r6, lr} + + mov r0, #0xff000000 + orr r0, r0, #0x00ff0000 @ high vectors position + adr r1, .LCvectors @ set up the vectors + ldmia r1, {r1, r2, r3, r4, r5, r6, ip, lr} + stmia r0, {r1, r2, r3, r4, r5, r6, ip, lr} + + add r2, r0, #0x200 + adr r0, __stubs_start @ copy stubs to 0x200 + adr r1, __stubs_end +1: ldr r3, [r0], #4 + str r3, [r2], #4 + cmp r0, r1 + blt 1b + LOADREGS(fd, sp!, {r4 - r6, pc}) + + .data /* * Do not reorder these, and do not insert extra data between... */ -__temp_irq: - .word 0 @ saved lr_irq - .word 0 @ saved spsr_irq - .word -1 @ old_r0 -__temp_und: - .word 0 @ Saved lr_und - .word 0 @ Saved spsr_und - .word -1 @ old_r0 -__temp_abt: - .word 0 @ Saved lr_abt - .word 0 @ Saved spsr_abt - .word -1 @ old_r0 - - .globl cr_alignment - .globl cr_no_alignment +__temp_irq: .word 0 @ saved lr_irq + .word 0 @ saved spsr_irq + .word -1 @ old_r0 +__temp_und: .word 0 @ Saved lr_und + .word 0 @ Saved spsr_und + .word -1 @ old_r0 +__temp_abt: .word 0 @ Saved lr_abt + .word 0 @ Saved spsr_abt + .word -1 @ old_r0 + + .globl cr_alignment + .globl cr_no_alignment cr_alignment: - .space 4 + .space 4 cr_no_alignment: - .space 4 + .space 4 diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 473387729..946c50c2a 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -14,22 +14,10 @@ #include #include -#include #include #include #include #include -#include -#include - -#define PROCINFO_MMUFLAGS 8 -#define PROCINFO_INITFUNC 12 - -#define MACHINFO_TYPE 0 -#define MACHINFO_PHYSRAM 4 -#define MACHINFO_PHYSIO 8 -#define MACHINFO_PGOFFIO 12 -#define MACHINFO_NAME 16 #ifndef CONFIG_XIP_KERNEL /* @@ -98,143 +86,107 @@ * circumstances, zImage) is for. */ __INIT - .type stext, %function + .type stext, #function ENTRY(stext) - msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode - @ and irqs disabled - bl __lookup_processor_type @ r5=procinfo r9=cpuid - movs r10, r5 @ invalid processor (r5=0)? - beq __error_p @ yes, error 'p' - bl __lookup_machine_type @ r5=machinfo - movs r8, r5 @ invalid machine (r5=0)? - beq __error_a @ yes, error 'a' + mov r12, r0 + mov r0, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ make sure svc mode + msr cpsr_c, r0 @ and all irqs disabled + bl __lookup_processor_type + teq r10, #0 @ invalid processor? + moveq r0, #'p' @ yes, error 'p' + beq __error + bl __lookup_architecture_type + teq r7, #0 @ invalid architecture? + moveq r0, #'a' @ yes, error 'a' + beq __error bl __create_page_tables /* * The following calls CPU specific code in a position independent * manner. See arch/arm/mm/proc-*.S for details. r10 = base of - * xxx_proc_info structure selected by __lookup_machine_type + * xxx_proc_info structure selected by __lookup_architecture_type * above. On return, the CPU will be ready for the MMU to be * turned on, and r0 will hold the CPU control register value. */ - ldr r13, __switch_data @ address to jump to after - @ mmu has been enabled - adr lr, __enable_mmu @ return (PIC) address - add pc, r10, #PROCINFO_INITFUNC + adr lr, __turn_mmu_on @ return (PIC) address + add pc, r10, #12 .type __switch_data, %object __switch_data: .long __mmap_switched - .long __data_loc @ r4 - .long __data_start @ r5 - .long __bss_start @ r6 - .long _end @ r7 - .long processor_id @ r4 - .long __machine_arch_type @ r5 - .long cr_alignment @ r6 - .long init_thread_union + THREAD_START_SP @ sp + .long __data_loc @ r2 + .long __data_start @ r3 + .long __bss_start @ r4 + .long _end @ r5 + .long processor_id @ r6 + .long __machine_arch_type @ r7 + .long cr_alignment @ r8 + .long init_thread_union+8192 @ sp + +/* + * Enable the MMU. This completely changes the structure of the visible + * memory space. You will not be able to trace execution through this. + * If you have an enquiry about this, *please* check the linux-arm-kernel + * mailing list archives BEFORE sending another post to the list. + */ + .align 5 + .type __turn_mmu_on, %function +__turn_mmu_on: + ldr lr, __switch_data +#ifdef CONFIG_ALIGNMENT_TRAP + orr r0, r0, #2 @ ...........A. +#endif + mcr p15, 0, r0, c1, c0, 0 @ write control reg + mrc p15, 0, r3, c0, c0, 0 @ read id reg + mov r3, r3 + mov r3, r3 + mov pc, lr /* * The following fragment of code is executed with the MMU on, and uses * absolute addresses; this is not position independent. * - * r0 = cp#15 control register + * r0 = processor control register * r1 = machine ID * r9 = processor ID + * r12 = value of r0 when kernel was called (currently always zero) */ - .type __mmap_switched, %function + .align 5 __mmap_switched: - adr r3, __switch_data + 4 + adr r2, __switch_data + 4 + ldmia r2, {r2, r3, r4, r5, r6, r7, r8, sp} - ldmia r3!, {r4, r5, r6, r7} - cmp r4, r5 @ Copy data segment if needed -1: cmpne r5, r6 - ldrne fp, [r4], #4 - strne fp, [r5], #4 + cmp r2, r3 @ Copy data segment if needed +1: cmpne r3, r4 + ldrne fp, [r2], #4 + strne fp, [r3], #4 bne 1b mov fp, #0 @ Clear BSS (and zero fp) -1: cmp r6, r7 - strcc fp, [r6],#4 +1: cmp r4, r5 + strcc fp, [r4],#4 bcc 1b - ldmia r3, {r4, r5, r6, sp} - str r9, [r4] @ Save processor ID - str r1, [r5] @ Save machine type - bic r4, r0, #CR_A @ Clear 'A' bit - stmia r6, {r0, r4} @ Save control register values + str r9, [r6] @ Save processor ID + str r1, [r7] @ Save machine type + bic r2, r0, #2 @ Clear 'A' bit + stmia r8, {r0, r2} @ Save control register values b start_kernel -/* - * Setup common bits before finally enabling the MMU. Essentially - * this is just loading the page table pointer and domain access - * registers. - */ - .type __enable_mmu, %function -__enable_mmu: -#ifdef CONFIG_ALIGNMENT_TRAP - orr r0, r0, #CR_A -#else - bic r0, r0, #CR_A -#endif -#ifdef CONFIG_CPU_DCACHE_DISABLE - bic r0, r0, #CR_C -#endif -#ifdef CONFIG_CPU_BPREDICT_DISABLE - bic r0, r0, #CR_Z -#endif -#ifdef CONFIG_CPU_ICACHE_DISABLE - bic r0, r0, #CR_I -#endif - mov r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \ - domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ - domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \ - domain_val(DOMAIN_IO, DOMAIN_CLIENT)) - mcr p15, 0, r5, c3, c0, 0 @ load domain access register - mcr p15, 0, r4, c2, c0, 0 @ load page table pointer - b __turn_mmu_on - -/* - * Enable the MMU. This completely changes the structure of the visible - * memory space. You will not be able to trace execution through this. - * If you have an enquiry about this, *please* check the linux-arm-kernel - * mailing list archives BEFORE sending another post to the list. - * - * r0 = cp#15 control register - * r13 = *virtual* address to jump to upon completion - * - * other registers depend on the function called upon completion - */ - .align 5 - .type __turn_mmu_on, %function -__turn_mmu_on: - mov r0, r0 - mcr p15, 0, r0, c1, c0, 0 @ write control reg - mrc p15, 0, r3, c0, c0, 0 @ read id reg - mov r3, r3 - mov r3, r3 - mov pc, r13 - - /* * Setup the initial page tables. We only setup the barest * amount which are required to get the kernel running, which * generally means mapping in the kernel code. * - * r8 = machinfo - * r9 = cpuid - * r10 = procinfo - * - * Returns: - * r0, r3, r5, r6, r7 corrupted - * r4 = physical page table address + * r5 = physical address of start of RAM + * r6 = physical IO address + * r7 = byte offset into page tables for IO + * r8 = page table flags */ - .type __create_page_tables, %function __create_page_tables: - ldr r5, [r8, #MACHINFO_PHYSRAM] @ physram pgtbl r4, r5 @ page table address /* @@ -242,25 +194,23 @@ __create_page_tables: */ mov r0, r4 mov r3, #0 - add r6, r0, #0x4000 + add r2, r0, #0x4000 1: str r3, [r0], #4 str r3, [r0], #4 str r3, [r0], #4 str r3, [r0], #4 - teq r0, r6 + teq r0, r2 bne 1b - ldr r7, [r10, #PROCINFO_MMUFLAGS] @ mmuflags - /* * Create identity mapping for first MB of kernel to * cater for the MMU enable. This identity mapping * will be removed by paging_init(). We use our current program * counter to determine corresponding section base address. */ - mov r6, pc, lsr #20 @ start of kernel section - orr r3, r7, r6, lsl #20 @ flags + kernel base - str r3, [r4, r6, lsl #2] @ identity mapping + mov r2, pc, lsr #20 @ start of kernel section + add r3, r8, r2, lsl #20 @ flags + kernel base + str r3, [r4, r2, lsl #2] @ identity mapping /* * Now setup the pagetables for our kernel direct @@ -281,8 +231,8 @@ __create_page_tables: * Then map first 1MB of ram in case it contains our boot params. */ add r0, r4, #VIRT_OFFSET >> 18 - orr r6, r5, r7 - str r6, [r0] + add r2, r5, r8 + str r2, [r0] #ifdef CONFIG_XIP_KERNEL /* @@ -292,15 +242,15 @@ __create_page_tables: sub r3, r4, r5 mov r3, r3, lsr #20 add r0, r0, r3, lsl #2 - add r6, r6, r3, lsl #20 - str r6, [r0], #4 - add r6, r6, #(1 << 20) - str r6, [r0], #4 - add r6, r6, #(1 << 20) - str r6, [r0] + add r2, r2, r3, lsl #20 + str r2, [r0], #4 + add r2, r2, #(1 << 20) + str r2, [r0], #4 + add r2, r2, #(1 << 20) + str r2, [r0] #endif - bic r7, r7, #0x0c @ turn off cacheable + bic r8, r8, #0x0c @ turn off cacheable @ and bufferable bits #ifdef CONFIG_DEBUG_LL /* @@ -308,17 +258,15 @@ __create_page_tables: * This allows debug messages to be output * via a serial console before paging_init. */ - ldr r3, [r8, #MACHINFO_PGOFFIO] - add r0, r4, r3 - rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) - cmp r3, #0x0800 @ limit to 512MB - movhi r3, #0x0800 - add r6, r0, r3 - ldr r3, [r8, #MACHINFO_PHYSIO] - orr r3, r3, r7 + add r0, r4, r7 + rsb r3, r7, #0x4000 @ PTRS_PER_PGD*sizeof(long) + cmp r3, #0x0800 + addge r2, r0, #0x0800 + addlt r2, r0, r3 + orr r3, r6, r8 1: str r3, [r0], #4 add r3, r3, #1 << 20 - teq r0, r6 + teq r0, r2 bne 1b #if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS) /* @@ -330,7 +278,7 @@ __create_page_tables: bne 1f add r0, r4, #0x3fc0 @ ff000000 mov r3, #0x7c000000 - orr r3, r3, r7 + orr r3, r3, r8 str r3, [r0], #4 add r3, r3, #1 << 20 str r3, [r0], #4 @@ -345,7 +293,7 @@ __create_page_tables: */ add r0, r4, #0x80 @ 02000000 mov r3, #0x02000000 - orr r3, r3, r7 + orr r3, r3, r8 str r3, [r0] add r0, r4, #0x3600 @ d8000000 str r3, [r0] @@ -360,59 +308,21 @@ __create_page_tables: * ought to tell the user, but since we don't have any guarantee that * we're even running on the right architecture, we do virtually nothing. * - * If CONFIG_DEBUG_LL is set we try to print out something about the error - * and hope for the best (useful if bootloader fails to pass a proper - * machine ID for example). + * r0 = ascii error character: + * a = invalid architecture + * p = invalid processor + * i = invalid calling convention + * + * Generally, only serious errors cause this. */ - - .type __error_p, %function -__error_p: -#ifdef CONFIG_DEBUG_LL - adr r0, str_p1 - bl printascii - b __error -str_p1: .asciz "\nError: unrecognized/unsupported processor variant.\n" - .align -#endif - - .type __error_a, %function -__error_a: +__error: #ifdef CONFIG_DEBUG_LL - mov r4, r1 @ preserve machine ID - adr r0, str_a1 - bl printascii - mov r0, r4 - bl printhex8 - adr r0, str_a2 + mov r8, r0 @ preserve r0 + adr r0, err_str bl printascii - adr r3, 3f - ldmia r3, {r4, r5, r6} @ get machine desc list - sub r4, r3, r4 @ get offset between virt&phys - add r5, r5, r4 @ convert virt addresses to - add r6, r6, r4 @ physical address space -1: ldr r0, [r5, #MACHINFO_TYPE] @ get machine type - bl printhex8 - mov r0, #'\t' + mov r0, r8 bl printch - ldr r0, [r5, #MACHINFO_NAME] @ get machine name - add r0, r0, r4 - bl printascii - mov r0, #'\n' - bl printch - add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc - cmp r5, r6 - blo 1b - adr r0, str_a3 - bl printascii - b __error -str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x" -str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n" -str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n" - .align #endif - - .type __error, %function -__error: #ifdef CONFIG_ARCH_RPC /* * Turn the screen red on a error - RiscPC only. @@ -429,6 +339,11 @@ __error: 1: mov r0, r0 b 1b +#ifdef CONFIG_DEBUG_LL +err_str: + .asciz "\nError: " + .align +#endif /* * Read processor ID register (CP#15, CR0), and look up in the linker-built @@ -438,44 +353,35 @@ __error: * calculate the offset. * * Returns: - * r3, r4, r6 corrupted - * r5 = proc_info pointer in physical address space - * r9 = cpuid + * r5, r6, r7 corrupted + * r8 = page table flags + * r9 = processor ID + * r10 = pointer to processor structure */ - .type __lookup_processor_type, %function __lookup_processor_type: - adr r3, 3f - ldmda r3, {r5, r6, r9} - sub r3, r3, r9 @ get offset between virt&phys - add r5, r5, r3 @ convert virt addresses to - add r6, r6, r3 @ physical address space + adr r5, 2f + ldmia r5, {r7, r9, r10} + sub r5, r5, r10 @ convert addresses + add r7, r7, r5 @ to our address space + add r10, r9, r5 mrc p15, 0, r9, c0, c0 @ get processor id -1: ldmia r5, {r3, r4} @ value, mask - and r4, r4, r9 @ mask wanted bits - teq r3, r4 - beq 2f - add r5, r5, #PROC_INFO_SZ @ sizeof(proc_info_list) - cmp r5, r6 - blo 1b - mov r5, #0 @ unknown processor -2: mov pc, lr - -/* - * This provides a C-API version of the above function. - */ -ENTRY(lookup_processor_type) - stmfd sp!, {r4 - r6, r9, lr} - bl __lookup_processor_type - mov r0, r5 - ldmfd sp!, {r4 - r6, r9, pc} +1: ldmia r10, {r5, r6, r8} @ value, mask, mmuflags + and r6, r6, r9 @ mask wanted bits + teq r5, r6 + moveq pc, lr + add r10, r10, #PROC_INFO_SZ @ sizeof(proc_info_list) + cmp r10, r7 + blt 1b + mov r10, #0 @ unknown processor + mov pc, lr /* * Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for * more information about the __proc_info and __arch_info structures. */ +2: .long __proc_info_end .long __proc_info_begin - .long __proc_info_end -3: .long . + .long 2b .long __arch_info_begin .long __arch_info_end @@ -487,31 +393,24 @@ ENTRY(lookup_processor_type) * * r1 = machine architecture number * Returns: - * r3, r4, r6 corrupted - * r5 = mach_info pointer in physical address space + * r2, r3, r4 corrupted + * r5 = physical start address of RAM + * r6 = physical address of IO + * r7 = byte offset into page tables for IO */ - .type __lookup_machine_type, %function -__lookup_machine_type: - adr r3, 3b - ldmia r3, {r4, r5, r6} - sub r3, r3, r4 @ get offset between virt&phys - add r5, r5, r3 @ convert virt addresses to - add r6, r6, r3 @ physical address space -1: ldr r3, [r5, #MACHINFO_TYPE] @ get machine type - teq r3, r1 @ matches loader number? +__lookup_architecture_type: + adr r4, 2b + ldmia r4, {r2, r3, r5, r6, r7} @ throw away r2, r3 + sub r5, r4, r5 @ convert addresses + add r4, r6, r5 @ to our address space + add r7, r7, r5 +1: ldr r5, [r4] @ get machine type + teq r5, r1 @ matches loader number? beq 2f @ found - add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc - cmp r5, r6 - blo 1b - mov r5, #0 @ unknown machine -2: mov pc, lr - -/* - * This provides a C-API version of the above function. - */ -ENTRY(lookup_machine_type) - stmfd sp!, {r4 - r6, lr} - mov r1, r0 - bl __lookup_machine_type - mov r0, r5 - ldmfd sp!, {r4 - r6, pc} + add r4, r4, #SIZEOF_MACHINE_DESC @ next machine_desc + cmp r4, r7 + blt 1b + mov r7, #0 @ unknown architecture + mov pc, lr +2: ldmib r4, {r5, r6, r7} @ found, get results + mov pc, lr diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index ff187f430..5b35e76c3 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -49,19 +48,12 @@ static int noirqdebug; static volatile unsigned long irq_err_count; -static DEFINE_SPINLOCK(irq_controller_lock); +static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(irq_pending); struct irqdesc irq_desc[NR_IRQS]; void (*init_arch_irq)(void) __initdata = NULL; -/* - * No architecture-specific irq_finish function defined in arm/arch/irqs.h. - */ -#ifndef irq_finish -#define irq_finish(irq) do { } while (0) -#endif - /* * Dummy mask/unmask handler */ @@ -93,23 +85,6 @@ static struct irqdesc bad_irq_desc = { .disable_depth = 1, }; -#ifdef CONFIG_SMP -void synchronize_irq(unsigned int irq) -{ - struct irqdesc *desc = irq_desc + irq; - - while (desc->running) - barrier(); -} -EXPORT_SYMBOL(synchronize_irq); - -#define smp_set_running(desc) do { desc->running = 1; } while (0) -#define smp_clear_running(desc) do { desc->running = 0; } while (0) -#else -#define smp_set_running(desc) do { } while (0) -#define smp_clear_running(desc) do { } while (0) -#endif - /** * disable_irq_nosync - disable an irq without waiting * @irq: Interrupt to disable @@ -256,9 +231,6 @@ unlock: } else if (i == NR_IRQS) { #ifdef CONFIG_ARCH_ACORN show_fiq_list(p, v); -#endif -#ifdef CONFIG_SMP - show_ipi_list(p); #endif seq_printf(p, "Err: %10lu\n", irq_err_count); } @@ -357,22 +329,18 @@ void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { struct irqaction *action; - const unsigned int cpu = smp_processor_id(); + const int cpu = smp_processor_id(); desc->triggered = 1; kstat_cpu(cpu).irqs[irq]++; - smp_set_running(desc); - action = desc->action; if (action) { int ret = __do_irq(irq, action, regs); if (ret != IRQ_HANDLED) report_bad_irq(irq, regs, desc, ret); } - - smp_clear_running(desc); } /* @@ -382,7 +350,7 @@ do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { - const unsigned int cpu = smp_processor_id(); + const int cpu = smp_processor_id(); desc->triggered = 1; @@ -446,7 +414,7 @@ void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { struct irqaction *action; - const unsigned int cpu = smp_processor_id(); + const int cpu = smp_processor_id(); desc->triggered = 1; @@ -458,8 +426,6 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) if (likely(!desc->disable_depth)) { kstat_cpu(cpu).irqs[irq]++; - smp_set_running(desc); - /* * Return with this interrupt masked if no action */ @@ -474,8 +440,6 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) !check_irq_lock(desc, irq, regs))) desc->chip->unmask(irq); } - - smp_clear_running(desc); } } @@ -539,8 +503,6 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) if (!list_empty(&irq_pending)) do_pending_irqs(regs); - irq_finish(irq); - spin_unlock(&irq_controller_lock); irq_exit(); } @@ -916,97 +878,8 @@ out: EXPORT_SYMBOL(probe_irq_off); -#ifdef CONFIG_SMP -static void route_irq(struct irqdesc *desc, unsigned int irq, unsigned int cpu) -{ - pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu); - - spin_lock_irq(&irq_controller_lock); - desc->cpu = cpu; - desc->chip->set_cpu(desc, irq, cpu); - spin_unlock_irq(&irq_controller_lock); -} - -#ifdef CONFIG_PROC_FS -static int -irq_affinity_read_proc(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - struct irqdesc *desc = irq_desc + ((int)data); - int len = cpumask_scnprintf(page, count, desc->affinity); - - if (count - len < 2) - return -EINVAL; - page[len++] = '\n'; - page[len] = '\0'; - - return len; -} - -static int -irq_affinity_write_proc(struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - unsigned int irq = (unsigned int)data; - struct irqdesc *desc = irq_desc + irq; - cpumask_t affinity, tmp; - int ret = -EIO; - - if (!desc->chip->set_cpu) - goto out; - - ret = cpumask_parse(buffer, count, affinity); - if (ret) - goto out; - - cpus_and(tmp, affinity, cpu_online_map); - if (cpus_empty(tmp)) { - ret = -EINVAL; - goto out; - } - - desc->affinity = affinity; - route_irq(desc, irq, first_cpu(tmp)); - ret = count; - - out: - return ret; -} -#endif -#endif - void __init init_irq_proc(void) { -#if defined(CONFIG_SMP) && defined(CONFIG_PROC_FS) - struct proc_dir_entry *dir; - int irq; - - dir = proc_mkdir("irq", 0); - if (!dir) - return; - - for (irq = 0; irq < NR_IRQS; irq++) { - struct proc_dir_entry *entry; - struct irqdesc *desc; - char name[16]; - - desc = irq_desc + irq; - memset(name, 0, sizeof(name)); - snprintf(name, sizeof(name) - 1, "%u", irq); - - desc->procdir = proc_mkdir(name, dir); - if (!desc->procdir) - continue; - - entry = create_proc_entry("smp_affinity", 0600, desc->procdir); - if (entry) { - entry->nlink = 1; - entry->data = (void *)irq; - entry->read_proc = irq_affinity_read_proc; - entry->write_proc = irq_affinity_write_proc; - } - } -#endif } void __init init_IRQ(void) @@ -1015,11 +888,6 @@ void __init init_IRQ(void) extern void init_dma(void); int irq; -#ifdef CONFIG_SMP - bad_irq_desc.affinity = CPU_MASK_ALL; - bad_irq_desc.cpu = smp_processor_id(); -#endif - for (irq = 0, desc = irq_desc; irq < NR_IRQS; irq++, desc++) { *desc = bad_irq_desc; INIT_LIST_HEAD(&desc->pend); diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 8f146a4b4..9eb28f865 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -168,11 +168,12 @@ void machine_restart(char * __unused) EXPORT_SYMBOL(machine_restart); -void __show_regs(struct pt_regs *regs) +void show_regs(struct pt_regs * regs) { - unsigned long flags = condition_codes(regs); + unsigned long flags; + + flags = condition_codes(regs); - printk("CPU: %d\n", smp_processor_id()); print_symbol("PC is at %s\n", instruction_pointer(regs)); print_symbol("LR is at %s\n", regs->ARM_lr); printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" @@ -212,14 +213,6 @@ void __show_regs(struct pt_regs *regs) } } -void show_regs(struct pt_regs * regs) -{ - printk("\n"); - printk("Pid: %d, comm: %20s\n", current->pid, current->comm); - __show_regs(regs); - __backtrace(); -} - void show_fpregs(struct user_fp *regs) { int i; @@ -256,6 +249,8 @@ static unsigned long *thread_info_head; static unsigned int nr_thread_info; #define EXTRA_TASK_STRUCT 4 +#define ll_alloc_task_struct() ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) +#define ll_free_task_struct(p) free_pages((unsigned long)(p),1) struct thread_info *alloc_thread_info(struct task_struct *task) { @@ -272,16 +267,17 @@ struct thread_info *alloc_thread_info(struct task_struct *task) } if (!thread) - thread = (struct thread_info *) - __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER); + thread = ll_alloc_task_struct(); -#ifdef CONFIG_DEBUG_STACK_USAGE +#ifdef CONFIG_MAGIC_SYSRQ /* * The stack must be cleared if you want SYSRQ-T to * give sensible stack usage information */ - if (thread) - memzero(thread, THREAD_SIZE); + if (thread) { + char *p = (char *)thread; + memzero(p+KERNEL_STACK_SIZE, KERNEL_STACK_SIZE); + } #endif return thread; } @@ -294,7 +290,7 @@ void free_thread_info(struct thread_info *thread) thread_info_head = p; nr_thread_info += 1; } else - free_pages((unsigned long)thread, THREAD_SIZE_ORDER); + ll_free_task_struct(thread); } /* @@ -347,7 +343,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start, struct thread_info *thread = p->thread_info; struct pt_regs *childregs; - childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_START_SP)) - 1; + childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_SIZE - 8)) - 1; *childregs = *regs; childregs->ARM_r0 = 0; childregs->ARM_sp = stack_start; @@ -356,9 +352,6 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start, thread->cpu_context.sp = (unsigned long)childregs; thread->cpu_context.pc = (unsigned long)ret_from_fork; - if (clone_flags & CLONE_SETTLS) - thread->tp_value = regs->ARM_r3; - return 0; } @@ -444,17 +437,15 @@ EXPORT_SYMBOL(kernel_thread); unsigned long get_wchan(struct task_struct *p) { unsigned long fp, lr; - unsigned long stack_start, stack_end; + unsigned long stack_page; int count = 0; if (!p || p == current || p->state == TASK_RUNNING) return 0; - stack_start = (unsigned long)(p->thread_info + 1); - stack_end = ((unsigned long)p->thread_info) + THREAD_SIZE; - + stack_page = 4096 + (unsigned long)p->thread_info; fp = thread_saved_fp(p); do { - if (fp < stack_start || fp > stack_end) + if (fp < stack_page || fp > 4092+stack_page) return 0; lr = pc_pointer (((unsigned long *)fp)[-1]); if (!in_sched_functions(lr)) diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index bf0e87614..ddb9322f3 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -9,7 +9,6 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include #include #include #include @@ -19,7 +18,6 @@ #include #include #include -#include #include #include @@ -610,44 +608,6 @@ static int ptrace_setfpregs(struct task_struct *tsk, void __user *ufp) sizeof(struct user_fp)) ? -EFAULT : 0; } -#ifdef CONFIG_IWMMXT - -/* - * Get the child iWMMXt state. - */ -static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) -{ - struct thread_info *thread = tsk->thread_info; - void *ptr = &thread->fpstate; - - if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) - return -ENODATA; - iwmmxt_task_disable(thread); /* force it to ram */ - /* The iWMMXt state is stored doubleword-aligned. */ - if (((long) ptr) & 4) - ptr += 4; - return copy_to_user(ufp, ptr, 0x98) ? -EFAULT : 0; -} - -/* - * Set the child iWMMXt state. - */ -static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) -{ - struct thread_info *thread = tsk->thread_info; - void *ptr = &thread->fpstate; - - if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) - return -EACCES; - iwmmxt_task_release(thread); /* force a reload */ - /* The iWMMXt state is stored doubleword-aligned. */ - if (((long) ptr) & 4) - ptr += 4; - return copy_from_user(ptr, ufp, 0x98) ? -EFAULT : 0; -} - -#endif - static int do_ptrace(int request, struct task_struct *child, long addr, long data) { unsigned long tmp; @@ -694,7 +654,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat case PTRACE_SYSCALL: case PTRACE_CONT: ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); @@ -729,7 +689,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat */ case PTRACE_SINGLESTEP: ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; child->ptrace |= PT_SINGLESTEP; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); @@ -759,21 +719,6 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat ret = ptrace_setfpregs(child, (void __user *)data); break; -#ifdef CONFIG_IWMMXT - case PTRACE_GETWMMXREGS: - ret = ptrace_getwmmxregs(child, (void __user *)data); - break; - - case PTRACE_SETWMMXREGS: - ret = ptrace_setwmmxregs(child, (void __user *)data); - break; -#endif - - case PTRACE_GET_THREAD_AREA: - ret = put_user(child->thread_info->tp_value, - (unsigned long __user *) data); - break; - default: ret = ptrace_request(child, request, addr, data); break; diff --git a/arch/arm/kernel/semaphore.c b/arch/arm/kernel/semaphore.c index ac423e3e2..c232d3777 100644 --- a/arch/arm/kernel/semaphore.c +++ b/arch/arm/kernel/semaphore.c @@ -54,7 +54,7 @@ void __up(struct semaphore *sem) wake_up(&sem->wait); } -static DEFINE_SPINLOCK(semaphore_lock); +static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED; void __sched __down(struct semaphore * sem) { @@ -178,7 +178,7 @@ int __down_trylock(struct semaphore * sem) * registers (r0 to r3 and lr), but not ip, as we use it as a return * value in some cases.. */ -asm(" .section .sched.text,\"ax\" \n\ +asm(" .section .sched.text \n\ .align 5 \n\ .globl __down_failed \n\ __down_failed: \n\ diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c2a7da3ac..a78ccd76e 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -92,6 +91,8 @@ struct cpu_user_fns cpu_user; struct cpu_cache_fns cpu_cache; #endif +unsigned char aux_device_present; + char elf_platform[ELF_PLATFORM_SIZE]; EXPORT_SYMBOL(elf_platform); @@ -107,8 +108,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; #define ENDIANNESS ((char)endian_test.l) -DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data); - /* * Standard memory resources */ @@ -219,12 +218,12 @@ static const char *proc_arch[] = { #define CACHE_M(y) ((y) & (1 << 2)) #define CACHE_LINE(y) ((y) & 3) -static inline void dump_cache(const char *prefix, int cpu, unsigned int cache) +static inline void dump_cache(const char *prefix, unsigned int cache) { unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0); - printk("CPU%u: %s: %d bytes, associativity %d, %d byte lines, %d sets\n", - cpu, prefix, + printk("%s: %d bytes, associativity %d, %d byte lines, %d sets\n", + prefix, mult << (8 + CACHE_SIZE(cache)), (mult << CACHE_ASSOC(cache)) >> 1, 8 << CACHE_LINE(cache), @@ -232,18 +231,18 @@ static inline void dump_cache(const char *prefix, int cpu, unsigned int cache) CACHE_LINE(cache))); } -static void __init dump_cpu_info(int cpu) +static void __init dump_cpu_info(void) { unsigned int info = read_cpuid(CPUID_CACHETYPE); if (info != processor_id) { - printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT", + printk("CPU: D %s %s cache\n", cache_is_vivt() ? "VIVT" : "VIPT", cache_types[CACHE_TYPE(info)]); if (CACHE_S(info)) { - dump_cache("I cache", cpu, CACHE_ISIZE(info)); - dump_cache("D cache", cpu, CACHE_DSIZE(info)); + dump_cache("CPU: I cache", CACHE_ISIZE(info)); + dump_cache("CPU: D cache", CACHE_DSIZE(info)); } else { - dump_cache("cache", cpu, CACHE_ISIZE(info)); + dump_cache("CPU: cache", CACHE_ISIZE(info)); } } } @@ -265,15 +264,9 @@ int cpu_architecture(void) return cpu_arch; } -/* - * These functions re-use the assembly code in head.S, which - * already provide the required functionality. - */ -extern struct proc_info_list *lookup_processor_type(void); -extern struct machine_desc *lookup_machine_type(unsigned int); - static void __init setup_processor(void) { + extern struct proc_info_list __proc_info_begin, __proc_info_end; struct proc_info_list *list; /* @@ -281,8 +274,15 @@ static void __init setup_processor(void) * types. The linker builds this table for us from the * entries in arch/arm/mm/proc-*.S */ - list = lookup_processor_type(); - if (!list) { + for (list = &__proc_info_begin; list < &__proc_info_end ; list++) + if ((processor_id & list->cpu_mask) == list->cpu_val) + break; + + /* + * If processor type is unrecognised, then we + * can do nothing... + */ + if (list >= &__proc_info_end) { printk("CPU configuration botched (ID %08x), unable " "to continue.\n", processor_id); while (1); @@ -307,7 +307,7 @@ static void __init setup_processor(void) cpu_name, processor_id, (int)processor_id & 15, proc_arch[cpu_architecture()]); - dump_cpu_info(smp_processor_id()); + dump_cpu_info(); sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); @@ -318,14 +318,22 @@ static void __init setup_processor(void) static struct machine_desc * __init setup_machine(unsigned int nr) { + extern struct machine_desc __arch_info_begin, __arch_info_end; struct machine_desc *list; /* - * locate machine in the list of supported machines. + * locate architecture in the list of supported architectures. */ - list = lookup_machine_type(nr); - if (!list) { - printk("Machine configuration botched (nr %d), unable " + for (list = &__arch_info_begin; list < &__arch_info_end; list++) + if (list->nr == nr) + break; + + /* + * If the architecture type is not recognised, then we + * can co nothing... + */ + if (list >= &__arch_info_end) { + printk("Architecture configuration botched (nr %d), unable " "to continue.\n", nr); while (1); } @@ -731,15 +739,11 @@ void __init setup_arch(char **cmdline_p) #endif } +static struct cpu cpu[1]; static int __init topology_init(void) { - int cpu; - - for_each_cpu(cpu) - register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu, NULL); - - return 0; + return register_cpu(cpu, 0, NULL); } subsys_initcall(topology_init); @@ -780,18 +784,9 @@ static int c_show(struct seq_file *m, void *v) seq_printf(m, "Processor\t: %s rev %d (%s)\n", cpu_name, (int)processor_id & 15, elf_platform); -#if defined(CONFIG_SMP) - for_each_online_cpu(i) { - seq_printf(m, "Processor\t: %d\n", i); - seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n", - per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ), - (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100); - } -#else /* CONFIG_SMP */ seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", loops_per_jiffy / (500000/HZ), (loops_per_jiffy / (5000/HZ)) % 100); -#endif /* dump out the processor features */ seq_puts(m, "Features\t: "); diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 931919fd5..c1ff9e200 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -102,7 +103,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, if (act) { old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || + if (verify_area(VERIFY_READ, act, sizeof(*act)) || __get_user(new_ka.sa.sa_handler, &act->sa_handler) || __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) return -EFAULT; @@ -114,7 +115,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || + if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) return -EFAULT; @@ -317,7 +318,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs) frame = (struct sigframe __user *)regs->ARM_sp; - if (!access_ok(VERIFY_READ, frame, sizeof (*frame))) + if (verify_area(VERIFY_READ, frame, sizeof (*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.oldmask) || (_NSIG_WORDS > 1 @@ -365,7 +366,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) frame = (struct rt_sigframe __user *)regs->ARM_sp; - if (!access_ok(VERIFY_READ, frame, sizeof (*frame))) + if (verify_area(VERIFY_READ, frame, sizeof (*frame))) goto badframe; if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) goto badframe; @@ -688,8 +689,10 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) if (!user_mode(regs)) return 0; - if (try_to_freeze(0)) + if (current->flags & PF_FREEZE) { + refrigerator(0); goto no_signal; + } if (current->ptrace & PT_SINGLESTEP) ptrace_cancel_bpt(current); diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index f897ce2cc..154099aef 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c @@ -51,6 +51,13 @@ asmlinkage int sys_pipe(unsigned long __user *fildes) return error; } +/* + * This is the lowest virtual address we can permit any user space + * mapping to be mapped at. This is particularly important for + * non-high vector CPUs. + */ +#define MIN_MAP_ADDR (PAGE_SIZE) + /* common code for old and new mmaps */ inline long do_mmap2( unsigned long addr, unsigned long len, @@ -62,7 +69,7 @@ inline long do_mmap2( flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); - if (flags & MAP_FIXED && addr < FIRST_USER_ADDRESS) + if (flags & MAP_FIXED && addr < MIN_MAP_ADDR) goto out; error = -EBADF; @@ -115,7 +122,7 @@ sys_arm_mremap(unsigned long addr, unsigned long old_len, { unsigned long ret = -EINVAL; - if (flags & MREMAP_FIXED && new_addr < FIRST_USER_ADDRESS) + if (flags & MREMAP_FIXED && new_addr < MIN_MAP_ADDR) goto out; down_write(¤t->mm->mmap_sem); @@ -162,11 +169,7 @@ asmlinkage int sys_ipc(uint call, int first, int second, int third, switch (call) { case SEMOP: - return sys_semtimedop (first, (struct sembuf __user *)ptr, second, NULL); - case SEMTIMEDOP: - return sys_semtimedop(first, (struct sembuf __user *)ptr, second, - (const struct timespec __user *)fifth); - + return sys_semop(first, (struct sembuf __user *)ptr, second); case SEMGET: return sys_semget (first, second, third); case SEMCTL: { @@ -238,14 +241,18 @@ asmlinkage int sys_fork(struct pt_regs *regs) /* Clone a task - this clones the calling program thread. * This is called indirectly via a small wrapper */ -asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - int __user *parent_tidptr, int tls_val, - int __user *child_tidptr, struct pt_regs *regs) +asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct pt_regs *regs) { + /* + * We don't support SETTID / CLEARTID + */ + if (clone_flags & (CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID)) + return -EINVAL; + if (!newsp) newsp = regs->ARM_sp; - return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, child_tidptr); + return do_fork(clone_flags, newsp, regs, 0, NULL, NULL); } asmlinkage int sys_vfork(struct pt_regs *regs) @@ -302,7 +309,7 @@ long execve(const char *filename, char **argv, char **envp) "b ret_to_user" : : "r" (current_thread_info()), - "Ir" (THREAD_START_SP - sizeof(regs)), + "Ir" (THREAD_SIZE - 8 - sizeof(regs)), "r" (®s), "Ir" (sizeof(regs)) : "r0", "r1", "r2", "r3", "ip", "memory"); diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index c232f24f4..a46efa25f 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -48,7 +48,7 @@ struct sys_timer *system_timer; extern unsigned long wall_jiffies; /* this needs a better home */ -DEFINE_SPINLOCK(rtc_lock); +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; #ifdef CONFIG_SA1100_RTC_MODULE EXPORT_SYMBOL(rtc_lock); @@ -63,7 +63,7 @@ unsigned long profile_pc(struct pt_regs *regs) unsigned long fp, pc = instruction_pointer(regs); if (in_lock_functions(pc)) { - fp = regs->ARM_fp; + fp = thread_saved_fp(current); pc = pc_pointer(((unsigned long *)fp)[-1]); } @@ -178,7 +178,7 @@ static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size) static SYSDEV_ATTR(event, 0200, NULL, leds_store); -static int leds_suspend(struct sys_device *dev, pm_message_t state) +static int leds_suspend(struct sys_device *dev, u32 state) { leds_event(led_stop); return 0; @@ -351,7 +351,7 @@ void timer_tick(struct pt_regs *regs) } #ifdef CONFIG_PM -static int timer_suspend(struct sys_device *dev, pm_message_t state) +static int timer_suspend(struct sys_device *dev, u32 state) { struct sys_timer *timer = container_of(dev, struct sys_timer, dev); diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 45d2a032d..b80f8cee7 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -31,6 +31,9 @@ #include "ptrace.h" +extern void c_backtrace (unsigned long fp, int pmode); +extern void show_pte(struct mm_struct *mm, unsigned long addr); + const char *processor_modes[]= { "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26", @@ -197,7 +200,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) barrier(); } -DEFINE_SPINLOCK(die_lock); +spinlock_t die_lock = SPIN_LOCK_UNLOCKED; /* * This function is protected against re-entrancy. @@ -213,13 +216,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); print_modules(); - __show_regs(regs); + printk("CPU: %d\n", smp_processor_id()); + show_regs(regs); printk("Process %s (pid: %d, stack limit = 0x%p)\n", tsk->comm, tsk->pid, tsk->thread_info + 1); if (!user_mode(regs) || in_interrupt()) { - dump_mem("Stack: ", regs->ARM_sp, - THREAD_SIZE + (unsigned long)tsk->thread_info); + dump_mem("Stack: ", regs->ARM_sp, 8192+(unsigned long)tsk->thread_info); dump_backtrace(regs, tsk); dump_instr(regs); } @@ -237,21 +240,8 @@ void die_if_kernel(const char *str, struct pt_regs *regs, int err) die(str, regs, err); } -static void notify_die(const char *str, struct pt_regs *regs, siginfo_t *info, - unsigned long err, unsigned long trap) -{ - if (user_mode(regs)) { - current->thread.error_code = err; - current->thread.trap_no = trap; - - force_sig_info(info->si_signo, info, current); - } else { - die(str, regs, err); - } -} - static LIST_HEAD(undef_hook); -static DEFINE_SPINLOCK(undef_lock); +static spinlock_t undef_lock = SPIN_LOCK_UNLOCKED; void register_undef_hook(struct undef_hook *hook) { @@ -309,12 +299,17 @@ asmlinkage void do_undefinstr(struct pt_regs *regs) } #endif + current->thread.error_code = 0; + current->thread.trap_no = 6; + info.si_signo = SIGILL; info.si_errno = 0; info.si_code = ILL_ILLOPC; info.si_addr = pc; - notify_die("Oops - undefined instruction", regs, &info, 0, 6); + force_sig_info(SIGILL, &info, current); + + die_if_kernel("Oops - undefined instruction", regs, 0); } asmlinkage void do_unexp_fiq (struct pt_regs *regs) @@ -367,8 +362,8 @@ static int bad_syscall(int n, struct pt_regs *regs) info.si_addr = (void __user *)instruction_pointer(regs) - (thumb_mode(regs) ? 2 : 4); - notify_die("Oops - bad syscall", regs, &info, n, 0); - + force_sig_info(SIGILL, &info, current); + die_if_kernel("Oops - bad syscall", regs, n); return regs->ARM_r0; } @@ -398,7 +393,6 @@ do_cache_op(unsigned long start, unsigned long end, int flags) #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE) asmlinkage int arm_syscall(int no, struct pt_regs *regs) { - struct thread_info *thread = current_thread_info(); siginfo_t info; if ((no >> 16) != 0x9f) @@ -411,7 +405,9 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) info.si_code = SEGV_MAPERR; info.si_addr = NULL; - notify_die("branch through zero", regs, &info, 0, 0); + force_sig_info(SIGSEGV, &info, current); + + die_if_kernel("branch through zero", regs, 0); return 0; case NR(breakpoint): /* SWI BREAK_POINT */ @@ -449,70 +445,6 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) regs->ARM_cpsr |= MODE32_BIT; return regs->ARM_r0; - case NR(set_tls): - thread->tp_value = regs->ARM_r0; -#if defined(CONFIG_HAS_TLS_REG) - asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (regs->ARM_r0) ); -#elif !defined(CONFIG_TLS_REG_EMUL) - /* - * User space must never try to access this directly. - * Expect your app to break eventually if you do so. - * The user helper at 0xffff0fe0 must be used instead. - * (see entry-armv.S for details) - */ - *((unsigned int *)0xffff0ff0) = regs->ARM_r0; -#endif - return 0; - -#ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG - /* - * Atomically store r1 in *r2 if *r2 is equal to r0 for user space. - * Return zero in r0 if *MEM was changed or non-zero if no exchange - * happened. Also set the user C flag accordingly. - * If access permissions have to be fixed up then non-zero is - * returned and the operation has to be re-attempted. - * - * *NOTE*: This is a ghost syscall private to the kernel. Only the - * __kuser_cmpxchg code in entry-armv.S should be aware of its - * existence. Don't ever use this from user code. - */ - case 0xfff0: - { - extern void do_DataAbort(unsigned long addr, unsigned int fsr, - struct pt_regs *regs); - unsigned long val; - unsigned long addr = regs->ARM_r2; - struct mm_struct *mm = current->mm; - pgd_t *pgd; pmd_t *pmd; pte_t *pte; - - regs->ARM_cpsr &= ~PSR_C_BIT; - spin_lock(&mm->page_table_lock); - pgd = pgd_offset(mm, addr); - if (!pgd_present(*pgd)) - goto bad_access; - pmd = pmd_offset(pgd, addr); - if (!pmd_present(*pmd)) - goto bad_access; - pte = pte_offset_map(pmd, addr); - if (!pte_present(*pte) || !pte_write(*pte)) - goto bad_access; - val = *(unsigned long *)addr; - val -= regs->ARM_r0; - if (val == 0) { - *(unsigned long *)addr = regs->ARM_r1; - regs->ARM_cpsr |= PSR_C_BIT; - } - spin_unlock(&mm->page_table_lock); - return val; - - bad_access: - spin_unlock(&mm->page_table_lock); - /* simulate a read access fault */ - do_DataAbort(addr, 15 + (1 << 11), regs); - return -1; - } -#endif - default: /* Calls 9f00xx..9f07ff are defined to return -ENOSYS if not implemented, rather than raising SIGILL. This @@ -532,7 +464,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) current->pid, current->comm, no); dump_instr(regs); if (user_mode(regs)) { - __show_regs(regs); + show_regs(regs); c_backtrace(regs->ARM_fp, processor_mode(regs)); } } @@ -543,48 +475,11 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) info.si_addr = (void __user *)instruction_pointer(regs) - (thumb_mode(regs) ? 2 : 4); - notify_die("Oops - bad syscall(2)", regs, &info, no, 0); - return 0; -} - -#ifdef CONFIG_TLS_REG_EMUL - -/* - * We might be running on an ARMv6+ processor which should have the TLS - * register but for some reason we can't use it, or maybe an SMP system - * using a pre-ARMv6 processor (there are apparently a few prototypes like - * that in existence) and therefore access to that register must be - * emulated. - */ - -static int get_tp_trap(struct pt_regs *regs, unsigned int instr) -{ - int reg = (instr >> 12) & 15; - if (reg == 15) - return 1; - regs->uregs[reg] = current_thread_info()->tp_value; - regs->ARM_pc += 4; - return 0; -} - -static struct undef_hook arm_mrc_hook = { - .instr_mask = 0x0fff0fff, - .instr_val = 0x0e1d0f70, - .cpsr_mask = PSR_T_BIT, - .cpsr_val = 0, - .fn = get_tp_trap, -}; - -static int __init arm_mrc_hook_init(void) -{ - register_undef_hook(&arm_mrc_hook); + force_sig_info(SIGILL, &info, current); + die_if_kernel("Oops - bad syscall(2)", regs, no); return 0; } -late_initcall(arm_mrc_hook_init); - -#endif - void __bad_xchg(volatile void *ptr, int size) { printk("xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n", @@ -617,7 +512,8 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) info.si_code = ILL_ILLOPC; info.si_addr = (void __user *)addr; - notify_die("unknown data abort code", regs, &info, instr, 0); + force_sig_info(SIGILL, &info, current); + die_if_kernel("unknown data abort code", regs, instr); } volatile void __bug(const char *file, int line, void *data) @@ -670,19 +566,9 @@ EXPORT_SYMBOL(abort); void __init trap_init(void) { - extern char __stubs_start[], __stubs_end[]; - extern char __vectors_start[], __vectors_end[]; - extern char __kuser_helper_start[], __kuser_helper_end[]; - int kuser_sz = __kuser_helper_end - __kuser_helper_start; + extern void __trap_init(void); - /* - * Copy the vectors, stubs and kuser helpers (in entry-armv.S) - * into the vector page, mapped at 0xffff0000, and ensure these - * are visible to the instruction stream. - */ - memcpy((void *)0xffff0000, __vectors_start, __vectors_end - __vectors_start); - memcpy((void *)0xffff0200, __stubs_start, __stubs_end - __stubs_start); - memcpy((void *)0xffff1000 - kuser_sz, __kuser_helper_start, kuser_sz); + __trap_init(); flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE); modify_domain(DOMAIN_USER, DOMAIN_CLIENT); } diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c index fdfededfd..1b37ac188 100644 --- a/arch/arm/mach-clps7500/core.c +++ b/arch/arm/mach-clps7500/core.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -306,10 +305,11 @@ static struct irqaction clps7500_timer_irq = { static void __init clps7500_timer_init(void) { ioctime_init(); + setup_irq(IRQ_TIMER, &clps7500_timer_irq); } -static struct sys_timer clps7500_timer = { +static struct clps7500_timer = { .init = clps7500_timer_init, .offset = ioc_timer_gettimeoffset, }; @@ -358,9 +358,9 @@ static struct platform_device serial_device = { }, }; -static void __init clps7500_init(void) +static int __init clps7500_init(void) { - platform_device_register(&serial_device); + return platform_register_device(&serial_device); } MACHINE_START(CLPS7500, "CL-PS7500") @@ -368,7 +368,6 @@ MACHINE_START(CLPS7500, "CL-PS7500") BOOT_MEM(0x10000000, 0x03000000, 0xe0000000) MAPIO(clps7500_map_io) INITIRQ(clps7500_init_irq) - .init_machine = clps7500_init, - .timer = &clps7500_timer, + .timer = &clps7500_timer, MACHINE_END diff --git a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c index ef7eb5dc9..f5181ed48 100644 --- a/arch/arm/mach-ebsa110/io.c +++ b/arch/arm/mach-ebsa110/io.c @@ -153,9 +153,9 @@ u8 __inb8(unsigned int port) * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - ret = __raw_readb((void __iomem *)ISAIO_BASE + (port << 2)); + ret = __raw_readb(ISAIO_BASE + (port << 2)); else { - void __iomem *a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -174,33 +174,45 @@ u8 __inb8(unsigned int port) */ u8 __inb16(unsigned int port) { - unsigned int offset; + u32 ret; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - offset = port << 2; - else - offset = (port & ~1) << 1 | (port & 1); + ret = __raw_readb(ISAIO_BASE + (port << 2)); + else { + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); - return __raw_readb((void __iomem *)ISAIO_BASE + offset); + /* + * Shame nothing else does + */ + ret = __raw_readb(a + (port & 1)); + } + return ret; } u16 __inw(unsigned int port) { - unsigned int offset; + u32 ret; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - offset = port << 2; + ret = __raw_readw(ISAIO_BASE + (port << 2)); else { - offset = port << 1; - BUG_ON(port & 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + + /* + * Shame nothing else does + */ + if (port & 1) + BUG(); + + ret = __raw_readw(a); } - return __raw_readw((void __iomem *)ISAIO_BASE + offset); + return ret; } /* @@ -213,7 +225,7 @@ u32 __inl(unsigned int port) if (SUPERIO_PORT(port) || port & 3) BUG(); - a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); + a = ISAIO_BASE + (port << 1); return __raw_readw(a) | __raw_readw(a + 4) << 16; } @@ -229,9 +241,9 @@ void __outb8(u8 val, unsigned int port) * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - __raw_writeb(val, (void __iomem *)ISAIO_BASE + (port << 2)); + __raw_writeb(val, ISAIO_BASE + (port << 2)); else { - void __iomem *a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -245,33 +257,37 @@ void __outb8(u8 val, unsigned int port) void __outb16(u8 val, unsigned int port) { - unsigned int offset; - /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - offset = port << 2; - else - offset = (port & ~1) << 1 | (port & 1); + __raw_writeb(val, ISAIO_BASE + (port << 2)); + else { + void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); - __raw_writeb(val, (void __iomem *)ISAIO_BASE + offset); + /* + * Shame nothing else does + */ + __raw_writeb(val, a + (port & 1)); + } } void __outw(u16 val, unsigned int port) { - unsigned int offset; + u32 off; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - offset = port << 2; + off = port << 2; else { - offset = port << 1; - BUG_ON(port & 1); + off = port << 1; + if (port & 1) + BUG(); + } - __raw_writew(val, (void __iomem *)ISAIO_BASE + offset); + __raw_writew(val, ISAIO_BASE + off); } void __outl(u32 val, unsigned int port) @@ -284,6 +300,13 @@ EXPORT_SYMBOL(__outb16); EXPORT_SYMBOL(__outw); EXPORT_SYMBOL(__outl); +extern void __arch_writesb(unsigned long virt, const void *from, int len); +extern void __arch_writesw(unsigned long virt, const void *from, int len); +extern void __arch_writesl(unsigned long virt, const void *from, int len); +extern void __arch_readsb(unsigned long virt, void *from, int len); +extern void __arch_readsw(unsigned long virt, void *from, int len); +extern void __arch_readsl(unsigned long virt, void *from, int len); + void outsb(unsigned int port, const void *from, int len) { u32 off; @@ -296,7 +319,7 @@ void outsb(unsigned int port, const void *from, int len) BUG(); } - __raw_writesb((void __iomem *)ISAIO_BASE + off, from, len); + __raw_writesb(ISAIO_BASE + off, from, len); } void insb(unsigned int port, void *from, int len) @@ -311,7 +334,7 @@ void insb(unsigned int port, void *from, int len) BUG(); } - __raw_readsb((void __iomem *)ISAIO_BASE + off, from, len); + __raw_readsb(ISAIO_BASE + off, from, len); } EXPORT_SYMBOL(outsb); @@ -329,7 +352,7 @@ void outsw(unsigned int port, const void *from, int len) BUG(); } - __raw_writesw((void __iomem *)ISAIO_BASE + off, from, len); + __raw_writesw(ISAIO_BASE + off, from, len); } void insw(unsigned int port, void *from, int len) @@ -344,7 +367,7 @@ void insw(unsigned int port, void *from, int len) BUG(); } - __raw_readsw((void __iomem *)ISAIO_BASE + off, from, len); + __raw_readsw(ISAIO_BASE + off, from, len); } EXPORT_SYMBOL(outsw); @@ -361,7 +384,7 @@ void outsl(unsigned int port, const void *from, int len) if (SUPERIO_PORT(port) || port & 3) BUG(); - __raw_writesw((void __iomem *)ISAIO_BASE + off, from, len << 1); + __raw_writesw(ISAIO_BASE + off, from, len << 1); } void insl(unsigned int port, void *from, int len) @@ -371,7 +394,7 @@ void insl(unsigned int port, void *from, int len) if (SUPERIO_PORT(port) || port & 3) BUG(); - __raw_readsw((void __iomem *)ISAIO_BASE + off, from, len << 1); + __raw_readsw(ISAIO_BASE + off, from, len << 1); } EXPORT_SYMBOL(outsl); diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index bd17b5154..eb16dea60 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c @@ -115,7 +115,7 @@ arch_initcall(integrator_init); #define CM_CTRL IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_CTRL_OFFSET -static DEFINE_SPINLOCK(cm_lock); +static spinlock_t cm_lock = SPIN_LOCK_UNLOCKED; /** * cm_control - update the CM_CTRL register. @@ -216,9 +216,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) write_seqlock(&xtime_lock); - /* - * clear the interrupt - */ + // ...clear the interrupt timer1->TimerClear = 1; timer_tick(regs); @@ -266,7 +264,7 @@ void __init integrator_time_init(unsigned long reload, unsigned int ctrl) timer1->TimerValue = timer_reload; timer1->TimerControl = timer_ctrl; - /* + /* * Make irqs happen for the system timer */ setup_irq(IRQ_TIMERINT1, &integrator_timer_irq); diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index c3c2f17d0..0859557e7 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -35,7 +34,7 @@ module_param_named(lmid, module_id, int, 0444); MODULE_PARM_DESC(lmid, "logic module stack position"); struct impd1_module { - void __iomem *base; + void *base; struct clk vcos[2]; }; @@ -260,17 +259,6 @@ static int impd1fb_clcd_setup(struct clcd_fb *fb) return ret; } -static int impd1fb_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) -{ - unsigned long start, size; - - start = vma->vm_pgoff + (fb->fb.fix.smem_start >> PAGE_SHIFT); - size = vma->vm_end - vma->vm_start; - - return remap_pfn_range(vma, vma->vm_start, start, size, - vma->vm_page_prot); -} - static void impd1fb_clcd_remove(struct clcd_fb *fb) { iounmap(fb->fb.screen_base); @@ -284,7 +272,6 @@ static struct clcd_board impd1_clcd_data = { .disable = impd1fb_clcd_disable, .enable = impd1fb_clcd_enable, .setup = impd1fb_clcd_setup, - .mmap = impd1fb_clcd_mmap, .remove = impd1fb_clcd_remove, }; diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 91ba9fd79..ad667711d 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c @@ -68,6 +68,7 @@ * f1200000 12000000 EBI registers * f1300000 13000000 Counter/Timer * f1400000 14000000 Interrupt controller + * f1500000 15000000 RTC * f1600000 16000000 UART 0 * f1700000 17000000 UART 1 * f1a00000 1a000000 Debug LEDs @@ -80,6 +81,7 @@ static struct map_desc ap_io_desc[] __initdata = { { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K, MT_DEVICE }, + { IO_ADDRESS(INTEGRATOR_RTC_BASE), INTEGRATOR_RTC_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, @@ -137,7 +139,7 @@ static void __init ap_init_irq(void) #ifdef CONFIG_PM static unsigned long ic_irq_enable; -static int irq_suspend(struct sys_device *dev, pm_message_t state) +static int irq_suspend(struct sys_device *dev, u32 state) { ic_irq_enable = readl(VA_IC_BASE + IRQ_ENABLE); return 0; diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index e0a01eef0..19809bba4 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -83,6 +83,7 @@ static struct map_desc intcp_io_desc[] __initdata = { { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, + { 0xfc900000, 0xc9000000, SZ_4K, MT_DEVICE }, { 0xfca00000, 0xca000000, SZ_4K, MT_DEVICE }, { 0xfcb00000, 0xcb000000, SZ_4K, MT_DEVICE }, }; @@ -419,22 +420,7 @@ static struct clcd_panel vga = { */ static void cp_clcd_enable(struct clcd_fb *fb) { - u32 val; - - if (fb->fb.var.bits_per_pixel <= 8) - val = CM_CTRL_LCDMUXSEL_VGA_8421BPP; - else if (fb->fb.var.bits_per_pixel <= 16) - val = CM_CTRL_LCDMUXSEL_VGA_16BPP; - else - val = 0; /* no idea for this, don't trust the docs */ - - cm_control(CM_CTRL_LCDMUXSEL_MASK| - CM_CTRL_LCDEN0| - CM_CTRL_LCDEN1| - CM_CTRL_STATIC1| - CM_CTRL_STATIC2| - CM_CTRL_STATIC| - CM_CTRL_n24BITEN, val); + cm_control(CM_CTRL_LCDMUXSEL_MASK, CM_CTRL_LCDMUXSEL_VGA); } static unsigned long framesize = SZ_1M; @@ -458,14 +444,6 @@ static int cp_clcd_setup(struct clcd_fb *fb) return 0; } -static int cp_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) -{ - return dma_mmap_writecombine(&fb->dev->dev, vma, - fb->fb.screen_base, - fb->fb.fix.smem_start, - fb->fb.fix.smem_len); -} - static void cp_clcd_remove(struct clcd_fb *fb) { dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, @@ -478,7 +456,6 @@ static struct clcd_board clcd_data = { .decode = clcdfb_decode, .enable = cp_clcd_enable, .setup = cp_clcd_setup, - .mmap = cp_clcd_mmap, .remove = cp_clcd_remove, }; diff --git a/arch/arm/mach-iop3xx/iop310-irq.c b/arch/arm/mach-iop3xx/iop310-irq.c new file mode 100644 index 000000000..a05e7e958 --- /dev/null +++ b/arch/arm/mach-iop3xx/iop310-irq.c @@ -0,0 +1,111 @@ +/* + * linux/arch/arm/mach-iop3xx/iop310-irq.c + * + * Generic IOP310 IRQ handling functionality + * + * Author: Nicolas Pitre + * Copyright: (C) 2001 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Added IOP310 chipset and IQ80310 board demuxing, masking code. - DS + * + */ +#include +#include +#include + +#include +#include +#include + +extern void xs80200_irq_mask(unsigned int); +extern void xs80200_irq_unmask(unsigned int); +extern void xs80200_init_irq(void); + +extern void do_IRQ(int, struct pt_regs *); + +static u32 iop310_mask /* = 0 */; + +static void iop310_irq_mask (unsigned int irq) +{ + iop310_mask ++; + + /* + * No mask bits on the 80312, so we have to + * mask everything from the outside! + */ + if (iop310_mask == 1) { + disable_irq(IRQ_XS80200_EXTIRQ); + irq_desc[IRQ_XS80200_EXTIRQ].chip->mask(IRQ_XS80200_EXTIRQ); + } +} + +static void iop310_irq_unmask (unsigned int irq) +{ + if (iop310_mask) + iop310_mask --; + + /* + * Check if all 80312 sources are unmasked now + */ + if (iop310_mask == 0) + enable_irq(IRQ_XS80200_EXTIRQ); +} + +struct irqchip ext_chip = { + .ack = iop310_irq_mask, + .mask = iop310_irq_mask, + .unmask = iop310_irq_unmask, +}; + +void +iop310_irq_demux(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + u32 fiq1isr = *((volatile u32*)IOP310_FIQ1ISR); + u32 fiq2isr = *((volatile u32*)IOP310_FIQ2ISR); + struct irqdesc *d; + unsigned int irqno = 0; + + if(fiq1isr) + { + if(fiq1isr & 0x1) + irqno = IRQ_IOP310_DMA0; + if(fiq1isr & 0x2) + irqno = IRQ_IOP310_DMA1; + if(fiq1isr & 0x4) + irqno = IRQ_IOP310_DMA2; + if(fiq1isr & 0x10) + irqno = IRQ_IOP310_PMON; + if(fiq1isr & 0x20) + irqno = IRQ_IOP310_AAU; + } + else + { + if(fiq2isr & 0x2) + irqno = IRQ_IOP310_I2C; + if(fiq2isr & 0x4) + irqno = IRQ_IOP310_MU; + } + + if (irqno) { + d = irq_desc + irqno; + d->handle(irqno, d, regs); + } +} + +void __init iop310_init_irq(void) +{ + unsigned int i; + + for(i = IOP310_IRQ_OFS; i < NR_IOP310_IRQS; i++) + { + set_irq_chip(i, &ext_chip); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); + } + + xs80200_init_irq(); +} diff --git a/arch/arm/mach-iop3xx/iop310-pci.c b/arch/arm/mach-iop3xx/iop310-pci.c new file mode 100644 index 000000000..8e5401384 --- /dev/null +++ b/arch/arm/mach-iop3xx/iop310-pci.c @@ -0,0 +1,434 @@ +/* + * arch/arm/mach-iop3xx/iop310-pci.c + * + * PCI support for the Intel IOP310 chipset + * + * Matt Porter + * + * Copyright (C) 2001 MontaVista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +/* + * *** Special note - why the IOP310 should NOT be used *** + * + * The PCI ATU is a brain dead implementation, only allowing 32-bit + * accesses to PCI configuration space. This is especially brain + * dead for writes to this space. A simple for-instance: + * + * You want to modify the command register *without* corrupting the + * status register. + * + * To perform this, you need to read *32* bits of data from offset 4, + * mask off the low 16, replace them with the new data, and write *32* + * bits back. + * + * Writing the status register at offset 6 with status bits set *clears* + * the status. + * + * Hello? Could we have a *SANE* implementation of a PCI ATU some day + * *PLEASE*? + */ +#undef DEBUG +#ifdef DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) do { } while (0) +#endif + +/* + * Calculate the address, etc from the bus, devfn and register + * offset. Note that we have two root buses, so we need some + * method to determine whether we need config type 0 or 1 cycles. + * We use a root bus number in our bus->sysdata structure for this. + */ +static u32 iop310_cfg_address(struct pci_bus *bus, int devfn, int where) +{ + struct pci_sys_data *sys = bus->sysdata; + u32 addr; + + if (sys->busnr == bus->number) + addr = 1 << (PCI_SLOT(devfn) + 16); + else + addr = bus->number << 16 | PCI_SLOT(devfn) << 11 | 1; + + addr |= PCI_FUNC(devfn) << 8 | (where & ~3); + + return addr; +} + +/* + * Primary PCI interface support. + */ +static int iop310_pri_pci_status(void) +{ + unsigned int status; + int ret = 0; + + status = *IOP310_PATUSR; + if (status & 0xf900) { + *IOP310_PATUSR = status & 0xf900; + ret = 1; + } + status = *IOP310_PATUISR; + if (status & 0x0000018f) { + *IOP310_PATUISR = status & 0x0000018f; + ret = 1; + } + status = *IOP310_PSR; + if (status & 0xf900) { + *IOP310_PSR = status & 0xf900; + ret = 1; + } + status = *IOP310_PBISR; + if (status & 0x003f) { + *IOP310_PBISR = status & 0x003f; + ret = 1; + } + return ret; +} + +/* + * Simply write the address register and read the configuration + * data. Note that the 4 nop's ensure that we are able to handle + * a delayed abort (in theory.) + */ +static inline u32 iop310_pri_read(unsigned long addr) +{ + u32 val; + + __asm__ __volatile__( + "str %1, [%2]\n\t" + "ldr %0, [%3]\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + : "=r" (val) + : "r" (addr), "r" (IOP310_POCCAR), "r" (IOP310_POCCDR)); + + return val; +} + +static int +iop310_pri_read_config(struct pci_bus *bus, unsigned int devfn, int where, + int size, u32 *value) +{ + unsigned long addr = iop310_cfg_address(bus, devfn, where); + u32 val = iop310_pri_read(addr) >> ((where & 3) * 8); + + if (iop310_pri_pci_status()) + val = 0xffffffff; + + *value = val; + + return PCIBIOS_SUCCESSFUL; +} + +static int +iop310_pri_write_config(struct pci_bus *bus, unsigned int devfn, int where, + int size, u32 value) +{ + unsigned long addr = iop310_cfg_address(bus, devfn, where); + u32 val; + + if (size != 4) { + val = iop310_pri_read(addr); + if (!iop310_pri_pci_status() == 0) + return PCIBIOS_SUCCESSFUL; + + where = (where & 3) * 8; + + if (size == 1) + val &= ~(0xff << where); + else + val &= ~(0xffff << where); + + *IOP310_POCCDR = val | value << where; + } else { + asm volatile( + "str %1, [%2]\n\t" + "str %0, [%3]\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + : + : "r" (value), "r" (addr), + "r" (IOP310_POCCAR), "r" (IOP310_POCCDR)); + } + + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops iop310_primary_ops = { + .read = iop310_pri_read_config, + .write = iop310_pri_write_config, +}; + +/* + * Secondary PCI interface support. + */ +static int iop310_sec_pci_status(void) +{ + unsigned int usr, uisr; + int ret = 0; + + usr = *IOP310_SATUSR; + uisr = *IOP310_SATUISR; + if (usr & 0xf900) { + *IOP310_SATUSR = usr & 0xf900; + ret = 1; + } + if (uisr & 0x0000069f) { + *IOP310_SATUISR = uisr & 0x0000069f; + ret = 1; + } + if (ret) + DBG("ERROR (%08x %08x)", usr, uisr); + return ret; +} + +/* + * Simply write the address register and read the configuration + * data. Note that the 4 nop's ensure that we are able to handle + * a delayed abort (in theory.) + */ +static inline u32 iop310_sec_read(unsigned long addr) +{ + u32 val; + + __asm__ __volatile__( + "str %1, [%2]\n\t" + "ldr %0, [%3]\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + : "=r" (val) + : "r" (addr), "r" (IOP310_SOCCAR), "r" (IOP310_SOCCDR)); + + return val; +} + +static int +iop310_sec_read_config(struct pci_bus *bus, unsigned int devfn, int where, + int size, u32 *value) +{ + unsigned long addr = iop310_cfg_address(bus, devfn, where); + u32 val = iop310_sec_read(addr) >> ((where & 3) * 8); + + if (iop310_sec_pci_status()) + val = 0xffffffff; + + *value = val; + + return PCIBIOS_SUCCESSFUL; +} + +static int +iop310_sec_write_config(struct pci_bus *bus, unsigned int devfn, int where, + int size, u32 value) +{ + unsigned long addr = iop310_cfg_address(bus, devfn, where); + u32 val; + + if (size != 4) { + val = iop310_sec_read(addr); + + if (!iop310_sec_pci_status() == 0) + return PCIBIOS_SUCCESSFUL; + + where = (where & 3) * 8; + + if (size == 1) + val &= ~(0xff << where); + else + val &= ~(0xffff << where); + + *IOP310_SOCCDR = val | value << where; + } else { + asm volatile( + "str %1, [%2]\n\t" + "str %0, [%3]\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + : + : "r" (value), "r" (addr), + "r" (IOP310_SOCCAR), "r" (IOP310_SOCCDR)); + } + + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops iop310_secondary_ops = { + .read = iop310_sec_read_config, + .write = iop310_sec_write_config, +}; + +/* + * When a PCI device does not exist during config cycles, the 80200 gets + * an external abort instead of returning 0xffffffff. If it was an + * imprecise abort, we need to correct the return address to point after + * the instruction. Also note that the Xscale manual says: + * + * "if a stall-until-complete LD or ST instruction triggers an + * imprecise fault, then that fault will be seen by the program + * within 3 instructions." + * + * This does not appear to be the case. With 8 NOPs after the load, we + * see the imprecise abort occurring on the STM of iop310_sec_pci_status() + * which is about 10 instructions away. + * + * Always trust reality! + */ +static int +iop310_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +{ + DBG("PCI abort: address = 0x%08lx fsr = 0x%03x PC = 0x%08lx LR = 0x%08lx\n", + addr, fsr, regs->ARM_pc, regs->ARM_lr); + + /* + * If it was an imprecise abort, then we need to correct the + * return address to be _after_ the instruction. + */ + if (fsr & (1 << 10)) + regs->ARM_pc += 4; + + return 0; +} + +/* + * Scan an IOP310 PCI bus. sys->bus defines which bus we scan. + */ +struct pci_bus *iop310_scan_bus(int nr, struct pci_sys_data *sys) +{ + struct pci_ops *ops; + + if (nr) + ops = &iop310_secondary_ops; + else + ops = &iop310_primary_ops; + + return pci_scan_bus(sys->busnr, ops, sys); +} + +/* + * Setup the system data for controller 'nr'. Return 0 if none found, + * 1 if found, or negative error. + * + * We can alter: + * io_offset - offset between IO resources and PCI bus BARs + * mem_offset - offset between mem resources and PCI bus BARs + * resource[0] - parent IO resource + * resource[1] - parent non-prefetchable memory resource + * resource[2] - parent prefetchable memory resource + * swizzle - bridge swizzling function + * map_irq - irq mapping function + * + * Note that 'io_offset' and 'mem_offset' are left as zero since + * the IOP310 doesn't attempt to perform any address translation + * on accesses from the host to the bus. + */ +int iop310_setup(int nr, struct pci_sys_data *sys) +{ + struct resource *res; + + if (nr >= 2) + return 0; + + res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); + if (!res) + panic("PCI: unable to alloc resources"); + + memset(res, 0, sizeof(struct resource) * 2); + + switch (nr) { + case 0: + res[0].start = IOP310_PCIPRI_LOWER_IO + 0x6e000000; + res[0].end = IOP310_PCIPRI_LOWER_IO + 0x6e00ffff; + res[0].name = "PCI IO Primary"; + res[0].flags = IORESOURCE_IO; + + res[1].start = IOP310_PCIPRI_LOWER_MEM; + res[1].end = IOP310_PCIPRI_LOWER_MEM + IOP310_PCI_WINDOW_SIZE; + res[1].name = "PCI Memory Primary"; + res[1].flags = IORESOURCE_MEM; + break; + + case 1: + res[0].start = IOP310_PCISEC_LOWER_IO + 0x6e000000; + res[0].end = IOP310_PCISEC_LOWER_IO + 0x6e00ffff; + res[0].name = "PCI IO Secondary"; + res[0].flags = IORESOURCE_IO; + + res[1].start = IOP310_PCISEC_LOWER_MEM; + res[1].end = IOP310_PCISEC_LOWER_MEM + IOP310_PCI_WINDOW_SIZE; + res[1].name = "PCI Memory Secondary"; + res[1].flags = IORESOURCE_MEM; + break; + } + + request_resource(&ioport_resource, &res[0]); + request_resource(&iomem_resource, &res[1]); + + sys->resource[0] = &res[0]; + sys->resource[1] = &res[1]; + sys->resource[2] = NULL; + sys->io_offset = 0x6e000000; + + return 1; +} + +void iop310_init(void) +{ + DBG("PCI: Intel 80312 PCI-to-PCI init code.\n"); + DBG(" ATU secondary: ATUCR =0x%08x\n", *IOP310_ATUCR); + DBG(" ATU secondary: SOMWVR=0x%08x SOIOWVR=0x%08x\n", + *IOP310_SOMWVR, *IOP310_SOIOWVR); + DBG(" ATU secondary: SIABAR=0x%08x SIALR =0x%08x SIATVR=%08x\n", + *IOP310_SIABAR, *IOP310_SIALR, *IOP310_SIATVR); + DBG(" ATU primary: POMWVR=0x%08x POIOWVR=0x%08x\n", + *IOP310_POMWVR, *IOP310_POIOWVR); + DBG(" ATU primary: PIABAR=0x%08x PIALR =0x%08x PIATVR=%08x\n", + *IOP310_PIABAR, *IOP310_PIALR, *IOP310_PIATVR); + DBG(" P2P: PCR=0x%04x BCR=0x%04x EBCR=0x%04x\n", + *IOP310_PCR, *IOP310_BCR, *IOP310_EBCR); + + /* + * Windows have to be carefully opened via a nice set of calls + * here or just some direct register fiddling in the board + * specific init when we want transactions to occur between the + * two PCI hoses. + * + * To do this, we will have manage RETRY assertion between the + * firmware and the kernel. This will ensure that the host + * system's enumeration code is held off until we have tweaked + * the interrupt routing and public/private IDSELs. + * + * For now we will simply default to disabling the integrated type + * 81 P2P bridge. + */ + *IOP310_PCR &= 0xfff8; + + hook_fault_code(16+6, iop310_pci_abort, SIGBUS, "imprecise external abort"); +} diff --git a/arch/arm/mach-iop3xx/iq80310-irq.c b/arch/arm/mach-iop3xx/iq80310-irq.c new file mode 100644 index 000000000..933153781 --- /dev/null +++ b/arch/arm/mach-iop3xx/iq80310-irq.c @@ -0,0 +1,139 @@ +/* + * linux/arch/arm/mach-iop3xx/iq80310-irq.c + * + * IRQ hadling/demuxing for IQ80310 board + * + * Author: Nicolas Pitre + * Copyright: (C) 2001 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 2.4.7-rmk1-iop310.1 + * Moved demux from asm to C - DS + * Fixes for various revision boards - DS + */ +#include +#include + +#include +#include +#include +#include + +extern void iop310_init_irq(void); +extern void iop310_irq_demux(unsigned int, struct irqdesc *, struct pt_regs *); + +static void iq80310_irq_mask(unsigned int irq) +{ + *(volatile char *)IQ80310_INT_MASK |= (1 << (irq - IQ80310_IRQ_OFS)); +} + +static void iq80310_irq_unmask(unsigned int irq) +{ + *(volatile char *)IQ80310_INT_MASK &= ~(1 << (irq - IQ80310_IRQ_OFS)); +} + +static struct irqchip iq80310_irq_chip = { + .ack = iq80310_irq_mask, + .mask = iq80310_irq_mask, + .unmask = iq80310_irq_unmask, +}; + +extern struct irqchip ext_chip; + +static void +iq80310_cpld_irq_handler(unsigned int irq, struct irqdesc *desc, + struct pt_regs *regs) +{ + unsigned int irq_stat = *(volatile u8*)IQ80310_INT_STAT; + unsigned int irq_mask = *(volatile u8*)IQ80310_INT_MASK; + unsigned int i, handled = 0; + struct irqdesc *d; + + desc->chip->ack(irq); + + /* + * Mask out the interrupts which aren't enabled. + */ + irq_stat &= 0x1f & ~irq_mask; + + /* + * Test each IQ80310 CPLD interrupt + */ + for (i = IRQ_IQ80310_TIMER, d = irq_desc + IRQ_IQ80310_TIMER; + irq_stat; i++, d++, irq_stat >>= 1) + if (irq_stat & 1) { + d->handle(i, d, regs); + handled++; + } + + /* + * If running on a board later than REV D.1, we can + * decode the PCI interrupt status. + */ + if (system_rev) { + irq_stat = *((volatile u8*)IQ80310_PCI_INT_STAT) & 7; + + for (i = IRQ_IQ80310_INTA, d = irq_desc + IRQ_IQ80310_INTA; + irq_stat; i++, d++, irq_stat >>= 1) + if (irq_stat & 0x1) { + d->handle(i, d, regs); + handled++; + } + } + + /* + * If on a REV D.1 or lower board, we just assumed INTA + * since PCI is not routed, and it may actually be an + * on-chip interrupt. + * + * Note that we're giving on-chip interrupts slightly + * higher priority than PCI by handling them first. + * + * On boards later than REV D.1, if we didn't read a + * CPLD interrupt, we assume it's from a device on the + * chipset itself. + */ + if (system_rev == 0 || handled == 0) + iop310_irq_demux(irq, desc, regs); + + desc->chip->unmask(irq); +} + +void __init iq80310_init_irq(void) +{ + volatile char *mask = (volatile char *)IQ80310_INT_MASK; + unsigned int i; + + iop310_init_irq(); + + /* + * Setup PIRSR to route PCI interrupts into xs80200 + */ + *IOP310_PIRSR = 0xff; + + /* + * Setup the IRQs in the FE820000/FE860000 registers + */ + for (i = IQ80310_IRQ_OFS; i <= IRQ_IQ80310_INTD; i++) { + set_irq_chip(i, &iq80310_irq_chip); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); + } + + /* + * Setup the PCI IRQs + */ + for (i = IRQ_IQ80310_INTA; i < IRQ_IQ80310_INTC; i++) { + set_irq_chip(i, &ext_chip); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID); + } + + *mask = 0xff; /* mask all sources */ + + set_irq_chained_handler(IRQ_XS80200_EXTIRQ, + &iq80310_cpld_irq_handler); +} diff --git a/arch/arm/mach-iop3xx/iq80310-pci.c b/arch/arm/mach-iop3xx/iq80310-pci.c new file mode 100644 index 000000000..fa92f3e8a --- /dev/null +++ b/arch/arm/mach-iop3xx/iq80310-pci.c @@ -0,0 +1,164 @@ +/* + * arch/arm/mach-iop3xx/iq80310-pci.c + * + * PCI support for the Intel IQ80310 reference board + * + * Matt Porter + * + * Copyright (C) 2001 MontaVista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +#include +#include +#include +#include + +/* + * The following macro is used to lookup irqs in a standard table + * format for those systems that do not already have PCI + * interrupts properly routed. We assume 1 <= pin <= 4 + */ +#define PCI_IRQ_TABLE_LOOKUP(minid,maxid) \ +({ int _ctl_ = -1; \ + unsigned int _idsel = idsel - minid; \ + if (_idsel <= maxid) \ + _ctl_ = pci_irq_table[_idsel][pin-1]; \ + _ctl_; }) + +#define INTA IRQ_IQ80310_INTA +#define INTB IRQ_IQ80310_INTB +#define INTC IRQ_IQ80310_INTC +#define INTD IRQ_IQ80310_INTD + +#define INTE IRQ_IQ80310_I82559 + +typedef u8 irq_table[4]; + +/* + * IRQ tables for primary bus. + * + * On a Rev D.1 and older board, INT A-C are not routed, so we + * just fake it as INTA and than we take care of handling it + * correctly in the IRQ demux routine. + */ +static irq_table pci_pri_d_irq_table[] = { +/* Pin: A B C D */ + { INTA, INTD, INTA, INTA }, /* PCI Slot J3 */ + { INTD, INTA, INTA, INTA }, /* PCI Slot J4 */ +}; + +static irq_table pci_pri_f_irq_table[] = { +/* Pin: A B C D */ + { INTC, INTD, INTA, INTB }, /* PCI Slot J3 */ + { INTD, INTA, INTB, INTC }, /* PCI Slot J4 */ +}; + +static int __init +iq80310_pri_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) +{ + irq_table *pci_irq_table; + + BUG_ON(pin < 1 || pin > 4); + + if (!system_rev) { + pci_irq_table = pci_pri_d_irq_table; + } else { + pci_irq_table = pci_pri_f_irq_table; + } + + return PCI_IRQ_TABLE_LOOKUP(2, 3); +} + +/* + * IRQ tables for secondary bus. + * + * On a Rev D.1 and older board, INT A-C are not routed, so we + * just fake it as INTA and than we take care of handling it + * correctly in the IRQ demux routine. + */ +static irq_table pci_sec_d_irq_table[] = { +/* Pin: A B C D */ + { INTA, INTA, INTA, INTD }, /* PCI Slot J1 */ + { INTA, INTA, INTD, INTA }, /* PCI Slot J5 */ + { INTE, INTE, INTE, INTE }, /* P2P Bridge */ +}; + +static irq_table pci_sec_f_irq_table[] = { +/* Pin: A B C D */ + { INTA, INTB, INTC, INTD }, /* PCI Slot J1 */ + { INTB, INTC, INTD, INTA }, /* PCI Slot J5 */ + { INTE, INTE, INTE, INTE }, /* P2P Bridge */ +}; + +static int __init +iq80310_sec_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) +{ + irq_table *pci_irq_table; + + BUG_ON(pin < 1 || pin > 4); + + if (!system_rev) { + pci_irq_table = pci_sec_d_irq_table; + } else { + pci_irq_table = pci_sec_f_irq_table; + } + + return PCI_IRQ_TABLE_LOOKUP(0, 2); +} + +static int iq80310_pri_host; + +static int iq80310_setup(int nr, struct pci_sys_data *sys) +{ + switch (nr) { + case 0: + if (!iq80310_pri_host) + return 0; + + sys->map_irq = iq80310_pri_map_irq; + break; + + case 1: + sys->map_irq = iq80310_sec_map_irq; + break; + + default: + return 0; + } + + return iop310_setup(nr, sys); +} + +static void iq80310_preinit(void) +{ + iq80310_pri_host = *(volatile u32 *)IQ80310_BACKPLANE & 1; + + printk(KERN_INFO "PCI: IQ80310 is a%s\n", + iq80310_pri_host ? " system controller" : "n agent"); + + iop310_init(); +} + +static struct hw_pci iq80310_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 2, + .setup = iq80310_setup, + .scan = iop310_scan_bus, + .preinit = iq80310_preinit, +}; + +static int __init iq80310_pci_init(void) +{ + if (machine_is_iq80310()) + pci_common_init(&iq80310_pci); + return 0; +} + +subsys_initcall(iq80310_pci_init); diff --git a/arch/arm/mach-iop3xx/iq80310-time.c b/arch/arm/mach-iop3xx/iq80310-time.c new file mode 100644 index 000000000..2698938d9 --- /dev/null +++ b/arch/arm/mach-iop3xx/iq80310-time.c @@ -0,0 +1,124 @@ +/* + * linux/arch/arm/mach-iop3xx/time-iq80310.c + * + * Timer functions for IQ80310 onboard timer + * + * Author: Nicolas Pitre + * Copyright: (C) 2001 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +static void iq80310_write_timer (u_long val) +{ + volatile u_char *la0 = (volatile u_char *)IQ80310_TIMER_LA0; + volatile u_char *la1 = (volatile u_char *)IQ80310_TIMER_LA1; + volatile u_char *la2 = (volatile u_char *)IQ80310_TIMER_LA2; + + *la0 = val; + *la1 = val >> 8; + *la2 = (val >> 16) & 0x3f; +} + +static u_long iq80310_read_timer (void) +{ + volatile u_char *la0 = (volatile u_char *)IQ80310_TIMER_LA0; + volatile u_char *la1 = (volatile u_char *)IQ80310_TIMER_LA1; + volatile u_char *la2 = (volatile u_char *)IQ80310_TIMER_LA2; + volatile u_char *la3 = (volatile u_char *)IQ80310_TIMER_LA3; + u_long b0, b1, b2, b3, val; + + b0 = *la0; b1 = *la1; b2 = *la2; b3 = *la3; + b0 = (((b0 & 0x40) >> 1) | (b0 & 0x1f)); + b1 = (((b1 & 0x40) >> 1) | (b1 & 0x1f)); + b2 = (((b2 & 0x40) >> 1) | (b2 & 0x1f)); + b3 = (b3 & 0x0f); + val = ((b0 << 0) | (b1 << 6) | (b2 << 12) | (b3 << 18)); + return val; +} + +/* + * IRQs are disabled before entering here from do_gettimeofday(). + * Note that the counter may wrap. When it does, 'elapsed' will + * be small, but we will have a pending interrupt. + */ +static unsigned long iq80310_gettimeoffset (void) +{ + unsigned long elapsed, usec; + unsigned int stat1, stat2; + + stat1 = *(volatile u8 *)IQ80310_INT_STAT; + elapsed = iq80310_read_timer(); + stat2 = *(volatile u8 *)IQ80310_INT_STAT; + + /* + * If an interrupt was pending before we read the timer, + * we've already wrapped. Factor this into the time. + * If an interrupt was pending after we read the timer, + * it may have wrapped between checking the interrupt + * status and reading the timer. Re-read the timer to + * be sure its value is after the wrap. + */ + if (stat1 & 1) + elapsed += LATCH; + else if (stat2 & 1) + elapsed = LATCH + iq80310_read_timer(); + + /* + * Now convert them to usec. + */ + usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH; + + return usec; +} + + +static irqreturn_t +iq80310_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN; + + /* clear timer interrupt */ + *timer_en &= ~2; + *timer_en |= 2; + + do_timer(regs); + + return IRQ_HANDLED; +} + +extern unsigned long (*gettimeoffset)(void); + +static struct irqaction timer_irq = { + .name = "timer", + .handler = iq80310_timer_interrupt, +}; + + +void __init time_init(void) +{ + volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN; + + gettimeoffset = iq80310_gettimeoffset; + + setup_irq(IRQ_IQ80310_TIMER, &timer_irq); + + *timer_en = 0; + iq80310_write_timer(LATCH); + *timer_en |= 2; + *timer_en |= 1; +} diff --git a/arch/arm/mach-iop3xx/mm.c b/arch/arm/mach-iop3xx/mm.c new file mode 100644 index 000000000..110381a20 --- /dev/null +++ b/arch/arm/mach-iop3xx/mm.c @@ -0,0 +1,69 @@ +/* + * linux/arch/arm/mach-iop3xx/mm.c + * + * Low level memory initialization for IOP310 based systems + * + * Author: Nicolas Pitre + * + * Copyright 2000-2001 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include +#include + +#include +#include +#include + +#include + +#ifdef CONFIG_IOP310_MU +#include "message.h" +#endif + +/* + * Standard IO mapping for all IOP310 based systems + */ +static struct map_desc iop80310_std_desc[] __initdata = { + /* virtual physical length type */ + // IOP310 Memory Mapped Registers + { 0xe8001000, 0x00001000, 0x00001000, MT_DEVICE }, + // PCI I/O Space + { 0xfe000000, 0x90000000, 0x00020000, MT_DEVICE } +}; + +void __init iop310_map_io(void) +{ + iotable_init(iop80310_std_desc, ARRAY_SIZE(iop80310_std_desc)); +} + +/* + * IQ80310 specific IO mappings + */ +#ifdef CONFIG_ARCH_IQ80310 +static struct map_desc iq80310_io_desc[] __initdata = { + /* virtual physical length type */ + // IQ80310 On-Board Devices + { 0xfe800000, 0xfe800000, 0x00100000, MT_DEVICE } +}; + +void __init iq80310_map_io(void) +{ +#ifdef CONFIG_IOP310_MU + /* acquiring 1MB of memory aligned on 1MB boundary for MU */ + mu_mem = __alloc_bootmem(0x100000, 0x100000, 0); +#endif + + iop310_map_io(); + + iotable_init(iq80310_io_desc, ARRAY_SIZE(iq80310_io_desc)); +} +#endif // CONFIG_ARCH_IQ80310 + diff --git a/arch/arm/mach-iop3xx/xs80200-irq.c b/arch/arm/mach-iop3xx/xs80200-irq.c new file mode 100644 index 000000000..70304dd26 --- /dev/null +++ b/arch/arm/mach-iop3xx/xs80200-irq.c @@ -0,0 +1,63 @@ +/* + * linux/arch/arm/mach-iop3xx/xs80200-irq.c + * + * Generic IRQ handling for the XS80200 XScale core. + * + * Author: Nicolas Pitre + * Copyright: (C) 2001 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + +#include +#include +#include + +static void xs80200_irq_mask (unsigned int irq) +{ + unsigned long intctl; + asm ("mrc p13, 0, %0, c0, c0, 0" : "=r" (intctl)); + switch (irq) { + case IRQ_XS80200_BCU: intctl &= ~(1<<3); break; + case IRQ_XS80200_PMU: intctl &= ~(1<<2); break; + case IRQ_XS80200_EXTIRQ: intctl &= ~(1<<1); break; + case IRQ_XS80200_EXTFIQ: intctl &= ~(1<<0); break; + } + asm ("mcr p13, 0, %0, c0, c0, 0" : : "r" (intctl)); +} + +static void xs80200_irq_unmask (unsigned int irq) +{ + unsigned long intctl; + asm ("mrc p13, 0, %0, c0, c0, 0" : "=r" (intctl)); + switch (irq) { + case IRQ_XS80200_BCU: intctl |= (1<<3); break; + case IRQ_XS80200_PMU: intctl |= (1<<2); break; + case IRQ_XS80200_EXTIRQ: intctl |= (1<<1); break; + case IRQ_XS80200_EXTFIQ: intctl |= (1<<0); break; + } + asm ("mcr p13, 0, %0, c0, c0, 0" : : "r" (intctl)); +} + +static struct irqchip xs80200_chip = { + .ack = xs80200_irq_mask, + .mask = xs80200_irq_mask, + .unmask = xs80200_irq_unmask, +}; + +void __init xs80200_init_irq(void) +{ + unsigned int i; + + asm("mcr p13, 0, %0, c0, c0, 0" : : "r" (0)); + + for (i = 0; i < NR_XS80200_IRQS; i++) { + set_irq_chip(i, &xs80200_chip); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID); + } +} diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c index c823447a1..06373b295 100644 --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c @@ -157,6 +157,8 @@ static struct irqchip lpd7a40x_cpld_chip = { .unmask = lh7a40x_unmask_cpld_irq, }; +#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) + static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile index 4cafb11d2..2a6c49542 100644 --- a/arch/arm/mach-omap/Makefile +++ b/arch/arm/mach-omap/Makefile @@ -16,8 +16,6 @@ obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o -obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o -obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o # OCPI interconnect support for 1710, 1610 and 5912 obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o diff --git a/arch/arm/mach-omap/board-generic.c b/arch/arm/mach-omap/board-generic.c index 2102a2cd1..586bc1271 100644 --- a/arch/arm/mach-omap/board-generic.c +++ b/arch/arm/mach-omap/board-generic.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "common.h" diff --git a/arch/arm/mach-omap/board-innovator.c b/arch/arm/mach-omap/board-innovator.c index 57cf4da88..1ad7a4aaf 100644 --- a/arch/arm/mach-omap/board-innovator.c +++ b/arch/arm/mach-omap/board-innovator.c @@ -20,97 +20,36 @@ #include #include #include -#include -#include #include #include #include -#include #include -#include +#include #include -#include +#include #include +#include #include "common.h" -static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; - -static struct mtd_partition innovator_partitions[] = { - /* bootloader (U-Boot, etc) in first sector */ - { - .name = "bootloader", - .offset = 0, - .size = SZ_128K, - .mask_flags = MTD_WRITEABLE, /* force read-only */ - }, - /* bootloader params in the next sector */ - { - .name = "params", - .offset = MTDPART_OFS_APPEND, - .size = SZ_128K, - .mask_flags = 0, - }, - /* kernel */ - { - .name = "kernel", - .offset = MTDPART_OFS_APPEND, - .size = SZ_2M, - .mask_flags = 0 - }, - /* rest of flash1 is a file system */ - { - .name = "rootfs", - .offset = MTDPART_OFS_APPEND, - .size = SZ_16M - SZ_2M - 2 * SZ_128K, - .mask_flags = 0 - }, - /* file system */ - { - .name = "filesystem", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - .mask_flags = 0 - } -}; - -static struct flash_platform_data innovator_flash_data = { - .map_name = "cfi_probe", - .width = 2, - .parts = innovator_partitions, - .nr_parts = ARRAY_SIZE(innovator_partitions), -}; - -static struct resource innovator_flash_resource = { - .start = OMAP_CS0_PHYS, - .end = OMAP_CS0_PHYS + SZ_32M - 1, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device innovator_flash_device = { - .name = "omapflash", - .id = 0, - .dev = { - .platform_data = &innovator_flash_data, - }, - .num_resources = 1, - .resource = &innovator_flash_resource, -}; - #ifdef CONFIG_ARCH_OMAP1510 +extern int omap_gpio_init(void); + /* Only FPGA needs to be mapped here. All others are done with ioremap */ static struct map_desc innovator1510_io_desc[] __initdata = { { OMAP1510_FPGA_BASE, OMAP1510_FPGA_START, OMAP1510_FPGA_SIZE, MT_DEVICE }, }; +static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; + static struct resource innovator1510_smc91x_resources[] = { [0] = { .start = OMAP1510_FPGA_ETHR_START, /* Physical */ - .end = OMAP1510_FPGA_ETHR_START + 0xf, + .end = OMAP1510_FPGA_ETHR_START + 16, .flags = IORESOURCE_MEM, }, [1] = { @@ -128,7 +67,6 @@ static struct platform_device innovator1510_smc91x_device = { }; static struct platform_device *innovator1510_devices[] __initdata = { - &innovator_flash_device, &innovator1510_smc91x_device, }; @@ -139,12 +77,12 @@ static struct platform_device *innovator1510_devices[] __initdata = { static struct resource innovator1610_smc91x_resources[] = { [0] = { .start = INNOVATOR1610_ETHR_START, /* Physical */ - .end = INNOVATOR1610_ETHR_START + 0xf, + .end = INNOVATOR1610_ETHR_START + SZ_4K, .flags = IORESOURCE_MEM, }, [1] = { - .start = OMAP_GPIO_IRQ(0), - .end = OMAP_GPIO_IRQ(0), + .start = 0, /* Really GPIO 0 */ + .end = 0, .flags = IORESOURCE_IRQ, }, }; @@ -157,37 +95,20 @@ static struct platform_device innovator1610_smc91x_device = { }; static struct platform_device *innovator1610_devices[] __initdata = { - &innovator_flash_device, &innovator1610_smc91x_device, }; #endif /* CONFIG_ARCH_OMAP16XX */ -static void __init innovator_init_smc91x(void) -{ - if (cpu_is_omap1510()) { - fpga_write(fpga_read(OMAP1510_FPGA_RST) & ~1, - OMAP1510_FPGA_RST); - udelay(750); - } else { - if ((omap_request_gpio(0)) < 0) { - printk("Error requesting gpio 0 for smc91x irq\n"); - return; - } - omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE); - } -} - void innovator_init_irq(void) { omap_init_irq(); - omap_gpio_init(); #ifdef CONFIG_ARCH_OMAP1510 if (cpu_is_omap1510()) { + omap_gpio_init(); omap1510_fpga_init_irq(); } #endif - innovator_init_smc91x(); } #ifdef CONFIG_ARCH_OMAP1510 diff --git a/arch/arm/mach-omap/board-osk.c b/arch/arm/mach-omap/board-osk.c index a951fc824..d7a20ca6e 100644 --- a/arch/arm/mach-omap/board-osk.c +++ b/arch/arm/mach-omap/board-osk.c @@ -35,10 +35,11 @@ #include #include +#include #include +#include #include -#include -#include +#include #include "common.h" @@ -52,90 +53,36 @@ static int __initdata osk_serial_ports[OMAP_MAX_NR_PORTS] = {1, 0, 0}; static struct resource osk5912_smc91x_resources[] = { [0] = { .start = OMAP_OSK_ETHR_START, /* Physical */ - .end = OMAP_OSK_ETHR_START + 0xf, + .end = OMAP_OSK_ETHR_START + SZ_4K, .flags = IORESOURCE_MEM, }, [1] = { - .start = OMAP_GPIO_IRQ(0), - .end = OMAP_GPIO_IRQ(0), + .start = 0, /* Really GPIO 0 */ + .end = 0, .flags = IORESOURCE_IRQ, }, }; static struct platform_device osk5912_smc91x_device = { .name = "smc91x", - .id = -1, + .id = 0, .num_resources = ARRAY_SIZE(osk5912_smc91x_resources), .resource = osk5912_smc91x_resources, }; -static struct resource osk5912_cf_resources[] = { - [0] = { - .start = OMAP_GPIO_IRQ(62), - .end = OMAP_GPIO_IRQ(62), - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device osk5912_cf_device = { - .name = "omap_cf", - .id = -1, - .dev = { - .platform_data = (void *) 2 /* CS2 */, - }, - .num_resources = ARRAY_SIZE(osk5912_cf_resources), - .resource = osk5912_cf_resources, -}; - static struct platform_device *osk5912_devices[] __initdata = { &osk5912_smc91x_device, - &osk5912_cf_device, }; -static void __init osk_init_smc91x(void) -{ - if ((omap_request_gpio(0)) < 0) { - printk("Error requesting gpio 0 for smc91x irq\n"); - return; - } - omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE); - - /* Check EMIFS wait states to fix errors with SMC_GET_PKT_HDR */ - EMIFS_CCS(1) |= 0x2; -} - -static void __init osk_init_cf(void) -{ - omap_cfg_reg(M7_1610_GPIO62); - if ((omap_request_gpio(62)) < 0) { - printk("Error requesting gpio 62 for CF irq\n"); - return; - } - /* it's really active-low */ - omap_set_gpio_edge_ctrl(62, OMAP_GPIO_FALLING_EDGE); -} - void osk_init_irq(void) { omap_init_irq(); - omap_gpio_init(); - osk_init_smc91x(); - osk_init_cf(); } static struct omap_usb_config osk_usb_config __initdata = { - /* has usb host connector (A) ... for development it can also - * be used, with a NONSTANDARD gender-bending cable/dongle, as - * a peripheral. - */ -#ifdef CONFIG_USB_GADGET_OMAP - .register_dev = 1, - .hmc_mode = 0, -#else + /* has usb host and device, but no Mini-AB port */ .register_host = 1, .hmc_mode = 16, - .rwc = 1, -#endif .pins[0] = 2, }; @@ -145,10 +92,9 @@ static struct omap_board_config_kernel osk_config[] = { static void __init osk_init(void) { - platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); + platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); omap_board_config = osk_config; omap_board_config_size = ARRAY_SIZE(osk_config); - USB_TRANSCEIVER_CTRL_REG |= (3 << 1); } static void __init osk_map_io(void) diff --git a/arch/arm/mach-omap/board-perseus2.c b/arch/arm/mach-omap/board-perseus2.c index 64515aeb4..17a936422 100644 --- a/arch/arm/mach-omap/board-perseus2.c +++ b/arch/arm/mach-omap/board-perseus2.c @@ -14,26 +14,29 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include +#include #include #include #include +#include #include "common.h" +void omap_perseus2_init_irq(void) +{ + omap_init_irq(); +} + static struct resource smc91x_resources[] = { [0] = { .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ - .end = H2P2_DBG_FPGA_ETHR_START + 0xf, + .end = H2P2_DBG_FPGA_ETHR_START + SZ_4K, .flags = IORESOURCE_MEM, }, [1] = { @@ -45,60 +48,6 @@ static struct resource smc91x_resources[] = { static int __initdata p2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 0}; -static struct mtd_partition p2_partitions[] = { - /* bootloader (U-Boot, etc) in first sector */ - { - .name = "bootloader", - .offset = 0, - .size = SZ_128K, - .mask_flags = MTD_WRITEABLE, /* force read-only */ - }, - /* bootloader params in the next sector */ - { - .name = "params", - .offset = MTDPART_OFS_APPEND, - .size = SZ_128K, - .mask_flags = 0, - }, - /* kernel */ - { - .name = "kernel", - .offset = MTDPART_OFS_APPEND, - .size = SZ_2M, - .mask_flags = 0 - }, - /* rest of flash is a file system */ - { - .name = "rootfs", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - .mask_flags = 0 - }, -}; - -static struct flash_platform_data p2_flash_data = { - .map_name = "cfi_probe", - .width = 2, - .parts = p2_partitions, - .nr_parts = ARRAY_SIZE(p2_partitions), -}; - -static struct resource p2_flash_resource = { - .start = OMAP_FLASH_0_START, - .end = OMAP_FLASH_0_START + OMAP_FLASH_0_SIZE - 1, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device p2_flash_device = { - .name = "omapflash", - .id = 0, - .dev = { - .platform_data = &p2_flash_data, - }, - .num_resources = 1, - .resource = &p2_flash_resource, -}; - static struct platform_device smc91x_device = { .name = "smc91x", .id = 0, @@ -107,7 +56,6 @@ static struct platform_device smc91x_device = { }; static struct platform_device *devices[] __initdata = { - &p2_flash_device, &smc91x_device, }; @@ -116,22 +64,6 @@ static void __init omap_perseus2_init(void) (void) platform_add_devices(devices, ARRAY_SIZE(devices)); } -static void __init perseus2_init_smc91x(void) -{ - fpga_write(1, H2P2_DBG_FPGA_LAN_RESET); - mdelay(50); - fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1, - H2P2_DBG_FPGA_LAN_RESET); - mdelay(50); -} - -void omap_perseus2_init_irq(void) -{ - omap_init_irq(); - omap_gpio_init(); - perseus2_init_smc91x(); -} - /* Only FPGA needs to be mapped here. All others are done with ioremap */ static struct map_desc omap_perseus2_io_desc[] __initdata = { {H2P2_DBG_FPGA_BASE, H2P2_DBG_FPGA_START, H2P2_DBG_FPGA_SIZE, diff --git a/arch/arm/mach-omap/bus.c b/arch/arm/mach-omap/bus.c new file mode 100644 index 000000000..24a57f2a8 --- /dev/null +++ b/arch/arm/mach-omap/bus.c @@ -0,0 +1,246 @@ +/* + * linux/arch/arm/mach-omap/bus.c + * + * Virtual bus for OMAP. Allows better power management, such as managing + * shared clocks, and mapping of bus addresses to Local Bus addresses. + * + * See drivers/usb/host/ohci-omap.c or drivers/video/omap/omapfb.c for + * examples on how to register drivers to this bus. + * + * Copyright (C) 2003 - 2004 Nokia Corporation + * Written by Tony Lindgren + * Portions of code based on sa1111.c. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +static int omap_bus_match(struct device *_dev, struct device_driver *_drv); +static int omap_bus_suspend(struct device *dev, u32 state); +static int omap_bus_resume(struct device *dev); + +/* + * OMAP bus definitions + * + * NOTE: Most devices should use TIPB. LBUS does automatic address mapping + * to Local Bus addresses, and should only be used for Local Bus devices. + * We may add new buses later on for power management reasons. Basically + * we want to be able to turn off any bus if it's not used by device + * drivers. + */ +static struct device omap_bus_devices[OMAP_NR_BUSES] = { + { + .bus_id = OMAP_BUS_NAME_TIPB + }, { + .bus_id = OMAP_BUS_NAME_LBUS + }, +}; + +static struct bus_type omap_bus_types[OMAP_NR_BUSES] = { + { + .name = OMAP_BUS_NAME_TIPB, + .match = omap_bus_match, + .suspend = omap_bus_suspend, + .resume = omap_bus_resume, + }, { + .name = OMAP_BUS_NAME_LBUS, /* Local bus on 1510 */ + .match = omap_bus_match, + .suspend = omap_bus_suspend, + .resume = omap_bus_resume, + }, +}; + +static int omap_bus_match(struct device *dev, struct device_driver *drv) +{ + struct omap_dev *omapdev = OMAP_DEV(dev); + struct omap_driver *omapdrv = OMAP_DRV(drv); + + return omapdev->devid == omapdrv->devid; +} + +static int omap_bus_suspend(struct device *dev, u32 state) +{ + struct omap_dev *omapdev = OMAP_DEV(dev); + struct omap_driver *omapdrv = OMAP_DRV(dev->driver); + int ret = 0; + + if (omapdrv && omapdrv->suspend) + ret = omapdrv->suspend(omapdev, state); + return ret; +} + +static int omap_bus_resume(struct device *dev) +{ + struct omap_dev *omapdev = OMAP_DEV(dev); + struct omap_driver *omapdrv = OMAP_DRV(dev->driver); + int ret = 0; + + if (omapdrv && omapdrv->resume) + ret = omapdrv->resume(omapdev); + return ret; +} + +static int omap_device_probe(struct device *dev) +{ + struct omap_dev *omapdev = OMAP_DEV(dev); + struct omap_driver *omapdrv = OMAP_DRV(dev->driver); + int ret = -ENODEV; + + if (omapdrv && omapdrv->probe) + ret = omapdrv->probe(omapdev); + + return ret; +} + +static int omap_device_remove(struct device *dev) +{ + struct omap_dev *omapdev = OMAP_DEV(dev); + struct omap_driver *omapdrv = OMAP_DRV(dev->driver); + int ret = 0; + + if (omapdrv && omapdrv->remove) + ret = omapdrv->remove(omapdev); + return ret; +} + +int omap_device_register(struct omap_dev *odev) +{ + if (!odev) + return -EINVAL; + + if (odev->busid < 0 || odev->busid >= OMAP_NR_BUSES) { + printk(KERN_ERR "%s: busid invalid: %s: bus: %i\n", + __FUNCTION__, odev->name, odev->busid); + return -EINVAL; + } + + odev->dev.parent = &omap_bus_devices[odev->busid]; + odev->dev.bus = &omap_bus_types[odev->busid]; + + /* This is needed for USB OHCI to work */ + if (odev->dma_mask) + odev->dev.dma_mask = odev->dma_mask; + + if (odev->coherent_dma_mask) + odev->dev.coherent_dma_mask = odev->coherent_dma_mask; + + snprintf(odev->dev.bus_id, BUS_ID_SIZE, "%s%u", + odev->name, odev->devid); + + printk("Registering OMAP device '%s'. Parent at %s\n", + odev->dev.bus_id, odev->dev.parent->bus_id); + + return device_register(&odev->dev); +} + +void omap_device_unregister(struct omap_dev *odev) +{ + if (odev) + device_unregister(&odev->dev); +} + +int omap_driver_register(struct omap_driver *driver) +{ + int ret; + + if (driver->busid < 0 || driver->busid >= OMAP_NR_BUSES) { + printk(KERN_ERR "%s: busid invalid: bus: %i device: %i\n", + __FUNCTION__, driver->busid, driver->devid); + return -EINVAL; + } + + driver->drv.probe = omap_device_probe; + driver->drv.remove = omap_device_remove; + driver->drv.bus = &omap_bus_types[driver->busid]; + + /* + * driver_register calls bus_add_driver + */ + ret = driver_register(&driver->drv); + + return ret; +} + +void omap_driver_unregister(struct omap_driver *driver) +{ + driver_unregister(&driver->drv); +} + +static int __init omap_bus_init(void) +{ + int i, ret; + + /* Initialize all OMAP virtual buses */ + for (i = 0; i < OMAP_NR_BUSES; i++) { + ret = device_register(&omap_bus_devices[i]); + if (ret != 0) { + printk(KERN_ERR "Unable to register bus device %s\n", + omap_bus_devices[i].bus_id); + continue; + } + ret = bus_register(&omap_bus_types[i]); + if (ret != 0) { + printk(KERN_ERR "Unable to register bus %s\n", + omap_bus_types[i].name); + device_unregister(&omap_bus_devices[i]); + } + } + printk("OMAP virtual buses initialized\n"); + + return ret; +} + +static void __exit omap_bus_exit(void) +{ + int i; + + /* Unregister all OMAP virtual buses */ + for (i = 0; i < OMAP_NR_BUSES; i++) { + bus_unregister(&omap_bus_types[i]); + device_unregister(&omap_bus_devices[i]); + } +} + +postcore_initcall(omap_bus_init); +module_exit(omap_bus_exit); + +MODULE_DESCRIPTION("Virtual bus for OMAP"); +MODULE_LICENSE("GPL"); + +EXPORT_SYMBOL(omap_bus_types); +EXPORT_SYMBOL(omap_driver_register); +EXPORT_SYMBOL(omap_driver_unregister); +EXPORT_SYMBOL(omap_device_register); +EXPORT_SYMBOL(omap_device_unregister); + diff --git a/arch/arm/mach-omap/dma.c b/arch/arm/mach-omap/dma.c index 7a9ebe80d..4c3d7c27d 100644 --- a/arch/arm/mach-omap/dma.c +++ b/arch/arm/mach-omap/dma.c @@ -6,7 +6,6 @@ * DMA channel linking for 1610 by Samuel Ortiz * Graphics DMA and LCD DMA graphics tranformations * by Imre Deak - * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc. * * Support functions for the OMAP internal DMA channels. * @@ -478,6 +477,10 @@ int omap_request_dma(int dev_id, const char *dev_name, if (dev_id == 0) break; } + if (dev_id != 0 && dma_chan[ch].dev_id == dev_id) { + spin_unlock_irqrestore(&dma_chan_lock, flags); + return -EAGAIN; + } } if (free_ch == -1) { spin_unlock_irqrestore(&dma_chan_lock, flags); @@ -494,7 +497,7 @@ int omap_request_dma(int dev_id, const char *dev_name, chan->data = data; chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ; - if (cpu_is_omap16xx()) { + if (cpu_is_omap16xx() || cpu_is_omap730()) { /* If the sync device is set, configure it dynamically. */ if (dev_id != 0) { set_gdma_dev(free_ch + 1, dev_id); @@ -928,50 +931,6 @@ void omap_stop_lcd_dma(void) OMAP1610_DMA_LCD_CCR); } -/* - * Clears any DMA state so the DMA engine is ready to restart with new buffers - * through omap_start_dma(). Any buffers in flight are discarded. - */ -void omap_clear_dma(int lch) -{ - unsigned long flags; - int status; - - local_irq_save(flags); - omap_writew(omap_readw(OMAP_DMA_CCR(lch)) & ~OMAP_DMA_CCR_EN, - OMAP_DMA_CCR(lch)); - status = OMAP_DMA_CSR(lch); /* clear pending interrupts */ - local_irq_restore(flags); -} - -/* - * Returns current physical source address for the given DMA channel. - * If the channel is running the caller must disable interrupts prior calling - * this function and process the returned value before re-enabling interrupt to - * prevent races with the interrupt handler. Note that in continuous mode there - * is a chance for CSSA_L register overflow inbetween the two reads resulting - * in incorrect return value. - */ -dma_addr_t omap_get_dma_src_pos(int lch) -{ - return (dma_addr_t) (OMAP_DMA_CSSA_L(lch) | - (OMAP_DMA_CSSA_U(lch) << 16)); -} - -/* - * Returns current physical destination address for the given DMA channel. - * If the channel is running the caller must disable interrupts prior calling - * this function and process the returned value before re-enabling interrupt to - * prevent races with the interrupt handler. Note that in continuous mode there - * is a chance for CDSA_L register overflow inbetween the two reads resulting - * in incorrect return value. - */ -dma_addr_t omap_get_dma_dst_pos(int lch) -{ - return (dma_addr_t) (OMAP_DMA_CDSA_L(lch) | - (OMAP_DMA_CDSA_U(lch) << 16)); -} - static int __init omap_init_dma(void) { int ch, r; @@ -1040,13 +999,9 @@ static int __init omap_init_dma(void) } return 0; } - arch_initcall(omap_init_dma); -EXPORT_SYMBOL(omap_get_dma_src_pos); -EXPORT_SYMBOL(omap_get_dma_dst_pos); -EXPORT_SYMBOL(omap_clear_dma); EXPORT_SYMBOL(omap_set_dma_priority); EXPORT_SYMBOL(omap_request_dma); EXPORT_SYMBOL(omap_free_dma); diff --git a/arch/arm/mach-omap/gpio.c b/arch/arm/mach-omap/gpio.c index 9045dfd46..e66dcf6ff 100644 --- a/arch/arm/mach-omap/gpio.c +++ b/arch/arm/mach-omap/gpio.c @@ -114,7 +114,7 @@ static struct gpio_bank gpio_bank_1510[2] = { #ifdef CONFIG_ARCH_OMAP730 static struct gpio_bank gpio_bank_730[7] = { { OMAP_MPUIO_BASE, INT_730_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, - { OMAP730_GPIO1_BASE, INT_730_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 }, + { OMAP730_GPIO1_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 }, { OMAP730_GPIO2_BASE, INT_730_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_730 }, { OMAP730_GPIO3_BASE, INT_730_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_730 }, { OMAP730_GPIO4_BASE, INT_730_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_730 }, @@ -307,9 +307,6 @@ int omap_get_gpio_datain(int gpio) case METHOD_GPIO_1610: reg += OMAP1610_GPIO_DATAIN; break; - case METHOD_GPIO_730: - reg += OMAP730_GPIO_DATA_INPUT; - break; default: BUG(); return -1; @@ -410,13 +407,13 @@ static int _get_gpio_edge_ctrl(struct gpio_bank *bank, int gpio) } } -static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask) +static void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) { u32 reg = bank->base; switch (bank->method) { case METHOD_MPUIO: - /* MPUIO irqstatus is reset by reading the status register, + /* MPUIO irqstatus cannot be cleared one bit at a time, * so do nothing here */ return; case METHOD_GPIO_1510: @@ -432,15 +429,10 @@ static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask) BUG(); return; } - __raw_writel(gpio_mask, reg); -} - -static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) -{ - _clear_gpio_irqbank(bank, 1 << get_gpio_index(gpio)); + __raw_writel(1 << get_gpio_index(gpio), reg); } -static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable) +static void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable) { u32 reg = bank->base; u32 l; @@ -450,32 +442,33 @@ static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enab reg += OMAP_MPUIO_GPIO_MASKIT; l = __raw_readl(reg); if (enable) - l &= ~(gpio_mask); + l &= ~(1 << gpio); else - l |= gpio_mask; + l |= 1 << gpio; break; case METHOD_GPIO_1510: reg += OMAP1510_GPIO_INT_MASK; l = __raw_readl(reg); if (enable) - l &= ~(gpio_mask); + l &= ~(1 << gpio); else - l |= gpio_mask; + l |= 1 << gpio; break; case METHOD_GPIO_1610: - if (enable) + if (enable) { reg += OMAP1610_GPIO_SET_IRQENABLE1; - else + _clear_gpio_irqstatus(bank, gpio); + } else reg += OMAP1610_GPIO_CLEAR_IRQENABLE1; - l = gpio_mask; + l = 1 << gpio; break; case METHOD_GPIO_730: reg += OMAP730_GPIO_INT_MASK; l = __raw_readl(reg); if (enable) - l &= ~(gpio_mask); + l &= ~(1 << gpio); else - l |= gpio_mask; + l |= 1 << gpio; break; default: BUG(); @@ -484,11 +477,6 @@ static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enab __raw_writel(l, reg); } -static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable) -{ - _enable_gpio_irqbank(bank, 1 << get_gpio_index(gpio), enable); -} - int omap_request_gpio(int gpio) { struct gpio_bank *bank; @@ -535,31 +523,31 @@ void omap_free_gpio(int gpio) } bank->reserved_map &= ~(1 << get_gpio_index(gpio)); _set_gpio_direction(bank, get_gpio_index(gpio), 1); - _set_gpio_irqenable(bank, gpio, 0); - _clear_gpio_irqstatus(bank, gpio); + _set_gpio_irqenable(bank, get_gpio_index(gpio), 0); spin_unlock(&bank->lock); } -/* - * We need to unmask the GPIO bank interrupt as soon as possible to - * avoid missing GPIO interrupts for other lines in the bank. - * Then we need to mask-read-clear-unmask the triggered GPIO lines - * in the bank to avoid missing nested interrupts for a GPIO line. - * If we wait to unmask individual GPIO lines in the bank after the - * line's interrupt handler has been run, we may miss some nested - * interrupts. - */ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { u32 isr_reg = 0; - u32 isr; - unsigned int gpio_irq; - struct gpio_bank *bank; + struct gpio_bank *bank = (struct gpio_bank *) desc->data; + /* + * Acknowledge the parent IRQ. + */ desc->chip->ack(irq); - bank = (struct gpio_bank *) desc->data; + /* Since the level 1 GPIO interrupt cascade (IRQ14) is configured as + * edge-sensitive, we need to unmask it here in order to avoid missing + * any additional GPIO interrupts that might occur after the last time + * we check for pending GPIO interrupts here. + * We are relying on the fact that this interrupt handler was installed + * with the SA_INTERRUPT flag so that interrupts are disabled at the + * CPU while it is executing. + */ + desc->chip->unmask(irq); + if (bank->method == METHOD_MPUIO) isr_reg = bank->base + OMAP_MPUIO_GPIO_INT; #ifdef CONFIG_ARCH_OMAP1510 @@ -574,23 +562,20 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, if (bank->method == METHOD_GPIO_730) isr_reg = bank->base + OMAP730_GPIO_INT_STATUS; #endif - - isr = __raw_readl(isr_reg); - _enable_gpio_irqbank(bank, isr, 0); - _clear_gpio_irqbank(bank, isr); - _enable_gpio_irqbank(bank, isr, 1); - desc->chip->unmask(irq); - - if (unlikely(!isr)) - return; - - gpio_irq = bank->virtual_irq_start; - for (; isr != 0; isr >>= 1, gpio_irq++) { - struct irqdesc *d; - if (!(isr & 1)) - continue; - d = irq_desc + gpio_irq; - d->handle(gpio_irq, d, regs); + for (;;) { + u32 isr = __raw_readl(isr_reg); + unsigned int gpio_irq; + + if (!isr) + break; + gpio_irq = bank->virtual_irq_start; + + for (; isr != 0; isr >>= 1, gpio_irq++) { + if (isr & 1) { + struct irqdesc *d = irq_desc + gpio_irq; + d->handle(gpio_irq, d, regs); + } + } } } @@ -599,7 +584,18 @@ static void gpio_ack_irq(unsigned int irq) unsigned int gpio = irq - IH_GPIO_BASE; struct gpio_bank *bank = get_gpio_bank(gpio); - _clear_gpio_irqstatus(bank, gpio); +#ifdef CONFIG_ARCH_OMAP1510 + if (bank->method == METHOD_GPIO_1510) + __raw_writew(1 << (gpio & 0x0f), bank->base + OMAP1510_GPIO_INT_STATUS); +#endif +#if defined(CONFIG_ARCH_OMAP16XX) + if (bank->method == METHOD_GPIO_1610) + __raw_writew(1 << (gpio & 0x0f), bank->base + OMAP1610_GPIO_IRQSTATUS1); +#endif +#ifdef CONFIG_ARCH_OMAP730 + if (bank->method == METHOD_GPIO_730) + __raw_writel(1 << (gpio & 0x1f), bank->base + OMAP730_GPIO_INT_STATUS); +#endif } static void gpio_mask_irq(unsigned int irq) @@ -607,7 +603,7 @@ static void gpio_mask_irq(unsigned int irq) unsigned int gpio = irq - IH_GPIO_BASE; struct gpio_bank *bank = get_gpio_bank(gpio); - _set_gpio_irqenable(bank, gpio, 0); + _set_gpio_irqenable(bank, get_gpio_index(gpio), 0); } static void gpio_unmask_irq(unsigned int irq) @@ -620,7 +616,7 @@ static void gpio_unmask_irq(unsigned int irq) gpio); _set_gpio_edge_ctrl(bank, get_gpio_index(gpio), OMAP_GPIO_RISING_EDGE); } - _set_gpio_irqenable(bank, gpio, 1); + _set_gpio_irqenable(bank, get_gpio_index(gpio), 1); } static void mpuio_ack_irq(unsigned int irq) @@ -633,7 +629,7 @@ static void mpuio_mask_irq(unsigned int irq) unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); struct gpio_bank *bank = get_gpio_bank(gpio); - _set_gpio_irqenable(bank, gpio, 0); + _set_gpio_irqenable(bank, get_gpio_index(gpio), 0); } static void mpuio_unmask_irq(unsigned int irq) @@ -641,7 +637,7 @@ static void mpuio_unmask_irq(unsigned int irq) unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); struct gpio_bank *bank = get_gpio_bank(gpio); - _set_gpio_irqenable(bank, gpio, 1); + _set_gpio_irqenable(bank, get_gpio_index(gpio), 1); } static struct irqchip gpio_irq_chip = { @@ -726,7 +722,7 @@ static int __init _omap_gpio_init(void) set_irq_chip(j, &mpuio_irq_chip); else set_irq_chip(j, &gpio_irq_chip); - set_irq_handler(j, do_simple_IRQ); + set_irq_handler(j, do_edge_IRQ); set_irq_flags(j, IRQF_VALID); } set_irq_chained_handler(bank->irq, gpio_irq_handler); diff --git a/arch/arm/mach-omap/leds-perseus2.c b/arch/arm/mach-omap/leds-perseus2.c new file mode 100644 index 000000000..8dafc0dae --- /dev/null +++ b/arch/arm/mach-omap/leds-perseus2.c @@ -0,0 +1,102 @@ +/* + * linux/arch/arm/mach-omap/leds-perseus2.c + * + * Copyright 2003 by Texas Instruments Incorporated + * + */ +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "leds.h" + +void perseus2_leds_event(led_event_t evt) +{ + unsigned long flags; + static unsigned long hw_led_state = 0; + + local_irq_save(flags); + + switch (evt) { + case led_start: + hw_led_state |= OMAP730_FPGA_LED_STARTSTOP; + break; + + case led_stop: + hw_led_state &= ~OMAP730_FPGA_LED_STARTSTOP; + break; + + case led_claim: + hw_led_state |= OMAP730_FPGA_LED_CLAIMRELEASE; + break; + + case led_release: + hw_led_state &= ~OMAP730_FPGA_LED_CLAIMRELEASE; + break; + +#ifdef CONFIG_LEDS_TIMER + case led_timer: + /* + * Toggle Timer LED + */ + if (hw_led_state & OMAP730_FPGA_LED_TIMER) + hw_led_state &= ~OMAP730_FPGA_LED_TIMER; + else + hw_led_state |= OMAP730_FPGA_LED_TIMER; + break; +#endif + +#ifdef CONFIG_LEDS_CPU + case led_idle_start: + hw_led_state |= OMAP730_FPGA_LED_IDLE; + break; + + case led_idle_end: + hw_led_state &= ~OMAP730_FPGA_LED_IDLE; + break; +#endif + + case led_halted: + if (hw_led_state & OMAP730_FPGA_LED_HALTED) + hw_led_state &= ~OMAP730_FPGA_LED_HALTED; + else + hw_led_state |= OMAP730_FPGA_LED_HALTED; + break; + + case led_green_on: + break; + + case led_green_off: + break; + + case led_amber_on: + break; + + case led_amber_off: + break; + + case led_red_on: + break; + + case led_red_off: + break; + + default: + break; + } + + + /* + * Actually burn the LEDs + */ + __raw_writew(~hw_led_state & 0xffff, OMAP730_FPGA_LEDS); + + local_irq_restore(flags); +} diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 405a55f22..bb28824d8 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -8,7 +8,6 @@ choice config ARCH_LUBBOCK bool "Intel DBPXA250 Development Platform" select PXA25x - select SA1111 config MACH_MAINSTONE bool "Intel HCDDBBVA0 Development Platform" @@ -19,41 +18,10 @@ config ARCH_PXA_IDP bool "Accelent Xscale IDP" select PXA25x -config PXA_SHARPSL - bool "SHARP SL-5600 and SL-C7xx Models" - select PXA25x - select SHARP_SCOOP - select SHARP_PARAM - help - Say Y here if you intend to run this kernel on a - Sharp SL-5600 (Poodle), Sharp SL-C700 (Corgi), - SL-C750 (Shepherd) or a Sharp SL-C760 (Husky) - handheld computer. - endchoice endmenu -config MACH_POODLE - bool "Enable Sharp SL-5600 (Poodle) Support" - depends PXA_SHARPSL - select SHARP_LOCOMO - -config MACH_CORGI - bool "Enable Sharp SL-C700 (Corgi) Support" - depends PXA_SHARPSL - select PXA_SHARP_C7xx - -config MACH_SHEPHERD - bool "Enable Sharp SL-C750 (Shepherd) Support" - depends PXA_SHARPSL - select PXA_SHARP_C7xx - -config MACH_HUSKY - bool "Enable Sharp SL-C760 (Husky) Support" - depends PXA_SHARPSL - select PXA_SHARP_C7xx - config PXA25x bool help @@ -69,9 +37,4 @@ config IWMMXT help Enable support for iWMMXt -config PXA_SHARP_C7xx - bool - help - Enable support for all Sharp C7xx models - endif diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index c4e6d2523..23c51e388 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -11,8 +11,6 @@ obj-$(CONFIG_PXA27x) += pxa27x.o obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o obj-$(CONFIG_ARCH_PXA_IDP) += idp.o -obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o ssp.o -obj-$(CONFIG_MACH_POODLE) += poodle.o # Support for blinky lights led-y := leds.o diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index a45aaa115..3fe020210 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -92,7 +92,7 @@ EXPORT_SYMBOL(pxa_set_cken); */ static struct map_desc standard_io_desc[] __initdata = { /* virtual physical length type */ - { 0xf2000000, 0x40000000, 0x02000000, MT_DEVICE }, /* Devs */ + { 0xf2000000, 0x40000000, 0x01800000, MT_DEVICE }, /* Devs */ { 0xf4000000, 0x44000000, 0x00100000, MT_DEVICE }, /* LCD */ { 0xf6000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Mem Ctl */ { 0xf8000000, 0x4c000000, 0x00100000, MT_DEVICE }, /* USB host */ @@ -220,30 +220,6 @@ static struct platform_device stuart_device = { .id = 2, }; -static struct resource i2c_resources[] = { - { - .start = 0x40301680, - .end = 0x403016a3, - .flags = IORESOURCE_MEM, - }, { - .start = IRQ_I2C, - .end = IRQ_I2C, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device i2c_device = { - .name = "pxa2xx-i2c", - .id = 0, - .resource = i2c_resources, - .num_resources = ARRAY_SIZE(i2c_resources), -}; - -void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) -{ - i2c_device.dev.platform_data = info; -} - static struct platform_device *devices[] __initdata = { &pxamci_device, &udc_device, @@ -251,7 +227,6 @@ static struct platform_device *devices[] __initdata = { &ffuart_device, &btuart_device, &stuart_device, - &i2c_device, }; static int __init pxa_init(void) diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index c5a66bf4d..4333a0f19 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -10,16 +10,13 @@ * 2001-09-13: Cliff Brake * Initial code * - * 2005-02-15: Cliff Brake - * - * Updated for 2.6 kernel - * + * Expected command line: mem=32M initrd=0xa1000000,4M root=/dev/ram ramdisk=8192 */ - +#include #include +#include +#include #include -#include -#include #include #include @@ -32,133 +29,68 @@ #include #include -#include -#include -#include #include "generic.h" -/* TODO: - * - add pxa2xx_audio_ops_t device structure - * - Ethernet interrupt - */ - -static struct resource smc91x_resources[] = { - [0] = { - .start = (IDP_ETH_PHYS + 0x300), - .end = (IDP_ETH_PHYS + 0xfffff), - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_GPIO(4), - .end = IRQ_GPIO(4), - .flags = IORESOURCE_IRQ, - } -}; - -static struct platform_device smc91x_device = { - .name = "smc91x", - .id = 0, - .num_resources = ARRAY_SIZE(smc91x_resources), - .resource = smc91x_resources, -}; - -static void idp_backlight_power(int on) -{ - if (on) { - IDP_CPLD_LCD |= (1<<1); - } else { - IDP_CPLD_LCD &= ~(1<<1); - } -} - -static void idp_vlcd(int on) -{ - if (on) { - IDP_CPLD_LCD |= (1<<2); - } else { - IDP_CPLD_LCD &= ~(1<<2); - } -} - -static void idp_lcd_power(int on) -{ - if (on) { - IDP_CPLD_LCD |= (1<<0); - } else { - IDP_CPLD_LCD &= ~(1<<0); - } - - /* call idp_vlcd for now as core driver does not support - * both power and vlcd hooks. Note, this is not technically - * the correct sequence, but seems to work. Disclaimer: - * this may eventually damage the display. - */ - - idp_vlcd(on); -} - -static struct pxafb_mach_info sharp_lm8v31 __initdata = { - .pixclock = 270000, - .xres = 640, - .yres = 480, - .bpp = 16, - .hsync_len = 1, - .left_margin = 3, - .right_margin = 3, - .vsync_len = 1, - .upper_margin = 0, - .lower_margin = 0, - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, - .cmap_greyscale = 0, - .cmap_inverse = 0, - .cmap_static = 0, - .lccr0 = LCCR0_SDS, - .lccr3 = LCCR3_PCP | LCCR3_Acb(255), - .pxafb_backlight_power = &idp_backlight_power, - .pxafb_lcd_power = &idp_lcd_power -}; +#ifndef PXA_IDP_REV02 +/* shadow registers for write only registers */ +unsigned int idp_cpld_led_control_shadow = 0x1; +unsigned int idp_cpld_periph_pwr_shadow = 0xd; +unsigned int ipd_cpld_cir_shadow = 0; +unsigned int idp_cpld_kb_col_high_shadow = 0; +unsigned int idp_cpld_kb_col_low_shadow = 0; +unsigned int idp_cpld_pccard_en_shadow = 0xC3; +unsigned int idp_cpld_gpioh_dir_shadow = 0; +unsigned int idp_cpld_gpioh_value_shadow = 0; +unsigned int idp_cpld_gpiol_dir_shadow = 0; +unsigned int idp_cpld_gpiol_value_shadow = 0; -static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *, struct pt_regs *), void *data) -{ - /* setup GPIO for PXA25x MMC controller */ - pxa_gpio_mode(GPIO6_MMCCLK_MD); - pxa_gpio_mode(GPIO8_MMCCS0_MD); +/* + * enable all LCD signals -- they should still be on + * write protect flash + * enable all serial port transceivers + */ - return 0; -} +unsigned int idp_control_port_shadow = ((0x7 << 21) | /* LCD power */ + (0x1 << 19) | /* disable flash write enable */ + (0x7 << 9)); /* enable serial port transeivers */ -static struct pxamci_platform_data idp_mci_platform_data = { - .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, - .init = idp_mci_init, -}; +#endif static void __init idp_init(void) { printk("idp_init()\n"); - - platform_device_register(&smc91x_device); - //platform_device_register(&mst_audio_device); - set_pxa_fb_info(&sharp_lm8v31); - pxa_set_mci_info(&idp_mci_platform_data); } static void __init idp_init_irq(void) { - pxa_init_irq(); - - set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); } static struct map_desc idp_io_desc[] __initdata = { /* virtual physical length type */ - { IDP_COREVOLT_VIRT, + +#ifndef PXA_IDP_REV02 + { IDP_CTRL_PORT_BASE, + IDP_CTRL_PORT_PHYS, + IDP_CTRL_PORT_SIZE, + MT_DEVICE }, +#endif + + { IDP_IDE_BASE, + IDP_IDE_PHYS, + IDP_IDE_SIZE, + MT_DEVICE }, + { IDP_ETH_BASE, + IDP_ETH_PHYS, + IDP_ETH_SIZE, + MT_DEVICE }, + { IDP_COREVOLT_BASE, IDP_COREVOLT_PHYS, IDP_COREVOLT_SIZE, MT_DEVICE }, - { IDP_CPLD_VIRT, + { IDP_CPLD_BASE, IDP_CPLD_PHYS, IDP_CPLD_SIZE, MT_DEVICE } @@ -169,6 +101,8 @@ static void __init idp_map_io(void) pxa_map_io(); iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc)); + set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); + // serial ports 2 & 3 pxa_gpio_mode(GPIO42_BTRXD_MD); pxa_gpio_mode(GPIO43_BTTXD_MD); @@ -180,8 +114,8 @@ static void __init idp_map_io(void) } -MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") - MAINTAINER("Vibren Technologies") +MACHINE_START(PXA_IDP, "Accelent Xscale IDP") + MAINTAINER("Accelent Systems Inc.") BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) MAPIO(idp_map_io) INITIRQ(idp_init_irq) diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index f2c9e0d2b..87fd729c3 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -30,13 +29,12 @@ #include #include -#include - #include #include #include #include #include +#include #include "generic.h" @@ -107,35 +105,6 @@ static void __init lubbock_init_irq(void) set_irq_type(IRQ_GPIO(0), IRQT_FALLING); } -#ifdef CONFIG_PM - -static int lubbock_irq_resume(struct sys_device *dev) -{ - LUB_IRQ_MASK_EN = lubbock_irq_enabled; - return 0; -} - -static struct sysdev_class lubbock_irq_sysclass = { - set_kset_name("cpld_irq"), - .resume = lubbock_irq_resume, -}; - -static struct sys_device lubbock_irq_device = { - .cls = &lubbock_irq_sysclass, -}; - -static int __init lubbock_irq_device_init(void) -{ - int ret = sysdev_class_register(&lubbock_irq_sysclass); - if (ret == 0) - ret = sysdev_register(&lubbock_irq_device); - return ret; -} - -device_initcall(lubbock_irq_device_init); - -#endif - static int lubbock_udc_is_connected(void) { return (LUB_MISC_RD & (1 << 9)) == 0; @@ -168,7 +137,6 @@ static struct platform_device sa1111_device = { static struct resource smc91x_resources[] = { [0] = { - .name = "smc91x-regs", .start = 0x0c000000, .end = 0x0c0fffff, .flags = IORESOURCE_MEM, @@ -179,7 +147,6 @@ static struct resource smc91x_resources[] = { .flags = IORESOURCE_IRQ, }, [2] = { - .name = "smc91x-attrib", .start = 0x0e000000, .end = 0x0e0fffff, .flags = IORESOURCE_MEM, diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 9799fe80d..901ee6880 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c @@ -29,6 +29,9 @@ */ #undef DEBUG +extern void pxa_cpu_suspend(void); +extern void pxa_cpu_resume(void); + #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] @@ -44,28 +47,16 @@ */ enum { SLEEP_SAVE_START = 0, - SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, SLEEP_SAVE_GPLR3, - SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, SLEEP_SAVE_GPDR3, - SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, SLEEP_SAVE_GRER3, - SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, SLEEP_SAVE_GFER3, - SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3, - - SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U, - SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U, - SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U, - SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U, - - SLEEP_SAVE_PSTR, + SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, + SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, + SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, + SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, + SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR2_L, + SLEEP_SAVE_GAFR0_U, SLEEP_SAVE_GAFR1_U, SLEEP_SAVE_GAFR2_U, SLEEP_SAVE_ICMR, SLEEP_SAVE_CKEN, -#ifdef CONFIG_PXA27x - SLEEP_SAVE_MDREFR, - SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER, - SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR, -#endif - SLEEP_SAVE_CKSUM, SLEEP_SAVE_SIZE @@ -78,12 +69,9 @@ static int pxa_pm_enter(suspend_state_t state) unsigned long checksum = 0; struct timespec delta, rtc; int i; - extern void pxa_cpu_pm_enter(suspend_state_t state); -#ifdef CONFIG_IWMMXT - /* force any iWMMXt context to ram **/ - iwmmxt_task_disable(NULL); -#endif + if (state != PM_SUSPEND_MEM) + return -EINVAL; /* preserve current time */ rtc.tv_sec = RCNR; @@ -94,44 +82,34 @@ static int pxa_pm_enter(suspend_state_t state) SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); SAVE(GFER0); SAVE(GFER1); SAVE(GFER2); - SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); - SAVE(GAFR0_L); SAVE(GAFR0_U); SAVE(GAFR1_L); SAVE(GAFR1_U); SAVE(GAFR2_L); SAVE(GAFR2_U); -#ifdef CONFIG_PXA27x - SAVE(MDREFR); - SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3); - SAVE(GAFR3_L); SAVE(GAFR3_U); - SAVE(PWER); SAVE(PCFR); SAVE(PRER); - SAVE(PFER); SAVE(PKWR); -#endif - SAVE(ICMR); ICMR = 0; SAVE(CKEN); - SAVE(PSTR); + CKEN = 0; /* Note: wake up source are set up in each machine specific files */ /* clear GPIO transition detect bits */ GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2; -#ifdef CONFIG_PXA27x - GEDR3 = GEDR3; -#endif /* Clear sleep reset status */ RCSR = RCSR_SMR; + /* set resume return address */ + PSPR = virt_to_phys(pxa_cpu_resume); + /* before sleeping, calculate and save a checksum */ for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++) checksum += sleep_save[i]; sleep_save[SLEEP_SAVE_CKSUM] = checksum; /* *** go zzz *** */ - pxa_cpu_pm_enter(state); + pxa_cpu_suspend(); /* after sleeping, validate the checksum */ checksum = 0; @@ -143,8 +121,7 @@ static int pxa_pm_enter(suspend_state_t state) #ifdef CONFIG_ARCH_LUBBOCK LUB_HEXLED = 0xbadbadc5; #endif - while (1) - pxa_cpu_pm_enter(state); + while (1); } /* ensure not to come back here if it wasn't intended */ @@ -158,15 +135,6 @@ static int pxa_pm_enter(suspend_state_t state) RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2); RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); - RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); - -#ifdef CONFIG_PXA27x - RESTORE(MDREFR); - RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3); - RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); - RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER); - RESTORE(PFER); RESTORE(PKWR); -#endif PSSR = PSSR_RDH | PSSR_PH; @@ -176,8 +144,6 @@ static int pxa_pm_enter(suspend_state_t state) ICCR = 1; RESTORE(ICMR); - RESTORE(PSTR); - /* restore current time */ rtc.tv_sec = RCNR; restore_time_delta(&delta, &rtc); @@ -199,9 +165,7 @@ unsigned long sleep_phys_sp(void *sp) */ static int pxa_pm_prepare(suspend_state_t state) { - extern int pxa_cpu_pm_prepare(suspend_state_t state); - - return pxa_cpu_pm_prepare(state); + return 0; } /* diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index 815c53225..2f60dea2a 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c @@ -67,7 +67,7 @@ __tagtable(ATAG_ACORN, parse_tag_acorn); static struct map_desc rpc_io_desc[] __initdata = { { SCREEN_BASE, SCREEN_START, 2*1048576, MT_DEVICE }, /* VRAM */ - { (u32)IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ + { IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ { EASI_BASE, EASI_START, EASI_SIZE, MT_DEVICE } /* EASI space */ }; diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 534df0c6c..40604ed09 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig @@ -19,14 +19,6 @@ config ARCH_H1940 . -config MACH_N30 - bool "Acer N30" - select CPU_S3C2410 - help - Say Y here if you are using the Acer N30 - - . - config ARCH_SMDK2410 bool "SMDK2410/A9M2410" select CPU_S3C2410 @@ -34,12 +26,6 @@ config ARCH_SMDK2410 Say Y here if you are using the SMDK2410 or the derived module A9M2410 -config ARCH_S3C2440 - bool "SMDK2440" - select CPU_S3C2440 - help - Say Y here if you are using the SMDK2440. - config MACH_VR1000 bool "Thorcom VR1000" select CPU_S3C2410 @@ -55,21 +41,9 @@ config MACH_RX3715 help Say Y here if you are using the HP iPAQ rx3715. - See for more + See http://www.handhelds.org/projects/rx3715.html for more information on this project -config MACH_OTOM - bool "NexVision OTOM Board" - select CPU_S3C2410 - help - Say Y here if you are using the Nex Vision OTOM board - -config MACH_NEXCODER_2440 - bool "NexVision NEXCODER 2440 Light Board" - select CPU_S3C2440 - help - Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board - endmenu config CPU_S3C2410 @@ -85,26 +59,6 @@ config CPU_S3C2440 help Support for S3C2440 Samsung Mobile CPU based systems. -comment "S3C2410 Boot" - -config S3C2410_BOOT_WATCHDOG - bool "S3C2410 Initialisation watchdog" - depends on ARCH_S3C2410 && S3C2410_WATCHDOG - help - Say y to enable the watchdog during the kernel decompression - stage. If the kernel fails to uncompress, then the watchdog - will trigger a reset and the system should restart. - - Although this uses the same hardware unit as the kernel watchdog - driver, it is not a replacement for it. If you use this option, - you will have to use the watchdg driver to either stop the timeout - or restart it. If you do not, then your kernel will reboot after - startup. - - The driver uses a fixed timeout value, so the exact time till the - system resets depends on the value of PCLK. The timeout on an - 200MHz s3c2410 should be about 30 seconds. - comment "S3C2410 Setup" config S3C2410_DMA @@ -123,7 +77,7 @@ config S3C2410_DMA_DEBUG to the kernel log, at priority KERN_DEBUG. Note, it is easy to create and fill the log buffer in a small - amount of time, as well as using an significant percentage of + amount of time, as well as using an significant percantage of the CPU time doing so. @@ -161,9 +115,9 @@ config S3C2410_LOWLEVEL_UART_PORT Choice of which UART port to use for the low-level messages, such as the `Uncompressing...` at start time. The value of this configuration should be between zero and two. The port - must have been initialised by the boot-loader before use. + must have been initalised by the boot-loader before use. Note, this does not affect the port used by the debug messages, - which is a separate configuration. + which is a seperate configuration. endif diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 7c379aad5..aa8b30874 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile @@ -27,10 +27,6 @@ obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o -obj-$(CONFIG_MACH_N30) += mach-n30.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o -obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o -obj-$(CONFIG_MACH_OTOM) += mach-otom.o -obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 3bb97eb6e..7e6257c86 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/mach-bast.c * - * Copyright (c) 2003-2005 Simtec Electronics + * Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks * * http://www.simtec.co.uk/products/EB2410ITX/ @@ -20,12 +20,6 @@ * 18-Jan-2003 BJD Added serial port configuration * 05-Oct-2004 BJD Power management code * 04-Nov-2004 BJD Updated serial port clocks - * 04-Jan-2005 BJD New uart init call - * 10-Jan-2005 BJD Removed include of s3c2410.h - * 14-Jan-2005 BJD Add support for muitlple NAND devices - * 03-Mar-2005 BJD Ensured that bast-cpld.h is included - * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA - * 14-Mar-2006 BJD Updated for __iomem changes */ #include @@ -42,7 +36,6 @@ #include #include -#include #include #include @@ -53,26 +46,21 @@ #include #include #include -#include - -#include -#include -#include -#include +#include "s3c2410.h" #include "clock.h" #include "devs.h" #include "cpu.h" #include "usb-simtec.h" #include "pm.h" -#define COPYRIGHT ", (c) 2004-2005 Simtec Electronics" +#define COPYRIGHT ", (c) 2004 Simtec Electronics" /* macros for virtual address mods for the io space entries */ -#define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5) -#define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4) -#define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3) -#define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2) +#define VA_C5(item) ((item) + BAST_VAM_CS5) +#define VA_C4(item) ((item) + BAST_VAM_CS4) +#define VA_C3(item) ((item) + BAST_VAM_CS3) +#define VA_C2(item) ((item) + BAST_VAM_CS2) /* macros to modify the physical addresses for io space */ @@ -84,8 +72,8 @@ static struct map_desc bast_iodesc[] __initdata = { /* ISA IO areas */ - { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, - { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, + { S3C2410_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, + { S3C2410_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, /* we could possibly compress the next set down into a set of smaller tables * pagetables, but that would mean using an L2 section, and it still means @@ -93,15 +81,26 @@ static struct map_desc bast_iodesc[] __initdata = { */ /* bast CPLD control registers, and external interrupt controls */ - { (u32)BAST_VA_CTRL1, BAST_PA_CTRL1, SZ_1M, MT_DEVICE }, - { (u32)BAST_VA_CTRL2, BAST_PA_CTRL2, SZ_1M, MT_DEVICE }, - { (u32)BAST_VA_CTRL3, BAST_PA_CTRL3, SZ_1M, MT_DEVICE }, - { (u32)BAST_VA_CTRL4, BAST_PA_CTRL4, SZ_1M, MT_DEVICE }, + { BAST_VA_CTRL1, BAST_PA_CTRL1, SZ_1M, MT_DEVICE }, + { BAST_VA_CTRL2, BAST_PA_CTRL2, SZ_1M, MT_DEVICE }, + { BAST_VA_CTRL3, BAST_PA_CTRL3, SZ_1M, MT_DEVICE }, + { BAST_VA_CTRL4, BAST_PA_CTRL4, SZ_1M, MT_DEVICE }, /* PC104 IRQ mux */ - { (u32)BAST_VA_PC104_IRQREQ, BAST_PA_PC104_IRQREQ, SZ_1M, MT_DEVICE }, - { (u32)BAST_VA_PC104_IRQRAW, BAST_PA_PC104_IRQRAW, SZ_1M, MT_DEVICE }, - { (u32)BAST_VA_PC104_IRQMASK, BAST_PA_PC104_IRQMASK, SZ_1M, MT_DEVICE }, + { BAST_VA_PC104_IRQREQ, BAST_PA_PC104_IRQREQ, SZ_1M, MT_DEVICE }, + { BAST_VA_PC104_IRQRAW, BAST_PA_PC104_IRQRAW, SZ_1M, MT_DEVICE }, + { BAST_VA_PC104_IRQMASK, BAST_PA_PC104_IRQMASK, SZ_1M, MT_DEVICE }, + + /* onboard 8bit lcd port */ + + { BAST_VA_LCD_RCMD1, BAST_PA_LCD_RCMD1, SZ_1M, MT_DEVICE }, + { BAST_VA_LCD_WCMD1, BAST_PA_LCD_WCMD1, SZ_1M, MT_DEVICE }, + { BAST_VA_LCD_RDATA1, BAST_PA_LCD_RDATA1, SZ_1M, MT_DEVICE }, + { BAST_VA_LCD_WDATA1, BAST_PA_LCD_WDATA1, SZ_1M, MT_DEVICE }, + { BAST_VA_LCD_RCMD2, BAST_PA_LCD_RCMD2, SZ_1M, MT_DEVICE }, + { BAST_VA_LCD_WCMD2, BAST_PA_LCD_WCMD2, SZ_1M, MT_DEVICE }, + { BAST_VA_LCD_RDATA2, BAST_PA_LCD_RDATA2, SZ_1M, MT_DEVICE }, + { BAST_VA_LCD_WDATA2, BAST_PA_LCD_WDATA2, SZ_1M, MT_DEVICE }, /* peripheral space... one for each of fast/slow/byte/16bit */ /* note, ide is only decoded in word space, even though some registers @@ -220,100 +219,6 @@ static struct platform_device bast_device_nor = { .resource = bast_nor_resource, }; -/* NAND Flash on BAST board */ - - -static int smartmedia_map[] = { 0 }; -static int chip0_map[] = { 1 }; -static int chip1_map[] = { 2 }; -static int chip2_map[] = { 3 }; - -struct mtd_partition bast_default_nand_part[] = { - [0] = { - .name = "Boot Agent", - .size = SZ_16K, - .offset = 0 - }, - [1] = { - .name = "/boot", - .size = SZ_4M - SZ_16K, - .offset = SZ_16K, - }, - [2] = { - .name = "user", - .offset = SZ_4M, - .size = MTDPART_SIZ_FULL, - } -}; - -/* the bast has 4 selectable slots for nand-flash, the three - * on-board chip areas, as well as the external SmartMedia - * slot. - * - * Note, there is no current hot-plug support for the SmartMedia - * socket. -*/ - -static struct s3c2410_nand_set bast_nand_sets[] = { - [0] = { - .name = "SmartMedia", - .nr_chips = 1, - .nr_map = smartmedia_map, - .nr_partitions = ARRAY_SIZE(bast_default_nand_part), - .partitions = bast_default_nand_part - }, - [1] = { - .name = "chip0", - .nr_chips = 1, - .nr_map = chip0_map, - .nr_partitions = ARRAY_SIZE(bast_default_nand_part), - .partitions = bast_default_nand_part - }, - [2] = { - .name = "chip1", - .nr_chips = 1, - .nr_map = chip1_map, - .nr_partitions = ARRAY_SIZE(bast_default_nand_part), - .partitions = bast_default_nand_part - }, - [3] = { - .name = "chip2", - .nr_chips = 1, - .nr_map = chip2_map, - .nr_partitions = ARRAY_SIZE(bast_default_nand_part), - .partitions = bast_default_nand_part - } -}; - -static void bast_nand_select(struct s3c2410_nand_set *set, int slot) -{ - unsigned int tmp; - - slot = set->nr_map[slot] & 3; - - pr_debug("bast_nand: selecting slot %d (set %p,%p)\n", - slot, set, set->nr_map); - - tmp = __raw_readb(BAST_VA_CTRL2); - tmp &= BAST_CPLD_CTLR2_IDERST; - tmp |= slot; - tmp |= BAST_CPLD_CTRL2_WNAND; - - pr_debug("bast_nand: ctrl2 now %02x\n", tmp); - - __raw_writeb(tmp, BAST_VA_CTRL2); -} - -static struct s3c2410_platform_nand bast_nand_info = { - .tacls = 80, - .twrph0 = 80, - .twrph1 = 80, - .nr_sets = ARRAY_SIZE(bast_nand_sets), - .sets = bast_nand_sets, - .select_chip = bast_nand_select, -}; - - /* Standard BAST devices */ static struct platform_device *bast_devices[] __initdata = { @@ -323,7 +228,6 @@ static struct platform_device *bast_devices[] __initdata = { &s3c_device_i2c, &s3c_device_iis, &s3c_device_rtc, - &s3c_device_nand, &bast_device_nor }; @@ -357,18 +261,15 @@ void __init bast_map_io(void) s3c24xx_uclk.parent = &s3c24xx_clkout1; - s3c_device_nand.dev.platform_data = &bast_nand_info; - s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); - s3c24xx_init_clocks(0); - s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); + s3c2410_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); s3c24xx_set_board(&bast_board); usb_simtec_init(); } void __init bast_init_irq(void) { - s3c24xx_init_irq(); + s3c2410_init_irq(); } #ifdef CONFIG_PM @@ -400,10 +301,10 @@ static __init void bast_init_machine(void) MACHINE_START(BAST, "Simtec-BAST") MAINTAINER("Ben Dooks ") - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) + BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART) BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) MAPIO(bast_map_io) INITIRQ(bast_init_irq) .init_machine = bast_init_machine, - .timer = &s3c24xx_timer, + .timer = &s3c2410_timer, MACHINE_END diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 2924afc06..8d0f08450 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/mach-h1940.c * - * Copyright (c) 2003-2005 Simtec Electronics + * Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks * * http://www.handhelds.org/projects/h1940.html @@ -20,10 +20,6 @@ * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_ * 18-Oct-2004 BJD Updated new board structure name * 04-Nov-2004 BJD Change for new serial clock - * 04-Jan-2005 BJD Updated uart init call - * 10-Jan-2005 BJD Removed include of s3c2410.h - * 14-Jan-2005 BJD Added clock init - * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA */ #include @@ -48,6 +44,7 @@ #include +#include "s3c2410.h" #include "clock.h" #include "devs.h" #include "cpu.h" @@ -105,22 +102,21 @@ static struct s3c24xx_board h1940_board __initdata = { void __init h1940_map_io(void) { s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); - s3c24xx_init_clocks(0); - s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); + s3c2410_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); s3c24xx_set_board(&h1940_board); } void __init h1940_init_irq(void) { - s3c24xx_init_irq(); + s3c2410_init_irq(); } MACHINE_START(H1940, "IPAQ-H1940") MAINTAINER("Ben Dooks ") - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) + BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART) BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) MAPIO(h1940_map_io) INITIRQ(h1940_init_irq) - .timer = &s3c24xx_timer, + .timer = &s3c2410_timer, MACHINE_END diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 5512146b1..4079af11a 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/mach-vr1000.c * - * Copyright (c) 2003-2005 Simtec Electronics + * Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks * * Machine support for Thorcom VR1000 board. Designed for Thorcom by @@ -18,15 +18,6 @@ * 05-Apr-2004 BJD Copied to make mach-vr1000.c * 18-Oct-2004 BJD Updated board struct * 04-Nov-2004 BJD Clock and serial configuration update - * - * 04-Jan-2005 BJD Updated uart init call - * 10-Jan-2005 BJD Removed include of s3c2410.h - * 14-Jan-2005 BJD Added clock init - * 15-Jan-2005 BJD Add serial port device definition - * 20-Jan-2005 BJD Use UPF_IOREMAP for ports - * 10-Feb-2005 BJD Added power-off capability - * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA - * 14-Mar-2006 BJD void __iomem fixes */ #include @@ -36,38 +27,32 @@ #include #include -#include -#include -#include -#include - #include #include #include #include #include -#include -#include #include #include #include #include +//#include #include -#include +#include "s3c2410.h" #include "clock.h" #include "devs.h" #include "cpu.h" #include "usb-simtec.h" /* macros for virtual address mods for the io space entries */ -#define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5) -#define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4) -#define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3) -#define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2) +#define VA_C5(item) ((item) + BAST_VAM_CS5) +#define VA_C4(item) ((item) + BAST_VAM_CS4) +#define VA_C3(item) ((item) + BAST_VAM_CS3) +#define VA_C2(item) ((item) + BAST_VAM_CS2) /* macros to modify the physical addresses for io space */ @@ -79,8 +64,8 @@ static struct map_desc vr1000_iodesc[] __initdata = { /* ISA IO areas */ - { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, - { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, + { S3C2410_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, + { S3C2410_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, /* we could possibly compress the next set down into a set of smaller tables * pagetables, but that would mean using an L2 section, and it still means @@ -88,10 +73,10 @@ static struct map_desc vr1000_iodesc[] __initdata = { */ /* bast CPLD control registers, and external interrupt controls */ - { (u32)VR1000_VA_CTRL1, VR1000_PA_CTRL1, SZ_1M, MT_DEVICE }, - { (u32)VR1000_VA_CTRL2, VR1000_PA_CTRL2, SZ_1M, MT_DEVICE }, - { (u32)VR1000_VA_CTRL3, VR1000_PA_CTRL3, SZ_1M, MT_DEVICE }, - { (u32)VR1000_VA_CTRL4, VR1000_PA_CTRL4, SZ_1M, MT_DEVICE }, + { VR1000_VA_CTRL1, VR1000_PA_CTRL1, SZ_1M, MT_DEVICE }, + { VR1000_VA_CTRL2, VR1000_PA_CTRL2, SZ_1M, MT_DEVICE }, + { VR1000_VA_CTRL3, VR1000_PA_CTRL3, SZ_1M, MT_DEVICE }, + { VR1000_VA_CTRL4, VR1000_PA_CTRL4, SZ_1M, MT_DEVICE }, /* peripheral space... one for each of fast/slow/byte/16bit */ /* note, ide is only decoded in word space, even though some registers @@ -179,82 +164,12 @@ static struct s3c2410_uartcfg vr1000_uartcfgs[] = { } }; -/* definitions for the vr1000 extra 16550 serial ports */ - -#define VR1000_BAUDBASE (3692307) - -#define VR1000_SERIAL_MAPBASE(x) (VR1000_PA_SERIAL + 0x80 + ((x) << 5)) - -static struct plat_serial8250_port serial_platform_data[] = { - [0] = { - .mapbase = VR1000_SERIAL_MAPBASE(0), - .irq = IRQ_VR1000_SERIAL + 0, - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, - .iotype = UPIO_MEM, - .regshift = 0, - .uartclk = VR1000_BAUDBASE, - }, - [1] = { - .mapbase = VR1000_SERIAL_MAPBASE(1), - .irq = IRQ_VR1000_SERIAL + 1, - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, - .iotype = UPIO_MEM, - .regshift = 0, - .uartclk = VR1000_BAUDBASE, - }, - [2] = { - .mapbase = VR1000_SERIAL_MAPBASE(2), - .irq = IRQ_VR1000_SERIAL + 2, - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, - .iotype = UPIO_MEM, - .regshift = 0, - .uartclk = VR1000_BAUDBASE, - }, - [3] = { - .mapbase = VR1000_SERIAL_MAPBASE(3), - .irq = IRQ_VR1000_SERIAL + 3, - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, - .iotype = UPIO_MEM, - .regshift = 0, - .uartclk = VR1000_BAUDBASE, - }, - { }, -}; - -static struct platform_device serial_device = { - .name = "serial8250", - .id = 0, - .dev = { - .platform_data = serial_platform_data, - }, -}; - -/* MTD NOR Flash */ - -static struct resource vr1000_nor_resource[] = { - [0] = { - .start = S3C2410_CS1 + 0x4000000, - .end = S3C2410_CS1 + 0x4000000 + SZ_16M - 1, - .flags = IORESOURCE_MEM, - } -}; - -static struct platform_device vr1000_nor = { - .name = "bast-nor", - .id = -1, - .num_resources = ARRAY_SIZE(vr1000_nor_resource), - .resource = vr1000_nor_resource, -}; - - static struct platform_device *vr1000_devices[] __initdata = { &s3c_device_usb, &s3c_device_lcd, &s3c_device_wdt, &s3c_device_i2c, &s3c_device_iis, - &serial_device, - &vr1000_nor, }; static struct clk *vr1000_clocks[] = { @@ -272,11 +187,6 @@ static struct s3c24xx_board vr1000_board __initdata = { .clocks_count = ARRAY_SIZE(vr1000_clocks), }; -static void vr1000_power_off(void) -{ - s3c2410_gpio_cfgpin(S3C2410_GPB9, S3C2410_GPB9_OUTP); - s3c2410_gpio_setpin(S3C2410_GPB9, 1); -} void __init vr1000_map_io(void) { @@ -293,25 +203,22 @@ void __init vr1000_map_io(void) s3c24xx_uclk.parent = &s3c24xx_clkout1; - pm_power_off = vr1000_power_off; - s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); - s3c24xx_init_clocks(0); - s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); + s3c2410_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); s3c24xx_set_board(&vr1000_board); usb_simtec_init(); } void __init vr1000_init_irq(void) { - s3c24xx_init_irq(); + s3c2410_init_irq(); } MACHINE_START(VR1000, "Thorcom-VR1000") MAINTAINER("Ben Dooks ") - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) + BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART) BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) MAPIO(vr1000_map_io) INITIRQ(vr1000_init_irq) - .timer = &s3c24xx_timer, + .timer = &s3c2410_timer, MACHINE_END diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index ff2f25409..66a34913c 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/s3c2410.c * - * Copyright (c) 2003-2005 Simtec Electronics + * Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks * * http://www.simtec.co.uk/products/EB2410ITX/ @@ -17,7 +17,6 @@ * 21-Aug-2004 BJD Added new struct s3c2410_board handler * 28-Sep-2004 BJD Updates for new serial port bits * 04-Nov-2004 BJD Updated UART configuration process - * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate */ #include @@ -43,6 +42,8 @@ #include "cpu.h" #include "clock.h" +int s3c2410_clock_tick_rate = 12*1000*1000; /* current timers at 12MHz */ + /* Initial IO mappings */ static struct map_desc s3c2410_iodesc[] __initdata = { @@ -151,45 +152,44 @@ void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no) * * register the standard cpu IO areas, and any passed in from the * machine specific initialisation. + * + * this function also sets the initial clock frequencies from the + * settings passed in */ void __init s3c2410_map_io(struct map_desc *mach_desc, int mach_size) { + unsigned long tmp; + /* register our io-tables */ iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); iotable_init(mach_desc, mach_size); -} - -void __init s3c2410_init_clocks(int xtal) -{ - unsigned long tmp; - unsigned long fclk; - unsigned long hclk; - unsigned long pclk; /* now we've got our machine bits initialised, work out what * clocks we've got */ - fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal); + s3c24xx_fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), + s3c24xx_xtal); tmp = __raw_readl(S3C2410_CLKDIVN); /* work out clock scalings */ - hclk = fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1); - pclk = hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1); + s3c24xx_hclk = s3c24xx_fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1); + s3c24xx_pclk = s3c24xx_hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1); /* print brieft summary of clocks, etc */ printk("S3C2410: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", - print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); + print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk), + print_mhz(s3c24xx_pclk)); /* initialise the clocks here, to allow other things like the * console to use them */ - s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); + s3c2410_init_clocks(); } int __init s3c2410_init(void) diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h index 4d5312a48..93395637d 100644 --- a/arch/arm/mach-s3c2410/s3c2410.h +++ b/arch/arm/mach-s3c2410/s3c2410.h @@ -1,7 +1,7 @@ /* arch/arm/mach-s3c2410/s3c2410.h * * Copyright (c) 2004 Simtec Electronics - * Ben Dooks + * Ben Dooks * * Header file for s3c2410 machine directory * @@ -14,24 +14,17 @@ * 20-Aug-2004 BJD Added s3c2410_board struct * 04-Sep-2004 BJD Added s3c2410_init_uarts() call * 17-Oct-2004 BJD Moved board out to cpu - * 04-Jan-2005 BJD Changed uart init - * 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here - * 14-Jan-2005 BJD Added s3c2410_init_clocks call */ -#ifdef CONFIG_CPU_S3C2410 +struct s3c2410_uartcfg; -extern int s3c2410_init(void); +extern void s3c2410_map_io(struct map_desc *, int count); -extern void s3c2410_map_io(struct map_desc *mach_desc, int size); +extern void s3c2410_init_uarts(struct s3c2410_uartcfg *, int no); -extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); +extern void s3c2410_init_irq(void); -extern void s3c2410_init_clocks(int xtal); +struct sys_timer; +extern struct sys_timer s3c2410_timer; -#else -#define s3c2410_init_clocks NULL -#define s3c2410_init_uarts NULL -#define s3c2410_map_io NULL -#define s3c2410_init NULL -#endif +extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index 6923316b3..aa7d1c792 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig @@ -11,7 +11,6 @@ config SA1100_ASSABET config ASSABET_NEPONSET bool "Include support for Neponset" depends on SA1100_ASSABET - select SA1111 help Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 Microprocessor Development Board (Assabet) with the SA-1111 @@ -45,9 +44,7 @@ endchoice config SA1100_COLLIE bool "Sharp Zaurus SL5500" - select SHARP_LOCOMO - select SHARP_SCOOP - select SHARP_PARAM + depends on ARCH_SA1100 help Say Y here to support the Sharp Zaurus SL5500 PDAs. @@ -88,14 +85,12 @@ config SA1100_H3XXX config SA1100_BADGE4 bool "HP Labs BadgePAD 4" - select SA1111 help Say Y here if you want to build a kernel for the HP Laboratories BadgePAD 4. config SA1100_JORNADA720 bool "HP Jornada 720" - select SA1111 help Say Y here if you want to build a kernel for the HP Jornada 720 handheld computer. See @@ -150,7 +145,7 @@ config SA1100_SSP config H3600_SLEEVE tristate "Compaq iPAQ Handheld sleeve support" - depends on SA1100_H3100 || SA1100_H3600 + depends on SA1100_H3600 help Choose this option to enable support for extension packs (sleeves) for the Compaq iPAQ H3XXX series of handheld computers. This option diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index bedf88faf..a3003b867 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c @@ -259,11 +259,9 @@ static void __init map_sa1100_gpio_regs( void ) unsigned long phys = __PREG(GPLR) & PMD_MASK; unsigned long virt = io_p2v(phys); int prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO); - pmd_t *pmd; - - pmd = pmd_offset(pgd_offset_k(virt), virt); - *pmd = __pmd(phys | prot); - flush_pmd_entry(pmd); + pmd_t pmd; + pmd_val(pmd) = phys | prot; + set_pmd(pmd_offset(pgd_offset_k(virt), virt), pmd); } /* diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c index 6a60b497a..0e66ec02c 100644 --- a/arch/arm/mach-sa1100/badge4.c +++ b/arch/arm/mach-sa1100/badge4.c @@ -57,7 +57,7 @@ static struct platform_device sa1111_device = { .name = "sa1111", .id = 0, .dev = { - .dma_mask = &sa1111_dmamask, + .dma_mask = &sa1111_dmamask; .coherent_dma_mask = 0xffffffff, }, .num_resources = ARRAY_SIZE(sa1111_resources), @@ -212,7 +212,8 @@ static int __init badge4_init(void) /* maybe turn on 5v0 from the start */ badge4_set_5V(BADGE4_5V_INITIALLY, five_v_on); - sa11x0_set_flash_data(&badge4_flash_data, &badge4_flash_resource, 1); + sa11x0_set_flash_data(badge4_flash_data, badge4_flash_resources, + ARRAY_SIZE(badge4_flash_resources); return 0; } diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index 84c865435..9788d3aef 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c @@ -130,7 +130,7 @@ static int h3600_irda_set_power(struct device *dev, unsigned int state) return 0; } -static void h3600_irda_set_speed(struct device *dev, unsigned int speed) +static void h3600_irda_set_speed(struct device *dev, int speed) { if (speed < 4000000) { clr_h3600_egpio(IPAQ_EGPIO_IR_FSEL); diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index edddd559b..66fe6fdf0 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c @@ -2,17 +2,15 @@ * linux/arch/arm/mach-sa1100/shannon.c */ -#include #include -#include #include #include #include #include #include -#include #include +#include #include #include @@ -54,7 +52,7 @@ static struct resource shannon_flash_resource = { static void __init shannon_init(void) { - sa11x0_set_flash_data(&shannon_flash_data, &shannon_flash_resource, 1); + sa11x0_set_flash_data(&shannon_flash_data, shannon_flash_resource, 1); } static void __init shannon_map_io(void) diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index a9bc5d0db..81881e922 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c @@ -93,6 +93,8 @@ static struct irqaction shark_timer_irq = { */ static void __init shark_timer_init(void) { + unsigned long flags; + outb(0x34, 0x43); /* binary, mode 0, LSB/MSB, Ch 0 */ outb(HZ_TIME & 0xff, 0x40); /* LSB of count */ outb(HZ_TIME >> 8, 0x40); diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 302c2a7b9..2e71ad683 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -543,7 +543,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb) val |= SYS_CLCD_MODE_5551; break; case 6: - val |= SYS_CLCD_MODE_565_RLSB; + val |= SYS_CLCD_MODE_565_BLSB; break; case 8: val |= SYS_CLCD_MODE_888; @@ -597,14 +597,6 @@ static int versatile_clcd_setup(struct clcd_fb *fb) return 0; } -static int versatile_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) -{ - return dma_mmap_writecombine(&fb->dev->dev, vma, - fb->fb.screen_base, - fb->fb.fix.smem_start, - fb->fb.fix.smem_len); -} - static void versatile_clcd_remove(struct clcd_fb *fb) { dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, @@ -618,7 +610,6 @@ static struct clcd_board clcd_plat_data = { .disable = versatile_clcd_disable, .enable = versatile_clcd_enable, .setup = versatile_clcd_setup, - .mmap = versatile_clcd_mmap, .remove = versatile_clcd_remove, }; diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 3fefb43c6..787daaa3a 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -82,9 +82,9 @@ config CPU_ARM920T # ARM922T config CPU_ARM922T - bool "Support ARM922T processor" if ARCH_INTEGRATOR - depends on ARCH_CAMELOT || ARCH_LH7A40X || ARCH_INTEGRATOR - default y if ARCH_CAMELOT || ARCH_LH7A40X + bool + depends on ARCH_CAMELOT || ARCH_LH7A40X + default y select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT @@ -101,9 +101,9 @@ config CPU_ARM922T # ARM925T config CPU_ARM925T - bool "Support ARM925T processor" if ARCH_OMAP + bool depends on ARCH_OMAP1510 - default y if ARCH_OMAP1510 + default y select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT @@ -121,8 +121,8 @@ config CPU_ARM925T # ARM926T config CPU_ARM926T bool "Support ARM926T processor" if ARCH_INTEGRATOR - depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX - default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX + depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP1610 || ARCH_OMAP5912 + default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB select CPU_32v5 select CPU_ABRT_EV5TJ select CPU_CACHE_VIVT @@ -228,6 +228,7 @@ config CPU_SA1100 select CPU_CACHE_V4WB select CPU_CACHE_VIVT select CPU_TLB_V4WB + select CPU_MINICACHE # XScale config CPU_XSCALE @@ -238,6 +239,7 @@ config CPU_XSCALE select CPU_ABRT_EV5T select CPU_CACHE_VIVT select CPU_TLB_V4WBI + select CPU_MINICACHE # ARMv6 config CPU_V6 @@ -343,6 +345,11 @@ config CPU_TLB_V4WBI config CPU_TLB_V6 bool +config CPU_MINICACHE + bool + help + Processor has a minicache. + comment "Processor Features" config ARM_THUMB @@ -385,9 +392,8 @@ config CPU_DCACHE_DISABLE config CPU_DCACHE_WRITETHROUGH bool "Force write through D-cache" depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020) && !CPU_DISABLE_DCACHE - default y if CPU_ARM925T help - Say Y here to use the data cache in writethrough mode. Unless you + Say Y here to use the data cache in writethough mode. Unless you specifically require this or are unsure, say N. config CPU_CACHE_ROUND_ROBIN @@ -402,31 +408,3 @@ config CPU_BPREDICT_DISABLE depends on CPU_ARM1020 help Say Y here to disable branch prediction. If unsure, say N. - -config TLS_REG_EMUL - bool - default y if SMP && (CPU_32v5 || CPU_32v4 || CPU_32v3) - help - An SMP system using a pre-ARMv6 processor (there are apparently - a few prototypes like that in existence) and therefore access to - that required register must be emulated. - -config HAS_TLS_REG - bool - depends on !TLS_REG_EMUL - default y if SMP || CPU_32v7 - help - This selects support for the CP15 thread register. - It is defined to be available on some ARMv6 processors (including - all SMP capable ARMv6's) or later processors. User space may - assume directly accessing that register and always obtain the - expected value only on ARMv7 and above. - -config NEEDS_SYSCALL_FOR_CMPXCHG - bool - default y if SMP && (CPU_32v5 || CPU_32v4 || CPU_32v3) - help - SMP on a pre-ARMv6 processor? Well OK then. - Forget about fast user space cmpxchg support. - It is just not possible. - diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index 26356ce4d..57b0be2ab 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c @@ -1,7 +1,7 @@ /* * linux/arch/arm/mm/consistent.c * - * Copyright (C) 2000-2004 Russell King + * Copyright (C) 2000-2002 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -30,7 +30,7 @@ * This is the page table (2MB) covering uncached, DMA consistent allocations */ static pte_t *consistent_pte; -static DEFINE_SPINLOCK(consistent_lock); +static spinlock_t consistent_lock = SPIN_LOCK_UNLOCKED; /* * VM region handling support. @@ -65,7 +65,6 @@ struct vm_region { struct list_head vm_list; unsigned long vm_start; unsigned long vm_end; - struct page *vm_pages; }; static struct vm_region consistent_head = { @@ -207,8 +206,6 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp, pte_t *pte = consistent_pte + CONSISTENT_OFFSET(c->vm_start); struct page *end = page + (1 << order); - c->vm_pages = page; - /* * Set the "dma handle" */ @@ -218,9 +215,6 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp, BUG_ON(!pte_none(*pte)); set_page_count(page, 1); - /* - * x86 does not mark the pages reserved... - */ SetPageReserved(page); set_pte(pte, mk_pte(page, prot)); page++; @@ -270,60 +264,13 @@ dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, int } EXPORT_SYMBOL(dma_alloc_writecombine); -static int dma_mmap(struct device *dev, struct vm_area_struct *vma, - void *cpu_addr, dma_addr_t dma_addr, size_t size) -{ - unsigned long flags, user_size, kern_size; - struct vm_region *c; - int ret = -ENXIO; - - user_size = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; - - spin_lock_irqsave(&consistent_lock, flags); - c = vm_region_find(&consistent_head, (unsigned long)cpu_addr); - spin_unlock_irqrestore(&consistent_lock, flags); - - if (c) { - unsigned long off = vma->vm_pgoff; - - kern_size = (c->vm_end - c->vm_start) >> PAGE_SHIFT; - - if (off < kern_size && - user_size <= (kern_size - off)) { - vma->vm_flags |= VM_RESERVED; - ret = remap_pfn_range(vma, vma->vm_start, - page_to_pfn(c->vm_pages) + off, - user_size << PAGE_SHIFT, - vma->vm_page_prot); - } - } - - return ret; -} - -int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma, - void *cpu_addr, dma_addr_t dma_addr, size_t size) -{ - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - return dma_mmap(dev, vma, cpu_addr, dma_addr, size); -} -EXPORT_SYMBOL(dma_mmap_coherent); - -int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma, - void *cpu_addr, dma_addr_t dma_addr, size_t size) -{ - vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); - return dma_mmap(dev, vma, cpu_addr, dma_addr, size); -} -EXPORT_SYMBOL(dma_mmap_writecombine); - /* * free a page as defined by the above mapping. */ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle) { struct vm_region *c; - unsigned long flags, addr; + unsigned long flags; pte_t *ptep; size = PAGE_ALIGN(size); @@ -342,23 +289,17 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr } ptep = consistent_pte + CONSISTENT_OFFSET(c->vm_start); - addr = c->vm_start; do { - pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep); + pte_t pte = ptep_get_and_clear(ptep); unsigned long pfn; ptep++; - addr += PAGE_SIZE; if (!pte_none(pte) && pte_present(pte)) { pfn = pte_pfn(pte); if (pfn_valid(pfn)) { struct page *page = pfn_to_page(pfn); - - /* - * x86 does not mark the pages reserved... - */ ClearPageReserved(page); __free_page(page); diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 01967ddee..5f0a79094 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c @@ -54,7 +54,7 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) * fault (ie, is old), we can safely ignore any issues. */ if (pte_present(entry) && pte_val(entry) & shared_pte_mask) { - flush_cache_page(vma, address, pte_pfn(entry)); + flush_cache_page(vma, address); pte_val(entry) &= ~shared_pte_mask; set_pte(pte, entry); flush_tlb_page(vma, address); @@ -115,7 +115,7 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page, if (aliases) adjust_pte(vma, addr); else - flush_cache_page(vma, addr, page_to_pfn(page)); + flush_cache_page(vma, addr); } /* diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 72a2b8cee..51f3be19e 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -56,7 +55,7 @@ void show_mem(void) show_free_areas(); printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); - for_each_online_node(node) { + for (node = 0; node < numnodes; node++) { struct page *page, *end; page = NODE_MEM_MAP(node); @@ -179,14 +178,18 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np) node = mi->bank[i].node; - /* - * Make sure we haven't exceeded the maximum number of nodes - * that we have in this configuration. If we have, we're in - * trouble. (maybe we ought to limit, instead of bugging?) - */ - if (node >= MAX_NUMNODES) - BUG(); - node_set_online(node); + if (node >= numnodes) { + numnodes = node + 1; + + /* + * Make sure we haven't exceeded the maximum number + * of nodes that we have in this configuration. If + * we have, we're in trouble. (maybe we ought to + * limit, instead of bugging?) + */ + if (numnodes > MAX_NUMNODES) + BUG(); + } /* * Get the start and end pfns for this bank @@ -208,7 +211,7 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np) * Calculate the number of pages we require to * store the bootmem bitmaps. */ - for_each_online_node(i) { + for (i = 0; i < numnodes; i++) { if (np[i].end == 0) continue; @@ -223,9 +226,6 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np) * This doesn't seem to be used by the Linux memory * manager any more. If we can get rid of it, we * also get rid of some of the stuff above as well. - * - * Note: max_low_pfn and max_pfn reflect the number - * of _pages_ in the system, not the maximum PFN. */ max_low_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET); max_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET); @@ -380,13 +380,13 @@ static void __init bootmem_init(struct meminfo *mi) * (we could also do with rolling bootmem_init and paging_init * into one generic "memory_init" type function). */ - np += num_online_nodes() - 1; - for (node = num_online_nodes() - 1; node >= 0; node--, np--) { + np += numnodes - 1; + for (node = numnodes - 1; node >= 0; node--, np--) { /* * If there are no pages in this node, ignore it. * Note that node 0 must always have some pages. */ - if (np->end == 0 || !node_online(node)) { + if (np->end == 0) { if (node == 0) BUG(); continue; @@ -449,7 +449,7 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) /* * initialise the zones within each node */ - for_each_online_node(node) { + for (node = 0; node < numnodes; node++) { unsigned long zone_size[MAX_NR_ZONES]; unsigned long zhole_size[MAX_NR_ZONES]; struct bootmem_data *bdata; @@ -504,6 +504,10 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) bdata->node_boot_start >> PAGE_SHIFT, zhole_size); } +#ifndef CONFIG_DISCONTIGMEM + mem_map = contig_page_data.node_mem_map; +#endif + /* * finish off the bad pages once * the mem_map is initialised @@ -554,7 +558,7 @@ void __init mem_init(void) create_memmap_holes(&meminfo); /* this will put all unused low memory onto the freelists */ - for_each_online_node(node) { + for (node = 0; node < numnodes; node++) { pg_data_t *pgdat = NODE_DATA(node); if (pgdat->node_spanned_pages != 0) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 00bb8fd37..49a57b9f0 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -148,7 +148,7 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags, */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PAGE_MASK; - size = PAGE_ALIGN(last_addr + 1) - phys_addr; + size = PAGE_ALIGN(last_addr) - phys_addr; /* * Ok, go for it.. diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index 2c2b93d77..9150033e8 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -37,8 +36,6 @@ pgprot_t pgprot_kernel; EXPORT_SYMBOL(pgprot_kernel); -pmd_t *top_pmd; - struct cachepolicy { const char policy[16]; unsigned int cr_mask; @@ -144,16 +141,6 @@ __setup("noalign", noalign_setup); #define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD) -static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt) -{ - return pmd_offset(pgd, virt); -} - -static inline pmd_t *pmd_off_k(unsigned long virt) -{ - return pmd_off(pgd_offset_k(virt), virt); -} - /* * need to get a 16k page for level 1 */ @@ -232,7 +219,7 @@ void free_pgd_slow(pgd_t *pgd) return; /* pgd is always present and good */ - pmd = pmd_off(pgd, 0); + pmd = (pmd_t *)pgd; if (pmd_none(*pmd)) goto free; if (pmd_bad(*pmd)) { @@ -252,36 +239,18 @@ free: /* * Create a SECTION PGD between VIRT and PHYS in domain - * DOMAIN with protection PROT. This operates on half- - * pgdir entry increments. + * DOMAIN with protection PROT */ static inline void alloc_init_section(unsigned long virt, unsigned long phys, int prot) { - pmd_t *pmdp = pmd_off_k(virt); + pmd_t *pmdp; + pmdp = pmd_offset(pgd_offset_k(virt), virt); if (virt & (1 << 20)) pmdp++; - *pmdp = __pmd(phys | prot); - flush_pmd_entry(pmdp); -} - -/* - * Create a SUPER SECTION PGD between VIRT and PHYS with protection PROT - */ -static inline void -alloc_init_supersection(unsigned long virt, unsigned long phys, int prot) -{ - int i; - - for (i = 0; i < 16; i += 1) { - alloc_init_section(virt, phys & SUPERSECTION_MASK, - prot | PMD_SECT_SUPER); - - virt += (PGDIR_SIZE / 2); - phys += (PGDIR_SIZE / 2); - } + set_pmd(pmdp, __pmd(phys | prot)); } /* @@ -294,9 +263,11 @@ alloc_init_supersection(unsigned long virt, unsigned long phys, int prot) static inline void alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pgprot_t prot) { - pmd_t *pmdp = pmd_off_k(virt); + pmd_t *pmdp; pte_t *ptep; + pmdp = pmd_offset(pgd_offset_k(virt), virt); + if (pmd_none(*pmdp)) { unsigned long pmdval; ptep = alloc_bootmem_low_pages(2 * PTRS_PER_PTE * @@ -319,7 +290,7 @@ alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pg */ static inline void clear_mapping(unsigned long virt) { - pmd_clear(pmd_off_k(virt)); + pmd_clear(pmd_offset(pgd_offset_k(virt), virt)); } struct mem_types { @@ -365,15 +336,6 @@ static struct mem_types mem_types[] __initdata = { [MT_ROM] = { .prot_sect = PMD_TYPE_SECT, .domain = DOMAIN_KERNEL, - }, - [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ - .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | - L_PTE_WRITE, - .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | - PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | - PMD_SECT_TEX(1), - .domain = DOMAIN_IO, } }; @@ -420,10 +382,9 @@ static void __init build_mem_type_table(void) mem_types[MT_MEMORY].prot_sect &= ~PMD_BIT4; mem_types[MT_ROM].prot_sect &= ~PMD_BIT4; /* - * Mark cache clean areas and XIP ROM read only - * from SVC mode and no access from userspace. + * Mark cache clean areas read only from SVC mode + * and no access from userspace. */ - mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; } @@ -473,8 +434,7 @@ static void __init build_mem_type_table(void) * Create the page directory entries and any necessary * page tables for the mapping specified by `md'. We * are able to cope here with varying sizes and address - * offsets, and we take full advantage of sections and - * supersections. + * offsets, and we take full advantage of sections. */ static void __init create_mapping(struct map_desc *md) { @@ -521,33 +481,6 @@ static void __init create_mapping(struct map_desc *md) length -= PAGE_SIZE; } - /* N.B. ARMv6 supersections are only defined to work with domain 0. - * Since domain assignments can in fact be arbitrary, the - * 'domain == 0' check below is required to insure that ARMv6 - * supersections are only allocated for domain 0 regardless - * of the actual domain assignments in use. - */ - if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) { - /* Align to supersection boundary */ - while ((virt & ~SUPERSECTION_MASK || (virt + off) & - ~SUPERSECTION_MASK) && length >= (PGDIR_SIZE / 2)) { - alloc_init_section(virt, virt + off, prot_sect); - - virt += (PGDIR_SIZE / 2); - length -= (PGDIR_SIZE / 2); - } - - while (length >= SUPERSECTION_SIZE) { - alloc_init_supersection(virt, virt + off, prot_sect); - - virt += SUPERSECTION_SIZE; - length -= SUPERSECTION_SIZE; - } - } - - /* - * A section mapping covers half a "pgdir" entry. - */ while (length >= (PGDIR_SIZE / 2)) { alloc_init_section(virt, virt + off, prot_sect); @@ -587,10 +520,8 @@ void setup_mm_for_reboot(char mode) PMD_TYPE_SECT; if (cpu_arch <= CPU_ARCH_ARMv5) pmdval |= PMD_BIT4; - pmd = pmd_off(pgd, i << PGDIR_SHIFT); - pmd[0] = __pmd(pmdval); - pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))); - flush_pmd_entry(pmd); + pmd = pmd_offset(pgd + i, i << PGDIR_SHIFT); + set_pmd(pmd, __pmd(pmdval)); } } @@ -684,8 +615,6 @@ void __init memtable_init(struct meminfo *mi) flush_cache_all(); flush_tlb_all(); - - top_pmd = pmd_off_k(0xffff0000); } /* @@ -767,6 +696,6 @@ void __init create_memmap_holes(struct meminfo *mi) { int node; - for_each_online_node(node) + for (node = 0; node < numnodes; node++) free_unused_memmap_node(node, mi); } diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index d447cd5f3..5d444e49b 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S @@ -209,31 +209,21 @@ ENTRY(cpu_sa1100_set_pte) .type __sa1100_setup, #function __sa1100_setup: - mov r0, #0 - mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 - mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 - mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 + mov r10, #0 + mcr p15, 0, r10, c7, c7 @ invalidate I,D caches on v4 + mcr p15, 0, r10, c7, c10, 4 @ drain write buffer on v4 + mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4 + mov r0, #0x1f @ Domains 0, 1 = client + mcr p15, 0, r0, c3, c0 @ load domain access register + mcr p15, 0, r4, c2, c0 @ load page table pointer mrc p15, 0, r0, c1, c0 @ get control register v4 - ldr r5, sa1100_cr1_clear - bic r0, r0, r5 - ldr r5, sa1100_cr1_set - orr r0, r0, r5 + bic r0, r0, #0x0e00 @ ..VI ZFRS BLDP WCAM + bic r0, r0, #0x0002 @ .... 000. .... ..0. + orr r0, r0, #0x003d + orr r0, r0, #0x3100 @ ..11 ...1 ..11 11.1 mov pc, lr .size __sa1100_setup, . - __sa1100_setup - /* - * R - * .RVI ZFRS BLDP WCAM - * ..11 0001 ..11 1101 - * - */ - .type sa1100_cr1_clear, #object - .type sa1100_cr1_set, #object -sa1100_cr1_clear: - .word 0x3f3f -sa1100_cr1_set: - .word 0x313d - __INITDATA /* @@ -286,11 +276,7 @@ cpu_sa1110_name: __sa1100_proc_info: .long 0x4401a110 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __sa1100_setup .long cpu_arch_name .long cpu_elf_name @@ -306,11 +292,7 @@ __sa1100_proc_info: __sa1110_proc_info: .long 0x6901b110 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __sa1100_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 2d977b4ee..495167ca2 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S @@ -594,9 +594,14 @@ ENTRY(cpu_xscale_set_pte) .type __xscale_setup, #function __xscale_setup: + mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE + msr cpsr_c, r0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer mcr p15, 0, ip, c8, c7, 0 @ invalidate I, D TLBs + mcr p15, 0, r4, c2, c0, 0 @ load page table pointer + mov r0, #0x1f @ Domains 0, 1 = client + mcr p15, 0, r0, c3, c0, 0 @ load domain access register #ifdef CONFIG_IWMMXT mov r0, #0 @ initially disallow access to CP0/CP1 #else @@ -606,26 +611,13 @@ __xscale_setup: orr r0, r0, #1 << 13 @ Its undefined whether this mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes mrc p15, 0, r0, c1, c0, 0 @ get control register - ldr r5, xscale_cr1_clear - bic r0, r0, r5 - ldr r5, xscale_cr1_set - orr r0, r0, r5 + bic r0, r0, #0x0200 @ .... ..R. .... .... + bic r0, r0, #0x0002 @ .... .... .... ..A. + orr r0, r0, #0x0005 @ .... .... .... .C.M + orr r0, r0, #0x3900 @ ..VI Z..S .... .... mov pc, lr .size __xscale_setup, . - __xscale_setup - /* - * R - * .RVI ZFRS BLDP WCAM - * ..11 1.01 .... .101 - * - */ - .type xscale_cr1_clear, #object - .type xscale_cr1_set, #object -xscale_cr1_clear: - .word 0x3b07 -xscale_cr1_set: - .word 0x3905 - __INITDATA /* @@ -720,11 +712,7 @@ cpu_pxa270_name: __80200_proc_info: .long 0x69052000 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -740,11 +728,7 @@ __80200_proc_info: __8032x_proc_info: .long 0x69052420 .long 0xfffff5e0 @ mask should accomodate IOP80219 also - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -758,13 +742,9 @@ __8032x_proc_info: .type __8033x_proc_info,#object __8033x_proc_info: - .long 0x69054010 - .long 0xffffff30 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x69054090 + .long 0xffffffb0 + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -780,11 +760,7 @@ __8033x_proc_info: __pxa250_proc_info: .long 0x69052100 .long 0xfffff7f0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -800,11 +776,7 @@ __pxa250_proc_info: __pxa210_proc_info: .long 0x69052120 .long 0xfffff3f0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -820,11 +792,7 @@ __pxa210_proc_info: __ixp2400_proc_info: .long 0x69054190 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -840,11 +808,7 @@ __ixp2400_proc_info: __ixp2800_proc_info: .long 0x690541a0 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -860,11 +824,7 @@ __ixp2800_proc_info: __ixp42x_proc_info: .long 0x690541c0 .long 0xffffffc0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -896,11 +856,7 @@ __ixp46x_proc_info: __pxa255_proc_info: .long 0x69052d00 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -916,11 +872,7 @@ __pxa255_proc_info: __pxa270_proc_info: .long 0x69054110 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 30c1dfbb0..82bdef299 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Thu Mar 24 14:34:50 2005 +# Last update: Sun Nov 7 13:20:41 2004 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -226,7 +226,7 @@ dnp1110 SA1100_DNP1110 DNP1110 214 pnp1110 SA1100_PNP1110 PNP1110 215 csb226 ARCH_CSB226 CSB226 216 arnold SA1100_ARNOLD ARNOLD 217 -voiceblue MACH_VOICEBLUE VOICEBLUE 218 +psiboard SA1100_PSIBOARD PSIBOARD 218 jz8028 ARCH_JZ8028 JZ8028 219 h5400 ARCH_H5400 H5400 220 forte SA1100_FORTE FORTE 221 @@ -250,8 +250,8 @@ pxa_eagle250 ARCH_PXA_EAGLE250 PXA_EAGLE250 238 pdb ARCH_PDB PDB 239 blue_2g SA1100_BLUE_2G BLUE_2G 240 bluearch SA1100_BLUEARCH BLUEARCH 241 -ixdp2400 ARCH_IXDP2400 IXDP2400 242 -ixdp2800 ARCH_IXDP2800 IXDP2800 243 +ixdp2400 ARCH_IXDB2400 IXDB2400 242 +ixdp2800 ARCH_IXDB2800 IXDB2800 243 explorer SA1100_EXPLORER EXPLORER 244 ixdp425 ARCH_IXDP425 IXDP425 245 chimp ARCH_CHIMP CHIMP 246 @@ -381,7 +381,7 @@ s5c7375 ARCH_S5C7375 S5C7375 369 spearhead ARCH_SPEARHEAD SPEARHEAD 370 pantera ARCH_PANTERA PANTERA 371 prayoglite ARCH_PRAYOGLITE PRAYOGLITE 372 -gumstix ARCH_GUMSTIK GUMSTIK 373 +gumstik ARCH_GUMSTIK GUMSTIK 373 rcube ARCH_RCUBE RCUBE 374 rea_olv ARCH_REA_OLV REA_OLV 375 pxa_iphone ARCH_PXA_IPHONE PXA_IPHONE 376 @@ -634,93 +634,3 @@ ecia MACH_ECIA ECIA 623 cm4008 MACH_CM4008 CM4008 624 p2001 MACH_P2001 P2001 625 twister MACH_TWISTER TWISTER 626 -mudshark MACH_MUDSHARK MUDSHARK 627 -hb2 MACH_HB2 HB2 628 -iq80332 MACH_IQ80332 IQ80332 629 -sendt MACH_SENDT SENDT 630 -mx2jazz MACH_MX2JAZZ MX2JAZZ 631 -multiio MACH_MULTIIO MULTIIO 632 -hrdisplay MACH_HRDISPLAY HRDISPLAY 633 -scma11bb MACH_SCMA11BB SCMA11BB 634 -trizeps3 MACH_TRIZEPS3 TRIZEPS3 635 -zefeerdza MACH_ZEFEERDZA ZEFEERDZA 636 -zefeerdzb MACH_ZEFEERDZB ZEFEERDZB 637 -zefeerdzg MACH_ZEFEERDZG ZEFEERDZG 638 -zefeerdzn MACH_ZEFEERDZN ZEFEERDZN 639 -zefeerdzq MACH_ZEFEERDZQ ZEFEERDZQ 640 -gtwx5715 MACH_GTWX5715 GTWX5715 641 -astro_jack MACH_ASTRO_JACK ASTRO_JACK 643 -tip03 MACH_TIP03 TIP03 644 -a9200ec MACH_A9200EC A9200EC 645 -pnx0105 MACH_PNX0105 PNX0105 646 -adcpoecpu MACH_ADCPOECPU ADCPOECPU 647 -csb637 MACH_CSB637 CSB637 648 -ml69q6203 MACH_ML69Q6203 ML69Q6203 649 -mb9200 MACH_MB9200 MB9200 650 -kulun MACH_KULUN KULUN 651 -snapper MACH_SNAPPER SNAPPER 652 -optima MACH_OPTIMA OPTIMA 653 -dlhsbc MACH_DLHSBC DLHSBC 654 -x30 MACH_X30 X30 655 -n30 MACH_N30 N30 656 -manga_ks8695 MACH_MANGA_KS8695 MANGA_KS8695 657 -ajax MACH_AJAX AJAX 658 -nec_mp900 MACH_NEC_MP900 NEC_MP900 659 -vvtk1000 MACH_VVTK1000 VVTK1000 661 -kafa MACH_KAFA KAFA 662 -vvtk3000 MACH_VVTK3000 VVTK3000 663 -pimx1 MACH_PIMX1 PIMX1 664 -ollie MACH_OLLIE OLLIE 665 -skymax MACH_SKYMAX SKYMAX 666 -jazz MACH_JAZZ JAZZ 667 -tel_t3 MACH_TEL_T3 TEL_T3 668 -aisino_fcr255 MACH_AISINO_FCR255 AISINO_FCR255 669 -btweb MACH_BTWEB BTWEB 670 -dbg_lh79520 MACH_DBG_LH79520 DBG_LH79520 671 -cm41xx MACH_CM41XX CM41XX 672 -ts72xx MACH_TS72XX TS72XX 673 -nggpxa MACH_NGGPXA NGGPXA 674 -csb535 MACH_CSB535 CSB535 675 -csb536 MACH_CSB536 CSB536 676 -pxa_trakpod MACH_PXA_TRAKPOD PXA_TRAKPOD 677 -praxis MACH_PRAXIS PRAXIS 678 -lh75411 MACH_LH75411 LH75411 679 -otom MACH_OTOM OTOM 680 -nexcoder_2440 MACH_NEXCODER_2440 NEXCODER_2440 681 -loox410 MACH_LOOX410 LOOX410 682 -westlake MACH_WESTLAKE WESTLAKE 683 -nsb MACH_NSB NSB 684 -esl_sarva_stn MACH_ESL_SARVA_STN ESL_SARVA_STN 685 -esl_sarva_tft MACH_ESL_SARVA_TFT ESL_SARVA_TFT 686 -esl_sarva_iad MACH_ESL_SARVA_IAD ESL_SARVA_IAD 687 -esl_sarva_acc MACH_ESL_SARVA_ACC ESL_SARVA_ACC 688 -typhoon MACH_TYPHOON TYPHOON 689 -cnav MACH_CNAV CNAV 690 -a730 MACH_A730 A730 691 -netstar MACH_NETSTAR NETSTAR 692 -supercon MACH_PHASEFALE_SUPERCON PHASEFALE_SUPERCON 693 -shiva1100 MACH_SHIVA1100 SHIVA1100 694 -etexsc MACH_ETEXSC ETEXSC 695 -ixdpg465 MACH_IXDPG465 IXDPG465 696 -a9m2410 MACH_A9M2410 A9M2410 697 -a9m2440 MACH_A9M2440 A9M2440 698 -a9m9750 MACH_A9M9750 A9M9750 699 -a9m9360 MACH_A9M9360 A9M9360 700 -unc90 MACH_UNC90 UNC90 701 -eco920 MACH_ECO920 ECO920 702 -satview MACH_SATVIEW SATVIEW 703 -roadrunner MACH_ROADRUNNER ROADRUNNER 704 -at91rm9200ek MACH_AT91RM9200EK AT91RM9200EK 705 -gp32 MACH_GP32 GP32 706 -gem MACH_GEM GEM 707 -i858 MACH_I858 I858 708 -hx2750 MACH_HX2750 HX2750 709 -zeusevb MACH_ZEUSEVB ZEUSEVB 710 -p700 MACH_P700 P700 711 -cpe MACH_CPE CPE 712 -spitz MACH_SPITZ SPITZ 713 -nimbra340 MACH_NIMBRA340 NIMBRA340 714 -lpc22xx MACH_LPC22XX LPC22XX 715 -omap_comet3 MACH_COMET3 COMET3 716 -omap_comet4 MACH_COMET4 COMET4 717 -csb625 MACH_CSB625 CSB625 718 diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig index 841bb5aa5..500780d9d 100644 --- a/arch/arm26/Kconfig +++ b/arch/arm26/Kconfig @@ -45,10 +45,6 @@ config RWSEM_GENERIC_SPINLOCK config RWSEM_XCHGADD_ALGORITHM bool -config GENERIC_CALIBRATE_DELAY - bool - default y - config GENERIC_BUST_SPINLOCK bool @@ -89,10 +85,6 @@ config PAGESIZE_16 machine with 4MB of memory. endmenu -config ISA_DMA_API - bool - default y - menu "General setup" # Compressed boot loader in ROM. Yes, we really want to ask about @@ -231,3 +223,4 @@ source "security/Kconfig" source "crypto/Kconfig" source "lib/Kconfig" + diff --git a/arch/arm26/kernel/calls.S b/arch/arm26/kernel/calls.S index 3e8672a31..e3d276827 100644 --- a/arch/arm26/kernel/calls.S +++ b/arch/arm26/kernel/calls.S @@ -257,11 +257,6 @@ __syscall_start: .long sys_lremovexattr .long sys_fremovexattr .long sys_tkill - - .rept 313 - (. - __syscall_start) / 4 - .long sys_ni_syscall - .endr - .long sys_vserver /* 313 */ __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff --git a/arch/arm26/kernel/init_task.c b/arch/arm26/kernel/init_task.c index 4191565b8..5b510232a 100644 --- a/arch/arm26/kernel/init_task.c +++ b/arch/arm26/kernel/init_task.c @@ -1,5 +1,5 @@ /* - * linux/arch/arm26/kernel/init_task.c + * linux/arch/arm/kernel/init_task.c * * Copyright (C) 2003 Ian Molton * @@ -29,9 +29,7 @@ EXPORT_SYMBOL(init_mm); * We need to make sure that this is 8192-byte aligned due to the * way process stacks are handled. This is done by making sure * the linker maps this in the .text segment right after head.S, - * and making the linker scripts ensure the proper alignment. - * - * FIXME - should this be 32K alignment on arm26? + * and making head.S ensure the proper alignment. * * The things we do for performance... */ diff --git a/arch/arm26/kernel/irq.c b/arch/arm26/kernel/irq.c index f3cc1036e..be2ebeaa8 100644 --- a/arch/arm26/kernel/irq.c +++ b/arch/arm26/kernel/irq.c @@ -50,7 +50,7 @@ void __init arc_init_irq(void); #define MAX_IRQ_CNT 100000 static volatile unsigned long irq_err_count; -static DEFINE_SPINLOCK(irq_controller_lock); +static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED; struct irqdesc irq_desc[NR_IRQS]; diff --git a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c index 46aea6ac1..5b4efd620 100644 --- a/arch/arm26/kernel/process.c +++ b/arch/arm26/kernel/process.c @@ -67,22 +67,42 @@ static int __init hlt_setup(char *__unused) __setup("nohlt", nohlt_setup); __setup("hlt", hlt_setup); +/* + * The following aren't currently used. + */ +void (*pm_idle)(void); +void (*pm_power_off)(void); + /* * This is our default idle handler. We need to disable * interrupts here to ensure we don't miss a wakeup call. */ +void default_idle(void) +{ + local_irq_disable(); + if (!need_resched() && !hlt_counter) + local_irq_enable(); +} + +/* + * The idle thread. We try to conserve power, while trying to keep + * overall latency low. The architecture specific idle is passed + * a value to indicate the level of "idleness" of the system. + */ void cpu_idle(void) { /* endless idle loop with no priority at all */ preempt_disable(); while (1) { - while (!need_resched()) { - local_irq_disable(); - if (!need_resched() && !hlt_counter) - local_irq_enable(); - } + void (*idle)(void) = pm_idle; + if (!idle) + idle = default_idle; + leds_event(led_idle_start); + while (!need_resched()) + idle(); + leds_event(led_idle_end); + schedule(); } - schedule(); } static char reboot_mode = 'h'; @@ -95,15 +115,20 @@ int __init reboot_setup(char *str) __setup("reboot=", reboot_setup); -/* ARM26 cant do these but we still need to define them. */ void machine_halt(void) { + leds_event(led_halted); } + +EXPORT_SYMBOL(machine_halt); + void machine_power_off(void) { + leds_event(led_halted); + if (pm_power_off) + pm_power_off(); } -EXPORT_SYMBOL(machine_halt); EXPORT_SYMBOL(machine_power_off); void machine_restart(char * __unused) @@ -271,7 +296,7 @@ void flush_thread(void) memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); memset(&thread->fpstate, 0, sizeof(union fp_state)); - clear_used_math(); + current->used_math = 0; } void release_thread(struct task_struct *dead_task) @@ -281,7 +306,7 @@ void release_thread(struct task_struct *dead_task) asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); int -copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start, +copy_thread(int nr, unsigned long clone_flags, unsigned long esp, unsigned long unused, struct task_struct *p, struct pt_regs *regs) { struct thread_info *thread = p->thread_info; @@ -290,7 +315,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start, childregs = __get_user_regs(thread); *childregs = *regs; childregs->ARM_r0 = 0; - childregs->ARM_sp = stack_start; + childregs->ARM_sp = esp; memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save)); thread->cpu_context.sp = (unsigned long)childregs; @@ -305,7 +330,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start, int dump_fpu (struct pt_regs *regs, struct user_fp *fp) { struct thread_info *thread = current_thread_info(); - int used_math = !!used_math(); + int used_math = current->used_math; if (used_math) memcpy(fp, &thread->fpstate.soft, sizeof (*fp)); @@ -342,42 +367,35 @@ void dump_thread(struct pt_regs * regs, struct user * dump) } /* - * Shuffle the argument into the correct register before calling the - * thread function. r1 is the thread argument, r2 is the pointer to - * the thread function, and r3 points to the exit function. - * FIXME - make sure this is right - the older code used to zero fp - * and cause the parent to call sys_exit (do_exit in this version) - */ -extern void kernel_thread_helper(void); - -asm( ".section .text\n" -" .align\n" -" .type kernel_thread_helper, #function\n" -"kernel_thread_helper:\n" -" mov r0, r1\n" -" mov lr, r3\n" -" mov pc, r2\n" -" .size kernel_thread_helper, . - kernel_thread_helper\n" -" .previous"); - -/* - * Create a kernel thread. + * This is the mechanism for creating a new kernel thread. + * + * NOTE! Only a kernel-only process(ie the swapper or direct descendants + * who haven't done an "execve()") should use this: it will work within + * a system call from a "real" process, but the process memory space will + * not be free'd until both the parent and the child have exited. + * FIXME - taken from arm32 */ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) { - struct pt_regs regs; - - memset(®s, 0, sizeof(regs)); - - regs.ARM_r1 = (unsigned long)arg; - regs.ARM_r2 = (unsigned long)fn; - regs.ARM_r3 = (unsigned long)do_exit; - regs.ARM_pc = (unsigned long)kernel_thread_helper | MODE_SVC26; - - return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, ®s, 0, NULL, NULL); + register unsigned int r0 asm("r0") = flags | CLONE_VM | CLONE_UNTRACED; + register unsigned int r1 asm("r1") = 0; + register pid_t __ret asm("r0"); + + __asm__ __volatile__( + __syscall(clone)" @ kernel_thread sys_clone \n\ + movs %0, r0 @ if we are the child \n\ + bne 1f \n\ + mov fp, #0 @ ensure that fp is zero \n\ + mov r0, %4 \n\ + mov lr, pc \n\ + mov pc, %3 \n\ + b sys_exit \n\ +1: " + : "=r" (__ret) + : "0" (r0), "r" (r1), "r" (fn), "r" (arg) + : "lr"); + return __ret; } -EXPORT_SYMBOL(kernel_thread); - unsigned long get_wchan(struct task_struct *p) { diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c index 5ed598351..b2aea03ac 100644 --- a/arch/arm26/kernel/ptrace.c +++ b/arch/arm26/kernel/ptrace.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -541,7 +540,7 @@ static int ptrace_getfpregs(struct task_struct *tsk, void *ufp) */ static int ptrace_setfpregs(struct task_struct *tsk, void *ufp) { - set_stopped_child_used_math(tsk); + tsk->used_math = 1; return copy_from_user(&tsk->thread_info->fpstate, ufp, sizeof(struct user_fp)) ? -EFAULT : 0; } @@ -592,7 +591,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat case PTRACE_SYSCALL: case PTRACE_CONT: ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); @@ -627,7 +626,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat */ case PTRACE_SINGLESTEP: ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; child->ptrace |= PT_SINGLESTEP; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); diff --git a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c index 4eb329e38..e02d41867 100644 --- a/arch/arm26/kernel/setup.c +++ b/arch/arm26/kernel/setup.c @@ -1,5 +1,5 @@ /* - * linux/arch/arm26/kernel/setup.c + * linux/arch/arm/kernel/setup.c * * Copyright (C) 1995-2001 Russell King * Copyright (C) 2003 Ian Molton @@ -37,7 +37,7 @@ #endif #ifdef CONFIG_PREEMPT -DEFINE_SPINLOCK(kernel_flag); +spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED; #endif #if defined(CONFIG_FPE_NWFPE) @@ -74,6 +74,7 @@ unsigned int number_mfm_drives; struct processor processor; +unsigned char aux_device_present; char elf_platform[ELF_PLATFORM_SIZE]; unsigned long phys_initrd_start __initdata = 0; @@ -118,7 +119,7 @@ static void __init setup_processor(void) /* * locate processor in the list of supported processor * types. The linker builds this table for us from the - * entries in arch/arm26/mm/proc-*.S + * entries in arch/arm/mm/proc-*.S */ for (list = &__proc_info_begin; list < &__proc_info_end ; list++) if ((processor_id & list->cpu_mask) == list->cpu_val) diff --git a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c index 1f09a9d0f..17f7dc3e9 100644 --- a/arch/arm26/mm/init.c +++ b/arch/arm26/mm/init.c @@ -1,5 +1,5 @@ /* - * linux/arch/arm26/mm/init.c + * linux/arch/arm/mm/init.c * * Copyright (C) 1995-2002 Russell King * @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -83,7 +84,7 @@ void show_mem(void) else if (!page_count(page)) free++; else - shared += page_count(page) - 1; + shared += atomic_read(&page->count) - 1; page++; } while (page < end); @@ -155,8 +156,7 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np) { unsigned int memend_pfn = 0; - nodes_clear(node_online_map); - node_set_online(0); + numnodes = 1; np->bootmap_pages = 0; @@ -309,6 +309,8 @@ void __init paging_init(struct meminfo *mi) free_area_init_node(0, pgdat, zone_size, bdata->node_boot_start >> PAGE_SHIFT, zhole_size); + mem_map = NODE_DATA(0)->node_mem_map; + /* * finish off the bad pages once * the mem_map is initialised diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 112ba2771..a8e4c25c7 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -20,10 +20,6 @@ config RWSEM_GENERIC_SPINLOCK config RWSEM_XCHGADD_ALGORITHM bool -config GENERIC_CALIBRATE_DELAY - bool - default y - config CRIS bool default y diff --git a/arch/cris/arch-v10/drivers/Kconfig b/arch/cris/arch-v10/drivers/Kconfig index 748374f25..f77b987a4 100644 --- a/arch/cris/arch-v10/drivers/Kconfig +++ b/arch/cris/arch-v10/drivers/Kconfig @@ -557,7 +557,7 @@ config ETRAX_IDE select DMA_NONPCI help Enable this to get support for ATA/IDE. - You can't use paralell ports or SCSI ports + You can't use parallell ports or SCSI ports at the same time. diff --git a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c index 316ca15d6..960f4cbdc 100644 --- a/arch/cris/arch-v10/drivers/eeprom.c +++ b/arch/cris/arch-v10/drivers/eeprom.c @@ -599,7 +599,7 @@ static ssize_t eeprom_write(struct file * file, const char * buf, size_t count, int i, written, restart=1; unsigned long p; - if (!access_ok(VERIFY_READ, buf, count)) + if (verify_area(VERIFY_READ, buf, count)) { return -EFAULT; } diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c index c095de82a..50548a234 100644 --- a/arch/cris/arch-v10/drivers/gpio.c +++ b/arch/cris/arch-v10/drivers/gpio.c @@ -355,7 +355,7 @@ static ssize_t gpio_write(struct file * file, const char * buf, size_t count, return -EFAULT; } - if (!access_ok(VERIFY_READ, buf, count)) { + if (verify_area(VERIFY_READ, buf, count)) { return -EFAULT; } clk_mask = priv->clk_mask; diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c index 4717f7ae8..53b94eb3e 100644 --- a/arch/cris/arch-v10/kernel/fasttimer.c +++ b/arch/cris/arch-v10/kernel/fasttimer.c @@ -599,8 +599,23 @@ void schedule_usleep(unsigned long us) #ifdef CONFIG_PROC_FS static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len - ,int *eof, void *data_unused); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) + ,int *eof, void *data_unused +#else + ,int unused +#endif + ); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) static struct proc_dir_entry *fasttimer_proc_entry; +#else +static struct proc_dir_entry fasttimer_proc_entry = +{ + 0, 9, "fasttimer", + S_IFREG | S_IRUGO, 1, 0, 0, + 0, NULL /* ops -- default to array */, + &proc_fasttimer_read /* get_info */, +}; +#endif #endif /* CONFIG_PROC_FS */ #ifdef CONFIG_PROC_FS @@ -609,7 +624,12 @@ static struct proc_dir_entry *fasttimer_proc_entry; #define BIG_BUF_SIZE (500 + NUM_TIMER_STATS * 300) static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len - ,int *eof, void *data_unused) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) + ,int *eof, void *data_unused +#else + ,int unused +#endif + ) { unsigned long flags; int i = 0; @@ -785,7 +805,9 @@ static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len memcpy(buf, bigbuf + offset, len); *start = buf; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) *eof = 1; +#endif return len; } @@ -960,8 +982,12 @@ void fast_timer_init(void) } #endif #ifdef CONFIG_PROC_FS +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) if ((fasttimer_proc_entry = create_proc_entry( "fasttimer", 0, 0 ))) fasttimer_proc_entry->read_proc = proc_fasttimer_read; +#else + proc_register_dynamic(&proc_root, &fasttimer_proc_entry); +#endif #endif /* PROC_FS */ if(request_irq(TIMER1_IRQ_NBR, timer1_handler, SA_SHIRQ, "fast timer int", NULL)) diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index 581ecabaa..da15db8ae 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -185,7 +184,7 @@ sys_ptrace(long request, long pid, long addr, long data) case PTRACE_CONT: ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) { @@ -220,7 +219,7 @@ sys_ptrace(long request, long pid, long addr, long data) case PTRACE_SINGLESTEP: ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index 85e0032e6..97b7af26a 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c @@ -125,7 +125,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, if (act) { old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || + if (verify_area(VERIFY_READ, act, sizeof(*act)) || __get_user(new_ka.sa.sa_handler, &act->sa_handler) || __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) return -EFAULT; @@ -137,7 +137,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || + if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) return -EFAULT; @@ -231,7 +231,7 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, if (((long)frame) & 3) goto badframe; - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) + if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.oldmask) || (_NSIG_WORDS > 1 @@ -273,7 +273,7 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, if (((long)frame) & 3) goto badframe; - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) + if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) goto badframe; diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index d848b9407..2a9ed1806 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c @@ -158,6 +158,11 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) local_irq_disable(); } irq_exit(); + + if (softirq_pending(cpu)) + do_softirq(); + + /* unmasking and bottom half handling is done magically for us. */ } /* this function links in a handler into the chain of handlers for the diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c index 6ec267107..02f62310a 100644 --- a/arch/cris/kernel/setup.c +++ b/arch/cris/kernel/setup.c @@ -26,6 +26,8 @@ struct drive_info_struct { char dummy[32]; } drive_info; struct screen_info screen_info; +unsigned char aux_device_present; + extern int root_mountflags; extern char _etext, _edata, _end; diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index b8499363a..d0b845ac0 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig @@ -33,10 +33,6 @@ config RWSEM_XCHGADD_ALGORITHM bool default n -config GENERIC_CALIBRATE_DELAY - bool - default y - config ISA bool default y diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index c9b80cffd..5c6d67116 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile @@ -7,6 +7,9 @@ # # (C) Copyright 2002,2003 Yoshinori Sato # +ifndef include-config +-include $(TOPDIR)/.config +endif platform-$(CONFIG_CPU_H8300H) := h8300h platform-$(CONFIG_CPU_H8S) := h8s @@ -44,11 +47,9 @@ LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name) head-y := arch/$(ARCH)/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o core-y += arch/$(ARCH)/kernel/ \ - arch/$(ARCH)/mm/ -ifdef PLATFORM -core-y += arch/$(ARCH)/platform/$(PLATFORM)/ \ + arch/$(ARCH)/mm/ \ + arch/$(ARCH)/platform/$(PLATFORM)/ \ arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/ -endif libs-y += arch/$(ARCH)/lib/ $(LIBGCC) diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index b5f83e9f0..134aec1c6 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c @@ -54,7 +54,7 @@ asmlinkage void ret_from_fork(void); void default_idle(void) { while(1) { - if (!need_resched()) { + if (need_resched()) { local_irq_enable(); __asm__("sleep"); local_irq_disable(); diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c index f673dfd0a..7e5cce33b 100644 --- a/arch/h8300/kernel/ptrace.c +++ b/arch/h8300/kernel/ptrace.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -174,7 +173,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ case PTRACE_CONT: { /* restart after signal. */ ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data >= _NSIG) break ; if (request == PTRACE_SYSCALL) set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); @@ -205,7 +204,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) case PTRACE_SINGLESTEP: { /* set the trap flag. */ ret = -EIO; - if (!valid_signal(data)) + if ((unsigned long) data > _NSIG) break; clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); child->exit_code = data; diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index a4799d633..962d4305a 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c @@ -113,7 +113,7 @@ sys_sigaction(int sig, const struct old_sigaction *act, if (act) { old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || + if (verify_area(VERIFY_READ, act, sizeof(*act)) || __get_user(new_ka.sa.sa_handler, &act->sa_handler) || __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) return -EFAULT; @@ -125,7 +125,7 @@ sys_sigaction(int sig, const struct old_sigaction *act, ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || + if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) return -EFAULT; @@ -222,7 +222,7 @@ asmlinkage int do_sigreturn(unsigned long __unused,...) sigset_t set; int er0; - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) + if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.sc_mask) || (_NSIG_WORDS > 1 && @@ -253,7 +253,7 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused,...) sigset_t set; int er0; - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) + if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) goto badframe; diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S index 79b3bda5c..1055a1bf7 100644 --- a/arch/h8300/kernel/syscalls.S +++ b/arch/h8300/kernel/syscalls.S @@ -289,21 +289,6 @@ SYMBOL_NAME_LABEL(sys_call_table) .long SYMBOL_NAME(sys_utimes) .long SYMBOL_NAME(sys_fadvise64_64) .long SYMBOL_NAME(sys_ni_syscall) /* sys_vserver */ - .long SYMBOL_NAME(sys_mbind) - .long SYMBOL_NAME(sys_get_mempolicy) - .long SYMBOL_NAME(sys_set_mempolicy) - .long SYMBOL_NAME(sys_mq_open) - .long SYMBOL_NAME(sys_mq_unlink) - .long SYMBOL_NAME(sys_mq_timedsend) - .long SYMBOL_NAME(sys_mq_timedreceive) /* 280 */ - .long SYMBOL_NAME(sys_mq_notify) - .long SYMBOL_NAME(sys_mq_getsetattr) - .long SYMBOL_NAME(sys_ni_syscall) /* reserved for kexec */ - .long SYMBOL_NAME(sys_waitid) - .long SYMBOL_NAME(sys_ni_syscall) /* 285 */ /* available */ - .long SYMBOL_NAME(sys_add_key) - .long SYMBOL_NAME(sys_request_key) - .long SYMBOL_NAME(sys_keyctl) .rept NR_syscalls-(.-SYMBOL_NAME(sys_call_table))/4 .long SYMBOL_NAME(sys_ni_syscall) diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 3f4ad7fb7..1ed5b3831 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -183,7 +183,6 @@ config M386 - "Winchip-C6" for original IDT Winchip. - "Winchip-2" for IDT Winchip 2. - "Winchip-2A" for IDT Winchips with 3dNow! capabilities. - - "GeodeGX1" for Geode GX1 (Cyrix MediaGX). - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3. - "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above). @@ -311,11 +310,6 @@ config MWINCHIP3D stores for this CPU, which can increase performance of some operations. -config MGEODEGX1 - bool "GeodeGX1" - help - Select this for a Geode GX1 (Cyrix MediaGX) chip. - config MCYRIXIII bool "CyrixIII/VIA-C3" help @@ -366,7 +360,7 @@ config X86_L1_CACHE_SHIFT int default "7" if MPENTIUM4 || X86_GENERIC default "4" if X86_ELAN || M486 || M386 - default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODEGX1 + default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 default "6" if MK7 || MK8 || MPENTIUMM config RWSEM_GENERIC_SPINLOCK @@ -379,13 +373,9 @@ config RWSEM_XCHGADD_ALGORITHM depends on !M386 default y -config GENERIC_CALIBRATE_DELAY - bool - default y - config X86_PPRO_FENCE bool - depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 + depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 default y config X86_F00F_BUG @@ -415,7 +405,7 @@ config X86_POPAD_OK config X86_ALIGNMENT_16 bool - depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 + depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 default y config X86_GOOD_APIC @@ -523,21 +513,10 @@ config PREEMPT Say Y here if you are building a kernel for a desktop, embedded or real-time system. Say N if you are unsure. -config PREEMPT_BKL - bool "Preempt The Big Kernel Lock" - depends on PREEMPT - default y - help - This option reduces the latency of the kernel by making the - big kernel lock preemptible. - - Say Y here if you are building a kernel for a desktop system. - Say N if you are unsure. - config X86_UP_APIC - bool "Local APIC support on uniprocessors" - depends on !SMP && !(X86_VISWS || X86_VOYAGER) - help + bool "Local APIC support on uniprocessors" if !SMP + depends on !(X86_VISWS || X86_VOYAGER) + ---help--- A local APIC (Advanced Programmable Interrupt Controller) is an integrated interrupt controller in the CPU. If you have a single-CPU system which has a processor with a local APIC, you can say Y here to @@ -547,36 +526,36 @@ config X86_UP_APIC performance counters), and the NMI watchdog which detects hard lockups. + If you have a system with several CPUs, you do not need to say Y + here: the local APIC will be used automatically. + config X86_UP_IOAPIC bool "IO-APIC support on uniprocessors" - depends on X86_UP_APIC + depends on !SMP && X86_UP_APIC help An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an SMP-capable replacement for PC-style interrupt controllers. Most - SMP systems and many recent uniprocessor systems have one. - + SMP systems and a small number of uniprocessor systems have one. If you have a single-CPU system with an IO-APIC, you can say Y here to use it. If you say Y here even though your machine doesn't have an IO-APIC, then the kernel will still run with no slowdown at all. + If you have a system with several CPUs, you do not need to say Y + here: the IO-APIC will be used automatically. + config X86_LOCAL_APIC bool - depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER) + depends on !SMP && X86_UP_APIC default y config X86_IO_APIC bool - depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER)) - default y - -config X86_VISWS_APIC - bool - depends on X86_VISWS + depends on !SMP && X86_UP_IOAPIC default y config KERNEL_HZ - int "Timer Frequency (100-10000)" - range 100 10000 + int "Timer Frequency (100-20000)" + range 100 20000 default "1000" help This allows you to specify the frequency at which the @@ -584,7 +563,7 @@ config KERNEL_HZ config X86_TSC bool - depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ + depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ default y config X86_MCE @@ -659,24 +638,6 @@ config I8K Say Y if you intend to run this kernel on a Dell Inspiron 8000. Say N otherwise. -config X86_REBOOTFIXUPS - bool "Enable X86 board specific fixups for reboot" - depends on X86 - default n - ---help--- - This enables chipset and/or board specific fixups to be done - in order to get reboot to work correctly. This is only needed on - some combinations of hardware and BIOS. The symptom, for which - this config is intended, is when reboot ends with a stalled/hung - system. - - Currently, the only fixup is for the Geode GX1/CS5530A/TROM2.1. - combination. - - Say Y if you want to enable the fixup. Currently, it's safe to - enable this option even if you don't need it. - Say N otherwise. - config MICROCODE tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support" ---help--- @@ -841,16 +802,6 @@ config HAVE_ARCH_BOOTMEM_NODE depends on NUMA default y -config HAVE_MEMORY_PRESENT - bool - depends on DISCONTIGMEM - default y - -config NEED_NODE_MEMMAP_SIZE - bool - depends on DISCONTIGMEM - default y - config HIGHPTE bool "Allocate 3rd-level pagetables from highmem" depends on HIGHMEM4G || HIGHMEM64G @@ -924,6 +875,7 @@ config EFI depends on ACPI default n ---help--- + This enables the the kernel to boot on EFI platforms using system configuration information passed to it from the firmware. This also enables the kernel to use any EFI runtime services that are @@ -962,7 +914,7 @@ config REGPARM depends on EXPERIMENTAL default n help - Compile the kernel with -mregparm=3. This uses a different ABI + Compile the kernel with -mregparm=3. This uses an different ABI and passes the first three arguments of a function call in registers. This will probably break binary only modules. @@ -1017,24 +969,6 @@ config BACKUP_SIZE default 32 help The size of the second kernel's memory. - -config SECCOMP - bool "Enable seccomp to safely compute untrusted bytecode" - depends on PROC_FS - default y - help - This kernel feature is useful for number crunching applications - that may need to compute untrusted bytecode during their - execution. By using pipes or other transports made available to - the process as file descriptors supporting the read/write - syscalls, it's possible to isolate those applications in - their own address space using seccomp. Once seccomp is - enabled via /proc//seccomp, it cannot be disabled - and the task is only allowed to execute a few safe syscalls - defined by each seccomp mode. - - If unsure, say Y. Only embedded should say N here. - endmenu @@ -1199,6 +1133,21 @@ endmenu menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)" +config X86_VISWS_APIC + bool + depends on X86_VISWS + default y + +config X86_LOCAL_APIC + bool + depends on (X86_VISWS || SMP) && !X86_VOYAGER + default y + +config X86_IO_APIC + bool + depends on SMP && !(X86_VISWS || X86_VOYAGER) + default y + config PCI bool "PCI support" if !X86_VISWS depends on !X86_VOYAGER @@ -1259,18 +1208,12 @@ config PCI_DIRECT config PCI_MMCONFIG bool - depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) + depends on PCI && (PCI_GOMMCONFIG || (PCI_GOANY && ACPI)) select ACPI_BOOT default y -source "drivers/pci/pcie/Kconfig" - source "drivers/pci/Kconfig" -config ISA_DMA_API - bool - default y - config ISA bool "ISA support" depends on !(X86_VOYAGER || X86_VISWS) @@ -1300,14 +1243,18 @@ config EISA source "drivers/eisa/Kconfig" config MCA - bool "MCA support" if !(X86_VISWS || X86_VOYAGER) - default y if X86_VOYAGER + bool "MCA support" + depends on !(X86_VISWS || X86_VOYAGER) help MicroChannel Architecture is found in some IBM PS/2 machines and laptops. It is a bus system similar to PCI or ISA. See (and especially the web page given there) before attempting to build an MCA bus kernel. +config MCA + depends on X86_VOYAGER + default y if X86_VOYAGER + source "drivers/mca/Kconfig" config SCx200 diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug index 9311158c7..7741c2711 100644 --- a/arch/i386/Kconfig.debug +++ b/arch/i386/Kconfig.debug @@ -3,7 +3,7 @@ menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK - bool "Early printk" if EMBEDDED && DEBUG_KERNEL + bool "Early printk" if EMBEDDED default y help Write kernel log output directly into the VGA buffer or to a serial @@ -97,27 +97,14 @@ config STACK_PANIC help Panic if the stack grows to within specified byte range. -comment "Page alloc debug is incompatible with Software Suspend on i386" - depends on DEBUG_KERNEL && SOFTWARE_SUSPEND - config DEBUG_PAGEALLOC bool "Page alloc debugging" - depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND + depends on DEBUG_KERNEL help Unmap pages from the kernel linear mapping after free_pages(). This results in a large slowdown, but helps to find certain types of memory corruptions. -config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - depends on DEBUG_KERNEL - help - If you say Y here the kernel will use a 4Kb stacksize for the - kernel stack attached to each process/thread. This facilitates - running more threads on a system and also reduces the pressure - on the VM subsystem for higher order allocations. This option - will also use IRQ stacks to compensate for the reduced stackspace. - config X86_FIND_SMP_CONFIG bool depends on X86_LOCAL_APIC || X86_VOYAGER diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 4d22f78e0..5a5525ed8 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -14,15 +14,13 @@ # 19990713 Artur Skawina # Added '-march' and '-mpreferred-stack-boundary' support # -# 20050320 Kianusch Sayah Karadji -# Added support for GEODE CPU LDFLAGS := -m elf_i386 OBJCOPYFLAGS := -O binary -R .note -R .comment -S LDFLAGS_vmlinux := CHECKFLAGS += -D__i386__ -CFLAGS += -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts +CFLAGS += -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts # prevent gcc from keeping the stack 16 byte aligned CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) @@ -33,13 +31,11 @@ cflags-$(CONFIG_M486) += -march=i486 cflags-$(CONFIG_M586) += -march=i586 cflags-$(CONFIG_M586TSC) += -march=i586 cflags-$(CONFIG_M586MMX) += $(call cc-option,-march=pentium-mmx,-march=i586) -#cflags-$(CONFIG_M686) += -march=i686 -mtune=pentium4 -cflags-$(CONFIG_M686) += -march=i686 -mcpu=pentium4 +cflags-$(CONFIG_M686) += -march=i686 cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call cc-option,-mtune=pentium2) cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call cc-option,-mtune=pentium3) cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call cc-option,-mtune=pentium3) -#cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call cc-option,-mtune=pentium4) -cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call cc-option,-march=pentium4) +cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call cc-option,-mtune=pentium4) cflags-$(CONFIG_MK6) += -march=k6 # Please note, that patches that add -march=athlon-xp and friends are pointless. # They make zero difference whatsosever to performance at this time. @@ -56,9 +52,6 @@ cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686) # AMD Elan support cflags-$(CONFIG_X86_ELAN) += -march=i486 -# Geode GX1 support -cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=pentium-mmx,-march=i486) - # -mregparm=3 works ok on gcc-3.0 and later # GCC_VERSION := $(call cc-version) @@ -125,7 +118,7 @@ AFLAGS += $(mflags-y) -m32 boot := arch/i386/boot .PHONY: zImage bzImage compressed zlilo bzlilo \ - zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install + zdisk bzdisk fdimage fdimage144 fdimage288 install all: bzImage @@ -144,13 +137,9 @@ zlilo bzlilo: vmlinux zdisk bzdisk: vmlinux $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) zdisk -fdimage fdimage144 fdimage288: vmlinux +install fdimage fdimage144 fdimage288: vmlinux $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ -install: vmlinux -install kernel_install: - $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install - prepare: include/asm-$(ARCH)/asm_offsets.h CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile index aa7064a75..dce0275dd 100644 --- a/arch/i386/boot/Makefile +++ b/arch/i386/boot/Makefile @@ -102,3 +102,4 @@ zlilo: $(BOOTIMAGE) install: $(BOOTIMAGE) sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" + if [ -f init/kerntypes.o ]; then cp init/kerntypes.o $(INSTALL_PATH)/Kerntypes; fi diff --git a/arch/i386/boot/compressed/misc.c b/arch/i386/boot/compressed/misc.c index 7324ba503..9805b3730 100644 --- a/arch/i386/boot/compressed/misc.c +++ b/arch/i386/boot/compressed/misc.c @@ -12,6 +12,7 @@ #include #include #include +#include