Merge branch 'akpm' (patches from Andrew)
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Aug 2018 23:49:31 +0000 (16:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Aug 2018 23:49:31 +0000 (16:49 -0700)
Merge updates from Andrew Morton:

 - a few misc things

 - a few Y2038 fixes

 - ntfs fixes

 - arch/sh tweaks

 - ocfs2 updates

 - most of MM

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (111 commits)
  mm/hmm.c: remove unused variables align_start and align_end
  fs/userfaultfd.c: remove redundant pointer uwq
  mm, vmacache: hash addresses based on pmd
  mm/list_lru: introduce list_lru_shrink_walk_irq()
  mm/list_lru.c: pass struct list_lru_node* as an argument to __list_lru_walk_one()
  mm/list_lru.c: move locking from __list_lru_walk_one() to its caller
  mm/list_lru.c: use list_lru_walk_one() in list_lru_walk_node()
  mm, swap: make CONFIG_THP_SWAP depend on CONFIG_SWAP
  mm/sparse: delete old sparse_init and enable new one
  mm/sparse: add new sparse_init_nid() and sparse_init()
  mm/sparse: move buffer init/fini to the common place
  mm/sparse: use the new sparse buffer functions in non-vmemmap
  mm/sparse: abstract sparse buffer allocations
  mm/hugetlb.c: don't zero 1GiB bootmem pages
  mm, page_alloc: double zone's batchsize
  mm/oom_kill.c: document oom_lock
  mm/hugetlb: remove gigantic page support for HIGHMEM
  mm, oom: remove sleep from under oom_lock
  kernel/dma: remove unsupported gfp_mask parameter from dma_alloc_from_contiguous()
  mm/cma: remove unsupported gfp_mask parameter from cma_alloc()
  ...

711 files changed:
.mailmap
Documentation/ABI/testing/ppc-memtrace
Documentation/admin-guide/kernel-parameters.txt
Documentation/device-mapper/delay.txt
Documentation/device-mapper/dm-integrity.txt
Documentation/device-mapper/thin-provisioning.txt
Documentation/hwmon/ibmpowernv
Documentation/powerpc/DAWR-POWER9.txt [new file with mode: 0644]
Documentation/powerpc/transactional_memory.txt
MAINTAINERS
arch/arm/include/asm/module.h
arch/arm64/kernel/jump_label.c
arch/arm64/mm/init.c
arch/m68k/configs/mac_defconfig
arch/m68k/configs/multi_defconfig
arch/m68k/mac/config.c
arch/m68k/mac/misc.c
arch/powerpc/Kconfig
arch/powerpc/Makefile
arch/powerpc/boot/Makefile
arch/powerpc/boot/dts/ac14xx.dts
arch/powerpc/boot/dts/fsl/kmcent2.dts
arch/powerpc/boot/dts/fsl/t2080rdb.dts
arch/powerpc/boot/dts/fsl/t4240rdb.dts
arch/powerpc/boot/dts/pdm360ng.dts
arch/powerpc/configs/book3s_32.config [new file with mode: 0644]
arch/powerpc/configs/dpaa.config
arch/powerpc/crypto/md5-asm.S
arch/powerpc/crypto/sha1-powerpc-asm.S
arch/powerpc/include/asm/asm-405.h [new file with mode: 0644]
arch/powerpc/include/asm/asm-compat.h
arch/powerpc/include/asm/asm-const.h [new file with mode: 0644]
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/include/asm/atomic.h
arch/powerpc/include/asm/barrier.h
arch/powerpc/include/asm/bitops.h
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/include/asm/book3s/32/tlbflush.h [new file with mode: 0644]
arch/powerpc/include/asm/book3s/64/hash-64k.h
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/include/asm/book3s/64/hugetlb.h
arch/powerpc/include/asm/book3s/64/mmu-hash.h
arch/powerpc/include/asm/book3s/64/pgalloc.h
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/include/asm/book3s/64/radix.h
arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
arch/powerpc/include/asm/book3s/tlbflush.h [new file with mode: 0644]
arch/powerpc/include/asm/cacheflush.h
arch/powerpc/include/asm/cmpxchg.h
arch/powerpc/include/asm/code-patching-asm.h [new file with mode: 0644]
arch/powerpc/include/asm/code-patching.h
arch/powerpc/include/asm/cpuidle.h
arch/powerpc/include/asm/cputable.h
arch/powerpc/include/asm/cputime.h
arch/powerpc/include/asm/dbell.h
arch/powerpc/include/asm/dcr-native.h
arch/powerpc/include/asm/debug.h
arch/powerpc/include/asm/dt_cpu_ftrs.h
arch/powerpc/include/asm/eeh.h
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/fadump.h
arch/powerpc/include/asm/feature-fixups.h
arch/powerpc/include/asm/firmware.h
arch/powerpc/include/asm/fixmap.h
arch/powerpc/include/asm/futex.h
arch/powerpc/include/asm/head-64.h
arch/powerpc/include/asm/highmem.h
arch/powerpc/include/asm/hugetlb.h
arch/powerpc/include/asm/hvcall.h
arch/powerpc/include/asm/hw_breakpoint.h
arch/powerpc/include/asm/hw_irq.h
arch/powerpc/include/asm/iommu.h
arch/powerpc/include/asm/jump_label.h
arch/powerpc/include/asm/kvm_booke_hv_asm.h
arch/powerpc/include/asm/mmu-44x.h
arch/powerpc/include/asm/mmu.h
arch/powerpc/include/asm/nohash/32/pgtable.h
arch/powerpc/include/asm/nohash/64/pgtable.h
arch/powerpc/include/asm/nohash/tlbflush.h [new file with mode: 0644]
arch/powerpc/include/asm/opal-api.h
arch/powerpc/include/asm/opal.h
arch/powerpc/include/asm/paca.h
arch/powerpc/include/asm/page.h
arch/powerpc/include/asm/page_64.h
arch/powerpc/include/asm/pkeys.h
arch/powerpc/include/asm/pnv-pci.h
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/include/asm/processor.h
arch/powerpc/include/asm/ptrace.h
arch/powerpc/include/asm/reg.h
arch/powerpc/include/asm/reg_a2.h
arch/powerpc/include/asm/reg_fsl_emb.h
arch/powerpc/include/asm/security_features.h
arch/powerpc/include/asm/setup.h
arch/powerpc/include/asm/smp.h
arch/powerpc/include/asm/sparsemem.h
arch/powerpc/include/asm/spinlock.h
arch/powerpc/include/asm/stacktrace.h [new file with mode: 0644]
arch/powerpc/include/asm/string.h
arch/powerpc/include/asm/synch.h
arch/powerpc/include/asm/thread_info.h
arch/powerpc/include/asm/tlb.h
arch/powerpc/include/asm/tlbflush.h
arch/powerpc/include/asm/uaccess.h
arch/powerpc/include/asm/xive.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/cpu_setup_6xx.S
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/crash.c
arch/powerpc/kernel/dt_cpu_ftrs.c
arch/powerpc/kernel/eeh.c
arch/powerpc/kernel/entry_32.S
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/fadump.c
arch/powerpc/kernel/fpu.S
arch/powerpc/kernel/head_32.S
arch/powerpc/kernel/head_40x.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/head_8xx.S
arch/powerpc/kernel/head_fsl_booke.S
arch/powerpc/kernel/idle_6xx.S
arch/powerpc/kernel/idle_book3e.S
arch/powerpc/kernel/idle_book3s.S
arch/powerpc/kernel/idle_e500.S
arch/powerpc/kernel/idle_power4.S
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/kvm_emul.S
arch/powerpc/kernel/l2cr_6xx.S
arch/powerpc/kernel/machine_kexec.c
arch/powerpc/kernel/machine_kexec_file_64.c
arch/powerpc/kernel/mce_power.c
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/module.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/ppc_save_regs.S
arch/powerpc/kernel/process.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/security.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/swsusp_32.S
arch/powerpc/kernel/swsusp_asm64.S
arch/powerpc/kernel/tm.S
arch/powerpc/kernel/traps.c
arch/powerpc/kernel/vdso.c
arch/powerpc/kernel/vector.S
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/kernel/watchdog.c
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s_32_mmu.c
arch/powerpc/kvm/book3s_64_mmu.c
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_mmu_radix.c
arch/powerpc/kvm/book3s_64_slb.S
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_64_vio_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_interrupts.S
arch/powerpc/kvm/book3s_hv_rm_mmu.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/book3s_interrupts.S
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/book3s_rmhandlers.S
arch/powerpc/kvm/book3s_segment.S
arch/powerpc/kvm/book3s_xive_template.c
arch/powerpc/kvm/e500.c
arch/powerpc/kvm/e500mc.c
arch/powerpc/kvm/powerpc.c
arch/powerpc/lib/Makefile
arch/powerpc/lib/code-patching.c
arch/powerpc/lib/copy_32.S
arch/powerpc/lib/copypage_64.S
arch/powerpc/lib/copypage_power7.S
arch/powerpc/lib/copyuser_64.S
arch/powerpc/lib/copyuser_power7.S
arch/powerpc/lib/feature-fixups-test.S
arch/powerpc/lib/feature-fixups.c
arch/powerpc/lib/hweight_64.S
arch/powerpc/lib/ldstfp.S
arch/powerpc/lib/locks.c
arch/powerpc/lib/memcmp_64.S
arch/powerpc/lib/memcpy_64.S
arch/powerpc/lib/memcpy_power7.S
arch/powerpc/lib/strlen_32.S [new file with mode: 0644]
arch/powerpc/lib/vmx-helper.c
arch/powerpc/mm/44x_mmu.c
arch/powerpc/mm/Makefile
arch/powerpc/mm/dump_hashpagetable.c
arch/powerpc/mm/fault.c
arch/powerpc/mm/hash64_4k.c
arch/powerpc/mm/hash64_64k.c
arch/powerpc/mm/hash_low_32.S
arch/powerpc/mm/hash_native_64.c
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/highmem.c
arch/powerpc/mm/hugepage-hash64.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/mmu_context_book3s64.c
arch/powerpc/mm/mmu_context_hash32.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/pgtable-book3s64.c
arch/powerpc/mm/pgtable-radix.c
arch/powerpc/mm/pkeys.c
arch/powerpc/mm/slb.c
arch/powerpc/mm/slb_low.S
arch/powerpc/mm/subpage-prot.c
arch/powerpc/mm/tlb-radix.c
arch/powerpc/mm/tlb_low_64e.S
arch/powerpc/mm/tlb_nohash_low.S
arch/powerpc/net/Makefile
arch/powerpc/net/bpf_jit32.h
arch/powerpc/net/bpf_jit_asm.S
arch/powerpc/net/bpf_jit_comp.c
arch/powerpc/net/bpf_jit_comp64.c
arch/powerpc/perf/core-book3s.c
arch/powerpc/perf/imc-pmu.c
arch/powerpc/perf/isa207-common.c
arch/powerpc/perf/isa207-common.h
arch/powerpc/perf/power9-pmu.c
arch/powerpc/perf/req-gen/_begin.h
arch/powerpc/perf/req-gen/perf.h
arch/powerpc/platforms/4xx/msi.c
arch/powerpc/platforms/52xx/Makefile
arch/powerpc/platforms/52xx/mpc52xx_pm.c
arch/powerpc/platforms/85xx/t1042rdb_diu.c
arch/powerpc/platforms/Kconfig.cputype
arch/powerpc/platforms/cell/Makefile
arch/powerpc/platforms/cell/cbe_thermal.c
arch/powerpc/platforms/cell/spufs/sputrace.h
arch/powerpc/platforms/chrp/nvram.c
arch/powerpc/platforms/embedded6xx/wii.c
arch/powerpc/platforms/pasemi/dma_lib.c
arch/powerpc/platforms/pasemi/gpio_mdio.c
arch/powerpc/platforms/pasemi/idle.c
arch/powerpc/platforms/pasemi/iommu.c
arch/powerpc/platforms/pasemi/misc.c
arch/powerpc/platforms/pasemi/pci.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/platforms/powermac/cache.S
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/powermac/sleep.S
arch/powerpc/platforms/powermac/time.c
arch/powerpc/platforms/powermac/udbg_scc.c
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/eeh-powernv.c
arch/powerpc/platforms/powernv/idle.c
arch/powerpc/platforms/powernv/memtrace.c
arch/powerpc/platforms/powernv/npu-dma.c
arch/powerpc/platforms/powernv/opal-dump.c
arch/powerpc/platforms/powernv/opal-irqchip.c
arch/powerpc/platforms/powernv/opal-kmsg.c
arch/powerpc/platforms/powernv/opal-sensor-groups.c
arch/powerpc/platforms/powernv/opal-wrappers.S
arch/powerpc/platforms/powernv/opal.c
arch/powerpc/platforms/powernv/pci-cxl.c
arch/powerpc/platforms/powernv/pci-ioda-tce.c [new file with mode: 0644]
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/platforms/powernv/pci.h
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/powernv/smp.c
arch/powerpc/platforms/powernv/vas.h
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/hvCall.S
arch/powerpc/platforms/pseries/kexec.c
arch/powerpc/platforms/pseries/lpar.c
arch/powerpc/platforms/pseries/mobility.c
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/purgatory/trampoline.S
arch/powerpc/sysdev/Makefile
arch/powerpc/sysdev/cpm1.c
arch/powerpc/sysdev/fsl_mpic_err.c
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/mpic_msgr.c
arch/powerpc/sysdev/msi_bitmap.c
arch/powerpc/sysdev/xive/common.c
arch/powerpc/sysdev/xive/native.c
arch/powerpc/tools/checkpatch.sh [new file with mode: 0755]
arch/powerpc/xmon/spr_access.S
arch/powerpc/xmon/xmon.c
arch/x86/include/asm/pgtable-invert.h
drivers/bus/imx-weim.c
drivers/cpufreq/powernv-cpufreq.c
drivers/cpuidle/cpuidle-powernv.c
drivers/crypto/nx/nx-842-powernv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c
drivers/gpu/drm/amd/display/dc/inc/resource.h
drivers/gpu/drm/i2c/tda9950.c
drivers/gpu/drm/i915/gvt/aperture_gm.c
drivers/gpu/drm/i915/gvt/cmd_parser.c
drivers/gpu/drm/i915/gvt/gvt.c
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/kvmgt.c
drivers/gpu/drm/i915/gvt/scheduler.c
drivers/gpu/drm/i915/gvt/scheduler.h
drivers/gpu/drm/i915/gvt/vgpu.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_uncore.c
drivers/gpu/drm/i915/intel_uncore.h
drivers/gpu/drm/i915/selftests/i915_gem_object.c
drivers/gpu/drm/i915/selftests/intel_uncore.c
drivers/gpu/drm/msm/Makefile
drivers/gpu/drm/msm/adreno/a2xx.xml.h
drivers/gpu/drm/msm/adreno/a3xx.xml.h
drivers/gpu/drm/msm/adreno/a4xx.xml.h
drivers/gpu/drm/msm/adreno/a5xx.xml.h
drivers/gpu/drm/msm/adreno/a5xx_gpu.c
drivers/gpu/drm/msm/adreno/a6xx.xml.h [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/a6xx_gmu.c [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/a6xx_gmu.h [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/a6xx_gpu.c [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/a6xx_gpu.h [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/a6xx_hfi.c [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/a6xx_hfi.h [new file with mode: 0644]
drivers/gpu/drm/msm/adreno/adreno_common.xml.h
drivers/gpu/drm/msm/adreno/adreno_device.c
drivers/gpu/drm/msm/adreno/adreno_gpu.c
drivers/gpu/drm/msm/adreno/adreno_gpu.h
drivers/gpu/drm/msm/adreno/adreno_pm4.xml.h
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_power_handle.c
drivers/gpu/drm/msm/disp/mdp4/mdp4.xml.h
drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h
drivers/gpu/drm/msm/disp/mdp_common.xml.h
drivers/gpu/drm/msm/dsi/dsi.xml.h
drivers/gpu/drm/msm/dsi/mmss_cc.xml.h
drivers/gpu/drm/msm/dsi/sfpb.xml.h
drivers/gpu/drm/msm/edp/edp.xml.h
drivers/gpu/drm/msm/hdmi/hdmi.xml.h
drivers/gpu/drm/msm/hdmi/qfprom.xml.h
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/msm/msm_gpu.h
drivers/hwmon/ibmpowernv.c
drivers/infiniband/Kconfig
drivers/infiniband/core/Makefile
drivers/infiniband/core/addr.c
drivers/infiniband/core/cache.c
drivers/infiniband/core/cm.c
drivers/infiniband/core/cm_msgs.h
drivers/infiniband/core/cma.c
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/device.c
drivers/infiniband/core/mad.c
drivers/infiniband/core/mad_priv.h
drivers/infiniband/core/multicast.c
drivers/infiniband/core/nldev.c
drivers/infiniband/core/rdma_core.c
drivers/infiniband/core/rdma_core.h
drivers/infiniband/core/roce_gid_mgmt.c
drivers/infiniband/core/rw.c
drivers/infiniband/core/sa_query.c
drivers/infiniband/core/sysfs.c
drivers/infiniband/core/ucm.c
drivers/infiniband/core/umem.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_ioctl.c
drivers/infiniband/core/uverbs_ioctl_merge.c [deleted file]
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/core/uverbs_marshall.c
drivers/infiniband/core/uverbs_std_types.c
drivers/infiniband/core/uverbs_std_types_counters.c
drivers/infiniband/core/uverbs_std_types_cq.c
drivers/infiniband/core/uverbs_std_types_dm.c
drivers/infiniband/core/uverbs_std_types_flow_action.c
drivers/infiniband/core/uverbs_std_types_mr.c
drivers/infiniband/core/uverbs_uapi.c [new file with mode: 0644]
drivers/infiniband/core/verbs.c
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/ib_verbs.h
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_sp.c
drivers/infiniband/hw/cxgb3/iwch_cq.c
drivers/infiniband/hw/cxgb3/iwch_provider.c
drivers/infiniband/hw/cxgb3/iwch_provider.h
drivers/infiniband/hw/cxgb3/iwch_qp.c
drivers/infiniband/hw/cxgb4/cm.c
drivers/infiniband/hw/cxgb4/cq.c
drivers/infiniband/hw/cxgb4/device.c
drivers/infiniband/hw/cxgb4/ev.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/provider.c
drivers/infiniband/hw/cxgb4/qp.c
drivers/infiniband/hw/cxgb4/resource.c
drivers/infiniband/hw/cxgb4/t4.h
drivers/infiniband/hw/cxgb4/t4fw_ri_api.h
drivers/infiniband/hw/hfi1/chip.c
drivers/infiniband/hw/hfi1/chip.h
drivers/infiniband/hw/hfi1/driver.c
drivers/infiniband/hw/hfi1/file_ops.c
drivers/infiniband/hw/hfi1/hfi.h
drivers/infiniband/hw/hfi1/init.c
drivers/infiniband/hw/hfi1/pcie.c
drivers/infiniband/hw/hfi1/pio.c
drivers/infiniband/hw/hfi1/qp.c
drivers/infiniband/hw/hfi1/qp.h
drivers/infiniband/hw/hfi1/rc.c
drivers/infiniband/hw/hfi1/ruc.c
drivers/infiniband/hw/hfi1/sdma.c
drivers/infiniband/hw/hfi1/verbs.c
drivers/infiniband/hw/hfi1/vnic_main.c
drivers/infiniband/hw/hns/hns_roce_ah.c
drivers/infiniband/hw/hns/hns_roce_common.h
drivers/infiniband/hw/hns/hns_roce_db.c
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hem.c
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
drivers/infiniband/hw/hns/hns_roce_hw_v1.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/hns/hns_roce_pd.c
drivers/infiniband/hw/hns/hns_roce_qp.c
drivers/infiniband/hw/i40iw/Kconfig
drivers/infiniband/hw/i40iw/i40iw_cm.c
drivers/infiniband/hw/i40iw/i40iw_hw.c
drivers/infiniband/hw/i40iw/i40iw_verbs.c
drivers/infiniband/hw/mlx4/ah.c
drivers/infiniband/hw/mlx4/mad.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/mlx4_ib.h
drivers/infiniband/hw/mlx4/qp.c
drivers/infiniband/hw/mlx4/srq.c
drivers/infiniband/hw/mlx5/Makefile
drivers/infiniband/hw/mlx5/ah.c
drivers/infiniband/hw/mlx5/cmd.c
drivers/infiniband/hw/mlx5/cmd.h
drivers/infiniband/hw/mlx5/cong.c
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/devx.c [new file with mode: 0644]
drivers/infiniband/hw/mlx5/flow.c [new file with mode: 0644]
drivers/infiniband/hw/mlx5/gsi.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/qp.c
drivers/infiniband/hw/mlx5/srq.c
drivers/infiniband/hw/mthca/mthca_av.c
drivers/infiniband/hw/mthca/mthca_dev.h
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/hw/mthca/mthca_qp.c
drivers/infiniband/hw/mthca/mthca_srq.c
drivers/infiniband/hw/nes/nes.h
drivers/infiniband/hw/nes/nes_cm.c
drivers/infiniband/hw/nes/nes_hw.c
drivers/infiniband/hw/nes/nes_verbs.c
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
drivers/infiniband/hw/ocrdma/ocrdma_ah.h
drivers/infiniband/hw/ocrdma/ocrdma_hw.c
drivers/infiniband/hw/ocrdma/ocrdma_main.c
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
drivers/infiniband/hw/ocrdma/ocrdma_verbs.h
drivers/infiniband/hw/qedr/main.c
drivers/infiniband/hw/qedr/qedr.h
drivers/infiniband/hw/qedr/qedr_hsi_rdma.h
drivers/infiniband/hw/qedr/qedr_iw_cm.c
drivers/infiniband/hw/qedr/qedr_roce_cm.c
drivers/infiniband/hw/qedr/qedr_roce_cm.h
drivers/infiniband/hw/qedr/verbs.c
drivers/infiniband/hw/qedr/verbs.h
drivers/infiniband/hw/qib/qib_verbs.c
drivers/infiniband/hw/qib/qib_verbs.h
drivers/infiniband/hw/usnic/Kconfig
drivers/infiniband/hw/usnic/usnic_fwd.c
drivers/infiniband/hw/usnic/usnic_fwd.h
drivers/infiniband/hw/usnic/usnic_ib_verbs.c
drivers/infiniband/hw/usnic/usnic_ib_verbs.h
drivers/infiniband/hw/usnic/usnic_uiom.c
drivers/infiniband/hw/usnic/usnic_uiom.h
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h
drivers/infiniband/sw/rdmavt/ah.c
drivers/infiniband/sw/rdmavt/qp.c
drivers/infiniband/sw/rdmavt/qp.h
drivers/infiniband/sw/rdmavt/srq.c
drivers/infiniband/sw/rxe/rxe.c
drivers/infiniband/sw/rxe/rxe_av.c
drivers/infiniband/sw/rxe/rxe_comp.c
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_net.c
drivers/infiniband/sw/rxe/rxe_param.h
drivers/infiniband/sw/rxe/rxe_qp.c
drivers/infiniband/sw/rxe/rxe_recv.c
drivers/infiniband/sw/rxe/rxe_resp.c
drivers/infiniband/sw/rxe/rxe_verbs.c
drivers/infiniband/ulp/ipoib/ipoib.h
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
drivers/infiniband/ulp/ipoib/ipoib_fs.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
drivers/infiniband/ulp/ipoib/ipoib_netlink.c
drivers/infiniband/ulp/ipoib/ipoib_verbs.c
drivers/infiniband/ulp/ipoib/ipoib_vlan.c
drivers/infiniband/ulp/iser/iscsi_iser.c
drivers/infiniband/ulp/iser/iser_memory.c
drivers/infiniband/ulp/iser/iser_verbs.c
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h
drivers/macintosh/Kconfig
drivers/macintosh/Makefile
drivers/macintosh/adb.c
drivers/macintosh/via-pmu.c
drivers/macintosh/via-pmu68k.c [deleted file]
drivers/md/dm-cache-metadata.c
drivers/md/dm-cache-target.c
drivers/md/dm-crypt.c
drivers/md/dm-delay.c
drivers/md/dm-integrity.c
drivers/md/dm-kcopyd.c
drivers/md/dm-raid1.c
drivers/md/dm-snap.c
drivers/md/dm-thin.c
drivers/md/dm-writecache.c
drivers/md/dm-zoned-reclaim.c
drivers/misc/cxl/Kconfig
drivers/misc/cxl/Makefile
drivers/misc/cxl/api.c
drivers/misc/cxl/base.c
drivers/misc/cxl/context.c
drivers/misc/cxl/cxl.h
drivers/misc/cxl/cxllib.c
drivers/misc/cxl/debugfs.c
drivers/misc/cxl/fault.c
drivers/misc/cxl/guest.c
drivers/misc/cxl/main.c
drivers/misc/cxl/native.c
drivers/misc/cxl/pci.c
drivers/misc/cxl/phb.c [deleted file]
drivers/misc/cxl/vphb.c
drivers/misc/ocxl/context.c
drivers/misc/ocxl/link.c
drivers/misc/ocxl/sysfs.c
drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.c
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
drivers/nvme/host/rdma.c
drivers/nvme/target/rdma.c
drivers/tty/hvc/hvc_console.c
drivers/tty/hvc/hvc_console.h
drivers/tty/hvc/hvc_opal.c
drivers/usb/host/ehci-ps3.c
drivers/usb/host/ohci-ps3.c
drivers/vfio/vfio_iommu_spapr_tce.c
fs/cifs/smbdirect.c
fs/ext2/inode.c
fs/ext2/super.c
fs/notify/fanotify/fanotify_user.c
fs/notify/fdinfo.c
fs/notify/fsnotify.h
fs/notify/inotify/inotify_user.c
fs/notify/mark.c
fs/udf/ialloc.c
fs/udf/inode.c
fs/udf/super.c
fs/udf/udf_i.h
fs/udf/udf_sb.h
fs/udf/udfdecl.h
fs/udf/udftime.c
include/linux/dm-kcopyd.h
include/linux/fsnotify_backend.h
include/linux/idr.h
include/linux/inotify.h
include/linux/mlx5/driver.h
include/linux/mlx5/fs.h
include/linux/mlx5/mlx5_ifc.h
include/linux/mm_types.h
include/linux/module.h
include/linux/overflow.h
include/misc/cxl-base.h
include/misc/cxl.h
include/rdma/ib.h
include/rdma/ib_addr.h
include/rdma/ib_cache.h
include/rdma/ib_cm.h
include/rdma/ib_mad.h
include/rdma/ib_sa.h
include/rdma/ib_verbs.h
include/rdma/opa_addr.h
include/rdma/rdma_cm.h
include/rdma/rdmavt_qp.h
include/rdma/uverbs_ioctl.h
include/rdma/uverbs_named_ioctl.h
include/rdma/uverbs_std_types.h
include/rdma/uverbs_types.h
include/uapi/linux/inotify.h
include/uapi/linux/pmu.h
include/uapi/rdma/cxgb4-abi.h
include/uapi/rdma/hns-abi.h
include/uapi/rdma/ib_user_ioctl_cmds.h
include/uapi/rdma/ib_user_ioctl_verbs.h
include/uapi/rdma/ib_user_verbs.h
include/uapi/rdma/mlx5-abi.h
include/uapi/rdma/mlx5_user_ioctl_cmds.h
include/uapi/rdma/qedr-abi.h
include/uapi/rdma/rdma_user_ioctl_cmds.h
kernel/audit_tree.c
kernel/module-internal.h
kernel/module.c
kernel/module_signing.c
lib/test_overflow.c
net/9p/trans_rdma.c
net/core/secure_seq.c
net/rds/ib.c
net/rds/ib_frmr.c
net/rds/ib_recv.c
net/rds/ib_send.c
net/smc/smc_core.c
net/smc/smc_ib.c
net/smc/smc_tx.c
net/smc/smc_wr.c
net/smc/smc_wr.h
net/sunrpc/xprtrdma/fmr_ops.c
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
net/sunrpc/xprtrdma/svc_rdma_rw.c
net/sunrpc/xprtrdma/svc_rdma_sendto.c
net/sunrpc/xprtrdma/svc_rdma_transport.c
net/sunrpc/xprtrdma/verbs.c
scripts/checkstack.pl
sound/ppc/snd_ps3.c
tools/testing/selftests/powerpc/alignment/.gitignore
tools/testing/selftests/powerpc/alignment/Makefile
tools/testing/selftests/powerpc/alignment/alignment_handler.c
tools/testing/selftests/powerpc/alignment/copy_first_unaligned.c
tools/testing/selftests/powerpc/alignment/copy_paste_unaligned_common.c [deleted file]
tools/testing/selftests/powerpc/alignment/copy_paste_unaligned_common.h [deleted file]
tools/testing/selftests/powerpc/alignment/copy_unaligned.c [deleted file]
tools/testing/selftests/powerpc/alignment/paste_last_unaligned.c [deleted file]
tools/testing/selftests/powerpc/alignment/paste_unaligned.c [deleted file]
tools/testing/selftests/powerpc/benchmarks/futex_bench.c
tools/testing/selftests/powerpc/benchmarks/mmap_bench.c
tools/testing/selftests/powerpc/copyloops/.gitignore
tools/testing/selftests/powerpc/copyloops/Makefile
tools/testing/selftests/powerpc/copyloops/asm/asm-compat.h [new file with mode: 0644]
tools/testing/selftests/powerpc/copyloops/asm/feature-fixups.h [new file with mode: 0644]
tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h
tools/testing/selftests/powerpc/copyloops/copy_tofrom_user_reference.S [new file with mode: 0644]
tools/testing/selftests/powerpc/copyloops/exc_validate.c [new file with mode: 0644]
tools/testing/selftests/powerpc/copyloops/stubs.S [new file with mode: 0644]
tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
tools/testing/selftests/powerpc/harness.c
tools/testing/selftests/powerpc/include/utils.h
tools/testing/selftests/powerpc/pmu/ebb/instruction_count_test.c
tools/testing/selftests/powerpc/pmu/ebb/lost_exception_test.c
tools/testing/selftests/powerpc/primitives/asm/asm-const.h [new symlink]
tools/testing/selftests/powerpc/primitives/asm/feature-fixups.h [new symlink]
tools/testing/selftests/powerpc/ptrace/core-pkey.c
tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
tools/testing/selftests/powerpc/stringloops/Makefile
tools/testing/selftests/powerpc/stringloops/asm/cache.h [new file with mode: 0644]
tools/testing/selftests/powerpc/stringloops/asm/ppc-opcode.h [new file with mode: 0644]
tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h
tools/testing/selftests/powerpc/stringloops/memcmp.c
tools/testing/selftests/powerpc/stringloops/memcmp_32.S [new symlink]
tools/testing/selftests/powerpc/stringloops/string.c [new file with mode: 0644]
tools/testing/selftests/powerpc/stringloops/strlen.c [new file with mode: 0644]
tools/testing/selftests/powerpc/stringloops/strlen_32.S [new symlink]
tools/testing/selftests/powerpc/tm/tm-sigreturn.c
tools/testing/selftests/powerpc/tm/tm-tar.c
tools/testing/selftests/powerpc/tm/tm-vmxcopy.c
tools/testing/selftests/powerpc/utils.c

index d96147eb1a68c7efa339dc33a66406ee93a9af3d..2a6f685bf70633757017a3bd1ff72c9d080cd7fd 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -31,6 +31,8 @@ Arnaud Patard <arnaud.patard@rtp-net.org>
 Arnd Bergmann <arnd@arndb.de>
 Axel Dyks <xl@xlsigned.net>
 Axel Lin <axel.lin@gmail.com>
+Bart Van Assche <bvanassche@acm.org> <bart.vanassche@wdc.com>
+Bart Van Assche <bvanassche@acm.org> <bart.vanassche@sandisk.com>
 Ben Gardner <bgardner@wabtec.com>
 Ben M Cahill <ben.m.cahill@intel.com>
 Björn Steinbrink <B.Steinbrink@gmx.de>
index 2e8b9374127002a0a82920099d23e642b89a6aa4..9606aed33137fc3e0b6c3a9955b02a4707187a09 100644 (file)
@@ -13,10 +13,11 @@ Contact:    linuxppc-dev@lists.ozlabs.org
 Description:   Write an integer containing the size in bytes of the memory
                you want removed from each NUMA node to this file - it must be
                aligned to the memblock size. This amount of RAM will be removed
-               from the kernel mappings and the following debugfs files will be
-               created. This can only be successfully done once per boot. Once
-               memory is successfully removed from each node, the following
-               files are created.
+               from each NUMA node in the kernel mappings and the following
+               debugfs files will be created. Once memory is successfully
+               removed from each node, the following files are created. To
+               re-add memory to the kernel, echo 0 into this file (it will be
+               automatically onlined).
 
 What:          /sys/kernel/debug/powerpc/memtrace/<node-id>
 Date:          Aug 2017
index adafe47ac3764fbffc8a4278784ad60821a8fed2..d60b169bb54b95350ad644ce43dadd4b721ce15c 100644 (file)
                        nosmt=force: Force disable SMT, cannot be undone
                                     via the sysfs control file.
 
+       nospectre_v1    [PPC] Disable mitigations for Spectre Variant 1 (bounds
+                       check bypass). With this option data leaks are possible
+                       in the system.
+
        nospectre_v2    [X86] Disable all mitigations for the Spectre variant 2
                        (indirect branch prediction) vulnerability. System may
                        allow data leaks with this option, which is equivalent
index 4b1d22a44ce42d19cb54442d4e608b3f61a7e1e9..6426c45273cbbaf16b169332111538dcf46e3b44 100644 (file)
@@ -5,7 +5,8 @@ Device-Mapper's "delay" target delays reads and/or writes
 and maps them to different devices.
 
 Parameters:
-    <device> <offset> <delay> [<write_device> <write_offset> <write_delay>]
+    <device> <offset> <delay> [<write_device> <write_offset> <write_delay>
+                              [<flush_device> <flush_offset> <flush_delay>]]
 
 With separate write parameters, the first set is only used for reads.
 Offsets are specified in sectors.
index f33e3ade7a09bdaf9f6b338d5142acc512a94cb2..297251b0d2d5715872449d0b4c556a0fb72cd4dc 100644 (file)
@@ -113,6 +113,10 @@ internal_hash:algorithm(:key)      (the key is optional)
        from an upper layer target, such as dm-crypt. The upper layer
        target should check the validity of the integrity tags.
 
+recalculate
+       Recalculate the integrity tags automatically. It is only valid
+       when using internal hash.
+
 journal_crypt:algorithm(:key)  (the key is optional)
        Encrypt the journal using given algorithm to make sure that the
        attacker can't read the journal. You can use a block cipher here
index 3d01948ea0611f56e4cf603dd2df14548b42471c..883e7ca5f74588aa54b8ad7a50750ca44224ca89 100644 (file)
@@ -28,17 +28,18 @@ administrator some freedom, for example to:
 Status
 ======
 
-These targets are very much still in the EXPERIMENTAL state.  Please
-do not yet rely on them in production.  But do experiment and offer us
-feedback.  Different use cases will have different performance
-characteristics, for example due to fragmentation of the data volume.
+These targets are considered safe for production use.  But different use
+cases will have different performance characteristics, for example due
+to fragmentation of the data volume.
 
 If you find this software is not performing as expected please mail
 dm-devel@redhat.com with details and we'll try our best to improve
 things for you.
 
-Userspace tools for checking and repairing the metadata are under
-development.
+Userspace tools for checking and repairing the metadata have been fully
+developed and are available as 'thin_check' and 'thin_repair'.  The name
+of the package that provides these utilities varies by distribution (on
+a Red Hat distribution it is named 'device-mapper-persistent-data').
 
 Cookbook
 ========
@@ -280,7 +281,7 @@ ii) Status
     <transaction id> <used metadata blocks>/<total metadata blocks>
     <used data blocks>/<total data blocks> <held metadata root>
     ro|rw|out_of_data_space [no_]discard_passdown [error|queue]_if_no_space
-    needs_check|-
+    needs_check|- metadata_low_watermark
 
     transaction id:
        A 64-bit number used by userspace to help synchronise with metadata
@@ -327,6 +328,11 @@ ii) Status
        thin-pool can be made fully operational again.  '-' indicates
        needs_check is not set.
 
+    metadata_low_watermark:
+       Value of metadata low watermark in blocks.  The kernel sets this
+       value internally but userspace needs to know this value to
+       determine if an event was caused by crossing this threshold.
+
 iii) Messages
 
     create_thin <dev id>
index 8826ba29db3668e11d5eaabd2c4ecc7fa78257c8..56468258711f1b36a5b7c74612003df9df2de694 100644 (file)
@@ -33,9 +33,48 @@ fanX_input           Measured RPM value.
 fanX_min               Threshold RPM for alert generation.
 fanX_fault             0: No fail condition
                        1: Failing fan
+
 tempX_input            Measured ambient temperature.
 tempX_max              Threshold ambient temperature for alert generation.
-inX_input              Measured power supply voltage
+tempX_highest          Historical maximum temperature
+tempX_lowest           Historical minimum temperature
+tempX_enable           Enable/disable all temperature sensors belonging to the
+                       sub-group. In POWER9, this attribute corresponds to
+                       each OCC. Using this attribute each OCC can be asked to
+                       disable/enable all of its temperature sensors.
+                       1: Enable
+                       0: Disable
+
+inX_input              Measured power supply voltage (millivolt)
 inX_fault              0: No fail condition.
                        1: Failing power supply.
-power1_input           System power consumption (microWatt)
+inX_highest            Historical maximum voltage
+inX_lowest             Historical minimum voltage
+inX_enable             Enable/disable all voltage sensors belonging to the
+                       sub-group. In POWER9, this attribute corresponds to
+                       each OCC. Using this attribute each OCC can be asked to
+                       disable/enable all of its voltage sensors.
+                       1: Enable
+                       0: Disable
+
+powerX_input           Power consumption (microWatt)
+powerX_input_highest   Historical maximum power
+powerX_input_lowest    Historical minimum power
+powerX_enable          Enable/disable all power sensors belonging to the
+                       sub-group. In POWER9, this attribute corresponds to
+                       each OCC. Using this attribute each OCC can be asked to
+                       disable/enable all of its power sensors.
+                       1: Enable
+                       0: Disable
+
+currX_input            Measured current (milliampere)
+currX_highest          Historical maximum current
+currX_lowest           Historical minimum current
+currX_enable           Enable/disable all current sensors belonging to the
+                       sub-group. In POWER9, this attribute corresponds to
+                       each OCC. Using this attribute each OCC can be asked to
+                       disable/enable all of its current sensors.
+                       1: Enable
+                       0: Disable
+
+energyX_input          Cumulative energy (microJoule)
diff --git a/Documentation/powerpc/DAWR-POWER9.txt b/Documentation/powerpc/DAWR-POWER9.txt
new file mode 100644 (file)
index 0000000..2feaa66
--- /dev/null
@@ -0,0 +1,58 @@
+DAWR issues on POWER9
+============================
+
+On POWER9 the DAWR can cause a checkstop if it points to cache
+inhibited (CI) memory. Currently Linux has no way to disinguish CI
+memory when configuring the DAWR, so (for now) the DAWR is disabled by
+this commit:
+
+    commit 9654153158d3e0684a1bdb76dbababdb7111d5a0
+    Author: Michael Neuling <mikey@neuling.org>
+    Date:   Tue Mar 27 15:37:24 2018 +1100
+    powerpc: Disable DAWR in the base POWER9 CPU features
+
+Technical Details:
+============================
+
+DAWR has 6 different ways of being set.
+1) ptrace
+2) h_set_mode(DAWR)
+3) h_set_dabr()
+4) kvmppc_set_one_reg()
+5) xmon
+
+For ptrace, we now advertise zero breakpoints on POWER9 via the
+PPC_PTRACE_GETHWDBGINFO call. This results in GDB falling back to
+software emulation of the watchpoint (which is slow).
+
+h_set_mode(DAWR) and h_set_dabr() will now return an error to the
+guest on a POWER9 host. Current Linux guests ignore this error, so
+they will silently not get the DAWR.
+
+kvmppc_set_one_reg() will store the value in the vcpu but won't
+actually set it on POWER9 hardware. This is done so we don't break
+migration from POWER8 to POWER9, at the cost of silently losing the
+DAWR on the migration.
+
+For xmon, the 'bd' command will return an error on P9.
+
+Consequences for users
+============================
+
+For GDB watchpoints (ie 'watch' command) on POWER9 bare metal , GDB
+will accept the command. Unfortunately since there is no hardware
+support for the watchpoint, GDB will software emulate the watchpoint
+making it run very slowly.
+
+The same will also be true for any guests started on a POWER9
+host. The watchpoint will fail and GDB will fall back to software
+emulation.
+
+If a guest is started on a POWER8 host, GDB will accept the watchpoint
+and configure the hardware to use the DAWR. This will run at full
+speed since it can use the hardware emulation. Unfortunately if this
+guest is migrated to a POWER9 host, the watchpoint will be lost on the
+POWER9. Loads and stores to the watchpoint locations will not be
+trapped in GDB. The watchpoint is remembered, so if the guest is
+migrated back to the POWER8 host, it will start working again.
+
index e32fdbb4c9a7a284976d624037df1ff4c655958c..52c023e14f2602b7a67d61eb116258ad72f0e65d 100644 (file)
@@ -198,3 +198,47 @@ presented).  The transaction cannot then be continued and will take the failure
 handler route.  Furthermore, the transactional 2nd register state will be
 inaccessible.  GDB can currently be used on programs using TM, but not sensibly
 in parts within transactions.
+
+POWER9
+======
+
+TM on POWER9 has issues with storing the complete register state. This
+is described in this commit:
+
+    commit 4bb3c7a0208fc13ca70598efd109901a7cd45ae7
+    Author: Paul Mackerras <paulus@ozlabs.org>
+    Date:   Wed Mar 21 21:32:01 2018 +1100
+    KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9
+
+To account for this different POWER9 chips have TM enabled in
+different ways.
+
+On POWER9N DD2.01 and below, TM is disabled. ie
+HWCAP2[PPC_FEATURE2_HTM] is not set.
+
+On POWER9N DD2.1 TM is configured by firmware to always abort a
+transaction when tm suspend occurs. So tsuspend will cause a
+transaction to be aborted and rolled back. Kernel exceptions will also
+cause the transaction to be aborted and rolled back and the exception
+will not occur. If userspace constructs a sigcontext that enables TM
+suspend, the sigcontext will be rejected by the kernel. This mode is
+advertised to users with HWCAP2[PPC_FEATURE2_HTM_NO_SUSPEND] set.
+HWCAP2[PPC_FEATURE2_HTM] is not set in this mode.
+
+On POWER9N DD2.2 and above, KVM and POWERVM emulate TM for guests (as
+described in commit 4bb3c7a0208f), hence TM is enabled for guests
+ie. HWCAP2[PPC_FEATURE2_HTM] is set for guest userspace. Guests that
+makes heavy use of TM suspend (tsuspend or kernel suspend) will result
+in traps into the hypervisor and hence will suffer a performance
+degradation. Host userspace has TM disabled
+ie. HWCAP2[PPC_FEATURE2_HTM] is not set. (although we make enable it
+at some point in the future if we bring the emulation into host
+userspace context switching).
+
+POWER9C DD1.2 and above are only available with POWERVM and hence
+Linux only runs as a guest. On these systems TM is emulated like on
+POWER9N DD2.2.
+
+Guest migration from POWER8 to POWER9 will work with POWER9N DD2.2 and
+POWER9C DD1.2. Since earlier POWER9 processors don't support TM
+emulation, migration from POWER8 to POWER9 is not supported there.
index 6faf6d3d499e588d93e68a78e73985772d4eb396..e9336962d0f21fc1840bbb7f2bef774805d4277b 100644 (file)
@@ -814,11 +814,6 @@ S: Supported
 F:     drivers/net/ethernet/amd/xgbe/
 F:     arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi
 
-AMS (Apple Motion Sensor) DRIVER
-M:     Michael Hanselmann <linux-kernel@hansmi.ch>
-S:     Supported
-F:     drivers/macintosh/ams/
-
 ANALOG DEVICES INC AD5686 DRIVER
 M:     Stefan Popa <stefan.popa@analog.com>
 L:     linux-pm@vger.kernel.org
@@ -3542,7 +3537,6 @@ F:        drivers/net/ethernet/cisco/enic/
 
 CISCO VIC LOW LATENCY NIC DRIVER
 M:     Christian Benvenuti <benve@cisco.com>
-M:     Dave Goodell <dgoodell@cisco.com>
 S:     Supported
 F:     drivers/infiniband/hw/usnic/
 
@@ -7629,9 +7623,8 @@ S:        Maintained
 F:     drivers/firmware/iscsi_ibft*
 
 ISCSI EXTENSIONS FOR RDMA (ISER) INITIATOR
-M:     Or Gerlitz <ogerlitz@mellanox.com>
 M:     Sagi Grimberg <sagi@grimberg.me>
-M:     Roi Dayan <roid@mellanox.com>
+M:     Max Gurtovoy <maxg@mellanox.com>
 L:     linux-rdma@vger.kernel.org
 S:     Supported
 W:     http://www.openfabrics.org
@@ -12760,15 +12753,21 @@ S:    Maintained
 F:     drivers/scsi/sr*
 
 SCSI RDMA PROTOCOL (SRP) INITIATOR
-M:     Bart Van Assche <bart.vanassche@sandisk.com>
+M:     Bart Van Assche <bvanassche@acm.org>
 L:     linux-rdma@vger.kernel.org
 S:     Supported
-W:     http://www.openfabrics.org
 Q:     http://patchwork.kernel.org/project/linux-rdma/list/
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/dad/srp-initiator.git
 F:     drivers/infiniband/ulp/srp/
 F:     include/scsi/srp.h
 
+SCSI RDMA PROTOCOL (SRP) TARGET
+M:     Bart Van Assche <bvanassche@acm.org>
+L:     linux-rdma@vger.kernel.org
+L:     target-devel@vger.kernel.org
+S:     Supported
+Q:     http://patchwork.kernel.org/project/linux-rdma/list/
+F:     drivers/infiniband/ulp/srpt/
+
 SCSI SG DRIVER
 M:     Doug Gilbert <dgilbert@interlog.com>
 L:     linux-scsi@vger.kernel.org
index 89ad0596033abab691d76ca426f81b4136932f86..9e81b7c498d8b9b826b601487e843cebac1c1f45 100644 (file)
@@ -34,6 +34,7 @@ struct mod_arch_specific {
 #endif
 };
 
+struct module;
 u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val);
 
 /*
index c2dd1ad3e648ebaf6ae37a3cc3c1923c88971a83..e0756416e567ec7e5bc4043b9ea82bf89b987868 100644 (file)
@@ -36,7 +36,7 @@ void arch_jump_label_transform(struct jump_entry *entry,
                insn = aarch64_insn_gen_nop();
        }
 
-       aarch64_insn_patch_text(&addr, &insn, 1);
+       aarch64_insn_patch_text_nosync(addr, insn);
 }
 
 void arch_jump_label_transform_static(struct jump_entry *entry,
index 9abf8a1e7b250c49b0064f6abc67d41eabdbc52c..787e27964ab9de8658398bba239be5743e2416c7 100644 (file)
@@ -287,7 +287,11 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
 #ifdef CONFIG_HAVE_ARCH_PFN_VALID
 int pfn_valid(unsigned long pfn)
 {
-       return memblock_is_map_memory(pfn << PAGE_SHIFT);
+       phys_addr_t addr = pfn << PAGE_SHIFT;
+
+       if ((addr >> PAGE_SHIFT) != pfn)
+               return 0;
+       return memblock_is_map_memory(addr);
 }
 EXPORT_SYMBOL(pfn_valid);
 #endif
index 930cc2965a113c9bdd8ef4de54fc88a1ced4e6b9..c717bf8794492114c79d8dd5b3448567c663a690 100644 (file)
@@ -366,7 +366,7 @@ CONFIG_TCM_PSCSI=m
 CONFIG_ADB=y
 CONFIG_ADB_MACII=y
 CONFIG_ADB_IOP=y
-CONFIG_ADB_PMU68K=y
+CONFIG_ADB_PMU=y
 CONFIG_ADB_CUDA=y
 CONFIG_INPUT_ADBHID=y
 CONFIG_MAC_EMUMOUSEBTN=y
index e7dd2530012759c3e8ef328044fab541d4a53741..226c994ce794f6acff23ed1f5f20cffa0cc1ef8c 100644 (file)
@@ -400,7 +400,7 @@ CONFIG_TCM_PSCSI=m
 CONFIG_ADB=y
 CONFIG_ADB_MACII=y
 CONFIG_ADB_IOP=y
-CONFIG_ADB_PMU68K=y
+CONFIG_ADB_PMU=y
 CONFIG_ADB_CUDA=y
 CONFIG_INPUT_ADBHID=y
 CONFIG_MAC_EMUMOUSEBTN=y
index b02d7254b73a9fe3c68834f36839022548cd06ea..cd9317d5327694e3761f066abf99fa3f493cb675 100644 (file)
@@ -889,7 +889,7 @@ static void __init mac_identify(void)
 #ifdef CONFIG_ADB_CUDA
        find_via_cuda();
 #endif
-#ifdef CONFIG_ADB_PMU68K
+#ifdef CONFIG_ADB_PMU
        find_via_pmu();
 #endif
 }
index 19e9d8eef1f282c7c930be14dbd1d97b64f0df87..3534aa6a4dc2bc7e833001739582af3660a579d1 100644 (file)
@@ -90,7 +90,7 @@ static void cuda_write_pram(int offset, __u8 data)
 }
 #endif /* CONFIG_ADB_CUDA */
 
-#ifdef CONFIG_ADB_PMU68K
+#ifdef CONFIG_ADB_PMU
 static time64_t pmu_read_time(void)
 {
        struct adb_request req;
@@ -142,7 +142,7 @@ static void pmu_write_pram(int offset, __u8 data)
        while (!req.complete)
                pmu_poll();
 }
-#endif /* CONFIG_ADB_PMU68K */
+#endif /* CONFIG_ADB_PMU */
 
 /*
  * VIA PRAM/RTC access routines
@@ -373,38 +373,6 @@ static void cuda_shutdown(void)
 }
 #endif /* CONFIG_ADB_CUDA */
 
-#ifdef CONFIG_ADB_PMU68K
-
-void pmu_restart(void)
-{
-       struct adb_request req;
-       if (pmu_request(&req, NULL,
-                       2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0)
-               return;
-       while (!req.complete)
-               pmu_poll();
-       if (pmu_request(&req, NULL, 1, PMU_RESET) < 0)
-               return;
-       while (!req.complete)
-               pmu_poll();
-}
-
-void pmu_shutdown(void)
-{
-       struct adb_request req;
-       if (pmu_request(&req, NULL,
-                       2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0)
-               return;
-       while (!req.complete)
-               pmu_poll();
-       if (pmu_request(&req, NULL, 5, PMU_SHUTDOWN, 'M', 'A', 'T', 'T') < 0)
-               return;
-       while (!req.complete)
-               pmu_poll();
-}
-
-#endif
-
 /*
  *-------------------------------------------------------------------
  * Below this point are the generic routines; they'll dispatch to the
@@ -429,7 +397,7 @@ void mac_pram_read(int offset, __u8 *buffer, int len)
                func = cuda_read_pram;
                break;
 #endif
-#ifdef CONFIG_ADB_PMU68K
+#ifdef CONFIG_ADB_PMU
        case MAC_ADB_PB2:
                func = pmu_read_pram;
                break;
@@ -459,7 +427,7 @@ void mac_pram_write(int offset, __u8 *buffer, int len)
                func = cuda_write_pram;
                break;
 #endif
-#ifdef CONFIG_ADB_PMU68K
+#ifdef CONFIG_ADB_PMU
        case MAC_ADB_PB2:
                func = pmu_write_pram;
                break;
@@ -483,9 +451,8 @@ void mac_poweroff(void)
                   macintosh_config->adb_type == MAC_ADB_CUDA) {
                cuda_shutdown();
 #endif
-#ifdef CONFIG_ADB_PMU68K
-       } else if (macintosh_config->adb_type == MAC_ADB_PB1
-               || macintosh_config->adb_type == MAC_ADB_PB2) {
+#ifdef CONFIG_ADB_PMU
+       } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
                pmu_shutdown();
 #endif
        }
@@ -525,9 +492,8 @@ void mac_reset(void)
                   macintosh_config->adb_type == MAC_ADB_CUDA) {
                cuda_restart();
 #endif
-#ifdef CONFIG_ADB_PMU68K
-       } else if (macintosh_config->adb_type == MAC_ADB_PB1
-               || macintosh_config->adb_type == MAC_ADB_PB2) {
+#ifdef CONFIG_ADB_PMU
+       } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
                pmu_restart();
 #endif
        } else if (CPU_IS_030) {
@@ -680,7 +646,7 @@ int mac_hwclk(int op, struct rtc_time *t)
                        now = cuda_read_time();
                        break;
 #endif
-#ifdef CONFIG_ADB_PMU68K
+#ifdef CONFIG_ADB_PMU
                case MAC_ADB_PB2:
                        now = pmu_read_time();
                        break;
@@ -716,7 +682,7 @@ int mac_hwclk(int op, struct rtc_time *t)
                        cuda_write_time(now);
                        break;
 #endif
-#ifdef CONFIG_ADB_PMU68K
+#ifdef CONFIG_ADB_PMU
                case MAC_ADB_PB2:
                        pmu_write_time(now);
                        break;
index 1c10ff0406f28250cf3dcf3f5ef51eca84717cd1..a80669209155383343ba8adbb90b3e8427e2afdb 100644 (file)
@@ -165,7 +165,7 @@ config PPC
        select GENERIC_CLOCKEVENTS_BROADCAST    if SMP
        select GENERIC_CMOS_UPDATE
        select GENERIC_CPU_AUTOPROBE
-       select GENERIC_CPU_VULNERABILITIES      if PPC_BOOK3S_64
+       select GENERIC_CPU_VULNERABILITIES      if PPC_BARRIER_NOSPEC
        select GENERIC_IRQ_SHOW
        select GENERIC_IRQ_SHOW_LEVEL
        select GENERIC_SMP_IDLE_THREAD
@@ -197,6 +197,7 @@ config PPC
        select HAVE_IOREMAP_PROT
        select HAVE_IRQ_EXIT_ON_IRQ_STACK
        select HAVE_KERNEL_GZIP
+       select HAVE_KERNEL_XZ                   if PPC_BOOK3S
        select HAVE_KPROBES
        select HAVE_KPROBES_ON_FTRACE
        select HAVE_KRETPROBES
@@ -225,6 +226,7 @@ config PPC
        select IRQ_DOMAIN
        select IRQ_FORCED_THREADING
        select MODULES_USE_ELF_RELA
+       select NEED_DMA_MAP_STATE               if PPC64 || NOT_COHERENT_CACHE
        select NEED_SG_DMA_LENGTH
        select NO_BOOTMEM
        select OF
@@ -240,6 +242,11 @@ config PPC
        # Please keep this list sorted alphabetically.
        #
 
+config PPC_BARRIER_NOSPEC
+    bool
+    default y
+    depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
+
 config GENERIC_CSUM
        def_bool n
 
@@ -876,9 +883,6 @@ config ZONE_DMA
        bool
        default y
 
-config NEED_DMA_MAP_STATE
-       def_bool (PPC64 || NOT_COHERENT_CACHE)
-
 config GENERIC_ISA_DMA
        bool
        depends on ISA_DMA_API
index fb96206de3175d65f86a63d9a7db0a815300a791..8397c7bd5880805a457f5db43b35425f6787310e 100644 (file)
@@ -36,7 +36,7 @@ else
 KBUILD_DEFCONFIG := ppc64_defconfig
 endif
 
-ifeq ($(CONFIG_PPC64),y)
+ifdef CONFIG_PPC64
 new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
 
 ifeq ($(new_nm),y)
@@ -74,7 +74,7 @@ KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
 endif
 endif
 
-ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
+ifdef CONFIG_CPU_LITTLE_ENDIAN
 KBUILD_CFLAGS  += -mlittle-endian
 LDFLAGS                += -EL
 LDEMULATION    := lppc
@@ -117,7 +117,7 @@ LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie
 LDFLAGS_vmlinux        := $(LDFLAGS_vmlinux-y)
 LDFLAGS_vmlinux += $(call ld-option,--orphan-handling=warn)
 
-ifeq ($(CONFIG_PPC64),y)
+ifdef CONFIG_PPC64
 ifeq ($(call cc-option-yn,-mcmodel=medium),y)
        # -mcmodel=medium breaks modules because it uses 32bit offsets from
        # the TOC pointer to create pointers where possible. Pointers into the
@@ -134,7 +134,7 @@ endif
 endif
 
 CFLAGS-$(CONFIG_PPC64) := $(call cc-option,-mtraceback=no)
-ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
+ifdef CONFIG_CPU_LITTLE_ENDIAN
 CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc))
 AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
 else
@@ -148,8 +148,8 @@ CFLAGS-$(CONFIG_PPC64)      += $(call cc-option,-mno-pointers-to-nested-functions)
 CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
 CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
 
-ifeq ($(CONFIG_PPC_BOOK3S_64),y)
-ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
+ifdef CONFIG_PPC_BOOK3S_64
+ifdef CONFIG_CPU_LITTLE_ENDIAN
 CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
 CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8)
 else
@@ -164,16 +164,10 @@ ifdef CONFIG_MPROFILE_KERNEL
        CC_FLAGS_FTRACE := -pg -mprofile-kernel
 endif
 
-CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
-CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
-CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
-CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
-CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8)
-CFLAGS-$(CONFIG_POWER9_CPU) += $(call cc-option,-mcpu=power9)
-CFLAGS-$(CONFIG_PPC_8xx) += $(call cc-option,-mcpu=860)
+CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
 
 # Altivec option not allowed with e500mc64 in GCC.
-ifeq ($(CONFIG_ALTIVEC),y)
+ifdef CONFIG_ALTIVEC
 E5500_CPU := -mcpu=powerpc64
 else
 E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
@@ -181,8 +175,8 @@ endif
 CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU)
 CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))
 
-ifeq ($(CONFIG_PPC32),y)
-ifeq ($(CONFIG_PPC_E500MC),y)
+ifdef CONFIG_PPC32
+ifdef CONFIG_PPC_E500MC
 CFLAGS-y += $(call cc-option,-mcpu=e500mc,-mcpu=powerpc)
 else
 CFLAGS-$(CONFIG_E500) += $(call cc-option,-mcpu=8540 -msoft-float,-mcpu=powerpc)
@@ -204,7 +198,7 @@ else
 CHECKFLAGS     += -D__LITTLE_ENDIAN__
 endif
 
-ifeq ($(CONFIG_476FPE_ERR46),y)
+ifdef CONFIG_476FPE_ERR46
        KBUILD_LDFLAGS_MODULE += --ppc476-workaround \
                -T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
 endif
@@ -231,12 +225,12 @@ KBUILD_CFLAGS     += $(call cc-option,-fno-dwarf2-cfi-asm)
 # often slow when they are implemented at all
 KBUILD_CFLAGS          += $(call cc-option,-mno-string)
 
-ifeq ($(CONFIG_6xx),y)
+ifdef CONFIG_6xx
 KBUILD_CFLAGS          += -mcpu=powerpc
 endif
 
 # Work around a gcc code-gen bug with -fno-omit-frame-pointer.
-ifeq ($(CONFIG_FUNCTION_TRACER),y)
+ifdef CONFIG_FUNCTION_TRACER
 KBUILD_CFLAGS          += -mno-sched-epilog
 endif
 
@@ -355,6 +349,21 @@ mpc86xx_smp_defconfig:
        $(call merge_into_defconfig,mpc86xx_basic_defconfig,\
                86xx-smp 86xx-hw fsl-emb-nonhw)
 
+PHONY += ppc32_allmodconfig
+ppc32_allmodconfig:
+       $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/book3s_32.config \
+               -f $(srctree)/Makefile allmodconfig
+
+PHONY += ppc64le_allmodconfig
+ppc64le_allmodconfig:
+       $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/le.config \
+               -f $(srctree)/Makefile allmodconfig
+
+PHONY += ppc64_book3e_allmodconfig
+ppc64_book3e_allmodconfig:
+       $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/85xx-64bit.config \
+               -f $(srctree)/Makefile allmodconfig
+
 define archhelp
   @echo '* zImage          - Build default images selected by kernel config'
   @echo '  zImage.*        - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
@@ -381,7 +390,7 @@ install:
        $(Q)$(MAKE) $(build)=$(boot) install
 
 vdso_install:
-ifeq ($(CONFIG_PPC64),y)
+ifdef CONFIG_PPC64
        $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
 endif
        $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@
index deea20c334df4888aca4917367a656df3a0d70cb..0fb96c26136f6aa506ce212278b15b22637ae154 100644 (file)
@@ -354,7 +354,7 @@ image-$(CONFIG_AMIGAONE)            += cuImage.amigaone
 
 # For 32-bit powermacs, build the COFF and miboot images
 # as well as the ELF images.
-ifeq ($(CONFIG_PPC32),y)
+ifdef CONFIG_PPC32
 image-$(CONFIG_PPC_PMAC)       += zImage.coff zImage.miboot
 endif
 
index 83bcfd8651675abd2a258bfe8fc05fd62363e81a..0be5c4f3265d7f53dc0d620fb535975a7c0c7958 100644 (file)
                        clock-frequency = <400000>;
 
                        at24@30 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x30>;
                        };
 
                        at24@31 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x31>;
                        };
 
                        };
 
                        at24@50 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x50>;
                        };
 
                        at24@51 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x51>;
                        };
 
                        at24@52 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x52>;
                        };
 
                        at24@53 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x53>;
                        };
 
                        at24@54 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x54>;
                        };
 
                        at24@55 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x55>;
                        };
 
                        at24@56 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x56>;
                        };
 
                        at24@57 {
-                               compatible = "at24,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x57>;
                        };
 
index 5922c1ea0e96d10a033190fc09186db04c8f9e52..3094df05f5eab0959284ba6e816c0ba2557fa84a 100644 (file)
                                        #size-cells = <0>;
 
                                        eeprom@54 {
-                                               compatible = "24c02";
+                                               compatible = "atmel,24c02";
                                                reg = <0x54>;
                                                pagesize = <2>;
                                                read-only;
index 836e4c965b227387c6b0c42c7932ea5a4585a9f7..55c0210a771d1f6e45bdd85a174d31efc2c99acd 100644 (file)
 
                mdio@fd000 {
                        xg_cs4315_phy1: ethernet-phy@c {
-                               compatible = "ethernet-phy-ieee802.3-c45";
+                               compatible = "ethernet-phy-id13e5.1002";
                                reg = <0xc>;
                        };
 
                        xg_cs4315_phy2: ethernet-phy@d {
-                               compatible = "ethernet-phy-ieee802.3-c45";
+                               compatible = "ethernet-phy-id13e5.1002";
                                reg = <0xd>;
                        };
 
index 15eb0a3f7290cb06e091e5bef930c1182813d550..a56a705d41f7dc3a240fe794eeb89b3d4c6d702c 100644 (file)
 
                        mdio@fd000 {
                                xfiphy1: ethernet-phy@10 {
-                                       compatible = "ethernet-phy-ieee802.3-c45";
+                                       compatible = "ethernet-phy-id13e5.1002";
                                        reg = <0x10>;
                                };
 
                                xfiphy2: ethernet-phy@11 {
-                                       compatible = "ethernet-phy-ieee802.3-c45";
+                                       compatible = "ethernet-phy-id13e5.1002";
                                        reg = <0x11>;
                                };
 
                                xfiphy3: ethernet-phy@13 {
-                                       compatible = "ethernet-phy-ieee802.3-c45";
+                                       compatible = "ethernet-phy-id13e5.1002";
                                        reg = <0x13>;
                                };
 
                                xfiphy4: ethernet-phy@12 {
-                                       compatible = "ethernet-phy-ieee802.3-c45";
+                                       compatible = "ethernet-phy-id13e5.1002";
                                        reg = <0x12>;
                                };
                        };
index 445b88114009371ad9f3e2791b1df70fe5fb9c62..df1283b63d9b3edde37a6d80f6acfeeec18c3852 100644 (file)
@@ -98,7 +98,7 @@
                        fsl,preserve-clocking;
 
                        eeprom@50 {
-                               compatible = "at,24c01";
+                               compatible = "atmel,24c01";
                                reg = <0x50>;
                        };
 
diff --git a/arch/powerpc/configs/book3s_32.config b/arch/powerpc/configs/book3s_32.config
new file mode 100644 (file)
index 0000000..8721eb7
--- /dev/null
@@ -0,0 +1,2 @@
+CONFIG_PPC64=n
+CONFIG_PPC_BOOK3S_32=y
index 2fe76f5e938a089e05d4dc409df44551c69cddc6..4ffacafe4036f60393b2619262f9be8e96e7249f 100644 (file)
@@ -2,3 +2,4 @@ CONFIG_FSL_DPAA=y
 CONFIG_FSL_PAMU=y
 CONFIG_FSL_FMAN=y
 CONFIG_FSL_DPAA_ETH=y
+CONFIG_CORTINA_PHY=y
index 10cdf5bceebbaf6eb468f75b98f2144502d99efe..1834065362c72fbfd0df023224c25e6181a24ed0 100644 (file)
@@ -11,6 +11,7 @@
  */
 #include <asm/ppc_asm.h>
 #include <asm/asm-offsets.h>
+#include <asm/asm-compat.h>
 
 #define rHP    r3
 #define rWP    r4
index c8951ce0dcc4ef30ea293d516ba2d4a5fc9d87fa..23e248beff7166213e95583975341247c4680233 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <asm/ppc_asm.h>
 #include <asm/asm-offsets.h>
+#include <asm/asm-compat.h>
 
 #ifdef __BIG_ENDIAN__
 #define LWZ(rt, d, ra) \
diff --git a/arch/powerpc/include/asm/asm-405.h b/arch/powerpc/include/asm/asm-405.h
new file mode 100644 (file)
index 0000000..7270d3a
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef _ASM_POWERPC_ASM_405_H
+#define _ASM_POWERPC_ASM_405_H
+
+#include <asm/asm-const.h>
+
+#ifdef __KERNEL__
+#ifdef CONFIG_IBM405_ERR77
+/* Erratum #77 on the 405 means we need a sync or dcbt before every
+ * stwcx.  The old ATOMIC_SYNC_FIX covered some but not all of this.
+ */
+#define PPC405_ERR77(ra,rb)    stringify_in_c(dcbt     ra, rb;)
+#define        PPC405_ERR77_SYNC       stringify_in_c(sync;)
+#else
+#define PPC405_ERR77(ra,rb)
+#define PPC405_ERR77_SYNC
+#endif
+#endif
+
+#endif /* _ASM_POWERPC_ASM_405_H */
index 7f2a7702596cd5a2a44c386431df1ad590acac86..19b70c5b5f18039f1ef55605b544088fa175a7d4 100644 (file)
@@ -1,21 +1,10 @@
 #ifndef _ASM_POWERPC_ASM_COMPAT_H
 #define _ASM_POWERPC_ASM_COMPAT_H
 
+#include <asm/asm-const.h>
 #include <asm/types.h>
 #include <asm/ppc-opcode.h>
 
-#ifdef __ASSEMBLY__
-#  define stringify_in_c(...)  __VA_ARGS__
-#  define ASM_CONST(x)         x
-#else
-/* This version of stringify will deal with commas... */
-#  define __stringify_in_c(...)        #__VA_ARGS__
-#  define stringify_in_c(...)  __stringify_in_c(__VA_ARGS__) " "
-#  define __ASM_CONST(x)       x##UL
-#  define ASM_CONST(x)         __ASM_CONST(x)
-#endif
-
-
 #ifdef __powerpc64__
 
 /* operations for longs and pointers */
 
 #endif
 
-#ifdef __KERNEL__
-#ifdef CONFIG_IBM405_ERR77
-/* Erratum #77 on the 405 means we need a sync or dcbt before every
- * stwcx.  The old ATOMIC_SYNC_FIX covered some but not all of this.
- */
-#define PPC405_ERR77(ra,rb)    stringify_in_c(dcbt     ra, rb;)
-#define        PPC405_ERR77_SYNC       stringify_in_c(sync;)
-#else
-#define PPC405_ERR77(ra,rb)
-#define PPC405_ERR77_SYNC
-#endif
-#endif
-
 #endif /* _ASM_POWERPC_ASM_COMPAT_H */
diff --git a/arch/powerpc/include/asm/asm-const.h b/arch/powerpc/include/asm/asm-const.h
new file mode 100644 (file)
index 0000000..082c153
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef _ASM_POWERPC_ASM_CONST_H
+#define _ASM_POWERPC_ASM_CONST_H
+
+#ifdef __ASSEMBLY__
+#  define stringify_in_c(...)  __VA_ARGS__
+#  define ASM_CONST(x)         x
+#else
+/* This version of stringify will deal with commas... */
+#  define __stringify_in_c(...)        #__VA_ARGS__
+#  define stringify_in_c(...)  __stringify_in_c(__VA_ARGS__) " "
+#  define __ASM_CONST(x)       x##UL
+#  define ASM_CONST(x)         __ASM_CONST(x)
+#endif
+#endif /* _ASM_POWERPC_ASM_CONST_H */
index 7841b8a60657906535c3973cd366f5fe8a4a19a8..1f4691ce412618d42d51e5fa5206d23c9c8242cf 100644 (file)
@@ -48,8 +48,8 @@ void __trace_opal_exit(long opcode, unsigned long retval);
 /* VMX copying */
 int enter_vmx_usercopy(void);
 int exit_vmx_usercopy(void);
-int enter_vmx_copy(void);
-void * exit_vmx_copy(void *dest);
+int enter_vmx_ops(void);
+void *exit_vmx_ops(void *dest);
 
 /* Traps */
 long machine_check_early(struct pt_regs *regs);
@@ -143,4 +143,11 @@ struct kvm_vcpu;
 void _kvmppc_restore_tm_pr(struct kvm_vcpu *vcpu, u64 guest_msr);
 void _kvmppc_save_tm_pr(struct kvm_vcpu *vcpu, u64 guest_msr);
 
+/* Patch sites */
+extern s32 patch__call_flush_count_cache;
+extern s32 patch__flush_count_cache_return;
+extern s32 patch__memset_nocache, patch__memcpy_nocache;
+
+extern long flush_count_cache;
+
 #endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
index 963abf8bf1c0e52c66478b0fe597f74ada7520d3..52eafaf74054d2f3d22e0adadb8a57d61a5b89f9 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/types.h>
 #include <asm/cmpxchg.h>
 #include <asm/barrier.h>
+#include <asm/asm-405.h>
 
 #define ATOMIC_INIT(i)         { (i) }
 
index f67b3f6e36bebf85b69f72a913b9800daebbe3c4..fbe8df433019007e4122d241cdfccfdae270e291 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef _ASM_POWERPC_BARRIER_H
 #define _ASM_POWERPC_BARRIER_H
 
+#include <asm/asm-const.h>
+
 /*
  * Memory barrier.
  * The sync instruction guarantees that all memory accesses initiated
@@ -77,19 +79,25 @@ do {                                                                        \
 })
 
 #ifdef CONFIG_PPC_BOOK3S_64
+#define NOSPEC_BARRIER_SLOT   nop
+#elif defined(CONFIG_PPC_FSL_BOOK3E)
+#define NOSPEC_BARRIER_SLOT   nop; nop
+#endif
+
+#ifdef CONFIG_PPC_BARRIER_NOSPEC
 /*
  * Prevent execution of subsequent instructions until preceding branches have
  * been fully resolved and are no longer executing speculatively.
  */
-#define barrier_nospec_asm NOSPEC_BARRIER_FIXUP_SECTION; nop
+#define barrier_nospec_asm NOSPEC_BARRIER_FIXUP_SECTION; NOSPEC_BARRIER_SLOT
 
 // This also acts as a compiler barrier due to the memory clobber.
 #define barrier_nospec() asm (stringify_in_c(barrier_nospec_asm) ::: "memory")
 
-#else /* !CONFIG_PPC_BOOK3S_64 */
+#else /* !CONFIG_PPC_BARRIER_NOSPEC */
 #define barrier_nospec_asm
 #define barrier_nospec()
-#endif
+#endif /* CONFIG_PPC_BARRIER_NOSPEC */
 
 #include <asm-generic/barrier.h>
 
index b750ffef83c7dceae81fc90398a2db991a4477ff..ff71566dadee584c3878dd5c22bf162321d77e29 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/compiler.h>
 #include <asm/asm-compat.h>
 #include <asm/synch.h>
+#include <asm/asm-405.h>
 
 /* PPC bit number conversion */
 #define PPC_BITLSHIFT(be)      (BITS_PER_LONG - 1 - (be))
index 02f5acd7ccc4d4a954b72b7ea1d8792912bf557a..751cf931bb3f4da228c05c062846d33b60421304 100644 (file)
  * of RAM.  -- Cort
  */
 #define VMALLOC_OFFSET (0x1000000) /* 16M */
-#ifdef PPC_PIN_SIZE
-#define VMALLOC_START (((_ALIGN((long)high_memory, PPC_PIN_SIZE) + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
-#else
 #define VMALLOC_START ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
-#endif
 #define VMALLOC_END    ioremap_bot
 
 #ifndef __ASSEMBLY__
 #include <linux/sched.h>
 #include <linux/threads.h>
-#include <asm/io.h>                    /* For sub-arch specific PPC_PIN_SIZE */
 
 extern unsigned long ioremap_bot;
 
@@ -164,7 +159,6 @@ static inline unsigned long pte_update(pte_t *p,
 1:     lwarx   %0,0,%3\n\
        andc    %1,%0,%4\n\
        or      %1,%1,%5\n"
-       PPC405_ERR77(0,%3)
 "      stwcx.  %1,0,%3\n\
        bne-    1b"
        : "=&r" (old), "=&r" (tmp), "=m" (*p)
@@ -186,7 +180,6 @@ static inline unsigned long long pte_update(pte_t *p,
        lwzx    %0,0,%3\n\
        andc    %1,%L0,%5\n\
        or      %1,%1,%6\n"
-       PPC405_ERR77(0,%3)
 "      stwcx.  %1,0,%4\n\
        bne-    1b"
        : "=&r" (old), "=&r" (tmp), "=m" (*p)
diff --git a/arch/powerpc/include/asm/book3s/32/tlbflush.h b/arch/powerpc/include/asm/book3s/32/tlbflush.h
new file mode 100644 (file)
index 0000000..068085b
--- /dev/null
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_POWERPC_BOOK3S_32_TLBFLUSH_H
+#define _ASM_POWERPC_BOOK3S_32_TLBFLUSH_H
+
+#define MMU_NO_CONTEXT      (0)
+/*
+ * TLB flushing for "classic" hash-MMU 32-bit CPUs, 6xx, 7xx, 7xxx
+ */
+extern void flush_tlb_mm(struct mm_struct *mm);
+extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
+extern void flush_tlb_page_nohash(struct vm_area_struct *vma, unsigned long addr);
+extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
+                           unsigned long end);
+extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
+static inline void local_flush_tlb_page(struct vm_area_struct *vma,
+                                       unsigned long vmaddr)
+{
+       flush_tlb_page(vma, vmaddr);
+}
+static inline void local_flush_tlb_mm(struct mm_struct *mm)
+{
+       flush_tlb_mm(mm);
+}
+
+#endif /* _ASM_POWERPC_TLBFLUSH_H */
index c81793d47af9a830bdfa6450f9135c53263dc6e9..f82ee8a3b561718c4a138b392fe6bfeb2990aea4 100644 (file)
@@ -137,10 +137,9 @@ extern bool __rpte_sub_valid(real_pte_t rpte, unsigned long index);
                shift = mmu_psize_defs[psize].shift;                    \
                for (index = 0; vpn < __end; index++,                   \
                             vpn += (1L << (shift - VPN_SHIFT))) {      \
-                       if (!__split || __rpte_sub_valid(rpte, index))  \
-                               do {
+               if (!__split || __rpte_sub_valid(rpte, index))
 
-#define pte_iterate_hashed_end() } while(0); } } while(0)
+#define pte_iterate_hashed_end()  } } while(0)
 
 #define pte_pagesize_index(mm, addr, pte)      \
        (((pte) & H_PAGE_COMBO)? MMU_PAGE_4K: MMU_PAGE_64K)
index 0387b155f13de95831937cf2bc7b777e51a7fa64..d52a51b2ce7baf170af224d2264a88f746ef58a3 100644 (file)
@@ -3,6 +3,8 @@
 #define _ASM_POWERPC_BOOK3S_64_HASH_H
 #ifdef __KERNEL__
 
+#include <asm/asm-const.h>
+
 /*
  * Common bits between 4K and 64K pages in a linux-style PTE.
  * Additional bits may be defined in pgtable-hash64-*.h
index c459f937d484c5769b700a0fb2fbabf73438895e..50888388a3590966d521c71ef75633af4f636c97 100644 (file)
@@ -32,26 +32,6 @@ static inline int hstate_get_psize(struct hstate *hstate)
        }
 }
 
-#define arch_make_huge_pte arch_make_huge_pte
-static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
-                                      struct page *page, int writable)
-{
-       unsigned long page_shift;
-
-       if (!cpu_has_feature(CPU_FTR_POWER9_DD1))
-               return entry;
-
-       page_shift = huge_page_shift(hstate_vma(vma));
-       /*
-        * We don't support 1G hugetlb pages yet.
-        */
-       VM_WARN_ON(page_shift == mmu_psize_defs[MMU_PAGE_1G].shift);
-       if (page_shift == mmu_psize_defs[MMU_PAGE_2M].shift)
-               return __pte(pte_val(entry) | R_PAGE_LARGE);
-       else
-               return entry;
-}
-
 #ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE
 static inline bool gigantic_page_supported(void)
 {
index 50ed64fba4ae0f17bda5f420809ed3faa40dc783..b3520b549cba47087c6ec79075c25bf308585211 100644 (file)
@@ -12,9 +12,9 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <asm/asm-compat.h>
 #include <asm/page.h>
 #include <asm/bug.h>
+#include <asm/asm-const.h>
 
 /*
  * This is necessary to get the definition of PGTABLE_RANGE which we
@@ -364,6 +364,16 @@ static inline unsigned long hpte_new_to_old_r(unsigned long r)
        return r & ~HPTE_R_3_0_SSIZE_MASK;
 }
 
+static inline unsigned long hpte_get_old_v(struct hash_pte *hptep)
+{
+       unsigned long hpte_v;
+
+       hpte_v = be64_to_cpu(hptep->v);
+       if (cpu_has_feature(CPU_FTR_ARCH_300))
+               hpte_v = hpte_new_to_old_v(hpte_v, be64_to_cpu(hptep->r));
+       return hpte_v;
+}
+
 /*
  * This function sets the AVPN and L fields of the HPTE  appropriately
  * using the base page size and actual page size.
@@ -487,6 +497,9 @@ extern void hpte_init_native(void);
 
 extern void slb_initialize(void);
 extern void slb_flush_and_rebolt(void);
+void slb_flush_all_realmode(void);
+void __slb_restore_bolted_realmode(void);
+void slb_restore_bolted_realmode(void);
 
 extern void slb_vmalloc_update(void);
 extern void slb_set_size(u16 size);
index 01ee40f11f3a1e75a2c3788add486d3329a6e5fd..391ed2c3b6972d5372b60f60dd95085c068eb954 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <linux/slab.h>
 #include <linux/cpumask.h>
+#include <linux/kmemleak.h>
 #include <linux/percpu.h>
 
 struct vmemmap_backing {
@@ -82,6 +83,13 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 
        pgd = kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
                               pgtable_gfp_flags(mm, GFP_KERNEL));
+       /*
+        * Don't scan the PGD for pointers, it contains references to PUDs but
+        * those references are not full pointers and so can't be recognised by
+        * kmemleak.
+        */
+       kmemleak_no_scan(pgd);
+
        /*
         * With hugetlb, we don't clear the second half of the page table.
         * If we share the same slab cache with the pmd or pud level table,
@@ -110,8 +118,19 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
 
 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
 {
-       return kmem_cache_alloc(PGT_CACHE(PUD_CACHE_INDEX),
-               pgtable_gfp_flags(mm, GFP_KERNEL));
+       pud_t *pud;
+
+       pud = kmem_cache_alloc(PGT_CACHE(PUD_CACHE_INDEX),
+                              pgtable_gfp_flags(mm, GFP_KERNEL));
+       /*
+        * Tell kmemleak to ignore the PUD, that means don't scan it for
+        * pointers and don't consider it a leak. PUDs are typically only
+        * referred to by their PGD, but kmemleak is not able to recognise those
+        * as pointers, leading to false leak reports.
+        */
+       kmemleak_ignore(pud);
+
+       return pud;
 }
 
 static inline void pud_free(struct mm_struct *mm, pud_t *pud)
@@ -208,4 +227,11 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
 
 #define check_pgt_cache()      do { } while (0)
 
+extern atomic_long_t direct_pages_count[MMU_PAGE_COUNT];
+static inline void update_page_count(int psize, long count)
+{
+       if (IS_ENABLED(CONFIG_PROC_FS))
+               atomic_long_add(count, &direct_pages_count[psize]);
+}
+
 #endif /* _ASM_POWERPC_BOOK3S_64_PGALLOC_H */
index 42aafba7a30834db7643213a3aec583a3cdd1b6a..676118743a064784cb232218384127b13087cfe0 100644 (file)
@@ -479,9 +479,8 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
 {
        if (full && radix_enabled()) {
                /*
-                * Let's skip the DD1 style pte update here. We know that
-                * this is a full mm pte clear and hence can be sure there is
-                * no parallel set_pte.
+                * We know that this is a full mm pte clear and
+                * hence can be sure there is no parallel set_pte.
                 */
                return radix__ptep_get_and_clear_full(mm, addr, ptep, full);
        }
index ef9f96742ce166ff4327591432e8816fdb848231..7d1a3d1543fc0fc2d699394ac9d0cbf4cd76f9bb 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _ASM_POWERPC_PGTABLE_RADIX_H
 #define _ASM_POWERPC_PGTABLE_RADIX_H
 
+#include <asm/asm-const.h>
+
 #ifndef __ASSEMBLY__
 #include <asm/cmpxchg.h>
 #endif
 #include <asm/book3s/64/radix-4k.h>
 #endif
 
-/*
- * For P9 DD1 only, we need to track whether the pte's huge.
- */
-#define R_PAGE_LARGE   _RPAGE_RSV1
-
-
 #ifndef __ASSEMBLY__
 #include <asm/book3s/64/tlbflush-radix.h>
 #include <asm/cpu_has_feature.h>
@@ -36,6 +32,9 @@
 #define RADIX_PUD_BAD_BITS             0x60000000000000e0UL
 #define RADIX_PGD_BAD_BITS             0x60000000000000e0UL
 
+#define RADIX_PMD_SHIFT                (PAGE_SHIFT + RADIX_PTE_INDEX_SIZE)
+#define RADIX_PUD_SHIFT                (RADIX_PMD_SHIFT + RADIX_PMD_INDEX_SIZE)
+#define RADIX_PGD_SHIFT                (RADIX_PUD_SHIFT + RADIX_PUD_INDEX_SIZE)
 /*
  * Size of EA range mapped by our pagetables.
  */
@@ -154,20 +153,7 @@ static inline unsigned long radix__pte_update(struct mm_struct *mm,
 {
        unsigned long old_pte;
 
-       if (cpu_has_feature(CPU_FTR_POWER9_DD1)) {
-
-               unsigned long new_pte;
-
-               old_pte = __radix_pte_update(ptep, ~0ul, 0);
-               /*
-                * new value of pte
-                */
-               new_pte = (old_pte | set) & ~clr;
-               radix__flush_tlb_pte_p9_dd1(old_pte, mm, addr);
-               if (new_pte)
-                       __radix_pte_update(ptep, 0, new_pte);
-       } else
-               old_pte = __radix_pte_update(ptep, clr, set);
+       old_pte = __radix_pte_update(ptep, clr, set);
        if (!huge)
                assert_pte_locked(mm, addr);
 
@@ -253,8 +239,6 @@ static inline int radix__pmd_trans_huge(pmd_t pmd)
 
 static inline pmd_t radix__pmd_mkhuge(pmd_t pmd)
 {
-       if (cpu_has_feature(CPU_FTR_POWER9_DD1))
-               return __pmd(pmd_val(pmd) | _PAGE_PTE | R_PAGE_LARGE);
        return __pmd(pmd_val(pmd) | _PAGE_PTE);
 }
 
@@ -285,18 +269,14 @@ static inline unsigned long radix__get_tree_size(void)
        unsigned long rts_field;
        /*
         * We support 52 bits, hence:
-        *  DD1    52-28 = 24, 0b11000
-        *  Others 52-31 = 21, 0b10101
+        * bits 52 - 31 = 21, 0b10101
         * RTS encoding details
         * bits 0 - 3 of rts -> bits 6 - 8 unsigned long
         * bits 4 - 5 of rts -> bits 62 - 63 of unsigned long
         */
-       if (cpu_has_feature(CPU_FTR_POWER9_DD1))
-               rts_field = (0x3UL << 61);
-       else {
-               rts_field = (0x5UL << 5); /* 6 - 8 bits */
-               rts_field |= (0x2UL << 61);
-       }
+       rts_field = (0x5UL << 5); /* 6 - 8 bits */
+       rts_field |= (0x2UL << 61);
+
        return rts_field;
 }
 
index ef5c3f2994c931267b6ccdc1600ab82acee7e782..1154a6dc6d260cb998548b957053c04ea9f81306 100644 (file)
@@ -48,8 +48,6 @@ extern void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmad
 extern void radix__flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr);
 extern void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr);
 extern void radix__flush_tlb_all(void);
-extern void radix__flush_tlb_pte_p9_dd1(unsigned long old_pte, struct mm_struct *mm,
-                                       unsigned long address);
 
 extern void radix__flush_tlb_lpid_page(unsigned int lpid,
                                        unsigned long addr,
diff --git a/arch/powerpc/include/asm/book3s/tlbflush.h b/arch/powerpc/include/asm/book3s/tlbflush.h
new file mode 100644 (file)
index 0000000..dec11de
--- /dev/null
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_POWERPC_BOOK3S_TLBFLUSH_H
+#define _ASM_POWERPC_BOOK3S_TLBFLUSH_H
+
+#ifdef CONFIG_PPC64
+#include <asm/book3s/64/tlbflush.h>
+#else
+#include <asm/book3s/32/tlbflush.h>
+#endif
+
+#endif /* _ASM_POWERPC_BOOK3S_TLBFLUSH_H */
index 0d72ec75da631839bf454866d1c01b1cc769f47e..d5a8d7bf07594b0e0e127db45bf03d6129c1bfbc 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <linux/mm.h>
 #include <asm/cputable.h>
-#include <asm/cpu_has_feature.h>
 
 /*
  * No cache flushing is required when address mappings are changed,
index 9b001f1f6b32fcb650dd069989ac52959d92c817..27183871eb3bf667a625b6cbb987070802132f80 100644 (file)
@@ -5,8 +5,8 @@
 #ifdef __KERNEL__
 #include <linux/compiler.h>
 #include <asm/synch.h>
-#include <asm/asm-compat.h>
 #include <linux/bug.h>
+#include <asm/asm-405.h>
 
 #ifdef __BIG_ENDIAN
 #define BITOFF_CAL(size, off)  ((sizeof(u32) - size - off) * BITS_PER_BYTE)
diff --git a/arch/powerpc/include/asm/code-patching-asm.h b/arch/powerpc/include/asm/code-patching-asm.h
new file mode 100644 (file)
index 0000000..ed7b144
--- /dev/null
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2018, Michael Ellerman, IBM Corporation.
+ */
+#ifndef _ASM_POWERPC_CODE_PATCHING_ASM_H
+#define _ASM_POWERPC_CODE_PATCHING_ASM_H
+
+/* Define a "site" that can be patched */
+.macro patch_site label name
+       .pushsection ".rodata"
+       .balign 4
+       .global \name
+\name:
+       .4byte  \label - .
+       .popsection
+.endm
+
+#endif /* _ASM_POWERPC_CODE_PATCHING_ASM_H */
index 812535f40124efddf601c6f53e3b74a52199715d..31733a95bbd052bda1038f8160b127181d3cffc2 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/ppc-opcode.h>
 #include <linux/string.h>
 #include <linux/kallsyms.h>
+#include <asm/asm-compat.h>
 
 /* Flags for create_branch:
  * "b"   == create_branch(addr, target, 0);
@@ -32,6 +33,8 @@ unsigned int create_cond_branch(const unsigned int *addr,
 int patch_branch(unsigned int *addr, unsigned long target, int flags);
 int patch_instruction(unsigned int *addr, unsigned int instr);
 int raw_patch_instruction(unsigned int *addr, unsigned int instr);
+int patch_instruction_site(s32 *addr, unsigned int instr);
+int patch_branch_site(s32 *site, unsigned long target, int flags);
 
 int instr_is_relative_branch(unsigned int instr);
 int instr_is_relative_link_branch(unsigned int instr);
index e210a83eb19646e8483e4b33410cb17fbf531bbd..43e5f31fe64d142584512079ca206b6ebb68068f 100644 (file)
@@ -79,6 +79,19 @@ struct stop_sprs {
        u64 mmcra;
 };
 
+#define PNV_IDLE_NAME_LEN    16
+struct pnv_idle_states_t {
+       char name[PNV_IDLE_NAME_LEN];
+       u32 latency_ns;
+       u32 residency_ns;
+       u64 psscr_val;
+       u64 psscr_mask;
+       u32 flags;
+       bool valid;
+};
+
+extern struct pnv_idle_states_t *pnv_idle_states;
+extern int nr_pnv_idle_states;
 extern u32 pnv_fastsleep_workaround_at_entry[];
 extern u32 pnv_fastsleep_workaround_at_exit[];
 
index 9c0a3083571ba84444826ed13bf8ee34520e2fb8..29f49a35d6eecee903ee04ccf3732fadc2971070 100644 (file)
@@ -4,9 +4,8 @@
 
 
 #include <linux/types.h>
-#include <asm/asm-compat.h>
-#include <asm/feature-fixups.h>
 #include <uapi/asm/cputable.h>
+#include <asm/asm-const.h>
 
 #ifndef __ASSEMBLY__
 
@@ -210,7 +209,6 @@ static inline void cpu_feature_keys_init(void) { }
 #define CPU_FTR_DAWR                   LONG_ASM_CONST(0x0000008000000000)
 #define CPU_FTR_DABRX                  LONG_ASM_CONST(0x0000010000000000)
 #define CPU_FTR_PMAO_BUG               LONG_ASM_CONST(0x0000020000000000)
-#define CPU_FTR_POWER9_DD1             LONG_ASM_CONST(0x0000040000000000)
 #define CPU_FTR_POWER9_DD2_1           LONG_ASM_CONST(0x0000080000000000)
 #define CPU_FTR_P9_TM_HV_ASSIST                LONG_ASM_CONST(0x0000100000000000)
 #define CPU_FTR_P9_TM_XER_SO_BUG       LONG_ASM_CONST(0x0000200000000000)
@@ -452,7 +450,6 @@ static inline void cpu_feature_keys_init(void) { }
            CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_DAWR | \
            CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP | CPU_FTR_PKEY)
 #define CPU_FTRS_POWER8E (CPU_FTRS_POWER8 | CPU_FTR_PMAO_BUG)
-#define CPU_FTRS_POWER8_DD1 (CPU_FTRS_POWER8 & ~CPU_FTR_DBELL)
 #define CPU_FTRS_POWER9 (CPU_FTR_LWSYNC | \
            CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_206 |\
            CPU_FTR_MMCRA | CPU_FTR_SMT | \
@@ -464,8 +461,6 @@ static inline void cpu_feature_keys_init(void) { }
            CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_ARCH_207S | \
            CPU_FTR_TM_COMP | CPU_FTR_ARCH_300 | CPU_FTR_PKEY | \
            CPU_FTR_P9_TLBIE_BUG | CPU_FTR_P9_TIDR)
-#define CPU_FTRS_POWER9_DD1 ((CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD1) & \
-                            (~CPU_FTR_SAO))
 #define CPU_FTRS_POWER9_DD2_0 CPU_FTRS_POWER9
 #define CPU_FTRS_POWER9_DD2_1 (CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD2_1)
 #define CPU_FTRS_POWER9_DD2_2 (CPU_FTRS_POWER9 | CPU_FTR_POWER9_DD2_1 | \
@@ -488,17 +483,15 @@ static inline void cpu_feature_keys_init(void) { }
 #ifdef CONFIG_CPU_LITTLE_ENDIAN
 #define CPU_FTRS_POSSIBLE      \
            (CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | CPU_FTRS_POWER8 | \
-            CPU_FTRS_POWER8_DD1 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_VSX_COMP | \
-            CPU_FTRS_POWER9 | CPU_FTRS_POWER9_DD1 | CPU_FTRS_POWER9_DD2_1 | \
-            CPU_FTRS_POWER9_DD2_2)
+            CPU_FTR_ALTIVEC_COMP | CPU_FTR_VSX_COMP | CPU_FTRS_POWER9 | \
+            CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2)
 #else
 #define CPU_FTRS_POSSIBLE      \
            (CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
             CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
-            CPU_FTRS_POWER8 | CPU_FTRS_POWER8_DD1 | CPU_FTRS_CELL | \
-            CPU_FTRS_PA6T | CPU_FTR_VSX_COMP | CPU_FTR_ALTIVEC_COMP | \
-            CPU_FTRS_POWER9 | CPU_FTRS_POWER9_DD1 | CPU_FTRS_POWER9_DD2_1 | \
-            CPU_FTRS_POWER9_DD2_2)
+            CPU_FTRS_POWER8 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \
+            CPU_FTR_VSX_COMP | CPU_FTR_ALTIVEC_COMP | CPU_FTRS_POWER9 | \
+            CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2)
 #endif /* CONFIG_CPU_LITTLE_ENDIAN */
 #endif
 #else
@@ -566,17 +559,15 @@ enum {
 #ifdef CONFIG_CPU_LITTLE_ENDIAN
 #define CPU_FTRS_ALWAYS \
            (CPU_FTRS_POSSIBLE & ~CPU_FTR_HVMODE & CPU_FTRS_POWER7 & \
-            CPU_FTRS_POWER8E & CPU_FTRS_POWER8 & CPU_FTRS_POWER8_DD1 & \
-            CPU_FTRS_POWER9 & CPU_FTRS_POWER9_DD1 & CPU_FTRS_POWER9_DD2_1 & \
-            CPU_FTRS_DT_CPU_BASE)
+            CPU_FTRS_POWER8E & CPU_FTRS_POWER8 & CPU_FTRS_POWER9 & \
+            CPU_FTRS_POWER9_DD2_1 & CPU_FTRS_DT_CPU_BASE)
 #else
 #define CPU_FTRS_ALWAYS                \
            (CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & \
             CPU_FTRS_POWER6 & CPU_FTRS_POWER7 & CPU_FTRS_CELL & \
             CPU_FTRS_PA6T & CPU_FTRS_POWER8 & CPU_FTRS_POWER8E & \
-            CPU_FTRS_POWER8_DD1 & ~CPU_FTR_HVMODE & CPU_FTRS_POSSIBLE & \
-            CPU_FTRS_POWER9 & CPU_FTRS_POWER9_DD1 & CPU_FTRS_POWER9_DD2_1 & \
-            CPU_FTRS_DT_CPU_BASE)
+            ~CPU_FTR_HVMODE & CPU_FTRS_POSSIBLE & CPU_FTRS_POWER9 & \
+            CPU_FTRS_POWER9_DD2_1 & CPU_FTRS_DT_CPU_BASE)
 #endif /* CONFIG_CPU_LITTLE_ENDIAN */
 #endif
 #else
index bc4903badb3ff4e7d158e280a30cd84bbaa56fe2..133672744b2e87c07903ec2cb4b4718c91058445 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/div64.h>
 #include <asm/time.h>
 #include <asm/param.h>
-#include <asm/cpu_has_feature.h>
 
 typedef u64 __nocast cputime_t;
 typedef u64 __nocast cputime64_t;
index 9f2ae0d25e150418f26762d6864646b103196a42..99b84db23e8c361e0f78faa33470f29fe46d9958 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/threads.h>
 
 #include <asm/ppc-opcode.h>
-#include <asm/cpu_has_feature.h>
+#include <asm/feature-fixups.h>
 
 #define PPC_DBELL_MSG_BRDCAST  (0x04000000)
 #define PPC_DBELL_TYPE(x)      (((x) & 0xf) << (63-36))
index 4a2beef7427721eab0129a28696182047c659687..151dff555f5039e1fed593ae4432e38ffe48205a 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/spinlock.h>
 #include <asm/cputable.h>
 #include <asm/cpu_has_feature.h>
+#include <linux/stringify.h>
 
 typedef struct {
        unsigned int base;
index ce5da214ffe5b9571b1e10ec6fb757dba2845170..7756026b95ca8dbacb178176d635cd52a4bc5e43 100644 (file)
@@ -45,7 +45,6 @@ static inline int debugger_break_match(struct pt_regs *regs) { return 0; }
 static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; }
 #endif
 
-void set_breakpoint(struct arch_hw_breakpoint *brk);
 void __set_breakpoint(struct arch_hw_breakpoint *brk);
 bool ppc_breakpoint_available(void);
 #ifdef CONFIG_PPC_ADV_DEBUG_REGS
index 71515d909ed121912d4542b83abe17b988f15df8..0c729e2d0e8a1b555fb2898764848245f432ccfc 100644 (file)
@@ -10,8 +10,6 @@
  */
 
 #include <linux/types.h>
-#include <asm/asm-compat.h>
-#include <asm/feature-fixups.h>
 #include <uapi/asm/cputable.h>
 
 #ifdef CONFIG_PPC_DT_CPU_FTRS
index 677102baf3cdb8960842216d5a59633a0c312c9b..219637ea69a1c934f82ecda06cf3f34d2b8085ad 100644 (file)
@@ -36,13 +36,14 @@ struct pci_dn;
 #ifdef CONFIG_EEH
 
 /* EEH subsystem flags */
-#define EEH_ENABLED            0x01    /* EEH enabled          */
-#define EEH_FORCE_DISABLED     0x02    /* EEH disabled         */
-#define EEH_PROBE_MODE_DEV     0x04    /* From PCI device      */
-#define EEH_PROBE_MODE_DEVTREE 0x08    /* From device tree     */
-#define EEH_VALID_PE_ZERO      0x10    /* PE#0 is valid        */
-#define EEH_ENABLE_IO_FOR_LOG  0x20    /* Enable IO for log    */
-#define EEH_EARLY_DUMP_LOG     0x40    /* Dump log immediately */
+#define EEH_ENABLED            0x01    /* EEH enabled                       */
+#define EEH_FORCE_DISABLED     0x02    /* EEH disabled                      */
+#define EEH_PROBE_MODE_DEV     0x04    /* From PCI device                   */
+#define EEH_PROBE_MODE_DEVTREE 0x08    /* From device tree                  */
+#define EEH_VALID_PE_ZERO      0x10    /* PE#0 is valid                     */
+#define EEH_ENABLE_IO_FOR_LOG  0x20    /* Enable IO for log                 */
+#define EEH_EARLY_DUMP_LOG     0x40    /* Dump log immediately              */
+#define EEH_POSTPONED_PROBE    0x80    /* Powernv may postpone device probe */
 
 /*
  * Delay for PE reset, all in ms
index c40b4380951cb45518656a0e1030280d9253d852..a86feddddad0cdceb012e2249c229fa7f6e31ff2 100644 (file)
@@ -35,6 +35,7 @@
  * implementations as possible.
  */
 #include <asm/head-64.h>
+#include <asm/feature-fixups.h>
 
 /* PACA save area offsets (exgen, exmc, etc) */
 #define EX_R9          0
        b       hrfi_flush_fallback
 
 #ifdef CONFIG_RELOCATABLE
-#define __EXCEPTION_RELON_PROLOG_PSERIES_1(label, h)                   \
+#define __EXCEPTION_PROLOG_2_RELON(label, h)                           \
        mfspr   r11,SPRN_##h##SRR0;     /* save SRR0 */                 \
        LOAD_HANDLER(r12,label);                                        \
        mtctr   r12;                                                    \
        bctr;
 #else
 /* If not relocatable, we can jump directly -- and save messing with LR */
-#define __EXCEPTION_RELON_PROLOG_PSERIES_1(label, h)                   \
+#define __EXCEPTION_PROLOG_2_RELON(label, h)                           \
        mfspr   r11,SPRN_##h##SRR0;     /* save SRR0 */                 \
        mfspr   r12,SPRN_##h##SRR1;     /* and SRR1 */                  \
        li      r10,MSR_RI;                                             \
        mtmsrd  r10,1;                  /* Set RI (EE=0) */             \
        b       label;
 #endif
-#define EXCEPTION_RELON_PROLOG_PSERIES_1(label, h)                     \
-       __EXCEPTION_RELON_PROLOG_PSERIES_1(label, h)                    \
+#define EXCEPTION_PROLOG_2_RELON(label, h)                             \
+       __EXCEPTION_PROLOG_2_RELON(label, h)
 
 /*
- * As EXCEPTION_PROLOG_PSERIES(), except we've already got relocation on
- * so no need to rfid.  Save lr in case we're CONFIG_RELOCATABLE, in which
- * case EXCEPTION_RELON_PROLOG_PSERIES_1 will be using lr.
+ * As EXCEPTION_PROLOG(), except we've already got relocation on so no need to
+ * rfid. Save LR in case we're CONFIG_RELOCATABLE, in which case
+ * EXCEPTION_PROLOG_2_RELON will be using LR.
  */
-#define EXCEPTION_RELON_PROLOG_PSERIES(area, label, h, extra, vec)     \
+#define EXCEPTION_RELON_PROLOG(area, label, h, extra, vec)             \
+       SET_SCRATCH0(r13);              /* save r13 */                  \
        EXCEPTION_PROLOG_0(area);                                       \
        EXCEPTION_PROLOG_1(area, extra, vec);                           \
-       EXCEPTION_RELON_PROLOG_PSERIES_1(label, h)
+       EXCEPTION_PROLOG_2_RELON(label, h)
 
 /*
  * We're short on space and time in the exception prolog, so we can't
@@ -315,7 +317,7 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 #define EXCEPTION_PROLOG_1(area, extra, vec)                           \
        _EXCEPTION_PROLOG_1(area, extra, vec)
 
-#define __EXCEPTION_PROLOG_PSERIES_1(label, h)                         \
+#define __EXCEPTION_PROLOG_2(label, h)                                 \
        ld      r10,PACAKMSR(r13);      /* get MSR value for kernel */  \
        mfspr   r11,SPRN_##h##SRR0;     /* save SRR0 */                 \
        LOAD_HANDLER(r12,label)                                         \
@@ -324,11 +326,11 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
        mtspr   SPRN_##h##SRR1,r10;                                     \
        h##RFI_TO_KERNEL;                                               \
        b       .       /* prevent speculative execution */
-#define EXCEPTION_PROLOG_PSERIES_1(label, h)                           \
-       __EXCEPTION_PROLOG_PSERIES_1(label, h)
+#define EXCEPTION_PROLOG_2(label, h)                                   \
+       __EXCEPTION_PROLOG_2(label, h)
 
 /* _NORI variant keeps MSR_RI clear */
-#define __EXCEPTION_PROLOG_PSERIES_1_NORI(label, h)                    \
+#define __EXCEPTION_PROLOG_2_NORI(label, h)                            \
        ld      r10,PACAKMSR(r13);      /* get MSR value for kernel */  \
        xori    r10,r10,MSR_RI;         /* Clear MSR_RI */              \
        mfspr   r11,SPRN_##h##SRR0;     /* save SRR0 */                 \
@@ -339,13 +341,14 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
        h##RFI_TO_KERNEL;                                               \
        b       .       /* prevent speculative execution */
 
-#define EXCEPTION_PROLOG_PSERIES_1_NORI(label, h)                      \
-       __EXCEPTION_PROLOG_PSERIES_1_NORI(label, h)
+#define EXCEPTION_PROLOG_2_NORI(label, h)                              \
+       __EXCEPTION_PROLOG_2_NORI(label, h)
 
-#define EXCEPTION_PROLOG_PSERIES(area, label, h, extra, vec)           \
+#define EXCEPTION_PROLOG(area, label, h, extra, vec)                   \
+       SET_SCRATCH0(r13);              /* save r13 */                  \
        EXCEPTION_PROLOG_0(area);                                       \
        EXCEPTION_PROLOG_1(area, extra, vec);                           \
-       EXCEPTION_PROLOG_PSERIES_1(label, h);
+       EXCEPTION_PROLOG_2(label, h);
 
 #define __KVMTEST(h, n)                                                        \
        lbz     r10,HSTATE_IN_GUEST(r13);                               \
@@ -416,10 +419,10 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 #endif
 
 /* Do not enable RI */
-#define EXCEPTION_PROLOG_PSERIES_NORI(area, label, h, extra, vec)      \
+#define EXCEPTION_PROLOG_NORI(area, label, h, extra, vec)              \
        EXCEPTION_PROLOG_0(area);                                       \
        EXCEPTION_PROLOG_1(area, extra, vec);                           \
-       EXCEPTION_PROLOG_PSERIES_1_NORI(label, h);
+       EXCEPTION_PROLOG_2_NORI(label, h);
 
 
 #define __KVM_HANDLER(area, h, n)                                      \
@@ -550,10 +553,8 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 /*
  * Exception vectors.
  */
-#define STD_EXCEPTION_PSERIES(vec, label)                      \
-       SET_SCRATCH0(r13);              /* save r13 */          \
-       EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label,             \
-                                EXC_STD, KVMTEST_PR, vec);     \
+#define STD_EXCEPTION(vec, label)                              \
+       EXCEPTION_PROLOG(PACA_EXGEN, label, EXC_STD, KVMTEST_PR, vec);
 
 /* Version of above for when we have to branch out-of-line */
 #define __OOL_EXCEPTION(vec, label, hdlr)                      \
@@ -561,36 +562,31 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
        EXCEPTION_PROLOG_0(PACA_EXGEN)                          \
        b hdlr;
 
-#define STD_EXCEPTION_PSERIES_OOL(vec, label)                  \
+#define STD_EXCEPTION_OOL(vec, label)                          \
        EXCEPTION_PROLOG_1(PACA_EXGEN, KVMTEST_PR, vec);        \
-       EXCEPTION_PROLOG_PSERIES_1(label, EXC_STD)
+       EXCEPTION_PROLOG_2(label, EXC_STD)
 
 #define STD_EXCEPTION_HV(loc, vec, label)                      \
-       SET_SCRATCH0(r13);      /* save r13 */                  \
-       EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label,             \
-                                EXC_HV, KVMTEST_HV, vec);
+       EXCEPTION_PROLOG(PACA_EXGEN, label, EXC_HV, KVMTEST_HV, vec);
 
 #define STD_EXCEPTION_HV_OOL(vec, label)                       \
        EXCEPTION_PROLOG_1(PACA_EXGEN, KVMTEST_HV, vec);        \
-       EXCEPTION_PROLOG_PSERIES_1(label, EXC_HV)
+       EXCEPTION_PROLOG_2(label, EXC_HV)
 
-#define STD_RELON_EXCEPTION_PSERIES(loc, vec, label)   \
+#define STD_RELON_EXCEPTION(loc, vec, label)           \
        /* No guest interrupts come through here */     \
-       SET_SCRATCH0(r13);              /* save r13 */  \
-       EXCEPTION_RELON_PROLOG_PSERIES(PACA_EXGEN, label, EXC_STD, NOTEST, vec);
+       EXCEPTION_RELON_PROLOG(PACA_EXGEN, label, EXC_STD, NOTEST, vec);
 
-#define STD_RELON_EXCEPTION_PSERIES_OOL(vec, label)            \
+#define STD_RELON_EXCEPTION_OOL(vec, label)                    \
        EXCEPTION_PROLOG_1(PACA_EXGEN, NOTEST, vec);            \
-       EXCEPTION_RELON_PROLOG_PSERIES_1(label, EXC_STD)
+       EXCEPTION_PROLOG_2_RELON(label, EXC_STD)
 
 #define STD_RELON_EXCEPTION_HV(loc, vec, label)                \
-       SET_SCRATCH0(r13);      /* save r13 */          \
-       EXCEPTION_RELON_PROLOG_PSERIES(PACA_EXGEN, label,       \
-                                      EXC_HV, KVMTEST_HV, vec);
+       EXCEPTION_RELON_PROLOG(PACA_EXGEN, label, EXC_HV, KVMTEST_HV, vec);
 
 #define STD_RELON_EXCEPTION_HV_OOL(vec, label)                 \
        EXCEPTION_PROLOG_1(PACA_EXGEN, KVMTEST_HV, vec);        \
-       EXCEPTION_RELON_PROLOG_PSERIES_1(label, EXC_HV)
+       EXCEPTION_PROLOG_2_RELON(label, EXC_HV)
 
 /* This associate vector numbers with bits in paca->irq_happened */
 #define SOFTEN_VALUE_0x500     PACA_IRQ_EE
@@ -627,55 +623,45 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 #define SOFTEN_NOTEST_PR(vec, bitmask) _SOFTEN_TEST(EXC_STD, vec, bitmask)
 #define SOFTEN_NOTEST_HV(vec, bitmask) _SOFTEN_TEST(EXC_HV, vec, bitmask)
 
-#define __MASKABLE_EXCEPTION_PSERIES(vec, label, h, extra, bitmask)    \
+#define __MASKABLE_EXCEPTION(vec, label, h, extra, bitmask)            \
        SET_SCRATCH0(r13);    /* save r13 */                            \
        EXCEPTION_PROLOG_0(PACA_EXGEN);                                 \
        MASKABLE_EXCEPTION_PROLOG_1(PACA_EXGEN, extra, vec, bitmask);   \
-       EXCEPTION_PROLOG_PSERIES_1(label, h);
+       EXCEPTION_PROLOG_2(label, h);
 
-#define _MASKABLE_EXCEPTION_PSERIES(vec, label, h, extra, bitmask)     \
-       __MASKABLE_EXCEPTION_PSERIES(vec, label, h, extra, bitmask)
+#define MASKABLE_EXCEPTION(vec, label, bitmask)                                \
+       __MASKABLE_EXCEPTION(vec, label, EXC_STD, SOFTEN_TEST_PR, bitmask)
 
-#define MASKABLE_EXCEPTION_PSERIES(loc, vec, label, bitmask)           \
-       _MASKABLE_EXCEPTION_PSERIES(vec, label,                         \
-                                   EXC_STD, SOFTEN_TEST_PR, bitmask)
-
-#define MASKABLE_EXCEPTION_PSERIES_OOL(vec, label, bitmask)            \
+#define MASKABLE_EXCEPTION_OOL(vec, label, bitmask)                    \
        MASKABLE_EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_TEST_PR, vec, bitmask);\
-       EXCEPTION_PROLOG_PSERIES_1(label, EXC_STD)
+       EXCEPTION_PROLOG_2(label, EXC_STD)
 
-#define MASKABLE_EXCEPTION_HV(loc, vec, label, bitmask)                        \
-       _MASKABLE_EXCEPTION_PSERIES(vec, label,                         \
-                                   EXC_HV, SOFTEN_TEST_HV, bitmask)
+#define MASKABLE_EXCEPTION_HV(vec, label, bitmask)                     \
+       __MASKABLE_EXCEPTION(vec, label, EXC_HV, SOFTEN_TEST_HV, bitmask)
 
 #define MASKABLE_EXCEPTION_HV_OOL(vec, label, bitmask)                 \
        MASKABLE_EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_TEST_HV, vec, bitmask);\
-       EXCEPTION_PROLOG_PSERIES_1(label, EXC_HV)
+       EXCEPTION_PROLOG_2(label, EXC_HV)
 
-#define __MASKABLE_RELON_EXCEPTION_PSERIES(vec, label, h, extra, bitmask) \
+#define __MASKABLE_RELON_EXCEPTION(vec, label, h, extra, bitmask)      \
        SET_SCRATCH0(r13);    /* save r13 */                            \
        EXCEPTION_PROLOG_0(PACA_EXGEN);                                 \
        MASKABLE_EXCEPTION_PROLOG_1(PACA_EXGEN, extra, vec, bitmask);   \
-       EXCEPTION_RELON_PROLOG_PSERIES_1(label, h)
-
-#define _MASKABLE_RELON_EXCEPTION_PSERIES(vec, label, h, extra, bitmask)\
-       __MASKABLE_RELON_EXCEPTION_PSERIES(vec, label, h, extra, bitmask)
+       EXCEPTION_PROLOG_2_RELON(label, h)
 
-#define MASKABLE_RELON_EXCEPTION_PSERIES(loc, vec, label, bitmask)     \
-       _MASKABLE_RELON_EXCEPTION_PSERIES(vec, label,                   \
-                                         EXC_STD, SOFTEN_NOTEST_PR, bitmask)
+#define MASKABLE_RELON_EXCEPTION(vec, label, bitmask)                  \
+       __MASKABLE_RELON_EXCEPTION(vec, label, EXC_STD, SOFTEN_NOTEST_PR, bitmask)
 
-#define MASKABLE_RELON_EXCEPTION_PSERIES_OOL(vec, label, bitmask)      \
+#define MASKABLE_RELON_EXCEPTION_OOL(vec, label, bitmask)              \
        MASKABLE_EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_NOTEST_PR, vec, bitmask);\
-       EXCEPTION_PROLOG_PSERIES_1(label, EXC_STD);
+       EXCEPTION_PROLOG_2(label, EXC_STD);
 
-#define MASKABLE_RELON_EXCEPTION_HV(loc, vec, label, bitmask)          \
-       _MASKABLE_RELON_EXCEPTION_PSERIES(vec, label,                   \
-                                         EXC_HV, SOFTEN_TEST_HV, bitmask)
+#define MASKABLE_RELON_EXCEPTION_HV(vec, label, bitmask)               \
+       __MASKABLE_RELON_EXCEPTION(vec, label, EXC_HV, SOFTEN_TEST_HV, bitmask)
 
 #define MASKABLE_RELON_EXCEPTION_HV_OOL(vec, label, bitmask)           \
        MASKABLE_EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_TEST_HV, vec, bitmask);\
-       EXCEPTION_RELON_PROLOG_PSERIES_1(label, EXC_HV)
+       EXCEPTION_PROLOG_2_RELON(label, EXC_HV)
 
 /*
  * Our exception common code can be passed various "additions"
index 5a23010af600337b89887cab179cf2e9b1b385b0..1e7a33592e297aae7f6e5001c20d3b005eb6d81c 100644 (file)
@@ -195,9 +195,6 @@ struct fadump_crash_info_header {
        struct cpumask  online_mask;
 };
 
-/* Crash memory ranges */
-#define INIT_CRASHMEM_RANGES   (INIT_MEMBLOCK_REGIONS + 2)
-
 struct fad_crash_memory_ranges {
        unsigned long long      base;
        unsigned long long      size;
index fcfd05672b1b82b3ac6f94b23e6b14b3ec431918..33b6f9c892c819c62fa6bbbd503d8f1e66cafb21 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __ASM_POWERPC_FEATURE_FIXUPS_H
 #define __ASM_POWERPC_FEATURE_FIXUPS_H
 
+#include <asm/asm-const.h>
+
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
index 535add3f779133fefcb1422616d0fc3fef23588b..7a051bd21f87912272f190eec30a50ae2d9e0d52 100644 (file)
@@ -14,8 +14,7 @@
 
 #ifdef __KERNEL__
 
-#include <asm/asm-compat.h>
-#include <asm/feature-fixups.h>
+#include <asm/asm-const.h>
 
 /* firmware feature bitmask values */
 
index 6c40dfda59126d59cd3de2fe4c328273841cc350..41cc15c14eee26b1e29781b9eba94cdc000a179d 100644 (file)
@@ -15,7 +15,6 @@
 #define _ASM_FIXMAP_H
 
 #ifndef __ASSEMBLY__
-#include <linux/kernel.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #ifdef CONFIG_HIGHMEM
index 1a944c18c53902645d4621c6ced9b37a34e90c32..94542776a62d630f6c9037e28264fc371d839245 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/uaccess.h>
 #include <asm/errno.h>
 #include <asm/synch.h>
-#include <asm/asm-compat.h>
+#include <asm/asm-405.h>
 
 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
   __asm__ __volatile ( \
index 7e0e93f24cb79d8d62d16c72ed6365168a990425..a4f9478887440340b6dbb487662d5119d7375f20 100644 (file)
@@ -260,22 +260,22 @@ name:
 
 #define EXC_REAL(name, start, size)                                    \
        EXC_REAL_BEGIN(name, start, size);                              \
-       STD_EXCEPTION_PSERIES(start, name##_common);                    \
+       STD_EXCEPTION(start, name##_common);                            \
        EXC_REAL_END(name, start, size);
 
 #define EXC_VIRT(name, start, size, realvec)                           \
        EXC_VIRT_BEGIN(name, start, size);                              \
-       STD_RELON_EXCEPTION_PSERIES(start, realvec, name##_common);     \
+       STD_RELON_EXCEPTION(start, realvec, name##_common);             \
        EXC_VIRT_END(name, start, size);
 
 #define EXC_REAL_MASKABLE(name, start, size, bitmask)                  \
        EXC_REAL_BEGIN(name, start, size);                              \
-       MASKABLE_EXCEPTION_PSERIES(start, start, name##_common, bitmask);\
+       MASKABLE_EXCEPTION(start, name##_common, bitmask);              \
        EXC_REAL_END(name, start, size);
 
 #define EXC_VIRT_MASKABLE(name, start, size, realvec, bitmask)         \
        EXC_VIRT_BEGIN(name, start, size);                              \
-       MASKABLE_RELON_EXCEPTION_PSERIES(start, realvec, name##_common, bitmask);\
+       MASKABLE_RELON_EXCEPTION(realvec, name##_common, bitmask);      \
        EXC_VIRT_END(name, start, size);
 
 #define EXC_REAL_HV(name, start, size)                                 \
@@ -295,7 +295,7 @@ name:
 
 #define __TRAMP_REAL_OOL(name, vec)                                    \
        TRAMP_REAL_BEGIN(tramp_real_##name);                            \
-       STD_EXCEPTION_PSERIES_OOL(vec, name##_common);                  \
+       STD_EXCEPTION_OOL(vec, name##_common);
 
 #define EXC_REAL_OOL(name, start, size)                                        \
        __EXC_REAL_OOL(name, start, size);                              \
@@ -306,7 +306,7 @@ name:
 
 #define __TRAMP_REAL_OOL_MASKABLE(name, vec, bitmask)                  \
        TRAMP_REAL_BEGIN(tramp_real_##name);                            \
-       MASKABLE_EXCEPTION_PSERIES_OOL(vec, name##_common, bitmask);    \
+       MASKABLE_EXCEPTION_OOL(vec, name##_common, bitmask);
 
 #define EXC_REAL_OOL_MASKABLE(name, start, size, bitmask)              \
        __EXC_REAL_OOL_MASKABLE(name, start, size);                     \
@@ -346,7 +346,7 @@ name:
 
 #define __TRAMP_VIRT_OOL(name, realvec)                                        \
        TRAMP_VIRT_BEGIN(tramp_virt_##name);                            \
-       STD_RELON_EXCEPTION_PSERIES_OOL(realvec, name##_common);        \
+       STD_RELON_EXCEPTION_OOL(realvec, name##_common);
 
 #define EXC_VIRT_OOL(name, start, size, realvec)                       \
        __EXC_VIRT_OOL(name, start, size);                              \
@@ -357,7 +357,7 @@ name:
 
 #define __TRAMP_VIRT_OOL_MASKABLE(name, realvec, bitmask)              \
        TRAMP_VIRT_BEGIN(tramp_virt_##name);                            \
-       MASKABLE_RELON_EXCEPTION_PSERIES_OOL(realvec, name##_common, bitmask);\
+       MASKABLE_RELON_EXCEPTION_OOL(realvec, name##_common, bitmask);
 
 #define EXC_VIRT_OOL_MASKABLE(name, start, size, realvec, bitmask)     \
        __EXC_VIRT_OOL_MASKABLE(name, start, size);                     \
index cec820f961da04e4d74c889b245aa6f5a3ee24c6..a4b65b186ec67cb1ea328a1f192ce648fcf6ffd1 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <linux/interrupt.h>
 #include <asm/kmap_types.h>
-#include <asm/tlbflush.h>
+#include <asm/cacheflush.h>
 #include <asm/page.h>
 #include <asm/fixmap.h>
 
index 3225eb6402cc61d5538d9a9e320dc651a78ab17a..2d00cc53008336d0044f24a41d32c26d815a9148 100644 (file)
@@ -84,9 +84,6 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr,
        return dir + idx;
 }
 
-pte_t *huge_pte_offset_and_shift(struct mm_struct *mm,
-                                unsigned long addr, unsigned *shift);
-
 void flush_dcache_icache_hugepage(struct page *page);
 
 int slice_is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
index 662c8347d699bec0af0d42ff5e6a8ffa6baee809..a0b17f9f1ea4e5c40e1b2d7a2c6e1aa913759ea5 100644 (file)
 #define H_CPU_CHAR_BRANCH_HINTS_HONORED        (1ull << 58) // IBM bit 5
 #define H_CPU_CHAR_THREAD_RECONFIG_CTRL        (1ull << 57) // IBM bit 6
 #define H_CPU_CHAR_COUNT_CACHE_DISABLED        (1ull << 56) // IBM bit 7
+#define H_CPU_CHAR_BCCTR_FLUSH_ASSIST  (1ull << 54) // IBM bit 9
 
 #define H_CPU_BEHAV_FAVOUR_SECURITY    (1ull << 63) // IBM bit 0
 #define H_CPU_BEHAV_L1D_FLUSH_PR       (1ull << 62) // IBM bit 1
 #define H_CPU_BEHAV_BNDS_CHK_SPEC_BAR  (1ull << 61) // IBM bit 2
+#define H_CPU_BEHAV_FLUSH_COUNT_CACHE  (1ull << 58) // IBM bit 5
 
 /* Flag values used in H_REGISTER_PROC_TBL hcall */
 #define PROC_TABLE_OP_MASK     0x18
index 27d6e3c8fde9b92eb489be59ed27769edb30c939..ece4dc89c90becb2accebc74f2747fe4d0580121 100644 (file)
@@ -56,6 +56,7 @@ struct perf_event_attr;
 struct perf_event;
 struct pmu;
 struct perf_sample_data;
+struct task_struct;
 
 #define HW_BREAKPOINT_ALIGN 0x7
 
index e151774cb5772da5dc92d524a12b595a5750bcc4..32a18f2f49bc80ed98f7af4e101ba6c8f47bacb2 100644 (file)
@@ -253,14 +253,16 @@ static inline bool lazy_irq_pending(void)
 
 /*
  * This is called by asynchronous interrupts to conditionally
- * re-enable hard interrupts when soft-disabled after having
- * cleared the source of the interrupt
+ * re-enable hard interrupts after having cleared the source
+ * of the interrupt. They are kept disabled if there is a different
+ * soft-masked interrupt pending that requires hard masking.
  */
 static inline void may_hard_irq_enable(void)
 {
-       get_paca()->irq_happened &= ~PACA_IRQ_HARD_DIS;
-       if (!(get_paca()->irq_happened & PACA_IRQ_MUST_HARD_MASK))
+       if (!(get_paca()->irq_happened & PACA_IRQ_MUST_HARD_MASK)) {
+               get_paca()->irq_happened &= ~PACA_IRQ_HARD_DIS;
                __hard_irq_enable();
+       }
 }
 
 static inline bool arch_irq_disabled_regs(struct pt_regs *regs)
index 20febe0b7f32b80892fba89c3a0179f71e629539..ab3a4fba38e397ca7240eadacd98fa1e8beee73f 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/machdep.h>
 #include <asm/types.h>
 #include <asm/pci-bridge.h>
+#include <asm/asm-const.h>
 
 #define IOMMU_PAGE_SHIFT_4K      12
 #define IOMMU_PAGE_SIZE_4K       (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K)
@@ -69,6 +70,8 @@ struct iommu_table_ops {
                        long index,
                        unsigned long *hpa,
                        enum dma_data_direction *direction);
+
+       __be64 *(*useraddrptr)(struct iommu_table *tbl, long index, bool alloc);
 #endif
        void (*clear)(struct iommu_table *tbl,
                        long index, long npages);
@@ -117,15 +120,16 @@ struct iommu_table {
        unsigned long *it_map;       /* A simple allocation bitmap for now */
        unsigned long  it_page_shift;/* table iommu page size */
        struct list_head it_group_list;/* List of iommu_table_group_link */
-       unsigned long *it_userspace; /* userspace view of the table */
+       __be64 *it_userspace; /* userspace view of the table */
        struct iommu_table_ops *it_ops;
        struct kref    it_kref;
+       int it_nid;
 };
 
+#define IOMMU_TABLE_USERSPACE_ENTRY_RM(tbl, entry) \
+               ((tbl)->it_ops->useraddrptr((tbl), (entry), false))
 #define IOMMU_TABLE_USERSPACE_ENTRY(tbl, entry) \
-               ((tbl)->it_userspace ? \
-                       &((tbl)->it_userspace[(entry) - (tbl)->it_offset]) : \
-                       NULL)
+               ((tbl)->it_ops->useraddrptr((tbl), (entry), true))
 
 /* Pure 2^n version of get_order */
 static inline __attribute_const__
index 9a287e0ac8b16343e61ab9cc146957bfc4fb85b1..a3b2cf940b4ea076fd4e4d389c7e03beb54d074f 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/types.h>
 
 #include <asm/feature-fixups.h>
-#include <asm/asm-compat.h>
+#include <asm/asm-const.h>
 
 #define JUMP_ENTRY_TYPE                stringify_in_c(FTR_ENTRY_LONG)
 #define JUMP_LABEL_NOP_SIZE    4
index e5f048bbcb7c43569a0b0d9e8155b1f2732d4839..931260b59ac6563e0f73f74a470b4a900b6f569a 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef ASM_KVM_BOOKE_HV_ASM_H
 #define ASM_KVM_BOOKE_HV_ASM_H
 
+#include <asm/feature-fixups.h>
+
 #ifdef __ASSEMBLY__
 
 /*
index cb57f29f531ded91f9b786e9be48015e882c082f..295b3dbb2698b91f18c742cc070639303f969135 100644 (file)
@@ -5,7 +5,7 @@
  * PPC440 support
  */
 
-#include <asm/page.h>
+#include <asm/asm-const.h>
 
 #define PPC44x_MMUCR_TID       0x000000ff
 #define PPC44x_MMUCR_STS       0x00010000
@@ -124,19 +124,19 @@ typedef struct {
 /* Size of the TLBs used for pinning in lowmem */
 #define PPC_PIN_SIZE   (1 << 28)       /* 256M */
 
-#if (PAGE_SHIFT == 12)
+#if defined(CONFIG_PPC_4K_PAGES)
 #define PPC44x_TLBE_SIZE       PPC44x_TLB_4K
 #define PPC47x_TLBE_SIZE       PPC47x_TLB0_4K
 #define mmu_virtual_psize      MMU_PAGE_4K
-#elif (PAGE_SHIFT == 14)
+#elif defined(CONFIG_PPC_16K_PAGES)
 #define PPC44x_TLBE_SIZE       PPC44x_TLB_16K
 #define PPC47x_TLBE_SIZE       PPC47x_TLB0_16K
 #define mmu_virtual_psize      MMU_PAGE_16K
-#elif (PAGE_SHIFT == 16)
+#elif defined(CONFIG_PPC_64K_PAGES)
 #define PPC44x_TLBE_SIZE       PPC44x_TLB_64K
 #define PPC47x_TLBE_SIZE       PPC47x_TLB0_64K
 #define mmu_virtual_psize      MMU_PAGE_64K
-#elif (PAGE_SHIFT == 18)
+#elif defined(CONFIG_PPC_256K_PAGES)
 #define PPC44x_TLBE_SIZE       PPC44x_TLB_256K
 #define mmu_virtual_psize      MMU_PAGE_256K
 #else
index 61d15ce92278dcb434482639b5fb5ecbc17de353..13ea441ac5319e27e1466362fde8f700d0b8f231 100644 (file)
@@ -5,8 +5,7 @@
 
 #include <linux/types.h>
 
-#include <asm/asm-compat.h>
-#include <asm/feature-fixups.h>
+#include <asm/asm-const.h>
 
 /*
  * MMU features bit definitions
index 7c46a98cc7f4700d7361c8f4a5571bef9f1e3cfd..a507a65b0866b9907cbf1cce71711c2ef1fa0765 100644 (file)
@@ -8,7 +8,8 @@
 #ifndef __ASSEMBLY__
 #include <linux/sched.h>
 #include <linux/threads.h>
-#include <asm/io.h>                    /* For sub-arch specific PPC_PIN_SIZE */
+#include <asm/mmu.h>                   /* For sub-arch specific PPC_PIN_SIZE */
+#include <asm/asm-405.h>
 
 extern unsigned long ioremap_bot;
 
@@ -222,10 +223,6 @@ static inline unsigned long long pte_update(pte_t *p,
 }
 #endif /* CONFIG_PTE_64BIT */
 
-/*
- * 2.6 calls this without flushing the TLB entry; this is wrong
- * for our hash-based implementation, we fix that up here.
- */
 #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
 static inline int __ptep_test_and_clear_young(unsigned int context, unsigned long addr, pte_t *ptep)
 {
index dd0c7236208f243d7f4503dec5dd4391844d1c46..7cd6809f4d332321e5f7eb806693e94fd5915b48 100644 (file)
@@ -3,11 +3,12 @@
 #define _ASM_POWERPC_NOHASH_64_PGTABLE_H
 /*
  * This file contains the functions and defines necessary to modify and use
- * the ppc64 hashed page table.
+ * the ppc64 non-hashed page table.
  */
 
 #include <asm/nohash/64/pgtable-4k.h>
 #include <asm/barrier.h>
+#include <asm/asm-const.h>
 
 #ifdef CONFIG_PPC_64K_PAGES
 #error "Page size not supported"
@@ -37,7 +38,7 @@
 
 /*
  * The vmalloc space starts at the beginning of that region, and
- * occupies half of it on hash CPUs and a quarter of it on Book3E
+ * occupies a quarter of it on Book3E
  * (we keep a quarter for the virtual memmap)
  */
 #define VMALLOC_START  KERN_VIRT_START
@@ -77,7 +78,7 @@
 
 /*
  * Defines the address of the vmemap area, in its own region on
- * hash table CPUs and after the vmalloc space on Book3E
+ * after the vmalloc space on Book3E
  */
 #define VMEMMAP_BASE           VMALLOC_END
 #define VMEMMAP_END            KERN_IO_START
@@ -247,14 +248,6 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
        pte_update(mm, addr, ptep, _PAGE_RW, 0, 1);
 }
 
-/*
- * We currently remove entries from the hashtable regardless of whether
- * the entry was young or dirty. The generic routines only flush if the
- * entry was young or dirty which is not good enough.
- *
- * We should be more intelligent about this but for the moment we override
- * these functions and force a tlb flush unconditionally
- */
 #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
 #define ptep_clear_flush_young(__vma, __address, __ptep)               \
 ({                                                                     \
@@ -278,9 +271,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr,
 }
 
 
-/* Set the dirty and/or accessed bits atomically in a linux PTE, this
- * function doesn't need to flush the hash entry
- */
+/* Set the dirty and/or accessed bits atomically in a linux PTE */
 static inline void __ptep_set_access_flags(struct vm_area_struct *vma,
                                           pte_t *ptep, pte_t entry,
                                           unsigned long address,
diff --git a/arch/powerpc/include/asm/nohash/tlbflush.h b/arch/powerpc/include/asm/nohash/tlbflush.h
new file mode 100644 (file)
index 0000000..b1d8fec
--- /dev/null
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_POWERPC_NOHASH_TLBFLUSH_H
+#define _ASM_POWERPC_NOHASH_TLBFLUSH_H
+
+/*
+ * TLB flushing:
+ *
+ *  - flush_tlb_mm(mm) flushes the specified mm context TLB's
+ *  - flush_tlb_page(vma, vmaddr) flushes one page
+ *  - local_flush_tlb_mm(mm, full) flushes the specified mm context on
+ *                           the local processor
+ *  - local_flush_tlb_page(vma, vmaddr) flushes one page on the local processor
+ *  - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB
+ *  - flush_tlb_range(vma, start, end) flushes a range of pages
+ *  - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
+ *
+ */
+
+/*
+ * TLB flushing for software loaded TLB chips
+ *
+ * TODO: (CONFIG_FSL_BOOKE) determine if flush_tlb_range &
+ * flush_tlb_kernel_range are best implemented as tlbia vs
+ * specific tlbie's
+ */
+
+struct vm_area_struct;
+struct mm_struct;
+
+#define MMU_NO_CONTEXT         ((unsigned int)-1)
+
+extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
+                           unsigned long end);
+extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
+
+extern void local_flush_tlb_mm(struct mm_struct *mm);
+extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
+
+extern void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
+                                  int tsize, int ind);
+
+#ifdef CONFIG_SMP
+extern void flush_tlb_mm(struct mm_struct *mm);
+extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
+extern void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
+                            int tsize, int ind);
+#else
+#define flush_tlb_mm(mm)               local_flush_tlb_mm(mm)
+#define flush_tlb_page(vma,addr)       local_flush_tlb_page(vma,addr)
+#define __flush_tlb_page(mm,addr,p,i)  __local_flush_tlb_page(mm,addr,p,i)
+#endif
+
+#endif /* _ASM_POWERPC_NOHASH_TLBFLUSH_H */
index 3bab299eda491649979a99d235376ecd096e8f2b..8365353330b43e79f89fa9b55a00bc2a58ae5b06 100644 (file)
 #define OPAL_NPU_SPA_CLEAR_CACHE               160
 #define OPAL_NPU_TL_SET                                161
 #define OPAL_SENSOR_READ_U64                   162
+#define OPAL_SENSOR_GROUP_ENABLE               163
 #define OPAL_PCI_GET_PBCQ_TUNNEL_BAR           164
 #define OPAL_PCI_SET_PBCQ_TUNNEL_BAR           165
-#define OPAL_LAST                              165
+#define        OPAL_NX_COPROC_INIT                     167
+#define OPAL_LAST                              167
 
 #define QUIESCE_HOLD                   1 /* Spin all calls at entry */
 #define QUIESCE_REJECT                 2 /* Fail all calls with OPAL_BUSY */
index e1b2910c6e818f16d992466e3fc28669c37e36c9..834e7e29f1e4e0e9b948095aa8959e3f60d4be2a 100644 (file)
@@ -292,6 +292,8 @@ int opal_set_powercap(u32 handle, int token, u32 pcap);
 int opal_get_power_shift_ratio(u32 handle, int token, u32 *psr);
 int opal_set_power_shift_ratio(u32 handle, int token, u32 psr);
 int opal_sensor_group_clear(u32 group_hndl, int token);
+int opal_sensor_group_enable(u32 group_hndl, int token, bool enable);
+int opal_nx_coproc_init(uint32_t chip_id, uint32_t ct);
 
 s64 opal_signal_system_reset(s32 cpu);
 s64 opal_quiesce(u64 shutdown_type, s32 cpu);
@@ -305,6 +307,8 @@ extern void opal_configure_cores(void);
 
 extern int opal_get_chars(uint32_t vtermno, char *buf, int count);
 extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len);
+extern int opal_put_chars_atomic(uint32_t vtermno, const char *buf, int total_len);
+extern int opal_flush_console(uint32_t vtermno);
 
 extern void hvc_opal_init_early(void);
 
@@ -326,6 +330,7 @@ extern int opal_async_wait_response_interruptible(uint64_t token,
                struct opal_msg *msg);
 extern int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data);
 extern int opal_get_sensor_data_u64(u32 sensor_hndl, u64 *sensor_data);
+extern int sensor_group_enable(u32 grp_hndl, bool enable);
 
 struct rtc_time;
 extern time64_t opal_get_boot_time(void);
index 6d34bd71139daddb2ad8b4f2c15b25079267863f..ad4f16164619abd457af28935213cba23bd625a6 100644 (file)
@@ -187,11 +187,6 @@ struct paca_struct {
        u8 subcore_sibling_mask;
        /* Flag to request this thread not to stop */
        atomic_t dont_stop;
-       /*
-        * Pointer to an array which contains pointer
-        * to the sibling threads' paca.
-        */
-       struct paca_struct **thread_sibling_pacas;
        /* The PSSCR value that the kernel requested before going to stop */
        u64 requested_psscr;
 
@@ -252,6 +247,9 @@ struct paca_struct {
        void *rfi_flush_fallback_area;
        u64 l1d_flush_size;
 #endif
+#ifdef CONFIG_PPC_PSERIES
+       u8 *mce_data_buf;               /* buffer to hold per cpu rtas errlog */
+#endif /* CONFIG_PPC_PSERIES */
 } ____cacheline_aligned;
 
 extern void copy_mm_to_paca(struct mm_struct *mm);
index db7be0779d550cd7200fed092f0de94e5c4a8b03..f6a1265face297f6b2cfe9d563dc04fbad93dcc3 100644 (file)
@@ -16,8 +16,7 @@
 #else
 #include <asm/types.h>
 #endif
-#include <asm/asm-compat.h>
-#include <asm/kdump.h>
+#include <asm/asm-const.h>
 
 /*
  * On regular PPC32 page size is 4K (but we support 4K/16K/64K/256K pages
index af04acdb873fcc41bd3e45611de2f5b72119cc81..c0ce17e909efbd00af1c842843e6b17476aba3ab 100644 (file)
@@ -10,6 +10,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <asm/asm-const.h>
+
 /*
  * We always define HW_PAGE_SHIFT to 12 as use of 64K pages remains Linux
  * specific, every notion of page number shared with the firmware, TCEs,
index 5ba80cffb505413db4c1b1496d8ec04e5a465c2e..20ebf153c8714e27c095f43e979b4787d77f8236 100644 (file)
@@ -13,7 +13,8 @@
 
 DECLARE_STATIC_KEY_TRUE(pkey_disabled);
 extern int pkeys_total; /* total pkeys as per device tree */
-extern u32 initial_allocation_mask; /* bits set for reserved keys */
+extern u32 initial_allocation_mask; /*  bits set for the initially allocated keys */
+extern u32 reserved_allocation_mask; /* bits set for reserved keys */
 
 #define ARCH_VM_PKEY_FLAGS (VM_PKEY_BIT0 | VM_PKEY_BIT1 | VM_PKEY_BIT2 | \
                            VM_PKEY_BIT3 | VM_PKEY_BIT4)
@@ -83,19 +84,21 @@ static inline u16 pte_to_pkey_bits(u64 pteflags)
 #define __mm_pkey_is_allocated(mm, pkey)       \
        (mm_pkey_allocation_map(mm) & pkey_alloc_mask(pkey))
 
-#define __mm_pkey_is_reserved(pkey) (initial_allocation_mask & \
+#define __mm_pkey_is_reserved(pkey) (reserved_allocation_mask & \
                                       pkey_alloc_mask(pkey))
 
 static inline bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey)
 {
-       /* A reserved key is never considered as 'explicitly allocated' */
-       return ((pkey < arch_max_pkey()) &&
-               !__mm_pkey_is_reserved(pkey) &&
-               __mm_pkey_is_allocated(mm, pkey));
+       if (pkey < 0 || pkey >= arch_max_pkey())
+               return false;
+
+       /* Reserved keys are never allocated. */
+       if (__mm_pkey_is_reserved(pkey))
+               return false;
+
+       return __mm_pkey_is_allocated(mm, pkey);
 }
 
-extern void __arch_activate_pkey(int pkey);
-extern void __arch_deactivate_pkey(int pkey);
 /*
  * Returns a positive, 5-bit key on success, or -1 on failure.
  * Relies on the mmap_sem to protect against concurrency in mm_pkey_alloc() and
@@ -124,11 +127,6 @@ static inline int mm_pkey_alloc(struct mm_struct *mm)
        ret = ffz((u32)mm_pkey_allocation_map(mm));
        __mm_pkey_allocated(mm, ret);
 
-       /*
-        * Enable the key in the hardware
-        */
-       if (ret > 0)
-               __arch_activate_pkey(ret);
        return ret;
 }
 
@@ -140,10 +138,6 @@ static inline int mm_pkey_free(struct mm_struct *mm, int pkey)
        if (!mm_pkey_is_allocated(mm, pkey))
                return -EINVAL;
 
-       /*
-        * Disable the key in the hardware
-        */
-       __arch_deactivate_pkey(pkey);
        __mm_pkey_free(mm, pkey);
 
        return 0;
@@ -187,6 +181,16 @@ static inline int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
 {
        if (static_branch_likely(&pkey_disabled))
                return -EINVAL;
+
+       /*
+        * userspace should not change pkey-0 permissions.
+        * pkey-0 is associated with every page in the kernel.
+        * If userspace denies any permission on pkey-0, the
+        * kernel cannot operate.
+        */
+       if (pkey == 0)
+               return init_val ? -EINVAL : 0;
+
        return __arch_set_user_pkey_access(tsk, pkey, init_val);
 }
 
index d2d8c28db336a5c51f474fab906ab2ee7be7b118..7f627e3f4da452a523a6b65a779118c34c3a8677 100644 (file)
@@ -50,13 +50,6 @@ int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs,
                               struct pci_dev *dev, int num);
 void pnv_cxl_release_hwirq_ranges(struct cxl_irq_ranges *irqs,
                                  struct pci_dev *dev);
-
-/* Support for the cxl kernel api on the real PHB (instead of vPHB) */
-int pnv_cxl_enable_phb_kernel_api(struct pci_controller *hose, bool enable);
-bool pnv_pci_on_cxl_phb(struct pci_dev *dev);
-struct cxl_afu *pnv_cxl_phb_to_afu(struct pci_controller *hose);
-void pnv_cxl_phb_set_peer_afu(struct pci_dev *dev, struct cxl_afu *afu);
-
 #endif
 
 struct pnv_php_slot {
index 4436887bc415baf3e69d6f284b14a82ca3a07648..665af14850e4249c01153c200a85eff609f1a09d 100644 (file)
@@ -12,8 +12,7 @@
 #ifndef _ASM_POWERPC_PPC_OPCODE_H
 #define _ASM_POWERPC_PPC_OPCODE_H
 
-#include <linux/stringify.h>
-#include <asm/asm-compat.h>
+#include <asm/asm-const.h>
 
 #define        __REG_R0        0
 #define        __REG_R1        1
 #define PPC_INST_STFDX                 0x7c0005ae
 #define PPC_INST_LVX                   0x7c0000ce
 #define PPC_INST_STVX                  0x7c0001ce
+#define PPC_INST_VCMPEQUD              0x100000c7
+#define PPC_INST_VCMPEQUB              0x10000006
 
 /* macros to insert fields into opcodes */
 #define ___PPC_RA(a)   (((a) & 0x1f) << 16)
 #define __PPC_BI(s)    (((s) & 0x1f) << 16)
 #define __PPC_CT(t)    (((t) & 0x0f) << 21)
 #define __PPC_SPR(r)   ((((r) & 0x1f) << 16) | ((((r) >> 5) & 0x1f) << 11))
+#define __PPC_RC21     (0x1 << 10)
 
 /*
  * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
                                       ((IH & 0x7) << 21))
 #define PPC_INVALIDATE_ERAT    PPC_SLBIA(7)
 
+#define VCMPEQUD_RC(vrt, vra, vrb)     stringify_in_c(.long PPC_INST_VCMPEQUD | \
+                             ___PPC_RT(vrt) | ___PPC_RA(vra) | \
+                             ___PPC_RB(vrb) | __PPC_RC21)
+
+#define VCMPEQUB_RC(vrt, vra, vrb)     stringify_in_c(.long PPC_INST_VCMPEQUB | \
+                             ___PPC_RT(vrt) | ___PPC_RA(vra) | \
+                             ___PPC_RB(vrb) | __PPC_RC21)
+
 #endif /* _ASM_POWERPC_PPC_OPCODE_H */
index 75ece56dcd62580cc2761c3da1760fc2e4efc941..b5d023680801b982cb5af2d82a21e943a7af57b9 100644 (file)
@@ -9,6 +9,7 @@
 #include <asm/processor.h>
 #include <asm/ppc-opcode.h>
 #include <asm/firmware.h>
+#include <asm/feature-fixups.h>
 
 #ifdef __ASSEMBLY__
 
index 5debe337ea9d3f1f5b7c699428f0cfabce44435b..52fadded5c1ef653f2448764bf0a3a79295cdeaa 100644 (file)
 #endif /* CONFIG_PPC64 */
 
 #ifndef __ASSEMBLY__
-#include <linux/compiler.h>
-#include <linux/cache.h>
+#include <linux/types.h>
+#include <asm/thread_info.h>
 #include <asm/ptrace.h>
-#include <asm/types.h>
 #include <asm/hw_breakpoint.h>
 
 /* We do _not_ want to define new machine types at all, those must die
index e4923686e43a1c40ded9cd7a9b4f513fdfc08da6..447cbd1bee99fff38a29e4946c99f6b3e4896990 100644 (file)
@@ -24,6 +24,7 @@
 #define _ASM_POWERPC_PTRACE_H
 
 #include <uapi/asm/ptrace.h>
+#include <asm/asm-const.h>
 
 
 #ifdef __powerpc64__
index 562568414cf42ace1e40a012ced84d17abff7295..486b7c83b8c51975f64dde4077b23732d1600995 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <linux/stringify.h>
 #include <asm/cputable.h>
+#include <asm/asm-const.h>
+#include <asm/feature-fixups.h>
 
 /* Pickup Book E specific registers. */
 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
index 3ba9c6f096fcfd38c517a0a2c7882994894268bb..74c2c57c492a33d18f45f5552a146a289fd1a55a 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef __ASM_POWERPC_REG_A2_H__
 #define __ASM_POWERPC_REG_A2_H__
 
+#include <asm/asm-const.h>
+
 #define SPRN_TENSR     0x1b5
 #define SPRN_TENS      0x1b6   /* Thread ENable Set */
 #define SPRN_TENC      0x1b7   /* Thread ENable Clear */
index d7ccf93e627964e1517fbee2385f61e05ef73c91..a21f529c43d96b548690aeff283820ce07a6e4a1 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef __ASM_POWERPC_REG_FSL_EMB_H__
 #define __ASM_POWERPC_REG_FSL_EMB_H__
 
+#include <linux/stringify.h>
+
 #ifndef __ASSEMBLY__
 /* Performance Monitor Registers */
 #define mfpmr(rn)      ({unsigned int rval; \
index 44989b22383c24b92caaf3dbb3d9831c79cd967f..759597bf0fd867bd6d4c151acb8acce7f7f3ff6b 100644 (file)
@@ -22,6 +22,7 @@ enum stf_barrier_type {
 
 void setup_stf_barrier(void);
 void do_stf_barrier_fixups(enum stf_barrier_type types);
+void setup_count_cache_flush(void);
 
 static inline void security_ftr_set(unsigned long feature)
 {
@@ -59,6 +60,9 @@ static inline bool security_ftr_enabled(unsigned long feature)
 // Indirect branch prediction cache disabled
 #define SEC_FTR_COUNT_CACHE_DISABLED   0x0000000000000020ull
 
+// bcctr 2,0,0 triggers a hardware assisted count cache flush
+#define SEC_FTR_BCCTR_FLUSH_ASSIST     0x0000000000000800ull
+
 
 // Features indicating need for Spectre/Meltdown mitigations
 
@@ -74,6 +78,9 @@ static inline bool security_ftr_enabled(unsigned long feature)
 // Firmware configuration indicates user favours security over performance
 #define SEC_FTR_FAVOUR_SECURITY                0x0000000000000200ull
 
+// Software required to flush count cache on context switch
+#define SEC_FTR_FLUSH_COUNT_CACHE      0x0000000000000400ull
+
 
 // Features enabled by default
 #define SEC_FTR_DEFAULT \
index 8721fd004291d43c0bd08987abb96cc6dda90143..1a951b00465d739f0b7268803d9c1a25e92e947f 100644 (file)
@@ -52,11 +52,15 @@ enum l1d_flush_type {
 
 void setup_rfi_flush(enum l1d_flush_type, bool enable);
 void do_rfi_flush_fixups(enum l1d_flush_type types);
+#ifdef CONFIG_PPC_BARRIER_NOSPEC
 void setup_barrier_nospec(void);
+#else
+static inline void setup_barrier_nospec(void) { };
+#endif
 void do_barrier_nospec_fixups(bool enable);
 extern bool barrier_nospec_enabled;
 
-#ifdef CONFIG_PPC_BOOK3S_64
+#ifdef CONFIG_PPC_BARRIER_NOSPEC
 void do_barrier_nospec_fixups_range(bool enable, void *start, void *end);
 #else
 static inline void do_barrier_nospec_fixups_range(bool enable, void *start, void *end) { };
index 29ffaabdf75b55852249bbb354e755dc4da87dac..95b66a0c639b5a30e98957da9bd73f4e54ed6d3b 100644 (file)
@@ -56,7 +56,6 @@ struct smp_ops_t {
        int   (*cpu_bootable)(unsigned int nr);
 };
 
-extern void smp_flush_nmi_ipi(u64 delay_us);
 extern int smp_send_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us);
 extern int smp_send_safe_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us);
 extern void smp_send_debugger_break(void);
index bc66712bdc3c0520e441cbc9a04b3ef73c6b5ae0..28f5dae25db6bedf425b028239d699b0362e48c0 100644 (file)
@@ -6,13 +6,20 @@
 #ifdef CONFIG_SPARSEMEM
 /*
  * SECTION_SIZE_BITS           2^N: how big each section will be
- * MAX_PHYSADDR_BITS           2^N: how much physical address space we have
  * MAX_PHYSMEM_BITS            2^N: how much memory we can have in that space
  */
 #define SECTION_SIZE_BITS       24
-
-#define MAX_PHYSADDR_BITS       46
+/*
+ * If we store section details in page->flags we can't increase the MAX_PHYSMEM_BITS
+ * if we increase SECTIONS_WIDTH we will not store node details in page->flags and
+ * page_to_nid does a page->section->node lookup
+ * Hence only increase for VMEMMAP.
+ */
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
+#define MAX_PHYSMEM_BITS        47
+#else
 #define MAX_PHYSMEM_BITS        46
+#endif
 
 #endif /* CONFIG_SPARSEMEM */
 
index 72dc4ddc2972a06539e41bf9bd51fb7c407b8049..685c72310f5d0e5506d5973d6250449376b7ef46 100644 (file)
@@ -24,9 +24,9 @@
 #include <asm/paca.h>
 #include <asm/hvcall.h>
 #endif
-#include <asm/asm-compat.h>
 #include <asm/synch.h>
 #include <asm/ppc-opcode.h>
+#include <asm/asm-405.h>
 
 #ifdef CONFIG_PPC64
 /* use 0x800000yy when locked, where yy == CPU number */
diff --git a/arch/powerpc/include/asm/stacktrace.h b/arch/powerpc/include/asm/stacktrace.h
new file mode 100644 (file)
index 0000000..6149b53
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Stack trace functions.
+ *
+ * Copyright 2018, Murilo Opsfelder Araujo, IBM Corporation.
+ */
+
+#ifndef _ASM_POWERPC_STACKTRACE_H
+#define _ASM_POWERPC_STACKTRACE_H
+
+void show_user_instructions(struct pt_regs *regs);
+
+#endif /* _ASM_POWERPC_STACKTRACE_H */
index 9b8cedf618f470fad48e8f10f543326944302f38..1647de15a31e7186e438054f99197cf38233a9f9 100644 (file)
@@ -50,6 +50,8 @@ static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
        return __memset64(p, v, n * 8);
 }
 #else
+#define __HAVE_ARCH_STRLEN
+
 extern void *memset16(uint16_t *, uint16_t, __kernel_size_t);
 #endif
 #endif /* __KERNEL__ */
index 6ec546090ba1b186625d0effb5e1f4af64422d4f..aca70fb43147a307384d6918b2d2224d0542f56a 100644 (file)
@@ -3,8 +3,8 @@
 #define _ASM_POWERPC_SYNCH_H 
 #ifdef __KERNEL__
 
-#include <linux/stringify.h>
 #include <asm/feature-fixups.h>
+#include <asm/asm-const.h>
 
 #ifndef __ASSEMBLY__
 extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
index f308dfeb274652abc21f3a3cdd9e16f657e7c2e9..3c0002044bc9e6237e0c5c7a18ca922e315d7231 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef _ASM_POWERPC_THREAD_INFO_H
 #define _ASM_POWERPC_THREAD_INFO_H
 
+#include <asm/asm-const.h>
+
 #ifdef __KERNEL__
 
 #define THREAD_SHIFT           CONFIG_THREAD_SHIFT
@@ -25,7 +27,6 @@
 #include <linux/cache.h>
 #include <asm/processor.h>
 #include <asm/page.h>
-#include <linux/stringify.h>
 #include <asm/accounting.h>
 
 /*
index 9138baccebb0a2eb585a72f865e6686821dbcbfd..f0e571b2dc7c8e00019c6473cbfdaf399578cc4b 100644 (file)
@@ -17,7 +17,6 @@
 #include <asm/pgtable.h>
 #endif
 #include <asm/pgalloc.h>
-#include <asm/tlbflush.h>
 #ifndef __powerpc64__
 #include <asm/page.h>
 #include <asm/mmu.h>
@@ -53,7 +52,8 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
        if (!tlb->page_size)
                tlb->page_size = page_size;
        else if (tlb->page_size != page_size) {
-               tlb_flush_mmu(tlb);
+               if (!tlb->fullmm)
+                       tlb_flush_mmu(tlb);
                /*
                 * update the page size after flush for the new
                 * mmu_gather.
index 7d5a157c783259b713e7ffcdfa7f514c5abb024b..61fba43bf8b21de146735a82ef93b81079e1ceee 100644 (file)
@@ -1,87 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_TLBFLUSH_H
 #define _ASM_POWERPC_TLBFLUSH_H
 
-/*
- * TLB flushing:
- *
- *  - flush_tlb_mm(mm) flushes the specified mm context TLB's
- *  - flush_tlb_page(vma, vmaddr) flushes one page
- *  - local_flush_tlb_mm(mm, full) flushes the specified mm context on
- *                           the local processor
- *  - local_flush_tlb_page(vma, vmaddr) flushes one page on the local processor
- *  - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB
- *  - flush_tlb_range(vma, start, end) flushes a range of pages
- *  - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
- *
- *  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.
- */
-#ifdef __KERNEL__
-
-#ifdef CONFIG_PPC_MMU_NOHASH
-/*
- * TLB flushing for software loaded TLB chips
- *
- * TODO: (CONFIG_FSL_BOOKE) determine if flush_tlb_range &
- * flush_tlb_kernel_range are best implemented as tlbia vs
- * specific tlbie's
- */
-
-struct vm_area_struct;
-struct mm_struct;
-
-#define MMU_NO_CONTEXT         ((unsigned int)-1)
-
-extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
-                           unsigned long end);
-extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
-
-extern void local_flush_tlb_mm(struct mm_struct *mm);
-extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
-
-extern void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
-                                  int tsize, int ind);
-
-#ifdef CONFIG_SMP
-extern void flush_tlb_mm(struct mm_struct *mm);
-extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
-extern void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
-                            int tsize, int ind);
-#else
-#define flush_tlb_mm(mm)               local_flush_tlb_mm(mm)
-#define flush_tlb_page(vma,addr)       local_flush_tlb_page(vma,addr)
-#define __flush_tlb_page(mm,addr,p,i)  __local_flush_tlb_page(mm,addr,p,i)
-#endif
-
-#elif defined(CONFIG_PPC_STD_MMU_32)
-
-#define MMU_NO_CONTEXT      (0)
-/*
- * TLB flushing for "classic" hash-MMU 32-bit CPUs, 6xx, 7xx, 7xxx
- */
-extern void flush_tlb_mm(struct mm_struct *mm);
-extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
-extern void flush_tlb_page_nohash(struct vm_area_struct *vma, unsigned long addr);
-extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
-                           unsigned long end);
-extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
-static inline void local_flush_tlb_page(struct vm_area_struct *vma,
-                                       unsigned long vmaddr)
-{
-       flush_tlb_page(vma, vmaddr);
-}
-static inline void local_flush_tlb_mm(struct mm_struct *mm)
-{
-       flush_tlb_mm(mm);
-}
-
-#elif defined(CONFIG_PPC_BOOK3S_64)
-#include <asm/book3s/64/tlbflush.h>
+#ifdef CONFIG_PPC_BOOK3S
+#include <asm/book3s/tlbflush.h>
 #else
-#error Unsupported MMU type
-#endif
+#include <asm/nohash/tlbflush.h>
+#endif /* !CONFIG_PPC_BOOK3S */
 
-#endif /*__KERNEL__ */
 #endif /* _ASM_POWERPC_TLBFLUSH_H */
index 468653ce844ce094b3cea1c7f44a55f4fce22a49..bac225bb7f64174a066de394e878e94bd9e5b9f7 100644 (file)
@@ -2,7 +2,6 @@
 #ifndef _ARCH_POWERPC_UACCESS_H
 #define _ARCH_POWERPC_UACCESS_H
 
-#include <asm/asm-compat.h>
 #include <asm/ppc_asm.h>
 #include <asm/processor.h>
 #include <asm/page.h>
@@ -250,10 +249,17 @@ do {                                                              \
        }                                                       \
 } while (0)
 
+/*
+ * This is a type: either unsigned long, if the argument fits into
+ * that type, or otherwise unsigned long long.
+ */
+#define __long_type(x) \
+       __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
+
 #define __get_user_nocheck(x, ptr, size)                       \
 ({                                                             \
        long __gu_err;                                          \
-       unsigned long __gu_val;                                 \
+       __long_type(*(ptr)) __gu_val;                           \
        const __typeof__(*(ptr)) __user *__gu_addr = (ptr);     \
        __chk_user_ptr(ptr);                                    \
        if (!is_kernel_addr((unsigned long)__gu_addr))          \
@@ -267,7 +273,7 @@ do {                                                                \
 #define __get_user_check(x, ptr, size)                                 \
 ({                                                                     \
        long __gu_err = -EFAULT;                                        \
-       unsigned long  __gu_val = 0;                                    \
+       __long_type(*(ptr)) __gu_val = 0;                               \
        const __typeof__(*(ptr)) __user *__gu_addr = (ptr);             \
        might_fault();                                                  \
        if (access_ok(VERIFY_READ, __gu_addr, (size))) {                \
@@ -281,7 +287,7 @@ do {                                                                \
 #define __get_user_nosleep(x, ptr, size)                       \
 ({                                                             \
        long __gu_err;                                          \
-       unsigned long __gu_val;                                 \
+       __long_type(*(ptr)) __gu_val;                           \
        const __typeof__(*(ptr)) __user *__gu_addr = (ptr);     \
        __chk_user_ptr(ptr);                                    \
        barrier_nospec();                                       \
index 8d1a2792484f479766de5d59ee0b3205d0034e83..3c704f5dd3ae3dbcbcab58a6ecbb384129386f48 100644 (file)
@@ -87,7 +87,6 @@ extern int  xive_smp_prepare_cpu(unsigned int cpu);
 extern void xive_smp_setup_cpu(void);
 extern void xive_smp_disable_cpu(void);
 extern void xive_teardown_cpu(void);
-extern void xive_kexec_teardown_cpu(int secondary);
 extern void xive_shutdown(void);
 extern void xive_flush_interrupt(void);
 
index 2b4c40b255e4d385ccb087dd88936e85bbc17d55..3b66f2c19c84e0996567d59fdc1f8cb46ab273d5 100644 (file)
@@ -7,10 +7,10 @@ CFLAGS_ptrace.o               += -DUTS_MACHINE='"$(UTS_MACHINE)"'
 
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
-ifeq ($(CONFIG_PPC64),y)
+ifdef CONFIG_PPC64
 CFLAGS_prom_init.o     += $(NO_MINIMAL_TOC)
 endif
-ifeq ($(CONFIG_PPC32),y)
+ifdef CONFIG_PPC32
 CFLAGS_prom_init.o      += -fPIC
 CFLAGS_btext.o         += -fPIC
 endif
@@