1. 15 Dec, 2016 40 commits
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.10-rc1' of git://git.infradead.org/linux-ubifs · 39d2c3b9
      Linus Torvalds authored
      Pull ubifs updates from Richard Weinberger:
      
       - file encryption for UBIFS using the fscrypt framework
      
       - a fix to honor the dirty_writeback_interval sysctl
      
       - removal of dead code
      
      * tag 'upstream-4.10-rc1' of git://git.infradead.org/linux-ubifs: (30 commits)
        ubifs: Initialize fstr_real_len
        ubifs: Use fscrypt ioctl() helpers
        ubifs: Use FS_CFLG_OWN_PAGES
        ubifs: Raise write version to 5
        ubifs: Implement UBIFS_FLG_ENCRYPTION
        ubifs: Implement UBIFS_FLG_DOUBLE_HASH
        ubifs: Use a random number for cookies
        ubifs: Add full hash lookup support
        ubifs: Rename tnc_read_node_nm
        ubifs: Add support for encrypted symlinks
        ubifs: Implement encrypted filenames
        ubifs: Make r5 hash binary string aware
        ubifs: Relax checks in ubifs_validate_entry()
        ubifs: Implement encrypt/decrypt for all IO
        ubifs: Constify struct inode pointer in ubifs_crypt_is_encrypted()
        ubifs: Introduce new data node field, compr_size
        ubifs: Enforce crypto policy in mmap
        ubifs: Massage assert in ubifs_xattr_set() wrt. fscrypto
        ubifs: Preload crypto context in ->lookup()
        ubifs: Enforce crypto policy in ->link and ->rename
        ...
      39d2c3b9
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.10-1' of... · e18bf801
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v4.10-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull x86 platform driver updates from Darrent Hart:
       "Introduce one new driver for Mellanox platforms. Add support for
        various new models to existing drivers via quirks, hotkeys, etc.
        Significant updates to intel_pmc_core in support of Kabylake and
        Sunrise Point PCH power management debug. Some cleanup and refactoring
        across various drivers.
      
        Detailed summary:
      
        dell-laptop:
         - Use brightness_set_blocking for kbd_led_level_set
      
        thinkpad_acpi:
         - Initialize local in_tablet_mode and type
         - Fix old style declaration GCC warning
         - Adding new hotkey ID for Lenovo thinkpad
         - Add support for X1 Yoga (2016) Tablet Mode
         - Move tablet detection into separate function
      
        asus-nb-wmi:
         - Add X45U quirk
         - Make use of dmi->ident
      
        asus-wmi:
         - Set specified XUSB2PR value for X550LB
      
        intel_mid_thermal:
         - Fix suspend handlers unused warning
      
        intel-vbtn:
         - Switch to use devm_input_allocate_device
      
        dell-wmi:
         - Add events created by Dell Rugged 2-in-1s
         - Adjust wifi catcher to emit KEY_WLAN
      
        intel_pmc_core:
         - Add KBL CPUID support
         - Add LTR IGNORE debug feature
         - Add MPHY PLL clock gating status
         - ModPhy core lanes pg status
         - Add PCH IP Power Gating Status
         - Fix PWRMBASE mask and mmio reg len
      
        acer-wmi:
         - Only supports AMW0_GUID1 on acer family
      
        mlx-platform:
         - Introduce support for Mellanox hotplug driver
      
        platform/x86:
         - Use ACPI_FAILURE at appropriate places"
      
      * tag 'platform-drivers-x86-v4.10-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (22 commits)
        platform/x86: thinkpad_acpi: Initialize local in_tablet_mode and type
        platform/x86: dell-laptop: Use brightness_set_blocking for kbd_led_level_set
        platform/x86: thinkpad_acpi: Fix old style declaration GCC warning
        platform/x86: thinkpad_acpi: Adding new hotkey ID for Lenovo thinkpad
        platform/x86: thinkpad_acpi: Add support for X1 Yoga (2016) Tablet Mode
        platform/x86: thinkpad_acpi: Move tablet detection into separate function
        platform/x86: asus-nb-wmi.c: Add X45U quirk
        platform/x86: asus-nb-wmi: Make use of dmi->ident
        platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB
        platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
        platform/x86: intel-vbtn: Switch to use devm_input_allocate_device
        platform/x86: Use ACPI_FAILURE at appropriate places
        platform/x86: dell-wmi: Add events created by Dell Rugged 2-in-1s
        platform/x86: dell-wmi: Adjust wifi catcher to emit KEY_WLAN
        platform/x86: intel_pmc_core: Add KBL CPUID support
        platform/x86: intel_pmc_core: Add LTR IGNORE debug feature
        platform/x86: intel_pmc_core: Add MPHY PLL clock gating status
        platform/x86: intel_pmc_core: ModPhy core lanes pg status
        platform/x86: intel_pmc_core: Add PCH IP Power Gating Status
        platform/x86: intel_pmc_core: Fix PWRMBASE mask and mmio reg len
        ...
      e18bf801
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 8600b697
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
      
       - the first series of making i2c_device_id optional instead of
         mandatory (in favor of alternatives like of_device_id).
      
         This involves adding a new probe callback (probe_new) which removes
         some peculiarities I2C had for a long time now. The new probe is
         matching the other subsystems now and the old one will be removed
         once all users are converted. It is expected to take a while but
         there is ongoing interest in that.
      
       - SMBus Host Notify introduced 4.9 got refactored. They are now using
         interrupts instead of the alert callback which solves multiple
         issues.
      
       - new drivers for iMX LowPower I2C, Mellanox CPLD and its I2C mux
      
       - significant refactoring for bcm2835 driver
      
       - the usual set of driver updates and improvements
      
      * 'i2c/for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (46 commits)
        i2c: fsl-lpi2c: read lpi2c fifo size in probe()
        i2c: octeon: thunderx: Remove double-check after interrupt
        i2c: octeon: thunderx: TWSI software reset in recovery
        i2c: cadence: Allow Cadence I2C to be selected for Cadence Xtensa CPUs
        i2c: sh_mobile: Add per-Generation fallback bindings
        i2c: rcar: Add per-Generation fallback bindings
        i2c: imx-lpi2c: add low power i2c bus driver
        dt-bindings: i2c: imx-lpi2c: add devicetree bindings
        i2c: designware-pcidrv: Add 10bit address feature to medfield/merrifield
        i2c: pxa: Add support for the I2C units found in Armada 3700
        i2c: pxa: Add definition of fast and high speed modes via the regs layout
        dt-bindings: i2c: pxa: Update the documentation for the Armada 3700
        i2c: qup: support SMBus block read
        i2c: qup: add ACPI support
        i2c: designware: Consolidate default functionality bits
        i2c: i2c-mux-gpio: update mux with gpiod_set_array_value_cansleep
        i2c: mux: pca954x: Add ACPI support for pca954x
        i2c: use an IRQ to report Host Notify events, not alert
        i2c: i801: remove SMBNTFDDAT reads as they always seem to return 0
        i2c: i801: use the BIT() macro for FEATURES_* also
        ...
      8600b697
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 0ab7b12c
      Linus Torvalds authored
      Pull PCI updates from Bjorn Helgaas:
       "PCI changes:
      
         - add support for PCI on ARM64 boxes with ACPI. We already had this
           for theoretical spec-compliant hardware; now we're adding quirks
           for the actual hardware (Cavium, HiSilicon, Qualcomm, X-Gene)
      
         - add runtime PM support for hotplug ports
      
         - enable runtime suspend for Intel UHCI that uses platform-specific
           wakeup signaling
      
         - add yet another host bridge registration interface. We hope this is
           extensible enough to subsume the others
      
         - expose device revision in sysfs for DRM
      
         - to avoid device conflicts, make sure any VF BAR updates are done
           before enabling the VF
      
         - avoid unnecessary link retrains for ASPM
      
         - allow INTx masking on Mellanox devices that support it
      
         - allow access to non-standard VPD for Chelsio devices
      
         - update Broadcom iProc support for PAXB v2, PAXC v2, inbound DMA,
           etc
      
         - update Rockchip support for max-link-speed
      
         - add NVIDIA Tegra210 support
      
         - add Layerscape LS1046a support
      
         - update R-Car compatibility strings
      
         - add Qualcomm MSM8996 support
      
         - remove some uninformative bootup messages"
      
      * tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (115 commits)
        PCI: Enable access to non-standard VPD for Chelsio devices (cxgb3)
        PCI: Expand "VPD access disabled" quirk message
        PCI: pciehp: Remove loading message
        PCI: hotplug: Remove hotplug core message
        PCI: Remove service driver load/unload messages
        PCI/AER: Log AER IRQ when claiming Root Port
        PCI/AER: Log errors with PCI device, not PCIe service device
        PCI/AER: Remove unused version macros
        PCI/PME: Log PME IRQ when claiming Root Port
        PCI/PME: Drop unused support for PMEs from Root Complex Event Collectors
        PCI: Move config space size macros to pci_regs.h
        x86/platform/intel-mid: Constify mid_pci_platform_pm
        PCI/ASPM: Don't retrain link if ASPM not possible
        PCI: iproc: Skip check for legacy IRQ on PAXC buses
        PCI: pciehp: Leave power indicator on when enabling already-enabled slot
        PCI: pciehp: Prioritize data-link event over presence detect
        PCI: rcar: Add gen3 fallback compatibility string for pcie-rcar
        PCI: rcar: Use gen2 fallback compatibility last
        PCI: rcar-gen2: Use gen2 fallback compatibility last
        PCI: rockchip: Move the deassert of pm/aclk/pclk after phy_init()
        ..
      0ab7b12c
    • Darren Hart's avatar
      platform/x86: thinkpad_acpi: Initialize local in_tablet_mode and type · cb2bf251
      Darren Hart authored
      linux-next reported in_tablet_mode and type may be used uninitialized
      after:
      
      b3180028 ("platform/x86: thinkpad_acpi: Move tablet detection into separate function")
      
      This turns out to be a false positive as the pr_info call cannot be
      reached if tp_features.hotkey_tablet (global scope) is 0, and
      in_tablet_mode and type are assigned in both places
      tp_features.hotkey_tablet is assigned.
      
      Regardless, to make it explicit and avoid further reports, initialize
      in_tablet_mode to 0 and type to NULL.
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      Acked-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: Lyude <lyude@redhat.com>
      cb2bf251
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · a9a16a6d
      Linus Torvalds authored
      Pull IOMMU updates from Joerg Roedel:
       "These changes include:
      
         - support for the ACPI IORT table on ARM systems and patches to make
           the ARM-SMMU driver make use of it
      
         - conversion of the Exynos IOMMU driver to device dependency links
           and implementation of runtime pm support based on that conversion
      
         - update the Mediatek IOMMU driver to use the new struct
           device->iommu_fwspec member
      
         - implementation of dma_map/unmap_resource in the generic ARM
           dma-iommu layer
      
         - a number of smaller fixes and improvements all over the place"
      
      * tag 'iommu-updates-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (44 commits)
        ACPI/IORT: Make dma masks set-up IORT specific
        iommu/amd: Missing error code in amd_iommu_init_device()
        iommu/s390: Drop duplicate header pci.h
        ACPI/IORT: Introduce iort_iommu_configure
        ACPI/IORT: Add single mapping function
        ACPI/IORT: Replace rid map type with type mask
        iommu/arm-smmu: Add IORT configuration
        iommu/arm-smmu: Split probe functions into DT/generic portions
        iommu/arm-smmu-v3: Add IORT configuration
        iommu/arm-smmu-v3: Split probe functions into DT/generic portions
        ACPI/IORT: Add support for ARM SMMU platform devices creation
        ACPI/IORT: Add node match function
        ACPI: Implement acpi_dma_configure
        iommu/arm-smmu-v3: Convert struct device of_node to fwnode usage
        iommu/arm-smmu: Convert struct device of_node to fwnode usage
        iommu: Make of_iommu_set/get_ops() DT agnostic
        ACPI/IORT: Add support for IOMMU fwnode registration
        ACPI/IORT: Introduce linker section for IORT entries probing
        ACPI: Add FWNODE_ACPI_STATIC fwnode type
        iommu/arm-smmu: Set SMTNMB_TLBEN in ACR to enable caching of bypass entries
        ...
      a9a16a6d
    • Linus Torvalds's avatar
      rdma: fix buggy code that the compiler warns about · d3ea5478
      Linus Torvalds authored
      Get rid of this warning:
      
        drivers/infiniband/sw/rdmavt/cq.c: In function ‘rvt_cq_exit’:
        drivers/infiniband/sw/rdmavt/cq.c:542:2: warning: ‘worker’ may be used uninitialized in this function [-Wmaybe-uninitialized]
          kthread_destroy_worker(worker);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      by fixing the function to actually work.
      
      Fixes: 6efaf10f ("IB/rdmavt: Avoid queuing work into a destroyed cq kthread worker")
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d3ea5478
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 4d5b57e0
      Linus Torvalds authored
      Pull rdma updates from Doug Ledford:
       "This is the complete update for the rdma stack for this release cycle.
      
        Most of it is typical driver and core updates, but there is the
        entirely new VMWare pvrdma driver. You may have noticed that there
        were changes in DaveM's pull request to the bnxt Ethernet driver to
        support a RoCE RDMA driver. The bnxt_re driver was tentatively set to
        be pulled in this release cycle, but it simply wasn't ready in time
        and was dropped (a few review comments still to address, and some
        multi-arch build issues like prefetch() not working across all
        arches).
      
        Summary:
      
         - shared mlx5 updates with net stack (will drop out on merge if
           Dave's tree has already been merged)
      
         - driver updates: cxgb4, hfi1, hns-roce, i40iw, mlx4, mlx5, qedr, rxe
      
         - debug cleanups
      
         - new connection rejection helpers
      
         - SRP updates
      
         - various misc fixes
      
         - new paravirt driver from vmware"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (210 commits)
        IB: Add vmw_pvrdma driver
        IB/mlx4: fix improper return value
        IB/ocrdma: fix bad initialization
        infiniband: nes: return value of skb_linearize should be handled
        MAINTAINERS: Update Intel RDMA RNIC driver maintainers
        MAINTAINERS: Remove Mitesh Ahuja from emulex maintainers
        IB/core: fix unmap_sg argument
        qede: fix general protection fault may occur on probe
        IB/mthca: Replace pci_pool_alloc by pci_pool_zalloc
        mlx5, calc_sq_size(): Make a debug message more informative
        mlx5: Remove a set-but-not-used variable
        mlx5: Use { } instead of { 0 } to init struct
        IB/srp: Make writing the add_target sysfs attr interruptible
        IB/srp: Make mapping failures easier to debug
        IB/srp: Make login failures easier to debug
        IB/srp: Introduce a local variable in srp_add_one()
        IB/srp: Fix CONFIG_DYNAMIC_DEBUG=n build
        IB/multicast: Check ib_find_pkey() return value
        IPoIB: Avoid reading an uninitialized member variable
        IB/mad: Fix an array index check
        ...
      4d5b57e0
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 6df8b74b
      Linus Torvalds authored
      Pull DeviceTree updates from Rob Herring:
      
       - add various vendor prefixes.
      
       - fix NUMA node handling when "numa=off" is passed on kernel command
         line.
      
       - coding style Clean-up of overlay handling code.
      
       - DocBook fixes in DT platform driver code
      
       - Altera SoCFPGA binding addtions for freeze bridge, arria10 FPGA
         manager and FPGA bridges.
      
       - a couple of printk message fixes.
      
      * tag 'devicetree-for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (33 commits)
        dt: pwm: bcm2835: fix typo in clocks property name
        devicetree: add vendor prefix for National Instruments
        Revert "of: base: add support to get machine model name"
        of: Fix issue where code would fall through to error case.
        drivers/of: fix missing pr_cont()s in of_print_phandle_args
        devicetree: bindings: Add vendor prefix for Oki
        devicetree: bindings: Add vendor prefix for Andes Technology Corporation
        dt-bindings: add MYIR Tech hardware vendor prefix
        add bindings document for altera freeze bridge
        ARM: socfpga: add bindings doc for arria10 fpga manager
        ARM: socfpga: add bindings document for fpga bridge drivers
        of: base: add support to get machine model name
        of/platform: clarify of_find_device_by_node refcounting
        of/platform: fix of_platform_device_destroy comment
        of: Remove unused variable overlay_symbols
        of: Move setting of pointer to beside test for non-null
        of: Add back an error message, restructured
        of: Update comments to reflect changes and increase clarity
        of: Remove redundant size check
        of: Update structure of code to be clearer, also remove BUG_ON()
        ...
      6df8b74b
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-4.10-rc1' of... · 57d64e6f
      Linus Torvalds authored
      Merge tag 'pwm/for-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This is a very tiny pull request, with just a new driver for HiSilicon
        BVT SoCs and a cleanup for the Amlogic Meson driver.
      
        There are other patches on the list, but my timing was really bad this
        time and I ended up not having the time to look at them in enough
        detail to be comfortable merging them"
      
      * tag 'pwm/for-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: Add PWM driver for HiSilicon BVT SOCs
        pwm: meson: Remove unneeded platform MODULE_ALIAS
      57d64e6f
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 19c75bcb
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes the following issues:
      
         - a crash regression in the new skcipher walker
      
         - incorrect return value in public_key_verify_signature
      
         - fix for in-place signing in the sign-file utility"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: skcipher - fix crash in virtual walk
        sign-file: Fix inplace signing when src and dst names are both specified
        crypto: asymmetric_keys - set error code on failure
      19c75bcb
    • David Howells's avatar
      afs, rxrpc: Update the MAINTAINERS file · ee84595a
      David Howells authored
      Update the MAINTAINERS file for AFS and AF_RXRPC to include a website
      pointer.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ee84595a
    • Matthew Wilcox's avatar
      redo: radix tree test suite: fix compilation · b9a0deb9
      Matthew Wilcox authored
      [ This resurrects commit 53855d10, which was reverted in
        2b41226b.  It depended on commit d544abd5 ("lib/radix-tree:
        Convert to hotplug state machine") so now it is correct to apply ]
      
      Patch "lib/radix-tree: Convert to hotplug state machine" breaks the test
      suite as it adds a call to cpuhp_setup_state_nocalls() which is not
      currently emulated in the test suite.  Add it, and delete the emulation
      of the old CPU hotplug mechanism.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-36-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b9a0deb9
    • Geert Uytterhoeven's avatar
      printk: Remove no longer used second struct cont · 8fa9a697
      Geert Uytterhoeven authored
      If CONFIG_PRINTK=n:
      
          kernel/printk/printk.c:1893: warning: ‘cont’ defined but not used
      
      Note that there are actually two different struct cont definitions and
      objects: the first one is used if CONFIG_PRINTK=y, the second one became
      unused by removing console_cont_flush().
      
      Fixes: 5c2992ee ("printk: remove console flushing special cases for partial buffered lines")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarPetr Mladek <pmladek@suse.com>
      [ I do the occasional "allnoconfig" builds, but apparently not often
        enough  - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8fa9a697
    • Linus Torvalds's avatar
      Merge tag 'xfs-for-linus-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs · 5cc60aee
      Linus Torvalds authored
      Pull xfs updates from Dave Chinner:
       "There is quite a varied bunch of stuff in this update, and some of it
        you will have already merged through the ext4 tree which imported the
        dax-4.10-iomap-pmd topic branch from the XFS tree.
      
        There is also a new direct IO implementation that uses the iomap
        infrastructure. It's much simpler, faster, and has lower IO latency
        than the existing direct IO infrastructure.
      
        Summary:
         - DAX PMD faults via iomap infrastructure
         - Direct-io support in iomap infrastructure
         - removal of now-redundant XFS inode iolock, replaced with VFS
           i_rwsem
         - synchronisation with fixes and changes in userspace libxfs code
         - extent tree lookup helpers
         - lots of little corruption detection improvements to verifiers
         - optimised CRC calculations
         - faster buffer cache lookups
         - deprecation of barrier/nobarrier mount options - we always use
           REQ_FUA/REQ_FLUSH where appropriate for data integrity now
         - cleanups to speculative preallocation
         - miscellaneous minor bug fixes and cleanups"
      
      * tag 'xfs-for-linus-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (63 commits)
        xfs: nuke unused tracepoint definitions
        xfs: use GPF_NOFS when allocating btree cursors
        xfs: use xfs_vn_setattr_size to check on new size
        xfs: deprecate barrier/nobarrier mount option
        xfs: Always flush caches when integrity is required
        xfs: ignore leaf attr ichdr.count in verifier during log replay
        xfs: use rhashtable to track buffer cache
        xfs: optimise CRC updates
        xfs: make xfs btree stats less huge
        xfs: don't cap maximum dedupe request length
        xfs: don't allow di_size with high bit set
        xfs: error out if trying to add attrs and anextents > 0
        xfs: don't crash if reading a directory results in an unexpected hole
        xfs: complain if we don't get nextents bmap records
        xfs: check for bogus values in btree block headers
        xfs: forbid AG btrees with level == 0
        xfs: several xattr functions can be void
        xfs: handle cow fork in xfs_bmap_trace_exlist
        xfs: pass state not whichfork to trace_xfs_extlist
        xfs: Move AGI buffer type setting to xfs_read_agi
        ...
      5cc60aee
    • Linus Torvalds's avatar
      printk: remove console flushing special cases for partial buffered lines · 5c2992ee
      Linus Torvalds authored
      It actively hurts proper merging, and makes for a lot of special cases.
      There was a good(ish) reason for doing it originally, but it's getting
      too painful to maintain.  And most of the original reasons for it are
      long gone.
      
      So instead of having special code to flush partial lines to the console
      (as opposed to the record buffers), do _all_ the console writing from
      the record buffer, and be done with it.
      
      If an oops happens (or some other synchronous event), we will flush the
      partial lines due to the oops printing activity, so this does not affect
      that.  It does mean that if you have a completely hung machine, a
      partial preceding line may not have been printed out.
      
      That was some of the original reason for this complexity, in fact, back
      when we used to test for the historical i386 "halt" instruction problem
      by doing
      
      	pr_info("Checking 'hlt' instruction... ");
      
      	if (!boot_cpu_data.hlt_works_ok) {
      		pr_cont("disabled\n");
      		return;
      	}
      	halt();
      	halt();
      	halt();
      	halt();
      	pr_cont("OK\n");
      
      and that model no longer works (it the 'hlt' instruction kills the
      machine, the partial line won't have been flushed, so you won't even see
      it).
      
      Of course, that was also back in the days when people actually had
      textual console output rather than a graphical splash-screen at bootup.
      How times change..
      
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Tested-by: default avatarPetr Mladek <pmladek@suse.com>
      Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5c2992ee
    • Linus Torvalds's avatar
      printk: remove games with previous record flags · 5aa068ea
      Linus Torvalds authored
      The record logging code looks at the previous record flags in various
      ways, and they are all wrong.
      
      You can't use the previous record flags to determine anything about the
      next record, because they may simply not be related.  In particular, the
      reason the previous record was a continuation record may well be exactly
      _because_ the new record was printed by a different process, which is
      why the previous record was flushed.
      
      So all those games are simply wrong, and make the code hard to
      understand (because the code fundamentally cdoes not make sense).
      
      So remove it.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5aa068ea
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.10' of git://git.code.sf.net/p/openipmi/linux-ipmi · 196202be
      Linus Torvalds authored
      Pull IPMI updates from Corey Minyard:
       "Various small fixes for IPMI. Cleanups in the documentation and
        convertion printk() to pr_xxx() and removal of an unused module
        parameter. Some small bug fixes and enhancements.
      
        This also adds a post softdep from the IPMI core module to the IPMI
        device interface. Many people have complained that the device
        interface isn't automatically avaiable when IPMI is loaded. I don't
        want to make the device interface mandatory, though, plenty of people
        use IPMI internally (like with ACPI) and don't need a device interface
        or the added possible security entry. A softdep should make it work
        'out of the box' but allow people to not have it if they don't want
        it"
      
      * tag 'for-linus-4.10' of git://git.code.sf.net/p/openipmi/linux-ipmi:
        ipmi: create hardware-independent softdep for ipmi_devintf
        ipmi: Fix sequence number handling
        ipmi: Pick up slave address from SMBIOS on an ACPI device
        ipmi_si: Clean up printks
        Move platform device creation earlier in the initialization
        ipmi: Update documentation
        ipmi_ssif: Remove an unused module parameter
        ipmi: Periodically check for events, not messages
      196202be
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-4.10-rc1' of git://git.infradead.org/users/vkoul/slave-dma · e3842cbf
      Linus Torvalds authored
      Pull dmaengine updates from Vinod Koul:
       "Fairly routine update this time around with all changes specific to
        drivers:
      
         - New driver for STMicroelectronics FDMA
         - Memory-to-memory transfers on dw dmac
         - Support for slave maps on pl08x devices
         - Bunch of driver fixes to use dma_pool_zalloc
         - Bunch of compile and warning fixes spread across drivers"
      
      [ The ST FDMA driver already came in earlier through the remoteproc tree ]
      
      * tag 'dmaengine-4.10-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (68 commits)
        dmaengine: sirf-dma: remove unused ‘sdesc’
        dmaengine: pl330: remove unused ‘regs’
        dmaengine: s3c24xx: remove unused ‘cdata’
        dmaengine: stm32-dma: remove unused ‘src_addr’
        dmaengine: stm32-dma: remove unused ‘dst_addr’
        dmaengine: stm32-dma: remove unused ‘sfcr’
        dmaengine: pch_dma: remove unused ‘cookie’
        dmaengine: mic_x100_dma: remove unused ‘data’
        dmaengine: img-mdc: remove unused ‘prev_phys’
        dmaengine: usb-dmac: remove unused ‘uchan’
        dmaengine: ioat: remove unused ‘res’
        dmaengine: ioat: remove unused ‘ioat_dma’
        dmaengine: ioat: remove unused ‘is_raid_device’
        dmaengine: pl330: do not generate unaligned access
        dmaengine: k3dma: move to dma_pool_zalloc
        dmaengine: at_hdmac: move to dma_pool_zalloc
        dmaengine: at_xdmac: don't restore unsaved status
        dmaengine: ioat: set error code on failures
        dmaengine: ioat: set error code on failures
        dmaengine: DW DMAC: add multi-block property to device tree
        ...
      e3842cbf
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · 4d98ead1
      Linus Torvalds authored
      Pull modules updates from Jessica Yu:
       "Summary of modules changes for the 4.10 merge window:
      
         - The rodata= cmdline parameter has been extended to additionally
           apply to module mappings
      
         - Fix a hard to hit race between module loader error/clean up
           handling and ftrace registration
      
         - Some code cleanups, notably panic.c and modules code use a unified
           taint_flags table now. This is much cleaner than duplicating the
           taint flag code in modules.c"
      
      * tag 'modules-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        module: fix DEBUG_SET_MODULE_RONX typo
        module: extend 'rodata=off' boot cmdline parameter to module mappings
        module: Fix a comment above strong_try_module_get()
        module: When modifying a module's text ignore modules which are going away too
        module: Ensure a module's state is set accordingly during module coming cleanup code
        module: remove trailing whitespace
        taint/module: Clean up global and module taint flags handling
        modpost: free allocated memory
      4d98ead1
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a57cb1c1
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
      
       - a few misc things
      
       - kexec updates
      
       - DMA-mapping updates to better support networking DMA operations
      
       - IPC updates
      
       - various MM changes to improve DAX fault handling
      
       - lots of radix-tree changes, mainly to the test suite. All leading up
         to reimplementing the IDA/IDR code to be a wrapper layer over the
         radix-tree. However the final trigger-pulling patch is held off for
         4.11.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (114 commits)
        radix tree test suite: delete unused rcupdate.c
        radix tree test suite: add new tag check
        radix-tree: ensure counts are initialised
        radix tree test suite: cache recently freed objects
        radix tree test suite: add some more functionality
        idr: reduce the number of bits per level from 8 to 6
        rxrpc: abstract away knowledge of IDR internals
        tpm: use idr_find(), not idr_find_slowpath()
        idr: add ida_is_empty
        radix tree test suite: check multiorder iteration
        radix-tree: fix replacement for multiorder entries
        radix-tree: add radix_tree_split_preload()
        radix-tree: add radix_tree_split
        radix-tree: add radix_tree_join
        radix-tree: delete radix_tree_range_tag_if_tagged()
        radix-tree: delete radix_tree_locate_item()
        radix-tree: improve multiorder iterators
        btrfs: fix race in btrfs_free_dummy_fs_info()
        radix-tree: improve dump output
        radix-tree: make radix_tree_find_next_bit more useful
        ...
      a57cb1c1
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · cf1b3341
      Linus Torvalds authored
      Pull block IO fixes from Jens Axboe:
       "A few fixes that I collected as post-merge.
      
        I was going to wait a bit with sending this out, but the O_DIRECT fix
        should really go in sooner rather than later"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        blk-mq: Fix failed allocation path when mapping queues
        blk-mq: Avoid memory reclaim when remapping queues
        block_dev: don't update file access position for sync direct IO
        nvme/pci: Log PCI_STATUS when the controller dies
        block_dev: don't test bdev->bd_contains when it is not stable
      cf1b3341
    • Linus Torvalds's avatar
      Merge branch 'for-4.10/fs-unmap' of git://git.kernel.dk/linux-block · 80eabba7
      Linus Torvalds authored
      Pull fs meta data unmap optimization from Jens Axboe:
       "A series from Jan Kara, providing a more efficient way for unmapping
        meta data from in the buffer cache than doing it block-by-block.
      
        Provide a general helper that existing callers can use"
      
      * 'for-4.10/fs-unmap' of git://git.kernel.dk/linux-block:
        fs: Remove unmap_underlying_metadata
        fs: Add helper to clean bdev aliases under a bh and use it
        ext2: Use clean_bdev_aliases() instead of iteration
        ext4: Use clean_bdev_aliases() instead of iteration
        direct-io: Use clean_bdev_aliases() instead of handmade iteration
        fs: Provide function to unmap metadata for a range of blocks
      80eabba7
    • Linus Torvalds's avatar
      docs: add back 'Documentation/Changes' file (as symlink) · 852d21ae
      Linus Torvalds authored
      Jaegeuk Kim reports that the debian kernel package build gets confused
      by the lack of Documentation/Changes file.  We also refer to that path
      name in ver_linux and various how-to files and Kconfig files.
      
      The file got renamed away in commit 186128f7 ("docs-rst: add
      documents to development-process"), and as Jaegeuk Kim points out, the
      commit message for that change says "use symlinks instead of renames",
      but then the commit itself actually does renames after all.
      
      Maybe we should do the other files too, but for now this just adds the
      minimal symlink back to the historical name, so that people looking for
      Documentation/Changes will actually find what they are looking for, and
      the debian scripts continue to work.
      Reported-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      852d21ae
    • Matthew Wilcox's avatar
      radix tree test suite: delete unused rcupdate.c · e1e14ab8
      Matthew Wilcox authored
      This file was used to implement call_rcu() before liburcu implemented
      that function.  It hasn't even been compiled since before the test suite
      was added to the kernel.  Remove it to reduce confusion.
      
      Link: http://lkml.kernel.org/r/1481667692-14500-5-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e1e14ab8
    • Matthew Wilcox's avatar
      radix tree test suite: add new tag check · 092bc0b2
      Matthew Wilcox authored
      We have a check that setting a tag on a single entry at root succeeds,
      but we were missing a check that clearing a tag on that same entry also
      succeeds.
      
      Link: http://lkml.kernel.org/r/1481667692-14500-4-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      092bc0b2
    • Matthew Wilcox's avatar
      radix-tree: ensure counts are initialised · e8de4340
      Matthew Wilcox authored
      radix_tree_join() was freeing nodes with a non-zero ->exceptional count,
      and radix_tree_split() wasn't zeroing ->exceptional when it allocated
      the new node.  Fix this by making all callers of radix_tree_node_alloc()
      pass in the new counts (and some other always-initialised fields), which
      will prevent the problem recurring if in future we decide to do
      something similar.
      
      Link: http://lkml.kernel.org/r/1481667692-14500-3-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e8de4340
    • Matthew Wilcox's avatar
      radix tree test suite: cache recently freed objects · bbe9d71f
      Matthew Wilcox authored
      The kmem_cache_alloc implementation simply allocates new memory from
      malloc() and calls the ctor, which zeroes out the entire object.  This
      means it cannot spot bugs where the object isn't properly reinitialised
      before being freed.
      
      Add a small (11 objects) cache before freeing objects back to malloc.
      This is enough to let us write a test to catch it, although the memory
      allocator is now aware of the structure of the radix tree node, since it
      chains free objects through ->private_data (like the percpu cache does).
      
      Link: http://lkml.kernel.org/r/1481667692-14500-2-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bbe9d71f
    • Matthew Wilcox's avatar
      radix tree test suite: add some more functionality · de1af8f6
      Matthew Wilcox authored
      IDR needs more functionality from the kernel: kmalloc()/kfree(), and
      xchg().
      
      Link: http://lkml.kernel.org/r/1480369871-5271-67-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      de1af8f6
    • Matthew Wilcox's avatar
      idr: reduce the number of bits per level from 8 to 6 · 424251a4
      Matthew Wilcox authored
      In preparation for merging the IDR and radix tree, reduce the fanout at
      each level from 256 to 64.  If this causes a performance problem then a
      bisect will point to this commit, and we'll have a better idea about
      what we might do to fix it.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-66-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      424251a4
    • Matthew Wilcox's avatar
      rxrpc: abstract away knowledge of IDR internals · 44430612
      Matthew Wilcox authored
      Add idr_get_cursor() / idr_set_cursor() APIs, and remove the reference
      to IDR_SIZE.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-65-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      44430612
    • Matthew Wilcox's avatar
      tpm: use idr_find(), not idr_find_slowpath() · 37f4915f
      Matthew Wilcox authored
      idr_find_slowpath() is not intended to be part of the public API, it's
      an implementation detail.  There's no reason to skip straight to the
      slowpath here.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-64-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Peter Huewe <peterhuewe@gmx.de>
      Cc: Marcel Selhorst <tpmdd@selhorst.net>
      Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      37f4915f
    • Matthew Wilcox's avatar
      idr: add ida_is_empty · 99c49407
      Matthew Wilcox authored
      Two of the USB Gadgets were poking around in the internals of struct ida
      in order to determine if it is empty.  Add the appropriate abstraction.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-63-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Acked-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Michal Nazarewicz <mina86@mina86.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      99c49407
    • Matthew Wilcox's avatar
      radix tree test suite: check multiorder iteration · 3e3cdc68
      Matthew Wilcox authored
      The random iteration test only inserts order-0 entries currently.
      Update it to insert entries of order between 7 and 0.  Also make the
      maximum index configurable, make some variables static, make the test
      duration variable, remove some useless spinning, and add a fifth thread
      which calls tag_tagged_items().
      
      Link: http://lkml.kernel.org/r/1480369871-5271-62-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3e3cdc68
    • Matthew Wilcox's avatar
      radix-tree: fix replacement for multiorder entries · a90eb3a2
      Matthew Wilcox authored
      When replacing an entry with NULL, we need to delete any sibling
      entries.  Also account deleting exceptional entries properly.  Also fix
      a bug with radix_tree_iter_replace() where we would fail to remove
      entirely freed nodes.  Also fix accounting bug when switching between
      normal and exceptional entries with replace_slot.  Also add testcases
      for all these bugs.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-61-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a90eb3a2
    • Matthew Wilcox's avatar
      radix-tree: add radix_tree_split_preload() · 2791653a
      Matthew Wilcox authored
      Calculate how many nodes we need to allocate to split an old_order entry
      into multiple entries, each of size new_order.  The test suite checks
      that we allocated exactly the right number of nodes; neither too many
      (checked by rtp->nr == 0), nor too few (checked by comparing
      nr_allocated before and after the call to radix_tree_split()).
      
      Link: http://lkml.kernel.org/r/1480369871-5271-60-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2791653a
    • Matthew Wilcox's avatar
      radix-tree: add radix_tree_split · e157b555
      Matthew Wilcox authored
      This new function splits a larger multiorder entry into smaller entries
      (potentially multi-order entries).  These entries are initialised to
      RADIX_TREE_RETRY to ensure that RCU walkers who see this state aren't
      confused.  The caller should then call radix_tree_for_each_slot() and
      radix_tree_replace_slot() in order to turn these retry entries into the
      intended new entries.  Tags are replicated from the original multiorder
      entry into each new entry.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-59-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e157b555
    • Matthew Wilcox's avatar
      radix-tree: add radix_tree_join · 175542f5
      Matthew Wilcox authored
      This new function allows for the replacement of many smaller entries in
      the radix tree with one larger multiorder entry.  From the point of view
      of an RCU walker, they may see a mixture of the smaller entries and the
      large entry during the same walk, but they will never see NULL for an
      index which was populated before the join.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-58-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      175542f5
    • Matthew Wilcox's avatar
      radix-tree: delete radix_tree_range_tag_if_tagged() · 268f42de
      Matthew Wilcox authored
      This is an exceptionally complicated function with just one caller
      (tag_pages_for_writeback).  We devote a large portion of the runtime of
      the test suite to testing this one function which has one caller.  By
      introducing the new function radix_tree_iter_tag_set(), we can eliminate
      all of the complexity while keeping the performance.  The caller can now
      use a fairly standard radix_tree_for_each() loop, and it doesn't need to
      worry about tricksy things like 'start' wrapping.
      
      The test suite continues to spend a large amount of time investigating
      this function, but now it's testing the underlying primitives such as
      radix_tree_iter_resume() and the radix_tree_for_each_tagged() iterator
      which are also used by other parts of the kernel.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-57-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <willy@infradead.org>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      268f42de
    • Matthew Wilcox's avatar
      radix-tree: delete radix_tree_locate_item() · 478922e2
      Matthew Wilcox authored
      This rather complicated function can be better implemented as an
      iterator.  It has only one caller, so move the functionality to the only
      place that needs it.  Update the test suite to follow the same pattern.
      
      Link: http://lkml.kernel.org/r/1480369871-5271-56-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
      Acked-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
      Tested-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      478922e2