aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-21spi: Add missing pm_runtime_put_noidle() after failed getTony Lindgren1-0/+1
If pm_runtime_get_sync() fails we should call pm_runtime_put_noidle(). This is probably not a critical fix as we should only hit this when things are broken elsewhere. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-17spi: ti-qspi: Make sure res_mmap != NULL before dereferencing itBoris Brezillon1-1/+3
resource_size() is dereferencing the res without checking that it is not NULL, so we need to do the check before calling resource_size(). Fixes: b95cb394ab59 ("spi: ti-qspi: Implement the spi_mem interface") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-17spi: spi-s3c64xx: Fix system resume supportMarek Szyprowski1-2/+2
Since Linux v4.10 release (commit 1d9174fbc55e "PM / Runtime: Defer resuming of the device in pm_runtime_force_resume()"), pm_runtime_force_resume() function doesn't runtime resume device if it was not runtime active before system suspend. Thus, driver should not do any register access after pm_runtime_force_resume() without checking the runtime status of the device. To fix this issue, simply move s3c64xx_spi_hwinit() call to s3c64xx_spi_runtime_resume() to ensure that hardware is always properly initialized. This fixes Synchronous external abort issue on system suspend/resume cycle on newer Exynos SoCs. Signed-off-by: Marek Szyprowski <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2018-05-13spi: bcm-qspi: Fix build failure caused by spi_flash_read() API removalBoris Brezillon1-31/+3
Patch http://patchwork.ozlabs.org/patch/905205/ has been partially applied, and changes to the bcm-qspi driver have been lost somehow (probably due to a conflict when applying the patch). Remove the ->spi_flash_read() bits from this driver to fix the build error. Fixes: c1f5ba70decf ("spi: Get rid of the spi_flash_read() API") Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-11spi: Get rid of the spi_flash_read() APIBoris Brezillon3-151/+0
This API has been replaced by the spi_mem_xx() one, its only user (spi-nor) has been converted to spi_mem_xx() and all SPI controller drivers that were implementing the ->spi_flash_xxx() hooks are also implementing the spi_mem ones. So we can safely get rid of this API. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Tested-by: Frieder Schrempf <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-11mtd: spi-nor: Use the spi_mem_xx() APIBoris Brezillon2-157/+80
The spi_mem_xxx() API has been introduced to replace the spi_flash_read() one. Make use of it so we can get rid of spi_flash_read(). Note that using spi_mem_xx() also simplifies the code because this API takes care of using the regular spi_sync() interface when the optimized ->mem_ops interface is not implemented by the controller. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Tested-by: Frieder Schrempf <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-11spi: ti-qspi: Implement the spi_mem interfaceBoris Brezillon1-13/+71
The spi_mem interface is meant to replace the spi_flash_read() one. Implement the ->exec_op() method so that we can smoothly get rid of the old interface. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Vignesh R <[email protected]> Tested-by: Vignesh R <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-11spi: bcm-qspi: Implement the spi_mem interfaceBoris Brezillon1-79/+111
The spi_mem interface is meant to replace the ->spi_flash_read() one. Implement the ->exec_op() method to ease removal of the old interface. Not that ->spi_flash_read() is now implemented as a wrapper around the new bcm_qspi_exec_mem_op() function so that we can easily get rid of it when ->spi_flash_read() is removed. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Kamal Dasu <[email protected]> Tested-by: Kamal Dasu <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-11spi: Make support for regular transfers optional when ->mem_ops != NULLBoris Brezillon1-7/+26
Some SPI/QuadSPI controllers only expose a high-level SPI memory interface, thus preventing any regular SPI transfers from being done. In that case, SPI controller drivers can leave all ->transfer_xxx() hooks empty and only implement the spi_mem_ops interface. Adjust the core to allow such situations: - extend spi_controller_check_ops() to accept situations where all ->transfer_xxx() pointers are NULL only if ->mem_ops != NULL - make sure we do not initialize the SPI message queue if ctlr->transfer_one and ctlr->transfer_one_message are missing - return -ENOTSUPP if someone tries to do a regular SPI transfer on a controller that does not support it Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Tested-by: Frieder Schrempf <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-11spi: Extend the core to ease integration of SPI memory controllersBoris Brezillon5-0/+674
Some controllers are exposing high-level interfaces to access various kind of SPI memories. Unfortunately they do not fit in the current spi_controller model and usually have drivers placed in drivers/mtd/spi-nor which are only supporting SPI NORs and not SPI memories in general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Tested-by: Frieder Schrempf <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-10spi: remove forgotten CONFIG_SPI_BCM53XXRafał Miłecki2-9/+0
I accidentally sent an early version of patch removing spi-bcm53xx driver which got rid of .c and .h files *only*. I amended local commit but forgot to re-format the patch. This commit removes leftovers of dropped driver. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-09spi: remove the older/duplicated bcm53xx driverRafał Miłecki2-433/+0
This driver was added by commit 0fc6a323e1917 ("spi: bcm53xx: driver for SPI controller on Broadcom bcma SoC") back in 2014. It was needed to provide a minimal support for SPI controller on BCM5301X (AKA Northstar) devices. An alternative driver was added by Kamal in commit fa236a7ef2404 ("spi: bcm-qspi: Add Broadcom MSPI driver") 2 years later. It supports the same hardware but for some reason a new driver has been developed for it. At this point the new driver supports: more modes, setting a speed, setting bits per word and uses IRQs instead of polling. DTS file for BCM5301X has also been updated in the commit 1c8f406507238 ("ARM: dts: BCM5301X: convert to iProc QSPI") - over a year ago. That explained I see no reason to keep the old driver alive. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-04spi: pxa2xx: check clk_prepare_enable() return valueTobias Jordan1-5/+13
clk_prepare_enable() can fail, so its return value should be checked and acted upon. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3343b7a6d2cd ("spi/pxa2xx: convert to the common clk framework") Signed-off-by: Tobias Jordan <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-03spi: lpspi: Switch to SPDX identifierFabio Estevam1-16/+5
Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-03spi: mxs: Switch to SPDX identifierFabio Estevam1-29/+19
Adopt the SPDX license identifier headers to ease license compliance management. Cc: Marek Vasut <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-03spi: imx: Switch to SPDX identifierFabio Estevam1-19/+3
Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-02spi: omap2-mcspi: Idle hardware during suspend and resumeTony Lindgren1-10/+48
We currently are calling mcspi suspend and resume without considering that mcspi might provide resources for other device driver such as regulators. This means resume can fail and will produce -EACCES if errors if anything calls mcspi functions between device_prepare() and device_complete(). To fix the issue, let's do the following changes: 1. Let's add checking for return values for pm_runtime_get calls, and call pm_runtime_put_noidle() on errors. Things still fail after this change, but at least we see something is wrong as we now see -EACCES errors on resume. 2. Let's use noirq level for suspend and resume as other drivers can still call SPI related functions on suspend and resume. This still won't fix the -EACCES issue, but gets us to something a bit saner. 3. Finally, let's modify suspend and resume to call to make sure the device is idled properly on suspend. We have device_prepare() call pm_runtime_get_noresume() that won't get released until in device_complete() when it calls pm_runtime_put(). So if SPI is still active on entering suspend, it will never get idled unless we add calls to pm_runtime_force_suspend() and resume. This also fixes the -EACCES errors on resume together with changes 1 and 2 above. And since we're already rewriting suspend resume functions, let's arrange the order of suspend and resume functions to be like they usually are with suspend first. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-02spi: omap2-mcspi: Restore context always in runtime_resumeTony Lindgren1-45/+30
We can have the SoC enter off mode also during idle, not just during suspend. Currently we are handling the CS restore properly for unused CS only for resume and not for runtime resume. Let's just move all the context related restore to runtime_resume(). Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-02spi: meson-spicc: Fix error handling in meson_spicc_probe()Alexey Khoroshilov1-3/+8
If devm_spi_register_master() fails in meson_spicc_probe(), spicc->core is left undisabled. The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-27spi: mpc52xx: Use gpio_is_valid()Arvind Yadav1-1/+1
Replace the manual validity checks for the GPIO with the gpio_is_valid(). Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-26spi: Check presence the of ->transfer[_xxx]() before registering a controllerBoris Brezillon1-0/+21
Right now, no checks are done on the presence of a ->transfer[_xxx]() method, which can lead to a NULL pointer dereference when someone starts sending something on the bus. Do the check at registration time and refuse to add the controller if all ->transfer[_xxx]() pointers are NULL. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-26spi/bcm63xx-hspi: Enable the clock before calling clk_get_rate().Stefan Potyra1-8/+17
Enable the clock prior to calling clk_get_rate(), because clk_get_rate() should only be called if the clock is enabled. Additionally, prepare/enable the pll_clk before calling clk_get_rate() for the same reason. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 142168eba9dc ("spi: bcm63xx-hsspi: add bcm63xx HSSPI driver") Signed-off-by: Stefan Potyra <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-25spi: s3c64xx: samsung: Remove support for Exynos5440Krzysztof Kozlowski1-12/+0
The Exynos5440 is not actively developed, there are no development boards available and probably there are no real products with it. Remove wide-tree support for Exynos5440. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-23spi: Add an helper to flush the message queueBoris Brezillon2-0/+18
This is needed by the spi-mem logic to force all messages that have been queued before a memory operation to be sent before we start the memory operation. We do that in order to guarantee that spi-mem operations do not preempt regular SPI transfers. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-23spi: Expose spi_{map,unmap}_buf() for internal useBoris Brezillon2-18/+48
spi_{map,unmap}_buf() are needed by the spi-mem logic that is about to be introduced to prepare data buffer for DMA operations. Remove the static specifier on these functions and add their prototypes to drivers/spi/internals.h. We do not export the symbols here because both SPI_MEM and SPI can't be enabled as modules and we'd like to prevent controller/device drivers from using these functions. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-20spi: simplify getting .drvdataWolfram Sang2-8/+4
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Michal Simek <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-19spi: pxa2xx: Allow 64-bit DMAAndy Shevchenko1-1/+1
Currently the 32-bit device address only is supported for DMA. However, starting from Intel Sunrisepoint PCH the DMA address of the device FIFO can be 64-bit. Change the respective variable to be compatible with DMA engine expectations, i.e. to phys_addr_t. Fixes: 34cadd9c1bcb ("spi: pxa2xx: Add support for Intel Sunrisepoint") Cc: Jarkko Nikula <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-18spi: spi-s3c64xx: Allow higher transfer lengths in polling IO modeSylwester Nawrocki1-33/+66
Some variants of the SPI controller have no DMA support, in such case SPI transfers longer than the FIFO length are not currently properly handled by the driver. Fix it by doing multiple transfers in the s3c64xx_spi_transfer_one() function if the SPI transfer length exceeds the FIFO size. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-18spi: spi-s3c64xx: Use local variable for FIFO lengthSylwester Nawrocki1-3/+3
More references to fifo_len are added in subsequent patch. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-18spi: pxa2xx: pxa2xx_spi_transfer_one() can be statickbuild test robot1-3/+3
Fixes: d5898e19c0d7 ("spi: pxa2xx: Use core message processing loop") Signed-off-by: Fengguang Wu <[email protected]> Reviewed-by: Jarkko Nikula <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-18spi: spi-s3c64xx: Add missing s3c64xx_ prefix to function namesSylwester Nawrocki1-12/+12
Add a s3c64xx_ prefix to remaining generic function names so it is clear the code is part of the driver when grepping or looking at debug logs. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-18spi: spi-s3c64xx: Drop unused enable_datapath() function argumentSylwester Nawrocki1-3/+2
The spi pointer argument is not used now so remove it. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-18spi: Remove depends on HAS_DMA in case of platform dependencyGeert Uytterhoeven1-9/+3
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their dependencies on HAS_DMA, to prevent compiling subsystems or drivers that cannot work anyway. This simplifies the dependencies, and allows to improve compile-testing. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Mark Brown <[email protected]> Acked-by: Robin Murphy <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: pxa2xx: Use core message processing loopJarkko Nikula3-185/+89
Convert the pump_transfers() transfer tasklet to transfer_one() hook the SPI core calls to process single transfer instead of handling message processing and chip select handling in the driver. This not only simplifies the driver but also brings transfer statistics from the core. Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: pxa2xx: Remove pump_transfers string from dev_ printsJarkko Nikula1-6/+4
We are going to rename and modify pump_transfers(). Prepare for it by removing the string "pump_transfers:" from error and warning prints. While at it make these user-visible strings single line in sources as it helps source grepping from error reports. Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: pxa2xx: Remove unused argument from pxa2xx_spi_dma_prepare()Jarkko Nikula3-3/+3
Current DMA engine implementation of pxa2xx_spi_dma_prepare() don't use the dma_burst argument. Remove it since it became unused after commit 6356437e65c2 ("spi: spi-pxa2xx: remove legacy PXA DMA bits"). Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: spi-s3c64xx: Fix indentation in the register offset definitionsSylwester Nawrocki1-8/+8
Change indentation so register address offset and register bit definitions are aligned to same column. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: spi-s3c64xx: Do not ignore timeout errors in polling I/O modeSylwester Nawrocki1-0/+2
Currently timeout errors in polling I/O mode transfer are silently ignored. Fix it by returning an error when we time out waiting on the RX FIFO level to reach the transfer length. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: spi-s3c64xx: Remove unused s3c64xx_spi_hwinit() function argumentSylwester Nawrocki1-3/+3
The channel argument is not used and anyway it could be retrieved from the passed driver data structure. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: spi-s3c64xx: Remove unused driver data structure tgl_spi fieldSylwester Nawrocki1-2/+0
The tgl_spi pointer is now unused so remove it. Signed-off-by: Sylwester Nawrocki <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: zynqmp: Add pm runtime supportNaga Sureshkumar Relli1-16/+70
This patch adds runtime pm functions. Signed-off-by: Shubhrajyoti Datta <[email protected]> Signed-off-by: Naga Sureshkumar Relli <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: sh-msiof: Simplify calculation of divisors for transfer rateVladimir Zapolskiy1-32/+35
The change updates sh_msiof_spi_set_clk_regs() function by iterating over BRDV power values. Note that the change is a functional one, namely prescaler output x 1/1 set in BRDV bit field (0b111) for MSO division rate set to 2 is substituted by BRDV = 0b000 and BRPS = 0b0, in terms of written values to TSCR setting of 0x0107 is substituted by 0x0000, and for all input parameter cases this is the only functional change, which touches the controller. As a result of the rework the function is supposed to be slightly more efficient and more readable and maintainable in case of any further extensions. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-17spi: stm32: Fix error handling in stm32_spi_probe()Alexey Khoroshilov1-1/+1
clk_get_rate() is below clk_prepare_enable(), so its error should lead to goto err_clk_disable, not to err_master_put. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Reviewed-by: Amelie Delaunay <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-16spi: sh-msiof: Fix bit field overflow writes to TSCR/RSCRVladimir Zapolskiy1-0/+1
The change fixes a bit field overflow which allows to write to higher bits while calculating SPI transfer clock and setting BRPS and BRDV bit fields, the problem is reproduced if 'parent_rate' to 'spi_hz' ratio is greater than 1024, for instance p->min_div = 2, MSO rate = 33333333, SPI device rate = 10000 results in k = 5, i.e. BRDV = 0b100 or 1/32 prescaler output, BRPS = 105, TSCR value = 0x6804, thus MSSEL and MSIMM bit fields are non-zero. Fixes: 65d5665bb260 ("spi: sh-msiof: Update calculation of frequency dividing") Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-13spi: imx: Update MODULE_DESCRIPTION to "SPI Controller driver"wangbo1-1/+1
Now i.MX SPI controller can work in Slave mode. Update MODULE_DESCRIPTION to "SPI Controller driver". Signed-off-by: wangbo <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-11Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds2-1/+9
Pull virtio update from Michael Tsirkin: "This adds reporting hugepage stats to virtio-balloon" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: export hugetlb page allocation counts
2018-04-11Merge tag 'iommu-updates-v4.17' of ↵Linus Torvalds25-853/+1008
git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - OF_IOMMU support for the Rockchip iommu driver so that it can use generic DT bindings - rework of locking in the AMD IOMMU interrupt remapping code to make it work better in RT kernels - support for improved iotlb flushing in the AMD IOMMU driver - support for 52-bit physical and virtual addressing in the ARM-SMMU - various other small fixes and cleanups * tag 'iommu-updates-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (53 commits) iommu/io-pgtable-arm: Avoid warning with 32-bit phys_addr_t iommu/rockchip: Support sharing IOMMU between masters iommu/rockchip: Add runtime PM support iommu/rockchip: Fix error handling in init iommu/rockchip: Use OF_IOMMU to attach devices automatically iommu/rockchip: Use IOMMU device for dma mapping operations dt-bindings: iommu/rockchip: Add clock property iommu/rockchip: Control clocks needed to access the IOMMU iommu/rockchip: Fix TLB flush of secondary IOMMUs iommu/rockchip: Use iopoll helpers to wait for hardware iommu/rockchip: Fix error handling in attach iommu/rockchip: Request irqs in rk_iommu_probe() iommu/rockchip: Fix error handling in probe iommu/rockchip: Prohibit unbind and remove iommu/amd: Return proper error code in irq_remapping_alloc() iommu/amd: Make amd_iommu_devtable_lock a spin_lock iommu/amd: Drop the lock while allocating new irq remap table iommu/amd: Factor out setting the remap table for a devid iommu/amd: Use `table' instead `irt' as variable name in amd_iommu_update_ga() iommu/amd: Remove the special case from alloc_irq_table() ...
2018-04-11Merge tag 'pm-4.17-rc1-2' of ↵Linus Torvalds25-161/+438
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These include one big-ticket item which is the rework of the idle loop in order to prevent CPUs from spending too much time in shallow idle states. It reduces idle power on some systems by 10% or more and may improve performance of workloads in which the idle loop overhead matters. This has been in the works for several weeks and it has been tested and reviewed quite thoroughly. Also included are changes that finalize the cpufreq cleanup moving frequency table validation from drivers to the core, a few fixes and cleanups of cpufreq drivers, a cpuidle documentation update and a PM QoS core update to mark the expected switch fall-throughs in it. Specifics: - Rework the idle loop in order to prevent CPUs from spending too much time in shallow idle states by making it stop the scheduler tick before putting the CPU into an idle state only if the idle duration predicted by the idle governor is long enough. That required the code to be reordered to invoke the idle governor before stopping the tick, among other things (Rafael Wysocki, Frederic Weisbecker, Arnd Bergmann). - Add the missing description of the residency sysfs attribute to the cpuidle documentation (Prashanth Prakash). - Finalize the cpufreq cleanup moving frequency table validation from drivers to the core (Viresh Kumar). - Fix a clock leak regression in the armada-37xx cpufreq driver (Gregory Clement). - Fix the initialization of the CPU performance data structures for shared policies in the CPPC cpufreq driver (Shunyong Yang). - Clean up the ti-cpufreq, intel_pstate and CPPC cpufreq drivers a bit (Viresh Kumar, Rafael Wysocki). - Mark the expected switch fall-throughs in the PM QoS core (Gustavo Silva)" * tag 'pm-4.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits) tick-sched: avoid a maybe-uninitialized warning cpufreq: Drop cpufreq_table_validate_and_show() cpufreq: SCMI: Don't validate the frequency table twice cpufreq: CPPC: Initialize shared perf capabilities of CPUs cpufreq: armada-37xx: Fix clock leak cpufreq: CPPC: Don't set transition_latency cpufreq: ti-cpufreq: Use builtin_platform_driver() cpufreq: intel_pstate: Do not include debugfs.h PM / QoS: mark expected switch fall-throughs cpuidle: Add definition of residency to sysfs documentation time: hrtimer: Use timerqueue_iterate_next() to get to the next timer nohz: Avoid duplication of code related to got_idle_tick nohz: Gather tick_sched booleans under a common flag field cpuidle: menu: Avoid selecting shallow states with stopped tick cpuidle: menu: Refine idle state selection for running tick sched: idle: Select idle state before stopping the tick time: hrtimer: Introduce hrtimer_next_event_without() time: tick-sched: Split tick_nohz_stop_sched_tick() cpuidle: Return nohz hint from cpuidle_select() jiffies: Introduce USER_TICK_USEC and redefine TICK_USEC ...
2018-04-11Merge tag 'ktest-v4.17' of ↵Linus Torvalds3-272/+1091
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: "These commits have either been sitting in my INBOX or have been in my local tree for some time. I need to push them upstream: - Separate out config-bisect.pl from ktest.pl. This allows users to do config bisects without full ktest setup. - Email on status change. Allow the user to be emailed on test start, finish, failure, etc. - Other small fixes and enhancements" * tag 'ktest-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: (24 commits) ktest: Take submenu into account for grub2 menus ktest.pl: Add MAIL_COMMAND option to define how to send email ktest.pl: Use run_command to execute sending mail ktest.pl: Allow dodie be recursive ktest.pl: Kill test if mailer is not supported ktest.pl: Add MAIL_PATH option to define where to find the mailer ktest.pl: No need to print no mailer is specified when mailto is not Ktest: add email options to sample.config Ktest: Use dodie for critical falures Ktest: Add SigInt handling Ktest: Add email support ktest.pl: Detect if a config-bisect was interrupted ktest.pl: Make finding config-bisect.pl dynamic ktest.pl: Have ktest.pl pass -r to config-bisect.pl to reset bisect ktest.pl: Use diffconfig if available for failed config bisects ktest.pl: Allow for the config-bisect.pl output to display to console ktest: Use config-bisect.pl in ktest.pl ktest: Add standalone config-bisect.pl program ktest: Set do_not_reboot=y for CONFIG_BISECT_TYPE=build ktest: Set buildonly=1 for CONFIG_BISECT_TYPE=build ...
2018-04-11Merge tag 'tags/upstream-4.17-rc1' of git://git.infradead.org/linux-ubifsLinus Torvalds7-11/+24
Pull UBI and UBIFS updates from Richard Weinberger: "Minor bug fixes and improvements" * tag 'tags/upstream-4.17-rc1' of git://git.infradead.org/linux-ubifs: ubi: Reject MLC NAND ubifs: Remove useless parameter of lpt_heap_replace ubifs: Constify struct ubifs_lprops in scan_for_leb_for_idx ubifs: remove unnecessary assignment ubi: Fix error for write access ubi: fastmap: Don't flush fastmap work on detach ubifs: Check ubifs_wbuf_sync() return code