1. 06 Dec, 2019 1 commit
    • Linus Torvalds's avatar
      Merge branch 'pipe-rework' (patches from David Howells) · da73fcd8
      Linus Torvalds authored
      Merge two fixes for the pipe rework from David Howells:
       "Here are a couple of patches to fix bugs syzbot found in the pipe
        changes:
      
         - An assertion check will sometimes trip when polling a pipe because
           the ring size and indices used are approximate and may be being
           changed simultaneously.
      
           An equivalent approximate calculation was done previously, but
           without the assertion check, so I've just dropped the check. To
           make it accurate, the pipe mutex would need to be taken or the spin
           lock could be used - but usage of the spinlock would need to be
           rolled out into splice, iov_iter and other places for that.
      
         - The index mask and the max_usage values cannot be cached across
           pipe_wait() as F_SETPIPE_SZ could have been called during the wait.
           This can cause pipe_write() to break"
      
      * pipe-rework:
        pipe: Fix missing mask update after pipe_wait()
        pipe: Remove assertion from pipe_poll()
      da73fcd8
  2. 05 Dec, 2019 39 commits
    • David Howells's avatar
      pipe: Fix missing mask update after pipe_wait() · 8f868d68
      David Howells authored
      Fix pipe_write() to not cache the ring index mask and max_usage as their
      values are invalidated by calling pipe_wait() because the latter
      function drops the pipe lock, thereby allowing F_SETPIPE_SZ change them.
      Without this, pipe_write() may subsequently miscalculate the array
      indices and pipe fullness, leading to an oops like the following:
      
        BUG: KASAN: slab-out-of-bounds in pipe_write+0xc25/0xe10 fs/pipe.c:481
        Write of size 8 at addr ffff8880771167a8 by task syz-executor.3/7987
        ...
        CPU: 1 PID: 7987 Comm: syz-executor.3 Not tainted 5.4.0-rc2-syzkaller #0
        ...
        Call Trace:
          pipe_write+0xc25/0xe10 fs/pipe.c:481
          call_write_iter include/linux/fs.h:1895 [inline]
          new_sync_write+0x3fd/0x7e0 fs/read_write.c:483
          __vfs_write+0x94/0x110 fs/read_write.c:496
          vfs_write+0x18a/0x520 fs/read_write.c:558
          ksys_write+0x105/0x220 fs/read_write.c:611
          __do_sys_write fs/read_write.c:623 [inline]
          __se_sys_write fs/read_write.c:620 [inline]
          __x64_sys_write+0x6e/0xb0 fs/read_write.c:620
          do_syscall_64+0xca/0x5d0 arch/x86/entry/common.c:290
          entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      This is not a problem for pipe_read() as the mask is recalculated on
      each pass of the loop, after pipe_wait() has been called.
      
      Fixes: 8cefc107 ("pipe: Use head and tail pointers for the ring, not cursor and length")
      Reported-by: syzbot+838eb0878ffd51f27c41@syzkaller.appspotmail.com
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Eric Biggers <ebiggers@kernel.org>
      [ Changed it to use a temporary variable 'mask' to avoid long lines -Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8f868d68
    • David Howells's avatar
      pipe: Remove assertion from pipe_poll() · 8c7b8c34
      David Howells authored
      An assertion check was added to pipe_poll() to make sure that the ring
      occupancy isn't seen to overflow the ring size.  However, since no locks
      are held when the three values are read, it is possible for F_SETPIPE_SZ
      to intervene and muck up the calculation, thereby causing the oops.
      
      Fix this by simply removing the assertion and accepting that the
      calculation might be approximate.
      
      Note that the previous code also had a similar issue, though there was
      no assertion check, since the occupancy counter and the ring size were
      not read with a lock held, so it's possible that the poll check might
      have malfunctioned then too.
      
      Also wake up all the waiters so that they can reissue their checks if
      there was a competing read or write.
      
      Fixes: 8cefc107 ("pipe: Use head and tail pointers for the ring, not cursor and length")
      Reported-by: syzbot+d37abaade33a934f16f2@syzkaller.appspotmail.com
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Eric Biggers <ebiggers@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8c7b8c34
    • Linus Torvalds's avatar
      Merge tag 'gfs2-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 3f1266ec
      Linus Torvalds authored
      Pull GFS2 updates from Andreas Gruenbacher:
       "Bob's extensive filesystem withdrawal and recovery testing:
         - don't write log headers after file system withdraw
         - clean up iopen glock mess in gfs2_create_inode
         - close timing window with GLF_INVALIDATE_IN_PROGRESS
         - abort gfs2_freeze if io error is seen
         - don't loop forever in gfs2_freeze if withdrawn
         - fix infinite loop in gfs2_ail1_flush on io error
         - introduce function gfs2_withdrawn
         - fix glock reference problem in gfs2_trans_remove_revoke
      
        Filesystems with a block size smaller than the page size:
         - fix end-of-file handling in gfs2_page_mkwrite
         - improve mmap write vs. punch_hole consistency
      
        Other:
         - remove active journal side effect from gfs2_write_log_header
         - multi-block allocations in gfs2_page_mkwrite
      
        Minor cleanups and coding style fixes:
         - remove duplicate call from gfs2_create_inode
         - make gfs2_log_shutdown static
         - make gfs2_fs_parameters static
         - some whitespace cleanups
         - removed unnecessary semicolon"
      
      * tag 'gfs2-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Don't write log headers after file system withdraw
        gfs2: Remove duplicate call from gfs2_create_inode
        gfs2: clean up iopen glock mess in gfs2_create_inode
        gfs2: Close timing window with GLF_INVALIDATE_IN_PROGRESS
        gfs2: Abort gfs2_freeze if io error is seen
        gfs2: Don't loop forever in gfs2_freeze if withdrawn
        gfs2: fix infinite loop in gfs2_ail1_flush on io error
        gfs2: Introduce function gfs2_withdrawn
        gfs2: fix glock reference problem in gfs2_trans_remove_revoke
        gfs2: make gfs2_log_shutdown static
        gfs2: Remove active journal side effect from gfs2_write_log_header
        gfs2: Fix end-of-file handling in gfs2_page_mkwrite
        gfs2: Multi-block allocations in gfs2_page_mkwrite
        gfs2: Improve mmap write vs. punch_hole consistency
        gfs2: make gfs2_fs_parameters static
        gfs2: Some whitespace cleanups
        gfs2: removed unnecessary semicolon
      3f1266ec
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.5-rc1' of git://github.com/ceph/ceph-client · a2315823
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "The two highlights are a set of improvements to how rbd read-only
        mappings are handled and a conversion to the new mount API (slightly
        complicated by the fact that we had a common option parsing framework
        that called out into rbd and the filesystem instead of them calling
        into it).
      
        Also included a few scattered fixes and a MAINTAINERS update for rbd,
        adding Dongsheng as a reviewer"
      
      * tag 'ceph-for-5.5-rc1' of git://github.com/ceph/ceph-client:
        libceph, rbd, ceph: convert to use the new mount API
        rbd: ask for a weaker incompat mask for read-only mappings
        rbd: don't query snapshot features
        rbd: remove snapshot existence validation code
        rbd: don't establish watch for read-only mappings
        rbd: don't acquire exclusive lock for read-only mappings
        rbd: disallow read-write partitions on images mapped read-only
        rbd: treat images mapped read-only seriously
        rbd: introduce RBD_DEV_FLAG_READONLY
        rbd: introduce rbd_is_snap()
        ceph: don't leave ino field in ceph_mds_request_head uninitialized
        ceph: tone down loglevel on ceph_mdsc_build_path warning
        rbd: update MAINTAINERS info
        ceph: fix geting random mds from mdsmap
        rbd: fix spelling mistake "requeueing" -> "requeuing"
        ceph: make several helper accessors take const pointers
        libceph: drop unnecessary check from dispatch() in mon_client.c
      a2315823
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 7ce4fab8
      Linus Torvalds authored
      Pull fuse update from Miklos Szeredi:
      
       - Fix a regression introduced in the last release
      
       - Fix a number of issues with validating data coming from userspace
      
       - Some cleanups in virtiofs
      
      * tag 'fuse-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: fix Kconfig indentation
        fuse: fix leak of fuse_io_priv
        virtiofs: Use completions while waiting for queue to be drained
        virtiofs: Do not send forget request "struct list_head" element
        virtiofs: Use a common function to send forget
        virtiofs: Fix old-style declaration
        fuse: verify nlink
        fuse: verify write return
        fuse: verify attributes
      7ce4fab8
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · 0f137416
      Linus Torvalds authored
      Pull modules updates from Jessica Yu:
       "Summary of modules changes for the 5.5 merge window:
      
         - Refactor include/linux/export.h and remove code duplication between
           EXPORT_SYMBOL and EXPORT_SYMBOL_NS to make it more readable.
      
           The most notable change is that no namespace is represented by an
           empty string "" rather than NULL.
      
         - Fix a module load/unload race where waiter(s) trying to load the
           same module weren't being woken up when a module finally goes away"
      
      * tag 'modules-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        kernel/module.c: wakeup processes in module_wq on module unload
        moduleparam: fix parameter description mismatch
        export: avoid code duplication in include/linux/export.h
      0f137416
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 25cfb0c7
      Linus Torvalds authored
      Pull m68knommu update from Greg Ungerer:
       "Only a single change, to enable coldfire preemption entry code for all
        preemption types"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k/coldfire: Use CONFIG_PREEMPTION
      25cfb0c7
    • Linus Torvalds's avatar
      Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · b08baef0
      Linus Torvalds authored
      Pull ARM SoC defconfig updates from Olof Johansson:
       "We keep this in a separate branch to avoid cross-branch conflicts, but
        most of the material here is fairly boring -- some new drivers turned
        on for hardware since they were merged, and some refreshed files due
        to time having moved a lot of entries around"
      
      * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (36 commits)
        ARM: config: multi_v5: ASPEED SDHCI, SGPIO
        ARM: configs: multi_v7: ASPEED network, gpio, FSI
        ARM: config: aspeed-g4: Add MMC, and cleanup
        ARM: config: aspeed-g5: Add SGPIO and FSI drivers
        ARM: config: aspeed-g5: Enable 8250_DW quirks
        arm64: defconfig: Change CONFIG_AT803X_PHY from m to y
        ARM: shmobile: defconfig: Refresh for v5.4-rc1
        arm64: defconfig: Enable R8A77961 SoC
        ARM: configs: sunxi: Enable MICREL_PHY
        arm64: defconfig: add new Allwinner crypto options
        ARM: configs: sunxi: add new Allwinner crypto options
        ARM: tegra: Enable Tegra VDE driver in tegra_defconfig
        ARM: imx_v6_v7_defconfig: Enable CONFIG_TOUCHSCREEN_DA9052
        arm64: defconfig: Enable configs for S32V234
        arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module
        arm64: defconfig: Enable SMMU v3 PMCG
        arm64: defconfig: Enable HiSilicon ZIP controller
        arm64: defconfig: enable Altera GPIO controller
        ARM: multi_v7_defconfig: Enable audio support for stm32mp157
        arm64: defconfig: enable rsu driver
        ...
      b08baef0
    • Linus Torvalds's avatar
      Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · eb275167
      Linus Torvalds authored
      Pull ARM Device-tree updates from Olof Johansson:
       "As always, the bulk of updates.  Some of the news this cycle:
      
        New SoC descriptions:
         - Broadcom BCM2711
         - Amlogic Meson A1 and G12
         - Freescale S32V234
         - Marvell Armada AP807/AP807-quad and CP115
         - Realtek RTD1293 and RTD1296
         - Rockchip RK3308
      
        New boards and platforms:
         - Allwinner: NanoPi Duo2
         - Amlogic: Ugoos am6
         - Atmel at91: Overkiz Kizbox2/4
         - Broadcom: RPi4, Luxul XWC-2000
         - Marvell: New Espressobin flavor
         - NXP: i.MX8MN LPDDR4 EVK, i.MX8QXP Colibri, S32V234 EVB, Netronix
           E60K02 and Kobo Clara HD, Kontron N6311 and N6411, OPOS6UL and
           OPOS6ULDev
         - Renesas: Salvator-XS
         - Rockchip: Beelink A1 (rk3308), rk3308 eval boards, rk3399-roc-pc"
      
      * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (653 commits)
        ARM: dts: logicpd-torpedo: Disable USB Host
        arm: dts: mt6323: add keys, power-controller, rtc and codec
        arm64: dts: mt8183: add systimer0 device node
        dt-bindings: mediatek: update bindings for MT8183 systimer
        arm64: dts: rockchip: fix sdmmc detection on boot on rk3328-roc-cc
        arm64: dts: rockchip: Split rk3399-roc-pc for with and without mezzanine board.
        arm64: dts: rockchip: Add Beelink A1
        dt-bindings: ARM: rockchip: Add Beelink A1
        arm64: dts: rockchip: Add RK3328 audio pipelines
        arm64: dts: ti: k3-j721e-common-proc-board: Add USB ports
        arm64: dts: ti: k3-j721e-main: add USB controller nodes
        ARM: dts: aspeed-g6: Add timer description
        ARM: dts: aspeed: ast2600evb: Enable i2c buses
        ARM: dts: at91: add a dts and dtsi file for kizbox2 based boards
        dt-bindings: arm: at91: Document Kizbox2-2 board binding
        arm64: dts: meson-gx: fix i2c compatible
        arm64: dts: meson-gx: cec node should be disabled by default
        arm64: dts: meson-g12b-odroid-n2: add missing amlogic, s922x compatible
        arm64: dts: meson-gxm: fix gpu irq order
        arm64: dts: meson-g12a: fix gpu irq order
        ...
      eb275167
    • Linus Torvalds's avatar
      Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · ec939e4c
      Linus Torvalds authored
      Pull ARM SoC driver updates from Olof Johansson:
       "Various driver updates for platforms:
      
         - A larger set of work on Tegra 2/3 around memory controller and
           regulator features, some fuse cleanups, etc..
      
         - MMP platform drivers, in particular for USB PHY, and other smaller
           additions.
      
         - Samsung Exynos 5422 driver for DMC (dynamic memory configuration),
           and ASV (adaptive voltage), allowing the platform to run at more
           optimal operating points.
      
         - Misc refactorings and support for RZ/G2N and R8A774B1 from Renesas
      
         - Clock/reset control driver for TI/OMAP
      
         - Meson-A1 reset controller support
      
         - Qualcomm sdm845 and sda845 SoC IDs for socinfo"
      
      * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (150 commits)
        firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT
        soc: fsl: add RCPM driver
        dt-bindings: fsl: rcpm: Add 'little-endian' and update Chassis definition
        memory: tegra: Consolidate registers definition into common header
        memory: tegra: Ensure timing control debug features are disabled
        memory: tegra: Introduce Tegra30 EMC driver
        memory: tegra: Do not handle error from wait_for_completion_timeout()
        memory: tegra: Increase handshake timeout on Tegra20
        memory: tegra: Print a brief info message about EMC timings
        memory: tegra: Pre-configure debug register on Tegra20
        memory: tegra: Include io.h instead of iopoll.h
        memory: tegra: Adapt for Tegra20 clock driver changes
        memory: tegra: Don't set EMC rate to maximum on probe for Tegra20
        memory: tegra: Add gr2d and gr3d to DRM IOMMU group
        memory: tegra: Set DMA mask based on supported address bits
        soc: at91: Add Atmel SFR SN (Serial Number) support
        memory: atmel-ebi: switch to SPDX license identifiers
        memory: atmel-ebi: move NUM_CS definition inside EBI driver
        soc: mediatek: Refactor bus protection control
        soc: mediatek: Refactor sram control
        ...
      ec939e4c
    • Linus Torvalds's avatar
      Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 38206c24
      Linus Torvalds authored
      Pull ARM SoC platform updates from Olof Johansson:
       "Most of these are for MMP (seeing a bunch of cleanups and refactorings
        for the first time in a while), and for OMAP (a bunch of cleanups and
        added support for voltage controller on OMAP4430)"
      
      * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (51 commits)
        ARM: OMAP2+: Add missing put_device() call in omapdss_init_of()
        OMAP2: fixup doc comments in omap_device
        ARM: OMAP1: drop duplicated dependency on ARCH_OMAP1
        ARM: ASPEED: update default ARCH_NR_GPIO for ARCH_ASPEED
        ARM: imx: use generic function to exit coherency
        ARM: tegra: Use WFE for power-gating on Tegra30
        ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
        ARM: exynos: Enable exynos-asv driver for ARCH_EXYNOS
        ARM: s3c: Rename s5p_usb_phy functions
        ARM: s3c: Rename s3c64xx_spi_setname() function
        ARM: imx: Add serial number support for i.MX6/7 SoCs
        ARM: imx: Drop imx_anatop_usb_chrg_detect_disable()
        arm64: Introduce config for S32
        ARM: hisi: drop useless depend on ARCH_MULTI_V7
        arm64: realtek: Select reset controller
        ARM: shmobile: rcar-gen2: Drop legacy DT clock support
        ARM: OMAP2+: Remove duplicated include from pmic-cpcap.c
        ARM: OMAP1: ams-delta FIQ: Fix a typo ("Initiaize")
        MAINTAINERS: Add logicpd-som-lv and logicpd-torpedo to OMAP TREE
        ARM: OMAP2+: pdata-quirks: drop TI_ST/KIM support
        ...
      38206c24
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-5.5-rc1' of... · d9e48dc2
      Linus Torvalds authored
      Merge tag 'pwm/for-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "Various changes and minor fixes across a couple of drivers"
      
      * tag 'pwm/for-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: stm32: Pass breakinput instead of its values
        pwm: stm32: Remove clutter from ternary operator
        pwm: stm32: Validate breakinput data from DT
        pwm: Update comment on struct pwm_ops::apply
        pwm: sun4i: Fix incorrect calculation of duty_cycle/period
        pwm: stm32: Add power management support
        pwm: stm32: Split breakinput apply routine to ease PM support
        dt-bindings: pwm-stm32: Document pinctrl sleep state
        pwm: sun4i: Drop redundant assignment to variable pval
        dt-bindings: pwm: mediatek: Remove gratuitous compatible string for MT7629
      d9e48dc2
    • Linus Torvalds's avatar
      Merge branch 'thermal/next' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · fb3da48a
      Linus Torvalds authored
      Pull thermal management updates from Zhang Rui:
      
       - Fix a deadlock regression in thermal core framework, which was
         introduced in 5.3 (Wei Wang)
      
       - Initialize thermal control framework earlier to enable thermal
         mitigation during boot (Amit Kucheria)
      
       - Convert the Intelligent Power Allocator (IPA) thermal governor to
         follow the generic PM_EM instead of its own Energy Model (Quentin
         Perret)
      
       - Introduce a new Amlogic soc thermal driver (Guillaume La Roque)
      
       - Add interrupt support for tsens thermal driver (Amit Kucheria)
      
       - Add support for MSM8956/8976 in tsens thermal driver
         (AngeloGioacchino Del Regno)
      
       - Add support for r8a774b1 in rcar thermal driver (Biju Das)
      
       - Add support for Thermal Monitor Unit v2 in qoriq thermal driver
         (Yuantian Tang)
      
       - Some other fixes/cleanups on thermal core framework and soc thermal
         drivers (Colin Ian King, Daniel Lezcano, Hsin-Yi Wang, Tian Tao)
      
      * 'thermal/next' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (32 commits)
        thermal: Fix deadlock in thermal thermal_zone_device_check
        thermal: cpu_cooling: Migrate to using the EM framework
        thermal: cpu_cooling: Make the power-related code depend on IPA
        PM / EM: Declare EM data types unconditionally
        arm64: defconfig: Enable CONFIG_ENERGY_MODEL
        drivers: thermal: tsens: fix potential integer overflow on multiply
        thermal: cpu_cooling: Reorder the header file
        thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF
        thermal: no need to set .owner when using module_platform_driver
        thermal: qcom: tsens-v1: Fix kfree of a non-pointer value
        cpufreq: qcom-hw: Move driver initialization earlier
        clk: qcom: Initialize clock drivers earlier
        cpufreq: Initialize cpufreq-dt driver earlier
        cpufreq: Initialize the governors in core_initcall
        thermal: Initialize thermal subsystem earlier
        thermal: Remove netlink support
        dt: thermal: tsens: Document compatible for MSM8976/56
        thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976
        MAINTAINERS: add entry for Amlogic Thermal driver
        thermal: amlogic: Add thermal driver to support G12 SoCs
        ...
      fb3da48a
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 5ecc9d15
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
       "Most of the rest of MM and various other things. Some Kconfig rework
        still awaits merges of dependent trees from linux-next.
      
        Subsystems affected by this patch series: mm/hotfixes, mm/memcg,
        mm/vmstat, mm/thp, procfs, sysctl, misc, notifiers, core-kernel,
        bitops, lib, checkpatch, epoll, binfmt, init, rapidio, uaccess, kcov,
        ubsan, ipc, bitmap, mm/pagemap"
      
      * akpm: (86 commits)
        mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h
        um: add support for folded p4d page tables
        um: remove unused pxx_offset_proc() and addr_pte() functions
        sparc32: use pgtable-nopud instead of 4level-fixup
        parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup
        parisc: use pgtable-nopXd instead of 4level-fixup
        nds32: use pgtable-nopmd instead of 4level-fixup
        microblaze: use pgtable-nopmd instead of 4level-fixup
        m68k: mm: use pgtable-nopXd instead of 4level-fixup
        m68k: nommu: use pgtable-nopud instead of 4level-fixup
        c6x: use pgtable-nopud instead of 4level-fixup
        arm: nommu: use pgtable-nopud instead of 4level-fixup
        alpha: use pgtable-nopud instead of 4level-fixup
        gpio: pca953x: tighten up indentation
        gpio: pca953x: convert to use bitmap API
        gpio: pca953x: use input from regs structure in pca953x_irq_pending()
        gpio: pca953x: remove redundant variable and check in IRQ handler
        lib/bitmap: introduce bitmap_replace() helper
        lib/test_bitmap: fix comment about this file
        lib/test_bitmap: move exp1 and exp2 upper for others to use
        ...
      5ecc9d15
    • Mike Rapoport's avatar
      mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h · f949286c
      Mike Rapoport authored
      There are no architectures that use include/asm-generic/4level-fixup.h
      therefore it can be removed along with __ARCH_HAS_4LEVEL_HACK define.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-14-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f949286c
    • Mike Rapoport's avatar
      um: add support for folded p4d page tables · e19f97ed
      Mike Rapoport authored
      The UML port uses 4 and 5 level fixups to support higher level page
      table directories in the generic VM code.
      
      Implement primitives necessary for the 4th level folding, add walks of
      p4d level where appropriate and drop usage of __ARCH_USE_5LEVEL_HACK.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-13-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e19f97ed
    • Mike Rapoport's avatar
      um: remove unused pxx_offset_proc() and addr_pte() functions · 4e65e76f
      Mike Rapoport authored
      The pxx_offset_proc() and addr_pte() functions are never used.  Remove
      them.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-12-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarRichard Weinberger <richard@nod.at>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4e65e76f
    • Mike Rapoport's avatar
      sparc32: use pgtable-nopud instead of 4level-fixup · 7235db26
      Mike Rapoport authored
      32-bit version of sparc has three-level page tables and can use
      pgtable-nopud and folding of the upper layers.
      
      Replace usage of include/asm-generic/4level-fixup.h with
      include/asm-generic/pgtable-nopud.h and adjust page table manipulation
      macros and functions accordingly.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-11-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Tested-by: default avatarAnatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7235db26
    • Helge Deller's avatar
      parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup · 2fa245c1
      Helge Deller authored
      Link: http://lkml.kernel.org/r/1572938135-31886-10-git-send-email-rppt@kernel.orgSigned-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2fa245c1
    • Mike Rapoport's avatar
      parisc: use pgtable-nopXd instead of 4level-fixup · d96885e2
      Mike Rapoport authored
      parisc has two or three levels of page tables and can use appropriate
      pgtable-nopXd and folding of the upper layers.
      
      Replace usage of include/asm-generic/4level-fixup.h and explicit
      definitions of __PAGETABLE_PxD_FOLDED in parisc with
      include/asm-generic/pgtable-nopmd.h for two-level configurations and
      with include/asm-generic/pgtable-nopud.h for three-lelve configurations
      and adjust page table manipulation macros and functions accordingly.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-9-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d96885e2
    • Mike Rapoport's avatar
      nds32: use pgtable-nopmd instead of 4level-fixup · 7c2763c4
      Mike Rapoport authored
      nds32 has only two-level page tables and can use pgtable-nopmd and
      folding of the upper layers.
      
      Replace usage of include/asm-generic/4level-fixup.h and explicit
      definition of __PAGETABLE_PMD_FOLDED in nds32 with
      include/asm-generic/pgtable-nopmd.h and adjust page table manipulation
      macros and functions accordingly.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-8-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7c2763c4
    • Mike Rapoport's avatar
      microblaze: use pgtable-nopmd instead of 4level-fixup · ed48e1f8
      Mike Rapoport authored
      microblaze has only two-level page tables and can use pgtable-nopmd and
      folding of the upper layers.
      
      Replace usage of include/asm-generic/4level-fixup.h and explicit
      definition of __PAGETABLE_PMD_FOLDED in microblaze with
      include/asm-generic/pgtable-nopmd.h and adjust page table manipulation
      macros and functions accordingly.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-7-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ed48e1f8
    • Mike Rapoport's avatar
      m68k: mm: use pgtable-nopXd instead of 4level-fixup · 60e50f34
      Mike Rapoport authored
      m68k has two or three levels of page tables and can use appropriate
      pgtable-nopXd and folding of the upper layers.
      
      Replace usage of include/asm-generic/4level-fixup.h and explicit
      definitions of __PAGETABLE_PxD_FOLDED in m68k with
      include/asm-generic/pgtable-nopmd.h for two-level configurations and
      with include/asm-generic/pgtable-nopud.h for three-lelve configurations
      and adjust page table manipulation macros and functions accordingly.
      
      [akpm@linux-foundation.org: fix merge glitch]
      [geert@linux-m68k.org: more merge glitch fixes]
      [akpm@linux-foundation.org: s/bad_pgd/bad_pud/, per Mike]
      Link: http://lkml.kernel.org/r/1572938135-31886-6-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      60e50f34
    • Mike Rapoport's avatar
      m68k: nommu: use pgtable-nopud instead of 4level-fixup · f6f7caeb
      Mike Rapoport authored
      The generic nommu implementation of page table manipulation takes care
      of folding of the upper levels and does not require fixups.
      
      Simply replace of include/asm-generic/4level-fixup.h with
      include/asm-generic/pgtable-nopud.h.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-5-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f6f7caeb
    • Mike Rapoport's avatar
      c6x: use pgtable-nopud instead of 4level-fixup · d13252ea
      Mike Rapoport authored
      c6x is a nommu architecture and does not require fixup for upper layers
      of the page tables because it is already handled by the generic nommu
      implementation.
      
      Replace usage of include/asm-generic/4level-fixup.h with
      include/asm-generic/pgtable-nopud.h
      
      Link: http://lkml.kernel.org/r/1572938135-31886-4-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d13252ea
    • Mike Rapoport's avatar
      arm: nommu: use pgtable-nopud instead of 4level-fixup · aa662823
      Mike Rapoport authored
      The generic nommu implementation of page table manipulation takes care
      of folding of the upper levels and does not require fixups.
      
      Simply replace of include/asm-generic/4level-fixup.h with
      include/asm-generic/pgtable-nopud.h.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-3-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aa662823
    • Mike Rapoport's avatar
      alpha: use pgtable-nopud instead of 4level-fixup · a73c9489
      Mike Rapoport authored
      Patch series "mm: remove __ARCH_HAS_4LEVEL_HACK", v13.
      
      These patches convert several architectures to use page table folding
      and remove __ARCH_HAS_4LEVEL_HACK along with
      include/asm-generic/4level-fixup.h.
      
      For the nommu configurations the folding is already implemented by the
      generic code so the only change was to use the appropriate header file.
      
      As for the rest, the changes are mostly about mechanical replacement of
      pgd accessors with pud/pmd ones and the addition of higher levels to
      page table traversals.
      
      With Vineet's patches from "elide extraneous generated code for folded
      p4d/pud/pmd" series [1] there is a small shrink of the kernel size of
      about -0.01% for the defconfig builds.
      
      This patch (of 13):
      
      It is not likely alpha will have 5-level page tables.
      
      Replace usage of include/asm-generic/4level-fixup.h and implied
      __ARCH_HAS_4LEVEL_HACK with include/asm-generic/pgtable-nopud.h and
      adjust page table manipulation macros and functions accordingly.
      
      Link: http://lkml.kernel.org/r/1572938135-31886-2-git-send-email-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Creasey <sammy@sammy.net>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Cc: Anatoly Pugachev <matorola@gmail.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a73c9489
    • Andy Shevchenko's avatar
      gpio: pca953x: tighten up indentation · b27d8517
      Andy Shevchenko authored
      There is no need to split some of the lines.  However, improve the style
      of multi-line comment.  On top of this there is no need to have double
      space.
      
      Correct above indentation issues without altering the functionality.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-12-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b27d8517
    • Andy Shevchenko's avatar
      gpio: pca953x: convert to use bitmap API · 35d13d94
      Andy Shevchenko authored
      Instead of customized approach convert the driver to use bitmap API.
      
      [andriy.shevchenko@linux.intel.com: reduce stack usage in couple of functions]
        Link: http://lkml.kernel.org/r/20191023153056.64262-1-andriy.shevchenko@linux.intel.com
      Link: http://lkml.kernel.org/r/20191022172922.61232-11-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      35d13d94
    • Andy Shevchenko's avatar
      gpio: pca953x: use input from regs structure in pca953x_irq_pending() · 0a0a0219
      Andy Shevchenko authored
      While PCA_PCAL is defined for PCA953X type only, we still may use an
      offset of the input from regs structure for sake of consistency.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-10-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0a0a0219
    • Andy Shevchenko's avatar
      gpio: pca953x: remove redundant variable and check in IRQ handler · a97832f2
      Andy Shevchenko authored
      We always will have at least one iteration of the loop due to pending
      being guaranteed to be non-zero.  That is, we may remove extra variable
      and check in the IRQ handler.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-9-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a97832f2
    • Andy Shevchenko's avatar
      lib/bitmap: introduce bitmap_replace() helper · 30544ed5
      Andy Shevchenko authored
      In some drivers we want to have a single operation over bitmap which is
      an equivalent to:
      
      	*dst = (*old & ~(*mask)) | (*new & *mask)
      
      Introduce bitmap_replace() helper for this.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-8-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      30544ed5
    • Andy Shevchenko's avatar
      lib/test_bitmap: fix comment about this file · 780ff33b
      Andy Shevchenko authored
      This test case file is about bitmap API, and not printf() facility.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-7-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      780ff33b
    • Andy Shevchenko's avatar
      lib/test_bitmap: move exp1 and exp2 upper for others to use · c21dd8a7
      Andy Shevchenko authored
      Some test cases may re-use predefined exp1 and exp2 bitmaps.  Move them
      upper in the file.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-6-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c21dd8a7
    • Andy Shevchenko's avatar
      lib/test_bitmap: rename exp to exp1 to avoid ambiguous name · 0ee312e3
      Andy Shevchenko authored
      One function is using exp as local variable.  Avoid ambiguous naming by
      rename global one to exp1.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-5-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0ee312e3
    • Andy Shevchenko's avatar
      lib/test_bitmap: name EXP_BYTES properly · a4881d1c
      Andy Shevchenko authored
      EXP_BYTES has been wrongly named.  It's a size of the exp array in bits.
      
      While here, go ahead and rename to EXP1_IN_BITS to avoid double renaming
      when exp will be renamed to exp1 in the next patch
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-4-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a4881d1c
    • Andy Shevchenko's avatar
      lib/test_bitmap: undefine macros after use · 54224044
      Andy Shevchenko authored
      There is no need to keep step and ptest macros defined in entire file.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-3-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      54224044
    • Andy Shevchenko's avatar
      lib/test_bitmap: force argument of bitmap_parselist_user() to proper address space · 17b6753f
      Andy Shevchenko authored
      Patch series "gpio: pca953x: Convert to bitmap (extended) API", v2.
      
      While converting gpio-pca953x driver to bitmap API, I noticed that we
      have no function to replace bits.
      
      So, that's how patch 7 appears.
      
      First 6 patches are preparatory of the test suite (including some
      warning fixes, etc).
      
      Patches 8-9 are preparatory for the GPIO driver to be easier converted
      to bitmap API, conversion to which happens in patch 10.
      
      Patch 11 contains simple indentation fixes.
      
      This patch (of 11):
      
      Sparse complains:
      
        lib/test_bitmap.c:345:58: warning: incorrect type in argument 1 (different address spaces)
        lib/test_bitmap.c:345:58:    expected char const [noderef] <asn:1> *ubuf
        lib/test_bitmap.c:345:58:    got char const *const in
      
      Force argument of bitmap_parselist_user() to proper address space.
      
      Link: http://lkml.kernel.org/r/20191022172922.61232-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Yury Norov <yury.norov@gmail.com>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      17b6753f
    • Masahiro Yamada's avatar
      arch: sembuf.h: make uapi asm/sembuf.h self-contained · 0fb9dc28
      Masahiro Yamada authored
      Userspace cannot compile <asm/sembuf.h> due to some missing type
      definitions.  For example, building it for x86 fails as follows:
      
          CC      usr/include/asm/sembuf.h.s
        In file included from <command-line>:32:0:
        usr/include/asm/sembuf.h:17:20: error: field `sem_perm' has incomplete type
          struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
                            ^~~~~~~~
        usr/include/asm/sembuf.h:24:2: error: unknown type name `__kernel_time_t'
          __kernel_time_t sem_otime; /* last semop time */
          ^~~~~~~~~~~~~~~
        usr/include/asm/sembuf.h:25:2: error: unknown type name `__kernel_ulong_t'
          __kernel_ulong_t __unused1;
          ^~~~~~~~~~~~~~~~
        usr/include/asm/sembuf.h:26:2: error: unknown type name `__kernel_time_t'
          __kernel_time_t sem_ctime; /* last change time */
          ^~~~~~~~~~~~~~~
        usr/include/asm/sembuf.h:27:2: error: unknown type name `__kernel_ulong_t'
          __kernel_ulong_t __unused2;
          ^~~~~~~~~~~~~~~~
        usr/include/asm/sembuf.h:29:2: error: unknown type name `__kernel_ulong_t'
          __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
          ^~~~~~~~~~~~~~~~
        usr/include/asm/sembuf.h:30:2: error: unknown type name `__kernel_ulong_t'
          __kernel_ulong_t __unused3;
          ^~~~~~~~~~~~~~~~
        usr/include/asm/sembuf.h:31:2: error: unknown type name `__kernel_ulong_t'
          __kernel_ulong_t __unused4;
          ^~~~~~~~~~~~~~~~
      
      It is just a matter of missing include directive.
      
      Include <asm/ipcbuf.h> to make it self-contained, and add it to
      the compile-test coverage.
      
      Link: http://lkml.kernel.org/r/20191030063855.9989-3-yamada.masahiro@socionext.comSigned-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0fb9dc28