]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 12 Oct 2007 01:57:31 +0000 (18:57 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 12 Oct 2007 01:57:31 +0000 (18:57 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (67 commits)
  mmc: don't use weight32()
  pxamci: support arbitrary block size
  sdio: make the IRQ thread more resilient in the presence of bad states
  sdio: fix IRQ diagnostic message
  sdhci: remove old dma module params
  sdhci: add SDHCI_QUIRK_BROKEN_DMA quirk
  sdhci: remove DMA capability check from controller's PCI Class reg
  sdhci: fix a typo
  mmc: Disabler for Ricoh MMC controller
  sdio: adaptive interrupt polling
  mmc: pxamci: add SDIO card interrupt reporting capability
  mmc: pxamci: set proper buswidth capabilities according to PXA flavor
  mmc: pxamci: set proper block capabilities according to PXA flavor
  mmc: pxamci: better pending IRQ determination
  arm: i.MX/MX1 SDHC implements SD cards read-only switch read-back
  mmc: add led trigger
  mmc_spi host driver
  MMC core learns about SPI
  MMC/SD card driver learns SPI
  MMC headers learn about SPI
  ...

1230 files changed:
Documentation/crypto/async-tx-api.txt [new file with mode: 0644]
Documentation/devices.txt
Documentation/feature-removal-schedule.txt
Documentation/lguest/lguest.c
Documentation/lockstat.txt [new file with mode: 0644]
Documentation/sysrq.txt
Kbuild
Makefile
arch/arm/kernel/bios32.c
arch/arm/mach-s3c2440/mach-osiris.c
arch/blackfin/kernel/bfin_gpio.c
arch/blackfin/mach-common/entry.S
arch/i386/Kconfig
arch/i386/Makefile
arch/i386/kernel/Makefile [deleted file]
arch/i386/kernel/early_printk.c [deleted file]
arch/i386/kernel/tsc_sync.c [deleted file]
arch/i386/lib/Makefile [deleted file]
arch/i386/mach-generic/Makefile [deleted file]
arch/i386/mm/Makefile [deleted file]
arch/ia64/ia32/audit.c
arch/mips/au1000/common/pci.c
arch/mips/au1000/mtx-1/board_setup.c
arch/mips/au1000/pb1000/board_setup.c
arch/mips/au1000/pb1100/board_setup.c
arch/mips/au1000/pb1500/board_setup.c
arch/mips/kernel/i8259.c
arch/mips/kernel/irq-msc01.c
arch/mips/kernel/irq.c
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/smtc.c
arch/mips/kernel/vmlinux.lds.S
arch/mips/mm/pg-r4k.c
arch/mips/pci/ops-mace.c
arch/mips/sgi-ip32/ip32-platform.c
arch/powerpc/boot/dts/mpc8349emitx.dts
arch/powerpc/kernel/process.c
arch/powerpc/platforms/83xx/usb.c
arch/powerpc/platforms/cell/spufs/file.c
arch/powerpc/platforms/pseries/xics.c
arch/powerpc/sysdev/commproc.c
arch/ppc/8xx_io/commproc.c
arch/sparc/kernel/ebus.c
arch/sparc64/kernel/binfmt_aout32.c
arch/sparc64/kernel/ebus.c
arch/sparc64/kernel/pci_common.c
arch/sparc64/kernel/prom.c
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/vio.c
arch/sparc64/lib/NGcopy_from_user.S
arch/sparc64/lib/NGcopy_to_user.S
arch/sparc64/lib/NGmemcpy.S
arch/um/sys-i386/sys_call_table.S
arch/um/sys-x86_64/syscall_table.c
arch/x86/boot/.gitignore [moved from arch/i386/boot/.gitignore with 100% similarity]
arch/x86/boot/Makefile [moved from arch/i386/boot/Makefile with 99% similarity]
arch/x86/boot/a20.c [moved from arch/i386/boot/a20.c with 100% similarity]
arch/x86/boot/apm.c [moved from arch/i386/boot/apm.c with 100% similarity]
arch/x86/boot/bitops.h [moved from arch/i386/boot/bitops.h with 100% similarity]
arch/x86/boot/boot.h [moved from arch/i386/boot/boot.h with 100% similarity]
arch/x86/boot/cmdline.c [moved from arch/i386/boot/cmdline.c with 100% similarity]
arch/x86/boot/code16gcc.h [moved from arch/i386/boot/code16gcc.h with 100% similarity]
arch/x86/boot/compressed/.gitignore [moved from arch/i386/boot/compressed/.gitignore with 100% similarity]
arch/x86/boot/compressed/Makefile [new file with mode: 0644]
arch/x86/boot/compressed/Makefile_32 [moved from arch/i386/boot/compressed/Makefile with 80% similarity]
arch/x86/boot/compressed/Makefile_64 [moved from arch/x86_64/boot/compressed/Makefile with 68% similarity]
arch/x86/boot/compressed/head_32.S [moved from arch/i386/boot/compressed/head.S with 100% similarity]
arch/x86/boot/compressed/head_64.S [moved from arch/x86_64/boot/compressed/head.S with 99% similarity]
arch/x86/boot/compressed/misc_32.c [moved from arch/i386/boot/compressed/misc.c with 100% similarity]
arch/x86/boot/compressed/misc_64.c [moved from arch/x86_64/boot/compressed/misc.c with 100% similarity]
arch/x86/boot/compressed/relocs.c [moved from arch/i386/boot/compressed/relocs.c with 100% similarity]
arch/x86/boot/compressed/vmlinux_32.lds [moved from arch/i386/boot/compressed/vmlinux.lds with 100% similarity]
arch/x86/boot/compressed/vmlinux_32.scr [moved from arch/i386/boot/compressed/vmlinux.scr with 100% similarity]
arch/x86/boot/compressed/vmlinux_64.lds [moved from arch/x86_64/boot/compressed/vmlinux.lds with 100% similarity]
arch/x86/boot/compressed/vmlinux_64.scr [moved from arch/x86_64/boot/compressed/vmlinux.scr with 100% similarity]
arch/x86/boot/copy.S [moved from arch/i386/boot/copy.S with 100% similarity]
arch/x86/boot/cpu.c [moved from arch/i386/boot/cpu.c with 100% similarity]
arch/x86/boot/cpucheck.c [moved from arch/i386/boot/cpucheck.c with 100% similarity]
arch/x86/boot/edd.c [moved from arch/i386/boot/edd.c with 100% similarity]
arch/x86/boot/header.S [moved from arch/i386/boot/header.S with 100% similarity]
arch/x86/boot/install.sh [moved from arch/i386/boot/install.sh with 100% similarity]
arch/x86/boot/main.c [moved from arch/i386/boot/main.c with 100% similarity]
arch/x86/boot/mca.c [moved from arch/i386/boot/mca.c with 100% similarity]
arch/x86/boot/memory.c [moved from arch/i386/boot/memory.c with 69% similarity]
arch/x86/boot/mtools.conf.in [moved from arch/i386/boot/mtools.conf.in with 100% similarity]
arch/x86/boot/pm.c [moved from arch/i386/boot/pm.c with 100% similarity]
arch/x86/boot/pmjump.S [moved from arch/i386/boot/pmjump.S with 100% similarity]
arch/x86/boot/printf.c [moved from arch/i386/boot/printf.c with 100% similarity]
arch/x86/boot/setup.ld [moved from arch/i386/boot/setup.ld with 100% similarity]
arch/x86/boot/string.c [moved from arch/i386/boot/string.c with 100% similarity]
arch/x86/boot/tools/.gitignore [moved from arch/i386/boot/tools/.gitignore with 100% similarity]
arch/x86/boot/tools/build.c [moved from arch/i386/boot/tools/build.c with 100% similarity]
arch/x86/boot/tty.c [moved from arch/i386/boot/tty.c with 100% similarity]
arch/x86/boot/version.c [moved from arch/i386/boot/version.c with 100% similarity]
arch/x86/boot/vesa.h [moved from arch/i386/boot/vesa.h with 100% similarity]
arch/x86/boot/video-bios.c [moved from arch/i386/boot/video-bios.c with 100% similarity]
arch/x86/boot/video-vesa.c [moved from arch/i386/boot/video-vesa.c with 100% similarity]
arch/x86/boot/video-vga.c [moved from arch/i386/boot/video-vga.c with 100% similarity]
arch/x86/boot/video.c [moved from arch/i386/boot/video.c with 100% similarity]
arch/x86/boot/video.h [moved from arch/i386/boot/video.h with 100% similarity]
arch/x86/boot/voyager.c [moved from arch/i386/boot/voyager.c with 100% similarity]
arch/x86/crypto/Makefile [new file with mode: 0644]
arch/x86/crypto/Makefile_32 [moved from arch/i386/crypto/Makefile with 54% similarity]
arch/x86/crypto/Makefile_64 [moved from arch/x86_64/crypto/Makefile with 54% similarity]
arch/x86/crypto/aes-i586-asm_32.S [moved from arch/i386/crypto/aes-i586-asm.S with 100% similarity]
arch/x86/crypto/aes-x86_64-asm_64.S [moved from arch/x86_64/crypto/aes-x86_64-asm.S with 100% similarity]
arch/x86/crypto/aes_32.c [moved from arch/i386/crypto/aes.c with 100% similarity]
arch/x86/crypto/aes_64.c [moved from arch/x86_64/crypto/aes.c with 100% similarity]
arch/x86/crypto/twofish-i586-asm_32.S [moved from arch/i386/crypto/twofish-i586-asm.S with 100% similarity]
arch/x86/crypto/twofish-x86_64-asm_64.S [moved from arch/x86_64/crypto/twofish-x86_64-asm.S with 100% similarity]
arch/x86/crypto/twofish_32.c [moved from arch/i386/crypto/twofish.c with 100% similarity]
arch/x86/crypto/twofish_64.c [moved from arch/x86_64/crypto/twofish.c with 100% similarity]
arch/x86/ia32/Makefile [moved from arch/x86_64/ia32/Makefile with 100% similarity]
arch/x86/ia32/audit.c [moved from arch/x86_64/ia32/audit.c with 95% similarity]
arch/x86/ia32/fpu32.c [moved from arch/x86_64/ia32/fpu32.c with 100% similarity]
arch/x86/ia32/ia32_aout.c [moved from arch/x86_64/ia32/ia32_aout.c with 100% similarity]
arch/x86/ia32/ia32_binfmt.c [moved from arch/x86_64/ia32/ia32_binfmt.c with 100% similarity]
arch/x86/ia32/ia32_signal.c [moved from arch/x86_64/ia32/ia32_signal.c with 100% similarity]
arch/x86/ia32/ia32entry.S [moved from arch/x86_64/ia32/ia32entry.S with 100% similarity]
arch/x86/ia32/ipc32.c [moved from arch/x86_64/ia32/ipc32.c with 98% similarity]
arch/x86/ia32/mmap32.c [moved from arch/x86_64/ia32/mmap32.c with 100% similarity]
arch/x86/ia32/ptrace32.c [moved from arch/x86_64/ia32/ptrace32.c with 100% similarity]
arch/x86/ia32/sys_ia32.c [moved from arch/x86_64/ia32/sys_ia32.c with 100% similarity]
arch/x86/ia32/syscall32.c [moved from arch/x86_64/ia32/syscall32.c with 100% similarity]
arch/x86/ia32/syscall32_syscall.S [moved from arch/x86_64/ia32/syscall32_syscall.S with 73% similarity]
arch/x86/ia32/tls32.c [moved from arch/x86_64/ia32/tls32.c with 100% similarity]
arch/x86/ia32/vsyscall-sigreturn.S [moved from arch/x86_64/ia32/vsyscall-sigreturn.S with 99% similarity]
arch/x86/ia32/vsyscall-syscall.S [moved from arch/x86_64/ia32/vsyscall-syscall.S with 100% similarity]
arch/x86/ia32/vsyscall-sysenter.S [moved from arch/x86_64/ia32/vsyscall-sysenter.S with 100% similarity]
arch/x86/ia32/vsyscall.lds [moved from arch/x86_64/ia32/vsyscall.lds with 100% similarity]
arch/x86/kernel/.gitignore [moved from arch/i386/kernel/.gitignore with 100% similarity]
arch/x86/kernel/Makefile [new file with mode: 0644]
arch/x86/kernel/Makefile_32 [new file with mode: 0644]
arch/x86/kernel/Makefile_64 [new file with mode: 0644]
arch/x86/kernel/acpi/Makefile [new file with mode: 0644]
arch/x86/kernel/acpi/Makefile_32 [moved from arch/i386/kernel/acpi/Makefile with 58% similarity]
arch/x86/kernel/acpi/Makefile_64 [new file with mode: 0644]
arch/x86/kernel/acpi/boot.c [moved from arch/i386/kernel/acpi/boot.c with 100% similarity]
arch/x86/kernel/acpi/cstate.c [moved from arch/i386/kernel/acpi/cstate.c with 100% similarity]
arch/x86/kernel/acpi/earlyquirk_32.c [moved from arch/i386/kernel/acpi/earlyquirk.c with 100% similarity]
arch/x86/kernel/acpi/processor.c [moved from arch/i386/kernel/acpi/processor.c with 100% similarity]
arch/x86/kernel/acpi/sleep_32.c [moved from arch/i386/kernel/acpi/sleep.c with 100% similarity]
arch/x86/kernel/acpi/sleep_64.c [moved from arch/x86_64/kernel/acpi/sleep.c with 100% similarity]
arch/x86/kernel/acpi/wakeup_32.S [moved from arch/i386/kernel/acpi/wakeup.S with 100% similarity]
arch/x86/kernel/acpi/wakeup_64.S [moved from arch/x86_64/kernel/acpi/wakeup.S with 99% similarity]
arch/x86/kernel/alternative.c [moved from arch/i386/kernel/alternative.c with 100% similarity]
arch/x86/kernel/aperture_64.c [moved from arch/x86_64/kernel/aperture.c with 100% similarity]
arch/x86/kernel/apic_32.c [moved from arch/i386/kernel/apic.c with 100% similarity]
arch/x86/kernel/apic_64.c [moved from arch/x86_64/kernel/apic.c with 100% similarity]
arch/x86/kernel/apm_32.c [moved from arch/i386/kernel/apm.c with 100% similarity]
arch/x86/kernel/asm-offsets.c [new file with mode: 0644]
arch/x86/kernel/asm-offsets_32.c [moved from arch/i386/kernel/asm-offsets.c with 99% similarity]
arch/x86/kernel/asm-offsets_64.c [moved from arch/x86_64/kernel/asm-offsets.c with 100% similarity]
arch/x86/kernel/audit_64.c [moved from arch/x86_64/kernel/audit.c with 100% similarity]
arch/x86/kernel/bootflag.c [moved from arch/i386/kernel/bootflag.c with 100% similarity]
arch/x86/kernel/bugs_64.c [moved from arch/x86_64/kernel/bugs.c with 100% similarity]
arch/x86/kernel/cpu/Makefile [moved from arch/i386/kernel/cpu/Makefile with 100% similarity]
arch/x86/kernel/cpu/addon_cpuid_features.c [moved from arch/i386/kernel/cpu/addon_cpuid_features.c with 100% similarity]
arch/x86/kernel/cpu/amd.c [moved from arch/i386/kernel/cpu/amd.c with 100% similarity]
arch/x86/kernel/cpu/bugs.c [moved from arch/i386/kernel/cpu/bugs.c with 100% similarity]
arch/x86/kernel/cpu/centaur.c [moved from arch/i386/kernel/cpu/centaur.c with 100% similarity]
arch/x86/kernel/cpu/common.c [moved from arch/i386/kernel/cpu/common.c with 100% similarity]
arch/x86/kernel/cpu/cpu.h [moved from arch/i386/kernel/cpu/cpu.h with 100% similarity]
arch/x86/kernel/cpu/cpufreq/Kconfig [moved from arch/i386/kernel/cpu/cpufreq/Kconfig with 100% similarity]
arch/x86/kernel/cpu/cpufreq/Makefile [moved from arch/i386/kernel/cpu/cpufreq/Makefile with 100% similarity]
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c [moved from arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c [moved from arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/e_powersaver.c [moved from arch/i386/kernel/cpu/cpufreq/e_powersaver.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/elanfreq.c [moved from arch/i386/kernel/cpu/cpufreq/elanfreq.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/gx-suspmod.c [moved from arch/i386/kernel/cpu/cpufreq/gx-suspmod.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/longhaul.c [moved from arch/i386/kernel/cpu/cpufreq/longhaul.c with 91% similarity]
arch/x86/kernel/cpu/cpufreq/longhaul.h [moved from arch/i386/kernel/cpu/cpufreq/longhaul.h with 100% similarity]
arch/x86/kernel/cpu/cpufreq/longrun.c [moved from arch/i386/kernel/cpu/cpufreq/longrun.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/p4-clockmod.c [moved from arch/i386/kernel/cpu/cpufreq/p4-clockmod.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/powernow-k6.c [moved from arch/i386/kernel/cpu/cpufreq/powernow-k6.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/powernow-k7.c [moved from arch/i386/kernel/cpu/cpufreq/powernow-k7.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/powernow-k7.h [moved from arch/i386/kernel/cpu/cpufreq/powernow-k7.h with 100% similarity]
arch/x86/kernel/cpu/cpufreq/powernow-k8.c [moved from arch/i386/kernel/cpu/cpufreq/powernow-k8.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/powernow-k8.h [moved from arch/i386/kernel/cpu/cpufreq/powernow-k8.h with 100% similarity]
arch/x86/kernel/cpu/cpufreq/sc520_freq.c [moved from arch/i386/kernel/cpu/cpufreq/sc520_freq.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c [moved from arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/speedstep-ich.c [moved from arch/i386/kernel/cpu/cpufreq/speedstep-ich.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/speedstep-lib.c [moved from arch/i386/kernel/cpu/cpufreq/speedstep-lib.c with 100% similarity]
arch/x86/kernel/cpu/cpufreq/speedstep-lib.h [moved from arch/i386/kernel/cpu/cpufreq/speedstep-lib.h with 100% similarity]
arch/x86/kernel/cpu/cpufreq/speedstep-smi.c [moved from arch/i386/kernel/cpu/cpufreq/speedstep-smi.c with 100% similarity]
arch/x86/kernel/cpu/cyrix.c [moved from arch/i386/kernel/cpu/cyrix.c with 100% similarity]
arch/x86/kernel/cpu/intel.c [moved from arch/i386/kernel/cpu/intel.c with 100% similarity]
arch/x86/kernel/cpu/intel_cacheinfo.c [moved from arch/i386/kernel/cpu/intel_cacheinfo.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/Makefile [moved from arch/i386/kernel/cpu/mcheck/Makefile with 100% similarity]
arch/x86/kernel/cpu/mcheck/k7.c [moved from arch/i386/kernel/cpu/mcheck/k7.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/mce.c [moved from arch/i386/kernel/cpu/mcheck/mce.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/mce.h [moved from arch/i386/kernel/cpu/mcheck/mce.h with 100% similarity]
arch/x86/kernel/cpu/mcheck/non-fatal.c [moved from arch/i386/kernel/cpu/mcheck/non-fatal.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/p4.c [moved from arch/i386/kernel/cpu/mcheck/p4.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/p5.c [moved from arch/i386/kernel/cpu/mcheck/p5.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/p6.c [moved from arch/i386/kernel/cpu/mcheck/p6.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/therm_throt.c [moved from arch/i386/kernel/cpu/mcheck/therm_throt.c with 100% similarity]
arch/x86/kernel/cpu/mcheck/winchip.c [moved from arch/i386/kernel/cpu/mcheck/winchip.c with 100% similarity]
arch/x86/kernel/cpu/mtrr/Makefile [moved from arch/i386/kernel/cpu/mtrr/Makefile with 100% similarity]
arch/x86/kernel/cpu/mtrr/amd.c [moved from arch/i386/kernel/cpu/mtrr/amd.c with 100% similarity]
arch/x86/kernel/cpu/mtrr/centaur.c [moved from arch/i386/kernel/cpu/mtrr/centaur.c with 100% similarity]
arch/x86/kernel/cpu/mtrr/cyrix.c [moved from arch/i386/kernel/cpu/mtrr/cyrix.c with 100% similarity]
arch/x86/kernel/cpu/mtrr/generic.c [moved from arch/i386/kernel/cpu/mtrr/generic.c with 100% similarity]
arch/x86/kernel/cpu/mtrr/if.c [moved from arch/i386/kernel/cpu/mtrr/if.c with 100% similarity]
arch/x86/kernel/cpu/mtrr/main.c [moved from arch/i386/kernel/cpu/mtrr/main.c with 100% similarity]
arch/x86/kernel/cpu/mtrr/mtrr.h [moved from arch/i386/kernel/cpu/mtrr/mtrr.h with 100% similarity]
arch/x86/kernel/cpu/mtrr/state.c [moved from arch/i386/kernel/cpu/mtrr/state.c with 98% similarity]
arch/x86/kernel/cpu/nexgen.c [moved from arch/i386/kernel/cpu/nexgen.c with 100% similarity]
arch/x86/kernel/cpu/perfctr-watchdog.c [moved from arch/i386/kernel/cpu/perfctr-watchdog.c with 100% similarity]
arch/x86/kernel/cpu/proc.c [moved from arch/i386/kernel/cpu/proc.c with 100% similarity]
arch/x86/kernel/cpu/transmeta.c [moved from arch/i386/kernel/cpu/transmeta.c with 100% similarity]
arch/x86/kernel/cpu/umc.c [moved from arch/i386/kernel/cpu/umc.c with 100% similarity]
arch/x86/kernel/cpufreq/Kconfig [moved from arch/x86_64/kernel/cpufreq/Kconfig with 100% similarity]
arch/x86/kernel/cpuid.c [moved from arch/i386/kernel/cpuid.c with 100% similarity]
arch/x86/kernel/crash_32.c [moved from arch/i386/kernel/crash.c with 100% similarity]
arch/x86/kernel/crash_64.c [moved from arch/x86_64/kernel/crash.c with 100% similarity]
arch/x86/kernel/crash_dump_32.c [moved from arch/i386/kernel/crash_dump.c with 100% similarity]
arch/x86/kernel/crash_dump_64.c [moved from arch/x86_64/kernel/crash_dump.c with 100% similarity]
arch/x86/kernel/doublefault_32.c [moved from arch/i386/kernel/doublefault.c with 100% similarity]
arch/x86/kernel/e820_32.c [moved from arch/i386/kernel/e820.c with 100% similarity]
arch/x86/kernel/e820_64.c [moved from arch/x86_64/kernel/e820.c with 100% similarity]
arch/x86/kernel/early-quirks_64.c [moved from arch/x86_64/kernel/early-quirks.c with 100% similarity]
arch/x86/kernel/early_printk.c [moved from arch/x86_64/kernel/early_printk.c with 100% similarity]
arch/x86/kernel/efi_32.c [moved from arch/i386/kernel/efi.c with 100% similarity]
arch/x86/kernel/efi_stub_32.S [moved from arch/i386/kernel/efi_stub.S with 100% similarity]
arch/x86/kernel/entry_32.S [moved from arch/i386/kernel/entry.S with 99% similarity]
arch/x86/kernel/entry_64.S [moved from arch/x86_64/kernel/entry.S with 100% similarity]
arch/x86/kernel/genapic_64.c [moved from arch/x86_64/kernel/genapic.c with 100% similarity]
arch/x86/kernel/genapic_flat_64.c [moved from arch/x86_64/kernel/genapic_flat.c with 100% similarity]
arch/x86/kernel/geode_32.c [moved from arch/i386/kernel/geode.c with 100% similarity]
arch/x86/kernel/head64.c [moved from arch/x86_64/kernel/head64.c with 100% similarity]
arch/x86/kernel/head_32.S [moved from arch/i386/kernel/head.S with 99% similarity]
arch/x86/kernel/head_64.S [moved from arch/x86_64/kernel/head.S with 100% similarity]
arch/x86/kernel/hpet_32.c [moved from arch/i386/kernel/hpet.c with 100% similarity]
arch/x86/kernel/hpet_64.c [moved from arch/x86_64/kernel/hpet.c with 100% similarity]
arch/x86/kernel/i386_ksyms_32.c [moved from arch/i386/kernel/i386_ksyms.c with 100% similarity]
arch/x86/kernel/i387_32.c [moved from arch/i386/kernel/i387.c with 100% similarity]
arch/x86/kernel/i387_64.c [moved from arch/x86_64/kernel/i387.c with 100% similarity]
arch/x86/kernel/i8237.c [moved from arch/i386/kernel/i8237.c with 100% similarity]
arch/x86/kernel/i8253_32.c [moved from arch/i386/kernel/i8253.c with 100% similarity]
arch/x86/kernel/i8259_32.c [moved from arch/i386/kernel/i8259.c with 100% similarity]
arch/x86/kernel/i8259_64.c [moved from arch/x86_64/kernel/i8259.c with 100% similarity]
arch/x86/kernel/init_task_32.c [moved from arch/i386/kernel/init_task.c with 100% similarity]
arch/x86/kernel/init_task_64.c [moved from arch/x86_64/kernel/init_task.c with 100% similarity]
arch/x86/kernel/io_apic_32.c [moved from arch/i386/kernel/io_apic.c with 100% similarity]
arch/x86/kernel/io_apic_64.c [moved from arch/x86_64/kernel/io_apic.c with 100% similarity]
arch/x86/kernel/ioport_32.c [moved from arch/i386/kernel/ioport.c with 100% similarity]
arch/x86/kernel/ioport_64.c [moved from arch/x86_64/kernel/ioport.c with 100% similarity]
arch/x86/kernel/irq_32.c [moved from arch/i386/kernel/irq.c with 100% similarity]
arch/x86/kernel/irq_64.c [moved from arch/x86_64/kernel/irq.c with 100% similarity]
arch/x86/kernel/k8.c [moved from arch/x86_64/kernel/k8.c with 100% similarity]
arch/x86/kernel/kprobes_32.c [moved from arch/i386/kernel/kprobes.c with 100% similarity]
arch/x86/kernel/kprobes_64.c [moved from arch/x86_64/kernel/kprobes.c with 100% similarity]
arch/x86/kernel/ldt_32.c [moved from arch/i386/kernel/ldt.c with 100% similarity]
arch/x86/kernel/ldt_64.c [moved from arch/x86_64/kernel/ldt.c with 100% similarity]
arch/x86/kernel/machine_kexec_32.c [moved from arch/i386/kernel/machine_kexec.c with 100% similarity]
arch/x86/kernel/machine_kexec_64.c [moved from arch/x86_64/kernel/machine_kexec.c with 100% similarity]
arch/x86/kernel/mca_32.c [moved from arch/i386/kernel/mca.c with 100% similarity]
arch/x86/kernel/mce_64.c [moved from arch/x86_64/kernel/mce.c with 100% similarity]
arch/x86/kernel/mce_amd_64.c [moved from arch/x86_64/kernel/mce_amd.c with 100% similarity]
arch/x86/kernel/mce_intel_64.c [moved from arch/x86_64/kernel/mce_intel.c with 100% similarity]
arch/x86/kernel/microcode.c [moved from arch/i386/kernel/microcode.c with 100% similarity]
arch/x86/kernel/module_32.c [moved from arch/i386/kernel/module.c with 100% similarity]
arch/x86/kernel/module_64.c [moved from arch/x86_64/kernel/module.c with 100% similarity]
arch/x86/kernel/mpparse_32.c [moved from arch/i386/kernel/mpparse.c with 100% similarity]
arch/x86/kernel/mpparse_64.c [moved from arch/x86_64/kernel/mpparse.c with 100% similarity]
arch/x86/kernel/msr.c [moved from arch/i386/kernel/msr.c with 100% similarity]
arch/x86/kernel/nmi_32.c [moved from arch/i386/kernel/nmi.c with 100% similarity]
arch/x86/kernel/nmi_64.c [moved from arch/x86_64/kernel/nmi.c with 100% similarity]
arch/x86/kernel/numaq_32.c [moved from arch/i386/kernel/numaq.c with 100% similarity]
arch/x86/kernel/paravirt_32.c [moved from arch/i386/kernel/paravirt.c with 100% similarity]
arch/x86/kernel/pci-calgary_64.c [moved from arch/x86_64/kernel/pci-calgary.c with 100% similarity]
arch/x86/kernel/pci-dma_32.c [moved from arch/i386/kernel/pci-dma.c with 100% similarity]
arch/x86/kernel/pci-dma_64.c [moved from arch/x86_64/kernel/pci-dma.c with 100% similarity]
arch/x86/kernel/pci-gart_64.c [moved from arch/x86_64/kernel/pci-gart.c with 100% similarity]
arch/x86/kernel/pci-nommu_64.c [moved from arch/x86_64/kernel/pci-nommu.c with 100% similarity]
arch/x86/kernel/pci-swiotlb_64.c [moved from arch/x86_64/kernel/pci-swiotlb.c with 100% similarity]
arch/x86/kernel/pcspeaker.c [moved from arch/i386/kernel/pcspeaker.c with 100% similarity]
arch/x86/kernel/pmtimer_64.c [moved from arch/x86_64/kernel/pmtimer.c with 100% similarity]
arch/x86/kernel/process_32.c [moved from arch/i386/kernel/process.c with 100% similarity]
arch/x86/kernel/process_64.c [moved from arch/x86_64/kernel/process.c with 100% similarity]
arch/x86/kernel/ptrace_32.c [moved from arch/i386/kernel/ptrace.c with 100% similarity]
arch/x86/kernel/ptrace_64.c [moved from arch/x86_64/kernel/ptrace.c with 100% similarity]
arch/x86/kernel/quirks.c [moved from arch/i386/kernel/quirks.c with 100% similarity]
arch/x86/kernel/reboot_32.c [moved from arch/i386/kernel/reboot.c with 100% similarity]
arch/x86/kernel/reboot_64.c [moved from arch/x86_64/kernel/reboot.c with 100% similarity]
arch/x86/kernel/reboot_fixups_32.c [moved from arch/i386/kernel/reboot_fixups.c with 100% similarity]
arch/x86/kernel/relocate_kernel_32.S [moved from arch/i386/kernel/relocate_kernel.S with 100% similarity]
arch/x86/kernel/relocate_kernel_64.S [moved from arch/x86_64/kernel/relocate_kernel.S with 100% similarity]
arch/x86/kernel/scx200_32.c [moved from arch/i386/kernel/scx200.c with 100% similarity]
arch/x86/kernel/setup64.c [moved from arch/x86_64/kernel/setup64.c with 100% similarity]
arch/x86/kernel/setup_32.c [moved from arch/i386/kernel/setup.c with 100% similarity]
arch/x86/kernel/setup_64.c [moved from arch/x86_64/kernel/setup.c with 100% similarity]
arch/x86/kernel/sigframe_32.h [moved from arch/i386/kernel/sigframe.h with 100% similarity]
arch/x86/kernel/signal_32.c [moved from arch/i386/kernel/signal.c with 99% similarity]
arch/x86/kernel/signal_64.c [moved from arch/x86_64/kernel/signal.c with 100% similarity]
arch/x86/kernel/smp_32.c [moved from arch/i386/kernel/smp.c with 100% similarity]
arch/x86/kernel/smp_64.c [moved from arch/x86_64/kernel/smp.c with 100% similarity]
arch/x86/kernel/smpboot_32.c [moved from arch/i386/kernel/smpboot.c with 100% similarity]
arch/x86/kernel/smpboot_64.c [moved from arch/x86_64/kernel/smpboot.c with 100% similarity]
arch/x86/kernel/smpcommon_32.c [moved from arch/i386/kernel/smpcommon.c with 100% similarity]
arch/x86/kernel/srat_32.c [moved from arch/i386/kernel/srat.c with 100% similarity]
arch/x86/kernel/stacktrace.c [moved from arch/x86_64/kernel/stacktrace.c with 100% similarity]
arch/x86/kernel/summit_32.c [moved from arch/i386/kernel/summit.c with 100% similarity]
arch/x86/kernel/suspend_64.c [moved from arch/x86_64/kernel/suspend.c with 100% similarity]
arch/x86/kernel/suspend_asm_64.S [moved from arch/x86_64/kernel/suspend_asm.S with 100% similarity]
arch/x86/kernel/sys_i386_32.c [moved from arch/i386/kernel/sys_i386.c with 100% similarity]
arch/x86/kernel/sys_x86_64.c [moved from arch/x86_64/kernel/sys_x86_64.c with 100% similarity]
arch/x86/kernel/syscall_64.c [moved from arch/x86_64/kernel/syscall.c with 90% similarity]
arch/x86/kernel/syscall_table_32.S [moved from arch/i386/kernel/syscall_table.S with 100% similarity]
arch/x86/kernel/sysenter_32.c [moved from arch/i386/kernel/sysenter.c with 100% similarity]
arch/x86/kernel/tce_64.c [moved from arch/x86_64/kernel/tce.c with 100% similarity]
arch/x86/kernel/time_32.c [moved from arch/i386/kernel/time.c with 100% similarity]
arch/x86/kernel/time_64.c [moved from arch/x86_64/kernel/time.c with 100% similarity]
arch/x86/kernel/topology.c [moved from arch/i386/kernel/topology.c with 100% similarity]
arch/x86/kernel/trampoline_32.S [moved from arch/i386/kernel/trampoline.S with 100% similarity]
arch/x86/kernel/trampoline_64.S [moved from arch/x86_64/kernel/trampoline.S with 99% similarity]
arch/x86/kernel/traps_32.c [moved from arch/i386/kernel/traps.c with 100% similarity]
arch/x86/kernel/traps_64.c [moved from arch/x86_64/kernel/traps.c with 100% similarity]
arch/x86/kernel/tsc_32.c [moved from arch/i386/kernel/tsc.c with 100% similarity]
arch/x86/kernel/tsc_64.c [moved from arch/x86_64/kernel/tsc.c with 100% similarity]
arch/x86/kernel/tsc_sync.c [moved from arch/x86_64/kernel/tsc_sync.c with 100% similarity]
arch/x86/kernel/verify_cpu_64.S [moved from arch/x86_64/kernel/verify_cpu.S with 100% similarity]
arch/x86/kernel/vm86_32.c [moved from arch/i386/kernel/vm86.c with 100% similarity]
arch/x86/kernel/vmi_32.c [moved from arch/i386/kernel/vmi.c with 100% similarity]
arch/x86/kernel/vmiclock_32.c [moved from arch/i386/kernel/vmiclock.c with 100% similarity]
arch/x86/kernel/vmlinux.lds.S [new file with mode: 0644]
arch/x86/kernel/vmlinux_32.lds.S [moved from arch/i386/kernel/vmlinux.lds.S with 100% similarity]
arch/x86/kernel/vmlinux_64.lds.S [moved from arch/x86_64/kernel/vmlinux.lds.S with 100% similarity]
arch/x86/kernel/vsmp_64.c [moved from arch/x86_64/kernel/vsmp.c with 100% similarity]
arch/x86/kernel/vsyscall-int80_32.S [moved from arch/i386/kernel/vsyscall-int80.S with 97% similarity]
arch/x86/kernel/vsyscall-note_32.S [moved from arch/i386/kernel/vsyscall-note.S with 95% similarity]
arch/x86/kernel/vsyscall-sigreturn_32.S [moved from arch/i386/kernel/vsyscall-sigreturn.S with 100% similarity]
arch/x86/kernel/vsyscall-sysenter_32.S [moved from arch/i386/kernel/vsyscall-sysenter.S with 99% similarity]
arch/x86/kernel/vsyscall_32.S [moved from arch/i386/kernel/vsyscall.S with 70% similarity]
arch/x86/kernel/vsyscall_32.lds.S [moved from arch/i386/kernel/vsyscall.lds.S with 100% similarity]
arch/x86/kernel/vsyscall_64.c [moved from arch/x86_64/kernel/vsyscall.c with 100% similarity]
arch/x86/kernel/x8664_ksyms_64.c [moved from arch/x86_64/kernel/x8664_ksyms.c with 100% similarity]
arch/x86/lib/Makefile [new file with mode: 0644]
arch/x86/lib/Makefile_32 [new file with mode: 0644]
arch/x86/lib/Makefile_64 [new file with mode: 0644]
arch/x86/lib/bitops_32.c [moved from arch/i386/lib/bitops.c with 100% similarity]
arch/x86/lib/bitops_64.c [moved from arch/x86_64/lib/bitops.c with 100% similarity]
arch/x86/lib/bitstr_64.c [moved from arch/x86_64/lib/bitstr.c with 100% similarity]
arch/x86/lib/checksum_32.S [moved from arch/i386/lib/checksum.S with 100% similarity]
arch/x86/lib/clear_page_64.S [moved from arch/x86_64/lib/clear_page.S with 100% similarity]
arch/x86/lib/copy_page_64.S [moved from arch/x86_64/lib/copy_page.S with 100% similarity]
arch/x86/lib/copy_user_64.S [moved from arch/x86_64/lib/copy_user.S with 100% similarity]
arch/x86/lib/copy_user_nocache_64.S [moved from arch/x86_64/lib/copy_user_nocache.S with 100% similarity]
arch/x86/lib/csum-copy_64.S [moved from arch/x86_64/lib/csum-copy.S with 100% similarity]
arch/x86/lib/csum-partial_64.c [moved from arch/x86_64/lib/csum-partial.c with 100% similarity]
arch/x86/lib/csum-wrappers_64.c [moved from arch/x86_64/lib/csum-wrappers.c with 100% similarity]
arch/x86/lib/delay_32.c [moved from arch/i386/lib/delay.c with 100% similarity]
arch/x86/lib/delay_64.c [moved from arch/x86_64/lib/delay.c with 100% similarity]
arch/x86/lib/getuser_32.S [moved from arch/i386/lib/getuser.S with 100% similarity]
arch/x86/lib/getuser_64.S [moved from arch/x86_64/lib/getuser.S with 100% similarity]
arch/x86/lib/io_64.c [moved from arch/x86_64/lib/io.c with 100% similarity]
arch/x86/lib/iomap_copy_64.S [moved from arch/x86_64/lib/iomap_copy.S with 100% similarity]
arch/x86/lib/memcpy_32.c [moved from arch/i386/lib/memcpy.c with 100% similarity]
arch/x86/lib/memcpy_64.S [moved from arch/x86_64/lib/memcpy.S with 100% similarity]
arch/x86/lib/memmove_64.c [moved from arch/x86_64/lib/memmove.c with 100% similarity]
arch/x86/lib/memset_64.S [moved from arch/x86_64/lib/memset.S with 100% similarity]
arch/x86/lib/mmx_32.c [moved from arch/i386/lib/mmx.c with 100% similarity]
arch/x86/lib/msr-on-cpu.c [moved from arch/i386/lib/msr-on-cpu.c with 100% similarity]
arch/x86/lib/putuser_32.S [moved from arch/i386/lib/putuser.S with 100% similarity]
arch/x86/lib/putuser_64.S [moved from arch/x86_64/lib/putuser.S with 100% similarity]
arch/x86/lib/rwlock_64.S [moved from arch/x86_64/lib/rwlock.S with 100% similarity]
arch/x86/lib/semaphore_32.S [moved from arch/i386/lib/semaphore.S with 100% similarity]
arch/x86/lib/string_32.c [moved from arch/i386/lib/string.c with 100% similarity]
arch/x86/lib/strstr_32.c [moved from arch/i386/lib/strstr.c with 100% similarity]
arch/x86/lib/thunk_64.S [moved from arch/x86_64/lib/thunk.S with 100% similarity]
arch/x86/lib/usercopy_32.c [moved from arch/i386/lib/usercopy.c with 100% similarity]
arch/x86/lib/usercopy_64.c [moved from arch/x86_64/lib/usercopy.c with 100% similarity]
arch/x86/mach-default/Makefile [moved from arch/i386/mach-default/Makefile with 100% similarity]
arch/x86/mach-default/setup.c [moved from arch/i386/mach-default/setup.c with 100% similarity]
arch/x86/mach-es7000/Makefile [moved from arch/i386/mach-es7000/Makefile with 100% similarity]
arch/x86/mach-es7000/es7000.h [moved from arch/i386/mach-es7000/es7000.h with 100% similarity]
arch/x86/mach-es7000/es7000plat.c [moved from arch/i386/mach-es7000/es7000plat.c with 100% similarity]
arch/x86/mach-generic/Makefile [new file with mode: 0644]
arch/x86/mach-generic/bigsmp.c [moved from arch/i386/mach-generic/bigsmp.c with 100% similarity]
arch/x86/mach-generic/default.c [moved from arch/i386/mach-generic/default.c with 100% similarity]
arch/x86/mach-generic/es7000.c [moved from arch/i386/mach-generic/es7000.c with 100% similarity]
arch/x86/mach-generic/probe.c [moved from arch/i386/mach-generic/probe.c with 100% similarity]
arch/x86/mach-generic/summit.c [moved from arch/i386/mach-generic/summit.c with 100% similarity]
arch/x86/mach-visws/Makefile [moved from arch/i386/mach-visws/Makefile with 100% similarity]
arch/x86/mach-visws/mpparse.c [moved from arch/i386/mach-visws/mpparse.c with 100% similarity]
arch/x86/mach-visws/reboot.c [moved from arch/i386/mach-visws/reboot.c with 100% similarity]
arch/x86/mach-visws/setup.c [moved from arch/i386/mach-visws/setup.c with 100% similarity]
arch/x86/mach-visws/traps.c [moved from arch/i386/mach-visws/traps.c with 100% similarity]
arch/x86/mach-visws/visws_apic.c [moved from arch/i386/mach-visws/visws_apic.c with 100% similarity]
arch/x86/mach-voyager/Makefile [moved from arch/i386/mach-voyager/Makefile with 80% similarity]
arch/x86/mach-voyager/setup.c [moved from arch/i386/mach-voyager/setup.c with 100% similarity]
arch/x86/mach-voyager/voyager_basic.c [moved from arch/i386/mach-voyager/voyager_basic.c with 100% similarity]
arch/x86/mach-voyager/voyager_cat.c [moved from arch/i386/mach-voyager/voyager_cat.c with 100% similarity]
arch/x86/mach-voyager/voyager_smp.c [moved from arch/i386/mach-voyager/voyager_smp.c with 100% similarity]
arch/x86/mach-voyager/voyager_thread.c [moved from arch/i386/mach-voyager/voyager_thread.c with 100% similarity]
arch/x86/math-emu/Makefile [moved from arch/i386/math-emu/Makefile with 100% similarity]
arch/x86/math-emu/README [moved from arch/i386/math-emu/README with 100% similarity]
arch/x86/math-emu/control_w.h [moved from arch/i386/math-emu/control_w.h with 100% similarity]
arch/x86/math-emu/div_Xsig.S [moved from arch/i386/math-emu/div_Xsig.S with 100% similarity]
arch/x86/math-emu/div_small.S [moved from arch/i386/math-emu/div_small.S with 100% similarity]
arch/x86/math-emu/errors.c [moved from arch/i386/math-emu/errors.c with 100% similarity]
arch/x86/math-emu/exception.h [moved from arch/i386/math-emu/exception.h with 100% similarity]
arch/x86/math-emu/fpu_arith.c [moved from arch/i386/math-emu/fpu_arith.c with 100% similarity]
arch/x86/math-emu/fpu_asm.h [moved from arch/i386/math-emu/fpu_asm.h with 100% similarity]
arch/x86/math-emu/fpu_aux.c [moved from arch/i386/math-emu/fpu_aux.c with 100% similarity]
arch/x86/math-emu/fpu_emu.h [moved from arch/i386/math-emu/fpu_emu.h with 100% similarity]
arch/x86/math-emu/fpu_entry.c [moved from arch/i386/math-emu/fpu_entry.c with 100% similarity]
arch/x86/math-emu/fpu_etc.c [moved from arch/i386/math-emu/fpu_etc.c with 100% similarity]
arch/x86/math-emu/fpu_proto.h [moved from arch/i386/math-emu/fpu_proto.h with 100% similarity]
arch/x86/math-emu/fpu_system.h [moved from arch/i386/math-emu/fpu_system.h with 100% similarity]
arch/x86/math-emu/fpu_tags.c [moved from arch/i386/math-emu/fpu_tags.c with 100% similarity]
arch/x86/math-emu/fpu_trig.c [moved from arch/i386/math-emu/fpu_trig.c with 100% similarity]
arch/x86/math-emu/get_address.c [moved from arch/i386/math-emu/get_address.c with 100% similarity]
arch/x86/math-emu/load_store.c [moved from arch/i386/math-emu/load_store.c with 100% similarity]
arch/x86/math-emu/mul_Xsig.S [moved from arch/i386/math-emu/mul_Xsig.S with 100% similarity]
arch/x86/math-emu/poly.h [moved from arch/i386/math-emu/poly.h with 100% similarity]
arch/x86/math-emu/poly_2xm1.c [moved from arch/i386/math-emu/poly_2xm1.c with 100% similarity]
arch/x86/math-emu/poly_atan.c [moved from arch/i386/math-emu/poly_atan.c with 100% similarity]
arch/x86/math-emu/poly_l2.c [moved from arch/i386/math-emu/poly_l2.c with 100% similarity]
arch/x86/math-emu/poly_sin.c [moved from arch/i386/math-emu/poly_sin.c with 100% similarity]
arch/x86/math-emu/poly_tan.c [moved from arch/i386/math-emu/poly_tan.c with 100% similarity]
arch/x86/math-emu/polynom_Xsig.S [moved from arch/i386/math-emu/polynom_Xsig.S with 100% similarity]
arch/x86/math-emu/reg_add_sub.c [moved from arch/i386/math-emu/reg_add_sub.c with 100% similarity]
arch/x86/math-emu/reg_compare.c [moved from arch/i386/math-emu/reg_compare.c with 100% similarity]
arch/x86/math-emu/reg_constant.c [moved from arch/i386/math-emu/reg_constant.c with 100% similarity]
arch/x86/math-emu/reg_constant.h [moved from arch/i386/math-emu/reg_constant.h with 100% similarity]
arch/x86/math-emu/reg_convert.c [moved from arch/i386/math-emu/reg_convert.c with 100% similarity]
arch/x86/math-emu/reg_divide.c [moved from arch/i386/math-emu/reg_divide.c with 100% similarity]
arch/x86/math-emu/reg_ld_str.c [moved from arch/i386/math-emu/reg_ld_str.c with 100% similarity]
arch/x86/math-emu/reg_mul.c [moved from arch/i386/math-emu/reg_mul.c with 100% similarity]
arch/x86/math-emu/reg_norm.S [moved from arch/i386/math-emu/reg_norm.S with 100% similarity]
arch/x86/math-emu/reg_round.S [moved from arch/i386/math-emu/reg_round.S with 100% similarity]
arch/x86/math-emu/reg_u_add.S [moved from arch/i386/math-emu/reg_u_add.S with 100% similarity]
arch/x86/math-emu/reg_u_div.S [moved from arch/i386/math-emu/reg_u_div.S with 100% similarity]
arch/x86/math-emu/reg_u_mul.S [moved from arch/i386/math-emu/reg_u_mul.S with 100% similarity]
arch/x86/math-emu/reg_u_sub.S [moved from arch/i386/math-emu/reg_u_sub.S with 100% similarity]
arch/x86/math-emu/round_Xsig.S [moved from arch/i386/math-emu/round_Xsig.S with 100% similarity]
arch/x86/math-emu/shr_Xsig.S [moved from arch/i386/math-emu/shr_Xsig.S with 100% similarity]
arch/x86/math-emu/status_w.h [moved from arch/i386/math-emu/status_w.h with 100% similarity]
arch/x86/math-emu/version.h [moved from arch/i386/math-emu/version.h with 100% similarity]
arch/x86/math-emu/wm_shrx.S [moved from arch/i386/math-emu/wm_shrx.S with 100% similarity]
arch/x86/math-emu/wm_sqrt.S [moved from arch/i386/math-emu/wm_sqrt.S with 100% similarity]
arch/x86/mm/Makefile [new file with mode: 0644]
arch/x86/mm/Makefile_32 [new file with mode: 0644]
arch/x86/mm/Makefile_64 [new file with mode: 0644]
arch/x86/mm/boot_ioremap_32.c [moved from arch/i386/mm/boot_ioremap.c with 100% similarity]
arch/x86/mm/discontig_32.c [moved from arch/i386/mm/discontig.c with 100% similarity]
arch/x86/mm/extable_32.c [moved from arch/i386/mm/extable.c with 100% similarity]
arch/x86/mm/extable_64.c [moved from arch/x86_64/mm/extable.c with 100% similarity]
arch/x86/mm/fault_32.c [moved from arch/i386/mm/fault.c with 100% similarity]
arch/x86/mm/fault_64.c [moved from arch/x86_64/mm/fault.c with 100% similarity]
arch/x86/mm/highmem_32.c [moved from arch/i386/mm/highmem.c with 100% similarity]
arch/x86/mm/hugetlbpage.c [moved from arch/i386/mm/hugetlbpage.c with 100% similarity]
arch/x86/mm/init_32.c [moved from arch/i386/mm/init.c with 100% similarity]
arch/x86/mm/init_64.c [moved from arch/x86_64/mm/init.c with 100% similarity]
arch/x86/mm/ioremap_32.c [moved from arch/i386/mm/ioremap.c with 100% similarity]
arch/x86/mm/ioremap_64.c [moved from arch/x86_64/mm/ioremap.c with 100% similarity]
arch/x86/mm/k8topology_64.c [moved from arch/x86_64/mm/k8topology.c with 100% similarity]
arch/x86/mm/mmap_32.c [moved from arch/i386/mm/mmap.c with 100% similarity]
arch/x86/mm/mmap_64.c [moved from arch/x86_64/mm/mmap.c with 100% similarity]
arch/x86/mm/numa_64.c [moved from arch/x86_64/mm/numa.c with 100% similarity]
arch/x86/mm/pageattr_32.c [moved from arch/i386/mm/pageattr.c with 100% similarity]
arch/x86/mm/pageattr_64.c [moved from arch/x86_64/mm/pageattr.c with 100% similarity]
arch/x86/mm/pgtable_32.c [moved from arch/i386/mm/pgtable.c with 100% similarity]
arch/x86/mm/srat_64.c [moved from arch/x86_64/mm/srat.c with 100% similarity]
arch/x86/oprofile/Kconfig [moved from arch/i386/oprofile/Kconfig with 100% similarity]
arch/x86/oprofile/Makefile [moved from arch/i386/oprofile/Makefile with 100% similarity]
arch/x86/oprofile/backtrace.c [moved from arch/i386/oprofile/backtrace.c with 100% similarity]
arch/x86/oprofile/init.c [moved from arch/i386/oprofile/init.c with 100% similarity]
arch/x86/oprofile/nmi_int.c [moved from arch/i386/oprofile/nmi_int.c with 100% similarity]
arch/x86/oprofile/nmi_timer_int.c [moved from arch/i386/oprofile/nmi_timer_int.c with 100% similarity]
arch/x86/oprofile/op_counter.h [moved from arch/i386/oprofile/op_counter.h with 100% similarity]
arch/x86/oprofile/op_model_athlon.c [moved from arch/i386/oprofile/op_model_athlon.c with 100% similarity]
arch/x86/oprofile/op_model_p4.c [moved from arch/i386/oprofile/op_model_p4.c with 100% similarity]
arch/x86/oprofile/op_model_ppro.c [moved from arch/i386/oprofile/op_model_ppro.c with 100% similarity]
arch/x86/oprofile/op_x86_model.h [moved from arch/i386/oprofile/op_x86_model.h with 100% similarity]
arch/x86/pci/Makefile [new file with mode: 0644]
arch/x86/pci/Makefile_32 [moved from arch/i386/pci/Makefile with 81% similarity]
arch/x86/pci/Makefile_64 [new file with mode: 0644]
arch/x86/pci/acpi.c [moved from arch/i386/pci/acpi.c with 100% similarity]
arch/x86/pci/common.c [moved from arch/i386/pci/common.c with 100% similarity]
arch/x86/pci/direct.c [moved from arch/i386/pci/direct.c with 100% similarity]
arch/x86/pci/early.c [moved from arch/i386/pci/early.c with 100% similarity]
arch/x86/pci/fixup.c [moved from arch/i386/pci/fixup.c with 100% similarity]
arch/x86/pci/i386.c [moved from arch/i386/pci/i386.c with 100% similarity]
arch/x86/pci/init.c [moved from arch/i386/pci/init.c with 100% similarity]
arch/x86/pci/irq.c [moved from arch/i386/pci/irq.c with 100% similarity]
arch/x86/pci/k8-bus_64.c [moved from arch/x86_64/pci/k8-bus.c with 100% similarity]
arch/x86/pci/legacy.c [moved from arch/i386/pci/legacy.c with 100% similarity]
arch/x86/pci/mmconfig-shared.c [moved from arch/i386/pci/mmconfig-shared.c with 100% similarity]
arch/x86/pci/mmconfig_32.c [moved from arch/i386/pci/mmconfig.c with 100% similarity]
arch/x86/pci/mmconfig_64.c [moved from arch/x86_64/pci/mmconfig.c with 100% similarity]
arch/x86/pci/numa.c [moved from arch/i386/pci/numa.c with 100% similarity]
arch/x86/pci/pcbios.c [moved from arch/i386/pci/pcbios.c with 100% similarity]
arch/x86/pci/pci.h [moved from arch/i386/pci/pci.h with 100% similarity]
arch/x86/pci/visws.c [moved from arch/i386/pci/visws.c with 100% similarity]
arch/x86/power/Makefile [moved from arch/i386/power/Makefile with 100% similarity]
arch/x86/power/cpu.c [moved from arch/i386/power/cpu.c with 100% similarity]
arch/x86/power/suspend.c [moved from arch/i386/power/suspend.c with 100% similarity]
arch/x86/power/swsusp.S [moved from arch/i386/power/swsusp.S with 100% similarity]
arch/x86/vdso/.gitignore [moved from arch/x86_64/vdso/.gitignore with 100% similarity]
arch/x86/vdso/Makefile [moved from arch/x86_64/vdso/Makefile with 100% similarity]
arch/x86/vdso/vclock_gettime.c [moved from arch/x86_64/vdso/vclock_gettime.c with 100% similarity]
arch/x86/vdso/vdso-note.S [moved from arch/x86_64/vdso/vdso-note.S with 100% similarity]
arch/x86/vdso/vdso-start.S [moved from arch/x86_64/vdso/vdso-start.S with 100% similarity]
arch/x86/vdso/vdso.S [new file with mode: 0644]
arch/x86/vdso/vdso.lds.S [moved from arch/x86_64/vdso/vdso.lds.S with 100% similarity]
arch/x86/vdso/vextern.h [moved from arch/x86_64/vdso/vextern.h with 100% similarity]
arch/x86/vdso/vgetcpu.c [moved from arch/x86_64/vdso/vgetcpu.c with 100% similarity]
arch/x86/vdso/vma.c [moved from arch/x86_64/vdso/vma.c with 100% similarity]
arch/x86/vdso/voffset.h [new file with mode: 0644]
arch/x86/vdso/vvar.c [moved from arch/x86_64/vdso/vvar.c with 100% similarity]
arch/x86/video/Makefile [moved from arch/i386/video/Makefile with 100% similarity]
arch/x86/video/fbdev.c [moved from arch/i386/video/fbdev.c with 100% similarity]
arch/x86/xen/Kconfig [moved from arch/i386/xen/Kconfig with 100% similarity]
arch/x86/xen/Makefile [moved from arch/i386/xen/Makefile with 100% similarity]
arch/x86/xen/enlighten.c [moved from arch/i386/xen/enlighten.c with 100% similarity]
arch/x86/xen/events.c [moved from arch/i386/xen/events.c with 100% similarity]
arch/x86/xen/features.c [moved from arch/i386/xen/features.c with 100% similarity]
arch/x86/xen/manage.c [moved from arch/i386/xen/manage.c with 100% similarity]
arch/x86/xen/mmu.c [moved from arch/i386/xen/mmu.c with 99% similarity]
arch/x86/xen/mmu.h [moved from arch/i386/xen/mmu.h with 100% similarity]
arch/x86/xen/multicalls.c [moved from arch/i386/xen/multicalls.c with 100% similarity]
arch/x86/xen/multicalls.h [moved from arch/i386/xen/multicalls.h with 100% similarity]
arch/x86/xen/setup.c [moved from arch/i386/xen/setup.c with 100% similarity]
arch/x86/xen/smp.c [moved from arch/i386/xen/smp.c with 100% similarity]
arch/x86/xen/time.c [moved from arch/i386/xen/time.c with 100% similarity]
arch/x86/xen/vdso.h [moved from arch/i386/xen/vdso.h with 100% similarity]
arch/x86/xen/xen-asm.S [moved from arch/i386/xen/xen-asm.S with 100% similarity]
arch/x86/xen/xen-head.S [moved from arch/i386/xen/xen-head.S with 100% similarity]
arch/x86/xen/xen-ops.h [moved from arch/i386/xen/xen-ops.h with 100% similarity]
arch/x86_64/Kconfig
arch/x86_64/Makefile
arch/x86_64/boot/.gitignore [deleted file]
arch/x86_64/boot/Makefile [deleted file]
arch/x86_64/boot/tools/.gitignore [deleted file]
arch/x86_64/kernel/Makefile [deleted file]
arch/x86_64/kernel/acpi/Makefile [deleted file]
arch/x86_64/kernel/cpufreq/Makefile [deleted file]
arch/x86_64/lib/Makefile [deleted file]
arch/x86_64/lib/msr-on-cpu.c [deleted file]
arch/x86_64/mm/Makefile [deleted file]
arch/x86_64/oprofile/Kconfig [deleted file]
arch/x86_64/oprofile/Makefile [deleted file]
arch/x86_64/pci/Makefile [deleted file]
arch/x86_64/vdso/vdso.S [deleted file]
arch/x86_64/vdso/voffset.h [deleted file]
crypto/async_tx/async_tx.c
drivers/acpi/sleep/Makefile
drivers/acpi/sleep/main.c
drivers/ata/ata_piix.c
drivers/ata/pata_ixp4xx_cf.c
drivers/ata/pata_marvell.c
drivers/ata/pata_sis.c
drivers/ata/sata_mv.c
drivers/ata/sata_sil24.c
drivers/base/core.c
drivers/cdrom/cdrom.c
drivers/char/Makefile
drivers/char/agp/intel-agp.c
drivers/char/drm/i915_drv.h
drivers/char/drm/i915_irq.c
drivers/char/hpet.c
drivers/char/mspec.c
drivers/char/random.c
drivers/char/vt_ioctl.c
drivers/firewire/Kconfig
drivers/ide/ppc/pmac.c
drivers/infiniband/hw/mlx4/qp.c
drivers/input/joystick/Kconfig
drivers/input/mouse/appletouch.c
drivers/isdn/i4l/isdn_common.c
drivers/lguest/lguest_asm.S
drivers/md/raid5.c
drivers/media/video/ivtv/ivtv-fileops.c
drivers/media/video/usbvision/usbvision-video.c
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_hw.h
drivers/net/e1000/e1000_main.c
drivers/net/mv643xx_eth.c
drivers/net/mv643xx_eth.h
drivers/net/pcmcia/3c589_cs.c
drivers/net/ppp_mppe.c
drivers/net/qla3xxx.c
drivers/net/r8169.c
drivers/net/sky2.c
drivers/net/sky2.h
drivers/net/usb/dm9601.c
drivers/net/wireless/Makefile
drivers/net/wireless/bcm43xx/bcm43xx_wx.c
drivers/pci/hotplug/cpqphp_core.c
drivers/pci/hotplug/cpqphp_pci.c
drivers/pci/hotplug/ibmphp_core.c
drivers/pci/quirks.c
drivers/power/power_supply_sysfs.c
drivers/scsi/aic94xx/aic94xx_task.c
drivers/scsi/esp_scsi.c
drivers/scsi/megaraid.c
drivers/scsi/scsi_transport_spi.c
drivers/serial/cpm_uart/cpm_uart_cpm1.h
drivers/serial/serial_cs.c
drivers/serial/sunsab.c
drivers/w1/w1.c
fs/aio.c
fs/binfmt_flat.c
fs/compat_ioctl.c
fs/lockd/svclock.c
fs/nfs/client.c
fs/nfs/dir.c
fs/nfs/getroot.c
fs/ocfs2/localalloc.c
fs/splice.c
fs/ufs/super.c
fs/xfs/xfs_buf_item.h
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_trans_buf.c
include/acpi/acpi_drivers.h
include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
include/asm-blackfin/mach-bf537/portmux.h
include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
include/asm-blackfin/portmux.h
include/asm-blackfin/unistd.h
include/asm-h8300/flat.h
include/asm-i386/Kbuild [deleted file]
include/asm-i386/k8.h [deleted file]
include/asm-i386/pci-direct.h [deleted file]
include/asm-i386/stacktrace.h [deleted file]
include/asm-m32r/flat.h
include/asm-m68knommu/flat.h
include/asm-mips/cmpxchg.h [new file with mode: 0644]
include/asm-mips/fcntl.h
include/asm-mips/irq.h
include/asm-mips/local.h
include/asm-mips/page.h
include/asm-mips/system.h
include/asm-sh/flat.h
include/asm-sh/mpc1211/mc146818rtc.h
include/asm-v850/flat.h
include/asm-x86/8253pit.h [new file with mode: 0644]
include/asm-x86/8253pit_32.h [moved from include/asm-i386/8253pit.h with 100% similarity]
include/asm-x86/8253pit_64.h [moved from include/asm-x86_64/8253pit.h with 100% similarity]
include/asm-x86/Kbuild [new file with mode: 0644]
include/asm-x86/a.out.h [new file with mode: 0644]
include/asm-x86/a.out_32.h [moved from include/asm-i386/a.out.h with 100% similarity]
include/asm-x86/a.out_64.h [moved from include/asm-x86_64/a.out.h with 100% similarity]
include/asm-x86/acpi.h [new file with mode: 0644]
include/asm-x86/acpi_32.h [moved from include/asm-i386/acpi.h with 100% similarity]
include/asm-x86/acpi_64.h [moved from include/asm-x86_64/acpi.h with 100% similarity]
include/asm-x86/agp.h [new file with mode: 0644]
include/asm-x86/agp_32.h [moved from include/asm-i386/agp.h with 100% similarity]
include/asm-x86/agp_64.h [moved from include/asm-x86_64/agp.h with 100% similarity]
include/asm-x86/alternative-asm.i [new file with mode: 0644]
include/asm-x86/alternative-asm_32.i [moved from include/asm-i386/alternative-asm.i with 100% similarity]
include/asm-x86/alternative-asm_64.i [moved from include/asm-x86_64/alternative-asm.i with 100% similarity]
include/asm-x86/alternative.h [new file with mode: 0644]
include/asm-x86/alternative_32.h [moved from include/asm-i386/alternative.h with 100% similarity]
include/asm-x86/alternative_64.h [moved from include/asm-x86_64/alternative.h with 100% similarity]
include/asm-x86/apic.h [new file with mode: 0644]
include/asm-x86/apic_32.h [moved from include/asm-i386/apic.h with 100% similarity]
include/asm-x86/apic_64.h [moved from include/asm-x86_64/apic.h with 100% similarity]
include/asm-x86/apicdef.h [new file with mode: 0644]
include/asm-x86/apicdef_32.h [moved from include/asm-i386/apicdef.h with 100% similarity]
include/asm-x86/apicdef_64.h [moved from include/asm-x86_64/apicdef.h with 100% similarity]
include/asm-x86/arch_hooks.h [moved from include/asm-i386/arch_hooks.h with 100% similarity]
include/asm-x86/atomic.h [new file with mode: 0644]
include/asm-x86/atomic_32.h [moved from include/asm-i386/atomic.h with 100% similarity]
include/asm-x86/atomic_64.h [moved from include/asm-x86_64/atomic.h with 100% similarity]
include/asm-x86/auxvec.h [new file with mode: 0644]
include/asm-x86/auxvec_32.h [moved from include/asm-i386/auxvec.h with 100% similarity]
include/asm-x86/auxvec_64.h [moved from include/asm-x86_64/auxvec.h with 100% similarity]
include/asm-x86/bitops.h [new file with mode: 0644]
include/asm-x86/bitops_32.h [moved from include/asm-i386/bitops.h with 100% similarity]
include/asm-x86/bitops_64.h [moved from include/asm-x86_64/bitops.h with 100% similarity]
include/asm-x86/boot.h [moved from include/asm-i386/boot.h with 100% similarity]
include/asm-x86/bootparam.h [moved from include/asm-i386/bootparam.h with 100% similarity]
include/asm-x86/bootsetup.h [moved from include/asm-x86_64/bootsetup.h with 100% similarity]
include/asm-x86/bug.h [new file with mode: 0644]
include/asm-x86/bug_32.h [moved from include/asm-i386/bug.h with 100% similarity]
include/asm-x86/bug_64.h [moved from include/asm-x86_64/bug.h with 100% similarity]
include/asm-x86/bugs.h [new file with mode: 0644]
include/asm-x86/bugs_32.h [moved from include/asm-i386/bugs.h with 100% similarity]
include/asm-x86/bugs_64.h [moved from include/asm-x86_64/bugs.h with 100% similarity]
include/asm-x86/byteorder.h [new file with mode: 0644]
include/asm-x86/byteorder_32.h [moved from include/asm-i386/byteorder.h with 100% similarity]
include/asm-x86/byteorder_64.h [moved from include/asm-x86_64/byteorder.h with 100% similarity]
include/asm-x86/cache.h [new file with mode: 0644]
include/asm-x86/cache_32.h [moved from include/asm-i386/cache.h with 100% similarity]
include/asm-x86/cache_64.h [moved from include/asm-x86_64/cache.h with 100% similarity]
include/asm-x86/cacheflush.h [new file with mode: 0644]
include/asm-x86/cacheflush_32.h [moved from include/asm-i386/cacheflush.h with 100% similarity]
include/asm-x86/cacheflush_64.h [moved from include/asm-x86_64/cacheflush.h with 100% similarity]
include/asm-x86/calgary.h [moved from include/asm-x86_64/calgary.h with 100% similarity]
include/asm-x86/calling.h [moved from include/asm-x86_64/calling.h with 100% similarity]
include/asm-x86/checksum.h [new file with mode: 0644]
include/asm-x86/checksum_32.h [moved from include/asm-i386/checksum.h with 100% similarity]
include/asm-x86/checksum_64.h [moved from include/asm-x86_64/checksum.h with 100% similarity]
include/asm-x86/cmpxchg.h [new file with mode: 0644]
include/asm-x86/cmpxchg_32.h [moved from include/asm-i386/cmpxchg.h with 100% similarity]
include/asm-x86/cmpxchg_64.h [moved from include/asm-x86_64/cmpxchg.h with 100% similarity]
include/asm-x86/compat.h [moved from include/asm-x86_64/compat.h with 100% similarity]
include/asm-x86/cpu.h [moved from include/asm-i386/cpu.h with 100% similarity]
include/asm-x86/cpufeature.h [new file with mode: 0644]
include/asm-x86/cpufeature_32.h [moved from include/asm-i386/cpufeature.h with 100% similarity]
include/asm-x86/cpufeature_64.h [moved from include/asm-x86_64/cpufeature.h with 91% similarity]
include/asm-x86/cputime.h [new file with mode: 0644]
include/asm-x86/cputime_32.h [moved from include/asm-i386/cputime.h with 100% similarity]
include/asm-x86/cputime_64.h [moved from include/asm-x86_64/cputime.h with 100% similarity]
include/asm-x86/current.h [new file with mode: 0644]
include/asm-x86/current_32.h [moved from include/asm-i386/current.h with 100% similarity]
include/asm-x86/current_64.h [moved from include/asm-x86_64/current.h with 100% similarity]
include/asm-x86/debugreg.h [new file with mode: 0644]
include/asm-x86/debugreg_32.h [moved from include/asm-i386/debugreg.h with 100% similarity]
include/asm-x86/debugreg_64.h [moved from include/asm-x86_64/debugreg.h with 100% similarity]
include/asm-x86/delay.h [new file with mode: 0644]
include/asm-x86/delay_32.h [moved from include/asm-i386/delay.h with 100% similarity]
include/asm-x86/delay_64.h [moved from include/asm-x86_64/delay.h with 100% similarity]
include/asm-x86/desc.h [new file with mode: 0644]
include/asm-x86/desc_32.h [moved from include/asm-i386/desc.h with 100% similarity]
include/asm-x86/desc_64.h [moved from include/asm-x86_64/desc.h with 100% similarity]
include/asm-x86/desc_defs.h [moved from include/asm-x86_64/desc_defs.h with 100% similarity]
include/asm-x86/device.h [new file with mode: 0644]
include/asm-x86/device_32.h [moved from include/asm-i386/device.h with 100% similarity]
include/asm-x86/device_64.h [moved from include/asm-x86_64/device.h with 100% similarity]
include/asm-x86/div64.h [new file with mode: 0644]
include/asm-x86/div64_32.h [moved from include/asm-i386/div64.h with 100% similarity]
include/asm-x86/div64_64.h [moved from include/asm-x86_64/div64.h with 100% similarity]
include/asm-x86/dma-mapping.h [new file with mode: 0644]
include/asm-x86/dma-mapping_32.h [moved from include/asm-i386/dma-mapping.h with 100% similarity]
include/asm-x86/dma-mapping_64.h [moved from include/asm-x86_64/dma-mapping.h with 100% similarity]
include/asm-x86/dma.h [new file with mode: 0644]
include/asm-x86/dma_32.h [moved from include/asm-i386/dma.h with 100% similarity]
include/asm-x86/dma_64.h [moved from include/asm-x86_64/dma.h with 100% similarity]
include/asm-x86/dmi.h [new file with mode: 0644]
include/asm-x86/dmi_32.h [moved from include/asm-i386/dmi.h with 100% similarity]
include/asm-x86/dmi_64.h [moved from include/asm-x86_64/dmi.h with 100% similarity]
include/asm-x86/dwarf2.h [new file with mode: 0644]
include/asm-x86/dwarf2_32.h [moved from include/asm-i386/dwarf2.h with 100% similarity]
include/asm-x86/dwarf2_64.h [moved from include/asm-x86_64/dwarf2.h with 100% similarity]
include/asm-x86/e820.h [new file with mode: 0644]
include/asm-x86/e820_32.h [moved from include/asm-i386/e820.h with 100% similarity]
include/asm-x86/e820_64.h [moved from include/asm-x86_64/e820.h with 100% similarity]
include/asm-x86/edac.h [new file with mode: 0644]
include/asm-x86/edac_32.h [moved from include/asm-i386/edac.h with 100% similarity]
include/asm-x86/edac_64.h [moved from include/asm-x86_64/edac.h with 100% similarity]
include/asm-x86/elf.h [new file with mode: 0644]
include/asm-x86/elf_32.h [moved from include/asm-i386/elf.h with 100% similarity]
include/asm-x86/elf_64.h [moved from include/asm-x86_64/elf.h with 100% similarity]
include/asm-x86/emergency-restart.h [moved from include/asm-i386/emergency-restart.h with 100% similarity]
include/asm-x86/errno.h [new file with mode: 0644]
include/asm-x86/errno_32.h [moved from include/asm-i386/errno.h with 100% similarity]
include/asm-x86/errno_64.h [moved from include/asm-x86_64/errno.h with 100% similarity]
include/asm-x86/fb.h [new file with mode: 0644]
include/asm-x86/fb_32.h [moved from include/asm-i386/fb.h with 100% similarity]
include/asm-x86/fb_64.h [moved from include/asm-x86_64/fb.h with 100% similarity]
include/asm-x86/fcntl.h [moved from include/asm-i386/fcntl.h with 100% similarity]
include/asm-x86/fixmap.h [new file with mode: 0644]
include/asm-x86/fixmap_32.h [moved from include/asm-i386/fixmap.h with 100% similarity]
include/asm-x86/fixmap_64.h [moved from include/asm-x86_64/fixmap.h with 100% similarity]
include/asm-x86/floppy.h [new file with mode: 0644]
include/asm-x86/floppy_32.h [moved from include/asm-i386/floppy.h with 100% similarity]
include/asm-x86/floppy_64.h [moved from include/asm-x86_64/floppy.h with 100% similarity]
include/asm-x86/fpu32.h [moved from include/asm-x86_64/fpu32.h with 100% similarity]
include/asm-x86/frame.i [moved from include/asm-i386/frame.i with 100% similarity]
include/asm-x86/futex.h [new file with mode: 0644]
include/asm-x86/futex_32.h [moved from include/asm-i386/futex.h with 100% similarity]
include/asm-x86/futex_64.h [moved from include/asm-x86_64/futex.h with 100% similarity]
include/asm-x86/genapic.h [new file with mode: 0644]
include/asm-x86/genapic_32.h [moved from include/asm-i386/genapic.h with 100% similarity]
include/asm-x86/genapic_64.h [moved from include/asm-x86_64/genapic.h with 100% similarity]
include/asm-x86/geode.h [moved from include/asm-i386/geode.h with 100% similarity]
include/asm-x86/hardirq.h [new file with mode: 0644]
include/asm-x86/hardirq_32.h [moved from include/asm-i386/hardirq.h with 100% similarity]
include/asm-x86/hardirq_64.h [moved from include/asm-x86_64/hardirq.h with 100% similarity]
include/asm-x86/highmem.h [moved from include/asm-i386/highmem.h with 100% similarity]
include/asm-x86/hpet.h [new file with mode: 0644]
include/asm-x86/hpet_32.h [moved from include/asm-i386/hpet.h with 100% similarity]
include/asm-x86/hpet_64.h [moved from include/asm-x86_64/hpet.h with 93% similarity]
include/asm-x86/hw_irq.h [new file with mode: 0644]
include/asm-x86/hw_irq_32.h [moved from include/asm-i386/hw_irq.h with 100% similarity]
include/asm-x86/hw_irq_64.h [moved from include/asm-x86_64/hw_irq.h with 100% similarity]
include/asm-x86/hypertransport.h [moved from include/asm-i386/hypertransport.h with 100% similarity]
include/asm-x86/i387.h [new file with mode: 0644]
include/asm-x86/i387_32.h [moved from include/asm-i386/i387.h with 100% similarity]
include/asm-x86/i387_64.h [moved from include/asm-x86_64/i387.h with 100% similarity]
include/asm-x86/i8253.h [new file with mode: 0644]
include/asm-x86/i8253_32.h [moved from include/asm-i386/i8253.h with 100% similarity]
include/asm-x86/i8253_64.h [moved from include/asm-x86_64/i8253.h with 100% similarity]
include/asm-x86/i8259.h [moved from include/asm-i386/i8259.h with 100% similarity]
include/asm-x86/ia32.h [moved from include/asm-x86_64/ia32.h with 100% similarity]
include/asm-x86/ia32_unistd.h [moved from include/asm-x86_64/ia32_unistd.h with 100% similarity]
include/asm-x86/ide.h [moved from include/asm-i386/ide.h with 100% similarity]
include/asm-x86/idle.h [moved from include/asm-x86_64/idle.h with 100% similarity]
include/asm-x86/intel_arch_perfmon.h [new file with mode: 0644]
include/asm-x86/intel_arch_perfmon_32.h [moved from include/asm-i386/intel_arch_perfmon.h with 100% similarity]
include/asm-x86/intel_arch_perfmon_64.h [moved from include/asm-x86_64/intel_arch_perfmon.h with 100% similarity]
include/asm-x86/io.h [new file with mode: 0644]
include/asm-x86/io_32.h [moved from include/asm-i386/io.h with 100% similarity]
include/asm-x86/io_64.h [moved from include/asm-x86_64/io.h with 100% similarity]
include/asm-x86/io_apic.h [new file with mode: 0644]
include/asm-x86/io_apic_32.h [moved from include/asm-i386/io_apic.h with 100% similarity]
include/asm-x86/io_apic_64.h [moved from include/asm-x86_64/io_apic.h with 100% similarity]
include/asm-x86/ioctl.h [moved from include/asm-i386/ioctl.h with 100% similarity]
include/asm-x86/ioctls.h [new file with mode: 0644]
include/asm-x86/ioctls_32.h [moved from include/asm-i386/ioctls.h with 100% similarity]
include/asm-x86/ioctls_64.h [moved from include/asm-x86_64/ioctls.h with 100% similarity]
include/asm-x86/iommu.h [moved from include/asm-x86_64/iommu.h with 100% similarity]
include/asm-x86/ipc.h [moved from include/asm-i386/ipc.h with 100% similarity]
include/asm-x86/ipcbuf.h [new file with mode: 0644]
include/asm-x86/ipcbuf_32.h [moved from include/asm-i386/ipcbuf.h with 100% similarity]
include/asm-x86/ipcbuf_64.h [moved from include/asm-x86_64/ipcbuf.h with 100% similarity]
include/asm-x86/ipi.h [moved from include/asm-x86_64/ipi.h with 100% similarity]
include/asm-x86/irq.h [new file with mode: 0644]
include/asm-x86/irq_32.h [moved from include/asm-i386/irq.h with 100% similarity]
include/asm-x86/irq_64.h [moved from include/asm-x86_64/irq.h with 100% similarity]
include/asm-x86/irq_regs.h [new file with mode: 0644]
include/asm-x86/irq_regs_32.h [moved from include/asm-i386/irq_regs.h with 100% similarity]
include/asm-x86/irq_regs_64.h [moved from include/asm-x86_64/irq_regs.h with 100% similarity]
include/asm-x86/irqflags.h [new file with mode: 0644]
include/asm-x86/irqflags_32.h [moved from include/asm-i386/irqflags.h with 100% similarity]
include/asm-x86/irqflags_64.h [moved from include/asm-x86_64/irqflags.h with 100% similarity]
include/asm-x86/ist.h [moved from include/asm-i386/ist.h with 100% similarity]
include/asm-x86/k8.h [moved from include/asm-x86_64/k8.h with 100% similarity]
include/asm-x86/kdebug.h [new file with mode: 0644]
include/asm-x86/kdebug_32.h [moved from include/asm-i386/kdebug.h with 100% similarity]
include/asm-x86/kdebug_64.h [moved from include/asm-x86_64/kdebug.h with 100% similarity]
include/asm-x86/kexec.h [new file with mode: 0644]
include/asm-x86/kexec_32.h [moved from include/asm-i386/kexec.h with 100% similarity]
include/asm-x86/kexec_64.h [moved from include/asm-x86_64/kexec.h with 100% similarity]
include/asm-x86/kmap_types.h [new file with mode: 0644]
include/asm-x86/kmap_types_32.h [moved from include/asm-i386/kmap_types.h with 100% similarity]
include/asm-x86/kmap_types_64.h [moved from include/asm-x86_64/kmap_types.h with 100% similarity]
include/asm-x86/kprobes.h [new file with mode: 0644]
include/asm-x86/kprobes_32.h [moved from include/asm-i386/kprobes.h with 100% similarity]
include/asm-x86/kprobes_64.h [moved from include/asm-x86_64/kprobes.h with 100% similarity]
include/asm-x86/ldt.h [new file with mode: 0644]
include/asm-x86/ldt_32.h [moved from include/asm-i386/ldt.h with 100% similarity]
include/asm-x86/ldt_64.h [moved from include/asm-x86_64/ldt.h with 100% similarity]
include/asm-x86/linkage.h [new file with mode: 0644]
include/asm-x86/linkage_32.h [moved from include/asm-i386/linkage.h with 100% similarity]
include/asm-x86/linkage_64.h [moved from include/asm-x86_64/linkage.h with 100% similarity]
include/asm-x86/local.h [new file with mode: 0644]
include/asm-x86/local_32.h [moved from include/asm-i386/local.h with 100% similarity]
include/asm-x86/local_64.h [moved from include/asm-x86_64/local.h with 100% similarity]
include/asm-x86/mach-bigsmp/mach_apic.h [moved from include/asm-i386/mach-bigsmp/mach_apic.h with 100% similarity]
include/asm-x86/mach-bigsmp/mach_apicdef.h [moved from include/asm-i386/mach-bigsmp/mach_apicdef.h with 100% similarity]
include/asm-x86/mach-bigsmp/mach_ipi.h [moved from include/asm-i386/mach-bigsmp/mach_ipi.h with 100% similarity]
include/asm-x86/mach-bigsmp/mach_mpspec.h [moved from include/asm-i386/mach-bigsmp/mach_mpspec.h with 100% similarity]
include/asm-x86/mach-default/apm.h [moved from include/asm-i386/mach-default/apm.h with 100% similarity]
include/asm-x86/mach-default/bios_ebda.h [moved from include/asm-i386/mach-default/bios_ebda.h with 100% similarity]
include/asm-x86/mach-default/do_timer.h [moved from include/asm-i386/mach-default/do_timer.h with 100% similarity]
include/asm-x86/mach-default/entry_arch.h [moved from include/asm-i386/mach-default/entry_arch.h with 100% similarity]
include/asm-x86/mach-default/io_ports.h [moved from include/asm-i386/mach-default/io_ports.h with 100% similarity]
include/asm-x86/mach-default/irq_vectors.h [moved from include/asm-i386/mach-default/irq_vectors.h with 100% similarity]
include/asm-x86/mach-default/irq_vectors_limits.h [moved from include/asm-i386/mach-default/irq_vectors_limits.h with 100% similarity]
include/asm-x86/mach-default/mach_apic.h [moved from include/asm-i386/mach-default/mach_apic.h with 100% similarity]
include/asm-x86/mach-default/mach_apicdef.h [moved from include/asm-i386/mach-default/mach_apicdef.h with 100% similarity]
include/asm-x86/mach-default/mach_ipi.h [moved from include/asm-i386/mach-default/mach_ipi.h with 100% similarity]
include/asm-x86/mach-default/mach_mpparse.h [moved from include/asm-i386/mach-default/mach_mpparse.h with 100% similarity]
include/asm-x86/mach-default/mach_mpspec.h [moved from include/asm-i386/mach-default/mach_mpspec.h with 100% similarity]
include/asm-x86/mach-default/mach_reboot.h [moved from include/asm-i386/mach-default/mach_reboot.h with 100% similarity]
include/asm-x86/mach-default/mach_time.h [moved from include/asm-i386/mach-default/mach_time.h with 100% similarity]
include/asm-x86/mach-default/mach_timer.h [moved from include/asm-i386/mach-default/mach_timer.h with 100% similarity]
include/asm-x86/mach-default/mach_traps.h [moved from include/asm-i386/mach-default/mach_traps.h with 100% similarity]
include/asm-x86/mach-default/mach_wakecpu.h [moved from include/asm-i386/mach-default/mach_wakecpu.h with 100% similarity]
include/asm-x86/mach-default/pci-functions.h [moved from include/asm-i386/mach-default/pci-functions.h with 100% similarity]
include/asm-x86/mach-default/setup_arch.h [moved from include/asm-i386/mach-default/setup_arch.h with 100% similarity]
include/asm-x86/mach-default/smpboot_hooks.h [moved from include/asm-i386/mach-default/smpboot_hooks.h with 100% similarity]
include/asm-x86/mach-es7000/mach_apic.h [moved from include/asm-i386/mach-es7000/mach_apic.h with 100% similarity]
include/asm-x86/mach-es7000/mach_apicdef.h [moved from include/asm-i386/mach-es7000/mach_apicdef.h with 100% similarity]
include/asm-x86/mach-es7000/mach_ipi.h [moved from include/asm-i386/mach-es7000/mach_ipi.h with 100% similarity]
include/asm-x86/mach-es7000/mach_mpparse.h [moved from include/asm-i386/mach-es7000/mach_mpparse.h with 100% similarity]
include/asm-x86/mach-es7000/mach_mpspec.h [moved from include/asm-i386/mach-es7000/mach_mpspec.h with 100% similarity]
include/asm-x86/mach-es7000/mach_wakecpu.h [moved from include/asm-i386/mach-es7000/mach_wakecpu.h with 100% similarity]
include/asm-x86/mach-generic/irq_vectors_limits.h [moved from include/asm-i386/mach-generic/irq_vectors_limits.h with 100% similarity]
include/asm-x86/mach-generic/mach_apic.h [moved from include/asm-i386/mach-generic/mach_apic.h with 100% similarity]
include/asm-x86/mach-generic/mach_apicdef.h [moved from include/asm-i386/mach-generic/mach_apicdef.h with 100% similarity]
include/asm-x86/mach-generic/mach_ipi.h [moved from include/asm-i386/mach-generic/mach_ipi.h with 100% similarity]
include/asm-x86/mach-generic/mach_mpparse.h [moved from include/asm-i386/mach-generic/mach_mpparse.h with 100% similarity]
include/asm-x86/mach-generic/mach_mpspec.h [moved from include/asm-i386/mach-generic/mach_mpspec.h with 100% similarity]
include/asm-x86/mach-numaq/mach_apic.h [moved from include/asm-i386/mach-numaq/mach_apic.h with 100% similarity]
include/asm-x86/mach-numaq/mach_apicdef.h [moved from include/asm-i386/mach-numaq/mach_apicdef.h with 100% similarity]
include/asm-x86/mach-numaq/mach_ipi.h [moved from include/asm-i386/mach-numaq/mach_ipi.h with 100% similarity]
include/asm-x86/mach-numaq/mach_mpparse.h [moved from include/asm-i386/mach-numaq/mach_mpparse.h with 100% similarity]
include/asm-x86/mach-numaq/mach_mpspec.h [moved from include/asm-i386/mach-numaq/mach_mpspec.h with 100% similarity]
include/asm-x86/mach-numaq/mach_wakecpu.h [moved from include/asm-i386/mach-numaq/mach_wakecpu.h with 100% similarity]
include/asm-x86/mach-summit/irq_vectors_limits.h [moved from include/asm-i386/mach-summit/irq_vectors_limits.h with 100% similarity]
include/asm-x86/mach-summit/mach_apic.h [moved from include/asm-i386/mach-summit/mach_apic.h with 100% similarity]
include/asm-x86/mach-summit/mach_apicdef.h [moved from include/asm-i386/mach-summit/mach_apicdef.h with 100% similarity]
include/asm-x86/mach-summit/mach_ipi.h [moved from include/asm-i386/mach-summit/mach_ipi.h with 100% similarity]
include/asm-x86/mach-summit/mach_mpparse.h [moved from include/asm-i386/mach-summit/mach_mpparse.h with 100% similarity]
include/asm-x86/mach-summit/mach_mpspec.h [moved from include/asm-i386/mach-summit/mach_mpspec.h with 100% similarity]
include/asm-x86/mach-visws/cobalt.h [moved from include/asm-i386/mach-visws/cobalt.h with 100% similarity]
include/asm-x86/mach-visws/entry_arch.h [moved from include/asm-i386/mach-visws/entry_arch.h with 100% similarity]
include/asm-x86/mach-visws/irq_vectors.h [moved from include/asm-i386/mach-visws/irq_vectors.h with 100% similarity]
include/asm-x86/mach-visws/lithium.h [moved from include/asm-i386/mach-visws/lithium.h with 100% similarity]
include/asm-x86/mach-visws/mach_apic.h [moved from include/asm-i386/mach-visws/mach_apic.h with 100% similarity]
include/asm-x86/mach-visws/mach_apicdef.h [moved from include/asm-i386/mach-visws/mach_apicdef.h with 100% similarity]
include/asm-x86/mach-visws/piix4.h [moved from include/asm-i386/mach-visws/piix4.h with 100% similarity]
include/asm-x86/mach-visws/setup_arch.h [moved from include/asm-i386/mach-visws/setup_arch.h with 100% similarity]
include/asm-x86/mach-visws/smpboot_hooks.h [moved from include/asm-i386/mach-visws/smpboot_hooks.h with 100% similarity]
include/asm-x86/mach-voyager/do_timer.h [moved from include/asm-i386/mach-voyager/do_timer.h with 100% similarity]
include/asm-x86/mach-voyager/entry_arch.h [moved from include/asm-i386/mach-voyager/entry_arch.h with 100% similarity]
include/asm-x86/mach-voyager/irq_vectors.h [moved from include/asm-i386/mach-voyager/irq_vectors.h with 100% similarity]
include/asm-x86/mach-voyager/setup_arch.h [moved from include/asm-i386/mach-voyager/setup_arch.h with 100% similarity]
include/asm-x86/mach_apic.h [moved from include/asm-x86_64/mach_apic.h with 100% similarity]
include/asm-x86/math_emu.h [moved from include/asm-i386/math_emu.h with 100% similarity]
include/asm-x86/mc146818rtc.h [new file with mode: 0644]
include/asm-x86/mc146818rtc_32.h [moved from include/asm-i386/mc146818rtc.h with 100% similarity]
include/asm-x86/mc146818rtc_64.h [moved from include/asm-x86_64/mc146818rtc.h with 100% similarity]
include/asm-x86/mca.h [moved from include/asm-i386/mca.h with 100% similarity]
include/asm-x86/mca_dma.h [moved from include/asm-i386/mca_dma.h with 100% similarity]
include/asm-x86/mce.h [new file with mode: 0644]
include/asm-x86/mce_32.h [moved from include/asm-i386/mce.h with 100% similarity]
include/asm-x86/mce_64.h [moved from include/asm-x86_64/mce.h with 100% similarity]
include/asm-x86/mman.h [new file with mode: 0644]
include/asm-x86/mman_32.h [moved from include/asm-i386/mman.h with 100% similarity]
include/asm-x86/mman_64.h [moved from include/asm-x86_64/mman.h with 100% similarity]
include/asm-x86/mmsegment.h [moved from include/asm-x86_64/mmsegment.h with 100% similarity]
include/asm-x86/mmu.h [new file with mode: 0644]
include/asm-x86/mmu_32.h [moved from include/asm-i386/mmu.h with 100% similarity]
include/asm-x86/mmu_64.h [moved from include/asm-x86_64/mmu.h with 100% similarity]
include/asm-x86/mmu_context.h [new file with mode: 0644]
include/asm-x86/mmu_context_32.h [moved from include/asm-i386/mmu_context.h with 100% similarity]
include/asm-x86/mmu_context_64.h [moved from include/asm-x86_64/mmu_context.h with 100% similarity]
include/asm-x86/mmx.h [moved from include/asm-i386/mmx.h with 100% similarity]
include/asm-x86/mmzone.h [new file with mode: 0644]
include/asm-x86/mmzone_32.h [moved from include/asm-i386/mmzone.h with 100% similarity]
include/asm-x86/mmzone_64.h [moved from include/asm-x86_64/mmzone.h with 100% similarity]
include/asm-x86/module.h [new file with mode: 0644]
include/asm-x86/module_32.h [moved from include/asm-i386/module.h with 100% similarity]
include/asm-x86/module_64.h [moved from include/asm-x86_64/module.h with 100% similarity]
include/asm-x86/mpspec.h [new file with mode: 0644]
include/asm-x86/mpspec_32.h [moved from include/asm-i386/mpspec.h with 100% similarity]
include/asm-x86/mpspec_64.h [moved from include/asm-x86_64/mpspec.h with 100% similarity]
include/asm-x86/mpspec_def.h [moved from include/asm-i386/mpspec_def.h with 100% similarity]
include/asm-x86/msgbuf.h [new file with mode: 0644]
include/asm-x86/msgbuf_32.h [moved from include/asm-i386/msgbuf.h with 100% similarity]
include/asm-x86/msgbuf_64.h [moved from include/asm-x86_64/msgbuf.h with 100% similarity]
include/asm-x86/msidef.h [moved from include/asm-i386/msidef.h with 100% similarity]
include/asm-x86/msr-index.h [moved from include/asm-i386/msr-index.h with 100% similarity]
include/asm-x86/msr.h [new file with mode: 0644]
include/asm-x86/msr_32.h [moved from include/asm-i386/msr.h with 100% similarity]
include/asm-x86/msr_64.h [moved from include/asm-x86_64/msr.h with 100% similarity]
include/asm-x86/mtrr.h [new file with mode: 0644]
include/asm-x86/mtrr_32.h [moved from include/asm-i386/mtrr.h with 100% similarity]
include/asm-x86/mtrr_64.h [moved from include/asm-x86_64/mtrr.h with 100% similarity]
include/asm-x86/mutex.h [new file with mode: 0644]
include/asm-x86/mutex_32.h [moved from include/asm-i386/mutex.h with 100% similarity]
include/asm-x86/mutex_64.h [moved from include/asm-x86_64/mutex.h with 100% similarity]
include/asm-x86/namei.h [new file with mode: 0644]
include/asm-x86/namei_32.h [moved from include/asm-i386/namei.h with 100% similarity]
include/asm-x86/namei_64.h [moved from include/asm-x86_64/namei.h with 100% similarity]
include/asm-x86/nmi.h [new file with mode: 0644]
include/asm-x86/nmi_32.h [moved from include/asm-i386/nmi.h with 100% similarity]
include/asm-x86/nmi_64.h [moved from include/asm-x86_64/nmi.h with 100% similarity]
include/asm-x86/numa.h [new file with mode: 0644]
include/asm-x86/numa_32.h [moved from include/asm-i386/numa.h with 100% similarity]
include/asm-x86/numa_64.h [moved from include/asm-x86_64/numa.h with 100% similarity]
include/asm-x86/numaq.h [moved from include/asm-i386/numaq.h with 100% similarity]
include/asm-x86/page.h [new file with mode: 0644]
include/asm-x86/page_32.h [moved from include/asm-i386/page.h with 100% similarity]
include/asm-x86/page_64.h [moved from include/asm-x86_64/page.h with 100% similarity]
include/asm-x86/param.h [new file with mode: 0644]
include/asm-x86/param_32.h [moved from include/asm-i386/param.h with 100% similarity]
include/asm-x86/param_64.h [moved from include/asm-x86_64/param.h with 100% similarity]
include/asm-x86/paravirt.h [moved from include/asm-i386/paravirt.h with 100% similarity]
include/asm-x86/parport.h [new file with mode: 0644]
include/asm-x86/parport_32.h [moved from include/asm-i386/parport.h with 100% similarity]
include/asm-x86/parport_64.h [moved from include/asm-x86_64/parport.h with 100% similarity]
include/asm-x86/pci-direct.h [moved from include/asm-x86_64/pci-direct.h with 100% similarity]
include/asm-x86/pci.h [new file with mode: 0644]
include/asm-x86/pci_32.h [moved from include/asm-i386/pci.h with 100% similarity]
include/asm-x86/pci_64.h [moved from include/asm-x86_64/pci.h with 100% similarity]
include/asm-x86/pda.h [moved from include/asm-x86_64/pda.h with 100% similarity]
include/asm-x86/percpu.h [new file with mode: 0644]
include/asm-x86/percpu_32.h [moved from include/asm-i386/percpu.h with 100% similarity]
include/asm-x86/percpu_64.h [moved from include/asm-x86_64/percpu.h with 100% similarity]
include/asm-x86/pgalloc.h [new file with mode: 0644]
include/asm-x86/pgalloc_32.h [moved from include/asm-i386/pgalloc.h with 100% similarity]
include/asm-x86/pgalloc_64.h [moved from include/asm-x86_64/pgalloc.h with 100% similarity]
include/asm-x86/pgtable-2level-defs.h [moved from include/asm-i386/pgtable-2level-defs.h with 100% similarity]
include/asm-x86/pgtable-2level.h [moved from include/asm-i386/pgtable-2level.h with 100% similarity]
include/asm-x86/pgtable-3level-defs.h [moved from include/asm-i386/pgtable-3level-defs.h with 100% similarity]
include/asm-x86/pgtable-3level.h [moved from include/asm-i386/pgtable-3level.h with 100% similarity]
include/asm-x86/pgtable.h [new file with mode: 0644]
include/asm-x86/pgtable_32.h [moved from include/asm-i386/pgtable.h with 100% similarity]
include/asm-x86/pgtable_64.h [moved from include/asm-x86_64/pgtable.h with 100% similarity]
include/asm-x86/poll.h [moved from include/asm-i386/poll.h with 100% similarity]
include/asm-x86/posix_types.h [new file with mode: 0644]
include/asm-x86/posix_types_32.h [moved from include/asm-i386/posix_types.h with 100% similarity]
include/asm-x86/posix_types_64.h [moved from include/asm-x86_64/posix_types.h with 100% similarity]
include/asm-x86/prctl.h [moved from include/asm-x86_64/prctl.h with 100% similarity]
include/asm-x86/processor-cyrix.h [moved from include/asm-i386/processor-cyrix.h with 100% similarity]
include/asm-x86/processor-flags.h [moved from include/asm-i386/processor-flags.h with 100% similarity]
include/asm-x86/processor.h [new file with mode: 0644]
include/asm-x86/processor_32.h [moved from include/asm-i386/processor.h with 100% similarity]
include/asm-x86/processor_64.h [moved from include/asm-x86_64/processor.h with 99% similarity]
include/asm-x86/proto.h [moved from include/asm-x86_64/proto.h with 100% similarity]
include/asm-x86/ptrace-abi.h [new file with mode: 0644]
include/asm-x86/ptrace-abi_32.h [moved from include/asm-i386/ptrace-abi.h with 100% similarity]
include/asm-x86/ptrace-abi_64.h [moved from include/asm-x86_64/ptrace-abi.h with 100% similarity]
include/asm-x86/ptrace.h [new file with mode: 0644]
include/asm-x86/ptrace_32.h [moved from include/asm-i386/ptrace.h with 100% similarity]
include/asm-x86/ptrace_64.h [moved from include/asm-x86_64/ptrace.h with 100% similarity]
include/asm-x86/reboot.h [moved from include/asm-i386/reboot.h with 100% similarity]
include/asm-x86/reboot_fixups.h [moved from include/asm-i386/reboot_fixups.h with 100% similarity]
include/asm-x86/required-features.h [new file with mode: 0644]
include/asm-x86/required-features_32.h [moved from include/asm-i386/required-features.h with 100% similarity]
include/asm-x86/required-features_64.h [moved from include/asm-x86_64/required-features.h with 100% similarity]
include/asm-x86/resource.h [new file with mode: 0644]
include/asm-x86/resource_32.h [moved from include/asm-i386/resource.h with 100% similarity]
include/asm-x86/resource_64.h [moved from include/asm-x86_64/resource.h with 100% similarity]
include/asm-x86/resume-trace.h [new file with mode: 0644]
include/asm-x86/resume-trace_32.h [moved from include/asm-i386/resume-trace.h with 100% similarity]
include/asm-x86/resume-trace_64.h [moved from include/asm-x86_64/resume-trace.h with 100% similarity]
include/asm-x86/rio.h [moved from include/asm-x86_64/rio.h with 100% similarity]
include/asm-x86/rtc.h [new file with mode: 0644]
include/asm-x86/rtc_32.h [moved from include/asm-i386/rtc.h with 100% similarity]
include/asm-x86/rtc_64.h [moved from include/asm-x86_64/rtc.h with 100% similarity]
include/asm-x86/rwlock.h [new file with mode: 0644]
include/asm-x86/rwlock_32.h [moved from include/asm-i386/rwlock.h with 100% similarity]
include/asm-x86/rwlock_64.h [moved from include/asm-x86_64/rwlock.h with 100% similarity]
include/asm-x86/rwsem.h [moved from include/asm-i386/rwsem.h with 100% similarity]
include/asm-x86/scatterlist.h [new file with mode: 0644]
include/asm-x86/scatterlist_32.h [moved from include/asm-i386/scatterlist.h with 100% similarity]
include/asm-x86/scatterlist_64.h [moved from include/asm-x86_64/scatterlist.h with 100% similarity]
include/asm-x86/seccomp.h [new file with mode: 0644]
include/asm-x86/seccomp_32.h [moved from include/asm-i386/seccomp.h with 100% similarity]
include/asm-x86/seccomp_64.h [moved from include/asm-x86_64/seccomp.h with 100% similarity]
include/asm-x86/sections.h [new file with mode: 0644]
include/asm-x86/sections_32.h [moved from include/asm-i386/sections.h with 100% similarity]
include/asm-x86/sections_64.h [moved from include/asm-x86_64/sections.h with 100% similarity]
include/asm-x86/segment.h [new file with mode: 0644]
include/asm-x86/segment_32.h [moved from include/asm-i386/segment.h with 100% similarity]
include/asm-x86/segment_64.h [moved from include/asm-x86_64/segment.h with 100% similarity]
include/asm-x86/semaphore.h [new file with mode: 0644]
include/asm-x86/semaphore_32.h [moved from include/asm-i386/semaphore.h with 100% similarity]
include/asm-x86/semaphore_64.h [moved from include/asm-x86_64/semaphore.h with 100% similarity]
include/asm-x86/sembuf.h [new file with mode: 0644]
include/asm-x86/sembuf_32.h [moved from include/asm-i386/sembuf.h with 100% similarity]
include/asm-x86/sembuf_64.h [moved from include/asm-x86_64/sembuf.h with 100% similarity]
include/asm-x86/serial.h [new file with mode: 0644]
include/asm-x86/serial_32.h [moved from include/asm-i386/serial.h with 100% similarity]
include/asm-x86/serial_64.h [moved from include/asm-x86_64/serial.h with 100% similarity]
include/asm-x86/setup.h [new file with mode: 0644]
include/asm-x86/setup_32.h [moved from include/asm-i386/setup.h with 100% similarity]
include/asm-x86/setup_64.h [moved from include/asm-x86_64/setup.h with 100% similarity]
include/asm-x86/shmbuf.h [new file with mode: 0644]
include/asm-x86/shmbuf_32.h [moved from include/asm-i386/shmbuf.h with 100% similarity]
include/asm-x86/shmbuf_64.h [moved from include/asm-x86_64/shmbuf.h with 100% similarity]
include/asm-x86/shmparam.h [new file with mode: 0644]
include/asm-x86/shmparam_32.h [moved from include/asm-i386/shmparam.h with 100% similarity]
include/asm-x86/shmparam_64.h [moved from include/asm-x86_64/shmparam.h with 100% similarity]
include/asm-x86/sigcontext.h [new file with mode: 0644]
include/asm-x86/sigcontext32.h [moved from include/asm-x86_64/sigcontext32.h with 100% similarity]
include/asm-x86/sigcontext_32.h [moved from include/asm-i386/sigcontext.h with 100% similarity]
include/asm-x86/sigcontext_64.h [moved from include/asm-x86_64/sigcontext.h with 100% similarity]
include/asm-x86/siginfo.h [new file with mode: 0644]
include/asm-x86/siginfo_32.h [moved from include/asm-i386/siginfo.h with 100% similarity]
include/asm-x86/siginfo_64.h [moved from include/asm-x86_64/siginfo.h with 100% similarity]
include/asm-x86/signal.h [new file with mode: 0644]
include/asm-x86/signal_32.h [moved from include/asm-i386/signal.h with 100% similarity]
include/asm-x86/signal_64.h [moved from include/asm-x86_64/signal.h with 100% similarity]
include/asm-x86/smp.h [new file with mode: 0644]
include/asm-x86/smp_32.h [moved from include/asm-i386/smp.h with 100% similarity]
include/asm-x86/smp_64.h [moved from include/asm-x86_64/smp.h with 100% similarity]
include/asm-x86/socket.h [moved from include/asm-i386/socket.h with 100% similarity]
include/asm-x86/sockios.h [new file with mode: 0644]
include/asm-x86/sockios_32.h [moved from include/asm-i386/sockios.h with 100% similarity]
include/asm-x86/sockios_64.h [moved from include/asm-x86_64/sockios.h with 100% similarity]
include/asm-x86/sparsemem.h [new file with mode: 0644]
include/asm-x86/sparsemem_32.h [moved from include/asm-i386/sparsemem.h with 100% similarity]
include/asm-x86/sparsemem_64.h [moved from include/asm-x86_64/sparsemem.h with 100% similarity]
include/asm-x86/spinlock.h [new file with mode: 0644]
include/asm-x86/spinlock_32.h [moved from include/asm-i386/spinlock.h with 100% similarity]
include/asm-x86/spinlock_64.h [moved from include/asm-x86_64/spinlock.h with 100% similarity]
include/asm-x86/spinlock_types.h [moved from include/asm-i386/spinlock_types.h with 100% similarity]
include/asm-x86/srat.h [moved from include/asm-i386/srat.h with 100% similarity]
include/asm-x86/stacktrace.h [moved from include/asm-x86_64/stacktrace.h with 100% similarity]
include/asm-x86/stat.h [new file with mode: 0644]
include/asm-x86/stat_32.h [moved from include/asm-i386/stat.h with 100% similarity]
include/asm-x86/stat_64.h [moved from include/asm-x86_64/stat.h with 100% similarity]
include/asm-x86/statfs.h [new file with mode: 0644]
include/asm-x86/statfs_32.h [moved from include/asm-i386/statfs.h with 100% similarity]
include/asm-x86/statfs_64.h [moved from include/asm-x86_64/statfs.h with 100% similarity]
include/asm-x86/string.h [new file with mode: 0644]
include/asm-x86/string_32.h [moved from include/asm-i386/string.h with 100% similarity]
include/asm-x86/string_64.h [moved from include/asm-x86_64/string.h with 100% similarity]
include/asm-x86/suspend.h [new file with mode: 0644]
include/asm-x86/suspend_32.h [moved from include/asm-i386/suspend.h with 100% similarity]
include/asm-x86/suspend_64.h [moved from include/asm-x86_64/suspend.h with 100% similarity]
include/asm-x86/swiotlb.h [moved from include/asm-x86_64/swiotlb.h with 100% similarity]
include/asm-x86/sync_bitops.h [moved from include/asm-i386/sync_bitops.h with 100% similarity]
include/asm-x86/system.h [new file with mode: 0644]
include/asm-x86/system_32.h [moved from include/asm-i386/system.h with 98% similarity]
include/asm-x86/system_64.h [moved from include/asm-x86_64/system.h with 100% similarity]
include/asm-x86/tce.h [moved from include/asm-x86_64/tce.h with 100% similarity]
include/asm-x86/termbits.h [new file with mode: 0644]
include/asm-x86/termbits_32.h [moved from include/asm-i386/termbits.h with 100% similarity]
include/asm-x86/termbits_64.h [moved from include/asm-x86_64/termbits.h with 100% similarity]
include/asm-x86/termios.h [new file with mode: 0644]
include/asm-x86/termios_32.h [moved from include/asm-i386/termios.h with 99% similarity]
include/asm-x86/termios_64.h [moved from include/asm-x86_64/termios.h with 100% similarity]
include/asm-x86/therm_throt.h [moved from include/asm-i386/therm_throt.h with 100% similarity]
include/asm-x86/thread_info.h [new file with mode: 0644]
include/asm-x86/thread_info_32.h [moved from include/asm-i386/thread_info.h with 100% similarity]
include/asm-x86/thread_info_64.h [moved from include/asm-x86_64/thread_info.h with 100% similarity]
include/asm-x86/time.h [moved from include/asm-i386/time.h with 100% similarity]
include/asm-x86/timer.h [moved from include/asm-i386/timer.h with 100% similarity]
include/asm-x86/timex.h [new file with mode: 0644]
include/asm-x86/timex_32.h [moved from include/asm-i386/timex.h with 100% similarity]
include/asm-x86/timex_64.h [moved from include/asm-x86_64/timex.h with 100% similarity]
include/asm-x86/tlb.h [new file with mode: 0644]
include/asm-x86/tlb_32.h [moved from include/asm-i386/tlb.h with 100% similarity]
include/asm-x86/tlb_64.h [moved from include/asm-x86_64/tlb.h with 100% similarity]
include/asm-x86/tlbflush.h [new file with mode: 0644]
include/asm-x86/tlbflush_32.h [moved from include/asm-i386/tlbflush.h with 100% similarity]
include/asm-x86/tlbflush_64.h [moved from include/asm-x86_64/tlbflush.h with 100% similarity]
include/asm-x86/topology.h [new file with mode: 0644]
include/asm-x86/topology_32.h [moved from include/asm-i386/topology.h with 100% similarity]
include/asm-x86/topology_64.h [moved from include/asm-x86_64/topology.h with 100% similarity]
include/asm-x86/tsc.h [moved from include/asm-i386/tsc.h with 100% similarity]
include/asm-x86/types.h [new file with mode: 0644]
include/asm-x86/types_32.h [moved from include/asm-i386/types.h with 100% similarity]
include/asm-x86/types_64.h [moved from include/asm-x86_64/types.h with 100% similarity]
include/asm-x86/uaccess.h [new file with mode: 0644]
include/asm-x86/uaccess_32.h [moved from include/asm-i386/uaccess.h with 100% similarity]
include/asm-x86/uaccess_64.h [moved from include/asm-x86_64/uaccess.h with 100% similarity]
include/asm-x86/ucontext.h [new file with mode: 0644]
include/asm-x86/ucontext_32.h [moved from include/asm-i386/ucontext.h with 100% similarity]
include/asm-x86/ucontext_64.h [moved from include/asm-x86_64/ucontext.h with 100% similarity]
include/asm-x86/unaligned.h [new file with mode: 0644]
include/asm-x86/unaligned_32.h [moved from include/asm-i386/unaligned.h with 100% similarity]
include/asm-x86/unaligned_64.h [moved from include/asm-x86_64/unaligned.h with 100% similarity]
include/asm-x86/unistd.h [new file with mode: 0644]
include/asm-x86/unistd_32.h [moved from include/asm-i386/unistd.h with 100% similarity]
include/asm-x86/unistd_64.h [moved from include/asm-x86_64/unistd.h with 100% similarity]
include/asm-x86/unwind.h [new file with mode: 0644]
include/asm-x86/unwind_32.h [moved from include/asm-i386/unwind.h with 100% similarity]
include/asm-x86/unwind_64.h [moved from include/asm-x86_64/unwind.h with 100% similarity]
include/asm-x86/user.h [new file with mode: 0644]
include/asm-x86/user32.h [moved from include/asm-x86_64/user32.h with 100% similarity]
include/asm-x86/user_32.h [moved from include/asm-i386/user.h with 100% similarity]
include/asm-x86/user_64.h [moved from include/asm-x86_64/user.h with 100% similarity]
include/asm-x86/vga.h [moved from include/asm-i386/vga.h with 100% similarity]
include/asm-x86/vgtod.h [moved from include/asm-x86_64/vgtod.h with 100% similarity]
include/asm-x86/vic.h [moved from include/asm-i386/vic.h with 100% similarity]
include/asm-x86/vm86.h [moved from include/asm-i386/vm86.h with 100% similarity]
include/asm-x86/vmi.h [moved from include/asm-i386/vmi.h with 100% similarity]
include/asm-x86/vmi_time.h [moved from include/asm-i386/vmi_time.h with 100% similarity]
include/asm-x86/voyager.h [moved from include/asm-i386/voyager.h with 100% similarity]
include/asm-x86/vsyscall.h [moved from include/asm-x86_64/vsyscall.h with 100% similarity]
include/asm-x86/vsyscall32.h [moved from include/asm-x86_64/vsyscall32.h with 100% similarity]
include/asm-x86/xen/hypercall.h [moved from include/asm-i386/xen/hypercall.h with 100% similarity]
include/asm-x86/xen/hypervisor.h [moved from include/asm-i386/xen/hypervisor.h with 100% similarity]
include/asm-x86/xen/interface.h [moved from include/asm-i386/xen/interface.h with 100% similarity]
include/asm-x86/xor.h [new file with mode: 0644]
include/asm-x86/xor_32.h [moved from include/asm-i386/xor.h with 100% similarity]
include/asm-x86/xor_64.h [moved from include/asm-x86_64/xor.h with 100% similarity]
include/asm-x86_64/Kbuild [deleted file]
include/asm-x86_64/boot.h [deleted file]
include/asm-x86_64/bootparam.h [deleted file]
include/asm-x86_64/cpu.h [deleted file]
include/asm-x86_64/emergency-restart.h [deleted file]
include/asm-x86_64/fcntl.h [deleted file]
include/asm-x86_64/hypertransport.h [deleted file]
include/asm-x86_64/ide.h [deleted file]
include/asm-x86_64/ioctl.h [deleted file]
include/asm-x86_64/ist.h [deleted file]
include/asm-x86_64/msidef.h [deleted file]
include/asm-x86_64/msr-index.h [deleted file]
include/asm-x86_64/node.h [deleted file]
include/asm-x86_64/poll.h [deleted file]
include/asm-x86_64/processor-flags.h [deleted file]
include/asm-x86_64/socket.h [deleted file]
include/asm-x86_64/spinlock_types.h [deleted file]
include/asm-x86_64/therm_throt.h [deleted file]
include/asm-x86_64/tsc.h [deleted file]
include/asm-x86_64/vga.h [deleted file]
include/linux/cpufreq.h
include/linux/sched.h
include/linux/writeback.h
include/net/rose.h
include/net/sctp/sm.h
include/net/sctp/structs.h
include/net/tcp.h
kernel/futex.c
kernel/futex_compat.c
kernel/power/Kconfig
kernel/sched_fair.c
kernel/signal.c
kernel/sys.c
kernel/time/timer_stats.c
lib/Kconfig.debug
lib/Makefile
mm/Kconfig
mm/filemap.c
mm/fremap.c
mm/hugetlb.c
mm/memory.c
mm/page-writeback.c
net/ieee80211/ieee80211_rx.c
net/ieee80211/softmac/ieee80211softmac_assoc.c
net/ieee80211/softmac/ieee80211softmac_wx.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv6/ndisc.c
net/ipv6/tcp_ipv6.c
net/mac80211/ieee80211.c
net/mac80211/rc80211_simple.c
net/mac80211/wme.c
net/rose/rose_loopback.c
net/rose/rose_route.c
net/sched/cls_u32.c
net/sched/sch_sfq.c
net/sctp/bind_addr.c
net/sctp/input.c
net/sctp/inqueue.c
net/sctp/sm_make_chunk.c
net/sctp/sm_statefuns.c
net/sctp/sm_statetable.c
net/socket.c
net/wireless/core.c
net/wireless/sysfs.c
scripts/checksyscalls.sh
scripts/namespace.pl
sound/core/memalloc.c

diff --git a/Documentation/crypto/async-tx-api.txt b/Documentation/crypto/async-tx-api.txt
new file mode 100644 (file)
index 0000000..c1e9545
--- /dev/null
@@ -0,0 +1,219 @@
+                Asynchronous Transfers/Transforms API
+
+1 INTRODUCTION
+
+2 GENEALOGY
+
+3 USAGE
+3.1 General format of the API
+3.2 Supported operations
+3.3 Descriptor management
+3.4 When does the operation execute?
+3.5 When does the operation complete?
+3.6 Constraints
+3.7 Example
+
+4 DRIVER DEVELOPER NOTES
+4.1 Conformance points
+4.2 "My application needs finer control of hardware channels"
+
+5 SOURCE
+
+---
+
+1 INTRODUCTION
+
+The async_tx API provides methods for describing a chain of asynchronous
+bulk memory transfers/transforms with support for inter-transactional
+dependencies.  It is implemented as a dmaengine client that smooths over
+the details of different hardware offload engine implementations.  Code
+that is written to the API can optimize for asynchronous operation and
+the API will fit the chain of operations to the available offload
+resources.
+
+2 GENEALOGY
+
+The API was initially designed to offload the memory copy and
+xor-parity-calculations of the md-raid5 driver using the offload engines
+present in the Intel(R) Xscale series of I/O processors.  It also built
+on the 'dmaengine' layer developed for offloading memory copies in the
+network stack using Intel(R) I/OAT engines.  The following design
+features surfaced as a result:
+1/ implicit synchronous path: users of the API do not need to know if
+   the platform they are running on has offload capabilities.  The
+   operation will be offloaded when an engine is available and carried out
+   in software otherwise.
+2/ cross channel dependency chains: the API allows a chain of dependent
+   operations to be submitted, like xor->copy->xor in the raid5 case.  The
+   API automatically handles cases where the transition from one operation
+   to another implies a hardware channel switch.
+3/ dmaengine extensions to support multiple clients and operation types
+   beyond 'memcpy'
+
+3 USAGE
+
+3.1 General format of the API:
+struct dma_async_tx_descriptor *
+async_<operation>(<op specific parameters>,
+                 enum async_tx_flags flags,
+                 struct dma_async_tx_descriptor *dependency,
+                 dma_async_tx_callback callback_routine,
+                 void *callback_parameter);
+
+3.2 Supported operations:
+memcpy       - memory copy between a source and a destination buffer
+memset       - fill a destination buffer with a byte value
+xor          - xor a series of source buffers and write the result to a
+              destination buffer
+xor_zero_sum - xor a series of source buffers and set a flag if the
+              result is zero.  The implementation attempts to prevent
+              writes to memory
+
+3.3 Descriptor management:
+The return value is non-NULL and points to a 'descriptor' when the operation
+has been queued to execute asynchronously.  Descriptors are recycled
+resources, under control of the offload engine driver, to be reused as
+operations complete.  When an application needs to submit a chain of
+operations it must guarantee that the descriptor is not automatically recycled
+before the dependency is submitted.  This requires that all descriptors be
+acknowledged by the application before the offload engine driver is allowed to
+recycle (or free) the descriptor.  A descriptor can be acked by one of the
+following methods:
+1/ setting the ASYNC_TX_ACK flag if no child operations are to be submitted
+2/ setting the ASYNC_TX_DEP_ACK flag to acknowledge the parent
+   descriptor of a new operation.
+3/ calling async_tx_ack() on the descriptor.
+
+3.4 When does the operation execute?
+Operations do not immediately issue after return from the
+async_<operation> call.  Offload engine drivers batch operations to
+improve performance by reducing the number of mmio cycles needed to
+manage the channel.  Once a driver-specific threshold is met the driver
+automatically issues pending operations.  An application can force this
+event by calling async_tx_issue_pending_all().  This operates on all
+channels since the application has no knowledge of channel to operation
+mapping.
+
+3.5 When does the operation complete?
+There are two methods for an application to learn about the completion
+of an operation.
+1/ Call dma_wait_for_async_tx().  This call causes the CPU to spin while
+   it polls for the completion of the operation.  It handles dependency
+   chains and issuing pending operations.
+2/ Specify a completion callback.  The callback routine runs in tasklet
+   context if the offload engine driver supports interrupts, or it is
+   called in application context if the operation is carried out
+   synchronously in software.  The callback can be set in the call to
+   async_<operation>, or when the application needs to submit a chain of
+   unknown length it can use the async_trigger_callback() routine to set a
+   completion interrupt/callback at the end of the chain.
+
+3.6 Constraints:
+1/ Calls to async_<operation> are not permitted in IRQ context.  Other
+   contexts are permitted provided constraint #2 is not violated.
+2/ Completion callback routines cannot submit new operations.  This
+   results in recursion in the synchronous case and spin_locks being
+   acquired twice in the asynchronous case.
+
+3.7 Example:
+Perform a xor->copy->xor operation where each operation depends on the
+result from the previous operation:
+
+void complete_xor_copy_xor(void *param)
+{
+       printk("complete\n");
+}
+
+int run_xor_copy_xor(struct page **xor_srcs,
+                    int xor_src_cnt,
+                    struct page *xor_dest,
+                    size_t xor_len,
+                    struct page *copy_src,
+                    struct page *copy_dest,
+                    size_t copy_len)
+{
+       struct dma_async_tx_descriptor *tx;
+
+       tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
+                      ASYNC_TX_XOR_DROP_DST, NULL, NULL, NULL);
+       tx = async_memcpy(copy_dest, copy_src, 0, 0, copy_len,
+                         ASYNC_TX_DEP_ACK, tx, NULL, NULL);
+       tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
+                      ASYNC_TX_XOR_DROP_DST | ASYNC_TX_DEP_ACK | ASYNC_TX_ACK,
+                      tx, complete_xor_copy_xor, NULL);
+
+       async_tx_issue_pending_all();
+}
+
+See include/linux/async_tx.h for more information on the flags.  See the
+ops_run_* and ops_complete_* routines in drivers/md/raid5.c for more
+implementation examples.
+
+4 DRIVER DEVELOPMENT NOTES
+4.1 Conformance points:
+There are a few conformance points required in dmaengine drivers to
+accommodate assumptions made by applications using the async_tx API:
+1/ Completion callbacks are expected to happen in tasklet context
+2/ dma_async_tx_descriptor fields are never manipulated in IRQ context
+3/ Use async_tx_run_dependencies() in the descriptor clean up path to
+   handle submission of dependent operations
+
+4.2 "My application needs finer control of hardware channels"
+This requirement seems to arise from cases where a DMA engine driver is
+trying to support device-to-memory DMA.  The dmaengine and async_tx
+implementations were designed for offloading memory-to-memory
+operations; however, there are some capabilities of the dmaengine layer
+that can be used for platform-specific channel management.
+Platform-specific constraints can be handled by registering the
+application as a 'dma_client' and implementing a 'dma_event_callback' to
+apply a filter to the available channels in the system.  Before showing
+how to implement a custom dma_event callback some background of
+dmaengine's client support is required.
+
+The following routines in dmaengine support multiple clients requesting
+use of a channel:
+- dma_async_client_register(struct dma_client *client)
+- dma_async_client_chan_request(struct dma_client *client)
+
+dma_async_client_register takes a pointer to an initialized dma_client
+structure.  It expects that the 'event_callback' and 'cap_mask' fields
+are already initialized.
+
+dma_async_client_chan_request triggers dmaengine to notify the client of
+all channels that satisfy the capability mask.  It is up to the client's
+event_callback routine to track how many channels the client needs and
+how many it is currently using.  The dma_event_callback routine returns a
+dma_state_client code to let dmaengine know the status of the
+allocation.
+
+Below is the example of how to extend this functionality for
+platform-specific filtering of the available channels beyond the
+standard capability mask:
+
+static enum dma_state_client
+my_dma_client_callback(struct dma_client *client,
+                       struct dma_chan *chan, enum dma_state state)
+{
+       struct dma_device *dma_dev;
+       struct my_platform_specific_dma *plat_dma_dev;
+       
+       dma_dev = chan->device;
+       plat_dma_dev = container_of(dma_dev,
+                                   struct my_platform_specific_dma,
+                                   dma_dev);
+
+       if (!plat_dma_dev->platform_specific_capability)
+               return DMA_DUP;
+
+       . . .
+}
+
+5 SOURCE
+include/linux/dmaengine.h: core header file for DMA drivers and clients
+drivers/dma/dmaengine.c: offload engine channel management routines
+drivers/dma/: location for offload engine drivers
+include/linux/async_tx.h: core header file for the async_tx api
+crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code
+crypto/async_tx/async_memcpy.c: copy offload
+crypto/async_tx/async_memset.c: memory fill offload
+crypto/async_tx/async_xor.c: xor and xor zero sum offload
index 8de132a02ba952867020a846229b0818ee73d214..6c46730c631a6952fc34beb4302011463d754011 100644 (file)
@@ -94,6 +94,8 @@ Your cooperation is appreciated.
                  9 = /dev/urandom      Faster, less secure random number gen.
                 10 = /dev/aio          Asynchronous I/O notification interface
                 11 = /dev/kmsg         Writes to this come out as printk's
+                12 = /dev/oldmem       Used by crashdump kernels to access
+                                       the memory of the kernel that crashed.
 
   1 block      RAM disk
                  0 = /dev/ram0         First RAM disk
index 00928d2ecfb229506b574271efdcb59dd105f02a..675f75601ae632a694fe06a0e8658b5039bf586f 100644 (file)
@@ -306,3 +306,11 @@ Why:    In kernel tree version of driver is unmaintained. Sk98lin driver
 Who:    Stephen Hemminger <shemminger@linux-foundation.org>
 
 ---------------------------
+
+What:  i386/x86_64 bzImage symlinks
+When:  April 2008
+
+Why:   The i386/x86_64 merge provides a symlink to the old bzImage
+       location so not yet updated user space tools, e.g. package
+       scripts, do not break.
+Who:   Thomas Gleixner <tglx@linutronix.de>
index f7918401a0072c9b08bf81bb07434b66a96f6085..103e346c8b6adc0f2f584fe491c55a3cefa82756 100644 (file)
@@ -46,7 +46,7 @@ typedef uint32_t u32;
 typedef uint16_t u16;
 typedef uint8_t u8;
 #include "../../include/linux/lguest_launcher.h"
-#include "../../include/asm-i386/e820.h"
+#include "../../include/asm-x86/e820_32.h"
 /*:*/
 
 #define PAGE_PRESENT 0x7       /* Present, RW, Execute */
@@ -882,7 +882,7 @@ static u32 handle_block_output(int fd, const struct iovec *iov,
                 * of the block file (possibly extending it). */
                if (off + len > device_len) {
                        /* Trim it back to the correct length */
-                       ftruncate(dev->fd, device_len);
+                       ftruncate64(dev->fd, device_len);
                        /* Die, bad Guest, die. */
                        errx(1, "Write past end %llu+%u", off, len);
                }
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
new file mode 100644 (file)
index 0000000..4ba4664
--- /dev/null
@@ -0,0 +1,120 @@
+
+LOCK STATISTICS
+
+- WHAT
+
+As the name suggests, it provides statistics on locks.
+
+- WHY
+
+Because things like lock contention can severely impact performance.
+
+- HOW
+
+Lockdep already has hooks in the lock functions and maps lock instances to
+lock classes. We build on that. The graph below shows the relation between
+the lock functions and the various hooks therein.
+
+        __acquire
+            |
+           lock _____
+            |        \
+            |    __contended
+            |         |
+            |       <wait>
+            | _______/
+            |/
+            |
+       __acquired
+            |
+            .
+          <hold>
+            .
+            |
+       __release
+            |
+         unlock
+
+lock, unlock   - the regular lock functions
+__*            - the hooks
+<>             - states
+
+With these hooks we provide the following statistics:
+
+ con-bounces       - number of lock contention that involved x-cpu data
+ contentions       - number of lock acquisitions that had to wait
+ wait time min     - shortest (non-0) time we ever had to wait for a lock
+           max     - longest time we ever had to wait for a lock
+           total   - total time we spend waiting on this lock
+ acq-bounces       - number of lock acquisitions that involved x-cpu data
+ acquisitions      - number of times we took the lock
+ hold time min     - shortest (non-0) time we ever held the lock
+           max     - longest time we ever held the lock
+           total   - total time this lock was held
+
+From these number various other statistics can be derived, such as:
+
+ hold time average = hold time total / acquisitions
+
+These numbers are gathered per lock class, per read/write state (when
+applicable).
+
+It also tracks 4 contention points per class. A contention point is a call site
+that had to wait on lock acquisition.
+
+ - USAGE
+
+Look at the current lock statistics:
+
+( line numbers not part of actual output, done for clarity in the explanation
+  below )
+
+# less /proc/lock_stat
+
+01 lock_stat version 0.2
+02 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+03                               class name    con-bounces    contentions   waittime-min   waittime-max waittime-total    acq-bounces   acquisitions   holdtime-min   holdtime-max holdtime-total
+04 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+05
+06               &inode->i_data.tree_lock-W:            15          21657           0.18     1093295.30 11547131054.85             58          10415           0.16          87.51        6387.60
+07               &inode->i_data.tree_lock-R:             0              0           0.00           0.00           0.00          23302         231198           0.25           8.45       98023.38
+08               --------------------------
+09                 &inode->i_data.tree_lock              0          [<ffffffff8027c08f>] add_to_page_cache+0x5f/0x190
+10
+11 ...............................................................................................................................................................................................
+12
+13                              dcache_lock:          1037           1161           0.38          45.32         774.51           6611         243371           0.15         306.48       77387.24
+14                              -----------
+15                              dcache_lock            180          [<ffffffff802c0d7e>] sys_getcwd+0x11e/0x230
+16                              dcache_lock            165          [<ffffffff802c002a>] d_alloc+0x15a/0x210
+17                              dcache_lock             33          [<ffffffff8035818d>] _atomic_dec_and_lock+0x4d/0x70
+18                              dcache_lock              1          [<ffffffff802beef8>] shrink_dcache_parent+0x18/0x130
+
+This excerpt shows the first two lock class statistics. Line 01 shows the
+output version - each time the format changes this will be updated. Line 02-04
+show the header with column descriptions. Lines 05-10 and 13-18 show the actual
+statistics. These statistics come in two parts; the actual stats separated by a
+short separator (line 08, 14) from the contention points.
+
+The first lock (05-10) is a read/write lock, and shows two lines above the
+short separator. The contention points don't match the column descriptors,
+they have two: contentions and [<IP>] symbol.
+
+
+View the top contending locks:
+
+# grep : /proc/lock_stat | head
+              &inode->i_data.tree_lock-W:            15          21657           0.18     1093295.30 11547131054.85             58          10415           0.16          87.51        6387.60
+              &inode->i_data.tree_lock-R:             0              0           0.00           0.00           0.00          23302         231198           0.25           8.45       98023.38
+                             dcache_lock:          1037           1161           0.38          45.32         774.51           6611         243371           0.15         306.48       77387.24
+                         &inode->i_mutex:           161            286 18446744073709       62882.54     1244614.55           3653          20598 18446744073709       62318.60     1693822.74
+                         &zone->lru_lock:            94             94           0.53           7.33          92.10           4366          32690           0.29          59.81       16350.06
+              &inode->i_data.i_mmap_lock:            79             79           0.40           3.77          53.03          11779          87755           0.28         116.93       29898.44
+                        &q->__queue_lock:            48             50           0.52          31.62          86.31            774          13131           0.17         113.08       12277.52
+                        &rq->rq_lock_key:            43             47           0.74          68.50         170.63           3706          33929           0.22         107.99       17460.62
+                      &rq->rq_lock_key#2:            39             46           0.75           6.68          49.03           2979          32292           0.17         125.17       17137.63
+                         tasklist_lock-W:            15             15           1.45          10.87          32.70           1201           7390           0.58          62.55       13648.47
+
+Clear the statistics:
+
+# echo 0 > /proc/lock_stat
index ef19142896ca0688ca82b62a82a51fd13b7e7700..10c8f6922ef40d7a0a49b85ae6367be1a0edfd91 100644 (file)
@@ -43,7 +43,7 @@ On x86   - You press the key combo 'ALT-SysRq-<command key>'. Note - Some
            keyboards may not have a key labeled 'SysRq'. The 'SysRq' key is
            also known as the 'Print Screen' key. Also some keyboards cannot
           handle so many keys being pressed at the same time, so you might
-          have better luck with "press Alt", "press SysRq", "release Alt",
+          have better luck with "press Alt", "press SysRq", "release SysRq",
           "press <command key>", release everything.
 
 On SPARC - You press 'ALT-STOP-<command key>', I believe.
diff --git a/Kbuild b/Kbuild
index 56b8edf6a3bc11461fe5512d2663c42e1f43a5d3..1570d248ad9237e4fa6e4d079336b9da62d9ba32 100644 (file)
--- a/Kbuild
+++ b/Kbuild
@@ -8,11 +8,11 @@
 # 1) Generate asm-offsets.h
 #
 
-offsets-file := include/asm-$(ARCH)/asm-offsets.h
+offsets-file := include/asm-$(SRCARCH)/asm-offsets.h
 
 always  := $(offsets-file)
 targets := $(offsets-file)
-targets += arch/$(ARCH)/kernel/asm-offsets.s
+targets += arch/$(SRCARCH)/kernel/asm-offsets.s
 clean-files := $(addprefix $(objtree)/,$(targets))
 
 # Default sed regexp - multiline due to syntax constraints
@@ -40,11 +40,11 @@ define cmd_offsets
 endef
 
 # We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
+arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c FORCE
        $(Q)mkdir -p $(dir $@)
        $(call if_changed_dep,cc_s_c)
 
-$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
+$(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s Kbuild
        $(Q)mkdir -p $(dir $@)
        $(call cmd,offsets)
 
index c265e41ec55a48b9966a5d65845b930b3185dcd0..1274084c9090aa92b529c0895a17b10d3313dcca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 23
-EXTRAVERSION =-rc7
+EXTRAVERSION =
 NAME = Arr Matey! A Hairy Bilge Rat!
 
 # *DOCUMENTATION*
@@ -186,7 +186,8 @@ ARCH                ?= $(SUBARCH)
 CROSS_COMPILE  ?=
 
 # Architecture as present in compile.h
-UTS_MACHINE := $(ARCH)
+UTS_MACHINE    := $(ARCH)
+SRCARCH        := $(ARCH)
 
 KCONFIG_CONFIG ?= .config
 
@@ -322,7 +323,7 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
 KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
 export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
-export ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
+export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
 export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
 export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
 
@@ -609,7 +610,7 @@ libs-y              := $(libs-y1) $(libs-y2)
 vmlinux-init := $(head-y) $(init-y)
 vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)
 vmlinux-all  := $(vmlinux-init) $(vmlinux-main)
-vmlinux-lds  := arch/$(ARCH)/kernel/vmlinux.lds
+vmlinux-lds  := arch/$(SRCARCH)/kernel/vmlinux.lds
 export KBUILD_VMLINUX_OBJS := $(vmlinux-all)
 
 # Rule to link vmlinux - also used during CONFIG_KALLSYMS
@@ -862,7 +863,7 @@ ifneq ($(KBUILD_SRC),)
                /bin/false; \
        fi;
        $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
-       $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm
+       $(Q)ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm
 endif
 
 # prepare2 creates a makefile if using a separate output directory
@@ -894,9 +895,9 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
 # before switching between archs anyway.
 
 include/asm:
-       @echo '  SYMLINK $@ -> include/asm-$(ARCH)'
+       @echo '  SYMLINK $@ -> include/asm-$(SRCARCH)'
        $(Q)if [ ! -d include ]; then mkdir -p include; fi;
-       @ln -fsn asm-$(ARCH) $@
+       @ln -fsn asm-$(SRCARCH) $@
 
 # Generate some files
 # ---------------------------------------------------------------------------
@@ -936,7 +937,8 @@ depend dep:
 INSTALL_HDR_PATH=$(objtree)/usr
 export INSTALL_HDR_PATH
 
-HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild)))
+HDRFILTER=generic i386 x86_64
+HDRARCHES=$(filter-out $(HDRFILTER),$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild)))
 
 PHONY += headers_install_all
 headers_install_all: include/linux/version.h scripts_basic FORCE
@@ -947,11 +949,11 @@ headers_install_all: include/linux/version.h scripts_basic FORCE
 
 PHONY += headers_install
 headers_install: include/linux/version.h scripts_basic FORCE
-       @if [ ! -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \
-         echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \
+       @if [ ! -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
+         echo '*** Error: Headers not exportable for this architecture ($(SRCARCH))'; \
          exit 1 ; fi
        $(Q)$(MAKE) $(build)=scripts scripts/unifdef
-       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst ARCH=$(SRCARCH) obj=include
 
 PHONY += headers_check_all
 headers_check_all: headers_install_all
@@ -961,7 +963,7 @@ headers_check_all: headers_install_all
 
 PHONY += headers_check
 headers_check: headers_install
-       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include HDRCHECK=1
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst ARCH=$(SRCARCH) obj=include HDRCHECK=1
 
 # ---------------------------------------------------------------------------
 # Modules
@@ -1139,7 +1141,7 @@ help:
        @echo  '  cscope          - Generate cscope index'
        @echo  '  kernelrelease   - Output the release version string'
        @echo  '  kernelversion   - Output the version stored in Makefile'
-       @if [ -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \
+       @if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
         echo  '  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
         echo  '                    (default: $(INSTALL_HDR_PATH))'; \
         fi
@@ -1147,7 +1149,7 @@ help:
        @echo  'Static analysers'
        @echo  '  checkstack      - Generate a list of stack hogs'
        @echo  '  namespacecheck  - Name space analysis on compiled kernel'
-       @if [ -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \
+       @if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
         echo  '  headers_check   - Sanity check on exported headers'; \
         fi
        @echo  ''
@@ -1292,18 +1294,23 @@ ifeq ($(ALLSOURCE_ARCHS),)
 ifeq ($(ARCH),um)
 ALLINCLUDE_ARCHS := $(ARCH) $(SUBARCH)
 else
-ALLINCLUDE_ARCHS := $(ARCH)
+ALLINCLUDE_ARCHS := $(SRCARCH)
 endif
 else
 #Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behavour.
 ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
 endif
 
+# Take care of arch/x86
+ifeq ($(ARCH), $(SRCARCH))
 ALLSOURCE_ARCHS := $(ARCH)
+else
+ALLSOURCE_ARCHS := $(ARCH) $(SRCARCH)
+endif
 
 define find-sources
         ( for ARCH in $(ALLSOURCE_ARCHS) ; do \
-              find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \
+              find $(__srctree)arch/$${SRCARCH} $(RCS_FIND_IGNORE) \
                    -name $1 -print; \
          done ; \
          find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
@@ -1312,7 +1319,7 @@ define find-sources
               \( -name config -o -name 'asm-*' \) -prune \
               -o -name $1 -print; \
          for ARCH in $(ALLINCLUDE_ARCHS) ; do \
-              find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \
+              find $(__srctree)include/asm-$${SRCARCH} $(RCS_FIND_IGNORE) \
                    -name $1 -print; \
          done ; \
          find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
index 240c448ec31cf15a40222d2ab8e9414fc65bf7b6..a2dd930d11efd5d9ee8f1f691a101e09c591f07e 100644 (file)
@@ -338,7 +338,7 @@ pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
  * pcibios_fixup_bus - Called after each bus is probed,
  * but before its children are examined.
  */
-void __devinit pcibios_fixup_bus(struct pci_bus *bus)
+void pcibios_fixup_bus(struct pci_bus *bus)
 {
        struct pci_sys_data *root = bus->sysdata;
        struct pci_dev *dev;
@@ -419,7 +419,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
 /*
  * Convert from Linux-centric to bus-centric addresses for bridge devices.
  */
-void __devinit
+void
 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
                         struct resource *res)
 {
index 0ba7e9060c7bba3ece0df5d9eacbdbeb86d71eac..c326983f4a8f5b66dcee243def28998c560d2bb2 100644 (file)
@@ -276,7 +276,21 @@ static unsigned char pm_osiris_ctrl0;
 
 static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
 {
+       unsigned int tmp;
+
        pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0);
+       tmp = pm_osiris_ctrl0 & ~OSIRIS_CTRL0_NANDSEL;
+
+       /* ensure correct NAND slot is selected on resume */
+       if ((pm_osiris_ctrl0 & OSIRIS_CTRL0_BOOT_INT) == 0)
+               tmp |= 2;
+
+       __raw_writeb(tmp, OSIRIS_VA_CTRL0);
+
+       /* ensure that an nRESET is not generated on resume. */
+       s3c2410_gpio_setpin(S3C2410_GPA21, 1);
+       s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT);
+
        return 0;
 }
 
@@ -285,6 +299,10 @@ static int osiris_pm_resume(struct sys_device *sd)
        if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
                __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);
 
+       __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0);
+
+       s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_nRSTOUT);
+
        return 0;
 }
 
index bafcfa52142ba0731f5caf3ecc71e672d7678285..5d488ef965ce771a95e6db2567752f10c806f052 100644 (file)
@@ -84,6 +84,7 @@
 #include <linux/err.h>
 #include <asm/blackfin.h>
 #include <asm/gpio.h>
+#include <asm/portmux.h>
 #include <linux/irq.h>
 
 #ifdef BF533_FAMILY
@@ -115,7 +116,11 @@ static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = {
 };
 #endif
 
-static unsigned short reserved_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
+static unsigned short reserved_gpio_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
+static unsigned short reserved_peri_map[gpio_bank(MAX_BLACKFIN_GPIOS + 16)];
+char *str_ident = NULL;
+
+#define RESOURCE_LABEL_SIZE 16
 
 #ifdef CONFIG_PM
 static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
@@ -143,22 +148,100 @@ inline int check_gpio(unsigned short gpio)
        return 0;
 }
 
+static void set_label(unsigned short ident, const char *label)
+{
+
+       if (label && str_ident) {
+               strncpy(str_ident + ident * RESOURCE_LABEL_SIZE, label,
+                        RESOURCE_LABEL_SIZE);
+               str_ident[ident * RESOURCE_LABEL_SIZE +
+                        RESOURCE_LABEL_SIZE - 1] = 0;
+       }
+}
+
+static char *get_label(unsigned short ident)
+{
+       if (!str_ident)
+               return "UNKNOWN";
+
+       return (str_ident[ident * RESOURCE_LABEL_SIZE] ?
+               (str_ident + ident * RESOURCE_LABEL_SIZE) : "UNKNOWN");
+}
+
+static int cmp_label(unsigned short ident, const char *label)
+{
+       if (label && str_ident)
+               return strncmp(str_ident + ident * RESOURCE_LABEL_SIZE,
+                                label, strlen(label));
+       else
+               return -EINVAL;
+}
+
 #ifdef BF537_FAMILY
 static void port_setup(unsigned short gpio, unsigned short usage)
 {
-       if (usage == GPIO_USAGE) {
-               if (*port_fer[gpio_bank(gpio)] & gpio_bit(gpio))
-                       printk(KERN_WARNING "bfin-gpio: Possible Conflict with Peripheral "
-                              "usage and GPIO %d detected!\n", gpio);
-               *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio);
-       } else
-               *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio);
-       SSYNC();
+       if (!check_gpio(gpio)) {
+               if (usage == GPIO_USAGE) {
+                       *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio);
+               } else
+                       *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio);
+               SSYNC();
+       }
 }
 #else
 # define port_setup(...)  do { } while (0)
 #endif
 
+#ifdef BF537_FAMILY
+
+#define PMUX_LUT_RES           0
+#define PMUX_LUT_OFFSET                1
+#define PMUX_LUT_ENTRIES       41
+#define PMUX_LUT_SIZE          2
+
+static unsigned short port_mux_lut[PMUX_LUT_ENTRIES][PMUX_LUT_SIZE] = {
+       {P_PPI0_D13, 11}, {P_PPI0_D14, 11}, {P_PPI0_D15, 11},
+       {P_SPORT1_TFS, 11}, {P_SPORT1_TSCLK, 11}, {P_SPORT1_DTPRI, 11},
+       {P_PPI0_D10, 10}, {P_PPI0_D11, 10}, {P_PPI0_D12, 10},
+       {P_SPORT1_RSCLK, 10}, {P_SPORT1_RFS, 10}, {P_SPORT1_DRPRI, 10},
+       {P_PPI0_D8, 9}, {P_PPI0_D9, 9}, {P_SPORT1_DRSEC, 9},
+       {P_SPORT1_DTSEC, 9}, {P_TMR2, 8}, {P_PPI0_FS3, 8}, {P_TMR3, 7},
+       {P_SPI0_SSEL4, 7}, {P_TMR4, 6}, {P_SPI0_SSEL5, 6}, {P_TMR5, 5},
+       {P_SPI0_SSEL6, 5}, {P_UART1_RX, 4}, {P_UART1_TX, 4}, {P_TMR6, 4},
+       {P_TMR7, 4}, {P_UART0_RX, 3}, {P_UART0_TX, 3}, {P_DMAR0, 3},
+       {P_DMAR1, 3}, {P_SPORT0_DTSEC, 1}, {P_SPORT0_DRSEC, 1},
+       {P_CAN0_RX, 1}, {P_CAN0_TX, 1}, {P_SPI0_SSEL7, 1},
+       {P_SPORT0_TFS, 0}, {P_SPORT0_DTPRI, 0}, {P_SPI0_SSEL2, 0},
+       {P_SPI0_SSEL3, 0}
+};
+
+static void portmux_setup(unsigned short per, unsigned short function)
+{
+       u16 y, muxreg, offset;
+
+       for (y = 0; y < PMUX_LUT_ENTRIES; y++) {
+               if (port_mux_lut[y][PMUX_LUT_RES] == per) {
+
+                       /* SET PORTMUX REG */
+
+                       offset = port_mux_lut[y][PMUX_LUT_OFFSET];
+                       muxreg = bfin_read_PORT_MUX();
+
+                       if (offset != 1) {
+                               muxreg &= ~(1 << offset);
+                       } else {
+                               muxreg &= ~(3 << 1);
+                       }
+
+                       muxreg |= (function << offset);
+                       bfin_write_PORT_MUX(muxreg);
+               }
+       }
+}
+
+#else
+# define portmux_setup(...)  do { } while (0)
+#endif
 
 static void default_gpio(unsigned short gpio)
 {
@@ -179,22 +262,15 @@ static void default_gpio(unsigned short gpio)
 
 static int __init bfin_gpio_init(void)
 {
-       int i;
-
-       printk(KERN_INFO "Blackfin GPIO Controller\n");
 
-       for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
-               reserved_map[gpio_bank(i)] = 0;
+       str_ident = kzalloc(RESOURCE_LABEL_SIZE * 256, GFP_KERNEL);
+       if (!str_ident)
+               return -ENOMEM;
 
-#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
-# if defined(CONFIG_BFIN_MAC_RMII)
-       reserved_map[gpio_bank(PORT_H)] = 0xC373;
-# else
-       reserved_map[gpio_bank(PORT_H)] = 0xFFFF;
-# endif
-#endif
+       printk(KERN_INFO "Blackfin GPIO Controller\n");
 
        return 0;
+
 }
 
 arch_initcall(bfin_gpio_init);
@@ -223,7 +299,7 @@ arch_initcall(bfin_gpio_init);
 void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
 { \
        unsigned long flags; \
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
        local_irq_save(flags); \
        if (arg) \
                gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
@@ -243,7 +319,7 @@ SET_GPIO(both)
 #define SET_GPIO_SC(name) \
 void set_gpio_ ## name(unsigned short gpio, unsigned short arg) \
 { \
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))); \
        if (arg) \
                gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
        else \
@@ -258,7 +334,7 @@ SET_GPIO_SC(maskb)
 void set_gpio_data(unsigned short gpio, unsigned short arg)
 {
        unsigned long flags;
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
        local_irq_save(flags);
        if (arg)
                gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
@@ -277,7 +353,7 @@ SET_GPIO_SC(data)
 void set_gpio_toggle(unsigned short gpio)
 {
        unsigned long flags;
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
        local_irq_save(flags);
        gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
        bfin_read_CHIPID();
@@ -286,7 +362,7 @@ void set_gpio_toggle(unsigned short gpio)
 #else
 void set_gpio_toggle(unsigned short gpio)
 {
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
        gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
 }
 #endif
@@ -350,7 +426,7 @@ unsigned short get_gpio_data(unsigned short gpio)
 {
        unsigned long flags;
        unsigned short ret;
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
        local_irq_save(flags);
        ret = 0x01 & (gpio_bankb[gpio_bank(gpio)]->data >> gpio_sub_n(gpio));
        bfin_read_CHIPID();
@@ -494,13 +570,14 @@ u32 gpio_pm_setup(void)
                        gpio_bank_saved[bank].dir   = gpio_bankb[bank]->dir;
                        gpio_bank_saved[bank].edge  = gpio_bankb[bank]->edge;
                        gpio_bank_saved[bank].both  = gpio_bankb[bank]->both;
-                       gpio_bank_saved[bank].reserved = reserved_map[bank];
+                       gpio_bank_saved[bank].reserved =
+                                               reserved_gpio_map[bank];
 
                        gpio = i;
 
                        while (mask) {
                                if (mask & 1) {
-                                       reserved_map[gpio_bank(gpio)] |=
+                                       reserved_gpio_map[gpio_bank(gpio)] |=
                                                        gpio_bit(gpio);
                                        bfin_gpio_wakeup_type(gpio,
                                                wakeup_flags_map[gpio]);
@@ -540,7 +617,8 @@ void gpio_pm_restore(void)
                        gpio_bankb[bank]->edge  = gpio_bank_saved[bank].edge;
                        gpio_bankb[bank]->both  = gpio_bank_saved[bank].both;
 
-                       reserved_map[bank] = gpio_bank_saved[bank].reserved;
+                       reserved_gpio_map[bank] =
+                                       gpio_bank_saved[bank].reserved;
 
                }
 
@@ -550,6 +628,141 @@ void gpio_pm_restore(void)
 
 #endif
 
+
+
+
+int peripheral_request(unsigned short per, const char *label)
+{
+       unsigned long flags;
+       unsigned short ident = P_IDENT(per);
+
+       /*
+        * Don't cares are pins with only one dedicated function
+        */
+
+       if (per & P_DONTCARE)
+               return 0;
+
+       if (!(per & P_DEFINED))
+               return -ENODEV;
+
+       local_irq_save(flags);
+
+       if (!check_gpio(ident)) {
+
+       if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
+               printk(KERN_ERR
+                      "%s: Peripheral %d is already reserved as GPIO by %s !\n",
+                      __FUNCTION__, ident, get_label(ident));
+               dump_stack();
+               local_irq_restore(flags);
+               return -EBUSY;
+       }
+
+       }
+
+       if (unlikely(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident))) {
+
+       /*
+        * Pin functions like AMC address strobes my
+        * be requested and used by several drivers
+        */
+
+       if (!(per & P_MAYSHARE)) {
+
+       /*
+        * Allow that the identical pin function can
+        * be requested from the same driver twice
+        */
+
+               if (cmp_label(ident, label) == 0)
+                       goto anyway;
+
+                       printk(KERN_ERR
+                              "%s: Peripheral %d function %d is already"
+                              "reserved by %s !\n",
+                              __FUNCTION__, ident, P_FUNCT2MUX(per),
+                               get_label(ident));
+                       dump_stack();
+                       local_irq_restore(flags);
+                       return -EBUSY;
+               }
+
+       }
+
+anyway:
+
+
+       portmux_setup(per, P_FUNCT2MUX(per));
+
+       port_setup(ident, PERIPHERAL_USAGE);
+
+       reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident);
+       local_irq_restore(flags);
+       set_label(ident, label);
+
+       return 0;
+}
+EXPORT_SYMBOL(peripheral_request);
+
+int peripheral_request_list(unsigned short per[], const char *label)
+{
+       u16 cnt;
+       int ret;
+
+       for (cnt = 0; per[cnt] != 0; cnt++) {
+               ret = peripheral_request(per[cnt], label);
+               if (ret < 0)
+                       return ret;
+       }
+
+       return 0;
+}
+EXPORT_SYMBOL(peripheral_request_list);
+
+void peripheral_free(unsigned short per)
+{
+       unsigned long flags;
+       unsigned short ident = P_IDENT(per);
+
+       if (per & P_DONTCARE)
+               return;
+
+       if (!(per & P_DEFINED))
+               return;
+
+       if (check_gpio(ident) < 0)
+               return;
+
+       local_irq_save(flags);
+
+       if (unlikely(!(reserved_peri_map[gpio_bank(ident)]
+                        & gpio_bit(ident)))) {
+               local_irq_restore(flags);
+               return;
+       }
+
+       if (!(per & P_MAYSHARE)) {
+               port_setup(ident, GPIO_USAGE);
+       }
+
+       reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident);
+
+       local_irq_restore(flags);
+}
+EXPORT_SYMBOL(peripheral_free);
+
+void peripheral_free_list(unsigned short per[])
+{
+       u16 cnt;
+
+       for (cnt = 0; per[cnt] != 0; cnt++) {
+               peripheral_free(per[cnt]);
+       }
+
+}
+EXPORT_SYMBOL(peripheral_free_list);
+
 /***********************************************************
 *
 * FUNCTIONS: Blackfin GPIO Driver
@@ -574,13 +787,13 @@ int gpio_request(unsigned short gpio, const char *label)
 
        local_irq_save(flags);
 
-       if (unlikely(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
+       if (unlikely(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
                printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved!\n", gpio);
                dump_stack();
                local_irq_restore(flags);
                return -EBUSY;
        }
-       reserved_map[gpio_bank(gpio)] |= gpio_bit(gpio);
+       reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
 
        local_irq_restore(flags);
 
@@ -599,7 +812,7 @@ void gpio_free(unsigned short gpio)
 
        local_irq_save(flags);
 
-       if (unlikely(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
+       if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
                printk(KERN_ERR "bfin-gpio: GPIO %d wasn't reserved!\n", gpio);
                dump_stack();
                local_irq_restore(flags);
@@ -608,7 +821,7 @@ void gpio_free(unsigned short gpio)
 
        default_gpio(gpio);
 
-       reserved_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
+       reserved_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
 
        local_irq_restore(flags);
 }
@@ -618,7 +831,7 @@ void gpio_direction_input(unsigned short gpio)
 {
        unsigned long flags;
 
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 
        local_irq_save(flags);
        gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio);
@@ -631,7 +844,7 @@ void gpio_direction_output(unsigned short gpio)
 {
        unsigned long flags;
 
-       BUG_ON(!(reserved_map[gpio_bank(gpio)] & gpio_bit(gpio)));
+       BUG_ON(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)));
 
        local_irq_save(flags);
        gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
index d61bba98fb548b8baf63980e11aca302902419d4..9604588083446d6c866595e4336d0e63fc6c7b97 100644 (file)
@@ -815,7 +815,7 @@ _extable:
 
 ALIGN
 ENTRY(_sys_call_table)
-       .long _sys_ni_syscall   /* 0  -  old "setup()" system call*/
+       .long _sys_restart_syscall      /* 0 */
        .long _sys_exit
        .long _sys_fork
        .long _sys_read
@@ -978,13 +978,13 @@ ENTRY(_sys_call_table)
        .long _sys_sched_get_priority_min  /* 160 */
        .long _sys_sched_rr_get_interval
        .long _sys_nanosleep
-       .long _sys_ni_syscall   /* sys_mremap */
+       .long _sys_mremap
        .long _sys_setresuid    /* setresuid16 */
        .long _sys_getresuid    /* getresuid16 */       /* 165 */
        .long _sys_ni_syscall   /* for vm86 */
        .long _sys_ni_syscall   /* old "query_module" */
        .long _sys_ni_syscall   /* sys_poll */
-       .long _sys_ni_syscall   /* sys_nfsservctl */
+       .long _sys_nfsservctl
        .long _sys_setresgid    /* setresgid16 */       /* 170 */
        .long _sys_getresgid    /* getresgid16 */
        .long _sys_prctl
@@ -1040,7 +1040,7 @@ ENTRY(_sys_call_table)
        .long _sys_ni_syscall   /* reserved for TUX */
        .long _sys_ni_syscall
        .long _sys_gettid
-       .long _sys_ni_syscall   /* 225 */ /* sys_readahead */
+       .long _sys_readahead    /* 225 */
        .long _sys_setxattr
        .long _sys_lsetxattr
        .long _sys_fsetxattr
@@ -1157,6 +1157,21 @@ ENTRY(_sys_call_table)
        .long _sys_shmctl
        .long _sys_shmdt        /* 340 */
        .long _sys_shmget
+       .long _sys_splice
+       .long _sys_sync_file_range
+       .long _sys_tee
+       .long _sys_vmsplice     /* 345 */
+       .long _sys_epoll_pwait
+       .long _sys_utimensat
+       .long _sys_signalfd
+       .long _sys_timerfd
+       .long _sys_eventfd      /* 350 */
+       .long _sys_pread64
+       .long _sys_pwrite64
+       .long _sys_fadvise64
+       .long _sys_set_robust_list
+       .long _sys_get_robust_list      /* 355 */
+       .long _sys_fallocate
        .rept NR_syscalls-(.-_sys_call_table)/4
        .long _sys_ni_syscall
        .endr
index 97b64d7d6bf692baacc019df57845c964c771d39..2d85e4b87307a1e87b7999a068f8620304758c15 100644 (file)
@@ -226,7 +226,7 @@ config PARAVIRT
          However, when run without a hypervisor the kernel is
          theoretically slower.  If in doubt, say N.
 
-source "arch/i386/xen/Kconfig"
+source "arch/x86/xen/Kconfig"
 
 config VMI
        bool "VMI Paravirt-ops support"
@@ -707,7 +707,7 @@ config MATH_EMULATION
          intend to use this kernel on different machines.
 
          More information about the internals of the Linux math coprocessor
-         emulation can be found in <file:arch/i386/math-emu/README>.
+         emulation can be found in <file:arch/x86/math-emu/README>.
 
          If you are not sure, say Y; apart from resulting in a 66 KB bigger
          kernel, it won't hurt.
@@ -1067,7 +1067,7 @@ config APM_REAL_MODE_POWER_OFF
 
 endif # APM
 
-source "arch/i386/kernel/cpu/cpufreq/Kconfig"
+source "arch/x86/kernel/cpu/cpufreq/Kconfig"
 
 endmenu
 
@@ -1240,7 +1240,7 @@ menuconfig INSTRUMENTATION
 
 if INSTRUMENTATION
 
-source "arch/i386/oprofile/Kconfig"
+source "arch/x86/oprofile/Kconfig"
 
 config KPROBES
        bool "Kprobes"
index 52b932478c6dbcf947882e1a483c962bce167f07..5e50dbf00f3e948f69f9ea7885c84a9235cdbb7a 100644 (file)
@@ -17,6 +17,9 @@
 # 20050320  Kianusch Sayah Karadji <kianusch@sk-tech.net>
 #           Added support for GEODE CPU
 
+# Fill in SRCARCH
+SRCARCH        := x86
+
 HAS_BIARCH      := $(call cc-option-yn, -m32)
 ifeq ($(HAS_BIARCH),y)
 AS              := $(AS) --32
@@ -61,62 +64,62 @@ AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONF
 CFLAGS += $(cflags-y)
 
 # Default subarch .c files
-mcore-y  := mach-default
+mcore-y  := arch/x86/mach-default
 
 # Voyager subarch support
-mflags-$(CONFIG_X86_VOYAGER)   := -Iinclude/asm-i386/mach-voyager
-mcore-$(CONFIG_X86_VOYAGER)    := mach-voyager
+mflags-$(CONFIG_X86_VOYAGER)   := -Iinclude/asm-x86/mach-voyager
+mcore-$(CONFIG_X86_VOYAGER)    := arch/x86/mach-voyager
 
 # VISWS subarch support
-mflags-$(CONFIG_X86_VISWS)     := -Iinclude/asm-i386/mach-visws
-mcore-$(CONFIG_X86_VISWS)      := mach-visws
+mflags-$(CONFIG_X86_VISWS)     := -Iinclude/asm-x86/mach-visws
+mcore-$(CONFIG_X86_VISWS)      := arch/x86/mach-visws
 
 # NUMAQ subarch support
-mflags-$(CONFIG_X86_NUMAQ)     := -Iinclude/asm-i386/mach-numaq
-mcore-$(CONFIG_X86_NUMAQ)      := mach-default
+mflags-$(CONFIG_X86_NUMAQ)     := -Iinclude/asm-x86/mach-numaq
+mcore-$(CONFIG_X86_NUMAQ)      := arch/x86/mach-default
 
 # BIGSMP subarch support
-mflags-$(CONFIG_X86_BIGSMP)    := -Iinclude/asm-i386/mach-bigsmp
-mcore-$(CONFIG_X86_BIGSMP)     := mach-default
+mflags-$(CONFIG_X86_BIGSMP)    := -Iinclude/asm-x86/mach-bigsmp
+mcore-$(CONFIG_X86_BIGSMP)     := arch/x86/mach-default
 
 #Summit subarch support
-mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-i386/mach-summit
-mcore-$(CONFIG_X86_SUMMIT)  := mach-default
+mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-x86/mach-summit
+mcore-$(CONFIG_X86_SUMMIT)  := arch/x86/mach-default
 
 # generic subarchitecture
-mflags-$(CONFIG_X86_GENERICARCH) := -Iinclude/asm-i386/mach-generic
-mcore-$(CONFIG_X86_GENERICARCH) := mach-default
-core-$(CONFIG_X86_GENERICARCH) += arch/i386/mach-generic/
+mflags-$(CONFIG_X86_GENERICARCH) := -Iinclude/asm-x86/mach-generic
+mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default
+core-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/
 
 # ES7000 subarch support
-mflags-$(CONFIG_X86_ES7000)    := -Iinclude/asm-i386/mach-es7000
-mcore-$(CONFIG_X86_ES7000)     := mach-default
-core-$(CONFIG_X86_ES7000)      := arch/i386/mach-es7000/
+mflags-$(CONFIG_X86_ES7000)    := -Iinclude/asm-x86/mach-es7000
+mcore-$(CONFIG_X86_ES7000)     := arch/x86/mach-default
+core-$(CONFIG_X86_ES7000)      := arch/x86/mach-es7000/
 
 # Xen paravirtualization support
-core-$(CONFIG_XEN)             += arch/i386/xen/
+core-$(CONFIG_XEN)             += arch/x86/xen/
 
 # default subarch .h files
-mflags-y += -Iinclude/asm-i386/mach-default
+mflags-y += -Iinclude/asm-x86/mach-default
 
-head-y := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
+head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task_32.o
 
-libs-y                                         += arch/i386/lib/
-core-y                                 += arch/i386/kernel/ \
-                                          arch/i386/mm/ \
-                                          arch/i386/$(mcore-y)/ \
-                                          arch/i386/crypto/
-drivers-$(CONFIG_MATH_EMULATION)       += arch/i386/math-emu/
-drivers-$(CONFIG_PCI)                  += arch/i386/pci/
+libs-y                                         += arch/x86/lib/
+core-y                                 += arch/x86/kernel/ \
+                                          arch/x86/mm/ \
+                                          $(mcore-y)/ \
+                                          arch/x86/crypto/
+drivers-$(CONFIG_MATH_EMULATION)       += arch/x86/math-emu/
+drivers-$(CONFIG_PCI)                  += arch/x86/pci/
 # must be linked after kernel/
-drivers-$(CONFIG_OPROFILE)             += arch/i386/oprofile/
-drivers-$(CONFIG_PM)                   += arch/i386/power/
-drivers-$(CONFIG_FB)                    += arch/i386/video/
+drivers-$(CONFIG_OPROFILE)             += arch/x86/oprofile/
+drivers-$(CONFIG_PM)                   += arch/x86/power/
+drivers-$(CONFIG_FB)                    += arch/x86/video/
 
 CFLAGS += $(mflags-y)
 AFLAGS += $(mflags-y)
 
-boot := arch/i386/boot
+boot := arch/x86/boot
 
 PHONY += zImage bzImage compressed zlilo bzlilo \
          zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install
@@ -125,9 +128,11 @@ all: bzImage
 
 # KBUILD_IMAGE specify target image being built
                     KBUILD_IMAGE := $(boot)/bzImage
-zImage zlilo zdisk: KBUILD_IMAGE := arch/i386/boot/zImage
+zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage
 
 zImage bzImage: vmlinux
+       $(Q)mkdir -p $(objtree)/arch/i386/boot
+       $(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage
        $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
 
 compressed: zImage
@@ -145,7 +150,8 @@ install:
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
 
 archclean:
-       $(Q)$(MAKE) $(clean)=arch/i386/boot
+       $(Q)rm -rf $(objtree)/arch/i386/boot
+       $(Q)$(MAKE) $(clean)=arch/x86/boot
 
 define archhelp
   echo  '* bzImage     - Compressed kernel image (arch/$(ARCH)/boot/bzImage)'
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
deleted file mode 100644 (file)
index 9d33b00..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-extra-y := head.o init_task.o vmlinux.lds
-
-obj-y  := process.o signal.o entry.o traps.o irq.o \
-               ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
-               pci-dma.o i386_ksyms.o i387.o bootflag.o e820.o\
-               quirks.o i8237.o topology.o alternative.o i8253.o tsc.o
-
-obj-$(CONFIG_STACKTRACE)       += stacktrace.o
-obj-y                          += cpu/
-obj-y                          += acpi/
-obj-$(CONFIG_X86_BIOS_REBOOT)  += reboot.o
-obj-$(CONFIG_MCA)              += mca.o
-obj-$(CONFIG_X86_MSR)          += msr.o
-obj-$(CONFIG_X86_CPUID)                += cpuid.o
-obj-$(CONFIG_MICROCODE)                += microcode.o
-obj-$(CONFIG_APM)              += apm.o
-obj-$(CONFIG_X86_SMP)          += smp.o smpboot.o tsc_sync.o
-obj-$(CONFIG_SMP)              += smpcommon.o
-obj-$(CONFIG_X86_TRAMPOLINE)   += trampoline.o
-obj-$(CONFIG_X86_MPPARSE)      += mpparse.o
-obj-$(CONFIG_X86_LOCAL_APIC)   += apic.o nmi.o
-obj-$(CONFIG_X86_IO_APIC)      += io_apic.o
-obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups.o
-obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o crash.o
-obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
-obj-$(CONFIG_X86_NUMAQ)                += numaq.o
-obj-$(CONFIG_X86_SUMMIT_NUMA)  += summit.o
-obj-$(CONFIG_KPROBES)          += kprobes.o
-obj-$(CONFIG_MODULES)          += module.o
-obj-y                          += sysenter.o vsyscall.o
-obj-$(CONFIG_ACPI_SRAT)        += srat.o
-obj-$(CONFIG_EFI)              += efi.o efi_stub.o
-obj-$(CONFIG_DOUBLEFAULT)      += doublefault.o
-obj-$(CONFIG_VM86)             += vm86.o
-obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
-obj-$(CONFIG_HPET_TIMER)       += hpet.o
-obj-$(CONFIG_K8_NB)            += k8.o
-obj-$(CONFIG_MGEODE_LX)                += geode.o
-
-obj-$(CONFIG_VMI)              += vmi.o vmiclock.o
-obj-$(CONFIG_PARAVIRT)         += paravirt.o
-obj-y                          += pcspeaker.o
-
-obj-$(CONFIG_SCx200)           += scx200.o
-
-# vsyscall.o contains the vsyscall DSO images as __initdata.
-# We must build both images before we can assemble it.
-# Note: kbuild does not track this dependency due to usage of .incbin
-$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
-targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
-targets += vsyscall-note.o vsyscall.lds
-
-# The DSO images are built using a special linker script.
-quiet_cmd_syscall = SYSCALL $@
-      cmd_syscall = $(CC) -m elf_i386 -nostdlib $(SYSCFLAGS_$(@F)) \
-                         -Wl,-T,$(filter-out FORCE,$^) -o $@
-
-export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH)
-
-vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \
-                $(call ld-option, -Wl$(comma)--hash-style=sysv)
-SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags)
-SYSCFLAGS_vsyscall-int80.so    = $(vsyscall-flags)
-
-$(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
-$(obj)/vsyscall-%.so: $(src)/vsyscall.lds \
-                     $(obj)/vsyscall-%.o $(obj)/vsyscall-note.o FORCE
-       $(call if_changed,syscall)
-
-# We also create a special relocatable object that should mirror the symbol
-# table and layout of the linked DSO.  With ld -R we can then refer to
-# these symbols in the kernel code rather than hand-coded addresses.
-extra-y += vsyscall-syms.o
-$(obj)/built-in.o: $(obj)/vsyscall-syms.o
-$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o
-
-SYSCFLAGS_vsyscall-syms.o = -r
-$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \
-                       $(obj)/vsyscall-sysenter.o $(obj)/vsyscall-note.o FORCE
-       $(call if_changed,syscall)
-
-k8-y                      += ../../x86_64/kernel/k8.o
-stacktrace-y             += ../../x86_64/kernel/stacktrace.o
-
diff --git a/arch/i386/kernel/early_printk.c b/arch/i386/kernel/early_printk.c
deleted file mode 100644 (file)
index 92f812b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-#include "../../x86_64/kernel/early_printk.c"
diff --git a/arch/i386/kernel/tsc_sync.c b/arch/i386/kernel/tsc_sync.c
deleted file mode 100644 (file)
index 1242462..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../x86_64/kernel/tsc_sync.c"
diff --git a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile
deleted file mode 100644 (file)
index 4d105fd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Makefile for i386-specific library files..
-#
-
-
-lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \
-       bitops.o semaphore.o string.o
-
-lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
-
-obj-$(CONFIG_SMP)      += msr-on-cpu.o
diff --git a/arch/i386/mach-generic/Makefile b/arch/i386/mach-generic/Makefile
deleted file mode 100644 (file)
index 6914485..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Makefile for the generic architecture
-#
-
-EXTRA_CFLAGS   := -Iarch/i386/kernel
-
-obj-y                          := probe.o summit.o bigsmp.o es7000.o default.o ../mach-es7000/
diff --git a/arch/i386/mm/Makefile b/arch/i386/mm/Makefile
deleted file mode 100644 (file)
index 80908b5..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for the linux i386-specific parts of the memory manager.
-#
-
-obj-y  := init.o pgtable.o fault.o ioremap.o extable.o pageattr.o mmap.o
-
-obj-$(CONFIG_NUMA) += discontig.o
-obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
-obj-$(CONFIG_HIGHMEM) += highmem.o
-obj-$(CONFIG_BOOT_IOREMAP) += boot_ioremap.o
index 8850fe40ea34240a340f11e10eb07e6af8641895..5e901c75df1bda93122aef924613d8a173cb722f 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm-i386/unistd.h>
+#include <asm-x86/unistd_32.h>
 
 unsigned ia32_dir_class[] = {
 #include <asm-generic/audit_dir_write.h>
index 6c25e6c09f7835ed4c3183b316e157d86d2db174..9be99a68932aca8c83d7aba6b548a1b161b4a531 100644 (file)
@@ -74,6 +74,7 @@ static int __init au1x_pci_setup(void)
                printk(KERN_ERR "Unable to ioremap pci space\n");
                return 1;
        }
+       au1x_controller.io_map_base = virt_io_addr;
 
 #ifdef CONFIG_DMA_NONCOHERENT
        {
index 7bc5af8917dafacde69719fa6fafb14ff0eed8d1..2c460c1165700eaa7cdd020d291a1015d1196e84 100644 (file)
@@ -54,11 +54,11 @@ void board_reset (void)
 
 void __init board_setup(void)
 {
-#ifdef CONFIG_USB_OHCI
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
        // enable USB power switch
        au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR );
        au_writel( 0x100000, GPIO2_OUTPUT );
-#endif // defined (CONFIG_USB_OHCI)
+#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
 
 #ifdef CONFIG_PCI
 #if defined(__MIPSEB__)
index 824cfafaff92ad8ac32217601a79cf43ca05423b..0aed89114bfcf9e8ab411bb071f1f6c65e32736e 100644 (file)
@@ -54,7 +54,7 @@ void __init board_setup(void)
        au_writel(0, SYS_PINSTATERD);
        udelay(100);
 
-#ifdef CONFIG_USB_OHCI
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
        /* zero and disable FREQ2 */
        sys_freqctrl = au_readl(SYS_FREQCTRL0);
        sys_freqctrl &= ~0xFFF00000;
@@ -102,7 +102,7 @@ void __init board_setup(void)
        /*
         * Route 48MHz FREQ2 into USB Host and/or Device
         */
-#ifdef CONFIG_USB_OHCI
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
        sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
 #endif
        au_writel(sys_clksrc, SYS_CLKSRC);
@@ -116,7 +116,7 @@ void __init board_setup(void)
        au_writel(pin_func, SYS_PINFUNC);
        au_writel(0x2800, SYS_TRIOUTCLR);
        au_writel(0x0030, SYS_OUTPUTCLR);
-#endif // defined (CONFIG_USB_OHCI)
+#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
 
        // make gpio 15 an input (for interrupt line)
        pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x100);
index 6bc1f8e1b608175b431f6927d47aa42558d8f1cc..259ca05860c32a8844636407dd5290ac9092a6f0 100644 (file)
@@ -54,7 +54,7 @@ void __init board_setup(void)
        au_writel(0, SYS_PININPUTEN);
        udelay(100);
 
-#ifdef CONFIG_USB_OHCI
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
        {
                u32 pin_func, sys_freqctrl, sys_clksrc;
 
@@ -98,7 +98,7 @@ void __init board_setup(void)
                pin_func |= 0x8000;
                au_writel(pin_func, SYS_PINFUNC);
        }
-#endif // defined (CONFIG_USB_OHCI)
+#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
 
        /* Enable sys bus clock divider when IDLE state or no bus activity. */
        au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
index c9b655616fb38f38ebd656242cb1a9c84f287e22..a2d850db8902d1d6eae89d8eead76eb31af7a597 100644 (file)
@@ -56,7 +56,7 @@ void __init board_setup(void)
        au_writel(0, SYS_PINSTATERD);
        udelay(100);
 
-#ifdef CONFIG_USB_OHCI
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
 
        /* GPIO201 is input for PCMCIA card detect */
        /* GPIO203 is input for PCMCIA interrupt request */
@@ -85,7 +85,7 @@ void __init board_setup(void)
        /*
         * Route 48MHz FREQ2 into USB Host and/or Device
         */
-#ifdef CONFIG_USB_OHCI
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
        sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
 #endif
        au_writel(sys_clksrc, SYS_CLKSRC);
@@ -95,7 +95,7 @@ void __init board_setup(void)
        // 2nd USB port is USB host
        pin_func |= 0x8000;
        au_writel(pin_func, SYS_PINFUNC);
-#endif // defined (CONFIG_USB_OHCI)
+#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
 
 
 
index b6c30800c66774170f719bba39948613a7a118c3..3a2d255361bcc364031652eb02261a57994bd0db 100644 (file)
@@ -177,10 +177,7 @@ handle_real_irq:
                outb(cached_master_mask, PIC_MASTER_IMR);
                outb(0x60+irq,PIC_MASTER_CMD);  /* 'Specific EOI to master */
        }
-#ifdef CONFIG_MIPS_MT_SMTC
-       if (irq_hwmask[irq] & ST0_IM)
-               set_c0_status(irq_hwmask[irq] & ST0_IM);
-#endif /* CONFIG_MIPS_MT_SMTC */
+       smtc_im_ack_irq(irq);
        spin_unlock_irqrestore(&i8259A_lock, flags);
        return;
 
index 410868b5ea5f499df73f497f104edb33405cbb02..1ecdd50bfc60333a82d2b60fba9181967a1ae277 100644 (file)
@@ -52,11 +52,8 @@ static void level_mask_and_ack_msc_irq(unsigned int irq)
        mask_msc_irq(irq);
        if (!cpu_has_veic)
                MSCIC_WRITE(MSC01_IC_EOI, 0);
-#ifdef CONFIG_MIPS_MT_SMTC
        /* This actually needs to be a call into platform code */
-       if (irq_hwmask[irq] & ST0_IM)
-               set_c0_status(irq_hwmask[irq] & ST0_IM);
-#endif /* CONFIG_MIPS_MT_SMTC */
+       smtc_im_ack_irq(irq);
 }
 
 /*
@@ -73,10 +70,7 @@ static void edge_mask_and_ack_msc_irq(unsigned int irq)
                MSCIC_WRITE(MSC01_IC_SUP+irq*8, r | ~MSC01_IC_SUP_EDGE_BIT);
                MSCIC_WRITE(MSC01_IC_SUP+irq*8, r);
        }
-#ifdef CONFIG_MIPS_MT_SMTC
-       if (irq_hwmask[irq] & ST0_IM)
-               set_c0_status(irq_hwmask[irq] & ST0_IM);
-#endif /* CONFIG_MIPS_MT_SMTC */
+       smtc_im_ack_irq(irq);
 }
 
 /*
index aeded6c17de52af0ed308cacd953aa3936363f14..a990aad2f0492746375f06ee6f932a2643b4597a 100644 (file)
@@ -74,20 +74,12 @@ EXPORT_SYMBOL_GPL(free_irqno);
  */
 void ack_bad_irq(unsigned int irq)
 {
+       smtc_im_ack_irq(irq);
        printk("unexpected IRQ # %d\n", irq);
 }
 
 atomic_t irq_err_count;
 
-#ifdef CONFIG_MIPS_MT_SMTC
-/*
- * SMTC Kernel needs to manipulate low-level CPU interrupt mask
- * in do_IRQ. These are passed in setup_irq_smtc() and stored
- * in this table.
- */
-unsigned long irq_hwmask[NR_IRQS];
-#endif /* CONFIG_MIPS_MT_SMTC */
-
 /*
  * Generic, controller-independent functions:
  */
index b3ed731a24c6ad41c293101826f56958a8d4d7ca..dd68afce7da5782dc0f59766b04eb3afcb7eb647 100644 (file)
@@ -525,5 +525,5 @@ sys_call_table:
        PTR     compat_sys_signalfd
        PTR     compat_sys_timerfd
        PTR     sys_eventfd
-       PTR     sys_fallocate                   /* 4320 */
+       PTR     sys32_fallocate                 /* 4320 */
        .size   sys_call_table,.-sys_call_table
index 43826c16101d15ee3f556c67e055749cfb7fcce4..f09404377ef18397840c6dba44f4cd00449b8493 100644 (file)
 #include <asm/smtc_proc.h>
 
 /*
- * This file should be built into the kernel only if CONFIG_MIPS_MT_SMTC is set.
+ * SMTC Kernel needs to manipulate low-level CPU interrupt mask
+ * in do_IRQ. These are passed in setup_irq_smtc() and stored
+ * in this table.
  */
+unsigned long irq_hwmask[NR_IRQS];
 
 #define LOCK_MT_PRA() \
        local_irq_save(flags); \
index 60bbaecde1873d8d653664351692ca93576be2e5..087ab997487d9f766f3e4d1e088a63a9a09a62fb 100644 (file)
@@ -45,6 +45,8 @@ SECTIONS
   __dbe_table : { *(__dbe_table) }
   __stop___dbe_table = .;
 
+  NOTES
+
   RODATA
 
   /* writeable */
index dc795be62807d1d1bf22af966ad961d0918794bf..e47e9e9486bf962cef8e44aa4d265a875c6f94d0 100644 (file)
@@ -209,7 +209,7 @@ static inline void build_cdex_p(void)
        }
 
        if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
-               build_insn_word(0x3c01a000);    /* lui     $at, 0xa000  */
+               build_insn_word(0x8c200000);    /* lw      $zero, ($at) */
 
        mi.c_format.opcode     = cache_op;
        mi.c_format.rs         = 4;             /* $a0 */
index 8008e31c5e81ce3ff17adac4aef6c98655c9182b..fe54514493044d8a9c70d9686518617531838d23 100644 (file)
  * 4  N/C
  */
 
-#define chkslot(_bus,_devfn)                                   \
-do {                                                           \
-       if ((_bus)->number > 0 || PCI_SLOT (_devfn) < 1 \
-           || PCI_SLOT (_devfn) > 3)                           \
-               return PCIBIOS_DEVICE_NOT_FOUND;                \
-} while (0)
+static inline int mkaddr(struct pci_bus *bus, unsigned int devfn,
+       unsigned int reg)
+{
+       return ((bus->number & 0xff) << 16) |
+               ((devfn & 0xff) << 8) |
+               (reg & 0xfc);
+}
 
-#define mkaddr(_devfn, _reg) \
-((((_devfn) & 0xffUL) << 8) | ((_reg) & 0xfcUL))
 
 static int
 mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
                     int reg, int size, u32 *val)
 {
-       chkslot(bus, devfn);
-       mace->pci.config_addr = mkaddr(devfn, reg);
+       mace->pci.config_addr = mkaddr(bus, devfn, reg);
        switch (size) {
        case 1:
                *val = mace->pci.config_data.b[(reg & 3) ^ 3];
@@ -66,8 +64,7 @@ static int
 mace_pci_write_config(struct pci_bus *bus, unsigned int devfn,
                      int reg, int size, u32 val)
 {
-       chkslot(bus, devfn);
-       mace->pci.config_addr = mkaddr(devfn, reg);
+       mace->pci.config_addr = mkaddr(bus, devfn, reg);
        switch (size) {
        case 1:
                mace->pci.config_data.b[(reg & 3) ^ 3] = val;
index ba3697ee7ff65ecc70bf15f30653fa54a5cc63b9..7309e48d163d1535facc87aef51ee4608ed3f3fc 100644 (file)
@@ -41,8 +41,8 @@ static struct platform_device uart8250_device = {
 
 static int __init uart8250_init(void)
 {
-       uart8250_data[0].iobase = (unsigned long) &mace->isa.serial1;
-       uart8250_data[1].iobase = (unsigned long) &mace->isa.serial1;
+       uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
+       uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1;
 
        return platform_device_register(&uart8250_device);
 }
index 502f47c01797215f80fb2f8cef3938c152a149c5..44c065a6b5e71a2ea1fe318a5062a2d8d79f3ff8 100644 (file)
@@ -99,6 +99,7 @@
                        #size-cells = <0>;
                        interrupt-parent = < &ipic >;
                        interrupts = <26 8>;
+                       dr_mode = "peripheral";
                        phy_type = "ulpi";
                };
 
index e477c9d0498bed92efd0ebad78db4db4187afd9f..8a1b001d0b110fa5a31a3fb53ed215312680f04c 100644 (file)
@@ -605,6 +605,13 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
        regs->ccr = 0;
        regs->gpr[1] = sp;
 
+       /*
+        * We have just cleared all the nonvolatile GPRs, so make
+        * FULL_REGS(regs) return true.  This is necessary to allow
+        * ptrace to examine the thread immediately after exec.
+        */
+       regs->trap &= ~1UL;
+
 #ifdef CONFIG_PPC32
        regs->mq = 0;
        regs->nip = start;
index e7fdf013cd393b59ddd74cad96a91096f424a183..eafe7605cdaca6f3d10b8966c8682ceeec0167c3 100644 (file)
@@ -76,14 +76,14 @@ int mpc834x_usb_cfg(void)
                        if (port0_is_dr)
                                printk(KERN_WARNING
                                        "834x USB port0 can't be used by both DR and MPH!\n");
-                       sicrl |= MPC834X_SICRL_USB0;
+                       sicrl &= ~MPC834X_SICRL_USB0;
                }
                prop = of_get_property(np, "port1", NULL);
                if (prop) {
                        if (port1_is_dr)
                                printk(KERN_WARNING
                                        "834x USB port1 can't be used by both DR and MPH!\n");
-                       sicrl |= MPC834X_SICRL_USB1;
+                       sicrl &= ~MPC834X_SICRL_USB1;
                }
                of_node_put(np);
        }
index 4100ddc52f0227fb0fcb300fb50da78bffa9b9d3..7de4e919687b48b717bdb6001f30c088cfe49997 100644 (file)
@@ -2177,8 +2177,8 @@ struct tree_descr spufs_dir_contents[] = {
        { "mbox_stat", &spufs_mbox_stat_fops, 0444, },
        { "ibox_stat", &spufs_ibox_stat_fops, 0444, },
        { "wbox_stat", &spufs_wbox_stat_fops, 0444, },
-       { "signal1", &spufs_signal1_nosched_fops, 0222, },
-       { "signal2", &spufs_signal2_nosched_fops, 0222, },
+       { "signal1", &spufs_signal1_fops, 0666, },
+       { "signal2", &spufs_signal2_fops, 0666, },
        { "signal1_type", &spufs_signal1_type, 0666, },
        { "signal2_type", &spufs_signal2_type, 0666, },
        { "cntl", &spufs_cntl_fops,  0666, },
index 5bd90a7eb763327e06300d7dd51aef3eb6ff4123..f0b5ff17d8609a83b2f68ed928111e13f0daf046 100644 (file)
@@ -419,7 +419,7 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
         * For the moment only implement delivery to all cpus or one cpu.
         * Get current irq_server for the given irq
         */
-       irq_server = get_irq_server(irq, 1);
+       irq_server = get_irq_server(virq, 1);
        if (irq_server == -1) {
                char cpulist[128];
                cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask);
index 4f67b89ba1d0a0bcf532229b8027962ccce93a95..dd5417aec1b456db3fe29024eee35e7fece31167 100644 (file)
@@ -395,4 +395,4 @@ uint cpm_dpram_phys(u8* addr)
 {
        return (dpram_pbase + (uint)(addr - dpram_vbase));
 }
-EXPORT_SYMBOL(cpm_dpram_addr);
+EXPORT_SYMBOL(cpm_dpram_phys);
index 7088428e1fe22e32e9abd27bbb015b5639123d6c..9da880be4dc0f408df58f39c1424b0eee31117f4 100644 (file)
@@ -459,7 +459,7 @@ EXPORT_SYMBOL(cpm_dpdump);
 
 void *cpm_dpram_addr(unsigned long offset)
 {
-       return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
+       return (void *)(dpram_vbase + offset);
 }
 EXPORT_SYMBOL(cpm_dpram_addr);
 
index e2d02fd13f35f6284d7f54fe4352d60b9279dd12..d850785b20808716b5d843af7877712db1b9dc7d 100644 (file)
@@ -156,6 +156,8 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
        dev->prom_node = dp;
 
        regs = of_get_property(dp, "reg", &len);
+       if (!regs)
+               len = 0;
        if (len % sizeof(struct linux_prom_registers)) {
                prom_printf("UGH: proplen for %s was %d, need multiple of %d\n",
                            dev->prom_node->name, len,
index f205fc7cbcd0da686c38f732be25bf52740ee58d..d208cc7804f234583fc8e457f871a96610dfede6 100644 (file)
@@ -177,7 +177,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
                        get_user(c,p++);
                } while (c);
        }
-       put_user(NULL,argv);
+       put_user(0,argv);
        current->mm->arg_end = current->mm->env_start = (unsigned long) p;
        while (envc-->0) {
                char c;
@@ -186,7 +186,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
                        get_user(c,p++);
                } while (c);
        }
-       put_user(NULL,envp);
+       put_user(0,envp);
        current->mm->env_end = (unsigned long) p;
        return sp;
 }
index bc9ae36f7a43cd1de77cf6469762f21fc4ce6bd3..04ab81cb4f483f24e78c6d74c40e044d29383203 100644 (file)
@@ -375,7 +375,10 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de
                dev->num_addrs = 0;
                dev->num_irqs = 0;
        } else {
-               (void) of_get_property(dp, "reg", &len);
+               const int *regs = of_get_property(dp, "reg", &len);
+
+               if (!regs)
+                       len = 0;
                dev->num_addrs = len / sizeof(struct linux_prom_registers);
 
                for (i = 0; i < dev->num_addrs; i++)
index 2f61c4b1259606ee45ab004cd8e10d91bcb3b5ae..c76bfbb7da085cd5538391713c13e9b86f9ed148 100644 (file)
@@ -264,7 +264,7 @@ static int sun4v_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
        unsigned int func = PCI_FUNC(devfn);
        unsigned long ret;
 
-       if (bus_dev == pbm->pci_bus && devfn == 0x00)
+       if (!bus && devfn == 0x00)
                return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where,
                                                    size, value);
        if (config_out_of_range(pbm, bus, devfn, where)) {
@@ -300,7 +300,7 @@ static int sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
        unsigned int func = PCI_FUNC(devfn);
        unsigned long ret;
 
-       if (bus_dev == pbm->pci_bus && devfn == 0x00)
+       if (!bus && devfn == 0x00)
                return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where,
                                                     size, value);
        if (config_out_of_range(pbm, bus, devfn, where)) {
index 0614dff63d7c095b0e80711f09b336583439c0df..a246e962e5a73591d546d8d6c7ac2f950ad075d4 100644 (file)
@@ -1046,7 +1046,8 @@ static void __init irq_trans_init(struct device_node *dp)
        if (!strcmp(dp->name, "fhc") &&
            !strcmp(dp->parent->name, "central"))
                return central_irq_trans_init(dp);
-       if (!strcmp(dp->name, "virtual-devices"))
+       if (!strcmp(dp->name, "virtual-devices") ||
+           !strcmp(dp->name, "niu"))
                return sun4v_vdev_irq_trans_init(dp);
 }
 
index b84c49e3697c608c826c529739328ae633a860a8..c73b7a48b0369ae970edf7d103672621eacb2e21 100644 (file)
@@ -353,6 +353,8 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
        int timeout, ret;
 
        p = fork_idle(cpu);
+       if (IS_ERR(p))
+               return PTR_ERR(p);
        callin_flag = 0;
        cpu_new_thread = task_thread_info(p);
 
index 1550ac5673da99d4db56bd76c6afb9f9664ad726..0c1ee619d814c1f1e2330ef276c6271356fbe5c5 100644 (file)
@@ -292,7 +292,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
        }
        vdev->dp = dp;
 
-       printk(KERN_ERR "VIO: Adding device %s\n", vdev->dev.bus_id);
+       printk(KERN_INFO "VIO: Adding device %s\n", vdev->dev.bus_id);
 
        err = device_register(&vdev->dev);
        if (err) {
@@ -342,8 +342,33 @@ static struct mdesc_notifier_client vio_device_notifier = {
        .node_name      = "virtual-device-port",
 };
 
+/* We are only interested in domain service ports under the
+ * "domain-services" node.  On control nodes there is another port
+ * under "openboot" that we should not mess with as aparently that is
+ * reserved exclusively for OBP use.
+ */
+static void vio_add_ds(struct mdesc_handle *hp, u64 node)
+{
+       int found;
+       u64 a;
+
+       found = 0;
+       mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) {
+               u64 target = mdesc_arc_target(hp, a);
+               const char *name = mdesc_node_name(hp, target);
+
+               if (!strcmp(name, "domain-services")) {
+                       found = 1;
+                       break;
+               }
+       }
+
+       if (found)
+               (void) vio_create_one(hp, node, &root_vdev->dev);
+}
+
 static struct mdesc_notifier_client vio_ds_notifier = {
-       .add            = vio_add,
+       .add            = vio_add_ds,
        .remove         = vio_remove,
        .node_name      = "domain-services-port",
 };
index 2d93456f76dd1f957fc1dfe90b0f05a00a9e4b3a..e7f433f71b42bd473b06e22e7b70e0e40e111c9b 100644 (file)
@@ -1,6 +1,6 @@
 /* NGcopy_from_user.S: Niagara optimized copy from userspace.
  *
- * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
+ * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
  */
 
 #define EX_LD(x)               \
@@ -8,8 +8,8 @@
        .section .fixup;        \
        .align 4;               \
 99:    wr      %g0, ASI_AIUS, %asi;\
-       retl;                   \
-        mov    1, %o0;         \
+       ret                   \
+        restore %g0, 1, %o0;   \
        .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
@@ -24,7 +24,7 @@
 #define LOAD(type,addr,dest)   type##a [addr] ASI_AIUS, dest
 #define LOAD_TWIN(addr_reg,dest0,dest1)        \
        ldda [addr_reg] ASI_BLK_INIT_QUAD_LDD_AIUS, dest0
-#define EX_RETVAL(x)           0
+#define EX_RETVAL(x)           %g0
 
 #ifdef __KERNEL__
 #define PREAMBLE                                       \
index 34112d5054ef9895e21d365284ce76b0042bbab0..6ea01c5532a0a87e30f4a737dee0a44b55da3df1 100644 (file)
@@ -1,6 +1,6 @@
 /* NGcopy_to_user.S: Niagara optimized copy to userspace.
  *
- * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
+ * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
  */
 
 #define EX_ST(x)               \
@@ -8,8 +8,8 @@
        .section .fixup;        \
        .align 4;               \
 99:    wr      %g0, ASI_AIUS, %asi;\
-       retl;                   \
-        mov    1, %o0;         \
+       ret                   \
+        restore %g0, 1, %o0;   \
        .section __ex_table,"a";\
        .align 4;               \
        .word 98b, 99b;         \
@@ -23,7 +23,7 @@
 #define FUNC_NAME              NGcopy_to_user
 #define STORE(type,src,addr)   type##a src, [addr] ASI_AIUS
 #define STORE_ASI              ASI_BLK_INIT_QUAD_LDD_AIUS
-#define EX_RETVAL(x)           0
+#define EX_RETVAL(x)           %g0
 
 #ifdef __KERNEL__
        /* Writing to %asi is _expensive_ so we hardcode it.
index 66063a9a66b87146524809d2fcd932e7107bda08..96a14caf6966282cab2d97071f7c3837b2a6727a 100644 (file)
@@ -1,6 +1,6 @@
 /* NGmemcpy.S: Niagara optimized memcpy.
  *
- * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
+ * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
  */
 
 #ifdef __KERNEL__
        wr      %g0, ASI_PNF, %asi
 #endif
 
+#ifdef __sparc_v9__
+#define SAVE_AMOUNT    128
+#else
+#define SAVE_AMOUNT    64
+#endif
+
 #ifndef STORE_ASI
 #define STORE_ASI      ASI_BLK_INIT_QUAD_LDD_P
 #endif
 #endif
 
 #ifndef STORE_INIT
+#ifndef SIMULATE_NIAGARA_ON_NON_NIAGARA
 #define STORE_INIT(src,addr)   stxa src, [addr] %asi
+#else
+#define STORE_INIT(src,addr)   stx src, [addr + 0x00]
+#endif
 #endif
 
 #ifndef FUNC_NAME
 
        .globl  FUNC_NAME
        .type   FUNC_NAME,#function
-FUNC_NAME:     /* %o0=dst, %o1=src, %o2=len */
-       srlx            %o2, 31, %g2
+FUNC_NAME:     /* %i0=dst, %i1=src, %i2=len */
+       PREAMBLE
+       save            %sp, -SAVE_AMOUNT, %sp
+       srlx            %i2, 31, %g2
        cmp             %g2, 0
        tne             %xcc, 5
-       PREAMBLE
-       mov             %o0, GLOBAL_SPARE
-       cmp             %o2, 0
+       mov             %i0, %o0
+       cmp             %i2, 0
        be,pn           %XCC, 85f
-        or             %o0, %o1, %o3
-       cmp             %o2, 16
+        or             %o0, %i1, %i3
+       cmp             %i2, 16
        blu,a,pn        %XCC, 80f
-        or             %o3, %o2, %o3
+        or             %i3, %i2, %i3
 
        /* 2 blocks (128 bytes) is the minimum we can do the block
         * copy with.  We need to ensure that we'll iterate at least
@@ -93,31 +104,31 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
         * to (64 - 1) bytes from the length before we perform the
         * block copy loop.
         */
-       cmp             %o2, (2 * 64)
+       cmp             %i2, (2 * 64)
        blu,pt          %XCC, 70f
-        andcc          %o3, 0x7, %g0
+        andcc          %i3, 0x7, %g0
 
        /* %o0: dst
-        * %o1: src
-        * %o2: len  (known to be >= 128)
+        * %i1: src
+        * %i2: len  (known to be >= 128)
         *
-        * The block copy loops will use %o4/%o5,%g2/%g3 as
+        * The block copy loops will use %i4/%i5,%g2/%g3 as
         * temporaries while copying the data.
         */
 
-       LOAD(prefetch, %o1, #one_read)
+       LOAD(prefetch, %i1, #one_read)
        wr              %g0, STORE_ASI, %asi
 
        /* Align destination on 64-byte boundary.  */
-       andcc           %o0, (64 - 1), %o4
+       andcc           %o0, (64 - 1), %i4
        be,pt           %XCC, 2f
-        sub            %o4, 64, %o4
-       sub             %g0, %o4, %o4   ! bytes to align dst
-       sub             %o2, %o4, %o2
-1:     subcc           %o4, 1, %o4
-       EX_LD(LOAD(ldub, %o1, %g1))
+        sub            %i4, 64, %i4
+       sub             %g0, %i4, %i4   ! bytes to align dst
+       sub             %i2, %i4, %i2
+1:     subcc           %i4, 1, %i4
+       EX_LD(LOAD(ldub, %i1, %g1))
        EX_ST(STORE(stb, %g1, %o0))
-       add             %o1, 1, %o1
+       add             %i1, 1, %i1
        bne,pt          %XCC, 1b
        add             %o0, 1, %o0
 
@@ -136,111 +147,155 @@ FUNC_NAME:      /* %o0=dst, %o1=src, %o2=len */
         * aligned store data at a time, this is easy to ensure.
         */
 2:
-       andcc           %o1, (16 - 1), %o4
-       andn            %o2, (64 - 1), %g1      ! block copy loop iterator
-       sub             %o2, %g1, %o2           ! final sub-block copy bytes
+       andcc           %i1, (16 - 1), %i4
+       andn            %i2, (64 - 1), %g1      ! block copy loop iterator
        be,pt           %XCC, 50f
-        cmp            %o4, 8
-       be,a,pt         %XCC, 10f
-        sub            %o1, 0x8, %o1
+        sub            %i2, %g1, %i2           ! final sub-block copy bytes
+
+       cmp             %i4, 8
+       be,pt           %XCC, 10f
+        sub            %i1, %i4, %i1
 
        /* Neither 8-byte nor 16-byte aligned, shift and mask.  */
-       mov             %g1, %o4
-       and             %o1, 0x7, %g1
-       sll             %g1, 3, %g1
-       mov             64, %o3
-       andn            %o1, 0x7, %o1
-       EX_LD(LOAD(ldx, %o1, %g2))
-       sub             %o3, %g1, %o3
-       sllx            %g2, %g1, %g2
+       and             %i4, 0x7, GLOBAL_SPARE
+       sll             GLOBAL_SPARE, 3, GLOBAL_SPARE
+       mov             64, %i5
+       EX_LD(LOAD_TWIN(%i1, %g2, %g3))
+       sub             %i5, GLOBAL_SPARE, %i5
+       mov             16, %o4
+       mov             32, %o5
+       mov             48, %o7
+       mov             64, %i3
+
+       bg,pn           %XCC, 9f
+        nop
 
-#define SWIVEL_ONE_DWORD(SRC, TMP1, TMP2, PRE_VAL, PRE_SHIFT, POST_SHIFT, DST)\
-       EX_LD(LOAD(ldx, SRC, TMP1)); \
-       srlx            TMP1, PRE_SHIFT, TMP2; \
-       or              TMP2, PRE_VAL, TMP2; \
-       EX_ST(STORE_INIT(TMP2, DST)); \
-       sllx            TMP1, POST_SHIFT, PRE_VAL;
-
-1:     add             %o1, 0x8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x00)
-       add             %o1, 0x8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x08)
-       add             %o1, 0x8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x10)
-       add             %o1, 0x8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x18)
-       add             %o1, 32, %o1
-       LOAD(prefetch, %o1, #one_read)
-       sub             %o1, 32 - 8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x20)
-       add             %o1, 8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x28)
-       add             %o1, 8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x30)
-       add             %o1, 8, %o1
-       SWIVEL_ONE_DWORD(%o1, %g3, %o5, %g2, %o3, %g1, %o0 + 0x38)
-       subcc           %o4, 64, %o4
-       bne,pt          %XCC, 1b
+#define MIX_THREE_WORDS(WORD1, WORD2, WORD3, PRE_SHIFT, POST_SHIFT, TMP) \
+       sllx            WORD1, POST_SHIFT, WORD1; \
+       srlx            WORD2, PRE_SHIFT, TMP; \
+       sllx            WORD2, POST_SHIFT, WORD2; \
+       or              WORD1, TMP, WORD1; \
+       srlx            WORD3, PRE_SHIFT, TMP; \
+       or              WORD2, TMP, WORD2;
+
+8:     EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3))
+       MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1)
+       LOAD(prefetch, %i1 + %i3, #one_read)
+
+       EX_ST(STORE_INIT(%g2, %o0 + 0x00))
+       EX_ST(STORE_INIT(%g3, %o0 + 0x08))
+
+       EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3))
+       MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1)
+
+       EX_ST(STORE_INIT(%o2, %o0 + 0x10))
+       EX_ST(STORE_INIT(%o3, %o0 + 0x18))
+
+       EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
+       MIX_THREE_WORDS(%g2, %g3, %o2, %i5, GLOBAL_SPARE, %o1)
+
+       EX_ST(STORE_INIT(%g2, %o0 + 0x20))
+       EX_ST(STORE_INIT(%g3, %o0 + 0x28))
+
+       EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3))
+       add             %i1, 64, %i1
+       MIX_THREE_WORDS(%o2, %o3, %g2, %i5, GLOBAL_SPARE, %o1)
+
+       EX_ST(STORE_INIT(%o2, %o0 + 0x30))
+       EX_ST(STORE_INIT(%o3, %o0 + 0x38))
+
+       subcc           %g1, 64, %g1
+       bne,pt          %XCC, 8b
         add            %o0, 64, %o0
 
-#undef SWIVEL_ONE_DWORD
+       ba,pt           %XCC, 60f
+        add            %i1, %i4, %i1
+
+9:     EX_LD(LOAD_TWIN(%i1 + %o4, %o2, %o3))
+       MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1)
+       LOAD(prefetch, %i1 + %i3, #one_read)
+
+       EX_ST(STORE_INIT(%g3, %o0 + 0x00))
+       EX_ST(STORE_INIT(%o2, %o0 + 0x08))
+
+       EX_LD(LOAD_TWIN(%i1 + %o5, %g2, %g3))
+       MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1)
+
+       EX_ST(STORE_INIT(%o3, %o0 + 0x10))
+       EX_ST(STORE_INIT(%g2, %o0 + 0x18))
+
+       EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
+       MIX_THREE_WORDS(%g3, %o2, %o3, %i5, GLOBAL_SPARE, %o1)
+
+       EX_ST(STORE_INIT(%g3, %o0 + 0x20))
+       EX_ST(STORE_INIT(%o2, %o0 + 0x28))
+
+       EX_LD(LOAD_TWIN(%i1 + %i3, %g2, %g3))
+       add             %i1, 64, %i1
+       MIX_THREE_WORDS(%o3, %g2, %g3, %i5, GLOBAL_SPARE, %o1)
+
+       EX_ST(STORE_INIT(%o3, %o0 + 0x30))
+       EX_ST(STORE_INIT(%g2, %o0 + 0x38))
+
+       subcc           %g1, 64, %g1
+       bne,pt          %XCC, 9b
+        add            %o0, 64, %o0
 
-       srl             %g1, 3, %g1
        ba,pt           %XCC, 60f
-        add            %o1, %g1, %o1
+        add            %i1, %i4, %i1
 
 10:    /* Destination is 64-byte aligned, source was only 8-byte
         * aligned but it has been subtracted by 8 and we perform
         * one twin load ahead, then add 8 back into source when
         * we finish the loop.
         */
-       EX_LD(LOAD_TWIN(%o1, %o4, %o5))
-1:     add             %o1, 16, %o1
-       EX_LD(LOAD_TWIN(%o1, %g2, %g3))
-       add             %o1, 16 + 32, %o1
-       LOAD(prefetch, %o1, #one_read)
-       sub             %o1, 32, %o1
+       EX_LD(LOAD_TWIN(%i1, %o4, %o5))
+       mov     16, %o7
+       mov     32, %g2
+       mov     48, %g3
+       mov     64, %o1
+1:     EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
+       LOAD(prefetch, %i1 + %o1, #one_read)
        EX_ST(STORE_INIT(%o5, %o0 + 0x00))      ! initializes cache line
-       EX_ST(STORE_INIT(%g2, %o0 + 0x08))
-       EX_LD(LOAD_TWIN(%o1, %o4, %o5))
-       add             %o1, 16, %o1
-       EX_ST(STORE_INIT(%g3, %o0 + 0x10))
+       EX_ST(STORE_INIT(%o2, %o0 + 0x08))
+       EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5))
+       EX_ST(STORE_INIT(%o3, %o0 + 0x10))
        EX_ST(STORE_INIT(%o4, %o0 + 0x18))
-       EX_LD(LOAD_TWIN(%o1, %g2, %g3))
-       add             %o1, 16, %o1
+       EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3))
        EX_ST(STORE_INIT(%o5, %o0 + 0x20))
-       EX_ST(STORE_INIT(%g2, %o0 + 0x28))
-       EX_LD(LOAD_TWIN(%o1, %o4, %o5))
-       EX_ST(STORE_INIT(%g3, %o0 + 0x30))
+       EX_ST(STORE_INIT(%o2, %o0 + 0x28))
+       EX_LD(LOAD_TWIN(%i1 + %o1, %o4, %o5))
+       add             %i1, 64, %i1
+       EX_ST(STORE_INIT(%o3, %o0 + 0x30))
        EX_ST(STORE_INIT(%o4, %o0 + 0x38))
        subcc           %g1, 64, %g1
        bne,pt          %XCC, 1b
         add            %o0, 64, %o0
 
        ba,pt           %XCC, 60f
-        add            %o1, 0x8, %o1
+        add            %i1, 0x8, %i1
 
 50:    /* Destination is 64-byte aligned, and source is 16-byte
         * aligned.
         */
-1:     EX_LD(LOAD_TWIN(%o1, %o4, %o5))
-       add     %o1, 16, %o1
-       EX_LD(LOAD_TWIN(%o1, %g2, %g3))
-       add     %o1, 16 + 32, %o1
-       LOAD(prefetch, %o1, #one_read)
-       sub     %o1, 32, %o1
+       mov     16, %o7
+       mov     32, %g2
+       mov     48, %g3
+       mov     64, %o1
+1:     EX_LD(LOAD_TWIN(%i1 + %g0, %o4, %o5))
+       EX_LD(LOAD_TWIN(%i1 + %o7, %o2, %o3))
+       LOAD(prefetch, %i1 + %o1, #one_read)
        EX_ST(STORE_INIT(%o4, %o0 + 0x00))      ! initializes cache line
        EX_ST(STORE_INIT(%o5, %o0 + 0x08))
-       EX_LD(LOAD_TWIN(%o1, %o4, %o5))
-       add     %o1, 16, %o1
-       EX_ST(STORE_INIT(%g2, %o0 + 0x10))
-       EX_ST(STORE_INIT(%g3, %o0 + 0x18))
-       EX_LD(LOAD_TWIN(%o1, %g2, %g3))
-       add     %o1, 16, %o1
+       EX_LD(LOAD_TWIN(%i1 + %g2, %o4, %o5))
+       EX_ST(STORE_INIT(%o2, %o0 + 0x10))
+       EX_ST(STORE_INIT(%o3, %o0 + 0x18))
+       EX_LD(LOAD_TWIN(%i1 + %g3, %o2, %o3))
+       add     %i1, 64, %i1
        EX_ST(STORE_INIT(%o4, %o0 + 0x20))
        EX_ST(STORE_INIT(%o5, %o0 + 0x28))
-       EX_ST(STORE_INIT(%g2, %o0 + 0x30))
-       EX_ST(STORE_INIT(%g3, %o0 + 0x38))
+       EX_ST(STORE_INIT(%o2, %o0 + 0x30))
+       EX_ST(STORE_INIT(%o3, %o0 + 0x38))
        subcc   %g1, 64, %g1
        bne,pt  %XCC, 1b
         add    %o0, 64, %o0
@@ -249,47 +304,47 @@ FUNC_NAME:        /* %o0=dst, %o1=src, %o2=len */
 60:    
        membar          #Sync
 
-       /* %o2 contains any final bytes still needed to be copied
+       /* %i2 contains any final bytes still needed to be copied
         * over. If anything is left, we copy it one byte at a time.
         */
-       RESTORE_ASI(%o3)
-       brz,pt          %o2, 85f
-        sub            %o0, %o1, %o3
+       RESTORE_ASI(%i3)
+       brz,pt          %i2, 85f
+        sub            %o0, %i1, %i3
        ba,a,pt         %XCC, 90f
 
        .align          64
 70: /* 16 < len <= 64 */
        bne,pn          %XCC, 75f
-        sub            %o0, %o1, %o3
+        sub            %o0, %i1, %i3
 
 72:
-       andn            %o2, 0xf, %o4
-       and             %o2, 0xf, %o2
-1:     subcc           %o4, 0x10, %o4
-       EX_LD(LOAD(ldx, %o1, %o5))
-       add             %o1, 0x08, %o1
-       EX_LD(LOAD(ldx, %o1, %g1))
-       sub             %o1, 0x08, %o1
-       EX_ST(STORE(stx, %o5, %o1 + %o3))
-       add             %o1, 0x8, %o1
-       EX_ST(STORE(stx, %g1, %o1 + %o3))
+       andn            %i2, 0xf, %i4
+       and             %i2, 0xf, %i2
+1:     subcc           %i4, 0x10, %i4
+       EX_LD(LOAD(ldx, %i1, %o4))
+       add             %i1, 0x08, %i1
+       EX_LD(LOAD(ldx, %i1, %g1))
+       sub             %i1, 0x08, %i1
+       EX_ST(STORE(stx, %o4, %i1 + %i3))
+       add             %i1, 0x8, %i1
+       EX_ST(STORE(stx, %g1, %i1 + %i3))
        bgu,pt          %XCC, 1b
-        add            %o1, 0x8, %o1
-73:    andcc           %o2, 0x8, %g0
+        add            %i1, 0x8, %i1
+73:    andcc           %i2, 0x8, %g0
        be,pt           %XCC, 1f
         nop
-       sub             %o2, 0x8, %o2
-       EX_LD(LOAD(ldx, %o1, %o5))
-       EX_ST(STORE(stx, %o5, %o1 + %o3))
-       add             %o1, 0x8, %o1
-1:     andcc           %o2, 0x4, %g0
+       sub             %i2, 0x8, %i2
+       EX_LD(LOAD(ldx, %i1, %o4))
+       EX_ST(STORE(stx, %o4, %i1 + %i3))
+       add             %i1, 0x8, %i1
+1:     andcc           %i2, 0x4, %g0
        be,pt           %XCC, 1f
         nop
-       sub             %o2, 0x4, %o2
-       EX_LD(LOAD(lduw, %o1, %o5))
-       EX_ST(STORE(stw, %o5, %o1 + %o3))
-       add             %o1, 0x4, %o1
-1:     cmp             %o2, 0
+       sub             %i2, 0x4, %i2
+       EX_LD(LOAD(lduw, %i1, %i5))
+       EX_ST(STORE(stw, %i5, %i1 + %i3))
+       add             %i1, 0x4, %i1
+1:     cmp             %i2, 0
        be,pt           %XCC, 85f
         nop
        ba,pt           %xcc, 90f
@@ -300,71 +355,71 @@ FUNC_NAME:        /* %o0=dst, %o1=src, %o2=len */
        sub             %g1, 0x8, %g1
        be,pn           %icc, 2f
         sub            %g0, %g1, %g1
-       sub             %o2, %g1, %o2
+       sub             %i2, %g1, %i2
 
 1:     subcc           %g1, 1, %g1
-       EX_LD(LOAD(ldub, %o1, %o5))
-       EX_ST(STORE(stb, %o5, %o1 + %o3))
+       EX_LD(LOAD(ldub, %i1, %i5))
+       EX_ST(STORE(stb, %i5, %i1 + %i3))
        bgu,pt          %icc, 1b
-        add            %o1, 1, %o1
+        add            %i1, 1, %i1
 
-2:     add             %o1, %o3, %o0
-       andcc           %o1, 0x7, %g1
+2:     add             %i1, %i3, %o0
+       andcc           %i1, 0x7, %g1
        bne,pt          %icc, 8f
         sll            %g1, 3, %g1
 
-       cmp             %o2, 16
+       cmp             %i2, 16
        bgeu,pt         %icc, 72b
         nop
        ba,a,pt         %xcc, 73b
 
-8:     mov             64, %o3
-       andn            %o1, 0x7, %o1
-       EX_LD(LOAD(ldx, %o1, %g2))
-       sub             %o3, %g1, %o3
-       andn            %o2, 0x7, %o4
+8:     mov             64, %i3
+       andn            %i1, 0x7, %i1
+       EX_LD(LOAD(ldx, %i1, %g2))
+       sub             %i3, %g1, %i3
+       andn            %i2, 0x7, %i4
        sllx            %g2, %g1, %g2
-1:     add             %o1, 0x8, %o1
-       EX_LD(LOAD(ldx, %o1, %g3))
-       subcc           %o4, 0x8, %o4
-       srlx            %g3, %o3, %o5
-       or              %o5, %g2, %o5
-       EX_ST(STORE(stx, %o5, %o0))
+1:     add             %i1, 0x8, %i1
+       EX_LD(LOAD(ldx, %i1, %g3))
+       subcc           %i4, 0x8, %i4
+       srlx            %g3, %i3, %i5
+       or              %i5, %g2, %i5
+       EX_ST(STORE(stx, %i5, %o0))
        add             %o0, 0x8, %o0
        bgu,pt          %icc, 1b
         sllx           %g3, %g1, %g2
 
        srl             %g1, 3, %g1
-       andcc           %o2, 0x7, %o2
+       andcc           %i2, 0x7, %i2
        be,pn           %icc, 85f
-        add            %o1, %g1, %o1
+        add            %i1, %g1, %i1
        ba,pt           %xcc, 90f
-        sub            %o0, %o1, %o3
+        sub            %o0, %i1, %i3
 
        .align          64
 80: /* 0 < len <= 16 */
-       andcc           %o3, 0x3, %g0
+       andcc           %i3, 0x3, %g0
        bne,pn          %XCC, 90f
-        sub            %o0, %o1, %o3
+        sub            %o0, %i1, %i3
 
 1:
-       subcc           %o2, 4, %o2
-       EX_LD(LOAD(lduw, %o1, %g1))
-       EX_ST(STORE(stw, %g1, %o1 + %o3))
+       subcc           %i2, 4, %i2
+       EX_LD(LOAD(lduw, %i1, %g1))
+       EX_ST(STORE(stw, %g1, %i1 + %i3))
        bgu,pt          %XCC, 1b
-        add            %o1, 4, %o1
+        add            %i1, 4, %i1
 
-85:    retl
-        mov            EX_RETVAL(GLOBAL_SPARE), %o0
+85:    ret
+        restore        EX_RETVAL(%i0), %g0, %o0
 
        .align          32
 90:
-       subcc           %o2, 1, %o2
-       EX_LD(LOAD(ldub, %o1, %g1))
-       EX_ST(STORE(stb, %g1, %o1 + %o3))
+       subcc           %i2, 1, %i2
+       EX_LD(LOAD(ldub, %i1, %g1))
+       EX_ST(STORE(stb, %g1, %i1 + %i3))
        bgu,pt          %XCC, 90b
-        add            %o1, 1, %o1
-       retl
-        mov            EX_RETVAL(GLOBAL_SPARE), %o0
+        add            %i1, 1, %i1
+       ret
+        restore        EX_RETVAL(%i0), %g0, %o0
 
        .size           FUNC_NAME, .-FUNC_NAME
index 2497554b7b9547a7d176d658ae0f490d517d7144..12d4148dba39aa186aeddcff09be9a8c046a164e 100644 (file)
@@ -9,4 +9,4 @@
 
 #define old_mmap old_mmap_i386
 
-#include "../../i386/kernel/syscall_table.S"
+#include "../../x86/kernel/syscall_table_32.S"
index 5133988d36101c14d87155ed10ae29c28de836de..71b2ae4ad5de17985ee73b97bc43088f67ef2167 100644 (file)
@@ -36,7 +36,7 @@
 
 #define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
 #undef _ASM_X86_64_UNISTD_H_
-#include <asm-x86_64/unistd.h>
+#include <asm-x86/unistd_64.h>
 
 #undef __SYSCALL
 #define __SYSCALL(nr, sym) [ nr ] = sym,
@@ -49,5 +49,5 @@ extern void sys_ni_syscall(void);
 sys_call_ptr_t sys_call_table[UM_NR_syscall_max+1] __cacheline_aligned = {
        /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
        [0 ... UM_NR_syscall_max] = &sys_ni_syscall,
-#include <asm-x86_64/unistd.h>
+#include <asm-x86/unistd_64.h>
 };
similarity index 99%
rename from arch/i386/boot/Makefile
rename to arch/x86/boot/Makefile
index 93386a4e40b49bfcb1b2b8c0be80251594fad283..cb1035f2b7e93654f534d84f1bde58954646a64c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# arch/i386/boot/Makefile
+# arch/x86/boot/Makefile
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
similarity index 100%
rename from arch/i386/boot/a20.c
rename to arch/x86/boot/a20.c
similarity index 100%
rename from arch/i386/boot/apm.c
rename to arch/x86/boot/apm.c
similarity index 100%
rename from arch/i386/boot/boot.h
rename to arch/x86/boot/boot.h
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
new file mode 100644 (file)
index 0000000..52c1db8
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/boot/compressed/Makefile_32
+else
+include ${srctree}/arch/x86/boot/compressed/Makefile_64
+endif
similarity index 80%
rename from arch/i386/boot/compressed/Makefile
rename to arch/x86/boot/compressed/Makefile_32
index 189fa1dbefcc27ece79bac59fc2d11b83d09e38f..22613c652d22d7a6ca5e250f8bfb8c11225ca144 100644 (file)
@@ -1,10 +1,10 @@
 #
-# linux/arch/i386/boot/compressed/Makefile
+# linux/arch/x86/boot/compressed/Makefile
 #
 # create a compressed vmlinux image from the original vmlinux
 #
 
-targets                := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o \
+targets                := vmlinux vmlinux.bin vmlinux.bin.gz head_32.o misc_32.o piggy.o \
                        vmlinux.bin.all vmlinux.relocs
 EXTRA_AFLAGS   := -traditional
 
@@ -17,7 +17,7 @@ CFLAGS  := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \
           $(call cc-option,-fno-stack-protector)
 LDFLAGS := -m elf_i386
 
-$(obj)/vmlinux: $(src)/vmlinux.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
+$(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/misc_32.o $(obj)/piggy.o FORCE
        $(call if_changed,ld)
        @:
 
@@ -46,5 +46,5 @@ endif
 
 LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
 
-$(obj)/piggy.o: $(src)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
+$(obj)/piggy.o: $(src)/vmlinux_32.scr $(obj)/vmlinux.bin.gz FORCE
        $(call if_changed,ld)
similarity index 68%
rename from arch/x86_64/boot/compressed/Makefile
rename to arch/x86/boot/compressed/Makefile_64
index 877c0bdbbc67006473a1ca9754721f186910bf61..dc6b3380cc45c27933cd76b740aaf9aefa105701 100644 (file)
@@ -1,10 +1,10 @@
 #
-# linux/arch/x86_64/boot/compressed/Makefile
+# linux/arch/x86/boot/compressed/Makefile
 #
 # create a compressed vmlinux image from the original vmlinux
 #
 
-targets                := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
+targets                := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o
 
 CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2  \
          -fno-strict-aliasing -fPIC -mcmodel=small \
@@ -14,7 +14,7 @@ AFLAGS  := $(CFLAGS) -D__ASSEMBLY__
 LDFLAGS := -m elf_x86_64
 
 LDFLAGS_vmlinux := -T
-$(obj)/vmlinux: $(src)/vmlinux.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
+$(obj)/vmlinux: $(src)/vmlinux_64.lds $(obj)/head_64.o $(obj)/misc_64.o $(obj)/piggy.o FORCE
        $(call if_changed,ld)
        @:
 
@@ -26,5 +26,5 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
 
 LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
 
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
+$(obj)/piggy.o: $(obj)/vmlinux_64.scr $(obj)/vmlinux.bin.gz FORCE
        $(call if_changed,ld)
similarity index 99%
rename from arch/x86_64/boot/compressed/head.S
rename to arch/x86/boot/compressed/head_64.S
index 9fd8030cc54ff2e48b05004ddf34e577fb494a85..49467640751fc0eb0a67c96ca7e9fa0b3d973fb0 100644 (file)
@@ -174,7 +174,7 @@ no_longmode:
        hlt
        jmp     1b
 
-#include "../../kernel/verify_cpu.S"
+#include "../../kernel/verify_cpu_64.S"
 
        /* Be careful here startup_64 needs to be at a predictable
         * address so I can export it in an ELF header.  Bootloaders
similarity index 100%
rename from arch/i386/boot/copy.S
rename to arch/x86/boot/copy.S
similarity index 100%
rename from arch/i386/boot/cpu.c
rename to arch/x86/boot/cpu.c
similarity index 100%
rename from arch/i386/boot/edd.c
rename to arch/x86/boot/edd.c
similarity index 100%
rename from arch/i386/boot/main.c
rename to arch/x86/boot/main.c
similarity index 100%
rename from arch/i386/boot/mca.c
rename to arch/x86/boot/mca.c
similarity index 69%
rename from arch/i386/boot/memory.c
rename to arch/x86/boot/memory.c
index 1a2e62db8bed48df0e613066c9efb69f2509d0e0..378353956b5dfc86469b66419b9680e1770a7410 100644 (file)
@@ -20,6 +20,7 @@
 
 static int detect_memory_e820(void)
 {
+       int count = 0;
        u32 next = 0;
        u32 size, id;
        u8 err;
@@ -27,20 +28,33 @@ static int detect_memory_e820(void)
 
        do {
                size = sizeof(struct e820entry);
-               id = SMAP;
+
+               /* Important: %edx is clobbered by some BIOSes,
+                  so it must be either used for the error output
+                  or explicitly marked clobbered. */
                asm("int $0x15; setc %0"
-                   : "=am" (err), "+b" (next), "+d" (id), "+c" (size),
+                   : "=d" (err), "+b" (next), "=a" (id), "+c" (size),
                      "=m" (*desc)
-                   : "D" (desc), "a" (0xe820));
+                   : "D" (desc), "d" (SMAP), "a" (0xe820));
+
+               /* Some BIOSes stop returning SMAP in the middle of
+                  the search loop.  We don't know exactly how the BIOS
+                  screwed up the map at that point, we might have a
+                  partial map, the full map, or complete garbage, so
+                  just return failure. */
+               if (id != SMAP) {
+                       count = 0;
+                       break;
+               }
 
-               if (err || id != SMAP)
+               if (err)
                        break;
 
-               boot_params.e820_entries++;
+               count++;
                desc++;
-       } while (next && boot_params.e820_entries < E820MAX);
+       } while (next && count < E820MAX);
 
-       return boot_params.e820_entries;
+       return boot_params.e820_entries = count;
 }
 
 static int detect_memory_e801(void)
@@ -89,11 +103,16 @@ static int detect_memory_88(void)
 
 int detect_memory(void)
 {
+       int err = -1;
+
        if (detect_memory_e820() > 0)
-               return 0;
+               err = 0;
 
        if (!detect_memory_e801())
-               return 0;
+               err = 0;
+
+       if (!detect_memory_88())
+               err = 0;
 
-       return detect_memory_88();
+       return err;
 }
similarity index 100%
rename from arch/i386/boot/pm.c
rename to arch/x86/boot/pm.c
similarity index 100%
rename from arch/i386/boot/tty.c
rename to arch/x86/boot/tty.c
similarity index 100%
rename from arch/i386/boot/vesa.h
rename to arch/x86/boot/vesa.h
similarity index 100%
rename from arch/i386/boot/video.c
rename to arch/x86/boot/video.c
similarity index 100%
rename from arch/i386/boot/video.h
rename to arch/x86/boot/video.h
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
new file mode 100644 (file)
index 0000000..18dcdc6
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/crypto/Makefile_32
+else
+include ${srctree}/arch/x86/crypto/Makefile_64
+endif
similarity index 54%
rename from arch/i386/crypto/Makefile
rename to arch/x86/crypto/Makefile_32
index 3fd19af18e34265f9f937ddd7c5737a2adbd6617..2d873a2388edc15836347970f83235ae0a142af3 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# i386/crypto/Makefile 
+# x86/crypto/Makefile 
 # 
 # Arch-specific CryptoAPI modules.
 # 
@@ -7,6 +7,6 @@
 obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o
 obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o
 
-aes-i586-y := aes-i586-asm.o aes.o
-twofish-i586-y := twofish-i586-asm.o twofish.o
+aes-i586-y := aes-i586-asm_32.o aes_32.o
+twofish-i586-y := twofish-i586-asm_32.o twofish_32.o
 
similarity index 54%
rename from arch/x86_64/crypto/Makefile
rename to arch/x86/crypto/Makefile_64
index 15b538a8b7f7e73a1b4a37ac9a8c37494850becb..b40896276e93df31d666b5b14090a5db3b7f0185 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# x86_64/crypto/Makefile 
+# x86/crypto/Makefile 
 # 
 # Arch-specific CryptoAPI modules.
 # 
@@ -7,6 +7,6 @@
 obj-$(CONFIG_CRYPTO_AES_X86_64) += aes-x86_64.o
 obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o
 
-aes-x86_64-y := aes-x86_64-asm.o aes.o
-twofish-x86_64-y := twofish-x86_64-asm.o twofish.o
+aes-x86_64-y := aes-x86_64-asm_64.o aes_64.o
+twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_64.o
 
similarity index 95%
rename from arch/x86_64/ia32/audit.c
rename to arch/x86/ia32/audit.c
index 8850fe40ea34240a340f11e10eb07e6af8641895..91b7b5922dfa8a150d3aaa189fec81e0080033b1 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm-i386/unistd.h>
+#include <asm/unistd_32.h>
 
 unsigned ia32_dir_class[] = {
 #include <asm-generic/audit_dir_write.h>
similarity index 98%
rename from arch/x86_64/ia32/ipc32.c
rename to arch/x86/ia32/ipc32.c
index 369151dc3213e3b152bd6d135dc391b5c40ec623..2e1869ec4db4586b27646cbf6f13a72d757af786 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/ipc.h>
 #include <linux/compat.h>
 
-#include <asm-i386/ipc.h>
+#include <asm/ipc.h>
 
 asmlinkage long
 sys32_ipc(u32 call, int first, int second, int third,
similarity index 73%
rename from arch/x86_64/ia32/syscall32_syscall.S
rename to arch/x86/ia32/syscall32_syscall.S
index 8f8271bdf1355efb86050a38487c0f604d5886b5..933f0f08b1cfaa70526ecb0d571eb4e50069e0c3 100644 (file)
@@ -6,12 +6,12 @@
        .globl syscall32_syscall_end
 
 syscall32_syscall:
-       .incbin "arch/x86_64/ia32/vsyscall-syscall.so"
+       .incbin "arch/x86/ia32/vsyscall-syscall.so"
 syscall32_syscall_end:
 
        .globl syscall32_sysenter
        .globl syscall32_sysenter_end
 
 syscall32_sysenter:
-       .incbin "arch/x86_64/ia32/vsyscall-sysenter.so"
+       .incbin "arch/x86/ia32/vsyscall-sysenter.so"
 syscall32_sysenter_end:
similarity index 99%
rename from arch/x86_64/ia32/vsyscall-sigreturn.S
rename to arch/x86/ia32/vsyscall-sigreturn.S
index 1384367cdbe1f9d53097dd162b659b25e28dcf96..b383be00baec81eba722c5c8f63350a3cdadb245 100644 (file)
@@ -139,5 +139,5 @@ __kernel_rt_sigreturn:
        .align 4
 .LENDFDE3:
 
-#include "../../i386/kernel/vsyscall-note.S"
+#include "../../x86/kernel/vsyscall-note_32.S"
 
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
new file mode 100644 (file)
index 0000000..45855c9
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/kernel/Makefile_32
+else
+include ${srctree}/arch/x86/kernel/Makefile_64
+endif
diff --git a/arch/x86/kernel/Makefile_32 b/arch/x86/kernel/Makefile_32
new file mode 100644 (file)
index 0000000..c624193
--- /dev/null
@@ -0,0 +1,86 @@
+#
+# Makefile for the linux kernel.
+#
+
+extra-y := head_32.o init_task_32.o vmlinux.lds
+
+obj-y  := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \
+               ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \
+               pci-dma_32.o i386_ksyms_32.o i387_32.o bootflag.o e820_32.o\
+               quirks.o i8237.o topology.o alternative.o i8253_32.o tsc_32.o
+
+obj-$(CONFIG_STACKTRACE)       += stacktrace.o
+obj-y                          += cpu/
+obj-y                          += acpi/
+obj-$(CONFIG_X86_BIOS_REBOOT)  += reboot_32.o
+obj-$(CONFIG_MCA)              += mca_32.o
+obj-$(CONFIG_X86_MSR)          += msr.o
+obj-$(CONFIG_X86_CPUID)                += cpuid.o
+obj-$(CONFIG_MICROCODE)                += microcode.o
+obj-$(CONFIG_APM)              += apm_32.o
+obj-$(CONFIG_X86_SMP)          += smp_32.o smpboot_32.o tsc_sync.o
+obj-$(CONFIG_SMP)              += smpcommon_32.o
+obj-$(CONFIG_X86_TRAMPOLINE)   += trampoline_32.o
+obj-$(CONFIG_X86_MPPARSE)      += mpparse_32.o
+obj-$(CONFIG_X86_LOCAL_APIC)   += apic_32.o nmi_32.o
+obj-$(CONFIG_X86_IO_APIC)      += io_apic_32.o
+obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o
+obj-$(CONFIG_KEXEC)            += machine_kexec_32.o relocate_kernel_32.o crash_32.o
+obj-$(CONFIG_CRASH_DUMP)       += crash_dump_32.o
+obj-$(CONFIG_X86_NUMAQ)                += numaq_32.o
+obj-$(CONFIG_X86_SUMMIT_NUMA)  += summit_32.o
+obj-$(CONFIG_KPROBES)          += kprobes_32.o
+obj-$(CONFIG_MODULES)          += module_32.o
+obj-y                          += sysenter_32.o vsyscall_32.o
+obj-$(CONFIG_ACPI_SRAT)        += srat_32.o
+obj-$(CONFIG_EFI)              += efi_32.o efi_stub_32.o
+obj-$(CONFIG_DOUBLEFAULT)      += doublefault_32.o
+obj-$(CONFIG_VM86)             += vm86_32.o
+obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
+obj-$(CONFIG_HPET_TIMER)       += hpet_32.o
+obj-$(CONFIG_K8_NB)            += k8.o
+obj-$(CONFIG_MGEODE_LX)                += geode_32.o
+
+obj-$(CONFIG_VMI)              += vmi_32.o vmiclock_32.o
+obj-$(CONFIG_PARAVIRT)         += paravirt_32.o
+obj-y                          += pcspeaker.o
+
+obj-$(CONFIG_SCx200)           += scx200_32.o
+
+# vsyscall_32.o contains the vsyscall DSO images as __initdata.
+# We must build both images before we can assemble it.
+# Note: kbuild does not track this dependency due to usage of .incbin
+$(obj)/vsyscall_32.o: $(obj)/vsyscall-int80_32.so $(obj)/vsyscall-sysenter_32.so
+targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
+targets += vsyscall-note_32.o vsyscall_32.lds
+
+# The DSO images are built using a special linker script.
+quiet_cmd_syscall = SYSCALL $@
+      cmd_syscall = $(CC) -m elf_i386 -nostdlib $(SYSCFLAGS_$(@F)) \
+                         -Wl,-T,$(filter-out FORCE,$^) -o $@
+
+export CPPFLAGS_vsyscall_32.lds += -P -C -U$(ARCH)
+
+vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \
+                $(call ld-option, -Wl$(comma)--hash-style=sysv)
+SYSCFLAGS_vsyscall-sysenter_32.so      = $(vsyscall-flags)
+SYSCFLAGS_vsyscall-int80_32.so = $(vsyscall-flags)
+
+$(obj)/vsyscall-int80_32.so $(obj)/vsyscall-sysenter_32.so: \
+$(obj)/vsyscall-%.so: $(src)/vsyscall_32.lds \
+                     $(obj)/vsyscall-%.o $(obj)/vsyscall-note_32.o FORCE
+       $(call if_changed,syscall)
+
+# We also create a special relocatable object that should mirror the symbol
+# table and layout of the linked DSO.  With ld -R we can then refer to
+# these symbols in the kernel code rather than hand-coded addresses.
+extra-y += vsyscall-syms.o
+$(obj)/built-in.o: $(obj)/vsyscall-syms.o
+$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o
+
+SYSCFLAGS_vsyscall-syms.o = -r
+$(obj)/vsyscall-syms.o: $(src)/vsyscall_32.lds \
+                       $(obj)/vsyscall-sysenter_32.o $(obj)/vsyscall-note_32.o FORCE
+       $(call if_changed,syscall)
+
+
diff --git a/arch/x86/kernel/Makefile_64 b/arch/x86/kernel/Makefile_64
new file mode 100644 (file)
index 0000000..3ab017a
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# Makefile for the linux kernel.
+#
+
+extra-y        := head_64.o head64.o init_task_64.o vmlinux.lds
+EXTRA_AFLAGS   := -traditional
+obj-y  := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \
+               ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \
+               x8664_ksyms_64.o i387_64.o syscall_64.o vsyscall_64.o \
+               setup64.o bootflag.o e820_64.o reboot_64.o quirks.o i8237.o \
+               pci-dma_64.o pci-nommu_64.o alternative.o hpet_64.o tsc_64.o bugs_64.o \
+               perfctr-watchdog.o
+
+obj-$(CONFIG_STACKTRACE)       += stacktrace.o
+obj-$(CONFIG_X86_MCE)          += mce_64.o therm_throt.o
+obj-$(CONFIG_X86_MCE_INTEL)    += mce_intel_64.o
+obj-$(CONFIG_X86_MCE_AMD)      += mce_amd_64.o
+obj-$(CONFIG_MTRR)             += cpu/mtrr/
+obj-$(CONFIG_ACPI)             += acpi/
+obj-$(CONFIG_X86_MSR)          += msr.o
+obj-$(CONFIG_MICROCODE)                += microcode.o
+obj-$(CONFIG_X86_CPUID)                += cpuid.o
+obj-$(CONFIG_SMP)              += smp_64.o smpboot_64.o trampoline_64.o tsc_sync.o
+obj-y                          += apic_64.o  nmi_64.o
+obj-y                          += io_apic_64.o mpparse_64.o genapic_64.o genapic_flat_64.o
+obj-$(CONFIG_KEXEC)            += machine_kexec_64.o relocate_kernel_64.o crash_64.o
+obj-$(CONFIG_CRASH_DUMP)       += crash_dump_64.o
+obj-$(CONFIG_PM)               += suspend_64.o
+obj-$(CONFIG_HIBERNATION)      += suspend_asm_64.o
+obj-$(CONFIG_CPU_FREQ)         += cpu/cpufreq/
+obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
+obj-$(CONFIG_IOMMU)            += pci-gart_64.o aperture_64.o
+obj-$(CONFIG_CALGARY_IOMMU)    += pci-calgary_64.o tce_64.o
+obj-$(CONFIG_SWIOTLB)          += pci-swiotlb_64.o
+obj-$(CONFIG_KPROBES)          += kprobes_64.o
+obj-$(CONFIG_X86_PM_TIMER)     += pmtimer_64.o
+obj-$(CONFIG_X86_VSMP)         += vsmp_64.o
+obj-$(CONFIG_K8_NB)            += k8.o
+obj-$(CONFIG_AUDIT)            += audit_64.o
+
+obj-$(CONFIG_MODULES)          += module_64.o
+obj-$(CONFIG_PCI)              += early-quirks_64.o
+
+obj-y                          += topology.o
+obj-y                          += intel_cacheinfo.o
+obj-y                          += addon_cpuid_features.o
+obj-y                          += pcspeaker.o
+
+CFLAGS_vsyscall_64.o           := $(PROFILING) -g0
+
+therm_throt-y                   += cpu/mcheck/therm_throt.o
+intel_cacheinfo-y              += cpu/intel_cacheinfo.o
+addon_cpuid_features-y         += cpu/addon_cpuid_features.o
+perfctr-watchdog-y             += cpu/perfctr-watchdog.o
diff --git a/arch/x86/kernel/acpi/Makefile b/arch/x86/kernel/acpi/Makefile
new file mode 100644 (file)
index 0000000..3d56719
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/kernel/acpi/Makefile_32
+else
+include ${srctree}/arch/x86/kernel/acpi/Makefile_64
+endif
similarity index 58%
rename from arch/i386/kernel/acpi/Makefile
rename to arch/x86/kernel/acpi/Makefile_32
index 7f7be01f44e66cd27257870d540ed38d3f1e1661..a4852a2e9190c147f1faa66ac3ba271e9f3a8a6c 100644 (file)
@@ -1,8 +1,8 @@
 obj-$(CONFIG_ACPI)             += boot.o
 ifneq ($(CONFIG_PCI),)
-obj-$(CONFIG_X86_IO_APIC)      += earlyquirk.o
+obj-$(CONFIG_X86_IO_APIC)      += earlyquirk_32.o
 endif
-obj-$(CONFIG_ACPI_SLEEP)       += sleep.o wakeup.o
+obj-$(CONFIG_ACPI_SLEEP)       += sleep_32.o wakeup_32.o
 
 ifneq ($(CONFIG_ACPI_PROCESSOR),)
 obj-y                          += cstate.o processor.o
diff --git a/arch/x86/kernel/acpi/Makefile_64 b/arch/x86/kernel/acpi/Makefile_64
new file mode 100644 (file)
index 0000000..629425b
--- /dev/null
@@ -0,0 +1,7 @@
+obj-y                  := boot.o
+obj-$(CONFIG_ACPI_SLEEP)       += sleep_64.o wakeup_64.o
+
+ifneq ($(CONFIG_ACPI_PROCESSOR),)
+obj-y                  += processor.o cstate.o
+endif
+
similarity index 99%
rename from arch/x86_64/kernel/acpi/wakeup.S
rename to arch/x86/kernel/acpi/wakeup_64.S
index a06f2bcabef9d5f3cfe0928c31d0b753894d6aca..8b4357e1efe0b97dc37b24e5d4cc66321ecfc0cb 100644 (file)
@@ -269,7 +269,7 @@ no_longmode:
        movb    $0xbc,%al       ;  outb %al,$0x80
        jmp no_longmode
 
-#include "../verify_cpu.S"
+#include "../verify_cpu_64.S"
        
 /* This code uses an extended set of video mode numbers. These include:
  * Aliases for standard modes
diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
new file mode 100644 (file)
index 0000000..cfa82c8
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "asm-offsets_32.c"
+#else
+# include "asm-offsets_64.c"
+#endif
similarity index 99%
rename from arch/i386/kernel/asm-offsets.c
rename to arch/x86/kernel/asm-offsets_32.c
index 7288ac88d746b550b7cd36cb823213f4e7dc9b50..8029742c0fc127b40cc0249b1abc60a54ab42617 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/personality.h>
 #include <linux/suspend.h>
 #include <asm/ucontext.h>
-#include "sigframe.h"
+#include "sigframe_32.h"
 #include <asm/pgtable.h>
 #include <asm/fixmap.h>
 #include <asm/processor.h>
similarity index 91%
rename from arch/i386/kernel/cpu/cpufreq/longhaul.c
rename to arch/x86/kernel/cpu/cpufreq/longhaul.c
index ef8f0bc3fc71bd2b7ebdd936cd09960592af5870..f0cce3c2dc3a4fe33916f2c1ff5c34bae77237e6 100644 (file)
@@ -76,6 +76,7 @@ static unsigned int longhaul_index;
 /* Module parameters */
 static int scale_voltage;
 static int disable_acpi_c3;
+static int revid_errata;
 
 #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg)
 
@@ -168,7 +169,10 @@ static void do_powersaver(int cx_address, unsigned int clock_ratio_index,
 
        rdmsrl(MSR_VIA_LONGHAUL, longhaul.val);
        /* Setup new frequency */
-       longhaul.bits.RevisionKey = longhaul.bits.RevisionID;
+       if (!revid_errata)
+               longhaul.bits.RevisionKey = longhaul.bits.RevisionID;
+       else
+               longhaul.bits.RevisionKey = 0;
        longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf;
        longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4;
        /* Setup new voltage */
@@ -272,7 +276,7 @@ static void longhaul_setstate(unsigned int table_index)
 
        dprintk ("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n",
                        fsb, mult/10, mult%10, print_speed(speed/1000));
-
+retry_loop:
        preempt_disable();
        local_irq_save(flags);
 
@@ -344,6 +348,47 @@ static void longhaul_setstate(unsigned int table_index)
        preempt_enable();
 
        freqs.new = calc_speed(longhaul_get_cpu_mult());
+       /* Check if requested frequency is set. */
+       if (unlikely(freqs.new != speed)) {
+               printk(KERN_INFO PFX "Failed to set requested frequency!\n");
+               /* Revision ID = 1 but processor is expecting revision key
+                * equal to 0. Jumpers at the bottom of processor will change
+                * multiplier and FSB, but will not change bits in Longhaul
+                * MSR nor enable voltage scaling. */
+               if (!revid_errata) {
+                       printk(KERN_INFO PFX "Enabling \"Ignore Revision ID\" "
+                                               "option.\n");
+                       revid_errata = 1;
+                       msleep(200);
+                       goto retry_loop;
+               }
+               /* Why ACPI C3 sometimes doesn't work is a mystery for me.
+                * But it does happen. Processor is entering ACPI C3 state,
+                * but it doesn't change frequency. I tried poking various
+                * bits in northbridge registers, but without success. */
+               if (longhaul_flags & USE_ACPI_C3) {
+                       printk(KERN_INFO PFX "Disabling ACPI C3 support.\n");
+                       longhaul_flags &= ~USE_ACPI_C3;
+                       if (revid_errata) {
+                               printk(KERN_INFO PFX "Disabling \"Ignore "
+                                               "Revision ID\" option.\n");
+                               revid_errata = 0;
+                       }
+                       msleep(200);
+                       goto retry_loop;
+               }
+               /* This shouldn't happen. Longhaul ver. 2 was reported not
+                * working on processors without voltage scaling, but with
+                * RevID = 1. RevID errata will make things right. Just
+                * to be 100% sure. */
+               if (longhaul_version == TYPE_LONGHAUL_V2) {
+                       printk(KERN_INFO PFX "Switching to Longhaul ver. 1\n");
+                       longhaul_version = TYPE_LONGHAUL_V1;
+                       msleep(200);
+                       goto retry_loop;
+               }
+       }
+       /* Report true CPU frequency */
        cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 
        if (!bm_timeout)
@@ -956,11 +1001,20 @@ static void __exit longhaul_exit(void)
        kfree(longhaul_table);
 }
 
+/* Even if BIOS is exporting ACPI C3 state, and it is used
+ * with success when CPU is idle, this state doesn't
+ * trigger frequency transition in some cases. */
 module_param (disable_acpi_c3, int, 0644);
 MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support");
-
+/* Change CPU voltage with frequency. Very usefull to save
+ * power, but most VIA C3 processors aren't supporting it. */
 module_param (scale_voltage, int, 0644);
 MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor");
+/* Force revision key to 0 for processors which doesn't
+ * support voltage scaling, but are introducing itself as
+ * such. */
+module_param(revid_errata, int, 0644);
+MODULE_PARM_DESC(revid_errata, "Ignore CPU Revision ID");
 
 MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>");
 MODULE_DESCRIPTION ("Longhaul driver for VIA Cyrix processors.");
similarity index 98%
rename from arch/i386/kernel/cpu/mtrr/state.c
rename to arch/x86/kernel/cpu/mtrr/state.c
index c9014ca4a575d3bbd1766bf6a0873bd7e2953e1f..49e20c2afcdf7b4f4e24dc523315f7cb0a1970b0 100644 (file)
@@ -3,7 +3,7 @@
 #include <asm/io.h>
 #include <asm/mtrr.h>
 #include <asm/msr.h>
-#include <asm-i386/processor-cyrix.h>
+#include <asm/processor-cyrix.h>
 #include "mtrr.h"
 
 
similarity index 99%
rename from arch/i386/kernel/entry.S
rename to arch/x86/kernel/entry_32.S
index a714d6b43506c957c9527aba9b0525b24ad6f925..290b7bc82da3c91d25c00aee470183f53a99c63c 100644 (file)
@@ -1107,6 +1107,6 @@ ENDPROC(xen_failsafe_callback)
 #endif /* CONFIG_XEN */
 
 .section .rodata,"a"
-#include "syscall_table.S"
+#include "syscall_table_32.S"
 
 syscall_table_size=(.-sys_call_table)
similarity index 99%
rename from arch/i386/kernel/head.S
rename to arch/x86/kernel/head_32.S
index 8f0382161c91ec8e0a1c4f75b8ed22824c35eb90..9150ca9b5f809285e987d1ed84db3b353357ae16 100644 (file)
@@ -537,7 +537,7 @@ fault_msg:
        .ascii "Int %d: CR2 %p  err %p  EIP %p  CS %p  flags %p\n"
        .asciz "Stack: %p %p %p %p %p %p %p %p\n"
 
-#include "../xen/xen-head.S"
+#include "../../x86/xen/xen-head.S"
 
 /*
  * The IDT and GDT 'descriptors' are a strange 48-bit object
similarity index 100%
rename from arch/x86_64/kernel/k8.c
rename to arch/x86/kernel/k8.c
similarity index 100%
rename from arch/i386/kernel/msr.c
rename to arch/x86/kernel/msr.c
similarity index 99%
rename from arch/i386/kernel/signal.c
rename to arch/x86/kernel/signal_32.c
index f5dd85656c1890eb93f8d25fc68fb2d97132e917..c03570f7fe8e16482a5c348745f679db6ec79aec 100644 (file)
@@ -25,7 +25,7 @@
 #include <asm/ucontext.h>
 #include <asm/uaccess.h>
 #include <asm/i387.h>
-#include "sigframe.h"
+#include "sigframe_32.h"
 
 #define DEBUG_SIG 0
 
similarity index 90%
rename from arch/x86_64/kernel/syscall.c
rename to arch/x86/kernel/syscall_64.c
index 63d592c276cc45b6d5e1f761c7af4ce91b687431..9d498c2f8eea89635581d3deaac5a64c592f7882 100644 (file)
@@ -9,7 +9,7 @@
 
 #define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ; 
 #undef _ASM_X86_64_UNISTD_H_
-#include <asm-x86_64/unistd.h>
+#include <asm/unistd_64.h>
 
 #undef __SYSCALL
 #define __SYSCALL(nr, sym) [ nr ] = sym, 
@@ -22,5 +22,5 @@ extern void sys_ni_syscall(void);
 const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
        /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */ 
        [0 ... __NR_syscall_max] = &sys_ni_syscall,
-#include <asm-x86_64/unistd.h>
+#include <asm/unistd_64.h>
 };
similarity index 99%
rename from arch/x86_64/kernel/trampoline.S
rename to arch/x86/kernel/trampoline_64.S
index e7e2764c461b682eb1b7bf42be76fd137e88efc8..607983b0d27b9a5fd1b07d8e4beb41e7516417f1 100644 (file)
@@ -126,7 +126,7 @@ startup_64:
 no_longmode:
        hlt
        jmp no_longmode
-#include "verify_cpu.S"
+#include "verify_cpu_64.S"
 
        # Careful these need to be in the same 64K segment as the above;
 tidt:
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
new file mode 100644 (file)
index 0000000..849ee61
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "vmlinux_32.lds.S"
+#else
+# include "vmlinux_64.lds.S"
+#endif
similarity index 97%
rename from arch/i386/kernel/vsyscall-int80.S
rename to arch/x86/kernel/vsyscall-int80_32.S
index 530d0525e5e23e66d510a837f09853fd4bb5088d..103cab6aa7c031141042a0e131a1f04d33d9bcd7 100644 (file)
@@ -50,4 +50,4 @@ __kernel_vsyscall:
 /*
  * Get the common code for the sigreturn entry points.
  */
-#include "vsyscall-sigreturn.S"
+#include "vsyscall-sigreturn_32.S"
similarity index 95%
rename from arch/i386/kernel/vsyscall-note.S
rename to arch/x86/kernel/vsyscall-note_32.S
index 07c0daf78237bcb1b80ea1401ada31f0f1065cb2..fcf376a37f79c142bb35216234e56e15adf0b41c 100644 (file)
@@ -33,7 +33,7 @@ ELFNOTE_END
  * at boot time we set VDSO_NOTE_NONEGSEG_BIT if running under Xen.
  */
 
-#include "../xen/vdso.h"       /* Defines VDSO_NOTE_NONEGSEG_BIT.  */
+#include "../../x86/xen/vdso.h"        /* Defines VDSO_NOTE_NONEGSEG_BIT.  */
 
        .globl VDSO_NOTE_MASK
 ELFNOTE_START(GNU, 2, "a")
similarity index 99%
rename from arch/i386/kernel/vsyscall-sysenter.S
rename to arch/x86/kernel/vsyscall-sysenter_32.S
index 1a36d26e15eb0c6d370832ee166dd0fba3700f59..ed879bf42995aa6a51ad955c2feff15d7644b28f 100644 (file)
@@ -119,4 +119,4 @@ SYSENTER_RETURN:
 /*
  * Get the common code for the sigreturn entry points.
  */
-#include "vsyscall-sigreturn.S"
+#include "vsyscall-sigreturn_32.S"
similarity index 70%
rename from arch/i386/kernel/vsyscall.S
rename to arch/x86/kernel/vsyscall_32.S
index b403890fe39b35a54ea8f1312790d6fc6434cc6f..a5ab3dc4fd251aeb933bf129d0e883c4af4263b5 100644 (file)
@@ -4,12 +4,12 @@ __INITDATA
 
        .globl vsyscall_int80_start, vsyscall_int80_end
 vsyscall_int80_start:
-       .incbin "arch/i386/kernel/vsyscall-int80.so"
+       .incbin "arch/x86/kernel/vsyscall-int80_32.so"
 vsyscall_int80_end:
 
        .globl vsyscall_sysenter_start, vsyscall_sysenter_end
 vsyscall_sysenter_start:
-       .incbin "arch/i386/kernel/vsyscall-sysenter.so"
+       .incbin "arch/x86/kernel/vsyscall-sysenter_32.so"
 vsyscall_sysenter_end:
 
 __FINIT
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
new file mode 100644 (file)
index 0000000..329da27
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/lib/Makefile_32
+else
+include ${srctree}/arch/x86/lib/Makefile_64
+endif
diff --git a/arch/x86/lib/Makefile_32 b/arch/x86/lib/Makefile_32
new file mode 100644 (file)
index 0000000..98d1f1e
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# Makefile for i386-specific library files..
+#
+
+
+lib-y = checksum_32.o delay_32.o usercopy_32.o getuser_32.o putuser_32.o memcpy_32.o strstr_32.o \
+       bitops_32.o semaphore_32.o string_32.o
+
+lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
+
+obj-$(CONFIG_SMP)      += msr-on-cpu.o
diff --git a/arch/x86/lib/Makefile_64 b/arch/x86/lib/Makefile_64
new file mode 100644 (file)
index 0000000..bbabad3
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# Makefile for x86_64-specific library files.
+#
+
+CFLAGS_csum-partial_64.o := -funroll-loops
+
+obj-y := io_64.o iomap_copy_64.o
+obj-$(CONFIG_SMP)      += msr-on-cpu.o
+
+lib-y := csum-partial_64.o csum-copy_64.o csum-wrappers_64.o delay_64.o \
+       usercopy_64.o getuser_64.o putuser_64.o  \
+       thunk_64.o clear_page_64.o copy_page_64.o bitstr_64.o bitops_64.o
+lib-y += memcpy_64.o memmove_64.o memset_64.o copy_user_64.o rwlock_64.o copy_user_nocache_64.o
similarity index 100%
rename from arch/x86_64/lib/io.c
rename to arch/x86/lib/io_64.c
similarity index 100%
rename from arch/i386/lib/mmx.c
rename to arch/x86/lib/mmx_32.c
diff --git a/arch/x86/mach-generic/Makefile b/arch/x86/mach-generic/Makefile
new file mode 100644 (file)
index 0000000..19d6d40
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# Makefile for the generic architecture
+#
+
+EXTRA_CFLAGS   := -Iarch/x86/kernel
+
+obj-y          := probe.o summit.o bigsmp.o es7000.o default.o 
+obj-y          += ../../x86/mach-es7000/
similarity index 80%
rename from arch/i386/mach-voyager/Makefile
rename to arch/x86/mach-voyager/Makefile
index 33b74cf0dd220da24d09d3559fc2b4047d9abf9c..15c250b371d3b580058dccd33b50489965016368 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-EXTRA_CFLAGS   := -Iarch/i386/kernel
+EXTRA_CFLAGS   := -Iarch/x86/kernel
 obj-y                  := setup.o voyager_basic.o voyager_thread.o
 
 obj-$(CONFIG_SMP)      += voyager_smp.o voyager_cat.o
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
new file mode 100644 (file)
index 0000000..9832910
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/mm/Makefile_32
+else
+include ${srctree}/arch/x86/mm/Makefile_64
+endif
diff --git a/arch/x86/mm/Makefile_32 b/arch/x86/mm/Makefile_32
new file mode 100644 (file)
index 0000000..362b4ad
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Makefile for the linux i386-specific parts of the memory manager.
+#
+
+obj-y  := init_32.o pgtable_32.o fault_32.o ioremap_32.o extable_32.o pageattr_32.o mmap_32.o
+
+obj-$(CONFIG_NUMA) += discontig_32.o
+obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
+obj-$(CONFIG_HIGHMEM) += highmem_32.o
+obj-$(CONFIG_BOOT_IOREMAP) += boot_ioremap_32.o
diff --git a/arch/x86/mm/Makefile_64 b/arch/x86/mm/Makefile_64
new file mode 100644 (file)
index 0000000..6bcb479
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# Makefile for the linux x86_64-specific parts of the memory manager.
+#
+
+obj-y   := init_64.o fault_64.o ioremap_64.o extable_64.o pageattr_64.o mmap_64.o
+obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
+obj-$(CONFIG_NUMA) += numa_64.o
+obj-$(CONFIG_K8_NUMA) += k8topology_64.o
+obj-$(CONFIG_ACPI_NUMA) += srat_64.o
+
similarity index 100%
rename from arch/i386/mm/fault.c
rename to arch/x86/mm/fault_32.c
similarity index 100%
rename from arch/i386/mm/init.c
rename to arch/x86/mm/init_32.c
similarity index 100%
rename from arch/x86_64/mm/init.c
rename to arch/x86/mm/init_64.c
similarity index 100%
rename from arch/i386/mm/mmap.c
rename to arch/x86/mm/mmap_32.c
similarity index 100%
rename from arch/x86_64/mm/mmap.c
rename to arch/x86/mm/mmap_64.c
similarity index 100%
rename from arch/x86_64/mm/numa.c
rename to arch/x86/mm/numa_64.c
similarity index 100%
rename from arch/x86_64/mm/srat.c
rename to arch/x86/mm/srat_64.c
diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
new file mode 100644 (file)
index 0000000..c5c8e48
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(CONFIG_X86_32),y)
+include ${srctree}/arch/x86/pci/Makefile_32
+else
+include ${srctree}/arch/x86/pci/Makefile_64
+endif
similarity index 81%
rename from arch/i386/pci/Makefile
rename to arch/x86/pci/Makefile_32
index 44650e03308b0ad6d849abc0dcc0645800292be5..cdd6828b5abb4015f91091cf4ccc5d1a6432ded0 100644 (file)
@@ -1,7 +1,7 @@
 obj-y                          := i386.o init.o
 
 obj-$(CONFIG_PCI_BIOS)         += pcbios.o
-obj-$(CONFIG_PCI_MMCONFIG)     += mmconfig.o direct.o mmconfig-shared.o
+obj-$(CONFIG_PCI_MMCONFIG)     += mmconfig_32.o direct.o mmconfig-shared.o
 obj-$(CONFIG_PCI_DIRECT)       += direct.o
 
 pci-y                          := fixup.o
diff --git a/arch/x86/pci/Makefile_64 b/arch/x86/pci/Makefile_64
new file mode 100644 (file)
index 0000000..7d8c467
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Makefile for X86_64 specific PCI routines
+#
+# Reuse the i386 PCI subsystem
+#
+EXTRA_CFLAGS += -Iarch/x86/pci
+
+obj-y          := i386.o
+obj-$(CONFIG_PCI_DIRECT)+= direct.o
+obj-y          += fixup.o init.o
+obj-$(CONFIG_ACPI)     += acpi.o
+obj-y                  += legacy.o irq.o common.o early.o
+# mmconfig has a 64bit special
+obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_64.o direct.o mmconfig-shared.o
+
+obj-$(CONFIG_NUMA)     += k8-bus_64.o
+
similarity index 100%
rename from arch/i386/pci/acpi.c
rename to arch/x86/pci/acpi.c
similarity index 100%
rename from arch/i386/pci/common.c
rename to arch/x86/pci/common.c
similarity index 100%
rename from arch/i386/pci/direct.c
rename to arch/x86/pci/direct.c
similarity index 100%
rename from arch/i386/pci/early.c
rename to arch/x86/pci/early.c
similarity index 100%
rename from arch/i386/pci/fixup.c
rename to arch/x86/pci/fixup.c
similarity index 100%
rename from arch/i386/pci/i386.c
rename to arch/x86/pci/i386.c
similarity index 100%
rename from arch/i386/pci/init.c
rename to arch/x86/pci/init.c
similarity index 100%
rename from arch/i386/pci/irq.c
rename to arch/x86/pci/irq.c
similarity index 100%
rename from arch/i386/pci/legacy.c
rename to arch/x86/pci/legacy.c
similarity index 100%
rename from arch/i386/pci/numa.c
rename to arch/x86/pci/numa.c
similarity index 100%
rename from arch/i386/pci/pcbios.c
rename to arch/x86/pci/pcbios.c
similarity index 100%
rename from arch/i386/pci/pci.h
rename to arch/x86/pci/pci.h
similarity index 100%
rename from arch/i386/pci/visws.c
rename to arch/x86/pci/visws.c
similarity index 100%
rename from arch/i386/power/cpu.c
rename to arch/x86/power/cpu.c
diff --git a/arch/x86/vdso/vdso.S b/arch/x86/vdso/vdso.S
new file mode 100644 (file)
index 0000000..4b1620a
--- /dev/null
@@ -0,0 +1,2 @@
+       .section ".vdso","a"
+       .incbin "arch/x86/vdso/vdso.so"
similarity index 100%
rename from arch/x86_64/vdso/vma.c
rename to arch/x86/vdso/vma.c
diff --git a/arch/x86/vdso/voffset.h b/arch/x86/vdso/voffset.h
new file mode 100644 (file)
index 0000000..4af67c7
--- /dev/null
@@ -0,0 +1 @@
+#define VDSO_TEXT_OFFSET 0x600
similarity index 100%
rename from arch/x86_64/vdso/vvar.c
rename to arch/x86/vdso/vvar.c
similarity index 100%
rename from arch/i386/xen/Kconfig
rename to arch/x86/xen/Kconfig
similarity index 100%
rename from arch/i386/xen/Makefile
rename to arch/x86/xen/Makefile
similarity index 100%
rename from arch/i386/xen/events.c
rename to arch/x86/xen/events.c
similarity index 100%
rename from arch/i386/xen/manage.c
rename to arch/x86/xen/manage.c
similarity index 99%
rename from arch/i386/xen/mmu.c
rename to arch/x86/xen/mmu.c
index 4ae038aa6c244b91ac0d244f84c62ade47fee424..874db0cd1d2a5f6fc1c9f9a172863edb9c260339 100644 (file)
@@ -559,6 +559,9 @@ void xen_exit_mmap(struct mm_struct *mm)
        put_cpu();
 
        spin_lock(&mm->page_table_lock);
-       xen_pgd_unpin(mm->pgd);
+
+       /* pgd may not be pinned in the error exit path of execve */
+       if (PagePinned(virt_to_page(mm->pgd)))
+               xen_pgd_unpin(mm->pgd);
        spin_unlock(&mm->page_table_lock);
 }
similarity index 100%
rename from arch/i386/xen/mmu.h
rename to arch/x86/xen/mmu.h
similarity index 100%
rename from arch/i386/xen/setup.c
rename to arch/x86/xen/setup.c
similarity index 100%
rename from arch/i386/xen/smp.c
rename to arch/x86/xen/smp.c
similarity index 100%
rename from arch/i386/xen/time.c
rename to arch/x86/xen/time.c
similarity index 100%
rename from arch/i386/xen/vdso.h
rename to arch/x86/xen/vdso.h
index b4d9089a6a06736cf5c8b9fc2ac1955a8ad19360..b1b98e614f7cd2982ae9646c2b6188d234d233d4 100644 (file)
@@ -704,7 +704,7 @@ source kernel/power/Kconfig
 
 source "drivers/acpi/Kconfig"
 
-source "arch/x86_64/kernel/cpufreq/Kconfig"
+source "arch/x86/kernel/cpufreq/Kconfig"
 
 endmenu
 
@@ -778,7 +778,7 @@ source fs/Kconfig
 menu "Instrumentation Support"
         depends on EXPERIMENTAL
 
-source "arch/x86_64/oprofile/Kconfig"
+source "arch/x86/oprofile/Kconfig"
 
 config KPROBES
        bool "Kprobes"
index b024e4a86895cea767fa5090074f75b60e0d7078..8bffb94c71b50d72605306651f59cdad46ff2e27 100644 (file)
@@ -21,6 +21,9 @@
 #
 # $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $
 
+# Fill in SRCARCH
+SRCARCH        := x86
+
 LDFLAGS                := -m elf_x86_64
 OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux :=
@@ -71,18 +74,18 @@ CFLAGS += $(cflags-y)
 CFLAGS_KERNEL += $(cflags-kernel-y)
 AFLAGS += -m64
 
-head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o
+head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o
 
-libs-y                                         += arch/x86_64/lib/
-core-y                                 += arch/x86_64/kernel/ \
-                                          arch/x86_64/mm/ \
-                                          arch/x86_64/crypto/ \
-                                          arch/x86_64/vdso/
-core-$(CONFIG_IA32_EMULATION)          += arch/x86_64/ia32/
-drivers-$(CONFIG_PCI)                  += arch/x86_64/pci/
-drivers-$(CONFIG_OPROFILE)             += arch/x86_64/oprofile/
+libs-y                                         += arch/x86/lib/
+core-y                                 += arch/x86/kernel/ \
+                                          arch/x86/mm/ \
+                                          arch/x86/crypto/ \
+                                          arch/x86/vdso/
+core-$(CONFIG_IA32_EMULATION)          += arch/x86/ia32/
+drivers-$(CONFIG_PCI)                  += arch/x86/pci/
+drivers-$(CONFIG_OPROFILE)             += arch/x86/oprofile/
 
-boot := arch/x86_64/boot
+boot := arch/x86/boot
 
 PHONY += bzImage bzlilo install archmrproper \
         fdimage fdimage144 fdimage288 isoimage archclean
@@ -90,10 +93,12 @@ PHONY += bzImage bzlilo install archmrproper \
 #Default target when executing "make"
 all: bzImage
 
-BOOTIMAGE                     := arch/x86_64/boot/bzImage
+BOOTIMAGE                     := arch/x86/boot/bzImage
 KBUILD_IMAGE                  := $(BOOTIMAGE)
 
 bzImage: vmlinux
+       $(Q)mkdir -p $(objtree)/arch/x86_64/boot
+       $(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage
        $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
 
 bzlilo: vmlinux
@@ -109,6 +114,7 @@ install:
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 
 
 archclean:
+       $(Q)rm -rf $(objtree)/arch/x86_64/boot
        $(Q)$(MAKE) $(clean)=$(boot)
 
 define archhelp
diff --git a/arch/x86_64/boot/.gitignore b/arch/x86_64/boot/.gitignore
deleted file mode 100644 (file)
index 1846514..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-bootsect
-bzImage
-setup
-setup.bin
-setup.elf
diff --git a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile
deleted file mode 100644 (file)
index 6709638..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# arch/x86_64/boot/Makefile
-#
-# The actual boot code is shared with i386 including the Makefile.
-# So tell kbuild that we fetch the code from i386 and include the
-# Makefile from i386 too.
-
-src := arch/i386/boot
-include $(src)/Makefile
diff --git a/arch/x86_64/boot/tools/.gitignore b/arch/x86_64/boot/tools/.gitignore
deleted file mode 100644 (file)
index 378eac2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-build
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
deleted file mode 100644 (file)
index ff5d8c9..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-extra-y        := head.o head64.o init_task.o vmlinux.lds
-EXTRA_AFLAGS   := -traditional
-obj-y  := process.o signal.o entry.o traps.o irq.o \
-               ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
-               x8664_ksyms.o i387.o syscall.o vsyscall.o \
-               setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \
-               pci-dma.o pci-nommu.o alternative.o hpet.o tsc.o bugs.o \
-               perfctr-watchdog.o
-
-obj-$(CONFIG_STACKTRACE)       += stacktrace.o
-obj-$(CONFIG_X86_MCE)          += mce.o therm_throt.o
-obj-$(CONFIG_X86_MCE_INTEL)    += mce_intel.o
-obj-$(CONFIG_X86_MCE_AMD)      += mce_amd.o
-obj-$(CONFIG_MTRR)             += ../../i386/kernel/cpu/mtrr/
-obj-$(CONFIG_ACPI)             += acpi/
-obj-$(CONFIG_X86_MSR)          += msr.o
-obj-$(CONFIG_MICROCODE)                += microcode.o
-obj-$(CONFIG_X86_CPUID)                += cpuid.o
-obj-$(CONFIG_SMP)              += smp.o smpboot.o trampoline.o tsc_sync.o
-obj-y                          += apic.o  nmi.o
-obj-y                          += io_apic.o mpparse.o genapic.o genapic_flat.o
-obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o crash.o
-obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
-obj-$(CONFIG_PM)               += suspend.o
-obj-$(CONFIG_HIBERNATION)      += suspend_asm.o
-obj-$(CONFIG_CPU_FREQ)         += cpufreq/
-obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
-obj-$(CONFIG_IOMMU)            += pci-gart.o aperture.o
-obj-$(CONFIG_CALGARY_IOMMU)    += pci-calgary.o tce.o
-obj-$(CONFIG_SWIOTLB)          += pci-swiotlb.o
-obj-$(CONFIG_KPROBES)          += kprobes.o
-obj-$(CONFIG_X86_PM_TIMER)     += pmtimer.o
-obj-$(CONFIG_X86_VSMP)         += vsmp.o
-obj-$(CONFIG_K8_NB)            += k8.o
-obj-$(CONFIG_AUDIT)            += audit.o
-
-obj-$(CONFIG_MODULES)          += module.o
-obj-$(CONFIG_PCI)              += early-quirks.o
-
-obj-y                          += topology.o
-obj-y                          += intel_cacheinfo.o
-obj-y                          += addon_cpuid_features.o
-obj-y                          += pcspeaker.o
-
-CFLAGS_vsyscall.o              := $(PROFILING) -g0
-
-therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
-bootflag-y                     += ../../i386/kernel/bootflag.o
-cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
-topology-y                     += ../../i386/kernel/topology.o
-microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
-intel_cacheinfo-y              += ../../i386/kernel/cpu/intel_cacheinfo.o
-addon_cpuid_features-y         += ../../i386/kernel/cpu/addon_cpuid_features.o
-quirks-y                       += ../../i386/kernel/quirks.o
-i8237-y                                += ../../i386/kernel/i8237.o
-msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o
-alternative-y                  += ../../i386/kernel/alternative.o
-pcspeaker-y                    += ../../i386/kernel/pcspeaker.o
-perfctr-watchdog-y             += ../../i386/kernel/cpu/perfctr-watchdog.o
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile
deleted file mode 100644 (file)
index 080b996..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-obj-y                  := boot.o
-boot-y                 := ../../../i386/kernel/acpi/boot.o
-obj-$(CONFIG_ACPI_SLEEP)       += sleep.o wakeup.o
-
-ifneq ($(CONFIG_ACPI_PROCESSOR),)
-obj-y                  += processor.o
-processor-y            := ../../../i386/kernel/acpi/processor.o ../../../i386/kernel/acpi/cstate.o
-endif
-
diff --git a/arch/x86_64/kernel/cpufreq/Makefile b/arch/x86_64/kernel/cpufreq/Makefile
deleted file mode 100644 (file)
index 753ce1d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Reuse the i386 cpufreq drivers
-#
-
-SRCDIR := ../../../i386/kernel/cpu/cpufreq
-
-obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o
-obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o
-obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o
-obj-$(CONFIG_X86_P4_CLOCKMOD) += p4-clockmod.o
-obj-$(CONFIG_X86_SPEEDSTEP_LIB) += speedstep-lib.o
-
-powernow-k8-objs := ${SRCDIR}/powernow-k8.o
-speedstep-centrino-objs := ${SRCDIR}/speedstep-centrino.o
-acpi-cpufreq-objs := ${SRCDIR}/acpi-cpufreq.o
-p4-clockmod-objs := ${SRCDIR}/p4-clockmod.o
-speedstep-lib-objs := ${SRCDIR}/speedstep-lib.o
diff --git a/arch/x86_64/lib/Makefile b/arch/x86_64/lib/Makefile
deleted file mode 100644 (file)
index c943271..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Makefile for x86_64-specific library files.
-#
-
-CFLAGS_csum-partial.o := -funroll-loops
-
-obj-y := io.o iomap_copy.o
-obj-$(CONFIG_SMP)      += msr-on-cpu.o
-
-lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \
-       usercopy.o getuser.o putuser.o  \
-       thunk.o clear_page.o copy_page.o bitstr.o bitops.o
-lib-y += memcpy.o memmove.o memset.o copy_user.o rwlock.o copy_user_nocache.o
diff --git a/arch/x86_64/lib/msr-on-cpu.c b/arch/x86_64/lib/msr-on-cpu.c
deleted file mode 100644 (file)
index 47e0ec4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../i386/lib/msr-on-cpu.c"
diff --git a/arch/x86_64/mm/Makefile b/arch/x86_64/mm/Makefile
deleted file mode 100644 (file)
index d25ac86..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Makefile for the linux x86_64-specific parts of the memory manager.
-#
-
-obj-y   := init.o fault.o ioremap.o extable.o pageattr.o mmap.o
-obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
-obj-$(CONFIG_NUMA) += numa.o
-obj-$(CONFIG_K8_NUMA) += k8topology.o
-obj-$(CONFIG_ACPI_NUMA) += srat.o
-
-hugetlbpage-y = ../../i386/mm/hugetlbpage.o
diff --git a/arch/x86_64/oprofile/Kconfig b/arch/x86_64/oprofile/Kconfig
deleted file mode 100644 (file)
index d8a8408..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-config PROFILING
-       bool "Profiling support (EXPERIMENTAL)"
-       help
-         Say Y here to enable the extended profiling support mechanisms used
-         by profilers such as OProfile.
-         
-
-config OPROFILE
-       tristate "OProfile system profiling (EXPERIMENTAL)"
-       depends on PROFILING
-       help
-         OProfile is a profiling system capable of profiling the
-         whole system, include the kernel, kernel modules, libraries,
-         and applications.
-
-         If unsure, say N.
-
diff --git a/arch/x86_64/oprofile/Makefile b/arch/x86_64/oprofile/Makefile
deleted file mode 100644 (file)
index 6be3268..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# oprofile for x86-64.
-# Just reuse the one from i386. 
-#
-
-obj-$(CONFIG_OPROFILE) += oprofile.o
-DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
-       oprof.o cpu_buffer.o buffer_sync.o \
-       event_buffer.o oprofile_files.o \
-       oprofilefs.o oprofile_stats.o \
-       timer_int.o )
-
-OPROFILE-y := init.o backtrace.o
-OPROFILE-$(CONFIG_X86_LOCAL_APIC) += nmi_int.o op_model_athlon.o op_model_p4.o \
-                                    op_model_ppro.o
-OPROFILE-$(CONFIG_X86_IO_APIC)    += nmi_timer_int.o 
-
-oprofile-y = $(DRIVER_OBJS) $(addprefix ../../i386/oprofile/, $(OPROFILE-y))
diff --git a/arch/x86_64/pci/Makefile b/arch/x86_64/pci/Makefile
deleted file mode 100644 (file)
index c9eddc8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Makefile for X86_64 specific PCI routines
-#
-# Reuse the i386 PCI subsystem
-#
-EXTRA_CFLAGS += -Iarch/i386/pci
-
-obj-y          := i386.o
-obj-$(CONFIG_PCI_DIRECT)+= direct.o
-obj-y          += fixup.o init.o
-obj-$(CONFIG_ACPI)     += acpi.o
-obj-y                  += legacy.o irq.o common.o early.o
-# mmconfig has a 64bit special
-obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o mmconfig-shared.o
-
-obj-$(CONFIG_NUMA)     += k8-bus.o
-
-direct-y += ../../i386/pci/direct.o
-acpi-y   += ../../i386/pci/acpi.o
-legacy-y += ../../i386/pci/legacy.o
-irq-y    += ../../i386/pci/irq.o
-common-y += ../../i386/pci/common.o
-fixup-y  += ../../i386/pci/fixup.o
-i386-y  += ../../i386/pci/i386.o
-init-y += ../../i386/pci/init.o
-early-y += ../../i386/pci/early.o
-mmconfig-shared-y += ../../i386/pci/mmconfig-shared.o
diff --git a/arch/x86_64/vdso/vdso.S b/arch/x86_64/vdso/vdso.S
deleted file mode 100644 (file)
index 92e80c1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-       .section ".vdso","a"
-       .incbin "arch/x86_64/vdso/vdso.so"
diff --git a/arch/x86_64/vdso/voffset.h b/arch/x86_64/vdso/voffset.h
deleted file mode 100644 (file)
index 5304204..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#define VDSO_TEXT_OFFSET 0x500
index 035007145e780d2cedd3e38cbb1a34e39345d3c2..bc18cbb8ea79562ce05401a5734d8310cf2ea938 100644 (file)
@@ -80,6 +80,7 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
 {
        enum dma_status status;
        struct dma_async_tx_descriptor *iter;
+       struct dma_async_tx_descriptor *parent;
 
        if (!tx)
                return DMA_SUCCESS;
@@ -87,8 +88,15 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
        /* poll through the dependency chain, return when tx is complete */
        do {
                iter = tx;
-               while (iter->cookie == -EBUSY)
-                       iter = iter->parent;
+
+               /* find the root of the unsubmitted dependency chain */
+               while (iter->cookie == -EBUSY) {
+                       parent = iter->parent;
+                       if (parent && parent->cookie == -EBUSY)
+                               iter = iter->parent;
+                       else
+                               break;
+               }
 
                status = dma_sync_wait(iter->chan, iter->cookie);
        } while (status == DMA_IN_PROGRESS || (iter != tx));
index ba9bd403d4432498359361d900048d61d2035d27..f1fb888c2d293752448d7124e8308740afc7d534 100644 (file)
@@ -1,5 +1,5 @@
 obj-y                                  := wakeup.o
-obj-$(CONFIG_ACPI_SLEEP)               += main.o
+obj-y                                  += main.o
 obj-$(CONFIG_ACPI_SLEEP)               += proc.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
index 85633c585aaba63dae682cf32a877b02298bd0b2..2cbb9aabd00eba4c8eeb395deb922dcc36fb6980 100644 (file)
 
 u8 sleep_states[ACPI_S_STATE_COUNT];
 
+#ifdef CONFIG_PM_SLEEP
 static u32 acpi_target_sleep_state = ACPI_STATE_S0;
+#endif
+
+int acpi_sleep_prepare(u32 acpi_state)
+{
+#ifdef CONFIG_ACPI_SLEEP
+       /* do we have a wakeup address for S2 and S3? */
+       if (acpi_state == ACPI_STATE_S3) {
+               if (!acpi_wakeup_address) {
+                       return -EFAULT;
+               }
+               acpi_set_firmware_waking_vector((acpi_physical_address)
+                                               virt_to_phys((void *)
+                                                            acpi_wakeup_address));
+
+       }
+       ACPI_FLUSH_CPU_CACHE();
+       acpi_enable_wakeup_device_prep(acpi_state);
+#endif
+       acpi_gpe_sleep_prepare(acpi_state);
+       acpi_enter_sleep_state_prep(acpi_state);
+       return 0;
+}
 
 #ifdef CONFIG_SUSPEND
 static struct pm_ops acpi_pm_ops;
@@ -60,27 +83,6 @@ static int acpi_pm_set_target(suspend_state_t pm_state)
        return error;
 }
 
-int acpi_sleep_prepare(u32 acpi_state)
-{
-#ifdef CONFIG_ACPI_SLEEP
-       /* do we have a wakeup address for S2 and S3? */
-       if (acpi_state == ACPI_STATE_S3) {
-               if (!acpi_wakeup_address) {
-                       return -EFAULT;
-               }
-               acpi_set_firmware_waking_vector((acpi_physical_address)
-                                               virt_to_phys((void *)
-                                                            acpi_wakeup_address));
-
-       }
-       ACPI_FLUSH_CPU_CACHE();
-       acpi_enable_wakeup_device_prep(acpi_state);
-#endif
-       acpi_gpe_sleep_prepare(acpi_state);
-       acpi_enter_sleep_state_prep(acpi_state);
-       return 0;
-}
-
 /**
  *     acpi_pm_prepare - Do preliminary suspend work.
  *     @pm_state: ignored
@@ -299,6 +301,7 @@ int acpi_suspend(u32 acpi_state)
        return -EINVAL;
 }
 
+#ifdef CONFIG_PM_SLEEP
 /**
  *     acpi_pm_device_sleep_state - return preferred power state of ACPI device
  *             in the system sleep state given by %acpi_target_sleep_state
@@ -373,6 +376,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
                *d_min_p = d_min;
        return d_max;
 }
+#endif
 
 static void acpi_power_off_prepare(void)
 {
index 3b8bf1812dc8588a8b02ae47e49abfdcc9bdb7a0..6996eb5b75068c05f2f4aa78d70e6a64e54f6c8d 100644 (file)
@@ -920,6 +920,13 @@ static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 static int piix_broken_suspend(void)
 {
        static struct dmi_system_id sysids[] = {
+               {
+                       .ident = "TECRA M3",
+                       .matches = {
+                               DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+                               DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M3"),
+                       },
+               },
                {
                        .ident = "TECRA M5",
                        .matches = {
index 4ca7fd6118d50f6d52a1b7c464d1266614282b2d..5dea3584c6c2fc439846b190b2d3627bf22a6156 100644 (file)
@@ -189,6 +189,9 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev)
        data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000);
        data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000);
 
+       if (!data->cs0 || !data->cs1)
+               return -ENOMEM;
+
        irq = platform_get_irq(pdev, 0);
        if (irq)
                set_irq_type(irq, IRQT_RISING);
index ae206f35f747a677e54675847e6fb049c4043569..b45506f1ef73e0db979a1614ffaa58048a63f721 100644 (file)
@@ -44,10 +44,10 @@ static int marvell_pre_reset(struct ata_port *ap, unsigned long deadline)
                return -ENOMEM;
        printk("BAR5:");
        for(i = 0; i <= 0x0F; i++)
-               printk("%02X:%02X ", i, readb(barp + i));
+               printk("%02X:%02X ", i, ioread8(barp + i));
        printk("\n");
 
-       devices = readl(barp + 0x0C);
+       devices = ioread32(barp + 0x0C);
        pci_iounmap(pdev, barp);
 
        if ((pdev->device == 0x6145) && (ap->port_no == 0) &&
index 2bd7645f1a8846a49cbefb3019aace5dae70a73f..cce2834b2b60990140071be8ad10ec3fbcee2b84 100644 (file)
@@ -375,8 +375,9 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev)
        int drive_pci = sis_old_port_base(adev);
        u16 timing;
 
+       /* MWDMA 0-2 and UDMA 0-5 */
        const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 };
-       const u16 udma_bits[]  = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000};
+       const u16 udma_bits[]  = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 };
 
        pci_read_config_word(pdev, drive_pci, &timing);
 
index 11bf6c7ac12260d4ba40551b5eef854022ab8eb3..cb7dec97fee6ab39215ada12c8f0a5372927b523 100644 (file)
@@ -313,7 +313,10 @@ enum {
 #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE)
 
 enum {
-       MV_DMA_BOUNDARY         = 0xffffffffU,
+       /* DMA boundary 0xffff is required by the s/g splitting
+        * we need on /length/ in mv_fill-sg().
+        */
+       MV_DMA_BOUNDARY         = 0xffffU,
 
        /* mask of register bits containing lower 32 bits
         * of EDMA request queue DMA address
@@ -448,7 +451,7 @@ static struct scsi_host_template mv5_sht = {
        .queuecommand           = ata_scsi_queuecmd,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
-       .sg_tablesize           = MV_MAX_SG_CT,
+       .sg_tablesize           = MV_MAX_SG_CT / 2,
        .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
        .emulated               = ATA_SHT_EMULATED,
        .use_clustering         = 1,
@@ -466,7 +469,7 @@ static struct scsi_host_template mv6_sht = {
        .queuecommand           = ata_scsi_queuecmd,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
-       .sg_tablesize           = MV_MAX_SG_CT,
+       .sg_tablesize           = MV_MAX_SG_CT / 2,
        .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
        .emulated               = ATA_SHT_EMULATED,
        .use_clustering         = 1,
@@ -1139,15 +1142,27 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc)
                dma_addr_t addr = sg_dma_address(sg);
                u32 sg_len = sg_dma_len(sg);
 
-               mv_sg->addr = cpu_to_le32(addr & 0xffffffff);
-               mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16);
-               mv_sg->flags_size = cpu_to_le32(sg_len & 0xffff);
+               while (sg_len) {
+                       u32 offset = addr & 0xffff;
+                       u32 len = sg_len;
+
+                       if ((offset + sg_len > 0x10000))
+                               len = 0x10000 - offset;
+
+                       mv_sg->addr = cpu_to_le32(addr & 0xffffffff);
+                       mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16);
+                       mv_sg->flags_size = cpu_to_le32(len);
 
-               if (ata_sg_is_last(sg, qc))
-                       mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL);
+                       sg_len -= len;
+                       addr += len;
+
+                       if (!sg_len && ata_sg_is_last(sg, qc))
+                               mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL);
+
+                       mv_sg++;
+                       n_sg++;
+               }
 
-               mv_sg++;
-               n_sg++;
        }
 
        return n_sg;
index ef83e6b1e314d1aaf3842ca673012425b92bd66f..233e886933959c63f3a5d8d1ea04df0f0a2dfb6b 100644 (file)
@@ -888,6 +888,16 @@ static inline void sil24_host_intr(struct ata_port *ap)
        u32 slot_stat, qc_active;
        int rc;
 
+       /* If PCIX_IRQ_WOC, there's an inherent race window between
+        * clearing IRQ pending status and reading PORT_SLOT_STAT
+        * which may cause spurious interrupts afterwards.  This is
+        * unavoidable and much better than losing interrupts which
+        * happens if IRQ pending is cleared after reading
+        * PORT_SLOT_STAT.
+        */
+       if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC)
+               writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT);
+
        slot_stat = readl(port + PORT_SLOT_STAT);
 
        if (unlikely(slot_stat & HOST_SSTAT_ATTN)) {
@@ -895,9 +905,6 @@ static inline void sil24_host_intr(struct ata_port *ap)
                return;
        }
 
-       if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC)
-               writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT);
-
        qc_active = slot_stat & ~HOST_SSTAT_ATTN;
        rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc);
        if (rc > 0)
@@ -910,7 +917,8 @@ static inline void sil24_host_intr(struct ata_port *ap)
                return;
        }
 
-       if (ata_ratelimit())
+       /* spurious interrupts are expected if PCIX_IRQ_WOC */
+       if (!(ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) && ata_ratelimit())
                ata_port_printk(ap, KERN_INFO, "spurious interrupt "
                        "(slot_stat 0x%x active_tag %d sactive 0x%x)\n",
                        slot_stat, ap->active_tag, ap->sactive);
index 6de33d7a29ba989194cd6fa4f0148cc702acebed..ec86d6fc2360bbb3fa6286a1972a7f82f36c3699 100644 (file)
@@ -284,6 +284,7 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr,
 
        /* let the kset specific function add its keys */
        pos = data;
+       memset(envp, 0, sizeof(envp));
        retval = kset->uevent_ops->uevent(kset, &dev->kobj,
                                          envp, ARRAY_SIZE(envp),
                                          pos, PAGE_SIZE);
@@ -585,9 +586,13 @@ void device_initialize(struct device *dev)
 static struct kobject * get_device_parent(struct device *dev,
                                          struct device *parent)
 {
-       /* Set the parent to the class, not the parent device */
-       /* this keeps sysfs from having a symlink to make old udevs happy */
-       if (dev->class)
+       /*
+        * Set the parent to the class, not the parent device
+        * for topmost devices in class hierarchy.
+        * This keeps sysfs from having a symlink to make old
+        * udevs happy
+        */
+       if (dev->class && (!parent || parent->class != dev->class))
                return &dev->class->subsys.kobj;
        else if (parent)
                return &parent->kobj;
index 67ee3d4b2878c1d2916dbc55f1d60757add33951..79245714f0a777430d459eb2a3c09aa7746410b4 100644 (file)
@@ -1032,6 +1032,10 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp)
        check_disk_change(ip->i_bdev);
        return 0;
 err_release:
+       if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
+               cdi->ops->lock_door(cdi, 0);
+               cdinfo(CD_OPEN, "door unlocked.\n");
+       }
        cdi->ops->release(cdi);
 err:
        cdi->use_count--;
index d68ddbe70f737414a876c9f52cf1417223cbe8b7..c78ff26647ee2ba0642017e15e1d6f9805b9de37 100644 (file)
@@ -129,7 +129,7 @@ $(obj)/defkeymap.o:  $(obj)/defkeymap.c
 
 ifdef GENERATE_KEYMAP
 
-$(obj)/defkeymap.c $(obj)/%.c: $(src)/%.map
+$(obj)/defkeymap.c: $(obj)/%.c: $(src)/%.map
        loadkeys --mktable $< > $@.tmp
        sed -e 's/^static *//' $@.tmp > $@
        rm $@.tmp
index a5d0e95a227acc618697acc25e5d82282f4900d0..141ca176c3974719fae122745aaee82ef2c4b276 100644 (file)
@@ -506,11 +506,6 @@ static void intel_i830_init_gtt_entries(void)
                        break;
                }
        } else {
-               /* G33's GTT stolen memory is separate from gfx data
-                * stolen memory.
-                */
-               if (IS_G33)
-                       size = 0;
                switch (gmch_ctrl & I855_GMCH_GMS_MASK) {
                case I855_GMCH_GMS_STOLEN_1M:
                        gtt_entries = MB(1) - KB(size);
index 737088bd07807a9d875b9c035e509f446b039139..28b98733beb8ffc7b6522e64fcbf1f2282fa36ce 100644 (file)
@@ -210,6 +210,12 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
 #define I915REG_INT_MASK_R     0x020a8
 #define I915REG_INT_ENABLE_R   0x020a0
 
+#define I915REG_PIPEASTAT      0x70024
+#define I915REG_PIPEBSTAT      0x71024
+
+#define I915_VBLANK_INTERRUPT_ENABLE   (1UL<<17)
+#define I915_VBLANK_CLEAR              (1UL<<1)
+
 #define SRX_INDEX              0x3c4
 #define SRX_DATA               0x3c5
 #define SR01                   1
index 4b4b2ce8986345a5f2d1eedb179756ba0e99d382..bb8e9e9c820156e849cbd6ece7485de88767baff 100644 (file)
@@ -214,6 +214,10 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
        struct drm_device *dev = (struct drm_device *) arg;
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
        u16 temp;
+       u32 pipea_stats, pipeb_stats;
+
+       pipea_stats = I915_READ(I915REG_PIPEASTAT);
+       pipeb_stats = I915_READ(I915REG_PIPEBSTAT);
 
        temp = I915_READ16(I915REG_INT_IDENTITY_R);
 
@@ -225,6 +229,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
                return IRQ_NONE;
 
        I915_WRITE16(I915REG_INT_IDENTITY_R, temp);
+       (void) I915_READ16(I915REG_INT_IDENTITY_R);
+       DRM_READMEMORYBARRIER();
 
        dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
 
@@ -252,6 +258,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
 
                if (dev_priv->swaps_pending > 0)
                        drm_locked_tasklet(dev, i915_vblank_tasklet);
+               I915_WRITE(I915REG_PIPEASTAT,
+                       pipea_stats|I915_VBLANK_INTERRUPT_ENABLE|
+                       I915_VBLANK_CLEAR);
+               I915_WRITE(I915REG_PIPEBSTAT,
+                       pipeb_stats|I915_VBLANK_INTERRUPT_ENABLE|
+                       I915_VBLANK_CLEAR);
        }
 
        return IRQ_HANDLED;
index 7ecffc9c738f98b56693f61aa4150bfeb655f712..4c16778e3f846dd97937a79e2c4b38bd30f5accc 100644 (file)
@@ -62,6 +62,8 @@
 
 static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
 
+/* This clocksource driver currently only works on ia64 */
+#ifdef CONFIG_IA64
 static void __iomem *hpet_mctr;
 
 static cycle_t read_hpet(void)
@@ -79,6 +81,7 @@ static struct clocksource clocksource_hpet = {
         .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 static struct clocksource *hpet_clocksource;
+#endif
 
 /* A lock for concurrent access by app and isr hpet activity. */
 static DEFINE_SPINLOCK(hpet_lock);
@@ -943,14 +946,14 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
                        printk(KERN_DEBUG "%s: 0x%lx is busy\n",
                                __FUNCTION__, hdp->hd_phys_address);
                        iounmap(hdp->hd_address);
-                       return -EBUSY;
+                       return AE_ALREADY_EXISTS;
                }
        } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
                struct acpi_resource_fixed_memory32 *fixmem32;
 
                fixmem32 = &res->data.fixed_memory32;
                if (!fixmem32)
-                       return -EINVAL;
+                       return AE_NO_MEMORY;
 
                hdp->hd_phys_address = fixmem32->address;
                hdp->hd_address = ioremap(fixmem32->address,
@@ -960,7 +963,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
                        printk(KERN_DEBUG "%s: 0x%lx is busy\n",
                                __FUNCTION__, hdp->hd_phys_address);
                        iounmap(hdp->hd_address);
-                       return -EBUSY;
+                       return AE_ALREADY_EXISTS;
                }
        } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
                struct acpi_resource_extended_irq *irqp;
index 049a46cc9f87612b157d2abbe0aedd568d3e3372..04ac155d3a0794cf3d7958722e1532e198aa2c52 100644 (file)
@@ -155,23 +155,22 @@ mspec_open(struct vm_area_struct *vma)
  * mspec_close
  *
  * Called when unmapping a device mapping. Frees all mspec pages
- * belonging to the vma.
+ * belonging to all the vma's sharing this vma_data structure.
  */
 static void
 mspec_close(struct vm_area_struct *vma)
 {
        struct vma_data *vdata;
-       int index, last_index, result;
+       int index, last_index;
        unsigned long my_page;
 
        vdata = vma->vm_private_data;
 
-       BUG_ON(vma->vm_start < vdata->vm_start || vma->vm_end > vdata->vm_end);
+       if (!atomic_dec_and_test(&vdata->refcnt))
+               return;
 
-       spin_lock(&vdata->lock);
-       index = (vma->vm_start - vdata->vm_start) >> PAGE_SHIFT;
-       last_index = (vma->vm_end - vdata->vm_start) >> PAGE_SHIFT;
-       for (; index < last_index; index++) {
+       last_index = (vdata->vm_end - vdata->vm_start) >> PAGE_SHIFT;
+       for (index = 0; index < last_index; index++) {
                if (vdata->maddr[index] == 0)
                        continue;
                /*
@@ -180,20 +179,12 @@ mspec_close(struct vm_area_struct *vma)
                 */
                my_page = vdata->maddr[index];
                vdata->maddr[index] = 0;
-               spin_unlock(&vdata->lock);
-               result = mspec_zero_block(my_page, PAGE_SIZE);
-               if (!result)
+               if (!mspec_zero_block(my_page, PAGE_SIZE))
                        uncached_free_page(my_page);
                else
                        printk(KERN_WARNING "mspec_close(): "
-                              "failed to zero page %i\n",
-                              result);
-               spin_lock(&vdata->lock);
+                              "failed to zero page %ld\n", my_page);
        }
-       spin_unlock(&vdata->lock);
-
-       if (!atomic_dec_and_test(&vdata->refcnt))
-               return;
 
        if (vdata->flags & VMD_VMALLOCED)
                vfree(vdata);
@@ -201,7 +192,6 @@ mspec_close(struct vm_area_struct *vma)
                kfree(vdata);
 }
 
-
 /*
  * mspec_nopfn
  *
index 397c714cf2ba78b517a363f0bef2eb674309cb13..af274e5a25ee5ec57533eff3a4e869feac831924 100644 (file)
@@ -1550,11 +1550,13 @@ __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr,
         *      As close as possible to RFC 793, which
         *      suggests using a 250 kHz clock.
         *      Further reading shows this assumes 2 Mb/s networks.
-        *      For 10 Gb/s Ethernet, a 1 GHz clock is appropriate.
-        *      That's funny, Linux has one built in!  Use it!
-        *      (Networks are faster now - should this be increased?)
+        *      For 10 Mb/s Ethernet, a 1 MHz clock is appropriate.
+        *      For 10 Gb/s Ethernet, a 1 GHz clock should be ok, but
+        *      we also need to limit the resolution so that the u32 seq
+        *      overlaps less than one time per MSL (2 minutes).
+        *      Choosing a clock of 64 ns period is OK. (period of 274 s)
         */
-       seq += ktime_get_real().tv64;
+       seq += ktime_get_real().tv64 >> 6;
 #if 0
        printk("init_seq(%lx, %lx, %d, %d) = %d\n",
               saddr, daddr, sport, dport, seq);
index c6f6f42097391b20f434a669ae6b0f263fda63ee..7a61a2a9aafe3879dc8a0e443fd7d1379e7e493e 100644 (file)
@@ -770,6 +770,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                /*
                 * Switching-from response
                 */
+               acquire_console_sem();
                if (vc->vt_newvt >= 0) {
                        if (arg == 0)
                                /*
@@ -784,7 +785,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                                 * complete the switch.
                                 */
                                int newvt;
-                               acquire_console_sem();
                                newvt = vc->vt_newvt;
                                vc->vt_newvt = -1;
                                i = vc_allocate(newvt);
@@ -798,7 +798,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                                 * other console switches..
                                 */
                                complete_change_console(vc_cons[newvt].d);
-                               release_console_sem();
                        }
                }
 
@@ -810,9 +809,12 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                        /*
                         * If it's just an ACK, ignore it
                         */
-                       if (arg != VT_ACKACQ)
+                       if (arg != VT_ACKACQ) {
+                               release_console_sem();
                                return -EINVAL;
+                       }
                }
+               release_console_sem();
 
                return 0;
 
@@ -1030,7 +1032,7 @@ static DECLARE_WAIT_QUEUE_HEAD(vt_activate_queue);
 
 /*
  * Sleeps until a vt is activated, or the task is interrupted. Returns
- * 0 if activation, -EINTR if interrupted.
+ * 0 if activation, -EINTR if interrupted by a signal handler.
  */
 int vt_waitactive(int vt)
 {
@@ -1055,7 +1057,7 @@ int vt_waitactive(int vt)
                        break;
                }
                release_console_sem();
-               retval = -EINTR;
+               retval = -ERESTARTNOHAND;
                if (signal_pending(current))
                        break;
                schedule();
@@ -1208,15 +1210,18 @@ void change_console(struct vc_data *new_vc)
                /*
                 * Send the signal as privileged - kill_pid() will
                 * tell us if the process has gone or something else
-                * is awry
+                * is awry.
+                *
+                * We need to set vt_newvt *before* sending the signal or we
+                * have a race.
                 */
+               vc->vt_newvt = new_vc->vc_num;
                if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) {
                        /*
                         * It worked. Mark the vt to switch to and
                         * return. The process needs to send us a
                         * VT_RELDISP ioctl to complete the switch.
                         */
-                       vc->vt_newvt = new_vc->vc_num;
                        return;
                }
 
index d011a76f8e7a4d032820ffbaafd7d0c544e1a259..fe9e768cfbc4d28aa462d73fb60d79b689d160e9 100644 (file)
@@ -11,7 +11,8 @@ config FIREWIRE
          This is the "Juju" FireWire stack, a new alternative implementation
          designed for robustness and simplicity.  You can build either this
          stack, or the classic stack (the ieee1394 driver, ohci1394 etc.)
-         or both.
+         or both.  Please read http://wiki.linux1394.org/JujuMigration before
+         you enable the new stack.
 
          To compile this driver as a module, say M here: the module will be
          called firewire-core.  It functionally replaces ieee1394, raw1394,
index f19eb6daeefd19e805376d1c7f86cde815b75d14..2fb047b898aa7d94279fa326327131b7b26d5bfe 100644 (file)
@@ -1546,6 +1546,7 @@ static struct pci_device_id pmac_ide_pci_match[] = {
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID2_ATA,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {},
 };
 
 static struct pci_driver pmac_ide_pci_driver = {
index ba0428d872aa4bc0a6cc2993049c6f60f2eba25e..85c51bdc36f1d403130fdf81655c51c7eca6e817 100644 (file)
@@ -1211,12 +1211,42 @@ static void set_datagram_seg(struct mlx4_wqe_datagram_seg *dseg,
        dseg->qkey = cpu_to_be32(wr->wr.ud.remote_qkey);
 }
 
-static void set_data_seg(struct mlx4_wqe_data_seg *dseg,
-                        struct ib_sge *sg)
+static void set_mlx_icrc_seg(void *dseg)
+{
+       u32 *t = dseg;
+       struct mlx4_wqe_inline_seg *iseg = dseg;
+
+       t[1] = 0;
+
+       /*
+        * Need a barrier here before writing the byte_count field to
+        * make sure that all the data is visible before the
+        * byte_count field is set.  Otherwise, if the segment begins
+        * a new cacheline, the HCA prefetcher could grab the 64-byte
+        * chunk and get a valid (!= * 0xffffffff) byte count but
+        * stale data, and end up sending the wrong data.
+        */
+       wmb();
+
+       iseg->byte_count = cpu_to_be32((1 << 31) | 4);
+}
+
+static void set_data_seg(struct mlx4_wqe_data_seg *dseg, struct ib_sge *sg)
 {
-       dseg->byte_count = cpu_to_be32(sg->length);
        dseg->lkey       = cpu_to_be32(sg->lkey);
        dseg->addr       = cpu_to_be64(sg->addr);
+
+       /*
+        * Need a barrier here before writing the byte_count field to
+        * make sure that all the data is visible before the
+        * byte_count field is set.  Otherwise, if the segment begins
+        * a new cacheline, the HCA prefetcher could grab the 64-byte
+        * chunk and get a valid (!= * 0xffffffff) byte count but
+        * stale data, and end up sending the wrong data.
+        */
+       wmb();
+
+       dseg->byte_count = cpu_to_be32(sg->length);
 }
 
 int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
@@ -1225,6 +1255,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
        struct mlx4_ib_qp *qp = to_mqp(ibqp);
        void *wqe;
        struct mlx4_wqe_ctrl_seg *ctrl;
+       struct mlx4_wqe_data_seg *dseg;
        unsigned long flags;
        int nreq;
        int err = 0;
@@ -1324,22 +1355,27 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
                        break;
                }
 
-               for (i = 0; i < wr->num_sge; ++i) {
-                       set_data_seg(wqe, wr->sg_list + i);
+               /*
+                * Write data segments in reverse order, so as to
+                * overwrite cacheline stamp last within each
+                * cacheline.  This avoids issues with WQE
+                * prefetching.
+                */
 
-                       wqe  += sizeof (struct mlx4_wqe_data_seg);
-                       size += sizeof (struct mlx4_wqe_data_seg) / 16;
-               }
+               dseg = wqe;
+               dseg += wr->num_sge - 1;
+               size += wr->num_sge * (sizeof (struct mlx4_wqe_data_seg) / 16);
 
                /* Add one more inline data segment for ICRC for MLX sends */
-               if (qp->ibqp.qp_type == IB_QPT_SMI || qp->ibqp.qp_type == IB_QPT_GSI) {
-                       ((struct mlx4_wqe_inline_seg *) wqe)->byte_count =
-                               cpu_to_be32((1 << 31) | 4);
-                       ((u32 *) wqe)[1] = 0;
-                       wqe  += sizeof (struct mlx4_wqe_data_seg);
+               if (unlikely(qp->ibqp.qp_type == IB_QPT_SMI ||
+                            qp->ibqp.qp_type == IB_QPT_GSI)) {
+                       set_mlx_icrc_seg(dseg + 1);
                        size += sizeof (struct mlx4_wqe_data_seg) / 16;
                }
 
+               for (i = wr->num_sge - 1; i >= 0; --i, --dseg)
+                       set_data_seg(dseg, wr->sg_list + i);
+
                ctrl->fence_size = (wr->send_flags & IB_SEND_FENCE ?
                                    MLX4_WQE_CTRL_FENCE : 0) | size;
 
index e2abe18e575df2d89e2de4189124f2fbb4abb35f..7c662ee594a3e9fdf85761765ae6776ddecf05d9 100644 (file)
@@ -277,7 +277,7 @@ config JOYSTICK_XPAD_FF
 
 config JOYSTICK_XPAD_LEDS
        bool "LED Support for Xbox360 controller 'BigX' LED"
-       depends on LEDS_CLASS && JOYSTICK_XPAD
+       depends on JOYSTICK_XPAD && (LEDS_CLASS=y || LEDS_CLASS=JOYSTICK_XPAD)
        ---help---
          This option enables support for the LED which surrounds the Big X on
          XBox 360 controller.
index 2bea1b2c631c81274b80304f3e4be11216013068..a1804bfdbb8ce38510f783c233682e12e5dabac8 100644 (file)
@@ -328,6 +328,7 @@ static void atp_complete(struct urb* urb)
 {
        int x, y, x_z, y_z, x_f, y_f;
        int retval, i, j;
+       int key;
        struct atp *dev = urb->context;
 
        switch (urb->status) {
@@ -468,6 +469,7 @@ static void atp_complete(struct urb* urb)
                              ATP_XFACT, &x_z, &x_f);
        y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS,
                              ATP_YFACT, &y_z, &y_f);
+       key = dev->data[dev->datalen - 1] & 1;
 
        if (x && y) {
                if (dev->x_old != -1) {
@@ -505,7 +507,7 @@ static void atp_complete(struct urb* urb)
                   the first touch unless reinitialised. Do so if it's been
                   idle for a while in order to avoid waking the kernel up
                   several hundred times a second */
-               if (atp_is_geyser_3(dev)) {
+               if (!key && atp_is_geyser_3(dev)) {
                        dev->idlecount++;
                        if (dev->idlecount == 10) {
                                dev->valid = 0;
@@ -514,7 +516,7 @@ static void atp_complete(struct urb* urb)
                }
        }
 
-       input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen - 1] & 1);
+       input_report_key(dev->input, BTN_LEFT, key);
        input_sync(dev->input);
 
 exit:
index ec5f4046412fa564644619175c59373ab4ca39e3..4910bca52640ed0bf67d9833a9595f23c41f44fa 100644 (file)
@@ -1135,7 +1135,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
                        if (count > dev->drv[drvidx]->stavail)
                                count = dev->drv[drvidx]->stavail;
                        len = dev->drv[drvidx]->interface->readstat(buf, count,
-                                               drvidx, isdn_minor2chan(minor));
+                               drvidx, isdn_minor2chan(minor - ISDN_MINOR_CTRL));
                        if (len < 0) {
                                retval = len;
                                goto out;
@@ -1207,7 +1207,8 @@ isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off
                 */
                if (dev->drv[drvidx]->interface->writecmd)
                        retval = dev->drv[drvidx]->interface->
-                               writecmd(buf, count, drvidx, isdn_minor2chan(minor));
+                               writecmd(buf, count, drvidx,
+                               isdn_minor2chan(minor - ISDN_MINOR_CTRL));
                else
                        retval = count;
                goto out;
index f182c6a36209c4c35b5f0c1b5bba3e5bf1b57f0c..1ddcd5cd20f6070b72428622b80f531f3ac9fe08 100644 (file)
@@ -22,8 +22,9 @@
        jmp lguest_init
 
 /*G:055 We create a macro which puts the assembler code between lgstart_ and
- * lgend_ markers.  These templates end up in the .init.text section, so they
- * are discarded after boot. */
+ * lgend_ markers.  These templates are put in the .text section: they can't be
+ * discarded after boot as we may need to patch modules, too. */
+.text
 #define LGUEST_PATCH(name, insns...)                   \
        lgstart_##name: insns; lgend_##name:;           \
        .globl lgstart_##name; .globl lgend_##name
@@ -34,7 +35,6 @@ LGUEST_PATCH(popf, movl %eax, lguest_data+LGUEST_DATA_irq_enabled)
 LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax)
 /*:*/
 
-.text
 /* These demark the EIP range where host should never deliver interrupts. */
 .global lguest_noirq_start
 .global lguest_noirq_end
index 4d63773ee73a634fe31d72eb04edad4d8942f8e2..f96dea975fa50d94e805c40c46be82df7cfe80bc 100644 (file)
@@ -514,7 +514,7 @@ static void ops_complete_biofill(void *stripe_head_ref)
        struct stripe_head *sh = stripe_head_ref;
        struct bio *return_bi = NULL;
        raid5_conf_t *conf = sh->raid_conf;
-       int i, more_to_read = 0;
+       int i;
 
        pr_debug("%s: stripe %llu\n", __FUNCTION__,
                (unsigned long long)sh->sector);
@@ -522,16 +522,14 @@ static void ops_complete_biofill(void *stripe_head_ref)
        /* clear completed biofills */
        for (i = sh->disks; i--; ) {
                struct r5dev *dev = &sh->dev[i];
-               /* check if this stripe has new incoming reads */
-               if (dev->toread)
-                       more_to_read++;
 
                /* acknowledge completion of a biofill operation */
-               /* and check if we need to reply to a read request
-               */
-               if (test_bit(R5_Wantfill, &dev->flags) && !dev->toread) {
+               /* and check if we need to reply to a read request,
+                * new R5_Wantfill requests are held off until
+                * !test_bit(STRIPE_OP_BIOFILL, &sh->ops.pending)
+                */
+               if (test_and_clear_bit(R5_Wantfill, &dev->flags)) {
                        struct bio *rbi, *rbi2;
-                       clear_bit(R5_Wantfill, &dev->flags);
 
                        /* The access to dev->read is outside of the
                         * spin_lock_irq(&conf->device_lock), but is protected
@@ -558,8 +556,7 @@ static void ops_complete_biofill(void *stripe_head_ref)
 
        return_io(return_bi);
 
-       if (more_to_read)
-               set_bit(STRIPE_HANDLE, &sh->state);
+       set_bit(STRIPE_HANDLE, &sh->state);
        release_stripe(sh);
 }
 
index 0285c4a830eb61938d044adc965bf0bef4c49784..66ea3cbc369c209f2ae4cc52d03253479f16052b 100644 (file)
@@ -754,9 +754,11 @@ static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts)
                ivtv_yuv_close(itv);
        }
        if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_YUV)
-           itv->output_mode = OUT_NONE;
+               itv->output_mode = OUT_NONE;
+       else if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_UDMA_YUV)
+               itv->output_mode = OUT_NONE;
        else if (s->type == IVTV_DEC_STREAM_TYPE_MPG && itv->output_mode == OUT_MPG)
-           itv->output_mode = OUT_NONE;
+               itv->output_mode = OUT_NONE;
 
        itv->speed = 0;
        clear_bit(IVTV_F_I_DEC_PAUSED, &itv->i_flags);
index e3371f972240a896b930fd03107f12882aedf064..0cb006f2943da5abfb08bc604a25097f18b4665b 100644 (file)
@@ -1387,7 +1387,6 @@ static const struct file_operations usbvision_fops = {
        .ioctl          = video_ioctl2,
        .llseek         = no_llseek,
 /*     .poll          = video_poll, */
-       .mmap          = usbvision_v4l2_mmap,
        .compat_ioctl  = v4l_compat_ioctl32,
 };
 static struct video_device usbvision_video_template = {
@@ -1413,7 +1412,7 @@ static struct video_device usbvision_video_template = {
        .vidioc_s_input       = vidioc_s_input,
        .vidioc_queryctrl     = vidioc_queryctrl,
        .vidioc_g_audio       = vidioc_g_audio,
-       .vidioc_g_audio       = vidioc_s_audio,
+       .vidioc_s_audio       = vidioc_s_audio,
        .vidioc_g_ctrl        = vidioc_g_ctrl,
        .vidioc_s_ctrl        = vidioc_s_ctrl,
        .vidioc_streamon      = vidioc_streamon,
@@ -1459,7 +1458,7 @@ static struct video_device usbvision_radio_template=
        .vidioc_s_input       = vidioc_s_input,
        .vidioc_queryctrl     = vidioc_queryctrl,
        .vidioc_g_audio       = vidioc_g_audio,
-       .vidioc_g_audio       = vidioc_s_audio,
+       .vidioc_s_audio       = vidioc_s_audio,
        .vidioc_g_ctrl        = vidioc_g_ctrl,
        .vidioc_s_ctrl        = vidioc_s_ctrl,
        .vidioc_g_tuner       = vidioc_g_tuner,
index 4c3785c9d4b811067b5af3dafd0de33224591bae..9ecc3adcf6c189117e038426e0fc0550f08f60bd 100644 (file)
@@ -1726,6 +1726,7 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct ethtool_wol
        case E1000_DEV_ID_82571EB_QUAD_COPPER:
        case E1000_DEV_ID_82571EB_QUAD_FIBER:
        case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
+       case E1000_DEV_ID_82571PT_QUAD_COPPER:
        case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
                /* quad port adapters only support WoL on port A */
                if (!adapter->quad_port_a) {
index ba120f7fb0bef2c619475fcd5742170f02b44124..8604adbe351cc07dc2b004896af8c4cd338d9331 100644 (file)
@@ -387,6 +387,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
        case E1000_DEV_ID_82571EB_SERDES_DUAL:
        case E1000_DEV_ID_82571EB_SERDES_QUAD:
        case E1000_DEV_ID_82571EB_QUAD_COPPER:
+       case E1000_DEV_ID_82571PT_QUAD_COPPER:
        case E1000_DEV_ID_82571EB_QUAD_FIBER:
        case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
                hw->mac_type = e1000_82571;
index fe8714655c90445808000870543f5539d70e1dfa..07f0ea73676e90e4ad00555447108c03b2f4ef60 100644 (file)
@@ -475,6 +475,7 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
 #define E1000_DEV_ID_82571EB_FIBER       0x105F
 #define E1000_DEV_ID_82571EB_SERDES      0x1060
 #define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
+#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5
 #define E1000_DEV_ID_82571EB_QUAD_FIBER  0x10A5
 #define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE  0x10BC
 #define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
index 4a225950fb43f6cbe30feff14945857305825dbe..e7c8951f47fa94d3e0fae7551f5e6d84ef16676a 100644 (file)
@@ -108,6 +108,7 @@ static struct pci_device_id e1000_pci_tbl[] = {
        INTEL_E1000_ETHERNET_DEVICE(0x10BC),
        INTEL_E1000_ETHERNET_DEVICE(0x10C4),
        INTEL_E1000_ETHERNET_DEVICE(0x10C5),
+       INTEL_E1000_ETHERNET_DEVICE(0x10D5),
        INTEL_E1000_ETHERNET_DEVICE(0x10D9),
        INTEL_E1000_ETHERNET_DEVICE(0x10DA),
        /* required last entry */
@@ -1101,6 +1102,7 @@ e1000_probe(struct pci_dev *pdev,
        case E1000_DEV_ID_82571EB_QUAD_COPPER:
        case E1000_DEV_ID_82571EB_QUAD_FIBER:
        case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE:
+       case E1000_DEV_ID_82571PT_QUAD_COPPER:
                /* if quad port adapter, disable WoL on all but port A */
                if (global_quad_port_a != 0)
                        adapter->eeprom_wol = 0;
index 6a117e9968cb5dd09e91ae4425b3cd3b27e9d35c..315335671f0f06f2a2f9357d17c7ca8a9c4f8296 100644 (file)
@@ -534,7 +534,7 @@ static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id)
        }
 
        /* PHY status changed */
-       if (eth_int_cause_ext & ETH_INT_CAUSE_PHY) {
+       if (eth_int_cause_ext & (ETH_INT_CAUSE_PHY | ETH_INT_CAUSE_STATE)) {
                struct ethtool_cmd cmd;
 
                if (mii_link_ok(&mp->mii)) {
@@ -1357,7 +1357,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
 #endif
 
        dev->watchdog_timeo = 2 * HZ;
-       dev->tx_queue_len = mp->tx_ring_size;
        dev->base_addr = 0;
        dev->change_mtu = mv643xx_eth_change_mtu;
        dev->do_ioctl = mv643xx_eth_do_ioctl;
@@ -2768,8 +2767,6 @@ static const struct ethtool_ops mv643xx_ethtool_ops = {
        .get_stats_count        = mv643xx_get_stats_count,
        .get_ethtool_stats      = mv643xx_get_ethtool_stats,
        .get_strings            = mv643xx_get_strings,
-       .get_stats_count        = mv643xx_get_stats_count,
-       .get_ethtool_stats      = mv643xx_get_ethtool_stats,
        .nway_reset             = mv643xx_eth_nway_restart,
 };
 
index 82f8c0cbfb640fafd0e90b8a429e0283ed6622f3..565b96696acab9e131fb275dca99430e3b88b824 100644 (file)
@@ -64,7 +64,9 @@
 #define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8)
 #define ETH_INT_CAUSE_TX       (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR)
 #define ETH_INT_CAUSE_PHY      0x00010000
-#define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY)
+#define ETH_INT_CAUSE_STATE    0x00100000
+#define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY | \
+                                       ETH_INT_CAUSE_STATE)
 
 #define ETH_INT_MASK_ALL       0x00000000
 #define ETH_INT_MASK_ALL_EXT   0x00000000
index c06cae3f0b564c3240058f4a97c3656d47e9bf27..503f2685fb73c434ae4a2d6d98be4f03a3d4b7d9 100644 (file)
@@ -116,7 +116,7 @@ struct el3_private {
     spinlock_t         lock;
 };
 
-static const char *if_names[] = { "auto", "10base2", "10baseT", "AUI" };
+static const char *if_names[] = { "auto", "10baseT", "10base2", "AUI" };
 
 /*====================================================================*/
 
index f79cf87a2bff555aef80eba31da6c17eb340d65c..c0b6d19d1457598ba7a83738a194400344725197 100644 (file)
@@ -136,7 +136,7 @@ struct ppp_mppe_state {
  * Key Derivation, from RFC 3078, RFC 3079.
  * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079.
  */
-static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *InterimKey)
+static void get_new_key_from_sha(struct ppp_mppe_state * state)
 {
        struct hash_desc desc;
        struct scatterlist sg[4];
@@ -153,8 +153,6 @@ static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *I
        desc.flags = 0;
 
        crypto_hash_digest(&desc, sg, nbytes, state->sha1_digest);
-
-       memcpy(InterimKey, state->sha1_digest, state->keylen);
 }
 
 /*
@@ -163,21 +161,21 @@ static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *I
  */
 static void mppe_rekey(struct ppp_mppe_state * state, int initial_key)
 {
-       unsigned char InterimKey[MPPE_MAX_KEY_LEN];
        struct scatterlist sg_in[1], sg_out[1];
        struct blkcipher_desc desc = { .tfm = state->arc4 };
 
-       get_new_key_from_sha(state, InterimKey);
+       get_new_key_from_sha(state);
        if (!initial_key) {
-               crypto_blkcipher_setkey(state->arc4, InterimKey, state->keylen);
-               setup_sg(sg_in, InterimKey, state->keylen);
+               crypto_blkcipher_setkey(state->arc4, state->sha1_digest,
+                                       state->keylen);
+               setup_sg(sg_in, state->sha1_digest, state->keylen);
                setup_sg(sg_out, state->session_key, state->keylen);
                if (crypto_blkcipher_encrypt(&desc, sg_out, sg_in,
                                             state->keylen) != 0) {
                    printk(KERN_WARNING "mppe_rekey: cipher_encrypt failed\n");
                }
        } else {
-               memcpy(state->session_key, InterimKey, state->keylen);
+               memcpy(state->session_key, state->sha1_digest, state->keylen);
        }
        if (state->keylen == 8) {
                /* See RFC 3078 */
index 69da95b5ad0c3ca51aac4ca58d1729681a8a9923..ea151315050c382ff096696d7ae2a3abd2a54949 100755 (executable)
@@ -2248,6 +2248,13 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
                qdev->rsp_consumer_index) && (work_done < work_to_do)) {
 
                net_rsp = qdev->rsp_current;
+               rmb();
+               /*
+                * Fix 4032 chipe undocumented "feature" where bit-8 is set if the
+                * inbound completion is for a VLAN.
+                */
+               if (qdev->device_id == QL3032_DEVICE_ID)
+                       net_rsp->opcode &= 0x7f;
                switch (net_rsp->opcode) {
 
                case OPCODE_OB_MAC_IOCB_FN0:
index b85ab4a8f2a3377354bf357940334be642f4a6ef..c76dd29c8e9a1ef8f17d60067c08a2c970d788e8 100644 (file)
@@ -1228,7 +1228,10 @@ static void rtl8169_hw_phy_config(struct net_device *dev)
                return;
        }
 
-       /* phy config for RTL8169s mac_version C chip */
+       if ((tp->mac_version != RTL_GIGA_MAC_VER_02) &&
+           (tp->mac_version != RTL_GIGA_MAC_VER_03))
+               return;
+
        mdio_write(ioaddr, 31, 0x0001);                 //w 31 2 0 1
        mdio_write(ioaddr, 21, 0x1000);                 //w 21 15 0 1000
        mdio_write(ioaddr, 24, 0x65c7);                 //w 24 15 0 65c7
@@ -1915,7 +1918,11 @@ static void rtl_hw_start_8169(struct net_device *dev)
 
        rtl_set_rx_max_size(ioaddr);
 
-       rtl_set_rx_tx_config_registers(tp);
+       if ((tp->mac_version == RTL_GIGA_MAC_VER_01) ||
+           (tp->mac_version == RTL_GIGA_MAC_VER_02) ||
+           (tp->mac_version == RTL_GIGA_MAC_VER_03) ||
+           (tp->mac_version == RTL_GIGA_MAC_VER_04))
+               rtl_set_rx_tx_config_registers(tp);
 
        tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW;
 
@@ -1938,6 +1945,14 @@ static void rtl_hw_start_8169(struct net_device *dev)
 
        rtl_set_rx_tx_desc_registers(tp, ioaddr);
 
+       if ((tp->mac_version != RTL_GIGA_MAC_VER_01) &&
+           (tp->mac_version != RTL_GIGA_MAC_VER_02) &&
+           (tp->mac_version != RTL_GIGA_MAC_VER_03) &&
+           (tp->mac_version != RTL_GIGA_MAC_VER_04)) {
+               RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
+               rtl_set_rx_tx_config_registers(tp);
+       }
+
        RTL_W8(Cfg9346, Cfg9346_Lock);
 
        /* Initially a 10 us delay. Turned it into a PCI commit. - FR */
@@ -1952,8 +1967,6 @@ static void rtl_hw_start_8169(struct net_device *dev)
 
        /* Enable all known interrupts by setting the interrupt mask. */
        RTL_W16(IntrMask, tp->intr_event);
-
-       RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
 }
 
 static void rtl_hw_start_8168(struct net_device *dev)
@@ -2567,6 +2580,15 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
                    (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
                        netif_wake_queue(dev);
                }
+               /*
+                * 8168 hack: TxPoll requests are lost when the Tx packets are
+                * too close. Let's kick an extra TxPoll request when a burst
+                * of start_xmit activity is detected (if it is not detected,
+                * it is slow enough). -- FR
+                */
+               smp_rmb();
+               if (tp->cur_tx != dirty_tx)
+                       RTL_W8(TxPoll, NPQ);
        }
 }
 
index eaffe551d1d8108e68e7d8a59a0db3e5f1b85a22..ea117fc3d5e390c6da6b763a61f6d94a071c3c86 100644 (file)
@@ -338,6 +338,16 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
                if (!(hw->flags & SKY2_HW_GIGABIT)) {
                        /* enable automatic crossover */
                        ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1;
+
+                       if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
+                           hw->chip_rev == CHIP_REV_YU_FE2_A0) {
+                               u16 spec;
+
+                               /* Enable Class A driver for FE+ A0 */
+                               spec = gm_phy_read(hw, port, PHY_MARV_FE_SPEC_2);
+                               spec |= PHY_M_FESC_SEL_CL_A;
+                               gm_phy_write(hw, port, PHY_MARV_FE_SPEC_2, spec);
+                       }
                } else {
                        /* disable energy detect */
                        ctrl &= ~PHY_M_PC_EN_DET_MSK;
@@ -816,7 +826,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
        sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_CLR);
        sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON);
 
-       if (!(hw->flags & SKY2_HW_RAMBUFFER)) {
+       /* On chips without ram buffer, pause is controled by MAC level */
+       if (sky2_read8(hw, B2_E_0) == 0) {
                sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8);
                sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8);
 
@@ -899,6 +910,20 @@ static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2)
        return le;
 }
 
+static void tx_init(struct sky2_port *sky2)
+{
+       struct sky2_tx_le *le;
+
+       sky2->tx_prod = sky2->tx_cons = 0;
+       sky2->tx_tcpsum = 0;
+       sky2->tx_last_mss = 0;
+
+       le = get_tx_le(sky2);
+       le->addr = 0;
+       le->opcode = OP_ADDR64 | HW_OWNER;
+       sky2->tx_addr64 = 0;
+}
+
 static inline struct tx_ring_info *tx_le_re(struct sky2_port *sky2,
                                            struct sky2_tx_le *le)
 {
@@ -1271,7 +1296,7 @@ static int sky2_up(struct net_device *dev)
        struct sky2_port *sky2 = netdev_priv(dev);
        struct sky2_hw *hw = sky2->hw;
        unsigned port = sky2->port;
-       u32 imask;
+       u32 imask, ramsize;
        int cap, err = -ENOMEM;
        struct net_device *otherdev = hw->dev[sky2->port^1];
 
@@ -1309,7 +1334,8 @@ static int sky2_up(struct net_device *dev)
                                GFP_KERNEL);
        if (!sky2->tx_ring)
                goto err_out;
-       sky2->tx_prod = sky2->tx_cons = 0;
+
+       tx_init(sky2);
 
        sky2->rx_le = pci_alloc_consistent(hw->pdev, RX_LE_BYTES,
                                           &sky2->rx_le_map);
@@ -1326,13 +1352,12 @@ static int sky2_up(struct net_device *dev)
 
        sky2_mac_init(hw, port);
 
-       if (hw->flags & SKY2_HW_RAMBUFFER) {
-               /* Register is number of 4K blocks on internal RAM buffer. */
-               u32 ramsize = sky2_read8(hw, B2_E_0) * 4;
+       /* Register is number of 4K blocks on internal RAM buffer. */
+       ramsize = sky2_read8(hw, B2_E_0) * 4;
+       if (ramsize > 0) {
                u32 rxspace;
 
-               printk(KERN_DEBUG PFX "%s: ram buffer %dK\n", dev->name, ramsize);
-
+               pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize);
                if (ramsize < 16)
                        rxspace = ramsize / 2;
                else
@@ -1995,7 +2020,7 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu)
 
        synchronize_irq(hw->pdev->irq);
 
-       if (!(hw->flags & SKY2_HW_RAMBUFFER))
+       if (sky2_read8(hw, B2_E_0) == 0)
                sky2_set_tx_stfwd(hw, port);
 
        ctl = gma_read16(hw, port, GM_GP_CTRL);
@@ -2138,6 +2163,15 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
        sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;
        prefetch(sky2->rx_ring + sky2->rx_next);
 
+       /* This chip has hardware problems that generates bogus status.
+        * So do only marginal checking and expect higher level protocols
+        * to handle crap frames.
+        */
+       if (sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
+           sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0 &&
+           length != count)
+               goto okay;
+
        if (status & GMR_FS_ANY_ERR)
                goto error;
 
@@ -2146,8 +2180,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
 
        /* if length reported by DMA does not match PHY, packet was truncated */
        if (length != count)
-               goto len_mismatch;
+               goto len_error;
 
+okay:
        if (length < copybreak)
                skb = receive_copy(sky2, re, length);
        else
@@ -2157,13 +2192,13 @@ resubmit:
 
        return skb;
 
-len_mismatch:
+len_error:
        /* Truncation of overlength packets
           causes PHY length to not match MAC length */
        ++sky2->net_stats.rx_length_errors;
        if (netif_msg_rx_err(sky2) && net_ratelimit())
-               pr_info(PFX "%s: rx length mismatch: length %d status %#x\n",
-                       dev->name, length, status);
+               pr_info(PFX "%s: rx length error: status %#x length %d\n",
+                       dev->name, status, length);
        goto resubmit;
 
 error:
@@ -2526,7 +2561,7 @@ static void sky2_watchdog(unsigned long arg)
                        ++active;
 
                        /* For chips with Rx FIFO, check if stuck */
-                       if ((hw->flags & SKY2_HW_RAMBUFFER) &&
+                       if ((hw->flags & SKY2_HW_FIFO_HANG_CHECK) &&
                             sky2_rx_hung(dev)) {
                                pr_info(PFX "%s: receiver hang detected\n",
                                        dev->name);
@@ -2684,8 +2719,10 @@ static int __devinit sky2_init(struct sky2_hw *hw)
        switch(hw->chip_id) {
        case CHIP_ID_YUKON_XL:
                hw->flags = SKY2_HW_GIGABIT
-                       | SKY2_HW_NEWER_PHY
-                       | SKY2_HW_RAMBUFFER;
+                       | SKY2_HW_NEWER_PHY;
+               if (hw->chip_rev < 3)
+                       hw->flags |= SKY2_HW_FIFO_HANG_CHECK;
+
                break;
 
        case CHIP_ID_YUKON_EC_U:
@@ -2711,11 +2748,10 @@ static int __devinit sky2_init(struct sky2_hw *hw)
                        dev_err(&hw->pdev->dev, "unsupported revision Yukon-EC rev A1\n");
                        return -EOPNOTSUPP;
                }
-               hw->flags = SKY2_HW_GIGABIT | SKY2_HW_RAMBUFFER;
+               hw->flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK;
                break;
 
        case CHIP_ID_YUKON_FE:
-               hw->flags = SKY2_HW_RAMBUFFER;
                break;
 
        case CHIP_ID_YUKON_FE_P:
@@ -3923,13 +3959,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
        sky2->hw = hw;
        sky2->msg_enable = netif_msg_init(debug, default_msg);
 
-       /* This chip has hardware problems that generates
-        * bogus PHY receive status so by default shut up the message.
-        */
-       if (hw->chip_id == CHIP_ID_YUKON_FE_P &&
-           hw->chip_rev == CHIP_REV_YU_FE2_A0)
-               sky2->msg_enable &= ~NETIF_MSG_RX_ERR;
-
        /* Auto speed and flow control */
        sky2->autoneg = AUTONEG_ENABLE;
        sky2->flow_mode = FC_BOTH;
@@ -3953,8 +3982,12 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
                dev->features |= NETIF_F_HIGHDMA;
 
 #ifdef SKY2_VLAN_TAG_USED
-       dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
-       dev->vlan_rx_register = sky2_vlan_rx_register;
+       /* The workaround for FE+ status conflicts with VLAN tag detection. */
+       if (!(sky2->hw->chip_id == CHIP_ID_YUKON_FE_P &&
+             sky2->hw->chip_rev == CHIP_REV_YU_FE2_A0)) {
+               dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
+               dev->vlan_rx_register = sky2_vlan_rx_register;
+       }
 #endif
 
        /* read the mac address */
index 69cd98400fe669639b596ea99185d66e9b49e265..8bc5c54e3efacd2cdc63e12aabd31a5ce37b0051 100644 (file)
@@ -2063,7 +2063,7 @@ struct sky2_hw {
 #define SKY2_HW_FIBRE_PHY      0x00000002
 #define SKY2_HW_GIGABIT                0x00000004
 #define SKY2_HW_NEWER_PHY      0x00000008
-#define SKY2_HW_RAMBUFFER      0x00000010      /* chip has RAM FIFO */
+#define SKY2_HW_FIFO_HANG_CHECK        0x00000010
 #define SKY2_HW_NEW_LE         0x00000020      /* new LSOv2 format */
 #define SKY2_HW_AUTO_TX_SUM    0x00000040      /* new IP decode for Tx */
 #define SKY2_HW_ADV_POWER_CTL  0x00000080      /* additional PHY power regs */
index 16c7a0e878505a7b229817012de9e3f2b3eab50c..a2de32fabc170a9a688750ce7f427f67f4e7a5e6 100644 (file)
@@ -405,7 +405,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
        dev->net->ethtool_ops = &dm9601_ethtool_ops;
        dev->net->hard_header_len += DM_TX_OVERHEAD;
        dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
-       dev->rx_urb_size = dev->net->mtu + DM_RX_OVERHEAD;
+       dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD;
 
        dev->mii.dev = dev->net;
        dev->mii.mdio_read = dm9601_mdio_read;
index ef35bc6c4a228491723bd6c4efc9d5816dd8009b..4eb6d9752881e7459a4bb0be66d959903c394e2d 100644 (file)
@@ -43,7 +43,7 @@ obj-$(CONFIG_PCMCIA_RAYCS)    += ray_cs.o
 obj-$(CONFIG_PCMCIA_WL3501)    += wl3501_cs.o
 
 obj-$(CONFIG_USB_ZD1201)       += zd1201.o
-obj-$(CONFIG_LIBERTAS_USB)     += libertas/
+obj-$(CONFIG_LIBERTAS)         += libertas/
 
 rtl8187-objs           := rtl8187_dev.o rtl8187_rtl8225.o
 obj-$(CONFIG_RTL8187)  += rtl8187.o
index d6d9413d7f23cdd662eadf09cc675dd667b2fda1..6acfdc49dccd30507f4b8b9521f4e75a2a237fbd 100644 (file)
@@ -444,7 +444,7 @@ static int bcm43xx_wx_set_xmitpower(struct net_device *net_dev,
        u16 maxpower;
 
        if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) {
-               printk(PFX KERN_ERR "TX power not in dBm.\n");
+               printk(KERN_ERR PFX "TX power not in dBm.\n");
                return -EOPNOTSUPP;
        }
 
index d590a99930fa5a762f2d327faca4d10ecb7373d3..2305cc450a4572da1d9dc0a57783a500db3a91a0 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "cpqphp.h"
 #include "cpqphp_nvram.h"
-#include "../../../arch/i386/pci/pci.h"        /* horrible hack showing how processor dependent we are... */
+#include "../../../arch/x86/pci/pci.h" /* horrible hack showing how processor dependent we are... */
 
 
 /* Global variables */
index fc7c74d725955794141093e7a41217bd3964dd06..3f6cd20e95d2f187d2caaa9747a0d90f0c77f9b7 100644 (file)
@@ -37,7 +37,7 @@
 #include "../pci.h"
 #include "cpqphp.h"
 #include "cpqphp_nvram.h"
-#include "../../../arch/i386/pci/pci.h"        /* horrible hack showing how processor dependent we are... */
+#include "../../../arch/x86/pci/pci.h" /* horrible hack showing how processor dependent we are... */
 
 
 u8 cpqhp_nic_irq;
index 0316eeaaeb29cb288f45066dbf6e746610db66b1..a90c28d0c69df75c3cb62b2ca19d3073b49839d1 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/delay.h>
 #include <linux/wait.h>
 #include "../pci.h"
-#include "../../../arch/i386/pci/pci.h"        /* for struct irq_routing_table */
+#include "../../../arch/x86/pci/pci.h" /* for struct irq_routing_table */
 #include "ibmphp.h"
 
 #define attn_on(sl)  ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON)
index 7dcaa09b3c200591cfb49412c331b19ccb3e8999..50f2dd9e1bb2cac61a58d132c52046ac88fc5d66 100644 (file)
@@ -1444,7 +1444,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos);
 static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
 {
        u16 command;
-       u32 bar;
        u8 __iomem *csr;
        u8 cmd_hi;
 
@@ -1476,12 +1475,12 @@ static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
         * re-enable them when it's ready.
         */
        pci_read_config_word(dev, PCI_COMMAND, &command);
-       pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar);
 
-       if (!(command & PCI_COMMAND_MEMORY) || !bar)
+       if (!(command & PCI_COMMAND_MEMORY) || !pci_resource_start(dev, 0))
                return;
 
-       csr = ioremap(bar, 8);
+       /* Convert from PCI bus to resource space.  */
+       csr = ioremap(pci_resource_start(dev, 0), 8);
        if (!csr) {
                printk(KERN_WARNING "PCI: Can't map %s e100 registers\n",
                        pci_name(dev));
index c7c4574729b190c6358e57e7f02d04427be3c029..de3155b21285df91c29def0571409e28973bdbdc 100644 (file)
@@ -289,6 +289,7 @@ int power_supply_uevent(struct device *dev, char **envp, int num_envp,
                if (ret)
                        goto out;
        }
+       envp[i] = NULL;
 
 out:
        free_page((unsigned long)prop_buf);
index d5d8caba35605f3643b165211d84aa583f29bbd4..ab13824df856594ec140ce9c23bb9888b71b4523 100644 (file)
@@ -451,7 +451,7 @@ static int asd_build_smp_ascb(struct asd_ascb *ascb, struct sas_task *task,
        struct scb *scb;
 
        pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_req, 1,
-                  PCI_DMA_FROMDEVICE);
+                  PCI_DMA_TODEVICE);
        pci_map_sg(asd_ha->pcidev, &task->smp_task.smp_resp, 1,
                   PCI_DMA_FROMDEVICE);
 
@@ -486,7 +486,7 @@ static void asd_unbuild_smp_ascb(struct asd_ascb *a)
 
        BUG_ON(!task);
        pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_req, 1,
-                    PCI_DMA_FROMDEVICE);
+                    PCI_DMA_TODEVICE);
        pci_unmap_sg(a->ha->pcidev, &task->smp_task.smp_resp, 1,
                     PCI_DMA_FROMDEVICE);
 }
index 77b06a983fa763023f245c010fb738616c7d18bc..95cf7b6cd6225043f7a13ef33939b118303cba1c 100644 (file)
@@ -2314,6 +2314,7 @@ int __devinit scsi_esp_register(struct esp *esp, struct device *dev)
        esp->host->transportt = esp_transport_template;
        esp->host->max_lun = ESP_MAX_LUN;
        esp->host->cmd_per_lun = 2;
+       esp->host->unique_id = instance;
 
        esp_set_clock_params(esp);
 
@@ -2337,7 +2338,7 @@ int __devinit scsi_esp_register(struct esp *esp, struct device *dev)
        if (err)
                return err;
 
-       esp->host->unique_id = instance++;
+       instance++;
 
        scsi_scan_host(esp->host);
 
index 3907f6718ede11272e797bc7b6f7d7a1bfc34210..da56163c30a8f6404b02c16743595561a7b2a692 100644 (file)
@@ -1753,6 +1753,14 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len)
 
        *len = 0;
 
+       if (scsi_sg_count(cmd) == 1 && !adapter->has_64bit_addr) {
+               sg = scsi_sglist(cmd);
+               scb->dma_h_bulkdata = sg_dma_address(sg);
+               *buf = (u32)scb->dma_h_bulkdata;
+               *len = sg_dma_len(sg);
+               return 0;
+       }
+
        scsi_for_each_sg(cmd, sg, sgcnt, idx) {
                if (adapter->has_64bit_addr) {
                        scb->sgl64[idx].address = sg_dma_address(sg);
index 6f56f8750635eca0e44ec6af2914a40f54b7c123..4df21c92ff1ede9931772f36ec7aa3ac77255bb9 100644 (file)
@@ -787,10 +787,12 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
        struct scsi_target *starget = sdev->sdev_target;
        struct Scsi_Host *shost = sdev->host;
        int len = sdev->inquiry_len;
+       int min_period = spi_min_period(starget);
+       int max_width = spi_max_width(starget);
        /* first set us up for narrow async */
        DV_SET(offset, 0);
        DV_SET(width, 0);
-       
+
        if (spi_dv_device_compare_inquiry(sdev, buffer, buffer, DV_LOOPS)
            != SPI_COMPARE_SUCCESS) {
                starget_printk(KERN_ERR, starget, "Domain Validation Initial Inquiry Failed\n");
@@ -798,9 +800,13 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
                return;
        }
 
+       if (!scsi_device_wide(sdev)) {
+               spi_max_width(starget) = 0;
+               max_width = 0;
+       }
+
        /* test width */
-       if (i->f->set_width && spi_max_width(starget) &&
-           scsi_device_wide(sdev)) {
+       if (i->f->set_width && max_width) {
                i->f->set_width(starget, 1);
 
                if (spi_dv_device_compare_inquiry(sdev, buffer,
@@ -809,6 +815,11 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
                    != SPI_COMPARE_SUCCESS) {
                        starget_printk(KERN_ERR, starget, "Wide Transfers Fail\n");
                        i->f->set_width(starget, 0);
+                       /* Make sure we don't force wide back on by asking
+                        * for a transfer period that requires it */
+                       max_width = 0;
+                       if (min_period < 10)
+                               min_period = 10;
                }
        }
 
@@ -828,7 +839,8 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
 
        /* now set up to the maximum */
        DV_SET(offset, spi_max_offset(starget));
-       DV_SET(period, spi_min_period(starget));
+       DV_SET(period, min_period);
+
        /* try QAS requests; this should be harmless to set if the
         * target supports it */
        if (scsi_device_qas(sdev)) {
@@ -837,14 +849,14 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
                DV_SET(qas, 0);
        }
 
-       if (scsi_device_ius(sdev) && spi_min_period(starget) < 9) {
+       if (scsi_device_ius(sdev) && min_period < 9) {
                /* This u320 (or u640). Set IU transfers */
                DV_SET(iu, 1);
                /* Then set the optional parameters */
                DV_SET(rd_strm, 1);
                DV_SET(wr_flow, 1);
                DV_SET(rti, 1);
-               if (spi_min_period(starget) == 8)
+               if (min_period == 8)
                        DV_SET(pcomp_en, 1);
        } else {
                DV_SET(iu, 0);
@@ -862,6 +874,10 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer)
        } else {
                DV_SET(dt, 1);
        }
+       /* set width last because it will pull all the other
+        * parameters down to required values */
+       DV_SET(width, max_width);
+
        /* Do the read only INQUIRY tests */
        spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len,
                       spi_dv_device_compare_inquiry);
index a99e45e2b6d8d114db340681805297b99f431292..2a6477834c3e0e8e63c17b7c62fc8735855d1db1 100644 (file)
@@ -37,6 +37,6 @@ static inline void cpm_set_smc_fcr(volatile smc_uart_t * up)
        up->smc_tfcr = SMC_EB;
 }
 
-#define DPRAM_BASE     ((unsigned char *)&cpmp->cp_dpmem[0])
+#define DPRAM_BASE     ((unsigned char *)cpm_dpram_addr(0))
 
 #endif
index a0ea43598515b360115108d319d4ce25aeb3071e..7c8d78fbbbfb80965e31100a91d9a93faf47174e 100644 (file)
@@ -943,6 +943,7 @@ static struct pcmcia_device_id serial_ids[] = {
        PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
        PCMCIA_MFC_DEVICE_PROD_ID12(2,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
        PCMCIA_MFC_DEVICE_PROD_ID12(3,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
+       PCMCIA_DEVICE_MANF_CARD(0x0279, 0x950b),
        /* too generic */
        /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */
        /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */
index e348ba684050eca227fa0e8a5ed8f148a0521ccc..ff610c23314bd74e5b9fa9d3f103334c1c957581 100644 (file)
@@ -38,7 +38,7 @@
 #include <asm/prom.h>
 #include <asm/of_device.h>
 
-#if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#if defined(CONFIG_SERIAL_SUNSAB_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #define SUPPORT_SYSRQ
 #endif
 
index 8d7ab74170d57944b2f1c68fb94f74bcd21c3519..a593f900eff4ff1936f9e9504747592ab27e9b4d 100644 (file)
@@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp,
        err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size,
                        &cur_len, "W1_SLAVE_ID=%024LX",
                        (unsigned long long)sl->reg_num.id);
+       envp[cur_index] = NULL;
        if (err)
                return err;
 
index dbe699e9828c3ac840529876d4daf2dda56abb47..ea2e198203818a4703f8dc56a6d8473cf6ada21a 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1562,6 +1562,7 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
                fput(file);
                return -EAGAIN;
        }
+       req->ki_filp = file;
        if (iocb->aio_flags & IOCB_FLAG_RESFD) {
                /*
                 * If the IOCB_FLAG_RESFD flag of aio_flags is set, get an
@@ -1576,7 +1577,6 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
                }
        }
 
-       req->ki_filp = file;
        ret = put_user(req->ki_key, &user_iocb->aio_key);
        if (unlikely(ret)) {
                dprintk("EFAULT: aio_key\n");
index 861141b4f6d6f4cbbfcd96366074db8e4adbeaf3..fcb3405bb14e99b64aa322f7e3856ee3fa2ddbb1 100644 (file)
@@ -742,6 +742,7 @@ static int load_flat_file(struct linux_binprm * bprm,
         * __start to address 4 so that is okay).
         */
        if (rev > OLD_FLAT_VERSION) {
+               unsigned long persistent = 0;
                for (i=0; i < relocs; i++) {
                        unsigned long addr, relval;
 
@@ -749,6 +750,8 @@ static int load_flat_file(struct linux_binprm * bprm,
                           relocated (of course, the address has to be
                           relocated first).  */
                        relval = ntohl(reloc[i]);
+                       if (flat_set_persistent (relval, &persistent))
+                               continue;
                        addr = flat_get_relocate_addr(relval);
                        rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1);
                        if (rp == (unsigned long *)RELOC_FAILED) {
@@ -757,7 +760,8 @@ static int load_flat_file(struct linux_binprm * bprm,
                        }
 
                        /* Get the pointer's value.  */
-                       addr = flat_get_addr_from_rp(rp, relval, flags);
+                       addr = flat_get_addr_from_rp(rp, relval, flags,
+                                                       &persistent);
                        if (addr != 0) {
                                /*
                                 * Do the relocation.  PIC relocs in the data section are
index 5a5b7116cefb28cc5b56a85f089985796c7b6423..37310b0e81076caf3d5e5970530c3b1325e9e7aa 100644 (file)
@@ -3190,6 +3190,8 @@ COMPATIBLE_IOCTL(SIOCSIWRETRY)
 COMPATIBLE_IOCTL(SIOCGIWRETRY)
 COMPATIBLE_IOCTL(SIOCSIWPOWER)
 COMPATIBLE_IOCTL(SIOCGIWPOWER)
+COMPATIBLE_IOCTL(SIOCSIWAUTH)
+COMPATIBLE_IOCTL(SIOCGIWAUTH)
 /* hiddev */
 COMPATIBLE_IOCTL(HIDIOCGVERSION)
 COMPATIBLE_IOCTL(HIDIOCAPPLICATION)
index a21e4bc5444b49058537d810131234771cdfa17f..d120ec39bcb0ea5c472fc7c1f3ba277b9308709d 100644 (file)
@@ -171,19 +171,14 @@ found:
  * GRANTED_RES message by cookie, without having to rely on the client's IP
  * address. --okir
  */
-static inline struct nlm_block *
-nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_file *file,
-               struct nlm_lock *lock, struct nlm_cookie *cookie)
+static struct nlm_block *
+nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_host *host,
+                   struct nlm_file *file, struct nlm_lock *lock,
+                   struct nlm_cookie *cookie)
 {
        struct nlm_block        *block;
-       struct nlm_host         *host;
        struct nlm_rqst         *call = NULL;
 
-       /* Create host handle for callback */
-       host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
-       if (host == NULL)
-               return NULL;
-
        call = nlm_alloc_call(host);
        if (call == NULL)
                return NULL;
@@ -366,6 +361,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
                        struct nlm_lock *lock, int wait, struct nlm_cookie *cookie)
 {
        struct nlm_block        *block = NULL;
+       struct nlm_host         *host;
        int                     error;
        __be32                  ret;
 
@@ -377,6 +373,10 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
                                (long long)lock->fl.fl_end,
                                wait);
 
+       /* Create host handle for callback */
+       host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
+       if (host == NULL)
+               return nlm_lck_denied_nolocks;
 
        /* Lock file against concurrent access */
        mutex_lock(&file->f_mutex);
@@ -385,7 +385,8 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
         */
        block = nlmsvc_lookup_block(file, lock);
        if (block == NULL) {
-               block = nlmsvc_create_block(rqstp, file, lock, cookie);
+               block = nlmsvc_create_block(rqstp, nlm_get_host(host), file,
+                               lock, cookie);
                ret = nlm_lck_denied_nolocks;
                if (block == NULL)
                        goto out;
@@ -449,6 +450,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
 out:
        mutex_unlock(&file->f_mutex);
        nlmsvc_release_block(block);
+       nlm_release_host(host);
        dprintk("lockd: nlmsvc_lock returned %u\n", ret);
        return ret;
 }
@@ -477,10 +479,17 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
 
        if (block == NULL) {
                struct file_lock *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
+               struct nlm_host *host;
 
                if (conf == NULL)
                        return nlm_granted;
-               block = nlmsvc_create_block(rqstp, file, lock, cookie);
+               /* Create host handle for callback */
+               host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
+               if (host == NULL) {
+                       kfree(conf);
+                       return nlm_lck_denied_nolocks;
+               }
+               block = nlmsvc_create_block(rqstp, host, file, lock, cookie);
                if (block == NULL) {
                        kfree(conf);
                        return nlm_granted;
index a49f9feff776253f99ffd167246a5fc2b77d79d5..a204484072f34ca37320f310eeee2b8bdbb35cca 100644 (file)
@@ -588,16 +588,6 @@ static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_dat
        server->namelen  = data->namlen;
        /* Create a client RPC handle for the NFSv3 ACL management interface */
        nfs_init_server_aclclient(server);
-       if (clp->cl_nfsversion == 3) {
-               if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
-                       server->namelen = NFS3_MAXNAMLEN;
-               if (!(data->flags & NFS_MOUNT_NORDIRPLUS))
-                       server->caps |= NFS_CAP_READDIRPLUS;
-       } else {
-               if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
-                       server->namelen = NFS2_MAXNAMLEN;
-       }
-
        dprintk("<-- nfs_init_server() = 0 [new %p]\n", clp);
        return 0;
 
@@ -794,6 +784,16 @@ struct nfs_server *nfs_create_server(const struct nfs_mount_data *data,
        error = nfs_probe_fsinfo(server, mntfh, &fattr);
        if (error < 0)
                goto error;
+       if (server->nfs_client->rpc_ops->version == 3) {
+               if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
+                       server->namelen = NFS3_MAXNAMLEN;
+               if (!(data->flags & NFS_MOUNT_NORDIRPLUS))
+                       server->caps |= NFS_CAP_READDIRPLUS;
+       } else {
+               if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
+                       server->namelen = NFS2_MAXNAMLEN;
+       }
+
        if (!(fattr.valid & NFS_ATTR_FATTR)) {
                error = server->nfs_client->rpc_ops->getattr(server, mntfh, &fattr);
                if (error < 0) {
@@ -984,6 +984,9 @@ struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data,
        if (error < 0)
                goto error;
 
+       if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
+               server->namelen = NFS4_MAXNAMLEN;
+
        BUG_ON(!server->nfs_client);
        BUG_ON(!server->nfs_client->rpc_ops);
        BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
@@ -1056,6 +1059,9 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
        if (error < 0)
                goto error;
 
+       if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
+               server->namelen = NFS4_MAXNAMLEN;
+
        dprintk("Referral FSID: %llx:%llx\n",
                (unsigned long long) server->fsid.major,
                (unsigned long long) server->fsid.minor);
@@ -1115,6 +1121,9 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source,
        if (error < 0)
                goto out_free_server;
 
+       if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
+               server->namelen = NFS4_MAXNAMLEN;
+
        dprintk("Cloned FSID: %llx:%llx\n",
                (unsigned long long) server->fsid.major,
                (unsigned long long) server->fsid.minor);
index ea97408e423e916bf77ef5b303541a23551d2cb3..e4a04d16b8b06fd4faf22b7ba238f404403a8c7f 100644 (file)
@@ -1162,6 +1162,8 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)
        }
        if (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR))
                return NULL;
+       if (name.len > NFS_SERVER(dir)->namelen)
+               return NULL;
        /* Note: caller is already holding the dir->i_mutex! */
        dentry = d_alloc(parent, &name);
        if (dentry == NULL)
index d1cbf0a0fbb2d457c92c964958e96dc2d9f56839..522e5ad4d8ad9b3946e201926c7f799ddf0f2e36 100644 (file)
@@ -175,6 +175,9 @@ next_component:
                path++;
        name.len = path - (const char *) name.name;
 
+       if (name.len > NFS4_MAXNAMLEN)
+               return -ENAMETOOLONG;
+
 eat_dot_dir:
        while (*path == '/')
                path++;
index de984d2725760ee1d523b8fe588831c09891ec2f..d272847d5a070491d22cda6b1f0b482423b33a39 100644 (file)
@@ -514,8 +514,10 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
        ac->ac_bh = osb->local_alloc_bh;
        status = 0;
 bail:
-       if (status < 0 && local_alloc_inode)
+       if (status < 0 && local_alloc_inode) {
+               mutex_unlock(&local_alloc_inode->i_mutex);
                iput(local_alloc_inode);
+       }
 
        mlog_exit(status);
        return status;
index c010a72ca2d2a3543fb2a7365b2e8c5b4c73b652..e95a36228863affa3d6c19a37ac4766f8e147412 100644 (file)
@@ -1223,6 +1223,33 @@ static long do_splice(struct file *in, loff_t __user *off_in,
        return -EINVAL;
 }
 
+/*
+ * Do a copy-from-user while holding the mmap_semaphore for reading, in a
+ * manner safe from deadlocking with simultaneous mmap() (grabbing mmap_sem
+ * for writing) and page faulting on the user memory pointed to by src.
+ * This assumes that we will very rarely hit the partial != 0 path, or this
+ * will not be a win.
+ */
+static int copy_from_user_mmap_sem(void *dst, const void __user *src, size_t n)
+{
+       int partial;
+
+       pagefault_disable();
+       partial = __copy_from_user_inatomic(dst, src, n);
+       pagefault_enable();
+
+       /*
+        * Didn't copy everything, drop the mmap_sem and do a faulting copy
+        */
+       if (unlikely(partial)) {
+               up_read(&current->mm->mmap_sem);
+               partial = copy_from_user(dst, src, n);
+               down_read(&current->mm->mmap_sem);
+       }
+
+       return partial;
+}
+
 /*
  * Map an iov into an array of pages and offset/length tupples. With the
  * partial_page structure, we can map several non-contiguous ranges into
@@ -1236,31 +1263,26 @@ static int get_iovec_page_array(const struct iovec __user *iov,
 {
        int buffers = 0, error = 0;
 
-       /*
-        * It's ok to take the mmap_sem for reading, even
-        * across a "get_user()".
-        */
        down_read(&current->mm->mmap_sem);
 
        while (nr_vecs) {
                unsigned long off, npages;
+               struct iovec entry;
                void __user *base;
                size_t len;
                int i;
 
-               /*
-                * Get user address base and length for this iovec.
-                */
-               error = get_user(base, &iov->iov_base);
-               if (unlikely(error))
-                       break;
-               error = get_user(len, &iov->iov_len);
-               if (unlikely(error))
+               error = -EFAULT;
+               if (copy_from_user_mmap_sem(&entry, iov, sizeof(entry)))
                        break;
 
+               base = entry.iov_base;
+               len = entry.iov_len;
+
                /*
                 * Sanity check this iovec. 0 read succeeds.
                 */
+               error = 0;
                if (unlikely(!len))
                        break;
                error = -EFAULT;
index 73402c5eeb8afc90452768b57f0cbdb13fcc3469..38eb0b7a1f3d3111c0e4a1b604d7ac40e110cc46 100644 (file)
@@ -894,7 +894,7 @@ magic_found:
                goto again;
        }
 
-
+       sbi->s_flags = flags;/*after that line some functions use s_flags*/
        ufs_print_super_stuff(sb, usb1, usb2, usb3);
 
        /*
@@ -1025,8 +1025,6 @@ magic_found:
            UFS_MOUNT_UFSTYPE_44BSD)
                uspi->s_maxsymlinklen =
                    fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen);
-       
-       sbi->s_flags = flags;
 
        inode = iget(sb, UFS_ROOTINO);
        if (!inode || is_bad_inode(inode))
index fa25b7dcc6c3515b3e4c7c5f217b91cbca77e4ae..d7e13614306635bfae1f31bfbd1728e0ff3c1e36 100644 (file)
@@ -52,11 +52,6 @@ typedef struct xfs_buf_log_format_t {
 #define        XFS_BLI_UDQUOT_BUF      0x4
 #define XFS_BLI_PDQUOT_BUF     0x8
 #define        XFS_BLI_GDQUOT_BUF      0x10
-/*
- * This flag indicates that the buffer contains newly allocated
- * inodes.
- */
-#define        XFS_BLI_INODE_NEW_BUF   0x20
 
 #define        XFS_BLI_CHUNK           128
 #define        XFS_BLI_SHIFT           7
index 7174991f4bef2b43ce2611b8c143e40630a83145..8ae6e8e5f3db70e1a5c0ee276361f0907fe3f793 100644 (file)
@@ -1874,7 +1874,6 @@ xlog_recover_do_inode_buffer(
 /*ARGSUSED*/
 STATIC void
 xlog_recover_do_reg_buffer(
-       xfs_mount_t             *mp,
        xlog_recover_item_t     *item,
        xfs_buf_t               *bp,
        xfs_buf_log_format_t    *buf_f)
@@ -1885,50 +1884,6 @@ xlog_recover_do_reg_buffer(
        unsigned int            *data_map = NULL;
        unsigned int            map_size = 0;
        int                     error;
-       int                     stale_buf = 1;
-
-       /*
-        * Scan through the on-disk inode buffer and attempt to
-        * determine if it has been written to since it was logged.
-        *
-        * - If any of the magic numbers are incorrect then the buffer is stale
-        * - If any of the modes are non-zero then the buffer is not stale
-        * - If all of the modes are zero and at least one of the generation
-        *   counts is non-zero then the buffer is stale
-        *
-        * If the end result is a stale buffer then the log buffer is replayed
-        * otherwise it is skipped.
-        *
-        * This heuristic is not perfect.  It can be improved by scanning the
-        * entire inode chunk for evidence that any of the inode clusters have
-        * been updated.  To fix this problem completely we will need a major
-        * architectural change to the logging system.
-        */
-       if (buf_f->blf_flags & XFS_BLI_INODE_NEW_BUF) {
-               xfs_dinode_t    *dip;
-               int             inodes_per_buf;
-               int             mode_count = 0;
-               int             gen_count = 0;
-
-               stale_buf = 0;
-               inodes_per_buf = XFS_BUF_COUNT(bp) >> mp->m_sb.sb_inodelog;
-               for (i = 0; i < inodes_per_buf; i++) {
-                       dip = (xfs_dinode_t *)xfs_buf_offset(bp,
-                               i * mp->m_sb.sb_inodesize);
-                       if (be16_to_cpu(dip->di_core.di_magic) !=
-                                       XFS_DINODE_MAGIC) {
-                               stale_buf = 1;
-                               break;
-                       }
-                       if (dip->di_core.di_mode)
-                               mode_count++;
-                       if (dip->di_core.di_gen)
-                               gen_count++;
-               }
-
-               if (!mode_count && gen_count)
-                       stale_buf = 1;
-       }
 
        switch (buf_f->blf_type) {
        case XFS_LI_BUF:
@@ -1962,7 +1917,7 @@ xlog_recover_do_reg_buffer(
                                               -1, 0, XFS_QMOPT_DOWARN,
                                               "dquot_buf_recover");
                }
-               if (!error && stale_buf)
+               if (!error)
                        memcpy(xfs_buf_offset(bp,
                                (uint)bit << XFS_BLI_SHIFT),    /* dest */
                                item->ri_buf[i].i_addr,         /* source */
@@ -2134,7 +2089,7 @@ xlog_recover_do_dquot_buffer(
        if (log->l_quotaoffs_flag & type)
                return;
 
-       xlog_recover_do_reg_buffer(mp, item, bp, buf_f);
+       xlog_recover_do_reg_buffer(item, bp, buf_f);
 }
 
 /*
@@ -2235,7 +2190,7 @@ xlog_recover_do_buffer_trans(
                  (XFS_BLI_UDQUOT_BUF|XFS_BLI_PDQUOT_BUF|XFS_BLI_GDQUOT_BUF)) {
                xlog_recover_do_dquot_buffer(mp, log, item, bp, buf_f);
        } else {
-               xlog_recover_do_reg_buffer(mp, item, bp, buf_f);
+               xlog_recover_do_reg_buffer(item, bp, buf_f);
        }
        if (error)
                return XFS_ERROR(error);
index 95fff6872a2fcd32c17cdff342bebe062ded95e7..60b6b898022bcb1be98f96f2a21615e1bff5e131 100644 (file)
@@ -966,7 +966,6 @@ xfs_trans_inode_alloc_buf(
        ASSERT(atomic_read(&bip->bli_refcount) > 0);
 
        bip->bli_flags |= XFS_BLI_INODE_ALLOC_BUF;
-       bip->bli_format.blf_flags |= XFS_BLI_INODE_NEW_BUF;
 }
 
 
index 202acb9ff4d071299cb0926c8887cc5d3b57bd53..f85f77a538aa67afb418b4b35ba8c3ccd945516f 100644 (file)
@@ -147,10 +147,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle)
 /*--------------------------------------------------------------------------
                                   Suspend/Resume
   -------------------------------------------------------------------------- */
-#ifdef CONFIG_ACPI_SLEEP
 extern int acpi_sleep_init(void);
-#else
-static inline int acpi_sleep_init(void) { return 0; }
-#endif
 
 #endif /*__ACPI_DRIVERS_H__*/
index e043cafa3c429795c3eb7e473e04da4eac58c50f..69b9f8e120e93402b5cae571f2e8dfdd26084e49 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/serial.h>
 #include <asm/dma.h>
+#include <asm/portmux.h>
 
 #define NR_PORTS                1
 
@@ -92,18 +93,24 @@ struct bfin_serial_res bfin_serial_resource[] = {
        }
 };
 
+#define DRIVER_NAME "bfin-uart"
 
 int nr_ports = NR_PORTS;
 static void bfin_serial_hw_init(struct bfin_serial_port *uart)
 {
 
+#ifdef CONFIG_SERIAL_BFIN_UART0
+       peripheral_request(P_UART0_TX, DRIVER_NAME);
+       peripheral_request(P_UART0_RX, DRIVER_NAME);
+#endif
+
 #ifdef CONFIG_SERIAL_BFIN_CTSRTS
        if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, NULL);
+               gpio_request(uart->cts_pin, DRIVER_NAME);
                gpio_direction_input(uart->cts_pin);
        }
        if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, NULL);
+               gpio_request(uart->rts_pin, DRIVER_NAME);
                gpio_direction_input(uart->rts_pin);
        }
 #endif
index 8f5d9c4d8d5b836e51f7ffcb0bfdd396bbd9610c..6fb328f5186a25dd759e35e944576ab434306f55 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/serial.h>
 #include <asm/dma.h>
+#include <asm/portmux.h>
 
 #define NR_PORTS               2
 
@@ -122,25 +123,29 @@ struct bfin_serial_res bfin_serial_resource[] = {
 
 int nr_ports = ARRAY_SIZE(bfin_serial_resource);
 
+#define DRIVER_NAME "bfin-uart"
+
 static void bfin_serial_hw_init(struct bfin_serial_port *uart)
 {
-       unsigned short val;
-       val = bfin_read16(BFIN_PORT_MUX);
-       val &= ~(PFDE | PFTE);
-       bfin_write16(BFIN_PORT_MUX, val);
 
-       val = bfin_read16(PORTF_FER);
-       val |= 0xF;
-       bfin_write16(PORTF_FER, val);
+#ifdef CONFIG_SERIAL_BFIN_UART0
+       peripheral_request(P_UART0_TX, DRIVER_NAME);
+       peripheral_request(P_UART0_RX, DRIVER_NAME);
+#endif
+
+#ifdef CONFIG_SERIAL_BFIN_UART1
+       peripheral_request(P_UART1_TX, DRIVER_NAME);
+       peripheral_request(P_UART1_RX, DRIVER_NAME);
+#endif
 
 #ifdef CONFIG_SERIAL_BFIN_CTSRTS
        if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, NULL);
+               gpio_request(uart->cts_pin, DRIVER_NAME);
                gpio_direction_input(uart->cts_pin);
        }
 
        if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, NULL);
+               gpio_request(uart->rts_pin, DRIVER_NAME);
                gpio_direction_output(uart->rts_pin);
        }
 #endif
index 23e13c5abc4d9deb689c2d4c5d69c6d62567045e..ae6c53b28452520919decaa007c3979a2dd2896a 100644 (file)
 #define P_SPI0_SSEL2   (P_DEFINED | P_IDENT(PORT_PJ11) | P_FUNCT(1))
 #define P_SPI0_SSEL7   (P_DEFINED | P_IDENT(PORT_PJ5) | P_FUNCT(2))
 
-#endif /* _MACH_PORTMUX_H_ */
+#define P_MII0 {\
+       P_MII0_ETxD0, \
+       P_MII0_ETxD1, \
+       P_MII0_ETxD2, \
+       P_MII0_ETxD3, \
+       P_MII0_ETxEN, \
+       P_MII0_TxCLK, \
+       P_MII0_PHYINT, \
+       P_MII0_COL, \
+       P_MII0_ERxD0, \
+       P_MII0_ERxD1, \
+       P_MII0_ERxD2, \
+       P_MII0_ERxD3, \
+       P_MII0_ERxDV, \
+       P_MII0_ERxCLK, \
+       P_MII0_ERxER, \
+       P_MII0_CRS, \
+       P_MDC, \
+       P_MDIO, 0}
+
+
+#define P_RMII0 {\
+       P_MII0_ETxD0, \
+       P_MII0_ETxD1, \
+       P_MII0_ETxEN, \
+       P_MII0_ERxD0, \
+       P_MII0_ERxD1, \
+       P_MII0_ERxER, \
+       P_RMII0_REF_CLK, \
+       P_RMII0_MDINT, \
+       P_RMII0_CRS_DV, \
+       P_MDC, \
+       P_MDIO, 0}
+#endif                                 /* _MACH_PORTMUX_H_ */
index e043cafa3c429795c3eb7e473e04da4eac58c50f..69b9f8e120e93402b5cae571f2e8dfdd26084e49 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/serial.h>
 #include <asm/dma.h>
+#include <asm/portmux.h>
 
 #define NR_PORTS                1
 
@@ -92,18 +93,24 @@ struct bfin_serial_res bfin_serial_resource[] = {
        }
 };
 
+#define DRIVER_NAME "bfin-uart"
 
 int nr_ports = NR_PORTS;
 static void bfin_serial_hw_init(struct bfin_serial_port *uart)
 {
 
+#ifdef CONFIG_SERIAL_BFIN_UART0
+       peripheral_request(P_UART0_TX, DRIVER_NAME);
+       peripheral_request(P_UART0_RX, DRIVER_NAME);
+#endif
+
 #ifdef CONFIG_SERIAL_BFIN_CTSRTS
        if (uart->cts_pin >= 0) {
-               gpio_request(uart->cts_pin, NULL);
+               gpio_request(uart->cts_pin, DRIVER_NAME);
                gpio_direction_input(uart->cts_pin);
        }
        if (uart->rts_pin >= 0) {
-               gpio_request(uart->rts_pin, NULL);
+               gpio_request(uart->rts_pin, DRIVER_NAME);
                gpio_direction_input(uart->rts_pin);
        }
 #endif
index 9d3681e4211107524e66ed1a25a88c97f5567b40..0d3f650d2d99ad50ecc4dc4269d1117581985507 100644 (file)
 #define P_MAYSHARE     0x2000
 #define P_DONTCARE     0x1000
 
+
+int peripheral_request(unsigned short per, const char *label);
+void peripheral_free(unsigned short per);
+int peripheral_request_list(unsigned short per[], const char *label);
+void peripheral_free_list(unsigned short per[]);
+
 #include <asm/gpio.h>
 #include <asm/mach/portmux.h>
 
 #define P_SPI2_SSEL3 P_UNDEF
 #endif
 
+#ifndef P_SPI2_SSEL4
+#define P_SPI2_SSEL4 P_UNDEF
+#endif
+
+#ifndef P_SPI2_SSEL5
+#define P_SPI2_SSEL5 P_UNDEF
+#endif
+
+#ifndef P_SPI2_SSEL6
+#define P_SPI2_SSEL6 P_UNDEF
+#endif
+
+#ifndef P_SPI2_SSEL7
+#define P_SPI2_SSEL7 P_UNDEF
+#endif
+
 #ifndef P_SPI2_SCK
 #define P_SPI2_SCK P_UNDEF
 #endif
 #define P_SPI0_SSEL3 P_UNDEF
 #endif
 
+#ifndef P_SPI0_SSEL4
+#define P_SPI0_SSEL4 P_UNDEF
+#endif
+
+#ifndef P_SPI0_SSEL5
+#define P_SPI0_SSEL5 P_UNDEF
+#endif
+
+#ifndef P_SPI0_SSEL6
+#define P_SPI0_SSEL6 P_UNDEF
+#endif
+
+#ifndef P_SPI0_SSEL7
+#define P_SPI0_SSEL7 P_UNDEF
+#endif
+
 #ifndef P_UART0_TX
 #define P_UART0_TX P_UNDEF
 #endif
 #define P_SPI1_SSEL3 P_UNDEF
 #endif
 
+
+#ifndef P_SPI1_SSEL4
+#define P_SPI1_SSEL4 P_UNDEF
+#endif
+
+#ifndef P_SPI1_SSEL5
+#define P_SPI1_SSEL5 P_UNDEF
+#endif
+
+#ifndef P_SPI1_SSEL6
+#define P_SPI1_SSEL6 P_UNDEF
+#endif
+
+#ifndef P_SPI1_SSEL7
+#define P_SPI1_SSEL7 P_UNDEF
+#endif
+
 #ifndef P_SPI1_SCK
 #define P_SPI1_SCK P_UNDEF
 #endif
index 0df9f2d322a3a473b54ef9bd4c14ad194966b0c9..07ffe8b718c51a0d379ec07d43b5277c20a63eda 100644 (file)
@@ -3,6 +3,7 @@
 /*
  * This file contains the system call numbers.
  */
+#define __NR_restart_syscall     0
 #define __NR_exit                1
 #define __NR_fork                2
 #define __NR_read                3
 #define __NR_sched_get_priority_min    160
 #define __NR_sched_rr_get_interval     161
 #define __NR_nanosleep         162
-                               /* 163 __NR_mremap */
+#define __NR_mremap            163
 #define __NR_setresuid         164
 #define __NR_getresuid         165
                                /* 166 __NR_vm86 */
                                /* 167 __NR_query_module */
                                /* 168 __NR_poll */
-                               /* 169 __NR_nfsservctl */
+#define __NR_nfsservctl                169
 #define __NR_setresgid         170
 #define __NR_getresgid         171
 #define __NR_prctl             172
                                /* 222 reserved for TUX */
                                /* 223 reserved for TUX */
 #define __NR_gettid            224
-                               /* 225 __NR_readahead */
+#define __NR_readahead         225
 #define __NR_setxattr          226
 #define __NR_lsetxattr         227
 #define __NR_fsetxattr         228
 #define __NR_mq_timedreceive   (__NR_mq_open+3)
 #define __NR_mq_notify         (__NR_mq_open+4)
 #define __NR_mq_getsetattr     (__NR_mq_open+5)
-                               /* 284 __NR_sys_kexec_load */
+#define __NR_kexec_load                284
 #define __NR_waitid            285
 #define __NR_add_key           286
 #define __NR_request_key       287
 #define __NR_shmdt             340
 #define __NR_shmget            341
 
-#define __NR_syscall           342
+#define __NR_splice            342
+#define __NR_sync_file_range   343
+#define __NR_tee               344
+#define __NR_vmsplice          345
+
+#define __NR_epoll_pwait       346
+#define __NR_utimensat         347
+#define __NR_signalfd          348
+#define __NR_timerfd           349
+#define __NR_eventfd           350
+#define __NR_pread64           351
+#define __NR_pwrite64          352
+#define __NR_fadvise64         353
+#define __NR_set_robust_list   354
+#define __NR_get_robust_list   355
+#define __NR_fallocate         356
+
+#define __NR_syscall           357
 #define NR_syscalls            __NR_syscall
 
+/* Old optional stuff no one actually uses */
+#define __IGNORE_sysfs
+#define __IGNORE_uselib
+
+/* Implement the newer interfaces */
+#define __IGNORE_mmap
+#define __IGNORE_poll
+#define __IGNORE_select
+#define __IGNORE_utime
+
+/* Not relevant on no-mmu */
+#define __IGNORE_swapon
+#define __IGNORE_swapoff
+#define __IGNORE_msync
+#define __IGNORE_mlock
+#define __IGNORE_munlock
+#define __IGNORE_mlockall
+#define __IGNORE_munlockall
+#define __IGNORE_mincore
+#define __IGNORE_madvise
+#define __IGNORE_remap_file_pages
+#define __IGNORE_mbind
+#define __IGNORE_get_mempolicy
+#define __IGNORE_set_mempolicy
+#define __IGNORE_migrate_pages
+#define __IGNORE_move_pages
+#define __IGNORE_getcpu
+
 #ifdef __KERNEL__
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_STAT64
index c20eee767d6f1ebeca20e5933dbd8f71452d199e..2a873508a9a101b359483ebbf086f84aa769f0f0 100644 (file)
@@ -9,6 +9,7 @@
 #define        flat_argvp_envp_on_stack()              1
 #define        flat_old_ram_flag(flags)                1
 #define        flat_reloc_valid(reloc, size)           ((reloc) <= (size))
+#define        flat_set_persistent(relval, p)          0
 
 /*
  * on the H8 a couple of the relocations have an instruction in the
@@ -18,7 +19,7 @@
  */
 
 #define        flat_get_relocate_addr(rel)             (rel)
-#define flat_get_addr_from_rp(rp, relval, flags) \
+#define flat_get_addr_from_rp(rp, relval, flags, persistent) \
         (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff))
 #define flat_put_addr_at_rp(rp, addr, rel) \
        put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp)
diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild
deleted file mode 100644 (file)
index cbf6e8f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-include include/asm-generic/Kbuild.asm
-
-header-y += boot.h
-header-y += debugreg.h
-header-y += ldt.h
-header-y += msr-index.h
-header-y += ptrace-abi.h
-header-y += ucontext.h
-
-unifdef-y += msr.h
-unifdef-y += mtrr.h
-unifdef-y += vm86.h
diff --git a/include/asm-i386/k8.h b/include/asm-i386/k8.h
deleted file mode 100644 (file)
index dfd88a6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-x86_64/k8.h>
diff --git a/include/asm-i386/pci-direct.h b/include/asm-i386/pci-direct.h
deleted file mode 100644 (file)
index 4f6738b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "asm-x86_64/pci-direct.h"
diff --git a/include/asm-i386/stacktrace.h b/include/asm-i386/stacktrace.h
deleted file mode 100644 (file)
index 7d1f6a5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-x86_64/stacktrace.h>
index 1b285f65cab631506ed7169d50a6ae94dde311b5..d851cf0c4aa5ecff7902da7a54fdab618eccdad4 100644 (file)
 #define        flat_stack_align(sp)            (*sp += (*sp & 3 ? (4 - (*sp & 3)): 0))
 #define        flat_argvp_envp_on_stack()              0
 #define        flat_old_ram_flag(flags)                (flags)
+#define        flat_set_persistent(relval, p)          0
 #define        flat_reloc_valid(reloc, size)           \
        (((reloc) - textlen_for_m32r_lo16_data) <= (size))
-#define flat_get_addr_from_rp(rp, relval, flags) \
+#define flat_get_addr_from_rp(rp, relval, flags, persistent) \
        m32r_flat_get_addr_from_rp(rp, relval, (text_len) )
 
 #define flat_put_addr_at_rp(rp, addr, relval) \
index 2d836edc43441e9a005b533147d29cca26180f18..814b5174a8e0ffb623aa96e65f9b2a1b52a4ddad 100644 (file)
@@ -9,8 +9,9 @@
 #define        flat_argvp_envp_on_stack()              1
 #define        flat_old_ram_flag(flags)                (flags)
 #define        flat_reloc_valid(reloc, size)           ((reloc) <= (size))
-#define        flat_get_addr_from_rp(rp, relval, flags)        get_unaligned(rp)
+#define        flat_get_addr_from_rp(rp, relval, flags, p)     get_unaligned(rp)
 #define        flat_put_addr_at_rp(rp, val, relval)    put_unaligned(val,rp)
 #define        flat_get_relocate_addr(rel)             (rel)
+#define        flat_set_persistent(relval, p)          0
 
 #endif /* __M68KNOMMU_FLAT_H__ */
diff --git a/include/asm-mips/cmpxchg.h b/include/asm-mips/cmpxchg.h
new file mode 100644 (file)
index 0000000..c5b4708
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003, 06, 07 by Ralf Baechle (ralf@linux-mips.org)
+ */
+#ifndef __ASM_CMPXCHG_H
+#define __ASM_CMPXCHG_H
+
+#include <linux/irqflags.h>
+
+#define __HAVE_ARCH_CMPXCHG 1
+
+#define __cmpxchg_asm(ld, st, m, old, new)                             \
+({                                                                     \
+       __typeof(*(m)) __ret;                                           \
+                                                                       \
+       if (cpu_has_llsc && R10000_LLSC_WAR) {                          \
+               __asm__ __volatile__(                                   \
+               "       .set    push                            \n"     \
+               "       .set    noat                            \n"     \
+               "       .set    mips3                           \n"     \
+               "1:     " ld "  %0, %2          # __cmpxchg_asm \n"     \
+               "       bne     %0, %z3, 2f                     \n"     \
+               "       .set    mips0                           \n"     \
+               "       move    $1, %z4                         \n"     \
+               "       .set    mips3                           \n"     \
+               "       " st "  $1, %1                          \n"     \
+               "       beqzl   $1, 1b                          \n"     \
+               "2:                                             \n"     \
+               "       .set    pop                             \n"     \
+               : "=&r" (__ret), "=R" (*m)                              \
+               : "R" (*m), "Jr" (old), "Jr" (new)                      \
+               : "memory");                                            \
+       } else if (cpu_has_llsc) {                                      \
+               __asm__ __volatile__(                                   \
+               "       .set    push                            \n"     \
+               "       .set    noat                            \n"     \
+               "       .set    mips3                           \n"     \
+               "1:     " ld "  %0, %2          # __cmpxchg_asm \n"     \
+               "       bne     %0, %z3, 2f                     \n"     \
+               "       .set    mips0                           \n"     \
+               "       move    $1, %z4                         \n"     \
+               "       .set    mips3                           \n"     \
+               "       " st "  $1, %1                          \n"     \
+               "       beqz    $1, 3f                          \n"     \
+               "2:                                             \n"     \
+               "       .subsection 2                           \n"     \
+               "3:     b       1b                              \n"     \
+               "       .previous                               \n"     \
+               "       .set    pop                             \n"     \
+               : "=&r" (__ret), "=R" (*m)                              \
+               : "R" (*m), "Jr" (old), "Jr" (new)                      \
+               : "memory");                                            \
+       } else {                                                        \
+               unsigned long __flags;                                  \
+                                                                       \
+               raw_local_irq_save(__flags);                            \
+               __ret = *m;                                             \
+               if (__ret == old)                                       \
+                       *m = new;                                       \
+               raw_local_irq_restore(__flags);                         \
+       }                                                               \
+                                                                       \
+       __ret;                                                          \
+})
+
+/*
+ * This function doesn't exist, so you'll get a linker error
+ * if something tries to do an invalid cmpxchg().
+ */
+extern void __cmpxchg_called_with_bad_pointer(void);
+
+#define __cmpxchg(ptr,old,new,barrier)                                 \
+({                                                                     \
+       __typeof__(ptr) __ptr = (ptr);                                  \
+       __typeof__(*(ptr)) __old = (old);                               \
+       __typeof__(*(ptr)) __new = (new);                               \
+       __typeof__(*(ptr)) __res = 0;                                   \
+                                                                       \
+       barrier;                                                        \
+                                                                       \
+       switch (sizeof(*(__ptr))) {                                     \
+       case 4:                                                         \
+               __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); \
+               break;                                                  \
+       case 8:                                                         \
+               if (sizeof(long) == 8) {                                \
+                       __res = __cmpxchg_asm("lld", "scd", __ptr,      \
+                                          __old, __new);               \
+                       break;                                          \
+               }                                                       \
+       default:                                                        \
+               __cmpxchg_called_with_bad_pointer();                    \
+               break;                                                  \
+       }                                                               \
+                                                                       \
+       barrier;                                                        \
+                                                                       \
+       __res;                                                          \
+})
+
+#define cmpxchg(ptr, old, new)         __cmpxchg(ptr, old, new, smp_llsc_mb())
+#define cmpxchg_local(ptr, old, new)   __cmpxchg(ptr, old, new,)
+
+#endif /* __ASM_CMPXCHG_H */
index 00a50ec1c19fd6426bd57732aad5e2bdd64e7807..2a52333a062d1879d6b06cc2ab1bb44fc67d95b4 100644 (file)
@@ -13,6 +13,7 @@
 #define O_SYNC         0x0010
 #define O_NONBLOCK     0x0080
 #define O_CREAT         0x0100 /* not fcntl */
+#define O_TRUNC                0x0200  /* not fcntl */
 #define O_EXCL         0x0400  /* not fcntl */
 #define O_NOCTTY       0x0800  /* not fcntl */
 #define FASYNC         0x1000  /* fcntl, for BSD compatibility */
index 97102ebc54b19d44137945dcac23833eceec6ada..2cb52cf8bd4ebe378b2e6f37890dc857a330dca1 100644 (file)
@@ -24,7 +24,30 @@ static inline int irq_canonicalize(int irq)
 #define irq_canonicalize(irq) (irq)    /* Sane hardware, sane code ... */
 #endif
 
+#ifdef CONFIG_MIPS_MT_SMTC
+
+struct irqaction;
+
+extern unsigned long irq_hwmask[];
+extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,
+                          unsigned long hwmask);
+
+static inline void smtc_im_ack_irq(unsigned int irq)
+{
+       if (irq_hwmask[irq] & ST0_IM)
+               set_c0_status(irq_hwmask[irq] & ST0_IM);
+}
+
+#else
+
+static inline void smtc_im_ack_irq(unsigned int irq)
+{
+}
+
+#endif /* CONFIG_MIPS_MT_SMTC */
+
 #ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
+
 /*
  * Clear interrupt mask handling "backstop" if irq_hwmask
  * entry so indicates. This implies that the ack() or end()
@@ -38,6 +61,7 @@ do {                                                                  \
                                   ~(irq_hwmask[irq] & 0x0000ff00));    \
 } while (0)
 #else
+
 #define __DO_IRQ_SMTC_HOOK(irq) do { } while (0)
 #endif
 
@@ -60,14 +84,6 @@ do {                                                                 \
 extern void arch_init_irq(void);
 extern void spurious_interrupt(void);
 
-#ifdef CONFIG_MIPS_MT_SMTC
-struct irqaction;
-
-extern unsigned long irq_hwmask[];
-extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,
-                          unsigned long hwmask);
-#endif /* CONFIG_MIPS_MT_SMTC */
-
 extern int allocate_irqno(void);
 extern void alloc_legacy_irqno(void);
 extern void free_irqno(unsigned int irq);
index ed882c88e0caa0e8d9add0be6b7c8ce7576c36cd..f9a5ce5c9af174aae59d3da955f0c351280f4d7f 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/percpu.h>
 #include <linux/bitops.h>
 #include <asm/atomic.h>
+#include <asm/cmpxchg.h>
 #include <asm/war.h>
 
 typedef struct
@@ -114,68 +115,6 @@ static __inline__ long local_sub_return(long i, local_t * l)
        return result;
 }
 
-/*
- * local_sub_if_positive - conditionally subtract integer from atomic variable
- * @i: integer value to subtract
- * @l: pointer of type local_t
- *
- * Atomically test @l and subtract @i if @l is greater or equal than @i.
- * The function returns the old value of @l minus @i.
- */
-static __inline__ long local_sub_if_positive(long i, local_t * l)
-{
-       unsigned long result;
-
-       if (cpu_has_llsc && R10000_LLSC_WAR) {
-               unsigned long temp;
-
-               __asm__ __volatile__(
-               "       .set    mips3                                   \n"
-               "1:"    __LL    "%1, %2         # local_sub_if_positive\n"
-               "       dsubu   %0, %1, %3                              \n"
-               "       bltz    %0, 1f                                  \n"
-                       __SC    "%0, %2                                 \n"
-               "       .set    noreorder                               \n"
-               "       beqzl   %0, 1b                                  \n"
-               "        dsubu  %0, %1, %3                              \n"
-               "       .set    reorder                                 \n"
-               "1:                                                     \n"
-               "       .set    mips0                                   \n"
-               : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
-               : "Ir" (i), "m" (l->a.counter)
-               : "memory");
-       } else if (cpu_has_llsc) {
-               unsigned long temp;
-
-               __asm__ __volatile__(
-               "       .set    mips3                                   \n"
-               "1:"    __LL    "%1, %2         # local_sub_if_positive\n"
-               "       dsubu   %0, %1, %3                              \n"
-               "       bltz    %0, 1f                                  \n"
-                       __SC    "%0, %2                                 \n"
-               "       .set    noreorder                               \n"
-               "       beqz    %0, 1b                                  \n"
-               "        dsubu  %0, %1, %3                              \n"
-               "       .set    reorder                                 \n"
-               "1:                                                     \n"
-               "       .set    mips0                                   \n"
-               : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
-               : "Ir" (i), "m" (l->a.counter)
-               : "memory");
-       } else {
-               unsigned long flags;
-
-               local_irq_save(flags);
-               result = l->a.counter;
-               result -= i;
-               if (result >= 0)
-                       l->a.counter = result;
-               local_irq_restore(flags);
-       }
-
-       return result;
-}
-
 #define local_cmpxchg(l, o, n) \
        ((long)cmpxchg_local(&((l)->a.counter), (o), (n)))
 #define local_xchg(l, n) (xchg_local(&((l)->a.counter),(n)))
@@ -233,12 +172,6 @@ static __inline__ long local_sub_if_positive(long i, local_t * l)
  */
 #define local_dec_and_test(l) (local_sub_return(1, (l)) == 0)
 
-/*
- * local_dec_if_positive - decrement by 1 if old value positive
- * @l: pointer of type local_t
- */
-#define local_dec_if_positive(l)       local_sub_if_positive(1, l)
-
 /*
  * local_add_negative - add and test if negative
  * @l: pointer of type local_t
index b92dd8c760da5d8a600f6abb33bd62b9bc6c1146..e3301e54d559c9586bf47c31b0486af12d9e2ab6 100644 (file)
@@ -142,7 +142,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 /*
  * __pa()/__va() should be used only during mem init.
  */
-#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
+#ifdef CONFIG_64BIT
 #define __pa(x)                                                                \
 ({                                                                     \
     unsigned long __x = (unsigned long)(x);                            \
index 357251f42518bdb51e7c402ae720140880425007..480b574e2483a6a22581280e8091d23ba9afaa5d 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <asm/addrspace.h>
 #include <asm/barrier.h>
+#include <asm/cmpxchg.h>
 #include <asm/cpu-features.h>
 #include <asm/dsp.h>
 #include <asm/war.h>
@@ -194,266 +195,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
 
 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
 
-#define __HAVE_ARCH_CMPXCHG 1
-
-static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
-       unsigned long new)
-{
-       __u32 retval;
-
-       if (cpu_has_llsc && R10000_LLSC_WAR) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     ll      %0, %2                  # __cmpxchg_u32 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       .set    mips0                                   \n"
-               "       move    $1, %z4                                 \n"
-               "       .set    mips3                                   \n"
-               "       sc      $1, %1                                  \n"
-               "       beqzl   $1, 1b                                  \n"
-               "2:                                                     \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else if (cpu_has_llsc) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     ll      %0, %2                  # __cmpxchg_u32 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       .set    mips0                                   \n"
-               "       move    $1, %z4                                 \n"
-               "       .set    mips3                                   \n"
-               "       sc      $1, %1                                  \n"
-               "       beqz    $1, 3f                                  \n"
-               "2:                                                     \n"
-               "       .subsection 2                                   \n"
-               "3:     b       1b                                      \n"
-               "       .previous                                       \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else {
-               unsigned long flags;
-
-               raw_local_irq_save(flags);
-               retval = *m;
-               if (retval == old)
-                       *m = new;
-               raw_local_irq_restore(flags);   /* implies memory barrier  */
-       }
-
-       smp_llsc_mb();
-
-       return retval;
-}
-
-static inline unsigned long __cmpxchg_u32_local(volatile int * m,
-       unsigned long old, unsigned long new)
-{
-       __u32 retval;
-
-       if (cpu_has_llsc && R10000_LLSC_WAR) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     ll      %0, %2                  # __cmpxchg_u32 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       .set    mips0                                   \n"
-               "       move    $1, %z4                                 \n"
-               "       .set    mips3                                   \n"
-               "       sc      $1, %1                                  \n"
-               "       beqzl   $1, 1b                                  \n"
-               "2:                                                     \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else if (cpu_has_llsc) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     ll      %0, %2                  # __cmpxchg_u32 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       .set    mips0                                   \n"
-               "       move    $1, %z4                                 \n"
-               "       .set    mips3                                   \n"
-               "       sc      $1, %1                                  \n"
-               "       beqz    $1, 1b                                  \n"
-               "2:                                                     \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else {
-               unsigned long flags;
-
-               local_irq_save(flags);
-               retval = *m;
-               if (retval == old)
-                       *m = new;
-               local_irq_restore(flags);       /* implies memory barrier  */
-       }
-
-       return retval;
-}
-
-#ifdef CONFIG_64BIT
-static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
-       unsigned long new)
-{
-       __u64 retval;
-
-       if (cpu_has_llsc && R10000_LLSC_WAR) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     lld     %0, %2                  # __cmpxchg_u64 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       move    $1, %z4                                 \n"
-               "       scd     $1, %1                                  \n"
-               "       beqzl   $1, 1b                                  \n"
-               "2:                                                     \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else if (cpu_has_llsc) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     lld     %0, %2                  # __cmpxchg_u64 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       move    $1, %z4                                 \n"
-               "       scd     $1, %1                                  \n"
-               "       beqz    $1, 3f                                  \n"
-               "2:                                                     \n"
-               "       .subsection 2                                   \n"
-               "3:     b       1b                                      \n"
-               "       .previous                                       \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else {
-               unsigned long flags;
-
-               raw_local_irq_save(flags);
-               retval = *m;
-               if (retval == old)
-                       *m = new;
-               raw_local_irq_restore(flags);   /* implies memory barrier  */
-       }
-
-       smp_llsc_mb();
-
-       return retval;
-}
-
-static inline unsigned long __cmpxchg_u64_local(volatile int * m,
-       unsigned long old, unsigned long new)
-{
-       __u64 retval;
-
-       if (cpu_has_llsc && R10000_LLSC_WAR) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     lld     %0, %2                  # __cmpxchg_u64 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       move    $1, %z4                                 \n"
-               "       scd     $1, %1                                  \n"
-               "       beqzl   $1, 1b                                  \n"
-               "2:                                                     \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else if (cpu_has_llsc) {
-               __asm__ __volatile__(
-               "       .set    push                                    \n"
-               "       .set    noat                                    \n"
-               "       .set    mips3                                   \n"
-               "1:     lld     %0, %2                  # __cmpxchg_u64 \n"
-               "       bne     %0, %z3, 2f                             \n"
-               "       move    $1, %z4                                 \n"
-               "       scd     $1, %1                                  \n"
-               "       beqz    $1, 1b                                  \n"
-               "2:                                                     \n"
-               "       .set    pop                                     \n"
-               : "=&r" (retval), "=R" (*m)
-               : "R" (*m), "Jr" (old), "Jr" (new)
-               : "memory");
-       } else {
-               unsigned long flags;
-
-               local_irq_save(flags);
-               retval = *m;
-               if (retval == old)
-                       *m = new;
-               local_irq_restore(flags);       /* implies memory barrier  */
-       }
-
-       return retval;
-}
-
-#else
-extern unsigned long __cmpxchg_u64_unsupported_on_32bit_kernels(
-       volatile int * m, unsigned long old, unsigned long new);
-#define __cmpxchg_u64 __cmpxchg_u64_unsupported_on_32bit_kernels
-extern unsigned long __cmpxchg_u64_local_unsupported_on_32bit_kernels(
-       volatile int * m, unsigned long old, unsigned long new);
-#define __cmpxchg_u64_local __cmpxchg_u64_local_unsupported_on_32bit_kernels
-#endif
-
-/* This function doesn't exist, so you'll get a linker error
-   if something tries to do an invalid cmpxchg().  */
-extern void __cmpxchg_called_with_bad_pointer(void);
-
-static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
-       unsigned long new, int size)
-{
-       switch (size) {
-       case 4:
-               return __cmpxchg_u32(ptr, old, new);
-       case 8:
-               return __cmpxchg_u64(ptr, old, new);
-       }
-       __cmpxchg_called_with_bad_pointer();
-       return old;
-}
-
-static inline unsigned long __cmpxchg_local(volatile void * ptr,
-       unsigned long old, unsigned long new, int size)
-{
-       switch (size) {
-       case 4:
-               return __cmpxchg_u32_local(ptr, old, new);
-       case 8:
-               return __cmpxchg_u64_local(ptr, old, new);
-       }
-       __cmpxchg_called_with_bad_pointer();
-       return old;
-}
-
-#define cmpxchg(ptr,old,new) \
-       ((__typeof__(*(ptr)))__cmpxchg((ptr), \
-               (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr))))
-
-#define cmpxchg_local(ptr,old,new) \
-       ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \
-               (unsigned long)(old), (unsigned long)(new),sizeof(*(ptr))))
-
 extern void set_handler (unsigned long offset, void *addr, unsigned long len);
 extern void set_uncached_handler (unsigned long offset, void *addr, unsigned long len);
 
index 0d5cc04ab005db06809770d4b551c4475382569e..dc4f5950dafaab9a074c9845c56b2f4de6f72abc 100644 (file)
@@ -16,8 +16,9 @@
 #define        flat_argvp_envp_on_stack()              0
 #define        flat_old_ram_flag(flags)                (flags)
 #define        flat_reloc_valid(reloc, size)           ((reloc) <= (size))
-#define        flat_get_addr_from_rp(rp, relval, flags)        get_unaligned(rp)
+#define        flat_get_addr_from_rp(rp, relval, flags, p)     get_unaligned(rp)
 #define        flat_put_addr_at_rp(rp, val, relval)    put_unaligned(val,rp)
 #define        flat_get_relocate_addr(rel)             (rel)
+#define        flat_set_persistent(relval, p)          0
 
 #endif /* __ASM_SH_FLAT_H */
index 0ec78f66cea409c2e256a3be1172aa5f18312970..e245f2a3cd78ed86c51f9061aa9c881da6049182 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * MPC1211 uses PC/AT style RTC definitions.
  */
-#include <asm-i386/mc146818rtc.h>
+#include <asm-x86/mc146818rtc_32.h>
 
 
index 3888f59d6881494bcbd7f4d183846d1ba62896c9..17f0ea566611bfffe443462903333b7e49c49901 100644 (file)
@@ -25,6 +25,7 @@
 #define        flat_stack_align(sp)            /* nothing needed */
 #define        flat_argvp_envp_on_stack()      0
 #define        flat_old_ram_flag(flags)        (flags)
+#define        flat_set_persistent(relval, p)  0
 
 /* We store the type of relocation in the top 4 bits of the `relval.' */
 
@@ -46,7 +47,8 @@ flat_get_relocate_addr (unsigned long relval)
    For the v850, RP should always be half-word aligned.  */
 static inline unsigned long flat_get_addr_from_rp (unsigned long *rp,
                                                   unsigned long relval,
-                                                  unsigned long flags)
+                                                  unsigned long flags,
+                                                  unsigned long *persistent)
 {
        short *srp = (short *)rp;
 
diff --git a/include/asm-x86/8253pit.h b/include/asm-x86/8253pit.h
new file mode 100644 (file)
index 0000000..d3c2b38
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "8253pit_32.h"
+#else
+# include "8253pit_64.h"
+#endif
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
new file mode 100644 (file)
index 0000000..c5e43cb
--- /dev/null
@@ -0,0 +1,88 @@
+include include/asm-generic/Kbuild.asm
+
+header-y += boot.h
+header-y += bootsetup.h
+header-y += debugreg_32.h
+header-y += debugreg_64.h
+header-y += debugreg.h
+header-y += ldt_32.h
+header-y += ldt_64.h
+header-y += ldt.h
+header-y += msr-index.h
+header-y += prctl.h
+header-y += ptrace-abi_32.h
+header-y += ptrace-abi_64.h
+header-y += ptrace-abi.h
+header-y += sigcontext32.h
+header-y += ucontext_32.h
+header-y += ucontext_64.h
+header-y += ucontext.h
+header-y += vsyscall32.h
+
+unifdef-y += a.out_32.h
+unifdef-y += a.out_64.h
+unifdef-y += auxvec_32.h
+unifdef-y += auxvec_64.h
+unifdef-y += byteorder_32.h
+unifdef-y += byteorder_64.h
+unifdef-y += elf_32.h
+unifdef-y += elf_64.h
+unifdef-y += errno_32.h
+unifdef-y += errno_64.h
+unifdef-y += ioctls_32.h
+unifdef-y += ioctls_64.h
+unifdef-y += ipcbuf_32.h
+unifdef-y += ipcbuf_64.h
+unifdef-y += mce.h
+unifdef-y += mman_32.h
+unifdef-y += mman_64.h
+unifdef-y += msgbuf_32.h
+unifdef-y += msgbuf_64.h
+unifdef-y += msr_32.h
+unifdef-y += msr_64.h
+unifdef-y += msr.h
+unifdef-y += mtrr_32.h
+unifdef-y += mtrr_64.h
+unifdef-y += mtrr.h
+unifdef-y += page_32.h
+unifdef-y += page_64.h
+unifdef-y += param_32.h
+unifdef-y += param_64.h
+unifdef-y += posix_types_32.h
+unifdef-y += posix_types_64.h
+unifdef-y += ptrace_32.h
+unifdef-y += ptrace_64.h
+unifdef-y += resource_32.h
+unifdef-y += resource_64.h
+unifdef-y += sembuf_32.h
+unifdef-y += sembuf_64.h
+unifdef-y += setup_32.h
+unifdef-y += setup_64.h
+unifdef-y += shmbuf_32.h
+unifdef-y += shmbuf_64.h
+unifdef-y += shmparam_32.h
+unifdef-y += shmparam_64.h
+unifdef-y += sigcontext_32.h
+unifdef-y += sigcontext_64.h
+unifdef-y += siginfo_32.h
+unifdef-y += siginfo_64.h
+unifdef-y += signal_32.h
+unifdef-y += signal_64.h
+unifdef-y += sockios_32.h
+unifdef-y += sockios_64.h
+unifdef-y += stat_32.h
+unifdef-y += stat_64.h
+unifdef-y += statfs_32.h
+unifdef-y += statfs_64.h
+unifdef-y += termbits_32.h
+unifdef-y += termbits_64.h
+unifdef-y += termios_32.h
+unifdef-y += termios_64.h
+unifdef-y += types_32.h
+unifdef-y += types_64.h
+unifdef-y += unistd_32.h
+unifdef-y += unistd_64.h
+unifdef-y += user_32.h
+unifdef-y += user_64.h
+unifdef-y += vm86.h
+unifdef-y += vsyscall.h
diff --git a/include/asm-x86/a.out.h b/include/asm-x86/a.out.h
new file mode 100644 (file)
index 0000000..5bc9b1d
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "a.out_32.h"
+# else
+#  include "a.out_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "a.out_32.h"
+# else
+#  include "a.out_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h
new file mode 100644 (file)
index 0000000..0693689
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "acpi_32.h"
+#else
+# include "acpi_64.h"
+#endif
diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h
new file mode 100644 (file)
index 0000000..9348f1e
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "agp_32.h"
+#else
+# include "agp_64.h"
+#endif
diff --git a/include/asm-x86/alternative-asm.i b/include/asm-x86/alternative-asm.i
new file mode 100644 (file)
index 0000000..4f360cd
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "alternative-asm_32.i"
+#else
+# include "alternative-asm_64.i"
+#endif
diff --git a/include/asm-x86/alternative.h b/include/asm-x86/alternative.h
new file mode 100644 (file)
index 0000000..9eef6a3
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "alternative_32.h"
+#else
+# include "alternative_64.h"
+#endif
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h
new file mode 100644 (file)
index 0000000..9fbcc0b
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "apic_32.h"
+#else
+# include "apic_64.h"
+#endif
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h
new file mode 100644 (file)
index 0000000..4542c22
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "apicdef_32.h"
+#else
+# include "apicdef_64.h"
+#endif
diff --git a/include/asm-x86/atomic.h b/include/asm-x86/atomic.h
new file mode 100644 (file)
index 0000000..4e1b887
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "atomic_32.h"
+#else
+# include "atomic_64.h"
+#endif
diff --git a/include/asm-x86/auxvec.h b/include/asm-x86/auxvec.h
new file mode 100644 (file)
index 0000000..7ff866f
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "auxvec_32.h"
+# else
+#  include "auxvec_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "auxvec_32.h"
+# else
+#  include "auxvec_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/bitops.h b/include/asm-x86/bitops.h
new file mode 100644 (file)
index 0000000..07e3f6d
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "bitops_32.h"
+#else
+# include "bitops_64.h"
+#endif
diff --git a/include/asm-x86/bug.h b/include/asm-x86/bug.h
new file mode 100644 (file)
index 0000000..c655d7f
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "bug_32.h"
+#else
+# include "bug_64.h"
+#endif
diff --git a/include/asm-x86/bugs.h b/include/asm-x86/bugs.h
new file mode 100644 (file)
index 0000000..ddf42d3
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "bugs_32.h"
+#else
+# include "bugs_64.h"
+#endif
diff --git a/include/asm-x86/byteorder.h b/include/asm-x86/byteorder.h
new file mode 100644 (file)
index 0000000..eb14b18
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "byteorder_32.h"
+# else
+#  include "byteorder_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "byteorder_32.h"
+# else
+#  include "byteorder_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/cache.h b/include/asm-x86/cache.h
new file mode 100644 (file)
index 0000000..c36d190
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "cache_32.h"
+#else
+# include "cache_64.h"
+#endif
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h
new file mode 100644 (file)
index 0000000..e2df3b5
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "cacheflush_32.h"
+#else
+# include "cacheflush_64.h"
+#endif
diff --git a/include/asm-x86/checksum.h b/include/asm-x86/checksum.h
new file mode 100644 (file)
index 0000000..848850f
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "checksum_32.h"
+#else
+# include "checksum_64.h"
+#endif
diff --git a/include/asm-x86/cmpxchg.h b/include/asm-x86/cmpxchg.h
new file mode 100644 (file)
index 0000000..a460fa0
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "cmpxchg_32.h"
+#else
+# include "cmpxchg_64.h"
+#endif
similarity index 100%
rename from include/asm-i386/cpu.h
rename to include/asm-x86/cpu.h
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
new file mode 100644 (file)
index 0000000..b7160a4
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "cpufeature_32.h"
+#else
+# include "cpufeature_64.h"
+#endif
similarity index 91%
rename from include/asm-x86_64/cpufeature.h
rename to include/asm-x86/cpufeature_64.h
index 8baefc3beb2e1e7682c6000e7875c96db88c1fd5..2983501e8b3e4dc88f05bbf0f3b3dc0de83449d7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * cpufeature.h
+ * cpufeature_32.h
  *
  * Defines x86 CPU feature bits
  */
@@ -7,7 +7,7 @@
 #ifndef __ASM_X8664_CPUFEATURE_H
 #define __ASM_X8664_CPUFEATURE_H
 
-#include <asm-i386/cpufeature.h>
+#include <asm/cpufeature_32.h>
 
 #undef  cpu_has_vme
 #define cpu_has_vme            0
diff --git a/include/asm-x86/cputime.h b/include/asm-x86/cputime.h
new file mode 100644 (file)
index 0000000..87c37cf
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "cputime_32.h"
+#else
+# include "cputime_64.h"
+#endif
diff --git a/include/asm-x86/current.h b/include/asm-x86/current.h
new file mode 100644 (file)
index 0000000..d2526d3
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "current_32.h"
+#else
+# include "current_64.h"
+#endif
diff --git a/include/asm-x86/debugreg.h b/include/asm-x86/debugreg.h
new file mode 100644 (file)
index 0000000..b6ce7e4
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "debugreg_32.h"
+# else
+#  include "debugreg_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "debugreg_32.h"
+# else
+#  include "debugreg_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/delay.h b/include/asm-x86/delay.h
new file mode 100644 (file)
index 0000000..10f2c71
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "delay_32.h"
+#else
+# include "delay_64.h"
+#endif
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
new file mode 100644 (file)
index 0000000..6065c50
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "desc_32.h"
+#else
+# include "desc_64.h"
+#endif
diff --git a/include/asm-x86/device.h b/include/asm-x86/device.h
new file mode 100644 (file)
index 0000000..e2bcf7c
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "device_32.h"
+#else
+# include "device_64.h"
+#endif
diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h
new file mode 100644 (file)
index 0000000..8ac7da6
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "div64_32.h"
+#else
+# include "div64_64.h"
+#endif
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
new file mode 100644 (file)
index 0000000..58f790f
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "dma-mapping_32.h"
+#else
+# include "dma-mapping_64.h"
+#endif
diff --git a/include/asm-x86/dma.h b/include/asm-x86/dma.h
new file mode 100644 (file)
index 0000000..9f936c6
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "dma_32.h"
+#else
+# include "dma_64.h"
+#endif
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
new file mode 100644 (file)
index 0000000..c9e4e8e
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "dmi_32.h"
+#else
+# include "dmi_64.h"
+#endif
diff --git a/include/asm-x86/dwarf2.h b/include/asm-x86/dwarf2.h
new file mode 100644 (file)
index 0000000..b3cbb0c
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "dwarf2_32.h"
+#else
+# include "dwarf2_64.h"
+#endif
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h
new file mode 100644 (file)
index 0000000..5d4d218
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "e820_32.h"
+#else
+# include "e820_64.h"
+#endif
diff --git a/include/asm-x86/edac.h b/include/asm-x86/edac.h
new file mode 100644 (file)
index 0000000..f8b888e
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "edac_32.h"
+#else
+# include "edac_64.h"
+#endif
diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h
new file mode 100644 (file)
index 0000000..ed6bb6e
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "elf_32.h"
+# else
+#  include "elf_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "elf_32.h"
+# else
+#  include "elf_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/errno.h b/include/asm-x86/errno.h
new file mode 100644 (file)
index 0000000..9d511be
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "errno_32.h"
+# else
+#  include "errno_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "errno_32.h"
+# else
+#  include "errno_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/fb.h b/include/asm-x86/fb.h
new file mode 100644 (file)
index 0000000..238c7ca
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "fb_32.h"
+#else
+# include "fb_64.h"
+#endif
diff --git a/include/asm-x86/fixmap.h b/include/asm-x86/fixmap.h
new file mode 100644 (file)
index 0000000..382eb27
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "fixmap_32.h"
+#else
+# include "fixmap_64.h"
+#endif
diff --git a/include/asm-x86/floppy.h b/include/asm-x86/floppy.h
new file mode 100644 (file)
index 0000000..aecbb6d
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "floppy_32.h"
+#else
+# include "floppy_64.h"
+#endif
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h
new file mode 100644 (file)
index 0000000..1f4610e
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "futex_32.h"
+#else
+# include "futex_64.h"
+#endif
diff --git a/include/asm-x86/genapic.h b/include/asm-x86/genapic.h
new file mode 100644 (file)
index 0000000..d48bee6
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "genapic_32.h"
+#else
+# include "genapic_64.h"
+#endif
diff --git a/include/asm-x86/hardirq.h b/include/asm-x86/hardirq.h
new file mode 100644 (file)
index 0000000..314434d
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "hardirq_32.h"
+#else
+# include "hardirq_64.h"
+#endif
diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h
new file mode 100644 (file)
index 0000000..9eff486
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "hpet_32.h"
+#else
+# include "hpet_64.h"
+#endif
similarity index 93%
rename from include/asm-x86_64/hpet.h
rename to include/asm-x86/hpet_64.h
index 79bb950f82c5d12205391aeef810ebf1ef583b01..fd4decac93a8eea825d13d24a38226063e4f7ca6 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _ASM_X8664_HPET_H
 #define _ASM_X8664_HPET_H 1
 
-#include <asm-i386/hpet.h>
+#include <asm/hpet_32.h>
 
 #define HPET_TICK_RATE (HZ * 100000UL)
 
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h
new file mode 100644 (file)
index 0000000..bf02539
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "hw_irq_32.h"
+#else
+# include "hw_irq_64.h"
+#endif
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
new file mode 100644 (file)
index 0000000..a8bbed3
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "i387_32.h"
+#else
+# include "i387_64.h"
+#endif
diff --git a/include/asm-x86/i8253.h b/include/asm-x86/i8253.h
new file mode 100644 (file)
index 0000000..b2a4f99
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "i8253_32.h"
+#else
+# include "i8253_64.h"
+#endif
similarity index 100%
rename from include/asm-i386/ide.h
rename to include/asm-x86/ide.h
diff --git a/include/asm-x86/intel_arch_perfmon.h b/include/asm-x86/intel_arch_perfmon.h
new file mode 100644 (file)
index 0000000..4f6d4e6
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "intel_arch_perfmon_32.h"
+#else
+# include "intel_arch_perfmon_64.h"
+#endif
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h
new file mode 100644 (file)
index 0000000..5a58b17
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "io_32.h"
+#else
+# include "io_64.h"
+#endif
diff --git a/include/asm-x86/io_apic.h b/include/asm-x86/io_apic.h
new file mode 100644 (file)
index 0000000..8849496
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "io_apic_32.h"
+#else
+# include "io_apic_64.h"
+#endif
diff --git a/include/asm-x86/ioctls.h b/include/asm-x86/ioctls.h
new file mode 100644 (file)
index 0000000..1e0fd48
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "ioctls_32.h"
+# else
+#  include "ioctls_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "ioctls_32.h"
+# else
+#  include "ioctls_64.h"
+# endif
+#endif
similarity index 100%
rename from include/asm-i386/ipc.h
rename to include/asm-x86/ipc.h
diff --git a/include/asm-x86/ipcbuf.h b/include/asm-x86/ipcbuf.h
new file mode 100644 (file)
index 0000000..eb2e448
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "ipcbuf_32.h"
+# else
+#  include "ipcbuf_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "ipcbuf_32.h"
+# else
+#  include "ipcbuf_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/irq.h b/include/asm-x86/irq.h
new file mode 100644 (file)
index 0000000..7ba9054
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "irq_32.h"
+#else
+# include "irq_64.h"
+#endif
diff --git a/include/asm-x86/irq_regs.h b/include/asm-x86/irq_regs.h
new file mode 100644 (file)
index 0000000..89c898a
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "irq_regs_32.h"
+#else
+# include "irq_regs_64.h"
+#endif
diff --git a/include/asm-x86/irqflags.h b/include/asm-x86/irqflags.h
new file mode 100644 (file)
index 0000000..1b695ff
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "irqflags_32.h"
+#else
+# include "irqflags_64.h"
+#endif
similarity index 100%
rename from include/asm-i386/ist.h
rename to include/asm-x86/ist.h
similarity index 100%
rename from include/asm-x86_64/k8.h
rename to include/asm-x86/k8.h
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
new file mode 100644 (file)
index 0000000..3847910
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "kdebug_32.h"
+#else
+# include "kdebug_64.h"
+#endif
diff --git a/include/asm-x86/kexec.h b/include/asm-x86/kexec.h
new file mode 100644 (file)
index 0000000..718ddbf
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "kexec_32.h"
+#else
+# include "kexec_64.h"
+#endif
diff --git a/include/asm-x86/kmap_types.h b/include/asm-x86/kmap_types.h
new file mode 100644 (file)
index 0000000..e4ec724
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "kmap_types_32.h"
+#else
+# include "kmap_types_64.h"
+#endif
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h
new file mode 100644 (file)
index 0000000..b7bbd25
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "kprobes_32.h"
+#else
+# include "kprobes_64.h"
+#endif
diff --git a/include/asm-x86/ldt.h b/include/asm-x86/ldt.h
new file mode 100644 (file)
index 0000000..3d9cc20
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "ldt_32.h"
+# else
+#  include "ldt_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "ldt_32.h"
+# else
+#  include "ldt_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/linkage.h b/include/asm-x86/linkage.h
new file mode 100644 (file)
index 0000000..94b257f
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "linkage_32.h"
+#else
+# include "linkage_64.h"
+#endif
diff --git a/include/asm-x86/local.h b/include/asm-x86/local.h
new file mode 100644 (file)
index 0000000..c7a1b1c
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "local_32.h"
+#else
+# include "local_64.h"
+#endif
diff --git a/include/asm-x86/mc146818rtc.h b/include/asm-x86/mc146818rtc.h
new file mode 100644 (file)
index 0000000..5c2bb66
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "mc146818rtc_32.h"
+#else
+# include "mc146818rtc_64.h"
+#endif
similarity index 100%
rename from include/asm-i386/mca.h
rename to include/asm-x86/mca.h
diff --git a/include/asm-x86/mce.h b/include/asm-x86/mce.h
new file mode 100644 (file)
index 0000000..cc8ca38
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "mce_32.h"
+#else
+# include "mce_64.h"
+#endif
diff --git a/include/asm-x86/mman.h b/include/asm-x86/mman.h
new file mode 100644 (file)
index 0000000..322db07
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "mman_32.h"
+# else
+#  include "mman_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "mman_32.h"
+# else
+#  include "mman_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/mmu.h b/include/asm-x86/mmu.h
new file mode 100644 (file)
index 0000000..9c628cd
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "mmu_32.h"
+#else
+# include "mmu_64.h"
+#endif
diff --git a/include/asm-x86/mmu_context.h b/include/asm-x86/mmu_context.h
new file mode 100644 (file)
index 0000000..6598450
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "mmu_context_32.h"
+#else
+# include "mmu_context_64.h"
+#endif
similarity index 100%
rename from include/asm-i386/mmx.h
rename to include/asm-x86/mmx.h
diff --git a/include/asm-x86/mmzone.h b/include/asm-x86/mmzone.h
new file mode 100644 (file)
index 0000000..64217ea
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "mmzone_32.h"
+#else
+# include "mmzone_64.h"
+#endif
diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h
new file mode 100644 (file)
index 0000000..2b2f18d
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "module_32.h"
+#else
+# include "module_64.h"
+#endif
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h
new file mode 100644 (file)
index 0000000..8f268e8
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "mpspec_32.h"
+#else
+# include "mpspec_64.h"
+#endif
diff --git a/include/asm-x86/msgbuf.h b/include/asm-x86/msgbuf.h
new file mode 100644 (file)
index 0000000..154f7d6
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "msgbuf_32.h"
+# else
+#  include "msgbuf_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "msgbuf_32.h"
+# else
+#  include "msgbuf_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
new file mode 100644 (file)
index 0000000..2f87ce0
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "msr_32.h"
+# else
+#  include "msr_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "msr_32.h"
+# else
+#  include "msr_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/mtrr.h b/include/asm-x86/mtrr.h
new file mode 100644 (file)
index 0000000..34f633b
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "mtrr_32.h"
+# else
+#  include "mtrr_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "mtrr_32.h"
+# else
+#  include "mtrr_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/mutex.h b/include/asm-x86/mutex.h
new file mode 100644 (file)
index 0000000..a731b9c
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "mutex_32.h"
+#else
+# include "mutex_64.h"
+#endif
diff --git a/include/asm-x86/namei.h b/include/asm-x86/namei.h
new file mode 100644 (file)
index 0000000..732f8f0
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "namei_32.h"
+#else
+# include "namei_64.h"
+#endif
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h
new file mode 100644 (file)
index 0000000..53ccac1
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "nmi_32.h"
+#else
+# include "nmi_64.h"
+#endif
diff --git a/include/asm-x86/numa.h b/include/asm-x86/numa.h
new file mode 100644 (file)
index 0000000..27da400
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "numa_32.h"
+#else
+# include "numa_64.h"
+#endif
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
new file mode 100644 (file)
index 0000000..a757eb2
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "page_32.h"
+# else
+#  include "page_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "page_32.h"
+# else
+#  include "page_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/param.h b/include/asm-x86/param.h
new file mode 100644 (file)
index 0000000..640851b
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "param_32.h"
+# else
+#  include "param_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "param_32.h"
+# else
+#  include "param_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/parport.h b/include/asm-x86/parport.h
new file mode 100644 (file)
index 0000000..2a31157
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "parport_32.h"
+#else
+# include "parport_64.h"
+#endif
diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h
new file mode 100644 (file)
index 0000000..a8cac8c
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "pci_32.h"
+#else
+# include "pci_64.h"
+#endif
diff --git a/include/asm-x86/percpu.h b/include/asm-x86/percpu.h
new file mode 100644 (file)
index 0000000..a1aaad2
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "percpu_32.h"
+#else
+# include "percpu_64.h"
+#endif
diff --git a/include/asm-x86/pgalloc.h b/include/asm-x86/pgalloc.h
new file mode 100644 (file)
index 0000000..5886eed
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "pgalloc_32.h"
+#else
+# include "pgalloc_64.h"
+#endif
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
new file mode 100644 (file)
index 0000000..1039140
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "pgtable_32.h"
+#else
+# include "pgtable_64.h"
+#endif
diff --git a/include/asm-x86/posix_types.h b/include/asm-x86/posix_types.h
new file mode 100644 (file)
index 0000000..bb7133d
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "posix_types_32.h"
+# else
+#  include "posix_types_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "posix_types_32.h"
+# else
+#  include "posix_types_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
new file mode 100644 (file)
index 0000000..46e1c04
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "processor_32.h"
+#else
+# include "processor_64.h"
+#endif
similarity index 99%
rename from include/asm-x86_64/processor.h
rename to include/asm-x86/processor_64.h
index 19525175b91c2a7793bf463c4e78eba925030d3c..31f579b828f232de4789f515b3aa5c1d633e46a1 100644 (file)
@@ -371,7 +371,7 @@ static inline void sync_core(void)
 #define ARCH_HAS_PREFETCH
 static inline void prefetch(void *x) 
 { 
-       asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x));
+       asm volatile("prefetcht0 (%0)" :: "r" (x));
 } 
 
 #define ARCH_HAS_PREFETCHW 1
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h
new file mode 100644 (file)
index 0000000..6824c49
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "ptrace-abi_32.h"
+# else
+#  include "ptrace-abi_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "ptrace-abi_32.h"
+# else
+#  include "ptrace-abi_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
new file mode 100644 (file)
index 0000000..bc4d64a
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "ptrace_32.h"
+# else
+#  include "ptrace_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "ptrace_32.h"
+# else
+#  include "ptrace_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h
new file mode 100644 (file)
index 0000000..8b64f3e
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "required-features_32.h"
+#else
+# include "required-features_64.h"
+#endif
diff --git a/include/asm-x86/resource.h b/include/asm-x86/resource.h
new file mode 100644 (file)
index 0000000..732410a
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "resource_32.h"
+# else
+#  include "resource_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "resource_32.h"
+# else
+#  include "resource_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h
new file mode 100644 (file)
index 0000000..9b6dd09
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "resume-trace_32.h"
+#else
+# include "resume-trace_64.h"
+#endif
diff --git a/include/asm-x86/rtc.h b/include/asm-x86/rtc.h
new file mode 100644 (file)
index 0000000..1f0c98e
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "rtc_32.h"
+#else
+# include "rtc_64.h"
+#endif
diff --git a/include/asm-x86/rwlock.h b/include/asm-x86/rwlock.h
new file mode 100644 (file)
index 0000000..a3be7d8
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "rwlock_32.h"
+#else
+# include "rwlock_64.h"
+#endif
diff --git a/include/asm-x86/scatterlist.h b/include/asm-x86/scatterlist.h
new file mode 100644 (file)
index 0000000..3a1e762
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "scatterlist_32.h"
+#else
+# include "scatterlist_64.h"
+#endif
diff --git a/include/asm-x86/seccomp.h b/include/asm-x86/seccomp.h
new file mode 100644 (file)
index 0000000..c62e58a
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "seccomp_32.h"
+#else
+# include "seccomp_64.h"
+#endif
diff --git a/include/asm-x86/sections.h b/include/asm-x86/sections.h
new file mode 100644 (file)
index 0000000..ae6c69d
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "sections_32.h"
+#else
+# include "sections_64.h"
+#endif
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h
new file mode 100644 (file)
index 0000000..6050682
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "segment_32.h"
+#else
+# include "segment_64.h"
+#endif
diff --git a/include/asm-x86/semaphore.h b/include/asm-x86/semaphore.h
new file mode 100644 (file)
index 0000000..572c0b6
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "semaphore_32.h"
+#else
+# include "semaphore_64.h"
+#endif
diff --git a/include/asm-x86/sembuf.h b/include/asm-x86/sembuf.h
new file mode 100644 (file)
index 0000000..e42c971
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "sembuf_32.h"
+# else
+#  include "sembuf_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "sembuf_32.h"
+# else
+#  include "sembuf_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/serial.h b/include/asm-x86/serial.h
new file mode 100644 (file)
index 0000000..cf1b052
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "serial_32.h"
+#else
+# include "serial_64.h"
+#endif
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h
new file mode 100644 (file)
index 0000000..81c0d98
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "setup_32.h"
+# else
+#  include "setup_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "setup_32.h"
+# else
+#  include "setup_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/shmbuf.h b/include/asm-x86/shmbuf.h
new file mode 100644 (file)
index 0000000..e85f1cb
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "shmbuf_32.h"
+# else
+#  include "shmbuf_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "shmbuf_32.h"
+# else
+#  include "shmbuf_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/shmparam.h b/include/asm-x86/shmparam.h
new file mode 100644 (file)
index 0000000..165627c
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "shmparam_32.h"
+# else
+#  include "shmparam_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "shmparam_32.h"
+# else
+#  include "shmparam_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h
new file mode 100644 (file)
index 0000000..0d16cef
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "sigcontext_32.h"
+# else
+#  include "sigcontext_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "sigcontext_32.h"
+# else
+#  include "sigcontext_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/siginfo.h b/include/asm-x86/siginfo.h
new file mode 100644 (file)
index 0000000..0b8e4bb
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "siginfo_32.h"
+# else
+#  include "siginfo_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "siginfo_32.h"
+# else
+#  include "siginfo_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/signal.h b/include/asm-x86/signal.h
new file mode 100644 (file)
index 0000000..bf5a63f
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "signal_32.h"
+# else
+#  include "signal_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "signal_32.h"
+# else
+#  include "signal_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
new file mode 100644 (file)
index 0000000..f2e8319
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "smp_32.h"
+#else
+# include "smp_64.h"
+#endif
diff --git a/include/asm-x86/sockios.h b/include/asm-x86/sockios.h
new file mode 100644 (file)
index 0000000..5a134fc
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "sockios_32.h"
+# else
+#  include "sockios_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "sockios_32.h"
+# else
+#  include "sockios_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/sparsemem.h b/include/asm-x86/sparsemem.h
new file mode 100644 (file)
index 0000000..3f203b1
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "sparsemem_32.h"
+#else
+# include "sparsemem_64.h"
+#endif
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h
new file mode 100644 (file)
index 0000000..d74d85e
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "spinlock_32.h"
+#else
+# include "spinlock_64.h"
+#endif
diff --git a/include/asm-x86/stat.h b/include/asm-x86/stat.h
new file mode 100644 (file)
index 0000000..3ff6b50
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "stat_32.h"
+# else
+#  include "stat_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "stat_32.h"
+# else
+#  include "stat_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/statfs.h b/include/asm-x86/statfs.h
new file mode 100644 (file)
index 0000000..327fb5d
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "statfs_32.h"
+# else
+#  include "statfs_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "statfs_32.h"
+# else
+#  include "statfs_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/string.h b/include/asm-x86/string.h
new file mode 100644 (file)
index 0000000..6dfd6d9
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "string_32.h"
+#else
+# include "string_64.h"
+#endif
diff --git a/include/asm-x86/suspend.h b/include/asm-x86/suspend.h
new file mode 100644 (file)
index 0000000..9bd521f
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "suspend_32.h"
+#else
+# include "suspend_64.h"
+#endif
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
new file mode 100644 (file)
index 0000000..692562b
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "system_32.h"
+#else
+# include "system_64.h"
+#endif
similarity index 98%
rename from include/asm-i386/system.h
rename to include/asm-x86/system_32.h
index 609756c616769194763fb3b17dbf046ca3c25059..d69ba937e09251769e2f00d54c0c91562a4127e8 100644 (file)
@@ -214,11 +214,6 @@ static inline unsigned long get_limit(unsigned long segment)
  */
  
 
-/* 
- * Actually only lfence would be needed for mb() because all stores done 
- * by the kernel should be already ordered. But keep a full barrier for now. 
- */
-
 #define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2)
 #define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
 
diff --git a/include/asm-x86/termbits.h b/include/asm-x86/termbits.h
new file mode 100644 (file)
index 0000000..69f3080
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "termbits_32.h"
+# else
+#  include "termbits_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "termbits_32.h"
+# else
+#  include "termbits_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/termios.h b/include/asm-x86/termios.h
new file mode 100644 (file)
index 0000000..a4f4ae2
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "termios_32.h"
+# else
+#  include "termios_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "termios_32.h"
+# else
+#  include "termios_64.h"
+# endif
+#endif
similarity index 99%
rename from include/asm-i386/termios.h
rename to include/asm-x86/termios_32.h
index f520b7c16fa2f3178fcc0a44326d8b5d7690b189..6fdb2c841b73750839309d6a2534978dc2c5269f 100644 (file)
@@ -40,7 +40,6 @@ struct termio {
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 
 #ifdef __KERNEL__
-#include <linux/module.h>
 
 /*     intr=^C         quit=^\         erase=del       kill=^U
        eof=^D          vtime=\0        vmin=\1         sxtc=\0
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h
new file mode 100644 (file)
index 0000000..d5fd12f
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "thread_info_32.h"
+#else
+# include "thread_info_64.h"
+#endif
diff --git a/include/asm-x86/timex.h b/include/asm-x86/timex.h
new file mode 100644 (file)
index 0000000..d01c18c
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "timex_32.h"
+#else
+# include "timex_64.h"
+#endif
diff --git a/include/asm-x86/tlb.h b/include/asm-x86/tlb.h
new file mode 100644 (file)
index 0000000..7d55c37
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "tlb_32.h"
+#else
+# include "tlb_64.h"
+#endif
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h
new file mode 100644 (file)
index 0000000..9af4cc8
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "tlbflush_32.h"
+#else
+# include "tlbflush_64.h"
+#endif
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
new file mode 100644 (file)
index 0000000..b10fde9
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "topology_32.h"
+#else
+# include "topology_64.h"
+#endif
similarity index 100%
rename from include/asm-i386/tsc.h
rename to include/asm-x86/tsc.h
diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h
new file mode 100644 (file)
index 0000000..a777a9b
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "types_32.h"
+# else
+#  include "types_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "types_32.h"
+# else
+#  include "types_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/uaccess.h b/include/asm-x86/uaccess.h
new file mode 100644 (file)
index 0000000..9fefd29
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "uaccess_32.h"
+#else
+# include "uaccess_64.h"
+#endif
diff --git a/include/asm-x86/ucontext.h b/include/asm-x86/ucontext.h
new file mode 100644 (file)
index 0000000..175c8cb
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "ucontext_32.h"
+# else
+#  include "ucontext_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "ucontext_32.h"
+# else
+#  include "ucontext_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/unaligned.h b/include/asm-x86/unaligned.h
new file mode 100644 (file)
index 0000000..6806715
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "unaligned_32.h"
+#else
+# include "unaligned_64.h"
+#endif
diff --git a/include/asm-x86/unistd.h b/include/asm-x86/unistd.h
new file mode 100644 (file)
index 0000000..2a58ed3
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "unistd_32.h"
+# else
+#  include "unistd_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "unistd_32.h"
+# else
+#  include "unistd_64.h"
+# endif
+#endif
diff --git a/include/asm-x86/unwind.h b/include/asm-x86/unwind.h
new file mode 100644 (file)
index 0000000..7e4d7ad
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "unwind_32.h"
+#else
+# include "unwind_64.h"
+#endif
diff --git a/include/asm-x86/user.h b/include/asm-x86/user.h
new file mode 100644 (file)
index 0000000..484715a
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_32
+#  include "user_32.h"
+# else
+#  include "user_64.h"
+# endif
+#else
+# ifdef __i386__
+#  include "user_32.h"
+# else
+#  include "user_64.h"
+# endif
+#endif
similarity index 100%
rename from include/asm-i386/vga.h
rename to include/asm-x86/vga.h
similarity index 100%
rename from include/asm-i386/vic.h
rename to include/asm-x86/vic.h
similarity index 100%
rename from include/asm-i386/vmi.h
rename to include/asm-x86/vmi.h
diff --git a/include/asm-x86/xor.h b/include/asm-x86/xor.h
new file mode 100644 (file)
index 0000000..11b3bb8
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CONFIG_X86_32
+# include "xor_32.h"
+#else
+# include "xor_64.h"
+#endif
diff --git a/include/asm-x86_64/Kbuild b/include/asm-x86_64/Kbuild
deleted file mode 100644 (file)
index 75a2def..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-include include/asm-generic/Kbuild.asm
-
-ALTARCH := i386
-ARCHDEF := defined __x86_64__
-ALTARCHDEF := defined __i386__
-
-header-y += boot.h
-header-y += bootsetup.h
-header-y += debugreg.h
-header-y += ldt.h
-header-y += msr-index.h
-header-y += prctl.h
-header-y += ptrace-abi.h
-header-y += sigcontext32.h
-header-y += ucontext.h
-header-y += vsyscall32.h
-
-unifdef-y += mce.h
-unifdef-y += msr.h
-unifdef-y += mtrr.h
-unifdef-y += vsyscall.h
diff --git a/include/asm-x86_64/boot.h b/include/asm-x86_64/boot.h
deleted file mode 100644 (file)
index 3c46cea..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/boot.h>
diff --git a/include/asm-x86_64/bootparam.h b/include/asm-x86_64/bootparam.h
deleted file mode 100644 (file)
index aa82e52..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/bootparam.h>
diff --git a/include/asm-x86_64/cpu.h b/include/asm-x86_64/cpu.h
deleted file mode 100644 (file)
index 8eea076..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/cpu.h>
diff --git a/include/asm-x86_64/emergency-restart.h b/include/asm-x86_64/emergency-restart.h
deleted file mode 100644 (file)
index 680c395..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_EMERGENCY_RESTART_H
-#define _ASM_EMERGENCY_RESTART_H
-
-extern void machine_emergency_restart(void);
-
-#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-x86_64/fcntl.h b/include/asm-x86_64/fcntl.h
deleted file mode 100644 (file)
index 46ab12d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/fcntl.h>
diff --git a/include/asm-x86_64/hypertransport.h b/include/asm-x86_64/hypertransport.h
deleted file mode 100644 (file)
index 5cbf9fa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/hypertransport.h>
diff --git a/include/asm-x86_64/ide.h b/include/asm-x86_64/ide.h
deleted file mode 100644 (file)
index 4cef0ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/ide.h>
diff --git a/include/asm-x86_64/ioctl.h b/include/asm-x86_64/ioctl.h
deleted file mode 100644 (file)
index b279fe0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ioctl.h>
diff --git a/include/asm-x86_64/ist.h b/include/asm-x86_64/ist.h
deleted file mode 100644 (file)
index 338857e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/ist.h>
diff --git a/include/asm-x86_64/msidef.h b/include/asm-x86_64/msidef.h
deleted file mode 100644 (file)
index 083ad58..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/msidef.h>
diff --git a/include/asm-x86_64/msr-index.h b/include/asm-x86_64/msr-index.h
deleted file mode 100644 (file)
index d77a63f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/msr-index.h>
diff --git a/include/asm-x86_64/node.h b/include/asm-x86_64/node.h
deleted file mode 100644 (file)
index 0ee6f88..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/node.h>
diff --git a/include/asm-x86_64/poll.h b/include/asm-x86_64/poll.h
deleted file mode 100644 (file)
index c98509d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/poll.h>
diff --git a/include/asm-x86_64/processor-flags.h b/include/asm-x86_64/processor-flags.h
deleted file mode 100644 (file)
index ec99a57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/processor-flags.h>
diff --git a/include/asm-x86_64/socket.h b/include/asm-x86_64/socket.h
deleted file mode 100644 (file)
index 90af60c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _ASM_SOCKET_H
-#define _ASM_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* For setsockopt(2) */
-#define SOL_SOCKET     1
-
-#define SO_DEBUG       1
-#define SO_REUSEADDR   2
-#define SO_TYPE                3
-#define SO_ERROR       4
-#define SO_DONTROUTE   5
-#define SO_BROADCAST   6
-#define SO_SNDBUF      7
-#define SO_RCVBUF      8
-#define SO_SNDBUFFORCE 32
-#define SO_RCVBUFFORCE 33
-#define SO_KEEPALIVE   9
-#define SO_OOBINLINE   10
-#define SO_NO_CHECK    11
-#define SO_PRIORITY    12
-#define SO_LINGER      13
-#define SO_BSDCOMPAT   14
-/* To add :#define SO_REUSEPORT 15 */
-#define SO_PASSCRED    16
-#define SO_PEERCRED    17
-#define SO_RCVLOWAT    18
-#define SO_SNDLOWAT    19
-#define SO_RCVTIMEO    20
-#define SO_SNDTIMEO    21
-
-/* Security levels - as per NRL IPv6 - don't actually do anything */
-#define SO_SECURITY_AUTHENTICATION             22
-#define SO_SECURITY_ENCRYPTION_TRANSPORT       23
-#define SO_SECURITY_ENCRYPTION_NETWORK         24
-
-#define SO_BINDTODEVICE        25
-
-/* Socket filtering */
-#define SO_ATTACH_FILTER        26
-#define SO_DETACH_FILTER        27
-
-#define SO_PEERNAME            28
-#define SO_TIMESTAMP           29
-#define SCM_TIMESTAMP          SO_TIMESTAMP
-
-#define SO_ACCEPTCONN          30
-
-#define SO_PEERSEC             31
-#define SO_PASSSEC             34
-#define SO_TIMESTAMPNS         35
-#define SCM_TIMESTAMPNS                SO_TIMESTAMPNS
-
-#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-x86_64/spinlock_types.h b/include/asm-x86_64/spinlock_types.h
deleted file mode 100644 (file)
index 4da9345..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SPINLOCK_TYPES_H
-#define __ASM_SPINLOCK_TYPES_H
-
-#ifndef __LINUX_SPINLOCK_TYPES_H
-# error "please don't include this file directly"
-#endif
-
-typedef struct {
-       unsigned int slock;
-} raw_spinlock_t;
-
-#define __RAW_SPIN_LOCK_UNLOCKED       { 1 }
-
-typedef struct {
-       unsigned int lock;
-} raw_rwlock_t;
-
-#define __RAW_RW_LOCK_UNLOCKED         { RW_LOCK_BIAS }
-
-#endif
diff --git a/include/asm-x86_64/therm_throt.h b/include/asm-x86_64/therm_throt.h
deleted file mode 100644 (file)
index 5aac059..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/therm_throt.h>
diff --git a/include/asm-x86_64/tsc.h b/include/asm-x86_64/tsc.h
deleted file mode 100644 (file)
index d66ba6e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-i386/tsc.h>
diff --git a/include/asm-x86_64/vga.h b/include/asm-x86_64/vga.h
deleted file mode 100644 (file)
index 0ecf68a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *     Access to VGA videoram
- *
- *     (c) 1998 Martin Mares <mj@ucw.cz>
- */
-
-#ifndef _LINUX_ASM_VGA_H_
-#define _LINUX_ASM_VGA_H_
-
-/*
- *     On the PC, we can just recalculate addresses and then
- *     access the videoram directly without any black magic.
- */
-
-#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x)
-
-#define vga_readb(x) (*(x))
-#define vga_writeb(x,y) (*(y) = (x))
-
-#endif
index 963051a967d6c22510840473e4913cbe71cf03d0..3ec6e7ff5fbd3514cb332fac4f4ad18cab98a717 100644 (file)
  *                     CPUFREQ NOTIFIER INTERFACE                    *
  *********************************************************************/
 
-#ifdef CONFIG_CPU_FREQ
 int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
-#else
-static inline int cpufreq_register_notifier(struct notifier_block *nb,
-                                               unsigned int list)
-{
-       return 0;
-}
-#endif
 int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
 
 #define CPUFREQ_TRANSITION_NOTIFIER    (0)
@@ -268,22 +260,17 @@ struct freq_attr {
 int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
 int cpufreq_update_policy(unsigned int cpu);
 
+/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */
+unsigned int cpufreq_get(unsigned int cpu);
 
-/*
- * query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it
- */
+/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
 #ifdef CONFIG_CPU_FREQ
 unsigned int cpufreq_quick_get(unsigned int cpu);
-unsigned int cpufreq_get(unsigned int cpu);
 #else
 static inline unsigned int cpufreq_quick_get(unsigned int cpu)
 {
        return 0;
 }
-static inline unsigned int cpufreq_get(unsigned int cpu)
-{
-       return 0;
-}
 #endif
 
 
index a01ac6dd5f5e1c07d9a54a8f879512db2eac3905..313c6b6e774f887438c3926c539186ed03e6939e 100644 (file)
@@ -113,7 +113,7 @@ extern unsigned long avenrun[];             /* Load averages */
 
 #define FSHIFT         11              /* nr of bits of precision */
 #define FIXED_1                (1<<FSHIFT)     /* 1.0 as fixed-point */
-#define LOAD_FREQ      (5*HZ)          /* 5 sec intervals */
+#define LOAD_FREQ      (5*HZ+1)        /* 5 sec intervals */
 #define EXP_1          1884            /* 1/exp(5sec/1min) as fixed-point */
 #define EXP_5          2014            /* 1/exp(5sec/5min) */
 #define EXP_15         2037            /* 1/exp(5sec/15min) */
index 4ef4d22e5e43bb1439183aee44782fb5d46a41a3..b4af6bcb7b7aa26a67b3358598826f166e16e553 100644 (file)
@@ -127,7 +127,7 @@ int sync_page_range(struct inode *inode, struct address_space *mapping,
                        loff_t pos, loff_t count);
 int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
                           loff_t pos, loff_t count);
-void set_page_dirty_balance(struct page *page);
+void set_page_dirty_balance(struct page *page, int page_mkwrite);
 void writeback_set_ratelimit(void);
 
 /* pdflush.c */
index a4047d3cf5ddda9a7511c3b68b6542a3c3e292d3..e5bb084d8754fcf5a57abe18095755e321cedcd6 100644 (file)
@@ -188,7 +188,7 @@ extern void rose_kick(struct sock *);
 extern void rose_enquiry_response(struct sock *);
 
 /* rose_route.c */
-extern struct rose_neigh rose_loopback_neigh;
+extern struct rose_neigh *rose_loopback_neigh;
 extern const struct file_operations rose_neigh_fops;
 extern const struct file_operations rose_nodes_fops;
 extern const struct file_operations rose_routes_fops;
index 991c85bb9e3648e83cf44599d36845aa92bd9fc4..e8e3a64eb32254d50a86d87e7028042aae8578d4 100644 (file)
@@ -114,7 +114,6 @@ sctp_state_fn_t sctp_sf_do_4_C;
 sctp_state_fn_t sctp_sf_eat_data_6_2;
 sctp_state_fn_t sctp_sf_eat_data_fast_4_4;
 sctp_state_fn_t sctp_sf_eat_sack_6_2;
-sctp_state_fn_t sctp_sf_tabort_8_4_8;
 sctp_state_fn_t sctp_sf_operr_notify;
 sctp_state_fn_t sctp_sf_t1_init_timer_expire;
 sctp_state_fn_t sctp_sf_t1_cookie_timer_expire;
@@ -247,6 +246,9 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *,
                                              int, __be16);
 struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc,
                                             union sctp_addr *addr);
+int sctp_verify_asconf(const struct sctp_association *asoc,
+                      struct sctp_paramhdr *param_hdr, void *chunk_end,
+                      struct sctp_paramhdr **errp);
 struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
                                       struct sctp_chunk *asconf);
 int sctp_process_asconf_ack(struct sctp_association *asoc,
index c2fe2dcc9afc9b5d1e2b618b82a7a26aa7c19e0c..baff49dfcdbd488ef21c922be48eacf3be17eea2 100644 (file)
@@ -421,6 +421,7 @@ struct sctp_signed_cookie {
  * internally.
  */
 union sctp_addr_param {
+       struct sctp_paramhdr p;
        struct sctp_ipv4addr_param v4;
        struct sctp_ipv6addr_param v6;
 };
@@ -1156,7 +1157,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
 int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
                       __u8 use_as_src, gfp_t gfp);
 int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
-                       void (*rcu_call)(struct rcu_head *,
+                       void fastcall (*rcu_call)(struct rcu_head *,
                                          void (*func)(struct rcu_head *)));
 int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
                         struct sctp_sock *);
index 185c7ecce4cc159e845c3e9afa62a7facc7b8bea..54053de0bdd7c12f2f3a0269f2ddf5b77c33ec47 100644 (file)
@@ -1059,14 +1059,12 @@ struct tcp_md5sig_key {
 };
 
 struct tcp4_md5sig_key {
-       u8                      *key;
-       u16                     keylen;
+       struct tcp_md5sig_key   base;
        __be32                  addr;
 };
 
 struct tcp6_md5sig_key {
-       u8                      *key;
-       u16                     keylen;
+       struct tcp_md5sig_key   base;
 #if 0
        u32                     scope_id;       /* XXX */
 #endif
index e8935b195e8809fa1a23484d5007feb27887fd63..fcc94e7b40864afcb72170f19d832f8117e517fc 100644 (file)
@@ -1943,9 +1943,10 @@ static inline int fetch_robust_entry(struct robust_list __user **entry,
 void exit_robust_list(struct task_struct *curr)
 {
        struct robust_list_head __user *head = curr->robust_list;
-       struct robust_list __user *entry, *pending;
-       unsigned int limit = ROBUST_LIST_LIMIT, pi, pip;
+       struct robust_list __user *entry, *next_entry, *pending;
+       unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip;
        unsigned long futex_offset;
+       int rc;
 
        /*
         * Fetch the list head (which was registered earlier, via
@@ -1965,11 +1966,13 @@ void exit_robust_list(struct task_struct *curr)
        if (fetch_robust_entry(&pending, &head->list_op_pending, &pip))
                return;
 
-       if (pending)
-               handle_futex_death((void __user *)pending + futex_offset,
-                                  curr, pip);
-
+       next_entry = NULL;      /* avoid warning with gcc */
        while (entry != &head->list) {
+               /*
+                * Fetch the next entry in the list before calling
+                * handle_futex_death:
+                */
+               rc = fetch_robust_entry(&next_entry, &entry->next, &next_pi);
                /*
                 * A pending lock might already be on the list, so
                 * don't process it twice:
@@ -1978,11 +1981,10 @@ void exit_robust_list(struct task_struct *curr)
                        if (handle_futex_death((void __user *)entry + futex_offset,
                                                curr, pi))
                                return;
-               /*
-                * Fetch the next entry in the list:
-                */
-               if (fetch_robust_entry(&entry, &entry->next, &pi))
+               if (rc)
                        return;
+               entry = next_entry;
+               pi = next_pi;
                /*
                 * Avoid excessively long or circular lists:
                 */
@@ -1991,6 +1993,10 @@ void exit_robust_list(struct task_struct *curr)
 
                cond_resched();
        }
+
+       if (pending)
+               handle_futex_death((void __user *)pending + futex_offset,
+                                  curr, pip);
 }
 
 long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
index 7e52eb051f227f557a171e974312d35b9192944a..2c2e2954b713b2681a5bf120c0097cb2c2affc8c 100644 (file)
@@ -38,10 +38,11 @@ fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
 void compat_exit_robust_list(struct task_struct *curr)
 {
        struct compat_robust_list_head __user *head = curr->compat_robust_list;
-       struct robust_list __user *entry, *pending;
-       unsigned int limit = ROBUST_LIST_LIMIT, pi, pip;
-       compat_uptr_t uentry, upending;
+       struct robust_list __user *entry, *next_entry, *pending;
+       unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip;
+       compat_uptr_t uentry, next_uentry, upending;
        compat_long_t futex_offset;
+       int rc;
 
        /*
         * Fetch the list head (which was registered earlier, via
@@ -61,10 +62,15 @@ void compat_exit_robust_list(struct task_struct *curr)
        if (fetch_robust_entry(&upending, &pending,
                               &head->list_op_pending, &pip))
                return;
-       if (pending)
-               handle_futex_death((void __user *)pending + futex_offset, curr, pip);
 
+       next_entry = NULL;      /* avoid warning with gcc */
        while (entry != (struct robust_list __user *) &head->list) {
+               /*
+                * Fetch the next entry in the list before calling
+                * handle_futex_death:
+                */
+               rc = fetch_robust_entry(&next_uentry, &next_entry,
+                       (compat_uptr_t __user *)&entry->next, &next_pi);
                /*
                 * A pending lock might already be on the list, so
                 * dont process it twice:
@@ -74,12 +80,11 @@ void compat_exit_robust_list(struct task_struct *curr)
                                                curr, pi))
                                return;
 
-               /*
-                * Fetch the next entry in the list:
-                */
-               if (fetch_robust_entry(&uentry, &entry,
-                                      (compat_uptr_t __user *)&entry->next, &pi))
+               if (rc)
                        return;
+               uentry = next_uentry;
+               entry = next_entry;
+               pi = next_pi;
                /*
                 * Avoid excessively long or circular lists:
                 */
@@ -88,6 +93,9 @@ void compat_exit_robust_list(struct task_struct *curr)
 
                cond_resched();
        }
+       if (pending)
+               handle_futex_death((void __user *)pending + futex_offset,
+                                  curr, pip);
 }
 
 asmlinkage long
index c8580a1e68739510088355cc5c37f4c47b571a77..14b0e10dc95c6a8a1b305f212e2300574120f16f 100644 (file)
@@ -110,7 +110,7 @@ config SUSPEND
 
 config HIBERNATION_UP_POSSIBLE
        bool
-       depends on X86 || PPC64_SWSUSP || FRV || PPC32
+       depends on X86 || PPC64_SWSUSP || PPC32
        depends on !SMP
        default y
 
index c9fbe8e73a45c66f36bb2ddf8bf5eaf24d93c141..67c67a87146ebaa64514c4bdf8b0ae5de0d4cf47 100644 (file)
@@ -639,6 +639,16 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se)
 
                se->block_start = 0;
                se->sum_sleep_runtime += delta;
+
+               /*
+                * Blocking time is in units of nanosecs, so shift by 20 to
+                * get a milliseconds-range estimation of the amount of
+                * time that the task spent sleeping:
+                */
+               if (unlikely(prof_on == SLEEP_PROFILING)) {
+                       profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk),
+                                    delta >> 20);
+               }
        }
 #endif
 }
index 9fb91a32eddaddfd47d09cb0aa66586a5635a39e..7929523810928d9aa405aa74cb2e390a6083491f 100644 (file)
@@ -531,18 +531,18 @@ static int check_kill_permission(int sig, struct siginfo *info,
        if (!valid_signal(sig))
                return error;
 
-       error = audit_signal_info(sig, t); /* Let audit system see the signal */
-       if (error)
-               return error;
-
-       error = -EPERM;
-       if ((info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info)))
-           && ((sig != SIGCONT) ||
-               (process_session(current) != process_session(t)))
-           && (current->euid ^ t->suid) && (current->euid ^ t->uid)
-           && (current->uid ^ t->suid) && (current->uid ^ t->uid)
-           && !capable(CAP_KILL))
+       if (info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info))) {
+               error = audit_signal_info(sig, t); /* Let audit system see the signal */
+               if (error)
+                       return error;
+               error = -EPERM;
+               if (((sig != SIGCONT) ||
+                       (process_session(current) != process_session(t)))
+                   && (current->euid ^ t->suid) && (current->euid ^ t->uid)
+                   && (current->uid ^ t->suid) && (current->uid ^ t->uid)
+                   && !capable(CAP_KILL))
                return error;
+       }
 
        return security_task_kill(t, info, sig, 0);
 }
index 1b33b05d346bb8958ac235a2aa423b657cdf28ad..8ae2e636eb1ba690f9fd9cf0f363d5f677db80ac 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/getcpu.h>
 #include <linux/task_io_accounting_ops.h>
 #include <linux/seccomp.h>
+#include <linux/cpu.h>
 
 #include <linux/compat.h>
 #include <linux/syscalls.h>
@@ -878,6 +879,7 @@ void kernel_power_off(void)
        kernel_shutdown_prepare(SYSTEM_POWER_OFF);
        if (pm_power_off_prepare)
                pm_power_off_prepare();
+       disable_nonboot_cpus();
        sysdev_shutdown();
        printk(KERN_EMERG "Power down.\n");
        machine_power_off();
index 3c38fb5eae1b4a6d5ccaab8b8b079b130af675fe..c36bb7ed0301e198753dc29eef982ddf02ed7faf 100644 (file)
@@ -327,8 +327,9 @@ static int tstats_show(struct seq_file *m, void *v)
                ms = 1;
 
        if (events && period.tv_sec)
-               seq_printf(m, "%ld total events, %ld.%ld events/sec\n", events,
-                          events / period.tv_sec, events * 1000 / ms);
+               seq_printf(m, "%ld total events, %ld.%03ld events/sec\n",
+                          events, events * 1000 / ms,
+                          (events * 1000000 / ms) % 1000);
        else
                seq_printf(m, "%ld total events\n", events);
 
index 50a94eee4d92565e2f247eac3c92ca80c7d45581..cdc9b099e620f9fa00398c746e2b4cdd29bce554 100644 (file)
@@ -284,7 +284,7 @@ config LOCKDEP
        select KALLSYMS_ALL
 
 config LOCK_STAT
-       bool "Lock usage statisitics"
+       bool "Lock usage statistics"
        depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
        select LOCKDEP
        select DEBUG_SPINLOCK
@@ -294,6 +294,8 @@ config LOCK_STAT
        help
         This feature enables tracking lock contention points
 
+        For more details, see Documentation/lockstat.txt
+
 config DEBUG_LOCKDEP
        bool "Lock dependency engine debugging"
        depends on DEBUG_KERNEL && LOCKDEP
index 6b0ba8cf4e5f9ab3fbc8fef0b4ead9c88af7cf4a..4f3f3e2565017e4e37c88d7c6f11f4326695cdcc 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for some libs needed in the kernel.
 #
 
-lib-y := ctype.o string.o vsprintf.o kasprintf.o cmdline.o \
+lib-y := ctype.o string.o vsprintf.o cmdline.o \
         rbtree.o radix-tree.o dump_stack.o \
         idr.o int_sqrt.o bitmap.o extable.o prio_tree.o \
         sha1.o irq_regs.o reciprocal_div.o argv_split.o
@@ -13,7 +13,7 @@ lib-$(CONFIG_SMP) += cpumask.o
 lib-y  += kobject.o kref.o kobject_uevent.o klist.o
 
 obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
-        bust_spinlocks.o hexdump.o
+        bust_spinlocks.o hexdump.o kasprintf.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
index e24d348083c34da69472bc22a9b7025d562a3ffe..a7609cbcb00d8ce3fb81f366d7c835af970452e7 100644 (file)
@@ -137,6 +137,7 @@ config SPLIT_PTLOCK_CPUS
        int
        default "4096" if ARM && !CPU_CACHE_VIPT
        default "4096" if PARISC && !PA20
+       default "4096" if XEN
        default "4"
 
 #
index 90b657b50f81413a8452313f8a7b225888971f7b..15c8413ee929200006e4eb5e8a96bf5b04f0f213 100644 (file)
@@ -1388,6 +1388,7 @@ retry_find:
        size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
        if (unlikely(vmf->pgoff >= size)) {
                unlock_page(page);
+               page_cache_release(page);
                goto outside_data_content;
        }
 
index c395b1abf08275dc1d22a570f259f495cdb2cbc7..95bcb5641c722b6f4d7eb49801320e0a266f7c83 100644 (file)
@@ -160,7 +160,7 @@ asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
        if (vma->vm_private_data && !(vma->vm_flags & VM_NONLINEAR))
                goto out;
 
-       if (!vma->vm_flags & VM_CAN_NONLINEAR)
+       if (!(vma->vm_flags & VM_CAN_NONLINEAR))
                goto out;
 
        if (end <= start || start < vma->vm_start || end > vma->vm_end)
index 84c795ee2d650f807223c3f17a072c3f2eb52c72..eab8c428cc932028e202b4a8b8d547642fd10fa6 100644 (file)
@@ -42,7 +42,7 @@ static void clear_huge_page(struct page *page, unsigned long addr)
        might_sleep();
        for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); i++) {
                cond_resched();
-               clear_user_highpage(page + i, addr);
+               clear_user_highpage(page + i, addr + i * PAGE_SIZE);
        }
 }
 
index ca8cac11bd2cf4930533f306a0209bbbea0e9c31..f82b359b27452dd1f7e682197479fa1391d19a46 100644 (file)
@@ -1639,6 +1639,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
        struct page *old_page, *new_page;
        pte_t entry;
        int reuse = 0, ret = 0;
+       int page_mkwrite = 0;
        struct page *dirty_page = NULL;
 
        old_page = vm_normal_page(vma, address, orig_pte);
@@ -1687,6 +1688,8 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
                        page_cache_release(old_page);
                        if (!pte_same(*page_table, orig_pte))
                                goto unlock;
+
+                       page_mkwrite = 1;
                }
                dirty_page = old_page;
                get_page(dirty_page);
@@ -1774,7 +1777,7 @@ unlock:
                 * do_no_page is protected similarly.
                 */
                wait_on_page_locked(dirty_page);
-               set_page_dirty_balance(dirty_page);
+               set_page_dirty_balance(dirty_page, page_mkwrite);
                put_page(dirty_page);
        }
        return ret;
@@ -2307,13 +2310,14 @@ oom:
  * do not need to flush old virtual caches or the TLB.
  *
  * We enter with non-exclusive mmap_sem (to exclude vma changes,
- * but allow concurrent faults), and pte mapped but not yet locked.
+ * but allow concurrent faults), and pte neither mapped nor locked.
  * We return with mmap_sem still held, but pte unmapped and unlocked.
  */
 static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
-               unsigned long address, pte_t *page_table, pmd_t *pmd,
+               unsigned long address, pmd_t *pmd,
                pgoff_t pgoff, unsigned int flags, pte_t orig_pte)
 {
+       pte_t *page_table;
        spinlock_t *ptl;
        struct page *page;
        pte_t entry;
@@ -2321,13 +2325,13 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
        struct page *dirty_page = NULL;
        struct vm_fault vmf;
        int ret;
+       int page_mkwrite = 0;
 
        vmf.virtual_address = (void __user *)(address & PAGE_MASK);
        vmf.pgoff = pgoff;
        vmf.flags = flags;
        vmf.page = NULL;
 
-       pte_unmap(page_table);
        BUG_ON(vma->vm_flags & VM_PFNMAP);
 
        if (likely(vma->vm_ops->fault)) {
@@ -2398,6 +2402,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
                                        anon = 1; /* no anon but release vmf.page */
                                        goto out;
                                }
+                               page_mkwrite = 1;
                        }
                }
 
@@ -2453,7 +2458,7 @@ out_unlocked:
        if (anon)
                page_cache_release(vmf.page);
        else if (dirty_page) {
-               set_page_dirty_balance(dirty_page);
+               set_page_dirty_balance(dirty_page, page_mkwrite);
                put_page(dirty_page);
        }
 
@@ -2468,8 +2473,8 @@ static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
                        - vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff;
        unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0);
 
-       return __do_fault(mm, vma, address, page_table, pmd, pgoff,
-                                                       flags, orig_pte);
+       pte_unmap(page_table);
+       return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
 }
 
 
@@ -2552,9 +2557,7 @@ static int do_nonlinear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
        }
 
        pgoff = pte_to_pgoff(orig_pte);
-
-       return __do_fault(mm, vma, address, page_table, pmd, pgoff,
-                                                       flags, orig_pte);
+       return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
 }
 
 /*
index 63512a9ed57e7df17bec12f4dff1685f8944042a..44720363374cb24ca3e90cb48db64d99e5bbdb5b 100644 (file)
@@ -274,9 +274,9 @@ static void balance_dirty_pages(struct address_space *mapping)
                pdflush_operation(background_writeout, 0);
 }
 
-void set_page_dirty_balance(struct page *page)
+void set_page_dirty_balance(struct page *page, int page_mkwrite)
 {
-       if (set_page_dirty(page)) {
+       if (set_page_dirty(page) || page_mkwrite) {
                struct address_space *mapping = page_mapping(page);
 
                if (mapping)
index f2de2e48b021cc960417cd330f8e9a72a648cc5c..6284c99b456eeb7fc992ffd9063d28d609fdce0f 100644 (file)
@@ -366,6 +366,12 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
        frag = WLAN_GET_SEQ_FRAG(sc);
        hdrlen = ieee80211_get_hdrlen(fc);
 
+       if (skb->len < hdrlen) {
+               printk(KERN_INFO "%s: invalid SKB length %d\n",
+                       dev->name, skb->len);
+               goto rx_dropped;
+       }
+
        /* Put this code here so that we avoid duplicating it in all
         * Rx paths. - Jean II */
 #ifdef CONFIG_WIRELESS_EXT
index afb6c6698b279f84bbaf1e258e4de94d76e53fee..e475f2e1be1375e0125a6a51159833b70bbf6e4e 100644 (file)
@@ -273,8 +273,6 @@ ieee80211softmac_assoc_work(struct work_struct *work)
                        ieee80211softmac_notify(mac->dev, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, ieee80211softmac_assoc_notify_scan, NULL);
                        if (ieee80211softmac_start_scan(mac)) {
                                dprintk(KERN_INFO PFX "Associate: failed to initiate scan. Is device up?\n");
-                               mac->associnfo.associating = 0;
-                               mac->associnfo.associated = 0;
                        }
                        goto out;
                } else {
index d054e9224b3e270110790f08f540df208cbc0556..5742dc803b796af7423f36cf871ce60e74fe62fc 100644 (file)
@@ -70,44 +70,30 @@ ieee80211softmac_wx_set_essid(struct net_device *net_dev,
                              char *extra)
 {
        struct ieee80211softmac_device *sm = ieee80211_priv(net_dev);
-       struct ieee80211softmac_network *n;
        struct ieee80211softmac_auth_queue_item *authptr;
        int length = 0;
 
 check_assoc_again:
        mutex_lock(&sm->associnfo.mutex);
-       /* Check if we're already associating to this or another network
-        * If it's another network, cancel and start over with our new network
-        * If it's our network, ignore the change, we're already doing it!
-        */
        if((sm->associnfo.associating || sm->associnfo.associated) &&
           (data->essid.flags && data->essid.length)) {
-               /* Get the associating network */
-               n = ieee80211softmac_get_network_by_bssid(sm, sm->associnfo.bssid);
-               if(n && n->essid.len == data->essid.length &&
-                  !memcmp(n->essid.data, extra, n->essid.len)) {
-                       dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n",
-                               MAC_ARG(sm->associnfo.bssid));
-                       goto out;
-               } else {
-                       dprintk(KERN_INFO PFX "Canceling existing associate request!\n");
-                       /* Cancel assoc work */
-                       cancel_delayed_work(&sm->associnfo.work);
-                       /* We don't have to do this, but it's a little cleaner */
-                       list_for_each_entry(authptr, &sm->auth_queue, list)
-                               cancel_delayed_work(&authptr->work);
-                       sm->associnfo.bssvalid = 0;
-                       sm->associnfo.bssfixed = 0;
-                       sm->associnfo.associating = 0;
-                       sm->associnfo.associated = 0;
-                       /* We must unlock to avoid deadlocks with the assoc workqueue
-                        * on the associnfo.mutex */
-                       mutex_unlock(&sm->associnfo.mutex);
-                       flush_scheduled_work();
-                       /* Avoid race! Check assoc status again. Maybe someone started an
-                        * association while we flushed. */
-                       goto check_assoc_again;
-               }
+               dprintk(KERN_INFO PFX "Canceling existing associate request!\n");
+               /* Cancel assoc work */
+               cancel_delayed_work(&sm->associnfo.work);
+               /* We don't have to do this, but it's a little cleaner */
+               list_for_each_entry(authptr, &sm->auth_queue, list)
+                       cancel_delayed_work(&authptr->work);
+               sm->associnfo.bssvalid = 0;
+               sm->associnfo.bssfixed = 0;
+               sm->associnfo.associating = 0;
+               sm->associnfo.associated = 0;
+               /* We must unlock to avoid deadlocks with the assoc workqueue
+                * on the associnfo.mutex */
+               mutex_unlock(&sm->associnfo.mutex);
+               flush_scheduled_work();
+               /* Avoid race! Check assoc status again. Maybe someone started an
+                * association while we flushed. */
+               goto check_assoc_again;
        }
 
        sm->associnfo.static_essid = 0;
@@ -128,7 +114,7 @@ check_assoc_again:
        sm->associnfo.associating = 1;
        /* queue lower level code to do work (if necessary) */
        schedule_delayed_work(&sm->associnfo.work, 0);
-out:
+
        mutex_unlock(&sm->associnfo.mutex);
 
        return 0;
@@ -153,13 +139,13 @@ ieee80211softmac_wx_get_essid(struct net_device *net_dev,
                data->essid.length = sm->associnfo.req_essid.len;
                data->essid.flags = 1;  /* active */
                memcpy(extra, sm->associnfo.req_essid.data, sm->associnfo.req_essid.len);
-       }
-
+               dprintk(KERN_INFO PFX "Getting essid from req_essid\n");
+       } else if (sm->associnfo.associated || sm->associnfo.associating) {
        /* If we're associating/associated, return that */
-       if (sm->associnfo.associated || sm->associnfo.associating) {
                data->essid.length = sm->associnfo.associate_essid.len;
                data->essid.flags = 1;  /* active */
                memcpy(extra, sm->associnfo.associate_essid.data, sm->associnfo.associate_essid.len);
+               dprintk(KERN_INFO PFX "Getting essid from associate_essid\n");
        }
        mutex_unlock(&sm->associnfo.mutex);
 
index bbad2cdb74b7c18c0ae742be241857b126f06890..f893e90061ebfebe87ad359bd94c700db70b02d6 100644 (file)
@@ -2420,6 +2420,9 @@ static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb,
                        __u32 dval = min(tp->fackets_out, packets_acked);
                        tp->fackets_out -= dval;
                }
+               /* hint's skb might be NULL but we don't need to care */
+               tp->fastpath_cnt_hint -= min_t(u32, packets_acked,
+                                              tp->fastpath_cnt_hint);
                tp->packets_out -= packets_acked;
 
                BUG_ON(tcp_skb_pcount(skb) == 0);
index 9c94627c8c7e1888c3369f42fde366efbbe6d929..e089a978e128057e8b7bc245beaa3aad81be12a0 100644 (file)
@@ -833,8 +833,7 @@ static struct tcp_md5sig_key *
                return NULL;
        for (i = 0; i < tp->md5sig_info->entries4; i++) {
                if (tp->md5sig_info->keys4[i].addr == addr)
-                       return (struct tcp_md5sig_key *)
-                                               &tp->md5sig_info->keys4[i];
+                       return &tp->md5sig_info->keys4[i].base;
        }
        return NULL;
 }
@@ -865,9 +864,9 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
        key = (struct tcp4_md5sig_key *)tcp_v4_md5_do_lookup(sk, addr);
        if (key) {
                /* Pre-existing entry - just update that one. */
-               kfree(key->key);
-               key->key = newkey;
-               key->keylen = newkeylen;
+               kfree(key->base.key);
+               key->base.key = newkey;
+               key->base.keylen = newkeylen;
        } else {
                struct tcp_md5sig_info *md5sig;
 
@@ -906,9 +905,9 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
                        md5sig->alloced4++;
                }
                md5sig->entries4++;
-               md5sig->keys4[md5sig->entries4 - 1].addr   = addr;
-               md5sig->keys4[md5sig->entries4 - 1].key    = newkey;
-               md5sig->keys4[md5sig->entries4 - 1].keylen = newkeylen;
+               md5sig->keys4[md5sig->entries4 - 1].addr        = addr;
+               md5sig->keys4[md5sig->entries4 - 1].base.key    = newkey;
+               md5sig->keys4[md5sig->entries4 - 1].base.keylen = newkeylen;
        }
        return 0;
 }
@@ -930,7 +929,7 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr)
        for (i = 0; i < tp->md5sig_info->entries4; i++) {
                if (tp->md5sig_info->keys4[i].addr == addr) {
                        /* Free the key */
-                       kfree(tp->md5sig_info->keys4[i].key);
+                       kfree(tp->md5sig_info->keys4[i].base.key);
                        tp->md5sig_info->entries4--;
 
                        if (tp->md5sig_info->entries4 == 0) {
@@ -964,7 +963,7 @@ static void tcp_v4_clear_md5_list(struct sock *sk)
        if (tp->md5sig_info->entries4) {
                int i;
                for (i = 0; i < tp->md5sig_info->entries4; i++)
-                       kfree(tp->md5sig_info->keys4[i].key);
+                       kfree(tp->md5sig_info->keys4[i].base.key);
                tp->md5sig_info->entries4 = 0;
                tcp_free_md5sig_pool();
        }
index 73a894a2152ca003b9c3de5bed0b8412d8aa42d7..5b596659177cbbd8bd5e6c2db62b803af4ca1817 100644 (file)
@@ -1268,9 +1268,10 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
 
        if (ipv6_addr_equal(dest, target)) {
                on_link = 1;
-       } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
+       } else if (ipv6_addr_type(target) !=
+                  (IPV6_ADDR_UNICAST|IPV6_ADDR_LINKLOCAL)) {
                ND_PRINTK2(KERN_WARNING
-                          "ICMPv6 Redirect: target address is not link-local.\n");
+                          "ICMPv6 Redirect: target address is not link-local unicast.\n");
                return;
        }
 
@@ -1344,9 +1345,9 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
        }
 
        if (!ipv6_addr_equal(&ipv6_hdr(skb)->daddr, target) &&
-           !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
+           ipv6_addr_type(target) != (IPV6_ADDR_UNICAST|IPV6_ADDR_LINKLOCAL)) {
                ND_PRINTK2(KERN_WARNING
-                       "ICMPv6 Redirect: target address is not link-local.\n");
+                       "ICMPv6 Redirect: target address is not link-local unicast.\n");
                return;
        }
 
index 0f7defb482e9bf18411eef3d1911d922b6dbda1d..3e06799b37a65248047f050072b6208dacdca336 100644 (file)
@@ -539,7 +539,7 @@ static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(struct sock *sk,
 
        for (i = 0; i < tp->md5sig_info->entries6; i++) {
                if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, addr) == 0)
-                       return (struct tcp_md5sig_key *)&tp->md5sig_info->keys6[i];
+                       return &tp->md5sig_info->keys6[i].base;
        }
        return NULL;
 }
@@ -567,9 +567,9 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
        key = (struct tcp6_md5sig_key*) tcp_v6_md5_do_lookup(sk, peer);
        if (key) {
                /* modify existing entry - just update that one */
-               kfree(key->key);
-               key->key = newkey;
-               key->keylen = newkeylen;
+               kfree(key->base.key);
+               key->base.key = newkey;
+               key->base.keylen = newkeylen;
        } else {
                /* reallocate new list if current one is full. */
                if (!tp->md5sig_info) {
@@ -603,8 +603,8 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
 
                ipv6_addr_copy(&tp->md5sig_info->keys6[tp->md5sig_info->entries6].addr,
                               peer);
-               tp->md5sig_info->keys6[tp->md5sig_info->entries6].key = newkey;
-               tp->md5sig_info->keys6[tp->md5sig_info->entries6].keylen = newkeylen;
+               tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.key = newkey;
+               tp->md5sig_info->keys6[tp->md5sig_info->entries6].base.keylen = newkeylen;
 
                tp->md5sig_info->entries6++;
        }
@@ -626,7 +626,7 @@ static int tcp_v6_md5_do_del(struct sock *sk, struct in6_addr *peer)
        for (i = 0; i < tp->md5sig_info->entries6; i++) {
                if (ipv6_addr_cmp(&tp->md5sig_info->keys6[i].addr, peer) == 0) {
                        /* Free the key */
-                       kfree(tp->md5sig_info->keys6[i].key);
+                       kfree(tp->md5sig_info->keys6[i].base.key);
                        tp->md5sig_info->entries6--;
 
                        if (tp->md5sig_info->entries6 == 0) {
@@ -657,7 +657,7 @@ static void tcp_v6_clear_md5_list (struct sock *sk)
 
        if (tp->md5sig_info->entries6) {
                for (i = 0; i < tp->md5sig_info->entries6; i++)
-                       kfree(tp->md5sig_info->keys6[i].key);
+                       kfree(tp->md5sig_info->keys6[i].base.key);
                tp->md5sig_info->entries6 = 0;
                tcp_free_md5sig_pool();
        }
@@ -668,7 +668,7 @@ static void tcp_v6_clear_md5_list (struct sock *sk)
 
        if (tp->md5sig_info->entries4) {
                for (i = 0; i < tp->md5sig_info->entries4; i++)
-                       kfree(tp->md5sig_info->keys4[i].key);
+                       kfree(tp->md5sig_info->keys4[i].base.key);
                tp->md5sig_info->entries4 = 0;
                tcp_free_md5sig_pool();
        }
index 7286c389a4d0ccd418a1d953e3dd921b179a9730..ff2172ffd8611758ba00efa2abc349892ca11015 100644 (file)
@@ -5259,7 +5259,7 @@ static void __exit ieee80211_exit(void)
 }
 
 
-module_init(ieee80211_init);
+subsys_initcall(ieee80211_init);
 module_exit(ieee80211_exit);
 
 MODULE_DESCRIPTION("IEEE 802.11 subsystem");
index f6780d63b34279e672b96cb0cf6400e37f770f5d..17b9f46bbf2bb6dd912c1b11e1d3b1891ee1208f 100644 (file)
@@ -431,7 +431,7 @@ static void __exit rate_control_simple_exit(void)
 }
 
 
-module_init(rate_control_simple_init);
+subsys_initcall(rate_control_simple_init);
 module_exit(rate_control_simple_exit);
 
 MODULE_DESCRIPTION("Simple rate control algorithm for ieee80211");
index 89ce815296942651885fb6ec68949f082e9ca410..7ab82b376e1bc92f8d656bfa30f7a3cf4b2b1152 100644 (file)
@@ -424,7 +424,7 @@ static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt)
                skb_queue_head_init(&q->requeued[i]);
                q->queues[i] = qdisc_create_dflt(qd->dev, &pfifo_qdisc_ops,
                                                 qd->handle);
-               if (q->queues[i] == 0) {
+               if (!q->queues[i]) {
                        q->queues[i] = &noop_qdisc;
                        printk(KERN_ERR "%s child qdisc %i creation failed", dev->name, i);
                }
index cd01642f0491ae01f57e86ba6868bc13172eec9a..114df6eec8c3a7d1a7b0f6321eecca3f6afc3e63 100644 (file)
@@ -79,7 +79,7 @@ static void rose_loopback_timer(unsigned long param)
 
                skb_reset_transport_header(skb);
 
-               sk = rose_find_socket(lci_o, &rose_loopback_neigh);
+               sk = rose_find_socket(lci_o, rose_loopback_neigh);
                if (sk) {
                        if (rose_process_rx_frame(sk, skb) == 0)
                                kfree_skb(skb);
@@ -88,7 +88,7 @@ static void rose_loopback_timer(unsigned long param)
 
                if (frametype == ROSE_CALL_REQUEST) {
                        if ((dev = rose_dev_get(dest)) != NULL) {
-                               if (rose_rx_call_request(skb, dev, &rose_loopback_neigh, lci_o) == 0)
+                               if (rose_rx_call_request(skb, dev, rose_loopback_neigh, lci_o) == 0)
                                        kfree_skb(skb);
                        } else {
                                kfree_skb(skb);
index bbcbad1da0d0facf25941e74a703bde898d941cd..96f61a71b2527da33c900acf34c92e9fa014b055 100644 (file)
@@ -45,7 +45,7 @@ static DEFINE_SPINLOCK(rose_neigh_list_lock);
 static struct rose_route *rose_route_list;
 static DEFINE_SPINLOCK(rose_route_list_lock);
 
-struct rose_neigh rose_loopback_neigh;
+struct rose_neigh *rose_loopback_neigh;
 
 /*
  *     Add a new route to a node, and in the process add the node and the
@@ -362,7 +362,12 @@ out:
  */
 void rose_add_loopback_neigh(void)
 {
-       struct rose_neigh *sn = &rose_loopback_neigh;
+       struct rose_neigh *sn;
+
+       rose_loopback_neigh = kmalloc(sizeof(struct rose_neigh), GFP_KERNEL);
+       if (!rose_loopback_neigh)
+               return;
+       sn = rose_loopback_neigh;
 
        sn->callsign  = null_ax25_address;
        sn->digipeat  = NULL;
@@ -417,13 +422,13 @@ int rose_add_loopback_node(rose_address *address)
        rose_node->mask         = 10;
        rose_node->count        = 1;
        rose_node->loopback     = 1;
-       rose_node->neighbour[0] = &rose_loopback_neigh;
+       rose_node->neighbour[0] = rose_loopback_neigh;
 
        /* Insert at the head of list. Address is always mask=10 */
        rose_node->next = rose_node_list;
        rose_node_list  = rose_node;
 
-       rose_loopback_neigh.count++;
+       rose_loopback_neigh->count++;
 
 out:
        spin_unlock_bh(&rose_node_list_lock);
@@ -454,7 +459,7 @@ void rose_del_loopback_node(rose_address *address)
 
        rose_remove_node(rose_node);
 
-       rose_loopback_neigh.count--;
+       rose_loopback_neigh->count--;
 
 out:
        spin_unlock_bh(&rose_node_list_lock);
index 8dbe36912ecb226c370184d4d40b88b77163fa46..d4d5d2f271d2f77f17fc7dbfd605cbbe3ab14f5a 100644 (file)
@@ -502,7 +502,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base,
 
 #ifdef CONFIG_NET_CLS_IND
        if (tb[TCA_U32_INDEV-1]) {
-               int err = tcf_change_indev(tp, n->indev, tb[TCA_U32_INDEV-1]);
+               err = tcf_change_indev(tp, n->indev, tb[TCA_U32_INDEV-1]);
                if (err < 0)
                        goto errout;
        }
index 3a23e30bc79e3689dc1f16fc9c16d0d76f820865..b542c875e154411cfaaf3d78abe443d9e5e4931d 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/ipv6.h>
 #include <linux/skbuff.h>
+#include <linux/jhash.h>
 #include <net/ip.h>
 #include <net/netlink.h>
 #include <net/pkt_sched.h>
@@ -95,7 +96,7 @@ struct sfq_sched_data
 
 /* Variables */
        struct timer_list perturb_timer;
-       int             perturbation;
+       u32             perturbation;
        sfq_index       tail;           /* Index of current slot in round */
        sfq_index       max_depth;      /* Maximal depth */
 
@@ -109,12 +110,7 @@ struct sfq_sched_data
 
 static __inline__ unsigned sfq_fold_hash(struct sfq_sched_data *q, u32 h, u32 h1)
 {
-       int pert = q->perturbation;
-
-       /* Have we any rotation primitives? If not, WHY? */
-       h ^= (h1<<pert) ^ (h1>>(0x1F - pert));
-       h ^= h>>10;
-       return h & 0x3FF;
+       return jhash_2words(h, h1, q->perturbation) & (SFQ_HASH_DIVISOR - 1);
 }
 
 static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
@@ -256,6 +252,13 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch)
                q->ht[hash] = x = q->dep[SFQ_DEPTH].next;
                q->hash[x] = hash;
        }
+       /* If selected queue has length q->limit, this means that
+        * all another queues are empty and that we do simple tail drop,
+        * i.e. drop _this_ packet.
+        */
+       if (q->qs[x].qlen >= q->limit)
+               return qdisc_drop(skb, sch);
+
        sch->qstats.backlog += skb->len;
        __skb_queue_tail(&q->qs[x], skb);
        sfq_inc(q, x);
@@ -294,6 +297,19 @@ sfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
        }
        sch->qstats.backlog += skb->len;
        __skb_queue_head(&q->qs[x], skb);
+       /* If selected queue has length q->limit+1, this means that
+        * all another queues are empty and we do simple tail drop.
+        * This packet is still requeued at head of queue, tail packet
+        * is dropped.
+        */
+       if (q->qs[x].qlen > q->limit) {
+               skb = q->qs[x].prev;
+               __skb_unlink(skb, &q->qs[x]);
+               sch->qstats.drops++;
+               sch->qstats.backlog -= skb->len;
+               kfree_skb(skb);
+               return NET_XMIT_CN;
+       }
        sfq_inc(q, x);
        if (q->qs[x].qlen == 1) {               /* The flow is new */
                if (q->tail == SFQ_DEPTH) {     /* It is the first flow */
@@ -370,12 +386,10 @@ static void sfq_perturbation(unsigned long arg)
        struct Qdisc *sch = (struct Qdisc*)arg;
        struct sfq_sched_data *q = qdisc_priv(sch);
 
-       q->perturbation = net_random()&0x1F;
+       get_random_bytes(&q->perturbation, 4);
 
-       if (q->perturb_period) {
-               q->perturb_timer.expires = jiffies + q->perturb_period;
-               add_timer(&q->perturb_timer);
-       }
+       if (q->perturb_period)
+               mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
 }
 
 static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
@@ -391,7 +405,7 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
        q->quantum = ctl->quantum ? : psched_mtu(sch->dev);
        q->perturb_period = ctl->perturb_period*HZ;
        if (ctl->limit)
-               q->limit = min_t(u32, ctl->limit, SFQ_DEPTH - 2);
+               q->limit = min_t(u32, ctl->limit, SFQ_DEPTH - 1);
 
        qlen = sch->q.qlen;
        while (sch->q.qlen > q->limit)
@@ -400,8 +414,8 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
 
        del_timer(&q->perturb_timer);
        if (q->perturb_period) {
-               q->perturb_timer.expires = jiffies + q->perturb_period;
-               add_timer(&q->perturb_timer);
+               mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
+               get_random_bytes(&q->perturbation, 4);
        }
        sch_tree_unlock(sch);
        return 0;
@@ -423,12 +437,13 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt)
                q->dep[i+SFQ_DEPTH].next = i+SFQ_DEPTH;
                q->dep[i+SFQ_DEPTH].prev = i+SFQ_DEPTH;
        }
-       q->limit = SFQ_DEPTH - 2;
+       q->limit = SFQ_DEPTH - 1;
        q->max_depth = 0;
        q->tail = SFQ_DEPTH;
        if (opt == NULL) {
                q->quantum = psched_mtu(sch->dev);
                q->perturb_period = 0;
+               get_random_bytes(&q->perturbation, 4);
        } else {
                int err = sfq_change(sch, opt);
                if (err)
index d35cbf5aae33de7b56348cc235e532f69043caba..dfffa94fb9f636366616ca3e349ffcfee746f5cb 100644 (file)
@@ -181,7 +181,7 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new,
  * structure.
  */
 int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr,
-                       void (*rcu_call)(struct rcu_head *head,
+                       void fastcall (*rcu_call)(struct rcu_head *head,
                                         void (*func)(struct rcu_head *head)))
 {
        struct sctp_sockaddr_entry *addr, *temp;
index 47e56017f4ce887716e0dee8a4ba87d3ece37ac9..f9a0c9276e3b55f8c1497beacba30c8426ae0d28 100644 (file)
@@ -622,6 +622,14 @@ static int sctp_rcv_ootb(struct sk_buff *skb)
                if (SCTP_CID_SHUTDOWN_COMPLETE == ch->type)
                        goto discard;
 
+               /* RFC 4460, 2.11.2
+                * This will discard packets with INIT chunk bundled as
+                * subsequent chunks in the packet.  When INIT is first,
+                * the normal INIT processing will discard the chunk.
+                */
+               if (SCTP_CID_INIT == ch->type && (void *)ch != skb->data)
+                       goto discard;
+
                /* RFC 8.4, 7) If the packet contains a "Stale cookie" ERROR
                 * or a COOKIE ACK the SCTP Packet should be silently
                 * discarded.
index 88aa2240754935522962a001088286516a8f8011..e4ea7fdf36ed798c23d3b2dfb6e3f2a0e54e893b 100644 (file)
@@ -130,6 +130,14 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)
                        /* Force chunk->skb->data to chunk->chunk_end.  */
                        skb_pull(chunk->skb,
                                 chunk->chunk_end - chunk->skb->data);
+
+                       /* Verify that we have at least chunk headers
+                        * worth of buffer left.
+                        */
+                       if (skb_headlen(chunk->skb) < sizeof(sctp_chunkhdr_t)) {
+                               sctp_chunk_free(chunk);
+                               chunk = queue->in_progress = NULL;
+                       }
                }
        }
 
index 2e34220d94cde899fffb551091305eddf9323b7c..23ae37ec871167d17c37ddbdbb9d4095e26a4575 100644 (file)
@@ -2499,6 +2499,52 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
        return SCTP_ERROR_NO_ERROR;
 }
 
+/* Verify the ASCONF packet before we process it.  */
+int sctp_verify_asconf(const struct sctp_association *asoc,
+                      struct sctp_paramhdr *param_hdr, void *chunk_end,
+                      struct sctp_paramhdr **errp) {
+       sctp_addip_param_t *asconf_param;
+       union sctp_params param;
+       int length, plen;
+
+       param.v = (sctp_paramhdr_t *) param_hdr;
+       while (param.v <= chunk_end - sizeof(sctp_paramhdr_t)) {
+               length = ntohs(param.p->length);
+               *errp = param.p;
+
+               if (param.v > chunk_end - length ||
+                   length < sizeof(sctp_paramhdr_t))
+                       return 0;
+
+               switch (param.p->type) {
+               case SCTP_PARAM_ADD_IP:
+               case SCTP_PARAM_DEL_IP:
+               case SCTP_PARAM_SET_PRIMARY:
+                       asconf_param = (sctp_addip_param_t *)param.v;
+                       plen = ntohs(asconf_param->param_hdr.length);
+                       if (plen < sizeof(sctp_addip_param_t) +
+                           sizeof(sctp_paramhdr_t))
+                               return 0;
+                       break;
+               case SCTP_PARAM_SUCCESS_REPORT:
+               case SCTP_PARAM_ADAPTATION_LAYER_IND:
+                       if (length != sizeof(sctp_addip_param_t))
+                               return 0;
+
+                       break;
+               default:
+                       break;
+               }
+
+               param.v += WORD_ROUND(length);
+       }
+
+       if (param.v != chunk_end)
+               return 0;
+
+       return 1;
+}
+
 /* Process an incoming ASCONF chunk with the next expected serial no. and
  * return an ASCONF_ACK chunk to be sent in response.
  */
index 177528ed3e1b1d9f50ea2c9be844d5a5d0553187..a583d67cab63859439c5a38fb54133afc406a401 100644 (file)
@@ -90,6 +90,11 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(const struct sctp_endpoint *ep,
                                             const sctp_subtype_t type,
                                             void *arg,
                                             sctp_cmd_seq_t *commands);
+static sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
+                                       const struct sctp_association *asoc,
+                                       const sctp_subtype_t type,
+                                       void *arg,
+                                       sctp_cmd_seq_t *commands);
 static struct sctp_sackhdr *sctp_sm_pull_sack(struct sctp_chunk *chunk);
 
 static sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
@@ -98,6 +103,7 @@ static sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
                                           struct sctp_transport *transport);
 
 static sctp_disposition_t sctp_sf_abort_violation(
+                                    const struct sctp_endpoint *ep,
                                     const struct sctp_association *asoc,
                                     void *arg,
                                     sctp_cmd_seq_t *commands,
@@ -111,6 +117,13 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
                                     void *arg,
                                     sctp_cmd_seq_t *commands);
 
+static sctp_disposition_t sctp_sf_violation_paramlen(
+                                    const struct sctp_endpoint *ep,
+                                    const struct sctp_association *asoc,
+                                    const sctp_subtype_t type,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands);
+
 static sctp_disposition_t sctp_sf_violation_ctsn(
                                     const struct sctp_endpoint *ep,
                                     const struct sctp_association *asoc,
@@ -118,6 +131,13 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
                                     void *arg,
                                     sctp_cmd_seq_t *commands);
 
+static sctp_disposition_t sctp_sf_violation_chunk(
+                                    const struct sctp_endpoint *ep,
+                                    const struct sctp_association *asoc,
+                                    const sctp_subtype_t type,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands);
+
 /* Small helper function that checks if the chunk length
  * is of the appropriate length.  The 'required_length' argument
  * is set to be the size of a specific chunk we are testing.
@@ -181,16 +201,21 @@ sctp_disposition_t sctp_sf_do_4_C(const struct sctp_endpoint *ep,
        struct sctp_chunk *chunk = arg;
        struct sctp_ulpevent *ev;
 
+       if (!sctp_vtag_verify_either(chunk, asoc))
+               return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
+
        /* RFC 2960 6.10 Bundling
         *
         * An endpoint MUST NOT bundle INIT, INIT ACK or
         * SHUTDOWN COMPLETE with any other chunks.
         */
        if (!chunk->singleton)
-               return SCTP_DISPOSITION_VIOLATION;
+               return sctp_sf_violation_chunk(ep, asoc, type, arg, commands);
 
-       if (!sctp_vtag_verify_either(chunk, asoc))
-               return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
+       /* Make sure that the SHUTDOWN_COMPLETE chunk has a valid length. */
+       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
+               return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
 
        /* RFC 2960 10.2 SCTP-to-ULP
         *
@@ -450,17 +475,17 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
        if (!sctp_vtag_verify(chunk, asoc))
                return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
 
-       /* Make sure that the INIT-ACK chunk has a valid length */
-       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_initack_chunk_t)))
-               return sctp_sf_violation_chunklen(ep, asoc, type, arg,
-                                                 commands);
        /* 6.10 Bundling
         * An endpoint MUST NOT bundle INIT, INIT ACK or
         * SHUTDOWN COMPLETE with any other chunks.
         */
        if (!chunk->singleton)
-               return SCTP_DISPOSITION_VIOLATION;
+               return sctp_sf_violation_chunk(ep, asoc, type, arg, commands);
 
+       /* Make sure that the INIT-ACK chunk has a valid length */
+       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_initack_chunk_t)))
+               return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
        /* Grab the INIT header.  */
        chunk->subh.init_hdr = (sctp_inithdr_t *) chunk->skb->data;
 
@@ -585,7 +610,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
         * control endpoint, respond with an ABORT.
         */
        if (ep == sctp_sk((sctp_get_ctl_sock()))->ep)
-               return sctp_sf_ootb(ep, asoc, type, arg, commands);
+               return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
 
        /* Make sure that the COOKIE_ECHO chunk has a valid length.
         * In this case, we check that we have enough for at least a
@@ -2496,6 +2521,11 @@ sctp_disposition_t sctp_sf_do_9_2_reshutack(const struct sctp_endpoint *ep,
        struct sctp_chunk *chunk = (struct sctp_chunk *) arg;
        struct sctp_chunk *reply;
 
+       /* Make sure that the chunk has a valid length */
+       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
+               return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
+
        /* Since we are not going to really process this INIT, there
         * is no point in verifying chunk boundries.  Just generate
         * the SHUTDOWN ACK.
@@ -2929,7 +2959,7 @@ sctp_disposition_t sctp_sf_eat_sack_6_2(const struct sctp_endpoint *ep,
  *
  * The return value is the disposition of the chunk.
 */
-sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
+static sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
                                        const struct sctp_association *asoc,
                                        const sctp_subtype_t type,
                                        void *arg,
@@ -2965,6 +2995,7 @@ sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
 
                SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
 
+               sctp_sf_pdiscard(ep, asoc, type, arg, commands);
                return SCTP_DISPOSITION_CONSUME;
        }
 
@@ -3125,14 +3156,14 @@ sctp_disposition_t sctp_sf_ootb(const struct sctp_endpoint *ep,
 
        ch = (sctp_chunkhdr_t *) chunk->chunk_hdr;
        do {
-               /* Break out if chunk length is less then minimal. */
+               /* Report violation if the chunk is less then minimal */
                if (ntohs(ch->length) < sizeof(sctp_chunkhdr_t))
-                       break;
-
-               ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
-               if (ch_end > skb_tail_pointer(skb))
-                       break;
+                       return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
 
+               /* Now that we know we at least have a chunk header,
+                * do things that are type appropriate.
+                */
                if (SCTP_CID_SHUTDOWN_ACK == ch->type)
                        ootb_shut_ack = 1;
 
@@ -3144,15 +3175,19 @@ sctp_disposition_t sctp_sf_ootb(const struct sctp_endpoint *ep,
                if (SCTP_CID_ABORT == ch->type)
                        return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
 
+               /* Report violation if chunk len overflows */
+               ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
+               if (ch_end > skb_tail_pointer(skb))
+                       return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
+
                ch = (sctp_chunkhdr_t *) ch_end;
        } while (ch_end < skb_tail_pointer(skb));
 
        if (ootb_shut_ack)
-               sctp_sf_shut_8_4_5(ep, asoc, type, arg, commands);
+               return sctp_sf_shut_8_4_5(ep, asoc, type, arg, commands);
        else
-               sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
-
-       return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
+               return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
 }
 
 /*
@@ -3218,7 +3253,11 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(const struct sctp_endpoint *ep,
                if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
                        return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
 
-               return SCTP_DISPOSITION_CONSUME;
+               /* We need to discard the rest of the packet to prevent
+                * potential bomming attacks from additional bundled chunks.
+                * This is documented in SCTP Threats ID.
+                */
+               return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
        }
 
        return SCTP_DISPOSITION_NOMEM;
@@ -3241,6 +3280,13 @@ sctp_disposition_t sctp_sf_do_8_5_1_E_sa(const struct sctp_endpoint *ep,
                                      void *arg,
                                      sctp_cmd_seq_t *commands)
 {
+       struct sctp_chunk *chunk = arg;
+
+       /* Make sure that the SHUTDOWN_ACK chunk has a valid length. */
+       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
+               return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
+
        /* Although we do have an association in this case, it corresponds
         * to a restarted association. So the packet is treated as an OOTB
         * packet and the state function that handles OOTB SHUTDOWN_ACK is
@@ -3257,8 +3303,11 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
 {
        struct sctp_chunk       *chunk = arg;
        struct sctp_chunk       *asconf_ack = NULL;
+       struct sctp_paramhdr    *err_param = NULL;
        sctp_addiphdr_t         *hdr;
+       union sctp_addr_param   *addr_param;
        __u32                   serial;
+       int                     length;
 
        if (!sctp_vtag_verify(chunk, asoc)) {
                sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG,
@@ -3274,6 +3323,20 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
        hdr = (sctp_addiphdr_t *)chunk->skb->data;
        serial = ntohl(hdr->serial);
 
+       addr_param = (union sctp_addr_param *)hdr->params;
+       length = ntohs(addr_param->p.length);
+       if (length < sizeof(sctp_paramhdr_t))
+               return sctp_sf_violation_paramlen(ep, asoc, type,
+                          (void *)addr_param, commands);
+
+       /* Verify the ASCONF chunk before processing it. */
+       if (!sctp_verify_asconf(asoc,
+           (sctp_paramhdr_t *)((void *)addr_param + length),
+           (void *)chunk->chunk_end,
+           &err_param))
+               return sctp_sf_violation_paramlen(ep, asoc, type,
+                          (void *)&err_param, commands);
+
        /* ADDIP 4.2 C1) Compare the value of the serial number to the value
         * the endpoint stored in a new association variable
         * 'Peer-Serial-Number'.
@@ -3328,6 +3391,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
        struct sctp_chunk       *asconf_ack = arg;
        struct sctp_chunk       *last_asconf = asoc->addip_last_asconf;
        struct sctp_chunk       *abort;
+       struct sctp_paramhdr    *err_param = NULL;
        sctp_addiphdr_t         *addip_hdr;
        __u32                   sent_serial, rcvd_serial;
 
@@ -3345,6 +3409,14 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
        addip_hdr = (sctp_addiphdr_t *)asconf_ack->skb->data;
        rcvd_serial = ntohl(addip_hdr->serial);
 
+       /* Verify the ASCONF-ACK chunk before processing it. */
+       if (!sctp_verify_asconf(asoc,
+           (sctp_paramhdr_t *)addip_hdr->params,
+           (void *)asconf_ack->chunk_end,
+           &err_param))
+               return sctp_sf_violation_paramlen(ep, asoc, type,
+                          (void *)&err_param, commands);
+
        if (last_asconf) {
                addip_hdr = (sctp_addiphdr_t *)last_asconf->subh.addip_hdr;
                sent_serial = ntohl(addip_hdr->serial);
@@ -3655,6 +3727,16 @@ sctp_disposition_t sctp_sf_discard_chunk(const struct sctp_endpoint *ep,
                                         void *arg,
                                         sctp_cmd_seq_t *commands)
 {
+       struct sctp_chunk *chunk = arg;
+
+       /* Make sure that the chunk has a valid length.
+        * Since we don't know the chunk type, we use a general
+        * chunkhdr structure to make a comparison.
+        */
+       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
+               return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
+
        SCTP_DEBUG_PRINTK("Chunk %d is discarded\n", type.chunk);
        return SCTP_DISPOSITION_DISCARD;
 }
@@ -3710,6 +3792,13 @@ sctp_disposition_t sctp_sf_violation(const struct sctp_endpoint *ep,
                                     void *arg,
                                     sctp_cmd_seq_t *commands)
 {
+       struct sctp_chunk *chunk = arg;
+
+       /* Make sure that the chunk has a valid length. */
+       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_chunkhdr_t)))
+               return sctp_sf_violation_chunklen(ep, asoc, type, arg,
+                                                 commands);
+
        return SCTP_DISPOSITION_VIOLATION;
 }
 
@@ -3717,12 +3806,14 @@ sctp_disposition_t sctp_sf_violation(const struct sctp_endpoint *ep,
  * Common function to handle a protocol violation.
  */
 static sctp_disposition_t sctp_sf_abort_violation(
+                                    const struct sctp_endpoint *ep,
                                     const struct sctp_association *asoc,
                                     void *arg,
                                     sctp_cmd_seq_t *commands,
                                     const __u8 *payload,
                                     const size_t paylen)
 {
+       struct sctp_packet *packet = NULL;
        struct sctp_chunk *chunk =  arg;
        struct sctp_chunk *abort = NULL;
 
@@ -3731,30 +3822,51 @@ static sctp_disposition_t sctp_sf_abort_violation(
        if (!abort)
                goto nomem;
 
-       sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
-       SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
+       if (asoc) {
+               sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
+               SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
 
-       if (asoc->state <= SCTP_STATE_COOKIE_ECHOED) {
-               sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,
-                               SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT));
-               sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
-                               SCTP_ERROR(ECONNREFUSED));
-               sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
-                               SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
+               if (asoc->state <= SCTP_STATE_COOKIE_ECHOED) {
+                       sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,
+                                       SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT));
+                       sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
+                                       SCTP_ERROR(ECONNREFUSED));
+                       sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
+                                       SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
+               } else {
+                       sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
+                                       SCTP_ERROR(ECONNABORTED));
+                       sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
+                                       SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
+                       SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
+               }
        } else {
-               sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
-                               SCTP_ERROR(ECONNABORTED));
-               sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
-                               SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
-               SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
+               packet = sctp_ootb_pkt_new(asoc, chunk);
+
+               if (!packet)
+                       goto nomem_pkt;
+
+               if (sctp_test_T_bit(abort))
+                       packet->vtag = ntohl(chunk->sctp_hdr->vtag);
+
+               abort->skb->sk = ep->base.sk;
+
+               sctp_packet_append_chunk(packet, abort);
+
+               sctp_add_cmd_sf(commands, SCTP_CMD_SEND_PKT,
+                       SCTP_PACKET(packet));
+
+               SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
        }
 
-       sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET, SCTP_NULL());
+       sctp_sf_pdiscard(ep, asoc, SCTP_ST_CHUNK(0), arg, commands);
 
        SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
 
        return SCTP_DISPOSITION_ABORT;
 
+nomem_pkt:
+       sctp_chunk_free(abort);
 nomem:
        return SCTP_DISPOSITION_NOMEM;
 }
@@ -3787,7 +3899,24 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
 {
        char err_str[]="The following chunk had invalid length:";
 
-       return sctp_sf_abort_violation(asoc, arg, commands, err_str,
+       return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
+                                       sizeof(err_str));
+}
+
+/*
+ * Handle a protocol violation when the parameter length is invalid.
+ * "Invalid" length is identified as smaller then the minimal length a
+ * given parameter can be.
+ */
+static sctp_disposition_t sctp_sf_violation_paramlen(
+                                    const struct sctp_endpoint *ep,
+                                    const struct sctp_association *asoc,
+                                    const sctp_subtype_t type,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands) {
+       char err_str[] = "The following parameter had invalid length:";
+
+       return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
                                        sizeof(err_str));
 }
 
@@ -3806,10 +3935,31 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
 {
        char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:";
 
-       return sctp_sf_abort_violation(asoc, arg, commands, err_str,
+       return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
                                        sizeof(err_str));
 }
 
+/* Handle protocol violation of an invalid chunk bundling.  For example,
+ * when we have an association and we recieve bundled INIT-ACK, or
+ * SHUDOWN-COMPLETE, our peer is clearly violationg the "MUST NOT bundle"
+ * statement from the specs.  Additinally, there might be an attacker
+ * on the path and we may not want to continue this communication.
+ */
+static sctp_disposition_t sctp_sf_violation_chunk(
+                                    const struct sctp_endpoint *ep,
+                                    const struct sctp_association *asoc,
+                                    const sctp_subtype_t type,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands)
+{
+       char err_str[]="The following chunk violates protocol:";
+
+       if (!asoc)
+               return sctp_sf_violation(ep, asoc, type, arg, commands);
+
+       return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
+                                       sizeof(err_str));
+}
 /***************************************************************************
  * These are the state functions for handling primitive (Section 10) events.
  ***************************************************************************/
@@ -5176,7 +5326,22 @@ static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc
         * association exists, otherwise, use the peer's vtag.
         */
        if (asoc) {
-               vtag = asoc->peer.i.init_tag;
+               /* Special case the INIT-ACK as there is no peer's vtag
+                * yet.
+                */
+               switch(chunk->chunk_hdr->type) {
+               case SCTP_CID_INIT_ACK:
+               {
+                       sctp_initack_chunk_t *initack;
+
+                       initack = (sctp_initack_chunk_t *)chunk->chunk_hdr;
+                       vtag = ntohl(initack->init_hdr.init_tag);
+                       break;
+               }
+               default:
+                       vtag = asoc->peer.i.init_tag;
+                       break;
+               }
        } else {
                /* Special case the INIT and stale COOKIE_ECHO as there is no
                 * vtag yet.
index 70a91ece3c49444de91b41b7db7f4b486a16e7de..ddb0ba3974b05a31807c8652f97ad9a2cfc10fcf 100644 (file)
@@ -110,7 +110,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
        /* SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
+       TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -173,7 +173,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
        /*  SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
+       TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -194,7 +194,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
        /*  SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
+       TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -216,7 +216,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
        /*  SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
+       TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_violation), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -258,7 +258,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
        /* SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
+       TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -300,7 +300,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
        /* SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
+       TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -499,7 +499,7 @@ static const sctp_sm_table_entry_t addip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_
        /* SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
+       TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
@@ -528,7 +528,7 @@ chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = {
        /* SCTP_STATE_EMPTY */
        TYPE_SCTP_FUNC(sctp_sf_ootb),
        /* SCTP_STATE_CLOSED */
-       TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8),
+       TYPE_SCTP_FUNC(sctp_sf_ootb),
        /* SCTP_STATE_COOKIE_WAIT */
        TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
        /* SCTP_STATE_COOKIE_ECHOED */
index 7d44453dfae13a43a4e4a1a72e077ff644d96661..b09eb9036a17a3563e9ad5ca08a1734b86aa0df5 100644 (file)
@@ -777,9 +777,6 @@ static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
        if (pos != 0)
                return -ESPIPE;
 
-       if (iocb->ki_left == 0) /* Match SYS5 behaviour */
-               return 0;
-
        x = alloc_sock_iocb(iocb, &siocb);
        if (!x)
                return -ENOMEM;
index 7eabd55417a5eab222a4c756d1e2181513575cc7..9771451eae217d9624db3efbac4e08f91ec9ab5c 100644 (file)
@@ -213,7 +213,7 @@ out_fail_notifier:
 out_fail_sysfs:
        return err;
 }
-module_init(cfg80211_init);
+subsys_initcall(cfg80211_init);
 
 static void cfg80211_exit(void)
 {
index 88aaacd9f82275a3266b67165bb9a470d8069f4c..2d5d2255a27cd54bb12c1a21724680a5cdba617d 100644 (file)
@@ -52,12 +52,14 @@ static void wiphy_dev_release(struct device *dev)
        cfg80211_dev_free(rdev);
 }
 
+#ifdef CONFIG_HOTPLUG
 static int wiphy_uevent(struct device *dev, char **envp,
                        int num_envp, char *buf, int size)
 {
        /* TODO, we probably need stuff here */
        return 0;
 }
+#endif
 
 struct class ieee80211_class = {
        .name = "ieee80211",
index 0dcc01ce45a608f576365b5a341a2edc43c23a67..366f8c7f62bf6de4d82a1ae543e6157a7de07548 100755 (executable)
@@ -119,5 +119,5 @@ sed -n -e '/^\#define/ { s/[^_]*__NR_\([^[:space:]]*\).*/\
 \#endif/p }' $1
 }
 
-(ignore_list && syscall_list ${srctree}/include/asm-i386/unistd.h) | \
+(ignore_list && syscall_list ${srctree}/include/asm-x86/unistd_32.h) | \
 $* -E -x c - > /dev/null
index f34373853ef845fea8222b3c6ecb95b779573e9f..c6e88c652c2f941647f0d04b3cd982fc6c4e7ab5 100755 (executable)
@@ -105,7 +105,7 @@ sub linux_objects
        if (/.*\.o$/ &&
                ! (
                m:/built-in.o$:
-               || m:arch/i386/kernel/vsyscall-syms.o$:
+               || m:arch/x86/kernel/vsyscall-syms.o$:
                || m:arch/ia64/ia32/ia32.o$:
                || m:arch/ia64/kernel/gate-syms.o$:
                || m:arch/ia64/lib/__divdi3.o$:
@@ -328,9 +328,9 @@ sub list_multiply_defined
                        }
                        # Special case for i386 entry code
                        if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ &&
-                           $def{$name}[0] eq "arch/i386/kernel/vsyscall-int80.o" &&
-                           $def{$name}[1] eq "arch/i386/kernel/vsyscall-sysenter.o") {
-                               &drop_def("arch/i386/kernel/vsyscall-sysenter.o", $name);
+                           $def{$name}[0] eq "arch/x86/kernel/vsyscall-int80_32.o" &&
+                           $def{$name}[1] eq "arch/x86/kernel/vsyscall-sysenter_32.o") {
+                               &drop_def("arch/x86/kernel/vsyscall-sysenter_32.o", $name);
                                next;
                        }
                        printf "$name is multiply defined in :-\n";
index f057430db0d01021d6b2c27df157b64a4958fd7a..9b5656d8bccac7d140168bfbd1e65af4a0e96c13 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
+#include <linux/seq_file.h>
 #include <asm/uaccess.h>
 #include <linux/dma-mapping.h>
 #include <linux/moduleparam.h>
@@ -481,53 +482,54 @@ static void free_all_reserved_pages(void)
 #define SND_MEM_PROC_FILE      "driver/snd-page-alloc"
 static struct proc_dir_entry *snd_mem_proc;
 
-static int snd_mem_proc_read(char *page, char **start, off_t off,
-                            int count, int *eof, void *data)
+static int snd_mem_proc_read(struct seq_file *seq, void *offset)
 {
-       int len = 0;
        long pages = snd_allocated_pages >> (PAGE_SHIFT-12);
        struct snd_mem_list *mem;
        int devno;
        static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" };
 
        mutex_lock(&list_mutex);
-       len += snprintf(page + len, count - len,
-                       "pages  : %li bytes (%li pages per %likB)\n",
-                       pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
+       seq_printf(seq, "pages  : %li bytes (%li pages per %likB)\n",
+                  pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
        devno = 0;
        list_for_each_entry(mem, &mem_list_head, list) {
                devno++;
-               len += snprintf(page + len, count - len,
-                               "buffer %d : ID %08x : type %s\n",
-                               devno, mem->id, types[mem->buffer.dev.type]);
-               len += snprintf(page + len, count - len,
-                               "  addr = 0x%lx, size = %d bytes\n",
-                               (unsigned long)mem->buffer.addr, (int)mem->buffer.bytes);
+               seq_printf(seq, "buffer %d : ID %08x : type %s\n",
+                          devno, mem->id, types[mem->buffer.dev.type]);
+               seq_printf(seq, "  addr = 0x%lx, size = %d bytes\n",
+                          (unsigned long)mem->buffer.addr,
+                          (int)mem->buffer.bytes);
        }
        mutex_unlock(&list_mutex);
-       return len;
+       return 0;
+}
+
+static int snd_mem_proc_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, snd_mem_proc_read, NULL);
 }
 
 /* FIXME: for pci only - other bus? */
 #ifdef CONFIG_PCI
 #define gettoken(bufp) strsep(bufp, " \t\n")
 
-static int snd_mem_proc_write(struct file *file, const char __user *buffer,
-                             unsigned long count, void *data)
+static ssize_t snd_mem_proc_write(struct file *file, const char __user * buffer,
+                                 size_t count, loff_t * ppos)
 {
        char buf[128];
        char *token, *p;
 
-       if (count > ARRAY_SIZE(buf) - 1)
-               count = ARRAY_SIZE(buf) - 1;
+       if (count > sizeof(buf) - 1)
+               return -EINVAL;
        if (copy_from_user(buf, buffer, count))
                return -EFAULT;
-       buf[ARRAY_SIZE(buf) - 1] = '\0';
+       buf[count] = '\0';
 
        p = buf;
        token = gettoken(&p);
        if (! token || *token == '#')
-               return (int)count;
+               return count;
        if (strcmp(token, "add") == 0) {
                char *endp;
                int vendor, device, size, buffers;
@@ -548,7 +550,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
                    (buffers = simple_strtol(token, NULL, 0)) <= 0 ||
                    buffers > 4) {
                        printk(KERN_ERR "snd-page-alloc: invalid proc write format\n");
-                       return (int)count;
+                       return count;
                }
                vendor &= 0xffff;
                device &= 0xffff;
@@ -560,7 +562,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
                                if (pci_set_dma_mask(pci, mask) < 0 ||
                                    pci_set_consistent_dma_mask(pci, mask) < 0) {
                                        printk(KERN_ERR "snd-page-alloc: cannot set DMA mask %lx for pci %04x:%04x\n", mask, vendor, device);
-                                       return (int)count;
+                                       return count;
                                }
                        }
                        for (i = 0; i < buffers; i++) {
@@ -570,7 +572,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
                                                        size, &dmab) < 0) {
                                        printk(KERN_ERR "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", size);
                                        pci_dev_put(pci);
-                                       return (int)count;
+                                       return count;
                                }
                                snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci));
                        }
@@ -596,9 +598,21 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
                free_all_reserved_pages();
        else
                printk(KERN_ERR "snd-page-alloc: invalid proc cmd\n");
-       return (int)count;
+       return count;
 }
 #endif /* CONFIG_PCI */
+
+static const struct file_operations snd_mem_proc_fops = {
+       .owner          = THIS_MODULE,
+       .open           = snd_mem_proc_open,
+       .read           = seq_read,
+#ifdef CONFIG_PCI
+       .write          = snd_mem_proc_write,
+#endif
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
 #endif /* CONFIG_PROC_FS */
 
 /*
@@ -609,12 +623,8 @@ static int __init snd_mem_init(void)
 {
 #ifdef CONFIG_PROC_FS
        snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);
-       if (snd_mem_proc) {
-               snd_mem_proc->read_proc = snd_mem_proc_read;
-#ifdef CONFIG_PCI
-               snd_mem_proc->write_proc = snd_mem_proc_write;
-#endif
-       }
+       if (snd_mem_proc)
+               snd_mem_proc->proc_fops = &snd_mem_proc_fops;
 #endif
        return 0;
 }