]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 7 Feb 2007 01:24:58 +0000 (17:24 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 7 Feb 2007 01:24:58 +0000 (17:24 -0800)
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (27 commits)
  [IA64] swiotlb abstraction (e.g. for Xen)
  [IA64] swiotlb cleanup
  [IA64] make swiotlb use bus_to_virt/virt_to_bus
  [IA64] swiotlb bug fixes
  [IA64] Hook up getcpu system call for IA64
  [IA64] clean up sparsemem memory_present call
  [IA64] show_mem() for IA64 sparsemem NUMA
  [IA64] missing exports hwsw_sync_...
  [IA64] virt_to_page() can be called with NULL arg
  [IA64] alignment bug in ldscript
  [IA64] register memory ranges in a consistent manner
  [IA64] Enable SWIOTLB only when needed
  [IA64-SGI] Check for TIO errors on shub2 Altix
  [IA64] remove bogus prototype ia64_esi_init()
  [IA64] Clear IRQ affinity when unregistered
  [IA64] fix ACPI Kconfig issues
  [IA64] Fix NULL-pointer dereference in ia64_machine_kexec()
  [IA64] find thread for user rbs address
  [IA64] use snprintf() on features field of /proc/cpuinfo
  [IA64] enable singlestep on system call
  ...

388 files changed:
Documentation/s390/Debugging390.txt
MAINTAINERS
Makefile
arch/mips/Kconfig
arch/mips/Kconfig.debug
arch/mips/arc/identify.c
arch/mips/arc/memory.c
arch/mips/au1000/common/irq.c
arch/mips/au1000/common/pci.c
arch/mips/au1000/common/prom.c
arch/mips/au1000/common/setup.c
arch/mips/au1000/pb1100/board_setup.c
arch/mips/au1000/pb1200/irqmap.c
arch/mips/basler/excite/excite_irq.c
arch/mips/cobalt/irq.c
arch/mips/cobalt/setup.c
arch/mips/ddb5xxx/common/prom.c
arch/mips/ddb5xxx/ddb5477/irq.c
arch/mips/ddb5xxx/ddb5477/irq_5477.c
arch/mips/dec/ioasic-irq.c
arch/mips/dec/kn02-irq.c
arch/mips/dec/prom/memory.c
arch/mips/dec/setup.c
arch/mips/emma2rh/common/irq_emma2rh.c
arch/mips/emma2rh/markeins/irq.c
arch/mips/emma2rh/markeins/irq_markeins.c
arch/mips/gt64120/ev64120/irq.c
arch/mips/gt64120/ev64120/setup.c
arch/mips/gt64120/momenco_ocelot/dbg_io.c
arch/mips/gt64120/momenco_ocelot/irq.c
arch/mips/gt64120/momenco_ocelot/prom.c
arch/mips/gt64120/wrppmc/irq.c
arch/mips/gt64120/wrppmc/setup.c
arch/mips/jazz/irq.c
arch/mips/jmr3927/common/prom.c
arch/mips/jmr3927/rbhma3100/irq.c
arch/mips/jmr3927/rbhma3100/setup.c
arch/mips/kernel/asm-offsets.c
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/gdb-stub.c
arch/mips/kernel/head.S
arch/mips/kernel/i8259.c
arch/mips/kernel/irixelf.c
arch/mips/kernel/irq-msc01.c
arch/mips/kernel/irq-mv6434x.c
arch/mips/kernel/irq-rm7000.c
arch/mips/kernel/irq-rm9000.c
arch/mips/kernel/irq_cpu.c
arch/mips/kernel/linux32.c
arch/mips/kernel/mips-mt.c
arch/mips/kernel/proc.c
arch/mips/kernel/process.c
arch/mips/kernel/r4k_fpu.S
arch/mips/kernel/rtlx.c
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/setup.c
arch/mips/kernel/signal.c
arch/mips/kernel/signal_n32.c
arch/mips/kernel/smp-mt.c
arch/mips/kernel/smtc.c
arch/mips/kernel/sysirix.c
arch/mips/kernel/vpe.c
arch/mips/lasat/interrupt.c
arch/mips/lasat/prom.c
arch/mips/lib-32/Makefile
arch/mips/lib-64/Makefile
arch/mips/lib-64/memset.S [deleted file]
arch/mips/lib/Makefile
arch/mips/lib/memset.S [moved from arch/mips/lib-32/memset.S with 85% similarity]
arch/mips/lib/uncached.c
arch/mips/mips-boards/atlas/atlas_int.c
arch/mips/mips-boards/generic/memory.c
arch/mips/mips-boards/malta/malta_int.c
arch/mips/mips-boards/sead/sead_int.c
arch/mips/mips-boards/sim/sim_int.c
arch/mips/mips-boards/sim/sim_mem.c
arch/mips/mm/init.c
arch/mips/momentum/jaguar_atx/Makefile
arch/mips/momentum/jaguar_atx/irq.c
arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h
arch/mips/momentum/jaguar_atx/platform.c [new file with mode: 0644]
arch/mips/momentum/jaguar_atx/prom.c
arch/mips/momentum/ocelot_3/irq.c
arch/mips/momentum/ocelot_3/prom.c
arch/mips/momentum/ocelot_c/cpci-irq.c
arch/mips/momentum/ocelot_c/dbg_io.c
arch/mips/momentum/ocelot_c/irq.c
arch/mips/momentum/ocelot_c/prom.c
arch/mips/momentum/ocelot_c/uart-irq.c
arch/mips/momentum/ocelot_g/dbg_io.c
arch/mips/momentum/ocelot_g/irq.c
arch/mips/momentum/ocelot_g/prom.c
arch/mips/oprofile/Kconfig
arch/mips/pci/fixup-vr4133.c
arch/mips/philips/pnx8550/common/int.c
arch/mips/philips/pnx8550/common/prom.c
arch/mips/pmc-sierra/yosemite/dbg_io.c
arch/mips/pmc-sierra/yosemite/irq.c
arch/mips/pmc-sierra/yosemite/prom.c
arch/mips/pmc-sierra/yosemite/setup.c
arch/mips/qemu/q-mem.c
arch/mips/sgi-ip22/ip22-eisa.c
arch/mips/sgi-ip22/ip22-int.c
arch/mips/sgi-ip22/ip22-mc.c
arch/mips/sgi-ip27/ip27-irq.c
arch/mips/sgi-ip27/ip27-memory.c
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip32/ip32-irq.c
arch/mips/sgi-ip32/ip32-memory.c
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/cfe/setup.c
arch/mips/sibyte/sb1250/irq.c
arch/mips/sibyte/sb1250/prom.c
arch/mips/sni/irq.c
arch/mips/sni/sniprom.c
arch/mips/tx4927/common/tx4927_irq.c
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c
arch/mips/tx4938/common/irq.c
arch/mips/tx4938/toshiba_rbtx4938/irq.c
arch/mips/tx4938/toshiba_rbtx4938/prom.c
arch/mips/vr41xx/common/icu.c
arch/mips/vr41xx/common/init.c
arch/mips/vr41xx/common/irq.c
arch/mips/vr41xx/nec-cmbvr4133/irq.c
arch/s390/Kconfig
arch/s390/appldata/appldata_base.c
arch/s390/appldata/appldata_mem.c
arch/s390/appldata/appldata_net_sum.c
arch/s390/crypto/Kconfig [new file with mode: 0644]
arch/s390/crypto/Makefile
arch/s390/crypto/aes_s390.c
arch/s390/crypto/crypt_s390.h
arch/s390/crypto/crypt_s390_query.c [deleted file]
arch/s390/crypto/des_check_key.c
arch/s390/crypto/des_s390.c
arch/s390/crypto/prng.c [new file with mode: 0644]
arch/s390/crypto/sha1_s390.c
arch/s390/crypto/sha256_s390.c
arch/s390/defconfig
arch/s390/hypfs/Makefile
arch/s390/hypfs/hypfs.h
arch/s390/hypfs/hypfs_diag.h [deleted file]
arch/s390/hypfs/hypfs_vm.c [new file with mode: 0644]
arch/s390/hypfs/inode.c
arch/s390/kernel/Makefile
arch/s390/kernel/base.S [new file with mode: 0644]
arch/s390/kernel/binfmt_elf32.c
arch/s390/kernel/compat_exec_domain.c
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_linux.h
arch/s390/kernel/compat_signal.c
arch/s390/kernel/cpcmd.c
arch/s390/kernel/crash.c
arch/s390/kernel/debug.c
arch/s390/kernel/early.c [new file with mode: 0644]
arch/s390/kernel/ebcdic.c
arch/s390/kernel/head31.S
arch/s390/kernel/head64.S
arch/s390/kernel/ipl.c
arch/s390/kernel/irq.c
arch/s390/kernel/kprobes.c
arch/s390/kernel/machine_kexec.c
arch/s390/kernel/module.c
arch/s390/kernel/process.c
arch/s390/kernel/profile.c [deleted file]
arch/s390/kernel/ptrace.c
arch/s390/kernel/reset.S [deleted file]
arch/s390/kernel/s390_ext.c
arch/s390/kernel/setup.c
arch/s390/kernel/signal.c
arch/s390/kernel/smp.c
arch/s390/kernel/stacktrace.c
arch/s390/kernel/time.c
arch/s390/kernel/traps.c
arch/s390/kernel/vmlinux.lds.S
arch/s390/kernel/vtime.c
arch/s390/lib/Makefile
arch/s390/lib/delay.c
arch/s390/lib/qrnnd.S [new file with mode: 0644]
arch/s390/lib/uaccess.h [new file with mode: 0644]
arch/s390/lib/uaccess_mvcos.c
arch/s390/lib/uaccess_pt.c
arch/s390/lib/uaccess_std.c
arch/s390/math-emu/Makefile
arch/s390/math-emu/math.c
arch/s390/math-emu/qrnnd.S [deleted file]
arch/s390/mm/cmm.c
arch/s390/mm/extmem.c
arch/s390/mm/fault.c
arch/s390/mm/init.c
arch/s390/mm/vmem.c
crypto/Kconfig
drivers/crypto/Kconfig
drivers/hid/Kconfig
drivers/hid/Makefile
drivers/hid/hid-core.c
drivers/hid/hid-debug.c [new file with mode: 0644]
drivers/hid/hid-input.c
drivers/infiniband/core/addr.c
drivers/infiniband/core/mad.c
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/hw/amso1100/c2_cq.c
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_cq.c
drivers/infiniband/hw/ehca/ehca_iverbs.h
drivers/infiniband/hw/ehca/ehca_main.c
drivers/infiniband/hw/ehca/ehca_qp.c
drivers/infiniband/hw/ehca/ehca_reqs.c
drivers/infiniband/hw/ehca/ehca_uverbs.c
drivers/infiniband/hw/ipath/ipath_qp.c
drivers/infiniband/hw/ipath/ipath_rc.c
drivers/infiniband/hw/ipath/ipath_ruc.c
drivers/infiniband/hw/ipath/ipath_uc.c
drivers/infiniband/hw/ipath/ipath_ud.c
drivers/infiniband/hw/mthca/mthca_cmd.c
drivers/infiniband/hw/mthca/mthca_cq.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h
drivers/misc/tifm_7xx1.c
drivers/misc/tifm_core.c
drivers/mmc/at91_mci.c
drivers/mmc/au1xmmc.c
drivers/mmc/imxmmc.c
drivers/mmc/mmc.c
drivers/mmc/mmc_block.c
drivers/mmc/mmc_queue.c
drivers/mmc/mmc_sysfs.c
drivers/mmc/mmci.c
drivers/mmc/omap.c
drivers/mmc/pxamci.c
drivers/mmc/sdhci.c
drivers/mmc/sdhci.h
drivers/mmc/tifm_sd.c
drivers/mmc/wbsd.c
drivers/mmc/wbsd.h
drivers/s390/Kconfig
drivers/s390/Makefile
drivers/s390/block/dasd.c
drivers/s390/block/dasd_3990_erp.c
drivers/s390/block/dasd_devmap.c
drivers/s390/block/dasd_diag.c
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_eer.c
drivers/s390/block/dasd_erp.c
drivers/s390/block/dasd_fba.c
drivers/s390/block/dasd_genhd.c
drivers/s390/block/dasd_int.h
drivers/s390/block/dasd_proc.c
drivers/s390/block/dcssblk.c
drivers/s390/char/Makefile
drivers/s390/char/con3215.c
drivers/s390/char/con3270.c
drivers/s390/char/defkeymap.c
drivers/s390/char/fs3270.c
drivers/s390/char/keyboard.c
drivers/s390/char/monwriter.c
drivers/s390/char/raw3270.c
drivers/s390/char/sclp.c
drivers/s390/char/sclp.h
drivers/s390/char/sclp_con.c
drivers/s390/char/sclp_cpi.c
drivers/s390/char/sclp_info.c [new file with mode: 0644]
drivers/s390/char/sclp_rw.c
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_vt220.c
drivers/s390/char/tape.h
drivers/s390/char/tape_3590.c
drivers/s390/char/tape_3590.h
drivers/s390/char/tape_block.c
drivers/s390/char/tape_char.c
drivers/s390/char/tape_core.c
drivers/s390/char/tty3270.c
drivers/s390/char/vmlogrdr.c
drivers/s390/cio/blacklist.c
drivers/s390/cio/ccwgroup.c
drivers/s390/cio/chsc.c
drivers/s390/cio/chsc.h
drivers/s390/cio/cio.c
drivers/s390/cio/cmf.c
drivers/s390/cio/css.c
drivers/s390/cio/css.h
drivers/s390/cio/device.c
drivers/s390/cio/device.h
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_ops.c
drivers/s390/cio/device_status.c
drivers/s390/cio/qdio.c
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/zcrypt_api.c
drivers/s390/crypto/zcrypt_pcica.c
drivers/s390/crypto/zcrypt_pcixcc.c
drivers/s390/net/claw.c
drivers/s390/net/ctcmain.c
drivers/s390/net/cu3088.c
drivers/s390/net/lcs.c
drivers/s390/net/netiucv.c
drivers/s390/net/qeth_eddp.c
drivers/s390/net/qeth_main.c
drivers/s390/net/qeth_sys.c
drivers/s390/s390mach.c
drivers/s390/s390mach.h
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_dbf.c
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_qdio.c
drivers/s390/scsi/zfcp_scsi.c
drivers/s390/sysinfo.c
drivers/usb/input/Kconfig
drivers/usb/input/Makefile
drivers/usb/input/hid-core.c
drivers/usb/input/hid-ff.c
drivers/usb/input/hid-plff.c [new file with mode: 0644]
fs/cifs/CHANGES
fs/cifs/cifsfs.c
fs/cifs/file.c
fs/cifs/readdir.c
fs/cifs/smbdes.c
fs/ocfs2/journal.h
include/asm-mips/bootinfo.h
include/asm-mips/ddb5xxx/ddb5477.h
include/asm-mips/dec/interrupts.h
include/asm-mips/dma.h
include/asm-mips/emma2rh/emma2rh.h
include/asm-mips/emma2rh/markeins.h
include/asm-mips/i8259.h
include/asm-mips/io.h
include/asm-mips/irq.h
include/asm-mips/irq_cpu.h
include/asm-mips/mach-au1x00/au1000.h
include/asm-mips/mach-cobalt/cobalt.h
include/asm-mips/mach-emma2rh/irq.h
include/asm-mips/mach-generic/irq.h
include/asm-mips/mach-mips/irq.h
include/asm-mips/mach-vr41xx/irq.h [new file with mode: 0644]
include/asm-mips/mips-boards/atlasint.h
include/asm-mips/mips-boards/maltaint.h
include/asm-mips/mips-boards/prom.h
include/asm-mips/mips-boards/seadint.h
include/asm-mips/mips-boards/simint.h
include/asm-mips/mipsmtregs.h
include/asm-mips/page.h
include/asm-mips/rtlx.h
include/asm-mips/sections.h
include/asm-mips/sgi/ip22.h
include/asm-mips/smtc_ipi.h
include/asm-mips/uaccess.h
include/asm-mips/vr41xx/cmbvr4133.h
include/asm-s390/compat.h
include/asm-s390/etr.h [new file with mode: 0644]
include/asm-s390/hardirq.h
include/asm-s390/io.h
include/asm-s390/kdebug.h
include/asm-s390/lowcore.h
include/asm-s390/mmu_context.h
include/asm-s390/pgalloc.h
include/asm-s390/pgtable.h
include/asm-s390/processor.h
include/asm-s390/ptrace.h
include/asm-s390/reset.h
include/asm-s390/sclp.h [new file with mode: 0644]
include/asm-s390/sections.h
include/asm-s390/setup.h
include/asm-s390/sfp-util.h [moved from arch/s390/math-emu/sfp-util.h with 91% similarity]
include/asm-s390/smp.h
include/asm-s390/system.h
include/asm-s390/tape390.h
include/asm-s390/timer.h
include/asm-s390/timex.h
include/asm-s390/tlbflush.h
include/asm-s390/uaccess.h
include/linux/hid-debug.h
include/linux/hid.h
include/linux/mmc/card.h
include/linux/mmc/host.h
include/linux/mmc/mmc.h
include/linux/mmc/protocol.h
include/linux/pci_ids.h
include/linux/tifm.h
include/rdma/ib_user_mad.h
include/rdma/ib_verbs.h
scripts/Kbuild.include
scripts/gen_initramfs_list.sh
scripts/makelst
security/keys/key.c

index 3f9ddbc23b27111db424af21d7c0b92cc34f9e68..0993969609cf497e50232847aa319716a7b3663b 100644 (file)
@@ -480,7 +480,7 @@ r2       argument 0 / return value 0                call-clobbered
 r3       argument 1 / return value 1 (if long long) call-clobbered
 r4       argument 2                                 call-clobbered
 r5       argument 3                                 call-clobbered
-r6      argument 5                                 saved
+r6      argument 4                                 saved
 r7       pointer-to arguments 5 to ...              saved      
 r8       this & that                                saved
 r9       this & that                                saved
index 0ad8803a0c7555ae3667846d2445ea9810a6802b..16c0e15b5785699b9563679140c98f5760dc03b8 100644 (file)
@@ -2791,7 +2791,7 @@ M:        schwidefsky@de.ibm.com
 P:     Heiko Carstens
 M:     heiko.carstens@de.ibm.com
 M:     linux390@de.ibm.com
-L:     linux-390@vm.marist.edu
+L:     linux-s390@vger.kernel.org
 W:     http://www.ibm.com/developerworks/linux/linux390/
 S:     Supported
 
@@ -2799,7 +2799,7 @@ S390 NETWORK DRIVERS
 P:     Frank Pavlic
 M:     fpavlic@de.ibm.com
 M:     linux390@de.ibm.com
-L:     linux-390@vm.marist.edu
+L:     linux-s390@vger.kernel.org
 W:     http://www.ibm.com/developerworks/linux/linux390/
 S:     Supported
 
@@ -2807,7 +2807,7 @@ S390 ZFCP DRIVER
 P:     Swen Schillig
 M:     swen@vnet.ibm.com
 M:     linux390@de.ibm.com
-L:     linux-390@vm.marist.edu
+L:     linux-s390@vger.kernel.org
 W:     http://www.ibm.com/developerworks/linux/linux390/
 S:     Supported
 
@@ -3647,7 +3647,7 @@ S:        Maintained
 W83L51xD SD/MMC CARD INTERFACE DRIVER
 P:     Pierre Ossman
 M:     drzeus-wbsd@drzeus.cx
-L:     wbsd-devel@list.drzeus.cx
+L:     linux-kernel@vger.kernel.org
 W:     http://projects.drzeus.cx/wbsd
 S:     Maintained
 
index 7e2750f4ca707a8f009987810d6756a869128f6a..cdeda68cf2aa9082571366837a504fe80ef6c40e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -776,7 +776,7 @@ $(vmlinux-dirs): prepare scripts
 #        $(EXTRAVERSION)               eg, -rc6
 #      $(localver-full)
 #        $(localver)
-#          localversion*               (all localversion* files)
+#          localversion*               (files without backups, containing '~')
 #          $(CONFIG_LOCALVERSION)      (from kernel config setting)
 #        $(localver-auto)              (only if CONFIG_LOCALVERSION_AUTO is set)
 #          ./scripts/setlocalversion   (SCM tag, if one exists)
@@ -787,17 +787,12 @@ $(vmlinux-dirs): prepare scripts
 # moment, only git is supported but other SCMs can edit the script
 # scripts/setlocalversion and add the appropriate checks as needed.
 
-nullstring :=
-space      := $(nullstring) # end of line
+pattern = ".*/localversion[^~]*"
+string  = $(shell cat /dev/null \
+          `find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort`)
 
-___localver = $(objtree)/localversion* $(srctree)/localversion*
-__localver  = $(sort $(wildcard $(___localver)))
-# skip backup files (containing '~')
-_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
-
-localver = $(subst $(space),, \
-          $(shell cat /dev/null $(_localver)) \
-          $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
+localver = $(subst $(space),, $(string) \
+                             $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
 
 # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
 # and if the SCM is know a tag from the SCM is appended.
index bbd386f572d97a6ed6cc8413f50d5e09ac019382..44a0224c32ddbe39d30c3134b4d41766e95d4d0b 100644 (file)
@@ -575,6 +575,7 @@ config SGI_IP27
        select DMA_IP27
        select EARLY_PRINTK
        select HW_HAS_PCI
+       select NR_CPUS_DEFAULT_64
        select PCI_DOMAINS
        select SYS_HAS_CPU_R10000
        select SYS_SUPPORTS_64BIT_KERNEL
@@ -612,6 +613,7 @@ config SIBYTE_BIGSUR
        bool "Sibyte BCM91480B-BigSur"
        select BOOT_ELF32
        select DMA_COHERENT
+       select NR_CPUS_DEFAULT_4
        select PCI_DOMAINS
        select SIBYTE_BCM1x80
        select SWAP_IO_SPACE
@@ -623,6 +625,7 @@ config SIBYTE_SWARM
        bool "Sibyte BCM91250A-SWARM"
        select BOOT_ELF32
        select DMA_COHERENT
+       select NR_CPUS_DEFAULT_2
        select SIBYTE_SB1250
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_SB1
@@ -635,6 +638,7 @@ config SIBYTE_SENTOSA
        depends on EXPERIMENTAL
        select BOOT_ELF32
        select DMA_COHERENT
+       select NR_CPUS_DEFAULT_2
        select SIBYTE_SB1250
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_SB1
@@ -668,6 +672,7 @@ config SIBYTE_PTSWARM
        depends on EXPERIMENTAL
        select BOOT_ELF32
        select DMA_COHERENT
+       select NR_CPUS_DEFAULT_2
        select SIBYTE_SB1250
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_SB1
@@ -680,6 +685,7 @@ config SIBYTE_LITTLESUR
        depends on EXPERIMENTAL
        select BOOT_ELF32
        select DMA_COHERENT
+       select NR_CPUS_DEFAULT_2
        select SIBYTE_SB1250
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_SB1
@@ -790,23 +796,6 @@ config TOSHIBA_RBTX4938
 
 endchoice
 
-config KEXEC
-       bool "Kexec system call (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
-       help
-         kexec is a system call that implements the ability to shutdown your
-         current kernel, and to start another kernel.  It is like a reboot
-         but it is indepedent of the system firmware.   And like a reboot
-         you can start any kernel with it, not just Linux.
-
-         The name comes from the similiarity to the exec system call.
-
-         It is an ongoing process to be certain the hardware in a machine
-         is properly shutdown, so do not be surprised if this code does not
-         initially work for you.  It may help to enable device hotplugging
-         support.  As of this writing the exact hardware interface is
-         strongly in flux, so no good recommendation can be made.
-
 source "arch/mips/ddb5xxx/Kconfig"
 source "arch/mips/gt64120/ev64120/Kconfig"
 source "arch/mips/jazz/Kconfig"
@@ -1541,6 +1530,8 @@ config MIPS_MT_SMTC
        select CPU_MIPSR2_IRQ_VI
        select CPU_MIPSR2_SRS
        select MIPS_MT
+       select NR_CPUS_DEFAULT_2
+       select NR_CPUS_DEFAULT_8
        select SMP
        select SYS_SUPPORTS_SMP
        help
@@ -1756,13 +1747,34 @@ config SMP
 config SYS_SUPPORTS_SMP
        bool
 
+config NR_CPUS_DEFAULT_2
+       bool
+
+config NR_CPUS_DEFAULT_4
+       bool
+
+config NR_CPUS_DEFAULT_8
+       bool
+
+config NR_CPUS_DEFAULT_16
+       bool
+
+config NR_CPUS_DEFAULT_32
+       bool
+
+config NR_CPUS_DEFAULT_64
+       bool
+
 config NR_CPUS
        int "Maximum number of CPUs (2-64)"
        range 2 64
        depends on SMP
-       default "64" if SGI_IP27
-       default "2"
-       default "8" if MIPS_MT_SMTC
+       default "2" if NR_CPUS_DEFAULT_2
+       default "4" if NR_CPUS_DEFAULT_4
+       default "8" if NR_CPUS_DEFAULT_8
+       default "16" if NR_CPUS_DEFAULT_16
+       default "32" if NR_CPUS_DEFAULT_32
+       default "64" if NR_CPUS_DEFAULT_64
        help
          This allows you to specify the maximum number of CPUs which this
          kernel will support.  The maximum supported value is 32 for 32-bit
@@ -1859,6 +1871,40 @@ config MIPS_INSANE_LARGE
          This will result in additional memory usage, so it is not
          recommended for normal users.
 
+config KEXEC
+       bool "Kexec system call (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       help
+         kexec is a system call that implements the ability to shutdown your
+         current kernel, and to start another kernel.  It is like a reboot
+         but it is indepedent of the system firmware.   And like a reboot
+         you can start any kernel with it, not just Linux.
+
+         The name comes from the similiarity to the exec system call.
+
+         It is an ongoing process to be certain the hardware in a machine
+         is properly shutdown, so do not be surprised if this code does not
+         initially work for you.  It may help to enable device hotplugging
+         support.  As of this writing the exact hardware interface is
+         strongly in flux, so no good recommendation can be made.
+
+config SECCOMP
+       bool "Enable seccomp to safely compute untrusted bytecode"
+       depends on PROC_FS && BROKEN
+       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.
+
 endmenu
 
 config RWSEM_GENERIC_SPINLOCK
@@ -2025,23 +2071,6 @@ config BINFMT_ELF32
        bool
        default y if MIPS32_O32 || MIPS32_N32
 
-config SECCOMP
-       bool "Enable seccomp to safely compute untrusted bytecode"
-       depends on PROC_FS && BROKEN
-       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 PM
        bool "Power Management support (EXPERIMENTAL)"
        depends on EXPERIMENTAL && SOC_AU1X00
index 5d6afb52d904aecd6b618c86f42be901897cb7b3..9351f1c04a9d7144d0a024a86887d46ffea87d08 100644 (file)
@@ -22,10 +22,10 @@ config CMDLINE
        string "Default kernel command string"
        default ""
        help
-          On some platforms, there is currently no way for the boot loader to
-          pass arguments to the kernel. For these platforms, you can supply
-          some command-line options at build time by entering them here.  In
-          other cases you can specify kernel args so that you don't have
+         On some platforms, there is currently no way for the boot loader to
+         pass arguments to the kernel. For these platforms, you can supply
+         some command-line options at build time by entering them here.  In
+         other cases you can specify kernel args so that you don't have
          to set them up in board prom initialization routines.
 
 config DEBUG_STACK_USAGE
index 3ba7c47f9f23b1b9c4da4efcd31937ee0fcb39a7..4b907369b0f969d06d863e4cf0f8282fa656ca5d 100644 (file)
@@ -77,7 +77,7 @@ static struct smatch * __init string_to_mach(const char *s)
 {
        int i;
 
-       for (i = 0; i < (sizeof(mach_table) / sizeof (mach_table[0])); i++) {
+       for (i = 0; i < ARRAY_SIZE(mach_table); i++) {
                if (!strcmp(s, mach_table[i].arcname))
                        return &mach_table[i];
        }
index 8a9ef58cc399313b2b46125cf0b207cc4c9ce2ab..456cb81a32d9c88edb5d9abba1138f37cccb30aa 100644 (file)
@@ -141,30 +141,20 @@ void __init prom_meminit(void)
        }
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       unsigned long freed = 0;
        unsigned long addr;
        int i;
 
        if (prom_flags & PROM_FLAG_DONT_FREE_TEMP)
-               return 0;
+               return;
 
        for (i = 0; i < boot_mem_map.nr_map; i++) {
                if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
                        continue;
 
                addr = boot_mem_map.map[i].addr;
-               while (addr < boot_mem_map.map[i].addr
-                             + boot_mem_map.map[i].size) {
-                       ClearPageReserved(virt_to_page(__va(addr)));
-                       init_page_count(virt_to_page(__va(addr)));
-                       free_page((unsigned long)__va(addr));
-                       addr += PAGE_SIZE;
-                       freed += PAGE_SIZE;
-               }
+               free_init_pages("prom memory",
+                               addr, addr + boot_mem_map.map[i].size);
        }
-       printk(KERN_INFO "Freeing prom memory: %ldkb freed\n", freed >> 10);
-
-       return freed;
 }
index 9cf7b6715836c914144955a2de1ec2b38f39e81d..ea6e99fbe2f7210826728c45bd1ae750f0fbaa7f 100644 (file)
@@ -233,7 +233,7 @@ void restore_local_and_enable(int controller, unsigned long mask)
 
 
 static struct irq_chip rise_edge_irq_type = {
-       .typename = "Au1000 Rise Edge",
+       .name = "Au1000 Rise Edge",
        .ack = mask_and_ack_rise_edge_irq,
        .mask = local_disable_irq,
        .mask_ack = mask_and_ack_rise_edge_irq,
@@ -242,7 +242,7 @@ static struct irq_chip rise_edge_irq_type = {
 };
 
 static struct irq_chip fall_edge_irq_type = {
-       .typename = "Au1000 Fall Edge",
+       .name = "Au1000 Fall Edge",
        .ack = mask_and_ack_fall_edge_irq,
        .mask = local_disable_irq,
        .mask_ack = mask_and_ack_fall_edge_irq,
@@ -251,7 +251,7 @@ static struct irq_chip fall_edge_irq_type = {
 };
 
 static struct irq_chip either_edge_irq_type = {
-       .typename = "Au1000 Rise or Fall Edge",
+       .name = "Au1000 Rise or Fall Edge",
        .ack = mask_and_ack_either_edge_irq,
        .mask = local_disable_irq,
        .mask_ack = mask_and_ack_either_edge_irq,
@@ -260,7 +260,7 @@ static struct irq_chip either_edge_irq_type = {
 };
 
 static struct irq_chip level_irq_type = {
-       .typename = "Au1000 Level",
+       .name = "Au1000 Level",
        .ack = mask_and_ack_level_irq,
        .mask = local_disable_irq,
        .mask_ack = mask_and_ack_level_irq,
index 9f8ce08e173b70700fd1367169666077008fb0f4..6c25e6c09f7835ed4c3183b316e157d86d2db174 100644 (file)
@@ -76,13 +76,17 @@ static int __init au1x_pci_setup(void)
        }
 
 #ifdef CONFIG_DMA_NONCOHERENT
-       /*
-         *  Set the NC bit in controller for Au1500 pre-AC silicon
-        */
-       u32 prid = read_c0_prid();
-       if ( (prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) {
-              au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG);
-              printk("Non-coherent PCI accesses enabled\n");
+       {
+               /*
+                *  Set the NC bit in controller for Au1500 pre-AC silicon
+                */
+               u32 prid = read_c0_prid();
+
+               if ((prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) {
+                      au_writel((1 << 16) | au_readl(Au1500_PCI_CFG),
+                                Au1500_PCI_CFG);
+                      printk("Non-coherent PCI accesses enabled\n");
+               }
        }
 #endif
 
index 6fce60af005dc7be1704d660d6d4ecc1fdcacd47..a8637cdb5b4b076a580e98ead98599e25bfa1650 100644 (file)
@@ -149,9 +149,8 @@ int get_ethernet_addr(char *ethernet_addr)
        return 0;
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 EXPORT_SYMBOL(prom_getcmdline);
index 919172db560cfa4d779e19fec1ae93b97aa80276..13fe187f35d67542a1bfa93acf4544d949ee7261 100644 (file)
@@ -141,17 +141,20 @@ void __init plat_mem_setup(void)
 /* This routine should be valid for all Au1x based boards */
 phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
 {
-       u32 start, end;
-
        /* Don't fixup 36 bit addresses */
-       if ((phys_addr >> 32) != 0) return phys_addr;
+       if ((phys_addr >> 32) != 0)
+               return phys_addr;
 
 #ifdef CONFIG_PCI
-       start = (u32)Au1500_PCI_MEM_START;
-       end = (u32)Au1500_PCI_MEM_END;
-       /* check for pci memory window */
-       if ((phys_addr >= start) && ((phys_addr + size) < end)) {
-               return (phys_t)((phys_addr - start) + Au1500_PCI_MEM_START);
+       {
+               u32 start, end;
+
+               start = (u32)Au1500_PCI_MEM_START;
+               end = (u32)Au1500_PCI_MEM_END;
+               /* check for pci memory window */
+               if ((phys_addr >= start) && ((phys_addr + size) < end))
+                       return (phys_t)
+                              ((phys_addr - start) + Au1500_PCI_MEM_START);
        }
 #endif
 
index 2d1533f116c0c020f57a4de59c952b6167f3545c..6bc1f8e1b608175b431f6927d47aa42558d8f1cc 100644 (file)
@@ -47,8 +47,7 @@ void board_reset (void)
 
 void __init board_setup(void)
 {
-       u32 pin_func;
-       u32 sys_freqctrl, sys_clksrc;
+       volatile void __iomem * base = (volatile void __iomem *) 0xac000000UL;
 
        // set AUX clock to 12MHz * 8 = 96 MHz
        au_writel(8, SYS_AUXPLL);
@@ -56,58 +55,62 @@ void __init board_setup(void)
        udelay(100);
 
 #ifdef CONFIG_USB_OHCI
-       // configure pins GPIO[14:9] as GPIO
-       pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80);
-
-       /* zero and disable FREQ2 */
-       sys_freqctrl = au_readl(SYS_FREQCTRL0);
-       sys_freqctrl &= ~0xFFF00000;
-       au_writel(sys_freqctrl, SYS_FREQCTRL0);
-
-       /* zero and disable USBH/USBD/IrDA clock */
-       sys_clksrc = au_readl(SYS_CLKSRC);
-       sys_clksrc &= ~0x0000001F;
-       au_writel(sys_clksrc, SYS_CLKSRC);
-
-       sys_freqctrl = au_readl(SYS_FREQCTRL0);
-       sys_freqctrl &= ~0xFFF00000;
-
-       sys_clksrc = au_readl(SYS_CLKSRC);
-       sys_clksrc &= ~0x0000001F;
-
-       // FREQ2 = aux/2 = 48 MHz
-       sys_freqctrl |= ((0<<22) | (1<<21) | (1<<20));
-       au_writel(sys_freqctrl, SYS_FREQCTRL0);
-
-       /*
-        * Route 48MHz FREQ2 into USBH/USBD/IrDA
-        */
-       sys_clksrc |= ((4<<2) | (0<<1) | 0 );
-       au_writel(sys_clksrc, SYS_CLKSRC);
-
-       /* setup the static bus controller */
-       au_writel(0x00000002, MEM_STCFG3);  /* type = PCMCIA */
-       au_writel(0x280E3D07, MEM_STTIME3); /* 250ns cycle time */
-       au_writel(0x10000000, MEM_STADDR3); /* any PCMCIA select */
-
-       // get USB Functionality pin state (device vs host drive pins)
-       pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
-       // 2nd USB port is USB host
-       pin_func |= 0x8000;
-       au_writel(pin_func, SYS_PINFUNC);
+       {
+               u32 pin_func, sys_freqctrl, sys_clksrc;
+
+               // configure pins GPIO[14:9] as GPIO
+               pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80);
+
+               /* zero and disable FREQ2 */
+               sys_freqctrl = au_readl(SYS_FREQCTRL0);
+               sys_freqctrl &= ~0xFFF00000;
+               au_writel(sys_freqctrl, SYS_FREQCTRL0);
+
+               /* zero and disable USBH/USBD/IrDA clock */
+               sys_clksrc = au_readl(SYS_CLKSRC);
+               sys_clksrc &= ~0x0000001F;
+               au_writel(sys_clksrc, SYS_CLKSRC);
+
+               sys_freqctrl = au_readl(SYS_FREQCTRL0);
+               sys_freqctrl &= ~0xFFF00000;
+
+               sys_clksrc = au_readl(SYS_CLKSRC);
+               sys_clksrc &= ~0x0000001F;
+
+               // FREQ2 = aux/2 = 48 MHz
+               sys_freqctrl |= ((0<<22) | (1<<21) | (1<<20));
+               au_writel(sys_freqctrl, SYS_FREQCTRL0);
+
+               /*
+                * Route 48MHz FREQ2 into USBH/USBD/IrDA
+                */
+               sys_clksrc |= ((4<<2) | (0<<1) | 0 );
+               au_writel(sys_clksrc, SYS_CLKSRC);
+
+               /* setup the static bus controller */
+               au_writel(0x00000002, MEM_STCFG3);  /* type = PCMCIA */
+               au_writel(0x280E3D07, MEM_STTIME3); /* 250ns cycle time */
+               au_writel(0x10000000, MEM_STADDR3); /* any PCMCIA select */
+
+               // get USB Functionality pin state (device vs host drive pins)
+               pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
+               // 2nd USB port is USB host
+               pin_func |= 0x8000;
+               au_writel(pin_func, SYS_PINFUNC);
+       }
 #endif // defined (CONFIG_USB_OHCI)
 
        /* Enable sys bus clock divider when IDLE state or no bus activity. */
        au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
 
        // Enable the RTC if not already enabled
-       if (!(readb(0xac000028) & 0x20)) {
-               writeb(readb(0xac000028) | 0x20, 0xac000028);
+       if (!(readb(base + 0x28) & 0x20)) {
+               writeb(readb(base + 0x28) | 0x20, base + 0x28);
                au_sync();
        }
        // Put the clock in BCD mode
-       if (readb(0xac00002C) & 0x4) { /* reg B */
-               writeb(readb(0xac00002c) & ~0x4, 0xac00002c);
+       if (readb(base + 0x2C) & 0x4) { /* reg B */
+               writeb(readb(base + 0x2c) & ~0x4, base + 0x2c);
                au_sync();
        }
 }
index 91983ba407c4731fd64c40358a1b56c29bdb07d3..b73b2d18bf56885d8f84278fa28330c3502040a7 100644 (file)
@@ -137,33 +137,20 @@ static void pb1200_shutdown_irq( unsigned int irq_nr )
        return;
 }
 
-static inline void pb1200_mask_and_ack_irq(unsigned int irq_nr)
-{
-       pb1200_disable_irq( irq_nr );
-}
-
-static void pb1200_end_irq(unsigned int irq_nr)
-{
-       if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))) {
-               pb1200_enable_irq(irq_nr);
-       }
-}
-
 static struct irq_chip external_irq_type =
 {
 #ifdef CONFIG_MIPS_PB1200
-       "Pb1200 Ext",
+       .name = "Pb1200 Ext",
 #endif
 #ifdef CONFIG_MIPS_DB1200
-       "Db1200 Ext",
+       .name = "Db1200 Ext",
 #endif
-       pb1200_startup_irq,
-       pb1200_shutdown_irq,
-       pb1200_enable_irq,
-       pb1200_disable_irq,
-       pb1200_mask_and_ack_irq,
-       pb1200_end_irq,
-       NULL
+       .startup  = pb1200_startup_irq,
+       .shutdown = pb1200_shutdown_irq,
+       .ack      = pb1200_disable_irq,
+       .mask     = pb1200_disable_irq,
+       .mask_ack = pb1200_disable_irq,
+       .unmask   = pb1200_enable_irq,
 };
 
 void _board_init_irq(void)
@@ -172,7 +159,8 @@ void _board_init_irq(void)
 
        for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++)
        {
-               irq_desc[irq_nr].chip = &external_irq_type;
+               set_irq_chip_and_handler(irq_nr, &external_irq_type,
+                                        handle_level_irq);
                pb1200_disable_irq(irq_nr);
        }
 
index 2e2061a286c5664f45649c6def0d8fc101322583..1ecab6350421cdeef9101185aac4ce0a3e26179f 100644 (file)
@@ -47,9 +47,9 @@ extern asmlinkage void excite_handle_int(void);
  */
 void __init arch_init_irq(void)
 {
-       mips_cpu_irq_init(0);
-       rm7k_cpu_irq_init(8);
-       rm9k_cpu_irq_init(12);
+       mips_cpu_irq_init();
+       rm7k_cpu_irq_init();
+       rm9k_cpu_irq_init();
 
 #ifdef CONFIG_KGDB
        excite_kgdb_init();
index 4c46f0e737832c2e7cecf5117c95d50b228cecc4..fe93b846923b85fd873953aefbe62bc9a6cf7d85 100644 (file)
@@ -104,7 +104,7 @@ void __init arch_init_irq(void)
        GT_WRITE(GT_INTRMASK_OFS, 0);
 
        init_i8259_irqs();                              /*  0 ... 15 */
-       mips_cpu_irq_init(COBALT_CPU_IRQ);              /* 16 ... 23 */
+       mips_cpu_irq_init();            /* 16 ... 23 */
 
        /*
         * Mask all cpu interrupts
index e8f0f20b852dec3eb7215530bd9ea483161019a9..a4b69b543bd903984433089474d3557e983bb218 100644 (file)
@@ -204,8 +204,7 @@ void __init prom_init(void)
        add_memory_region(0x0, memsz, BOOT_MEM_RAM);
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
        /* Nothing to do! */
-       return 0;
 }
index efef0f57ce1e56d789c03ec986f72db966b2fb7f..54a857b5e3baa5f7151b64714ca53fec8f07b218 100644 (file)
@@ -59,9 +59,8 @@ void __init prom_init(void)
 #endif
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 #if defined(CONFIG_DDB5477)
index a8bd2e66705ce3fda7885426903ee4a4da98d2e6..2b23234a5b95ec4a76db0f0b7a56ca804f265b5e 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/ptrace.h>
 
 #include <asm/i8259.h>
+#include <asm/irq_cpu.h>
 #include <asm/system.h>
 #include <asm/mipsregs.h>
 #include <asm/debug.h>
@@ -73,7 +74,6 @@ set_pci_int_attr(u32 pci, u32 intn, u32 active, u32 trigger)
 }
 
 extern void vrc5477_irq_init(u32 base);
-extern void mips_cpu_irq_init(u32 base);
 static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL };
 
 void __init arch_init_irq(void)
@@ -125,7 +125,7 @@ void __init arch_init_irq(void)
 
        /* init all controllers */
        init_i8259_irqs();
-       mips_cpu_irq_init(CPU_IRQ_BASE);
+       mips_cpu_irq_init();
        vrc5477_irq_init(VRC5477_IRQ_BASE);
 
 
@@ -146,8 +146,7 @@ u8 i8259_interrupt_ack(void)
        irq = *(volatile u8 *) KSEG1ADDR(DDB_PCI_IACK_BASE);
        ddb_out32(DDB_PCIINIT10, reg);
 
-       /* i8259.c set the base vector to be 0x0 */
-       return irq + I8259_IRQ_BASE;
+       return irq;
 }
 /*
  * the first level int-handler will jump here if it is a vrc5477 irq
@@ -177,7 +176,7 @@ static void vrc5477_irq_dispatch(void)
                /* check for i8259 interrupts */
                if (intStatus & (1 << VRC5477_I8259_CASCADE)) {
                        int i8259_irq = i8259_interrupt_ack();
-                       do_IRQ(I8259_IRQ_BASE + i8259_irq);
+                       do_IRQ(i8259_irq);
                        return;
                }
        }
index 96249aa5df5d2229d6675d1bdfefe629e5e31cfe..98c3b15eb369131d9419aafe1187d84d65b7a1c1 100644 (file)
@@ -82,7 +82,7 @@ vrc5477_irq_end(unsigned int irq)
 }
 
 struct irq_chip vrc5477_irq_controller = {
-       .typename = "vrc5477_irq",
+       .name = "vrc5477_irq",
        .ack = vrc5477_irq_ack,
        .mask = vrc5477_irq_disable,
        .mask_ack = vrc5477_irq_ack,
index 4c7cb4048d358126b84b81d509fe7a8d9ec94903..3acb133668dc12f5731aab6b611c8756a6fa89a1 100644 (file)
@@ -62,7 +62,7 @@ static inline void end_ioasic_irq(unsigned int irq)
 }
 
 static struct irq_chip ioasic_irq_type = {
-       .typename = "IO-ASIC",
+       .name = "IO-ASIC",
        .ack = ack_ioasic_irq,
        .mask = mask_ioasic_irq,
        .mask_ack = ack_ioasic_irq,
@@ -84,7 +84,7 @@ static inline void end_ioasic_dma_irq(unsigned int irq)
 }
 
 static struct irq_chip ioasic_dma_irq_type = {
-       .typename = "IO-ASIC-DMA",
+       .name = "IO-ASIC-DMA",
        .ack = ack_ioasic_dma_irq,
        .mask = mask_ioasic_dma_irq,
        .mask_ack = ack_ioasic_dma_irq,
index 916e46b8ccd8489cb27b74bcfc31da537d6b102f..02439dc0ba83136209b0945a1cb77d39601e244b 100644 (file)
@@ -58,7 +58,7 @@ static void ack_kn02_irq(unsigned int irq)
 }
 
 static struct irq_chip kn02_irq_type = {
-       .typename = "KN02-CSR",
+       .name = "KN02-CSR",
        .ack = ack_kn02_irq,
        .mask = mask_kn02_irq,
        .mask_ack = ack_kn02_irq,
index 3aa01d268f2d4f45398bd1ece332c0ecfa4d39ce..5a557e268f78440273ef6174c4b54ca40c104807 100644 (file)
@@ -92,9 +92,9 @@ void __init prom_meminit(u32 magic)
                rex_setup_memory_region();
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       unsigned long addr, end;
+       unsigned long end;
 
        /*
         * Free everything below the kernel itself but leave
@@ -114,16 +114,5 @@ unsigned long __init prom_free_prom_memory(void)
 #endif
                end = __pa(&_text);
 
-       addr = PAGE_SIZE;
-       while (addr < end) {
-               ClearPageReserved(virt_to_page(__va(addr)));
-               init_page_count(virt_to_page(__va(addr)));
-               free_page((unsigned long)__va(addr));
-               addr += PAGE_SIZE;
-       }
-
-       printk("Freeing unused PROM memory: %ldkb freed\n",
-              (end - PAGE_SIZE) >> 10);
-
-       return end - PAGE_SIZE;
+       free_init_pages("unused PROM memory", PAGE_SIZE, end);
 }
index d34032ac492a1ac24a9954f2ab789780b2bb8a04..1058e2f409bb9ec6a3fed658103affd4d5b338d1 100644 (file)
@@ -234,7 +234,7 @@ static void __init dec_init_kn01(void)
        memcpy(&cpu_mask_nr_tbl, &kn01_cpu_mask_nr_tbl,
                sizeof(kn01_cpu_mask_nr_tbl));
 
-       mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+       mips_cpu_irq_init();
 
 }                              /* dec_init_kn01 */
 
@@ -309,7 +309,7 @@ static void __init dec_init_kn230(void)
        memcpy(&cpu_mask_nr_tbl, &kn230_cpu_mask_nr_tbl,
                sizeof(kn230_cpu_mask_nr_tbl));
 
-       mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+       mips_cpu_irq_init();
 
 }                              /* dec_init_kn230 */
 
@@ -403,7 +403,7 @@ static void __init dec_init_kn02(void)
        memcpy(&asic_mask_nr_tbl, &kn02_asic_mask_nr_tbl,
                sizeof(kn02_asic_mask_nr_tbl));
 
-       mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+       mips_cpu_irq_init();
        init_kn02_irqs(KN02_IRQ_BASE);
 
 }                              /* dec_init_kn02 */
@@ -504,7 +504,7 @@ static void __init dec_init_kn02ba(void)
        memcpy(&asic_mask_nr_tbl, &kn02ba_asic_mask_nr_tbl,
                sizeof(kn02ba_asic_mask_nr_tbl));
 
-       mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+       mips_cpu_irq_init();
        init_ioasic_irqs(IO_IRQ_BASE);
 
 }                              /* dec_init_kn02ba */
@@ -601,7 +601,7 @@ static void __init dec_init_kn02ca(void)
        memcpy(&asic_mask_nr_tbl, &kn02ca_asic_mask_nr_tbl,
                sizeof(kn02ca_asic_mask_nr_tbl));
 
-       mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+       mips_cpu_irq_init();
        init_ioasic_irqs(IO_IRQ_BASE);
 
 }                              /* dec_init_kn02ca */
@@ -702,7 +702,7 @@ static void __init dec_init_kn03(void)
        memcpy(&asic_mask_nr_tbl, &kn03_asic_mask_nr_tbl,
                sizeof(kn03_asic_mask_nr_tbl));
 
-       mips_cpu_irq_init(DEC_CPU_IRQ_BASE);
+       mips_cpu_irq_init();
        init_ioasic_irqs(IO_IRQ_BASE);
 
 }                              /* dec_init_kn03 */
index 8d880f0b06ec1f1a0241ab5bfdd1d1fbfa70bb10..96df37b77759dd43be25f42abbfebe26467fa563 100644 (file)
@@ -57,7 +57,7 @@ static void emma2rh_irq_disable(unsigned int irq)
 }
 
 struct irq_chip emma2rh_irq_controller = {
-       .typename = "emma2rh_irq",
+       .name = "emma2rh_irq",
        .ack = emma2rh_irq_disable,
        .mask = emma2rh_irq_disable,
        .mask_ack = emma2rh_irq_disable,
index c93369cb411533d60d44f43516030e0822714353..3299b6dfe764435328887de1e7d0b23544e4ea93 100644 (file)
@@ -106,7 +106,7 @@ void __init arch_init_irq(void)
        emma2rh_irq_init(EMMA2RH_IRQ_BASE);
        emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE);
        emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE);
-       mips_cpu_irq_init(CPU_IRQ_BASE);
+       mips_cpu_irq_init();
 
        /* setup cascade interrupts */
        setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade);
index 2116d9be5fa9185e20cd1c531f9f62bd28014732..fba5c156f47249fd04ad68fa14ff4f45c8463f2d 100644 (file)
@@ -49,7 +49,7 @@ static void emma2rh_sw_irq_disable(unsigned int irq)
 }
 
 struct irq_chip emma2rh_sw_irq_controller = {
-       .typename = "emma2rh_sw_irq",
+       .name = "emma2rh_sw_irq",
        .ack = emma2rh_sw_irq_disable,
        .mask = emma2rh_sw_irq_disable,
        .mask_ack = emma2rh_sw_irq_disable,
@@ -115,7 +115,7 @@ static void emma2rh_gpio_irq_end(unsigned int irq)
 }
 
 struct irq_chip emma2rh_gpio_irq_controller = {
-       .typename = "emma2rh_gpio_irq",
+       .name = "emma2rh_gpio_irq",
        .ack = emma2rh_gpio_irq_ack,
        .mask = emma2rh_gpio_irq_disable,
        .mask_ack = emma2rh_gpio_irq_ack,
index b3e5796c81d76e3229858acac6bba1b34d6b22d8..04572b9c964299a9a53c95b897031b0233de4bbd 100644 (file)
@@ -88,7 +88,7 @@ static void end_ev64120_irq(unsigned int irq)
 }
 
 static struct irq_chip ev64120_irq_type = {
-       .typename       = "EV64120",
+       .name           = "EV64120",
        .ack            = disable_ev64120_irq,
        .mask           = disable_ev64120_irq,
        .mask_ack       = disable_ev64120_irq,
index 99c8d42212e2c7973e3e8dc99388ff7fa1bd3594..477848c22a2c19bf4d491a48368bbc3b94aa163f 100644 (file)
@@ -59,9 +59,8 @@ extern void galileo_machine_power_off(void);
  */
 extern struct pci_ops galileo_pci_ops;
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 /*
index 2128684584f533a08b358793f5d45375b8f5e364..32d6fb4ee67955794547331adc8177e522d23784 100644 (file)
@@ -1,6 +1,4 @@
 
-#ifdef CONFIG_KGDB
-
 #include <asm/serial.h> /* For the serial port location and base baud */
 
 /* --- CONFIG --- */
@@ -121,5 +119,3 @@ int putDebugChar(uint8 byte)
        UART16550_WRITE(OFS_SEND_BUFFER, byte);
        return 1;
 }
-
-#endif
index d9294401ccb067a46510b00118407c4275bdb1bf..2585d9dbda33f9f5090d607e28c35b9ab486edf5 100644 (file)
@@ -90,6 +90,6 @@ void __init arch_init_irq(void)
        clear_c0_status(ST0_IM);
        local_irq_disable();
 
-       mips_cpu_irq_init(0);
-       rm7k_cpu_irq_init(8);
+       mips_cpu_irq_init();
+       rm7k_cpu_irq_init();
 }
index 8677b6d3ada7923243831b05da2be8630dba906c..78f393b2afd99efc374a8c48cd6f22692b6fa7c2 100644 (file)
@@ -67,7 +67,6 @@ void __init prom_init(void)
        add_memory_region(0, 64 << 20, BOOT_MEM_RAM);
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
index eedfc24e1eae8c8004bacfa27f3f1443ed23a43c..d3d96591780e65412f363a8efd3e70c23c4dcbc6 100644 (file)
@@ -63,7 +63,7 @@ void gt64120_init_pic(void)
 void __init arch_init_irq(void)
 {
        /* IRQ 0 - 7 are for MIPS common irq_cpu controller */
-       mips_cpu_irq_init(0);
+       mips_cpu_irq_init();
 
        gt64120_init_pic();
 }
index 429afc400cb4ad4e7f7e071b1635a3a701a39103..121188d5ec4a3ee90660bf4c6c557001cd46afec 100644 (file)
@@ -93,9 +93,8 @@ void __init wrppmc_early_printk(const char *fmt, ...)
 }
 #endif /* WRPPMC_EARLY_DEBUG */
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 #ifdef CONFIG_SERIAL_8250
index f8d417b5c2bbd0f8bb85662db5139e1fefddeeb3..295892e4ce530a16c80109fd9e71325d4418fc4d 100644 (file)
@@ -40,7 +40,7 @@ void disable_r4030_irq(unsigned int irq)
 }
 
 static struct irq_chip r4030_irq_type = {
-       .typename = "R4030",
+       .name = "R4030",
        .ack = disable_r4030_irq,
        .mask = disable_r4030_irq,
        .mask_ack = disable_r4030_irq,
index 5d5838f41d23a3ea81fa1361505e5712e32acb59..aa481b774c42707ff539ad0f2e638330b9cce3b3 100644 (file)
@@ -75,7 +75,6 @@ void  __init prom_init_cmdline(void)
        *cp = '\0';
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
index 3da49c5aaf4947bcda20511d94419faca8d03b5d..7d2c203cb4067c232735c13189c1e515234dbe47 100644 (file)
@@ -439,7 +439,7 @@ void __init arch_init_irq(void)
 }
 
 static struct irq_chip jmr3927_irq_controller = {
-       .typename = "jmr3927_irq",
+       .name = "jmr3927_irq",
        .ack = jmr3927_irq_ack,
        .mask = jmr3927_irq_disable,
        .mask_ack = jmr3927_irq_ack,
index 138f25efe38a84fd82632dacc3efdcafd7da1436..7ca3d6d07b34f9c9998ed7e136c2722fcfbe9e92 100644 (file)
@@ -434,7 +434,7 @@ void __init tx3927_setup(void)
 
        /* DMA */
        tx3927_dmaptr->mcr = 0;
-       for (i = 0; i < sizeof(tx3927_dmaptr->ch) / sizeof(tx3927_dmaptr->ch[0]); i++) {
+       for (i = 0; i < ARRAY_SIZE(tx3927_dmaptr->ch); i++) {
                /* reset channel */
                tx3927_dmaptr->ch[i].ccr = TX3927_DMA_CCR_CHRST;
                tx3927_dmaptr->ch[i].ccr = 0;
index ff88b06f89df9b922ab616b4826162d4e23889ad..ea7df4b8da338d92822f35d72d96e52324415429 100644 (file)
@@ -234,10 +234,6 @@ void output_mm_defines(void)
        constant("#define _PMD_SHIFT     ", PMD_SHIFT);
        constant("#define _PGDIR_SHIFT   ", PGDIR_SHIFT);
        linefeed;
-       constant("#define _PGD_ORDER     ", PGD_ORDER);
-       constant("#define _PMD_ORDER     ", PMD_ORDER);
-       constant("#define _PTE_ORDER     ", PTE_ORDER);
-       linefeed;
        constant("#define _PTRS_PER_PGD  ", PTRS_PER_PGD);
        constant("#define _PTRS_PER_PMD  ", PTRS_PER_PMD);
        constant("#define _PTRS_PER_PTE  ", PTRS_PER_PTE);
index 442839e9578c3c21d4b3763c75a653c657d9757d..f59ef271d2472d97bc65e3a76ad74fc3088ee363 100644 (file)
@@ -565,7 +565,7 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
        if (config3 & MIPS_CONF3_VEIC)
                c->options |= MIPS_CPU_VEIC;
        if (config3 & MIPS_CONF3_MT)
-                c->ases |= MIPS_ASE_MIPSMT;
+               c->ases |= MIPS_ASE_MIPSMT;
 
        return config3 & MIPS_CONF_M;
 }
index 719d26968cb236675ef6a32bfd33cb836e3238f0..7bc882049269cf66dfa8c5221327faf682d46c48 100644 (file)
@@ -505,13 +505,13 @@ void show_gdbregs(struct gdb_regs * regs)
         */
        printk("$0 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
               regs->reg0, regs->reg1, regs->reg2, regs->reg3,
-               regs->reg4, regs->reg5, regs->reg6, regs->reg7);
+              regs->reg4, regs->reg5, regs->reg6, regs->reg7);
        printk("$8 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
               regs->reg8, regs->reg9, regs->reg10, regs->reg11,
-               regs->reg12, regs->reg13, regs->reg14, regs->reg15);
+              regs->reg12, regs->reg13, regs->reg14, regs->reg15);
        printk("$16: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
               regs->reg16, regs->reg17, regs->reg18, regs->reg19,
-               regs->reg20, regs->reg21, regs->reg22, regs->reg23);
+              regs->reg20, regs->reg21, regs->reg22, regs->reg23);
        printk("$24: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
               regs->reg24, regs->reg25, regs->reg26, regs->reg27,
               regs->reg28, regs->reg29, regs->reg30, regs->reg31);
index 9a7811d13db2ac607439bd238968a6f17a87841c..6f57ca44291f98a445eeb99b294a67ada0d02a35 100644 (file)
@@ -231,28 +231,3 @@ NESTED(smp_bootstrap, 16, sp)
 #endif /* CONFIG_SMP */
 
        __FINIT
-
-       .comm   kernelsp,    NR_CPUS * 8, 8
-       .comm   pgd_current, NR_CPUS * 8, 8
-
-       .comm   fw_arg0, SZREG, SZREG           # firmware arguments
-       .comm   fw_arg1, SZREG, SZREG
-       .comm   fw_arg2, SZREG, SZREG
-       .comm   fw_arg3, SZREG, SZREG
-
-       .macro page name, order
-       .comm   \name, (_PAGE_SIZE << \order), (_PAGE_SIZE << \order)
-       .endm
-
-       /*
-        * On 64-bit we've got three-level pagetables with a slightly
-        * different layout ...
-        */
-       page    swapper_pg_dir, _PGD_ORDER
-#ifdef CONFIG_64BIT
-#if defined(CONFIG_MODULES) && !defined(CONFIG_BUILD_ELF64)
-       page    module_pg_dir, _PGD_ORDER
-#endif
-       page    invalid_pmd_table, _PMD_ORDER
-#endif
-       page    invalid_pte_table, _PTE_ORDER
index b59a676c6d0e392cfc19632449d3ffa6cc6b9314..b33ba6cd7f5bca912896746ed4cbec133169bcdc 100644 (file)
@@ -54,9 +54,11 @@ static unsigned int cached_irq_mask = 0xffff;
 
 void disable_8259A_irq(unsigned int irq)
 {
-       unsigned int mask = 1 << irq;
+       unsigned int mask;
        unsigned long flags;
 
+       irq -= I8259A_IRQ_BASE;
+       mask = 1 << irq;
        spin_lock_irqsave(&i8259A_lock, flags);
        cached_irq_mask |= mask;
        if (irq & 8)
@@ -68,9 +70,11 @@ void disable_8259A_irq(unsigned int irq)
 
 void enable_8259A_irq(unsigned int irq)
 {
-       unsigned int mask = ~(1 << irq);
+       unsigned int mask;
        unsigned long flags;
 
+       irq -= I8259A_IRQ_BASE;
+       mask = ~(1 << irq);
        spin_lock_irqsave(&i8259A_lock, flags);
        cached_irq_mask &= mask;
        if (irq & 8)
@@ -82,10 +86,12 @@ void enable_8259A_irq(unsigned int irq)
 
 int i8259A_irq_pending(unsigned int irq)
 {
-       unsigned int mask = 1 << irq;
+       unsigned int mask;
        unsigned long flags;
        int ret;
 
+       irq -= I8259A_IRQ_BASE;
+       mask = 1 << irq;
        spin_lock_irqsave(&i8259A_lock, flags);
        if (irq < 8)
                ret = inb(PIC_MASTER_CMD) & mask;
@@ -134,9 +140,11 @@ static inline int i8259A_irq_real(unsigned int irq)
  */
 void mask_and_ack_8259A(unsigned int irq)
 {
-       unsigned int irqmask = 1 << irq;
+       unsigned int irqmask;
        unsigned long flags;
 
+       irq -= I8259A_IRQ_BASE;
+       irqmask = 1 << irq;
        spin_lock_irqsave(&i8259A_lock, flags);
        /*
         * Lightweight spurious IRQ detection. We do not want
@@ -169,8 +177,8 @@ handle_real_irq:
                outb(0x60+irq,PIC_MASTER_CMD);  /* 'Specific EOI to master */
        }
 #ifdef CONFIG_MIPS_MT_SMTC
-        if (irq_hwmask[irq] & ST0_IM)
-               set_c0_status(irq_hwmask[irq] & ST0_IM);
+       if (irq_hwmask[irq] & ST0_IM)
+               set_c0_status(irq_hwmask[irq] & ST0_IM);
 #endif /* CONFIG_MIPS_MT_SMTC */
        spin_unlock_irqrestore(&i8259A_lock, flags);
        return;
@@ -322,8 +330,8 @@ void __init init_i8259_irqs (void)
 
        init_8259A(0);
 
-       for (i = 0; i < 16; i++)
+       for (i = I8259A_IRQ_BASE; i < I8259A_IRQ_BASE + 16; i++)
                set_irq_chip_and_handler(i, &i8259A_chip, handle_level_irq);
 
-       setup_irq(PIC_CASCADE_IR, &irq2);
+       setup_irq(I8259A_IRQ_BASE + PIC_CASCADE_IR, &irq2);
 }
index 37cad5de515c782c51d67e432640084c53b53de2..3cc25c05d367b942a2f355cd295292b763b3a281 100644 (file)
@@ -10,6 +10,8 @@
  * Copyright (C) 1996 - 2004 David S. Miller <dm@engr.sgi.com>
  * Copyright (C) 2004 - 2005 Steven J. Hill <sjhill@realitydiluted.com>
  */
+#undef DEBUG
+
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/stat.h>
@@ -40,8 +42,6 @@
 
 #include <linux/elf.h>
 
-#undef DEBUG
-
 static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs);
 static int load_irix_library(struct file *);
 static int irix_core_dump(long signr, struct pt_regs * regs,
@@ -52,72 +52,102 @@ static struct linux_binfmt irix_format = {
        irix_core_dump, PAGE_SIZE
 };
 
-#ifdef DEBUG
 /* Debugging routines. */
 static char *get_elf_p_type(Elf32_Word p_type)
 {
-       int i = (int) p_type;
-
-       switch(i) {
-       case PT_NULL: return("PT_NULL"); break;
-       case PT_LOAD: return("PT_LOAD"); break;
-       case PT_DYNAMIC: return("PT_DYNAMIC"); break;
-       case PT_INTERP: return("PT_INTERP"); break;
-       case PT_NOTE: return("PT_NOTE"); break;
-       case PT_SHLIB: return("PT_SHLIB"); break;
-       case PT_PHDR: return("PT_PHDR"); break;
-       case PT_LOPROC: return("PT_LOPROC/REGINFO"); break;
-       case PT_HIPROC: return("PT_HIPROC"); break;
-       default: return("PT_BOGUS"); break;
+#ifdef DEBUG
+       switch (p_type) {
+       case PT_NULL:
+               return "PT_NULL";
+               break;
+
+       case PT_LOAD:
+               return "PT_LOAD";
+               break;
+
+       case PT_DYNAMIC:
+               return "PT_DYNAMIC";
+               break;
+
+       case PT_INTERP:
+               return "PT_INTERP";
+               break;
+
+       case PT_NOTE:
+               return "PT_NOTE";
+               break;
+
+       case PT_SHLIB:
+               return "PT_SHLIB";
+               break;
+
+       case PT_PHDR:
+               return "PT_PHDR";
+               break;
+
+       case PT_LOPROC:
+               return "PT_LOPROC/REGINFO";
+               break;
+
+       case PT_HIPROC:
+               return "PT_HIPROC";
+               break;
+
+       default:
+               return "PT_BOGUS";
+               break;
        }
+#endif
 }
 
 static void print_elfhdr(struct elfhdr *ehp)
 {
        int i;
 
-       printk("ELFHDR: e_ident<");
-       for(i = 0; i < (EI_NIDENT - 1); i++) printk("%x ", ehp->e_ident[i]);
-       printk("%x>\n", ehp->e_ident[i]);
-       printk("        e_type[%04x] e_machine[%04x] e_version[%08lx]\n",
-              (unsigned short) ehp->e_type, (unsigned short) ehp->e_machine,
-              (unsigned long) ehp->e_version);
-       printk("        e_entry[%08lx] e_phoff[%08lx] e_shoff[%08lx] "
-              "e_flags[%08lx]\n",
-              (unsigned long) ehp->e_entry, (unsigned long) ehp->e_phoff,
-              (unsigned long) ehp->e_shoff, (unsigned long) ehp->e_flags);
-       printk("        e_ehsize[%04x] e_phentsize[%04x] e_phnum[%04x]\n",
-              (unsigned short) ehp->e_ehsize, (unsigned short) ehp->e_phentsize,
-              (unsigned short) ehp->e_phnum);
-       printk("        e_shentsize[%04x] e_shnum[%04x] e_shstrndx[%04x]\n",
-              (unsigned short) ehp->e_shentsize, (unsigned short) ehp->e_shnum,
-              (unsigned short) ehp->e_shstrndx);
+       pr_debug("ELFHDR: e_ident<");
+       for (i = 0; i < (EI_NIDENT - 1); i++)
+               pr_debug("%x ", ehp->e_ident[i]);
+       pr_debug("%x>\n", ehp->e_ident[i]);
+       pr_debug("        e_type[%04x] e_machine[%04x] e_version[%08lx]\n",
+                (unsigned short) ehp->e_type, (unsigned short) ehp->e_machine,
+                (unsigned long) ehp->e_version);
+       pr_debug("        e_entry[%08lx] e_phoff[%08lx] e_shoff[%08lx] "
+                "e_flags[%08lx]\n",
+                (unsigned long) ehp->e_entry, (unsigned long) ehp->e_phoff,
+                (unsigned long) ehp->e_shoff, (unsigned long) ehp->e_flags);
+       pr_debug("        e_ehsize[%04x] e_phentsize[%04x] e_phnum[%04x]\n",
+                (unsigned short) ehp->e_ehsize,
+                (unsigned short) ehp->e_phentsize,
+                (unsigned short) ehp->e_phnum);
+       pr_debug("        e_shentsize[%04x] e_shnum[%04x] e_shstrndx[%04x]\n",
+                (unsigned short) ehp->e_shentsize,
+                (unsigned short) ehp->e_shnum,
+                (unsigned short) ehp->e_shstrndx);
 }
 
 static void print_phdr(int i, struct elf_phdr *ep)
 {
-       printk("PHDR[%d]: p_type[%s] p_offset[%08lx] p_vaddr[%08lx] "
-              "p_paddr[%08lx]\n", i, get_elf_p_type(ep->p_type),
-              (unsigned long) ep->p_offset, (unsigned long) ep->p_vaddr,
-              (unsigned long) ep->p_paddr);
-       printk("         p_filesz[%08lx] p_memsz[%08lx] p_flags[%08lx] "
-              "p_align[%08lx]\n", (unsigned long) ep->p_filesz,
-              (unsigned long) ep->p_memsz, (unsigned long) ep->p_flags,
-              (unsigned long) ep->p_align);
+       pr_debug("PHDR[%d]: p_type[%s] p_offset[%08lx] p_vaddr[%08lx] "
+                "p_paddr[%08lx]\n", i, get_elf_p_type(ep->p_type),
+                (unsigned long) ep->p_offset, (unsigned long) ep->p_vaddr,
+                (unsigned long) ep->p_paddr);
+       pr_debug("         p_filesz[%08lx] p_memsz[%08lx] p_flags[%08lx] "
+                "p_align[%08lx]\n", (unsigned long) ep->p_filesz,
+                (unsigned long) ep->p_memsz, (unsigned long) ep->p_flags,
+                (unsigned long) ep->p_align);
 }
 
 static void dump_phdrs(struct elf_phdr *ep, int pnum)
 {
        int i;
 
-       for(i = 0; i < pnum; i++, ep++) {
-               if((ep->p_type == PT_LOAD) ||
-                  (ep->p_type == PT_INTERP) ||
-                  (ep->p_type == PT_PHDR))
+       for (i = 0; i < pnum; i++, ep++) {
+               if ((ep->p_type == PT_LOAD) ||
+                   (ep->p_type == PT_INTERP) ||
+                   (ep->p_type == PT_PHDR))
                        print_phdr(i, ep);
        }
 }
-#endif /* DEBUG */
 
 static void set_brk(unsigned long start, unsigned long end)
 {
@@ -156,11 +186,10 @@ static unsigned long * create_irix_tables(char * p, int argc, int envc,
        elf_addr_t *envp;
        elf_addr_t *sp, *csp;
 
-#ifdef DEBUG
-       printk("create_irix_tables: p[%p] argc[%d] envc[%d] "
-              "load_addr[%08x] interp_load_addr[%08x]\n",
-              p, argc, envc, load_addr, interp_load_addr);
-#endif
+       pr_debug("create_irix_tables: p[%p] argc[%d] envc[%d] "
+                "load_addr[%08x] interp_load_addr[%08x]\n",
+                p, argc, envc, load_addr, interp_load_addr);
+
        sp = (elf_addr_t *) (~15UL & (unsigned long) p);
        csp = sp;
        csp -= exec ? DLINFO_ITEMS*2 : 2;
@@ -181,7 +210,7 @@ static unsigned long * create_irix_tables(char * p, int argc, int envc,
        sp -= 2;
        NEW_AUX_ENT(0, AT_NULL, 0);
 
-       if(exec) {
+       if (exec) {
                sp -= 11*2;
 
                NEW_AUX_ENT (0, AT_PHDR, load_addr + exec->e_phoff);
@@ -245,9 +274,7 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
        last_bss = 0;
        error = load_addr = 0;
 
-#ifdef DEBUG
        print_elfhdr(interp_elf_ex);
-#endif
 
        /* First of all, some simple consistency checks */
        if ((interp_elf_ex->e_type != ET_EXEC &&
@@ -258,7 +285,7 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
        }
 
        /* Now read in all of the header information */
-       if(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > PAGE_SIZE) {
+       if (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > PAGE_SIZE) {
            printk("IRIX interp header bigger than a page (%d)\n",
                   (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum));
            return 0xffffffff;
@@ -267,15 +294,15 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
        elf_phdata = kmalloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum,
                             GFP_KERNEL);
 
-       if(!elf_phdata) {
-          printk("Cannot kmalloc phdata for IRIX interp.\n");
-         return 0xffffffff;
+       if (!elf_phdata) {
+               printk("Cannot kmalloc phdata for IRIX interp.\n");
+               return 0xffffffff;
        }
 
        /* If the size of this structure has changed, then punt, since
         * we will be doing the wrong thing.
         */
-       if(interp_elf_ex->e_phentsize != 32) {
+       if (interp_elf_ex->e_phentsize != 32) {
                printk("IRIX interp e_phentsize == %d != 32 ",
                       interp_elf_ex->e_phentsize);
                kfree(elf_phdata);
@@ -286,61 +313,71 @@ static unsigned int load_irix_interp(struct elfhdr * interp_elf_ex,
                           (char *) elf_phdata,
                           sizeof(struct elf_phdr) * interp_elf_ex->e_phnum);
 
-#ifdef DEBUG
        dump_phdrs(elf_phdata, interp_elf_ex->e_phnum);
-#endif
 
        eppnt = elf_phdata;
-       for(i=0; i<interp_elf_ex->e_phnum; i++, eppnt++) {
-         if(eppnt->p_type == PT_LOAD) {
-           int elf_type = MAP_PRIVATE | MAP_DENYWRITE;
-           int elf_prot = 0;
-           unsigned long vaddr = 0;
-           if (eppnt->p_flags & PF_R) elf_prot =  PROT_READ;
-           if (eppnt->p_flags & PF_W) elf_prot |= PROT_WRITE;
-           if (eppnt->p_flags & PF_X) elf_prot |= PROT_EXEC;
-           elf_type |= MAP_FIXED;
-           vaddr = eppnt->p_vaddr;
-
-           pr_debug("INTERP do_mmap(%p, %08lx, %08lx, %08lx, %08lx, %08lx) ",
-                  interpreter, vaddr,
-                  (unsigned long) (eppnt->p_filesz + (eppnt->p_vaddr & 0xfff)),
-                  (unsigned long) elf_prot, (unsigned long) elf_type,
-                  (unsigned long) (eppnt->p_offset & 0xfffff000));
-           down_write(&current->mm->mmap_sem);
-           error = do_mmap(interpreter, vaddr,
-                           eppnt->p_filesz + (eppnt->p_vaddr & 0xfff),
-                           elf_prot, elf_type,
-                           eppnt->p_offset & 0xfffff000);
-           up_write(&current->mm->mmap_sem);
-
-           if(error < 0 && error > -1024) {
-                   printk("Aieee IRIX interp mmap error=%d\n", error);
-                   break;  /* Real error */
-           }
-           pr_debug("error=%08lx ", (unsigned long) error);
-           if(!load_addr && interp_elf_ex->e_type == ET_DYN) {
-             load_addr = error;
-              pr_debug("load_addr = error ");
-           }
-
-           /* Find the end of the file  mapping for this phdr, and keep
-            * track of the largest address we see for this.
-            */
-           k = eppnt->p_vaddr + eppnt->p_filesz;
-           if(k > elf_bss) elf_bss = k;
-
-           /* Do the same thing for the memory mapping - between
-            * elf_bss and last_bss is the bss section.
-            */
-           k = eppnt->p_memsz + eppnt->p_vaddr;
-           if(k > last_bss) last_bss = k;
-           pr_debug("\n");
-         }
+       for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
+               if (eppnt->p_type == PT_LOAD) {
+                       int elf_type = MAP_PRIVATE | MAP_DENYWRITE;
+                       int elf_prot = 0;
+                       unsigned long vaddr = 0;
+                       if (eppnt->p_flags & PF_R)
+                               elf_prot =  PROT_READ;
+                       if (eppnt->p_flags & PF_W)
+                               elf_prot |= PROT_WRITE;
+                       if (eppnt->p_flags & PF_X)
+                               elf_prot |= PROT_EXEC;
+                       elf_type |= MAP_FIXED;
+                       vaddr = eppnt->p_vaddr;
+
+                       pr_debug("INTERP do_mmap"
+                                "(%p, %08lx, %08lx, %08lx, %08lx, %08lx) ",
+                                interpreter, vaddr,
+                                (unsigned long)
+                                (eppnt->p_filesz + (eppnt->p_vaddr & 0xfff)),
+                                (unsigned long)
+                                elf_prot, (unsigned long) elf_type,
+                                (unsigned long)
+                                (eppnt->p_offset & 0xfffff000));
+
+                       down_write(&current->mm->mmap_sem);
+                       error = do_mmap(interpreter, vaddr,
+                       eppnt->p_filesz + (eppnt->p_vaddr & 0xfff),
+                       elf_prot, elf_type,
+                       eppnt->p_offset & 0xfffff000);
+                       up_write(&current->mm->mmap_sem);
+
+                       if (error < 0 && error > -1024) {
+                               printk("Aieee IRIX interp mmap error=%d\n",
+                                      error);
+                               break;  /* Real error */
+                       }
+                       pr_debug("error=%08lx ", (unsigned long) error);
+                       if (!load_addr && interp_elf_ex->e_type == ET_DYN) {
+                               load_addr = error;
+                               pr_debug("load_addr = error ");
+                       }
+
+                       /*
+                        * Find the end of the file  mapping for this phdr, and
+                        * keep track of the largest address we see for this.
+                        */
+                       k = eppnt->p_vaddr + eppnt->p_filesz;
+                       if (k > elf_bss)
+                               elf_bss = k;
+
+                       /* Do the same thing for the memory mapping - between
+                        * elf_bss and last_bss is the bss section.
+                        */
+                       k = eppnt->p_memsz + eppnt->p_vaddr;
+                       if (k > last_bss)
+                               last_bss = k;
+                       pr_debug("\n");
+               }
        }
 
        /* Now use mmap to map the library into memory. */
-       if(error < 0 && error > -1024) {
+       if (error < 0 && error > -1024) {
                pr_debug("got error %d\n", error);
                kfree(elf_phdata);
                return 0xffffffff;
@@ -377,7 +414,7 @@ static int verify_binary(struct elfhdr *ehp, struct linux_binprm *bprm)
                return -ENOEXEC;
 
        /* First of all, some simple consistency checks */
-       if((ehp->e_type != ET_EXEC && ehp->e_type != ET_DYN) ||
+       if ((ehp->e_type != ET_EXEC && ehp->e_type != ET_DYN) ||
            !bprm->file->f_op->mmap) {
                return -ENOEXEC;
        }
@@ -388,7 +425,7 @@ static int verify_binary(struct elfhdr *ehp, struct linux_binprm *bprm)
         * XXX all registers as 64bits on cpu's capable of this at
         * XXX exception time plus frob the XTLB exception vector.
         */
-       if((ehp->e_flags & EF_MIPS_ABI2))
+       if ((ehp->e_flags & EF_MIPS_ABI2))
                return -ENOEXEC;
 
        return 0;
@@ -410,7 +447,7 @@ static inline int look_for_irix_interpreter(char **name,
        struct file *file = NULL;
 
        *name = NULL;
-       for(i = 0; i < pnum; i++, epp++) {
+       for (i = 0; i < pnum; i++, epp++) {
                if (epp->p_type != PT_INTERP)
                        continue;
 
@@ -467,8 +504,8 @@ static inline void map_executable(struct file *fp, struct elf_phdr *epp, int pnu
        unsigned int tmp;
        int i, prot;
 
-       for(i = 0; i < pnum; i++, epp++) {
-               if(epp->p_type != PT_LOAD)
+       for (i = 0; i < pnum; i++, epp++) {
+               if (epp->p_type != PT_LOAD)
                        continue;
 
                /* Map it. */
@@ -483,23 +520,23 @@ static inline void map_executable(struct file *fp, struct elf_phdr *epp, int pnu
                up_write(&current->mm->mmap_sem);
 
                /* Fixup location tracking vars. */
-               if((epp->p_vaddr & 0xfffff000) < *estack)
+               if ((epp->p_vaddr & 0xfffff000) < *estack)
                        *estack = (epp->p_vaddr & 0xfffff000);
-               if(!*laddr)
+               if (!*laddr)
                        *laddr = epp->p_vaddr - epp->p_offset;
-               if(epp->p_vaddr < *scode)
+               if (epp->p_vaddr < *scode)
                        *scode = epp->p_vaddr;
 
                tmp = epp->p_vaddr + epp->p_filesz;
-               if(tmp > *ebss)
+               if (tmp > *ebss)
                        *ebss = tmp;
-               if((epp->p_flags & PF_X) && *ecode < tmp)
+               if ((epp->p_flags & PF_X) && *ecode < tmp)
                        *ecode = tmp;
-               if(*edata < tmp)
+               if (*edata < tmp)
                        *edata = tmp;
 
                tmp = epp->p_vaddr + epp->p_memsz;
-               if(tmp > *ebrk)
+               if (tmp > *ebrk)
                        *ebrk = tmp;
        }
 
@@ -513,12 +550,12 @@ static inline int map_interpreter(struct elf_phdr *epp, struct elfhdr *ihp,
        int i;
 
        *eentry = 0xffffffff;
-       for(i = 0; i < pnum; i++, epp++) {
-               if(epp->p_type != PT_INTERP)
+       for (i = 0; i < pnum; i++, epp++) {
+               if (epp->p_type != PT_INTERP)
                        continue;
 
                /* We should have fielded this error elsewhere... */
-               if(*eentry != 0xffffffff)
+               if (*eentry != 0xffffffff)
                        return -1;
 
                set_fs(old_fs);
@@ -604,9 +641,7 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        if (elf_ex.e_shnum > 20)
                goto out;
 
-#ifdef DEBUG
        print_elfhdr(&elf_ex);
-#endif
 
        /* Now read in all of the header information */
        size = elf_ex.e_phentsize * elf_ex.e_phnum;
@@ -622,13 +657,11 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        if (retval < 0)
                goto out_free_ph;
 
-#ifdef DEBUG
        dump_phdrs(elf_phdata, elf_ex.e_phnum);
-#endif
 
        /* Set some things for later. */
-       for(i = 0; i < elf_ex.e_phnum; i++) {
-               switch(elf_phdata[i].p_type) {
+       for (i = 0; i < elf_ex.e_phnum; i++) {
+               switch (elf_phdata[i].p_type) {
                case PT_INTERP:
                        has_interp = 1;
                        elf_ihdr = &elf_phdata[i];
@@ -667,7 +700,7 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
 
        if (elf_interpreter) {
                retval = verify_irix_interpreter(&interp_elf_ex);
-               if(retval)
+               if (retval)
                        goto out_free_interp;
        }
 
@@ -706,12 +739,12 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                       &load_addr, &start_code, &elf_bss, &end_code,
                       &end_data, &elf_brk);
 
-       if(elf_interpreter) {
+       if (elf_interpreter) {
                retval = map_interpreter(elf_phdata, &interp_elf_ex,
                                         interpreter, &interp_load_addr,
                                         elf_ex.e_phnum, old_fs, &elf_entry);
                kfree(elf_interpreter);
-               if(retval) {
+               if (retval) {
                        set_fs(old_fs);
                        printk("Unable to load IRIX ELF interpreter\n");
                        send_sig(SIGSEGV, current, 0);
@@ -809,12 +842,12 @@ static int load_irix_library(struct file *file)
                return -ENOEXEC;
 
        /* First of all, some simple consistency checks. */
-       if(elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
+       if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
           !file->f_op->mmap)
                return -ENOEXEC;
 
        /* Now read in all of the header information. */
-       if(sizeof(struct elf_phdr) * elf_ex.e_phnum > PAGE_SIZE)
+       if (sizeof(struct elf_phdr) * elf_ex.e_phnum > PAGE_SIZE)
                return -ENOEXEC;
 
        elf_phdata = kmalloc(sizeof(struct elf_phdr) * elf_ex.e_phnum, GFP_KERNEL);
@@ -825,15 +858,15 @@ static int load_irix_library(struct file *file)
                           sizeof(struct elf_phdr) * elf_ex.e_phnum);
 
        j = 0;
-       for(i=0; i<elf_ex.e_phnum; i++)
-               if((elf_phdata + i)->p_type == PT_LOAD) j++;
+       for (i=0; i<elf_ex.e_phnum; i++)
+               if ((elf_phdata + i)->p_type == PT_LOAD) j++;
 
-       if(j != 1)  {
+       if (j != 1)  {
                kfree(elf_phdata);
                return -ENOEXEC;
        }
 
-       while(elf_phdata->p_type != PT_LOAD) elf_phdata++;
+       while (elf_phdata->p_type != PT_LOAD) elf_phdata++;
 
        /* Now use mmap to map the library into memory. */
        down_write(&current->mm->mmap_sem);
@@ -889,9 +922,7 @@ unsigned long irix_mapelf(int fd, struct elf_phdr __user *user_phdrp, int cnt)
                return -EFAULT;
        }
 
-#ifdef DEBUG
        dump_phdrs(user_phdrp, cnt);
-#endif
 
        for (i = 0; i < cnt; i++, hp++) {
                if (__get_user(type, &hp->p_type))
@@ -905,14 +936,14 @@ unsigned long irix_mapelf(int fd, struct elf_phdr __user *user_phdrp, int cnt)
        filp = fget(fd);
        if (!filp)
                return -EACCES;
-       if(!filp->f_op) {
+       if (!filp->f_op) {
                printk("irix_mapelf: Bogon filp!\n");
                fput(filp);
                return -EACCES;
        }
 
        hp = user_phdrp;
-       for(i = 0; i < cnt; i++, hp++) {
+       for (i = 0; i < cnt; i++, hp++) {
                int prot;
 
                retval = __get_user(vaddr, &hp->p_vaddr);
@@ -1015,8 +1046,6 @@ static int notesize(struct memelfnote *en)
        return sz;
 }
 
-/* #define DEBUG */
-
 #define DUMP_WRITE(addr, nr)   \
        if (!dump_write(file, (addr), (nr))) \
                goto end_coredump;
@@ -1093,9 +1122,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
 
                segs++;
        }
-#ifdef DEBUG
-       printk("irix_core_dump: %d segs taking %d bytes\n", segs, size);
-#endif
+       pr_debug("irix_core_dump: %d segs taking %d bytes\n", segs, size);
 
        /* Set up header. */
        memcpy(elf.e_ident, ELFMAG, SELFMAG);
@@ -1221,7 +1248,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
                struct elf_phdr phdr;
                int sz = 0;
 
-               for(i = 0; i < numnote; i++)
+               for (i = 0; i < numnote; i++)
                        sz += notesize(&notes[i]);
 
                phdr.p_type = PT_NOTE;
@@ -1241,7 +1268,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
        dataoff = offset = roundup(offset, PAGE_SIZE);
 
        /* Write program headers for segments dump. */
-       for(vma = current->mm->mmap, i = 0;
+       for (vma = current->mm->mmap, i = 0;
                i < segs && vma != NULL; vma = vma->vm_next) {
                struct elf_phdr phdr;
                size_t sz;
@@ -1267,7 +1294,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
                DUMP_WRITE(&phdr, sizeof(phdr));
        }
 
-       for(i = 0; i < numnote; i++)
+       for (i = 0; i < numnote; i++)
                if (!writenote(&notes[i], file))
                        goto end_coredump;
 
@@ -1275,7 +1302,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
 
        DUMP_SEEK(dataoff);
 
-       for(i = 0, vma = current->mm->mmap;
+       for (i = 0, vma = current->mm->mmap;
            i < segs && vma != NULL;
            vma = vma->vm_next) {
                unsigned long addr = vma->vm_start;
@@ -1284,9 +1311,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file)
                if (!maydump(vma))
                        continue;
                i++;
-#ifdef DEBUG
-               printk("elf_core_dump: writing %08lx %lx\n", addr, len);
-#endif
+               pr_debug("elf_core_dump: writing %08lx %lx\n", addr, len);
                DUMP_WRITE((void __user *)addr, len);
        }
 
index bcaad6696082480c114c5cbc57e674e9ed2a3ea7..2967537221e2118929c3ac5816f8830bc2379033 100644 (file)
@@ -112,7 +112,7 @@ msc_bind_eic_interrupt (unsigned int irq, unsigned int set)
 }
 
 struct irq_chip msc_levelirq_type = {
-       .typename = "SOC-it-Level",
+       .name = "SOC-it-Level",
        .ack = level_mask_and_ack_msc_irq,
        .mask = mask_msc_irq,
        .mask_ack = level_mask_and_ack_msc_irq,
@@ -122,7 +122,7 @@ struct irq_chip msc_levelirq_type = {
 };
 
 struct irq_chip msc_edgeirq_type = {
-       .typename = "SOC-it-Edge",
+       .name = "SOC-it-Edge",
        .ack = edge_mask_and_ack_msc_irq,
        .mask = mask_msc_irq,
        .mask_ack = edge_mask_and_ack_msc_irq,
index efbd219845b573fbe9d3097f1b69383a7dc8ac13..3dd561832e4c91dbbc44041043924d6a51a64e6b 100644 (file)
@@ -23,13 +23,13 @@ static unsigned int irq_base;
 
 static inline int ls1bit32(unsigned int x)
 {
-        int b = 31, s;
+       int b = 31, s;
 
-        s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s;
-        s =  8; if (x <<  8 == 0) s = 0; b -= s; x <<= s;
-        s =  4; if (x <<  4 == 0) s = 0; b -= s; x <<= s;
-        s =  2; if (x <<  2 == 0) s = 0; b -= s; x <<= s;
-        s =  1; if (x <<  1 == 0) s = 0; b -= s;
+       s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s;
+       s =  8; if (x <<  8 == 0) s = 0; b -= s; x <<= s;
+       s =  4; if (x <<  4 == 0) s = 0; b -= s; x <<= s;
+       s =  2; if (x <<  2 == 0) s = 0; b -= s; x <<= s;
+       s =  1; if (x <<  1 == 0) s = 0; b -= s;
 
         return b;
 }
@@ -92,7 +92,7 @@ void ll_mv64340_irq(void)
 }
 
 struct irq_chip mv64340_irq_type = {
-       .typename = "MV-64340",
+       .name = "MV-64340",
        .ack = mask_mv64340_irq,
        .mask = mask_mv64340_irq,
        .mask_ack = mask_mv64340_irq,
index 123324ba8c14ca05c18562bd9cd7c5c25a794c08..2507328834886e7f6151799713cb1de5ae505fef 100644 (file)
 #include <asm/mipsregs.h>
 #include <asm/system.h>
 
-static int irq_base;
-
 static inline void unmask_rm7k_irq(unsigned int irq)
 {
-       set_c0_intcontrol(0x100 << (irq - irq_base));
+       set_c0_intcontrol(0x100 << (irq - RM7K_CPU_IRQ_BASE));
 }
 
 static inline void mask_rm7k_irq(unsigned int irq)
 {
-       clear_c0_intcontrol(0x100 << (irq - irq_base));
+       clear_c0_intcontrol(0x100 << (irq - RM7K_CPU_IRQ_BASE));
 }
 
 static struct irq_chip rm7k_irq_controller = {
-       .typename = "RM7000",
+       .name = "RM7000",
        .ack = mask_rm7k_irq,
        .mask = mask_rm7k_irq,
        .mask_ack = mask_rm7k_irq,
        .unmask = unmask_rm7k_irq,
 };
 
-void __init rm7k_cpu_irq_init(int base)
+void __init rm7k_cpu_irq_init(void)
 {
+       int base = RM7K_CPU_IRQ_BASE;
        int i;
 
        clear_c0_intcontrol(0x00000f00);                /* Mask all */
@@ -46,6 +45,4 @@ void __init rm7k_cpu_irq_init(int base)
        for (i = base; i < base + 4; i++)
                set_irq_chip_and_handler(i, &rm7k_irq_controller,
                                         handle_level_irq);
-
-       irq_base = base;
 }
index 0e6f4c5349d2e86b0bd5cf2ecb3cfd6c2102ddd4..ae83d2df6f31d51dc47a223b45622add5633bd76 100644 (file)
 #include <asm/mipsregs.h>
 #include <asm/system.h>
 
-static int irq_base;
-
 static inline void unmask_rm9k_irq(unsigned int irq)
 {
-       set_c0_intcontrol(0x1000 << (irq - irq_base));
+       set_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE));
 }
 
 static inline void mask_rm9k_irq(unsigned int irq)
 {
-       clear_c0_intcontrol(0x1000 << (irq - irq_base));
+       clear_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE));
 }
 
 static inline void rm9k_cpu_irq_enable(unsigned int irq)
@@ -39,15 +37,6 @@ static inline void rm9k_cpu_irq_enable(unsigned int irq)
        local_irq_restore(flags);
 }
 
-static void rm9k_cpu_irq_disable(unsigned int irq)
-{
-       unsigned long flags;
-
-       local_irq_save(flags);
-       mask_rm9k_irq(irq);
-       local_irq_restore(flags);
-}
-
 /*
  * Performance counter interrupts are global on all processors.
  */
@@ -81,7 +70,7 @@ static void rm9k_perfcounter_irq_shutdown(unsigned int irq)
 }
 
 static struct irq_chip rm9k_irq_controller = {
-       .typename = "RM9000",
+       .name = "RM9000",
        .ack = mask_rm9k_irq,
        .mask = mask_rm9k_irq,
        .mask_ack = mask_rm9k_irq,
@@ -89,7 +78,7 @@ static struct irq_chip rm9k_irq_controller = {
 };
 
 static struct irq_chip rm9k_perfcounter_irq = {
-       .typename = "RM9000",
+       .name = "RM9000",
        .startup = rm9k_perfcounter_irq_startup,
        .shutdown = rm9k_perfcounter_irq_shutdown,
        .ack = mask_rm9k_irq,
@@ -102,8 +91,9 @@ unsigned int rm9000_perfcount_irq;
 
 EXPORT_SYMBOL(rm9000_perfcount_irq);
 
-void __init rm9k_cpu_irq_init(int base)
+void __init rm9k_cpu_irq_init(void)
 {
+       int base = RM9K_CPU_IRQ_BASE;
        int i;
 
        clear_c0_intcontrol(0x0000f000);                /* Mask all */
@@ -115,6 +105,4 @@ void __init rm9k_cpu_irq_init(int base)
        rm9000_perfcount_irq = base + 1;
        set_irq_chip_and_handler(rm9000_perfcount_irq, &rm9k_perfcounter_irq,
                                 handle_level_irq);
-
-       irq_base = base;
 }
index fcc86b96ccf6097d5490dca91002b806936a9b89..7b66e03b58994e1e7f3daf6f88ead0628a1a4e12 100644 (file)
@@ -25,7 +25,7 @@
  * Don't even think about using this on SMP.  You have been warned.
  *
  * This file exports one global function:
- *     void mips_cpu_irq_init(int irq_base);
+ *     void mips_cpu_irq_init(void);
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <asm/mipsmtregs.h>
 #include <asm/system.h>
 
-static int mips_cpu_irq_base;
-
 static inline void unmask_mips_irq(unsigned int irq)
 {
-       set_c0_status(0x100 << (irq - mips_cpu_irq_base));
+       set_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE));
        irq_enable_hazard();
 }
 
 static inline void mask_mips_irq(unsigned int irq)
 {
-       clear_c0_status(0x100 << (irq - mips_cpu_irq_base));
+       clear_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE));
        irq_disable_hazard();
 }
 
 static struct irq_chip mips_cpu_irq_controller = {
-       .typename       = "MIPS",
+       .name           = "MIPS",
        .ack            = mask_mips_irq,
        .mask           = mask_mips_irq,
        .mask_ack       = mask_mips_irq,
@@ -70,7 +68,7 @@ static unsigned int mips_mt_cpu_irq_startup(unsigned int irq)
 {
        unsigned int vpflags = dvpe();
 
-       clear_c0_cause(0x100 << (irq - mips_cpu_irq_base));
+       clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE));
        evpe(vpflags);
        unmask_mips_mt_irq(irq);
 
@@ -84,13 +82,13 @@ static unsigned int mips_mt_cpu_irq_startup(unsigned int irq)
 static void mips_mt_cpu_irq_ack(unsigned int irq)
 {
        unsigned int vpflags = dvpe();
-       clear_c0_cause(0x100 << (irq - mips_cpu_irq_base));
+       clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE));
        evpe(vpflags);
        mask_mips_mt_irq(irq);
 }
 
 static struct irq_chip mips_mt_cpu_irq_controller = {
-       .typename       = "MIPS",
+       .name           = "MIPS",
        .startup        = mips_mt_cpu_irq_startup,
        .ack            = mips_mt_cpu_irq_ack,
        .mask           = mask_mips_mt_irq,
@@ -99,8 +97,9 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
        .eoi            = unmask_mips_mt_irq,
 };
 
-void __init mips_cpu_irq_init(int irq_base)
+void __init mips_cpu_irq_init(void)
 {
+       int irq_base = MIPS_CPU_IRQ_BASE;
        int i;
 
        /* Mask interrupts. */
@@ -118,6 +117,4 @@ void __init mips_cpu_irq_init(int irq_base)
        for (i = irq_base + 2; i < irq_base + 8; i++)
                set_irq_chip_and_handler(i, &mips_cpu_irq_controller,
                                         handle_level_irq);
-
-       mips_cpu_irq_base = irq_base;
 }
index de3fae260ff82fb4e94655d1cc261d42d919dc74..0b8ce59429a8d1e3e73a6fe22cfe9b61b6429b40 100644 (file)
@@ -194,15 +194,15 @@ sysn32_waitid(int which, compat_pid_t pid,
 }
 
 struct sysinfo32 {
-        s32 uptime;
-        u32 loads[3];
-        u32 totalram;
-        u32 freeram;
-        u32 sharedram;
-        u32 bufferram;
-        u32 totalswap;
-        u32 freeswap;
-        u16 procs;
+       s32 uptime;
+       u32 loads[3];
+       u32 totalram;
+       u32 freeram;
+       u32 sharedram;
+       u32 bufferram;
+       u32 totalswap;
+       u32 freeswap;
+       u16 procs;
        u32 totalhigh;
        u32 freehigh;
        u32 mem_unit;
@@ -558,7 +558,7 @@ extern asmlinkage long sys_ustat(dev_t dev, struct ustat __user * ubuf);
 asmlinkage int sys32_ustat(dev_t dev, struct ustat32 __user * ubuf32)
 {
        int err;
-        struct ustat tmp;
+       struct ustat tmp;
        struct ustat32 tmp32;
        mm_segment_t old_fs = get_fs();
 
@@ -569,11 +569,11 @@ asmlinkage int sys32_ustat(dev_t dev, struct ustat32 __user * ubuf32)
        if (err)
                goto out;
 
-        memset(&tmp32,0,sizeof(struct ustat32));
-        tmp32.f_tfree = tmp.f_tfree;
-        tmp32.f_tinode = tmp.f_tinode;
+       memset(&tmp32,0,sizeof(struct ustat32));
+       tmp32.f_tfree = tmp.f_tfree;
+       tmp32.f_tinode = tmp.f_tinode;
 
-        err = copy_to_user(ubuf32,&tmp32,sizeof(struct ustat32)) ? -EFAULT : 0;
+       err = copy_to_user(ubuf32,&tmp32,sizeof(struct ustat32)) ? -EFAULT : 0;
 
 out:
        return err;
index c1373a6e668bec45583c7ff498e697b0a30355ca..a32f6797353aa32fc6b25b770a1b867cf62f2909 100644 (file)
@@ -96,6 +96,10 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
                goto out_unlock;
        }
 
+       retval = security_task_setscheduler(p, 0, NULL);
+       if (retval)
+               goto out_unlock;
+
        /* Record new user-specified CPU set for future reference */
        p->thread.user_cpus_allowed = new_mask;
 
@@ -141,8 +145,9 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
        p = find_process_by_pid(pid);
        if (!p)
                goto out_unlock;
-
-       retval = 0;
+       retval = security_task_getscheduler(p);
+       if (retval)
+               goto out_unlock;
 
        cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
 
index 4ed37ba19731071b369180cd12d3895ece7becbe..5ddc2e9deecf3cfa042976c33b9b932c7d27edbe 100644 (file)
@@ -31,13 +31,13 @@ static const char *cpu_name[] = {
        [CPU_R4000PC]   = "R4000PC",
        [CPU_R4000SC]   = "R4000SC",
        [CPU_R4000MC]   = "R4000MC",
-        [CPU_R4200]    = "R4200",
+       [CPU_R4200]     = "R4200",
        [CPU_R4400PC]   = "R4400PC",
        [CPU_R4400SC]   = "R4400SC",
        [CPU_R4400MC]   = "R4400MC",
        [CPU_R4600]     = "R4600",
        [CPU_R6000]     = "R6000",
-        [CPU_R6000A]   = "R6000A",
+       [CPU_R6000A]    = "R6000A",
        [CPU_R8000]     = "R8000",
        [CPU_R10000]    = "R10000",
        [CPU_R12000]    = "R12000",
@@ -46,14 +46,14 @@ static const char *cpu_name[] = {
        [CPU_R4650]     = "R4650",
        [CPU_R4700]     = "R4700",
        [CPU_R5000]     = "R5000",
-        [CPU_R5000A]   = "R5000A",
+       [CPU_R5000A]    = "R5000A",
        [CPU_R4640]     = "R4640",
        [CPU_NEVADA]    = "Nevada",
        [CPU_RM7000]    = "RM7000",
        [CPU_RM9000]    = "RM9000",
        [CPU_R5432]     = "R5432",
        [CPU_4KC]       = "MIPS 4Kc",
-        [CPU_5KC]      = "MIPS 5Kc",
+       [CPU_5KC]       = "MIPS 5Kc",
        [CPU_R4310]     = "R4310",
        [CPU_SB1]       = "SiByte SB1",
        [CPU_SB1A]      = "SiByte SB1A",
index ec8209f3a0c68af6c70df1e43403ab23687f62f6..04e5b38d327de7e5bee477f43aeb3e8d46abb985 100644 (file)
 #include <asm/isadep.h>
 #include <asm/inst.h>
 #include <asm/stacktrace.h>
-#ifdef CONFIG_MIPS_MT_SMTC
-#include <asm/mipsmtregs.h>
-extern void smtc_idle_loop_hook(void);
-#endif /* CONFIG_MIPS_MT_SMTC */
 
 /*
  * The idle thread. There's no useful work to be done, so just try to conserve
@@ -57,6 +53,8 @@ ATTRIB_NORET void cpu_idle(void)
        while (1) {
                while (!need_resched()) {
 #ifdef CONFIG_MIPS_MT_SMTC
+                       extern void smtc_idle_loop_hook(void);
+
                        smtc_idle_loop_hook();
 #endif /* CONFIG_MIPS_MT_SMTC */
                        if (cpu_wait)
index 880fa6e841ee95f678993fb5dd17138f62f5af22..59c1577ecbb31e303dd8aa00d99d5dc3dfd4e13f 100644 (file)
@@ -114,6 +114,14 @@ LEAF(_save_fp_context32)
  */
 LEAF(_restore_fp_context)
        EX      lw t0, SC_FPC_CSR(a0)
+
+       /* Fail if the CSR has exceptions pending */
+       srl     t1, t0, 5
+       and     t1, t0
+       andi    t1, 0x1f << 7
+       bnez    t1, fault
+        nop
+
 #ifdef CONFIG_64BIT
        EX      ldc1 $f1, SC_FPREGS+8(a0)
        EX      ldc1 $f3, SC_FPREGS+24(a0)
@@ -157,6 +165,14 @@ LEAF(_restore_fp_context)
 LEAF(_restore_fp_context32)
        /* Restore an o32 sigcontext.  */
        EX      lw t0, SC32_FPC_CSR(a0)
+
+       /* Fail if the CSR has exceptions pending */
+       srl     t1, t0, 5
+       and     t1, t0
+       andi    t1, 0x1f << 7
+       bnez    t1, fault
+        nop
+
        EX      ldc1 $f0, SC32_FPREGS+0(a0)
        EX      ldc1 $f2, SC32_FPREGS+16(a0)
        EX      ldc1 $f4, SC32_FPREGS+32(a0)
@@ -177,9 +193,10 @@ LEAF(_restore_fp_context32)
        jr      ra
         li     v0, 0                                   # success
        END(_restore_fp_context32)
-       .set    reorder
 #endif
 
+       .set    reorder
+
        .type   fault@function
        .ent    fault
 fault: li      v0, -EFAULT                             # failure
index 5a99e3e0c96dcdab47d209ad4b4f3297d69e560a..8610f4a925e90a043a4ebd17ccddb5c899f98e0f 100644 (file)
@@ -63,7 +63,7 @@ extern void *vpe_get_shared(int index);
 
 static void rtlx_dispatch(void)
 {
-       do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ);
+       do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ);
 }
 
 
@@ -491,7 +491,7 @@ static struct irqaction rtlx_irq = {
        .name           = "RTLX",
 };
 
-static int rtlx_irq_num = MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ;
+static int rtlx_irq_num = MIPS_CPU_IRQ_BASE + MIPS_CPU_RTLX_IRQ;
 
 static char register_chrdev_failed[] __initdata =
        KERN_ERR "rtlx_module_init: unable to register device\n";
index a7bff2a547235b4962c9c6f557f999ffcc88c534..39add2341aa296f303f0d4f0b0d18c67aa232a74 100644 (file)
@@ -384,7 +384,7 @@ EXPORT(sysn32_call_table)
        PTR     sys_readlinkat
        PTR     sys_fchmodat
        PTR     sys_faccessat
-       PTR     sys_pselect6
+       PTR     compat_sys_pselect6
        PTR     sys_ppoll                       /* 6265 */
        PTR     sys_unshare
        PTR     sys_splice
index e91379c1be1d79826b81ca48182444ec2ad6deca..c58b8e0105ea0db8fa4cc2994324fddde7a4d17b 100644 (file)
@@ -506,7 +506,7 @@ sys_call_table:
        PTR     sys_readlinkat
        PTR     sys_fchmodat
        PTR     sys_faccessat                   /* 4300 */
-       PTR     sys_pselect6
+       PTR     compat_sys_pselect6
        PTR     sys_ppoll
        PTR     sys_unshare
        PTR     sys_splice
index 89440a0d8528f8ddf9b173f405f20b52723b8051..d2e01e7167b86a2e644d5d12d0fc2647ce1b5c8a 100644 (file)
@@ -271,8 +271,7 @@ static void __init bootmem_init(void)
 static void __init bootmem_init(void)
 {
        unsigned long reserved_end;
-       unsigned long highest = 0;
-       unsigned long mapstart = -1UL;
+       unsigned long mapstart = ~0UL;
        unsigned long bootmap_size;
        int i;
 
@@ -283,6 +282,13 @@ static void __init bootmem_init(void)
         */
        reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end)));
 
+       /*
+        * max_low_pfn is not a number of pages. The number of pages
+        * of the system is given by 'max_low_pfn - min_low_pfn'.
+        */
+       min_low_pfn = ~0UL;
+       max_low_pfn = 0;
+
        /*
         * Find the highest page frame number we have available.
         */
@@ -296,8 +302,10 @@ static void __init bootmem_init(void)
                end = PFN_DOWN(boot_mem_map.map[i].addr
                                + boot_mem_map.map[i].size);
 
-               if (end > highest)
-                       highest = end;
+               if (end > max_low_pfn)
+                       max_low_pfn = end;
+               if (start < min_low_pfn)
+                       min_low_pfn = start;
                if (end <= reserved_end)
                        continue;
                if (start >= mapstart)
@@ -305,22 +313,36 @@ static void __init bootmem_init(void)
                mapstart = max(reserved_end, start);
        }
 
+       if (min_low_pfn >= max_low_pfn)
+               panic("Incorrect memory mapping !!!");
+       if (min_low_pfn > ARCH_PFN_OFFSET) {
+               printk(KERN_INFO
+                      "Wasting %lu bytes for tracking %lu unused pages\n",
+                      (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page),
+                      min_low_pfn - ARCH_PFN_OFFSET);
+       } else if (min_low_pfn < ARCH_PFN_OFFSET) {
+               printk(KERN_INFO
+                      "%lu free pages won't be used\n",
+                      ARCH_PFN_OFFSET - min_low_pfn);
+       }
+       min_low_pfn = ARCH_PFN_OFFSET;
+
        /*
         * Determine low and high memory ranges
         */
-       if (highest > PFN_DOWN(HIGHMEM_START)) {
+       if (max_low_pfn > PFN_DOWN(HIGHMEM_START)) {
 #ifdef CONFIG_HIGHMEM
                highstart_pfn = PFN_DOWN(HIGHMEM_START);
-               highend_pfn = highest;
+               highend_pfn = max_low_pfn;
 #endif
-               highest = PFN_DOWN(HIGHMEM_START);
+               max_low_pfn = PFN_DOWN(HIGHMEM_START);
        }
 
        /*
         * Initialize the boot-time allocator with low memory only.
         */
-       bootmap_size = init_bootmem(mapstart, highest);
-
+       bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
+                                        min_low_pfn, max_low_pfn);
        /*
         * Register fully available low RAM pages with the bootmem allocator.
         */
@@ -507,9 +529,9 @@ void __init setup_arch(char **cmdline_p)
 
 #if defined(CONFIG_VT)
 #if defined(CONFIG_VGA_CONSOLE)
-        conswitchp = &vga_con;
+       conswitchp = &vga_con;
 #elif defined(CONFIG_DUMMY_CONSOLE)
-        conswitchp = &dummy_con;
+       conswitchp = &dummy_con;
 #endif
 #endif
 
@@ -541,3 +563,6 @@ int __init dsp_disable(char *s)
 }
 
 __setup("nodsp", dsp_disable);
+
+unsigned long kernelsp[NR_CPUS];
+unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
index b9d358e052144bb501956da1afca37553ab58394..9a44053cd9f18143521584d27165064bddbd254d 100644 (file)
@@ -89,7 +89,7 @@ _sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
        spin_lock_irq(&current->sighand->siglock);
        current->saved_sigmask = current->blocked;
        current->blocked = newset;
-        recalc_sigpending();
+       recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
 
        current->state = TASK_INTERRUPTIBLE;
@@ -124,7 +124,7 @@ asmlinkage int sys_sigaction(int sig, const struct sigaction __user *act,
 
        if (!ret && oact) {
                if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
-                        return -EFAULT;
+                       return -EFAULT;
                err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
                err |= __put_user(old_ka.sa.sa_handler, &oact->sa_handler);
                err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig);
@@ -304,7 +304,7 @@ int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
               current->comm, current->pid,
               frame, regs->cp0_epc, frame->regs[31]);
 #endif
-        return 0;
+       return 0;
 
 give_sigsegv:
        force_sigsegv(signr, current);
index a67c18555ed396cdb2c08443a1808dd2d39bda94..b28646b3ceaea8d04eaab8336206fbee571fb129 100644 (file)
@@ -105,7 +105,7 @@ _sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
        spin_lock_irq(&current->sighand->siglock);
        current->saved_sigmask = current->blocked;
        current->blocked = newset;
-        recalc_sigpending();
+       recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
 
        current->state = TASK_INTERRUPTIBLE;
@@ -184,7 +184,7 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
        /* Create the ucontext.  */
        err |= __put_user(0, &frame->rs_uc.uc_flags);
        err |= __put_user(0, &frame->rs_uc.uc_link);
-        sp = (int) (long) current->sas_ss_sp;
+       sp = (int) (long) current->sas_ss_sp;
        err |= __put_user(sp,
                          &frame->rs_uc.uc_stack.ss_sp);
        err |= __put_user(sas_ss_flags(regs->regs[29]),
index 1ee689c0e0c991b9537ec6b170b59614b9fd4f89..64b62bdfb4f62d46c3f5aa897bbfeec56e73b88b 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm/mipsregs.h>
 #include <asm/mipsmtregs.h>
 #include <asm/mips_mt.h>
-#include <asm/mips-boards/maltaint.h>  /* This is f*cking wrong */
 
 #define MIPS_CPU_IPI_RESCHED_IRQ 0
 #define MIPS_CPU_IPI_CALL_IRQ 1
@@ -108,12 +107,12 @@ void __init sanitize_tlb_entries(void)
 
 static void ipi_resched_dispatch(void)
 {
-       do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ);
+       do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ);
 }
 
 static void ipi_call_dispatch(void)
 {
-       do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ);
+       do_IRQ(MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ);
 }
 
 static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
@@ -270,8 +269,8 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
                set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
        }
 
-       cpu_ipi_resched_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
-       cpu_ipi_call_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ;
+       cpu_ipi_resched_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
+       cpu_ipi_call_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_CALL_IRQ;
 
        setup_irq(cpu_ipi_resched_irq, &irq_resched);
        setup_irq(cpu_ipi_call_irq, &irq_call);
index 6a857bf030b070aee2d9861e727cfd3605e62200..9251ea82493746a4829e69ba3f433f123e94eb24 100644 (file)
  * This file should be built into the kernel only if CONFIG_MIPS_MT_SMTC is set.
  */
 
-/*
- * MIPSCPU_INT_BASE is identically defined in both
- * asm-mips/mips-boards/maltaint.h and asm-mips/mips-boards/simint.h,
- * but as yet there's no properly organized include structure that
- * will ensure that the right *int.h file will be included for a
- * given platform build.
- */
-
-#define MIPSCPU_INT_BASE       16
-
 #define MIPS_CPU_IPI_IRQ       1
 
 #define LOCK_MT_PRA() \
@@ -77,15 +67,15 @@ unsigned int ipi_timer_latch[NR_CPUS];
 
 #define IPIBUF_PER_CPU 4
 
-struct smtc_ipi_q IPIQ[NR_CPUS];
-struct smtc_ipi_q freeIPIq;
+static struct smtc_ipi_q IPIQ[NR_CPUS];
+static struct smtc_ipi_q freeIPIq;
 
 
 /* Forward declarations */
 
 void ipi_decode(struct smtc_ipi *);
-void post_direct_ipi(int cpu, struct smtc_ipi *pipi);
-void setup_cross_vpe_interrupts(void);
+static void post_direct_ipi(int cpu, struct smtc_ipi *pipi);
+static void setup_cross_vpe_interrupts(void);
 void init_smtc_stats(void);
 
 /* Global SMTC Status */
@@ -200,7 +190,7 @@ void __init sanitize_tlb_entries(void)
  * Configure shared TLB - VPC configuration bit must be set by caller
  */
 
-void smtc_configure_tlb(void)
+static void smtc_configure_tlb(void)
 {
        int i,tlbsiz,vpes;
        unsigned long mvpconf0;
@@ -648,7 +638,7 @@ int setup_irq_smtc(unsigned int irq, struct irqaction * new,
  * the VPE.
  */
 
-void smtc_ipi_qdump(void)
+static void smtc_ipi_qdump(void)
 {
        int i;
 
@@ -686,28 +676,6 @@ static __inline__ int atomic_postincrement(unsigned int *pv)
        return result;
 }
 
-/* No longer used in IPI dispatch, but retained for future recycling */
-
-static __inline__ int atomic_postclear(unsigned int *pv)
-{
-       unsigned long result;
-
-       unsigned long temp;
-
-       __asm__ __volatile__(
-       "1:     ll      %0, %2                                  \n"
-       "       or      %1, $0, $0                              \n"
-       "       sc      %1, %2                                  \n"
-       "       beqz    %1, 1b                                  \n"
-       "       sync                                            \n"
-       : "=&r" (result), "=&r" (temp), "=m" (*pv)
-       : "m" (*pv)
-       : "memory");
-
-       return result;
-}
-
-
 void smtc_send_ipi(int cpu, int type, unsigned int action)
 {
        int tcstatus;
@@ -781,7 +749,7 @@ void smtc_send_ipi(int cpu, int type, unsigned int action)
 /*
  * Send IPI message to Halted TC, TargTC/TargVPE already having been set
  */
-void post_direct_ipi(int cpu, struct smtc_ipi *pipi)
+static void post_direct_ipi(int cpu, struct smtc_ipi *pipi)
 {
        struct pt_regs *kstack;
        unsigned long tcstatus;
@@ -921,7 +889,7 @@ void smtc_timer_broadcast(int vpe)
  * interrupts.
  */
 
-static int cpu_ipi_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_IRQ;
+static int cpu_ipi_irq = MIPS_CPU_IRQ_BASE + MIPS_CPU_IPI_IRQ;
 
 static irqreturn_t ipi_interrupt(int irq, void *dev_idm)
 {
@@ -1000,7 +968,7 @@ static void ipi_irq_dispatch(void)
 
 static struct irqaction irq_ipi;
 
-void setup_cross_vpe_interrupts(void)
+static void setup_cross_vpe_interrupts(void)
 {
        if (!cpu_has_vint)
                panic("SMTC Kernel requires Vectored Interupt support");
@@ -1191,7 +1159,7 @@ void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu)
         * It would be nice to be able to use a spinlock here,
         * but this is invoked from within TLB flush routines
         * that protect themselves with DVPE, so if a lock is
-         * held by another TC, it'll never be freed.
+        * held by another TC, it'll never be freed.
         *
         * DVPE/DMT must not be done with interrupts enabled,
         * so even so most callers will already have disabled
@@ -1296,7 +1264,7 @@ void smtc_flush_tlb_asid(unsigned long asid)
  * Support for single-threading cache flush operations.
  */
 
-int halt_state_save[NR_CPUS];
+static int halt_state_save[NR_CPUS];
 
 /*
  * To really, really be sure that nothing is being done
index 6c2406a93f2b99f1912d48d94788c5b65ebe2279..93a148486f88893a7464c51bfd16f3c93474444f 100644 (file)
@@ -669,7 +669,7 @@ asmlinkage int irix_mount(char __user *dev_name, char __user *dir_name,
 
 struct irix_statfs {
        short f_type;
-        long  f_bsize, f_frsize, f_blocks, f_bfree, f_files, f_ffree;
+       long  f_bsize, f_frsize, f_blocks, f_bfree, f_files, f_ffree;
        char  f_fname[6], f_fpack[6];
 };
 
@@ -959,7 +959,7 @@ static inline loff_t llseek(struct file *file, loff_t offset, int origin)
 
        fn = default_llseek;
        if (file->f_op && file->f_op->llseek)
-        fn = file->f_op->llseek;
+       fn = file->f_op->llseek;
        lock_kernel();
        retval = fn(file, offset, origin);
        unlock_kernel();
index 458fccf87c54ec436adb6bc9fb43c3bc84fbef32..459624969c99739d24b90aee8ca8bcdb6f52bd53 100644 (file)
@@ -522,7 +522,7 @@ static int (*reloc_handlers[]) (struct module *me, uint32_t *location,
 };
 
 static char *rstrs[] = {
-       [R_MIPS_NONE]   = "MIPS_NONE",
+       [R_MIPS_NONE]   = "MIPS_NONE",
        [R_MIPS_32]     = "MIPS_32",
        [R_MIPS_26]     = "MIPS_26",
        [R_MIPS_HI16]   = "MIPS_HI16",
@@ -695,7 +695,7 @@ static void dump_tclist(void)
 }
 
 /* We are prepared so configure and start the VPE... */
-int vpe_run(struct vpe * v)
+static int vpe_run(struct vpe * v)
 {
        struct vpe_notifications *n;
        unsigned long val, dmt_flag;
@@ -713,16 +713,16 @@ int vpe_run(struct vpe * v)
        dvpe();
 
        if (!list_empty(&v->tc)) {
-                if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) {
-                        printk(KERN_WARNING "VPE loader: TC %d is already in use.\n",
-                               t->index);
-                        return -ENOEXEC;
-                }
-        } else {
-                printk(KERN_WARNING "VPE loader: No TC's associated with VPE %d\n",
-                       v->minor);
-                return -ENOEXEC;
-        }
+               if ((t = list_entry(v->tc.next, struct tc, tc)) == NULL) {
+                       printk(KERN_WARNING "VPE loader: TC %d is already in use.\n",
+                              t->index);
+                       return -ENOEXEC;
+               }
+       } else {
+               printk(KERN_WARNING "VPE loader: No TC's associated with VPE %d\n",
+                      v->minor);
+               return -ENOEXEC;
+       }
 
        /* Put MVPE's into 'configuration state' */
        set_c0_mvpcontrol(MVPCONTROL_VPC);
@@ -775,14 +775,14 @@ int vpe_run(struct vpe * v)
 
        back_to_back_c0_hazard();
 
-        /* Set up the XTC bit in vpeconf0 to point at our tc */
-        write_vpe_c0_vpeconf0( (read_vpe_c0_vpeconf0() & ~(VPECONF0_XTC))
-                               | (t->index << VPECONF0_XTC_SHIFT));
+       /* Set up the XTC bit in vpeconf0 to point at our tc */
+       write_vpe_c0_vpeconf0( (read_vpe_c0_vpeconf0() & ~(VPECONF0_XTC))
+                             | (t->index << VPECONF0_XTC_SHIFT));
 
        back_to_back_c0_hazard();
 
-        /* enable this VPE */
-        write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_VPA);
+       /* enable this VPE */
+       write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | VPECONF0_VPA);
 
        /* clear out any left overs from a previous program */
        write_vpe_c0_status(0);
@@ -832,7 +832,7 @@ static int find_vpe_symbols(struct vpe * v, Elf_Shdr * sechdrs,
  * contents of the program (p)buffer performing relocatations/etc, free's it
  * when finished.
  */
-int vpe_elfload(struct vpe * v)
+static int vpe_elfload(struct vpe * v)
 {
        Elf_Ehdr *hdr;
        Elf_Shdr *sechdrs;
index 2affa5ff171c763e76067f96b2c7925a82b4e47d..9a622b9a105161bddcd068c3c9eedc55a25c8da6 100644 (file)
@@ -45,7 +45,7 @@ void enable_lasat_irq(unsigned int irq_nr)
 }
 
 static struct irq_chip lasat_irq_type = {
-       .typename = "Lasat",
+       .name = "Lasat",
        .ack = disable_lasat_irq,
        .mask = disable_lasat_irq,
        .mask_ack = disable_lasat_irq,
index 88c7ab871ec44bbe0c4f7dae9a92ca5c58b36da7..d47692f73a26ee0f619428526eb45535f631ab3e 100644 (file)
@@ -132,9 +132,8 @@ void __init prom_init(void)
        add_memory_region(0, lasat_board_info.li_memsize, BOOT_MEM_RAM);
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 const char *get_system_type(void)
index dcd4d2ed2ac45737e148cfd3a5d74460f5ff1cac..2036cf5e6857fe924e3bd934b9a01535afacdec5 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for MIPS-specific library files..
 #
 
-lib-y  += memset.o watch.o
+lib-y  += watch.o
 
 obj-$(CONFIG_CPU_MIPS32)       += dump_tlb.o
 obj-$(CONFIG_CPU_MIPS64)       += dump_tlb.o
index dcd4d2ed2ac45737e148cfd3a5d74460f5ff1cac..2036cf5e6857fe924e3bd934b9a01535afacdec5 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for MIPS-specific library files..
 #
 
-lib-y  += memset.o watch.o
+lib-y  += watch.o
 
 obj-$(CONFIG_CPU_MIPS32)       += dump_tlb.o
 obj-$(CONFIG_CPU_MIPS64)       += dump_tlb.o
diff --git a/arch/mips/lib-64/memset.S b/arch/mips/lib-64/memset.S
deleted file mode 100644 (file)
index e2c42c8..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1998, 1999, 2000 by Ralf Baechle
- * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
- */
-#include <asm/asm.h>
-#include <asm/asm-offsets.h>
-#include <asm/regdef.h>
-
-#define EX(insn,reg,addr,handler)                      \
-9:     insn    reg, addr;                              \
-       .section __ex_table,"a";                        \
-       PTR     9b, handler;                            \
-       .previous
-
-       .macro  f_fill64 dst, offset, val, fixup
-       EX(LONG_S, \val, (\offset +  0 * LONGSIZE)(\dst), \fixup)
-       EX(LONG_S, \val, (\offset +  1 * LONGSIZE)(\dst), \fixup)
-       EX(LONG_S, \val, (\offset +  2 * LONGSIZE)(\dst), \fixup)
-       EX(LONG_S, \val, (\offset +  3 * LONGSIZE)(\dst), \fixup)
-       EX(LONG_S, \val, (\offset +  4 * LONGSIZE)(\dst), \fixup)
-       EX(LONG_S, \val, (\offset +  5 * LONGSIZE)(\dst), \fixup)
-       EX(LONG_S, \val, (\offset +  6 * LONGSIZE)(\dst), \fixup)
-       EX(LONG_S, \val, (\offset +  7 * LONGSIZE)(\dst), \fixup)
-       .endm
-
-/*
- * memset(void *s, int c, size_t n)
- *
- * a0: start of area to clear
- * a1: char to fill with
- * a2: size of area to clear
- */
-       .set    noreorder
-       .align  5
-LEAF(memset)
-       beqz            a1, 1f
-        move           v0, a0                  /* result */
-
-       andi            a1, 0xff                /* spread fillword */
-       dsll            t1, a1, 8
-       or              a1, t1
-       dsll            t1, a1, 16
-       or              a1, t1
-       dsll            t1, a1, 32
-       or              a1, t1
-1:
-
-FEXPORT(__bzero)
-       sltiu           t0, a2, LONGSIZE        /* very small region? */
-       bnez            t0, small_memset
-        andi           t0, a0, LONGMASK        /* aligned? */
-
-       beqz            t0, 1f
-        PTR_SUBU       t0, LONGSIZE            /* alignment in bytes */
-
-#ifdef __MIPSEB__
-       EX(sdl, a1, (a0), first_fixup)          /* make dword aligned */
-#endif
-#ifdef __MIPSEL__
-       EX(sdr, a1, (a0), first_fixup)          /* make dword aligned */
-#endif
-       PTR_SUBU        a0, t0                  /* long align ptr */
-       PTR_ADDU        a2, t0                  /* correct size */
-
-1:     ori             t1, a2, 0x3f            /* # of full blocks */
-       xori            t1, 0x3f
-       beqz            t1, memset_partial      /* no block to fill */
-        andi           t0, a2, 0x38
-
-       PTR_ADDU        t1, a0                  /* end address */
-       .set            reorder
-1:     PTR_ADDIU       a0, 64
-       f_fill64 a0, -64, a1, fwd_fixup
-       bne             t1, a0, 1b
-       .set            noreorder
-
-memset_partial:
-       PTR_LA          t1, 2f                  /* where to start */
-       .set            noat
-       dsrl            AT, t0, 1
-       PTR_SUBU        t1, AT
-       .set            noat
-       jr              t1
-        PTR_ADDU       a0, t0                  /* dest ptr */
-
-       .set            push
-       .set            noreorder
-       .set            nomacro
-       f_fill64 a0, -64, a1, partial_fixup     /* ... but first do longs ... */
-2:     .set            pop
-       andi            a2, LONGMASK            /* At most one long to go */
-
-       beqz            a2, 1f
-        PTR_ADDU       a0, a2                  /* What's left */
-#ifdef __MIPSEB__
-       EX(sdr, a1, -1(a0), last_fixup)
-#endif
-#ifdef __MIPSEL__
-       EX(sdl, a1, -1(a0), last_fixup)
-#endif
-1:     jr              ra
-        move           a2, zero
-
-small_memset:
-       beqz            a2, 2f
-        PTR_ADDU       t1, a0, a2
-
-1:     PTR_ADDIU       a0, 1                   /* fill bytewise */
-       bne             t1, a0, 1b
-        sb             a1, -1(a0)
-
-2:     jr              ra                      /* done */
-        move           a2, zero
-       END(memset)
-
-first_fixup:
-       jr      ra
-        nop
-
-fwd_fixup:
-       PTR_L           t0, TI_TASK($28)
-       LONG_L          t0, THREAD_BUADDR(t0)
-       andi            a2, 0x3f
-       LONG_ADDU       a2, t1
-       jr              ra
-        LONG_SUBU      a2, t0
-
-partial_fixup:
-       PTR_L           t0, TI_TASK($28)
-       LONG_L          t0, THREAD_BUADDR(t0)
-       andi            a2, LONGMASK
-       LONG_ADDU       a2, t1
-       jr              ra
-        LONG_SUBU      a2, t0
-
-last_fixup:
-       jr              ra
-        andi           v1, a2, LONGMASK
index 989c900b8b14a5f4b3b1422552044fcd9ac24f52..5ad501b30b430f387f219c575d4f7fbe9c8c517e 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for MIPS-specific library files..
 #
 
-lib-y  += csum_partial.o memcpy.o promlib.o \
+lib-y  += csum_partial.o memcpy.o memset.o promlib.o \
           strlen_user.o strncpy_user.o strnlen_user.o uncached.o
 
 obj-y  += iomap.o
similarity index 85%
rename from arch/mips/lib-32/memset.S
rename to arch/mips/lib/memset.S
index 1981485bd48b7f34120d0a70aa1fb4dcc74e5d3c..3f8b8b3d0b23575139ba263fb22a19eb301544f1 100644 (file)
 #include <asm/asm-offsets.h>
 #include <asm/regdef.h>
 
+#if LONGSIZE == 4
+#define LONG_S_L swl
+#define LONG_S_R swr
+#else
+#define LONG_S_L sdl
+#define LONG_S_R sdr
+#endif
+
 #define EX(insn,reg,addr,handler)                      \
 9:     insn    reg, addr;                              \
        .section __ex_table,"a";                        \
@@ -25,6 +33,7 @@
        EX(LONG_S, \val, (\offset +  5 * LONGSIZE)(\dst), \fixup)
        EX(LONG_S, \val, (\offset +  6 * LONGSIZE)(\dst), \fixup)
        EX(LONG_S, \val, (\offset +  7 * LONGSIZE)(\dst), \fixup)
+#if LONGSIZE == 4
        EX(LONG_S, \val, (\offset +  8 * LONGSIZE)(\dst), \fixup)
        EX(LONG_S, \val, (\offset +  9 * LONGSIZE)(\dst), \fixup)
        EX(LONG_S, \val, (\offset + 10 * LONGSIZE)(\dst), \fixup)
@@ -33,6 +42,7 @@
        EX(LONG_S, \val, (\offset + 13 * LONGSIZE)(\dst), \fixup)
        EX(LONG_S, \val, (\offset + 14 * LONGSIZE)(\dst), \fixup)
        EX(LONG_S, \val, (\offset + 15 * LONGSIZE)(\dst), \fixup)
+#endif
        .endm
 
 /*
@@ -49,9 +59,13 @@ LEAF(memset)
         move           v0, a0                  /* result */
 
        andi            a1, 0xff                /* spread fillword */
-       sll             t1, a1, 8
+       LONG_SLL                t1, a1, 8
        or              a1, t1
-       sll             t1, a1, 16
+       LONG_SLL                t1, a1, 16
+#if LONGSIZE == 8
+       or              a1, t1
+       LONG_SLL                t1, a1, 32
+#endif
        or              a1, t1
 1:
 
@@ -64,10 +78,10 @@ FEXPORT(__bzero)
         PTR_SUBU       t0, LONGSIZE            /* alignment in bytes */
 
 #ifdef __MIPSEB__
-       EX(swl, a1, (a0), first_fixup)          /* make word aligned */
+       EX(LONG_S_L, a1, (a0), first_fixup)     /* make word/dword aligned */
 #endif
 #ifdef __MIPSEL__
-       EX(swr, a1, (a0), first_fixup)          /* make word aligned */
+       EX(LONG_S_R, a1, (a0), first_fixup)     /* make word/dword aligned */
 #endif
        PTR_SUBU        a0, t0                  /* long align ptr */
        PTR_ADDU        a2, t0                  /* correct size */
@@ -75,7 +89,7 @@ FEXPORT(__bzero)
 1:     ori             t1, a2, 0x3f            /* # of full blocks */
        xori            t1, 0x3f
        beqz            t1, memset_partial      /* no block to fill */
-        andi           t0, a2, 0x3c
+        andi           t0, a2, 0x40-LONGSIZE
 
        PTR_ADDU        t1, a0                  /* end address */
        .set            reorder
@@ -86,7 +100,14 @@ FEXPORT(__bzero)
 
 memset_partial:
        PTR_LA          t1, 2f                  /* where to start */
+#if LONGSIZE == 4
        PTR_SUBU        t1, t0
+#else
+       .set            noat
+       LONG_SRL                AT, t0, 1
+       PTR_SUBU        t1, AT
+       .set            noat
+#endif
        jr              t1
         PTR_ADDU       a0, t0                  /* dest ptr */
 
@@ -100,10 +121,10 @@ memset_partial:
        beqz            a2, 1f
         PTR_ADDU       a0, a2                  /* What's left */
 #ifdef __MIPSEB__
-       EX(swr, a1, -1(a0), last_fixup)
+       EX(LONG_S_R, a1, -1(a0), last_fixup)
 #endif
 #ifdef __MIPSEL__
-       EX(swl, a1, -1(a0), last_fixup)
+       EX(LONG_S_L, a1, -1(a0), last_fixup)
 #endif
 1:     jr              ra
         move           a2, zero
index 98ce89f8068b9aa5c8ef6bbbf56cf42c9bca39a9..2388f7f3ffde9c2bffd45744f9f8adaacfd10048 100644 (file)
@@ -44,20 +44,24 @@ unsigned long __init run_uncached(void *func)
 
        if (sp >= (long)CKSEG0 && sp < (long)CKSEG2)
                usp = CKSEG1ADDR(sp);
+#ifdef CONFIG_64BIT
        else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
                 (long long)sp < (long long)PHYS_TO_XKPHYS(8LL, 0))
                usp = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
                                     XKPHYS_TO_PHYS((long long)sp));
+#endif
        else {
                BUG();
                usp = sp;
        }
        if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2)
                ufunc = CKSEG1ADDR(lfunc);
+#ifdef CONFIG_64BIT
        else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
                 (long long)lfunc < (long long)PHYS_TO_XKPHYS(8LL, 0))
                ufunc = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
                                       XKPHYS_TO_PHYS((long long)lfunc));
+#endif
        else {
                BUG();
                ufunc = lfunc;
index 43dba6ce6603be07de661fd6d80319b1bb5dc2fb..dfa0acbd7fc2b79eeee0bbd6dfefb29e9456592a 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
+#include <linux/kernel.h>
 
 #include <asm/gdb-stub.h>
 #include <asm/io.h>
@@ -69,7 +70,7 @@ static void end_atlas_irq(unsigned int irq)
 }
 
 static struct irq_chip atlas_irq_type = {
-       .typename = "Atlas",
+       .name = "Atlas",
        .ack = disable_atlas_irq,
        .mask = disable_atlas_irq,
        .mask_ack = disable_atlas_irq,
@@ -220,7 +221,7 @@ msc_irqmap_t __initdata msc_irqmap[] = {
        {MSC01C_INT_TMR,                MSC01_IRQ_EDGE, 0},
        {MSC01C_INT_PCI,                MSC01_IRQ_LEVEL, 0},
 };
-int __initdata msc_nr_irqs = sizeof(msc_irqmap) / sizeof(*msc_irqmap);
+int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap);
 
 msc_irqmap_t __initdata msc_eicirqmap[] = {
        {MSC01E_INT_SW0,                MSC01_IRQ_LEVEL, 0},
@@ -231,14 +232,14 @@ msc_irqmap_t __initdata msc_eicirqmap[] = {
        {MSC01E_INT_PERFCTR,            MSC01_IRQ_LEVEL, 0},
        {MSC01E_INT_CPUCTR,             MSC01_IRQ_LEVEL, 0}
 };
-int __initdata msc_nr_eicirqs = sizeof(msc_eicirqmap) / sizeof(*msc_eicirqmap);
+int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
 
 void __init arch_init_irq(void)
 {
        init_atlas_irqs(ATLAS_INT_BASE);
 
        if (!cpu_has_veic)
-               mips_cpu_irq_init(MIPSCPU_INT_BASE);
+               mips_cpu_irq_init();
 
        switch(mips_revision_corid) {
        case MIPS_REVISION_CORID_CORE_MSC:
index eeed944e0f83eb9c0ba5c1b09ad3b760feaa040f..ebf0e16c5a0de5c36ff4c63016f42a9dbaf95328 100644 (file)
@@ -166,9 +166,8 @@ void __init prom_meminit(void)
        }
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       unsigned long freed = 0;
        unsigned long addr;
        int i;
 
@@ -176,17 +175,8 @@ unsigned long __init prom_free_prom_memory(void)
                if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
                        continue;
 
-               addr = PAGE_ALIGN(boot_mem_map.map[i].addr);
-               while (addr < boot_mem_map.map[i].addr
-                             + boot_mem_map.map[i].size) {
-                       ClearPageReserved(virt_to_page(__va(addr)));
-                       init_page_count(virt_to_page(__va(addr)));
-                       free_page((unsigned long)__va(addr));
-                       addr += PAGE_SIZE;
-                       freed += PAGE_SIZE;
-               }
+               addr = boot_mem_map.map[i].addr;
+               free_init_pages("prom memory",
+                               addr, addr + boot_mem_map.map[i].size);
        }
-       printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
-
-       return freed;
 }
index 90ad5bf3e2f175c8dd3c5ab055860ae988c3fdb2..3c206bb171602ff3ce331586ee63a11fc7319825 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
+#include <linux/kernel.h>
 #include <linux/random.h>
 
 #include <asm/i8259.h>
@@ -289,7 +290,7 @@ msc_irqmap_t __initdata msc_irqmap[] = {
        {MSC01C_INT_TMR,                MSC01_IRQ_EDGE, 0},
        {MSC01C_INT_PCI,                MSC01_IRQ_LEVEL, 0},
 };
-int __initdata msc_nr_irqs = sizeof(msc_irqmap)/sizeof(msc_irqmap_t);
+int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap);
 
 msc_irqmap_t __initdata msc_eicirqmap[] = {
        {MSC01E_INT_SW0,                MSC01_IRQ_LEVEL, 0},
@@ -303,14 +304,14 @@ msc_irqmap_t __initdata msc_eicirqmap[] = {
        {MSC01E_INT_PERFCTR,            MSC01_IRQ_LEVEL, 0},
        {MSC01E_INT_CPUCTR,             MSC01_IRQ_LEVEL, 0}
 };
-int __initdata msc_nr_eicirqs = sizeof(msc_eicirqmap)/sizeof(msc_irqmap_t);
+int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap);
 
 void __init arch_init_irq(void)
 {
        init_i8259_irqs();
 
        if (!cpu_has_veic)
-               mips_cpu_irq_init (MIPSCPU_INT_BASE);
+               mips_cpu_irq_init();
 
         switch(mips_revision_corid) {
         case MIPS_REVISION_CORID_CORE_MSC:
index 874ccb0066b8aa7b6266ee8e377d16671d987408..c4b9de3a7f27ba922c3eda8e9f1a8713e5dc8f90 100644 (file)
@@ -113,5 +113,5 @@ asmlinkage void plat_irq_dispatch(void)
 
 void __init arch_init_irq(void)
 {
-       mips_cpu_irq_init(MIPSCPU_INT_BASE);
+       mips_cpu_irq_init();
 }
index 2ce449dce6f2401b7bb47542e6a5b8b8f31ff4a5..15ac0655c1ff49f59bf79564139e6ee32a182ddd 100644 (file)
@@ -21,9 +21,7 @@
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <asm/mips-boards/simint.h>
-
-
-extern void mips_cpu_irq_init(int);
+#include <asm/irq_cpu.h>
 
 static inline int clz(unsigned long x)
 {
@@ -86,5 +84,5 @@ asmlinkage void plat_irq_dispatch(void)
 
 void __init arch_init_irq(void)
 {
-       mips_cpu_irq_init(MIPSCPU_INT_BASE);
+       mips_cpu_irq_init();
 }
index f7ce769833283b38c6af2ecc8c3c24dd1db6c352..46bc16f8b15d3fe4d50e3a9ab989a17f3e440114 100644 (file)
@@ -99,10 +99,9 @@ void __init prom_meminit(void)
        }
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
        int i;
-       unsigned long freed = 0;
        unsigned long addr;
 
        for (i = 0; i < boot_mem_map.nr_map; i++) {
@@ -110,16 +109,7 @@ unsigned long __init prom_free_prom_memory(void)
                        continue;
 
                addr = boot_mem_map.map[i].addr;
-               while (addr < boot_mem_map.map[i].addr
-                             + boot_mem_map.map[i].size) {
-                       ClearPageReserved(virt_to_page(__va(addr)));
-                       init_page_count(virt_to_page(__va(addr)));
-                       free_page((unsigned long)__va(addr));
-                       addr += PAGE_SIZE;
-                       freed += PAGE_SIZE;
-               }
+               free_init_pages("prom memory",
+                               addr, addr + boot_mem_map.map[i].size);
        }
-       printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
-
-       return freed;
 }
index 49065c133ebf4987d7f48666e90b0bac3076308c..125a4a85ec055988fad25f5ead85a48afd66e34c 100644 (file)
@@ -341,7 +341,6 @@ static int __init page_is_ram(unsigned long pagenr)
 void __init paging_init(void)
 {
        unsigned long zones_size[MAX_NR_ZONES] = { 0, };
-       unsigned long max_dma, low;
 #ifndef CONFIG_FLATMEM
        unsigned long zholes_size[MAX_NR_ZONES] = { 0, };
        unsigned long i, j, pfn;
@@ -354,19 +353,19 @@ void __init paging_init(void)
 #endif
        kmap_coherent_init();
 
-       max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
-       low = max_low_pfn;
-
 #ifdef CONFIG_ISA
-       if (low < max_dma)
-               zones_size[ZONE_DMA] = low;
-       else {
-               zones_size[ZONE_DMA] = max_dma;
-               zones_size[ZONE_NORMAL] = low - max_dma;
-       }
-#else
-       zones_size[ZONE_DMA] = low;
+       if (max_low_pfn >= MAX_DMA_PFN)
+               if (min_low_pfn >= MAX_DMA_PFN) {
+                       zones_size[ZONE_DMA] = 0;
+                       zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
+               } else {
+                       zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
+                       zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
+               }
+       else
 #endif
+       zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
+
 #ifdef CONFIG_HIGHMEM
        zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;
 
@@ -467,7 +466,7 @@ void __init mem_init(void)
 }
 #endif /* !CONFIG_NEED_MULTIPLE_NODES */
 
-static void free_init_pages(char *what, unsigned long begin, unsigned long end)
+void free_init_pages(const char *what, unsigned long begin, unsigned long end)
 {
        unsigned long pfn;
 
@@ -493,18 +492,25 @@ void free_initrd_mem(unsigned long start, unsigned long end)
 }
 #endif
 
-extern unsigned long prom_free_prom_memory(void);
-
 void free_initmem(void)
 {
-       unsigned long freed;
-
-       freed = prom_free_prom_memory();
-       if (freed)
-               printk(KERN_INFO "Freeing firmware memory: %ldkb freed\n",
-                      freed >> 10);
-
+       prom_free_prom_memory();
        free_init_pages("unused kernel memory",
                        __pa_symbol(&__init_begin),
                        __pa_symbol(&__init_end));
 }
+
+unsigned long pgd_current[NR_CPUS];
+/*
+ * On 64-bit we've got three-level pagetables with a slightly
+ * different layout ...
+ */
+#define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order)))
+pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
+#ifdef CONFIG_64BIT
+#ifdef MODULE_START
+pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);
+#endif
+pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER);
+#endif
+pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER);
index 67372f3f9654a3105e0b9d041d6c2650f848e240..2e8cebd49bc0b267c6edf6129c4f9ead814c98e3 100644 (file)
@@ -6,7 +6,7 @@
 # unless it's something special (ie not a .c file).
 #
 
-obj-y += irq.o prom.o reset.o setup.o
+obj-y += irq.o platform.o prom.o reset.o setup.o
 
 obj-$(CONFIG_SERIAL_8250_CONSOLE) += ja-console.o
 obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o
index 2efb25aa1aed10363fde84e3e5bb9a4c4bfd1476..f2b432585df245a70c84dddde8097e403ef137c6 100644 (file)
@@ -82,8 +82,8 @@ void __init arch_init_irq(void)
         */
        clear_c0_status(ST0_IM);
 
-       mips_cpu_irq_init(0);
-       rm7k_cpu_irq_init(8);
+       mips_cpu_irq_init();
+       rm7k_cpu_irq_init();
 
        /* set up the cascading interrupts */
        setup_irq(8, &cascade_mv64340);
index 6978654c712b80e8d1e85bcf7067eaa91c0b020d..022f6974b76eb505c369cf58eb246f99fa0e753a 100644 (file)
@@ -46,7 +46,9 @@
 
 extern unsigned long ja_fpga_base;
 
-#define JAGUAR_FPGA_WRITE(x,y) writeb(x, ja_fpga_base + JAGUAR_ATX_REG_##y)
-#define JAGUAR_FPGA_READ(x) readb(ja_fpga_base + JAGUAR_ATX_REG_##x)
+#define __FPGA_REG_TO_ADDR(reg)                                                \
+       ((void *) ja_fpga_base + JAGUAR_ATX_REG_##reg)
+#define JAGUAR_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
+#define JAGUAR_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
 
 #endif
diff --git a/arch/mips/momentum/jaguar_atx/platform.c b/arch/mips/momentum/jaguar_atx/platform.c
new file mode 100644 (file)
index 0000000..035ea51
--- /dev/null
@@ -0,0 +1,235 @@
+#include <linux/delay.h>
+#include <linux/if_ether.h>
+#include <linux/ioport.h>
+#include <linux/mv643xx.h>
+#include <linux/platform_device.h>
+
+#include "jaguar_atx_fpga.h"
+
+#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
+
+static struct resource mv643xx_eth_shared_resources[] = {
+       [0] = {
+               .name   = "ethernet shared base",
+               .start  = 0xf1000000 + MV643XX_ETH_SHARED_REGS,
+               .end    = 0xf1000000 + MV643XX_ETH_SHARED_REGS +
+                                      MV643XX_ETH_SHARED_REGS_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device mv643xx_eth_shared_device = {
+       .name           = MV643XX_ETH_SHARED_NAME,
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(mv643xx_eth_shared_resources),
+       .resource       = mv643xx_eth_shared_resources,
+};
+
+#define MV_SRAM_BASE                   0xfe000000UL
+#define MV_SRAM_SIZE                   (256 * 1024)
+
+#define MV_SRAM_RXRING_SIZE            (MV_SRAM_SIZE / 4)
+#define MV_SRAM_TXRING_SIZE            (MV_SRAM_SIZE / 4)
+
+#define MV_SRAM_BASE_ETH0              MV_SRAM_BASE
+#define MV_SRAM_BASE_ETH1              (MV_SRAM_BASE + (MV_SRAM_SIZE / 2))
+
+#define MV64x60_IRQ_ETH_0 48
+#define MV64x60_IRQ_ETH_1 49
+#define MV64x60_IRQ_ETH_2 50
+
+#ifdef CONFIG_MV643XX_ETH_0
+
+static struct resource mv64x60_eth0_resources[] = {
+       [0] = {
+               .name   = "eth0 irq",
+               .start  = MV64x60_IRQ_ETH_0,
+               .end    = MV64x60_IRQ_ETH_0,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static char eth0_mac_addr[ETH_ALEN];
+
+static struct mv643xx_eth_platform_data eth0_pd = {
+       .mac_addr       = eth0_mac_addr,
+
+       .tx_sram_addr   = MV_SRAM_BASE_ETH0,
+       .tx_sram_size   = MV_SRAM_TXRING_SIZE,
+       .tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
+
+       .rx_sram_addr   = MV_SRAM_BASE_ETH0 + MV_SRAM_TXRING_SIZE,
+       .rx_sram_size   = MV_SRAM_RXRING_SIZE,
+       .rx_queue_size  = MV_SRAM_RXRING_SIZE / 16,
+};
+
+static struct platform_device eth0_device = {
+       .name           = MV643XX_ETH_NAME,
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(mv64x60_eth0_resources),
+       .resource       = mv64x60_eth0_resources,
+       .dev = {
+               .platform_data = &eth0_pd,
+       },
+};
+#endif /* CONFIG_MV643XX_ETH_0 */
+
+#ifdef CONFIG_MV643XX_ETH_1
+
+static struct resource mv64x60_eth1_resources[] = {
+       [0] = {
+               .name   = "eth1 irq",
+               .start  = MV64x60_IRQ_ETH_1,
+               .end    = MV64x60_IRQ_ETH_1,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static char eth1_mac_addr[ETH_ALEN];
+
+static struct mv643xx_eth_platform_data eth1_pd = {
+       .mac_addr       = eth1_mac_addr,
+
+       .tx_sram_addr   = MV_SRAM_BASE_ETH1,
+       .tx_sram_size   = MV_SRAM_TXRING_SIZE,
+       .tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
+
+       .rx_sram_addr   = MV_SRAM_BASE_ETH1 + MV_SRAM_TXRING_SIZE,
+       .rx_sram_size   = MV_SRAM_RXRING_SIZE,
+       .rx_queue_size  = MV_SRAM_RXRING_SIZE / 16,
+};
+
+static struct platform_device eth1_device = {
+       .name           = MV643XX_ETH_NAME,
+       .id             = 1,
+       .num_resources  = ARRAY_SIZE(mv64x60_eth1_resources),
+       .resource       = mv64x60_eth1_resources,
+       .dev = {
+               .platform_data = &eth1_pd,
+       },
+};
+#endif /* CONFIG_MV643XX_ETH_1 */
+
+#ifdef CONFIG_MV643XX_ETH_2
+
+static struct resource mv64x60_eth2_resources[] = {
+       [0] = {
+               .name   = "eth2 irq",
+               .start  = MV64x60_IRQ_ETH_2,
+               .end    = MV64x60_IRQ_ETH_2,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static char eth2_mac_addr[ETH_ALEN];
+
+static struct mv643xx_eth_platform_data eth2_pd = {
+       .mac_addr       = eth2_mac_addr,
+};
+
+static struct platform_device eth2_device = {
+       .name           = MV643XX_ETH_NAME,
+       .id             = 1,
+       .num_resources  = ARRAY_SIZE(mv64x60_eth2_resources),
+       .resource       = mv64x60_eth2_resources,
+       .dev = {
+               .platform_data = &eth2_pd,
+       },
+};
+#endif /* CONFIG_MV643XX_ETH_2 */
+
+static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
+       &mv643xx_eth_shared_device,
+#ifdef CONFIG_MV643XX_ETH_0
+       &eth0_device,
+#endif
+#ifdef CONFIG_MV643XX_ETH_1
+       &eth1_device,
+#endif
+#ifdef CONFIG_MV643XX_ETH_2
+       &eth2_device,
+#endif
+};
+
+static u8 __init exchange_bit(u8 val, u8 cs)
+{
+       /* place the data */
+       JAGUAR_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
+       udelay(1);
+
+       /* turn the clock on */
+       JAGUAR_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
+       udelay(1);
+
+       /* turn the clock off and read-strobe */
+       JAGUAR_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
+
+       /* return the data */
+       return (JAGUAR_FPGA_READ(EEPROM_MODE) >> 3) & 0x1;
+}
+
+static void __init get_mac(char dest[6])
+{
+       u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+       int i,j;
+
+       for (i = 0; i < 12; i++)
+               exchange_bit(read_opcode[i], 1);
+
+       for (j = 0; j < 6; j++) {
+               dest[j] = 0;
+               for (i = 0; i < 8; i++) {
+                       dest[j] <<= 1;
+                       dest[j] |= exchange_bit(0, 1);
+               }
+       }
+
+       /* turn off CS */
+       exchange_bit(0,0);
+}
+
+/*
+ * Copy and increment ethernet MAC address by a small value.
+ *
+ * This is useful for systems where the only one MAC address is stored in
+ * non-volatile memory for multiple ports.
+ */
+static inline void eth_mac_add(unsigned char *dst, unsigned char *src,
+       unsigned int add)
+{
+       int i;
+
+       BUG_ON(add >= 256);
+
+       for (i = ETH_ALEN; i >= 0; i--) {
+               dst[i] = src[i] + add;
+               add = dst[i] < src[i];          /* compute carry */
+       }
+
+       WARN_ON(add);
+}
+
+static int __init mv643xx_eth_add_pds(void)
+{
+       unsigned char mac[ETH_ALEN];
+       int ret;
+
+       get_mac(mac);
+#ifdef CONFIG_MV643XX_ETH_0
+       eth_mac_add(eth1_mac_addr, mac, 0);
+#endif
+#ifdef CONFIG_MV643XX_ETH_1
+       eth_mac_add(eth1_mac_addr, mac, 1);
+#endif
+#ifdef CONFIG_MV643XX_ETH_2
+       eth_mac_add(eth2_mac_addr, mac, 2);
+#endif
+       ret = platform_add_devices(mv643xx_eth_pd_devs,
+                       ARRAY_SIZE(mv643xx_eth_pd_devs));
+
+       return ret;
+}
+
+device_initcall(mv643xx_eth_add_pds);
+
+#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */
index 3d2712929293e4de845fd36979eacaf0cf53df80..5dd154ee58f68306e666aee3fcb5b8e92847e63a 100644 (file)
@@ -39,56 +39,6 @@ const char *get_system_type(void)
        return "Momentum Jaguar-ATX";
 }
 
-#ifdef CONFIG_MV643XX_ETH
-extern unsigned char prom_mac_addr_base[6];
-
-static void burn_clocks(void)
-{
-       int i;
-
-       /* this loop should burn at least 1us -- this should be plenty */
-       for (i = 0; i < 0x10000; i++)
-               ;
-}
-
-static u8 exchange_bit(u8 val, u8 cs)
-{
-       /* place the data */
-       JAGUAR_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);
-       burn_clocks();
-
-       /* turn the clock on */
-       JAGUAR_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);
-       burn_clocks();
-
-       /* turn the clock off and read-strobe */
-       JAGUAR_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);
-
-       /* return the data */
-       return ((JAGUAR_FPGA_READ(EEPROM_MODE) >> 3) & 0x1);
-}
-
-void get_mac(char dest[6])
-{
-       u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-       int i,j;
-
-       for (i = 0; i < 12; i++)
-               exchange_bit(read_opcode[i], 1);
-
-       for (j = 0; j < 6; j++) {
-               dest[j] = 0;
-               for (i = 0; i < 8; i++) {
-                       dest[j] <<= 1;
-                       dest[j] |= exchange_bit(0, 1);
-               }
-       }
-
-       /* turn off CS */
-       exchange_bit(0,0);
-}
-#endif
-
 #ifdef CONFIG_64BIT
 
 unsigned long signext(unsigned long addr)
@@ -228,16 +178,10 @@ void __init prom_init(void)
 #endif /* CONFIG_64BIT */
        mips_machgroup = MACH_GROUP_MOMENCO;
        mips_machtype = MACH_MOMENCO_JAGUAR_ATX;
-
-#ifdef CONFIG_MV643XX_ETH
-       /* get the base MAC address for on-board ethernet ports */
-       get_mac(prom_mac_addr_base);
-#endif
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
index cea0e5deb80e78a38d95786f3b6a75e831715935..3862d1d1add443935dacfc62c768cf53e15240f2 100644 (file)
@@ -65,7 +65,7 @@ void __init arch_init_irq(void)
         */
        clear_c0_status(ST0_IM | ST0_BEV);
 
-       rm7k_cpu_irq_init(8);
+       rm7k_cpu_irq_init();
 
        /* set up the cascading interrupts */
        setup_irq(8, &cascade_mv64340);         /* unmask intControl IM8, IRQ 9 */
index 6ce9b7fdb824945e00d0b0c661fe783bd45a90fe..8e02df63578a6fd547fb0fd76c7626b4ecd418de 100644 (file)
@@ -180,9 +180,8 @@ void __init prom_init(void)
 #endif
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
index bb11fef08472b1b0b89a5d4ddb980ced32a3ac5a..186a140fd2a9af68e8302713b86bd6cff598c9a0 100644 (file)
@@ -84,7 +84,7 @@ void ll_cpci_irq(void)
 }
 
 struct irq_chip cpci_irq_type = {
-       .typename = "CPCI/FPGA",
+       .name = "CPCI/FPGA",
        .ack = mask_cpci_irq,
        .mask = mask_cpci_irq,
        .mask_ack = mask_cpci_irq,
index 2128684584f533a08b358793f5d45375b8f5e364..32d6fb4ee67955794547331adc8177e522d23784 100644 (file)
@@ -1,6 +1,4 @@
 
-#ifdef CONFIG_KGDB
-
 #include <asm/serial.h> /* For the serial port location and base baud */
 
 /* --- CONFIG --- */
@@ -121,5 +119,3 @@ int putDebugChar(uint8 byte)
        UART16550_WRITE(OFS_SEND_BUFFER, byte);
        return 1;
 }
-
-#endif
index ea65223a6d2c013a7d03252c5857b1f31b11325c..40472f7944d792cf3b69fbe72559db7cb5482108 100644 (file)
@@ -94,7 +94,7 @@ void __init arch_init_irq(void)
         */
        clear_c0_status(ST0_IM);
 
-       mips_cpu_irq_init(0);
+       mips_cpu_irq_init();
 
        /* set up the cascading interrupts */
        setup_irq(3, &cascade_fpga);
index d0b77e101d747cd0d0546de79746a523a9334d87..b689ceea8cfbf1b4244b61bd46321ac369184f92 100644 (file)
@@ -178,7 +178,6 @@ void __init prom_init(void)
 #endif
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
index a7a80c0da569653bb68169652e0c10a892b1d088..de1a31ee52f3458d166771457ef287a5eab16158 100644 (file)
@@ -77,7 +77,7 @@ void ll_uart_irq(void)
 }
 
 struct irq_chip uart_irq_type = {
-       .typename = "UART/FPGA",
+       .name = "UART/FPGA",
        .ack = mask_uart_irq,
        .mask = mask_uart_irq,
        .mask_ack = mask_uart_irq,
index 2128684584f533a08b358793f5d45375b8f5e364..32d6fb4ee67955794547331adc8177e522d23784 100644 (file)
@@ -1,6 +1,4 @@
 
-#ifdef CONFIG_KGDB
-
 #include <asm/serial.h> /* For the serial port location and base baud */
 
 /* --- CONFIG --- */
@@ -121,5 +119,3 @@ int putDebugChar(uint8 byte)
        UART16550_WRITE(OFS_SEND_BUFFER, byte);
        return 1;
 }
-
-#endif
index da46524e87cb50d4a8fe8a738231918096fce3b0..273541fe70871708d16f757e1f0b3b68f902973c 100644 (file)
@@ -94,8 +94,8 @@ void __init arch_init_irq(void)
        clear_c0_status(ST0_IM);
        local_irq_disable();
 
-       mips_cpu_irq_init(0);
-       rm7k_cpu_irq_init(8);
+       mips_cpu_irq_init();
+       rm7k_cpu_irq_init();
 
        gt64240_irq_init();
 }
index 2f75c6b91ec5211fc258a3b732232e4570864e65..836d0830720de9fa08043dc9f530e73a54e8e700 100644 (file)
@@ -79,7 +79,6 @@ void __init prom_init(void)
        }
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
index 55feaf798596fa1e0119f52bcd5f9831506fbb6e..ca395ef06d4e9514b82b4fdd41493199d7d1392f 100644 (file)
@@ -11,7 +11,7 @@ config PROFILING
 
 config OPROFILE
        tristate "OProfile system profiling (EXPERIMENTAL)"
-       depends on PROFILING && EXPERIMENTAL
+       depends on PROFILING && !!MIPS_MT_SMTC && EXPERIMENTAL
        help
          OProfile is a profiling system capable of profiling the
          whole system, include the kernel, kernel modules, libraries,
index 597b89764ba10e42a664a87e51d85bb367a30f09..a8d9d22b13dfffcd6178b151bf71d9ce2374478f 100644 (file)
  */
 #include <linux/init.h>
 #include <linux/pci.h>
+#include <linux/kernel.h>
 
 #include <asm/io.h>
+#include <asm/i8259.h>
 #include <asm/vr41xx/cmbvr4133.h>
 
 extern int vr4133_rockhopper;
@@ -142,7 +144,7 @@ int rockhopper_get_irq(struct pci_dev *dev, u8 pin, u8 slot)
        if (bus == NULL)
                return -1;
 
-       for (i = 0; i < sizeof (int_map) / sizeof (int_map[0]); i++) {
+       for (i = 0; i < ARRAY_SIZE(int_map); i++) {
                if (int_map[i].bus == bus->number && int_map[i].slot == slot) {
                        int line;
                        for (line = 0; line < 4; line++)
@@ -160,17 +162,7 @@ int rockhopper_get_irq(struct pci_dev *dev, u8 pin, u8 slot)
 #ifdef CONFIG_ROCKHOPPER
 void i8259_init(void)
 {
-       outb(0x11, 0x20);               /* Master ICW1 */
-       outb(I8259_IRQ_BASE, 0x21);     /* Master ICW2 */
-       outb(0x04, 0x21);               /* Master ICW3 */
-       outb(0x01, 0x21);               /* Master ICW4 */
-       outb(0xff, 0x21);               /* Master IMW */
-
-       outb(0x11, 0xa0);               /* Slave ICW1 */
-       outb(I8259_IRQ_BASE + 8, 0xa1); /* Slave ICW2 */
-       outb(0x02, 0xa1);               /* Slave ICW3 */
-       outb(0x01, 0xa1);               /* Slave ICW4 */
-       outb(0xff, 0xa1);               /* Slave IMW */
+       init_i8259_irqs();
 
        outb(0x00, 0x4d0);
        outb(0x02, 0x4d1);      /* USB IRQ9 is level */
index 2c36c108c4d62c7e0bff9029159e396a9089afa5..d48665ebd33c3249f7d865c01567a816acdf46fe 100644 (file)
@@ -159,7 +159,7 @@ int pnx8550_set_gic_priority(int irq, int priority)
 }
 
 static struct irq_chip level_irq_type = {
-       .typename =     "PNX Level IRQ",
+       .name =         "PNX Level IRQ",
        .ack =          mask_irq,
        .mask =         mask_irq,
        .mask_ack =     mask_irq,
index eb6ec11fef07b003303d4da27f822490140eef3a..8aeed6c2b8c36417b0ce84c9bf2420df6a5b7430 100644 (file)
@@ -106,9 +106,8 @@ int get_ethernet_addr(char *ethernet_addr)
        return 0;
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 extern int pnx8550_console_port;
index 0f659c9106ac21091872cd855a45c35a0a764677..6362c702e3890a6788878a7d70e6823f5fe17025 100644 (file)
@@ -93,7 +93,7 @@
  * Functions to READ and WRITE to serial port 1
  */
 #define        SERIAL_READ_1(ofs)              (*((volatile unsigned char*)    \
-                                       (TITAN_SERIAL_BASE_1 + ofs)
+                                       (TITAN_SERIAL_BASE_1 + ofs)))
 
 #define        SERIAL_WRITE_1(ofs, val)        ((*((volatile unsigned char*)   \
                                        (TITAN_SERIAL_BASE_1 + ofs))) = val)
index adb048527e7610d0e3dfc639c128f541e5a001ae..428d1f45a2872fc2289149ec1d4b0f1de1b17e31 100644 (file)
@@ -148,9 +148,9 @@ void __init arch_init_irq(void)
 {
        clear_c0_status(ST0_IM);
 
-       mips_cpu_irq_init(0);
-       rm7k_cpu_irq_init(8);
-       rm9k_cpu_irq_init(12);
+       mips_cpu_irq_init();
+       rm7k_cpu_irq_init();
+       rm9k_cpu_irq_init();
 
 #ifdef CONFIG_KGDB
        /* At this point, initialize the second serial port */
index 9fe4973377c315ad0dd829946c4521e8d7a1c3ac..1e1685e415a4504d0c94d9ea0470befdb42ccf82 100644 (file)
@@ -132,9 +132,8 @@ void __init prom_init(void)
        prom_grab_secondary();
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
index 1b9b0d396d3ed3e588bac9661fbb01316e21263d..6a6e15e400095cd0c3c42a920f1f64960f51d147 100644 (file)
@@ -171,6 +171,7 @@ static void __init py_map_ocd(void)
 
 static void __init py_uart_setup(void)
 {
+#ifdef CONFIG_SERIAL_8250
        struct uart_port up;
 
        /*
@@ -188,6 +189,7 @@ static void __init py_uart_setup(void)
 
        if (early_serial_setup(&up))
                printk(KERN_ERR "Early serial init of port 0 failed\n");
+#endif /* CONFIG_SERIAL_8250 */
 }
 
 static void __init py_rtc_setup(void)
index d174fac43031bf8a067502f8034c750d41c1e1c3..dae39b59de15e486069f75a42cf4d27da9857c75 100644 (file)
@@ -1,6 +1,5 @@
 #include <linux/init.h>
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0UL;
 }
index a1a9af6da7bf773fa28b28c6964b68b1931df457..6b6e97b90c6e56116548a71b0b8d75954877a2bb 100644 (file)
@@ -139,7 +139,7 @@ static void end_eisa1_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_eisa1_irq_type = {
-       .typename       = "IP22 EISA",
+       .name           = "IP22 EISA",
        .startup        = startup_eisa1_irq,
        .ack            = mask_and_ack_eisa1_irq,
        .mask           = disable_eisa1_irq,
@@ -194,7 +194,7 @@ static void end_eisa2_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_eisa2_irq_type = {
-       .typename       = "IP22 EISA",
+       .name           = "IP22 EISA",
        .startup        = startup_eisa2_irq,
        .ack            = mask_and_ack_eisa2_irq,
        .mask           = disable_eisa2_irq,
index c44f8be0644f43bf58d38cb744d2509724dac2ee..b454924aeb56c2f897b96c2cacfeefc643b9fca9 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
+#include <asm/irq_cpu.h>
 
 #include <asm/sgi/ioc.h>
 #include <asm/sgi/hpc3.h>
@@ -52,7 +53,7 @@ static void disable_local0_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local0_irq_type = {
-       .typename       = "IP22 local 0",
+       .name           = "IP22 local 0",
        .ack            = disable_local0_irq,
        .mask           = disable_local0_irq,
        .mask_ack       = disable_local0_irq,
@@ -73,7 +74,7 @@ void disable_local1_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local1_irq_type = {
-       .typename       = "IP22 local 1",
+       .name           = "IP22 local 1",
        .ack            = disable_local1_irq,
        .mask           = disable_local1_irq,
        .mask_ack       = disable_local1_irq,
@@ -94,7 +95,7 @@ void disable_local2_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local2_irq_type = {
-       .typename       = "IP22 local 2",
+       .name           = "IP22 local 2",
        .ack            = disable_local2_irq,
        .mask           = disable_local2_irq,
        .mask_ack       = disable_local2_irq,
@@ -115,7 +116,7 @@ void disable_local3_irq(unsigned int irq)
 }
 
 static struct irq_chip ip22_local3_irq_type = {
-       .typename       = "IP22 local 3",
+       .name           = "IP22 local 3",
        .ack            = disable_local3_irq,
        .mask           = disable_local3_irq,
        .mask_ack       = disable_local3_irq,
@@ -253,8 +254,6 @@ asmlinkage void plat_irq_dispatch(void)
                indy_8254timer_irq();
 }
 
-extern void mips_cpu_irq_init(unsigned int irq_base);
-
 void __init arch_init_irq(void)
 {
        int i;
@@ -316,7 +315,7 @@ void __init arch_init_irq(void)
        sgint->cmeimask1 = 0;
 
        /* init CPU irqs */
-       mips_cpu_irq_init(SGINT_CPU);
+       mips_cpu_irq_init();
 
        for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) {
                struct irq_chip *handler;
index b58bd522262b0ee5c231457b17408584143cae47..ddb6506d8341e2b2b14a404fc349254f549dbd17 100644 (file)
@@ -202,7 +202,6 @@ void __init sgimc_init(void)
 }
 
 void __init prom_meminit(void) {}
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
index 319f8803ef6f13b5dcf8536f469c2fd9784c4cbf..60ade7690e09861aafcfa0ca3f09da1eef8230a5 100644 (file)
@@ -333,7 +333,7 @@ static inline void disable_bridge_irq(unsigned int irq)
 }
 
 static struct irq_chip bridge_irq_type = {
-       .typename       = "bridge",
+       .name           = "bridge",
        .startup        = startup_bridge_irq,
        .shutdown       = shutdown_bridge_irq,
        .ack            = disable_bridge_irq,
index 16e5682b01f1d675687b8f6093a8c67b2ba62f18..0e3d535e9f4351f2ecabb097a1afb09ce7b4c41b 100644 (file)
@@ -498,10 +498,9 @@ void __init prom_meminit(void)
        }
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
        /* We got nothing to free here ...  */
-       return 0;
 }
 
 extern void pagetable_init(void);
index c20e9899b34b49fba2d95cdfa5688ea242287080..9ce513629b14543939c46321766ea9d6ae99429d 100644 (file)
@@ -181,7 +181,7 @@ static void disable_rt_irq(unsigned int irq)
 }
 
 static struct irq_chip rt_irq_type = {
-       .typename       = "SN HUB RT timer",
+       .name           = "SN HUB RT timer",
        .ack            = disable_rt_irq,
        .mask           = disable_rt_irq,
        .mask_ack       = disable_rt_irq,
index ae063864c0267be2e249867eb9456ad22381f7b7..8c450d9e8696fbbc0e413384da6ebbd483a1f256 100644 (file)
@@ -144,7 +144,7 @@ static void end_cpu_irq(unsigned int irq)
 }
 
 static struct irq_chip ip32_cpu_interrupt = {
-       .typename = "IP32 CPU",
+       .name = "IP32 CPU",
        .ack = disable_cpu_irq,
        .mask = disable_cpu_irq,
        .mask_ack = disable_cpu_irq,
@@ -193,7 +193,7 @@ static void end_crime_irq(unsigned int irq)
 }
 
 static struct irq_chip ip32_crime_interrupt = {
-       .typename = "IP32 CRIME",
+       .name = "IP32 CRIME",
        .ack = mask_and_ack_crime_irq,
        .mask = disable_crime_irq,
        .mask_ack = mask_and_ack_crime_irq,
@@ -234,7 +234,7 @@ static void end_macepci_irq(unsigned int irq)
 }
 
 static struct irq_chip ip32_macepci_interrupt = {
-       .typename = "IP32 MACE PCI",
+       .name = "IP32 MACE PCI",
        .ack = disable_macepci_irq,
        .mask = disable_macepci_irq,
        .mask_ack = disable_macepci_irq,
@@ -347,7 +347,7 @@ static void end_maceisa_irq(unsigned irq)
 }
 
 static struct irq_chip ip32_maceisa_interrupt = {
-       .typename = "IP32 MACE ISA",
+       .name = "IP32 MACE ISA",
        .ack = mask_and_ack_maceisa_irq,
        .mask = disable_maceisa_irq,
        .mask_ack = mask_and_ack_maceisa_irq,
@@ -379,7 +379,7 @@ static void end_mace_irq(unsigned int irq)
 }
 
 static struct irq_chip ip32_mace_interrupt = {
-       .typename = "IP32 MACE",
+       .name = "IP32 MACE",
        .ack = disable_mace_irq,
        .mask = disable_mace_irq,
        .mask_ack = disable_mace_irq,
index d37d40a3cdae8dc1a489d7c8bc1b37bd8bc71d1d..849d392a0013fbb0468362a3f85315d1ba4ae00c 100644 (file)
@@ -43,7 +43,6 @@ void __init prom_meminit (void)
 }
 
 
-unsigned long __init prom_free_prom_memory (void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
index 2e8f6b2e2420e8c7eb485ec575b7f14bf085d77c..1dc5d05d8962067fc9ef206ee019b2da90c0e6f5 100644 (file)
@@ -82,7 +82,7 @@ extern char sb1250_duart_present[];
 #endif
 
 static struct irq_chip bcm1480_irq_type = {
-       .typename = "BCM1480-IMR",
+       .name = "BCM1480-IMR",
        .ack = ack_bcm1480_irq,
        .mask = disable_bcm1480_irq,
        .mask_ack = ack_bcm1480_irq,
index 6e8952da6e2acf811541ea21873c83df229e9f4f..9e6099e6962266ed27023c9bdcbb59c32fa4b96c 100644 (file)
@@ -343,10 +343,9 @@ void __init prom_init(void)
        prom_meminit();
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
        /* Not sure what I'm supposed to do here.  Nothing, I think */
-       return 0;
 }
 
 void prom_putchar(char c)
index 82ce7533053f11ca017c5125bfd8c94b15b529b9..148239446e6e598c732111058847769b0388d5a4 100644 (file)
@@ -67,7 +67,7 @@ extern char sb1250_duart_present[];
 #endif
 
 static struct irq_chip sb1250_irq_type = {
-       .typename = "SB1250-IMR",
+       .name = "SB1250-IMR",
        .ack = ack_sb1250_irq,
        .mask = disable_sb1250_irq,
        .mask_ack = ack_sb1250_irq,
index 3c33a4517bc3ac72aba110fe3766f3b116c5b373..257c4e67435337e36f75daf7663603376381df58 100644 (file)
@@ -87,10 +87,9 @@ void __init prom_init(void)
        prom_meminit();
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
        /* Not sure what I'm supposed to do here.  Nothing, I think */
-       return 0;
 }
 
 void prom_putchar(char c)
index 8511bcc6d99df00450cf5ff56b1dc5b3b248e595..039e8e5405080b42613856346bd845ab25075657 100644 (file)
@@ -37,7 +37,7 @@ static void end_pciasic_irq(unsigned int irq)
 }
 
 static struct irq_chip pciasic_irq_type = {
-       .typename = "ASIC-PCI",
+       .name = "ASIC-PCI",
        .ack = disable_pciasic_irq,
        .mask = disable_pciasic_irq,
        .mask_ack = disable_pciasic_irq,
index d1d0f1f493b46d5c03f6a8f423c21ba773e524fb..1213d166f22eba023b273927fcbbbde91e6323ef 100644 (file)
@@ -67,9 +67,8 @@ void prom_printf(char *fmt, ...)
        va_end(args);
 }
 
-unsigned long prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 /*
index ed4a19adf36156dfff654ec8ec830ea10ad92120..e7f3e5b84dcffaa51f300f9ca7af141b8bca9b5c 100644 (file)
@@ -120,7 +120,7 @@ static void tx4927_irq_pic_disable(unsigned int irq);
 
 #define TX4927_CP0_NAME "TX4927-CP0"
 static struct irq_chip tx4927_irq_cp0_type = {
-       .typename       = TX4927_CP0_NAME,
+       .name           = TX4927_CP0_NAME,
        .ack            = tx4927_irq_cp0_disable,
        .mask           = tx4927_irq_cp0_disable,
        .mask_ack       = tx4927_irq_cp0_disable,
@@ -129,7 +129,7 @@ static struct irq_chip tx4927_irq_cp0_type = {
 
 #define TX4927_PIC_NAME "TX4927-PIC"
 static struct irq_chip tx4927_irq_pic_type = {
-       .typename       = TX4927_PIC_NAME,
+       .name           = TX4927_PIC_NAME,
        .ack            = tx4927_irq_pic_disable,
        .mask           = tx4927_irq_pic_disable,
        .mask_ack       = tx4927_irq_pic_disable,
index b54b529a29f9af209944eb2a77dc1aa916f53550..dcce88f403c9030145ac19577d25061305bfedad 100644 (file)
@@ -228,7 +228,7 @@ static void toshiba_rbtx4927_irq_isa_mask_and_ack(unsigned int irq);
 
 #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
 static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
-       .typename = TOSHIBA_RBTX4927_IOC_NAME,
+       .name = TOSHIBA_RBTX4927_IOC_NAME,
        .ack = toshiba_rbtx4927_irq_ioc_disable,
        .mask = toshiba_rbtx4927_irq_ioc_disable,
        .mask_ack = toshiba_rbtx4927_irq_ioc_disable,
@@ -241,7 +241,7 @@ static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
 #ifdef CONFIG_TOSHIBA_FPCIB0
 #define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA"
 static struct irq_chip toshiba_rbtx4927_irq_isa_type = {
-       .typename = TOSHIBA_RBTX4927_ISA_NAME,
+       .name = TOSHIBA_RBTX4927_ISA_NAME,
        .ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
        .mask = toshiba_rbtx4927_irq_isa_disable,
        .mask_ack = toshiba_rbtx4927_irq_isa_mask_and_ack,
@@ -490,13 +490,13 @@ void toshiba_rbtx4927_irq_dump(char *key)
        {
                u32 i, j = 0;
                for (i = 0; i < NR_IRQS; i++) {
-                       if (strcmp(irq_desc[i].chip->typename, "none")
+                       if (strcmp(irq_desc[i].chip->name, "none")
                            == 0)
                                continue;
 
                        if ((i >= 1)
-                           && (irq_desc[i - 1].chip->typename ==
-                               irq_desc[i].chip->typename)) {
+                           && (irq_desc[i - 1].chip->name ==
+                               irq_desc[i].chip->name)) {
                                j++;
                        } else {
                                j = 0;
@@ -510,7 +510,7 @@ void toshiba_rbtx4927_irq_dump(char *key)
                             (u32) (irq_desc[i].action ? irq_desc[i].
                                    action->handler : 0),
                             irq_desc[i].depth,
-                            irq_desc[i].chip->typename, j);
+                            irq_desc[i].chip->name, j);
                }
        }
 #endif
index efe50562f0ce52a11b9c829feccb0781aa73708b..9a3a5babd1fb2facb0a78e3f14f584eaca654531 100644 (file)
@@ -80,9 +80,8 @@ void __init prom_init(void)
        add_memory_region(0, msize << 20, BOOT_MEM_RAM);
 }
 
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 const char *get_system_type(void)
index a347b424d91c76d9157c0f17a576576bc5242768..3a2dbfc2501459f77988429e01acdc68c2de624a 100644 (file)
@@ -49,7 +49,7 @@ static void tx4938_irq_pic_disable(unsigned int irq);
 
 #define TX4938_CP0_NAME "TX4938-CP0"
 static struct irq_chip tx4938_irq_cp0_type = {
-       .typename = TX4938_CP0_NAME,
+       .name = TX4938_CP0_NAME,
        .ack = tx4938_irq_cp0_disable,
        .mask = tx4938_irq_cp0_disable,
        .mask_ack = tx4938_irq_cp0_disable,
@@ -58,7 +58,7 @@ static struct irq_chip tx4938_irq_cp0_type = {
 
 #define TX4938_PIC_NAME "TX4938-PIC"
 static struct irq_chip tx4938_irq_pic_type = {
-       .typename = TX4938_PIC_NAME,
+       .name = TX4938_PIC_NAME,
        .ack = tx4938_irq_pic_disable,
        .mask = tx4938_irq_pic_disable,
        .mask_ack = tx4938_irq_pic_disable,
index b6f363d08011271deab6cb4405fd8084d1dc24cf..2e96dbb248b120f60fe02c7216b2f08e155764d2 100644 (file)
@@ -92,7 +92,7 @@ static void toshiba_rbtx4938_irq_ioc_disable(unsigned int irq);
 
 #define TOSHIBA_RBTX4938_IOC_NAME "RBTX4938-IOC"
 static struct irq_chip toshiba_rbtx4938_irq_ioc_type = {
-       .typename = TOSHIBA_RBTX4938_IOC_NAME,
+       .name = TOSHIBA_RBTX4938_IOC_NAME,
        .ack = toshiba_rbtx4938_irq_ioc_disable,
        .mask = toshiba_rbtx4938_irq_ioc_disable,
        .mask_ack = toshiba_rbtx4938_irq_ioc_disable,
index e44daf30a7c1a84c0da46a0cb4bb083cddbc09a5..7dc6a0aae21cbec724cb8d867cfde287ad1f26b6 100644 (file)
@@ -56,9 +56,8 @@ void __init prom_init(void)
        return;
 }
 
-unsigned long  __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
 {
-       return 0;
 }
 
 void __init prom_fixup_mem_map(unsigned long start, unsigned long end)
index c075261976c58df81ec4f4f1106b1c5bfe1c0739..adabc6bad440372815b0ded7fea23a6e5647a705 100644 (file)
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2001-2002  MontaVista Software Inc.
  *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
- *  Copyright (C) 2003-2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2003-2006  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -68,6 +68,7 @@ static unsigned char sysint2_assign[16] = {
 #define MPIUINTREG     0x0e
 #define MAIUINTREG     0x10
 #define MKIUINTREG     0x12
+#define MMACINTREG     0x12
 #define MGIUINTLREG    0x14
 #define MDSIUINTREG    0x16
 #define NMIREG         0x18
@@ -241,6 +242,30 @@ void vr41xx_disable_kiuint(uint16_t mask)
 
 EXPORT_SYMBOL(vr41xx_disable_kiuint);
 
+void vr41xx_enable_macint(uint16_t mask)
+{
+       struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
+       unsigned long flags;
+
+       spin_lock_irqsave(&desc->lock, flags);
+       icu1_set(MMACINTREG, mask);
+       spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+EXPORT_SYMBOL(vr41xx_enable_macint);
+
+void vr41xx_disable_macint(uint16_t mask)
+{
+       struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
+       unsigned long flags;
+
+       spin_lock_irqsave(&desc->lock, flags);
+       icu1_clear(MMACINTREG, mask);
+       spin_unlock_irqrestore(&desc->lock, flags);
+}
+
+EXPORT_SYMBOL(vr41xx_disable_macint);
+
 void vr41xx_enable_dsiuint(uint16_t mask)
 {
        struct irq_desc *desc = irq_desc + DSIU_IRQ;
@@ -428,7 +453,7 @@ static void enable_sysint1_irq(unsigned int irq)
 }
 
 static struct irq_chip sysint1_irq_type = {
-       .typename       = "SYSINT1",
+       .name           = "SYSINT1",
        .ack            = disable_sysint1_irq,
        .mask           = disable_sysint1_irq,
        .mask_ack       = disable_sysint1_irq,
@@ -446,7 +471,7 @@ static void enable_sysint2_irq(unsigned int irq)
 }
 
 static struct irq_chip sysint2_irq_type = {
-       .typename       = "SYSINT2",
+       .name           = "SYSINT2",
        .ack            = disable_sysint2_irq,
        .mask           = disable_sysint2_irq,
        .mask_ack       = disable_sysint2_irq,
index a2e285c1d4d5c85f8403199681fdb3b9ce08976a..4f97e0ba9e248ee00f4eb3101387277230be3c55 100644 (file)
@@ -81,7 +81,6 @@ void __init prom_init(void)
        }
 }
 
-unsigned long __init prom_free_prom_memory (void)
+void __init prom_free_prom_memory(void)
 {
-       return 0UL;
 }
index 16decf4ac2f406923535ab39172eb59900a38d67..cba36a247e32b634e21e0e03e2c39c27aa4342ea 100644 (file)
@@ -95,27 +95,27 @@ asmlinkage void plat_irq_dispatch(void)
        unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
 
        if (pending & CAUSEF_IP7)
-               do_IRQ(7);
+               do_IRQ(TIMER_IRQ);
        else if (pending & 0x7800) {
                if (pending & CAUSEF_IP3)
-                       irq_dispatch(3);
+                       irq_dispatch(INT1_IRQ);
                else if (pending & CAUSEF_IP4)
-                       irq_dispatch(4);
+                       irq_dispatch(INT2_IRQ);
                else if (pending & CAUSEF_IP5)
-                       irq_dispatch(5);
+                       irq_dispatch(INT3_IRQ);
                else if (pending & CAUSEF_IP6)
-                       irq_dispatch(6);
+                       irq_dispatch(INT4_IRQ);
        } else if (pending & CAUSEF_IP2)
-               irq_dispatch(2);
+               irq_dispatch(INT0_IRQ);
        else if (pending & CAUSEF_IP0)
-               do_IRQ(0);
+               do_IRQ(MIPS_SOFTINT0_IRQ);
        else if (pending & CAUSEF_IP1)
-               do_IRQ(1);
+               do_IRQ(MIPS_SOFTINT1_IRQ);
        else
                spurious_interrupt();
 }
 
 void __init arch_init_irq(void)
 {
-       mips_cpu_irq_init(MIPS_CPU_IRQ_BASE);
+       mips_cpu_irq_init();
 }
index 128ed8d6f1119d0ae995c8adc68b60a55ed61d2a..7d2d076b0f54f55e2ae5e77817ef0b77a62f6325 100644 (file)
 #include <linux/interrupt.h>
 
 #include <asm/io.h>
+#include <asm/i8259.h>
 #include <asm/vr41xx/cmbvr4133.h>
 
-extern void enable_8259A_irq(unsigned int irq);
-extern void disable_8259A_irq(unsigned int irq);
-extern void mask_and_ack_8259A(unsigned int irq);
-extern void init_8259A(int hoge);
-
 extern int vr4133_rockhopper;
 
-static void enable_i8259_irq(unsigned int irq)
-{
-       enable_8259A_irq(irq - I8259_IRQ_BASE);
-}
-
-static void disable_i8259_irq(unsigned int irq)
-{
-       disable_8259A_irq(irq - I8259_IRQ_BASE);
-}
-
-static void ack_i8259_irq(unsigned int irq)
-{
-       mask_and_ack_8259A(irq - I8259_IRQ_BASE);
-}
-
-static struct irq_chip i8259_irq_type = {
-       .typename       = "XT-PIC",
-       .ack            = ack_i8259_irq,
-       .mask           = disable_i8259_irq,
-       .mask_ack       = ack_i8259_irq,
-       .unmask         = enable_i8259_irq,
-};
-
 static int i8259_get_irq_number(int irq)
 {
-       unsigned long isr;
-
-       isr = inb(0x20);
-       irq = ffz(~isr);
-       if (irq == 2) {
-               isr = inb(0xa0);
-               irq = 8 + ffz(~isr);
-       }
-
-       if (irq < 0 || irq > 15)
-               return -EINVAL;
-
-       return I8259_IRQ_BASE + irq;
+       return i8259_irq();
 }
 
-static struct irqaction i8259_slave_cascade = {
-       .handler        = &no_action,
-       .name           = "cascade",
-};
-
 void __init rockhopper_init_irq(void)
 {
        int i;
@@ -84,11 +40,6 @@ void __init rockhopper_init_irq(void)
                return;
        }
 
-       for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++)
-               set_irq_chip_and_handler(i, &i8259_irq_type, handle_level_irq);
-
-       setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade);
-
        vr41xx_set_irq_trigger(CMBVR41XX_INTC_PIN, TRIGGER_LEVEL, SIGNAL_THROUGH);
        vr41xx_set_irq_level(CMBVR41XX_INTC_PIN, LEVEL_HIGH);
        vr41xx_cascade_irq(CMBVR41XX_INTC_IRQ, i8259_get_irq_number);
index 12272361c018c41b1b34c2f33a526e80646cc8b1..eaed402ad3460a758872ccf271971a36f6042add 100644 (file)
@@ -34,10 +34,6 @@ config GENERIC_HWEIGHT
        bool
        default y
 
-config GENERIC_CALIBRATE_DELAY
-       bool
-       default y
-
 config GENERIC_TIME
        def_bool y
 
@@ -134,6 +130,31 @@ config AUDIT_ARCH
        bool
        default y
 
+config S390_SWITCH_AMODE
+       bool "Switch kernel/user addressing modes"
+       help
+         This option allows to switch the addressing modes of kernel and user
+         space. The kernel parameter switch_amode=on will enable this feature,
+         default is disabled. Enabling this (via kernel parameter) on machines
+         earlier than IBM System z9-109 EC/BC will reduce system performance.
+
+         Note that this option will also be selected by selecting the execute
+         protection option below. Enabling the execute protection via the
+         noexec kernel parameter will also switch the addressing modes,
+         independent of the switch_amode kernel parameter.
+
+
+config S390_EXEC_PROTECT
+       bool "Data execute protection"
+       select S390_SWITCH_AMODE
+       help
+         This option allows to enable a buffer overflow protection for user
+         space programs and it also selects the addressing mode option above.
+         The kernel parameter noexec=on will enable this feature and also
+         switch the addressing modes, default is disabled. Enabling this (via
+         kernel parameter) on machines earlier than IBM System z9-109 EC/BC
+         will reduce system performance.
+
 comment "Code generation options"
 
 choice
index b8c2372902634c22db1f20162b966445ebf434a2..c9da7d16145e727f91f77b655016fa29fe5074ac 100644 (file)
@@ -81,7 +81,7 @@ static struct ctl_table appldata_dir_table[] = {
 /*
  * Timer
  */
-DEFINE_PER_CPU(struct vtimer_list, appldata_timer);
+static DEFINE_PER_CPU(struct vtimer_list, appldata_timer);
 static atomic_t appldata_expire_count = ATOMIC_INIT(0);
 
 static DEFINE_SPINLOCK(appldata_timer_lock);
index 8aea3698a77b84b466d56e3761370e083fa19461..4ca6157887025abaa19e6538408a8e8c12e7badb 100644 (file)
@@ -36,7 +36,7 @@
  * book:
  * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml
  */
-struct appldata_mem_data {
+static struct appldata_mem_data {
        u64 timestamp;
        u32 sync_count_1;       /* after VM collected the record data, */
        u32 sync_count_2;       /* sync_count_1 and sync_count_2 should be the
index 075e619bf37dcdbbadb5bc9048a810c82924dc2d..f64b8c867ae2d3323128aa585d36b6a830911d1a 100644 (file)
--- a/