Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Wed, 31 Dec 2008 01:32:25 +0000 (17:32 -0800)]
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_sil: add Large Block Transfer support
  [libata] ata_piix: cleanup dmi strings checking
  DMI: add dmi_match
  libata: blacklist NCQ on OCZ CORE 2 SSD (resend)
  [libata] Update kernel-doc comments to match source code
  libata: perform port detach in EH
  libata: when restoring SControl during detach do the PMP links first
  libata: beef up iterators

526 files changed:
Documentation/RCU/00-INDEX
Documentation/RCU/trace.txt [new file with mode: 0644]
Documentation/block/biodoc.txt
Documentation/lockstat.txt
Makefile
arch/Kconfig
arch/alpha/include/asm/io.h
arch/powerpc/platforms/pseries/rtasd.c
arch/s390/mm/pgtable.c
arch/sparc/Kconfig
arch/sparc/Kconfig.debug
arch/sparc/Makefile
arch/sparc/boot/.gitignore [new file with mode: 0644]
arch/sparc/boot/Makefile
arch/sparc/boot/piggyback_32.c [moved from arch/sparc/boot/piggyback.c with 100% similarity]
arch/sparc/boot/piggyback_64.c [moved from arch/sparc64/boot/piggyback.c with 100% similarity]
arch/sparc/configs/sparc32_defconfig [moved from arch/sparc/defconfig with 100% similarity]
arch/sparc/configs/sparc64_defconfig [moved from arch/sparc64/defconfig with 100% similarity]
arch/sparc/include/asm/Kbuild
arch/sparc/include/asm/asm.h [new file with mode: 0644]
arch/sparc/include/asm/atomic_64.h
arch/sparc/include/asm/bitops_64.h
arch/sparc/include/asm/hypervisor.h
arch/sparc/include/asm/irq_32.h
arch/sparc/include/asm/irq_64.h
arch/sparc/include/asm/irqflags_64.h
arch/sparc/include/asm/module.h
arch/sparc/include/asm/module_32.h [deleted file]
arch/sparc/include/asm/module_64.h [deleted file]
arch/sparc/include/asm/openprom_32.h
arch/sparc/include/asm/oplib_32.h
arch/sparc/include/asm/pil.h
arch/sparc/include/asm/scatterlist.h
arch/sparc/include/asm/scatterlist_32.h [deleted file]
arch/sparc/include/asm/scatterlist_64.h [deleted file]
arch/sparc/include/asm/sections.h
arch/sparc/include/asm/sections_32.h [deleted file]
arch/sparc/include/asm/sections_64.h [deleted file]
arch/sparc/include/asm/spinlock_64.h
arch/sparc/include/asm/spitfire.h
arch/sparc/include/asm/system_32.h
arch/sparc/include/asm/system_64.h
arch/sparc/include/asm/tsb.h
arch/sparc/include/asm/ttable.h
arch/sparc/include/asm/unistd.h
arch/sparc/include/asm/unistd_32.h [deleted file]
arch/sparc/include/asm/unistd_64.h [deleted file]
arch/sparc/kernel/.gitignore [new file with mode: 0644]
arch/sparc/kernel/Makefile
arch/sparc/kernel/asm-offsets.c
arch/sparc/kernel/audit.c [moved from arch/sparc64/kernel/audit.c with 100% similarity]
arch/sparc/kernel/auxio_32.c [moved from arch/sparc/kernel/auxio.c with 100% similarity]
arch/sparc/kernel/auxio_64.c [moved from arch/sparc64/kernel/auxio.c with 67% similarity]
arch/sparc/kernel/central.c [moved from arch/sparc64/kernel/central.c with 100% similarity]
arch/sparc/kernel/cherrs.S [moved from arch/sparc64/kernel/cherrs.S with 98% similarity]
arch/sparc/kernel/chmc.c [moved from arch/sparc64/kernel/chmc.c with 100% similarity]
arch/sparc/kernel/compat_audit.c [moved from arch/sparc64/kernel/compat_audit.c with 91% similarity]
arch/sparc/kernel/cpu.c
arch/sparc/kernel/devices.c
arch/sparc/kernel/ds.c [moved from arch/sparc64/kernel/ds.c with 100% similarity]
arch/sparc/kernel/dtlb_miss.S [moved from arch/sparc64/kernel/dtlb_miss.S with 100% similarity]
arch/sparc/kernel/dtlb_prot.S [moved from arch/sparc64/kernel/dtlb_prot.S with 100% similarity]
arch/sparc/kernel/ebus.c [moved from arch/sparc64/kernel/ebus.c with 100% similarity]
arch/sparc/kernel/entry.h [moved from arch/sparc64/kernel/entry.h with 79% similarity]
arch/sparc/kernel/etrap_32.S [moved from arch/sparc/kernel/etrap.S with 100% similarity]
arch/sparc/kernel/etrap_64.S [moved from arch/sparc64/kernel/etrap.S with 97% similarity]
arch/sparc/kernel/fpu_traps.S [moved from arch/sparc64/kernel/fpu_traps.S with 100% similarity]
arch/sparc/kernel/ftrace.c [moved from arch/sparc64/kernel/ftrace.c with 100% similarity]
arch/sparc/kernel/getsetcc.S [moved from arch/sparc64/kernel/getsetcc.S with 100% similarity]
arch/sparc/kernel/head_32.S [moved from arch/sparc/kernel/head.S with 99% similarity]
arch/sparc/kernel/head_64.S [moved from arch/sparc64/kernel/head.S with 99% similarity]
arch/sparc/kernel/helpers.S [moved from arch/sparc64/kernel/helpers.S with 100% similarity]
arch/sparc/kernel/hvapi.c [moved from arch/sparc64/kernel/hvapi.c with 100% similarity]
arch/sparc/kernel/hvcalls.S [moved from arch/sparc64/kernel/hvcalls.S with 96% similarity]
arch/sparc/kernel/hvtramp.S [moved from arch/sparc64/kernel/hvtramp.S with 95% similarity]
arch/sparc/kernel/idprom.c
arch/sparc/kernel/init_task.c
arch/sparc/kernel/iommu.c [moved from arch/sparc64/kernel/iommu.c with 100% similarity]
arch/sparc/kernel/iommu_common.h [moved from arch/sparc64/kernel/iommu_common.h with 100% similarity]
arch/sparc/kernel/ioport.c
arch/sparc/kernel/irq_32.c [moved from arch/sparc/kernel/irq.c with 99% similarity]
arch/sparc/kernel/irq_64.c [moved from arch/sparc64/kernel/irq.c with 94% similarity]
arch/sparc/kernel/itlb_miss.S [moved from arch/sparc64/kernel/itlb_miss.S with 100% similarity]
arch/sparc/kernel/ivec.S [moved from arch/sparc64/kernel/ivec.S with 100% similarity]
arch/sparc/kernel/kernel.h [new file with mode: 0644]
arch/sparc/kernel/kgdb_32.c [moved from arch/sparc/kernel/kgdb.c with 100% similarity]
arch/sparc/kernel/kgdb_64.c [moved from arch/sparc64/kernel/kgdb.c with 100% similarity]
arch/sparc/kernel/kprobes.c [moved from arch/sparc64/kernel/kprobes.c with 100% similarity]
arch/sparc/kernel/kstack.h [moved from arch/sparc64/kernel/kstack.h with 100% similarity]
arch/sparc/kernel/ktlb.S [moved from arch/sparc64/kernel/ktlb.S with 100% similarity]
arch/sparc/kernel/ldc.c [moved from arch/sparc64/kernel/ldc.c with 100% similarity]
arch/sparc/kernel/mdesc.c [moved from arch/sparc64/kernel/mdesc.c with 99% similarity]
arch/sparc/kernel/misctrap.S [moved from arch/sparc64/kernel/misctrap.S with 100% similarity]
arch/sparc/kernel/module.c
arch/sparc/kernel/muldiv.c
arch/sparc/kernel/of_device_32.c [moved from arch/sparc/kernel/of_device.c with 100% similarity]
arch/sparc/kernel/of_device_64.c [moved from arch/sparc64/kernel/of_device.c with 98% similarity]
arch/sparc/kernel/pci.c [moved from arch/sparc64/kernel/pci.c with 100% similarity]
arch/sparc/kernel/pci_common.c [moved from arch/sparc64/kernel/pci_common.c with 100% similarity]
arch/sparc/kernel/pci_fire.c [moved from arch/sparc64/kernel/pci_fire.c with 100% similarity]
arch/sparc/kernel/pci_impl.h [moved from arch/sparc64/kernel/pci_impl.h with 100% similarity]
arch/sparc/kernel/pci_msi.c [moved from arch/sparc64/kernel/pci_msi.c with 100% similarity]
arch/sparc/kernel/pci_psycho.c [moved from arch/sparc64/kernel/pci_psycho.c with 100% similarity]
arch/sparc/kernel/pci_sabre.c [moved from arch/sparc64/kernel/pci_sabre.c with 100% similarity]
arch/sparc/kernel/pci_schizo.c [moved from arch/sparc64/kernel/pci_schizo.c with 100% similarity]
arch/sparc/kernel/pci_sun4v.c [moved from arch/sparc64/kernel/pci_sun4v.c with 100% similarity]
arch/sparc/kernel/pci_sun4v.h [moved from arch/sparc64/kernel/pci_sun4v.h with 100% similarity]
arch/sparc/kernel/pci_sun4v_asm.S [moved from arch/sparc64/kernel/pci_sun4v_asm.S with 100% similarity]
arch/sparc/kernel/pcic.c
arch/sparc/kernel/pmc.c
arch/sparc/kernel/power.c [moved from arch/sparc64/kernel/power.c with 100% similarity]
arch/sparc/kernel/process_32.c [moved from arch/sparc/kernel/process.c with 99% similarity]
arch/sparc/kernel/process_64.c [moved from arch/sparc64/kernel/process.c with 100% similarity]
arch/sparc/kernel/prom.c [deleted file]
arch/sparc/kernel/prom.h [new file with mode: 0644]
arch/sparc/kernel/prom_32.c [new file with mode: 0644]
arch/sparc/kernel/prom_64.c [new file with mode: 0644]
arch/sparc/kernel/prom_common.c [new file with mode: 0644]
arch/sparc/kernel/prom_irqtrans.c [new file with mode: 0644]
arch/sparc/kernel/psycho_common.c [moved from arch/sparc64/kernel/psycho_common.c with 100% similarity]
arch/sparc/kernel/psycho_common.h [moved from arch/sparc64/kernel/psycho_common.h with 100% similarity]
arch/sparc/kernel/ptrace_32.c [moved from arch/sparc/kernel/ptrace.c with 100% similarity]
arch/sparc/kernel/ptrace_64.c [moved from arch/sparc64/kernel/ptrace.c with 100% similarity]
arch/sparc/kernel/reboot.c [moved from arch/sparc64/kernel/reboot.c with 100% similarity]
arch/sparc/kernel/rtrap_32.S [moved from arch/sparc/kernel/rtrap.S with 100% similarity]
arch/sparc/kernel/rtrap_64.S [moved from arch/sparc64/kernel/rtrap.S with 95% similarity]
arch/sparc/kernel/sbus.c [moved from arch/sparc64/kernel/sbus.c with 100% similarity]
arch/sparc/kernel/setup_32.c [moved from arch/sparc/kernel/setup.c with 98% similarity]
arch/sparc/kernel/setup_64.c [moved from arch/sparc64/kernel/setup.c with 99% similarity]
arch/sparc/kernel/signal32.c [moved from arch/sparc64/kernel/signal32.c with 100% similarity]
arch/sparc/kernel/signal_32.c [moved from arch/sparc/kernel/signal.c with 100% similarity]
arch/sparc/kernel/signal_64.c [moved from arch/sparc64/kernel/signal.c with 100% similarity]
arch/sparc/kernel/smp_32.c [moved from arch/sparc/kernel/smp.c with 100% similarity]
arch/sparc/kernel/smp_64.c [moved from arch/sparc64/kernel/smp.c with 99% similarity]
arch/sparc/kernel/sparc_ksyms_32.c [moved from arch/sparc/kernel/sparc_ksyms.c with 98% similarity]
arch/sparc/kernel/sparc_ksyms_64.c [moved from arch/sparc64/kernel/sparc64_ksyms.c with 97% similarity]
arch/sparc/kernel/spiterrs.S [moved from arch/sparc64/kernel/spiterrs.S with 99% similarity]
arch/sparc/kernel/sstate.c [moved from arch/sparc64/kernel/sstate.c with 100% similarity]
arch/sparc/kernel/stacktrace.c [moved from arch/sparc64/kernel/stacktrace.c with 60% similarity]
arch/sparc/kernel/starfire.c [moved from arch/sparc64/kernel/starfire.c with 100% similarity]
arch/sparc/kernel/sun4c_irq.c
arch/sparc/kernel/sun4d_irq.c
arch/sparc/kernel/sun4m_irq.c
arch/sparc/kernel/sun4v_ivec.S [moved from arch/sparc64/kernel/sun4v_ivec.S with 98% similarity]
arch/sparc/kernel/sun4v_tlb_miss.S [moved from arch/sparc64/kernel/sun4v_tlb_miss.S with 100% similarity]
arch/sparc/kernel/sys32.S [moved from arch/sparc64/kernel/sys32.S with 100% similarity]
arch/sparc/kernel/sys_sparc32.c [moved from arch/sparc64/kernel/sys_sparc32.c with 100% similarity]
arch/sparc/kernel/sys_sparc_32.c [moved from arch/sparc/kernel/sys_sparc.c with 100% similarity]
arch/sparc/kernel/sys_sparc_64.c [moved from arch/sparc64/kernel/sys_sparc.c with 100% similarity]
arch/sparc/kernel/syscalls.S [moved from arch/sparc64/kernel/syscalls.S with 100% similarity]
arch/sparc/kernel/sysfs.c [moved from arch/sparc64/kernel/sysfs.c with 99% similarity]
arch/sparc/kernel/systbls.h [moved from arch/sparc64/kernel/systbls.h with 100% similarity]
arch/sparc/kernel/systbls_32.S [moved from arch/sparc/kernel/systbls.S with 100% similarity]
arch/sparc/kernel/systbls_64.S [moved from arch/sparc64/kernel/systbls.S with 100% similarity]
arch/sparc/kernel/time_32.c [moved from arch/sparc/kernel/time.c with 100% similarity]
arch/sparc/kernel/time_64.c [moved from arch/sparc64/kernel/time.c with 100% similarity]
arch/sparc/kernel/trampoline_32.S [moved from arch/sparc/kernel/trampoline.S with 100% similarity]
arch/sparc/kernel/trampoline_64.S [moved from arch/sparc64/kernel/trampoline.S with 98% similarity]
arch/sparc/kernel/traps_32.c [moved from arch/sparc/kernel/traps.c with 94% similarity]
arch/sparc/kernel/traps_64.c [moved from arch/sparc64/kernel/traps.c with 99% similarity]
arch/sparc/kernel/tsb.S [moved from arch/sparc64/kernel/tsb.S with 99% similarity]
arch/sparc/kernel/ttable.S [moved from arch/sparc64/kernel/ttable.S with 99% similarity]
arch/sparc/kernel/una_asm_32.S [moved from arch/sparc/kernel/una_asm.S with 100% similarity]
arch/sparc/kernel/una_asm_64.S [moved from arch/sparc64/kernel/una_asm.S with 100% similarity]
arch/sparc/kernel/unaligned_32.c [moved from arch/sparc/kernel/unaligned.c with 100% similarity]
arch/sparc/kernel/unaligned_64.c [moved from arch/sparc64/kernel/unaligned.c with 100% similarity]
arch/sparc/kernel/us2e_cpufreq.c [moved from arch/sparc64/kernel/us2e_cpufreq.c with 100% similarity]
arch/sparc/kernel/us3_cpufreq.c [moved from arch/sparc64/kernel/us3_cpufreq.c with 100% similarity]
arch/sparc/kernel/utrap.S [moved from arch/sparc64/kernel/utrap.S with 100% similarity]
arch/sparc/kernel/vio.c [moved from arch/sparc64/kernel/vio.c with 100% similarity]
arch/sparc/kernel/viohs.c [moved from arch/sparc64/kernel/viohs.c with 100% similarity]
arch/sparc/kernel/visemul.c [moved from arch/sparc64/kernel/visemul.c with 100% similarity]
arch/sparc/kernel/vmlinux.lds.S
arch/sparc/kernel/winfixup.S [moved from arch/sparc64/kernel/winfixup.S with 100% similarity]
arch/sparc/lib/GENbzero.S [moved from arch/sparc64/lib/GENbzero.S with 100% similarity]
arch/sparc/lib/GENcopy_from_user.S [moved from arch/sparc64/lib/GENcopy_from_user.S with 100% similarity]
arch/sparc/lib/GENcopy_to_user.S [moved from arch/sparc64/lib/GENcopy_to_user.S with 100% similarity]
arch/sparc/lib/GENmemcpy.S [moved from arch/sparc64/lib/GENmemcpy.S with 100% similarity]
arch/sparc/lib/GENpage.S [moved from arch/sparc64/lib/GENpage.S with 100% similarity]
arch/sparc/lib/GENpatch.S [moved from arch/sparc64/lib/GENpatch.S with 100% similarity]
arch/sparc/lib/Makefile
arch/sparc/lib/NG2copy_from_user.S [moved from arch/sparc64/lib/NG2copy_from_user.S with 100% similarity]
arch/sparc/lib/NG2copy_to_user.S [moved from arch/sparc64/lib/NG2copy_to_user.S with 100% similarity]
arch/sparc/lib/NG2memcpy.S [moved from arch/sparc64/lib/NG2memcpy.S with 100% similarity]
arch/sparc/lib/NG2page.S [moved from arch/sparc64/lib/NG2page.S with 100% similarity]
arch/sparc/lib/NG2patch.S [moved from arch/sparc64/lib/NG2patch.S with 100% similarity]
arch/sparc/lib/NGbzero.S [moved from arch/sparc64/lib/NGbzero.S with 100% similarity]
arch/sparc/lib/NGcopy_from_user.S [moved from arch/sparc64/lib/NGcopy_from_user.S with 100% similarity]
arch/sparc/lib/NGcopy_to_user.S [moved from arch/sparc64/lib/NGcopy_to_user.S with 100% similarity]
arch/sparc/lib/NGmemcpy.S [moved from arch/sparc64/lib/NGmemcpy.S with 100% similarity]
arch/sparc/lib/NGpage.S [moved from arch/sparc64/lib/NGpage.S with 100% similarity]
arch/sparc/lib/NGpatch.S [moved from arch/sparc64/lib/NGpatch.S with 100% similarity]
arch/sparc/lib/PeeCeeI.c [moved from arch/sparc64/lib/PeeCeeI.c with 100% similarity]
arch/sparc/lib/U1copy_from_user.S [moved from arch/sparc64/lib/U1copy_from_user.S with 100% similarity]
arch/sparc/lib/U1copy_to_user.S [moved from arch/sparc64/lib/U1copy_to_user.S with 100% similarity]
arch/sparc/lib/U1memcpy.S [moved from arch/sparc64/lib/U1memcpy.S with 100% similarity]
arch/sparc/lib/U3copy_from_user.S [moved from arch/sparc64/lib/U3copy_from_user.S with 100% similarity]
arch/sparc/lib/U3copy_to_user.S [moved from arch/sparc64/lib/U3copy_to_user.S with 100% similarity]
arch/sparc/lib/U3memcpy.S [moved from arch/sparc64/lib/U3memcpy.S with 100% similarity]
arch/sparc/lib/U3patch.S [moved from arch/sparc64/lib/U3patch.S with 100% similarity]
arch/sparc/lib/VISsave.S [moved from arch/sparc64/lib/VISsave.S with 100% similarity]
arch/sparc/lib/atomic_32.S [moved from arch/sparc/lib/atomic.S with 100% similarity]
arch/sparc/lib/atomic_64.S [moved from arch/sparc64/lib/atomic.S with 84% similarity]
arch/sparc/lib/bitops.S [moved from arch/sparc64/lib/bitops.S with 84% similarity]
arch/sparc/lib/bzero.S [moved from arch/sparc64/lib/bzero.S with 100% similarity]
arch/sparc/lib/checksum_32.S [moved from arch/sparc/lib/checksum.S with 100% similarity]
arch/sparc/lib/checksum_64.S [moved from arch/sparc64/lib/checksum.S with 100% similarity]
arch/sparc/lib/clear_page.S [moved from arch/sparc64/lib/clear_page.S with 100% similarity]
arch/sparc/lib/copy_in_user.S [moved from arch/sparc64/lib/copy_in_user.S with 100% similarity]
arch/sparc/lib/copy_page.S [moved from arch/sparc64/lib/copy_page.S with 100% similarity]
arch/sparc/lib/csum_copy.S [moved from arch/sparc64/lib/csum_copy.S with 100% similarity]
arch/sparc/lib/csum_copy_from_user.S [moved from arch/sparc64/lib/csum_copy_from_user.S with 100% similarity]
arch/sparc/lib/csum_copy_to_user.S [moved from arch/sparc64/lib/csum_copy_to_user.S with 100% similarity]
arch/sparc/lib/ipcsum.S [moved from arch/sparc64/lib/ipcsum.S with 100% similarity]
arch/sparc/lib/mcount.S [moved from arch/sparc64/lib/mcount.S with 100% similarity]
arch/sparc/lib/memcmp.S
arch/sparc/lib/memmove.S [moved from arch/sparc64/lib/memmove.S with 100% similarity]
arch/sparc/lib/memscan_32.S [moved from arch/sparc/lib/memscan.S with 100% similarity]
arch/sparc/lib/memscan_64.S [moved from arch/sparc64/lib/memscan.S with 100% similarity]
arch/sparc/lib/rwsem_32.S [moved from arch/sparc/lib/rwsem.S with 100% similarity]
arch/sparc/lib/rwsem_64.S [moved from arch/sparc64/lib/rwsem.S with 92% similarity]
arch/sparc/lib/strlen.S
arch/sparc/lib/strlen_user_32.S [moved from arch/sparc/lib/strlen_user.S with 100% similarity]
arch/sparc/lib/strlen_user_64.S [moved from arch/sparc64/lib/strlen_user.S with 100% similarity]
arch/sparc/lib/strncmp_32.S [moved from arch/sparc/lib/strncmp.S with 100% similarity]
arch/sparc/lib/strncmp_64.S [moved from arch/sparc64/lib/strncmp.S with 100% similarity]
arch/sparc/lib/strncpy_from_user_32.S [moved from arch/sparc/lib/strncpy_from_user.S with 100% similarity]
arch/sparc/lib/strncpy_from_user_64.S [moved from arch/sparc64/lib/strncpy_from_user.S with 100% similarity]
arch/sparc/lib/user_fixup.c [moved from arch/sparc64/lib/user_fixup.c with 100% similarity]
arch/sparc/lib/xor.S [moved from arch/sparc64/lib/xor.S with 100% similarity]
arch/sparc/math-emu/Makefile
arch/sparc/math-emu/ashldi3.S [deleted file]
arch/sparc/math-emu/math_32.c [moved from arch/sparc/math-emu/math.c with 99% similarity]
arch/sparc/math-emu/math_64.c [moved from arch/sparc64/math-emu/math.c with 99% similarity]
arch/sparc/math-emu/sfp-util_32.h [moved from arch/sparc/math-emu/sfp-util.h with 100% similarity]
arch/sparc/math-emu/sfp-util_64.h [moved from arch/sparc64/math-emu/sfp-util.h with 100% similarity]
arch/sparc/mm/Makefile
arch/sparc/mm/fault_32.c [moved from arch/sparc/mm/fault.c with 100% similarity]
arch/sparc/mm/fault_64.c [moved from arch/sparc64/mm/fault.c with 100% similarity]
arch/sparc/mm/generic_32.c [moved from arch/sparc/mm/generic.c with 100% similarity]
arch/sparc/mm/generic_64.c [moved from arch/sparc64/mm/generic.c with 100% similarity]
arch/sparc/mm/hugetlbpage.c [moved from arch/sparc64/mm/hugetlbpage.c with 100% similarity]
arch/sparc/mm/init_32.c [moved from arch/sparc/mm/init.c with 97% similarity]
arch/sparc/mm/init_64.c [moved from arch/sparc64/mm/init.c with 99% similarity]
arch/sparc/mm/init_64.h [moved from arch/sparc64/mm/init.h with 100% similarity]
arch/sparc/mm/io-unit.c
arch/sparc/mm/iommu.c
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/sparc/mm/tlb.c [moved from arch/sparc64/mm/tlb.c with 100% similarity]
arch/sparc/mm/tsb.c [moved from arch/sparc64/mm/tsb.c with 97% similarity]
arch/sparc/mm/ultra.S [moved from arch/sparc64/mm/ultra.S with 99% similarity]
arch/sparc/oprofile/init.c
arch/sparc/prom/Makefile
arch/sparc/prom/bootstr_32.c [moved from arch/sparc/prom/bootstr.c with 100% similarity]
arch/sparc/prom/bootstr_64.c [moved from arch/sparc64/prom/bootstr.c with 100% similarity]
arch/sparc/prom/cif.S [moved from arch/sparc64/prom/cif.S with 100% similarity]
arch/sparc/prom/console_32.c [moved from arch/sparc/prom/console.c with 100% similarity]
arch/sparc/prom/console_64.c [moved from arch/sparc64/prom/console.c with 100% similarity]
arch/sparc/prom/devops_32.c [moved from arch/sparc/prom/devops.c with 100% similarity]
arch/sparc/prom/devops_64.c [moved from arch/sparc64/prom/devops.c with 100% similarity]
arch/sparc/prom/init_32.c [moved from arch/sparc/prom/init.c with 100% similarity]
arch/sparc/prom/init_64.c [moved from arch/sparc64/prom/init.c with 100% similarity]
arch/sparc/prom/misc_32.c [moved from arch/sparc/prom/misc.c with 98% similarity]
arch/sparc/prom/misc_64.c [moved from arch/sparc64/prom/misc.c with 100% similarity]
arch/sparc/prom/p1275.c [moved from arch/sparc64/prom/p1275.c with 100% similarity]
arch/sparc/prom/printf.c
arch/sparc/prom/tree_32.c [moved from arch/sparc/prom/tree.c with 97% similarity]
arch/sparc/prom/tree_64.c [moved from arch/sparc64/prom/tree.c with 100% similarity]
arch/sparc64/Kconfig [deleted file]
arch/sparc64/Kconfig.debug [deleted file]
arch/sparc64/Makefile [deleted file]
arch/sparc64/boot/.gitignore [deleted file]
arch/sparc64/boot/Makefile [deleted file]
arch/sparc64/kernel/Makefile [deleted file]
arch/sparc64/kernel/asm-offsets.c [deleted file]
arch/sparc64/kernel/cpu.c [deleted file]
arch/sparc64/kernel/idprom.c [deleted file]
arch/sparc64/kernel/init_task.c [deleted file]
arch/sparc64/kernel/module.c [deleted file]
arch/sparc64/kernel/prom.c [deleted file]
arch/sparc64/kernel/vmlinux.lds.S [deleted file]
arch/sparc64/lib/Makefile [deleted file]
arch/sparc64/lib/iomap.c [deleted file]
arch/sparc64/lib/memcmp.S [deleted file]
arch/sparc64/lib/strlen.S [deleted file]
arch/sparc64/math-emu/Makefile [deleted file]
arch/sparc64/mm/Makefile [deleted file]
arch/sparc64/oprofile/Makefile [deleted file]
arch/sparc64/oprofile/init.c [deleted file]
arch/sparc64/prom/Makefile [deleted file]
arch/sparc64/prom/printf.c [deleted file]
arch/um/include/asm/system.h
arch/x86/Kconfig
arch/x86/include/asm/dma-mapping.h
arch/x86/include/asm/io_apic.h
arch/x86/include/asm/iommu.h
arch/x86/include/asm/irq_vectors.h
arch/x86/include/asm/pci.h
arch/x86/include/asm/pci_64.h
arch/x86/include/asm/uaccess.h
arch/x86/include/asm/uaccess_32.h
arch/x86/include/asm/uaccess_64.h
arch/x86/kernel/Makefile
arch/x86/kernel/hpet.c
arch/x86/kernel/io_apic.c
arch/x86/kernel/irq.c
arch/x86/kernel/irq_32.c
arch/x86/kernel/irq_64.c
arch/x86/kernel/irqinit_32.c
arch/x86/kernel/irqinit_64.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-swiotlb_64.c
arch/x86/kernel/quirks.c
arch/x86/kernel/setup.c
arch/x86/lib/usercopy_32.c
arch/x86/lib/usercopy_64.c
arch/x86/mm/init_32.c
arch/x86/oprofile/op_model_amd.c
block/Kconfig
block/as-iosched.c
block/blk-barrier.c
block/blk-core.c
block/blk-settings.c
block/blk-softirq.c
block/blk-sysfs.c
block/blk-tag.c
block/blk-timeout.c
block/cfq-iosched.c
block/compat_ioctl.c
block/deadline-iosched.c
block/elevator.c
block/genhd.c
block/ioctl.c
block/noop-iosched.c
block/scsi_ioctl.c
drivers/block/cciss.c
drivers/block/cciss.h
drivers/block/cciss_cmd.h
drivers/block/loop.c
drivers/block/nbd.c
drivers/block/virtio_blk.c
drivers/block/xen-blkfront.c
drivers/cdrom/cdrom.c
drivers/char/agp/intel-agp.c
drivers/char/hpet.c
drivers/char/random.c
drivers/clocksource/acpi_pm.c
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_auth.c
drivers/gpu/drm/drm_bufs.c
drivers/gpu/drm/drm_context.c
drivers/gpu/drm/drm_crtc.c [new file with mode: 0644]
drivers/gpu/drm/drm_crtc_helper.c [new file with mode: 0644]
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_edid.c [new file with mode: 0644]
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_hashtab.c
drivers/gpu/drm/drm_ioctl.c
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/drm_lock.c
drivers/gpu/drm/drm_mm.c
drivers/gpu/drm/drm_modes.c [new file with mode: 0644]
drivers/gpu/drm/drm_proc.c
drivers/gpu/drm/drm_stub.c
drivers/gpu/drm/drm_sysfs.c
drivers/gpu/drm/drm_vm.c
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/dvo.h [new file with mode: 0644]
drivers/gpu/drm/i915/dvo_ch7017.c [new file with mode: 0644]
drivers/gpu/drm/i915/dvo_ch7xxx.c [new file with mode: 0644]
drivers/gpu/drm/i915/dvo_ivch.c [new file with mode: 0644]
drivers/gpu/drm/i915/dvo_sil164.c [new file with mode: 0644]
drivers/gpu/drm/i915/dvo_tfp410.c [new file with mode: 0644]
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_proc.c
drivers/gpu/drm/i915/i915_gem_tiling.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_mem.c
drivers/gpu/drm/i915/i915_opregion.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_bios.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_bios.h [new file with mode: 0644]
drivers/gpu/drm/i915/intel_crt.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_display.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_drv.h [new file with mode: 0644]
drivers/gpu/drm/i915/intel_dvo.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_fb.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_i2c.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_lvds.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_modes.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_sdvo.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_sdvo_regs.h [new file with mode: 0644]
drivers/gpu/drm/i915/intel_tv.c [new file with mode: 0644]
drivers/gpu/drm/radeon/r300_cmdbuf.c
drivers/gpu/drm/radeon/radeon_cp.c
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_state.c
drivers/input/touchscreen/ads7846.c
drivers/md/dm-crypt.c
drivers/md/dm-io.c
drivers/md/dm.c
drivers/oprofile/buffer_sync.c
drivers/oprofile/cpu_buffer.c
drivers/oprofile/cpu_buffer.h
drivers/oprofile/oprofile_files.c
drivers/pci/intr_remapping.c
drivers/pci/msi.c
drivers/video/console/vgacon.c
drivers/video/cyber2000fb.c
drivers/xen/events.c
fs/aio.c
fs/bio-integrity.c
fs/bio.c
fs/buffer.c
fs/exec.c
fs/ext4/super.c
fs/proc/stat.c
include/asm-generic/bug.h
include/drm/Kbuild
include/drm/drm.h
include/drm/drmP.h
include/drm/drm_crtc.h [new file with mode: 0644]
include/drm/drm_crtc_helper.h [new file with mode: 0644]
include/drm/drm_edid.h [new file with mode: 0644]
include/drm/drm_mode.h [new file with mode: 0644]
include/drm/drm_sarea.h
include/drm/i915_drm.h
include/linux/Kbuild
include/linux/aio.h
include/linux/bio.h
include/linux/blkdev.h
include/linux/bottom_half.h
include/linux/buffer_head.h
include/linux/console.h
include/linux/debug_locks.h
include/linux/elevator.h
include/linux/fault-inject.h
include/linux/futex.h
include/linux/genhd.h
include/linux/hardirq.h
include/linux/hrtimer.h
include/linux/interrupt.h
include/linux/irq.h
include/linux/irqnr.h
include/linux/kernel.h
include/linux/kernel_stat.h
include/linux/lockdep.h
include/linux/mm_types.h
include/linux/msi.h
include/linux/mutex.h
include/linux/of_platform.h
include/linux/oprofile.h
include/linux/posix-timers.h
include/linux/random.h
include/linux/rcuclassic.h
include/linux/rcupdate.h
include/linux/rcutree.h [new file with mode: 0644]
include/linux/ring_buffer.h
include/linux/slab.h
include/linux/swiotlb.h
include/linux/timex.h
include/linux/types.h
include/linux/uaccess.h
init/Kconfig
init/main.c
kernel/Kconfig.preempt
kernel/Makefile
kernel/exit.c
kernel/extable.c
kernel/fork.c
kernel/futex.c
kernel/hrtimer.c
kernel/irq/Makefile
kernel/irq/autoprobe.c
kernel/irq/chip.c
kernel/irq/handle.c
kernel/irq/internals.h
kernel/irq/manage.c
kernel/irq/numa_migrate.c [new file with mode: 0644]
kernel/irq/proc.c
kernel/irq/spurious.c
kernel/lockdep.c
kernel/lockdep_proc.c
kernel/mutex.c
kernel/notifier.c
kernel/panic.c
kernel/posix-cpu-timers.c
kernel/posix-timers.c
kernel/printk.c
kernel/rcuclassic.c
kernel/rcupreempt.c
kernel/rcupreempt_trace.c
kernel/rcutorture.c
kernel/rcutree.c [new file with mode: 0644]
kernel/rcutree_trace.c [new file with mode: 0644]
kernel/resource.c
kernel/sched.c
kernel/softirq.c
kernel/softlockup.c
kernel/stacktrace.c
kernel/sys.c
kernel/sysctl.c
kernel/time/ntp.c
kernel/time/tick-sched.c
kernel/trace/ring_buffer.c
kernel/trace/trace.c
kernel/trace/trace_sysprof.c
lib/Kconfig.debug
lib/debugobjects.c
lib/swiotlb.c
mm/Makefile
mm/bounce.c
mm/failslab.c [new file with mode: 0644]
mm/memory.c
mm/slab.c
mm/slub.c
security/keys/keyctl.c
sound/core/hrtimer.c
sound/drivers/pcsp/pcsp.c

index 461481d..7dc0695 100644 (file)
@@ -16,6 +16,8 @@ RTFP.txt
        - List of RCU papers (bibliography) going back to 1980.
 torture.txt
        - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
+trace.txt
+       - CONFIG_RCU_TRACE debugfs files and formats
 UP.txt
        - RCU on Uniprocessor Systems
 whatisRCU.txt
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
new file mode 100644 (file)
index 0000000..0688482
--- /dev/null
@@ -0,0 +1,413 @@
+CONFIG_RCU_TRACE debugfs Files and Formats
+
+
+The rcupreempt and rcutree implementations of RCU provide debugfs trace
+output that summarizes counters and state.  This information is useful for
+debugging RCU itself, and can sometimes also help to debug abuses of RCU.
+Note that the rcuclassic implementation of RCU does not provide debugfs
+trace output.
+
+The following sections describe the debugfs files and formats for
+preemptable RCU (rcupreempt) and hierarchical RCU (rcutree).
+
+
+Preemptable RCU debugfs Files and Formats
+
+This implementation of RCU provides three debugfs files under the
+top-level directory RCU: rcu/rcuctrs (which displays the per-CPU
+counters used by preemptable RCU) rcu/rcugp (which displays grace-period
+counters), and rcu/rcustats (which internal counters for debugging RCU).
+
+The output of "cat rcu/rcuctrs" looks as follows:
+
+CPU last cur F M
+  0    5  -5 0 0
+  1   -1   0 0 0
+  2    0   1 0 0
+  3    0   1 0 0
+  4    0   1 0 0
+  5    0   1 0 0
+  6    0   2 0 0
+  7    0  -1 0 0
+  8    0   1 0 0
+ggp = 26226, state = waitzero
+
+The per-CPU fields are as follows:
+
+o      "CPU" gives the CPU number.  Offline CPUs are not displayed.
+
+o      "last" gives the value of the counter that is being decremented
+       for the current grace period phase.  In the example above,
+       the counters sum to 4, indicating that there are still four
+       RCU read-side critical sections still running that started
+       before the last counter flip.
+
+o      "cur" gives the value of the counter that is currently being
+       both incremented (by rcu_read_lock()) and decremented (by
+       rcu_read_unlock()).  In the example above, the counters sum to
+       1, indicating that there is only one RCU read-side critical section
+       still running that started after the last counter flip.
+
+o      "F" indicates whether RCU is waiting for this CPU to acknowledge
+       a counter flip.  In the above example, RCU is not waiting on any,
+       which is consistent with the state being "waitzero" rather than
+       "waitack".
+
+o      "M" indicates whether RCU is waiting for this CPU to execute a
+       memory barrier.  In the above example, RCU is not waiting on any,
+       which is consistent with the state being "waitzero" rather than
+       "waitmb".
+
+o      "ggp" is the global grace-period counter.
+
+o      "state" is the RCU state, which can be one of the following:
+
+       o       "idle": there is no grace period in progress.
+
+       o       "waitack": RCU just incremented the global grace-period
+               counter, which has the effect of reversing the roles of
+               the "last" and "cur" counters above, and is waiting for
+               all the CPUs to acknowledge the flip.  Once the flip has
+               been acknowledged, CPUs will no longer be incrementing
+               what are now the "last" counters, so that their sum will
+               decrease monotonically down to zero.
+
+       o       "waitzero": RCU is waiting for the sum of the "last" counters
+               to decrease to zero.
+
+       o       "waitmb": RCU is waiting for each CPU to execute a memory
+               barrier, which ensures that instructions from a given CPU's
+               last RCU read-side critical section cannot be reordered
+               with instructions following the memory-barrier instruction.
+
+The output of "cat rcu/rcugp" looks as follows:
+
+oldggp=48870  newggp=48873
+
+Note that reading from this file provokes a synchronize_rcu().  The
+"oldggp" value is that of "ggp" from rcu/rcuctrs above, taken before
+executing the synchronize_rcu(), and the "newggp" value is also the
+"ggp" value, but taken after the synchronize_rcu() command returns.
+
+
+The output of "cat rcu/rcugp" looks as follows:
+
+na=1337955 nl=40 wa=1337915 wl=44 da=1337871 dl=0 dr=1337871 di=1337871
+1=50989 e1=6138 i1=49722 ie1=82 g1=49640 a1=315203 ae1=265563 a2=49640
+z1=1401244 ze1=1351605 z2=49639 m1=5661253 me1=5611614 m2=49639
+
+These are counters tracking internal preemptable-RCU events, however,
+some of them may be useful for debugging algorithms using RCU.  In
+particular, the "nl", "wl", and "dl" values track the number of RCU
+callbacks in various states.  The fields are as follows:
+
+o      "na" is the total number of RCU callbacks that have been enqueued
+       since boot.
+
+o      "nl" is the number of RCU callbacks waiting for the previous
+       grace period to end so that they can start waiting on the next
+       grace period.
+
+o      "wa" is the total number of RCU callbacks that have started waiting
+       for a grace period since boot.  "na" should be roughly equal to
+       "nl" plus "wa".
+
+o      "wl" is the number of RCU callbacks currently waiting for their
+       grace period to end.
+
+o      "da" is the total number of RCU callbacks whose grace periods
+       have completed since boot.  "wa" should be roughly equal to
+       "wl" plus "da".
+
+o      "dr" is the total number of RCU callbacks that have been removed
+       from the list of callbacks ready to invoke.  "dr" should be roughly
+       equal to "da".
+
+o      "di" is the total number of RCU callbacks that have been invoked
+       since boot.  "di" should be roughly equal to "da", though some
+       early versions of preemptable RCU had a bug so that only the
+       last CPU's count of invocations was displayed, rather than the
+       sum of all CPU's counts.
+
+o      "1" is the number of calls to rcu_try_flip().  This should be
+       roughly equal to the sum of "e1", "i1", "a1", "z1", and "m1"
+       described below.  In other words, the number of times that
+       the state machine is visited should be equal to the sum of the
+       number of times that each state is visited plus the number of
+       times that the state-machine lock acquisition failed.
+
+o      "e1" is the number of times that rcu_try_flip() was unable to
+       acquire the fliplock.
+
+o      "i1" is the number of calls to rcu_try_flip_idle().
+
+o      "ie1" is the number of times rcu_try_flip_idle() exited early
+       due to the calling CPU having no work for RCU.
+
+o      "g1" is the number of times that rcu_try_flip_idle() decided
+       to start a new grace period.  "i1" should be roughly equal to
+       "ie1" plus "g1".
+
+o      "a1" is the number of calls to rcu_try_flip_waitack().
+
+o      "ae1" is the number of times that rcu_try_flip_waitack() found
+       that at least one CPU had not yet acknowledge the new grace period
+       (AKA "counter flip").
+
+o      "a2" is the number of time rcu_try_flip_waitack() found that
+       all CPUs had acknowledged.  "a1" should be roughly equal to
+       "ae1" plus "a2".  (This particular output was collected on
+       a 128-CPU machine, hence the smaller-than-usual fraction of
+       calls to rcu_try_flip_waitack() finding all CPUs having already
+       acknowledged.)
+
+o      "z1" is the number of calls to rcu_try_flip_waitzero().
+
+o      "ze1" is the number of times that rcu_try_flip_waitzero() found
+       that not all of the old RCU read-side critical sections had
+       completed.
+
+o      "z2" is the number of times that rcu_try_flip_waitzero() finds
+       the sum of the counters equal to zero, in other words, that
+       all of the old RCU read-side critical sections had completed.
+       The value of "z1" should be roughly equal to "ze1" plus
+       "z2".
+
+o      "m1" is the number of calls to rcu_try_flip_waitmb().
+
+o      "me1" is the number of times that rcu_try_flip_waitmb() finds
+       that at least one CPU has not yet executed a memory barrier.
+
+o      "m2" is the number of times that rcu_try_flip_waitmb() finds that
+       all CPUs have executed a memory barrier.
+
+
+Hierarchical RCU debugfs Files and Formats
+
+This implementation of RCU provides three debugfs files under the
+top-level directory RCU: rcu/rcudata (which displays fields in struct
+rcu_data), rcu/rcugp (which displays grace-period counters), and
+rcu/rcuhier (which displays the struct rcu_node hierarchy).
+
+The output of "cat rcu/rcudata" looks as follows:
+
+rcu:
+  0 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=1 rp=3c2a dt=23301/73 dn=2 df=1882 of=0 ri=2126 ql=2 b=10
+  1 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=3 rp=39a6 dt=78073/1 dn=2 df=1402 of=0 ri=1875 ql=46 b=10
+  2 c=4010 g=4010 pq=1 pqc=4010 qp=0 rpfq=-5 rp=1d12 dt=16646/0 dn=2 df=3140 of=0 ri=2080 ql=0 b=10
+  3 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=2b50 dt=21159/1 dn=2 df=2230 of=0 ri=1923 ql=72 b=10
+  4 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1644 dt=5783/1 dn=2 df=3348 of=0 ri=2805 ql=7 b=10
+  5 c=4012 g=4013 pq=0 pqc=4011 qp=1 rpfq=3 rp=1aac dt=5879/1 dn=2 df=3140 of=0 ri=2066 ql=10 b=10
+  6 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=ed8 dt=5847/1 dn=2 df=3797 of=0 ri=1266 ql=10 b=10
+  7 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1fa2 dt=6199/1 dn=2 df=2795 of=0 ri=2162 ql=28 b=10
+rcu_bh:
+  0 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-145 rp=21d6 dt=23301/73 dn=2 df=0 of=0 ri=0 ql=0 b=10
+  1 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-170 rp=20ce dt=78073/1 dn=2 df=26 of=0 ri=5 ql=0 b=10
+  2 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-83 rp=fbd dt=16646/0 dn=2 df=28 of=0 ri=4 ql=0 b=10
+  3 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-105 rp=178c dt=21159/1 dn=2 df=28 of=0 ri=2 ql=0 b=10
+  4 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-30 rp=b54 dt=5783/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
+  5 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-29 rp=df5 dt=5879/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
+  6 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-28 rp=788 dt=5847/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
+  7 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-53 rp=1098 dt=6199/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
+
+The first section lists the rcu_data structures for rcu, the second for
+rcu_bh.  Each section has one line per CPU, or eight for this 8-CPU system.
+The fields are as follows:
+
+o      The number at the beginning of each line is the CPU number.
+       CPUs numbers followed by an exclamation mark are offline,
+       but have been online at least once since boot.  There will be
+       no output for CPUs that have never been online, which can be
+       a good thing in the surprisingly common case where NR_CPUS is
+       substantially larger than the number of actual CPUs.
+
+o      "c" is the count of grace periods that this CPU believes have
+       completed.  CPUs in dynticks idle mode may lag quite a ways
+       behind, for example, CPU 4 under "rcu" above, which has slept
+       through the past 25 RCU grace periods.  It is not unusual to
+       see CPUs lagging by thousands of grace periods.
+
+o      "g" is the count of grace periods that this CPU believes have
+       started.  Again, CPUs in dynticks idle mode may lag behind.
+       If the "c" and "g" values are equal, this CPU has already
+       reported a quiescent state for the last RCU grace period that
+       it is aware of, otherwise, the CPU believes that it owes RCU a
+       quiescent state.
+
+o      "pq" indicates that this CPU has passed through a quiescent state
+       for the current grace period.  It is possible for "pq" to be
+       "1" and "c" different than "g", which indicates that although
+       the CPU has passed through a quiescent state, either (1) this
+       CPU has not yet reported that fact, (2) some other CPU has not
+       yet reported for this grace period, or (3) both.
+
+o      "pqc" indicates which grace period the last-observed quiescent
+       state for this CPU corresponds to.  This is important for handling
+       the race between CPU 0 reporting an extended dynticks-idle
+       quiescent state for CPU 1 and CPU 1 suddenly waking up and
+       reporting its own quiescent state.  If CPU 1 was the last CPU
+       for the current grace period, then the CPU that loses this race
+       will attempt to incorrectly mark CPU 1 as having checked in for
+       the next grace period!
+
+o      "qp" indicates that RCU still expects a quiescent state from
+       this CPU.
+
+o      "rpfq" is the number of rcu_pending() calls on this CPU required
+       to induce this CPU to invoke force_quiescent_state().
+
+o      "rp" is low-order four hex digits of the count of how many times
+       rcu_pending() has been invoked on this CPU.
+
+o      "dt" is the current value of the dyntick counter that is incremented
+       when entering or leaving dynticks idle state, either by the
+       scheduler or by irq.  The number after the "/" is the interrupt
+       nesting depth when in dyntick-idle state, or one greater than
+       the interrupt-nesting depth otherwise.
+
+       This field is displayed only for CONFIG_NO_HZ kernels.
+
+o      "dn" is the current value of the dyntick counter that is incremented
+       when entering or leaving dynticks idle state via NMI.  If both
+       the "dt" and "dn" values are even, then this CPU is in dynticks
+       idle mode and may be ignored by RCU.  If either of these two
+       counters is odd, then RCU must be alert to the possibility of
+       an RCU read-side critical section running on this CPU.
+
+       This field is displayed only for CONFIG_NO_HZ kernels.
+
+o      "df" is the number of times that some other CPU has forced a
+       quiescent state on behalf of this CPU due to this CPU being in
+       dynticks-idle state.
+
+       This field is displayed only for CONFIG_NO_HZ kernels.
+
+o      "of" is the number of times that some other CPU has forced a
+       quiescent state on behalf of this CPU due to this CPU being
+       offline.  In a perfect world, this might neve happen, but it
+       turns out that offlining and onlining a CPU can take several grace
+       periods, and so there is likely to be an extended period of time
+       when RCU believes that the CPU is online when it really is not.
+       Please note that erring in the other direction (RCU believing a
+       CPU is offline when it is really alive and kicking) is a fatal
+       error, so it makes sense to err conservatively.
+
+o      "ri" is the number of times that RCU has seen fit to send a
+       reschedule IPI to this CPU in order to get it to report a
+       quiescent state.
+
+o      "ql" is the number of RCU callbacks currently residing on
+       this CPU.  This is the total number of callbacks, regardless
+       of what state they are in (new, waiting for grace period to
+       start, waiting for grace period to end, ready to invoke).
+
+o      "b" is the batch limit for this CPU.  If more than this number
+       of RCU callbacks is ready to invoke, then the remainder will
+       be deferred.
+
+
+The output of "cat rcu/rcugp" looks as follows:
+
+rcu: completed=33062  gpnum=33063
+rcu_bh: completed=464  gpnum=464
+
+Again, this output is for both "rcu" and "rcu_bh".  The fields are
+taken from the rcu_state structure, and are as follows:
+
+o      "completed" is the number of grace periods that have completed.
+       It is comparable to the "c" field from rcu/rcudata in that a
+       CPU whose "c" field matches the value of "completed" is aware
+       that the corresponding RCU grace period has completed.
+
+o      "gpnum" is the number of grace periods that have started.  It is
+       comparable to the "g" field from rcu/rcudata in that a CPU
+       whose "g" field matches the value of "gpnum" is aware that the
+       corresponding RCU grace period has started.
+
+       If these two fields are equal (as they are for "rcu_bh" above),
+       then there is no grace period in progress, in other words, RCU
+       is idle.  On the other hand, if the two fields differ (as they
+       do for "rcu" above), then an RCU grace period is in progress.
+
+
+The output of "cat rcu/rcuhier" looks as follows, with very long lines:
+
+c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6
+1/1 0:127 ^0    
+3/3 0:35 ^0    0/0 36:71 ^1    0/0 72:107 ^2    0/0 108:127 ^3    
+3/3f 0:5 ^0    2/3 6:11 ^1    0/0 12:17 ^2    0/0 18:23 ^3    0/0 24:29 ^4    0/0 30:35 ^5    0/0 36:41 ^0    0/0 42:47 ^1    0/0 48:53 ^2    0/0 54:59 ^3    0/0 60:65 ^4    0/0 66:71 ^5    0/0 72:77 ^0    0/0 78:83 ^1    0/0 84:89 ^2    0/0 90:95 ^3    0/0 96:101 ^4    0/0 102:107 ^5    0/0 108:113 ^0    0/0 114:119 ^1    0/0 120:125 ^2    0/0 126:127 ^3    
+rcu_bh:
+c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0
+0/1 0:127 ^0    
+0/3 0:35 ^0    0/0 36:71 ^1    0/0 72:107 ^2    0/0 108:127 ^3    
+0/3f 0:5 ^0    0/3 6:11 ^1    0/0 12:17 ^2    0/0 18:23 ^3    0/0 24:29 ^4    0/0 30:35 ^5    0/0 36:41 ^0    0/0 42:47 ^1    0/0 48:53 ^2    0/0 54:59 ^3    0/0 60:65 ^4    0/0 66:71 ^5    0/0 72:77 ^0    0/0 78:83 ^1    0/0 84:89 ^2    0/0 90:95 ^3    0/0 96:101 ^4    0/0 102:107 ^5    0/0 108:113 ^0    0/0 114:119 ^1    0/0 120:125 ^2    0/0 126:127 ^3
+
+This is once again split into "rcu" and "rcu_bh" portions.  The fields are
+as follows:
+
+o      "c" is exactly the same as "completed" under rcu/rcugp.
+
+o      "g" is exactly the same as "gpnum" under rcu/rcugp.
+
+o      "s" is the "signaled" state that drives force_quiescent_state()'s
+       state machine.
+
+o      "jfq" is the number of jiffies remaining for this grace period
+       before force_quiescent_state() is invoked to help push things
+       along.  Note that CPUs in dyntick-idle mode thoughout the grace
+       period will not report on their own, but rather must be check by
+       some other CPU via force_quiescent_state().
+
+o      "j" is the low-order four hex digits of the jiffies counter.
+       Yes, Paul did run into a number of problems that turned out to
+       be due to the jiffies counter no longer counting.  Why do you ask?
+
+o      "nfqs" is the number of calls to force_quiescent_state() since
+       boot.
+
+o      "nfqsng" is the number of useless calls to force_quiescent_state(),
+       where there wasn't actually a grace period active.  This can
+       happen due to races.  The number in parentheses is the difference
+       between "nfqs" and "nfqsng", or the number of times that
+       force_quiescent_state() actually did some real work.
+
+o      "fqlh" is the number of calls to force_quiescent_state() that
+       exited immediately (without even being counted in nfqs above)
+       due to contention on ->fqslock.
+
+o      Each element of the form "1/1 0:127 ^0" represents one struct
+       rcu_node.  Each line represents one level of the hierarchy, from
+       root to leaves.  It is best to think of the rcu_data structures
+       as forming yet another level after the leaves.  Note that there
+       might be either one, two, or three levels of rcu_node structures,
+       depending on the relationship between CONFIG_RCU_FANOUT and
+       CONFIG_NR_CPUS.
+       
+       o       The numbers separated by the "/" are the qsmask followed
+               by the qsmaskinit.  The qsmask will have one bit
+               set for each entity in the next lower level that
+               has not yet checked in for the current grace period.
+               The qsmaskinit will have one bit for each entity that is
+               currently expected to check in during each grace period.
+               The value of qsmaskinit is assigned to that of qsmask
+               at the beginning of each grace period.
+
+               For example, for "rcu", the qsmask of the first entry
+               of the lowest level is 0x14, meaning that we are still
+               waiting for CPUs 2 and 4 to check in for the current
+               grace period.
+
+       o       The numbers separated by the ":" are the range of CPUs
+               served by this struct rcu_node.  This can be helpful
+               in working out how the hierarchy is wired together.
+
+               For example, the first entry at the lowest level shows
+               "0:5", indicating that it covers CPUs 0 through 5.
+
+       o       The number after the "^" indicates the bit in the
+               next higher level rcu_node structure that this
+               rcu_node structure corresponds to.
+
+               For example, the first entry at the lowest level shows
+               "^0", indicating that it corresponds to bit zero in
+               the first entry at the middle level.
index 4dbb8be..3c5434c 100644 (file)
@@ -914,7 +914,7 @@ I/O scheduler, a.k.a. elevator, is implemented in two layers.  Generic dispatch
 queue and specific I/O schedulers.  Unless stated otherwise, elevator is used
 to refer to both parts and I/O scheduler to specific I/O schedulers.
 
-Block layer implements generic dispatch queue in ll_rw_blk.c and elevator.c.
+Block layer implements generic dispatch queue in block/*.c.
 The generic dispatch queue is responsible for properly ordering barrier
 requests, requeueing, handling non-fs requests and all other subtleties.
 
@@ -926,8 +926,8 @@ be built inside the kernel.  Each queue can choose different one and can also
 change to another one dynamically.
 
 A block layer call to the i/o scheduler follows the convention elv_xxx(). This
-calls elevator_xxx_fn in the elevator switch (drivers/block/elevator.c). Oh,
-xxx and xxx might not match exactly, but use your imagination. If an elevator
+calls elevator_xxx_fn in the elevator switch (block/elevator.c). Oh, xxx
+and xxx might not match exactly, but use your imagination. If an elevator
 doesn't implement a function, the switch does nothing or some minimal house
 keeping work.
 
index 4ba4664..9cb9138 100644 (file)
@@ -71,35 +71,50 @@ Look at the current lock statistics:
 
 # less /proc/lock_stat
 
-01 lock_stat version 0.2
+01 lock_stat version 0.3
 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
+06                          &mm->mmap_sem-W:           233            538 18446744073708       22924.27      607243.51           1342          45806           1.71        8595.89     1180582.34
+07                          &mm->mmap_sem-R:           205            587 18446744073708       28403.36      731975.00           1940         412426           0.58      187825.45     6307502.88
+08                          ---------------
+09                            &mm->mmap_sem            487          [<ffffffff8053491f>] do_page_fault+0x466/0x928
+10                            &mm->mmap_sem            179          [<ffffffff802a6200>] sys_mprotect+0xcd/0x21d
+11                            &mm->mmap_sem            279          [<ffffffff80210a57>] sys_mmap+0x75/0xce
+12                            &mm->mmap_sem             76          [<ffffffff802a490b>] sys_munmap+0x32/0x59
+13                          ---------------
+14                            &mm->mmap_sem            270          [<ffffffff80210a57>] sys_mmap+0x75/0xce
+15                            &mm->mmap_sem            431          [<ffffffff8053491f>] do_page_fault+0x466/0x928
+16                            &mm->mmap_sem            138          [<ffffffff802a490b>] sys_munmap+0x32/0x59
+17                            &mm->mmap_sem            145          [<ffffffff802a6200>] sys_mprotect+0xcd/0x21d
+18
+19 ...............................................................................................................................................................................................
+20
+21                              dcache_lock:           621            623           0.52         118.26        1053.02           6745          91930           0.29         316.29      118423.41
+22                              -----------
+23                              dcache_lock            179          [<ffffffff80378274>] _atomic_dec_and_lock+0x34/0x54
+24                              dcache_lock            113          [<ffffffff802cc17b>] d_alloc+0x19a/0x1eb
+25                              dcache_lock             99          [<ffffffff802ca0dc>] d_rehash+0x1b/0x44
+26                              dcache_lock            104          [<ffffffff802cbca0>] d_instantiate+0x36/0x8a
+27                              -----------
+28                              dcache_lock            192          [<ffffffff80378274>] _atomic_dec_and_lock+0x34/0x54
+29                              dcache_lock             98          [<ffffffff802ca0dc>] d_rehash+0x1b/0x44
+30                              dcache_lock             72          [<ffffffff802cc17b>] d_alloc+0x19a/0x1eb
+31                              dcache_lock            112          [<ffffffff802cbca0>] d_instantiate+0x36/0x8a
 
 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
+show the header with column descriptions. Lines 05-18 and 20-31 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.
+short separator (line 08, 13) from the contention points.
 
-The first lock (05-10) is a read/write lock, and shows two lines above the
+The first lock (05-18) 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.
+they have two: contentions and [<IP>] symbol. The second set of contention
+points are the points we're contending with.
 
+The integer part of the time values is in us.
 
 View the top contending locks:
 
index 09ff7d8..d13a969 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -205,13 +205,14 @@ ifeq ($(ARCH),x86_64)
         SRCARCH := x86
 endif
 
-# Where to locate arch specific headers
+# Additional ARCH settings for sparc
 ifeq ($(ARCH),sparc64)
-       hdr-arch  := sparc
-else
-       hdr-arch  := $(SRCARCH)
+       SRCARCH := sparc
 endif
 
+# Where to locate arch specific headers
+hdr-arch  := $(SRCARCH)
+
 KCONFIG_CONFIG ?= .config
 
 # SHELL used by kbuild
index 471e72d..2e13aa2 100644 (file)
@@ -6,6 +6,8 @@ config OPROFILE
        tristate "OProfile system profiling (EXPERIMENTAL)"
        depends on PROFILING
        depends on HAVE_OPROFILE
+       select TRACING
+       select RING_BUFFER
        help
          OProfile is a profiling system capable of profiling the
          whole system, include the kernel, kernel modules, libraries,
index e971ab0..eda9b90 100644 (file)
@@ -96,9 +96,6 @@ static inline dma_addr_t __deprecated isa_page_to_bus(struct page *page)
        return page_to_phys(page);
 }
 
-/* This depends on working iommu.  */
-#define BIO_VMERGE_BOUNDARY    (alpha_mv.mv_pci_tbi ? PAGE_SIZE : 0)
-
 /* Maximum PIO space address supported?  */
 #define IO_SPACE_LIMIT 0xffff
 
index f4e55be..afad9f5 100644 (file)
@@ -208,6 +208,7 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
                break;
        case ERR_TYPE_KERNEL_PANIC:
        default:
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                return;
        }
@@ -227,6 +228,7 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
        /* Check to see if we need to or have stopped logging */
        if (fatal || !logging_enabled) {
                logging_enabled = 0;
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                return;
        }
@@ -249,11 +251,13 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
                else
                        rtas_log_start += 1;
 
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                wake_up_interruptible(&rtas_log_wait);
                break;
        case ERR_TYPE_KERNEL_PANIC:
        default:
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                return;
        }
index ef3635b..0767827 100644 (file)
@@ -263,7 +263,7 @@ int s390_enable_sie(void)
        /* lets check if we are allowed to replace the mm */
        task_lock(tsk);
        if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-           tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+           tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
                task_unlock(tsk);
                return -EINVAL;
        }
@@ -279,7 +279,7 @@ int s390_enable_sie(void)
        /* Now lets check again if something happened */
        task_lock(tsk);
        if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
-           tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
+           tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
                mmput(mm);
                task_unlock(tsk);
                return -EINVAL;
index e594559..0a94d9c 100644 (file)
 
 mainmenu "Linux/SPARC Kernel Configuration"
 
+config SPARC
+       bool
+       default y
+       select HAVE_IDE
+       select HAVE_OPROFILE
+       select HAVE_ARCH_KGDB if !SMP || SPARC64
+       select HAVE_ARCH_TRACEHOOK
+       select ARCH_WANT_OPTIONAL_GPIOLIB
+       select RTC_CLASS
+       select RTC_DRV_M48T59
+
+# Identify this as a Sparc32 build
+config SPARC32
+       bool
+       default y if ARCH = "sparc"
+       help
+         SPARC is a family of RISC microprocessors designed and marketed by
+         Sun Microsystems, incorporated.  They are very widely found in Sun
+         workstations and clones. This port covers the original 32-bit SPARC;
+         it is old and stable and usually considered one of the "big three"
+         along with the Intel and Alpha ports.  The UltraLinux project
+         maintains both the SPARC32 and SPARC64 ports; its web page is
+         available at <http://www.ultralinux.org/>.
+
+config SPARC64
+       bool
+       default y if ARCH = "sparc64"
+       select ARCH_SUPPORTS_MSI
+       select HAVE_FUNCTION_TRACER
+       select HAVE_KRETPROBES
+       select HAVE_KPROBES
+       select HAVE_LMB
+       select USE_GENERIC_SMP_HELPERS if SMP
+       select RTC_DRV_CMOS
+       select RTC_DRV_BQ4802
+       select RTC_DRV_SUN4V
+       select RTC_DRV_STARFIRE
+
+config ARCH_DEFCONFIG
+       string
+       default "arch/sparc/configs/sparc32_defconfig" if SPARC32
+       default "arch/sparc/configs/sparc64_defconfig" if SPARC64
+
+# CONFIG_BITS can be used at source level to get 32/64 bits
+config BITS
+       int
+       default 32 if SPARC32
+       default 64 if SPARC64
+
+config 64BIT
+       def_bool y if SPARC64
+
+config GENERIC_TIME
+       bool
+       default y if SPARC64
+
+config GENERIC_CMOS_UPDATE
+       bool
+       default y if SPARC64
+
+config GENERIC_CLOCKEVENTS
+       bool
+       default y if SPARC64
+
+config IOMMU_HELPER
+       bool
+       default y if SPARC64
+
+config QUICKLIST
+       bool
+       default y if SPARC64
+
+config STACKTRACE_SUPPORT
+       bool
+       default y if SPARC64
+
+config LOCKDEP_SUPPORT
+       bool
+       default y if SPARC64
+
+config HAVE_LATENCYTOP_SUPPORT
+       bool
+       default y if SPARC64
+
+config AUDIT_ARCH
+       bool
+       default y
+
+config HAVE_SETUP_PER_CPU_AREA
+       def_bool y if SPARC64
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       bool
+       def_bool y if SPARC64
+
 config MMU
        bool
        default y
 
 config HIGHMEM
        bool
-       default y
+       default y if SPARC32
 
 config ZONE_DMA
        bool
-       default y
+       default y if SPARC32
 
 config GENERIC_ISA_DMA
        bool
-       default y
+       default y if SPARC32
 
 config GENERIC_GPIO
        bool
@@ -31,15 +126,11 @@ config ARCH_NO_VIRT_TO_BUS
 config OF
        def_bool y
 
-config HZ
-       int
-       default 100
-
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
 
-menu "General machine setup"
+menu "Processor type and features"
 
 config SMP
        bool "Symmetric multi-processing support (does not work on sun4/sun4c)"
@@ -64,82 +155,269 @@ config SMP
          If you don't know what to do here, say N.
 
 config NR_CPUS
-       int "Maximum number of CPUs (2-32)"
-       range 2 32
+       int "Maximum number of CPUs"
        depends on SMP
-       default "32"
+       range 2 32 if SPARC32
+       range 2 1024 if SPARC64
+       default 32 if SPARC32
+       default 64 if SPARC64
 
-config SPARC
+source kernel/Kconfig.hz
+
+config RWSEM_GENERIC_SPINLOCK
+       bool
+       default y if SPARC32
+
+config RWSEM_XCHGADD_ALGORITHM
+       bool
+       default y if SPARC64
+
+config GENERIC_FIND_NEXT_BIT
        bool
        default y
-       select HAVE_IDE
-       select HAVE_OPROFILE
-       select HAVE_ARCH_KGDB if !SMP
-       select HAVE_ARCH_TRACEHOOK
-       select ARCH_WANT_OPTIONAL_GPIOLIB
-       select RTC_CLASS
-       select RTC_DRV_M48T59
 
-# Identify this as a Sparc32 build
-config SPARC32
+config GENERIC_HWEIGHT
+       bool
+       default y if !ULTRA_HAS_POPULATION_COUNT
+
+config GENERIC_CALIBRATE_DELAY
        bool
        default y
-       help
-         SPARC is a family of RISC microprocessors designed and marketed by
-         Sun Microsystems, incorporated.  They are very widely found in Sun
-         workstations and clones. This port covers the original 32-bit SPARC;
-         it is old and stable and usually considered one of the "big three"
-         along with the Intel and Alpha ports.  The UltraLinux project
-         maintains both the SPARC32 and SPARC64 ports; its web page is
-         available at <http://www.ultralinux.org/>.
 
-# Global things across all Sun machines.
-config ISA
+config ARCH_MAY_HAVE_PC_FDC
        bool
-       help
-         ISA is found on Espresso only and is not supported currently.
-         Say N
+       default y
 
-config EISA
+config ARCH_HAS_ILOG2_U32
        bool
+       default n
+
+config ARCH_HAS_ILOG2_U64
+       bool
+       default n
+
+config EMULATED_CMPXCHG
+       bool
+       default y if SPARC32
        help
-         EISA is not supported.
-         Say N
+         Sparc32 does not have a CAS instruction like sparc64. cmpxchg()
+         is emulated, and therefore it is not completely atomic.
 
-config MCA
+# Makefile helpers
+config SPARC32_SMP
+       bool
+       default y
+       depends on SPARC32 && SMP
+
+config SPARC64_SMP
        bool
+       default y
+       depends on SPARC64 && SMP
+
+choice
+       prompt "Kernel page size" if SPARC64
+       default SPARC64_PAGE_SIZE_8KB
+
+config SPARC64_PAGE_SIZE_8KB
+       bool "8KB"
        help
-         MCA is not supported.
-         Say N
+         This lets you select the page size of the kernel.
 
-config PCMCIA
-       tristate
-       ---help---
-         Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-         computer.  These are credit-card size devices such as network cards,
-         modems or hard drives often used with laptops computers.  There are
-         actually two varieties of these cards: the older 16 bit PCMCIA cards
-         and the newer 32 bit CardBus cards.  If you want to use CardBus
-         cards, you need to say Y here and also to "CardBus support" below.
+         8KB and 64KB work quite well, since SPARC ELF sections
+         provide for up to 64KB alignment.
 
-         To use your PC-cards, you will need supporting software from David
-         Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-         for location).  Please also read the PCMCIA-HOWTO, available from
-         <http://www.tldp.org/docs.html#howto>.
+         If you don't know what to do, choose 8KB.
 
-         To compile this driver as modules, choose M here: the
-         modules will be called pcmcia_core and ds.
+config SPARC64_PAGE_SIZE_64KB
+       bool "64KB"
 
-config SBUS
+endchoice
+
+config SECCOMP
+       bool "Enable seccomp to safely compute untrusted bytecode"
+       depends on SPARC64 && PROC_FS
+       default y
+       help
+         This kernel feature is useful for number crunching applications
+         that may need to compute untrusted bytecode during their
+         execution. By using pipes or other transports made available to
+         the process as file descriptors supporting the read/write
+         syscalls, it's possible to isolate those applications in
+         their own address space using seccomp. Once seccomp is
+         enabled via /proc/<pid>/seccomp, it cannot be disabled
+         and the task is only allowed to execute a few safe syscalls
+         defined by each seccomp mode.
+
+         If unsure, say Y. Only embedded should say N here.
+
+config HOTPLUG_CPU
+       bool "Support for hot-pluggable CPUs"
+       depends on SPARC64 && SMP
+       select HOTPLUG
+       help
+         Say Y here to experiment with turning CPUs off and on.  CPUs
+         can be controlled through /sys/devices/system/cpu/cpu#.
+         Say N if you want to disable CPU hotplug.
+
+config GENERIC_HARDIRQS
        bool
+       default y if SPARC64
+
+source "kernel/time/Kconfig"
+
+if SPARC64
+source "drivers/cpufreq/Kconfig"
+
+config US3_FREQ
+       tristate "UltraSPARC-III CPU Frequency driver"
+       depends on CPU_FREQ
+       select CPU_FREQ_TABLE
+       help
+         This adds the CPUFreq driver for UltraSPARC-III processors.
+
+         For details, take a look at <file:Documentation/cpu-freq>.
+
+         If in doubt, say N.
+
+config US2E_FREQ
+       tristate "UltraSPARC-IIe CPU Frequency driver"
+       depends on CPU_FREQ
+       select CPU_FREQ_TABLE
+       help
+         This adds the CPUFreq driver for UltraSPARC-IIe processors.
+
+         For details, take a look at <file:Documentation/cpu-freq>.
+
+         If in doubt, say N.
+
+endif
+
+config US3_MC
+       tristate "UltraSPARC-III Memory Controller driver"
+       depends on SPARC64
        default y
+       help
+         This adds a driver for the UltraSPARC-III memory controller.
+         Loading this driver allows exact mnemonic strings to be
+         printed in the event of a memory error, so that the faulty DIMM
+         on the motherboard can be matched to the error.
 
-config SBUSCHAR
+         If in doubt, say Y, as this information can be very useful.
+
+# Global things across all Sun machines.
+config GENERIC_LOCKBREAK
        bool
        default y
+       depends on SPARC64 && SMP && PREEMPT
+
+choice
+       prompt "SPARC64 Huge TLB Page Size"
+       depends on SPARC64 && HUGETLB_PAGE
+       default HUGETLB_PAGE_SIZE_4MB
+
+config HUGETLB_PAGE_SIZE_4MB
+       bool "4MB"
+
+config HUGETLB_PAGE_SIZE_512K
+       bool "512K"
+
+config HUGETLB_PAGE_SIZE_64K
+       depends on !SPARC64_PAGE_SIZE_64KB
+       bool "64K"
+
+endchoice
+
+config NUMA
+       bool "NUMA support"
+       depends on SPARC64 && SMP
+
+config NODES_SHIFT
+       int
+       default "4"
+       depends on NEED_MULTIPLE_NODES
+
+# Some NUMA nodes have memory ranges that span
+# other nodes.  Even though a pfn is valid and
+# between a node's start and end pfns, it may not
+# reside on that node.  See memmap_init_zone()
+# for details.
+config NODES_SPAN_OTHER_NODES
+       def_bool y
+       depends on NEED_MULTIPLE_NODES
+
+config ARCH_POPULATES_NODE_MAP
+       def_bool y if SPARC64
+
+config ARCH_SELECT_MEMORY_MODEL
+       def_bool y if SPARC64
+
+config ARCH_SPARSEMEM_ENABLE
+       def_bool y if SPARC64
+       select SPARSEMEM_VMEMMAP_ENABLE
+
+config ARCH_SPARSEMEM_DEFAULT
+       def_bool y if SPARC64
+
+source "mm/Kconfig"
+
+config SCHED_SMT
+       bool "SMT (Hyperthreading) scheduler support"
+       depends on SPARC64 && SMP
+       default y
+       help
+         SMT scheduler support improves the CPU scheduler's decision making
+         when dealing with SPARC cpus at a cost of slightly increased overhead
+         in some places. If unsure say N here.
+
+config SCHED_MC
+       bool "Multi-core scheduler support"
+       depends on SPARC64 && SMP
+       default y
+       help
+         Multi-core scheduler support improves the CPU scheduler's decision
+         making when dealing with multi-core CPU chips at a cost of slightly
+         increased overhead in some places. If unsure say N here.
+
+if SPARC64
+source "kernel/Kconfig.preempt"
+endif
+
+config CMDLINE_BOOL
+       bool "Default bootloader kernel arguments"
+       depends on SPARC64
+
+config CMDLINE
+       string "Initial kernel command string"
+       depends on CMDLINE_BOOL
+       default "console=ttyS0,9600 root=/dev/sda1"
+       help
+         Say Y here if you want to be able to pass default arguments to
+         the kernel. This will be overridden by the bootloader, if you
+         use one (such as SILO). This is most useful if you want to boot
+         a kernel from TFTP, and want default options to be available
+         with having them passed on the command line.
+
+         NOTE: This option WILL override the PROM bootargs setting!
+
+config SUN_PM
+       bool
+       default y if SPARC32
+       help
+         Enable power management and CPU standby features on supported
+         SPARC platforms.
+
+config SPARC_LED
+       tristate "Sun4m LED driver"
+       depends on SPARC32
+       help
+         This driver toggles the front-panel LED on sun4m systems
+         in a user-specifiable manner.  Its state can be probed
+         by reading /proc/led and its blinking mode can be changed
+         via writes to /proc/led
 
 config SERIAL_CONSOLE
        bool
+       depends on SPARC32
        default y
        ---help---
          If you say Y here, it will be possible to use a serial port as the
@@ -161,71 +439,66 @@ config SERIAL_CONSOLE
 
          If unsure, say N.
 
-config SUN_AUXIO
-       bool
-       default y
-
-config SUN_IO
-       bool
-       default y
-
-config RWSEM_GENERIC_SPINLOCK
-       bool
-       default y
+endmenu
 
-config RWSEM_XCHGADD_ALGORITHM
+menu "Bus options (PCI etc.)"
+config ISA
        bool
+       help
+         ISA is found on Espresso only and is not supported currently.
 
-config GENERIC_FIND_NEXT_BIT
+config ISAPNP
        bool
-       default y
+       help
+         ISAPNP is not supported
 
-config GENERIC_HWEIGHT
+config EISA
        bool
-       default y
+       help
+         EISA is not supported.
 
-config GENERIC_CALIBRATE_DELAY
+config MCA
        bool
-       default y
+       help
+         MCA is not supported.
 
-config ARCH_MAY_HAVE_PC_FDC
+config SBUS
        bool
        default y
 
-config ARCH_HAS_ILOG2_U32
-       bool
-       default n
-
-config ARCH_HAS_ILOG2_U64
-       bool
-       default n
-
-config EMULATED_CMPXCHG
+config SBUSCHAR
        bool
        default y
-       help
-         Sparc32 does not have a CAS instruction like sparc64. cmpxchg()
-         is emulated, and therefore it is not completely atomic.
 
-config SUN_PM
-       bool
-       default y
+config SUN_LDOMS
+       bool "Sun Logical Domains support"
+       depends on SPARC64
        help
-         Enable power management and CPU standby features on supported
-         SPARC platforms.
+         Say Y here is you want to support virtual devices via
+         Logical Domains.
 
 config PCI
        bool "Support for PCI and PS/2 keyboard/mouse"
        help
+         Find out whether your system includes a PCI bus. PCI is the name of
+         a bus system, i.e. the way the CPU talks to the other stuff inside
+         your box.  If you say Y here, the kernel will include drivers and
+         infrastructure code to support PCI bus devices.
+
          CONFIG_PCI is needed for all JavaStation's (including MrCoffee),
          CP-1200, JavaEngine-1, Corona, Red October, and Serengeti SGSC.
          All of these platforms are extremely obscure, so say N if unsure.
 
+config PCI_DOMAINS
+       def_bool PCI if SPARC64
+
 config PCI_SYSCALL
        def_bool PCI
 
 source "drivers/pci/Kconfig"
 
+source "drivers/pcmcia/Kconfig"
+
 config SUN_OPENPROMFS
        tristate "Openprom tree appears in /proc/openprom"
        help
@@ -239,17 +512,33 @@ config SUN_OPENPROMFS
          Only choose N if you know in advance that you will not need to modify
          OpenPROM settings on the running system.
 
-config SPARC_LED
-       tristate "Sun4m LED driver"
-       help
-         This driver toggles the front-panel LED on sun4m systems
-         in a user-specifiable manner.  Its state can be probed
-         by reading /proc/led and its blinking mode can be changed
-         via writes to /proc/led
+# Makefile helpers
+config SPARC32_PCI
+       bool
+       default y
+       depends on SPARC32 && PCI
+
+config SPARC64_PCI
+       bool
+       default y
+       depends on SPARC64 && PCI
+
+endmenu
+
+menu "Executable file formats"
 
 source "fs/Kconfig.binfmt"
 
-source "mm/Kconfig"
+config COMPAT
+       bool
+       depends on SPARC64
+       default y
+       select COMPAT_BINFMT_ELF
+
+config SYSVIPC_COMPAT
+       bool
+       depends on COMPAT && SYSVIPC
+       default y
 
 endmenu
 
@@ -259,40 +548,6 @@ source "drivers/Kconfig"
 
 source "drivers/sbus/char/Kconfig"
 
-# This one must be before the filesystem configs. -DaveM
-
-menu "Unix98 PTY support"
-
-config UNIX98_PTYS
-       bool "Unix98 PTY support"
-       ---help---
-         A pseudo terminal (PTY) is a software device consisting of two
-         halves: a master and a slave. The slave device behaves identical to
-         a physical terminal; the master device is used by a process to
-         read data from and write data to the slave, thereby emulating a
-         terminal. Typical programs for the master side are telnet servers
-         and xterms.
-
-         Linux has traditionally used the BSD-like names /dev/ptyxx for
-         masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-         has a number of problems. The GNU C library glibc 2.1 and later,
-         however, supports the Unix98 naming standard: in order to acquire a
-         pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-         terminal is then made available to the process and the pseudo
-         terminal slave can be accessed as /dev/pts/<number>. What was
-         traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-         The entries in /dev/pts/ are created on the fly by a virtual
-         file system; therefore, if you say Y here you should say Y to
-         "/dev/pts file system for Unix98 PTYs" as well.
-
-         If you want to say Y here, you need to have the C library glibc 2.1
-         or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-         Read the instructions in <file:Documentation/Changes> pertaining to
-         pseudo terminals. It's safe to say N.
-
-endmenu
-
 source "fs/Kconfig"
 
 source "arch/sparc/Kconfig.debug"
index 87dd496..b8a15e2 100644 (file)
@@ -15,4 +15,30 @@ config DEBUG_STACK_USAGE
 
          This option will slow down process creation somewhat.
 
+config DEBUG_DCFLUSH
+       bool "D-cache flush debugging"
+       depends on SPARC64 && DEBUG_KERNEL
+
+config STACK_DEBUG
+       bool "Stack Overflow Detection Support"
+
+config DEBUG_PAGEALLOC
+       bool "Debug page memory allocations"
+       depends on SPARC64 && DEBUG_KERNEL && !HIBERNATION
+       help
+         Unmap pages from the kernel linear mapping after free_pages().
+         This results in a large slowdown, but helps to find certain types
+         of memory corruptions.
+
+config MCOUNT
+       bool
+       depends on SPARC64
+       depends on STACK_DEBUG || FUNCTION_TRACER
+       default y
+
+config FRAME_POINTER
+       bool
+       depends on MCOUNT
+       default y
+
 endmenu
index 9592889..2003ded 100644 (file)
@@ -2,18 +2,31 @@
 # sparc/Makefile
 #
 # Makefile for the architecture dependent flags and dependencies on the
-# Sparc.
+# Sparc and sparc64.
 #
-# Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
+# Copyright (C) 1994,1996,1998 David S. Miller (davem@caip.rutgers.edu)
+# Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
+
+# We are not yet configured - so test on arch
+ifeq ($(ARCH),sparc)
+        KBUILD_DEFCONFIG := sparc32_defconfig
+else
+        KBUILD_DEFCONFIG := sparc64_defconfig
+endif
+
+ifeq ($(CONFIG_SPARC32),y)
+#####
+# sparc32
 #
 
 #
 # Uncomment the first KBUILD_CFLAGS if you are doing kgdb source level
 # debugging of the kernel to get the proper debugging information.
 
-AS              := $(AS) -32
-LDFLAGS                := -m elf32_sparc
-CHECKFLAGS     += -D__sparc__
+AS             := $(AS) -32
+LDFLAGS        := -m elf32_sparc
+CHECKFLAGS     += -D__sparc__
+export BITS    := 32
 
 #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
@@ -25,38 +38,60 @@ CPPFLAGS_vmlinux.lds += -m32
 #  Actual linking is done with "make image".
 LDFLAGS_vmlinux = -r
 
-head-y := arch/sparc/kernel/head.o arch/sparc/kernel/init_task.o
-HEAD_Y := $(head-y)
+# Default target
+all: zImage
+
+
+else
+#####
+# sparc64
+#
 
-core-y += arch/sparc/kernel/ arch/sparc/mm/ arch/sparc/math-emu/
-libs-y += arch/sparc/prom/ arch/sparc/lib/
+CHECKFLAGS      += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64
+
+# Undefine sparc when processing vmlinux.lds - it is used
+# And teach CPP we are doing 64 bit builds (for this case)
+CPPFLAGS_vmlinux.lds += -m64 -Usparc
+LDFLAGS              := -m elf64_sparc
+export BITS          := 64
+
+KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow   \
+                 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
+                 -Wa,--undeclared-regs
+KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
+KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
+
+ifeq ($(CONFIG_MCOUNT),y)
+  KBUILD_CFLAGS += -pg
+endif
+
+endif
+
+head-y                 := arch/sparc/kernel/head_$(BITS).o
+head-y                 += arch/sparc/kernel/init_task.o
+
+core-y                 += arch/sparc/kernel/
+core-y                 += arch/sparc/mm/ arch/sparc/math-emu/
+
+libs-y                 += arch/sparc/prom/
+libs-y                 += arch/sparc/lib/
 
 drivers-$(CONFIG_OPROFILE)     += arch/sparc/oprofile/
 
 # Export what is needed by arch/sparc/boot/Makefile
-# Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
-INIT_Y         := $(patsubst %/, %/built-in.o, $(init-y))
-CORE_Y         := $(core-y)
-CORE_Y         += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
-CORE_Y         := $(patsubst %/, %/built-in.o, $(CORE_Y))
-DRIVERS_Y      := $(patsubst %/, %/built-in.o, $(drivers-y))
-NET_Y          := $(patsubst %/, %/built-in.o, $(net-y))
-LIBS_Y1                := $(patsubst %/, %/lib.a, $(libs-y))
-LIBS_Y2                := $(patsubst %/, %/built-in.o, $(libs-y))
-LIBS_Y         := $(LIBS_Y1) $(LIBS_Y2)
+export VMLINUX_INIT VMLINUX_MAIN
+VMLINUX_INIT := $(head-y) $(init-y)
+VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/
+VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
+VMLINUX_MAIN += $(drivers-y) $(net-y)
 
 ifdef CONFIG_KALLSYMS
-kallsyms.o := .tmp_kallsyms2.o
+export kallsyms.o := .tmp_kallsyms2.o
 endif
 
-export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y kallsyms.o
-
-# Default target
-all: zImage
-
 boot := arch/sparc/boot
 
-image zImage tftpboot.img: vmlinux
+image zImage tftpboot.img vmlinux.aout: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 archclean:
@@ -65,11 +100,17 @@ archclean:
 # This is the image used for packaging
 KBUILD_IMAGE := $(boot)/zImage
 
-CLEAN_FILES += arch/$(ARCH)/boot/System.map
-
 # Don't use tabs in echo arguments.
+ifeq ($(ARCH),sparc)
 define archhelp
   echo  '* image        - kernel image ($(boot)/image)'
   echo  '* zImage       - stripped kernel image ($(boot)/zImage)'
   echo  '  tftpboot.img - image prepared for tftp'
 endef
+else
+define archhelp
+  echo  '* vmlinux       - Standard sparc64 kernel'
+  echo  '  vmlinux.aout  - a.out kernel for sparc64'
+  echo  '  tftpboot.img - image prepared for tftp'
+endef
+endif
diff --git a/arch/sparc/boot/.gitignore b/arch/sparc/boot/.gitignore
new file mode 100644 (file)
index 0000000..fc6f398
--- /dev/null
@@ -0,0 +1,8 @@
+btfix.S
+btfixupprep
+image
+zImage
+tftpboot.img
+vmlinux.aout
+piggyback
+
index 3e77a9f..96041a8 100644 (file)
@@ -6,13 +6,16 @@
 ROOT_IMG       := /usr/src/root.img
 ELFTOAOUT      := elftoaout
 
-hostprogs-y    := piggyback btfixupprep
-targets                := tftpboot.img btfix.o btfix.S image
+hostprogs-y    := piggyback_32 piggyback_64 btfixupprep
+targets                := tftpboot.img btfix.o btfix.S image zImage vmlinux.aout
+clean-files    := System.map
 
 quiet_cmd_elftoaout    = ELFTOAOUT $@
       cmd_elftoaout    = $(ELFTOAOUT) $(obj)/image -o $@
+
+ifeq ($(CONFIG_SPARC32),y)
 quiet_cmd_piggy                = PIGGY   $@
-      cmd_piggy                = $(obj)/piggyback $@ $(obj)/System.map $(ROOT_IMG)
+      cmd_piggy                = $(obj)/piggyback_32 $@ $(obj)/System.map $(ROOT_IMG)
 quiet_cmd_btfix                = BTFIX   $@
       cmd_btfix                = $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
 quiet_cmd_sysmap        = SYSMAP  $(obj)/System.map
@@ -37,8 +40,8 @@ define rule_image
        echo 'cmd_$@ := $(cmd_image)' > $(@D)/.$(@F).cmd
 endef
 
-BTOBJS := $(HEAD_Y) $(INIT_Y)
-BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
+BTOBJS := $(patsubst %/, %/built-in.o, $(VMLINUX_INIT))
+BTLIBS := $(patsubst %/, %/built-in.o, $(VMLINUX_MAIN))
 LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \
                   --start-group $(BTLIBS) --end-group \
                   $(kallsyms.o) $(obj)/btfix.o
@@ -61,3 +64,28 @@ $(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE
 
 $(obj)/btfix.S: $(obj)/btfixupprep vmlinux FORCE
        $(call if_changed,btfix)
+
+endif
+
+ifeq ($(CONFIG_SPARC64),y)
+quiet_cmd_piggy     = PIGGY   $@
+      cmd_piggy     = $(obj)/piggyback_64 $@ System.map $(ROOT_IMG)
+quiet_cmd_strip     = STRIP   $@
+      cmd_strip     = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start vmlinux -o $@
+
+
+# Actual linking
+$(obj)/image: vmlinux FORCE
+       $(call if_changed,strip)
+       @echo '  kernel: $@ is ready'
+
+$(obj)/tftpboot.img: vmlinux $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE
+       $(call if_changed,elftoaout)
+       $(call if_changed,piggy)
+       @echo '  kernel: $@ is ready'
+
+$(obj)/vmlinux.aout: vmlinux FORCE
+       $(call if_changed,elftoaout)
+       @echo '  kernel: $@ is ready'
+endif
+
index 2d2769d..89c260a 100644 (file)
@@ -15,8 +15,6 @@ header-y += signal_32.h
 header-y += signal_64.h
 header-y += stat_32.h
 header-y += stat_64.h
-header-y += unistd_32.h
-header-y += unistd_64.h
 
 header-y += apc.h
 header-y += asi.h
diff --git a/arch/sparc/include/asm/asm.h b/arch/sparc/include/asm/asm.h
new file mode 100644 (file)
index 0000000..e8e1d94
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef _SPARC_ASM_H
+#define _SPARC_ASM_H
+
+/* Macros to assist the sharing of assembler code between 32-bit and
+ * 64-bit sparc.
+ */
+
+#ifdef CONFIG_SPARC64
+#define BRANCH32(TYPE, PREDICT, DEST) \
+       TYPE,PREDICT    %icc, DEST
+#define BRANCH32_ANNUL(TYPE, PREDICT, DEST) \
+       TYPE,a,PREDICT  %icc, DEST
+#define BRANCH_REG_ZERO(PREDICT, REG, DEST) \
+       brz,PREDICT     REG, DEST
+#define BRANCH_REG_ZERO_ANNUL(PREDICT, REG, DEST) \
+       brz,a,PREDICT   REG, DEST
+#define BRANCH_REG_NOT_ZERO(PREDICT, REG, DEST) \
+       brnz,PREDICT    REG, DEST
+#define BRANCH_REG_NOT_ZERO_ANNUL(PREDICT, REG, DEST) \
+       brnz,a,PREDICT  REG, DEST
+#else
+#define BRANCH32(TYPE, PREDICT, DEST) \
+       TYPE            DEST
+#define BRANCH32_ANNUL(TYPE, PREDICT, DEST) \
+       TYPE,a          DEST
+#define BRANCH_REG_ZERO(PREDICT, REG, DEST) \
+       cmp             REG, 0; \
+       be              DEST
+#define BRANCH_REG_ZERO_ANNUL(PREDICT, REG, DEST) \
+       cmp             REG, 0; \
+       be,a            DEST
+#define BRANCH_REG_NOT_ZERO(PREDICT, REG, DEST) \
+       cmp             REG, 0; \
+       bne             DEST
+#define BRANCH_REG_NOT_ZERO_ANNUL(PREDICT, REG, DEST) \
+       cmp             REG, 0; \
+       bne,a           DEST
+#endif
+
+#endif /* _SPARC_ASM_H */
index 2c71ec4..5982c5a 100644 (file)
@@ -112,17 +112,10 @@ static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
 
 /* Atomic operations are already serializing */
-#ifdef CONFIG_SMP
-#define smp_mb__before_atomic_dec()    membar_storeload_loadload();
-#define smp_mb__after_atomic_dec()     membar_storeload_storestore();
-#define smp_mb__before_atomic_inc()    membar_storeload_loadload();
-#define smp_mb__after_atomic_inc()     membar_storeload_storestore();
-#else
 #define smp_mb__before_atomic_dec()    barrier()
 #define smp_mb__after_atomic_dec()     barrier()
 #define smp_mb__before_atomic_inc()    barrier()
 #define smp_mb__after_atomic_inc()     barrier()
-#endif
 
 #include <asm-generic/atomic.h>
 #endif /* !(__ARCH_SPARC64_ATOMIC__) */
index bb87b80..e72ac9c 100644 (file)
@@ -23,13 +23,8 @@ extern void change_bit(unsigned long nr, volatile unsigned long *addr);
 
 #include <asm-generic/bitops/non-atomic.h>
 
-#ifdef CONFIG_SMP
-#define smp_mb__before_clear_bit()     membar_storeload_loadload()
-#define smp_mb__after_clear_bit()      membar_storeload_storestore()
-#else
 #define smp_mb__before_clear_bit()     barrier()
 #define smp_mb__after_clear_bit()      barrier()
-#endif
 
 #include <asm-generic/bitops/ffz.h>
 #include <asm-generic/bitops/__ffs.h>
index 109ae24..bafe5a6 100644 (file)
@@ -2713,6 +2713,30 @@ extern unsigned long sun4v_ldc_revoke(unsigned long channel,
  */
 #define HV_FAST_SET_PERFREG            0x101
 
+#define HV_N2_PERF_SPARC_CTL           0x0
+#define HV_N2_PERF_DRAM_CTL0           0x1
+#define HV_N2_PERF_DRAM_CNT0           0x2
+#define HV_N2_PERF_DRAM_CTL1           0x3
+#define HV_N2_PERF_DRAM_CNT1           0x4
+#define HV_N2_PERF_DRAM_CTL2           0x5
+#define HV_N2_PERF_DRAM_CNT2           0x6
+#define HV_N2_PERF_DRAM_CTL3           0x7
+#define HV_N2_PERF_DRAM_CNT3           0x8
+
+#define HV_FAST_N2_GET_PERFREG         0x104
+#define HV_FAST_N2_SET_PERFREG         0x105
+
+#ifndef __ASSEMBLY__
+extern unsigned long sun4v_niagara_getperf(unsigned long reg,
+                                          unsigned long *val);
+extern unsigned long sun4v_niagara_setperf(unsigned long reg,
+                                          unsigned long val);
+extern unsigned long sun4v_niagara2_getperf(unsigned long reg,
+                                           unsigned long *val);
+extern unsigned long sun4v_niagara2_setperf(unsigned long reg,
+                                           unsigned long val);
+#endif
+
 /* MMU statistics services.
  *
  * The hypervisor maintains MMU statistics and privileged code provides
index fe205cc..ea43057 100644 (file)
@@ -12,4 +12,5 @@
 
 #define irq_canonicalize(irq)  (irq)
 
+extern void __init init_IRQ(void);
 #endif
index 71673ec..d47d4a1 100644 (file)
@@ -66,6 +66,9 @@ extern void virt_irq_free(unsigned int virt_irq);
 extern void __init init_IRQ(void);
 extern void fixup_irqs(void);
 
+extern int register_perfctr_intr(void (*handler)(struct pt_regs *));
+extern void release_perfctr_intr(void (*handler)(struct pt_regs *));
+
 static inline void set_softint(unsigned long bits)
 {
        __asm__ __volatile__("wr        %0, 0x0, %%set_softint"
index bb42e59..8b49bf9 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _ASM_IRQFLAGS_H
 #define _ASM_IRQFLAGS_H
 
+#include <asm/pil.h>
+
 #ifndef __ASSEMBLY__
 
 static inline unsigned long __raw_local_save_flags(void)
@@ -40,9 +42,9 @@ static inline void raw_local_irq_restore(unsigned long flags)
 static inline void raw_local_irq_disable(void)
 {
        __asm__ __volatile__(
-               "wrpr   15, %%pil"
+               "wrpr   %0, %%pil"
                : /* no outputs */
-               : /* no inputs */
+               : "i" (PIL_NORMAL_MAX)
                : "memory"
        );
 }
index e82cf9a..ff8e02d 100644 (file)
@@ -1,8 +1,24 @@
-#ifndef ___ASM_SPARC_MODULE_H
-#define ___ASM_SPARC_MODULE_H
-#if defined(__sparc__) && defined(__arch64__)
-#include <asm/module_64.h>
-#else
-#include <asm/module_32.h>
-#endif
-#endif
+#ifndef __SPARC_MODULE_H
+#define __SPARC_MODULE_H
+struct mod_arch_specific { };
+
+/*
+ * Use some preprocessor magic to define the correct symbol
+ * for sparc32 and sparc64.
+ * Elf_Addr becomes Elf32_Addr for sparc32 and Elf64_Addr for sparc64
+ */
+#define ___ELF(a, b, c) a##b##c
+#define __ELF(a, b, c)  ___ELF(a, b, c)
+#define  _Elf(t)        __ELF(Elf, CONFIG_BITS, t)
+#define  _ELF(t)        __ELF(ELF, CONFIG_BITS, t)
+
+#define Elf_Shdr     _Elf(_Shdr)
+#define Elf_Sym      _Elf(_Sym)
+#define Elf_Ehdr     _Elf(_Ehdr)
+#define Elf_Rela     _Elf(_Rela)
+#define Elf_Addr     _Elf(_Addr)
+
+#define ELF_R_SYM    _ELF(_R_SYM)
+#define ELF_R_TYPE   _ELF(_R_TYPE)
+
+#endif /* __SPARC_MODULE_H */
diff --git a/arch/sparc/include/asm/module_32.h b/arch/sparc/include/asm/module_32.h
deleted file mode 100644 (file)
index cbd9e67..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_SPARC_MODULE_H
-#define _ASM_SPARC_MODULE_H
-struct mod_arch_specific { };
-#define Elf_Shdr Elf32_Shdr
-#define Elf_Sym Elf32_Sym
-#define Elf_Ehdr Elf32_Ehdr
-#endif /* _ASM_SPARC_MODULE_H */
diff --git a/arch/sparc/include/asm/module_64.h b/arch/sparc/include/asm/module_64.h
deleted file mode 100644 (file)
index 3d77ba4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _ASM_SPARC64_MODULE_H
-#define _ASM_SPARC64_MODULE_H
-struct mod_arch_specific { };
-#define Elf_Shdr Elf64_Shdr
-#define Elf_Sym Elf64_Sym
-#define Elf_Ehdr Elf64_Ehdr
-#endif /* _ASM_SPARC64_MODULE_H */
index 8b1649f..875da35 100644 (file)
@@ -170,9 +170,9 @@ struct linux_romvec {
 struct linux_nodeops {
        int (*no_nextnode)(int node);
        int (*no_child)(int node);
-       int (*no_proplen)(int node, char *name);
-       int (*no_getprop)(int node, char *name, char *val);
-       int (*no_setprop)(int node, char *name, char *val, int len);
+       int (*no_proplen)(int node, const char *name);
+       int (*no_getprop)(int node, const char *name, char *val);
+       int (*no_setprop)(int node, const char *name, char *val, int len);
        char * (*no_nextprop)(int node, char *name);
 };
 
index 699da05..73d4552 100644 (file)
@@ -136,7 +136,7 @@ extern char prom_getchar(void);
 extern void prom_putchar(char character);
 
 /* Prom's internal routines, don't use in kernel/boot code. */
-extern void prom_printf(char *fmt, ...);
+extern void prom_printf(const char *fmt, ...);
 extern void prom_write(const char *buf, unsigned int len);
 
 /* Multiprocessor operations... */
@@ -199,12 +199,12 @@ extern int prom_getsibling(int node);
 /* Get the length, at the passed node, of the given property type.
  * Returns -1 on error (ie. no such property at this node).
  */
-extern int prom_getproplen(int thisnode, char *property);
+extern int prom_getproplen(int thisnode, const char *property);
 
 /* Fetch the requested property using the given buffer.  Returns
  * the number of bytes the prom put into your buffer or -1 on error.
  */
-extern int __must_check prom_getproperty(int thisnode, char *property,
+extern int __must_check prom_getproperty(int thisnode, const char *property,
                                         char *prop_buffer, int propbuf_size);
 
 /* Acquire an integer property. */
@@ -246,7 +246,7 @@ extern int prom_node_has_property(int node, char *property);
 /* Set the indicated property at the given node with the passed value.
  * Returns the number of bytes of your value that the prom took.
  */
-extern int prom_setprop(int node, char *prop_name, char *prop_value,
+extern int prom_setprop(int node, const char *prop_name, char *prop_value,
                        int value_size);
 
 extern int prom_pathtoinode(char *path);
index 71819bb..d573820 100644 (file)
  *
  * In fact any XCALL which has to etrap/rtrap has a problem because
  * it is difficult to prevent rtrap from running BH's, and that would
- * need to be done if the XCALL arrived while %pil==15.
+ * need to be done if the XCALL arrived while %pil==PIL_NORMAL_MAX.
+ *
+ * Finally, in order to handle profiling events even when a
+ * local_irq_disable() is in progress, we only disable up to level 14
+ * interrupts.  Profile counter overflow interrupts arrive at level
+ * 15.
  */
 #define PIL_SMP_CALL_FUNC      1
 #define PIL_SMP_RECEIVE_SIGNAL 2
@@ -18,5 +23,7 @@
 #define PIL_SMP_CTX_NEW_VERSION        4
 #define PIL_DEVICE_IRQ         5
 #define PIL_SMP_CALL_FUNC_SNGL 6
+#define PIL_NORMAL_MAX         14
+#define PIL_NMI                        15
 
 #endif /* !(_SPARC64_PIL_H) */
index ec21a45..e580f55 100644 (file)
@@ -1,8 +1,27 @@
-#ifndef ___ASM_SPARC_SCATTERLIST_H
-#define ___ASM_SPARC_SCATTERLIST_H
-#if defined(__sparc__) && defined(__arch64__)
-#include <asm/scatterlist_64.h>
-#else
-#include <asm/scatterlist_32.h>
-#endif
+#ifndef _SPARC_SCATTERLIST_H
+#define _SPARC_SCATTERLIST_H
+
+#include <asm/page.h>
+#include <asm/types.h>
+
+struct scatterlist {
+#ifdef CONFIG_DEBUG_SG
+       unsigned long   sg_magic;
 #endif
+       unsigned long   page_link;
+       unsigned int    offset;
+
+       unsigned int    length;
+
+       dma_addr_t      dma_address;
+       __u32           dma_length;
+};
+
+#define sg_dma_address(sg)     ((sg)->dma_address)
+#define sg_dma_len(sg)         ((sg)->dma_length)
+
+#define ISA_DMA_THRESHOLD      (~0UL)
+
+#define ARCH_HAS_SG_CHAIN
+
+#endif /* !(_SPARC_SCATTERLIST_H) */
diff --git a/arch/sparc/include/asm/scatterlist_32.h b/arch/sparc/include/asm/scatterlist_32.h
deleted file mode 100644 (file)
index c82609c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _SPARC_SCATTERLIST_H
-#define _SPARC_SCATTERLIST_H
-
-#include <linux/types.h>
-
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-       unsigned long sg_magic;
-#endif
-       unsigned long page_link;
-       unsigned int offset;
-
-       unsigned int length;
-
-       __u32 dvma_address; /* A place to hang host-specific addresses at. */
-       __u32 dvma_length;
-};
-
-#define sg_dma_address(sg) ((sg)->dvma_address)
-#define sg_dma_len(sg)     ((sg)->dvma_length)
-
-#define ISA_DMA_THRESHOLD (~0UL)
-
-#define ARCH_HAS_SG_CHAIN
-
-#endif /* !(_SPARC_SCATTERLIST_H) */
diff --git a/arch/sparc/include/asm/scatterlist_64.h b/arch/sparc/include/asm/scatterlist_64.h
deleted file mode 100644 (file)
index 81bd058..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _SPARC64_SCATTERLIST_H
-#define _SPARC64_SCATTERLIST_H
-
-#include <asm/page.h>
-#include <asm/types.h>
-
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
-       unsigned long   sg_magic;
-#endif
-       unsigned long   page_link;
-       unsigned int    offset;
-
-       unsigned int    length;
-
-       dma_addr_t      dma_address;
-       __u32           dma_length;
-};
-
-#define sg_dma_address(sg)     ((sg)->dma_address)
-#define sg_dma_len(sg)         ((sg)->dma_length)
-
-#define ISA_DMA_THRESHOLD      (~0UL)
-
-#define ARCH_HAS_SG_CHAIN
-
-#endif /* !(_SPARC64_SCATTERLIST_H) */
index c7c69b0..0b0553b 100644 (file)
@@ -1,8 +1,10 @@
-#ifndef ___ASM_SPARC_SECTIONS_H
-#define ___ASM_SPARC_SECTIONS_H
-#if defined(__sparc__) && defined(__arch64__)
-#include <asm/sections_64.h>
-#else
-#include <asm/sections_32.h>
-#endif
+#ifndef __SPARC_SECTIONS_H
+#define __SPARC_SECTIONS_H
+
+/* nothing to see, move along */
+#include <asm-generic/sections.h>
+
+/* sparc entry point */
+extern char _start[];
+
 #endif
diff --git a/arch/sparc/include/asm/sections_32.h b/arch/sparc/include/asm/sections_32.h
deleted file mode 100644 (file)
index 6832841..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _SPARC_SECTIONS_H
-#define _SPARC_SECTIONS_H
-
-#include <asm-generic/sections.h>
-
-#endif
diff --git a/arch/sparc/include/asm/sections_64.h b/arch/sparc/include/asm/sections_64.h
deleted file mode 100644 (file)
index 3f4b9fd..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _SPARC64_SECTIONS_H
-#define _SPARC64_SECTIONS_H
-
-/* nothing to see, move along */
-#include <asm-generic/sections.h>
-
-extern char _start[];
-
-#endif
index 120cfe4..c4d274d 100644 (file)
  * and rebuild your kernel.
  */
 
-/* All of these locking primitives are expected to work properly
- * even in an RMO memory model, which currently is what the kernel
- * runs in.
- *
- * There is another issue.  Because we play games to save cycles
- * in the non-contention case, we need to be extra careful about
- * branch targets into the "spinning" code.  They live in their
- * own section, but the newer V9 branches have a shorter range
- * than the traditional 32-bit sparc branch variants.  The rule
- * is that the branches that go into and out of the spinner sections
- * must be pre-V9 branches.
+/* Because we play games to save cycles in the non-contention case, we
+ * need to be extra careful about branch targets into the "spinning"
+ * code.  They live in their own section, but the newer V9 branches
+ * have a shorter range than the traditional 32-bit sparc branch
+ * variants.  The rule is that the branches that go into and out of
+ * the spinner sections must be pre-V9 branches.
  */
 
 #define __raw_spin_is_locked(lp)       ((lp)->lock != 0)
@@ -38,12 +33,10 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
 
        __asm__ __volatile__(
 "1:    ldstub          [%1], %0\n"
-"      membar          #StoreLoad | #StoreStore\n"
 "      brnz,pn         %0, 2f\n"
 "       nop\n"
 "      .subsection     2\n"
 "2:    ldub            [%1], %0\n"
-"      membar          #LoadLoad\n"
 "      brnz,pt         %0, 2b\n"
 "       nop\n"
 "      ba,a,pt         %%xcc, 1b\n"
@@ -59,7 +52,6 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
 
        __asm__ __volatile__(
 "      ldstub          [%1], %0\n"
-"      membar          #StoreLoad | #StoreStore"
        : "=r" (result)
        : "r" (lock)
        : "memory");
@@ -70,7 +62,6 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
 static inline void __raw_spin_unlock(raw_spinlock_t *lock)
 {
        __asm__ __volatile__(
-"      membar          #StoreStore | #LoadStore\n"
 "      stb             %%g0, [%0]"
        : /* No outputs */
        : "r" (lock)
@@ -83,14 +74,12 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla
 
        __asm__ __volatile__(
 "1:    ldstub          [%2], %0\n"
-"      membar          #StoreLoad | #StoreStore\n"
 "      brnz,pn         %0, 2f\n"
 "       nop\n"
 "      .subsection     2\n"
 "2:    rdpr            %%pil, %1\n"
 "      wrpr            %3, %%pil\n"
 "3:    ldub            [%2], %0\n"
-"      membar          #LoadLoad\n"
 "      brnz,pt         %0, 3b\n"
 "       nop\n"
 "      ba,pt           %%xcc, 1b\n"
@@ -113,12 +102,10 @@ static void inline __read_lock(raw_rwlock_t *lock)
 "4:     add            %0, 1, %1\n"
 "      cas             [%2], %0, %1\n"
 "      cmp             %0, %1\n"
-"      membar          #StoreLoad | #StoreStore\n"
 "      bne,pn          %%icc, 1b\n"
 "       nop\n"
 "      .subsection     2\n"
 "2:    ldsw            [%2], %0\n"
-"      membar          #LoadLoad\n"
 "      brlz,pt         %0, 2b\n"
 "       nop\n"
 "      ba,a,pt         %%xcc, 4b\n"
@@ -139,7 +126,6 @@ static int inline __read_trylock(raw_rwlock_t *lock)
 "      add             %0, 1, %1\n"
 "      cas             [%2], %0, %1\n"
 "      cmp             %0, %1\n"
-"      membar          #StoreLoad | #StoreStore\n"
 "      bne,pn          %%icc, 1b\n"
 "       mov            1, %0\n"
 "2:"
@@ -155,7 +141,6 @@ static void inline __read_unlock(raw_rwlock_t *lock)
        unsigned long tmp1, tmp2;
 
        __asm__ __volatile__(
-"      membar  #StoreLoad | #LoadLoad\n"
 "1:    lduw    [%2], %0\n"
 "      sub     %0, 1, %1\n"
 "      cas     [%2], %0, %1\n"
@@ -179,12 +164,10 @@ static void inline __write_lock(raw_rwlock_t *lock)
 "4:     or             %0, %3, %1\n"
 "      cas             [%2], %0, %1\n"
 "      cmp             %0, %1\n"
-"      membar          #StoreLoad | #StoreStore\n"
 "      bne,pn          %%icc, 1b\n"
 "       nop\n"
 "      .subsection     2\n"
 "2:    lduw            [%2], %0\n"
-"      membar          #LoadLoad\n"
 "      brnz,pt         %0, 2b\n"
 "       nop\n"
 "      ba,a,pt         %%xcc, 4b\n"
@@ -197,7 +180,6 @@ static void inline __write_lock(raw_rwlock_t *lock)
 static void inline __write_unlock(raw_rwlock_t *lock)
 {
        __asm__ __volatile__(
-"      membar          #LoadStore | #StoreStore\n"
 "      stw             %%g0, [%0]"
        : /* no outputs */
        : "r" (lock)
@@ -217,7 +199,6 @@ static int inline __write_trylock(raw_rwlock_t *lock)
 "       or             %0, %4, %1\n"
 "      cas             [%3], %0, %1\n"
 "      cmp             %0, %1\n"
-"      membar          #StoreLoad | #StoreStore\n"
 "      bne,pn          %%icc, 1b\n"
 "       nop\n"
 "      mov             1, %2\n"
index 985ea7e..f0d0c40 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef _SPARC64_SPITFIRE_H
 #define _SPARC64_SPITFIRE_H
 
+#ifdef CONFIG_SPARC64
+
 #include <asm/asi.h>
 
 /* The following register addresses are accessible via ASI_DMMU
@@ -338,5 +340,5 @@ static inline void cheetah_put_itlb_data(int entry, unsigned long data)
 }
 
 #endif /* !(__ASSEMBLY__) */
-
+#endif /* CONFIG_SPARC64 */
 #endif /* !(_SPARC64_SPITFIRE_H) */
index 8623fc4..79c1ae2 100644 (file)
 
 #include <linux/irqflags.h>
 
+static inline unsigned int probe_irq_mask(unsigned long val)
+{
+       return 0;
+}
+
 /*
  * Sparc (general) CPU types
  */
index 8759f2a..6c07781 100644 (file)
@@ -59,20 +59,9 @@ do { __asm__ __volatile__("ba,pt     %%xcc, 1f\n\t" \
                             : : : "memory"); \
 } while (0)
 
-#define mb()   \
-       membar_safe("#LoadLoad | #LoadStore | #StoreStore | #StoreLoad")
-#define rmb()  \
-       membar_safe("#LoadLoad")
-#define wmb()  \
-       membar_safe("#StoreStore")
-#define membar_storeload() \
-       membar_safe("#StoreLoad")
-#define membar_storeload_storestore() \
-       membar_safe("#StoreLoad | #StoreStore")
-#define membar_storeload_loadload() \
-       membar_safe("#StoreLoad | #LoadLoad")
-#define membar_storestore_loadstore() \
-       membar_safe("#StoreStore | #LoadStore")
+#define mb()   membar_safe("#StoreLoad")
+#define rmb()  __asm__ __volatile__("":::"memory")
+#define wmb()  __asm__ __volatile__("":::"memory")
 
 #endif
 
@@ -80,20 +69,20 @@ do {        __asm__ __volatile__("ba,pt     %%xcc, 1f\n\t" \
 
 #define read_barrier_depends()         do { } while(0)
 #define set_mb(__var, __value) \
-       do { __var = __value; membar_storeload_storestore(); } while(0)
+       do { __var = __value; membar_safe("#StoreLoad"); } while(0)
 
 #ifdef CONFIG_SMP
 #define smp_mb()       mb()
 #define smp_rmb()      rmb()
 #define smp_wmb()      wmb()
-#define smp_read_barrier_depends()     read_barrier_depends()
 #else
 #define smp_mb()       __asm__ __volatile__("":::"memory")
 #define smp_rmb()      __asm__ __volatile__("":::"memory")
 #define smp_wmb()      __asm__ __volatile__("":::"memory")
-#define smp_read_barrier_depends()     do { } while(0)
 #endif
 
+#define smp_read_barrier_depends()     do { } while(0)
+
 #define flushi(addr)   __asm__ __volatile__ ("flush %0" : : "r" (addr) : "memory")
 
 #define flushw_all()   __asm__ __volatile__("flushw")
@@ -107,11 +96,12 @@ do {       __asm__ __volatile__("ba,pt     %%xcc, 1f\n\t" \
  * arch/sparc64/kernel/smp.c:smp_percpu_timer_interrupt()
  * for more information.
  */
-#define reset_pic()                                                    \
-       __asm__ __volatile__("ba,pt     %xcc, 99f\n\t"          \
+#define write_pic(__p)                                         \
+       __asm__ __volatile__("ba,pt     %%xcc, 99f\n\t"         \
                             ".align    64\n"                   \
-                         "99:wr        %g0, 0x0, %pic\n\t"     \
-                            "rd        %pic, %g0")
+                         "99:wr        %0, 0x0, %%pic\n\t"     \
+                            "rd        %%pic, %%g0" : : "r" (__p))
+#define reset_pic()    write_pic(0)
 
 #ifndef __ASSEMBLY__
 
@@ -170,6 +160,7 @@ do {        if (test_thread_flag(TIF_PERFCTR)) {                            \
        "stb    %%o5, [%%g6 + %5]\n\t"                                  \
        "rdpr   %%cwp, %%o5\n\t"                                        \
        "stb    %%o5, [%%g6 + %8]\n\t"                                  \
+       "wrpr   %%g0, 15, %%pil\n\t"                                    \
        "mov    %4, %%g6\n\t"                                           \
        "ldub   [%4 + %8], %%g1\n\t"                                    \
        "wrpr   %%g1, %%cwp\n\t"                                        \
@@ -180,6 +171,7 @@ do {        if (test_thread_flag(TIF_PERFCTR)) {                            \
        "ldx    [%%sp + 2047 + 0x70], %%i6\n\t"                         \
        "ldx    [%%sp + 2047 + 0x78], %%i7\n\t"                         \
        "ldx    [%%g6 + %9], %%g4\n\t"                                  \
+       "wrpr   %%g0, 14, %%pil\n\t"                                    \
        "brz,pt %%o7, switch_to_pc\n\t"                                 \
        " mov   %%g7, %0\n\t"                                           \
        "sethi  %%hi(ret_from_syscall), %%g1\n\t"                       \
@@ -209,14 +201,12 @@ static inline unsigned long xchg32(__volatile__ unsigned int *m, unsigned int va
        unsigned long tmp1, tmp2;
 
        __asm__ __volatile__(
-"      membar          #StoreLoad | #LoadLoad\n"
 "      mov             %0, %1\n"
 "1:    lduw            [%4], %2\n"
 "      cas             [%4], %2, %0\n"
 "      cmp             %2, %0\n"
 "      bne,a,pn        %%icc, 1b\n"
 "       mov            %1, %0\n"
-"      membar          #StoreLoad | #StoreStore\n"
        : "=&r" (val), "=&r" (tmp1), "=&r" (tmp2)
        : "0" (val), "r" (m)
        : "cc", "memory");
@@ -228,14 +218,12 @@ static inline unsigned long xchg64(__volatile__ unsigned long *m, unsigned long
        unsigned long tmp1, tmp2;
 
        __asm__ __volatile__(
-"      membar          #StoreLoad | #LoadLoad\n"
 "      mov             %0, %1\n"
 "1:    ldx             [%4], %2\n"
 "      casx            [%4], %2, %0\n"
 "      cmp             %2, %0\n"
 "      bne,a,pn        %%xcc, 1b\n"
 "       mov            %1, %0\n"
-"      membar          #StoreLoad | #StoreStore\n"
        : "=&r" (val), "=&r" (tmp1), "=&r" (tmp2)
        : "0" (val), "r" (m)
        : "cc", "memory");
@@ -272,9 +260,7 @@ extern void die_if_kernel(char *str, struct pt_regs *regs) __attribute__ ((noret
 static inline unsigned long
 __cmpxchg_u32(volatile int *m, int old, int new)
 {
-       __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n"
-                            "cas [%2], %3, %0\n\t"
-                            "membar #StoreLoad | #StoreStore"
+       __asm__ __volatile__("cas [%2], %3, %0"
                             : "=&r" (new)
                             : "0" (new), "r" (m), "r" (old)
                             : "memory");
@@ -285,9 +271,7 @@ __cmpxchg_u32(volatile int *m, int old, int new)
 static inline unsigned long
 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
 {
-       __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n"
-                            "casx [%2], %3, %0\n\t"
-                            "membar #StoreLoad | #StoreStore"
+       __asm__ __volatile__("casx [%2], %3, %0"
                             : "=&r" (new)
                             : "0" (new), "r" (m), "r" (old)
                             : "memory");
index 76e4299..83c571d 100644 (file)
@@ -50,8 +50,6 @@
 #define TSB_TAG_INVALID_BIT    46
 #define TSB_TAG_INVALID_HIGH   (1 << (TSB_TAG_INVALID_BIT - 32))
 
-#define TSB_MEMBAR     membar  #StoreStore
-
 /* Some cpus support physical address quad loads.  We want to use
  * those if possible so we don't need to hard-lock the TSB mapping
  * into the TLB.  We encode some instruction patching in order to
@@ -128,13 +126,11 @@ extern struct tsb_phys_patch_entry __tsb_phys_patch, __tsb_phys_patch_end;
        cmp     REG1, REG2;             \
        bne,pn  %icc, 99b;              \
         nop;                           \
-       TSB_MEMBAR
 
 #define TSB_WRITE(TSB, TTE, TAG) \
        add     TSB, 0x8, TSB;   \
        TSB_STORE(TSB, TTE);     \
        sub     TSB, 0x8, TSB;   \
-       TSB_MEMBAR;              \
        TSB_STORE(TSB, TAG);
 
 #define KTSB_LOAD_QUAD(TSB, REG) \
@@ -153,13 +149,11 @@ extern struct tsb_phys_patch_entry __tsb_phys_patch, __tsb_phys_patch_end;
        cmp     REG1, REG2;             \
        bne,pn  %icc, 99b;              \
         nop;                           \
-       TSB_MEMBAR
 
 #define KTSB_WRITE(TSB, TTE, TAG) \
        add     TSB, 0x8, TSB;   \
        stxa    TTE, [TSB] ASI_N;     \
        sub     TSB, 0x8, TSB;   \
-       TSB_MEMBAR;              \
        stxa    TAG, [TSB] ASI_N;
 
        /* Do a kernel page table walk.  Leaves physical PTE pointer in
index 5708ba2..48f2807 100644 (file)
@@ -2,6 +2,7 @@
 #define _SPARC64_TTABLE_H
 
 #include <asm/utrap.h>
+#include <asm/pil.h>
 
 #ifdef __ASSEMBLY__
 #include <asm/thread_info.h>
 
 #define TRAP_IRQ(routine, level)                       \
        rdpr    %pil, %g2;                              \
-       wrpr    %g0, 15, %pil;                          \
+       wrpr    %g0, PIL_NORMAL_MAX, %pil;              \
        sethi   %hi(1f-4), %g7;                         \
        ba,pt   %xcc, etrap_irq;                        \
         or     %g7, %lo(1f-4), %g7;                    \
 
 #define TRAP_IRQ(routine, level)                       \
        rdpr    %pil, %g2;                              \
-       wrpr    %g0, 15, %pil;                          \
+       wrpr    %g0, PIL_NORMAL_MAX, %pil;              \
        ba,pt   %xcc, etrap_irq;                        \
         rd     %pc, %g7;                               \
        mov     level, %o0;                             \
 
 #endif
 
+#define TRAP_NMI_IRQ(routine, level)                   \
+       rdpr    %pil, %g2;                              \
+       wrpr    %g0, PIL_NMI, %pil;                     \
+       ba,pt   %xcc, etrap_irq;                        \
+        rd     %pc, %g7;                               \
+       mov     level, %o0;                             \
+       call    routine;                                \
+        add    %sp, PTREGS_OFF, %o1;                   \
+       ba,a,pt %xcc, rtrap_nmi;
+
 #define TRAP_IVEC TRAP_NOSAVE(do_ivec)
 
 #define BTRAP(lvl) TRAP_ARG(bad_trap, lvl)
index 4207fb3..031f038 100644 (file)
@@ -1,8 +1,444 @@
-#ifndef ___ASM_SPARC_UNISTD_H
-#define ___ASM_SPARC_UNISTD_H
-#if defined(__sparc__) && defined(__arch64__)
-#include <asm/unistd_64.h>
+#ifndef _SPARC_UNISTD_H
+#define _SPARC_UNISTD_H
+
+/*
+ * System calls under the Sparc.
+ *
+ * Don't be scared by the ugly clobbers, it is the only way I can
+ * think of right now to force the arguments into fixed registers
+ * before the trap into the system call with gcc 'asm' statements.
+ *
+ * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
+ *
+ * SunOS compatibility based upon preliminary work which is:
+ *
+ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
+ */
+#ifndef __32bit_syscall_numbers__
+#ifndef __arch64__
+#define __32bit_syscall_numbers__
+#endif
+#endif
+
+#define __NR_restart_syscall      0 /* Linux Specific                             */
+#define __NR_exit                 1 /* Common                                      */
+#define __NR_fork                 2 /* Common                                      */
+#define __NR_read                 3 /* Common                                      */
+#define __NR_write                4 /* Common                                      */
+#define __NR_open                 5 /* Common                                      */
+#define __NR_close                6 /* Common                                      */
+#define __NR_wait4                7 /* Common                                      */
+#define __NR_creat                8 /* Common                                      */
+#define __NR_link                 9 /* Common                                      */
+#define __NR_unlink              10 /* Common                                      */
+#define __NR_execv               11 /* SunOS Specific                              */
+#define __NR_chdir               12 /* Common                                      */
+#define __NR_chown              13 /* Common                                      */
+#define __NR_mknod               14 /* Common                                      */
+#define __NR_chmod               15 /* Common                                      */
+#define __NR_lchown              16 /* Common                                      */
+#define __NR_brk                 17 /* Common                                      */
+#define __NR_perfctr             18 /* Performance counter operations              */
+#define __NR_lseek               19 /* Common                                      */
+#define __NR_getpid              20 /* Common                                      */
+#define __NR_capget             21 /* Linux Specific                              */
+#define __NR_capset             22 /* Linux Specific                              */
+#define __NR_setuid              23 /* Implemented via setreuid in SunOS           */
+#define __NR_getuid              24 /* Common                                      */
+#define __NR_vmsplice           25 /* ENOSYS under SunOS                          */
+#define __NR_ptrace              26 /* Common                                      */
+#define __NR_alarm               27 /* Implemented via setitimer in SunOS          */
+#define __NR_sigaltstack        28 /* Common                                      */
+#define __NR_pause               29 /* Is sigblock(0)->sigpause() in SunOS         */
+#define __NR_utime               30 /* Implemented via utimes() under SunOS        */
+#ifdef __32bit_syscall_numbers__
+#define __NR_lchown32            31 /* Linux sparc32 specific                      */
+#define __NR_fchown32            32 /* Linux sparc32 specific                      */
+#endif
+#define __NR_access              33 /* Common                                      */
+#define __NR_nice                34 /* Implemented via get/setpriority() in SunOS  */
+#ifdef __32bit_syscall_numbers__
+#define __NR_chown32             35 /* Linux sparc32 specific                      */
+#endif
+#define __NR_sync                36 /* Common                                      */
+#define __NR_kill                37 /* Common                                      */
+#define __NR_stat                38 /* Common                                      */
+#define __NR_sendfile           39 /* Linux Specific                              */
+#define __NR_lstat               40 /* Common                                      */
+#define __NR_dup                 41 /* Common                                      */
+#define __NR_pipe                42 /* Common                                      */
+#define __NR_times               43 /* Implemented via getrusage() in SunOS        */
+#ifdef __32bit_syscall_numbers__
+#define __NR_getuid32            44 /* Linux sparc32 specific                      */
+#endif
+#define __NR_umount2             45 /* Linux Specific                              */
+#define __NR_setgid              46 /* Implemented via setregid() in SunOS         */
+#define __NR_getgid              47 /* Common                                      */
+#define __NR_signal              48 /* Implemented via sigvec() in SunOS           */
+#define __NR_geteuid             49 /* SunOS calls getuid()                        */
+#define __NR_getegid             50 /* SunOS calls getgid()                        */
+#define __NR_acct                51 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_getgid32            53 /* Linux sparc32 specific                      */
+#else
+#define __NR_memory_ordering    52 /* Linux Specific                              */
+#endif
+#define __NR_ioctl               54 /* Common                                      */
+#define __NR_reboot              55 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_mmap2              56 /* Linux sparc32 Specific                      */
+#endif
+#define __NR_symlink             57 /* Common                                      */
+#define __NR_readlink            58 /* Common                                      */
+#define __NR_execve              59 /* Common                                      */
+#define __NR_umask               60 /* Common                                      */
+#define __NR_chroot              61 /* Common                                      */
+#define __NR_fstat               62 /* Common                                      */
+#define __NR_fstat64            63 /* Linux Specific                              */
+#define __NR_getpagesize         64 /* Common                                      */
+#define __NR_msync               65 /* Common in newer 1.3.x revs...               */
+#define __NR_vfork               66 /* Common                                      */
+#define __NR_pread64             67 /* Linux Specific                              */
+#define __NR_pwrite64            68 /* Linux Specific                              */
+#ifdef __32bit_syscall_numbers__
+#define __NR_geteuid32           69 /* Linux sparc32, sbrk under SunOS             */
+#define __NR_getegid32           70 /* Linux sparc32, sstk under SunOS             */
+#endif
+#define __NR_mmap                71 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_setreuid32          72 /* Linux sparc32, vadvise under SunOS          */
+#endif
+#define __NR_munmap              73 /* Common                                      */
+#define __NR_mprotect            74 /* Common                                      */
+#define __NR_madvise             75 /* Common                                      */
+#define __NR_vhangup             76 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_truncate64                 77 /* Linux sparc32 Specific                      */
+#endif
+#define __NR_mincore             78 /* Common                                      */
+#define __NR_getgroups           79 /* Common                                      */
+#define __NR_setgroups           80 /* Common                                      */
+#define __NR_getpgrp             81 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_setgroups32         82 /* Linux sparc32, setpgrp under SunOS          */
+#endif
+#define __NR_setitimer           83 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_ftruncate64        84 /* Linux sparc32 Specific                      */
+#endif
+#define __NR_swapon              85 /* Common                                      */
+#define __NR_getitimer           86 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_setuid32            87 /* Linux sparc32, gethostname under SunOS      */
+#endif
+#define __NR_sethostname         88 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_setgid32            89 /* Linux sparc32, getdtablesize under SunOS    */
+#endif
+#define __NR_dup2                90 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_setfsuid32          91 /* Linux sparc32, getdopt under SunOS          */
+#endif
+#define __NR_fcntl               92 /* Common                                      */
+#define __NR_select              93 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_setfsgid32          94 /* Linux sparc32, setdopt under SunOS          */
+#endif
+#define __NR_fsync               95 /* Common                                      */
+#define __NR_setpriority         96 /* Common                                      */
+#define __NR_socket              97 /* Common                                      */
+#define __NR_connect             98 /* Common                                      */
+#define __NR_accept              99 /* Common                                      */
+#define __NR_getpriority        100 /* Common                                      */
+#define __NR_rt_sigreturn       101 /* Linux Specific                              */
+#define __NR_rt_sigaction       102 /* Linux Specific                              */
+#define __NR_rt_sigprocmask     103 /* Linux Specific                              */
+#define __NR_rt_sigpending      104 /* Linux Specific                              */
+#define __NR_rt_sigtimedwait    105 /* Linux Specific                              */
+#define __NR_rt_sigqueueinfo    106 /* Linux Specific                              */
+#define __NR_rt_sigsuspend      107 /* Linux Specific                              */
+#ifdef __32bit_syscall_numbers__
+#define __NR_setresuid32        108 /* Linux Specific, sigvec under SunOS         */
+#define __NR_getresuid32        109 /* Linux Specific, sigblock under SunOS       */
+#define __NR_setresgid32        110 /* Linux Specific, sigsetmask under SunOS     */
+#define __NR_getresgid32        111 /* Linux Specific, sigpause under SunOS       */
+#define __NR_setregid32         112 /* Linux sparc32, sigstack under SunOS         */
+#else
+#define __NR_setresuid          108 /* Linux Specific, sigvec under SunOS         */
+#define __NR_getresuid          109 /* Linux Specific, sigblock under SunOS       */
+#define __NR_setresgid          110 /* Linux Specific, sigsetmask under SunOS     */
+#define __NR_getresgid          111 /* Linux Specific, sigpause under SunOS       */
+#endif
+#define __NR_recvmsg            113 /* Common                                      */
+#define __NR_sendmsg            114 /* Common                                      */
+#ifdef __32bit_syscall_numbers__
+#define __NR_getgroups32        115 /* Linux sparc32, vtrace under SunOS           */
+#endif
+#define __NR_gettimeofday       116 /* Common                                      */
+#define __NR_getrusage          117 /* Common                                      */
+#define __NR_getsockopt         118 /* Common                                      */
+#define __NR_getcwd            119 /* Linux Specific                              */
+#define __NR_readv              120 /* Common                                      */
+#define __NR_writev             121 /* Common                                      */
+#define __NR_settimeofday       122 /* Common                                      */
+#define __NR_fchown             123 /* Common                                      */
+#define __NR_fchmod             124 /* Common                                      */
+#define __NR_recvfrom           125 /* Common                                      */
+#define __NR_setreuid           126 /* Common                                      */
+#define __NR_setregid           127 /* Common                                      */
+#define __NR_rename             128 /* Common                                      */
+#define __NR_truncate           129 /* Common                                      */
+#define __NR_ftruncate          130 /* Common                                      */
+#define __NR_flock              131 /* Common                                      */
+#define __NR_lstat64           132 /* Linux Specific                              */
+#define __NR_sendto             133 /* Common                                      */
+#define __NR_shutdown           134 /* Common                                      */
+#define __NR_socketpair         135 /* Common                                      */
+#define __NR_mkdir              136 /* Common                                      */
+#define __NR_rmdir              137 /* Common                                      */
+#define __NR_utimes             138 /* SunOS Specific                              */
+#define __NR_stat64            139 /* Linux Specific                              */
+#define __NR_sendfile64         140 /* adjtime under SunOS                         */
+#define __NR_getpeername        141 /* Common                                      */
+#define __NR_futex              142 /* gethostid under SunOS                       */
+#define __NR_gettid             143 /* ENOSYS under SunOS                          */
+#define __NR_getrlimit         144 /* Common                                      */
+#define __NR_setrlimit          145 /* Common                                      */
+#define __NR_pivot_root                146 /* Linux Specific, killpg under SunOS          */
+#define __NR_prctl             147 /* ENOSYS under SunOS                          */
+#define __NR_pciconfig_read    148 /* ENOSYS under SunOS                          */
+#define __NR_pciconfig_write   149 /* ENOSYS under SunOS                          */
+#define __NR_getsockname        150 /* Common                                      */
+#define __NR_inotify_init       151 /* Linux specific                              */
+#define __NR_inotify_add_watch  152 /* Linux specific                              */
+#define __NR_poll               153 /* Common                                      */
+#define __NR_getdents64                154 /* Linux specific                              */
+#ifdef __32bit_syscall_numbers__
+#define __NR_fcntl64           155 /* Linux sparc32 Specific                      */
+#endif
+#define __NR_inotify_rm_watch   156 /* Linux specific                             */
+#define __NR_statfs             157 /* Common                                      */
+#define __NR_fstatfs            158 /* Common                                      */
+#define __NR_umount             159 /* Common                                      */
+#define __NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS    */
+#define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS           */
+#define __NR_getdomainname      162 /* SunOS Specific                              */
+#define __NR_setdomainname      163 /* Common                                      */
+#ifndef __32bit_syscall_numbers__
+#define __NR_utrap_install     164 /* SYSV ABI/v9 required                        */
+#endif
+#define __NR_quotactl           165 /* Common                                      */
+#define __NR_set_tid_address    166 /* Linux specific, exportfs under SunOS        */
+#define __NR_mount              167 /* Common                                      */
+#define __NR_ustat              168 /* Common                                      */
+#define __NR_setxattr           169 /* SunOS: semsys                               */
+#define __NR_lsetxattr          170 /* SunOS: msgsys                               */
+#define __NR_fsetxattr          171 /* SunOS: shmsys                               */
+#define __NR_getxattr           172 /* SunOS: auditsys                             */
+#define __NR_lgetxattr          173 /* SunOS: rfssys                               */
+#define __NR_getdents           174 /* Common                                      */
+#define __NR_setsid             175 /* Common                                      */
+#define __NR_fchdir             176 /* Common                                      */
+#define __NR_fgetxattr          177 /* SunOS: fchroot                              */
+#define __NR_listxattr          178 /* SunOS: vpixsys                              */
+#define __NR_llistxattr         179 /* SunOS: aioread                              */
+#define __NR_flistxattr         180 /* SunOS: aiowrite                             */
+#define __NR_removexattr        181 /* SunOS: aiowait                              */
+#define __NR_lremovexattr       182 /* SunOS: aiocancel                            */
+#define __NR_sigpending         183 /* Common                                      */
+#define __NR_query_module      184 /* Linux Specific                              */
+#define __NR_setpgid            185 /* Common                                      */
+#define __NR_fremovexattr       186 /* SunOS: pathconf                             */
+#define __NR_tkill              187 /* SunOS: fpathconf                            */
+#define __NR_exit_group                188 /* Linux specific, sysconf undef SunOS         */
+#define __NR_uname              189 /* Linux Specific                              */
+#define __NR_init_module        190 /* Linux Specific                              */
+#define __NR_personality        191 /* Linux Specific                              */
+#define __NR_remap_file_pages   192 /* Linux Specific                              */
+#define __NR_epoll_create       193 /* Linux Specific                              */
+#define __NR_epoll_ctl          194 /* Linux Specific                              */
+#define __NR_epoll_wait         195 /* Linux Specific                              */
+#define __NR_ioprio_set         196 /* Linux Specific                              */
+#define __NR_getppid            197 /* Linux Specific                              */
+#define __NR_sigaction          198 /* Linux Specific                              */
+#define __NR_sgetmask           199 /* Linux Specific                              */
+#define __NR_ssetmask           200 /* Linux Specific                              */
+#define __NR_sigsuspend         201 /* Linux Specific                              */
+#define __NR_oldlstat           202 /* Linux Specific                              */
+#define __NR_uselib             203 /* Linux Specific                              */
+#define __NR_readdir            204 /* Linux Specific                              */
+#define __NR_readahead          205 /* Linux Specific                              */
+#define __NR_socketcall         206 /* Linux Specific                              */
+#define __NR_syslog             207 /* Linux Specific                              */
+#define __NR_lookup_dcookie     208 /* Linux Specific                              */
+#define __NR_fadvise64          209 /* Linux Specific                              */
+#define __NR_fadvise64_64       210 /* Linux Specific                              */
+#define __NR_tgkill             211 /* Linux Specific                              */
+#define __NR_waitpid            212 /* Linux Specific                              */
+#define __NR_swapoff            213 /* Linux Specific                              */
+#define __NR_sysinfo            214 /* Linux Specific                              */
+#define __NR_ipc                215 /* Linux Specific                              */
+#define __NR_sigreturn          216 /* Linux Specific                              */
+#define __NR_clone              217 /* Linux Specific                              */
+#define __NR_ioprio_get         218 /* Linux Specific                              */
+#define __NR_adjtimex           219 /* Linux Specific                              */
+#define __NR_sigprocmask        220 /* Linux Specific                              */
+#define __NR_create_module      221 /* Linux Specific                              */
+#define __NR_delete_module      222 /* Linux Specific                              */
+#define __NR_get_kernel_syms    223 /* Linux Specific                              */
+#define __NR_getpgid            224 /* Linux Specific                              */
+#define __NR_bdflush            225 /* Linux Specific                              */
+#define __NR_sysfs              226 /* Linux Specific                              */
+#define __NR_afs_syscall        227 /* Linux Specific                              */
+#define __NR_setfsuid           228 /* Linux Specific                              */
+#define __NR_setfsgid           229 /* Linux Specific                              */
+#define __NR__newselect         230 /* Linux Specific                              */
+#ifdef __32bit_syscall_numbers__
+#define __NR_time               231 /* Linux Specific                              */
 #else
-#include <asm/unistd_32.h>
+#ifdef __KERNEL__
+#define __NR_time              231 /* Linux sparc32                               */
+#endif
+#endif
+#define __NR_splice             232 /* Linux Specific                              */
+#define __NR_stime              233 /* Linux Specific                              */
+#define __NR_statfs64           234 /* Linux Specific                              */
+#define __NR_fstatfs64          235 /* Linux Specific                              */
+#define __NR__llseek            236 /* Linux Specific                              */
+#define __NR_mlock              237
+#define __NR_munlock            238
+#define __NR_mlockall           239
+#define __NR_munlockall         240
+#define __NR_sched_setparam     241
+#define __NR_sched_getparam     242
+#define __NR_sched_setscheduler 243
+#define __NR_sched_getscheduler 244
+#define __NR_sched_yield        245
+#define __NR_sched_get_priority_max 246
+#define __NR_sched_get_priority_min 247
+#define __NR_sched_rr_get_interval  248
+#define __NR_nanosleep          249
+#define __NR_mremap             250
+#define __NR__sysctl            251
+#define __NR_getsid             252
+#define __NR_fdatasync          253
+#define __NR_nfsservctl         254
+#define __NR_sync_file_range   255
+#define __NR_clock_settime     256
+#define __NR_clock_gettime     257
+#define __NR_clock_getres      258
+#define __NR_clock_nanosleep   259
+#define __NR_sched_getaffinity 260
+#define __NR_sched_setaffinity 261
+#define __NR_timer_settime     262
+#define __NR_timer_gettime     263
+#define __NR_timer_getoverrun  264
+#define __NR_timer_delete      265
+#define __NR_timer_create      266
+/* #define __NR_vserver                267 Reserved for VSERVER */
+#define __NR_io_setup          268
+#define __NR_io_destroy                269
+#define __NR_io_submit         270
+#define __NR_io_cancel         271
+#define __NR_io_getevents      272
+#define __NR_mq_open           273
+#define __NR_mq_unlink         274
+#define __NR_mq_timedsend      275
+#define __NR_mq_timedreceive   276
+#define __NR_mq_notify         277
+#define __NR_mq_getsetattr     278
+#define __NR_waitid            279
+#define __NR_tee               280
+#define __NR_add_key           281
+#define __NR_request_key       282
+#define __NR_keyctl            283
+#define __NR_openat            284
+#define __NR_mkdirat           285
+#define __NR_mknodat           286
+#define __NR_fchownat          287
+#define __NR_futimesat         288
+#define __NR_fstatat64         289
+#define __NR_unlinkat          290
+#define __NR_renameat          291
+#define __NR_linkat            292
+#define __NR_symlinkat         293
+#define __NR_readlinkat                294
+#define __NR_fchmodat          295
+#define __NR_faccessat         296
+#define __NR_pselect6          297
+#define __NR_ppoll             298
+#define __NR_unshare           299
+#define __NR_set_robust_list   300
+#define __NR_get_robust_list   301
+#define __NR_migrate_pages     302
+#define __NR_mbind             303
+#define __NR_get_mempolicy     304
+#define __NR_set_mempolicy     305
+#define __NR_kexec_load                306
+#define __NR_move_pages                307
+#define __NR_getcpu            308
+#define __NR_epoll_pwait       309
+#define __NR_utimensat         310
+#define __NR_signalfd          311
+#define __NR_timerfd_create    312
+#define __NR_eventfd           313
+#define __NR_fallocate         314
+#define __NR_timerfd_settime   315
+#define __NR_timerfd_gettime   316
+#define __NR_signalfd4         317
+#define __NR_eventfd2          318
+#define __NR_epoll_create1     319
+#define __NR_dup3              320
+#define __NR_pipe2             321
+#define __NR_inotify_init1     322
+#define __NR_accept4           323
+
+#define NR_SYSCALLS            324
+
+#ifdef __32bit_syscall_numbers__
+/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
+ * it never had the plain ones and there is no value to adding those
+ * old versions into the syscall table.
+ */
+#define __IGNORE_setresuid
+#define __IGNORE_getresuid
+#define __IGNORE_setresgid
+#define __IGNORE_getresgid
 #endif
+
+#ifdef __KERNEL__
+#define __ARCH_WANT_IPC_PARSE_VERSION
+#define __ARCH_WANT_OLD_READDIR
+#define __ARCH_WANT_STAT64
+#define __ARCH_WANT_SYS_ALARM
+#define __ARCH_WANT_SYS_GETHOSTNAME
+#define __ARCH_WANT_SYS_PAUSE
+#define __ARCH_WANT_SYS_SGETMASK
+#define __ARCH_WANT_SYS_SIGNAL
+#define __ARCH_WANT_SYS_TIME
+#define __ARCH_WANT_SYS_UTIME
+#define __ARCH_WANT_SYS_WAITPID
+#define __ARCH_WANT_SYS_SOCKETCALL
+#define __ARCH_WANT_SYS_FADVISE64
+#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
+#define __ARCH_WANT_SYS_NICE
+#define __ARCH_WANT_SYS_OLDUMOUNT
+#define __ARCH_WANT_SYS_SIGPENDING
+#define __ARCH_WANT_SYS_SIGPROCMASK
+#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+#ifndef __32bit_syscall_numbers__
+#define __ARCH_WANT_COMPAT_SYS_TIME
+#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
 #endif
+
+/*
+ * "Conditional" syscalls
+ *
+ * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
+ * but it doesn't work on all toolchains, so we just do it by hand
+ */
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
+
+#endif /* __KERNEL__ */
+#endif /* _SPARC_UNISTD_H */
diff --git a/arch/sparc/include/asm/unistd_32.h b/arch/sparc/include/asm/unistd_32.h
deleted file mode 100644 (file)
index 0d13d2a..0000000
+++ /dev/null
@@ -1,385 +0,0 @@
-#ifndef _SPARC_UNISTD_H
-#define _SPARC_UNISTD_H
-
-/*
- * System calls under the Sparc.
- *
- * Don't be scared by the ugly clobbers, it is the only way I can
- * think of right now to force the arguments into fixed registers
- * before the trap into the system call with gcc 'asm' statements.
- *
- * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
- *
- * SunOS compatibility based upon preliminary work which is:
- *
- * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
- */
-
-#define __NR_restart_syscall      0 /* Linux Specific                             */
-#define __NR_exit                 1 /* Common                                      */
-#define __NR_fork                 2 /* Common                                      */
-#define __NR_read                 3 /* Common                                      */
-#define __NR_write                4 /* Common                                      */
-#define __NR_open                 5 /* Common                                      */
-#define __NR_close                6 /* Common                                      */
-#define __NR_wait4                7 /* Common                                      */
-#define __NR_creat                8 /* Common                                      */
-#define __NR_link                 9 /* Common                                      */
-#define __NR_unlink              10 /* Common                                      */
-#define __NR_execv               11 /* SunOS Specific                              */
-#define __NR_chdir               12 /* Common                                      */
-#define __NR_chown              13 /* Common                                      */
-#define __NR_mknod               14 /* Common                                      */
-#define __NR_chmod               15 /* Common                                      */
-#define __NR_lchown              16 /* Common                                      */
-#define __NR_brk                 17 /* Common                                      */
-#define __NR_perfctr             18 /* Performance counter operations              */
-#define __NR_lseek               19 /* Common                                      */
-#define __NR_getpid              20 /* Common                                      */
-#define __NR_capget             21 /* Linux Specific                              */
-#define __NR_capset             22 /* Linux Specific                              */
-#define __NR_setuid              23 /* Implemented via setreuid in SunOS           */
-#define __NR_getuid              24 /* Common                                      */
-#define __NR_vmsplice           25 /* ENOSYS under SunOS                          */
-#define __NR_ptrace              26 /* Common                                      */
-#define __NR_alarm               27 /* Implemented via setitimer in SunOS          */
-#define __NR_sigaltstack        28 /* Common                                      */
-#define __NR_pause               29 /* Is sigblock(0)->sigpause() in SunOS         */
-#define __NR_utime               30 /* Implemented via utimes() under SunOS        */
-#define __NR_lchown32            31 /* Linux sparc32 specific                      */
-#define __NR_fchown32            32 /* Linux sparc32 specific                      */
-#define __NR_access              33 /* Common                                      */
-#define __NR_nice                34 /* Implemented via get/setpriority() in SunOS  */
-#define __NR_chown32             35 /* Linux sparc32 specific                      */
-#define __NR_sync                36 /* Common                                      */
-#define __NR_kill                37 /* Common                                      */
-#define __NR_stat                38 /* Common                                      */
-#define __NR_sendfile           39 /* Linux Specific                              */
-#define __NR_lstat               40 /* Common                                      */
-#define __NR_dup                 41 /* Common                                      */
-#define __NR_pipe                42 /* Common                                      */
-#define __NR_times               43 /* Implemented via getrusage() in SunOS        */
-#define __NR_getuid32            44 /* Linux sparc32 specific                      */
-#define __NR_umount2             45 /* Linux Specific                              */
-#define __NR_setgid              46 /* Implemented via setregid() in SunOS         */
-#define __NR_getgid              47 /* Common                                      */
-#define __NR_signal              48 /* Implemented via sigvec() in SunOS           */
-#define __NR_geteuid             49 /* SunOS calls getuid()                        */
-#define __NR_getegid             50 /* SunOS calls getgid()                        */
-#define __NR_acct                51 /* Common                                      */
-/* #define __NR_memory_ordering  52    Linux sparc64 specific                     */
-#define __NR_getgid32            53 /* Linux sparc32 specific                      */
-#define __NR_ioctl               54 /* Common                                      */
-#define __NR_reboot              55 /* Common                                      */
-#define __NR_mmap2              56 /* Linux sparc32 Specific                      */
-#define __NR_symlink             57 /* Common                                      */
-#define __NR_readlink            58 /* Common                                      */
-#define __NR_execve              59 /* Common                                      */
-#define __NR_umask               60 /* Common                                      */
-#define __NR_chroot              61 /* Common                                      */
-#define __NR_fstat               62 /* Common                                      */
-#define __NR_fstat64            63 /* Linux Specific                              */
-#define __NR_getpagesize         64 /* Common                                      */
-#define __NR_msync               65 /* Common in newer 1.3.x revs...               */
-#define __NR_vfork               66 /* Common                                      */
-#define __NR_pread64             67 /* Linux Specific                              */
-#define __NR_pwrite64            68 /* Linux Specific                              */
-#define __NR_geteuid32           69 /* Linux sparc32, sbrk under SunOS             */
-#define __NR_getegid32           70 /* Linux sparc32, sstk under SunOS             */
-#define __NR_mmap                71 /* Common                                      */
-#define __NR_setreuid32          72 /* Linux sparc32, vadvise under SunOS          */
-#define __NR_munmap              73 /* Common                                      */
-#define __NR_mprotect            74 /* Common                                      */
-#define __NR_madvise             75 /* Common                                      */
-#define __NR_vhangup             76 /* Common                                      */
-#define __NR_truncate64                 77 /* Linux sparc32 Specific                      */
-#define __NR_mincore             78 /* Common                                      */
-#define __NR_getgroups           79 /* Common                                      */
-#define __NR_setgroups           80 /* Common                                      */
-#define __NR_getpgrp             81 /* Common                                      */
-#define __NR_setgroups32         82 /* Linux sparc32, setpgrp under SunOS          */
-#define __NR_setitimer           83 /* Common                                      */
-#define __NR_ftruncate64        84 /* Linux sparc32 Specific                      */
-#define __NR_swapon              85 /* Common                                      */
-#define __NR_getitimer           86 /* Common                                      */
-#define __NR_setuid32            87 /* Linux sparc32, gethostname under SunOS      */
-#define __NR_sethostname         88 /* Common                                      */
-#define __NR_setgid32            89 /* Linux sparc32, getdtablesize under SunOS    */
-#define __NR_dup2                90 /* Common                                      */
-#define __NR_setfsuid32          91 /* Linux sparc32, getdopt under SunOS          */
-#define __NR_fcntl               92 /* Common                                      */
-#define __NR_select              93 /* Common                                      */
-#define __NR_setfsgid32          94 /* Linux sparc32, setdopt under SunOS          */
-#define __NR_fsync               95 /* Common                                      */
-#define __NR_setpriority         96 /* Common                                      */
-#define __NR_socket              97 /* Common                                      */
-#define __NR_connect             98 /* Common                                      */
-#define __NR_accept              99 /* Common                                      */
-#define __NR_getpriority        100 /* Common                                      */
-#define __NR_rt_sigreturn       101 /* Linux Specific                              */
-#define __NR_rt_sigaction       102 /* Linux Specific                              */
-#define __NR_rt_sigprocmask     103 /* Linux Specific                              */
-#define __NR_rt_sigpending      104 /* Linux Specific                              */
-#define __NR_rt_sigtimedwait    105 /* Linux Specific                              */
-#define __NR_rt_sigqueueinfo    106 /* Linux Specific                              */
-#define __NR_rt_sigsuspend      107 /* Linux Specific                              */
-#define __NR_setresuid32        108 /* Linux Specific, sigvec under SunOS         */
-#define __NR_getresuid32        109 /* Linux Specific, sigblock under SunOS       */
-#define __NR_setresgid32        110 /* Linux Specific, sigsetmask under SunOS     */
-#define __NR_getresgid32        111 /* Linux Specific, sigpause under SunOS       */
-#define __NR_setregid32         112 /* Linux sparc32, sigstack under SunOS         */
-#define __NR_recvmsg            113 /* Common                                      */
-#define __NR_sendmsg            114 /* Common                                      */
-#define __NR_getgroups32        115 /* Linux sparc32, vtrace under SunOS           */
-#define __NR_gettimeofday       116 /* Common                                      */
-#define __NR_getrusage          117 /* Common                                      */
-#define __NR_getsockopt         118 /* Common                                      */
-#define __NR_getcwd            119 /* Linux Specific                              */
-#define __NR_readv              120 /* Common                                      */
-#define __NR_writev             121 /* Common                                      */
-#define __NR_settimeofday       122 /* Common                                      */
-#define __NR_fchown             123 /* Common                                      */
-#define __NR_fchmod             124 /* Common                                      */
-#define __NR_recvfrom           125 /* Common                                      */
-#define __NR_setreuid           126 /* Common                                      */
-#define __NR_setregid           127 /* Common                                      */
-#define __NR_rename             128 /* Common                                      */
-#define __NR_truncate           129 /* Common                                      */
-#define __NR_ftruncate          130 /* Common                                      */
-#define __NR_flock              131 /* Common                                      */
-#define __NR_lstat64           132 /* Linux Specific                              */
-#define __NR_sendto             133 /* Common                                      */
-#define __NR_shutdown           134 /* Common                                      */
-#define __NR_socketpair         135 /* Common                                      */
-#define __NR_mkdir              136 /* Common                                      */
-#define __NR_rmdir              137 /* Common                                      */
-#define __NR_utimes             138 /* SunOS Specific                              */
-#define __NR_stat64            139 /* Linux Specific                              */
-#define __NR_sendfile64         140 /* adjtime under SunOS                         */
-#define __NR_getpeername        141 /* Common                                      */
-#define __NR_futex              142 /* gethostid under SunOS                       */
-#define __NR_gettid             143 /* ENOSYS under SunOS                          */
-#define __NR_getrlimit          144 /* Common                                      */
-#define __NR_setrlimit          145 /* Common                                      */
-#define __NR_pivot_root                146 /* Linux Specific, killpg under SunOS          */
-#define __NR_prctl             147 /* ENOSYS under SunOS                          */
-#define __NR_pciconfig_read    148 /* ENOSYS under SunOS                          */
-#define __NR_pciconfig_write   149 /* ENOSYS under SunOS                          */
-#define __NR_getsockname        150 /* Common                                      */
-#define __NR_inotify_init       151 /* Linux specific                              */
-#define __NR_inotify_add_watch  152 /* Linux specific                              */
-#define __NR_poll               153 /* Common                                      */
-#define __NR_getdents64                154 /* Linux specific                              */
-#define __NR_fcntl64           155 /* Linux sparc32 Specific                      */
-#define __NR_inotify_rm_watch   156 /* Linux specific                             */
-#define __NR_statfs             157 /* Common                                      */
-#define __NR_fstatfs            158 /* Common                                      */
-#define __NR_umount             159 /* Common                                      */
-#define __NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS    */
-#define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS           */
-#define __NR_getdomainname      162 /* SunOS Specific                              */
-#define __NR_setdomainname      163 /* Common                                      */
-/* #define __NR_utrap_install   164    Linux sparc64 specific                     */
-#define __NR_quotactl           165 /* Common                                      */
-#define __NR_set_tid_address    166 /* Linux specific, exportfs under SunOS        */
-#define __NR_mount              167 /* Common                                      */
-#define __NR_ustat              168 /* Common                                      */
-#define __NR_setxattr           169 /* SunOS: semsys                               */
-#define __NR_lsetxattr          170 /* SunOS: msgsys                               */
-#define __NR_fsetxattr          171 /* SunOS: shmsys                               */
-#define __NR_getxattr           172 /* SunOS: auditsys                             */
-#define __NR_lgetxattr          173 /* SunOS: rfssys                               */
-#define __NR_getdents           174 /* Common                                      */
-#define __NR_setsid             175 /* Common                                      */
-#define __NR_fchdir             176 /* Common                                      */
-#define __NR_fgetxattr          177 /* SunOS: fchroot                              */
-#define __NR_listxattr          178 /* SunOS: vpixsys                              */
-#define __NR_llistxattr         179 /* SunOS: aioread                              */
-#define __NR_flistxattr         180 /* SunOS: aiowrite                             */
-#define __NR_removexattr        181 /* SunOS: aiowait                              */
-#define __NR_lremovexattr       182 /* SunOS: aiocancel                            */
-#define __NR_sigpending         183 /* Common                                      */
-#define __NR_query_module      184 /* Linux Specific                              */
-#define __NR_setpgid            185 /* Common                                      */
-#define __NR_fremovexattr       186 /* SunOS: pathconf                             */
-#define __NR_tkill              187 /* SunOS: fpathconf                            */
-#define __NR_exit_group                188 /* Linux specific, sysconf undef SunOS         */
-#define __NR_uname              189 /* Linux Specific                              */
-#define __NR_init_module        190 /* Linux Specific                              */
-#define __NR_personality        191 /* Linux Specific                              */
-#define __NR_remap_file_pages   192 /* Linux Specific                              */
-#define __NR_epoll_create       193 /* Linux Specific                              */
-#define __NR_epoll_ctl          194 /* Linux Specific                              */
-#define __NR_epoll_wait         195 /* Linux Specific                              */
-#define __NR_ioprio_set         196 /* Linux Specific                              */
-#define __NR_getppid            197 /* Linux Specific                              */
-#define __NR_sigaction          198 /* Linux Specific                              */
-#define __NR_sgetmask           199 /* Linux Specific                              */
-#define __NR_ssetmask           200 /* Linux Specific                              */
-#define __NR_sigsuspend         201 /* Linux Specific                              */
-#define __NR_oldlstat           202 /* Linux Specific                              */
-#define __NR_uselib             203 /* Linux Specific                              */
-#define __NR_readdir            204 /* Linux Specific                              */
-#define __NR_readahead          205 /* Linux Specific                              */
-#define __NR_socketcall         206 /* Linux Specific                              */
-#define __NR_syslog             207 /* Linux Specific                              */
-#define __NR_lookup_dcookie     208 /* Linux Specific                              */
-#define __NR_fadvise64          209 /* Linux Specific                              */
-#define __NR_fadvise64_64       210 /* Linux Specific                              */
-#define __NR_tgkill             211 /* Linux Specific                              */
-#define __NR_waitpid            212 /* Linux Specific                              */
-#define __NR_swapoff            213 /* Linux Specific                              */
-#define __NR_sysinfo            214 /* Linux Specific                              */
-#define __NR_ipc                215 /* Linux Specific                              */
-#define __NR_sigreturn          216 /* Linux Specific                              */
-#define __NR_clone              217 /* Linux Specific                              */
-#define __NR_ioprio_get         218 /* Linux Specific                              */
-#define __NR_adjtimex           219 /* Linux Specific                              */
-#define __NR_sigprocmask        220 /* Linux Specific                              */
-#define __NR_create_module      221 /* Linux Specific                              */
-#define __NR_delete_module      222 /* Linux Specific                              */
-#define __NR_get_kernel_syms    223 /* Linux Specific                              */
-#define __NR_getpgid            224 /* Linux Specific                              */
-#define __NR_bdflush            225 /* Linux Specific                              */
-#define __NR_sysfs              226 /* Linux Specific                              */
-#define __NR_afs_syscall        227 /* Linux Specific                              */
-#define __NR_setfsuid           228 /* Linux Specific                              */
-#define __NR_setfsgid           229 /* Linux Specific                              */
-#define __NR__newselect         230 /* Linux Specific                              */
-#define __NR_time               231 /* Linux Specific                              */
-#define __NR_splice             232 /* Linux Specific                              */
-#define __NR_stime              233 /* Linux Specific                              */
-#define __NR_statfs64           234 /* Linux Specific                              */
-#define __NR_fstatfs64          235 /* Linux Specific                              */
-#define __NR__llseek            236 /* Linux Specific                              */
-#define __NR_mlock              237
-#define __NR_munlock            238
-#define __NR_mlockall           239
-#define __NR_munlockall         240
-#define __NR_sched_setparam     241
-#define __NR_sched_getparam     242
-#define __NR_sched_setscheduler 243
-#define __NR_sched_getscheduler 244
-#define __NR_sched_yield        245
-#define __NR_sched_get_priority_max 246
-#define __NR_sched_get_priority_min 247
-#define __NR_sched_rr_get_interval  248
-#define __NR_nanosleep          249
-#define __NR_mremap             250
-#define __NR__sysctl            251
-#define __NR_getsid             252
-#define __NR_fdatasync          253
-#define __NR_nfsservctl         254
-#define __NR_sync_file_range   255
-#define __NR_clock_settime     256
-#define __NR_clock_gettime     257
-#define __NR_clock_getres      258
-#define __NR_clock_nanosleep   259
-#define __NR_sched_getaffinity 260
-#define __NR_sched_setaffinity 261
-#define __NR_timer_settime     262
-#define __NR_timer_gettime     263
-#define __NR_timer_getoverrun  264
-#define __NR_timer_delete      265
-#define __NR_timer_create      266
-/* #define __NR_vserver                267 Reserved for VSERVER */
-#define __NR_io_setup          268
-#define __NR_io_destroy                269
-#define __NR_io_submit         270
-#define __NR_io_cancel         271
-#define __NR_io_getevents      272
-#define __NR_mq_open           273
-#define __NR_mq_unlink         274
-#define __NR_mq_timedsend      275
-#define __NR_mq_timedreceive   276
-#define __NR_mq_notify         277
-#define __NR_mq_getsetattr     278
-#define __NR_waitid            279
-#define __NR_tee               280
-#define __NR_add_key           281
-#define __NR_request_key       282
-#define __NR_keyctl            283
-#define __NR_openat            284
-#define __NR_mkdirat           285
-#define __NR_mknodat           286
-#define __NR_fchownat          287
-#define __NR_futimesat         288
-#define __NR_fstatat64         289
-#define __NR_unlinkat          290
-#define __NR_renameat          291
-#define __NR_linkat            292
-#define __NR_symlinkat         293
-#define __NR_readlinkat                294
-#define __NR_fchmodat          295
-#define __NR_faccessat         296
-#define __NR_pselect6          297
-#define __NR_ppoll             298
-#define __NR_unshare           299
-#define __NR_set_robust_list   300
-#define __NR_get_robust_list   301
-#define __NR_migrate_pages     302
-#define __NR_mbind             303
-#define __NR_get_mempolicy     304
-#define __NR_set_mempolicy     305
-#define __NR_kexec_load                306
-#define __NR_move_pages                307
-#define __NR_getcpu            308
-#define __NR_epoll_pwait       309
-#define __NR_utimensat         310
-#define __NR_signalfd          311
-#define __NR_timerfd_create    312
-#define __NR_eventfd           313
-#define __NR_fallocate         314
-#define __NR_timerfd_settime   315
-#define __NR_timerfd_gettime   316
-#define __NR_signalfd4         317
-#define __NR_eventfd2          318
-#define __NR_epoll_create1     319
-#define __NR_dup3              320
-#define __NR_pipe2             321
-#define __NR_inotify_init1     322
-#define __NR_accept4           323
-
-#define NR_SYSCALLS            324
-
-/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
- * it never had the plain ones and there is no value to adding those
- * old versions into the syscall table.
- */
-#define __IGNORE_setresuid
-#define __IGNORE_getresuid
-#define __IGNORE_setresgid
-#define __IGNORE_getresgid
-
-#ifdef __KERNEL__
-#define __ARCH_WANT_IPC_PARSE_VERSION
-#define __ARCH_WANT_OLD_READDIR
-#define __ARCH_WANT_STAT64
-#define __ARCH_WANT_SYS_ALARM
-#define __ARCH_WANT_SYS_GETHOSTNAME
-#define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
-#define __ARCH_WANT_SYS_SIGNAL
-#define __ARCH_WANT_SYS_TIME
-#define __ARCH_WANT_SYS_UTIME
-#define __ARCH_WANT_SYS_WAITPID
-#define __ARCH_WANT_SYS_SOCKETCALL
-#define __ARCH_WANT_SYS_FADVISE64
-#define __ARCH_WANT_SYS_GETPGRP
-#define __ARCH_WANT_SYS_LLSEEK
-#define __ARCH_WANT_SYS_NICE
-#define __ARCH_WANT_SYS_OLDUMOUNT
-#define __ARCH_WANT_SYS_SIGPENDING
-#define __ARCH_WANT_SYS_SIGPROCMASK
-#define __ARCH_WANT_SYS_RT_SIGSUSPEND
-
-/*
- * "Conditional" syscalls
- *
- * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
- * but it doesn't work on all toolchains, so we just do it by hand
- */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
-
-#endif /* __KERNEL__ */
-#endif /* _SPARC_UNISTD_H */
diff --git a/arch/sparc/include/asm/unistd_64.h b/arch/sparc/include/asm/unistd_64.h
deleted file mode 100644 (file)
index fa5d3c0..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-#ifndef _SPARC64_UNISTD_H
-#define _SPARC64_UNISTD_H
-
-/*
- * System calls under the Sparc.
- *
- * Don't be scared by the ugly clobbers, it is the only way I can
- * think of right now to force the arguments into fixed registers
- * before the trap into the system call with gcc 'asm' statements.
- *
- * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
- *
- * SunOS compatibility based upon preliminary work which is:
- *
- * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
- */
-
-#define __NR_restart_syscall      0 /* Linux Specific                             */
-#define __NR_exit                 1 /* Common                                      */
-#define __NR_fork                 2 /* Common                                      */
-#define __NR_read                 3 /* Common                                      */
-#define __NR_write                4 /* Common                                      */
-#define __NR_open                 5 /* Common                                      */
-#define __NR_close                6 /* Common                                      */
-#define __NR_wait4                7 /* Common                                      */
-#define __NR_creat                8 /* Common                                      */
-#define __NR_link                 9 /* Common                                      */
-#define __NR_unlink              10 /* Common                                      */
-#define __NR_execv               11 /* SunOS Specific                              */
-#define __NR_chdir               12 /* Common                                      */
-#define __NR_chown              13 /* Common                                      */
-#define __NR_mknod               14 /* Common                                      */
-#define __NR_chmod               15 /* Common                                      */
-#define __NR_lchown              16 /* Common                                      */
-#define __NR_brk                 17 /* Common                                      */
-#define __NR_perfctr             18 /* Performance counter operations              */
-#define __NR_lseek               19 /* Common                                      */
-#define __NR_getpid              20 /* Common                                      */
-#define __NR_capget             21 /* Linux Specific                              */
-#define __NR_capset             22 /* Linux Specific                              */
-#define __NR_setuid              23 /* Implemented via setreuid in SunOS           */
-#define __NR_getuid              24 /* Common                                      */
-#define __NR_vmsplice           25 /* ENOSYS under SunOS                          */
-#define __NR_ptrace              26 /* Common                                      */
-#define __NR_alarm               27 /* Implemented via setitimer in SunOS          */
-#define __NR_sigaltstack        28 /* Common                                      */
-#define __NR_pause               29 /* Is sigblock(0)->sigpause() in SunOS         */
-#define __NR_utime               30 /* Implemented via utimes() under SunOS        */
-/* #define __NR_lchown32         31    Linux sparc32 specific                      */
-/* #define __NR_fchown32         32    Linux sparc32 specific                      */
-#define __NR_access              33 /* Common                                      */
-#define __NR_nice                34 /* Implemented via get/setpriority() in SunOS  */
-/* #define __NR_chown32          35    Linux sparc32 specific                      */
-#define __NR_sync                36 /* Common                                      */
-#define __NR_kill                37 /* Common                                      */
-#define __NR_stat                38 /* Common                                      */
-#define __NR_sendfile           39 /* Linux Specific                              */
-#define __NR_lstat               40 /* Common                                      */
-#define __NR_dup                 41 /* Common                                      */
-#define __NR_pipe                42 /* Common                                      */
-#define __NR_times               43 /* Implemented via getrusage() in SunOS        */
-/* #define __NR_getuid32         44    Linux sparc32 specific                      */
-#define __NR_umount2             45 /* Linux Specific                              */
-#define __NR_setgid              46 /* Implemented via setregid() in SunOS         */
-#define __NR_getgid              47 /* Common                                      */
-#define __NR_signal              48 /* Implemented via sigvec() in SunOS           */
-#define __NR_geteuid             49 /* SunOS calls getuid()                        */
-#define __NR_getegid             50 /* SunOS calls getgid()                        */
-#define __NR_acct                51 /* Common                                      */
-#define __NR_memory_ordering    52 /* Linux Specific                              */
-/* #define __NR_getgid32         53    Linux sparc32 specific                      */
-#define __NR_ioctl               54 /* Common                                      */
-#define __NR_reboot              55 /* Common                                      */
-/* #define __NR_mmap2           56    Linux sparc32 Specific                      */
-#define __NR_symlink             57 /* Common                                      */
-#define __NR_readlink            58 /* Common                                      */
-#define __NR_execve              59 /* Common                                      */
-#define __NR_umask               60 /* Common                                      */
-#define __NR_chroot              61 /* Common                                      */
-#define __NR_fstat               62 /* Common                                      */
-#define __NR_fstat64             63 /* Linux Specific                              */
-#define __NR_getpagesize         64 /* Common                                      */
-#define __NR_msync               65 /* Common in newer 1.3.x revs...               */
-#define __NR_vfork               66 /* Common                                      */
-#define __NR_pread64             67 /* Linux Specific                              */
-#define __NR_pwrite64            68 /* Linux Specific                              */
-/* #define __NR_geteuid32        69    Linux sparc32, sbrk under SunOS             */
-/* #define __NR_getegid32        70    Linux sparc32, sstk under SunOS             */
-#define __NR_mmap                71 /* Common                                      */
-/* #define __NR_setreuid32       72    Linux sparc32, vadvise under SunOS          */
-#define __NR_munmap              73 /* Common                                      */
-#define __NR_mprotect            74 /* Common                                      */
-#define __NR_madvise             75 /* Common                                      */
-#define __NR_vhangup             76 /* Common                                      */
-/* #define __NR_truncate64       77    Linux sparc32 Specific                     */
-#define __NR_mincore             78 /* Common                                      */
-#define __NR_getgroups           79 /* Common                                      */
-#define __NR_setgroups           80 /* Common                                      */
-#define __NR_getpgrp             81 /* Common                                      */
-/* #define __NR_setgroups32      82    Linux sparc32, setpgrp under SunOS          */
-#define __NR_setitimer           83 /* Common                                      */
-/* #define __NR_ftruncate64      84    Linux sparc32 Specific                     */
-#define __NR_swapon              85 /* Common                                      */
-#define __NR_getitimer           86 /* Common                                      */
-/* #define __NR_setuid32         87    Linux sparc32, gethostname under SunOS      */
-#define __NR_sethostname         88 /* Common                                      */
-/* #define __NR_setgid32         89    Linux sparc32, getdtablesize under SunOS    */
-#define __NR_dup2                90 /* Common                                      */
-/* #define __NR_setfsuid32       91    Linux sparc32, getdopt under SunOS          */
-#define __NR_fcntl               92 /* Common                                      */
-#define __NR_select              93 /* Common                                      */
-/* #define __NR_setfsgid32       94    Linux sparc32, setdopt under SunOS          */
-#define __NR_fsync               95 /* Common                                      */
-#define __NR_setpriority         96 /* Common                                      */
-#define __NR_socket              97 /* Common                                      */
-#define __NR_connect             98 /* Common                                      */
-#define __NR_accept              99 /* Common                                      */
-#define __NR_getpriority        100 /* Common                                      */
-#define __NR_rt_sigreturn       101 /* Linux Specific                              */
-#define __NR_rt_sigaction       102 /* Linux Specific                              */
-#define __NR_rt_sigprocmask     103 /* Linux Specific                              */
-#define __NR_rt_sigpending      104 /* Linux Specific                              */
-#define __NR_rt_sigtimedwait    105 /* Linux Specific                              */
-#define __NR_rt_sigqueueinfo    106 /* Linux Specific                              */
-#define __NR_rt_sigsuspend      107 /* Linux Specific                              */
-#define __NR_setresuid          108 /* Linux Specific, sigvec under SunOS         */
-#define __NR_getresuid          109 /* Linux Specific, sigblock under SunOS       */
-#define __NR_setresgid          110 /* Linux Specific, sigsetmask under SunOS     */
-#define __NR_getresgid          111 /* Linux Specific, sigpause under SunOS       */
-/* #define __NR_setregid32       75    Linux sparc32, sigstack under SunOS         */
-#define __NR_recvmsg            113 /* Common                                      */
-#define __NR_sendmsg            114 /* Common                                      */
-/* #define __NR_getgroups32     115    Linux sparc32, vtrace under SunOS           */
-#define __NR_gettimeofday       116 /* Common                                      */
-#define __NR_getrusage          117 /* Common                                      */
-#define __NR_getsockopt         118 /* Common                                      */
-#define __NR_getcwd            119 /* Linux Specific                              */
-#define __NR_readv              120 /* Common                                      */
-#define __NR_writev             121 /* Common                                      */
-#define __NR_settimeofday       122 /* Common                                      */
-#define __NR_fchown             123 /* Common                                      */
-#define __NR_fchmod             124 /* Common                                      */
-#define __NR_recvfrom           125 /* Common                                      */
-#define __NR_setreuid           126 /* Common                                      */
-#define __NR_setregid           127 /* Common                                      */
-#define __NR_rename             128 /* Common                                      */
-#define __NR_truncate           129 /* Common                                      */
-#define __NR_ftruncate          130 /* Common                                      */
-#define __NR_flock              131 /* Common                                      */
-#define __NR_lstat64           132 /* Linux Specific                              */
-#define __NR_sendto             133 /* Common                                      */
-#define __NR_shutdown           134 /* Common                                      */
-#define __NR_socketpair         135 /* Common                                      */
-#define __NR_mkdir              136 /* Common                                      */
-#define __NR_rmdir              137 /* Common                                      */
-#define __NR_utimes             138 /* SunOS Specific                              */
-#define __NR_stat64            139 /* Linux Specific                              */
-#define __NR_sendfile64         140 /* adjtime under SunOS                         */
-#define __NR_getpeername        141 /* Common                                      */
-#define __NR_futex              142 /* gethostid under SunOS                       */
-#define __NR_gettid             143 /* ENOSYS under SunOS                          */
-#define __NR_getrlimit         144 /* Common                                      */
-#define __NR_setrlimit          145 /* Common                                      */
-#define __NR_pivot_root                146 /* Linux Specific, killpg under SunOS          */
-#define __NR_prctl             147 /* ENOSYS under SunOS                          */
-#define __NR_pciconfig_read    148 /* ENOSYS under SunOS                          */
-#define __NR_pciconfig_write   149 /* ENOSYS under SunOS                          */
-#define __NR_getsockname        150 /* Common                                      */
-#define __NR_inotify_init       151 /* Linux specific                              */
-#define __NR_inotify_add_watch  152 /* Linux specific                              */
-#define __NR_poll               153 /* Common                                      */
-#define __NR_getdents64                154 /* Linux specific                              */
-/* #define __NR_fcntl64         155    Linux sparc32 Specific                      */
-#define __NR_inotify_rm_watch   156 /* Linux specific                             */
-#define __NR_statfs             157 /* Common                                      */
-#define __NR_fstatfs            158 /* Common                                      */
-#define __NR_umount             159 /* Common                                      */
-#define __NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS    */
-#define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS           */
-#define __NR_getdomainname      162 /* SunOS Specific                              */
-#define __NR_setdomainname      163 /* Common                                      */
-#define __NR_utrap_install     164 /* SYSV ABI/v9 required                        */
-#define __NR_quotactl           165 /* Common                                      */
-#define __NR_set_tid_address    166 /* Linux specific, exportfs under SunOS        */
-#define __NR_mount              167 /* Common                                      */
-#define __NR_ustat              168 /* Common                                      */
-#define __NR_setxattr           169 /* SunOS: semsys                               */
-#define __NR_lsetxattr          170 /* SunOS: msgsys                               */
-#define __NR_fsetxattr          171 /* SunOS: shmsys                               */
-#define __NR_getxattr           172 /* SunOS: auditsys                             */
-#define __NR_lgetxattr          173 /* SunOS: rfssys                               */
-#define __NR_getdents           174 /* Common                                      */
-#define __NR_setsid             175 /* Common                                      */
-#define __NR_fchdir             176 /* Common                                      */
-#define __NR_fgetxattr          177 /* SunOS: fchroot                              */
-#define __NR_listxattr          178 /* SunOS: vpixsys                              */
-#define __NR_llistxattr         179 /* SunOS: aioread                              */
-#define __NR_flistxattr         180 /* SunOS: aiowrite                             */
-#define __NR_removexattr        181 /* SunOS: aiowait                              */
-#define __NR_lremovexattr       182 /* SunOS: aiocancel                            */
-#define __NR_sigpending         183 /* Common                                      */
-#define __NR_query_module      184 /* Linux Specific                              */
-#define __NR_setpgid            185 /* Common                                      */
-#define __NR_fremovexattr       186 /* SunOS: pathconf                             */
-#define __NR_tkill              187 /* SunOS: fpathconf                            */
-#define __NR_exit_group                188 /* Linux specific, sysconf undef SunOS         */
-#define __NR_uname              189 /* Linux Specific                              */
-#define __NR_init_module        190 /* Linux Specific                              */
-#define __NR_personality        191 /* Linux Specific                              */
-#define __NR_remap_file_pages   192 /* Linux Specific                              */
-#define __NR_epoll_create       193 /* Linux Specific                              */
-#define __NR_epoll_ctl          194 /* Linux Specific                              */
-#define __NR_epoll_wait         195 /* Linux Specific                              */
-#define __NR_ioprio_set         196 /* Linux Specific                              */
-#define __NR_getppid            197 /* Linux Specific                              */
-#define __NR_sigaction          198 /* Linux Specific                              */
-#define __NR_sgetmask           199 /* Linux Specific                              */
-#define __NR_ssetmask           200 /* Linux Specific                              */
-#define __NR_sigsuspend         201 /* Linux Specific                              */
-#define __NR_oldlstat           202 /* Linux Specific                              */
-#define __NR_uselib             203 /* Linux Specific                              */
-#define __NR_readdir            204 /* Linux Specific                              */
-#define __NR_readahead          205 /* Linux Specific                              */
-#define __NR_socketcall         206 /* Linux Specific                              */
-#define __NR_syslog             207 /* Linux Specific                              */
-#define __NR_lookup_dcookie     208 /* Linux Specific                              */
-#define __NR_fadvise64          209 /* Linux Specific                              */
-#define __NR_fadvise64_64       210 /* Linux Specific                              */
-#define __NR_tgkill             211 /* Linux Specific                              */
-#define __NR_waitpid            212 /* Linux Specific                              */
-#define __NR_swapoff            213 /* Linux Specific                              */
-#define __NR_sysinfo            214 /* Linux Specific                              */
-#define __NR_ipc                215 /* Linux Specific                              */
-#define __NR_sigreturn          216 /* Linux Specific                              */
-#define __NR_clone              217 /* Linux Specific                              */
-#define __NR_ioprio_get         218 /* Linux Specific                              */
-#define __NR_adjtimex           219 /* Linux Specific                              */
-#define __NR_sigprocmask        220 /* Linux Specific                              */
-#define __NR_create_module      221 /* Linux Specific                              */
-#define __NR_delete_module      222 /* Linux Specific                              */
-#define __NR_get_kernel_syms    223 /* Linux Specific                              */
-#define __NR_getpgid            224 /* Linux Specific                              */
-#define __NR_bdflush            225 /* Linux Specific                              */
-#define __NR_sysfs              226 /* Linux Specific                              */
-#define __NR_afs_syscall        227 /* Linux Specific                              */
-#define __NR_setfsuid           228 /* Linux Specific                              */
-#define __NR_setfsgid           229 /* Linux Specific                              */
-#define __NR__newselect         230 /* Linux Specific                              */
-#ifdef __KERNEL__
-#define __NR_time              231 /* Linux sparc32                               */
-#endif
-#define __NR_splice             232 /* Linux Specific                              */
-#define __NR_stime              233 /* Linux Specific                              */
-#define __NR_statfs64           234 /* Linux Specific                              */
-#define __NR_fstatfs64          235 /* Linux Specific                              */
-#define __NR__llseek            236 /* Linux Specific                              */
-#define __NR_mlock              237
-#define __NR_munlock            238
-#define __NR_mlockall           239
-#define __NR_munlockall         240
-#define __NR_sched_setparam     241
-#define __NR_sched_getparam     242
-#define __NR_sched_setscheduler 243
-#define __NR_sched_getscheduler 244
-#define __NR_sched_yield        245
-#define __NR_sched_get_priority_max 246
-#define __NR_sched_get_priority_min 247
-#define __NR_sched_rr_get_interval  248
-#define __NR_nanosleep          249
-#define __NR_mremap             250
-#define __NR__sysctl            251
-#define __NR_getsid             252
-#define __NR_fdatasync          253
-#define __NR_nfsservctl         254
-#define __NR_sync_file_range   255
-#define __NR_clock_settime     256
-#define __NR_clock_gettime     257
-#define __NR_clock_getres      258
-#define __NR_clock_nanosleep   259
-#define __NR_sched_getaffinity 260
-#define __NR_sched_setaffinity 261
-#define __NR_timer_settime     262
-#define __NR_timer_gettime     263
-#define __NR_timer_getoverrun  264
-#define __NR_timer_delete      265
-#define __NR_timer_create      266
-/* #define __NR_vserver                267 Reserved for VSERVER */
-#define __NR_io_setup          268
-#define __NR_io_destroy                269
-#define __NR_io_submit         270
-#define __NR_io_cancel         271
-#define __NR_io_getevents      272
-#define __NR_mq_open           273
-#define __NR_mq_unlink         274
-#define __NR_mq_timedsend      275
-#define __NR_mq_timedreceive   276
-#define __NR_mq_notify         277
-#define __NR_mq_getsetattr     278
-#define __NR_waitid            279
-#define __NR_tee               280
-#define __NR_add_key           281
-#define __NR_request_key       282
-#define __NR_keyctl            283
-#define __NR_openat            284
-#define __NR_mkdirat           285
-#define __NR_mknodat           286
-#define __NR_fchownat          287
-#define __NR_futimesat         288
-#define __NR_fstatat64         289
-#define __NR_unlinkat          290
-#define __NR_renameat          291
-#define __NR_linkat            292
-#define __NR_symlinkat         293
-#define __NR_readlinkat                294
-#define __NR_fchmodat          295
-#define __NR_faccessat         296
-#define __NR_pselect6          297
-#define __NR_ppoll             298
-#define __NR_unshare           299
-#define __NR_set_robust_list   300
-#define __NR_get_robust_list   301
-#define __NR_migrate_pages     302
-#define __NR_mbind             303
-#define __NR_get_mempolicy     304
-#define __NR_set_mempolicy     305
-#define __NR_kexec_load                306
-#define __NR_move_pages                307
-#define __NR_getcpu            308
-#define __NR_epoll_pwait       309
-#define __NR_utimensat         310
-#define __NR_signalfd          311
-#define __NR_timerfd_create    312
-#define __NR_eventfd           313
-#define __NR_fallocate         314
-#define __NR_timerfd_settime   315
-#define __NR_timerfd_gettime   316
-#define __NR_signalfd4         317
-#define __NR_eventfd2          318
-#define __NR_epoll_create1     319
-#define __NR_dup3              320
-#define __NR_pipe2             321
-#define __NR_inotify_init1     322
-#define __NR_accept4           323
-
-#define NR_SYSCALLS            324
-
-#ifdef __KERNEL__
-#define __ARCH_WANT_IPC_PARSE_VERSION
-#define __ARCH_WANT_OLD_READDIR
-#define __ARCH_WANT_STAT64
-#define __ARCH_WANT_SYS_ALARM
-#define __ARCH_WANT_SYS_GETHOSTNAME
-#define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_SGETMASK
-#define __ARCH_WANT_SYS_SIGNAL
-#define __ARCH_WANT_SYS_TIME
-#define __ARCH_WANT_COMPAT_SYS_TIME
-#define __ARCH_WANT_SYS_UTIME
-#define __ARCH_WANT_SYS_WAITPID
-#define __ARCH_WANT_SYS_SOCKETCALL
-#define __ARCH_WANT_SYS_FADVISE64
-#define __ARCH_WANT_SYS_GETPGRP
-#define __ARCH_WANT_SYS_LLSEEK
-#define __ARCH_WANT_SYS_NICE
-#define __ARCH_WANT_SYS_OLDUMOUNT
-#define __ARCH_WANT_SYS_SIGPENDING
-#define __ARCH_WANT_SYS_SIGPROCMASK
-#define __ARCH_WANT_SYS_RT_SIGSUSPEND
-#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
-
-/*
- * "Conditional" syscalls
- *
- * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
- * but it doesn't work on all toolchains, so we just do it by hand
- */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
-
-#endif /* __KERNEL__ */
-#endif /* _SPARC64_UNISTD_H */
diff --git a/arch/sparc/kernel/.gitignore b/arch/sparc/kernel/.gitignore
new file mode 100644 (file)
index 0000000..c5f676c
--- /dev/null
@@ -0,0 +1 @@
+vmlinux.lds
index 2d65820..53adcaa 100644 (file)
@@ -2,25 +2,98 @@
 # Makefile for the linux kernel.
 #
 
-extra-y                := head.o init_task.o vmlinux.lds
-
-EXTRA_AFLAGS   := -ansi
-
-IRQ_OBJS := irq.o sun4m_irq.o sun4c_irq.o sun4d_irq.o
-obj-y    := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
-           process.o signal.o ioport.o setup.o idprom.o \
-           sys_sparc.o systbls.o \
-           time.o windows.o cpu.o devices.o \
-           tadpole.o tick14.o ptrace.o \
-           unaligned.o una_asm.o muldiv.o \
-           prom.o of_device.o devres.o dma.o
-
-devres-y = ../../../kernel/irq/devres.o
-
-obj-$(CONFIG_PCI) += pcic.o
-obj-$(CONFIG_SMP) += trampoline.o smp.o sun4m_smp.o sun4d_smp.o
-obj-$(CONFIG_SUN_AUXIO) += auxio.o
-obj-$(CONFIG_SUN_PM) += apc.o pmc.o
-obj-$(CONFIG_MODULES) += module.o sparc_ksyms.o
-obj-$(CONFIG_SPARC_LED) += led.o
-obj-$(CONFIG_KGDB) += kgdb.o
+asflags-y := -ansi
+ccflags-y := -Werror
+
+extra-y     := head_$(BITS).o
+extra-y     += init_task.o
+extra-y     += vmlinux.lds
+
+obj-$(CONFIG_SPARC32)   += entry.o wof.o wuf.o
+obj-$(CONFIG_SPARC32)   += etrap_32.o
+obj-$(CONFIG_SPARC32)   += rtrap_32.o
+obj-y                   += traps_$(BITS).o
+
+# IRQ
+obj-y                   += irq_$(BITS).o
+obj-$(CONFIG_SPARC32)   += sun4m_irq.o sun4c_irq.o sun4d_irq.o
+
+obj-y                   += process_$(BITS).o
+obj-y                   += signal_$(BITS).o
+obj-$(CONFIG_SPARC32)   += ioport.o
+obj-y                   += setup_$(BITS).o
+obj-y                   += idprom.o
+obj-y                   += sys_sparc_$(BITS).o
+obj-$(CONFIG_SPARC32)   += systbls_32.o
+obj-y                   += time_$(BITS).o
+obj-$(CONFIG_SPARC32)   += windows.o
+obj-y                   += cpu.o
+obj-$(CONFIG_SPARC32)   += devices.o
+obj-$(CONFIG_SPARC32)   += tadpole.o
+obj-$(CONFIG_SPARC32)   += tick14.o
+obj-y                   += ptrace_$(BITS).o
+obj-y                   += unaligned_$(BITS).o
+obj-y                   += una_asm_$(BITS).o
+obj-$(CONFIG_SPARC32)   += muldiv.o
+obj-y                   += prom_common.o
+obj-y                   += prom_$(BITS).o
+obj-y                   += of_device_$(BITS).o
+obj-$(CONFIG_SPARC64)   += prom_irqtrans.o
+
+obj-$(CONFIG_SPARC64)   += reboot.o
+obj-$(CONFIG_SPARC64)   += sysfs.o
+obj-$(CONFIG_SPARC64)   += iommu.o
+obj-$(CONFIG_SPARC64)   += central.o
+obj-$(CONFIG_SPARC64)   += starfire.o
+obj-$(CONFIG_SPARC64)   += power.o
+obj-$(CONFIG_SPARC64)   += sbus.o
+obj-$(CONFIG_SPARC64)   += ebus.o
+obj-$(CONFIG_SPARC64)   += visemul.o
+obj-$(CONFIG_SPARC64)   += hvapi.o
+obj-$(CONFIG_SPARC64)   += sstate.o
+obj-$(CONFIG_SPARC64)   += mdesc.o
+
+# sparc32 do not use GENERIC_HARDIRQS but uses the generic devres implementation
+obj-$(CONFIG_SPARC32)     += devres.o
+devres-y                  := ../../../kernel/irq/devres.o
+
+obj-$(CONFIG_SPARC32)     += dma.o
+
+obj-$(CONFIG_SPARC32_PCI) += pcic.o
+
+obj-$(CONFIG_SMP)         += trampoline_$(BITS).o smp_$(BITS).o
+obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o
+obj-$(CONFIG_SPARC64_SMP) += hvtramp.o
+
+obj-y                     += auxio_$(BITS).o
+obj-$(CONFIG_SUN_PM)      += apc.o pmc.o
+
+obj-$(CONFIG_MODULES)     += module.o
+obj-$(CONFIG_MODULES)     += sparc_ksyms_$(BITS).o
+obj-$(CONFIG_SPARC_LED)   += led.o
+obj-$(CONFIG_KGDB)        += kgdb_$(BITS).o
+
+
+obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
+CFLAGS_REMOVE_ftrace.o := -pg
+
+obj-$(CONFIG_STACKTRACE)     += stacktrace.o
+# sparc64 PCI
+obj-$(CONFIG_SPARC64_PCI)    += pci.o pci_common.o psycho_common.o
+obj-$(CONFIG_SPARC64_PCI)    += pci_psycho.o pci_sabre.o pci_schizo.o
+obj-$(CONFIG_SPARC64_PCI)    += pci_sun4v.o pci_sun4v_asm.o pci_fire.o
+obj-$(CONFIG_PCI_MSI)        += pci_msi.o
+
+obj-$(CONFIG_COMPAT)         += sys32.o sys_sparc32.o signal32.o
+
+# sparc64 cpufreq
+obj-$(CONFIG_US3_FREQ)  += us3_cpufreq.o
+obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o
+obj-$(CONFIG_US3_MC)    += chmc.o
+
+obj-$(CONFIG_KPROBES)   += kprobes.o
+obj-$(CONFIG_SUN_LDOMS) += ldc.o vio.o viohs.o ds.o
+
+obj-$(CONFIG_AUDIT)     += audit.o
+audit--$(CONFIG_AUDIT)  := compat_audit.o
+obj-$(CONFIG_COMPAT)    += $(audit--y)
index b5bb99e..68f7e11 100644 (file)
 // #include <linux/mm.h>
 #include <linux/kbuild.h>
 
-int foo(void)
+#ifdef CONFIG_SPARC32
+int sparc32_foo(void)
 {
-       DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
-       BLANK();
        DEFINE(AOFF_thread_fork_kpsr,
                        offsetof(struct thread_struct, fork_kpsr));
+       return 0;
+}
+#else
+int sparc64_foo(void)
+{
+       return 0;
+}
+#endif
+
+int foo(void)
+{
+       BLANK();
+       DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
        BLANK();
        DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context));
 
        /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */
        return 0;
 }
+
similarity index 67%
rename from arch/sparc64/kernel/auxio.c
rename to arch/sparc/kernel/auxio_64.c
index 858beda..8b67347 100644 (file)
@@ -27,73 +27,55 @@ enum auxio_type {
 static enum auxio_type auxio_devtype = AUXIO_TYPE_NODEV;
 static DEFINE_SPINLOCK(auxio_lock);
 
-static void __auxio_sbus_set(u8 bits_on, u8 bits_off)
+static void __auxio_rmw(u8 bits_on, u8 bits_off, int ebus)
 {
        if (auxio_register) {
-               unsigned char regval;
                unsigned long flags;
-               unsigned char newval;
+               u8 regval, newval;
 
                spin_lock_irqsave(&auxio_lock, flags);
 
-               regval =  sbus_readb(auxio_register);
+               regval = (ebus ?
+                         (u8) readl(auxio_register) :
+                         sbus_readb(auxio_register));
                newval =  regval | bits_on;
                newval &= ~bits_off;
-               newval &= ~AUXIO_AUX1_MASK;
-               sbus_writeb(newval, auxio_register);
+               if (!ebus)
+                       newval &= ~AUXIO_AUX1_MASK;
+               if (ebus)
+                       writel((u32) newval, auxio_register);
+               else
+                       sbus_writeb(newval, auxio_register);
                
                spin_unlock_irqrestore(&auxio_lock, flags);
        }
 }
 
-static void __auxio_ebus_set(u8 bits_on, u8 bits_off)
+static void __auxio_set_bit(u8 bit, int on, int ebus)
 {
-       if (auxio_register) {
-               unsigned char regval;
-               unsigned long flags;
-               unsigned char newval;
-
-               spin_lock_irqsave(&auxio_lock, flags);
-
-               regval =  (u8)readl(auxio_register);
-               newval =  regval | bits_on;
-               newval &= ~bits_off;
-               writel((u32)newval, auxio_register);
+       u8 bits_on = (ebus ? AUXIO_PCIO_LED : AUXIO_AUX1_LED);
+       u8 bits_off = 0;
 
-               spin_unlock_irqrestore(&auxio_lock, flags);
+       if (!on) {
+               u8 tmp = bits_off;
+               bits_off = bits_on;
+               bits_on = tmp;
        }
-}
-
-static inline void __auxio_ebus_set_led(int on)
-{
-       (on) ? __auxio_ebus_set(AUXIO_PCIO_LED, 0) :
-               __auxio_ebus_set(0, AUXIO_PCIO_LED) ;
-}
-
-static inline void __auxio_sbus_set_led(int on)
-{
-       (on) ? __auxio_sbus_set(AUXIO_AUX1_LED, 0) :
-               __auxio_sbus_set(0, AUXIO_AUX1_LED) ;
+       __auxio_rmw(bits_on, bits_off, ebus);
 }
 
 void auxio_set_led(int on)
 {
-       switch(auxio_devtype) {
-       case AUXIO_TYPE_SBUS:
-               __auxio_sbus_set_led(on);
-               break;
-       case AUXIO_TYPE_EBUS:
-               __auxio_ebus_set_led(on);
-               break;
-       default:
-               break;
-       }
+       int ebus = auxio_devtype == AUXIO_TYPE_EBUS;
+       u8 bit;
+
+       bit = (ebus ? AUXIO_PCIO_LED : AUXIO_AUX1_LED);
+       __auxio_set_bit(bit, on, ebus);
 }
 
-static inline void __auxio_sbus_set_lte(int on)
+static void __auxio_sbus_set_lte(int on)
 {
-       (on) ? __auxio_sbus_set(AUXIO_AUX1_LTE, 0) : 
-               __auxio_sbus_set(0, AUXIO_AUX1_LTE) ;
+       __auxio_set_bit(AUXIO_AUX1_LTE, on, 0);
 }
 
 void auxio_set_lte(int on)