Merge branch 'akpm' (Andrew's patch-bomb)
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 22 Mar 2012 16:04:48 +0000 (09:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 22 Mar 2012 16:04:48 +0000 (09:04 -0700)
Merge first batch of patches from Andrew Morton:
 "A few misc things and all the MM queue"

* emailed from Andrew Morton <akpm@linux-foundation.org>: (92 commits)
  memcg: avoid THP split in task migration
  thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
  memcg: clean up existing move charge code
  mm/memcontrol.c: remove unnecessary 'break' in mem_cgroup_read()
  mm/memcontrol.c: remove redundant BUG_ON() in mem_cgroup_usage_unregister_event()
  mm/memcontrol.c: s/stealed/stolen/
  memcg: fix performance of mem_cgroup_begin_update_page_stat()
  memcg: remove PCG_FILE_MAPPED
  memcg: use new logic for page stat accounting
  memcg: remove PCG_MOVE_LOCK flag from page_cgroup
  memcg: simplify move_account() check
  memcg: remove EXPORT_SYMBOL(mem_cgroup_update_page_stat)
  memcg: kill dead prev_priority stubs
  memcg: remove PCG_CACHE page_cgroup flag
  memcg: let css_get_next() rely upon rcu_read_lock()
  cgroup: revert ss_id_lock to spinlock
  idr: make idr_get_next() good for rcu_read_lock()
  memcg: remove unnecessary thp check in page stat accounting
  memcg: remove redundant returns
  memcg: enum lru_list lru
  ...

703 files changed:
Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt [new file with mode: 0644]
Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
Documentation/filesystems/debugfs.txt
Documentation/filesystems/porting
Documentation/filesystems/qnx6.txt [new file with mode: 0644]
Documentation/ioctl/ioctl-number.txt
Documentation/networking/dns_resolver.txt
Documentation/powerpc/firmware-assisted-dump.txt [new file with mode: 0644]
Documentation/powerpc/mpc52xx.txt
Documentation/powerpc/phyp-assisted-dump.txt [deleted file]
Documentation/security/00-INDEX
Documentation/security/Yama.txt [new file with mode: 0644]
Documentation/security/keys.txt
MAINTAINERS
arch/alpha/kernel/binfmt_loader.c
arch/arm/mach-tegra/fuse.c
arch/m68k/Kconfig
arch/m68k/include/asm/m5206sim.h
arch/m68k/include/asm/m520xsim.h
arch/m68k/include/asm/m523xsim.h
arch/m68k/include/asm/m5249sim.h
arch/m68k/include/asm/m5272sim.h
arch/m68k/include/asm/m527xsim.h
arch/m68k/include/asm/m528xsim.h
arch/m68k/include/asm/m5307sim.h
arch/m68k/include/asm/m532xsim.h
arch/m68k/include/asm/m5407sim.h
arch/m68k/include/asm/m54xxsim.h
arch/m68k/include/asm/machdep.h
arch/m68k/include/asm/mcfqspi.h
arch/m68k/include/asm/mcfuart.h
arch/m68k/kernel/process.c
arch/m68k/kernel/process_mm.c [deleted file]
arch/m68k/kernel/process_no.c [deleted file]
arch/m68k/kernel/ptrace.c
arch/m68k/kernel/ptrace_mm.c [deleted file]
arch/m68k/kernel/ptrace_no.c [deleted file]
arch/m68k/kernel/setup_no.c
arch/m68k/kernel/time.c
arch/m68k/kernel/time_mm.c [deleted file]
arch/m68k/kernel/time_no.c [deleted file]
arch/m68k/kernel/vmlinux-nommu.lds
arch/m68k/platform/5206/config.c
arch/m68k/platform/520x/config.c
arch/m68k/platform/523x/config.c
arch/m68k/platform/5249/config.c
arch/m68k/platform/5272/config.c
arch/m68k/platform/527x/config.c
arch/m68k/platform/528x/config.c
arch/m68k/platform/5307/config.c
arch/m68k/platform/532x/config.c
arch/m68k/platform/5407/config.c
arch/m68k/platform/54xx/config.c
arch/m68k/platform/68328/config.c
arch/m68k/platform/68328/ints.c
arch/m68k/platform/68328/timers.c
arch/m68k/platform/68360/config.c
arch/m68k/platform/68360/ints.c
arch/m68k/platform/68EZ328/config.c
arch/m68k/platform/68VZ328/config.c
arch/m68k/platform/coldfire/Makefile
arch/m68k/platform/coldfire/device.c [new file with mode: 0644]
arch/m68k/platform/coldfire/head.S
arch/m68k/platform/coldfire/pit.c
arch/m68k/platform/coldfire/reset.c [new file with mode: 0644]
arch/m68k/platform/coldfire/sltimers.c
arch/m68k/platform/coldfire/timers.c
arch/m68k/platform/coldfire/vectors.c
arch/powerpc/Kconfig
arch/powerpc/Kconfig.debug
arch/powerpc/Makefile
arch/powerpc/boot/Makefile
arch/powerpc/boot/dts/a4m072.dts [new file with mode: 0644]
arch/powerpc/boot/dts/bluestone.dts
arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi
arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi
arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi
arch/powerpc/boot/dts/fsl/p1010si-post.dtsi
arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
arch/powerpc/boot/dts/fsl/p1023si-post.dtsi
arch/powerpc/boot/dts/fsl/p2020si-post.dtsi
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
arch/powerpc/boot/dts/fsl/p3060si-post.dtsi
arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi
arch/powerpc/boot/dts/fsl/pq3-etsec1-1.dtsi
arch/powerpc/boot/dts/fsl/pq3-etsec1-2.dtsi
arch/powerpc/boot/dts/fsl/pq3-etsec1-3.dtsi
arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi
arch/powerpc/boot/dts/fsl/qoriq-mpic.dtsi
arch/powerpc/boot/dts/ge_imp3a.dts [new file with mode: 0644]
arch/powerpc/boot/dts/mpc836x_mds.dts
arch/powerpc/boot/dts/mpc8536ds.dts
arch/powerpc/boot/dts/mpc8536ds.dtsi
arch/powerpc/boot/dts/mpc8536ds_36b.dts
arch/powerpc/boot/dts/mpc8548cds.dts [deleted file]
arch/powerpc/boot/dts/mpc8548cds.dtsi [new file with mode: 0644]
arch/powerpc/boot/dts/mpc8548cds_32b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/mpc8548cds_36b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/mpc8572ds.dtsi
arch/powerpc/boot/dts/p1010rdb.dtsi
arch/powerpc/boot/dts/p1020rdb-pc.dtsi [new file with mode: 0644]
arch/powerpc/boot/dts/p1020rdb-pc_32b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1020rdb-pc_36b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1020rdb-pc_camp_core0.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1020rdb-pc_camp_core1.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1021rdb.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1021rdb.dtsi [new file with mode: 0644]
arch/powerpc/boot/dts/p1021rdb_36b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1022ds.dts [deleted file]
arch/powerpc/boot/dts/p1022ds.dtsi [new file with mode: 0644]
arch/powerpc/boot/dts/p1022ds_32b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1022ds_36b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1025rdb.dtsi [new file with mode: 0644]
arch/powerpc/boot/dts/p1025rdb_32b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p1025rdb_36b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p2020rdb-pc.dtsi [new file with mode: 0644]
arch/powerpc/boot/dts/p2020rdb-pc_32b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p2020rdb-pc_36b.dts [new file with mode: 0644]
arch/powerpc/boot/dts/p2020rdb.dts
arch/powerpc/boot/wrapper
arch/powerpc/configs/85xx/ge_imp3a_defconfig [new file with mode: 0644]
arch/powerpc/configs/86xx/gef_ppc9a_defconfig
arch/powerpc/configs/86xx/gef_sbc310_defconfig
arch/powerpc/configs/86xx/gef_sbc610_defconfig
arch/powerpc/configs/iseries_defconfig [deleted file]
arch/powerpc/configs/mpc5200_defconfig
arch/powerpc/configs/mpc85xx_defconfig
arch/powerpc/configs/mpc85xx_smp_defconfig
arch/powerpc/include/asm/abs_addr.h
arch/powerpc/include/asm/atomic.h
arch/powerpc/include/asm/cputable.h
arch/powerpc/include/asm/device.h
arch/powerpc/include/asm/dma.h
arch/powerpc/include/asm/eeh.h
arch/powerpc/include/asm/eeh_event.h
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/fadump.h [new file with mode: 0644]
arch/powerpc/include/asm/firmware.h
arch/powerpc/include/asm/fsl_guts.h
arch/powerpc/include/asm/hw_irq.h
arch/powerpc/include/asm/irqflags.h
arch/powerpc/include/asm/iseries/alpaca.h [deleted file]
arch/powerpc/include/asm/iseries/hv_call.h [deleted file]
arch/powerpc/include/asm/iseries/hv_call_event.h [deleted file]
arch/powerpc/include/asm/iseries/hv_call_sc.h [deleted file]
arch/powerpc/include/asm/iseries/hv_call_xm.h [deleted file]
arch/powerpc/include/asm/iseries/hv_lp_config.h [deleted file]
arch/powerpc/include/asm/iseries/hv_lp_event.h [deleted file]
arch/powerpc/include/asm/iseries/hv_types.h [deleted file]
arch/powerpc/include/asm/iseries/iommu.h [deleted file]
arch/powerpc/include/asm/iseries/it_lp_queue.h [deleted file]
arch/powerpc/include/asm/iseries/lpar_map.h [deleted file]
arch/powerpc/include/asm/iseries/mf.h [deleted file]
arch/powerpc/include/asm/iseries/vio.h [deleted file]
arch/powerpc/include/asm/lppaca.h
arch/powerpc/include/asm/mpic.h
arch/powerpc/include/asm/mpic_msgr.h [new file with mode: 0644]
arch/powerpc/include/asm/paca.h
arch/powerpc/include/asm/phyp_dump.h [deleted file]
arch/powerpc/include/asm/ppc-pci.h
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/include/asm/reg.h
arch/powerpc/include/asm/reg_booke.h
arch/powerpc/include/asm/spinlock.h
arch/powerpc/include/asm/system.h
arch/powerpc/include/asm/thread_info.h
arch/powerpc/include/asm/time.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/dbell.c
arch/powerpc/kernel/e500-pmu.c [deleted file]
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/fadump.c [new file with mode: 0644]
arch/powerpc/kernel/head_32.S
arch/powerpc/kernel/head_40x.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/head_8xx.S
arch/powerpc/kernel/head_booke.h
arch/powerpc/kernel/head_fsl_booke.S
arch/powerpc/kernel/idle.c
arch/powerpc/kernel/idle_book3e.S
arch/powerpc/kernel/idle_power4.S
arch/powerpc/kernel/idle_power7.S
arch/powerpc/kernel/iommu.c
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/isa-bridge.c
arch/powerpc/kernel/lparcfg.c
arch/powerpc/kernel/misc.S
arch/powerpc/kernel/mpc7450-pmu.c [deleted file]
arch/powerpc/kernel/of_platform.c
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/perf_callchain.c [deleted file]
arch/powerpc/kernel/perf_event.c [deleted file]
arch/powerpc/kernel/perf_event_fsl_emb.c [deleted file]
arch/powerpc/kernel/power4-pmu.c [deleted file]
arch/powerpc/kernel/power5+-pmu.c [deleted file]
arch/powerpc/kernel/power5-pmu.c [deleted file]
arch/powerpc/kernel/power6-pmu.c [deleted file]
arch/powerpc/kernel/power7-pmu.c [deleted file]
arch/powerpc/kernel/ppc970-pmu.c [deleted file]
arch/powerpc/kernel/process.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/rtas_pci.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/signal.c
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/sysfs.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/traps.c
arch/powerpc/kernel/vio.c
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/lib/locks.c
arch/powerpc/mm/fault.c
arch/powerpc/mm/fsl_booke_mmu.c
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/icswx.c
arch/powerpc/mm/icswx.h
arch/powerpc/mm/pgtable_32.c
arch/powerpc/mm/slb.c
arch/powerpc/mm/slb_low.S
arch/powerpc/mm/stab.c
arch/powerpc/oprofile/common.c
arch/powerpc/perf/Makefile [new file with mode: 0644]
arch/powerpc/perf/callchain.c [new file with mode: 0644]
arch/powerpc/perf/core-book3s.c [new file with mode: 0644]
arch/powerpc/perf/core-fsl-emb.c [new file with mode: 0644]
arch/powerpc/perf/e500-pmu.c [new file with mode: 0644]
arch/powerpc/perf/mpc7450-pmu.c [new file with mode: 0644]
arch/powerpc/perf/power4-pmu.c [new file with mode: 0644]
arch/powerpc/perf/power5+-pmu.c [new file with mode: 0644]
arch/powerpc/perf/power5-pmu.c [new file with mode: 0644]
arch/powerpc/perf/power6-pmu.c [new file with mode: 0644]
arch/powerpc/perf/power7-pmu.c [new file with mode: 0644]
arch/powerpc/perf/ppc970-pmu.c [new file with mode: 0644]
arch/powerpc/platforms/44x/Kconfig
arch/powerpc/platforms/44x/currituck.c
arch/powerpc/platforms/44x/iss4xx.c
arch/powerpc/platforms/44x/ppc44x_simple.c
arch/powerpc/platforms/52xx/mpc5200_simple.c
arch/powerpc/platforms/52xx/mpc52xx_common.c
arch/powerpc/platforms/85xx/Kconfig
arch/powerpc/platforms/85xx/Makefile
arch/powerpc/platforms/85xx/corenet_ds.c
arch/powerpc/platforms/85xx/ge_imp3a.c [new file with mode: 0644]
arch/powerpc/platforms/85xx/ksi8560.c
arch/powerpc/platforms/85xx/mpc8536_ds.c
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/85xx/mpc85xx_ds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/mpc85xx_rdb.c
arch/powerpc/platforms/85xx/p1010rdb.c
arch/powerpc/platforms/85xx/p1022_ds.c
arch/powerpc/platforms/85xx/p1023_rds.c
arch/powerpc/platforms/85xx/sbc8548.c
arch/powerpc/platforms/85xx/sbc8560.c
arch/powerpc/platforms/85xx/socrates.c
arch/powerpc/platforms/85xx/stx_gp3.c
arch/powerpc/platforms/85xx/tqm85xx.c
arch/powerpc/platforms/85xx/xes_mpc85xx.c
arch/powerpc/platforms/86xx/Kconfig
arch/powerpc/platforms/86xx/Makefile
arch/powerpc/platforms/86xx/gef_gpio.c [deleted file]
arch/powerpc/platforms/86xx/gef_pic.c [deleted file]
arch/powerpc/platforms/86xx/gef_pic.h [deleted file]
arch/powerpc/platforms/86xx/gef_ppc9a.c
arch/powerpc/platforms/86xx/gef_sbc310.c
arch/powerpc/platforms/86xx/gef_sbc610.c
arch/powerpc/platforms/86xx/pic.c
arch/powerpc/platforms/Kconfig
arch/powerpc/platforms/Makefile
arch/powerpc/platforms/cell/setup.c
arch/powerpc/platforms/cell/spufs/inode.c
arch/powerpc/platforms/cell/spufs/syscalls.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/embedded6xx/holly.c
arch/powerpc/platforms/embedded6xx/linkstation.c
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
arch/powerpc/platforms/embedded6xx/storcenter.c
arch/powerpc/platforms/iseries/Kconfig [deleted file]
arch/powerpc/platforms/iseries/Makefile [deleted file]
arch/powerpc/platforms/iseries/call_hpt.h [deleted file]
arch/powerpc/platforms/iseries/call_pci.h [deleted file]
arch/powerpc/platforms/iseries/call_sm.h [deleted file]
arch/powerpc/platforms/iseries/dt.c [deleted file]
arch/powerpc/platforms/iseries/exception.S [deleted file]
arch/powerpc/platforms/iseries/exception.h [deleted file]
arch/powerpc/platforms/iseries/htab.c [deleted file]
arch/powerpc/platforms/iseries/hvcall.S [deleted file]
arch/powerpc/platforms/iseries/hvlog.c [deleted file]
arch/powerpc/platforms/iseries/hvlpconfig.c [deleted file]
arch/powerpc/platforms/iseries/iommu.c [deleted file]
arch/powerpc/platforms/iseries/ipl_parms.h [deleted file]
arch/powerpc/platforms/iseries/irq.c [deleted file]
arch/powerpc/platforms/iseries/irq.h [deleted file]
arch/powerpc/platforms/iseries/it_exp_vpd_panel.h [deleted file]
arch/powerpc/platforms/iseries/it_lp_naca.h [deleted file]
arch/powerpc/platforms/iseries/ksyms.c [deleted file]
arch/powerpc/platforms/iseries/lpardata.c [deleted file]
arch/powerpc/platforms/iseries/lpevents.c [deleted file]
arch/powerpc/platforms/iseries/main_store.h [deleted file]
arch/powerpc/platforms/iseries/mf.c [deleted file]
arch/powerpc/platforms/iseries/misc.S [deleted file]
arch/powerpc/platforms/iseries/naca.h [deleted file]
arch/powerpc/platforms/iseries/pci.c [deleted file]
arch/powerpc/platforms/iseries/pci.h [deleted file]
arch/powerpc/platforms/iseries/proc.c [deleted file]
arch/powerpc/platforms/iseries/processor_vpd.h [deleted file]
arch/powerpc/platforms/iseries/release_data.h [deleted file]
arch/powerpc/platforms/iseries/setup.c [deleted file]
arch/powerpc/platforms/iseries/setup.h [deleted file]
arch/powerpc/platforms/iseries/smp.c [deleted file]
arch/powerpc/platforms/iseries/spcomm_area.h [deleted file]
arch/powerpc/platforms/iseries/vio.c [deleted file]
arch/powerpc/platforms/iseries/viopath.c [deleted file]
arch/powerpc/platforms/iseries/vpd_areas.h [deleted file]
arch/powerpc/platforms/maple/setup.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/platforms/powermac/nvram.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/pseries/Kconfig
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/eeh.c
arch/powerpc/platforms/pseries/eeh_cache.c
arch/powerpc/platforms/pseries/eeh_dev.c [new file with mode: 0644]
arch/powerpc/platforms/pseries/eeh_driver.c
arch/powerpc/platforms/pseries/eeh_event.c
arch/powerpc/platforms/pseries/eeh_pseries.c [new file with mode: 0644]
arch/powerpc/platforms/pseries/eeh_sysfs.c
arch/powerpc/platforms/pseries/lpar.c
arch/powerpc/platforms/pseries/msi.c
arch/powerpc/platforms/pseries/pci_dlpar.c
arch/powerpc/platforms/pseries/phyp_dump.c [deleted file]
arch/powerpc/platforms/pseries/processor_idle.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/sysdev/Kconfig
arch/powerpc/sysdev/Makefile
arch/powerpc/sysdev/fsl_85xx_cache_sram.c
arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
arch/powerpc/sysdev/fsl_msi.c
arch/powerpc/sysdev/fsl_rio.c
arch/powerpc/sysdev/fsl_rmu.c
arch/powerpc/sysdev/ge/Makefile [new file with mode: 0644]
arch/powerpc/sysdev/ge/ge_pic.c [new file with mode: 0644]
arch/powerpc/sysdev/ge/ge_pic.h [new file with mode: 0644]
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/mpic_msgr.c [new file with mode: 0644]
arch/powerpc/sysdev/mpic_msi.c
arch/powerpc/sysdev/ppc4xx_pci.c
arch/powerpc/xmon/xmon.c
arch/s390/hypfs/inode.c
arch/um/include/asm/mmu.h
arch/um/include/asm/mmu_context.h
arch/um/kernel/skas/mmu.c
arch/x86/crypto/Makefile
arch/x86/crypto/blowfish_glue.c
arch/x86/crypto/camellia-x86_64-asm_64.S [new file with mode: 0644]
arch/x86/crypto/camellia_glue.c [new file with mode: 0644]
arch/x86/crypto/serpent-sse2-i586-asm_32.S
arch/x86/crypto/serpent-sse2-x86_64-asm_64.S
arch/x86/crypto/serpent_sse2_glue.c
arch/x86/crypto/twofish_glue.c
arch/x86/crypto/twofish_glue_3way.c
arch/x86/ia32/ia32_aout.c
crypto/Kconfig
crypto/Makefile
crypto/algapi.c
crypto/camellia.c [deleted file]
crypto/camellia_generic.c [new file with mode: 0644]
crypto/crypto_user.c
crypto/tcrypt.c
crypto/testmgr.c
crypto/testmgr.h
drivers/base/driver.c
drivers/block/viodasd.c [deleted file]
drivers/cdrom/viocd.c [deleted file]
drivers/char/hw_random/tx4939-rng.c
drivers/char/tpm/Kconfig
drivers/char/tpm/tpm.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm_tis.c
drivers/char/viotape.c [deleted file]
drivers/crypto/Kconfig
drivers/crypto/Makefile
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/ctrl.c
drivers/crypto/geode-aes.c
drivers/crypto/hifn_795x.c
drivers/crypto/ixp4xx_crypto.c
drivers/crypto/mv_cesa.c
drivers/crypto/n2_core.c
drivers/crypto/omap-aes.c
drivers/crypto/omap-sham.c
drivers/crypto/picoxcell_crypto.c
drivers/crypto/s5p-sss.c
drivers/crypto/talitos.c
drivers/crypto/tegra-aes.c [new file with mode: 0644]
drivers/crypto/tegra-aes.h [new file with mode: 0644]
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpio-ge.c [new file with mode: 0644]
drivers/misc/carma/carma-fpga.c
drivers/misc/ibmasm/ibmasmfs.c
drivers/misc/ibmasm/module.c
drivers/mmc/card/block.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/Makefile
drivers/mtd/nand/fsl_ifc_nand.c [new file with mode: 0644]
drivers/net/ethernet/brocade/bna/bnad_debugfs.c
drivers/net/macvtap.c
drivers/oprofile/oprofilefs.c
drivers/scsi/Kconfig
drivers/scsi/ibmvscsi/Makefile
drivers/scsi/ibmvscsi/ibmvscsi.c
drivers/scsi/ibmvscsi/ibmvscsi.h
drivers/scsi/ibmvscsi/iseries_vscsi.c [deleted file]
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_login.c
drivers/tty/hvc/Kconfig
drivers/tty/hvc/Makefile
drivers/tty/hvc/hvc_iseries.c [deleted file]
drivers/tty/hvc/hvc_udbg.c
drivers/tty/hvc/hvc_vio.c
drivers/tty/serial/Kconfig
drivers/usb/core/inode.c
drivers/usb/gadget/f_fs.c
drivers/usb/gadget/inode.c
drivers/watchdog/Kconfig
fs/9p/v9fs.c
fs/9p/vfs_super.c
fs/Kconfig
fs/Makefile
fs/adfs/super.c
fs/affs/super.c
fs/afs/super.c
fs/aio.c
fs/anon_inodes.c
fs/autofs4/init.c
fs/autofs4/inode.c
fs/befs/linuxvfs.c
fs/bfs/inode.c
fs/binfmt_aout.c
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/binfmt_em86.c
fs/binfmt_flat.c
fs/binfmt_misc.c
fs/binfmt_script.c
fs/binfmt_som.c
fs/btrfs/super.c
fs/cachefiles/namei.c
fs/ceph/super.c
fs/cifs/cifsacl.c
fs/cifs/cifsfs.c
fs/coda/inode.c
fs/configfs/configfs_internal.h
fs/configfs/dir.c
fs/configfs/inode.c
fs/configfs/mount.c
fs/configfs/symlink.c
fs/cramfs/inode.c
fs/dcache.c
fs/debugfs/file.c
fs/devpts/inode.c
fs/dlm/dir.c
fs/dlm/lock.c
fs/dlm/lock.h
fs/dlm/lowcomms.c
fs/ecryptfs/file.c
fs/ecryptfs/main.c
fs/ecryptfs/super.c
fs/efs/super.c
fs/exec.c
fs/exofs/namei.c
fs/exofs/super.c
fs/ext2/namei.c
fs/ext2/super.c
fs/ext3/super.c
fs/ext4/super.c
fs/fat/inode.c
fs/file_table.c
fs/freevxfs/vxfs_super.c
fs/fs_struct.c
fs/fuse/inode.c
fs/gfs2/bmap.c
fs/gfs2/file.c
fs/gfs2/glock.c
fs/gfs2/incore.h
fs/gfs2/inode.c
fs/gfs2/lock_dlm.c
fs/gfs2/log.c
fs/gfs2/log.h
fs/gfs2/lops.c
fs/gfs2/main.c
fs/gfs2/ops_fstype.c
fs/gfs2/quota.c
fs/gfs2/rgrp.c
fs/gfs2/rgrp.h
fs/gfs2/super.c
fs/gfs2/trace_gfs2.h
fs/gfs2/util.c
fs/gfs2/util.h
fs/gfs2/xattr.c
fs/hfs/super.c
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/hfsplus_raw.h
fs/hfsplus/inode.c
fs/hfsplus/ioctl.c
fs/hfsplus/super.c
fs/hostfs/hostfs_kern.c
fs/hpfs/super.c
fs/hppfs/hppfs.c
fs/hugetlbfs/inode.c
fs/inode.c
fs/isofs/inode.c
fs/jffs2/fs.c
fs/jfs/namei.c
fs/jfs/super.c
fs/libfs.c
fs/logfs/dir.c
fs/logfs/super.c
fs/minix/inode.c
fs/minix/minix.h
fs/minix/namei.c
fs/namei.c
fs/ncpfs/inode.c
fs/nfs/client.c
fs/nfs/getroot.c
fs/nfs/idmap.c
fs/nfsd/fault_inject.c
fs/nfsd/vfs.c
fs/nilfs2/namei.c
fs/nilfs2/super.c
fs/ntfs/super.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/super.c
fs/omfs/inode.c
fs/openpromfs/inode.c
fs/proc/inode.c
fs/proc/proc_sysctl.c
fs/proc/vmcore.c
fs/pstore/inode.c
fs/qnx4/inode.c
fs/qnx4/namei.c
fs/qnx4/qnx4.h
fs/qnx6/Kconfig [new file with mode: 0644]
fs/qnx6/Makefile [new file with mode: 0644]
fs/qnx6/README [new file with mode: 0644]
fs/qnx6/dir.c [new file with mode: 0644]
fs/qnx6/inode.c [new file with mode: 0644]
fs/qnx6/namei.c [new file with mode: 0644]
fs/qnx6/qnx6.h [new file with mode: 0644]
fs/qnx6/super_mmi.c [new file with mode: 0644]
fs/quota/dquot.c
fs/ramfs/inode.c
fs/reiserfs/acl.h [new file with mode: 0644]
fs/reiserfs/bitmap.c
fs/reiserfs/dir.c
fs/reiserfs/do_balan.c
fs/reiserfs/file.c
fs/reiserfs/fix_node.c
fs/reiserfs/hashes.c
fs/reiserfs/ibalance.c
fs/reiserfs/inode.c
fs/reiserfs/ioctl.c
fs/reiserfs/item_ops.c
fs/reiserfs/journal.c
fs/reiserfs/lbalance.c
fs/reiserfs/lock.c
fs/reiserfs/namei.c
fs/reiserfs/objectid.c
fs/reiserfs/prints.c
fs/reiserfs/procfs.c
fs/reiserfs/reiserfs.h [new file with mode: 0644]
fs/reiserfs/resize.c
fs/reiserfs/stree.c
fs/reiserfs/super.c
fs/reiserfs/tail_conversion.c
fs/reiserfs/xattr.c
fs/reiserfs/xattr.h [new file with mode: 0644]
fs/reiserfs/xattr_acl.c
fs/reiserfs/xattr_security.c
fs/reiserfs/xattr_trusted.c
fs/reiserfs/xattr_user.c
fs/romfs/super.c
fs/squashfs/super.c
fs/stat.c
fs/super.c
fs/sysfs/mount.c
fs/sysv/namei.c
fs/sysv/super.c
fs/sysv/sysv.h
fs/ubifs/super.c
fs/udf/namei.c
fs/udf/super.c
fs/ufs/namei.c
fs/ufs/super.c
fs/xfs/xfs_rename.c
fs/xfs/xfs_super.c
fs/xfs/xfs_utils.c
fs/xfs/xfs_vnodeops.c
include/linux/atomic.h
include/linux/audit.h
include/linux/binfmts.h
include/linux/crypto.h
include/linux/dcache.h
include/linux/debugfs.h
include/linux/device.h
include/linux/file.h
include/linux/fs.h
include/linux/gfs2_ondisk.h
include/linux/key.h
include/linux/magic.h
include/linux/mm.h
include/linux/of.h
include/linux/padata.h
include/linux/pci.h
include/linux/prctl.h
include/linux/qnx6_fs.h [new file with mode: 0644]
include/linux/reiserfs_acl.h [deleted file]
include/linux/reiserfs_fs.h
include/linux/reiserfs_fs_i.h [deleted file]
include/linux/reiserfs_fs_sb.h [deleted file]
include/linux/reiserfs_xattr.h
include/linux/security.h
include/linux/trace_seq.h
include/net/af_unix.h
include/net/sock.h
init/do_mounts_rd.c
ipc/mqueue.c
ipc/msgutil.c
kernel/audit.c
kernel/cgroup.c
kernel/cred.c
kernel/exit.c
kernel/fork.c
kernel/padata.c
kernel/sched/core.c
kernel/sysctl.c
kernel/trace/trace_output.c
mm/memory.c
mm/mmap.c
mm/mprotect.c
mm/mremap.c
mm/shmem.c
mm/swapfile.c
net/dns_resolver/dns_key.c
net/sunrpc/rpc_pipe.c
net/unix/af_unix.c
net/unix/diag.c
security/Kconfig
security/Makefile
security/apparmor/Makefile
security/apparmor/apparmorfs.c
security/apparmor/audit.c
security/apparmor/domain.c
security/apparmor/file.c
security/apparmor/include/apparmor.h
security/apparmor/include/apparmorfs.h
security/apparmor/include/audit.h
security/apparmor/include/file.h
security/apparmor/include/match.h
security/apparmor/include/path.h
security/apparmor/include/policy.h
security/apparmor/include/resource.h
security/apparmor/match.c
security/apparmor/path.c
security/apparmor/policy.c
security/apparmor/policy_unpack.c
security/apparmor/resource.c
security/capability.c
security/commoncap.c
security/integrity/ima/Kconfig
security/integrity/ima/ima_audit.c
security/integrity/ima/ima_policy.c
security/keys/keyctl.c
security/keys/process_keys.c
security/lsm_audit.c
security/security.c
security/selinux/hooks.c
security/smack/smack_lsm.c
security/tomoyo/audit.c
security/tomoyo/common.c
security/tomoyo/common.h
security/tomoyo/mount.c
security/tomoyo/securityfs_if.c
security/yama/Kconfig [new file with mode: 0644]
security/yama/Makefile [new file with mode: 0644]
security/yama/yama_lsm.c [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
new file mode 100644 (file)
index 0000000..bc8ded6
--- /dev/null
@@ -0,0 +1,63 @@
+* FSL MPIC Message Registers
+
+This binding specifies what properties must be available in the device tree
+representation of the message register blocks found in some FSL MPIC
+implementations.
+
+Required properties:
+
+    - compatible: Specifies the compatibility list for the message register
+      block.  The type shall be <string-list> and the value shall be of the form
+      "fsl,mpic-v<version>-msgr", where <version> is the version number of
+      the MPIC containing the message registers.
+
+    - reg: Specifies the base physical address(s) and size(s) of the
+      message register block's addressable register space.  The type shall be
+      <prop-encoded-array>.
+
+    - interrupts: Specifies a list of interrupt-specifiers which are available
+      for receiving interrupts. Interrupt-specifier consists of two cells: first
+      cell is interrupt-number and second cell is level-sense. The type shall be
+      <prop-encoded-array>.
+
+Optional properties:
+
+    - mpic-msgr-receive-mask: Specifies what registers in the containing block
+      are allowed to receive interrupts. The value is a bit mask where a set
+      bit at bit 'n' indicates that message register 'n' can receive interrupts.
+      Note that "bit 'n'" is numbered from LSB for PPC hardware. The type shall
+      be <u32>. If not present, then all of the message registers in the block
+      are available.
+
+Aliases:
+
+    An alias should be created for every message register block.  They are not
+    required, though.  However, a particular implementation of this binding
+    may require aliases to be present.  Aliases are of the form
+    'mpic-msgr-block<n>', where <n> is an integer specifying the block's number.
+    Numbers shall start at 0.
+
+Example:
+
+       aliases {
+               mpic-msgr-block0 = &mpic_msgr_block0;
+               mpic-msgr-block1 = &mpic_msgr_block1;
+       };
+
+       mpic_msgr_block0: mpic-msgr-block@41400 {
+               compatible = "fsl,mpic-v3.1-msgr";
+               reg = <0x41400 0x200>;
+               // Message registers 0 and 2 in this block can receive interrupts on
+               // sources 0xb0 and 0xb2, respectively.
+               interrupts = <0xb0 2 0xb2 2>;
+               mpic-msgr-receive-mask = <0x5>;
+       };
+
+       mpic_msgr_block1: mpic-msgr-block@42400 {
+               compatible = "fsl,mpic-v3.1-msgr";
+               reg = <0x42400 0x200>;
+               // Message registers 0 and 2 in this block can receive interrupts on
+               // sources 0xb4 and 0xb6, respectively.
+               interrupts = <0xb4 2 0xb6 2>;
+               mpic-msgr-receive-mask = <0x5>;
+       };
index 2cf38bd841fd5776028803a11882036dccb3e38c..dc5744636a5792610f48e34812569acd25b3eda9 100644 (file)
@@ -56,7 +56,27 @@ PROPERTIES
           to the client.  The presence of this property also mandates
           that any initialization related to interrupt sources shall
           be limited to sources explicitly referenced in the device tree.
-       
+
+  - big-endian
+      Usage: optional
+      Value type: <empty>
+          If present the MPIC will be assumed to be big-endian.  Some
+          device-trees omit this property on MPIC nodes even when the MPIC is
+          in fact big-endian, so certain boards override this property.
+
+  - single-cpu-affinity
+      Usage: optional
+      Value type: <empty>
+          If present the MPIC will be assumed to only be able to route
+          non-IPI interrupts to a single CPU at a time (EG: Freescale MPIC).
+
+  - last-interrupt-source
+      Usage: optional
+      Value type: <u32>
+          Some MPICs do not correctly report the number of hardware sources
+          in the global feature registers.  If specified, this field will
+          override the value read from MPIC_GREG_FEATURE_LAST_SRC.
+
 INTERRUPT SPECIFIER DEFINITION
 
   Interrupt specifiers consists of 4 cells encoded as
index 5d586e1ccaf504d6a6834b38605f864fd168eb23..5693877ab377d6007cdb9e7f4ae7705faec581d7 100644 (file)
@@ -6,8 +6,10 @@ Required properties:
   etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on
   the parent type.
 
-- reg : should contain the address and the length of the shared message
-  interrupt register set.
+- reg : It may contain one or two regions. The first region should contain
+  the address and the length of the shared message interrupt register set.
+  The second region should contain the address of aliased MSIIR register for
+  platforms that have such an alias.
 
 - msi-available-ranges: use <start count> style section to define which
   msi interrupt can be used in the 256 msi interrupts. This property is
index 4e25758731870cab4666c3f00a431155f3594670..7a34f827989c1fe5c1f3c29bebf57d101150322c 100644 (file)
@@ -136,7 +136,7 @@ file.
        void __iomem *base;
     };
 
-    struct dentry *debugfs_create_regset32(const char *name, mode_t mode,
+    struct dentry *debugfs_create_regset32(const char *name, umode_t mode,
                                     struct dentry *parent,
                                     struct debugfs_regset32 *regset);
 
index b4a3d765ff9ac07aa41e8d12ddbd4e97be5b9bc6..74acd9618819b0adc61d13bfe82fee438f602c1f 100644 (file)
@@ -429,3 +429,9 @@ filemap_write_and_wait_range() so that all dirty pages are synced out properly.
 You must also keep in mind that ->fsync() is not called with i_mutex held
 anymore, so if you require i_mutex locking you must make sure to take it and
 release it yourself.
+
+--
+[mandatory]
+       d_alloc_root() is gone, along with a lot of bugs caused by code
+misusing it.  Replacement: d_make_root(inode).  The difference is,
+d_make_root() drops the reference to inode if dentry allocation fails.  
diff --git a/Documentation/filesystems/qnx6.txt b/Documentation/filesystems/qnx6.txt
new file mode 100644 (file)
index 0000000..050223e
--- /dev/null
@@ -0,0 +1,174 @@
+The QNX6 Filesystem
+===================
+
+The qnx6fs is used by newer QNX operating system versions. (e.g. Neutrino)
+It got introduced in QNX 6.4.0 and is used default since 6.4.1.
+
+Option
+======
+
+mmi_fs         Mount filesystem as used for example by Audi MMI 3G system
+
+Specification
+=============
+
+qnx6fs shares many properties with traditional Unix filesystems. It has the
+concepts of blocks, inodes and directories.
+On QNX it is possible to create little endian and big endian qnx6 filesystems.
+This feature makes it possible to create and use a different endianness fs
+for the target (QNX is used on quite a range of embedded systems) plattform
+running on a different endianess.
+The Linux driver handles endianness transparently. (LE and BE)
+
+Blocks
+------
+
+The space in the device or file is split up into blocks. These are a fixed
+size of 512, 1024, 2048 or 4096, which is decided when the filesystem is
+created.
+Blockpointers are 32bit, so the maximum space that can be adressed is
+2^32 * 4096 bytes or 16TB
+
+The superblocks
+---------------
+
+The superblock contains all global information about the filesystem.
+Each qnx6fs got two superblocks, each one having a 64bit serial number.
+That serial number is used to identify the "active" superblock.
+In write mode with reach new snapshot (after each synchronous write), the
+serial of the new master superblock is increased (old superblock serial + 1)
+
+So basically the snapshot functionality is realized by an atomic final
+update of the serial number. Before updating that serial, all modifications
+are done by copying all modified blocks during that specific write request
+(or period) and building up a new (stable) filesystem structure under the
+inactive superblock.
+
+Each superblock holds a set of root inodes for the different filesystem
+parts. (Inode, Bitmap and Longfilenames)
+Each of these root nodes holds information like total size of the stored
+data and the adressing levels in that specific tree.
+If the level value is 0, up to 16 direct blocks can be adressed by each
+node.
+Level 1 adds an additional indirect adressing level where each indirect
+adressing block holds up to blocksize / 4 bytes pointers to data blocks.
+Level 2 adds an additional indirect adressig block level (so, already up
+to 16 * 256 * 256 = 1048576 blocks that can be adressed by such a tree)a
+
+Unused block pointers are always set to ~0 - regardless of root node,
+indirect adressing blocks or inodes.
+Data leaves are always on the lowest level. So no data is stored on upper
+tree levels.
+
+The first Superblock is located at 0x2000. (0x2000 is the bootblock size)
+The Audi MMI 3G first superblock directly starts at byte 0.
+Second superblock position can either be calculated from the superblock
+information (total number of filesystem blocks) or by taking the highest
+device address, zeroing the last 3 bytes and then substracting 0x1000 from
+that address.
+
+0x1000 is the size reserved for each superblock - regardless of the
+blocksize of the filesystem.
+
+Inodes
+------
+
+Each object in the filesystem is represented by an inode. (index node)
+The inode structure contains pointers to the filesystem blocks which contain
+the data held in the object and all of the metadata about an object except
+its longname. (filenames longer than 27 characters)
+The metadata about an object includes the permissions, owner, group, flags,
+size, number of blocks used, access time, change time and modification time.
+
+Object mode field is POSIX format. (which makes things easier)
+
+There are also pointers to the first 16 blocks, if the object data can be
+adressed with 16 direct blocks.
+For more than 16 blocks an indirect adressing in form of another tree is
+used. (scheme is the same as the one used for the superblock root nodes)
+
+The filesize is stored 64bit. Inode counting starts with 1. (whilst long
+filename inodes start with 0)
+
+Directories
+-----------
+
+A directory is a filesystem object and has an inode just like a file.
+It is a specially formatted file containing records which associate each
+name with an inode number.
+'.' inode number points to the directory inode
+'..' inode number points to the parent directory inode
+Eeach filename record additionally got a filename length field.
+
+One special case are long filenames or subdirectory names.
+These got set a filename length field of 0xff in the corresponding directory
+record plus the longfile inode number also stored in that record.
+With that longfilename inode number, the longfilename tree can be walked
+starting with the superblock longfilename root node pointers.
+
+Special files
+-------------
+
+Symbolic links are also filesystem objects with inodes. They got a specific
+bit in the inode mode field identifying them as symbolic link.
+The directory entry file inode pointer points to the target file inode.
+
+Hard links got an inode, a directory entry, but a specific mode bit set,
+no block pointers and the directory file record pointing to the target file
+inode.
+
+Character and block special devices do not exist in QNX as those files
+are handled by the QNX kernel/drivers and created in /dev independant of the
+underlaying filesystem.
+
+Long filenames
+--------------
+
+Long filenames are stored in a seperate adressing tree. The staring point
+is the longfilename root node in the active superblock.
+Each data block (tree leaves) holds one long filename. That filename is
+limited to 510 bytes. The first two starting bytes are used as length field
+for the actual filename.
+If that structure shall fit for all allowed blocksizes, it is clear why there
+is a limit of 510 bytes for the actual filename stored.
+
+Bitmap
+------
+
+The qnx6fs filesystem allocation bitmap is stored in a tree under bitmap
+root node in the superblock and each bit in the bitmap represents one
+filesystem block.
+The first block is block 0, which starts 0x1000 after superblock start.
+So for a normal qnx6fs 0x3000 (bootblock + superblock) is the physical
+address at which block 0 is located.
+
+Bits at the end of the last bitmap block are set to 1, if the device is
+smaller than addressing space in the bitmap.
+
+Bitmap system area
+------------------
+
+The bitmap itself is devided into three parts.
+First the system area, that is split into two halfs.
+Then userspace.
+
+The requirement for a static, fixed preallocated system area comes from how
+qnx6fs deals with writes.
+Each superblock got it's own half of the system area. So superblock #1
+always uses blocks from the lower half whilst superblock #2 just writes to
+blocks represented by the upper half bitmap system area bits.
+
+Bitmap blocks, Inode blocks and indirect addressing blocks for those two
+tree structures are treated as system blocks.
+
+The rational behind that is that a write request can work on a new snapshot
+(system area of the inactive - resp. lower serial numbered superblock) while
+at the same time there is still a complete stable filesystem structer in the
+other half of the system area.
+
+When finished with writing (a sync write is completed, the maximum sync leap
+time or a filesystem sync is requested), serial of the previously inactive
+superblock atomically is increased and the fs switches over to that - then
+stable declared - superblock.
+
+For all data outside the system area, blocks are just copied while writing.
index 68fbfb6529eb310df46cc5f5aa7aee9e6d78c5b6..3b7488fc33730c3098a62cea18f6d0b0de3ef584 100644 (file)
@@ -218,6 +218,7 @@ Code  Seq#(hex)     Include File            Comments
 'h'    00-7F                           conflict! Charon filesystem
                                        <mailto:zapman@interlan.net>
 'h'    00-1F   linux/hpet.h            conflict!
+'h'    80-8F   fs/hfsplus/ioctl.c
 'i'    00-3F   linux/i2o-dev.h         conflict!
 'i'    0B-1F   linux/ipmi.h            conflict!
 'i'    80-8F   linux/i8k.h
index 7f531ad83285ced1d2cc24d513d611e0c8156c47..d86adcdae4202a9b502073ef03fa058f46136306 100644 (file)
@@ -102,6 +102,10 @@ implemented in the module can be called after doing:
      If _expiry is non-NULL, the expiry time (TTL) of the result will be
      returned also.
 
+The kernel maintains an internal keyring in which it caches looked up keys.
+This can be cleared by any process that has the CAP_SYS_ADMIN capability by
+the use of KEYCTL_KEYRING_CLEAR on the keyring ID.
+
 
 ===============================
 READING DNS KEYS FROM USERSPACE
diff --git a/Documentation/powerpc/firmware-assisted-dump.txt b/Documentation/powerpc/firmware-assisted-dump.txt
new file mode 100644 (file)
index 0000000..3007bc9
--- /dev/null
@@ -0,0 +1,270 @@
+
+                   Firmware-Assisted Dump
+                   ------------------------
+                       July 2011
+
+The goal of firmware-assisted dump is to enable the dump of
+a crashed system, and to do so from a fully-reset system, and
+to minimize the total elapsed time until the system is back
+in production use.
+
+- Firmware assisted dump (fadump) infrastructure is intended to replace
+  the existing phyp assisted dump.
+- Fadump uses the same firmware interfaces and memory reservation model
+  as phyp assisted dump.
+- Unlike phyp dump, fadump exports the memory dump through /proc/vmcore
+  in the ELF format in the same way as kdump. This helps us reuse the
+  kdump infrastructure for dump capture and filtering.
+- Unlike phyp dump, userspace tool does not need to refer any sysfs
+  interface while reading /proc/vmcore.
+- Unlike phyp dump, fadump allows user to release all the memory reserved
+  for dump, with a single operation of echo 1 > /sys/kernel/fadump_release_mem.
+- Once enabled through kernel boot parameter, fadump can be
+  started/stopped through /sys/kernel/fadump_registered interface (see
+  sysfs files section below) and can be easily integrated with kdump
+  service start/stop init scripts.
+
+Comparing with kdump or other strategies, firmware-assisted
+dump offers several strong, practical advantages:
+
+-- Unlike kdump, the system has been reset, and loaded
+   with a fresh copy of the kernel.  In particular,
+   PCI and I/O devices have been reinitialized and are
+   in a clean, consistent state.
+-- Once the dump is copied out, the memory that held the dump
+   is immediately available to the running kernel. And therefore,
+   unlike kdump, fadump doesn't need a 2nd reboot to get back
+   the system to the production configuration.
+
+The above can only be accomplished by coordination with,
+and assistance from the Power firmware. The procedure is
+as follows:
+
+-- The first kernel registers the sections of memory with the
+   Power firmware for dump preservation during OS initialization.
+   These registered sections of memory are reserved by the first
+   kernel during early boot.
+
+-- When a system crashes, the Power firmware will save
+   the low memory (boot memory of size larger of 5% of system RAM
+   or 256MB) of RAM to the previous registered region. It will
+   also save system registers, and hardware PTE's.
+
+   NOTE: The term 'boot memory' means size of the low memory chunk
+         that is required for a kernel to boot successfully when
+         booted with restricted memory. By default, the boot memory
+         size will be the larger of 5% of system RAM or 256MB.
+         Alternatively, user can also specify boot memory size
+         through boot parameter 'fadump_reserve_mem=' which will
+         override the default calculated size. Use this option
+         if default boot memory size is not sufficient for second
+         kernel to boot successfully.
+
+-- After the low memory (boot memory) area has been saved, the
+   firmware will reset PCI and other hardware state.  It will
+   *not* clear the RAM. It will then launch the bootloader, as
+   normal.
+
+-- The freshly booted kernel will notice that there is a new
+   node (ibm,dump-kernel) in the device tree, indicating that
+   there is crash data available from a previous boot. During
+   the early boot OS will reserve rest of the memory above
+   boot memory size effectively booting with restricted memory
+   size. This will make sure that the second kernel will not
+   touch any of the dump memory area.
+
+-- User-space tools will read /proc/vmcore to obtain the contents
+   of memory, which holds the previous crashed kernel dump in ELF
+   format. The userspace tools may copy this info to disk, or
+   network, nas, san, iscsi, etc. as desired.
+
+-- Once the userspace tool is done saving dump, it will echo
+   '1' to /sys/kernel/fadump_release_mem to release the reserved
+   memory back to general use, except the memory required for
+   next firmware-assisted dump registration.
+
+   e.g.
+     # echo 1 > /sys/kernel/fadump_release_mem
+
+Please note that the firmware-assisted dump feature
+is only available on Power6 and above systems with recent
+firmware versions.
+
+Implementation details:
+----------------------
+
+During boot, a check is made to see if firmware supports
+this feature on that particular machine. If it does, then
+we check to see if an active dump is waiting for us. If yes
+then everything but boot memory size of RAM is reserved during
+early boot (See Fig. 2). This area is released once we finish
+collecting the dump from user land scripts (e.g. kdump scripts)
+that are run. If there is dump data, then the
+/sys/kernel/fadump_release_mem file is created, and the reserved
+memory is held.
+
+If there is no waiting dump data, then only the memory required
+to hold CPU state, HPTE region, boot memory dump and elfcore
+header, is reserved at the top of memory (see Fig. 1). This area
+is *not* released: this region will be kept permanently reserved,
+so that it can act as a receptacle for a copy of the boot memory
+content in addition to CPU state and HPTE region, in the case a
+crash does occur.
+
+  o Memory Reservation during first kernel
+
+  Low memory                                        Top of memory
+  0      boot memory size                                       |
+  |           |                       |<--Reserved dump area -->|
+  V           V                       |   Permanent Reservation V
+  +-----------+----------/ /----------+---+----+-----------+----+
+  |           |                       |CPU|HPTE|  DUMP     |ELF |
+  +-----------+----------/ /----------+---+----+-----------+----+
+        |                                           ^
+        |                                           |
+        \                                           /
+         -------------------------------------------
+          Boot memory content gets transferred to
+          reserved area by firmware at the time of
+          crash
+                   Fig. 1
+
+  o Memory Reservation during second kernel after crash
+
+  Low memory                                        Top of memory
+  0      boot memory size                                       |
+  |           |<------------- Reserved dump area ----------- -->|
+  V           V                                                 V
+  +-----------+----------/ /----------+---+----+-----------+----+
+  |           |                       |CPU|HPTE|  DUMP     |ELF |
+  +-----------+----------/ /----------+---+----+-----------+----+
+        |                                                    |
+        V                                                    V
+   Used by second                                    /proc/vmcore
+   kernel to boot
+                   Fig. 2
+
+Currently the dump will be copied from /proc/vmcore to a
+a new file upon user intervention. The dump data available through
+/proc/vmcore will be in ELF format. Hence the existing kdump
+infrastructure (kdump scripts) to save the dump works fine with
+minor modifications.
+
+The tools to examine the dump will be same as the ones
+used for kdump.
+
+How to enable firmware-assisted dump (fadump):
+-------------------------------------
+
+1. Set config option CONFIG_FA_DUMP=y and build kernel.
+2. Boot into linux kernel with 'fadump=on' kernel cmdline option.
+3. Optionally, user can also set 'fadump_reserve_mem=' kernel cmdline
+   to specify size of the memory to reserve for boot memory dump
+   preservation.
+
+NOTE: If firmware-assisted dump fails to reserve memory then it will
+   fallback to existing kdump mechanism if 'crashkernel=' option
+   is set at kernel cmdline.
+
+Sysfs/debugfs files:
+------------
+
+Firmware-assisted dump feature uses sysfs file system to hold
+the control files and debugfs file to display memory reserved region.
+
+Here is the list of files under kernel sysfs:
+
+ /sys/kernel/fadump_enabled
+
+    This is used to display the fadump status.
+    0 = fadump is disabled
+    1 = fadump is enabled
+
+    This interface can be used by kdump init scripts to identify if
+    fadump is enabled in the kernel and act accordingly.
+
+ /sys/kernel/fadump_registered
+
+    This is used to display the fadump registration status as well
+    as to control (start/stop) the fadump registration.
+    0 = fadump is not registered.
+    1 = fadump is registered and ready to handle system crash.
+
+    To register fadump echo 1 > /sys/kernel/fadump_registered and
+    echo 0 > /sys/kernel/fadump_registered for un-register and stop the
+    fadump. Once the fadump is un-registered, the system crash will not
+    be handled and vmcore will not be captured. This interface can be
+    easily integrated with kdump service start/stop.
+
+ /sys/kernel/fadump_release_mem
+
+    This file is available only when fadump is active during
+    second kernel. This is used to release the reserved memory
+    region that are held for saving crash dump. To release the
+    reserved memory echo 1 to it:
+
+    echo 1  > /sys/kernel/fadump_release_mem
+
+    After echo 1, the content of the /sys/kernel/debug/powerpc/fadump_region
+    file will change to reflect the new memory reservations.
+
+    The existing userspace tools (kdump infrastructure) can be easily
+    enhanced to use this interface to release the memory reserved for
+    dump and continue without 2nd reboot.
+
+Here is the list of files under powerpc debugfs:
+(Assuming debugfs is mounted on /sys/kernel/debug directory.)
+
+ /sys/kernel/debug/powerpc/fadump_region
+
+    This file shows the reserved memory regions if fadump is
+    enabled otherwise this file is empty. The output format
+    is:
+    <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size>
+
+    e.g.
+    Contents when fadump is registered during first kernel
+
+    # cat /sys/kernel/debug/powerpc/fadump_region
+    CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0
+    HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0
+    DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0
+
+    Contents when fadump is active during second kernel
+
+    # cat /sys/kernel/debug/powerpc/fadump_region
+    CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x40020
+    HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x1000
+    DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x10000000
+        : [0x00000010000000-0x0000006ffaffff] 0x5ffb0000 bytes, Dumped: 0x5ffb0000
+
+NOTE: Please refer to Documentation/filesystems/debugfs.txt on
+      how to mount the debugfs filesystem.
+
+
+TODO:
+-----
+ o Need to come up with the better approach to find out more
+   accurate boot memory size that is required for a kernel to
+   boot successfully when booted with restricted memory.
+ o The fadump implementation introduces a fadump crash info structure
+   in the scratch area before the ELF core header. The idea of introducing
+   this structure is to pass some important crash info data to the second
+   kernel which will help second kernel to populate ELF core header with
+   correct data before it gets exported through /proc/vmcore. The current
+   design implementation does not address a possibility of introducing
+   additional fields (in future) to this structure without affecting
+   compatibility. Need to come up with the better approach to address this.
+   The possible approaches are:
+       1. Introduce version field for version tracking, bump up the version
+       whenever a new field is added to the structure in future. The version
+       field can be used to find out what fields are valid for the current
+       version of the structure.
+       2. Reserve the area of predefined size (say PAGE_SIZE) for this
+       structure and have unused area as reserved (initialized to zero)
+       for future field additions.
+   The advantage of approach 1 over 2 is we don't need to reserve extra space.
+---
+Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
+This document is based on the original documentation written for phyp
+assisted dump by Linas Vepstas and Manish Ahuja.
index 10dd4ab93b85ee1ce6e74a0dd88f32465bde48bc..0d540a31ea1ab32637e103b251860d0485e34a54 100644 (file)
@@ -2,7 +2,7 @@ Linux 2.6.x on MPC52xx family
 -----------------------------
 
 For the latest info, go to http://www.246tNt.com/mpc52xx/
+
 To compile/use :
 
   - U-Boot:
@@ -10,23 +10,23 @@ To compile/use :
         if you wish to ).
      # make lite5200_defconfig
      # make uImage
-    
+
      then, on U-boot:
      => tftpboot 200000 uImage
      => tftpboot 400000 pRamdisk
      => bootm 200000 400000
-    
+
   - DBug:
      # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION
         if you wish to ).
      # make lite5200_defconfig
      # cp your_initrd.gz arch/ppc/boot/images/ramdisk.image.gz
-     # make zImage.initrd 
-     # make 
+     # make zImage.initrd
+     # make
 
      then in DBug:
      DBug> dn -i zImage.initrd.lite5200
-     
+
 
 Some remarks :
  - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100
diff --git a/Documentation/powerpc/phyp-assisted-dump.txt b/Documentation/powerpc/phyp-assisted-dump.txt
deleted file mode 100644 (file)
index ad34020..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-
-                   Hypervisor-Assisted Dump
-                   ------------------------
-                       November 2007
-
-The goal of hypervisor-assisted dump is to enable the dump of
-a crashed system, and to do so from a fully-reset system, and
-to minimize the total elapsed time until the system is back
-in production use.
-
-As compared to kdump or other strategies, hypervisor-assisted
-dump offers several strong, practical advantages:
-
--- Unlike kdump, the system has been reset, and loaded
-   with a fresh copy of the kernel.  In particular,
-   PCI and I/O devices have been reinitialized and are
-   in a clean, consistent state.
--- As the dump is performed, the dumped memory becomes
-   immediately available to the system for normal use.
--- After the dump is completed, no further reboots are
-   required; the system will be fully usable, and running
-   in its normal, production mode on its normal kernel.
-
-The above can only be accomplished by coordination with,
-and assistance from the hypervisor. The procedure is
-as follows:
-
--- When a system crashes, the hypervisor will save
-   the low 256MB of RAM to a previously registered
-   save region. It will also save system state, system
-   registers, and hardware PTE's.
-
--- After the low 256MB area has been saved, the
-   hypervisor will reset PCI and other hardware state.
-   It will *not* clear RAM. It will then launch the
-   bootloader, as normal.
-
--- The freshly booted kernel will notice that there
-   is a new node (ibm,dump-kernel) in the device tree,
-   indicating that there is crash data available from
-   a previous boot. It will boot into only 256MB of RAM,
-   reserving the rest of system memory.
-
--- Userspace tools will parse /sys/kernel/release_region
-   and read /proc/vmcore to obtain the contents of memory,
-   which holds the previous crashed kernel. The userspace
-   tools may copy this info to disk, or network, nas, san,
-   iscsi, etc. as desired.
-
-   For Example: the values in /sys/kernel/release-region
-   would look something like this (address-range pairs).
-   CPU:0x177fee000-0x10000: HPTE:0x177ffe020-0x1000: /
-   DUMP:0x177fff020-0x10000000, 0x10000000-0x16F1D370A
-
--- As the userspace tools complete saving a portion of
-   dump, they echo an offset and size to
-   /sys/kernel/release_region to release the reserved
-   memory back to general use.
-
-   An example of this is:
-     "echo 0x40000000 0x10000000 > /sys/kernel/release_region"
-   which will release 256MB at the 1GB boundary.
-
-Please note that the hypervisor-assisted dump feature
-is only available on Power6-based systems with recent
-firmware versions.
-
-Implementation details:
-----------------------
-
-During boot, a check is made to see if firmware supports
-this feature on this particular machine. If it does, then
-we check to see if a active dump is waiting for us. If yes
-then everything but 256 MB of RAM is reserved during early
-boot. This area is released once we collect a dump from user
-land scripts that are run. If there is dump data, then
-the /sys/kernel/release_region file is created, and
-the reserved memory is held.
-
-If there is no waiting dump data, then only the highest
-256MB of the ram is reserved as a scratch area. This area
-is *not* released: this region will be kept permanently
-reserved, so that it can act as a receptacle for a copy
-of the low 256MB in the case a crash does occur. See,
-however, "open issues" below, as to whether
-such a reserved region is really needed.
-
-Currently the dump will be copied from /proc/vmcore to a
-a new file upon user intervention. The starting address
-to be read and the range for each data point in provided
-in /sys/kernel/release_region.
-
-The tools to examine the dump will be same as the ones
-used for kdump.
-
-General notes:
---------------
-Security: please note that there are potential security issues
-with any sort of dump mechanism. In particular, plaintext
-(unencrypted) data, and possibly passwords, may be present in
-the dump data. Userspace tools must take adequate precautions to
-preserve security.
-
-Open issues/ToDo:
-------------
- o The various code paths that tell the hypervisor that a crash
-   occurred, vs. it simply being a normal reboot, should be
-   reviewed, and possibly clarified/fixed.
-
- o Instead of using /sys/kernel, should there be a /sys/dump
-   instead? There is a dump_subsys being created by the s390 code,
-   perhaps the pseries code should use a similar layout as well.
-
- o Is reserving a 256MB region really required? The goal of
-   reserving a 256MB scratch area is to make sure that no
-   important crash data is clobbered when the hypervisor
-   save low mem to the scratch area. But, if one could assure
-   that nothing important is located in some 256MB area, then
-   it would not need to be reserved. Something that can be
-   improved in subsequent versions.
-
- o Still working the kdump team to integrate this with kdump,
-   some work remains but this would not affect the current
-   patches.
-
- o Still need to write a shell script, to copy the dump away.
-   Currently I am parsing it manually.
index 99b85d39751cd76160d09e111d5e36f75047f39f..eeed1de546d4d178a8d6c8e91da1012b71d9c970 100644 (file)
@@ -6,6 +6,8 @@ SELinux.txt
        - how to get started with the SELinux security enhancement.
 Smack.txt
        - documentation on the Smack Linux Security Module.
+Yama.txt
+       - documentation on the Yama Linux Security Module.
 apparmor.txt
        - documentation on the AppArmor security extension.
 credentials.txt
diff --git a/Documentation/security/Yama.txt b/Documentation/security/Yama.txt
new file mode 100644 (file)
index 0000000..a9511f1
--- /dev/null
@@ -0,0 +1,65 @@
+Yama is a Linux Security Module that collects a number of system-wide DAC
+security protections that are not handled by the core kernel itself. To
+select it at boot time, specify "security=yama" (though this will disable
+any other LSM).
+
+Yama is controlled through sysctl in /proc/sys/kernel/yama:
+
+- ptrace_scope
+
+==============================================================
+
+ptrace_scope:
+
+As Linux grows in popularity, it will become a larger target for
+malware. One particularly troubling weakness of the Linux process
+interfaces is that a single user is able to examine the memory and
+running state of any of their processes. For example, if one application
+(e.g. Pidgin) was compromised, it would be possible for an attacker to
+attach to other running processes (e.g. Firefox, SSH sessions, GPG agent,
+etc) to extract additional credentials and continue to expand the scope
+of their attack without resorting to user-assisted phishing.
+
+This is not a theoretical problem. SSH session hijacking
+(http://www.storm.net.nz/projects/7) and arbitrary code injection
+(http://c-skills.blogspot.com/2007/05/injectso.html) attacks already
+exist and remain possible if ptrace is allowed to operate as before.
+Since ptrace is not commonly used by non-developers and non-admins, system
+builders should be allowed the option to disable this debugging system.
+
+For a solution, some applications use prctl(PR_SET_DUMPABLE, ...) to
+specifically disallow such ptrace attachment (e.g. ssh-agent), but many
+do not. A more general solution is to only allow ptrace directly from a
+parent to a child process (i.e. direct "gdb EXE" and "strace EXE" still
+work), or with CAP_SYS_PTRACE (i.e. "gdb --pid=PID", and "strace -p PID"
+still work as root).
+
+For software that has defined application-specific relationships
+between a debugging process and its inferior (crash handlers, etc),
+prctl(PR_SET_PTRACER, pid, ...) can be used. An inferior can declare which
+other process (and its descendents) are allowed to call PTRACE_ATTACH
+against it. Only one such declared debugging process can exists for
+each inferior at a time. For example, this is used by KDE, Chromium, and
+Firefox's crash handlers, and by Wine for allowing only Wine processes
+to ptrace each other. If a process wishes to entirely disable these ptrace
+restrictions, it can call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, ...)
+so that any otherwise allowed process (even those in external pid namespaces)
+may attach.
+
+The sysctl settings are:
+
+0 - classic ptrace permissions: a process can PTRACE_ATTACH to any other
+    process running under the same uid, as long as it is dumpable (i.e.
+    did not transition uids, start privileged, or have called
+    prctl(PR_SET_DUMPABLE...) already).
+
+1 - restricted ptrace: a process must have a predefined relationship
+    with the inferior it wants to call PTRACE_ATTACH on. By default,
+    this relationship is that of only its descendants when the above
+    classic criteria is also met. To change the relationship, an
+    inferior can call prctl(PR_SET_PTRACER, debugger, ...) to declare
+    an allowed debugger PID to call PTRACE_ATTACH on the inferior.
+
+The original children-only logic was based on the restrictions in grsecurity.
+
+==============================================================
index fcbe7a70340574de9ff4e2ad12ac53ea212fc338..787717091421d54ec330f51bdaed0f2520749da8 100644 (file)
@@ -554,6 +554,10 @@ The keyctl syscall functions are:
      process must have write permission on the keyring, and it must be a
      keyring (or else error ENOTDIR will result).
 
+     This function can also be used to clear special kernel keyrings if they
+     are appropriately marked if the user has CAP_SYS_ADMIN capability.  The
+     DNS resolver cache keyring is an example of this.
+
 
  (*) Link a key into a keyring:
 
index 92f9924c4335dd9e758851e3a995062ac78e7861..58f60356f0714daf4efc0751f4068d47b1db3110 100644 (file)
@@ -4071,7 +4071,7 @@ M:        Josh Boyer <jwboyer@gmail.com>
 M:     Matt Porter <mporter@kernel.crashing.org>
 W:     http://www.penguinppc.org/
 L:     linuxppc-dev@lists.ozlabs.org
-T:     git git://git.infradead.org/users/jwboyer/powerpc-4xx.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
 S:     Maintained
 F:     arch/powerpc/platforms/40x/
 F:     arch/powerpc/platforms/44x/
index 3fcfad4101300ea1a94992022f4b5084d119d0f9..d1f474d1d44d653bb3c37cc9a696b598e1f5a379 100644 (file)
@@ -46,6 +46,7 @@ static struct linux_binfmt loader_format = {
 
 static int __init init_loader_binfmt(void)
 {
-       return insert_binfmt(&loader_format);
+       insert_binfmt(&loader_format);
+       return 0;
 }
 arch_initcall(init_loader_binfmt);
index 1fa26d9a1a6810cfbeb0cfb0ce3f86f62bc9e849..ea49bd93c6b9dbdb374a2fbb72f6b79fc2be1ad6 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <linux/kernel.h>
 #include <linux/io.h>
+#include <linux/module.h>
 
 #include <mach/iomap.h>
 
@@ -58,6 +59,7 @@ unsigned long long tegra_chip_uid(void)
        hi = fuse_readl(FUSE_UID_HIGH);
        return (hi << 32ull) | lo;
 }
+EXPORT_SYMBOL(tegra_chip_uid);
 
 int tegra_sku_id(void)
 {
index ae413d4a8bb770783661104ba6d8d77ae0c3a103..d318c606c8883d20c8b7e3230d71852091d8a3c6 100644 (file)
@@ -7,6 +7,7 @@ config M68K
        select GENERIC_IRQ_SHOW
        select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
        select GENERIC_CPU_DEVICES
+       select FPU if MMU
 
 config RWSEM_GENERIC_SPINLOCK
        bool
@@ -24,9 +25,6 @@ config ARCH_HAS_ILOG2_U64
 config GENERIC_CLOCKEVENTS
        bool
 
-config GENERIC_CMOS_UPDATE
-       def_bool !MMU
-
 config GENERIC_GPIO
        bool
 
@@ -67,6 +65,9 @@ config CPU_HAS_NO_MULDIV64
 config CPU_HAS_ADDRESS_SPACES
        bool
 
+config FPU
+       bool
+
 config HZ
        int
        default 1000 if CLEOPATRA
index 9015eadd5c003cf3bebb89cfa2407dd2083b927f..69722366b084bc10e34c2d1ef9a01b78fdd146a2 100644 (file)
 #define        MCFDMA_BASE1            (MCF_MBAR + 0x240)      /* Base address DMA 1 */
 
 #if defined(CONFIG_NETtel)
-#define        MCFUART_BASE1           0x180           /* Base address of UART1 */
-#define        MCFUART_BASE2           0x140           /* Base address of UART2 */
+#define        MCFUART_BASE0           (MCF_MBAR + 0x180)      /* Base address UART0 */
+#define        MCFUART_BASE1           (MCF_MBAR + 0x140)      /* Base address UART1 */
 #else
-#define        MCFUART_BASE1           0x140           /* Base address of UART1 */
-#define        MCFUART_BASE2           0x180           /* Base address of UART2 */
+#define        MCFUART_BASE0           (MCF_MBAR + 0x140)      /* Base address UART0 */
+#define        MCFUART_BASE1           (MCF_MBAR + 0x180)      /* Base address UART1 */
 #endif
 
 /*
  */
 #define        MCF_IRQ_TIMER           30              /* Timer0, Level 6 */
 #define        MCF_IRQ_PROFILER        31              /* Timer1, Level 7 */
+#define        MCF_IRQ_UART0           73              /* UART0 */
+#define        MCF_IRQ_UART1           74              /* UART1 */
 
 /*
  *     Generic GPIO
index eda62de7e607aeb07132a96bbb995caf28a90b49..17f2aab9cf979ac3118a9e083213500f8f316582 100644 (file)
 #define MCFINT_UART1        27          /* Interrupt number for UART1 */
 #define MCFINT_UART2        28          /* Interrupt number for UART2 */
 #define MCFINT_QSPI         31          /* Interrupt number for QSPI */
+#define MCFINT_FECRX0      36          /* Interrupt number for FEC RX */
+#define MCFINT_FECTX0      40          /* Interrupt number for FEC RX */
+#define MCFINT_FECENTC0            42          /* Interrupt number for FEC RX */
 #define MCFINT_PIT1         4           /* Interrupt number for PIT1 (PIT0 in processor) */
 
+#define MCF_IRQ_UART0      (MCFINT_VECBASE + MCFINT_UART0)
+#define MCF_IRQ_UART1      (MCFINT_VECBASE + MCFINT_UART1)
+#define MCF_IRQ_UART2      (MCFINT_VECBASE + MCFINT_UART2)
+
+#define MCF_IRQ_FECRX0     (MCFINT_VECBASE + MCFINT_FECRX0)
+#define MCF_IRQ_FECTX0     (MCFINT_VECBASE + MCFINT_FECTX0)
+#define MCF_IRQ_FECENTC0    (MCFINT_VECBASE + MCFINT_FECENTC0)
+
+#define        MCF_IRQ_QSPI        (MCFINT_VECBASE + MCFINT_QSPI)
+
 /*
  *  SDRAM configuration registers.
  */
 /*
  *  UART module.
  */
-#define MCFUART_BASE1          0xFC060000      /* Base address of UART1 */
-#define MCFUART_BASE2          0xFC064000      /* Base address of UART2 */
-#define MCFUART_BASE3          0xFC068000      /* Base address of UART2 */
+#define MCFUART_BASE0          0xFC060000      /* Base address of UART0 */
+#define MCFUART_BASE1          0xFC064000      /* Base address of UART1 */
+#define MCFUART_BASE2          0xFC068000      /* Base address of UART2 */
 
 /*
  *  FEC module.
  */
-#define        MCFFEC_BASE             0xFC030000      /* Base of FEC ethernet */
-#define        MCFFEC_SIZE             0x800           /* Register set size */
+#define        MCFFEC_BASE0            0xFC030000      /* Base of FEC ethernet */
+#define        MCFFEC_SIZE0            0x800           /* Register set size */
+
+/*
+ *  QSPI module.
+ */
+#define        MCFQSPI_BASE            0xFC05C000      /* Base of QSPI module */
+#define        MCFQSPI_SIZE            0x40            /* Register set size */
+
+#define        MCFQSPI_CS0             46
+#define        MCFQSPI_CS1             47
+#define        MCFQSPI_CS2             27
 
 /*
  *  Reset Control Unit.
index 6235921eca4ea83aabecb8bc75d0ef4740497502..075062d4eecd14e0376b328186cb315871c84a69 100644 (file)
 
 #define        MCFINT_VECBASE          64              /* Vector base number */
 #define        MCFINT_UART0            13              /* Interrupt number for UART0 */
-#define        MCFINT_PIT1             36              /* Interrupt number for PIT1 */
+#define        MCFINT_UART1            14              /* Interrupt number for UART1 */
+#define        MCFINT_UART2            15              /* Interrupt number for UART2 */
 #define MCFINT_QSPI            18              /* Interrupt number for QSPI */
+#define        MCFINT_FECRX0           23              /* Interrupt number for FEC */
+#define        MCFINT_FECTX0           27              /* Interrupt number for FEC */
+#define        MCFINT_FECENTC0         29              /* Interrupt number for FEC */
+#define        MCFINT_PIT1             36              /* Interrupt number for PIT1 */
+
+#define        MCF_IRQ_UART0           (MCFINT_VECBASE + MCFINT_UART0)
+#define        MCF_IRQ_UART1           (MCFINT_VECBASE + MCFINT_UART1)
+#define        MCF_IRQ_UART2           (MCFINT_VECBASE + MCFINT_UART2)
+
+#define        MCF_IRQ_FECRX0          (MCFINT_VECBASE + MCFINT_FECRX0)
+#define        MCF_IRQ_FECTX0          (MCFINT_VECBASE + MCFINT_FECTX0)
+#define        MCF_IRQ_FECENTC0        (MCFINT_VECBASE + MCFINT_FECENTC0)
+
+#define        MCF_IRQ_QSPI            (MCFINT_VECBASE + MCFINT_QSPI)
 
 /*
  *     SDRAM configuration registers.
@@ -50,8 +65,8 @@
 /*
  *  Reset Control Unit (relative to IPSBAR).
  */
-#define        MCF_RCR                 0x110000
-#define        MCF_RSR                 0x110001
+#define        MCF_RCR                 (MCF_IPSBAR + 0x110000)
+#define        MCF_RSR                 (MCF_IPSBAR + 0x110001)
 
 #define        MCF_RCR_SWRESET         0x80            /* Software reset bit */
 #define        MCF_RCR_FRCSTOUT        0x40            /* Force external reset */
 /*
  *  UART module.
  */
-#define MCFUART_BASE1          (MCF_IPSBAR + 0x200)
-#define MCFUART_BASE2          (MCF_IPSBAR + 0x240)
-#define MCFUART_BASE3          (MCF_IPSBAR + 0x280)
+#define MCFUART_BASE0          (MCF_IPSBAR + 0x200)
+#define MCFUART_BASE1          (MCF_IPSBAR + 0x240)
+#define MCFUART_BASE2          (MCF_IPSBAR + 0x280)
 
 /*
  *  FEC ethernet module.
  */
-#define        MCFFEC_BASE             (MCF_IPSBAR + 0x1000)
-#define        MCFFEC_SIZE             0x800
+#define        MCFFEC_BASE0            (MCF_IPSBAR + 0x1000)
+#define        MCFFEC_SIZE0            0x800
+
+/*
+ *  QSPI module.
+ */
+#define        MCFQSPI_BASE            (MCF_IPSBAR + 0x340)
+#define        MCFQSPI_SIZE            0x40
+
+#define        MCFQSPI_CS0             91
+#define        MCFQSPI_CS1             92
+#define        MCFQSPI_CS2             103
+#define        MCFQSPI_CS3             99
 
 /*
  *  GPIO module.
index 805714ca8d7d2cde705975963ac3d02954fff3e5..7f0c2c3660fd15b986db84e59a2f067b003a1835 100644 (file)
 /*
  *     UART module.
  */
-#define MCFUART_BASE1          0x1c0           /* Base address of UART1 */
-#define MCFUART_BASE2          0x200           /* Base address of UART2 */
+#define MCFUART_BASE0          (MCF_MBAR + 0x1c0)      /* Base address UART0 */
+#define MCFUART_BASE1          (MCF_MBAR + 0x200)      /* Base address UART1 */
+
+/*
+ *     QSPI module.
+ */
+#define        MCFQSPI_BASE            (MCF_MBAR + 0x300)      /* Base address QSPI */
+#define        MCFQSPI_SIZE            0x40                    /* Register set size */
+
+#define        MCFQSPI_CS0             29
+#define        MCFQSPI_CS1             24
+#define        MCFQSPI_CS2             21
+#define        MCFQSPI_CS3             22
 
 /*
  *     DMA unit base addresses.
 #define        MCF_IRQ_TIMER           30              /* Timer0, Level 6 */
 #define        MCF_IRQ_PROFILER        31              /* Timer1, Level 7 */
 
+#define        MCF_IRQ_UART0           73              /* UART0 */
+#define        MCF_IRQ_UART1           74              /* UART1 */
+
 /*
  *     General purpose IO registers (in MBAR2).
  */
index 759c2b07a994938975a8c50aebd04e9d6d850d99..a58f1760d858f6f1e9499bede581d07849bd4df6 100644 (file)
@@ -68,8 +68,8 @@
 #define        MCFSIM_DCMR1            0x5c            /* DRAM 1 Mask reg (r/w) */
 #define        MCFSIM_DCCR1            0x63            /* DRAM 1 Control reg (r/w) */
 
-#define        MCFUART_BASE1           0x100           /* Base address of UART1 */
-#define        MCFUART_BASE2           0x140           /* Base address of UART2 */
+#define        MCFUART_BASE0           (MCF_MBAR + 0x100) /* Base address UART0 */
+#define        MCFUART_BASE1           (MCF_MBAR + 0x140) /* Base address UART1 */
 
 #define        MCFSIM_PACNT            (MCF_MBAR + 0x80) /* Port A Control (r/w) */
 #define        MCFSIM_PADDR            (MCF_MBAR + 0x84) /* Port A Direction (r/w) */
@@ -88,6 +88,9 @@
 #define        MCFTIMER_BASE3          (MCF_MBAR + 0x240) /* Base address TIMER4 */
 #define        MCFTIMER_BASE4          (MCF_MBAR + 0x260) /* Base address TIMER3 */
 
+#define        MCFFEC_BASE0            (MCF_MBAR + 0x840) /* Base FEC ethernet */
+#define        MCFFEC_SIZE0            0x1d0
+
 /*
  *     Define system peripheral IRQ usage.
  */
 #define        MCF_IRQ_TIMER2          70              /* Timer 2 */
 #define        MCF_IRQ_TIMER3          71              /* Timer 3 */
 #define        MCF_IRQ_TIMER4          72              /* Timer 4 */
-#define        MCF_IRQ_UART1           73              /* UART 1 */
-#define        MCF_IRQ_UART2           74              /* UART 2 */
+#define        MCF_IRQ_UART0           73              /* UART 0 */
+#define        MCF_IRQ_UART1           74              /* UART 1 */
 #define        MCF_IRQ_PLIP            75              /* PLIC 2Khz Periodic */
 #define        MCF_IRQ_PLIA            76              /* PLIC Asynchronous */
 #define        MCF_IRQ_USB0            77              /* USB Endpoint 0 */
 #define        MCF_IRQ_USB6            83              /* USB Endpoint 6 */
 #define        MCF_IRQ_USB7            84              /* USB Endpoint 7 */
 #define        MCF_IRQ_DMA             85              /* DMA Controller */
-#define        MCF_IRQ_ERX             86              /* Ethernet Receiver */
-#define        MCF_IRQ_ETX             87              /* Ethernet Transmitter */
-#define        MCF_IRQ_ENTC            88              /* Ethernet Non-Time Critical */
+#define        MCF_IRQ_FECRX0          86              /* Ethernet Receiver */
+#define        MCF_IRQ_FECTX0          87              /* Ethernet Transmitter */
+#define        MCF_IRQ_FECENTC0        88              /* Ethernet Non-Time Critical */
 #define        MCF_IRQ_QSPI            89              /* Queued Serial Interface */
 #define        MCF_IRQ_EINT5           90              /* External Interrupt 5 */
 #define        MCF_IRQ_EINT6           91              /* External Interrupt 6 */
index 758810ef91ec349f9f2cdf6894e99de1297d5933..83db8106f50ae81502ad613c02f5c288786df2b3 100644 (file)
 #define        MCFINT_UART1            14              /* Interrupt number for UART1 */
 #define        MCFINT_UART2            15              /* Interrupt number for UART2 */
 #define        MCFINT_QSPI             18              /* Interrupt number for QSPI */
+#define        MCFINT_FECRX0           23              /* Interrupt number for FEC0 */
+#define        MCFINT_FECTX0           27              /* Interrupt number for FEC0 */
+#define        MCFINT_FECENTC0         29              /* Interrupt number for FEC0 */
 #define        MCFINT_PIT1             36              /* Interrupt number for PIT1 */
 
+#define        MCFINT2_VECBASE         128             /* Vector base number 2 */
+#define        MCFINT2_FECRX1          23              /* Interrupt number for FEC1 */
+#define        MCFINT2_FECTX1          27              /* Interrupt number for FEC1 */
+#define        MCFINT2_FECENTC1        29              /* Interrupt number for FEC1 */
+
+#define        MCF_IRQ_UART0           (MCFINT_VECBASE + MCFINT_UART0)
+#define        MCF_IRQ_UART1           (MCFINT_VECBASE + MCFINT_UART1)
+#define        MCF_IRQ_UART2           (MCFINT_VECBASE + MCFINT_UART2)
+
+#define        MCF_IRQ_FECRX0          (MCFINT_VECBASE + MCFINT_FECRX0)
+#define        MCF_IRQ_FECTX0          (MCFINT_VECBASE + MCFINT_FECTX0)
+#define        MCF_IRQ_FECENTC0        (MCFINT_VECBASE + MCFINT_FECENTC0)
+#define        MCF_IRQ_FECRX1          (MCFINT2_VECBASE + MCFINT2_FECRX1)
+#define        MCF_IRQ_FECTX1          (MCFINT2_VECBASE + MCFINT2_FECTX1)
+#define        MCF_IRQ_FECENTC1        (MCFINT2_VECBASE + MCFINT2_FECENTC1)
+
+#define        MCF_IRQ_QSPI            (MCFINT_VECBASE + MCFINT_QSPI)
+
 /*
  *     SDRAM configuration registers.
  */
@@ -72,9 +93,9 @@
 /*
  *     UART module.
  */
-#define MCFUART_BASE1          (MCF_IPSBAR + 0x200)
-#define MCFUART_BASE2          (MCF_IPSBAR + 0x240)
-#define MCFUART_BASE3          (MCF_IPSBAR + 0x280)
+#define MCFUART_BASE0          (MCF_IPSBAR + 0x200)
+#define MCFUART_BASE1          (MCF_IPSBAR + 0x240)
+#define MCFUART_BASE2          (MCF_IPSBAR + 0x280)
 
 /*
  *     FEC ethernet module.
 #define        MCFFEC_BASE1            (MCF_IPSBAR + 0x1800)
 #define        MCFFEC_SIZE1            0x800
 
+/*
+ *     QSPI module.
+ */
+#define        MCFQSPI_BASE            (MCF_IPSBAR + 0x340)
+#define        MCFQSPI_SIZE            0x40
+
+#ifdef CONFIG_M5271
+#define        MCFQSPI_CS0             91
+#define        MCFQSPI_CS1             92
+#define        MCFQSPI_CS2             99
+#define        MCFQSPI_CS3             103
+#endif
+#ifdef CONFIG_M5275
+#define        MCFQSPI_CS0             59
+#define        MCFQSPI_CS1             60
+#define        MCFQSPI_CS2             61
+#define        MCFQSPI_CS3             62
+#endif
+
+/*
+ *     GPIO module.
+ */
 #ifdef CONFIG_M5271
 #define MCFGPIO_PODR_ADDR      (MCF_IPSBAR + 0x100000)
 #define MCFGPIO_PODR_DATAH     (MCF_IPSBAR + 0x100001)
 /*
  *  Reset Control Unit (relative to IPSBAR).
  */
-#define        MCF_RCR                 0x110000
-#define        MCF_RSR                 0x110001
+#define        MCF_RCR                 (MCF_IPSBAR + 0x110000)
+#define        MCF_RSR                 (MCF_IPSBAR + 0x110001)
 
 #define        MCF_RCR_SWRESET         0x80            /* Software reset bit */
 #define        MCF_RCR_FRCSTOUT        0x40            /* Force external reset */
index d798bd5df56c28dcdae4142015ed250629917fd1..569476fba18cc522a3bcc2ede85671eb0787786e 100644 (file)
 
 #define        MCFINT_VECBASE          64              /* Vector base number */
 #define        MCFINT_UART0            13              /* Interrupt number for UART0 */
+#define        MCFINT_UART1            14              /* Interrupt number for UART1 */
+#define        MCFINT_UART2            15              /* Interrupt number for UART2 */
 #define        MCFINT_QSPI             18              /* Interrupt number for QSPI */
+#define        MCFINT_FECRX0           23              /* Interrupt number for FEC */
+#define        MCFINT_FECTX0           27              /* Interrupt number for FEC */
+#define        MCFINT_FECENTC0         29              /* Interrupt number for FEC */
 #define        MCFINT_PIT1             55              /* Interrupt number for PIT1 */
 
+#define        MCF_IRQ_UART0           (MCFINT_VECBASE + MCFINT_UART0)
+#define        MCF_IRQ_UART1           (MCFINT_VECBASE + MCFINT_UART1)
+#define        MCF_IRQ_UART2           (MCFINT_VECBASE + MCFINT_UART2)
+
+#define        MCF_IRQ_FECRX0          (MCFINT_VECBASE + MCFINT_FECRX0)
+#define        MCF_IRQ_FECTX0          (MCFINT_VECBASE + MCFINT_FECTX0)
+#define        MCF_IRQ_FECENTC0        (MCFINT_VECBASE + MCFINT_FECENTC0)
+
+#define        MCF_IRQ_QSPI            (MCFINT_VECBASE + MCFINT_QSPI)
+
 /*
  *     SDRAM configuration registers.
  */
 /*
  *     UART module.
  */
-#define        MCFUART_BASE1           (MCF_IPSBAR + 0x00000200)
-#define        MCFUART_BASE2           (MCF_IPSBAR + 0x00000240)
-#define        MCFUART_BASE3           (MCF_IPSBAR + 0x00000280)
+#define        MCFUART_BASE0           (MCF_IPSBAR + 0x00000200)
+#define        MCFUART_BASE1           (MCF_IPSBAR + 0x00000240)
+#define        MCFUART_BASE2           (MCF_IPSBAR + 0x00000280)
 
 /*
  *     FEC ethernet module.
  */
-#define        MCFFEC_BASE             (MCF_IPSBAR + 0x00001000)
-#define        MCFFEC_SIZE             0x800
+#define        MCFFEC_BASE0            (MCF_IPSBAR + 0x00001000)
+#define        MCFFEC_SIZE0            0x800
+
+/*
+ *     QSPI module.
+ */
+#define        MCFQSPI_IOBASE          (MCF_IPSBAR + 0x340)
+#define        MCFQSPI_SIZE            0x40
+
+#define        MCFQSPI_CS0             147
+#define        MCFQSPI_CS1             148
+#define        MCFQSPI_CS2             149
+#define        MCFQSPI_CS3             150
 
 /*
  *     GPIO registers
 /*
  *  Reset Control Unit (relative to IPSBAR).
  */
-#define        MCF_RCR                 0x110000
-#define        MCF_RSR                 0x110001
+#define        MCF_RCR                 (MCF_IPSBAR + 0x110000)
+#define        MCF_RSR                 (MCF_IPSBAR + 0x110001)
 
 #define        MCF_RCR_SWRESET         0x80            /* Software reset bit */
 #define        MCF_RCR_FRCSTOUT        0x40            /* Force external reset */
index 8f8609fcc9b8eb87ff0a28ecb1aa5e8017a24020..3bc3adaa7ee0138f7438090dae100c1b85ed8b87 100644 (file)
  *  UART module.
  */
 #if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3)
-#define MCFUART_BASE1          0x200           /* Base address of UART1 */
-#define MCFUART_BASE2          0x1c0           /* Base address of UART2 */
+#define MCFUART_BASE0          (MCF_MBAR + 0x200)      /* Base address UART0 */
+#define MCFUART_BASE1          (MCF_MBAR + 0x1c0)      /* Base address UART1 */
 #else
-#define MCFUART_BASE1          0x1c0           /* Base address of UART1 */
-#define MCFUART_BASE2          0x200           /* Base address of UART2 */
+#define MCFUART_BASE0          (MCF_MBAR + 0x1c0)      /* Base address UART0 */
+#define MCFUART_BASE1          (MCF_MBAR + 0x200)      /* Base address UART1 */
 #endif
 
 /*
  */
 #define        MCF_IRQ_TIMER           30              /* Timer0, Level 6 */
 #define        MCF_IRQ_PROFILER        31              /* Timer1, Level 7 */
+#define        MCF_IRQ_UART0           73              /* UART0 */
+#define        MCF_IRQ_UART1           74              /* UART1 */
 
 /****************************************************************************/
 #endif /* m5307sim_h */
index ba4cc784f574a41837cf7a4ade8a3a6656917c96..29b66e21413a7170177e74129165325e6090e96f 100644 (file)
 #define MCFINT_UART1        27          /* Interrupt number for UART1 */
 #define MCFINT_UART2        28          /* Interrupt number for UART2 */
 #define MCFINT_QSPI         31          /* Interrupt number for QSPI */
+#define MCFINT_FECRX0      36          /* Interrupt number for FEC */
+#define MCFINT_FECTX0      40          /* Interrupt number for FEC */
+#define MCFINT_FECENTC0            42          /* Interrupt number for FEC */
+
+#define MCF_IRQ_UART0       (MCFINT_VECBASE + MCFINT_UART0)
+#define MCF_IRQ_UART1       (MCFINT_VECBASE + MCFINT_UART1)
+#define MCF_IRQ_UART2       (MCFINT_VECBASE + MCFINT_UART2)
+
+#define MCF_IRQ_FECRX0     (MCFINT_VECBASE + MCFINT_FECRX0)
+#define MCF_IRQ_FECTX0     (MCFINT_VECBASE + MCFINT_FECTX0)
+#define MCF_IRQ_FECENTC0    (MCFINT_VECBASE + MCFINT_FECENTC0)
+
+#define        MCF_IRQ_QSPI        (MCFINT_VECBASE + MCFINT_QSPI)
 
 #define MCF_WTM_WCR    MCF_REG16(0xFC098000)
 
 /*
  *  UART module.
  */
-#define MCFUART_BASE1          0xFC060000      /* Base address of UART1 */
-#define MCFUART_BASE2          0xFC064000      /* Base address of UART2 */
-#define MCFUART_BASE3          0xFC068000      /* Base address of UART3 */
+#define MCFUART_BASE0          0xFC060000      /* Base address of UART1 */
+#define MCFUART_BASE1          0xFC064000      /* Base address of UART2 */
+#define MCFUART_BASE2          0xFC068000      /* Base address of UART3 */
+
+/*
+ *  FEC module.
+ */
+#define        MCFFEC_BASE0            0xFC030000      /* Base address of FEC0 */
+#define        MCFFEC_SIZE0            0x800           /* Size of FEC0 region */
+
+/*
+ *  QSPI module.
+ */
+#define        MCFQSPI_BASE            0xFC058000      /* Base address of QSPI */
+#define        MCFQSPI_SIZE            0x40            /* Size of QSPI region */
+
+#define        MCFQSPI_CS0             84
+#define        MCFQSPI_CS1             85
+#define        MCFQSPI_CS2             86
 
 /*
  *  Timer module.
index 51e00b00b8a6a93e2e5af1496716d2326523be71..79f58dd6a83da3d532d3687d139144999daf3801 100644 (file)
@@ -85,8 +85,8 @@
 #define MCFTIMER_BASE1         (MCF_MBAR + 0x140)      /* Base of TIMER1 */
 #define MCFTIMER_BASE2         (MCF_MBAR + 0x180)      /* Base of TIMER2 */
 
-#define MCFUART_BASE1          0x1c0           /* Base address of UART1 */
-#define MCFUART_BASE2          0x200           /* Base address of UART2 */
+#define MCFUART_BASE0          (MCF_MBAR + 0x1c0)      /* Base address UART0 */
+#define MCFUART_BASE1          (MCF_MBAR + 0x200)      /* Base address UART1 */
 
 #define        MCFSIM_PADDR            (MCF_MBAR + 0x244)
 #define        MCFSIM_PADAT            (MCF_MBAR + 0x248)
  */
 #define        MCF_IRQ_TIMER           30              /* Timer0, Level 6 */
 #define        MCF_IRQ_PROFILER        31              /* Timer1, Level 7 */
+#define        MCF_IRQ_UART0           73              /* UART0 */
+#define        MCF_IRQ_UART1           74              /* UART1 */
 
 /****************************************************************************/
 #endif /* m5407sim_h */
index 1ed8bfb0277279024393a39a1f021a4d35e90202..ae56b8848a9d0f5ee625549939347f0713a48208 100644 (file)
 /*
  *     UART module.
  */
-#define MCFUART_BASE1          0x8600          /* Base address of UART1 */
-#define MCFUART_BASE2          0x8700          /* Base address of UART2 */
-#define MCFUART_BASE3          0x8800          /* Base address of UART3 */
-#define MCFUART_BASE4          0x8900          /* Base address of UART4 */
+#define MCFUART_BASE0          (MCF_MBAR + 0x8600)     /* Base address UART0 */
+#define MCFUART_BASE1          (MCF_MBAR + 0x8700)     /* Base address UART1 */
+#define MCFUART_BASE2          (MCF_MBAR + 0x8800)     /* Base address UART2 */
+#define MCFUART_BASE3          (MCF_MBAR + 0x8900)     /* Base address UART3 */
 
 /*
  *     Define system peripheral IRQ usage.
  */
-#define MCF_IRQ_TIMER          (64 + 54)       /* Slice Timer 0 */
-#define MCF_IRQ_PROFILER       (64 + 53)       /* Slice Timer 1 */
+#define MCF_IRQ_TIMER          (MCFINT_VECBASE + 54)   /* Slice Timer 0 */
+#define MCF_IRQ_PROFILER       (MCFINT_VECBASE + 53)   /* Slice Timer 1 */
+#define MCF_IRQ_UART0          (MCFINT_VECBASE + 35)
+#define MCF_IRQ_UART1          (MCFINT_VECBASE + 34)
+#define MCF_IRQ_UART2          (MCFINT_VECBASE + 33)
+#define MCF_IRQ_UART3          (MCFINT_VECBASE + 32)
 
 /*
  *     Generic GPIO support
index 789f3b2de0e9bf2f63720bcc0c522c686e9c9d31..825c1c813196a7b08de0936a8101ee2b7d5820be 100644 (file)
@@ -22,8 +22,6 @@ extern unsigned int (*mach_get_ss)(void);
 extern int (*mach_get_rtc_pll)(struct rtc_pll_info *);
 extern int (*mach_set_rtc_pll)(struct rtc_pll_info *);
 extern int (*mach_set_clock_mmss)(unsigned long);
-extern void (*mach_gettod)(int *year, int *mon, int *day, int *hour,
-                           int *min, int *sec);
 extern void (*mach_reset)( void );
 extern void (*mach_halt)( void );
 extern void (*mach_power_off)( void );
@@ -35,9 +33,8 @@ extern void (*mach_l2_flush) (int);
 extern void (*mach_beep) (unsigned int, unsigned int);
 
 /* Hardware clock functions */
-extern void hw_timer_init(void);
+extern void hw_timer_init(irq_handler_t handler);
 extern unsigned long hw_timer_offset(void);
-extern irqreturn_t arch_timer_interrupt(int irq, void *dummy);
 
 extern void config_BSP(char *command, int len);
 
index 7fe631972f1f5192acfb0e3f11229246b42e31ae..7b51416ccae221d103e489446461a7d16ffe4e1c 100644 (file)
 #ifndef mcfqspi_h
 #define mcfqspi_h
 
-#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
-#define        MCFQSPI_IOBASE          (MCF_IPSBAR + 0x340)
-#elif defined(CONFIG_M5249)
-#define MCFQSPI_IOBASE         (MCF_MBAR + 0x300)
-#elif defined(CONFIG_M520x)
-#define MCFQSPI_IOBASE         0xFC05C000
-#elif defined(CONFIG_M532x)
-#define MCFQSPI_IOBASE         0xFC058000
-#endif
-#define MCFQSPI_IOSIZE         0x40
-
 /**
  * struct mcfqspi_cs_control - chip select control for the coldfire qspi driver
  * @setup: setup the control; allocate gpio's, etc. May be NULL.
index 2abedff0a694fb2c6579a43fe508dde548f42549..2d3bc774b3c5020ffced173c8f1feb982e875206 100644 (file)
@@ -41,7 +41,10 @@ struct mcf_platform_uart {
 #define        MCFUART_UTF             0x28            /* Transmitter FIFO (r/w) */
 #define        MCFUART_URF             0x2c            /* Receiver FIFO (r/w) */
 #define        MCFUART_UFPD            0x30            /* Frac Prec. Divider (r/w) */
-#else
+#endif
+#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \
+        defined(CONFIG_M5249) || defined(CONFIG_M5307) || \
+        defined(CONFIG_M5407)
 #define        MCFUART_UIVR            0x30            /* Interrupt Vector (r/w) */
 #endif
 #define        MCFUART_UIPR            0x34            /* Input Port (r) */
index 6cf4bd6e34f8c80641697de7dd8d37c5c9bc0c14..c54ef927e4836bff05b9f92b2d24b3d78b36634a 100644 (file)
@@ -1,5 +1,378 @@
+/*
+ *  linux/arch/m68k/kernel/process.c
+ *
+ *  Copyright (C) 1995  Hamish Macdonald
+ *
+ *  68060 fixes by Jesper Skov
+ */
+
+/*
+ * This file handles the architecture-dependent parts of process handling..
+ */
+
+#include <linux/errno.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/fs.h>
+#include <linux/smp.h>
+#include <linux/stddef.h>
+#include <linux/unistd.h>
+#include <linux/ptrace.h>
+#include <linux/user.h>
+#include <linux/reboot.h>
+#include <linux/init_task.h>
+#include <linux/mqueue.h>
+
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/traps.h>
+#include <asm/machdep.h>
+#include <asm/setup.h>
+#include <asm/pgtable.h>
+
+
+asmlinkage void ret_from_fork(void);
+
+
+/*
+ * Return saved PC from a blocked thread
+ */
+unsigned long thread_saved_pc(struct task_struct *tsk)
+{
+       struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp;
+       /* Check whether the thread is blocked in resume() */
+       if (in_sched_functions(sw->retpc))
+               return ((unsigned long *)sw->a6)[1];
+       else
+               return sw->retpc;
+}
+
+/*
+ * The idle loop on an m68k..
+ */
+static void default_idle(void)
+{
+       if (!need_resched())
+#if defined(MACH_ATARI_ONLY)
+               /* block out HSYNC on the atari (falcon) */
+               __asm__("stop #0x2200" : : : "cc");
+#else
+               __asm__("stop #0x2000" : : : "cc");
+#endif
+}
+
+void (*idle)(void) = default_idle;
+
+/*
+ * The idle thread. There's no useful work to be
+ * done, so just try to conserve power and have a
+ * low exit latency (ie sit in a loop waiting for
+ * somebody to say that they'd like to reschedule)
+ */
+void cpu_idle(void)
+{
+       /* endless idle loop with no priority at all */
+       while (1) {
+               while (!need_resched())
+                       idle();
+               schedule_preempt_disabled();
+       }
+}
+
+void machine_restart(char * __unused)
+{
+       if (mach_reset)
+               mach_reset();
+       for (;;);
+}
+
+void machine_halt(void)
+{
+       if (mach_halt)
+               mach_halt();
+       for (;;);
+}
+
+void machine_power_off(void)
+{
+       if (mach_power_off)
+               mach_power_off();
+       for (;;);
+}
+
+void (*pm_power_off)(void) = machine_power_off;
+EXPORT_SYMBOL(pm_power_off);
+
+void show_regs(struct pt_regs * regs)
+{
+       printk("\n");
+       printk("Format %02x  Vector: %04x  PC: %08lx  Status: %04x    %s\n",
+              regs->format, regs->vector, regs->pc, regs->sr, print_tainted());
+       printk("ORIG_D0: %08lx  D0: %08lx  A2: %08lx  A1: %08lx\n",
+              regs->orig_d0, regs->d0, regs->a2, regs->a1);
+       printk("A0: %08lx  D5: %08lx  D4: %08lx\n",
+              regs->a0, regs->d5, regs->d4);
+       printk("D3: %08lx  D2: %08lx  D1: %08lx\n",
+              regs->d3, regs->d2, regs->d1);
+       if (!(regs->sr & PS_S))
+               printk("USP: %08lx\n", rdusp());
+}
+
+/*
+ * Create a kernel thread
+ */
+int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
+{
+       int pid;
+       mm_segment_t fs;
+
+       fs = get_fs();
+       set_fs (KERNEL_DS);
+
+       {
+       register long retval __asm__ ("d0");
+       register long clone_arg __asm__ ("d1") = flags | CLONE_VM | CLONE_UNTRACED;
+
+       retval = __NR_clone;
+       __asm__ __volatile__
+         ("clrl %%d2\n\t"
+          "trap #0\n\t"                /* Linux/m68k system call */
+          "tstl %0\n\t"                /* child or parent */
+          "jne 1f\n\t"                 /* parent - jump */
+#ifdef CONFIG_MMU
+          "lea %%sp@(%c7),%6\n\t"      /* reload current */
+          "movel %6@,%6\n\t"
+#endif
+          "movel %3,%%sp@-\n\t"        /* push argument */
+          "jsr %4@\n\t"                /* call fn */
+          "movel %0,%%d1\n\t"          /* pass exit value */
+          "movel %2,%%d0\n\t"          /* exit */
+          "trap #0\n"
+          "1:"
+          : "+d" (retval)
+          : "i" (__NR_clone), "i" (__NR_exit),
+            "r" (arg), "a" (fn), "d" (clone_arg), "r" (current),
+            "i" (-THREAD_SIZE)
+          : "d2");
+
+       pid = retval;
+       }
+
+       set_fs (fs);
+       return pid;
+}
+EXPORT_SYMBOL(kernel_thread);
+
+void flush_thread(void)
+{
+       current->thread.fs = __USER_DS;
+#ifdef CONFIG_FPU
+       if (!FPU_IS_EMU) {
+               unsigned long zero = 0;
+               asm volatile("frestore %0": :"m" (zero));
+       }
+#endif
+}
+
+/*
+ * "m68k_fork()".. By the time we get here, the
+ * non-volatile registers have also been saved on the
+ * stack. We do some ugly pointer stuff here.. (see
+ * also copy_thread)
+ */
+
+asmlinkage int m68k_fork(struct pt_regs *regs)
+{
 #ifdef CONFIG_MMU
-#include "process_mm.c"
+       return do_fork(SIGCHLD, rdusp(), regs, 0, NULL, NULL);
 #else
-#include "process_no.c"
+       return -EINVAL;
 #endif
+}
+
+asmlinkage int m68k_vfork(struct pt_regs *regs)
+{
+       return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0,
+                      NULL, NULL);
+}
+
+asmlinkage int m68k_clone(struct pt_regs *regs)
+{
+       unsigned long clone_flags;
+       unsigned long newsp;
+       int __user *parent_tidptr, *child_tidptr;
+
+       /* syscall2 puts clone_flags in d1 and usp in d2 */
+       clone_flags = regs->d1;
+       newsp = regs->d2;
+       parent_tidptr = (int __user *)regs->d3;
+       child_tidptr = (int __user *)regs->d4;
+       if (!newsp)
+               newsp = rdusp();
+       return do_fork(clone_flags, newsp, regs, 0,
+                      parent_tidptr, child_tidptr);
+}
+
+int copy_thread(unsigned long clone_flags, unsigned long usp,
+                unsigned long unused,
+                struct task_struct * p, struct pt_regs * regs)
+{
+       struct pt_regs * childregs;
+       struct switch_stack * childstack, *stack;
+       unsigned long *retp;
+
+       childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
+
+       *childregs = *regs;
+       childregs->d0 = 0;
+
+       retp = ((unsigned long *) regs);
+       stack = ((struct switch_stack *) retp) - 1;
+
+       childstack = ((struct switch_stack *) childregs) - 1;
+       *childstack = *stack;
+       childstack->retpc = (unsigned long)ret_from_fork;
+
+       p->thread.usp = usp;
+       p->thread.ksp = (unsigned long)childstack;
+
+       if (clone_flags & CLONE_SETTLS)
+               task_thread_info(p)->tp_value = regs->d5;
+
+       /*
+        * Must save the current SFC/DFC value, NOT the value when
+        * the parent was last descheduled - RGH  10-08-96
+        */
+       p->thread.fs = get_fs().seg;
+
+#ifdef CONFIG_FPU
+       if (!FPU_IS_EMU) {
+               /* Copy the current fpu state */
+               asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory");
+
+               if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) {
+                       if (CPU_IS_COLDFIRE) {
+                               asm volatile ("fmovemd %/fp0-%/fp7,%0\n\t"
+                                             "fmovel %/fpiar,%1\n\t"
+                                             "fmovel %/fpcr,%2\n\t"
+                                             "fmovel %/fpsr,%3"
+                                             :
+                                             : "m" (p->thread.fp[0]),
+                                               "m" (p->thread.fpcntl[0]),
+                                               "m" (p->thread.fpcntl[1]),
+                                               "m" (p->thread.fpcntl[2])
+                                             : "memory");
+                       } else {
+                               asm volatile ("fmovemx %/fp0-%/fp7,%0\n\t"
+                                             "fmoveml %/fpiar/%/fpcr/%/fpsr,%1"
+                                             :
+                                             : "m" (p->thread.fp[0]),
+                                               "m" (p->thread.fpcntl[0])
+                                             : "memory");
+                       }
+               }
+
+               /* Restore the state in case the fpu was busy */
+               asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0]));
+       }
+#endif /* CONFIG_FPU */
+
+       return 0;
+}
+
+/* Fill in the fpu structure for a core dump.  */
+#ifdef CONFIG_FPU
+int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
+{
+       char fpustate[216];
+
+       if (FPU_IS_EMU) {
+               int i;
+
+               memcpy(fpu->fpcntl, current->thread.fpcntl, 12);
+               memcpy(fpu->fpregs, current->thread.fp, 96);
+               /* Convert internal fpu reg representation
+                * into long double format
+                */
+               for (i = 0; i < 24; i += 3)
+                       fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) |
+                                        ((fpu->fpregs[i] & 0x0000ffff) << 16);
+               return 1;
+       }
+
+       /* First dump the fpu context to avoid protocol violation.  */
+       asm volatile ("fsave %0" :: "m" (fpustate[0]) : "memory");
+       if (!CPU_IS_060 ? !fpustate[0] : !fpustate[2])
+               return 0;
+
+       if (CPU_IS_COLDFIRE) {
+               asm volatile ("fmovel %/fpiar,%0\n\t"
+                             "fmovel %/fpcr,%1\n\t"
+                             "fmovel %/fpsr,%2\n\t"
+                             "fmovemd %/fp0-%/fp7,%3"
+                             :
+                             : "m" (fpu->fpcntl[0]),
+                               "m" (fpu->fpcntl[1]),
+                               "m" (fpu->fpcntl[2]),
+                               "m" (fpu->fpregs[0])
+                             : "memory");
+       } else {
+               asm volatile ("fmovem %/fpiar/%/fpcr/%/fpsr,%0"
+                             :
+                             : "m" (fpu->fpcntl[0])
+                             : "memory");
+               asm volatile ("fmovemx %/fp0-%/fp7,%0"
+                             :
+                             : "m" (fpu->fpregs[0])
+                             : "memory");
+       }
+
+       return 1;
+}
+EXPORT_SYMBOL(dump_fpu);
+#endif /* CONFIG_FPU */
+
+/*
+ * sys_execve() executes a new program.
+ */
+asmlinkage int sys_execve(const char __user *name,
+                         const char __user *const __user *argv,
+                         const char __user *const __user *envp)
+{
+       int error;
+       char * filename;
+       struct pt_regs *regs = (struct pt_regs *) &name;
+
+       filename = getname(name);
+       error = PTR_ERR(filename);
+       if (IS_ERR(filename))
+               return error;
+       error = do_execve(filename, argv, envp, regs);
+       putname(filename);
+       return error;
+}
+
+unsigned long get_wchan(struct task_struct *p)
+{
+       unsigned long fp, pc;
+       unsigned long stack_page;
+       int count = 0;
+       if (!p || p == current || p->state == TASK_RUNNING)
+               return 0;
+
+       stack_page = (unsigned long)task_stack_page(p);
+       fp = ((struct switch_stack *)p->thread.ksp)->a6;
+       do {
+               if (fp < stack_page+sizeof(struct thread_info) ||
+                   fp >= 8184+stack_page)
+                       return 0;
+               pc = ((unsigned long *)fp)[1];
+               if (!in_sched_functions(pc))
+                       return pc;
+               fp = *(unsigned long *) fp;
+       } while (count++ < 16);
+       return 0;
+}
diff --git a/arch/m68k/kernel/process_mm.c b/arch/m68k/kernel/process_mm.c
deleted file mode 100644 (file)
index fe4186b..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- *  linux/arch/m68k/kernel/process.c
- *
- *  Copyright (C) 1995  Hamish Macdonald
- *
- *  68060 fixes by Jesper Skov
- */
-
-/*
- * This file handles the architecture-dependent parts of process handling..
- */
-
-#include <linux/errno.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/fs.h>
-#include <linux/smp.h>
-#include <linux/stddef.h>
-#include <linux/unistd.h>
-#include <linux/ptrace.h>
-#include <linux/user.h>
-#include <linux/reboot.h>
-#include <linux/init_task.h>
-#include <linux/mqueue.h>
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/traps.h>
-#include <asm/machdep.h>
-#include <asm/setup.h>
-#include <asm/pgtable.h>
-
-
-asmlinkage void ret_from_fork(void);
-
-
-/*
- * Return saved PC from a blocked thread
- */
-unsigned long thread_saved_pc(struct task_struct *tsk)
-{
-       struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp;
-       /* Check whether the thread is blocked in resume() */
-       if (in_sched_functions(sw->retpc))
-               return ((unsigned long *)sw->a6)[1];
-       else
-               return sw->retpc;
-}
-
-/*
- * The idle loop on an m68k..
- */
-static void default_idle(void)
-{
-       if (!need_resched())
-#if defined(MACH_ATARI_ONLY)
-               /* block out HSYNC on the atari (falcon) */
-               __asm__("stop #0x2200" : : : "cc");
-#else
-               __asm__("stop #0x2000" : : : "cc");
-#endif
-}
-
-void (*idle)(void) = default_idle;
-
-/*
- * The idle thread. There's no useful work to be
- * done, so just try to conserve power and have a
- * low exit latency (ie sit in a loop waiting for
- * somebody to say that they'd like to reschedule)
- */
-void cpu_idle(void)
-{
-       /* endless idle loop with no priority at all */
-       while (1) {
-               while (!need_resched())
-                       idle();
-               schedule_preempt_disabled();
-       }
-}
-
-void machine_restart(char * __unused)
-{
-       if (mach_reset)
-               mach_reset();
-       for (;;);
-}
-
-void machine_halt(void)
-{
-       if (mach_halt)
-               mach_halt();
-       for (;;);
-}
-
-void machine_power_off(void)
-{
-       if (mach_power_off)
-               mach_power_off();
-       for (;;);
-}
-
-void (*pm_power_off)(void) = machine_power_off;
-EXPORT_SYMBOL(pm_power_off);
-
-void show_regs(struct pt_regs * regs)
-{
-       printk("\n");
-       printk("Format %02x  Vector: %04x  PC: %08lx  Status: %04x    %s\n",
-              regs->format, regs->vector, regs->pc, regs->sr, print_tainted());
-       printk("ORIG_D0: %08lx  D0: %08lx  A2: %08lx  A1: %08lx\n",
-              regs->orig_d0, regs->d0, regs->a2, regs->a1);
-       printk("A0: %08lx  D5: %08lx  D4: %08lx\n",
-              regs->a0, regs->d5, regs->d4);
-       printk("D3: %08lx  D2: %08lx  D1: %08lx\n",
-              regs->d3, regs->d2, regs->d1);
-       if (!(regs->sr & PS_S))
-               printk("USP: %08lx\n", rdusp());
-}
-
-/*
- * Create a kernel thread
- */
-int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
-{
-       int pid;
-       mm_segment_t fs;
-
-       fs = get_fs();
-       set_fs (KERNEL_DS);
-
-       {
-       register long retval __asm__ ("d0");
-       register long clone_arg __asm__ ("d1") = flags | CLONE_VM | CLONE_UNTRACED;
-
-       retval = __NR_clone;
-       __asm__ __volatile__
-         ("clrl %%d2\n\t"
-          "trap #0\n\t"                /* Linux/m68k system call */
-          "tstl %0\n\t"                /* child or parent */
-          "jne 1f\n\t"                 /* parent - jump */
-          "lea %%sp@(%c7),%6\n\t"      /* reload current */
-          "movel %6@,%6\n\t"
-          "movel %3,%%sp@-\n\t"        /* push argument */
-          "jsr %4@\n\t"                /* call fn */
-          "movel %0,%%d1\n\t"          /* pass exit value */
-          "movel %2,%%d0\n\t"          /* exit */
-          "trap #0\n"
-          "1:"
-          : "+d" (retval)
-          : "i" (__NR_clone), "i" (__NR_exit),
-            "r" (arg), "a" (fn), "d" (clone_arg), "r" (current),
-            "i" (-THREAD_SIZE)
-          : "d2");
-
-       pid = retval;
-       }
-
-       set_fs (fs);
-       return pid;
-}
-EXPORT_SYMBOL(kernel_thread);
-
-void flush_thread(void)
-{
-       unsigned long zero = 0;
-
-       current->thread.fs = __USER_DS;
-       if (!FPU_IS_EMU)
-               asm volatile("frestore %0": :"m" (zero));
-}
-
-/*
- * "m68k_fork()".. By the time we get here, the
- * non-volatile registers have also been saved on the
- * stack. We do some ugly pointer stuff here.. (see
- * also copy_thread)
- */
-
-asmlinkage int m68k_fork(struct pt_regs *regs)
-{
-       return do_fork(SIGCHLD, rdusp(), regs, 0, NULL, NULL);
-}
-
-asmlinkage int m68k_vfork(struct pt_regs *regs)
-{
-       return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0,
-                      NULL, NULL);
-}
-
-asmlinkage int m68k_clone(struct pt_regs *regs)
-{
-       unsigned long clone_flags;
-       unsigned long newsp;
-       int __user *parent_tidptr, *child_tidptr;
-
-       /* syscall2 puts clone_flags in d1 and usp in d2 */
-       clone_flags = regs->d1;
-       newsp = regs->d2;
-       parent_tidptr = (int __user *)regs->d3;
-       child_tidptr = (int __user *)regs->d4;
-       if (!newsp)
-               newsp = rdusp();
-       return do_fork(clone_flags, newsp, regs, 0,
-                      parent_tidptr, child_tidptr);
-}
-
-int copy_thread(unsigned long clone_flags, unsigned long usp,
-                unsigned long unused,
-                struct task_struct * p, struct pt_regs * regs)
-{
-       struct pt_regs * childregs;
-       struct switch_stack * childstack, *stack;
-       unsigned long *retp;
-
-       childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
-
-       *childregs = *regs;
-       childregs->d0 = 0;
-
-       retp = ((unsigned long *) regs);
-       stack = ((struct switch_stack *) retp) - 1;
-
-       childstack = ((struct switch_stack *) childregs) - 1;
-       *childstack = *stack;
-       childstack->retpc = (unsigned long)ret_from_fork;
-
-       p->thread.usp = usp;
-       p->thread.ksp = (unsigned long)childstack;
-
-       if (clone_flags & CLONE_SETTLS)
-               task_thread_info(p)->tp_value = regs->d5;
-
-       /*
-        * Must save the current SFC/DFC value, NOT the value when
-        * the parent was last descheduled - RGH  10-08-96
-        */
-       p->thread.fs = get_fs().seg;
-
-       if (!FPU_IS_EMU) {
-               /* Copy the current fpu state */
-               asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory");
-
-               if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) {
-                       if (CPU_IS_COLDFIRE) {
-                               asm volatile ("fmovemd %/fp0-%/fp7,%0\n\t"
-                                             "fmovel %/fpiar,%1\n\t"
-                                             "fmovel %/fpcr,%2\n\t"
-                                             "fmovel %/fpsr,%3"
-                                             :
-                                             : "m" (p->thread.fp[0]),
-                                               "m" (p->thread.fpcntl[0]),
-                                               "m" (p->thread.fpcntl[1]),
-                                               "m" (p->thread.fpcntl[2])
-                                             : "memory");
-                       } else {
-                               asm volatile ("fmovemx %/fp0-%/fp7,%0\n\t"
-                                             "fmoveml %/fpiar/%/fpcr/%/fpsr,%1"
-                                             :
-                                             : "m" (p->thread.fp[0]),
-                                               "m" (p->thread.fpcntl[0])
-                                             : "memory");
-                       }
-               }
-
-               /* Restore the state in case the fpu was busy */
-               asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0]));
-       }
-
-       return 0;
-}
-
-/* Fill in the fpu structure for a core dump.  */
-
-int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
-{
-       char fpustate[216];
-
-       if (FPU_IS_EMU) {
-               int i;
-
-               memcpy(fpu->fpcntl, current->thread.fpcntl, 12);
-               memcpy(fpu->fpregs, current->thread.fp, 96);
-               /* Convert internal fpu reg representation
-                * into long double format
-                */
-               for (i = 0; i < 24; i += 3)
-                       fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) |
-                                        ((fpu->fpregs[i] & 0x0000ffff) << 16);
-               return 1;
-       }
-
-       /* First dump the fpu context to avoid protocol violation.  */
-       asm volatile ("fsave %0" :: "m" (fpustate[0]) : "memory");
-       if (!CPU_IS_060 ? !fpustate[0] : !fpustate[2])
-               return 0;
-
-       if (CPU_IS_COLDFIRE) {
-               asm volatile ("fmovel %/fpiar,%0\n\t"
-                             "fmovel %/fpcr,%1\n\t"
-                             "fmovel %/fpsr,%2\n\t"
-                             "fmovemd %/fp0-%/fp7,%3"
-                             :
-                             : "m" (fpu->fpcntl[0]),
-                               "m" (fpu->fpcntl[1]),
-                               "m" (fpu->fpcntl[2]),
-                               "m" (fpu->fpregs[0])
-                             : "memory");
-       } else {
-               asm volatile ("fmovem %/fpiar/%/fpcr/%/fpsr,%0"
-                             :
-                             : "m" (fpu->fpcntl[0])
-                             : "memory");
-               asm volatile ("fmovemx %/fp0-%/fp7,%0"
-                             :
-                             : "m" (fpu->fpregs[0])
-                             : "memory");
-       }
-
-       return 1;
-}
-EXPORT_SYMBOL(dump_fpu);
-
-/*
- * sys_execve() executes a new program.
- */
-asmlinkage int sys_execve(const char __user *name,
-                         const char __user *const __user *argv,
-                         const char __user *const __user *envp)
-{
-       int error;
-       char * filename;
-       struct pt_regs *regs = (struct pt_regs *) &name;
-
-       filename = getname(name);
-       error = PTR_ERR(filename);
-       if (IS_ERR(filename))
-               return error;
-       error = do_execve(filename, argv, envp, regs);
-       putname(filename);
-       return error;
-}
-
-unsigned long get_wchan(struct task_struct *p)
-{
-       unsigned long fp, pc;
-       unsigned long stack_page;
-       int count = 0;
-       if (!p || p == current || p->state == TASK_RUNNING)
-               return 0;
-
-       stack_page = (unsigned long)task_stack_page(p);
-       fp = ((struct switch_stack *)p->thread.ksp)->a6;
-       do {
-               if (fp < stack_page+sizeof(struct thread_info) ||
-                   fp >= 8184+stack_page)
-                       return 0;
-               pc = ((unsigned long *)fp)[1];
-               if (!in_sched_functions(pc))
-                       return pc;
-               fp = *(unsigned long *) fp;
-       } while (count++ < 16);
-       return 0;
-}
diff --git a/arch/m68k/kernel/process_no.c b/arch/m68k/kernel/process_no.c
deleted file mode 100644 (file)
index f7fe6c3..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- *  linux/arch/m68knommu/kernel/process.c
- *
- *  Copyright (C) 1995  Hamish Macdonald
- *
- *  68060 fixes by Jesper Skov
- *
- *  uClinux changes
- *  Copyright (C) 2000-2002, David McCullough <davidm@snapgear.com>
- */
-
-/*
- * This file handles the architecture-dependent parts of process handling..
- */
-
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/stddef.h>
-#include <linux/unistd.h>
-#include <linux/ptrace.h>
-#include <linux/user.h>
-#include <linux/interrupt.h>
-#include <linux/reboot.h>
-#include <linux/fs.h>
-#include <linux/slab.h>
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/traps.h>
-#include <asm/machdep.h>
-#include <asm/setup.h>
-#include <asm/pgtable.h>
-
-asmlinkage void ret_from_fork(void);
-
-/*
- * The following aren't currently used.
- */
-void (*pm_idle)(void);
-EXPORT_SYMBOL(pm_idle);
-
-void (*pm_power_off)(void);
-EXPORT_SYMBOL(pm_power_off);
-
-/*
- * The idle loop on an m68knommu..
- */
-static void default_idle(void)
-{
-       local_irq_disable();
-       while (!need_resched()) {
-               /* This stop will re-enable interrupts */
-               __asm__("stop #0x2000" : : : "cc");
-               local_irq_disable();
-       }
-       local_irq_enable();
-}
-
-void (*idle)(void) = default_idle;
-
-/*
- * The idle thread. There's no useful work to be
- * done, so just try to conserve power and have a
- * low exit latency (ie sit in a loop waiting for
- * somebody to say that they'd like to reschedule)
- */
-void cpu_idle(void)
-{
-       /* endless idle loop with no priority at all */
-       while (1) {
-               idle();
-               schedule_preempt_disabled();
-       }
-}
-
-void machine_restart(char * __unused)
-{
-       if (mach_reset)
-               mach_reset();
-       for (;;);
-}
-
-void machine_halt(void)
-{
-       if (mach_halt)
-               mach_halt();
-       for (;;);
-}
-
-void machine_power_off(void)
-{
-       if (mach_power_off)
-               mach_power_off();
-       for (;;);
-}
-
-void show_regs(struct pt_regs * regs)
-{
-       printk(KERN_NOTICE "\n");
-       printk(KERN_NOTICE "Format %02x  Vector: %04x  PC: %08lx  Status: %04x    %s\n",
-              regs->format, regs->vector, regs->pc, regs->sr, print_tainted());
-       printk(KERN_NOTICE "ORIG_D0: %08lx  D0: %08lx  A2: %08lx  A1: %08lx\n",
-              regs->orig_d0, regs->d0, regs->a2, regs->a1);
-       printk(KERN_NOTICE "A0: %08lx  D5: %08lx  D4: %08lx\n",
-              regs->a0, regs->d5, regs->d4);
-       printk(KERN_NOTICE "D3: %08lx  D2: %08lx  D1: %08lx\n",
-              regs->d3, regs->d2, regs->d1);
-       if (!(regs->sr & PS_S))
-               printk(KERN_NOTICE "USP: %08lx\n", rdusp());
-}
-
-/*
- * Create a kernel thread
- */
-int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
-{
-       int retval;
-       long clone_arg = flags | CLONE_VM;
-       mm_segment_t fs;
-
-       fs = get_fs();
-       set_fs(KERNEL_DS);
-
-       __asm__ __volatile__ (
-                       "movel  %%sp, %%d2\n\t"
-                       "movel  %5, %%d1\n\t"
-                       "movel  %1, %%d0\n\t"
-                       "trap   #0\n\t"
-                       "cmpl   %%sp, %%d2\n\t"
-                       "jeq    1f\n\t"
-                       "movel  %3, %%sp@-\n\t"
-                       "jsr    %4@\n\t"
-                       "movel  %2, %%d0\n\t"
-                       "trap   #0\n"
-                       "1:\n\t"
-                       "movel  %%d0, %0\n"
-               : "=d" (retval)
-               : "i" (__NR_clone),
-                 "i" (__NR_exit),
-                 "a" (arg),
-                 "a" (fn),
-                 "a" (clone_arg)
-               : "cc", "%d0", "%d1", "%d2");
-
-       set_fs(fs);
-       return retval;
-}
-EXPORT_SYMBOL(kernel_thread);
-
-void flush_thread(void)
-{
-#ifdef CONFIG_FPU
-       unsigned long zero = 0;
-#endif
-
-       current->thread.fs = __USER_DS;
-#ifdef CONFIG_FPU
-       if (!FPU_IS_EMU)
-               asm volatile (".chip 68k/68881\n\t"
-                             "frestore %0\n\t"
-                             ".chip 68k" : : "m" (zero));
-#endif
-}
-
-/*
- * "m68k_fork()".. By the time we get here, the
- * non-volatile registers have also been saved on the
- * stack. We do some ugly pointer stuff here.. (see
- * also copy_thread)
- */
-
-asmlinkage int m68k_fork(struct pt_regs *regs)
-{
-       /* fork almost works, enough to trick you into looking elsewhere :-( */
-       return(-EINVAL);
-}
-
-asmlinkage int m68k_vfork(struct pt_regs *regs)
-{
-       return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, NULL);
-}
-
-asmlinkage int m68k_clone(struct pt_regs *regs)
-{
-       unsigned long clone_flags;
-       unsigned long newsp;
-
-       /* syscall2 puts clone_flags in d1 and usp in d2 */
-       clone_flags = regs->d1;
-       newsp = regs->d2;
-       if (!newsp)
-               newsp = rdusp();
-        return do_fork(clone_flags, newsp, regs, 0, NULL, NULL);
-}
-
-int copy_thread(unsigned long clone_flags,
-               unsigned long usp, unsigned long topstk,
-               struct task_struct * p, struct pt_regs * regs)
-{
-       struct pt_regs * childregs;
-       struct switch_stack * childstack, *stack;
-       unsigned long *retp;
-
-       childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
-
-       *childregs = *regs;
-       childregs->d0 = 0;
-
-       retp = ((unsigned long *) regs);
-       stack = ((struct switch_stack *) retp) - 1;
-
-       childstack = ((struct switch_stack *) childregs) - 1;
-       *childstack = *stack;
-       childstack->retpc = (unsigned long)ret_from_fork;
-
-       p->thread.usp = usp;
-       p->thread.ksp = (unsigned long)childstack;
-
-       if (clone_flags & CLONE_SETTLS)
-               task_thread_info(p)->tp_value = regs->d5;
-
-       /*
-        * Must save the current SFC/DFC value, NOT the value when
-        * the parent was last descheduled - RGH  10-08-96
-        */
-       p->thread.fs = get_fs().seg;
-
-#ifdef CONFIG_FPU
-       if (!FPU_IS_EMU) {
-               /* Copy the current fpu state */
-               asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory");
-
-               if (p->thread.fpstate[0])
-                 asm volatile ("fmovemx %/fp0-%/fp7,%0\n\t"
-                               "fmoveml %/fpiar/%/fpcr/%/fpsr,%1"
-                               : : "m" (p->thread.fp[0]), "m" (p->thread.fpcntl[0])
-                               : "memory");
-               /* Restore the state in case the fpu was busy */
-               asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0]));
-       }
-#endif
-
-       return 0;
-}
-
-/* Fill in the fpu structure for a core dump.  */
-
-int dump_fpu(struct pt_regs *regs, struct user_m68kfp_struct *fpu)
-{
-#ifdef CONFIG_FPU
-       char fpustate[216];
-
-       if (FPU_IS_EMU) {
-               int i;
-
-               memcpy(fpu->fpcntl, current->thread.fpcntl, 12);
-               memcpy(fpu->fpregs, current->thread.fp, 96);
-               /* Convert internal fpu reg representation
-                * into long double format
-                */
-               for (i = 0; i < 24; i += 3)
-                       fpu->fpregs[i] = ((fpu->fpregs[i] & 0xffff0000) << 15) |
-                                        ((fpu->fpregs[i] & 0x0000ffff) << 16);
-               return 1;
-       }
-
-       /* First dump the fpu context to avoid protocol violation.  */
-       asm volatile ("fsave %0" :: "m" (fpustate[0]) : "memory");
-       if (!fpustate[0])
-               return 0;
-
-       asm volatile ("fmovem %/fpiar/%/fpcr/%/fpsr,%0"
-               :: "m" (fpu->fpcntl[0])
-               : "memory");
-       asm volatile ("fmovemx %/fp0-%/fp7,%0"
-               :: "m" (fpu->fpregs[0])
-               : "memory");
-#endif
-       return 1;
-}
-EXPORT_SYMBOL(dump_fpu);
-
-/*
- *     Generic dumping code. Used for panic and debug.
- */
-void dump(struct pt_regs *fp)
-{
-       unsigned long   *sp;
-       unsigned char   *tp;
-       int             i;
-
-       printk(KERN_EMERG "\nCURRENT PROCESS:\n\n");
-       printk(KERN_EMERG "COMM=%s PID=%d\n", current->comm, current->pid);
-
-       if (current->mm) {
-               printk(KERN_EMERG "TEXT=%08x-%08x DATA=%08x-%08x BSS=%08x-%08x\n",
-                       (int) current->mm->start_code,
-                       (int) current->mm->end_code,
-                       (int) current->mm->start_data,
-                       (int) current->mm->end_data,
-                       (int) current->mm->end_data,
-                       (int) current->mm->brk);
-               printk(KERN_EMERG "USER-STACK=%08x KERNEL-STACK=%08x\n\n",
-                       (int) current->mm->start_stack,
-                       (int)(((unsigned long) current) + THREAD_SIZE));
-       }
-
-       printk(KERN_EMERG "PC: %08lx\n", fp->pc);
-       printk(KERN_EMERG "SR: %08lx    SP: %08lx\n", (long) fp->sr, (long) fp);
-       printk(KERN_EMERG "d0: %08lx    d1: %08lx    d2: %08lx    d3: %08lx\n",
-               fp->d0, fp->d1, fp->d2, fp->d3);
-       printk(KERN_EMERG "d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n",
-               fp->d4, fp->d5, fp->a0, fp->a1);
-       printk(KERN_EMERG "\nUSP: %08x   TRAPFRAME: %p\n",
-               (unsigned int) rdusp(), fp);
-
-       printk(KERN_EMERG "\nCODE:");
-       tp = ((unsigned char *) fp->pc) - 0x20;
-       for (sp = (unsigned long *) tp, i = 0; (i < 0x40);  i += 4) {
-               if ((i % 0x10) == 0)
-                       printk(KERN_EMERG "%p: ", tp + i);
-               printk("%08x ", (int) *sp++);
-       }
-       printk(KERN_EMERG "\n");
-
-       printk(KERN_EMERG "KERNEL STACK:");
-       tp = ((unsigned char *) fp) - 0x40;
-       for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) {
-               if ((i % 0x10) == 0)
-                       printk(KERN_EMERG "%p: ", tp + i);
-               printk("%08x ", (int) *sp++);
-       }
-       printk(KERN_EMERG "\n");
-
-       printk(KERN_EMERG "USER STACK:");
-       tp = (unsigned char *) (rdusp() - 0x10);
-       for (sp = (unsigned long *) tp, i = 0; (i < 0x80); i += 4) {
-               if ((i % 0x10) == 0)
-                       printk(KERN_EMERG "%p: ", tp + i);
-               printk("%08x ", (int) *sp++);
-       }
-       printk(KERN_EMERG "\n");
-}
-
-/*
- * sys_execve() executes a new program.
- */
-asmlinkage int sys_execve(const char *name,
-                         const char *const *argv,
-                         const char *const *envp)
-{
-       int error;
-       char * filename;
-       struct pt_regs *regs = (struct pt_regs *) &name;
-
-       filename = getname(name);
-       error = PTR_ERR(filename);
-       if (IS_ERR(filename))
-               return error;
-       error = do_execve(filename, argv, envp, regs);
-       putname(filename);
-       return error;
-}
-
-unsigned long get_wchan(struct task_struct *p)
-{
-       unsigned long fp, pc;
-       unsigned long stack_page;
-       int count = 0;
-       if (!p || p == current || p->state == TASK_RUNNING)
-               return 0;
-
-       stack_page = (unsigned long)p;
-       fp = ((struct switch_stack *)p->thread.ksp)->a6;
-       do {
-               if (fp < stack_page+sizeof(struct thread_info) ||
-                   fp >= THREAD_SIZE-8+stack_page)
-                       return 0;
-               pc = ((unsigned long *)fp)[1];
-               if (!in_sched_functions(pc))
-                       return pc;
-               fp = *(unsigned long *) fp;
-       } while (count++ < 16);
-       return 0;
-}
-
-/*
- * Return saved PC of a blocked thread.
- */
-unsigned long thread_saved_pc(struct task_struct *tsk)
-{
-       struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp;
-
-       /* Check whether the thread is blocked in resume() */
-       if (in_sched_functions(sw->retpc))
-               return ((unsigned long *)sw->a6)[1];
-       else
-               return sw->retpc;
-}
-
index 07a417550e9421156be8636088a3ea3ce7c265c0..149a05f8b9ee3bcf2323fa974183b8d4d25b22b5 100644 (file)
@@ -1,5 +1,305 @@
+/*
+ *  linux/arch/m68k/kernel/ptrace.c
+ *
+ *  Copyright (C) 1994 by Hamish Macdonald
+ *  Taken from linux/kernel/ptrace.c and modified for M680x0.
+ *  linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/errno.h>
+#include <linux/ptrace.h>
+#include <linux/user.h>
+#include <linux/signal.h>
+#include <linux/tracehook.h>
+
+#include <asm/uaccess.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+#include <asm/processor.h>
+
+/*
+ * does not yet catch signals sent when the child dies.
+ * in exit.c or in signal.c.
+ */
+
+/* determines which bits in the SR the user has access to. */
+/* 1 = access 0 = no access */
+#define SR_MASK 0x001f
+
+/* sets the trace bits. */
+#define TRACE_BITS 0xC000
+#define T1_BIT 0x8000
+#define T0_BIT 0x4000
+
+/* Find the stack offset for a register, relative to thread.esp0. */
+#define PT_REG(reg)    ((long)&((struct pt_regs *)0)->reg)
+#define SW_REG(reg)    ((long)&((struct switch_stack *)0)->reg \
+                        - sizeof(struct switch_stack))
+/* Mapping from PT_xxx to the stack offset at which the register is
+   saved.  Notice that usp has no stack-slot and needs to be treated
+   specially (see get_reg/put_reg below). */
+static const int regoff[] = {
+       [0]     = PT_REG(d1),
+       [1]     = PT_REG(d2),
+       [2]     = PT_REG(d3),
+       [3]     = PT_REG(d4),
+       [4]     = PT_REG(d5),
+       [5]     = SW_REG(d6),
+       [6]     = SW_REG(d7),
+       [7]     = PT_REG(a0),
+       [8]     = PT_REG(a1),
+       [9]     = PT_REG(a2),
+       [10]    = SW_REG(a3),
+       [11]    = SW_REG(a4),
+       [12]    = SW_REG(a5),
+       [13]    = SW_REG(a6),
+       [14]    = PT_REG(d0),
+       [15]    = -1,
+       [16]    = PT_REG(orig_d0),
+       [17]    = PT_REG(sr),
+       [18]    = PT_REG(pc),
+};
+
+/*
+ * Get contents of register REGNO in task TASK.
+ */
+static inline long get_reg(struct task_struct *task, int regno)
+{
+       unsigned long *addr;
+
+       if (regno == PT_USP)
+               addr = &task->thread.usp;
+       else if (regno < ARRAY_SIZE(regoff))
+               addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
+       else
+               return 0;
+       /* Need to take stkadj into account. */
+       if (regno == PT_SR || regno == PT_PC) {
+               long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
+               addr = (unsigned long *) ((unsigned long)addr + stkadj);
+               /* The sr is actually a 16 bit register.  */
+               if (regno == PT_SR)
+                       return *(unsigned short *)addr;
+       }
+       return *addr;
+}
+
+/*
+ * Write contents of register REGNO in task TASK.
+ */
+static inline int put_reg(struct task_struct *task, int regno,
+                         unsigned long data)
+{
+       unsigned long *addr;
+
+       if (regno == PT_USP)
+               addr = &task->thread.usp;
+       else if (regno < ARRAY_SIZE(regoff))
+               addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
+       else
+               return -1;
+       /* Need to take stkadj into account. */
+       if (regno == PT_SR || regno == PT_PC) {
+               long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
+               addr = (unsigned long *) ((unsigned long)addr + stkadj);
+               /* The sr is actually a 16 bit register.  */
+               if (regno == PT_SR) {
+                       *(unsigned short *)addr = data;
+                       return 0;
+               }
+       }
+       *addr = data;
+       return 0;
+}
+
+/*
+ * Make sure the single step bit is not set.
+ */
+static inline void singlestep_disable(struct task_struct *child)
+{
+       unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
+       put_reg(child, PT_SR, tmp);
+       clear_tsk_thread_flag(child, TIF_DELAYED_TRACE);
+}
+
+/*
+ * Called by kernel/ptrace.c when detaching..
+ */
+void ptrace_disable(struct task_struct *child)
+{
+       singlestep_disable(child);
+}
+
+void user_enable_single_step(struct task_struct *child)
+{
+       unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
+       put_reg(child, PT_SR, tmp | T1_BIT);
+       set_tsk_thread_flag(child, TIF_DELAYED_TRACE);
+}
+
 #ifdef CONFIG_MMU
-#include "ptrace_mm.c"
-#else
-#include "ptrace_no.c"
+void user_enable_block_step(struct task_struct *child)
+{
+       unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
+       put_reg(child, PT_SR, tmp | T0_BIT);
+}
 #endif
+
+void user_disable_single_step(struct task_struct *child)
+{
+       singlestep_disable(child);
+}
+
+long arch_ptrace(struct task_struct *child, long request,
+                unsigned long addr, unsigned long data)
+{
+       unsigned long tmp;
+       int i, ret = 0;
+       int regno = addr >> 2; /* temporary hack. */
+       unsigned long __user *datap = (unsigned long __user *) data;
+
+       switch (request) {
+       /* read the word at location addr in the USER area. */
+       case PTRACE_PEEKUSR:
+               if (addr & 3)
+                       goto out_eio;
+
+               if (regno >= 0 && regno < 19) {
+                       tmp = get_reg(child, regno);
+               } else if (regno >= 21 && regno < 49) {
+                       tmp = child->thread.fp[regno - 21];
+                       /* Convert internal fpu reg representation
+                        * into long double format
+                        */
+                       if (FPU_IS_EMU && (regno < 45) && !(regno % 3))
+                               tmp = ((tmp & 0xffff0000) << 15) |
+                                     ((tmp & 0x0000ffff) << 16);
+#ifndef CONFIG_MMU
+               } else if (regno == 49) {
+                       tmp = child->mm->start_code;
+               } else if (regno == 50) {
+                       tmp = child->mm->start_data;
+               } else if (regno == 51) {
+                       tmp = child->mm->end_code;
+#endif
+               } else
+                       goto out_eio;
+               ret = put_user(tmp, datap);
+               break;
+
+       case PTRACE_POKEUSR:
+       /* write the word at location addr in the USER area */
+               if (addr & 3)
+                       goto out_eio;
+
+               if (regno == PT_SR) {
+                       data &= SR_MASK;
+                       data |= get_reg(child, PT_SR) & ~SR_MASK;
+               }
+               if (regno >= 0 && regno < 19) {
+                       if (put_reg(child, regno, data))
+                               goto out_eio;
+               } else if (regno >= 21 && regno < 48) {
+                       /* Convert long double format
+                        * into internal fpu reg representation
+                        */
+                       if (FPU_IS_EMU && (regno < 45) && !(regno % 3)) {
+                               data <<= 15;
+                               data = (data & 0xffff0000) |
+                                      ((data & 0x0000ffff) >> 1);
+                       }
+                       child->thread.fp[regno - 21] = data;
+               } else
+                       goto out_eio;
+               break;
+
+       case PTRACE_GETREGS:    /* Get all gp regs from the child. */
+               for (i = 0; i < 19; i++) {
+                       tmp = get_reg(child, i);
+                       ret = put_user(tmp, datap);
+                       if (ret)
+                               break;
+                       datap++;
+               }
+               break;
+
+       case PTRACE_SETREGS:    /* Set all gp regs in the child. */
+               for (i = 0; i < 19; i++) {
+                       ret = get_user(tmp, datap);
+                       if (ret)
+                               break;
+                       if (i == PT_SR) {
+                               tmp &= SR_MASK;
+                               tmp |= get_reg(child, PT_SR) & ~SR_MASK;
+                       }
+                       put_reg(child, i, tmp);
+                       datap++;
+               }
+               break;
+
+       case PTRACE_GETFPREGS:  /* Get the child FPU state. */
+               if (copy_to_user(datap, &child->thread.fp,
+                                sizeof(struct user_m68kfp_struct)))
+                       ret = -EFAULT;
+               break;
+
+       case PTRACE_SETFPREGS:  /* Set the child FPU state. */
+               if (copy_from_user(&child->thread.fp, datap,
+                                  sizeof(struct user_m68kfp_struct)))
+                       ret = -EFAULT;
+               break;
+
+       case PTRACE_GET_THREAD_AREA:
+               ret = put_user(task_thread_info(child)->tp_value, datap);
+               break;
+
+       default:
+               ret = ptrace_request(child, request, addr, data);
+               break;
+       }
+
+       return ret;
+out_eio:
+       return -EIO;
+}
+
+asmlinkage void syscall_trace(void)
+{
+       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
+                                ? 0x80 : 0));
+       /*
+        * this isn't the same as continuing with a signal, but it will do
+        * for normal use.  strace only continues with a signal if the
+        * stopping signal is not SIGTRAP.  -brl
+        */
+       if (current->exit_code) {
+               send_sig(current->exit_code, current, 1);
+               current->exit_code = 0;
+       }
+}
+
+#ifdef CONFIG_COLDFIRE
+asmlinkage int syscall_trace_enter(void)
+{
+       int ret = 0;
+
+       if (test_thread_flag(TIF_SYSCALL_TRACE))
+               ret = tracehook_report_syscall_entry(task_pt_regs(current));
+       return ret;
+}
+
+asmlinkage void syscall_trace_leave(void)
+{
+       if (test_thread_flag(TIF_SYSCALL_TRACE))
+               tracehook_report_syscall_exit(task_pt_regs(current), 0);
+}
+#endif /* CONFIG_COLDFIRE */
diff --git a/arch/m68k/kernel/ptrace_mm.c b/arch/m68k/kernel/ptrace_mm.c
deleted file mode 100644 (file)
index 7bc999b..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- *  linux/arch/m68k/kernel/ptrace.c
- *
- *  Copyright (C) 1994 by Hamish Macdonald
- *  Taken from linux/kernel/ptrace.c and modified for M680x0.
- *  linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
- *
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/errno.h>
-#include <linux/ptrace.h>
-#include <linux/user.h>
-#include <linux/signal.h>
-#include <linux/tracehook.h>
-
-#include <asm/uaccess.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/system.h>
-#include <asm/processor.h>
-
-/*
- * does not yet catch signals sent when the child dies.
- * in exit.c or in signal.c.
- */
-
-/* determines which bits in the SR the user has access to. */
-/* 1 = access 0 = no access */
-#define SR_MASK 0x001f
-
-/* sets the trace bits. */
-#define TRACE_BITS 0xC000
-#define T1_BIT 0x8000
-#define T0_BIT 0x4000
-
-/* Find the stack offset for a register, relative to thread.esp0. */
-#define PT_REG(reg)    ((long)&((struct pt_regs *)0)->reg)
-#define SW_REG(reg)    ((long)&((struct switch_stack *)0)->reg \
-                        - sizeof(struct switch_stack))
-/* Mapping from PT_xxx to the stack offset at which the register is
-   saved.  Notice that usp has no stack-slot and needs to be treated
-   specially (see get_reg/put_reg below). */
-static const int regoff[] = {
-       [0]     = PT_REG(d1),
-       [1]     = PT_REG(d2),
-       [2]     = PT_REG(d3),
-       [3]     = PT_REG(d4),
-       [4]     = PT_REG(d5),
-       [5]     = SW_REG(d6),
-       [6]     = SW_REG(d7),
-       [7]     = PT_REG(a0),
-       [8]     = PT_REG(a1),
-       [9]     = PT_REG(a2),
-       [10]    = SW_REG(a3),
-       [11]    = SW_REG(a4),
-       [12]    = SW_REG(a5),
-       [13]    = SW_REG(a6),
-       [14]    = PT_REG(d0),
-       [15]    = -1,
-       [16]    = PT_REG(orig_d0),
-       [17]    = PT_REG(sr),
-       [18]    = PT_REG(pc),
-};
-
-/*
- * Get contents of register REGNO in task TASK.
- */
-static inline long get_reg(struct task_struct *task, int regno)
-{
-       unsigned long *addr;
-
-       if (regno == PT_USP)
-               addr = &task->thread.usp;
-       else if (regno < ARRAY_SIZE(regoff))
-               addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
-       else
-               return 0;
-       /* Need to take stkadj into account. */
-       if (regno == PT_SR || regno == PT_PC) {
-               long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
-               addr = (unsigned long *) ((unsigned long)addr + stkadj);
-               /* The sr is actually a 16 bit register.  */
-               if (regno == PT_SR)
-                       return *(unsigned short *)addr;
-       }
-       return *addr;
-}
-
-/*
- * Write contents of register REGNO in task TASK.
- */
-static inline int put_reg(struct task_struct *task, int regno,
-                         unsigned long data)
-{
-       unsigned long *addr;
-
-       if (regno == PT_USP)
-               addr = &task->thread.usp;
-       else if (regno < ARRAY_SIZE(regoff))
-               addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
-       else
-               return -1;
-       /* Need to take stkadj into account. */
-       if (regno == PT_SR || regno == PT_PC) {
-               long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj));
-               addr = (unsigned long *) ((unsigned long)addr + stkadj);
-               /* The sr is actually a 16 bit register.  */
-               if (regno == PT_SR) {
-                       *(unsigned short *)addr = data;
-                       return 0;
-               }
-       }
-       *addr = data;
-       return 0;
-}
-
-/*
- * Make sure the single step bit is not set.
- */
-static inline void singlestep_disable(struct task_struct *child)
-{
-       unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
-       put_reg(child, PT_SR, tmp);
-       clear_tsk_thread_flag(child, TIF_DELAYED_TRACE);
-}
-
-/*
- * Called by kernel/ptrace.c when detaching..
- */
-void ptrace_disable(struct task_struct *child)
-{
-       singlestep_disable(child);
-}
-
-void user_enable_single_step(struct task_struct *child)
-{
-       unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
-       put_reg(child, PT_SR, tmp | T1_BIT);
-       set_tsk_thread_flag(child, TIF_DELAYED_TRACE);
-}
-
-void user_enable_block_step(struct task_struct *child)
-{
-       unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;
-       put_reg(child, PT_SR, tmp | T0_BIT);
-}
-
-void user_disable_single_step(struct task_struct *child)
-{
-       singlestep_disable(child);
-}
-
-long arch_ptrace(struct task_struct *child, long request,
-                unsigned long addr, unsigned long data)
-{
-       unsigned long tmp;
-       int i, ret = 0;
-       int regno = addr >> 2; /* temporary hack. */
-       unsigned long __user *datap = (unsigned long __user *) data;
-
-       switch (request) {
-       /* read the word at location addr in the USER area. */
-       case PTRACE_PEEKUSR:
-               if (addr & 3)
-                       goto out_eio;
-
-               if (regno >= 0 && regno < 19) {
-                       tmp = get_reg(child, regno);
-               } else if (regno >= 21 && regno < 49) {
-                       tmp = child->thread.fp[regno - 21];
-                       /* Convert internal fpu reg representation
-                        * into long double format
-                        */
-                       if (FPU_IS_EMU && (regno < 45) && !(regno % 3))
-                               tmp = ((tmp & 0xffff0000) << 15) |
-                                     ((tmp & 0x0000ffff) << 16);
-               } else
-                       goto out_eio;
-               ret = put_user(tmp, datap);
-               break;
-
-       case PTRACE_POKEUSR:
-       /* write the word at location addr in the USER area */
-               if (addr & 3)
-                       goto out_eio;
-
-               if (regno == PT_SR) {
-                       data &= SR_MASK;
-                       data |= get_reg(child, PT_SR) & ~SR_MASK;
-               }
-               if (regno >= 0 && regno < 19) {
-                       if (put_reg(child, regno, data))
-                               goto out_eio;
-               } else if (regno >= 21 && regno < 48) {
-                       /* Convert long double format
-                        * into internal fpu reg representation
-                        */
-                       if (FPU_IS_EMU && (regno < 45) && !(regno % 3)) {
-                               data <<= 15;
-                               data = (data & 0xffff0000) |
-                                      ((data & 0x0000ffff) >> 1);
-                       }
-                       child->thread.fp[regno - 21] = data;
-               } else
-                       goto out_eio;
-               break;
-
-       case PTRACE_GETREGS:    /* Get all gp regs from the child. */
-               for (i = 0; i < 19; i++) {
-                       tmp = get_reg(child, i);
-                       ret = put_user(tmp, datap);
-                       if (ret)
-                               break;
-                       datap++;
-               }
-               break;
-
-       case PTRACE_SETREGS:    /* Set all gp regs in the child. */
-               for (i = 0; i < 19; i++) {
-                       ret = get_user(tmp, datap);
-                       if (ret)
-                               break;
-                       if (i == PT_SR) {
-                               tmp &= SR_MASK;
-                               tmp |= get_reg(child, PT_SR) & ~SR_MASK;
-                       }
-                       put_reg(child, i, tmp);
-                       datap++;
-               }
-               break;
-
-       case PTRACE_GETFPREGS:  /* Get the child FPU state. */
-               if (copy_to_user(datap, &child->thread.fp,
-                                sizeof(struct user_m68kfp_struct)))
-                       ret = -EFAULT;
-               break;
-
-       case PTRACE_SETFPREGS:  /* Set the child FPU state. */
-               if (copy_from_user(&child->thread.fp, datap,
-                                  sizeof(struct user_m68kfp_struct)))
-                       ret = -EFAULT;
-               break;
-
-       case PTRACE_GET_THREAD_AREA:
-               ret = put_user(task_thread_info(child)->tp_value, datap);
-               break;
-
-       default:
-               ret = ptrace_request(child, request, addr, data);
-               break;
-       }
-
-       return ret;
-out_eio:
-       return -EIO;
-}
-
-asmlinkage void syscall_trace(void)
-{
-       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
-                                ? 0x80 : 0));
-       /*
-        * this isn't the same as continuing with a signal, but it will do
-        * for normal use.  strace only continues with a signal if the
-        * stopping signal is not SIGTRAP.  -brl
-        */
-       if (current->exit_code) {
-               send_sig(current->exit_code, current, 1);
-               current->exit_code = 0;
-       }
-}
-
-#ifdef CONFIG_COLDFIRE
-asmlinkage int syscall_trace_enter(void)
-{
-       int ret = 0;
-
-       if (test_thread_flag(TIF_SYSCALL_TRACE))
-               ret = tracehook_report_syscall_entry(task_pt_regs(current));
-       return ret;
-}
-
-asmlinkage void syscall_trace_leave(void)
-{
-       if (test_thread_flag(TIF_SYSCALL_TRACE))
-               tracehook_report_syscall_exit(task_pt_regs(current), 0);
-}
-#endif /* CONFIG_COLDFIRE */
diff --git a/arch/m68k/kernel/ptrace_no.c b/arch/m68k/kernel/ptrace_no.c
deleted file mode 100644 (file)
index 6709fb7..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- *  linux/arch/m68knommu/kernel/ptrace.c
- *
- *  Copyright (C) 1994 by Hamish Macdonald
- *  Taken from linux/kernel/ptrace.c and modified for M680x0.
- *  linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
- *
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/errno.h>
-#include <linux/ptrace.h>
-#include <linux/user.h>
-#include <linux/signal.h>
-#include <linux/tracehook.h>
-
-#include <asm/uaccess.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/system.h>
-#include <asm/processor.h>
-
-/*
- * does not yet catch signals sent when the child dies.
- * in exit.c or in signal.c.
- */
-
-/* determines which bits in the SR the user has access to. */
-/* 1 = access 0 = no access */
-#define SR_MASK 0x001f
-
-/* sets the trace bits. */
-#define TRACE_BITS 0x8000
-
-/* Find the stack offset for a register, relative to thread.esp0. */
-#define PT_REG(reg)    ((long)&((struct pt_regs *)0)->reg)
-#define SW_REG(reg)    ((long)&((struct switch_stack *)0)->reg \
-                        - sizeof(struct switch_stack))
-/* Mapping from PT_xxx to the stack offset at which the register is
-   saved.  Notice that usp has no stack-slot and needs to be treated
-   specially (see get_reg/put_reg below). */
-static int regoff[] = {
-       PT_REG(d1), PT_REG(d2), PT_REG(d3), PT_REG(d4),
-       PT_REG(d5), SW_REG(d6), SW_REG(d7), PT_REG(a0),
-       PT_REG(a1), PT_REG(a2), SW_REG(a3), SW_REG(a4),
-       SW_REG(a5), SW_REG(a6), PT_REG(d0), -1,
-       PT_REG(orig_d0), PT_REG(sr), PT_REG(pc),
-};
-
-/*
- * Get contents of register REGNO in task TASK.
- */
-static inline long get_reg(struct task_struct *task, int regno)
-{
-       unsigned long *addr;
-
-       if (regno == PT_USP)
-               addr = &task->thread.usp;
-       else if (regno < ARRAY_SIZE(regoff))
-               addr = (unsigned long *)(task->thread.esp0 + regoff[regno]);
-       else
-               return 0;
-       return *addr;
-}
-
-/*
- * Write contents of register REGNO in task TASK.
- */
-static inline int put_reg(struct task_struct *task, int regno,
-                         unsigned long data)
-{
-       unsigned long *addr;
-
-       if (regno == PT_USP)
-               addr = &task->thread.usp;
-       else if (regno < ARRAY_SIZE(regoff))
-               addr = (unsigned long *) (task->thread.esp0 + regoff[regno]);
-       else
-               return -1;
-       *addr = data;
-       return 0;
-}
-
-void user_enable_single_step(struct task_struct *task)
-{
-       unsigned long srflags;
-       srflags = get_reg(task, PT_SR) | (TRACE_BITS << 16);
-       put_reg(task, PT_SR, srflags);
-}
-
-void user_disable_single_step(struct task_struct *task)
-{
-       unsigned long srflags;
-       srflags = get_reg(task, PT_SR) & ~(TRACE_BITS << 16);
-       put_reg(task, PT_SR, srflags);
-}
-
-/*
- * Called by kernel/ptrace.c when detaching..
- *
- * Make sure the single step bit is not set.
- */
-void ptrace_disable(struct task_struct *child)
-{
-       /* make sure the single step bit is not set. */
-       user_disable_single_step(child);
-}
-
-long arch_ptrace(struct task_struct *child, long request,
-                unsigned long addr, unsigned long data)
-{
-       int ret;
-       int regno = addr >> 2;
-       unsigned long __user *datap = (unsigned long __user *) data;
-
-       switch (request) {
-               /* read the word at location addr in the USER area. */
-               case PTRACE_PEEKUSR: {
-                       unsigned long tmp;
-                       
-                       ret = -EIO;
-                       if ((addr & 3) || addr > sizeof(struct user) - 3)
-                               break;
-                       
-                       tmp = 0;  /* Default return condition */
-                       ret = -EIO;
-                       if (regno < 19) {
-                               tmp = get_reg(child, regno);
-                               if (regno == PT_SR)
-                                       tmp >>= 16;
-                       } else if (regno >= 21 && regno < 49) {
-                               tmp = child->thread.fp[regno - 21];
-                       } else if (regno == 49) {
-                               tmp = child->mm->start_code;
-                       } else if (regno == 50) {
-                               tmp = child->mm->start_data;
-                       } else if (regno == 51) {
-                               tmp = child->mm->end_code;
-                       } else
-                               break;
-                       ret = put_user(tmp, datap);
-                       break;
-               }
-
-               case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
-                       ret = -EIO;
-                       if ((addr & 3) || addr > sizeof(struct user) - 3)
-                               break;
-
-                       if (regno == PT_SR) {
-                               data &= SR_MASK;
-                               data <<= 16;
-                               data |= get_reg(child, PT_SR) & ~(SR_MASK << 16);
-                       }
-                       if (regno < 19) {
-                               if (put_reg(child, regno, data))
-                                       break;
-                               ret = 0;
-                               break;
-                       }
-                       if (regno >= 21 && regno < 48)
-                       {
-                               child->thread.fp[regno - 21] = data;
-                               ret = 0;
-                       }
-                       break;
-
-               case PTRACE_GETREGS: { /* Get all gp regs from the child. */
-                       int i;
-                       unsigned long tmp;
-                       for (i = 0; i < 19; i++) {
-                           tmp = get_reg(child, i);
-                           if (i == PT_SR)
-                               tmp >>= 16;
-                           if (put_user(tmp, datap)) {
-                               ret = -EFAULT;
-                               break;
-                           }
-                           datap++;
-                       }
-                       ret = 0;
-                       break;
-               }
-
-               case PTRACE_SETREGS: { /* Set all gp regs in the child. */
-                       int i;
-                       unsigned long tmp;
-                       for (i = 0; i < 19; i++) {
-                           if (get_user(tmp, datap)) {
-                               ret = -EFAULT;
-                               break;
-                           }
-                           if (i == PT_SR) {
-                               tmp &= SR_MASK;
-                               tmp <<= 16;
-                               tmp |= get_reg(child, PT_SR) & ~(SR_MASK << 16);
-                           }
-                           put_reg(child, i, tmp);
-                           datap++;
-                       }
-                       ret = 0;
-                       break;
-               }
-
-#ifdef PTRACE_GETFPREGS
-               case PTRACE_GETFPREGS: { /* Get the child FPU state. */
-                       ret = 0;
-                       if (copy_to_user(datap, &child->thread.fp,
-                                        sizeof(struct user_m68kfp_struct)))
-                               ret = -EFAULT;
-                       break;
-               }
-#endif
-
-#ifdef PTRACE_SETFPREGS
-               case PTRACE_SETFPREGS: { /* Set the child FPU state. */
-                       ret = 0;
-                       if (copy_from_user(&child->thread.fp, datap,
-                                          sizeof(struct user_m68kfp_struct)))
-                               ret = -EFAULT;
-                       break;
-               }
-#endif
-
-       case PTRACE_GET_THREAD_AREA:
-               ret = put_user(task_thread_info(child)->tp_value, datap);
-               break;
-
-               default:
-                       ret = ptrace_request(child, request, addr, data);
-                       break;
-       }
-       return ret;
-}
-
-asmlinkage int syscall_trace_enter(void)
-{
-       int ret = 0;
-
-       if (test_thread_flag(TIF_SYSCALL_TRACE))
-               ret = tracehook_report_syscall_entry(task_pt_regs(current));
-       return ret;
-}
-
-asmlinkage void syscall_trace_leave(void)
-{
-       if (test_thread_flag(TIF_SYSCALL_TRACE))
-               tracehook_report_syscall_exit(task_pt_regs(current), 0);
-}
index ca3df0dc7e8842b25104e90eaad6c290bb71dc7d..7dc186b7a85fb27a098858a4106ac64d95abc1b4 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/init.h>
 #include <linux/initrd.h>
 #include <linux/root_dev.h>
+#include <linux/rtc.h>
 
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -47,7 +48,9 @@ EXPORT_SYMBOL(memory_end);
 char __initdata command_line[COMMAND_LINE_SIZE];
 
 /* machine dependent timer functions */
+void (*mach_sched_init)(irq_handler_t handler) __initdata = NULL;
 int (*mach_set_clock_mmss)(unsigned long);
+int (*mach_hwclk) (int, struct rtc_time*);
 
 /* machine dependent reboot functions */
 void (*mach_reset)(void);
index 75ab79b3bdeb76b7439f0337c30634115c7d7125..d7deb7fc7eb5c667483d4604d7537cd95f2f59a6 100644 (file)
@@ -1,5 +1,111 @@
-#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
-#include "time_mm.c"
-#else
-#include "time_no.c"
-#endif
+/*
+ *  linux/arch/m68k/kernel/time.c
+ *
+ *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
+ *
+ * This file contains the m68k-specific time handling details.
+ * Most of the stuff is located in the machine specific files.
+ *
+ * 1997-09-10  Updated NTP code according to technical memorandum Jan '96
+ *             "A Kernel Model for Precision Timekeeping" by Dave Mills
+ */
+
+#include <linux/errno.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/param.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/rtc.h>
+#include <linux/platform_device.h>
+
+#include <asm/machdep.h>
+#include <asm/io.h>
+#include <asm/irq_regs.h>
+
+#include <linux/time.h>
+#include <linux/timex.h>
+#include <linux/profile.h>
+
+/*
+ * timer_interrupt() needs to keep up the real-time clock,
+ * as well as call the "xtime_update()" routine every clocktick
+ */
+static irqreturn_t timer_interrupt(int irq, void *dummy)
+{
+       xtime_update(1);
+       update_process_times(user_mode(get_irq_regs()));
+       profile_tick(CPU_PROFILING);
+
+#ifdef CONFIG_HEARTBEAT
+       /* use power LED as a heartbeat instead -- much more useful
+          for debugging -- based on the version for PReP by Cort */
+       /* acts like an actual heart beat -- ie thump-thump-pause... */
+       if (mach_heartbeat) {
+           static unsigned cnt = 0, period = 0, dist = 0;
+
+           if (cnt == 0 || cnt == dist)
+               mach_heartbeat( 1 );
+           else if (cnt == 7 || cnt == dist+7)
+               mach_heartbeat( 0 );
+
+           if (++cnt > period) {
+               cnt = 0;
+               /* The hyperbolic function below modifies the heartbeat period
+                * length in dependency of the current (5min) load. It goes
+                * through the points f(0)=126, f(1)=86, f(5)=51,
+                * f(inf)->30. */
+               period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30;
+               dist = period / 4;
+           }
+       }
+#endif /* CONFIG_HEARTBEAT */
+       return IRQ_HANDLED;
+}
+
+void read_persistent_clock(struct timespec *ts)
+{
+       struct rtc_time time;
+       ts->tv_sec = 0;
+       ts->tv_nsec = 0;
+
+       if (mach_hwclk) {
+               mach_hwclk(0, &time);
+
+               if ((time.tm_year += 1900) < 1970)
+                       time.tm_year += 100;
+               ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
+                                     time.tm_hour, time.tm_min, time.tm_sec);
+       }
+}
+
+void __init time_init(void)
+{
+       mach_sched_init(timer_interrupt);
+}
+
+#ifdef CONFIG_M68KCLASSIC
+
+u32 arch_gettimeoffset(void)
+{
+       return mach_gettimeoffset() * 1000;
+}
+
+static int __init rtc_init(void)
+{
+       struct platform_device *pdev;
+
+       if (!mach_hwclk)
+               return -ENODEV;
+
+       pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
+       if (IS_ERR(pdev))
+               return PTR_ERR(pdev);
+
+       return 0;
+}
+
+module_init(rtc_init);
+
+#endif /* CONFIG_M68KCLASSIC */
diff --git a/arch/m68k/kernel/time_mm.c b/arch/m68k/kernel/time_mm.c
deleted file mode 100644 (file)
index 18b34ee..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *  linux/arch/m68k/kernel/time.c
- *
- *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
- *
- * This file contains the m68k-specific time handling details.
- * Most of the stuff is located in the machine specific files.
- *
- * 1997-09-10  Updated NTP code according to technical memorandum Jan '96
- *             "A Kernel Model for Precision Timekeeping" by Dave Mills
- */
-
-#include <linux/errno.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/rtc.h>
-#include <linux/platform_device.h>
-
-#include <asm/machdep.h>
-#include <asm/io.h>
-#include <asm/irq_regs.h>
-
-#include <linux/time.h>
-#include <linux/timex.h>
-#include <linux/profile.h>
-
-static inline int set_rtc_mmss(unsigned long nowtime)
-{
-  if (mach_set_clock_mmss)
-    return mach_set_clock_mmss (nowtime);
-  return -1;
-}
-
-/*
- * timer_interrupt() needs to keep up the real-time clock,
- * as well as call the "xtime_update()" routine every clocktick
- */
-static irqreturn_t timer_interrupt(int irq, void *dummy)
-{
-       xtime_update(1);
-       update_process_times(user_mode(get_irq_regs()));
-       profile_tick(CPU_PROFILING);
-
-#ifdef CONFIG_HEARTBEAT
-       /* use power LED as a heartbeat instead -- much more useful
-          for debugging -- based on the version for PReP by Cort */
-       /* acts like an actual heart beat -- ie thump-thump-pause... */
-       if (mach_heartbeat) {
-           static unsigned cnt = 0, period = 0, dist = 0;
-
-           if (cnt == 0 || cnt == dist)
-               mach_heartbeat( 1 );
-           else if (cnt == 7 || cnt == dist+7)
-               mach_heartbeat( 0 );
-
-           if (++cnt > period) {
-               cnt = 0;
-               /* The hyperbolic function below modifies the heartbeat period
-                * length in dependency of the current (5min) load. It goes
-                * through the points f(0)=126, f(1)=86, f(5)=51,
-                * f(inf)->30. */
-               period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30;
-               dist = period / 4;
-           }
-       }
-#endif /* CONFIG_HEARTBEAT */
-       return IRQ_HANDLED;
-}
-
-void read_persistent_clock(struct timespec *ts)
-{
-       struct rtc_time time;
-       ts->tv_sec = 0;
-       ts->tv_nsec = 0;
-
-       if (mach_hwclk) {
-               mach_hwclk(0, &time);
-
-               if ((time.tm_year += 1900) < 1970)
-                       time.tm_year += 100;
-               ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday,
-                                     time.tm_hour, time.tm_min, time.tm_sec);
-       }
-}
-
-void __init time_init(void)
-{
-       mach_sched_init(timer_interrupt);
-}
-
-u32 arch_gettimeoffset(void)
-{
-       return mach_gettimeoffset() * 1000;
-}
-
-static int __init rtc_init(void)
-{
-       struct platform_device *pdev;
-
-       if (!mach_hwclk)
-               return -ENODEV;
-
-       pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
-
-       return 0;
-}
-
-module_init(rtc_init);
diff --git a/arch/m68k/kernel/time_no.c b/arch/m68k/kernel/time_no.c
deleted file mode 100644 (file)
index 3ef0f77..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *  linux/arch/m68knommu/kernel/time.c
- *
- *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
- *
- * This file contains the m68k-specific time handling details.
- * Most of the stuff is located in the machine specific files.
- *
- * 1997-09-10  Updated NTP code according to technical memorandum Jan '96
- *             "A Kernel Model for Precision Timekeeping" by Dave Mills
- */
-
-#include <linux/errno.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/profile.h>
-#include <linux/time.h>
-#include <linux/timex.h>
-
-#include <asm/machdep.h>
-#include <asm/irq_regs.h>
-
-#define        TICK_SIZE (tick_nsec / 1000)
-
-/* machine dependent timer functions */
-void (*mach_gettod)(int*, int*, int*, int*, int*, int*);
-
-static inline int set_rtc_mmss(unsigned long nowtime)
-{
-       if (mach_set_clock_mmss)
-               return mach_set_clock_mmss (nowtime);
-       return -1;
-}
-
-#ifndef CONFIG_GENERIC_CLOCKEVENTS
-/*
- * timer_interrupt() needs to keep up the real-time clock,
- * as well as call the "xtime_update()" routine every clocktick
- */
-irqreturn_t arch_timer_interrupt(int irq, void *dummy)
-{
-
-       if (current->pid)
-               profile_tick(CPU_PROFILING);
-
-       xtime_update(1);
-
-       update_process_times(user_mode(get_irq_regs()));
-
-       return(IRQ_HANDLED);
-}
-#endif
-
-static unsigned long read_rtc_mmss(void)
-{
-       unsigned int year, mon, day, hour, min, sec;
-
-       if (mach_gettod) {
-               mach_gettod(&year, &mon, &day, &hour, &min, &sec);
-               if ((year += 1900) < 1970)
-                       year += 100;
-       } else {
-               year = 1970;
-               mon = day = 1;
-               hour = min = sec = 0;
-       }
-
-
-       return  mktime(year, mon, day, hour, min, sec);
-}
-
-void read_persistent_clock(struct timespec *ts)
-{
-       ts->tv_sec = read_rtc_mmss();
-       ts->tv_nsec = 0;
-}
-
-int update_persistent_clock(struct timespec now)
-{
-       return set_rtc_mmss(now.tv_sec);
-}
-
-void time_init(void)
-{
-       hw_timer_init();
-}
index 8e66ccb0935ee5c408e17c4614b66397cc1dbbdf..40e02d9c38b4df4bac25bf659d44885dd99f9fa8 100644 (file)
 /*
  *     vmlinux.lds.S -- master linker script for m68knommu arch
  *
- *     (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
+ *     (C) Copyright 2002-2012, Greg Ungerer <gerg@snapgear.com>
  *
  *     This linker script is equipped to build either ROM loaded or RAM
  *     run kernels.
  */
 
-#include <asm-generic/vmlinux.lds.h>
-#include <asm/page.h>
-#include <asm/thread_info.h>
-
 #if defined(CONFIG_RAMKERNEL)
-#define        RAM_START       CONFIG_KERNELBASE
-#define        RAM_LENGTH      (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
-#define        TEXT            ram
-#define        DATA            ram
-#define        INIT            ram
-#define        BSSS            ram
-#endif
-#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
-#define        RAM_START       CONFIG_RAMBASE
-#define        RAM_LENGTH      CONFIG_RAMSIZE
-#define        ROMVEC_START    CONFIG_ROMVEC
-#define        ROMVEC_LENGTH   CONFIG_ROMVECSIZE
-#define        ROM_START       CONFIG_ROMSTART
-#define        ROM_LENGTH      CONFIG_ROMSIZE
-#define        TEXT            rom
-#define        DATA            ram
-#define        INIT            ram
-#define        BSSS            ram
+#define        KTEXT_ADDR      CONFIG_KERNELBASE
 #endif
-
-#ifndef DATA_ADDR
-#define        DATA_ADDR
+#if defined(CONFIG_ROMKERNEL)
+#define        KTEXT_ADDR      CONFIG_ROMSTART
+#define        KDATA_ADDR      CONFIG_KERNELBASE
+#define        LOAD_OFFSET     KDATA_ADDR + (ADDR(.text) + SIZEOF(.text))
 #endif
 
+#include <asm/page.h>
+#include <asm/thread_info.h>
+#include <asm-generic/vmlinux.lds.h>
 
 OUTPUT_ARCH(m68k)