1. 18 Jul, 2019 21 commits
  2. 17 Jul, 2019 19 commits
    • Michael Forney's avatar
      objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain · 8e144797
      Michael Forney authored
      The elftoolchain version of libelf has a function named elf_open().
      
      The function name isn't quite accurate anyway, since it also reads all
      the ELF data.  Rename it to elf_read(), which is more accurate.
      
      [ jpoimboe: rename to elf_read(); write commit description ]
      Signed-off-by: default avatarMichael Forney <mforney@mforney.org>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/7ce2d1b35665edf19fd0eb6fbc0b17b81a48e62f.1562793604.git.jpoimboe@redhat.com
      8e144797
    • Michael Forney's avatar
      objtool: Use Elf_Scn typedef instead of assuming struct name · 3c3ea503
      Michael Forney authored
      The libelf implementation might use a different struct name, and the
      Elf_Scn typedef is already used throughout the rest of objtool.
      Signed-off-by: default avatarMichael Forney <mforney@mforney.org>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/d270e1be2835fc2a10acf67535ff2ebd2145bf43.1562793448.git.jpoimboe@redhat.com
      3c3ea503
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v5.3' of git://github.com/andersson/remoteproc · 57ab5f74
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This contains support for hardware spinlock TI K3 AM65x and J721E
        family of SoCs, support for using hwspinlocks from atomic context and
        better error reporting when dealing with hardware disabled in
        DeviceTree"
      
      * tag 'hwlock-v5.3' of git://github.com/andersson/remoteproc:
        hwspinlock: add the 'in_atomic' API
        hwspinlock: document the hwspinlock 'raw' API
        hwspinlock: stm32: implement the relax() ops
        hwspinlock: ignore disabled device
        hwspinlock/omap: Add a trace during probe
        hwspinlock/omap: Add support for TI K3 SoCs
        dt-bindings: hwlock: Update OMAP binding for TI K3 SoCs
      57ab5f74
    • Linus Torvalds's avatar
      Merge tag 'rproc-v5.3' of git://github.com/andersson/remoteproc · fdcec004
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "This adds support for the STM32 remoteproc, additional i.MX platforms
        with Cortex M4 remoteprocs and Qualcomm's QCS404 Compute DSP.
      
        Also initial support for vendor specific resource table entries and
        support for unprocessed Qualcomm firmware files"
      
      * tag 'rproc-v5.3' of git://github.com/andersson/remoteproc:
        remoteproc: stm32: fix building without ARM SMCC
        remoteproc: qcom: q6v5-mss: Fix build error without QCOM_MDT_LOADER
        remoteproc: copy parent dma_pfn_offset for vdev
        remoteproc: qcom: q6v5-mss: Support loading non-split images
        soc: qcom: mdt_loader: Support loading non-split images
        remoteproc: stm32: add an ST stm32_rproc driver
        dt-bindings: remoteproc: add bindings for stm32 remote processor driver
        dt-bindings: stm32: add bindings for ML-AHB interconnect
        remoteproc: Use struct_size() helper
        remoteproc: add vendor resources handling
        remoteproc: imx: Fix typo in "failed"
        remoteproc: imx: Broaden the Kconfig selection logic
        remoteproc,rpmsg: add missing MAINTAINERS file entries
        remoteproc: qcom: qdsp6-adsp: Add support for QCS404 CDSP
        dt-bindings: remoteproc: Rename and amend Hexagon v56 binding
      fdcec004
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v5.3' of git://github.com/andersson/remoteproc · 7636b758
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
       "This contains a DT binding update and a change to make the remote
        function of rpmsg_devices optional"
      
      * tag 'rpmsg-v5.3' of git://github.com/andersson/remoteproc:
        rpmsg: core: Make remove handler for rpmsg driver optional.
        dt-bindings: soc: qcom: Add remote-pid binding for GLINK SMEM
      7636b758
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 3a1d5384
      Linus Torvalds authored
      Pull virtio, vhost updates from Michael Tsirkin:
       "Fixes, features, performance:
      
         - new iommu device
      
         - vhost guest memory access using vmap (just meta-data for now)
      
         - minor fixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio-mmio: add error check for platform_get_irq
        scsi: virtio_scsi: Use struct_size() helper
        iommu/virtio: Add event queue
        iommu/virtio: Add probe request
        iommu: Add virtio-iommu driver
        PCI: OF: Initialize dev->fwnode appropriately
        of: Allow the iommu-map property to omit untranslated devices
        dt-bindings: virtio: Add virtio-pci-iommu node
        dt-bindings: virtio-mmio: Add IOMMU description
        vhost: fix clang build warning
        vhost: access vq metadata through kernel virtual address
        vhost: factor out setting vring addr and num
        vhost: introduce helpers to get the size of metadata area
        vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch()
        vhost: fine grain userspace memory accessors
        vhost: generalize adding used elem
      3a1d5384
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.3-rc1' of git://github.com/awilliam/linux-vfio · 37d4607e
      Linus Torvalds authored
      Pull VFIO updates from Alex Williamson:
      
       - Static symbol cleanup in mdev samples (Kefeng Wang)
      
       - Use vma help in nvlink code (Peng Hao)
      
       - Remove unused code in mbochs sample (YueHaibing)
      
       - Send uevents around mdev registration (Alex Williamson)
      
      * tag 'vfio-v5.3-rc1' of git://github.com/awilliam/linux-vfio:
        mdev: Send uevents around parent device registration
        sample/mdev/mbochs: remove set but not used variable 'mdev_state'
        vfio: vfio_pci_nvlink2: use a vma helper function
        vfio-mdev/samples: make some symbols static
      37d4607e
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 916f562f
      Linus Torvalds authored
      Pull clk updates from Stephen Boyd:
       "This round of clk driver and framework updates is heavy on the driver
        update side. The two main highlights in the core framework are the
        addition of an bulk clk_get API that handles optional clks and an
        extra debugfs file that tells the developer about the current parent
        of a clk.
      
        The driver updates are dominated by i.MX in the diffstat, but that is
        mostly because that SoC has started converting to the clk_hw style of
        clk registration. The next big update is in the Amlogic meson clk
        driver that gained some support for audio, cpu, and temperature clks
        while fixing some PLL issues. Finally, the biggest thing that stands
        out is the conversion of a large part of the Allwinner sunxi-ng driver
        to the new clk parent scheme that uses less strings and more pointer
        comparisons to match clk parents and children up.
      
        In general, it looks like we have a lot of little fixes and tweaks
        here and there to clk data along with the normal addition of a handful
        of new drivers and a couple new core framework features.
      
        Core:
         - Add a 'clk_parent' file in clk debugfs
         - Add a clk_bulk_get_optional() API (with devm too)
      
        New Drivers:
         - Support gated clk controller on MIPS based BCM63XX SoCs
         - Support SiLabs Si5341 and Si5340 chips
         - Support for CPU clks on Raspberry Pi devices
         - Audsys clock driver for MediaTek MT8516 SoCs
      
        Updates:
         - Convert a large portion of the Allwinner sunxi-ng driver to new clk parent scheme
         - Small frequency support for SiLabs Si544 chips
         - Slow clk support for AT91 SAM9X60 SoCs
         - Remove dead code in various clk drivers (-Wunused)
         - Support for Marvell 98DX1135 SoCs
         - Get duty cycle of generic pwm clks
         - Improvement in mmc phase calculation and cleanup of some rate defintions
         - Switch i.MX6 and i.MX7 clock drivers to clk_hw based APIs
         - Add GPIO, SNVS and GIC clocks for i.MX8 drivers
         - Mark imx6sx/ul/ull/sll MMDC_P1_IPG and imx8mm DRAM_APB as critical clock
         - Correct imx7ulp nic1_bus_clk and imx8mm audio_pll2_clk clock setting
         - Add clks for new Exynos5422 Dynamic Memory Controller driver
         - Clock definition for Exynos4412 Mali
         - Add CMM (Color Management Module) clocks on Renesas R-Car H3, M3-N, E3, and D3
         - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas RZ/G2M
         - Support for 32 bit clock IDs in TI's sci-clks for J721e SoCs
         - TI clock probing done from DT by default instead of firmware
         - Fix Amlogic Meson mpll fractional part and spread sprectrum issues
         - Add Amlogic meson8 audio clocks
         - Add Amlogic g12a temperature sensors clocks
         - Add Amlogic g12a and g12b cpu clocks
         - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas R-Car H3, M3-W, and M3-N
         - Add CMM (Color Management Module) clocks on Renesas R-Car M3-W
         - Add Clock Domain support on Renesas RZ/N1"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (190 commits)
        clk: consoldiate the __clk_get_hw() declarations
        clk: sprd: Add check for return value of sprd_clk_regmap_init()
        clk: lochnagar: Update DT binding doc to include the primary SPDIF MCLK
        clk: Add Si5341/Si5340 driver
        dt-bindings: clock: Add silabs,si5341
        clk: clk-si544: Implement small frequency change support
        clk: add BCM63XX gated clock controller driver
        devicetree: document the BCM63XX gated clock bindings
        clk: at91: sckc: use dedicated functions to unregister clock
        clk: at91: sckc: improve error path for sama5d4 sck registration
        clk: at91: sckc: remove unnecessary line
        clk: at91: sckc: improve error path for sam9x5 sck register
        clk: at91: sckc: add support to free slow clock osclillator
        clk: at91: sckc: add support to free slow rc oscillator
        clk: at91: sckc: add support to free slow oscillator
        clk: rockchip: export HDMIPHY clock on rk3228
        clk: rockchip: add watchdog pclk on rk3328
        clk: rockchip: add clock id for hdmi_phy special clock on rk3228
        clk: rockchip: add clock id for watchdog pclk on rk3328
        clk: at91: sckc: add support for SAM9X60
        ...
      916f562f
    • Linus Torvalds's avatar
      Merge tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · edafb6fe
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "A quiet cycle this time.
      
         - ds1307: properly handle oscillator failure flags
      
         - imx-sc: alarm support
      
         - pcf2123: alarm support, correct offset handling
      
         - sun6i: add R40 support
      
         - simplify getting the adapter of an i2c client"
      
      * tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (37 commits)
        rtc: wm831x: Add IRQF_ONESHOT flag
        rtc: stm32: remove one condition check in stm32_rtc_set_alarm()
        rtc: pcf2123: Fix build error
        rtc: interface: Change type of 'count' from int to u64
        rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
        rtc: pcf8563: Fix interrupt trigger method
        rtc: pcf2123: fix negative offset rounding
        rtc: pcf2123: add alarm support
        rtc: pcf2123: use %ptR
        rtc: pcf2123: port to regmap
        rtc: pcf2123: remove sysfs register view
        rtc: rx8025: simplify getting the adapter of a client
        rtc: rx8010: simplify getting the adapter of a client
        rtc: rv8803: simplify getting the adapter of a client
        rtc: m41t80: simplify getting the adapter of a client
        rtc: fm3130: simplify getting the adapter of a client
        rtc: tegra: Drop MODULE_ALIAS
        rtc: sun6i: Add R40 compatible
        dt-bindings: rtc: sun6i: Add the R40 RTC compatible
        dt-bindings: rtc: Convert Allwinner A31 RTC to a schema
        ...
      edafb6fe
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma · 47ebe00b
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
      
       - Add support in dmaengine core to do device node checks for DT devices
         and update bunch of drivers to use that and remove open coding from
         drivers
      
       - New driver/driver support for new hardware, namely:
           - MediaTek UART APDMA
           - Freescale i.mx7ulp edma2
           - Synopsys eDMA IP core version 0
           - Allwinner H6 DMA
      
       - Updates to axi-dma and support for interleaved cyclic transfers
      
       - Greg's debugfs return value check removals on drivers
      
       - Updates to stm32-dma, hsu, dw, pl330, tegra drivers
      
      * tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (68 commits)
        dmaengine: Revert "dmaengine: fsl-edma: add i.mx7ulp edma2 version support"
        dmaengine: at_xdmac: check for non-empty xfers_list before invoking callback
        Documentation: dmaengine: clean up description of dmatest usage
        dmaengine: tegra210-adma: remove PM_CLK dependency
        dmaengine: fsl-edma: add i.mx7ulp edma2 version support
        dt-bindings: dma: fsl-edma: add new i.mx7ulp-edma
        dmaengine: fsl-edma-common: version check for v2 instead
        dmaengine: fsl-edma-common: move dmamux register to another single function
        dmaengine: fsl-edma: add drvdata for fsl-edma
        dmaengine: Revert "dmaengine: fsl-edma: support little endian for edma driver"
        dmaengine: rcar-dmac: Reject zero-length slave DMA requests
        dmaengine: dw: Enable iDMA 32-bit on Intel Elkhart Lake
        dmaengine: dw-edma: fix semicolon.cocci warnings
        dmaengine: sh: usb-dmac: Use [] to denote a flexible array member
        dmaengine: dmatest: timeout value of -1 should specify infinite wait
        dmaengine: dw: Distinguish ->remove() between DW and iDMA 32-bit
        dmaengine: fsl-edma: support little endian for edma driver
        dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width"
        dmagengine: pl330: add code to get reset property
        dt-bindings: pl330: document the optional resets property
        ...
      47ebe00b
    • Linus Torvalds's avatar
      Merge tag 'mips_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · fa121bb3
      Linus Torvalds authored
      Pull MIPS updates from Paul Burton:
       "A light batch this time around but significant improvements for
        certain systems:
      
         - Removal of readq & writeq for MIPS32 kernels where they would
           simply BUG() anyway, allowing drivers or other code that #ifdefs on
           their presence to work properly.
      
         - Improvements for Ingenic JZ4740 systems, including support for the
           external memory controller & pinmuxing fixes for qi_lb60/NanoNote
           systems.
      
         - Improvements for Lantiq systems, in particular around SMP & IPIs.
      
         - DT updates for ralink/MediaTek MT7628a systems to probe & configure
           a bunch more devices.
      
         - Miscellaneous cleanups & build fixes"
      
      * tag 'mips_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits)
        MIPS: fix some more fall through errors in arch/mips
        MIPS: perf events: handle switch statement falling through warnings
        mips/kprobes: Export kprobe_fault_handler()
        MAINTAINERS: Add myself as Ingenic SoCs maintainer
        MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node
        MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node
        MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node
        MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes
        MIPS: ralink: mt7628a.dtsi: Add pinmux DT node
        MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier
        MIPS: lantiq: Add SMP support for lantiq interrupt controller
        MIPS: lantiq: Shorten register names, remove unused macros
        MIPS: lantiq: Fix bitfield masking
        MIPS: lantiq: Remove unused macros
        MIPS: lantiq: Fix attributes of of_device_id structure
        MIPS: lantiq: Change variables to the same type as the source
        MIPS: lantiq: Move macro directly to iomem function
        mips: Remove q-accessors from non-64bit platforms
        FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h
        MIPS: configs: Remove useless UEVENT_HELPER_PATH
        ...
      fa121bb3
    • Linus Torvalds's avatar
      Merge tag 'h8300-for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux · 7d4901c0
      Linus Torvalds authored
      Pull h8300 update from Yoshinori Sato:
       "Remove unused barrier defines"
      
      * tag 'h8300-for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
        H8300: remove unused barrier defines
      7d4901c0
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux · 415bfd9c
      Linus Torvalds authored
      Pull SH updates from Yoshinori Sato.
      
      kprobe fix, defconfig updates and a SH Kconfig fix.
      
      * tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
        arch/sh: Check for kprobe trap number before trying to handle a kprobe trap
        sh: configs: Remove useless UEVENT_HELPER_PATH
        Fix allyesconfig output.
      415bfd9c
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 57a8ec38
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
       "VM:
         - z3fold fixes and enhancements by Henry Burns and Vitaly Wool
      
         - more accurate reclaimed slab caches calculations by Yafang Shao
      
         - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
           Christoph Hellwig
      
         - !CONFIG_MMU fixes by Christoph Hellwig
      
         - new novmcoredd parameter to omit device dumps from vmcore, by
           Kairui Song
      
         - new test_meminit module for testing heap and pagealloc
           initialization, by Alexander Potapenko
      
         - ioremap improvements for huge mappings, by Anshuman Khandual
      
         - generalize kprobe page fault handling, by Anshuman Khandual
      
         - device-dax hotplug fixes and improvements, by Pavel Tatashin
      
         - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
      
         - add pte_devmap() support for arm64, by Robin Murphy
      
         - unify locked_vm accounting with a helper, by Daniel Jordan
      
         - several misc fixes
      
        core/lib:
         - new typeof_member() macro including some users, by Alexey Dobriyan
      
         - make BIT() and GENMASK() available in asm, by Masahiro Yamada
      
         - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
           code generation, by Alexey Dobriyan
      
         - rbtree code size optimizations, by Michel Lespinasse
      
         - convert struct pid count to refcount_t, by Joel Fernandes
      
        get_maintainer.pl:
         - add --no-moderated switch to skip moderated ML's, by Joe Perches
      
        misc:
         - ptrace PTRACE_GET_SYSCALL_INFO interface
      
         - coda updates
      
         - gdb scripts, various"
      
      [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
        fs/select.c: use struct_size() in kmalloc()
        mm: add account_locked_vm utility function
        arm64: mm: implement pte_devmap support
        mm: introduce ARCH_HAS_PTE_DEVMAP
        mm: clean up is_device_*_page() definitions
        mm/mmap: move common defines to mman-common.h
        mm: move MAP_SYNC to asm-generic/mman-common.h
        device-dax: "Hotremove" persistent memory that is used like normal RAM
        mm/hotplug: make remove_memory() interface usable
        device-dax: fix memory and resource leak if hotplug fails
        include/linux/lz4.h: fix spelling and copy-paste errors in documentation
        ipc/mqueue.c: only perform resource calculation if user valid
        include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
        scripts/gdb: add helpers to find and list devices
        scripts/gdb: add lx-genpd-summary command
        drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
        kernel/pid.c: convert struct pid count to refcount_t
        drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
        select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
        select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
        ...
      57a8ec38
    • Gustavo A. R. Silva's avatar
      fs/select.c: use struct_size() in kmalloc() · 43e11fa2
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array.  For example:
      
        struct foo {
             int stuff;
             struct boo entry[];
        };
      
        size = sizeof(struct foo) + count * sizeof(struct boo);
        instance = kmalloc(size, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
        instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      Also, notice that variable size is unnecessary, hence it is removed.
      
      This code was detected with the help of Coccinelle.
      
      Link: http://lkml.kernel.org/r/20190604164226.GA13823@embeddedorSigned-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      43e11fa2
    • Daniel Jordan's avatar
      mm: add account_locked_vm utility function · 79eb597c
      Daniel Jordan authored
      locked_vm accounting is done roughly the same way in five places, so
      unify them in a helper.
      
      Include the helper's caller in the debug print to distinguish between
      callsites.
      
      Error codes stay the same, so user-visible behavior does too.  The one
      exception is that the -EPERM case in tce_account_locked_vm is removed
      because Alexey has never seen it triggered.
      
      [daniel.m.jordan@oracle.com: v3]
        Link: http://lkml.kernel.org/r/20190529205019.20927-1-daniel.m.jordan@oracle.com
      [sfr@canb.auug.org.au: fix mm/util.c]
      Link: http://lkml.kernel.org/r/20190524175045.26897-1-daniel.m.jordan@oracle.comSigned-off-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Tested-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Acked-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Cc: Alan Tull <atull@kernel.org>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Jason Gunthorpe <jgg@mellanox.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Moritz Fischer <mdf@kernel.org>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Steve Sistare <steven.sistare@oracle.com>
      Cc: Wu Hao <hao.wu@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79eb597c
    • Robin Murphy's avatar
      arm64: mm: implement pte_devmap support · 73b20c84
      Robin Murphy authored
      In order for things like get_user_pages() to work on ZONE_DEVICE memory,
      we need a software PTE bit to identify device-backed PFNs.  Hook this up
      along with the relevant helpers to join in with ARCH_HAS_PTE_DEVMAP.
      
      [robin.murphy@arm.com: build fixes]
        Link: http://lkml.kernel.org/r/13026c4e64abc17133bbfa07d7731ec6691c0bcd.1559050949.git.robin.murphy@arm.com
      Link: http://lkml.kernel.org/r/817d92886fc3b33bcbf6e105ee83a74babb3a5aa.1558547956.git.robin.murphy@arm.comSigned-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Oliver O'Halloran <oohall@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      73b20c84
    • Robin Murphy's avatar
      mm: introduce ARCH_HAS_PTE_DEVMAP · 17596731
      Robin Murphy authored
      ARCH_HAS_ZONE_DEVICE is somewhat meaningless in itself, and combined
      with the long-out-of-date comment can lead to the impression than an
      architecture may just enable it (since __add_pages() now "comprehends
      device memory" for itself) and expect things to work.
      
      In practice, however, ZONE_DEVICE users have little chance of
      functioning correctly without __HAVE_ARCH_PTE_DEVMAP, so let's clean
      that up the same way as ARCH_HAS_PTE_SPECIAL and make it the proper
      dependency so the real situation is clearer.
      
      Link: http://lkml.kernel.org/r/87554aa78478a02a63f2c4cf60a847279ae3eb3b.1558547956.git.robin.murphy@arm.comSigned-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Acked-by: default avatarOliver O'Halloran <oohall@gmail.com>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      17596731
    • Robin Murphy's avatar
      mm: clean up is_device_*_page() definitions · 7588adf8
      Robin Murphy authored
      Refactor is_device_{public,private}_page() with is_pci_p2pdma_page() to
      make them all consistent in depending on their respective config options
      even when CONFIG_DEV_PAGEMAP_OPS is enabled for other reasons.  This
      allows a little more compile-time optimisation as well as the conceptual
      and cosmetic cleanup.
      
      Link: http://lkml.kernel.org/r/187c2ab27dea70635d375a61b2f2076d26c032b0.1558547956.git.robin.murphy@arm.comSigned-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Suggested-by: default avatarJerome Glisse <jglisse@redhat.com>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Oliver O'Halloran <oohall@gmail.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7588adf8