Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 Jun 2014 02:37:03 +0000 (16:37 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 Jun 2014 02:37:03 +0000 (16:37 -1000)
Pull networking fixes from David Miller:

 1) Fix checksumming regressions, from Tom Herbert.

 2) Undo unintentional permissions changes for SCTP rto_alpha and
    rto_beta sysfs knobs, from Denial Borkmann.

 3) VXLAN, like other IP tunnels, should advertize it's encapsulation
    size using dev->needed_headroom instead of dev->hard_header_len.
    From Cong Wang.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  net: sctp: fix permissions for rto_alpha and rto_beta knobs
  vxlan: Checksum fixes
  net: add skb_pop_rcv_encapsulation
  udp: call __skb_checksum_complete when doing full checksum
  net: Fix save software checksum complete
  net: Fix GSO constants to match NETIF flags
  udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
  vxlan: use dev->needed_headroom instead of dev->hard_header_len
  MAINTAINERS: update cxgb4 maintainer

472 files changed:
.gitignore
Documentation/devicetree/bindings/clock/sunxi.txt
Documentation/devicetree/bindings/clock/ti/apll.txt
Documentation/devicetree/bindings/clock/ti/dpll.txt
Documentation/devicetree/bindings/clock/ti/dra7-atl.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/ti/gate.txt
Documentation/devicetree/bindings/clock/ti/interface.txt
Documentation/hwmon/shtc1 [new file with mode: 0644]
Documentation/kbuild/modules.txt
Documentation/kprobes.txt
Documentation/mutex-design.txt
Documentation/vDSO/parse_vdso.c
Documentation/vDSO/vdso_standalone_test_x86.c [new file with mode: 0644]
Documentation/vDSO/vdso_test.c
Makefile
arch/arm/boot/dts/dra7xx-clocks.dtsi
arch/arm/boot/dts/omap54xx-clocks.dtsi
arch/arm/kernel/perf_event.c
arch/arm/kernel/perf_event_cpu.c
arch/arm/kernel/topology.c
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
arch/arm/mach-omap2/clock.h
arch/arm/mach-omap2/clock2xxx.h
arch/arm/mach-omap2/dpll3xxx.c
arch/blackfin/configs/BF526-EZBRD_defconfig
arch/blackfin/configs/BF527-EZKIT-V2_defconfig
arch/blackfin/configs/BF527-EZKIT_defconfig
arch/blackfin/configs/BF548-EZKIT_defconfig
arch/blackfin/configs/BF609-EZKIT_defconfig
arch/blackfin/configs/BlackStamp_defconfig
arch/blackfin/configs/H8606_defconfig
arch/blackfin/include/asm/dma.h
arch/blackfin/mach-bf533/boards/stamp.c
arch/powerpc/Kconfig.debug
arch/powerpc/boot/Makefile
arch/powerpc/configs/chroma_defconfig [deleted file]
arch/powerpc/include/asm/cpm2.h
arch/powerpc/include/asm/eeh.h
arch/powerpc/include/asm/eeh_event.h
arch/powerpc/include/asm/mmu-book3e.h
arch/powerpc/include/asm/opal.h
arch/powerpc/include/asm/reg_a2.h
arch/powerpc/include/asm/switch_to.h
arch/powerpc/include/asm/wsp.h [deleted file]
arch/powerpc/include/uapi/asm/cputable.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/cpu_setup_a2.S [deleted file]
arch/powerpc/kernel/cpu_setup_power.S
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/eeh.c
arch/powerpc/kernel/eeh_driver.c
arch/powerpc/kernel/eeh_event.c
arch/powerpc/kernel/eeh_pe.c
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/head_40x.S
arch/powerpc/kernel/process.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/traps.c
arch/powerpc/kernel/udbg.c
arch/powerpc/kernel/udbg_16550.c
arch/powerpc/kvm/book3s_hv_ras.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/lib/sstep.c
arch/powerpc/platforms/Kconfig
arch/powerpc/platforms/Kconfig.cputype
arch/powerpc/platforms/Makefile
arch/powerpc/platforms/cell/spufs/spufs.h
arch/powerpc/platforms/powernv/Kconfig
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/eeh-ioda.c
arch/powerpc/platforms/powernv/opal-msglog.c
arch/powerpc/platforms/powernv/opal-sysparam.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/powernv/smp.c
arch/powerpc/platforms/pseries/Kconfig
arch/powerpc/platforms/wsp/Kconfig [deleted file]
arch/powerpc/platforms/wsp/Makefile [deleted file]
arch/powerpc/platforms/wsp/chroma.c [deleted file]
arch/powerpc/platforms/wsp/h8.c [deleted file]
arch/powerpc/platforms/wsp/ics.c [deleted file]
arch/powerpc/platforms/wsp/ics.h [deleted file]
arch/powerpc/platforms/wsp/msi.c [deleted file]
arch/powerpc/platforms/wsp/msi.h [deleted file]
arch/powerpc/platforms/wsp/opb_pic.c [deleted file]
arch/powerpc/platforms/wsp/psr2.c [deleted file]
arch/powerpc/platforms/wsp/scom_smp.c [deleted file]
arch/powerpc/platforms/wsp/scom_wsp.c [deleted file]
arch/powerpc/platforms/wsp/setup.c [deleted file]
arch/powerpc/platforms/wsp/smp.c [deleted file]
arch/powerpc/platforms/wsp/wsp.c [deleted file]
arch/powerpc/platforms/wsp/wsp.h [deleted file]
arch/powerpc/platforms/wsp/wsp_pci.c [deleted file]
arch/powerpc/platforms/wsp/wsp_pci.h [deleted file]
arch/powerpc/sysdev/xics/icp-native.c
arch/powerpc/xmon/nonstdio.c
arch/um/Makefile
arch/x86/Kconfig
arch/x86/include/asm/asm.h
arch/x86/include/asm/kprobes.h
arch/x86/include/asm/qrwlock.h [new file with mode: 0644]
arch/x86/include/asm/spinlock.h
arch/x86/include/asm/spinlock_types.h
arch/x86/include/asm/traps.h
arch/x86/include/asm/uprobes.h
arch/x86/kernel/alternative.c
arch/x86/kernel/apic/hw_nmi.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/mshyperv.c
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event_amd_ibs.c
arch/x86/kernel/cpu/perf_event_intel_lbr.c
arch/x86/kernel/dumpstack.c
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S
arch/x86/kernel/hw_breakpoint.c
arch/x86/kernel/i8259.c
arch/x86/kernel/irq.c
arch/x86/kernel/kprobes/core.c
arch/x86/kernel/kprobes/ftrace.c
arch/x86/kernel/kprobes/opt.c
arch/x86/kernel/kvm.c
arch/x86/kernel/nmi.c
arch/x86/kernel/paravirt.c
arch/x86/kernel/process_64.c
arch/x86/kernel/traps.c
arch/x86/kernel/uprobes.c
arch/x86/lib/thunk_32.S
arch/x86/lib/thunk_64.S
arch/x86/mm/fault.c
arch/x86/vdso/Makefile
arch/x86/vdso/vdso-fakesections.c [new file with mode: 0644]
arch/x86/vdso/vdso2c.c
arch/x86/vdso/vdso2c.h
block/blk-core.c
drivers/block/nvme-core.c
drivers/block/nvme-scsi.c
drivers/block/rbd.c
drivers/clk/sunxi/Makefile
drivers/clk/sunxi/clk-a10-hosc.c [new file with mode: 0644]
drivers/clk/sunxi/clk-a20-gmac.c [new file with mode: 0644]
drivers/clk/sunxi/clk-sun6i-apb0-gates.c [new file with mode: 0644]
drivers/clk/sunxi/clk-sun6i-apb0.c [new file with mode: 0644]
drivers/clk/sunxi/clk-sun6i-ar100.c [new file with mode: 0644]
drivers/clk/sunxi/clk-sunxi.c
drivers/clk/ti/Makefile
drivers/clk/ti/apll.c
drivers/clk/ti/clk-2xxx.c [new file with mode: 0644]
drivers/clk/ti/clk-54xx.c
drivers/clk/ti/clk-7xx.c
drivers/clk/ti/clk-dra7-atl.c [new file with mode: 0644]
drivers/clk/ti/dpll.c
drivers/clk/ti/gate.c
drivers/clk/ti/interface.c
drivers/cpuidle/cpuidle-powernv.c
drivers/cpuidle/driver.c
drivers/crypto/Kconfig
drivers/gpio/gpiolib.c
drivers/hsi/clients/Kconfig
drivers/hsi/controllers/omap_ssi_port.c
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/atxp1.c
drivers/hwmon/ina2xx.c
drivers/hwmon/lm85.c
drivers/hwmon/ltc4151.c
drivers/hwmon/shtc1.c [new file with mode: 0644]
drivers/hwmon/vexpress.c
drivers/infiniband/ulp/iser/iser_initiator.c
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h
drivers/media/platform/Kconfig
drivers/media/platform/omap3isp/Makefile
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/omap3isp/isp.h
drivers/media/platform/omap3isp/ispccdc.c
drivers/media/platform/omap3isp/ispccdc.h
drivers/media/platform/omap3isp/ispccp2.c
drivers/media/platform/omap3isp/ispcsi2.c
drivers/media/platform/omap3isp/isph3a_aewb.c
drivers/media/platform/omap3isp/isph3a_af.c
drivers/media/platform/omap3isp/isppreview.c
drivers/media/platform/omap3isp/ispqueue.c [deleted file]
drivers/media/platform/omap3isp/ispqueue.h [deleted file]
drivers/media/platform/omap3isp/ispresizer.c
drivers/media/platform/omap3isp/ispstat.c
drivers/media/platform/omap3isp/ispstat.h
drivers/media/platform/omap3isp/ispvideo.c
drivers/media/platform/omap3isp/ispvideo.h
drivers/media/v4l2-core/videobuf2-core.c
drivers/scsi/Kconfig
drivers/scsi/hpsa.c
drivers/scsi/hpsa.h
drivers/scsi/hpsa_cmd.h
drivers/scsi/libiscsi.c
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_bsg.h
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_hw.h
drivers/scsi/lpfc/lpfc_hw4.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_mem.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/lpfc/lpfc_scsi.h
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli.h
drivers/scsi/lpfc/lpfc_sli4.h
drivers/scsi/lpfc/lpfc_version.h
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_target.c
drivers/scsi/qla2xxx/qla_target.h
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/scsi/qla2xxx/tcm_qla2xxx.h
drivers/scsi/virtio_scsi.c
drivers/staging/media/omap4iss/iss_video.c
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_auth.c
drivers/target/iscsi/iscsi_target_auth.h
drivers/target/iscsi/iscsi_target_login.c
drivers/target/iscsi/iscsi_target_nego.c
drivers/target/iscsi/iscsi_target_parameters.c
drivers/target/iscsi/iscsi_target_tpg.c
drivers/target/iscsi/iscsi_target_tpg.h
drivers/target/loopback/tcm_loop.c
drivers/target/target_core_sbc.c
drivers/target/target_core_spc.c
drivers/target/target_core_transport.c
drivers/target/target_core_xcopy.c
drivers/target/tcm_fc/tfc_cmd.c
drivers/target/tcm_fc/tfc_io.c
drivers/vhost/scsi.c
firmware/Makefile
fs/aio.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/ioctl.c
fs/btrfs/qgroup.c
fs/btrfs/reada.c
fs/btrfs/tests/btrfs-tests.c
fs/btrfs/tests/qgroup-tests.c
fs/btrfs/transaction.c
fs/ceph/acl.c
fs/ceph/addr.c
fs/ceph/caps.c
fs/ceph/export.c
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/super.h
fs/dlm/lowcomms.c
fs/exec.c
include/asm-generic/qrwlock.h [new file with mode: 0644]
include/asm-generic/qrwlock_types.h [new file with mode: 0644]
include/asm-generic/vmlinux.lds.h
include/dt-bindings/clk/ti-dra7-atl.h [new file with mode: 0644]
include/linux/ceph/ceph_fs.h
include/linux/ceph/mon_client.h
include/linux/clk/ti.h
include/linux/compiler.h
include/linux/kprobes.h
include/linux/kvm_host.h
include/linux/nvme.h
include/linux/perf_event.h
include/linux/platform_data/shtc1.h [new file with mode: 0644]
include/linux/ring_buffer.h
include/linux/rwsem.h
include/linux/sched.h
include/linux/uprobes.h
include/linux/virtio_scsi.h
include/media/videobuf2-core.h
include/scsi/scsi_cmnd.h
include/sound/pcm.h
include/target/iscsi/iscsi_transport.h
include/target/target_core_backend.h
include/trace/events/sched.h
include/uapi/linux/btrfs.h
include/uapi/linux/nvme.h
include/uapi/linux/perf_event.h
include/uapi/sound/compress_offload.h
kernel/Kconfig.locks
kernel/events/core.c
kernel/events/uprobes.c
kernel/kprobes.c
kernel/locking/Makefile
kernel/locking/qrwlock.c [new file with mode: 0644]
kernel/locking/rwsem-xadd.c
kernel/locking/rwsem.c
kernel/notifier.c
kernel/sched/core.c
kernel/sched/deadline.c
kernel/sched/fair.c
kernel/sched/features.h
kernel/sched/idle.c
kernel/sched/rt.c
kernel/sched/sched.h
kernel/trace/ring_buffer.c
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_event_perf.c
kernel/trace/trace_kprobe.c
kernel/trace/trace_probe.c
kernel/trace/trace_probe.h
kernel/trace/trace_uprobe.c
mm/page_io.c
net/ceph/ceph_common.c
net/ceph/debugfs.c
net/ceph/mon_client.c
scripts/Makefile
scripts/Makefile.asm-generic
scripts/Makefile.build
scripts/Makefile.extrawarn [new file with mode: 0644]
scripts/Makefile.fwinst
scripts/Makefile.host
scripts/Makefile.lib
scripts/basic/fixdep.c
scripts/checkstack.pl
scripts/coccinelle/misc/of_table.cocci [new file with mode: 0644]
scripts/coccinelle/misc/returnvar.cocci [new file with mode: 0644]
scripts/config
scripts/conmakehash.c
scripts/docproc.c
scripts/dtc/.gitignore
scripts/dtc/fstree.c
scripts/dtc/libfdt/fdt_empty_tree.c
scripts/dtc/treesource.c
scripts/headers.sh
scripts/kallsyms.c
scripts/kconfig/Makefile
scripts/kconfig/check.sh
scripts/kconfig/conf.c
scripts/kconfig/gconf.c
scripts/kconfig/lxdialog/checklist.c
scripts/kconfig/lxdialog/inputbox.c
scripts/kconfig/lxdialog/menubox.c
scripts/kconfig/lxdialog/util.c
scripts/kconfig/mconf.c
scripts/kconfig/menu.c
scripts/kconfig/nconf.c
scripts/kconfig/streamline_config.pl
scripts/kconfig/util.c
scripts/kconfig/zconf.l
scripts/kconfig/zconf.lex.c_shipped
scripts/kconfig/zconf.tab.c_shipped
scripts/kconfig/zconf.y
scripts/markup_oops.pl
scripts/mkcompile_h
scripts/mkmakefile
scripts/mksysmap
scripts/mod/.gitignore
scripts/mod/file2alias.c
scripts/mod/mk_elfconfig.c
scripts/mod/modpost.c
scripts/mod/sumversion.c
scripts/objdiff
scripts/package/Makefile
scripts/package/builddeb
scripts/package/buildtar
scripts/patch-kernel
scripts/pnmtologo.c
scripts/recordmcount.c
scripts/rt-tester/check-all.sh
scripts/rt-tester/rt-tester.py
scripts/selinux/install_policy.sh
scripts/show_delta
scripts/tags.sh
security/integrity/evm/Kconfig
security/integrity/evm/evm.h
security/integrity/evm/evm_crypto.c
security/integrity/evm/evm_main.c
security/integrity/ima/ima_appraise.c
security/integrity/ima/ima_crypto.c
security/integrity/ima/ima_main.c
sound/core/seq/seq_clientmgr.c
sound/core/seq/seq_fifo.c
sound/core/timer.c
sound/firewire/bebob/bebob.h
sound/firewire/bebob/bebob_stream.c
sound/firewire/fireworks/fireworks.c
sound/firewire/fireworks/fireworks.h
sound/firewire/fireworks/fireworks_hwdep.c
sound/firewire/fireworks/fireworks_stream.c
sound/firewire/fireworks/fireworks_transaction.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_realtek.c
sound/pci/intel8x0.c
tools/lib/api/fs/fs.c
tools/perf/Documentation/perf-record.txt
tools/perf/Documentation/perf-report.txt
tools/perf/Documentation/perf-top.txt
tools/perf/Makefile.perf
tools/perf/builtin-annotate.c
tools/perf/builtin-diff.c
tools/perf/builtin-record.c
tools/perf/builtin-report.c
tools/perf/builtin-sched.c
tools/perf/builtin-top.c
tools/perf/config/Makefile
tools/perf/perf.c
tools/perf/tests/builtin-test.c
tools/perf/tests/hists_common.c
tools/perf/tests/hists_common.h
tools/perf/tests/hists_cumulate.c [new file with mode: 0644]
tools/perf/tests/hists_filter.c
tools/perf/tests/hists_link.c
tools/perf/tests/hists_output.c
tools/perf/tests/tests.h
tools/perf/ui/browser.c
tools/perf/ui/browsers/hists.c
tools/perf/ui/gtk/hists.c
tools/perf/ui/hist.c
tools/perf/ui/stdio/hist.c
tools/perf/util/callchain.c
tools/perf/util/callchain.h
tools/perf/util/hist.c
tools/perf/util/hist.h
tools/perf/util/sort.c
tools/perf/util/sort.h
tools/perf/util/symbol.c
tools/perf/util/symbol.h
tools/testing/selftests/powerpc/Makefile
tools/testing/selftests/powerpc/harness.c
tools/testing/selftests/powerpc/pmu/Makefile
tools/testing/selftests/powerpc/pmu/ebb/Makefile [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/back_to_back_ebbs_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/close_clears_pmcc_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/cycles_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/ebb.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/ebb.h [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/ebb_handler.S [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/event_attributes_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/fixed_instruction_loop.S [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/fork_cleanup_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/instruction_count_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/lost_exception_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/multi_counter_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/multi_ebb_procs_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/pmae_handling_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/reg.h [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/reg_access_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/trace.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/ebb/trace.h [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/event.c
tools/testing/selftests/powerpc/pmu/event.h
tools/testing/selftests/powerpc/pmu/lib.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/lib.h [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/loop.S
tools/testing/selftests/powerpc/subunit.h
tools/testing/selftests/powerpc/tm/Makefile [new file with mode: 0644]
tools/testing/selftests/powerpc/tm/tm-resched-dscr.c [new file with mode: 0644]
tools/testing/selftests/powerpc/utils.h
virt/kvm/kvm_main.c

index 42fa0d5626a9560d74d16b2df5250b300543b67e..f4c0b091dcf4e6413cbe70f0ec345a5894e0885e 100644 (file)
@@ -22,7 +22,6 @@
 *.lst
 *.symtypes
 *.order
-modules.builtin
 *.elf
 *.bin
 *.gz
@@ -33,6 +32,8 @@ modules.builtin
 *.lzo
 *.patch
 *.gcno
+modules.builtin
+Module.symvers
 
 #
 # Top-level generic files
@@ -44,7 +45,6 @@ modules.builtin
 /vmlinuz
 /System.map
 /Module.markers
-/Module.symvers
 
 #
 # Debian directory (make deb-pkg)
index a5160d8cbb5f7e1c020e925da23d491ca3b3a0a4..b9ec668bfe6263de85f09ccd2eb06769849c0178 100644 (file)
@@ -20,12 +20,15 @@ Required properties:
        "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13
        "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s
        "allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20
+       "allwinner,sun6i-a31-ar100-clk" - for the AR100 on A31
        "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31
        "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31
        "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock
+       "allwinner,sun6i-a31-apb0-clk" - for the APB0 clock on A31
        "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10
        "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13
        "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s
+       "allwinner,sun6i-a31-apb0-gates-clk" - for the APB0 gates on A31
        "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20
        "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock
        "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing
@@ -41,6 +44,7 @@ Required properties:
        "allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31
        "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20
        "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13
+       "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31
 
 Required properties for all clocks:
 - reg : shall be the control register address for the clock.
index 7faf5a68b3beeba44a767836fdeb6dc64653a5b3..ade4dd4c30f0e12804a94845b71ee462e30f1d99 100644 (file)
@@ -14,18 +14,32 @@ a subtype of a DPLL [2], although a simplified one at that.
 [2] Documentation/devicetree/bindings/clock/ti/dpll.txt
 
 Required properties:
-- compatible : shall be "ti,dra7-apll-clock"
+- compatible : shall be "ti,dra7-apll-clock" or "ti,omap2-apll-clock"
 - #clock-cells : from common clock binding; shall be set to 0.
 - clocks : link phandles of parent clocks (clk-ref and clk-bypass)
 - reg : address and length of the register set for controlling the APLL.
   It contains the information of registers in the following order:
-       "control" - contains the control register base address
-       "idlest" - contains the idlest register base address
+       "control" - contains the control register offset
+       "idlest" - contains the idlest register offset
+       "autoidle" - contains the autoidle register offset (OMAP2 only)
+- ti,clock-frequency : static clock frequency for the clock (OMAP2 only)
+- ti,idlest-shift : bit-shift for the idlest field (OMAP2 only)
+- ti,bit-shift : bit-shift for enable and autoidle fields (OMAP2 only)
 
 Examples:
-       apll_pcie_ck: apll_pcie_ck@4a008200 {
+       apll_pcie_ck: apll_pcie_ck {
                #clock-cells = <0>;
                clocks = <&apll_pcie_in_clk_mux>, <&dpll_pcie_ref_ck>;
-               reg = <0x4a00821c 0x4>, <0x4a008220 0x4>;
+               reg = <0x021c>, <0x0220>;
                compatible = "ti,dra7-apll-clock";
        };
+
+       apll96_ck: apll96_ck {
+               #clock-cells = <0>;
+               compatible = "ti,omap2-apll-clock";
+               clocks = <&sys_ck>;
+               ti,bit-shift = <2>;
+               ti,idlest-shift = <8>;
+               ti,clock-frequency = <96000000>;
+               reg = <0x0500>, <0x0530>, <0x0520>;
+       };
index 30bfdb7c9f18a7137a5e9e7de12accfb4e82f6f2..df57009ff8e74ff48693220908f3a8f1581e15f9 100644 (file)
@@ -24,12 +24,14 @@ Required properties:
                "ti,omap4-dpll-core-clock",
                "ti,omap4-dpll-m4xen-clock",
                "ti,omap4-dpll-j-type-clock",
+               "ti,omap5-mpu-dpll-clock",
                "ti,am3-dpll-no-gate-clock",
                "ti,am3-dpll-j-type-clock",
                "ti,am3-dpll-no-gate-j-type-clock",
                "ti,am3-dpll-clock",
                "ti,am3-dpll-core-clock",
                "ti,am3-dpll-x2-clock",
+               "ti,omap2-dpll-core-clock",
 
 - #clock-cells : from common clock binding; shall be set to 0.
 - clocks : link phandles of parent clocks, first entry lists reference clock
@@ -41,6 +43,7 @@ Required properties:
        "mult-div1" - contains the multiplier / divider register base address
        "autoidle" - contains the autoidle register base address (optional)
   ti,am3-* dpll types do not have autoidle register
+  ti,omap2-* dpll type does not support idlest / autoidle registers
 
 Optional properties:
 - DPLL mode setting - defining any one or more of the following overrides
@@ -73,3 +76,10 @@ Examples:
                clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
                reg = <0x90>, <0x5c>, <0x68>;
        };
+
+       dpll_ck: dpll_ck {
+               #clock-cells = <0>;
+               compatible = "ti,omap2-dpll-core-clock";
+               clocks = <&sys_ck>, <&sys_ck>;
+               reg = <0x0500>, <0x0540>;
+       };
diff --git a/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt b/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt
new file mode 100644 (file)
index 0000000..585e8c1
--- /dev/null
@@ -0,0 +1,96 @@
+Device Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC.
+
+The ATL IP is used to generate clock to be used to synchronize baseband and
+audio codec. A single ATL IP provides four ATL clock instances sharing the same
+functional clock but can be configured to provide different clocks.
+ATL can maintain a clock averages to some desired frequency based on the bws/aws
+signals - can compensate the drift between the two ws signal.
+
+In order to provide the support for ATL and it's output clocks (which can be used
+internally within the SoC or external components) two sets of bindings is needed:
+
+Clock tree binding:
+This binding uses the common clock binding[1].
+To be able to integrate the ATL clocks with DT clock tree.
+Provides ccf level representation of the ATL clocks to be used by drivers.
+Since the clock instances are part of a single IP this binding is used as a node
+for the DT clock tree, the IP driver is needed to handle the actual configuration
+of the IP.
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Required properties:
+- compatible : shall be "ti,dra7-atl-clock"
+- #clock-cells : from common clock binding; shall be set to 0.
+- clocks : link phandles to functional clock of ATL
+
+Binding for the IP driver:
+This binding is used to configure the IP driver which is going to handle the
+configuration of the IP for the ATL clock instances.
+
+Required properties:
+- compatible : shall be "ti,dra7-atl"
+- reg : base address for the ATL IP
+- ti,provided-clocks : List of phandles to the clocks associated with the ATL
+- clocks : link phandles to functional clock of ATL
+- clock-names : Shall be set to "fck"
+- ti,hwmods : Shall be set to "atl"
+
+Optional properties:
+Configuration of ATL instances:
+- atl{0/1/2/3} {
+       - bws : Baseband word select signal selection
+       - aws : Audio word select signal selection
+};
+
+For valid word select signals, see the dt-bindings/clk/ti-dra7-atl.h include
+file.
+
+Examples:
+/* clock bindings for atl provided clocks */
+atl_clkin0_ck: atl_clkin0_ck {
+       #clock-cells = <0>;
+       compatible = "ti,dra7-atl-clock";
+       clocks = <&atl_gfclk_mux>;
+};
+
+atl_clkin1_ck: atl_clkin1_ck {
+       #clock-cells = <0>;
+       compatible = "ti,dra7-atl-clock";
+       clocks = <&atl_gfclk_mux>;
+};
+
+atl_clkin2_ck: atl_clkin2_ck {
+       #clock-cells = <0>;
+       compatible = "ti,dra7-atl-clock";
+       clocks = <&atl_gfclk_mux>;
+};
+
+atl_clkin3_ck: atl_clkin3_ck {
+       #clock-cells = <0>;
+       compatible = "ti,dra7-atl-clock";
+       clocks = <&atl_gfclk_mux>;
+};
+
+/* binding for the IP */
+atl: atl@4843c000 {
+       compatible = "ti,dra7-atl";
+       reg = <0x4843c000 0x3ff>;
+       ti,hwmods = "atl";
+       ti,provided-clocks = <&atl_clkin0_ck>, <&atl_clkin1_ck>,
+                               <&atl_clkin2_ck>, <&atl_clkin3_ck>;
+       clocks = <&atl_gfclk_mux>;
+       clock-names = "fck";
+       status = "disabled";
+};
+
+#include <dt-bindings/clk/ti-dra7-atl.h>
+
+&atl {
+       status = "okay";
+
+       atl2 {
+               bws = <DRA7_ATL_WS_MCASP2_FSX>;
+               aws = <DRA7_ATL_WS_MCASP3_FSX>;
+       };
+};
index 125281aaa4ca0390713d92b6714c135098604b6d..03f8fdee62a7e3e2c559789eb501f9f12d6542a5 100644 (file)
@@ -25,6 +25,11 @@ Required properties:
                          to map clockdomains properly
   "ti,hsdiv-gate-clock" - gate clock with OMAP36xx specific hardware handling,
                          required for a hardware errata
+  "ti,composite-gate-clock" - composite gate clock, to be part of composite
+                             clock
+  "ti,composite-no-wait-gate-clock" - composite gate clock that does not wait
+                                     for clock to be active before returning
+                                     from clk_enable()
 - #clock-cells : from common clock binding; shall be set to 0
 - clocks : link to phandle of parent clock
 - reg : offset for register controlling adjustable gate, not needed for
@@ -41,7 +46,7 @@ Examples:
                #clock-cells = <0>;
                compatible = "ti,gate-clock";
                clocks = <&core_96m_fck>;
-               reg = <0x48004a00 0x4>;
+               reg = <0x0a00>;
                ti,bit-shift = <25>;
        };
 
@@ -57,7 +62,7 @@ Examples:
                #clock-cells = <0>;
                compatible = "ti,dss-gate-clock";
                clocks = <&dpll4_m4x2_ck>;
-               reg = <0x48004e00 0x4>;
+               reg = <0x0e00>;
                ti,bit-shift = <0>;
        };
 
@@ -65,7 +70,7 @@ Examples:
                #clock-cells = <0>;
                compatible = "ti,am35xx-gate-clock";
                clocks = <&ipss_ick>;
-               reg = <0x4800259c 0x4>;
+               reg = <0x059c>;
                ti,bit-shift = <1>;
        };
 
@@ -80,6 +85,22 @@ Examples:
                compatible = "ti,hsdiv-gate-clock";
                clocks = <&dpll4_m2x2_mul_ck>;
                ti,bit-shift = <0x1b>;
-               reg = <0x48004d00 0x4>;
+               reg = <0x0d00>;
                ti,set-bit-to-disable;
        };
+
+       vlynq_gate_fck: vlynq_gate_fck {
+               #clock-cells = <0>;
+               compatible = "ti,composite-gate-clock";
+               clocks = <&core_ck>;
+               ti,bit-shift = <3>;
+               reg = <0x0200>;
+       };
+
+       sys_clkout2_src_gate: sys_clkout2_src_gate {
+               #clock-cells = <0>;
+               compatible = "ti,composite-no-wait-gate-clock";
+               clocks = <&core_ck>;
+               ti,bit-shift = <15>;
+               reg = <0x0070>;
+       };
index 064e8caccac37141428ca2ce0cfaed80fb4daacf..3111a409fea6cebb739a01592874d2c88d56328b 100644 (file)
@@ -21,6 +21,8 @@ Required properties:
   "ti,omap3-dss-interface-clock" - interface clock with DSS specific HW handling
   "ti,omap3-ssi-interface-clock" - interface clock with SSI specific HW handling
   "ti,am35xx-interface-clock" - interface clock with AM35xx specific HW handling
+  "ti,omap2430-interface-clock" - interface clock with OMAP2430 specific HW
+                                 handling
 - #clock-cells : from common clock binding; shall be set to 0
 - clocks : link to phandle of parent clock
 - reg : base address for the control register
diff --git a/Documentation/hwmon/shtc1 b/Documentation/hwmon/shtc1
new file mode 100644 (file)
index 0000000..6b1e054
--- /dev/null
@@ -0,0 +1,43 @@
+Kernel driver shtc1
+===================
+
+Supported chips:
+  * Sensirion SHTC1
+    Prefix: 'shtc1'
+    Addresses scanned: none
+    Datasheet: http://www.sensirion.com/file/datasheet_shtc1
+
+  * Sensirion SHTW1
+    Prefix: 'shtw1'
+    Addresses scanned: none
+    Datasheet: Not publicly available
+
+Author:
+  Johannes Winkelmann <johannes.winkelmann@sensirion.com>
+
+Description
+-----------
+
+This driver implements support for the Sensirion SHTC1 chip, a humidity and
+temperature sensor. Temperature is measured in degrees celsius, relative
+humidity is expressed as a percentage. Driver can be used as well for SHTW1
+chip, which has the same electrical interface.
+
+The device communicates with the I2C protocol. All sensors are set to I2C
+address 0x70. See Documentation/i2c/instantiating-devices for methods to
+instantiate the device.
+
+There are two options configurable by means of shtc1_platform_data:
+1. blocking (pull the I2C clock line down while performing the measurement) or
+   non-blocking mode. Blocking mode will guarantee the fastest result but
+   the I2C bus will be busy during that time. By default, non-blocking mode
+   is used. Make sure clock-stretching works properly on your device if you
+   want to use blocking mode.
+2. high or low accuracy. High accuracy is used by default and using it is
+   strongly recommended.
+
+sysfs-Interface
+---------------
+
+temp1_input - temperature input
+humidity1_input - humidity input
index 69372fb98cf89e4971e1520cd335ff66f27f7a6f..3fb39e0116b4c8e42d40009357ed5cf13c1f2888 100644 (file)
@@ -470,7 +470,7 @@ build.
 
        Sometimes, an external module uses exported symbols from
        another external module. kbuild needs to have full knowledge of
-       all symbols to avoid spliitting out warnings about undefined
+       all symbols to avoid spitting out warnings about undefined
        symbols. Three solutions exist for this situation.
 
        NOTE: The method with a top-level kbuild file is recommended
index 0cfb00fd86ffd7834a395df7688879d42132fb0e..4bbeca8483ed339f7efd5b6314da77f9b4a99f0d 100644 (file)
@@ -22,8 +22,9 @@ Appendix B: The kprobes sysctl interface
 
 Kprobes enables you to dynamically break into any kernel routine and
 collect debugging and performance information non-disruptively. You
-can trap at almost any kernel code address, specifying a handler
+can trap at almost any kernel code address(*), specifying a handler
 routine to be invoked when the breakpoint is hit.
+(*: some parts of the kernel code can not be trapped, see 1.5 Blacklist)
 
 There are currently three types of probes: kprobes, jprobes, and
 kretprobes (also called return probes).  A kprobe can be inserted
@@ -273,6 +274,19 @@ using one of the following techniques:
  or
 - Execute 'sysctl -w debug.kprobes_optimization=n'
 
+1.5 Blacklist
+
+Kprobes can probe most of the kernel except itself. This means
+that there are some functions where kprobes cannot probe. Probing
+(trapping) such functions can cause a recursive trap (e.g. double
+fault) or the nested probe handler may never be called.
+Kprobes manages such functions as a blacklist.
+If you want to add a function into the blacklist, you just need
+to (1) include linux/kprobes.h and (2) use NOKPROBE_SYMBOL() macro
+to specify a blacklisted function.
+Kprobes checks the given probe address against the blacklist and
+rejects registering it, if the given address is in the blacklist.
+
 2. Architectures Supported
 
 Kprobes, jprobes, and return probes are implemented on the following
index 1dfe62c3641d5d9087388c0255f2a9775b520faa..ee231ed09ec6fd96bbc75f6b7a3a76272ffd9500 100644 (file)
 Generic Mutex Subsystem
 
 started by Ingo Molnar <mingo@redhat.com>
+updated by Davidlohr Bueso <davidlohr@hp.com>
 
-  "Why on earth do we need a new mutex subsystem, and what's wrong
-   with semaphores?"
+What are mutexes?
+-----------------
 
-firstly, there's nothing wrong with semaphores. But if the simpler
-mutex semantics are sufficient for your code, then there are a couple
-of advantages of mutexes:
+In the Linux kernel, mutexes refer to a particular locking primitive
+that enforces serialization on shared memory systems, and not only to
+the generic term referring to 'mutual exclusion' found in academia
+or similar theoretical text books. Mutexes are sleeping locks which
+behave similarly to binary semaphores, and were introduced in 2006[1]
+as an alternative to these. This new data structure provided a number
+of advantages, including simpler interfaces, and at that time smaller
+code (see Disadvantages).
 
- - 'struct mutex' is smaller on most architectures: E.g. on x86,
-   'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes.
-   A smaller structure size means less RAM footprint, and better
-   CPU-cache utilization.
+[1] http://lwn.net/Articles/164802/
 
- - tighter code. On x86 i get the following .text sizes when
-   switching all mutex-alike semaphores in the kernel to the mutex
-   subsystem:
+Implementation
+--------------
 
-        text    data     bss     dec     hex filename
-     3280380  868188  396860 4545428  455b94 vmlinux-semaphore
-     3255329  865296  396732 4517357  44eded vmlinux-mutex
+Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h
+and implemented in kernel/locking/mutex.c. These locks use a three
+state atomic counter (->count) to represent the different possible
+transitions that can occur during the lifetime of a lock:
 
-   that's 25051 bytes of code saved, or a 0.76% win - off the hottest
-   codepaths of the kernel. (The .data savings are 2892 bytes, or 0.33%)
-   Smaller code means better icache footprint, which is one of the
-   major optimization goals in the Linux kernel currently.
+         1: unlocked
+         0: locked, no waiters
+   negative: locked, with potential waiters
 
- - the mutex subsystem is slightly faster and has better scalability for
-   contended workloads. On an 8-way x86 system, running a mutex-based
-   kernel and testing creat+unlink+close (of separate, per-task files)
-   in /tmp with 16 parallel tasks, the average number of ops/sec is:
+In its most basic form it also includes a wait-queue and a spinlock
+that serializes access to it. CONFIG_SMP systems can also include
+a pointer to the lock task owner (->owner) as well as a spinner MCS
+lock (->osq), both described below in (ii).
 
-    Semaphores:                        Mutexes:
+When acquiring a mutex, there are three possible paths that can be
+taken, depending on the state of the lock:
 
-    $ ./test-mutex V 16 10             $ ./test-mutex V 16 10
-    8 CPUs, running 16 tasks.          8 CPUs, running 16 tasks.
-    checking VFS performance.          checking VFS performance.
-    avg loops/sec:      34713          avg loops/sec:      84153
-    CPU utilization:    63%            CPU utilization:    22%
+(i) fastpath: tries to atomically acquire the lock by decrementing the
+    counter. If it was already taken by another task it goes to the next
+    possible path. This logic is architecture specific. On x86-64, the
+    locking fastpath is 2 instructions:
 
-   i.e. in this workload, the mutex based kernel was 2.4 times faster
-   than the semaphore based kernel, _and_ it also had 2.8 times less CPU
-   utilization. (In terms of 'ops per CPU cycle', the semaphore kernel
-   performed 551 ops/sec per 1% of CPU time used, while the mutex kernel
-   performed 3825 ops/sec per 1% of CPU time used - it was 6.9 times
-   more efficient.)
-
-   the scalability difference is visible even on a 2-way P4 HT box:
-
-    Semaphores:                        Mutexes:
-
-    $ ./test-mutex V 16 10             $ ./test-mutex V 16 10
-    4 CPUs, running 16 tasks.          8 CPUs, running 16 tasks.
-    checking VFS performance.          checking VFS performance.
-    avg loops/sec:      127659         avg loops/sec:      181082
-    CPU utilization:    100%           CPU utilization:    34%
-
-   (the straight performance advantage of mutexes is 41%, the per-cycle
-    efficiency of mutexes is 4.1 times better.)
-
- - there are no fastpath tradeoffs, the mutex fastpath is just as tight
-   as the semaphore fastpath. On x86, the locking fastpath is 2
-   instructions:
-
-    c0377ccb <mutex_lock>:
-    c0377ccb:       f0 ff 08                lock decl (%eax)
-    c0377cce:       78 0e                   js     c0377cde <.text..lock.mutex>
-    c0377cd0:       c3                      ret
+    0000000000000e10 <mutex_lock>:
+    e21:   f0 ff 0b                lock decl (%rbx)
+    e24:   79 08                   jns    e2e <mutex_lock+0x1e>
 
    the unlocking fastpath is equally tight:
 
-    c0377cd1 <mutex_unlock>:
-    c0377cd1:       f0 ff 00                lock incl (%eax)
-    c0377cd4:       7e 0f                   jle    c0377ce5 <.text..lock.mutex+0x7>
-    c0377cd6:       c3                      ret
-
- - 'struct mutex' semantics are well-defined and are enforced if
-   CONFIG_DEBUG_MUTEXES is turned on. Semaphores on the other hand have
-   virtually no debugging code or instrumentation. The mutex subsystem
-   checks and enforces the following rules:
-
-   * - only one task can hold the mutex at a time
-   * - only the owner can unlock the mutex
-   * - multiple unlocks are not permitted
-   * - recursive locking is not permitted
-   * - a mutex object must be initialized via the API
-   * - a mutex object must not be initialized via memset or copying
-   * - task may not exit with mutex held
-   * - memory areas where held locks reside must not be freed
-   * - held mutexes must not be reinitialized
-   * - mutexes may not be used in hardware or software interrupt
-   *   contexts such as tasklets and timers
-
-   furthermore, there are also convenience features in the debugging
-   code:
-
-   * - uses symbolic names of mutexes, whenever they are printed in debug output
-   * - point-of-acquire tracking, symbolic lookup of function names
-   * - list of all locks held in the system, printout of them
-   * - owner tracking
-   * - detects self-recursing locks and prints out all relevant info
-   * - detects multi-task circular deadlocks and prints out all affected
-   *   locks and tasks (and only those tasks)
+    0000000000000bc0 <mutex_unlock>:
+    bc8:   f0 ff 07                lock incl (%rdi)
+    bcb:   7f 0a                   jg     bd7 <mutex_unlock+0x17>
+
+
+(ii) midpath: aka optimistic spinning, tries to spin for acquisition
+     while the lock owner is running and there are no other tasks ready
+     to run that have higher priority (need_resched). The rationale is
+     that if the lock owner is running, it is likely to release the lock
+     soon. The mutex spinners are queued up using MCS lock so that only
+     one spinner can compete for the mutex.
+
+     The MCS lock (proposed by Mellor-Crummey and Scott) is a simple spinlock
+     with the desirable properties of being fair and with each cpu trying
+     to acquire the lock spinning on a local variable. It avoids expensive
+     cacheline bouncing that common test-and-set spinlock implementations
+     incur. An MCS-like lock is specially tailored for optimistic spinning
+     for sleeping lock implementation. An important feature of the customized
+     MCS lock is that it has the extra property that spinners are able to exit
+     the MCS spinlock queue when they need to reschedule. This further helps
+     avoid situations where MCS spinners that need to reschedule would continue
+     waiting to spin on mutex owner, only to go directly to slowpath upon
+     obtaining the MCS lock.
+
+
+(iii) slowpath: last resort, if the lock is still unable to be acquired,
+      the task is added to the wait-queue and sleeps until woken up by the
+      unlock path. Under normal circumstances it blocks as TASK_UNINTERRUPTIBLE.
+
+While formally kernel mutexes are sleepable locks, it is path (ii) that
+makes them more practically a hybrid type. By simply not interrupting a
+task and busy-waiting for a few cycles instead of immediately sleeping,
+the performance of this lock has been seen to significantly improve a
+number of workloads. Note that this technique is also used for rw-semaphores.
+
+Semantics
+---------
+
+The mutex subsystem checks and enforces the following rules:
+
+    - Only one task can hold the mutex at a time.
+    - Only the owner can unlock the mutex.
+    - Multiple unlocks are not permitted.
+    - Recursive locking/unlocking is not permitted.
+    - A mutex must only be initialized via the API (see below).
+    - A task may not exit with a mutex held.
+    - Memory areas where held locks reside must not be freed.
+    - Held mutexes must not be reinitialized.
+    - Mutexes may not be used in hardware or software interrupt
+      contexts such as tasklets and timers.
+
+These semantics are fully enforced when CONFIG DEBUG_MUTEXES is enabled.
+In addition, the mutex debugging code also implements a number of other
+features that make lock debugging easier and faster:
+
+    - Uses symbolic names of mutexes, whenever they are printed
+      in debug output.
+    - Point-of-acquire tracking, symbolic lookup of function names,
+      list of all locks held in the system, printout of them.
+    - Owner tracking.
+    - Detects self-recursing locks and prints out all relevant info.
+    - Detects multi-task circular deadlocks and prints out all affected
+      locks and tasks (and only those tasks).
+
+
+Interfaces
+----------
+Statically define the mutex:
+   DEFINE_MUTEX(name);
+
+Dynamically initialize the mutex:
+   mutex_init(mutex);
+
+Acquire the mutex, uninterruptible:
+   void mutex_lock(struct mutex *lock);
+   void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
+   int  mutex_trylock(struct mutex *lock);
+
+Acquire the mutex, interruptible:
+   int mutex_lock_interruptible_nested(struct mutex *lock,
+                                      unsigned int subclass);
+   int mutex_lock_interruptible(struct mutex *lock);
+
+Acquire the mutex, interruptible, if dec to 0:
+   int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
+
+Unlock the mutex:
+   void mutex_unlock(struct mutex *lock);
+
+Test if the mutex is taken:
+   int mutex_is_locked(struct mutex *lock);
 
 Disadvantages
 -------------
 
-The stricter mutex API means you cannot use mutexes the same way you
-can use semaphores: e.g. they cannot be used from an interrupt context,
-nor can they be unlocked from a different context that which acquired
-it. [ I'm not aware of any other (e.g. performance) disadvantages from
-using mutexes at the moment, please let me know if you find any. ]
-
-Implementation of mutexes
--------------------------
-
-'struct mutex' is the new mutex type, defined in include/linux/mutex.h and
-implemented in kernel/locking/mutex.c. It is a counter-based mutex with a
-spinlock and a wait-list. The counter has 3 states: 1 for "unlocked", 0 for
-"locked" and negative numbers (usually -1) for "locked, potential waiters
-queued".
-
-the APIs of 'struct mutex' have been streamlined:
-
- DEFINE_MUTEX(name);
+Unlike its original design and purpose, 'struct mutex' is larger than
+most locks in the kernel. E.g: on x86-64 it is 40 bytes, almost twice
+as large as 'struct semaphore' (24 bytes) and 8 bytes shy of the
+'struct rw_semaphore' variant. Larger structure sizes mean more CPU
+cache and memory footprint.
 
- mutex_init(mutex);
+When to use mutexes
+-------------------
 
- void mutex_lock(struct mutex *lock);
- int  mutex_lock_interruptible(struct mutex *lock);
- int  mutex_trylock(struct mutex *lock);
- void mutex_unlock(struct mutex *lock);
- int  mutex_is_locked(struct mutex *lock);
- void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
- int  mutex_lock_interruptible_nested(struct mutex *lock,
-                                      unsigned int subclass);
- int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
+Unless the strict semantics of mutexes are unsuitable and/or the critical
+region prevents the lock from being shared, always prefer them to any other
+locking primitive.
index 85870208edcfd42be8e583459ba17046266ed441..1dbb4b87268facd59768d54746dded852fbfb131 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * parse_vdso.c: Linux reference vDSO parser
- * Written by Andrew Lutomirski, 2011.
+ * Written by Andrew Lutomirski, 2011-2014.
  *
  * This code is meant to be linked in to various programs that run on Linux.
  * As such, it is available with as few restrictions as possible.  This file
  * it starts a program.  It works equally well in statically and dynamically
  * linked binaries.
  *
- * This code is tested on x86_64.  In principle it should work on any 64-bit
+ * This code is tested on x86.  In principle it should work on any
  * architecture that has a vDSO.
  */
 
 #include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
+#include <limits.h>
 #include <elf.h>
 
 /*
@@ -45,11 +46,18 @@ extern void *vdso_sym(const char *version, const char *name);
 
 
 /* And here's the code. */
-
-#ifndef __x86_64__
-# error Not yet ported to non-x86_64 architectures
+#ifndef ELF_BITS
+# if ULONG_MAX > 0xffffffffUL
+#  define ELF_BITS 64
+# else
+#  define ELF_BITS 32
+# endif
 #endif
 
+#define ELF_BITS_XFORM2(bits, x) Elf##bits##_##x
+#define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x)
+#define ELF(x) ELF_BITS_XFORM(ELF_BITS, x)
+
 static struct vdso_info
 {
        bool valid;
@@ -59,14 +67,14 @@ static struct vdso_info
        uintptr_t load_offset;  /* load_addr - recorded vaddr */
 
        /* Symbol table */
-       Elf64_Sym *symtab;
+       ELF(Sym) *symtab;
        const char *symstrings;
-       Elf64_Word *bucket, *chain;
-       Elf64_Word nbucket, nchain;
+       ELF(Word) *bucket, *chain;
+       ELF(Word) nbucket, nchain;
 
        /* Version table */
-       Elf64_Versym *versym;
-       Elf64_Verdef *verdef;
+       ELF(Versym) *versym;
+       ELF(Verdef) *verdef;
 } vdso_info;
 
 /* Straight from the ELF specification. */
@@ -92,9 +100,14 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
 
        vdso_info.load_addr = base;
 
-       Elf64_Ehdr *hdr = (Elf64_Ehdr*)base;
-       Elf64_Phdr *pt = (Elf64_Phdr*)(vdso_info.load_addr + hdr->e_phoff);
-       Elf64_Dyn *dyn = 0;
+       ELF(Ehdr) *hdr = (ELF(Ehdr)*)base;
+       if (hdr->e_ident[EI_CLASS] !=
+           (ELF_BITS == 32 ? ELFCLASS32 : ELFCLASS64)) {
+               return;  /* Wrong ELF class -- check ELF_BITS */
+       }
+
+       ELF(Phdr) *pt = (ELF(Phdr)*)(vdso_info.load_addr + hdr->e_phoff);
+       ELF(Dyn) *dyn = 0;
 
        /*
         * We need two things from the segment table: the load offset
@@ -108,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
                                + (uintptr_t)pt[i].p_offset
                                - (uintptr_t)pt[i].p_vaddr;
                } else if (pt[i].p_type == PT_DYNAMIC) {
-                       dyn = (Elf64_Dyn*)(base + pt[i].p_offset);
+                       dyn = (ELF(Dyn)*)(base + pt[i].p_offset);
                }
        }
 
@@ -118,7 +131,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
        /*
         * Fish out the useful bits of the dynamic table.
         */
-       Elf64_Word *hash = 0;
+       ELF(Word) *hash = 0;
        vdso_info.symstrings = 0;
        vdso_info.symtab = 0;
        vdso_info.versym = 0;
@@ -131,22 +144,22 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
                                 + vdso_info.load_offset);
                        break;
                case DT_SYMTAB:
-                       vdso_info.symtab = (Elf64_Sym *)
+                       vdso_info.symtab = (ELF(Sym) *)
                                ((uintptr_t)dyn[i].d_un.d_ptr
                                 + vdso_info.load_offset);
                        break;
                case DT_HASH:
-                       hash = (Elf64_Word *)
+                       hash = (ELF(Word) *)
                                ((uintptr_t)dyn[i].d_un.d_ptr
                                 + vdso_info.load_offset);
                        break;
                case DT_VERSYM:
-                       vdso_info.versym = (Elf64_Versym *)
+                       vdso_info.versym = (ELF(Versym) *)
                                ((uintptr_t)dyn[i].d_un.d_ptr
                                 + vdso_info.load_offset);
                        break;
                case DT_VERDEF:
-                       vdso_info.verdef = (Elf64_Verdef *)
+                       vdso_info.verdef = (ELF(Verdef) *)
                                ((uintptr_t)dyn[i].d_un.d_ptr
                                 + vdso_info.load_offset);
                        break;
@@ -168,8 +181,8 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
        vdso_info.valid = true;
 }
 
-static bool vdso_match_version(Elf64_Versym ver,
-                              const char *name, Elf64_Word hash)
+static bool vdso_match_version(ELF(Versym) ver,
+                              const char *name, ELF(Word) hash)
 {
        /*
         * This is a helper function to check if the version indexed by
@@ -188,7 +201,7 @@ static bool vdso_match_version(Elf64_Versym ver,
 
        /* First step: find the version definition */
        ver &= 0x7fff;  /* Apparently bit 15 means "hidden" */
-       Elf64_Verdef *def = vdso_info.verdef;
+       ELF(Verdef) *def = vdso_info.verdef;
        while(true) {
                if ((def->vd_flags & VER_FLG_BASE) == 0
                    && (def->vd_ndx & 0x7fff) == ver)
@@ -197,11 +210,11 @@ static bool vdso_match_version(Elf64_Versym ver,
                if (def->vd_next == 0)
                        return false;  /* No definition. */
 
-               def = (Elf64_Verdef *)((char *)def + def->vd_next);
+               def = (ELF(Verdef) *)((char *)def + def->vd_next);
        }
 
        /* Now figure out whether it matches. */
-       Elf64_Verdaux *aux = (Elf64_Verdaux*)((char *)def + def->vd_aux);
+       ELF(Verdaux) *aux = (ELF(Verdaux)*)((char *)def + def->vd_aux);
        return def->vd_hash == hash
                && !strcmp(name, vdso_info.symstrings + aux->vda_name);
 }
@@ -213,10 +226,10 @@ void *vdso_sym(const char *version, const char *name)
                return 0;
 
        ver_hash = elf_hash(version);
-       Elf64_Word chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket];
+       ELF(Word) chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket];
 
        for (; chain != STN_UNDEF; chain = vdso_info.chain[chain]) {
-               Elf64_Sym *sym = &vdso_info.symtab[chain];
+               ELF(Sym) *sym = &vdso_info.symtab[chain];
 
                /* Check for a defined global or weak function w/ right name. */
                if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
@@ -243,7 +256,7 @@ void *vdso_sym(const char *version, const char *name)
 
 void vdso_init_from_auxv(void *auxv)
 {
-       Elf64_auxv_t *elf_auxv = auxv;
+       ELF(auxv_t) *elf_auxv = auxv;
        for (int i = 0; elf_auxv[i].a_type != AT_NULL; i++)
        {
                if (elf_auxv[i].a_type == AT_SYSINFO_EHDR) {
diff --git a/Documentation/vDSO/vdso_standalone_test_x86.c b/Documentation/vDSO/vdso_standalone_test_x86.c
new file mode 100644 (file)
index 0000000..d462402
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * vdso_test.c: Sample code to test parse_vdso.c on x86
+ * Copyright (c) 2011-2014 Andy Lutomirski
+ * Subject to the GNU General Public License, version 2
+ *
+ * You can amuse yourself by compiling with:
+ * gcc -std=gnu99 -nostdlib
+ *     -Os -fno-asynchronous-unwind-tables -flto -lgcc_s
+ *      vdso_standalone_test_x86.c parse_vdso.c
+ * to generate a small binary.  On x86_64, you can omit -lgcc_s
+ * if you want the binary to be completely standalone.
+ */
+
+#include <sys/syscall.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdint.h>
+
+extern void *vdso_sym(const char *version, const char *name);
+extern void vdso_init_from_sysinfo_ehdr(uintptr_t base);
+extern void vdso_init_from_auxv(void *auxv);
+
+/* We need a libc functions... */
+int strcmp(const char *a, const char *b)
+{
+       /* This implementation is buggy: it never returns -1. */
+       while (*a || *b) {
+               if (*a != *b)
+                       return 1;
+               if (*a == 0 || *b == 0)
+                       return 1;
+               a++;
+               b++;
+       }
+
+       return 0;
+}
+
+/* ...and two syscalls.  This is x86-specific. */
+static inline long x86_syscall3(long nr, long a0, long a1, long a2)
+{
+       long ret;
+#ifdef __x86_64__
+       asm volatile ("syscall" : "=a" (ret) : "a" (nr),
+                     "D" (a0), "S" (a1), "d" (a2) :
+                     "cc", "memory", "rcx",
+                     "r8", "r9", "r10", "r11" );
+#else
+       asm volatile ("int $0x80" : "=a" (ret) : "a" (nr),
+                     "b" (a0), "c" (a1), "d" (a2) :
+                     "cc", "memory" );
+#endif
+       return ret;
+}
+
+static inline long linux_write(int fd, const void *data, size_t len)
+{
+       return x86_syscall3(__NR_write, fd, (long)data, (long)len);
+}
+
+static inline void linux_exit(int code)
+{
+       x86_syscall3(__NR_exit, code, 0, 0);
+}
+
+void to_base10(char *lastdig, uint64_t n)
+{
+       while (n) {
+               *lastdig = (n % 10) + '0';
+               n /= 10;
+               lastdig--;
+       }
+}
+
+__attribute__((externally_visible)) void c_main(void **stack)
+{
+       /* Parse the stack */
+       long argc = (long)*stack;
+       stack += argc + 2;
+
+       /* Now we're pointing at the environment.  Skip it. */
+       while(*stack)
+               stack++;
+       stack++;
+
+       /* Now we're pointing at auxv.  Initialize the vDSO parser. */
+       vdso_init_from_auxv((void *)stack);
+
+       /* Find gettimeofday. */
+       typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
+       gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday");
+
+       if (!gtod)
+               linux_exit(1);
+
+       struct timeval tv;
+       long ret = gtod(&tv, 0);
+
+       if (ret == 0) {
+               char buf[] = "The time is                     .000000\n";
+               to_base10(buf + 31, tv.tv_sec);
+               to_base10(buf + 38, tv.tv_usec);
+               linux_write(1, buf, sizeof(buf) - 1);
+       } else {
+               linux_exit(ret);
+       }
+
+       linux_exit(0);
+}
+
+/*
+ * This is the real entry point.  It passes the initial stack into
+ * the C entry point.
+ */
+asm (
+       ".text\n"
+       ".global _start\n"
+       ".type _start,@function\n"
+       "_start:\n\t"
+#ifdef __x86_64__
+       "mov %rsp,%rdi\n\t"
+       "jmp c_main"
+#else
+       "push %esp\n\t"
+       "call c_main\n\t"
+       "int $3"
+#endif
+       );
index fff633432dffe5412d5ccb8990e025bf745d1229..8daeb7d7032c2a0b79802bb9f8674a0d0d6aeb74 100644 (file)
 /*
- * vdso_test.c: Sample code to test parse_vdso.c on x86_64
- * Copyright (c) 2011 Andy Lutomirski
+ * vdso_test.c: Sample code to test parse_vdso.c
+ * Copyright (c) 2014 Andy Lutomirski
  * Subject to the GNU General Public License, version 2
  *
- * You can amuse yourself by compiling with:
- * gcc -std=gnu99 -nostdlib
- *     -Os -fno-asynchronous-unwind-tables -flto
- *      vdso_test.c parse_vdso.c -o vdso_test
- * to generate a small binary with no dependencies at all.
+ * Compile with:
+ * gcc -std=gnu99 vdso_test.c parse_vdso.c
+ *
+ * Tested on x86, 32-bit and 64-bit.  It may work on other architectures, too.
  */
 
-#include <sys/syscall.h>
-#include <sys/time.h>
-#include <unistd.h>
 #include <stdint.h>
+#include <elf.h>
+#include <stdio.h>
+#include <sys/auxv.h>
+#include <sys/time.h>
 
 extern void *vdso_sym(const char *version, const char *name);
 extern void vdso_init_from_sysinfo_ehdr(uintptr_t base);
 extern void vdso_init_from_auxv(void *auxv);
 
-/* We need a libc functions... */
-int strcmp(const char *a, const char *b)
+int main(int argc, char **argv)
 {
-       /* This implementation is buggy: it never returns -1. */
-       while (*a || *b) {
-               if (*a != *b)
-                       return 1;
-               if (*a == 0 || *b == 0)
-                       return 1;
-               a++;
-               b++;
+       unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR);
+       if (!sysinfo_ehdr) {
+               printf("AT_SYSINFO_EHDR is not present!\n");
+               return 0;
        }
 
-       return 0;
-}
-
-/* ...and two syscalls.  This is x86_64-specific. */
-static inline long linux_write(int fd, const void *data, size_t len)
-{
-
-       long ret;
-       asm volatile ("syscall" : "=a" (ret) : "a" (__NR_write),
-                     "D" (fd), "S" (data), "d" (len) :
-                     "cc", "memory", "rcx",
-                     "r8", "r9", "r10", "r11" );
-       return ret;
-}
-
-static inline void linux_exit(int code)
-{
-       asm volatile ("syscall" : : "a" (__NR_exit), "D" (code));
-}
-
-void to_base10(char *lastdig, uint64_t n)
-{
-       while (n) {
-               *lastdig = (n % 10) + '0';
-               n /= 10;
-               lastdig--;
-       }
-}
-
-__attribute__((externally_visible)) void c_main(void **stack)
-{
-       /* Parse the stack */
-       long argc = (long)*stack;
-       stack += argc + 2;
-
-       /* Now we're pointing at the environment.  Skip it. */
-       while(*stack)
-               stack++;
-       stack++;
-
-       /* Now we're pointing at auxv.  Initialize the vDSO parser. */
-       vdso_init_from_auxv((void *)stack);
+       vdso_init_from_sysinfo_ehdr(getauxval(AT_SYSINFO_EHDR));
 
        /* Find gettimeofday. */
        typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
        gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday");
 
-       if (!gtod)
-               linux_exit(1);
+       if (!gtod) {
+               printf("Could not find __vdso_gettimeofday\n");
+               return 1;
+       }
 
        struct timeval tv;
        long ret = gtod(&tv, 0);
 
        if (ret == 0) {
-               char buf[] = "The time is                     .000000\n";
-               to_base10(buf + 31, tv.tv_sec);
-               to_base10(buf + 38, tv.tv_usec);
-               linux_write(1, buf, sizeof(buf) - 1);
+               printf("The time is %lld.%06lld\n",
+                      (long long)tv.tv_sec, (long long)tv.tv_usec);
        } else {
-               linux_exit(ret);
+               printf("__vdso_gettimeofday failed\n");
        }
 
-       linux_exit(0);
+       return 0;
 }
-
-/*
- * This is the real entry point.  It passes the initial stack into
- * the C entry point.
- */
-asm (
-       ".text\n"
-       ".global _start\n"
-        ".type _start,@function\n"
-        "_start:\n\t"
-        "mov %rsp,%rdi\n\t"
-        "jmp c_main"
-       );
index c761fb1abfb6e283ff1e08fb1f039f084f7648cd..7680d7c707301b7a30368c66e3116ef42fd026b1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -105,10 +105,6 @@ ifeq ("$(origin O)", "command line")
   KBUILD_OUTPUT := $(O)
 endif
 
-ifeq ("$(origin W)", "command line")
-  export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
-endif
-
 # That's our default target when none is given on the command line
 PHONY := _all
 _all:
@@ -153,8 +149,18 @@ else
 _all: modules
 endif
 
-srctree                := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
-objtree                := $(CURDIR)
+ifeq ($(KBUILD_SRC),)
+        # building in the source tree
+        srctree := .
+else
+        ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
+                # building in a subdirectory of the source tree
+                srctree := ..
+        else
+                srctree := $(KBUILD_SRC)
+        endif
+endif
+objtree                := .
 src            := $(srctree)
 obj            := $(objtree)
 
@@ -166,7 +172,7 @@ export srctree objtree VPATH
 # SUBARCH tells the usermode build what the underlying arch is.  That is set
 # first, and if a usermode build is happening, the "ARCH=um" on the command
 # line overrides the setting of ARCH below.  If a native build is happening,
-# then ARCH is assigned, getting whatever value it gets normally, and 
+# then ARCH is assigned, getting whatever value it gets normally, and
 # SUBARCH is subsequently ignored.
 
 SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
@@ -259,18 +265,18 @@ endif
 KBUILD_MODULES :=
 KBUILD_BUILTIN := 1
 
-#      If we have only "make modules", don't compile built-in objects.
-#      When we're building modules with modversions, we need to consider
-#      the built-in objects during the descend as well, in order to
-#      make sure the checksums are up to date before we record them.
+# If we have only "make modules", don't compile built-in objects.
+# When we're building modules with modversions, we need to consider
+# the built-in objects during the descend as well, in order to
+# make sure the checksums are up to date before we record them.
 
 ifeq ($(MAKECMDGOALS),modules)
   KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1)
 endif
 
-#      If we have "make <whatever> modules", compile modules
-#      in addition to whatever we do anyway.
-#      Just "make" or "make all" shall build modules as well
+# If we have "make <whatever> modules", compile modules
+# in addition to whatever we do anyway.
+# Just "make" or "make all" shall build modules as well
 
 ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
   KBUILD_MODULES := 1
@@ -294,7 +300,7 @@ export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
 #         cmd_cc_o_c       = $(CC) $(c_flags) -c -o $@ $<
 #
 # If $(quiet) is empty, the whole command will be printed.
-# If it is set to "quiet_", only the short version will be printed. 
+# If it is set to "quiet_", only the short version will be printed.
 # If it is set to "silent_", nothing will be printed at all, since
 # the variable $(silent_cmd_cc_o_c) doesn't exist.
 #
@@ -346,7 +352,6 @@ $(srctree)/scripts/Kbuild.include: ;
 include $(srctree)/scripts/Kbuild.include
 
 # Make variables (CC, etc...)
-
 AS             = $(CROSS_COMPILE)as
 LD             = $(CROSS_COMPILE)ld
 CC             = $(CROSS_COMPILE)gcc
@@ -395,8 +400,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
 KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common \
                   -Werror-implicit-function-declaration \
-                  -Wno-format-security \
-                  $(call cc-option,-fno-delete-null-pointer-checks,)
+                  -Wno-format-security
+
 KBUILD_AFLAGS_KERNEL :=
 KBUILD_CFLAGS_KERNEL :=
 KBUILD_AFLAGS   := -D__ASSEMBLY__
@@ -504,8 +509,16 @@ ifeq ($(mixed-targets),1)
 # We're called with mixed targets (*config and build targets).
 # Handle them one by one.
 
-%:: FORCE
-       $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= $@
+PHONY += $(MAKECMDGOALS) __build_one_by_one
+
+$(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one
+       @:
+
+__build_one_by_one:
+       $(Q)set -e; \
+       for i in $(MAKECMDGOALS); do \
+               $(MAKE) -f $(srctree)/Makefile $$i; \
+       done
 
 else
 ifeq ($(config-targets),1)
@@ -520,11 +533,9 @@ include $(srctree)/arch/$(SRCARCH)/Makefile
 export KBUILD_DEFCONFIG KBUILD_KCONFIG
 
 config: scripts_basic outputmakefile FORCE
-       $(Q)mkdir -p include/linux include/config
        $(Q)$(MAKE) $(build)=scripts/kconfig $@
 
 %config: scripts_basic outputmakefile FORCE
-       $(Q)mkdir -p include/linux include/config
        $(Q)$(MAKE) $(build)=scripts/kconfig $@
 
 else
@@ -594,14 +605,16 @@ endif # $(dot-config)
 # Defaults to vmlinux, but the arch makefile usually adds further targets
 all: vmlinux
 
+include $(srctree)/arch/$(SRCARCH)/Makefile
+
+KBUILD_CFLAGS  += $(call cc-option,-fno-delete-null-pointer-checks,)
+
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS  += -Os $(call cc-disable-warning,maybe-uninitialized,)
 else
 KBUILD_CFLAGS  += -O2
 endif
 
-include $(srctree)/arch/$(SRCARCH)/Makefile
-
 ifdef CONFIG_READABLE_ASM
 # Disable optimizations that make assembler listings hard to read.
 # reorder blocks reorders the control in the function
@@ -731,6 +744,8 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
        KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
 endif
 
+include $(srctree)/scripts/Makefile.extrawarn
+
 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
 KBUILD_CPPFLAGS += $(KCPPFLAGS)
 KBUILD_AFLAGS += $(KAFLAGS)
@@ -775,10 +790,10 @@ MODLIB    = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
 export MODLIB
 
 #
-#  INSTALL_MOD_STRIP, if defined, will cause modules to be
-#  stripped after they are installed.  If INSTALL_MOD_STRIP is '1', then
-#  the default option --strip-debug will be used.  Otherwise,
-#  INSTALL_MOD_STRIP value will be used as the options to the strip command.
+# INSTALL_MOD_STRIP, if defined, will cause modules to be
+# stripped after they are installed.  If INSTALL_MOD_STRIP is '1', then
+# the default option --strip-debug will be used.  Otherwise,
+# INSTALL_MOD_STRIP value will be used as the options to the strip command.
 
 ifdef INSTALL_MOD_STRIP
 ifeq ($(INSTALL_MOD_STRIP),1)
@@ -863,7 +878,7 @@ ifdef CONFIG_BUILD_DOCSRC
 endif
        +$(call if_changed,link-vmlinux)
 
-# The actual objects are generated when descending, 
+# The actual objects are generated when descending,
 # make sure no implicit rule kicks in
 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
 
@@ -1021,11 +1036,11 @@ ifdef CONFIG_MODULES
 
 all: modules
 
-#      Build modules
+# Build modules
 #
-#      A module can be listed more than once in obj-m resulting in
-#      duplicate lines in modules.order files.  Those are removed
-#      using awk while concatenating to the final file.
+# A module can be listed more than once in obj-m resulting in
+# duplicate lines in modules.order files.  Those are removed
+# using awk while concatenating to the final file.
 
 PHONY += modules
 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -1054,10 +1069,10 @@ _modinst_:
        @rm -rf $(MODLIB)/kernel
        @rm -f $(MODLIB)/source
        @mkdir -p $(MODLIB)/kernel
-       @ln -s $(srctree) $(MODLIB)/source
+       @ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
        @if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
                rm -f $(MODLIB)/build ; \
-               ln -s $(objtree) $(MODLIB)/build ; \
+               ln -s $(CURDIR) $(MODLIB)/build ; \
        fi
        @cp -f $(objtree)/modules.order $(MODLIB)/
        @cp -f $(objtree)/modules.builtin $(MODLIB)/
@@ -1104,7 +1119,7 @@ CLEAN_DIRS  += $(MODVERDIR)
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config usr/include include/generated          \
-                  arch/*/include/generated .tmp_objdiff
+                 arch/*/include/generated .tmp_objdiff
 MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
                  Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
                  signing_key.priv signing_key.x509 x509.genkey         \
@@ -1478,7 +1493,7 @@ endif
        $(build)=$(build-dir) $(@:.ko=.o)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
 
-# FIXME Should go into a make.lib or something 
+# FIXME Should go into a make.lib or something
 # ===========================================================================
 
 quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN   $(wildcard $(rm-dirs)))
index c7676871d9c0240032261ed40f0db7c431a583d8..b03cfe49d22be4bce3809d606ccec17658f4d07c 100644 (file)
@@ -26,7 +26,7 @@
                clock-frequency = <0>;
        };
 
-       atlclkin3_ck: atlclkin3_ck {
+       atl_clkin3_ck: atl_clkin3_ck {
                #clock-cells = <0>;
                compatible = "fixed-clock";
                clock-frequency = <0>;
 
        dpll_mpu_ck: dpll_mpu_ck {
                #clock-cells = <0>;
-               compatible = "ti,omap4-dpll-clock";
+               compatible = "ti,omap5-mpu-dpll-clock";
                clocks = <&sys_clkin1>, <&mpu_dpll_hs_clk_div>;
                reg = <0x0160>, <0x0164>, <0x016c>, <0x0168>;
        };
        mcasp1_ahclkr_mux: mcasp1_ahclkr_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <28>;
                reg = <0x0550>;
        };
        mcasp1_ahclkx_mux: mcasp1_ahclkx_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x0550>;
        };
        mcasp2_ahclkr_mux: mcasp2_ahclkr_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <28>;
                reg = <0x1860>;
        };
        mcasp2_ahclkx_mux: mcasp2_ahclkx_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x1860>;
        };
        mcasp3_ahclkx_mux: mcasp3_ahclkx_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x1868>;
        };
        mcasp4_ahclkx_mux: mcasp4_ahclkx_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x1898>;
        };
        mcasp5_ahclkx_mux: mcasp5_ahclkx_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x1878>;
        };
        mcasp6_ahclkx_mux: mcasp6_ahclkx_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x1904>;
        };
        mcasp7_ahclkx_mux: mcasp7_ahclkx_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x1908>;
        };
        mcasp8_ahclk_mux: mcasp8_ahclk_mux {
                #clock-cells = <0>;
                compatible = "ti,mux-clock";
-               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atlclkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
+               clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <22>;
                reg = <0x1890>;
        };
index aeb142ce8e9d34ffa0dd1565a21f2211a8b11917..e67a23b5d7884725290b6348a54a97f3427ccbc3 100644 (file)
 
        dpll_mpu_ck: dpll_mpu_ck {
                #clock-cells = <0>;
-               compatible = "ti,omap4-dpll-clock";
+               compatible = "ti,omap5-mpu-dpll-clock";
                clocks = <&sys_clkin>, <&mpu_dpll_hs_clk_div>;
                reg = <0x0160>, <0x0164>, <0x016c>, <0x0168>;
        };
index a6bc431cde701037ca6146d6931a56aa96838cb1..4238bcba9d60fc0aaa697a2a83818556db7c66cf 100644 (file)
@@ -410,7 +410,7 @@ __hw_perf_event_init(struct perf_event *event)
         */
        hwc->config_base            |= (unsigned long)mapping;
 
-       if (!hwc->sample_period) {
+       if (!is_sampling_event(event)) {
                /*
                 * For non-sampling runs, limit the sample_period to half
                 * of the counter width. That way, the new counter value
index a71ae1523620afc4cd149c26092d16d69cd858d8..af9e35e8836f1f3de2d9a4aaeee0c9445ce23740 100644 (file)
@@ -126,8 +126,8 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler)
 
        irqs = min(pmu_device->num_resources, num_possible_cpus());
        if (irqs < 1) {
-               pr_err("no irqs for PMUs defined\n");
-               return -ENODEV;
+               printk_once("perf/ARM: No irqs for PMU defined, sampling events not supported\n");
+               return 0;
        }
 
        irq = platform_get_irq(pmu_device, 0);
@@ -191,6 +191,10 @@ static void cpu_pmu_init(struct arm_pmu *cpu_pmu)
        /* Ensure the PMU has sane values out of reset. */
        if (cpu_pmu->reset)
                on_each_cpu(cpu_pmu->reset, cpu_pmu, 1);
+
+       /* If no interrupts available, set the corresponding capability flag */
+       if (!platform_get_irq(cpu_pmu->plat_device, 0))
+               cpu_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
 }
 
 /*
index 3997c411c1403659123d188c1c0750c58f59af3f..9d853189028bb0c79ad72557b018c12d5416aa67 100644 (file)
 #include <asm/topology.h>
 
 /*
- * cpu power scale management
+ * cpu capacity scale management
  */
 
 /*
- * cpu power table
+ * cpu capacity table
  * This per cpu data structure describes the relative capacity of each core.
  * On a heteregenous system, cores don't have the same computation capacity
- * and we reflect that difference in the cpu_power field so the scheduler can
- * take this difference into account during load balance. A per cpu structure
- * is preferred because each CPU updates its own cpu_power field during the
- * load balance except for idle cores. One idle core is selected to run the
- * rebalance_domains for all idle cores and the cpu_power can be updated
- * during this sequence.
+ * and we reflect that difference in the cpu_capacity field so the scheduler
+ * can take this difference into account during load balance. A per cpu
+ * structure is preferred because each CPU updates its own cpu_capacity field
+ * during the load balance except for idle cores. One idle core is selected
+ * to run the rebalance_domains for all idle cores and the cpu_capacity can be
+ * updated during this sequence.
  */
 static DEFINE_PER_CPU(unsigned long, cpu_scale);
 
-unsigned long arch_scale_freq_power(struct sched_domain *sd, int cpu)
+unsigned long arch_scale_freq_capacity(struct sched_domain *sd, int cpu)
 {
        return per_cpu(cpu_scale, cpu);
 }
 
-static void set_power_scale(unsigned int cpu, unsigned long power)
+static void set_capacity_scale(unsigned int cpu, unsigned long capacity)
 {
-       per_cpu(cpu_scale, cpu) = power;
+       per_cpu(cpu_scale, cpu) = capacity;
 }
 
 #ifdef CONFIG_OF
@@ -62,11 +62,11 @@ struct cpu_efficiency {
  * Table of relative efficiency of each processors
  * The efficiency value must fit in 20bit and the final
  * cpu_scale value must be in the range
- *   0 < cpu_scale < 3*SCHED_POWER_SCALE/2
+ *   0 < cpu_scale < 3*SCHED_CAPACITY_SCALE/2
  * in order to return at most 1 when DIV_ROUND_CLOSEST
  * is used to compute the capacity of a CPU.
  * Processors that are not defined in the table,
- * use the default SCHED_POWER_SCALE value for cpu_scale.
+ * use the default SCHED_CAPACITY_SCALE value for cpu_scale.
  */
 static const struct cpu_efficiency table_efficiency[] = {
        {"arm,cortex-a15", 3891},
@@ -83,9 +83,9 @@ static unsigned long middle_capacity = 1;
  * Iterate all CPUs' descriptor in DT and compute the efficiency
  * (as per table_efficiency). Also calculate a middle efficiency
  * as close as possible to  (max{eff_i} - min{eff_i}) / 2
- * This is later used to scale the cpu_power field such that an
- * 'average' CPU is of middle power. Also see the comments near
- * table_efficiency[] and update_cpu_power().
+ * This is later used to scale the cpu_capacity field such that an
+ * 'average' CPU is of middle capacity. Also see the comments near
+ * table_efficiency[] and update_cpu_capacity().
  */
 static void __init parse_dt_topology(void)
 {
@@ -141,15 +141,15 @@ static void __init parse_dt_topology(void)
         * cpu_scale because all CPUs have the same capacity. Otherwise, we
         * compute a middle_capacity factor that will ensure that the capacity
         * of an 'average' CPU of the system will be as close as possible to
-        * SCHED_POWER_SCALE, which is the default value, but with the
+        * SCHED_CAPACITY_SCALE, which is the default value, but with the
         * constraint explained near table_efficiency[].
         */
        if (4*max_capacity < (3*(max_capacity + min_capacity)))
                middle_capacity = (min_capacity + max_capacity)
-                               >> (SCHED_POWER_SHIFT+1);
+                               >> (SCHED_CAPACITY_SHIFT+1);
        else
                middle_capacity = ((max_capacity / 3)
-                               >> (SCHED_POWER_SHIFT-1)) + 1;
+                               >> (SCHED_CAPACITY_SHIFT-1)) + 1;
 
 }
 
@@ -158,20 +158,20 @@ static void __init parse_dt_topology(void)
  * boot. The update of all CPUs is in O(n^2) for heteregeneous system but the
  * function returns directly for SMP system.
  */
-static void update_cpu_power(unsigned int cpu)
+static void update_cpu_capacity(unsigned int cpu)
 {
        if (!cpu_capacity(cpu))
                return;
 
-       set_power_scale(cpu, cpu_capacity(cpu) / middle_capacity);
+       set_capacity_scale(cpu, cpu_capacity(cpu) / middle_capacity);
 
-       printk(KERN_INFO "CPU%u: update cpu_power %lu\n",
-               cpu, arch_scale_freq_power(NULL, cpu));
+       printk(KERN_INFO "CPU%u: update cpu_capacity %lu\n",
+               cpu, arch_scale_freq_capacity(NULL, cpu));
 }
 
 #else
 static inline void parse_dt_topology(void) {}
-static inline void update_cpu_power(unsigned int cpuid) {}
+static inline void update_cpu_capacity(unsigned int cpuid) {}
 #endif
 
  /*
@@ -267,7 +267,7 @@ void store_cpu_topology(unsigned int cpuid)
 
        update_siblings_masks(cpuid);
 
-       update_cpu_power(cpuid);
+       update_cpu_capacity(cpuid);
 
        printk(KERN_INFO "CPU%u: thread %d, cpu %d, socket %d, mpidr %x\n",
                cpuid, cpu_topology[cpuid].thread_id,
@@ -297,7 +297,7 @@ void __init init_cpu_topology(void)
 {
        unsigned int cpu;
 
-       /* init core mask and power*/
+       /* init core mask and capacity */
        for_each_possible_cpu(cpu) {
                struct cputopo_arm *cpu_topo = &(cpu_topology[cpu]);
 
@@ -307,7 +307,7 @@ void __init init_cpu_topology(void)
                cpumask_clear(&cpu_topo->core_sibling);
                cpumask_clear(&cpu_topo->thread_sibling);
 
-               set_power_scale(cpu, SCHED_POWER_SCALE);
+               set_capacity_scale(cpu, SCHED_CAPACITY_SCALE);
        }
        smp_wmb();
 
index b935ed2922d806725cd6916ce18bd429acf8e926..85e0b0c06718f0e8f1127192bfd65d5a2d4210ce 100644 (file)
@@ -208,3 +208,56 @@ void omap2xxx_clkt_vps_late_init(void)
                clk_put(c);
        }
 }
+
+#ifdef CONFIG_OF
+#include <linux/clk-provider.h>
+#include <linux/clkdev.h>
+
+static const struct clk_ops virt_prcm_set_ops = {
+       .recalc_rate    = &omap2_table_mpu_recalc,
+       .set_rate       = &omap2_select_table_rate,
+       .round_rate     = &omap2_round_to_table_rate,
+};
+
+/**
+ * omap2xxx_clkt_vps_init - initialize virt_prcm_set clock
+ *
+ * Does a manual init for the virtual prcm DVFS clock for OMAP2. This
+ * function is called only from omap2 DT clock init, as the virtual
+ * node is not modelled in the DT clock data.
+ */
+void omap2xxx_clkt_vps_init(void)
+{
+       struct clk_init_data init = { NULL };
+       struct clk_hw_omap *hw = NULL;
+       struct clk *clk;
+       const char *parent_name = "mpu_ck";
+       struct clk_lookup *lookup = NULL;
+
+       omap2xxx_clkt_vps_late_init();
+       omap2xxx_clkt_vps_check_bootloader_rates();
+
+       hw = kzalloc(sizeof(*hw), GFP_KERNEL);
+       lookup = kzalloc(sizeof(*lookup), GFP_KERNEL);
+       if (!hw || !lookup)
+               goto cleanup;
+       init.name = "virt_prcm_set";
+       init.ops = &virt_prcm_set_ops;
+       init.parent_names = &parent_name;
+       init.num_parents = 1;
+
+       hw->hw.init = &init;
+
+       clk = clk_register(NULL, &hw->hw);
+
+       lookup->dev_id = NULL;
+       lookup->con_id = "cpufreq_ck";
+       lookup->clk = clk;
+
+       clkdev_add(lookup);
+       return;
+cleanup:
+       kfree(hw);
+       kfree(lookup);
+}
+#endif
index bda767a9dea862d7223d86d1a59c0b1505e091f9..12f54d428d7c6f3ece2e4c5c6244c8cb9841d194 100644 (file)
@@ -178,17 +178,6 @@ struct clksel {
        const struct clksel_rate *rates;
 };
 
-struct clk_hw_omap_ops {
-       void                    (*find_idlest)(struct clk_hw_omap *oclk,
-                                       void __iomem **idlest_reg,
-                                       u8 *idlest_bit, u8 *idlest_val);
-       void                    (*find_companion)(struct clk_hw_omap *oclk,
-                                       void __iomem **other_reg,
-                                       u8 *other_bit);
-       void                    (*allow_idle)(struct clk_hw_omap *oclk);
-       void                    (*deny_idle)(struct clk_hw_omap *oclk);
-};
-
 unsigned long omap_fixed_divisor_recalc(struct clk_hw *hw,
                                        unsigned long parent_rate);
 
@@ -279,8 +268,6 @@ extern const struct clk_hw_omap_ops clkhwops_omap3430es2_hsotgusb_wait;
 extern const struct clk_hw_omap_ops clkhwops_am35xx_ipss_module_wait;
 extern const struct clk_hw_omap_ops clkhwops_apll54;
 extern const struct clk_hw_omap_ops clkhwops_apll96;
-extern const struct clk_hw_omap_ops clkhwops_omap2xxx_dpll;
-extern const struct clk_hw_omap_ops clkhwops_omap2430_i2chs_wait;
 
 /* clksel_rate blocks shared between OMAP44xx and AM33xx */
 extern const struct clksel_rate div_1_0_rates[];
index 539dc08afbbaf3cb93536f600a5bb930b35d7d55..45f41a4116031be4cbb722bc2db63cc33841c31f 100644 (file)
@@ -21,10 +21,6 @@ unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
                                      unsigned long parent_rate);
 unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
                                   unsigned long parent_rate);
-unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,
-                                   unsigned long parent_rate);
-int omap2_reprogram_dpllcore(struct clk_hw *clk, unsigned long rate,
-                            unsigned long parent_rate);
 void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw);
 unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw,
                                      unsigned long parent_rate);
index fcd8036af91041750f529c28f99d665dce86a04f..6d7ba37e225735d49e262723bc6927e0e0b52ed1 100644 (file)
@@ -319,6 +319,15 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel)
 
        /* Set DPLL multiplier, divider */
        v = omap2_clk_readl(clk, dd->mult_div1_reg);
+
+       /* Handle Duty Cycle Correction */
+       if (dd->dcc_mask) {
+               if (dd->last_rounded_rate >= dd->dcc_rate)
+                       v |= dd->dcc_mask; /* Enable DCC */
+               else
+                       v &= ~dd->dcc_mask; /* Disable DCC */
+       }
+
        v &= ~(dd->mult_mask | dd->div1_mask);
        v |= dd->last_rounded_m << __ffs(dd->mult_mask);
        v |= (dd->last_rounded_n - 1) << __ffs(dd->div1_mask);
index 1759fad540178705f0ff77940655d47569f18b93..e66ba31ef84de15520ded3e787fd1b7b91af4425 100644 (file)
@@ -53,7 +53,6 @@ CONFIG_IP_PNP=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_FW_LOADER is not set
 CONFIG_MTD=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_INTELEXT=y
@@ -63,6 +62,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=m
+CONFIG_MTD_SPI_NOR=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_SCSI=y
 # CONFIG_SCSI_PROC_FS is not set
index 357729682c0064edf2d908093037506a9dd31669..0207c588c19f3cad7d91b4dff2b84555474034f9 100644 (file)
@@ -58,7 +58,6 @@ CONFIG_BFIN_SIR0=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_FW_LOADER is not set
 CONFIG_MTD=y
-CONFIG_MTD_CHAR=m
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_JEDECPROBE=m
 CONFIG_MTD_RAM=y
@@ -66,6 +65,7 @@ CONFIG_MTD_ROM=m
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=m
+CONFIG_MTD_SPI_NOR=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_SCSI=y
 # CONFIG_SCSI_PROC_FS is not set
index 2e73a5d33da88f294f12d035a2f974917e8d3845..99c131ba7d908b557d85ebb57a0d0e0b6cf409b7 100644 (file)
@@ -57,7 +57,6 @@ CONFIG_BFIN_SIR0=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_FW_LOADER is not set
 CONFIG_MTD=y
-CONFIG_MTD_CHAR=m
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_JEDECPROBE=m
 CONFIG_MTD_RAM=y
@@ -65,6 +64,7 @@ CONFIG_MTD_ROM=m
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=m
+CONFIG_MTD_SPI_NOR=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_SCSI=y
 # CONFIG_SCSI_PROC_FS is not set
index f0a2ddf5de468d0a96f1fbc716b3e37915c377f8..38cb17d218d46f04f1b677beb748438e37cf65ea 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_FW_LOADER=m
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_INTELEXT=y
@@ -75,6 +74,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_BF5XX=y
 # CONFIG_MTD_NAND_BF5XX_HWECC is not set
+CONFIG_MTD_SPI_NOR=y
 CONFIG_BLK_DEV_RAM=y
 # CONFIG_SCSI_PROC_FS is not set
 CONFIG_BLK_DEV_SD=y
index 4ca39ab6b2bf98c12b260fef822473ae75820c2f..a7e9bfd84183d5b7c26924679f9bb33d88ac0118 100644 (file)
@@ -57,7 +57,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_FW_LOADER=m
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_INTELEXT=y
@@ -65,6 +64,7 @@ CONFIG_MTD_CFI_STAA=y
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_UBI=m
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
index 3853c473b443193dac482e2994c1d131328a80fe..f4a9200e1ab1526e44786e0b982168aef734bf57 100644 (file)
@@ -45,7 +45,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_FW_LOADER is not set
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=m
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=m
 CONFIG_MTD_CFI_AMDSTD=m
@@ -53,7 +52,7 @@ CONFIG_MTD_RAM=y
 CONFIG_MTD_ROM=m
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_M25P80=y
-# CONFIG_M25PXX_USE_FAST_READ is not set
+CONFIG_MTD_SPI_NOR=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
index f754e490bbfd00a570995da744290cfa0db1d894..0ff97d8d047a5f685e92305d93c51692c877097d 100644 (file)
@@ -36,13 +36,12 @@ CONFIG_IRTTY_SIR=m
 # CONFIG_WIRELESS is not set
 # CONFIG_FW_LOADER is not set
 CONFIG_MTD=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_RAM=y
 CONFIG_MTD_ROM=y
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_M25P80=y
-# CONFIG_M25PXX_USE_FAST_READ is not set
+CONFIG_MTD_SPI_NOR=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_MISC_DEVICES=y
 CONFIG_EEPROM_AT25=y
index 8d1e4c2d2c36d4f2944c8e7ea4d40050da4b530a..40e9c2bbc6e37f26ef8030316556a16c05c0d776 100644 (file)
@@ -316,6 +316,8 @@ static inline void disable_dma(unsigned int channel)
 }
 static inline void enable_dma(unsigned int channel)
 {
+       dma_ch[channel].regs->curr_x_count = 0;
+       dma_ch[channel].regs->curr_y_count = 0;
        dma_ch[channel].regs->cfg |= DMAEN;
 }
 int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data);
index d0989290f54cc663dca045455fdaf9cc7f461807..6f4bac969bf72e360a6476c55a9e7f667d2d21fb 100644 (file)
@@ -17,6 +17,7 @@
 #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
 #include <linux/usb/isp1362.h>
 #endif
+#include <linux/gpio.h>
 #include <linux/irq.h>
 #include <linux/i2c.h>
 #include <asm/dma.h>
index 21c9f304e96c50b7945ae4571a3fdf0363d924ce..790352f937004fde97c2430c67d0823fc382d808 100644 (file)
@@ -235,11 +235,6 @@ config PPC_EARLY_DEBUG_USBGECKO
          Select this to enable early debugging for Nintendo GameCube/Wii
          consoles via an external USB Gecko adapter.
 
-config PPC_EARLY_DEBUG_WSP
-       bool "Early debugging via WSP's internal UART"
-       depends on PPC_WSP
-       select PPC_UDBG_16550
-
 config PPC_EARLY_DEBUG_PS3GELIC
        bool "Early debugging through the PS3 Ethernet port"
        depends on PPC_PS3
index 426dce7ae7c4974db360c15bd6b6c9257d6564d1..ccc25eddbcb8b2ff8404d66cecbaec1e450f5a51 100644 (file)
@@ -333,8 +333,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
 $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
        $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
 
-$(obj)/zImage.%: vmlinux $(wrapperbits)
-       $(call if_changed,wrap,$*)
+$(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits)
+       $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))
 
 # dtbImage% - a dtbImage is a zImage with an embedded device tree blob
 $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb
diff --git a/arch/powerpc/configs/chroma_defconfig b/arch/powerpc/configs/chroma_defconfig
deleted file mode 100644 (file)
index 4f35fc4..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-CONFIG_PPC64=y
-CONFIG_PPC_BOOK3E_64=y
-# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set
-CONFIG_SMP=y
-CONFIG_NR_CPUS=256
-CONFIG_EXPERIMENTAL=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_TASK_XACCT=y
-CONFIG_TASK_IO_ACCOUNTING=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=19
-CONFIG_CGROUPS=y
-CONFIG_CGROUP_DEVICE=y
-CONFIG_CPUSETS=y
-CONFIG_CGROUP_CPUACCT=y
-CONFIG_RESOURCE_COUNTERS=y
-CONFIG_CGROUP_MEMCG=y
-CONFIG_CGROUP_MEMCG_SWAP=y
-CONFIG_NAMESPACES=y
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_RD_BZIP2=y
-CONFIG_RD_LZMA=y
-CONFIG_INITRAMFS_COMPRESSION_GZIP=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_EMBEDDED=y
-CONFIG_PERF_EVENTS=y
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=y
-CONFIG_KPROBES=y
-CONFIG_MODULES=y
-CONFIG_MODULE_FORCE_LOAD=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_SCOM_DEBUGFS=y
-CONFIG_PPC_A2_DD2=y
-CONFIG_KVM_GUEST=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_HZ_100=y
-# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-CONFIG_BINFMT_MISC=y
-CONFIG_NUMA=y
-# CONFIG_MIGRATION is not set
-CONFIG_PPC_64K_PAGES=y
-CONFIG_SCHED_SMT=y
-CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE=""
-# CONFIG_SECCOMP is not set
-CONFIG_PCIEPORTBUS=y
-# CONFIG_PCIEASPM is not set
-CONFIG_PCI_MSI=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_XFRM_USER=m
-CONFIG_XFRM_SUB_POLICY=y
-CONFIG_XFRM_STATISTICS=y
-CONFIG_NET_KEY=m
-CONFIG_NET_KEY_MIGRATE=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_NET_IPIP=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_IPV6=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_IPV6_OPTIMISTIC_DAD=y
-CONFIG_INET6_AH=y
-CONFIG_INET6_ESP=y
-CONFIG_INET6_IPCOMP=y
-CONFIG_IPV6_MIP6=y
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y
-CONFIG_IPV6_TUNNEL=y
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_MROUTE=y
-CONFIG_IPV6_PIMSM_V2=y
-CONFIG_NETFILTER=y
-CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CONNTRACK_EVENTS=y
-CONFIG_NF_CT_PROTO_UDPLITE=m
-CONFIG_NF_CONNTRACK_FTP=m
-CONFIG_NF_CONNTRACK_IRC=m
-CONFIG_NF_CONNTRACK_TFTP=m
-CONFIG_NF_CT_NETLINK=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_DSCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_OWNER=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_RATEEST=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_RECENT=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_TIME=m
-CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NF_CONNTRACK_IPV4=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_NF_NAT=m
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_NET_TCPPROBE=y
-# CONFIG_WIRELESS is not set
-CONFIG_NET_9P=y
-CONFIG_NET_9P_DEBUG=y
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_DEVTMPFS=y
-CONFIG_MTD=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_LE_BYTE_SWAP=y
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_CFI_AMDSTD=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_PHYSMAP_OF=y
-CONFIG_PROC_DEVICETREE=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=y
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=65536
-CONFIG_CDROM_PKTCDVD=y
-CONFIG_MISC_DEVICES=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_DEV_SR=y
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCSI_FC_ATTRS=y
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SRP_ATTRS=y
-CONFIG_ATA=y
-CONFIG_SATA_AHCI=y
-CONFIG_SATA_SIL24=y
-CONFIG_SATA_MV=y
-CONFIG_SATA_SIL=y
-CONFIG_PATA_CMD64X=y
-CONFIG_PATA_MARVELL=y
-CONFIG_PATA_SIL680=y
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=y
-CONFIG_BLK_DEV_DM=y
-CONFIG_DM_CRYPT=y
-CONFIG_DM_SNAPSHOT=y
-CONFIG_DM_MIRROR=y
-CONFIG_DM_ZERO=y
-CONFIG_DM_UEVENT=y
-CONFIG_NETDEVICES=y
-CONFIG_TUN=y
-CONFIG_E1000E=y
-CONFIG_TIGON3=y
-# CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
-# CONFIG_SERIO is not set
-# CONFIG_VT is not set
-CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_HW_RANDOM=y
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=1024
-# CONFIG_HWMON is not set
-# CONFIG_VGA_ARB is not set
-# CONFIG_USB_SUPPORT is not set
-CONFIG_EDAC=y
-CONFIG_EDAC_MM_EDAC=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_DS1511=y
-CONFIG_RTC_DRV_DS1553=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_EXT3_FS=y
-# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_EXT4_FS=y
-# CONFIG_DNOTIFY is not set
-CONFIG_FUSE_FS=y
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=m
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_CRAMFS=y
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_V4_1=y
-CONFIG_ROOT_NFS=y
-CONFIG_CIFS=y
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_CRC_CCITT=m
-CONFIG_CRC_T10DIF=y
-CONFIG_LIBCRC32C=m
-CONFIG_PRINTK_TIME=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_STRIP_ASM_SYMS=y
-CONFIG_DETECT_HUNG_TASK=y
-# CONFIG_SCHED_DEBUG is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_FTRACE_SYSCALLS=y
-CONFIG_PPC_EMULATED_STATS=y
-CONFIG_XMON=y
-CONFIG_XMON_DEFAULT=y
-CONFIG_IRQ_DOMAIN_DEBUG=y
-CONFIG_PPC_EARLY_DEBUG=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_TEST=m
-CONFIG_CRYPTO_CCM=m
-CONFIG_CRYPTO_GCM=m
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_SALSA20=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_LZO=m
-# CONFIG_CRYPTO_ANSI_CPRNG is not set
-CONFIG_VIRTUALIZATION=y
index f42e9baf3a4e743fddd9cf4bbc809f49aa1299d0..7c8608b096947000f7120f2a7ee729677962a094 100644 (file)
@@ -489,7 +489,6 @@ typedef struct scc_trans {
 #define FCC_GFMR_TCI           ((uint)0x20000000)
 #define FCC_GFMR_TRX           ((uint)0x10000000)
 #define FCC_GFMR_TTX           ((uint)0x08000000)
-#define FCC_GFMR_TTX           ((uint)0x08000000)
 #define FCC_GFMR_CDP           ((uint)0x04000000)
 #define FCC_GFMR_CTSP          ((uint)0x02000000)
 #define FCC_GFMR_CDS           ((uint)0x01000000)
index b76f58c124ca04c4673f1392c2f7a06960854142..fab7743c2640d565d5689f1cff06aa3dddbe0aa9 100644 (file)
@@ -254,6 +254,7 @@ void *eeh_pe_traverse(struct eeh_pe *root,
 void *eeh_pe_dev_traverse(struct eeh_pe *root,
                eeh_traverse_func fn, void *flag);
 void eeh_pe_restore_bars(struct eeh_pe *pe);
+const char *eeh_pe_loc_get(struct eeh_pe *pe);
 struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe);
 
 void *eeh_dev_init(struct device_node *dn, void *data);
index 89d5670b2eeb400ec659793fc3e960cc6d5894a3..1e551a2d6f8257f3fc78a73152ef65a3ebe24e52 100644 (file)
@@ -33,7 +33,7 @@ struct eeh_event {
 
 int eeh_event_init(void);
 int eeh_send_failure_event(struct eeh_pe *pe);
-void eeh_remove_event(struct eeh_pe *pe);
+void eeh_remove_event(struct eeh_pe *pe, bool force);
 void eeh_handle_event(struct eeh_pe *pe);
 
 #endif /* __KERNEL__ */
index 901dac6b6cb7f6bb6299c14b82158d5fc5cbcc39..d0918e09557f95e3d09f4ed41babb7d36f4e7f70 100644 (file)
@@ -223,10 +223,6 @@ typedef struct {
        unsigned int    id;
        unsigned int    active;
        unsigned long   vdso_base;
-#ifdef CONFIG_PPC_ICSWX
-       struct spinlock *cop_lockp;     /* guard cop related stuff */
-       unsigned long acop;             /* mask of enabled coprocessor types */
-#endif /* CONFIG_PPC_ICSWX */
 #ifdef CONFIG_PPC_MM_SLICES
        u64 low_slices_psize;   /* SLB page size encodings */
        u64 high_slices_psize;  /* 4 bits per slice for now */
index cb15cbb5160044233ac697d4ab0cce79fe4c06e4..460018889ba9b228c723855557ed338d1b5a6847 100644 (file)
@@ -599,9 +599,9 @@ enum {
 };
 
 struct OpalIoPhbErrorCommon {
-       uint32_t version;
-       uint32_t ioType;
-       uint32_t len;
+       __be32 version;
+       __be32 ioType;
+       __be32 len;
 };
 
 struct OpalIoP7IOCPhbErrorData {
@@ -666,64 +666,64 @@ struct OpalIoP7IOCPhbErrorData {
 struct OpalIoPhb3ErrorData {
        struct OpalIoPhbErrorCommon common;
 
-       uint32_t brdgCtl;
+       __be32 brdgCtl;
 
        /* PHB3 UTL regs */
-       uint32_t portStatusReg;
-       uint32_t rootCmplxStatus;
-       uint32_t busAgentStatus;
+       __be32 portStatusReg;
+       __be32 rootCmplxStatus;
+       __be32 busAgentStatus;
 
        /* PHB3 cfg regs */
-       uint32_t deviceStatus;
-       uint32_t slotStatus;
-       uint32_t linkStatus;
-       uint32_t devCmdStatus;
-       uint32_t devSecStatus;
+       __be32 deviceStatus;
+       __be32 slotStatus;
+       __be32 linkStatus;
+       __be32 devCmdStatus;
+       __be32 devSecStatus;
 
        /* cfg AER regs */
-       uint32_t rootErrorStatus;
-       uint32_t uncorrErrorStatus;
-       uint32_t corrErrorStatus;
-       uint32_t tlpHdr1;
-       uint32_t tlpHdr2;
-       uint32_t tlpHdr3;
-       uint32_t tlpHdr4;
-       uint32_t sourceId;
+       __be32 rootErrorStatus;
+       __be32 uncorrErrorStatus;
+       __be32 corrErrorStatus;
+       __be32 tlpHdr1;
+       __be32 tlpHdr2;
+       __be32 tlpHdr3;
+       __be32 tlpHdr4;
+       __be32 sourceId;
 
-       uint32_t rsv3;
+       __be32 rsv3;
 
        /* Record data about the call to allocate a buffer */
-       uint64_t errorClass;
-       uint64_t correlator;
+       __be64 errorClass;
+       __be64 correlator;
 
-       uint64_t nFir;                  /* 000 */
-       uint64_t nFirMask;              /* 003 */
-       uint64_t nFirWOF;               /* 008 */
+       __be64 nFir;                    /* 000 */
+       __be64 nFirMask;                /* 003 */
+       __be64 nFirWOF;         /* 008 */
 
        /* PHB3 MMIO Error Regs */
-       uint64_t phbPlssr;              /* 120 */
-       uint64_t phbCsr;                /* 110 */
-       uint64_t lemFir;                /* C00 */
-       uint64_t lemErrorMask;          /* C18 */
-       uint64_t lemWOF;                /* C40 */
-       uint64_t phbErrorStatus;        /* C80 */
-       uint64_t phbFirstErrorStatus;   /* C88 */
-       uint64_t phbErrorLog0;          /* CC0 */
-       uint64_t phbErrorLog1;          /* CC8 */
-       uint64_t mmioErrorStatus;       /* D00 */
-       uint64_t mmioFirstErrorStatus;  /* D08 */
-       uint64_t mmioErrorLog0;         /* D40 */
-       uint64_t mmioErrorLog1;         /* D48 */
-       uint64_t dma0ErrorStatus;       /* D80 */
-       uint64_t dma0FirstErrorStatus;  /* D88 */
-       uint64_t dma0ErrorLog0;         /* DC0 */
-       uint64_t dma0ErrorLog1;         /* DC8 */
-       uint64_t dma1ErrorStatus;       /* E00 */
-       uint64_t dma1FirstErrorStatus;  /* E08 */
-       uint64_t dma1ErrorLog0;         /* E40 */
-       uint64_t dma1ErrorLog1;         /* E48 */
-       uint64_t pestA[OPAL_PHB3_NUM_PEST_REGS];
-       uint64_t pestB[OPAL_PHB3_NUM_PEST_REGS];
+       __be64 phbPlssr;                /* 120 */
+       __be64 phbCsr;          /* 110 */
+       __be64 lemFir;          /* C00 */
+       __be64 lemErrorMask;            /* C18 */
+       __be64 lemWOF;          /* C40 */
+       __be64 phbErrorStatus;  /* C80 */
+       __be64 phbFirstErrorStatus;     /* C88 */
+       __be64 phbErrorLog0;            /* CC0 */
+       __be64 phbErrorLog1;            /* CC8 */
+       __be64 mmioErrorStatus; /* D00 */
+       __be64 mmioFirstErrorStatus;    /* D08 */
+       __be64 mmioErrorLog0;           /* D40 */
+       __be64 mmioErrorLog1;           /* D48 */
+       __be64 dma0ErrorStatus; /* D80 */
+       __be64 dma0FirstErrorStatus;    /* D88 */
+       __be64 dma0ErrorLog0;           /* DC0 */
+       __be64 dma0ErrorLog1;           /* DC8 */
+       __be64 dma1ErrorStatus; /* E00 */
+       __be64 dma1FirstErrorStatus;    /* E08 */
+       __be64 dma1ErrorLog0;           /* E40 */
+       __be64 dma1ErrorLog1;           /* E48 */
+       __be64 pestA[OPAL_PHB3_NUM_PEST_REGS];
+       __be64 pestB[OPAL_PHB3_NUM_PEST_REGS];
 };
 
 enum {
@@ -851,8 +851,8 @@ int64_t opal_pci_mask_pe_error(uint64_t phb_id, uint16_t pe_number, uint8_t erro
 int64_t opal_set_slot_led_status(uint64_t phb_id, uint64_t slot_id, uint8_t led_type, uint8_t led_action);
 int64_t opal_get_epow_status(__be64 *status);
 int64_t opal_set_system_attention_led(uint8_t led_action);
-int64_t opal_pci_next_error(uint64_t phb_id, uint64_t *first_frozen_pe,
-                           uint16_t *pci_error_type, uint16_t *severity);
+int64_t opal_pci_next_error(uint64_t phb_id, __be64 *first_frozen_pe,
+                           __be16 *pci_error_type, __be16 *severity);
 int64_t opal_pci_poll(uint64_t phb_id);
 int64_t opal_return_cpu(void);
 int64_t opal_reinit_cpus(uint64_t flags);
index 3d52a1132f3d30e2b007174e9cec71e7786499c0..3ba9c6f096fcfd38c517a0a2c7882994894268bb 100644 (file)
 #define TLB1_UR                        ASM_CONST(0x0000000000000002)
 #define TLB1_SR                        ASM_CONST(0x0000000000000001)
 
-#ifdef CONFIG_PPC_EARLY_DEBUG_WSP
-#define WSP_UART_PHYS  0xffc000c000
-/* This needs to be careful chosen to hit a !0 congruence class
- * in the TLB since we bolt it in way 3, which is already occupied
- * by our linear mapping primary bolted entry in CC 0.
- */
-#define WSP_UART_VIRT  0xf000000000001000
-#endif
-
 /* A2 erativax attributes definitions */
 #define ERATIVAX_RS_IS_ALL             0x000
 #define ERATIVAX_RS_IS_TID             0x040
index 0e83e7d8c73f5d0845690928ce24f179f69e22b8..58abeda64cb7afa271078497f25e3ae5a8a0e26c 100644 (file)
@@ -16,13 +16,15 @@ struct thread_struct;
 extern struct task_struct *_switch(struct thread_struct *prev,
                                   struct thread_struct *next);
 #ifdef CONFIG_PPC_BOOK3S_64
-static inline void save_tar(struct thread_struct *prev)
+static inline void save_early_sprs(struct thread_struct *prev)
 {
        if (cpu_has_feature(CPU_FTR_ARCH_207S))
                prev->tar = mfspr(SPRN_TAR);
+       if (cpu_has_feature(CPU_FTR_DSCR))
+               prev->dscr = mfspr(SPRN_DSCR);
 }
 #else
-static inline void save_tar(struct thread_struct *prev) {}
+static inline void save_early_sprs(struct thread_struct *prev) {}
 #endif
 
 extern void enable_kernel_fp(void);
@@ -84,6 +86,8 @@ static inline void clear_task_ebb(struct task_struct *t)
 {
 #ifdef CONFIG_PPC_BOOK3S_64
     /* EBB perf events are not inherited, so clear all EBB state. */
+    t->thread.ebbrr = 0;
+    t->thread.ebbhr = 0;
     t->thread.bescr = 0;
     t->thread.mmcr2 = 0;
     t->thread.mmcr0 = 0;
diff --git a/arch/powerpc/include/asm/wsp.h b/arch/powerpc/include/asm/wsp.h
deleted file mode 100644 (file)
index c7dc830..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- *  Copyright 2011 Michael Ellerman, IBM Corp.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU General Public License
- *  as published by the Free Software Foundation; either version
- *  2 of the License, or (at your option) any later version.
- */
-#ifndef __ASM_POWERPC_WSP_H
-#define __ASM_POWERPC_WSP_H
-
-extern int wsp_get_chip_id(struct device_node *dn);
-
-#endif /* __ASM_POWERPC_WSP_H */
index 5b7657959faad198796fdc868f03f66eaf9db854..de2c0e4ee1aab1c13d0ac60d0d2300849665c48c 100644 (file)
@@ -41,5 +41,6 @@
 #define PPC_FEATURE2_EBB               0x10000000
 #define PPC_FEATURE2_ISEL              0x08000000
 #define PPC_FEATURE2_TAR               0x04000000
+#define PPC_FEATURE2_VEC_CRYPTO                0x02000000
 
 #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */
index fab19ec25597c0a8ac95732b42354a8f58a335a4..670c312d914e64508ddcf8599d639663504603f6 100644 (file)
@@ -43,7 +43,6 @@ obj-$(CONFIG_PPC_BOOK3S_64)   += cpu_setup_power.o
 obj-$(CONFIG_PPC_BOOK3S_64)    += mce.o mce_power.o
 obj64-$(CONFIG_RELOCATABLE)    += reloc_64.o
 obj-$(CONFIG_PPC_BOOK3E_64)    += exceptions-64e.o idle_book3e.o
-obj-$(CONFIG_PPC_A2)           += cpu_setup_a2.o
 obj-$(CONFIG_PPC64)            += vdso64/
 obj-$(CONFIG_ALTIVEC)          += vecemu.o
 obj-$(CONFIG_PPC_970_NAP)      += idle_power4.o
diff --git a/arch/powerpc/kernel/cpu_setup_a2.S b/arch/powerpc/kernel/cpu_setup_a2.S
deleted file mode 100644 (file)
index 61f079e..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *  A2 specific assembly support code
- *
- *  Copyright 2009 Ben Herrenschmidt, IBM Corp.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU General Public License
- *  as published by the Free Software Foundation; either version
- *  2 of the License, or (at your option) any later version.
- */
-
-#include <asm/asm-offsets.h>
-#include <asm/ppc_asm.h>
-#include <asm/ppc-opcode.h>
-#include <asm/processor.h>
-#include <asm/reg_a2.h>
-#include <asm/reg.h>
-#include <asm/thread_info.h>
-
-/*
- * Disable thdid and class fields in ERATs to bump PID to full 14 bits capacity.
- * This also prevents external LPID accesses but that isn't a problem when not a
- * guest. Under PV, this setting will be ignored and MMUCR will return the right
- * number of PID bits we can use.
- */
-#define MMUCR1_EXTEND_PID \
-       (MMUCR1_ICTID | MMUCR1_ITTID | MMUCR1_DCTID | \
-        MMUCR1_DTTID | MMUCR1_DCCD)
-
-/*
- * Use extended PIDs if enabled.
- * Don't clear the ERATs on context sync events and enable I & D LRU.
- * Enable ERAT back invalidate when tlbwe overwrites an entry.
- */
-#define INITIAL_MMUCR1 \
-       (MMUCR1_EXTEND_PID | MMUCR1_CSINV_NEVER | MMUCR1_IRRE | \
-        MMUCR1_DRRE | MMUCR1_TLBWE_BINV)
-
-_GLOBAL(__setup_cpu_a2)
-       /* Some of these are actually thread local and some are
-        * core local but doing it always won't hurt
-        */
-
-#ifdef CONFIG_PPC_ICSWX
-       /* Make sure ACOP starts out as zero */
-       li      r3,0
-       mtspr   SPRN_ACOP,r3
-
-       /* Skip the following if we are in Guest mode */
-       mfmsr   r3
-       andis.  r0,r3,MSR_GS@h
-       bne     _icswx_skip_guest
-
-       /* Enable icswx instruction */
-       mfspr   r3,SPRN_A2_CCR2
-       ori     r3,r3,A2_CCR2_ENABLE_ICSWX
-       mtspr   SPRN_A2_CCR2,r3
-
-       /* Unmask all CTs in HACOP */
-       li      r3,-1
-       mtspr   SPRN_HACOP,r3
-_icswx_skip_guest:
-#endif /* CONFIG_PPC_ICSWX */
-
-       /* Enable doorbell */
-       mfspr   r3,SPRN_A2_CCR2
-       oris     r3,r3,A2_CCR2_ENABLE_PC@h
-       mtspr   SPRN_A2_CCR2,r3
-       isync
-
-       /* Setup CCR0 to disable power saving for now as it's busted
-        * in the current implementations. Setup CCR1 to wake on
-        * interrupts normally (we write the default value but who
-        * knows what FW may have clobbered...)
-        */
-       li      r3,0
-       mtspr   SPRN_A2_CCR0, r3
-       LOAD_REG_IMMEDIATE(r3,0x0f0f0f0f)
-       mtspr   SPRN_A2_CCR1, r3
-
-       /* Initialise MMUCR1 */
-       lis     r3,INITIAL_MMUCR1@h
-       ori     r3,r3,INITIAL_MMUCR1@l
-       mtspr   SPRN_MMUCR1,r3
-
-       /* Set MMUCR2 to enable 4K, 64K, 1M, 16M and 1G pages */
-       LOAD_REG_IMMEDIATE(r3, 0x000a7531)
-       mtspr   SPRN_MMUCR2,r3
-
-       /* Set MMUCR3 to write all thids bit to the TLB */
-       LOAD_REG_IMMEDIATE(r3, 0x0000000f)
-       mtspr   SPRN_MMUCR3,r3
-
-       /* Don't do ERAT stuff if running guest mode */
-       mfmsr   r3
-       andis.  r0,r3,MSR_GS@h
-       bne     1f
-
-       /* Now set the I-ERAT watermark to 15 */
-       lis     r4,(MMUCR0_TLBSEL_I|MMUCR0_ECL)@h
-       mtspr   SPRN_MMUCR0, r4
-       li      r4,A2_IERAT_SIZE-1
-       PPC_ERATWE(R4,R4,3)
-
-       /* Now set the D-ERAT watermark to 31 */
-       lis     r4,(MMUCR0_TLBSEL_D|MMUCR0_ECL)@h
-       mtspr   SPRN_MMUCR0, r4
-       li      r4,A2_DERAT_SIZE-1
-       PPC_ERATWE(R4,R4,3)
-
-       /* And invalidate the beast just in case. That won't get rid of
-        * a bolted entry though it will be in LRU and so will go away eventually
-        * but let's not bother for now
-        */
-       PPC_ERATILX(0,0,R0)
-1:
-       blr
-
-_GLOBAL(__restore_cpu_a2)
-       b       __setup_cpu_a2
index 1557e7c2c7e15bc45120eedde3d288792676f235..46733535cc0b482a1ea35fe8411c556fb26fcb3b 100644 (file)
@@ -56,6 +56,7 @@ _GLOBAL(__setup_cpu_power8)
        li      r0,0
        mtspr   SPRN_LPID,r0
        mfspr   r3,SPRN_LPCR
+       ori     r3, r3, LPCR_PECEDH
        bl      __init_LPCR
        bl      __init_HFSCR
        bl      __init_tlb_power8
@@ -74,6 +75,7 @@ _GLOBAL(__restore_cpu_power8)
        li      r0,0
        mtspr   SPRN_LPID,r0
        mfspr   r3,SPRN_LPCR
+       ori     r3, r3, LPCR_PECEDH
        bl      __init_LPCR
        bl      __init_HFSCR
        bl      __init_tlb_power8
index c1faade6506dd581e3baf2aebfd93c7972fbd6dc..965291b4c2fa15a9f6f50cd8ca8b1e3a3067db02 100644 (file)
@@ -109,7 +109,8 @@ extern void __restore_cpu_e6500(void);
                                 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
 #define COMMON_USER2_POWER8    (PPC_FEATURE2_ARCH_2_07 | \
                                 PPC_FEATURE2_HTM_COMP | PPC_FEATURE2_DSCR | \
-                                PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR)
+                                PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
+                                PPC_FEATURE2_VEC_CRYPTO)
 #define COMMON_USER_PA6T       (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
                                 PPC_FEATURE_TRUE_LE | \
                                 PPC_FEATURE_HAS_ALTIVEC_COMP)
@@ -2148,44 +2149,6 @@ static struct cpu_spec __initdata cpu_specs[] = {
        }
 #endif /* CONFIG_PPC32 */
 #endif /* CONFIG_E500 */
-
-#ifdef CONFIG_PPC_A2
-       {       /* Standard A2 (>= DD2) + FPU core */
-               .pvr_mask               = 0xffff0000,
-               .pvr_value              = 0x00480000,
-               .cpu_name               = "A2 (>= DD2)",
-               .cpu_features           = CPU_FTRS_A2,
-               .cpu_user_features      = COMMON_USER_PPC64,
-               .mmu_features           = MMU_FTRS_A2,
-               .icache_bsize           = 64,
-               .dcache_bsize           = 64,
-               .num_pmcs               = 0,
-               .cpu_setup              = __setup_cpu_a2,
-               .cpu_restore            = __restore_cpu_a2,
-               .machine_check          = machine_check_generic,
-               .platform               = "ppca2",
-       },
-       {       /* This is a default entry to get going, to be replaced by
-                * a real one at some stage
-                */
-#define CPU_FTRS_BASE_BOOK3E   (CPU_FTR_USE_TB | \
-           CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_SMT | \
-           CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
-               .pvr_mask               = 0x00000000,
-               .pvr_value              = 0x00000000,
-               .cpu_name               = "Book3E",
-               .cpu_features           = CPU_FTRS_BASE_BOOK3E,
-               .cpu_user_features      = COMMON_USER_PPC64,
-               .mmu_features           = MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX |
-                                         MMU_FTR_USE_TLBIVAX_BCAST |
-                                         MMU_FTR_LOCK_BCAST_INVAL,
-               .icache_bsize           = 64,
-               .dcache_bsize           = 64,
-               .num_pmcs               = 0,
-               .machine_check          = machine_check_generic,
-               .platform               = "power6",
-       },
-#endif /* CONFIG_PPC_A2 */
 };
 
 static struct cpu_spec the_cpu_spec;
index 7051ea3101b96af830faf0e44eadeb70884fb6fc..86e25702aaca8894701ff585b87ee08caa017199 100644 (file)
@@ -330,8 +330,8 @@ static int eeh_phb_check_failure(struct eeh_pe *pe)
        eeh_pe_state_mark(phb_pe, EEH_PE_ISOLATED);
        eeh_serialize_unlock(flags);
 
-       pr_err("EEH: PHB#%x failure detected\n",
-               phb_pe->phb->global_number);
+       pr_err("EEH: PHB#%x failure detected, location: %s\n",
+               phb_pe->phb->global_number, eeh_pe_loc_get(phb_pe));
        dump_stack();
        eeh_send_failure_event(phb_pe);
 
@@ -358,10 +358,11 @@ out:
 int eeh_dev_check_failure(struct eeh_dev *edev)
 {
        int ret;
+       int active_flags = (EEH_STATE_MMIO_ACTIVE | EEH_STATE_DMA_ACTIVE);
        unsigned long flags;
        struct device_node *dn;
        struct pci_dev *dev;
-       struct eeh_pe *pe;
+       struct eeh_pe *pe, *parent_pe, *phb_pe;
        int rc = 0;
        const char *location;
 
@@ -439,14 +440,34 @@ int eeh_dev_check_failure(struct eeh_dev *edev)
         */
        if ((ret < 0) ||
            (ret == EEH_STATE_NOT_SUPPORT) ||
-           (ret & (EEH_STATE_MMIO_ACTIVE | EEH_STATE_DMA_ACTIVE)) ==
-           (EEH_STATE_MMIO_ACTIVE | EEH_STATE_DMA_ACTIVE)) {
+           ((ret & active_flags) == active_flags)) {
                eeh_stats.false_positives++;
                pe->false_positives++;
                rc = 0;
                goto dn_unlock;
        }
 
+       /*
+        * It should be corner case that the parent PE has been
+        * put into frozen state as well. We should take care
+        * that at first.
+        */
+       parent_pe = pe->parent;
+       while (parent_pe) {
+               /* Hit the ceiling ? */
+               if (parent_pe->type & EEH_PE_PHB)
+                       break;
+
+               /* Frozen parent PE ? */
+               ret = eeh_ops->get_state(parent_pe, NULL);
+               if (ret > 0 &&
+                   (ret & active_flags) != active_flags)
+                       pe = parent_pe;
+
+               /* Next parent level */
+               parent_pe = parent_pe->parent;
+       }
+
        eeh_stats.slot_resets++;
 
        /* Avoid repeated reports of this failure, including problems
@@ -460,8 +481,11 @@ int eeh_dev_check_failure(struct eeh_dev *edev)
         * a stack trace will help the device-driver authors figure
         * out what happened.  So print that out.
         */
-       pr_err("EEH: Frozen PE#%x detected on PHB#%x\n",
-               pe->addr, pe->phb->global_number);
+       phb_pe = eeh_phb_pe_get(pe->phb);
+       pr_err("EEH: Frozen PHB#%x-PE#%x detected\n",
+              pe->phb->global_number, pe->addr);
+       pr_err("EEH: PE location: %s, PHB location: %s\n",
+              eeh_pe_loc_get(pe), eeh_pe_loc_get(phb_pe));
        dump_stack();
 
        eeh_send_failure_event(pe);
index 7100a5b96e7059caf572609dec9d7f9393f0106f..420da61d4ce001d74ba64b675f8615b65f6e812a 100644 (file)
@@ -447,8 +447,9 @@ static void *eeh_pe_detach_dev(void *data, void *userdata)
  * PE reset (for 3 times), we try to clear the frozen state
  * for 3 times as well.
  */
-static int eeh_clear_pe_frozen_state(struct eeh_pe *pe)
+static void *__eeh_clear_pe_frozen_state(void *data, void *flag)
 {
+       struct eeh_pe *pe = (struct eeh_pe *)data;
        int i, rc;
 
        for (i = 0; i < 3; i++) {
@@ -461,13 +462,24 @@ static int eeh_clear_pe_frozen_state(struct eeh_pe *pe)
        }
 
        /* The PE has been isolated, clear it */
-       if (rc)
+       if (rc) {
                pr_warn("%s: Can't clear frozen PHB#%x-PE#%x (%d)\n",
                        __func__, pe->phb->global_number, pe->addr, rc);
-       else
+               return (void *)pe;
+       }
+
+       return NULL;
+}
+
+static int eeh_clear_pe_frozen_state(struct eeh_pe *pe)
+{
+       void *rc;
+
+       rc = eeh_pe_traverse(pe, __eeh_clear_pe_frozen_state, NULL);
+       if (!rc)
                eeh_pe_state_clear(pe, EEH_PE_ISOLATED);
 
-       return rc;
+       return rc ? -EIO : 0;
 }
 
 /**
@@ -758,7 +770,7 @@ static void eeh_handle_special_event(void)
                        eeh_serialize_lock(&flags);
 
                        /* Purge all events */
-                       eeh_remove_event(NULL);
+                       eeh_remove_event(NULL, true);
 
                        list_for_each_entry(hose, &hose_list, list_node) {
                                phb_pe = eeh_phb_pe_get(hose);
@@ -777,7 +789,7 @@ static void eeh_handle_special_event(void)
                        eeh_serialize_lock(&flags);
 
                        /* Purge all events of the PHB */
-                       eeh_remove_event(pe);
+                       eeh_remove_event(pe, true);
 
                        if (rc == EEH_NEXT_ERR_DEAD_PHB)
                                eeh_pe_state_mark(pe, EEH_PE_ISOLATED);
index 72d748b56c86b2b9ae960e49b819dfedef36f61a..4eefb6e34dbb2f6edbf4990349e9c11b0b5d07f8 100644 (file)
@@ -152,24 +152,33 @@ int eeh_send_failure_event(struct eeh_pe *pe)
 /**
  * eeh_remove_event - Remove EEH event from the queue
  * @pe: Event binding to the PE
+ * @force: Event will be removed unconditionally
  *
  * On PowerNV platform, we might have subsequent coming events
  * is part of the former one. For that case, those subsequent
  * coming events are totally duplicated and unnecessary, thus
  * they should be removed.
  */
-void eeh_remove_event(struct eeh_pe *pe)
+void eeh_remove_event(struct eeh_pe *pe, bool force)
 {
        unsigned long flags;
        struct eeh_event *event, *tmp;
 
+       /*
+        * If we have NULL PE passed in, we have dead IOC
+        * or we're sure we can report all existing errors
+        * by the caller.
+        *
+        * With "force", the event with associated PE that
+        * have been isolated, the event won't be removed
+        * to avoid event lost.
+        */
        spin_lock_irqsave(&eeh_eventlist_lock, flags);
        list_for_each_entry_safe(event, tmp, &eeh_eventlist, list) {
-               /*
-                * If we don't have valid PE passed in, that means
-                * we already have event corresponding to dead IOC
-                * and all events should be purged.
-                */
+               if (!force && event->pe &&
+                   (event->pe->state & EEH_PE_ISOLATED))
+                       continue;
+
                if (!pe) {
                        list_del(&event->list);
                        kfree(event);
index 995c2a2846303d3885674d474bcbfd0cae90f9cc..fbd01eba44734651d7a9e324b9fca1f733107ff7 100644 (file)
@@ -791,6 +791,66 @@ void eeh_pe_restore_bars(struct eeh_pe *pe)
        eeh_pe_dev_traverse(pe, eeh_restore_one_device_bars, NULL);
 }
 
+/**
+ * eeh_pe_loc_get - Retrieve location code binding to the given PE
+ * @pe: EEH PE
+ *
+ * Retrieve the location code of the given PE. If the primary PE bus
+ * is root bus, we will grab location code from PHB device tree node
+ * or root port. Otherwise, the upstream bridge's device tree node
+ * of the primary PE bus will be checked for the location code.
+ */
+const char *eeh_pe_loc_get(struct eeh_pe *pe)
+{
+       struct pci_controller *hose;
+       struct pci_bus *bus = eeh_pe_bus_get(pe);
+       struct pci_dev *pdev;
+       struct device_node *dn;
+       const char *loc;
+
+       if (!bus)
+               return "N/A";
+
+       /* PHB PE or root PE ? */
+       if (pci_is_root_bus(bus)) {
+               hose = pci_bus_to_host(bus);
+               loc = of_get_property(hose->dn,
+                               "ibm,loc-code", NULL);
+               if (loc)
+                       return loc;
+               loc = of_get_property(hose->dn,
+                               "ibm,io-base-loc-code", NULL);
+               if (loc)
+                       return loc;
+
+               pdev = pci_get_slot(bus, 0x0);
+       } else {
+               pdev = bus->self;
+       }
+
+       if (!pdev) {
+               loc = "N/A";
+               goto out;
+       }
+
+       dn = pci_device_to_OF_node(pdev);
+       if (!dn) {
+               loc = "N/A";
+               goto out;
+       }
+
+       loc = of_get_property(dn, "ibm,loc-code", NULL);
+       if (!loc)
+               loc = of_get_property(dn, "ibm,slot-location-code", NULL);
+       if (!loc)
+               loc = "N/A";
+
+out:
+       if (pci_is_root_bus(bus) && pdev)
+               pci_dev_put(pdev);
+       return loc;
+}
+
 /**
  * eeh_pe_bus_get - Retrieve PCI bus according to the given PE
  * @pe: EEH PE
index 911d45366f596c764a4ad001025760de4f07c5e8..6528c5e2cc44800a201802858c23d34e92162041 100644 (file)
@@ -428,12 +428,6 @@ BEGIN_FTR_SECTION
        std     r24,THREAD_VRSAVE(r3)
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 #endif /* CONFIG_ALTIVEC */
-#ifdef CONFIG_PPC64
-BEGIN_FTR_SECTION
-       mfspr   r25,SPRN_DSCR
-       std     r25,THREAD_DSCR(r3)
-END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
-#endif
        and.    r0,r0,r22
        beq+    1f
        andc    r22,r22,r0
index 771b4e92e5d9c091fcedfa1dc4982fa6950c1405..bb9cac6c8051ab8a10467a099e8fa998b1f7d181 100644 (file)
@@ -1467,22 +1467,6 @@ a2_tlbinit_after_linear_map:
        .globl  a2_tlbinit_after_iprot_flush
 a2_tlbinit_after_iprot_flush:
 
-#ifdef CONFIG_PPC_EARLY_DEBUG_WSP
-       /* Now establish early debug mappings if applicable */
-       /* Restore the MAS0 we used for linear mapping load */
-       mtspr   SPRN_MAS0,r11
-
-       lis     r3,(MAS1_VALID | MAS1_IPROT)@h
-       ori     r3,r3,(BOOK3E_PAGESZ_4K << MAS1_TSIZE_SHIFT)
-       mtspr   SPRN_MAS1,r3
-       LOAD_REG_IMMEDIATE(r3, WSP_UART_VIRT | MAS2_I | MAS2_G)
-       mtspr   SPRN_MAS2,r3
-       LOAD_REG_IMMEDIATE(r3, WSP_UART_PHYS | MAS3_SR | MAS3_SW)
-       mtspr   SPRN_MAS7_MAS3,r3
-       /* re-use the MAS8 value from the linear mapping */
-       tlbwe
-#endif /* CONFIG_PPC_EARLY_DEBUG_WSP */
-
        PPC_TLBILX(0,0,R0)
        sync
        isync
index 20f11eb4dff7ee4e308565ec0910f57b5bd189e6..a7d36b19221d4710eb3e35db66b43fd5055e4c92 100644 (file)
@@ -439,9 +439,9 @@ BEGIN_FTR_SECTION
         * R9           = CR
         * Original R9 to R13 is saved on PACA_EXMC
         *
-        * Switch to mc_emergency stack and handle re-entrancy (though we
-        * currently don't test for overflow). Save MCE registers srr1,
-        * srr0, dar and dsisr and then set ME=1
+        * Switch to mc_emergency stack and handle re-entrancy (we limit
+        * the nested MCE upto level 4 to avoid stack overflow).
+        * Save MCE registers srr1, srr0, dar and dsisr and then set ME=1
         *
         * We use paca->in_mce to check whether this is the first entry or
         * nested machine check. We increment paca->in_mce to track nested
@@ -464,6 +464,9 @@ BEGIN_FTR_SECTION
 0:     subi    r1,r1,INT_FRAME_SIZE    /* alloc stack frame */
        addi    r10,r10,1               /* increment paca->in_mce */
        sth     r10,PACA_IN_MCE(r13)
+       /* Limit nested MCE to level 4 to avoid stack overflow */
+       cmpwi   r10,4
+       bgt     2f                      /* Check if we hit limit of 4 */
        std     r11,GPR1(r1)            /* Save r1 on the stack. */
        std     r11,0(r1)               /* make stack chain pointer */
        mfspr   r11,SPRN_SRR0           /* Save SRR0 */
@@ -482,10 +485,23 @@ BEGIN_FTR_SECTION
        ori     r11,r11,MSR_RI          /* turn on RI bit */
        ld      r12,PACAKBASE(r13)      /* get high part of &label */
        LOAD_HANDLER(r12, machine_check_handle_early)
-       mtspr   SPRN_SRR0,r12
+1:     mtspr   SPRN_SRR0,r12
        mtspr   SPRN_SRR1,r11
        rfid
        b       .       /* prevent speculative execution */
+2:
+       /* Stack overflow. Stay on emergency stack and panic.
+        * Keep the ME bit off while panic-ing, so that if we hit
+        * another machine check we checkstop.
+        */
+       addi    r1,r1,INT_FRAME_SIZE    /* go back to previous stack frame */
+       ld      r11,PACAKMSR(r13)
+       ld      r12,PACAKBASE(r13)
+       LOAD_HANDLER(r12, unrecover_mce)
+       li      r10,MSR_ME
+       andc    r11,r11,r10             /* Turn off MSR_ME */
+       b       1b
+       b       .       /* prevent speculative execution */
 END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
 
 machine_check_pSeries:
@@ -1389,6 +1405,7 @@ machine_check_handle_early:
        bl      save_nvgprs
        addi    r3,r1,STACK_FRAME_OVERHEAD
        bl      machine_check_early
+       std     r3,RESULT(r1)   /* Save result */
        ld      r12,_MSR(r1)
 #ifdef CONFIG_PPC_P7_NAP
        /*
@@ -1443,10 +1460,32 @@ machine_check_handle_early:
         */
        andi.   r11,r12,MSR_RI
        bne     2f
-1:     addi    r3,r1,STACK_FRAME_OVERHEAD
-       bl      unrecoverable_exception
-       b       1b
+1:     mfspr   r11,SPRN_SRR0
+       ld      r10,PACAKBASE(r13)
+       LOAD_HANDLER(r10,unrecover_mce)
+       mtspr   SPRN_SRR0,r10
+       ld      r10,PACAKMSR(r13)
+       /*
+        * We are going down. But there are chances that we might get hit by
+        * another MCE during panic path and we may run into unstable state
+        * with no way out. Hence, turn ME bit off while going down, so that
+        * when another MCE is hit during panic path, system will checkstop
+        * and hypervisor will get restarted cleanly by SP.
+        */
+       li      r3,MSR_ME
+       andc    r10,r10,r3              /* Turn off MSR_ME */
+       mtspr   SPRN_SRR1,r10
+       rfid
+       b       .
 2:
+       /*
+        * Check if we have successfully handled/recovered from error, if not
+        * then stay on emergency stack and panic.
+        */
+       ld      r3,RESULT(r1)   /* Load result */
+       cmpdi   r3,0            /* see if we handled MCE successfully */
+
+       beq     1b              /* if !handled then panic */
        /*
         * Return from MC interrupt.
         * Queue up the MCE event so that we can log it later, while
@@ -1460,6 +1499,17 @@ machine_check_handle_early:
        MACHINE_CHECK_HANDLER_WINDUP
        b       machine_check_pSeries
 
+unrecover_mce:
+       /* Invoke machine_check_exception to print MCE event and panic. */
+       addi    r3,r1,STACK_FRAME_OVERHEAD
+       bl      machine_check_exception
+       /*
+        * We will not reach here. Even if we did, there is no way out. Call
+        * unrecoverable_exception and die.
+        */
+1:     addi    r3,r1,STACK_FRAME_OVERHEAD
+       bl      unrecoverable_exception
+       b       1b
 /*
  * r13 points to the PACA, r9 contains the saved CR,
  * r12 contain the saved SRR1, SRR0 is still ready for return
index 67ee0d6c1070b3f02702dbc8442a905f3b39b8d6..7d7d8635227ac76bcd054b3fd04248ec90127c9d 100644 (file)
@@ -930,25 +930,6 @@ initial_mmu:
        tlbwe   r4,r0,TLB_DATA          /* Load the data portion of the entry */
        tlbwe   r3,r0,TLB_TAG           /* Load the tag portion of the entry */
 
-#if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(SERIAL_DEBUG_IO_BASE)
-
-       /* Load a TLB entry for the UART, so that ppc4xx_progress() can use
-        * the UARTs nice and early.  We use a 4k real==virtual mapping. */
-
-       lis     r3,SERIAL_DEBUG_IO_BASE@h
-       ori     r3,r3,SERIAL_DEBUG_IO_BASE@l
-       mr      r4,r3
-       clrrwi  r4,r4,12
-       ori     r4,r4,(TLB_WR|TLB_I|TLB_M|TLB_G)
-
-       clrrwi  r3,r3,12
-       ori     r3,r3,(TLB_VALID | TLB_PAGESZ(PAGESZ_4K))
-
-       li      r0,0                    /* TLB slot 0 */
-       tlbwe   r4,r0,TLB_DATA
-       tlbwe   r3,r0,TLB_TAG
-#endif /* CONFIG_SERIAL_DEBUG_TEXT && SERIAL_DEBUG_IO_BASE */
-
        isync
 
        /* Establish the exception vector base
index 8a1edbe26b8f34c99beafc8a1d3bff68ec99f765..be99774d3f44ac9ecc83d5e637a7bb4b4f460d80 100644 (file)
@@ -755,15 +755,15 @@ struct task_struct *__switch_to(struct task_struct *prev,
 
        WARN_ON(!irqs_disabled());
 
-       /* Back up the TAR across context switches.
+       /* Back up the TAR and DSCR across context switches.
         * Note that the TAR is not available for use in the kernel.  (To
         * provide this, the TAR should be backed up/restored on exception
         * entry/exit instead, and be in pt_regs.  FIXME, this should be in
         * pt_regs anyway (for debug).)
-        * Save the TAR here before we do treclaim/trecheckpoint as these
-        * will change the TAR.
+        * Save the TAR and DSCR here before we do treclaim/trecheckpoint as
+        * these will change them.
         */
-       save_tar(&prev->thread);
+       save_early_sprs(&prev->thread);
 
        __switch_to_tm(prev);
 
index d4d418376f994575f598ee7f9bab58d1db2449ce..e239df3768acfb3e14c55367c7ab737233f50771 100644 (file)
@@ -471,7 +471,7 @@ void __init smp_setup_cpu_maps(void)
                for (j = 0; j < nthreads && cpu < nr_cpu_ids; j++) {
                        DBG("    thread %d -> cpu %d (hard id %d)\n",
                            j, cpu, be32_to_cpu(intserv[j]));
-                       set_cpu_present(cpu, true);
+                       set_cpu_present(cpu, of_device_is_available(dn));
                        set_hard_smp_processor_id(cpu, be32_to_cpu(intserv[j]));
                        set_cpu_possible(cpu, true);
                        cpu++;
index 7753af2d261381bcc21bf3e21f8ee4f4880847e9..51a3ff78838aaf1eb6726e92cb871c128221eb2e 100644 (file)
@@ -749,7 +749,7 @@ int setup_profiling_timer(unsigned int multiplier)
 /* cpumask of CPUs with asymetric SMT dependancy */
 static const int powerpc_smt_flags(void)
 {
-       int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
+       int flags = SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES;
 
        if (cpu_has_feature(CPU_FTR_ASYM_SMT)) {
                printk_once(KERN_INFO "Enabling Asymmetric SMT scheduling\n");
index 7e711bdcc6da5adb399e8ac0a55097e76317fe51..9fff9cdcc5196c3a20b9129d7e407c1dbc113cb7 100644 (file)
@@ -551,7 +551,7 @@ void timer_interrupt(struct pt_regs * regs)
        may_hard_irq_enable();
 
 
-#if defined(CONFIG_PPC32) && defined(CONFIG_PMAC)
+#if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC)
        if (atomic_read(&ppc_n_lost_interrupts) != 0)
                do_IRQ(regs);
 #endif
index 1bd7ca298fa1b132167a47bbf310ed0ef6a0db0b..239f1cde3fff161b8f4b9cfc56beff61d9143845 100644 (file)
@@ -295,6 +295,8 @@ long machine_check_early(struct pt_regs *regs)
 {
        long handled = 0;
 
+       __get_cpu_var(irq_stat).mce_exceptions++;
+
        if (cur_cpu_spec && cur_cpu_spec->machine_check_early)
                handled = cur_cpu_spec->machine_check_early(regs);
        return handled;
index a15837519dca45474a141fc6328eee130bafd779..b7aa07279a63b1fb5afeb26061631ed74c84b0e3 100644 (file)
@@ -62,8 +62,6 @@ void __init udbg_early_init(void)
        udbg_init_cpm();
 #elif defined(CONFIG_PPC_EARLY_DEBUG_USBGECKO)
        udbg_init_usbgecko();
-#elif defined(CONFIG_PPC_EARLY_DEBUG_WSP)
-       udbg_init_wsp();
 #elif defined(CONFIG_PPC_EARLY_DEBUG_MEMCONS)
        /* In memory console */
        udbg_init_memcons();
index 75702e207b2986c4741cf243c2a49c955c30e05b..6e7c4923b5ea1bb24427bc47360576900bc44fe8 100644 (file)
@@ -296,14 +296,3 @@ void __init udbg_init_40x_realmode(void)
 }
 
 #endif /* CONFIG_PPC_EARLY_DEBUG_40x */
-
-
-#ifdef CONFIG_PPC_EARLY_DEBUG_WSP
-
-void __init udbg_init_wsp(void)
-{
-       udbg_uart_init_mmio((void *)WSP_UART_VIRT, 1);
-       udbg_uart_setup(57600, 50000000);
-}
-
-#endif /* CONFIG_PPC_EARLY_DEBUG_WSP */
index 768a9f977c001ee73e6d5aa2f0b8ee44ea3b35f5..3a5c568b1e89f43210c9cd2ee0ec9e9d70c62e24 100644 (file)
@@ -113,10 +113,8 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu)
         * We assume that if the condition is recovered then linux host
         * will have generated an error log event that we will pick
         * up and log later.
-        * Don't release mce event now. In case if condition is not
-        * recovered we do guest exit and go back to linux host machine
-        * check handler. Hence we need make sure that current mce event
-        * is available for linux host to consume.
+        * Don't release mce event now. We will queue up the event so that
+        * we can log the MCE event info on host console.
         */
        if (!get_mce_event(&mce_evt, MCE_EVENT_DONTRELEASE))
                goto out;
@@ -128,11 +126,12 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu)
 
 out:
        /*
-        * If we have handled the error, then release the mce event because
-        * we will be delivering machine check to guest.
+        * We are now going enter guest either through machine check
+        * interrupt (for unhandled errors) or will continue from
+        * current HSRR0 (for handled errors) in guest. Hence
+        * queue up the event so that we can log it from host console later.
         */
-       if (handled)
-               release_mce_event();
+       machine_check_queue_event();
 
        return handled;
 }
index 77356fd25ccc96a8b4fd17746ea08edc0da16060..868347ef09fd48bcf8bfd343becb49f6898887c5 100644 (file)
@@ -2257,15 +2257,28 @@ machine_check_realmode:
        mr      r3, r9          /* get vcpu pointer */
        bl      kvmppc_realmode_machine_check
        nop
-       cmpdi   r3, 0           /* continue exiting from guest? */
+       cmpdi   r3, 0           /* Did we handle MCE ? */
        ld      r9, HSTATE_KVM_VCPU(r13)
        li      r12, BOOK3S_INTERRUPT_MACHINE_CHECK
-       beq     mc_cont
+       /*
+        * Deliver unhandled/fatal (e.g. UE) MCE errors to guest through
+        * machine check interrupt (set HSRR0 to 0x200). And for handled
+        * errors (no-fatal), just go back to guest execution with current
+        * HSRR0 instead of exiting guest. This new approach will inject
+        * machine check to guest for fatal error causing guest to crash.
+        *
+        * The old code used to return to host for unhandled errors which
+        * was causing guest to hang with soft lockups inside guest and
+        * makes it difficult to recover guest instance.
+        */
+       ld      r10, VCPU_PC(r9)
+       ld      r11, VCPU_MSR(r9)
+       bne     2f      /* Continue guest execution. */
        /* If not, deliver a machine check.  SRR0/1 are already set */
        li      r10, BOOK3S_INTERRUPT_MACHINE_CHECK
        ld      r11, VCPU_MSR(r9)
        bl      kvmppc_msr_interrupt
-       b       fast_interrupt_c_return
+2:     b       fast_interrupt_c_return
 
 /*
  * Check the reason we woke from nap, and take appropriate action.
index c0511c27a7337d757c450361a0682c8d3ef8d68e..412dd46dd0b7ea7136af14e8559e5d9b78d2c08a 100644 (file)
@@ -1470,7 +1470,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
                                regs->gpr[rd] = byterev_4(val);
                        goto ldst_done;
 
-#ifdef CONFIG_PPC_CPU
+#ifdef CONFIG_PPC_FPU
                case 535:       /* lfsx */
                case 567:       /* lfsux */
                        if (!(regs->msr & MSR_FP))
index bf9c6d4cd26c34770c53aedcb12fd1a2ed6f4e5c..391b3f6b54a30eb4759ce2a2b898392bb796c0ac 100644 (file)
@@ -19,7 +19,6 @@ source "arch/powerpc/platforms/embedded6xx/Kconfig"
 source "arch/powerpc/platforms/44x/Kconfig"
 source "arch/powerpc/platforms/40x/Kconfig"
 source "arch/powerpc/platforms/amigaone/Kconfig"
-source "arch/powerpc/platforms/wsp/Kconfig"
 
 config KVM_GUEST
        bool "KVM Guest support"
index 43b65ad1970a1a8635e7c517b7cfb95d211bcf84..a41bd023647aff48b21da2d8af80760417f879c4 100644 (file)
@@ -148,10 +148,6 @@ config POWER4
        depends on PPC64 && PPC_BOOK3S
        def_bool y
 
-config PPC_A2
-       bool
-       depends on PPC_BOOK3E_64
-
 config TUNE_CELL
        bool "Optimize for Cell Broadband Engine"
        depends on PPC64 && PPC_BOOK3S
@@ -280,7 +276,7 @@ config VSX
 
 config PPC_ICSWX
        bool "Support for PowerPC icswx coprocessor instruction"
-       depends on POWER4 || PPC_A2
+       depends on POWER4
        default n
        ---help---
 
index 879b4a448498807e08745b731b55ebbe1ab89e8b..469ef170d218e24fadc665623787e70a7dbd39f8 100644 (file)
@@ -22,4 +22,3 @@ obj-$(CONFIG_PPC_CELL)                += cell/
 obj-$(CONFIG_PPC_PS3)          += ps3/
 obj-$(CONFIG_EMBEDDED6xx)      += embedded6xx/
 obj-$(CONFIG_AMIGAONE)         += amigaone/
-obj-$(CONFIG_PPC_WSP)          += wsp/
index 0ba3c9598358e795e39e717287397b2405bca1a6..bcfd6f063efa7e64d4e361af002f6e858ff10620 100644 (file)
@@ -35,7 +35,6 @@
 #define SPUFS_PS_MAP_SIZE      0x20000
 #define SPUFS_MFC_MAP_SIZE     0x1000
 #define SPUFS_CNTL_MAP_SIZE    0x1000
-#define SPUFS_CNTL_MAP_SIZE    0x1000
 #define SPUFS_SIGNAL_MAP_SIZE  PAGE_SIZE
 #define SPUFS_MSS_MAP_SIZE     0x1000
 
index c252ee95bddf31b17e676f0d46a852880502f131..45a8ed0585cd17cd1aef9675d759e7342c8ca334 100644 (file)
@@ -17,6 +17,7 @@ config PPC_POWERNV
        select CPU_FREQ_GOV_USERSPACE
        select CPU_FREQ_GOV_ONDEMAND
        select CPU_FREQ_GOV_CONSERVATIVE
+       select PPC_DOORBELL
        default y
 
 config PPC_POWERNV_RTAS
index 4ad0d345bc960eeec309848c4edc0e2fa23e6970..d55891f89a2ce2bf0c14b22b47564760dd16abf0 100644 (file)
@@ -1,9 +1,9 @@
 obj-y                  += setup.o opal-takeover.o opal-wrappers.o opal.o opal-async.o
 obj-y                  += opal-rtc.o opal-nvram.o opal-lpc.o opal-flash.o
 obj-y                  += rng.o opal-elog.o opal-dump.o opal-sysparam.o opal-sensor.o
-obj-y                  += opal-msglog.o subcore.o subcore-asm.o
+obj-y                  += opal-msglog.o
 
-obj-$(CONFIG_SMP)      += smp.o
+obj-$(CONFIG_SMP)      += smp.o subcore.o subcore-asm.o
 obj-$(CONFIG_PCI)      += pci.o pci-p5ioc2.o pci-ioda.o
 obj-$(CONFIG_EEH)      += eeh-ioda.o eeh-powernv.o
 obj-$(CONFIG_PPC_SCOM) += opal-xscom.o
index 753f08e36dfaa8d4cfa7884b9f27480899abbca7..8ad0c5b891f4e3083e3b554b980f0eae54a51ab7 100644 (file)
@@ -267,7 +267,7 @@ static int ioda_eeh_get_state(struct eeh_pe *pe)
 {
        s64 ret = 0;
        u8 fstate;
-       u16 pcierr;
+       __be16 pcierr;
        u32 pe_no;
        int result;
        struct pci_controller *hose = pe->phb;
@@ -316,7 +316,7 @@ static int ioda_eeh_get_state(struct eeh_pe *pe)
                result = 0;
                result &= ~EEH_STATE_RESET_ACTIVE;
 
-               if (pcierr != OPAL_EEH_PHB_ERROR) {
+               if (be16_to_cpu(pcierr) != OPAL_EEH_PHB_ERROR) {
                        result |= EEH_STATE_MMIO_ACTIVE;
                        result |= EEH_STATE_DMA_ACTIVE;
                        result |= EEH_STATE_MMIO_ENABLED;
@@ -705,18 +705,19 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
 {
        struct pci_controller *hose;
        struct pnv_phb *phb;
-       struct eeh_pe *phb_pe;
-       u64 frozen_pe_no;
-       u16 err_type, severity;
+       struct eeh_pe *phb_pe, *parent_pe;
+       __be64 frozen_pe_no;
+       __be16 err_type, severity;
+       int active_flags = (EEH_STATE_MMIO_ACTIVE | EEH_STATE_DMA_ACTIVE);
        long rc;
-       int ret = EEH_NEXT_ERR_NONE;
+       int state, ret = EEH_NEXT_ERR_NONE;
 
        /*
         * While running here, it's safe to purge the event queue.
         * And we should keep the cached OPAL notifier event sychronized
         * between the kernel and firmware.
         */
-       eeh_remove_event(NULL);
+       eeh_remove_event(NULL, false);
        opal_notifier_update_evt(OPAL_EVENT_PCI_ERROR, 0x0ul);
 
        list_for_each_entry(hose, &hose_list, list_node) {
@@ -742,8 +743,8 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
                }
 
                /* If the PHB doesn't have error, stop processing */
-               if (err_type == OPAL_EEH_NO_ERROR ||
-                   severity == OPAL_EEH_SEV_NO_ERROR) {
+               if (be16_to_cpu(err_type) == OPAL_EEH_NO_ERROR ||
+                   be16_to_cpu(severity) == OPAL_EEH_SEV_NO_ERROR) {
                        pr_devel("%s: No error found on PHB#%x\n",
                                 __func__, hose->global_number);
                        continue;
@@ -755,14 +756,14 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
                 * specific PHB.
                 */
                pr_devel("%s: Error (%d, %d, %llu) on PHB#%x\n",
-                        __func__, err_type, severity,
-                        frozen_pe_no, hose->global_number);
-               switch (err_type) {
+                        __func__, be16_to_cpu(err_type), be16_to_cpu(severity),
+                        be64_to_cpu(frozen_pe_no), hose->global_number);
+               switch (be16_to_cpu(err_type)) {
                case OPAL_EEH_IOC_ERROR:
-                       if (severity == OPAL_EEH_SEV_IOC_DEAD) {
+                       if (be16_to_cpu(severity) == OPAL_EEH_SEV_IOC_DEAD) {
                                pr_err("EEH: dead IOC detected\n");
                                ret = EEH_NEXT_ERR_DEAD_IOC;
-                       } else if (severity == OPAL_EEH_SEV_INF) {
+                       } else if (be16_to_cpu(severity) == OPAL_EEH_SEV_INF) {
                                pr_info("EEH: IOC informative error "
                                        "detected\n");
                                ioda_eeh_hub_diag(hose);
@@ -771,20 +772,26 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
 
                        break;
                case OPAL_EEH_PHB_ERROR:
-                       if (severity == OPAL_EEH_SEV_PHB_DEAD) {
+                       if (be16_to_cpu(severity) == OPAL_EEH_SEV_PHB_DEAD) {
                                *pe = phb_pe;
-                               pr_err("EEH: dead PHB#%x detected\n",
-                                       hose->global_number);
+                               pr_err("EEH: dead PHB#%x detected, "
+                                      "location: %s\n",
+                                      hose->global_number,
+                                      eeh_pe_loc_get(phb_pe));
                                ret = EEH_NEXT_ERR_DEAD_PHB;
-                       } else if (severity == OPAL_EEH_SEV_PHB_FENCED) {
+                       } else if (be16_to_cpu(severity) ==
+                                               OPAL_EEH_SEV_PHB_FENCED) {
                                *pe = phb_pe;
-                               pr_err("EEH: fenced PHB#%x detected\n",
-                                       hose->global_number);
+                               pr_err("EEH: Fenced PHB#%x detected, "
+                                      "location: %s\n",
+                                      hose->global_number,
+                                      eeh_pe_loc_get(phb_pe));
                                ret = EEH_NEXT_ERR_FENCED_PHB;
-                       } else if (severity == OPAL_EEH_SEV_INF) {
+                       } else if (be16_to_cpu(severity) == OPAL_EEH_SEV_INF) {
                                pr_info("EEH: PHB#%x informative error "
-                                       "detected\n",
-                                       hose->global_number);
+                                       "detected, location: %s\n",
+                                       hose->global_number,
+                                       eeh_pe_loc_get(phb_pe));
                                ioda_eeh_phb_diag(hose);
                                ret = EEH_NEXT_ERR_NONE;
                        }
@@ -792,34 +799,33 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
                        break;
                case OPAL_EEH_PE_ERROR:
                        /*
-                        * If we can't find the corresponding PE, the
-                        * PEEV / PEST would be messy. So we force an
-                        * fenced PHB so that it can be recovered.
-                        *
-                        * If the PE has been marked as isolated, that
-                        * should have been removed permanently or in
-                        * progress with recovery. We needn't report
-                        * it again.
+                        * If we can't find the corresponding PE, we
+                        * just try to unfreeze.
                         */
-                       if (ioda_eeh_get_pe(hose, frozen_pe_no, pe)) {
-                               *pe = phb_pe;
-                               pr_err("EEH: Escalated fenced PHB#%x "
-                                      "detected for PE#%llx\n",
-                                       hose->global_number,
-                                       frozen_pe_no);
-                               ret = EEH_NEXT_ERR_FENCED_PHB;
+                       if (ioda_eeh_get_pe(hose,
+                                           be64_to_cpu(frozen_pe_no), pe)) {
+                               /* Try best to clear it */
+                               pr_info("EEH: Clear non-existing PHB#%x-PE#%llx\n",
+                                       hose->global_number, frozen_pe_no);
+                               pr_info("EEH: PHB location: %s\n",
+                                       eeh_pe_loc_get(phb_pe));
+                               opal_pci_eeh_freeze_clear(phb->opal_id, frozen_pe_no,
+                                       OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
+                               ret = EEH_NEXT_ERR_NONE;
                        } else if ((*pe)->state & EEH_PE_ISOLATED) {
                                ret = EEH_NEXT_ERR_NONE;
                        } else {
                                pr_err("EEH: Frozen PE#%x on PHB#%x detected\n",
                                        (*pe)->addr, (*pe)->phb->global_number);
+                               pr_err("EEH: PE location: %s, PHB location: %s\n",
+                                       eeh_pe_loc_get(*pe), eeh_pe_loc_get(phb_pe));
                                ret = EEH_NEXT_ERR_FROZEN_PE;
                        }
 
                        break;
                default:
                        pr_warn("%s: Unexpected error type %d\n",
-                               __func__, err_type);
+                               __func__, be16_to_cpu(err_type));
                }
 
                /*
@@ -836,6 +842,31 @@ static int ioda_eeh_next_error(struct eeh_pe **pe)
                        ioda_eeh_phb_diag(hose);
                }
 
+               /*
+                * We probably have the frozen parent PE out there and
+                * we need have to handle frozen parent PE firstly.
+                */
+               if (ret == EEH_NEXT_ERR_FROZEN_PE) {
+                       parent_pe = (*pe)->parent;
+                       while (parent_pe) {
+                               /* Hit the ceiling ? */
+                               if (parent_pe->type & EEH_PE_PHB)
+                                       break;
+
+                               /* Frozen parent PE ? */
+                               state = ioda_eeh_get_state(parent_pe);
+                               if (state > 0 &&
+                                   (state & active_flags) != active_flags)
+                                       *pe = parent_pe;
+
+                               /* Next parent level */
+                               parent_pe = parent_pe->parent;
+                       }
+
+                       /* We possibly migrate to another PE */
+                       eeh_pe_state_mark(*pe, EEH_PE_ISOLATED);
+               }
+
                /*
                 * If we have no errors on the specific PHB or only
                 * informative error there, we continue poking it.
index 1bb25b9525046f14abfa2e38c2db188b0686ff94..44ed78af1a0dd53bb9e33f16b3ce465ffc5c6f4f 100644 (file)
@@ -37,7 +37,8 @@ static ssize_t opal_msglog_read(struct file *file, struct kobject *kobj,
 {
        struct memcons *mc = bin_attr->private;
        const char *conbuf;
-       size_t ret, first_read = 0;
+       ssize_t ret;
+       size_t first_read = 0;
        uint32_t out_pos, avail;
 
        if (!mc)
@@ -69,6 +70,9 @@ static ssize_t opal_msglog_read(struct file *file, struct kobject *kobj,
                to += first_read;
                count -= first_read;
                pos -= avail;
+
+               if (count <= 0)
+                       goto out;
        }
 
        /* Sanity check. The firmware should not do this to us. */
index d202f9bc3683f5ad0072282173ddfb510b1aec9a..9d1acf22a099dfc1bf474f6244af11d1153742f6 100644 (file)
@@ -260,10 +260,10 @@ void __init opal_sys_param_init(void)
                        attr[i].kobj_attr.attr.mode = S_IRUGO;
                        break;
                case OPAL_SYSPARAM_WRITE:
-                       attr[i].kobj_attr.attr.mode = S_IWUGO;
+                       attr[i].kobj_attr.attr.mode = S_IWUSR;
                        break;
                case OPAL_SYSPARAM_RW:
-                       attr[i].kobj_attr.attr.mode = S_IRUGO | S_IWUGO;
+                       attr[i].kobj_attr.attr.mode = S_IRUGO | S_IWUSR;
                        break;
                default:
                        break;
index eefbfcc3fd8c40a9d50b9839fb2292f723c7970d..f91a4e5d872e23adc5eacc274d8b07226ad000b0 100644 (file)
@@ -206,72 +206,91 @@ static void pnv_pci_dump_phb3_diag_data(struct pci_controller *hose,
 
        data = (struct OpalIoPhb3ErrorData*)common;
        pr_info("PHB3 PHB#%d Diag-data (Version: %d)\n",
-               hose->global_number, common->version);
+               hose->global_number, be32_to_cpu(common->version));
        if (data->brdgCtl)
                pr_info("brdgCtl:     %08x\n",
-                       data->brdgCtl);
+                       be32_to_cpu(data->brdgCtl));
        if (data->portStatusReg || data->rootCmplxStatus ||
            data->busAgentStatus)
                pr_info("UtlSts:      %08x %08x %08x\n",
-                       data->portStatusReg, data->rootCmplxStatus,
-                       data->busAgentStatus);
+                       be32_to_cpu(data->portStatusReg),
+                       be32_to_cpu(data->rootCmplxStatus),
+                       be32_to_cpu(data->busAgentStatus));
        if (data->deviceStatus || data->slotStatus   ||
            data->linkStatus   || data->devCmdStatus ||
            data->devSecStatus)
                pr_info("RootSts:     %08x %08x %08x %08x %08x\n",
-                       data->deviceStatus, data->slotStatus,
-                       data->linkStatus, data->devCmdStatus,
-                       data->devSecStatus);
+                       be32_to_cpu(data->deviceStatus),
+                       be32_to_cpu(data->slotStatus),
+                       be32_to_cpu(data->linkStatus),
+                       be32_to_cpu(data->devCmdStatus),
+                       be32_to_cpu(data->devSecStatus));
        if (data->rootErrorStatus || data->uncorrErrorStatus ||
            data->corrErrorStatus)
                pr_info("RootErrSts:  %08x %08x %08x\n",
-                       data->rootErrorStatus, data->uncorrErrorStatus,
-                       data->corrErrorStatus);
+                       be32_to_cpu(data->rootErrorStatus),
+                       be32_to_cpu(data->uncorrErrorStatus),
+                       be32_to_cpu(data->corrErrorStatus));
        if (data->tlpHdr1 || data->tlpHdr2 ||
            data->tlpHdr3 || data->tlpHdr4)
                pr_info("RootErrLog:  %08x %08x %08x %08x\n",
-                       data->tlpHdr1, data->tlpHdr2,
-                       data->tlpHdr3, data->tlpHdr4);
+                       be32_to_cpu(data->tlpHdr1),
+                       be32_to_cpu(data->tlpHdr2),
+                       be32_to_cpu(data->tlpHdr3),
+                       be32_to_cpu(data->tlpHdr4));
        if (data->sourceId || data->errorClass ||
            data->correlator)
                pr_info("RootErrLog1: %08x %016llx %016llx\n",
-                       data->sourceId, data->errorClass,
-                       data->correlator);
+                       be32_to_cpu(data->sourceId),
+                       be64_to_cpu(data->errorClass),
+                       be64_to_cpu(data->correlator));
        if (data->nFir)
                pr_info("nFir:        %016llx %016llx %016llx\n",
-                       data->nFir, data->nFirMask,
-                       data->nFirWOF);
+                       be64_to_cpu(data->nFir),
+                       be64_to_cpu(data->nFirMask),
+                       be64_to_cpu(data->nFirWOF));
        if (data->phbPlssr || data->phbCsr)
                pr_info("PhbSts:      %016llx %016llx\n",
-                       data->phbPlssr, data->phbCsr);
+                       be64_to_cpu(data->phbPlssr),
+                       be64_to_cpu(data->phbCsr));
        if (data->lemFir)
                pr_info("Lem:         %016llx %016llx %016llx\n",
-                       data->lemFir, data->lemErrorMask,
-                       data->lemWOF);
+                       be64_to_cpu(data->lemFir),
+                       be64_to_cpu(data->lemErrorMask),
+                       be64_to_cpu(data->lemWOF));
        if (data->phbErrorStatus)
                pr_info("PhbErr:      %016llx %016llx %016llx %016llx\n",
-                       data->phbErrorStatus, data->phbFirstErrorStatus,
-                       data->phbErrorLog0, data->phbErrorLog1);
+                       be64_to_cpu(data->phbErrorStatus),
+                       be64_to_cpu(data->phbFirstErrorStatus),
+                       be64_to_cpu(data->phbErrorLog0),
+                       be64_to_cpu(data->phbErrorLog1));
        if (data->mmioErrorStatus)
                pr_info("OutErr:      %016llx %016llx %016llx %016llx\n",
-                       data->mmioErrorStatus, data->mmioFirstErrorStatus,
-                       data->mmioErrorLog0, data->mmioErrorLog1);
+                       be64_to_cpu(data->mmioErrorStatus),
+                       be64_to_cpu(data->mmioFirstErrorStatus),
+                       be64_to_cpu(data->mmioErrorLog0),
+                       be64_to_cpu(data->mmioErrorLog1));
        if (data->dma0ErrorStatus)
                pr_info("InAErr:      %016llx %016llx %016llx %016llx\n",
-                       data->dma0ErrorStatus, data->dma0FirstErrorStatus,
-                       data->dma0ErrorLog0, data->dma0ErrorLog1);
+                       be64_to_cpu(data->dma0ErrorStatus),
+                       be64_to_cpu(data->dma0FirstErrorStatus),
+                       be64_to_cpu(data->dma0ErrorLog0),
+                       be64_to_cpu(data->dma0ErrorLog1));
        if (data->dma1ErrorStatus)
                pr_info("InBErr:      %016llx %016llx %016llx %016llx\n",
-                       data->dma1ErrorStatus, data->dma1FirstErrorStatus,
-                       data->dma1ErrorLog0, data->dma1ErrorLog1);
+                       be64_to_cpu(data->dma1ErrorStatus),
+                       be64_to_cpu(data->dma1FirstErrorStatus),
+                       be64_to_cpu(data->dma1ErrorLog0),
+                       be64_to_cpu(data->dma1ErrorLog1));
 
        for (i = 0; i < OPAL_PHB3_NUM_PEST_REGS; i++) {
-               if ((data->pestA[i] >> 63) == 0 &&
-                   (data->pestB[i] >> 63) == 0)
+               if ((be64_to_cpu(data->pestA[i]) >> 63) == 0 &&
+                   (be64_to_cpu(data->pestB[i]) >> 63) == 0)
                        continue;
 
                pr_info("PE[%3d] A/B: %016llx %016llx\n",
-                       i, data->pestA[i], data->pestB[i]);
+                               i, be64_to_cpu(data->pestA[i]),
+                               be64_to_cpu(data->pestB[i]));
        }
 }
 
@@ -284,7 +303,7 @@ void pnv_pci_dump_phb_diag_data(struct pci_controller *hose,
                return;
 
        common = (struct OpalIoPhbErrorCommon *)log_buff;
-       switch (common->ioType) {
+       switch (be32_to_cpu(common->ioType)) {
        case OPAL_PHB_ERROR_DATA_TYPE_P7IOC:
                pnv_pci_dump_p7ioc_diag_data(hose, common);
                break;
@@ -293,7 +312,7 @@ void pnv_pci_dump_phb_diag_data(struct pci_controller *hose,
                break;
        default:
                pr_warn("%s: Unrecognized ioType %d\n",
-                       __func__, common->ioType);
+                       __func__, be32_to_cpu(common->ioType));
        }
 }
 
index 8c16a5f9672809fbbbc3bdfb934459f9d3d2ebb8..d9b88fa7c5a349f26c040b20dcf5e72a67de8860 100644 (file)
 #include <asm/rtas.h>
 #include <asm/opal.h>
 #include <asm/kexec.h>
+#include <asm/smp.h>
 
 #include "powernv.h"
 
 static void __init pnv_setup_arch(void)
 {
+       set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
+
        /* Initialize SMP */
        pnv_smp_init();
 
index 0062a43a2e0d8e96698cf0cb090adce0170b4581..5fcfcf44e3a9b949e6536ebcf53038645286fde6 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/opal.h>
 #include <asm/runlatch.h>
 #include <asm/code-patching.h>
+#include <asm/dbell.h>
 
 #include "powernv.h"
 
@@ -46,6 +47,11 @@ static void pnv_smp_setup_cpu(int cpu)
 {
        if (cpu != boot_cpuid)
                xics_setup_cpu();
+
+#ifdef CONFIG_PPC_DOORBELL
+       if (cpu_has_feature(CPU_FTR_DBELL))
+               doorbell_setup_this_cpu();
+#endif
 }
 
 int pnv_smp_kick_cpu(int nr)
index 2cb8b776c84a5660e5ef225cc004fbdcc9109f96..756b482f819a425a1dcd74bdfe0ab178f6b0617d 100644 (file)
@@ -21,6 +21,7 @@ config PPC_PSERIES
        select HAVE_CONTEXT_TRACKING
        select HOTPLUG_CPU if SMP
        select ARCH_RANDOM
+       select PPC_DOORBELL
        default y
 
 config PPC_SPLPAR
diff --git a/arch/powerpc/platforms/wsp/Kconfig b/arch/powerpc/platforms/wsp/Kconfig
deleted file mode 100644 (file)
index 422a175..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-config PPC_WSP
-       bool
-       select PPC_A2
-       select GENERIC_TBSYNC
-       select PPC_ICSWX
-       select PPC_SCOM
-       select PPC_XICS
-       select PPC_ICP_NATIVE
-       select PCI
-       select PPC_IO_WORKAROUNDS if PCI
-       select PPC_INDIRECT_PIO if PCI
-       default n
-
-menu "WSP platform selection"
-       depends on PPC_BOOK3E_64
-
-config PPC_PSR2
-       bool "PowerEN System Reference Platform 2"
-       select EPAPR_BOOT
-       select PPC_WSP
-       default y
-
-config PPC_CHROMA
-       bool "PowerEN PCIe Chroma Card"
-       select EPAPR_BOOT
-       select PPC_WSP
-       select OF_DYNAMIC
-       default y
-
-endmenu
diff --git a/arch/powerpc/platforms/wsp/Makefile b/arch/powerpc/platforms/wsp/Makefile
deleted file mode 100644 (file)
index 162fc60..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-ccflags-y                      += $(NO_MINIMAL_TOC)
-
-obj-y                          += setup.o ics.o wsp.o
-obj-$(CONFIG_PPC_PSR2)         += psr2.o
-obj-$(CONFIG_PPC_CHROMA)       += chroma.o h8.o
-obj-$(CONFIG_PPC_WSP)          += opb_pic.o
-obj-$(CONFIG_PPC_WSP)          += scom_wsp.o
-obj-$(CONFIG_SMP)              += smp.o scom_smp.o
-obj-$(CONFIG_PCI)              += wsp_pci.o
-obj-$(CONFIG_PCI_MSI)          += msi.o
diff --git a/arch/powerpc/platforms/wsp/chroma.c b/arch/powerpc/platforms/wsp/chroma.c
deleted file mode 100644 (file)
index aaa46b3..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2008-2011, IBM Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <linux/delay.h>
-#include <linux/init.h>
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/of.h>
-#include <linux/smp.h>
-#include <linux/time.h>
-#include <linux/of_fdt.h>
-
-#include <asm/machdep.h>
-#include <asm/udbg.h>
-
-#include "ics.h"
-#include "wsp.h"
-
-void __init chroma_setup_arch(void)
-{
-       wsp_setup_arch();
-       wsp_setup_h8();
-
-}
-
-static int __init chroma_probe(void)
-{
-       unsigned long root = of_get_flat_dt_root();
-
-       if (!of_flat_dt_is_compatible(root, "ibm,wsp-chroma"))
-               return 0;
-
-       return 1;
-}
-
-define_machine(chroma_md) {
-       .name                   = "Chroma PCIe",
-       .probe                  = chroma_probe,
-       .setup_arch             = chroma_setup_arch,
-       .restart                = wsp_h8_restart,
-       .power_off              = wsp_h8_power_off,
-       .halt                   = wsp_halt,
-       .calibrate_decr         = generic_calibrate_decr,
-       .init_IRQ               = wsp_setup_irq,
-       .progress               = udbg_progress,
-       .power_save             = book3e_idle,
-};
-
-machine_arch_initcall(chroma_md, wsp_probe_devices);
diff --git a/arch/powerpc/platforms/wsp/h8.c b/arch/powerpc/platforms/wsp/h8.c
deleted file mode 100644 (file)
index a3c87f3..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 2008-2011, IBM Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <linux/kernel.h>
-#include <linux/of.h>
-#include <linux/io.h>
-#include <linux/of_address.h>
-
-#include "wsp.h"
-
-/*
- * The UART connection to the H8 is over ttyS1 which is just a 16550.
- * We assume that FW has it setup right and no one messes with it.
- */
-
-
-static u8 __iomem *h8;
-
-#define RBR 0          /* Receiver Buffer Register */
-#define THR 0          /* Transmitter Holding Register */
-#define LSR 5          /* Line Status Register */
-#define LSR_DR 0x01    /* LSR value for Data-Ready */
-#define LSR_THRE 0x20  /* LSR value for Transmitter-Holding-Register-Empty */
-static void wsp_h8_putc(int c)
-{
-       u8 lsr;
-
-       do {
-               lsr = readb(h8 + LSR);
-       } while ((lsr & LSR_THRE) != LSR_THRE);
-       writeb(c, h8 + THR);
-}
-
-static int wsp_h8_getc(void)
-{
-       u8 lsr;
-
-       do {
-               lsr = readb(h8 + LSR);
-       } while ((lsr & LSR_DR) != LSR_DR);
-
-       return readb(h8 + RBR);
-}
-
-static void wsp_h8_puts(const char *s, int sz)
-{
-       int i;
-
-       for (i = 0; i < sz; i++) {
-               wsp_h8_putc(s[i]);
-
-               /* no flow control so wait for echo */
-               wsp_h8_getc();
-       }
-       wsp_h8_putc('\r');
-       wsp_h8_putc('\n');
-}
-
-static void wsp_h8_terminal_cmd(const char *cmd, int sz)
-{
-       hard_irq_disable();
-       wsp_h8_puts(cmd, sz);
-       /* should never return, but just in case */
-       for (;;)
-               continue;
-}
-
-
-void wsp_h8_restart(char *cmd)
-{
-       static const char restart[] = "warm-reset";
-
-       (void)cmd;
-       wsp_h8_terminal_cmd(restart, sizeof(restart) - 1);
-}
-
-void wsp_h8_power_off(void)
-{
-       static const char off[] = "power-off";
-
-       wsp_h8_terminal_cmd(off, sizeof(off) - 1);
-}
-
-static void __iomem *wsp_h8_getaddr(void)
-{
-       struct device_node *aliases;
-       struct device_node *uart;
-       struct property *path;
-       void __iomem *va = NULL;
-
-       /*
-        * there is nothing in the devtree to tell us which is mapped
-        * to the H8, but se know it is the second serial port.
-        */
-
-       aliases = of_find_node_by_path("/aliases");
-       if (aliases == NULL)
-               return NULL;
-
-       path = of_find_property(aliases, "serial1", NULL);
-       if (path == NULL)
-               goto out;
-
-       uart = of_find_node_by_path(path->value);
-       if (uart == NULL)
-               goto out;
-
-       va = of_iomap(uart, 0);
-
-       /* remove it so no one messes with it */
-       of_detach_node(uart);
-       of_node_put(uart);
-
-out:
-       of_node_put(aliases);
-
-       return va;
-}
-
-void __init wsp_setup_h8(void)
-{
-       h8 = wsp_h8_getaddr();
-
-       /* Devtree change? lets hard map it anyway */
-       if (h8 == NULL) {
-               pr_warn("UART to H8 could not be found");
-               h8 = ioremap(0xffc0008000ULL, 0x100);
-       }
-}
diff --git a/arch/powerpc/platforms/wsp/ics.c b/arch/powerpc/platforms/wsp/ics.c
deleted file mode 100644 (file)
index 9cd92e6..0000000
+++ /dev/null
@@ -1,762 +0,0 @@
-/*
- * Copyright 2008-2011 IBM Corporation.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU General Public License
- *  as published by the Free Software Foundation; either version
- *  2 of the License, or (at your option) any later version.
- */
-
-#include <linux/cpu.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/kernel.h>
-#include <linux/msi.h>
-#include <linux/of.h>
-#include <linux/slab.h>
-#include <linux/smp.h>
-#include <linux/spinlock.h>
-#include <linux/types.h>
-#include <linux/of_address.h>
-#include <linux/of_irq.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/xics.h>
-
-#include "wsp.h"
-#include "ics.h"
-
-
-/* WSP ICS */
-
-struct wsp_ics {
-       struct ics ics;
-       struct device_node *dn;
-       void __iomem *regs;
-       spinlock_t lock;
-       unsigned long *bitmap;
-       u32 chip_id;
-       u32 lsi_base;
-       u32 lsi_count;
-       u64 hwirq_start;
-       u64 count;
-#ifdef CONFIG_SMP
-       int *hwirq_cpu_map;
-#endif
-};
-
-#define to_wsp_ics(ics)        container_of(ics, struct wsp_ics, ics)
-
-#define INT_SRC_LAYER_BUID_REG(base)   ((base) + 0x00)
-#define IODA_TBL_ADDR_REG(base)                ((base) + 0x18)
-#define IODA_TBL_DATA_REG(base)                ((base) + 0x20)
-#define XIVE_UPDATE_REG(base)          ((base) + 0x28)
-#define ICS_INT_CAPS_REG(base)         ((base) + 0x30)
-
-#define TBL_AUTO_INCREMENT     ((1UL << 63) | (1UL << 15))
-#define TBL_SELECT_XIST                (1UL << 48)
-#define TBL_SELECT_XIVT                (1UL << 49)
-
-#define IODA_IRQ(irq)          ((irq) & (0x7FFULL))    /* HRM 5.1.3.4 */
-
-#define XIST_REQUIRED          0x8
-#define XIST_REJECTED          0x4
-#define XIST_PRESENTED         0x2
-#define XIST_PENDING           0x1
-
-#define XIVE_SERVER_SHIFT      42
-#define XIVE_SERVER_MASK       0xFFFFULL
-#define XIVE_PRIORITY_MASK     0xFFULL
-#define XIVE_PRIORITY_SHIFT    32
-#define XIVE_WRITE_ENABLE      (1ULL << 63)
-
-/*
- * The docs refer to a 6 bit field called ChipID, which consists of a
- * 3 bit NodeID and a 3 bit ChipID. On WSP the ChipID is always zero
- * so we ignore it, and every where we use "chip id" in this code we
- * mean the NodeID.
- */
-#define WSP_ICS_CHIP_SHIFT             17
-
-
-static struct wsp_ics *ics_list;
-static int num_ics;
-
-/* ICS Source controller accessors */
-
-static u64 wsp_ics_get_xive(struct wsp_ics *ics, unsigned int irq)
-{
-       unsigned long flags;
-       u64 xive;
-
-       spin_lock_irqsave(&ics->lock, flags);
-       out_be64(IODA_TBL_ADDR_REG(ics->regs), TBL_SELECT_XIVT | IODA_IRQ(irq));
-       xive = in_be64(IODA_TBL_DATA_REG(ics->regs));
-       spin_unlock_irqrestore(&ics->lock, flags);
-
-       return xive;
-}
-
-static void wsp_ics_set_xive(struct wsp_ics *ics, unsigned int irq, u64 xive)
-{
-       xive &= ~XIVE_ADDR_MASK;
-       xive |= (irq & XIVE_ADDR_MASK);
-       xive |= XIVE_WRITE_ENABLE;
-
-       out_be64(XIVE_UPDATE_REG(ics->regs), xive);
-}
-
-static u64 xive_set_server(u64 xive, unsigned int server)
-{
-       u64 mask = ~(XIVE_SERVER_MASK << XIVE_SERVER_SHIFT);
-
-       xive &= mask;
-       xive |= (server & XIVE_SERVER_MASK) << XIVE_SERVER_SHIFT;
-
-       return xive;
-}
-
-static u64 xive_set_priority(u64 xive, unsigned int priority)
-{
-       u64 mask = ~(XIVE_PRIORITY_MASK << XIVE_PRIORITY_SHIFT);
-
-       xive &= mask;
-       xive |= (priority & XIVE_PRIORITY_MASK) << XIVE_PRIORITY_SHIFT;
-
-       return xive;
-}
-
-
-#ifdef CONFIG_SMP
-/* Find logical CPUs within mask on a given chip and store result in ret */
-void cpus_on_chip(int chip_id, cpumask_t *mask, cpumask_t *ret)
-{
-       int cpu, chip;
-       struct device_node *cpu_dn, *dn;
-       const u32 *prop;
-
-       cpumask_clear(ret);
-       for_each_cpu(cpu, mask) {
-               cpu_dn = of_get_cpu_node(cpu, NULL);
-               if (!cpu_dn)
-                       continue;
-
-               prop = of_get_property(cpu_dn, "at-node", NULL);
-               if (!prop) {
-                       of_node_put(cpu_dn);
-                       continue;
-               }
-
-               dn = of_find_node_by_phandle(*prop);
-               of_node_put(cpu_dn);
-
-               chip = wsp_get_chip_id(dn);
-               if (chip == chip_id)
-                       cpumask_set_cpu(cpu, ret);
-
-               of_node_put(dn);
-       }
-}
-
-/* Store a suitable CPU to handle a hwirq in the ics->hwirq_cpu_map cache */
-static int cache_hwirq_map(struct wsp_ics *ics, unsigned int hwirq,
-                          const cpumask_t *affinity)
-{
-       cpumask_var_t avail, newmask;
-       int ret = -ENOMEM, cpu, cpu_rover = 0, target;
-       int index = hwirq - ics->hwirq_start;
-       unsigned int nodeid;
-
-       BUG_ON(index < 0 || index >= ics->count);
-
-       if (!ics->hwirq_cpu_map)
-               return -ENOMEM;
-
-       if (!distribute_irqs) {
-               ics->hwirq_cpu_map[hwirq - ics->hwirq_start] = xics_default_server;
-               return 0;
-       }
-
-       /* Allocate needed CPU masks */
-       if (!alloc_cpumask_var(&avail, GFP_KERNEL))
-               goto ret;
-       if (!alloc_cpumask_var(&newmask, GFP_KERNEL))
-               goto freeavail;
-
-       /* Find PBus attached to the source of this IRQ */
-       nodeid = (hwirq >> WSP_ICS_CHIP_SHIFT) & 0x3; /* 12:14 */
-
-       /* Find CPUs that could handle this IRQ */
-       if (affinity)
-               cpumask_and(avail, cpu_online_mask, affinity);
-       else
-               cpumask_copy(avail, cpu_online_mask);
-
-       /* Narrow selection down to logical CPUs on the same chip */
-       cpus_on_chip(nodeid, avail, newmask);
-
-       /* Ensure we haven't narrowed it down to 0 */
-       if (unlikely(cpumask_empty(newmask))) {
-               if (unlikely(cpumask_empty(avail))) {
-                       ret = -1;
-                       goto out;
-               }
-               cpumask_copy(newmask, avail);
-       }
-
-       /* Choose a CPU out of those we narrowed it down to in round robin */
-       target = hwirq % cpumask_weight(newmask);
-       for_each_cpu(cpu, newmask) {
-               if (cpu_rover++ >= target) {
-                       ics->hwirq_cpu_map[index] = get_hard_smp_processor_id(cpu);
-                       ret = 0;
-                       goto out;
-               }
-       }
-
-       /* Shouldn't happen */
-       WARN_ON(1);
-
-out:
-       free_cpumask_var(newmask);
-freeavail:
-       free_cpumask_var(avail);
-ret:
-       if (ret < 0) {
-               ics->hwirq_cpu_map[index] = cpumask_first(cpu_online_mask);
-               pr_warning("Error, falling hwirq 0x%x routing back to CPU %i\n",
-                          hwirq, ics->hwirq_cpu_map[index]);
-       }
-       return ret;
-}
-
-static void alloc_irq_map(struct wsp_ics *ics)
-{
-       int i;
-
-       ics->hwirq_cpu_map = kmalloc(sizeof(int) * ics->count, GFP_KERNEL);
-       if (!ics->hwirq_cpu_map) {
-               pr_warning("Allocate hwirq_cpu_map failed, "
-                          "IRQ balancing disabled\n");
-               return;
-       }
-
-       for (i=0; i < ics->count; i++)
-               ics->hwirq_cpu_map[i] = xics_default_server;
-}
-
-static int get_irq_server(struct wsp_ics *ics, unsigned int hwirq)
-{
-       int index = hwirq - ics->hwirq_start;
-
-       BUG_ON(index < 0 || index >= ics->count);
-
-       if (!ics->hwirq_cpu_map)
-               return xics_default_server;
-
-       return ics->hwirq_cpu_map[index];
-}
-#else /* !CONFIG_SMP */
-static int cache_hwirq_map(struct wsp_ics *ics, unsigned int hwirq,
-                          const cpumask_t *affinity)
-{
-       return 0;
-}
-
-static int get_irq_server(struct wsp_ics *ics, unsigned int hwirq)
-{
-       return xics_default_server;
-}
-
-static void alloc_irq_map(struct wsp_ics *ics) { }
-#endif
-
-static void wsp_chip_unmask_irq(struct irq_data *d)
-{
-       unsigned int hw_irq = (unsigned int)irqd_to_hwirq(d);
-       struct wsp_ics *ics;
-       int server;
-       u64 xive;
-
-       if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS)
-               return;
-
-       ics = d->chip_data;
-       if (WARN_ON(!ics))
-               return;
-
-       server = get_irq_server(ics, hw_irq);
-
-       xive = wsp_ics_get_xive(ics, hw_irq);
-       xive = xive_set_server(xive, server);
-       xive = xive_set_priority(xive, DEFAULT_PRIORITY);
-       wsp_ics_set_xive(ics, hw_irq, xive);
-}
-
-static unsigned int wsp_chip_startup(struct irq_data *d)
-{
-       /* unmask it */
-       wsp_chip_unmask_irq(d);
-       return 0;
-}
-
-static void wsp_mask_real_irq(unsigned int hw_irq, struct wsp_ics *ics)
-{
-       u64 xive;
-
-       if (hw_irq == XICS_IPI)
-               return;
-
-       if (WARN_ON(!ics))
-               return;
-       xive = wsp_ics_get_xive(ics, hw_irq);
-       xive = xive_set_server(xive, xics_default_server);
-       xive = xive_set_priority(xive, LOWEST_PRIORITY);
-       wsp_ics_set_xive(ics, hw_irq, xive);
-}
-
-static void wsp_chip_mask_irq(struct irq_data *d)
-{
-       unsigned int hw_irq = (unsigned int)irqd_to_hwirq(d);
-       struct wsp_ics *ics = d->chip_data;
-
-       if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS)
-               return;
-
-       wsp_mask_real_irq(hw_irq, ics);
-}
-
-static int wsp_chip_set_affinity(struct irq_data *d,
-                                const struct cpumask *cpumask, bool force)
-{
-       unsigned int hw_irq = (unsigned int)irqd_to_hwirq(d);
-       struct wsp_ics *ics;
-       int ret;
-       u64 xive;
-
-       if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS)
-               return -1;
-
-       ics = d->chip_data;
-       if (WARN_ON(!ics))