1. 28 Jun, 2021 9 commits
    • Linus Torvalds's avatar
      Merge tag 'x86_cpu_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2594b713
      Linus Torvalds authored
      Pull x86 cpu updates from Borislav Petkov:
      
       - New AMD models support
      
       - Allow MONITOR/MWAIT to be used for C1 state entry on Hygon too
      
       - Use the special RAPL CPUID bit to detect the functionality on AMD and
         Hygon instead of doing family matching.
      
       - Add support for new Intel microcode deprecating TSX on some models
         and do not enable kernel workarounds for those CPUs when TSX
         transactions always abort, as a result of that microcode update.
      
      * tag 'x86_cpu_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/tsx: Clear CPUID bits when TSX always force aborts
        x86/events/intel: Do not deploy TSX force abort workaround when TSX is deprecated
        x86/msr: Define new bits in TSX_FORCE_ABORT MSR
        perf/x86/rapl: Use CPUID bit on AMD and Hygon parts
        x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems
        x86/amd_nb: Add AMD family 19h model 50h PCI ids
        x86/cpu: Fix core name for Sapphire Rapids
      2594b713
    • Linus Torvalds's avatar
      Merge tag 'ras_core_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f565b207
      Linus Torvalds authored
      Pull x86 RAS updates from Borislav Petkov:
      
       - Add the required information to the faked APEI-reported mem error so
         that the kernel properly attempts to offline the corresponding page,
         as it does for kernel-detected correctable errors.
      
       - Fix a typo in AMD's error descriptions.
      
      * tag 'ras_core_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        EDAC/mce_amd: Fix typo "FIfo" -> "Fifo"
        x86/mce: Include a MCi_MISC value in faked mce logs
        x86/MCE/AMD, EDAC/mce_amd: Add new SMCA bank types
      f565b207
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 2a5c6184
      Linus Torvalds authored
      Pull hwmon updates from Guenter Roeck:
       "New drivers:
      
         - Delta DPS920AB
      
         - Flex PIM4006, PIM4328 and PIM4820
      
         - MPS MP2888
      
         - Sensirion SHT4X
      
        Added chip support to existing drivers:
      
         - Flex BMR310, BMR456, BMR457, BMR458, BMR480, BMR490, BMR491, and
           BMR492
      
         - TI TMP1075
      
         - Renesas ZLS1003, ZLS4009 and ZL8802
      
        Other:
      
         - Dropped explicit ACPI support for MAX31722 and LM70; the APIC IDs
           in those drivers do not exist.
      
         - Support set_trips() callback into thermal subsystem
      
         - Minor fixes and improvements in various drivers"
      
      * tag 'hwmon-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (49 commits)
        hwmon: Support set_trips() of thermal device ops
        hwmon: (lm90) Prevent integer underflows of temperature calculations
        hwmon: (lm90) Disable interrupt on suspend
        hwmon: (lm90) Unmask hardware interrupt
        hwmon: (lm90) Use hwmon_notify_event()
        hwmon: (lm90) Don't override interrupt trigger type
        hwmon: (pmbus/dps920ab) Delete some dead code
        hwmon: (ntc_thermistor) Drop unused headers.
        MAINTAINERS: Add Delta DPS920AB PSU driver
        dt-bindings: trivial-devices: Add Delta DPS920AB
        hwmon: (pmbus) Add driver for Delta DPS-920AB PSU
        hwmon: (pmbus/pim4328) Add documentation for the pim4328 PMBus driver
        hwmon: (pmbus/pim4328) Add PMBus driver for PIM4006, PIM4328 and PIM4820
        hwmon: (pmbus) Allow phase function even if it's not on page
        hwmon: (pmbus) Add support for reading direct mode coefficients
        hwmon: (pmbus) Add new pmbus flag NO_WRITE_PROTECT
        docs: hwmon: adm1177.rst: avoid using ReSt :doc:`foo` markup
        hwmon: (pmbus_core) Check adapter PEC support
        hwmon: (ina3221) use CVRF only for single-shot conversion
        hwmon: (max31790) Detect and report zero fan speed
        ...
      2a5c6184
    • Linus Torvalds's avatar
      Merge tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 69609a91
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "The biggest single thing in the diffstat here is a massive overhaul of
        the PXA2xx driver from Andy Shevchenko (the IP is still in use on
        modern Intel systems), though we also have quite a lot of core work as
        well:
      
         - Better support for mixing native and GPIO chip selects also from
           Andy.
      
         - Support for devices with multiple chip selects from Sebastian
           Reichel.
      
         - Helper for polling status registers in spi-mem from Patrice
           Chotard.
      
         - Support for Renesas RZ/N1 and Rockchip RV1126"
      
      * tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (86 commits)
        spi: core: add dma_map_dev for dma device
        spi: convert Xilinx Zynq UltraScale+ MPSoC GQSPI bindings to YAML
        spi: Fix self assignment issue with ancillary->mode
        spi: spi-sh-msiof: : use proper DMAENGINE API for termination
        spi: spi-rspi: : use proper DMAENGINE API for termination
        spi: spi-rockchip: add description for rv1126
        spi: rockchip: Support SPI_CS_HIGH
        spi: rockchip: Support cs-gpio
        spi: rockchip: Wait for STB status in slave mode tx_xfer
        spi: rockchip: Set rx_fifo interrupt waterline base on transfer item
        spi: rockchip: add compatible string for rv1126
        spi: spi-sun6i: Fix chipselect/clock bug
        spi: dt-bindings: support devices with multiple chipselects
        spi: add ancillary device support
        spi: xilinx: convert to yaml
        spi: convert Cadence SPI bindings to YAML
        spi: stm32-qspi: Remove unused qspi field of struct stm32_qspi_flash
        spi: add of_device_uevent_modalias support
        spi: meson-spicc: fix memory leak in meson_spicc_probe
        spi: meson-spicc: fix a wrong goto jump for avoiding memory leak.
        ...
      69609a91
    • Linus Torvalds's avatar
      Merge tag 'regulator-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · c10383b3
      Linus Torvalds authored
      Pull regulator updates from Mark Brown:
       "The main core change this release is generic support for handling of
        hardware errors from Matti Vaittinen, including some small updates to
        the reboot and thermal code so we can share support for powering off
        the system if things are going wrong enough.
      
        Otherwise this release we've mainly seen the addition of new drivers,
        including MT6359 which has pulled in some small changes from the MFD
        tree for build dependencies.
      
         - Support for controlling the trigger points for hardware error
           detection, and shared handlers for this.
      
         - Support for Maxim MAX8993, Mediatek MT6359 and MT6359P, Qualcomm
           PM8226 and SA8115P-ADP, and Sylergy TCS4526"
      
      * tag 'regulator-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (91 commits)
        regulator: bd9576: Fix uninitializes variable may_have_irqs
        regulator: max8893: Select REGMAP_I2C to fix build error
        regulator: da9052: Ensure enough delay time for .set_voltage_time_sel
        regulator: mt6358: Fix vdram2 .vsel_mask
        regulator: hi6421v600: Fix setting wrong driver_data
        MAINTAINERS: Add reviewer for regulator irq_helpers
        regulator: bd9576: Fix the driver name in id table
        regulator: bd9576: Support error reporting
        regulator: bd9576 add FET ON-resistance for OCW
        regulator: add property parsing and callbacks to set protection limits
        regulator: IRQ based event/error notification helpers
        regulator: move rdev_print helpers to internal.h
        regulator: add warning flags
        thermal: Use generic HW-protection shutdown API
        reboot: Add hardware protection power-off
        regulator: Add protection limit properties
        regulator: hi6421v600: Fix setting idle mode
        regulator: Add MAX8893 bindings
        regulator: max8893: add regulator driver
        regulator: hi6421: Use correct variable type for regmap api val argument
        ...
      c10383b3
    • Linus Torvalds's avatar
      Merge tag 'regmap-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 52f8cf8b
      Linus Torvalds authored
      Pull regmap updates from Mark Brown:
       "The big thing this release is support for accessing the register maps
        of MDIO devices via the framework. We've also added support for 7/17
        register formats on bytestream transports and inverted status
        registers in regmap-irq"
      
      * tag 'regmap-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: mdio: Reject invalid addresses
        regmap: mdio: Fix regmap_bus pointer constness
        regmap: mdio: Add clause-45 support
        regmap: mdio: Clean up invalid clause-22 addresses
        regmap-irq: Introduce inverted status registers support
        regmap: add support for 7/17 register formating
        regmap: mdio: Don't modify output if error happened
        regmap: Add MDIO bus support
        regmap-i2c: Set regmap max raw r/w from quirks
      52f8cf8b
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · ef60eb0e
      Linus Torvalds authored
      Pull MMC and MEMSTICK updates from Ulf Hansson:
       "MMC core:
         - Add support for Cache Ctrl for SD cards
         - Add support for Power Off Notification for SD cards
         - Add support for read/write of the SD function extension registers
         - Allow broken eMMC HS400 mode to be disabled via DT
         - Allow UHS-I voltage switch for SDSC cards if supported
         - Disable command queueing in the ioctl path
         - Enable eMMC sleep commands to use HW busy polling to minimize delay
         - Extend re-use of the common polling loop to standardize behaviour
         - Take into account MMC_CAP_NEED_RSP_BUSY for eMMC HPI commands
      
        MMC host:
         - jz4740: Add support for the JZ4775 variant
         - sdhci-acpi: Disable write protect detection on Toshiba Encore 2 WT8-B
         - sdhci-esdhc-imx: Advertise HS400 support through MMC caps
         - sdhci-esdhc-imx: Enable support for system wakeup for SDIO
         - sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211
         - vub3000: Fix control-request direction
      
        MEMSTICK:
         - A couple of fixes/cleanups"
      
      * tag 'mmc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (54 commits)
        mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211
        dt-bindings: mmc: sdhci-iproc: Add brcm,bcm7211a0-sdhci
        mmc: JZ4740: Add support for JZ4775
        dt-bindings: mmc: JZ4740: Add bindings for JZ4775
        mmc: sdhci-esdhc-imx: Enable support for system wakeup for SDIO
        mmc: Improve function name when aborting a tuning cmd
        mmc: sdhci-of-aspeed: Turn down a phase correction warning
        mmc: debugfs: add description for module parameter
        mmc: via-sdmmc: add a check against NULL pointer dereference
        mmc: sdhci-sprd: use sdhci_sprd_writew
        mmc: sdhci-esdhc-imx: remove unused is_imx6q_usdhc
        mmc: core: Allow UHS-I voltage switch for SDSC cards if supported
        mmc: mmc_spi: Imply container_of() to be no-op
        mmc: mmc_spi: Drop duplicate 'mmc_spi' in the debug messages
        mmc: dw_mmc-pltfm: Remove unused <linux/clk.h>
        mmc: sdhci-of-aspeed: Configure the SDHCIs as specified by the devicetree.
        mmc: core: Add a missing SPDX license header
        mmc: vub3000: fix control-request direction
        mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding
        mmc: sdhci_am654: Use pm_runtime_resume_and_get() to replace open coding
        ...
      ef60eb0e
    • Linus Torvalds's avatar
      Merge tag 'for-5.14/libata-2021-06-27' of git://git.kernel.dk/linux-block · 43bd8a67
      Linus Torvalds authored
      Pull libata updates from Jens Axboe:
       "The big change in this round is that we're finally in a position where
        we can sanely remove the old drivers/ide/ code, as libata covers
        everything we need by now.
      
        This is exciting for two reasons:
      
         1) we delete a lot of legacy code that doesn't really meet the
            standards we have today, and
      
         2) it enables us to clean up various bits in the block layer that
            exist only because of the old IDE code.
      
        Outside of that, just a few minor fixes here, fixups for warnings,
        etc"
      
      * tag 'for-5.14/libata-2021-06-27' of git://git.kernel.dk/linux-block: (29 commits)
        ata: rb532_cf: remove redundant codes
        ide: remove the legacy ide driver
        m68k: use libata instead of the legacy ide driver
        ARM: disable CONFIG_IDE in pxa_defconfig
        ARM: disable CONFIG_IDE in footbridge_defconfig
        alpha: use libata instead of the legacy ide driver
        pata_cypress: add a module option to disable BM-DMA
        ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht'
        ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht
        ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in '
        ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht'
        ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht'
        ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht'
        ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht'
        ata: sata_mv: Do not over-write initialise fields in 'mv6_sht'
        ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht'
        ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT()
        ata: include: libata: Move fields commonly over-written to separate MACRO
        ahci: Add support for Dell S140 and later controllers
        ata: ahci_sunxi: Disable DIPM
        ...
      43bd8a67
    • Mel Gorman's avatar
      mm/page_alloc: Correct return value of populated elements if bulk array is populated · 66d92825
      Mel Gorman authored
      Dave Jones reported the following
      
      	This made it into 5.13 final, and completely breaks NFSD for me
      	(Serving tcp v3 mounts).  Existing mounts on clients hang, as do
      	new mounts from new clients.  Rebooting the server back to rc7
      	everything recovers.
      
      The commit b3b64ebd ("mm/page_alloc: do bulk array bounds check after
      checking populated elements") returns the wrong value if the array is
      already populated which is interpreted as an allocation failure. Dave
      reported this fixes his problem and it also passed a test running dbench
      over NFS.
      
      Fixes: b3b64ebd ("mm/page_alloc: do bulk array bounds check after checking populated elements")
      Reported-and-tested-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: <stable@vger.kernel.org> [5.13+]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      66d92825
  2. 27 Jun, 2021 2 commits
    • Linus Torvalds's avatar
      Linux 5.13 · 62fb9874
      Linus Torvalds authored
      62fb9874
    • Linus Torvalds's avatar
      Revert "signal: Allow tasks to cache one sigqueue struct" · b4b27b9e
      Linus Torvalds authored
      This reverts commits 4bad58eb (and
      399f8dd9, which tried to fix it).
      
      I do not believe these are correct, and I'm about to release 5.13, so am
      reverting them out of an abundance of caution.
      
      The locking is odd, and appears broken.
      
      On the allocation side (in __sigqueue_alloc()), the locking is somewhat
      straightforward: it depends on sighand->siglock.  Since one caller
      doesn't hold that lock, it further then tests 'sigqueue_flags' to avoid
      the case with no locks held.
      
      On the freeing side (in sigqueue_cache_or_free()), there is no locking
      at all, and the logic instead depends on 'current' being a single
      thread, and not able to race with itself.
      
      To make things more exciting, there's also the data race between freeing
      a signal and allocating one, which is handled by using WRITE_ONCE() and
      READ_ONCE(), and being mutually exclusive wrt the initial state (ie
      freeing will only free if the old state was NULL, while allocating will
      obviously only use the value if it was non-NULL, so only one or the
      other will actually act on the value).
      
      However, while the free->alloc paths do seem mutually exclusive thanks
      to just the data value dependency, it's not clear what the memory
      ordering constraints are on it.  Could writes from the previous
      allocation possibly be delayed and seen by the new allocation later,
      causing logical inconsistencies?
      
      So it's all very exciting and unusual.
      
      And in particular, it seems that the freeing side is incorrect in
      depending on "current" being single-threaded.  Yes, 'current' is a
      single thread, but in the presense of asynchronous events even a single
      thread can have data races.
      
      And such asynchronous events can and do happen, with interrupts causing
      signals to be flushed and thus free'd (for example - sending a
      SIGCONT/SIGSTOP can happen from interrupt context, and can flush
      previously queued process control signals).
      
      So regardless of all the other questions about the memory ordering and
      locking for this new cached allocation, the sigqueue_cache_or_free()
      assumptions seem to be fundamentally incorrect.
      
      It may be that people will show me the errors of my ways, and tell me
      why this is all safe after all.  We can reinstate it if so.  But my
      current belief is that the WRITE_ONCE() that sets the cached entry needs
      to be a smp_store_release(), and the READ_ONCE() that finds a cached
      entry needs to be a smp_load_acquire() to handle memory ordering
      correctly.
      
      And the sequence in sigqueue_cache_or_free() would need to either use a
      lock or at least be interrupt-safe some way (perhaps by using something
      like the percpu 'cmpxchg': it doesn't need to be SMP-safe, but like the
      percpu operations it needs to be interrupt-safe).
      
      Fixes: 399f8dd9 ("signal: Prevent sigqueue caching after task got released")
      Fixes: 4bad58eb ("signal: Allow tasks to cache one sigqueue struct")
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Christian Brauner <christian.brauner@ubuntu.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4b27b9e
  3. 26 Jun, 2021 2 commits
  4. 25 Jun, 2021 27 commits