]> git.ipfire.org Git - people/ms/linux.git/log
people/ms/linux.git
4 years agoMerge branch 'bpftool: fix feature output when helper probes fail'
Andrii Nakryiko [Tue, 10 May 2022 00:16:05 +0000 (17:16 -0700)] 
Merge branch 'bpftool: fix feature output when helper probes fail'

Milan Landaverde says:

====================

Currently in bpftool's feature probe, we incorrectly tell the user that
all of the helper functions are supported for program types where helper
probing fails or is explicitly unsupported[1]:

$ bpftool feature probe
...
eBPF helpers supported for program type tracing:
- bpf_map_lookup_elem
- bpf_map_update_elem
- bpf_map_delete_elem
...
- bpf_redirect_neigh
- bpf_check_mtu
- bpf_sys_bpf
- bpf_sys_close

This patch adjusts bpftool to relay to the user when helper support
can't be determined:

$ bpftool feature probe
...
eBPF helpers supported for program type lirc_mode2:
    Program type not supported
eBPF helpers supported for program type tracing:
    Could not determine which helpers are available
eBPF helpers supported for program type struct_opts:
    Could not determine which helpers are available
eBPF helpers supported for program type ext:
    Could not determine which helpers are available

Rather than imply that no helpers are available for the program type, we
let the user know that helper function probing failed entirely.

[1] https://lore.kernel.org/bpf/20211217171202.3352835-2-andrii@kernel.org/
====================

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
4 years agobpftool: Output message if no helpers found in feature probing
Milan Landaverde [Wed, 4 May 2022 16:13:32 +0000 (12:13 -0400)] 
bpftool: Output message if no helpers found in feature probing

Currently in libbpf, we have hardcoded program types that are not
supported for helper function probing (e.g. tracing, ext, lsm).
Due to this (and other legitimate failures), bpftool feature probe returns
empty for those program type helper functions.

Instead of implying to the user that there are no helper functions
available for a program type, we output a message to the user explaining
that helper function probing failed for that program type.

Signed-off-by: Milan Landaverde <milan@mdaverde.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220504161356.3497972-3-milan@mdaverde.com
4 years agobpftool: Adjust for error codes from libbpf probes
Milan Landaverde [Wed, 4 May 2022 16:13:31 +0000 (12:13 -0400)] 
bpftool: Adjust for error codes from libbpf probes

Originally [1], libbpf's (now deprecated) probe functions returned a bool
to acknowledge support but the new APIs return an int with a possible
negative error code to reflect probe failure. This change decides for
bpftool to declare maps and helpers are not available on probe failures.

[1]: https://lore.kernel.org/bpf/20220202225916.3313522-3-andrii@kernel.org/

Signed-off-by: Milan Landaverde <milan@mdaverde.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220504161356.3497972-2-milan@mdaverde.com
4 years agosched: Fix build warning without CONFIG_SYSCTL
YueHaibing [Wed, 27 Apr 2022 13:10:02 +0000 (21:10 +0800)] 
sched: Fix build warning without CONFIG_SYSCTL

IF CONFIG_SYSCTL is n, build warn:

kernel/sched/core.c:1782:12: warning: ‘sysctl_sched_uclamp_handler’ defined but not used [-Wunused-function]
 static int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~

sysctl_sched_uclamp_handler() is used while CONFIG_SYSCTL enabled,
wrap all related code with CONFIG_SYSCTL to fix this.

Fixes: 3267e0156c33 ("sched: Move uclamp_util sysctls to core.c")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
4 years agoreboot: Fix build warning without CONFIG_SYSCTL
YueHaibing [Wed, 27 Apr 2022 12:54:01 +0000 (20:54 +0800)] 
reboot: Fix build warning without CONFIG_SYSCTL

If CONFIG_SYSCTL is n, build warn:

kernel/reboot.c:443:20: error: ‘kernel_reboot_sysctls_init’ defined but not used [-Werror=unused-function]
 static void __init kernel_reboot_sysctls_init(void)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

Move kernel_reboot_sysctls_init() to #ifdef block to fix this.

Fixes: 06d177662fb8 ("kernel/reboot: move reboot sysctls to its own file")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
4 years agofscrypt: add new helper functions for test_dummy_encryption
Eric Biggers [Sun, 1 May 2022 05:08:54 +0000 (22:08 -0700)] 
fscrypt: add new helper functions for test_dummy_encryption

Unfortunately the design of fscrypt_set_test_dummy_encryption() doesn't
work properly for the new mount API, as it combines too many steps into
one function:

  - Parse the argument to test_dummy_encryption
  - Check the setting against the filesystem instance
  - Apply the setting to the filesystem instance

The new mount API has split these into separate steps.  ext4 partially
worked around this by duplicating some of the logic, but it still had
some bugs.  To address this, add some new helper functions that split up
the steps of fscrypt_set_test_dummy_encryption():

  - fscrypt_parse_test_dummy_encryption()
  - fscrypt_dummy_policies_equal()
  - fscrypt_add_test_dummy_key()

While we're add it, also add a function fscrypt_is_dummy_policy_set()
which will be useful to avoid some #ifdef's.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20220501050857.538984-5-ebiggers@kernel.org
4 years agofscrypt: factor out fscrypt_policy_to_key_spec()
Eric Biggers [Sun, 1 May 2022 05:08:53 +0000 (22:08 -0700)] 
fscrypt: factor out fscrypt_policy_to_key_spec()

Factor out a function that builds the fscrypt_key_specifier for an
fscrypt_policy.  Before this was only needed when finding the key for a
file, but now it will also be needed for test_dummy_encryption support.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20220501050857.538984-4-ebiggers@kernel.org
4 years agoethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one()
Yang Yingliang [Fri, 6 May 2022 09:42:50 +0000 (17:42 +0800)] 
ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one()

Fix the missing pci_disable_device() before return
from tulip_init_one() in the error handling case.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220506094250.3630615-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agoionic: fix missing pci_release_regions() on error in ionic_probe()
Yang Yingliang [Fri, 6 May 2022 03:40:40 +0000 (11:40 +0800)] 
ionic: fix missing pci_release_regions() on error in ionic_probe()

If ionic_map_bars() fails, pci_release_regions() need be called.

Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220506034040.2614129-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 years agomm,doc: Add new documentation structure
Matthew Wilcox (Oracle) [Sat, 7 May 2022 13:49:47 +0000 (14:49 +0100)] 
mm,doc: Add new documentation structure

Closely following the outline of Mel Gorman's book "Understanding the
Linux Virtual Memory Manager", add a new outline.  Preserve the current
contents of the mm underneath the new outline so we can transition those
documents to a more sensible place later.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lore.kernel.org/r/20220507134947.444287-1-willy@infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agoDocumentation: drop more IDE boot options and ide-cd.rst
Randy Dunlap [Sun, 24 Apr 2022 03:37:01 +0000 (20:37 -0700)] 
Documentation: drop more IDE boot options and ide-cd.rst

Drop ide-* command line options.
Drop cdrom/ide-cd.rst documentation.

Fixes: 898ee22c32be ("Drop Documentation/ide/")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220424033701.7988-1-rdunlap@infradead.org
[jc: also deleted reference from cdrom/index.rst]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agoDocumentation/process: use scripts/get_maintainer.pl on patches
Krzysztof Kozlowski [Wed, 27 Apr 2022 18:56:45 +0000 (20:56 +0200)] 
Documentation/process: use scripts/get_maintainer.pl on patches

Explain that, when collecting list of people to Cc the patch,
scripts/get_maintainer.pl should be used on patches, not on the
directories.  The behavior is quite different, because with "-f" on
a directory, the maintainers of individual files will not be shown.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220427185645.677039-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agoMAINTAINERS: Add entry for DOCUMENTATION/JAPANESE
Akira Yokosawa [Sat, 30 Apr 2022 07:59:33 +0000 (16:59 +0900)] 
MAINTAINERS: Add entry for DOCUMENTATION/JAPANESE

Due to the lack of an entry for the Japanese translation of
documentation, Kosuke Fujimoto needed to ask the status of
its maintenance [1].

Add an entry for DOCUMENTATION/JAPANESE as a sub-subsystem
under the DOCUMENTATION subsystem to make it easier for
another prospective contributor to know there is someone
who takes care of Japanese translation.

As a first step, install myself as a designated reviewer.
Hopefully, other interested members get accustomed to the
kernel-dev workflow and would get ready to be
(co-)maintainers/reviewers shortly.

[1]: https://lore.kernel.org/r/172fa015-26df-c978-853d-3aba67c581cc@gmail.com/

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Tsugikazu Shibata <shibata@linuxfoundation.org>
Cc: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Link: https://lore.kernel.org/r/7689b502-8c34-85b1-54e0-7a3b5e3c2bd1@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agodocs/trans/ja_JP/howto: Don't mention specific kernel versions
Kosuke Fujimoto [Sun, 1 May 2022 10:22:56 +0000 (19:22 +0900)] 
docs/trans/ja_JP/howto: Don't mention specific kernel versions

    This change is based on commit d2b008f134b7
    ("Documentation/process/howto: Update for 4.x -> 5.x versioning").

    Replace "4.x kernel version" with generic term such as "mainline tree"

Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
    ---
    V2: Reformatted commit log message (Yokosawa-san)
    V3: Updated some expressions (Shibata-san)
    - added "version number" in mainline tree section
    - updated from "stable kernel" to "stable tree"
    V4: Added reviewed by tag and removed extra characters (Yokosawa-san)
   V5: Removed an extra character (Shibata-san)

Signed-off-by: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Acked-by: Tsugikazu Shibata <shibata@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220501102256.6379-1-fujimotokosuke0@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agodocs/ja_JP/SubmittingPatches: Request summaries for commit references
Akira Yokosawa [Tue, 3 May 2022 10:48:20 +0000 (19:48 +0900)] 
docs/ja_JP/SubmittingPatches: Request summaries for commit references

Reflect changes made in commit 0af5270324cc
("Documentation/SubmittingPatches: Request summaries for commit
references").

Note: Translated paragraph uses a slightly different structure and
omit a redundant phrase so that they are easier to follow.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Tsugikazu Shibata <shibata@linuxfoundation.org>
Cc: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Tsugikazu Shibata <shibata@linuxfoundation.org>
Reviewed-by: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Link: https://lore.kernel.org/r/20220503104820.49269-1-akiyks@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agodocs/ja_JP/SubmittingPatches: Add Suggested-by as a standard signature
Akira Yokosawa [Tue, 3 May 2022 10:47:57 +0000 (19:47 +0900)] 
docs/ja_JP/SubmittingPatches: Add Suggested-by as a standard signature

Reflect changes made in commit 8543ae1296f6 ("checkpatch: add
Suggested-by as a standard signature").

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Tsugikazu Shibata <shibata@linuxfoundation.org>
Cc: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Tsugikazu Shibata <shibata@linuxfoundation.org>
Reviewed-by: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Link: https://lore.kernel.org/r/20220503104757.49208-1-akiyks@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agodocs/ja_JP/SubmittingPatches: Randy has moved
Akira Yokosawa [Tue, 3 May 2022 10:47:29 +0000 (19:47 +0900)] 
docs/ja_JP/SubmittingPatches: Randy has moved

Reflect changes made in commit 755727b7fb1e ("Randy has moved").

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Tsugikazu Shibata <shibata@linuxfoundation.org>
Cc: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Tsugikazu Shibata <shibata@linuxfoundation.org>
Reviewed-by: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Link: https://lore.kernel.org/r/20220503104729.49140-1-akiyks@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agodocs/ja_JP/SubmittingPatches: Suggest the use of scripts/get_maintainer.pl
Akira Yokosawa [Tue, 3 May 2022 10:46:50 +0000 (19:46 +0900)] 
docs/ja_JP/SubmittingPatches: Suggest the use of scripts/get_maintainer.pl

Reflect changes made in commit e52d2e1f25f0
("Documentation/SubmittingPatches: suggested the use of
scripts/get_maintainer.pl").

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Tsugikazu Shibata <shibata@linuxfoundation.org>
Cc: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Tsugikazu Shibata <shibata@linuxfoundation.org>
Reviewed-by: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Link: https://lore.kernel.org/r/20220503104650.49068-1-akiyks@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agodocs/ja_JP/SubmittingPatches: Update GregKH links
Akira Yokosawa [Tue, 3 May 2022 10:46:13 +0000 (19:46 +0900)] 
docs/ja_JP/SubmittingPatches: Update GregKH links

Reflect changes made in commit f5039935ac68 ("Documentation: update
GregKH links").

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Tsugikazu Shibata <shibata@linuxfoundation.org>
Cc: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Tsugikazu Shibata <shibata@linuxfoundation.org>
Reviewed-by: Kosuke Fujimoto <fujimotokosuke0@gmail.com>
Link: https://lore.kernel.org/r/20220503104613.49001-1-akiyks@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
4 years agoMerge tag 'imx-dt64-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Arnd Bergmann [Mon, 9 May 2022 21:46:17 +0000 (23:46 +0200)] 
Merge tag 'imx-dt64-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt

i.MX arm64 device tree update for 5.19:

- New board support: Engicam i.Core MX8M Plus SoM and EDIMM2.2 Starter
  Kit, Toradex Verdin i.MX8M Plus devices, Data Modul i.MX8M Mini eDM SBC,
  Verdin based MX8Menlo, 8MNANOD3L EVK, i.MX8M Plus Gateworks GW7400.
- Enable RTS-CTS on UART3 for imx8mm-beacon and imx8mn-beacon boards.
- Enable HS400-ES support for i.MX8MN and i.MX8MP uSDHC devices by
  updating the compatible.
- A few updates on imx8mq-librem5 to increase boost regulation
  current, add panel compatible for r4 ("Evergreen") revision and volume
  buttons a wakeup source.
- Clean up vendor specific 'fsl,uart-has-rtscts' property by using
  standard 'uart-has-rtscts'.
- Add GPC, GPU, MEDIAMIX, and HSIO power domains for i.MX8M Plus SoC.
- A series from Marcel Ziswiler to improve imx8mm-verdin support,
  including cosmetic changes and functional improvements like SD1 sleep
  pinctrl and fully validated IOMUX configuration.
- Add PWM polarity inversion support for i.MX8 SoCs.
- A couple of changes from Michael Walle to update PMIC output names and
  min/max voltages for imx8mn-evk board.
- A series from Tim Harvey to improve imx8mm-venice boards, add missing
  uart-has-rtscts property to UARTs, clock-names to pcie_phy, and
  vdd_5p0 ADC channel.
- Add VPU codec  devices for i.MX8QXP SoC.
- Other small and random changes.

* tag 'imx-dt64-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (65 commits)
  arm64: dt: imx8mp: support pwm polarity inversion
  arm64: dt: imx8mn: support pwm polarity inversion
  arm64: dt: imx8mm: support pwm polarity inversion
  arm64: dt: imx8mq: support pwm polarity inversion
  arm64: dts: imx8mm-venice-gw7901: remove unnecessary cpu temp override
  arm64: dts: imx8mm-venice-gw7902: add vdd_5p0 ADC channel
  arm64: dts: imx8m*venice: add missing clock-names to pcie_phy
  arm64: dts: imx8mm-venice-gw7902: fix pcie bindings
  arm64: dts: freescale: reduce the interrup-map-mask
  arm64: dts: imx8mn-beacon: Enable RTS-CTS on UART3
  arm64: dts: imx8mm-beacon: Enable RTS-CTS on UART3
  arm64: dts: imx8mm: Use 100 kHz I2C2 on Data Modul i.MX8M Mini eDM SBC
  arm64: dts: imx8mm: Disable USB2 OC on Data Modul i.MX8M Mini eDM SBC
  arm64: dts: imx8mm: Add CPLD on MX8Menlo board
  arm64: dts: imx8mq-kontron-pitx-imx8m: Use the standard 'uart-has-rtscts'
  arm64: dts: imx8mp-verdin: Use the standard 'uart-has-rtscts'
  arm64: dts: imx8mp: Add MEDIA_BLK_CTRL
  arm64: dts: imx8mp: Add MEDIAMIX power domains
  arm64: dts: imx8mp: add HSIO power-domains
  arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit
  ...

Link: https://lore.kernel.org/r/20220508033843.2773685-4-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'imx-dt-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Arnd Bergmann [Mon, 9 May 2022 21:43:09 +0000 (23:43 +0200)] 
Merge tag 'imx-dt-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt

i.MX ARM device tree update for 5.19:

- New board support: PHYTEC phyGATE-Tauri-S, TQ-Systems MBa6UL,
  LS1021A IoT board, Toradex Iris and Aster carrier, i.MX7D SMEGW01,
  i.MXRT1050 EVK, Bosch ACC board.
- A series from Alexander Stein to update i.MX51 based digi-connectcore
  board, regarding to DMA of UART devices, PMIC voltages, USB
  vbus-supply and usbphy.
- A series of changes from David Jander and Oleksij Rempel to remove
  prototype specific deprecated code not used in production from
  i.MX6Q/DL Vicut1 board, and unify Vicut1 and Victgo variants to reduce
  maintaining overhead.
- Quite some changes from different people to update imx6ull-colibri board
  on various aspects, touchscreen, device tree overlays, NAND BCH geometry,
  GPIO line names, FEC phy-supply, etc.
- A couple of changes from Fabio Estevam to switch imx6dl-plybas and
  imx6ul-kontron-n6x1x-s to use standard 'uart-has-rtscts' property.
- A couple of patches from Li Yang to update IFC device compatible and
  node name for LayerScape SoCs.
- Disable USB host to work around boot issue on imx6qdl-udoo board.
- A series from Max Krummenacher to update Colibri i.MX6DL device trees,
  drop dedicated v1.1 DT, disable add-on accessories, cleanups, etc.
- Various random and small updates on i.MX28 and i.MX6 boards.

* tag 'imx-dt-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (77 commits)
  ARM: dts: imx6ull-colibri: improve pinctrl node names
  ARM: dts: imx6ull-colibri: move gpio-keys node to som dtsi
  ARM: dts: imx6ull-colibri: add/update some comments
  ARM: dts: imx6ull-colibri: fix nand bch geometry
  ARM: dts: imx6ull-colibri: add support for toradex aster carrier boards
  ARM: dts: imx6ull-colibri: add support for toradex iris carrier boards
  ARM: dts: imx6ull-colibri: add gpio-line-names
  ARM: dts: imx6ull-colibri: update device trees to support overlays
  ARM: dts: imx6ull-colibri: update usdhc1 pixmux and signaling
  ARM: dts: imx6ull-colibri: add touchscreen device nodes
  ARM: dts: imx6ull-colibri: add phy-supply to fec
  ARM: dts: imx6ull-colibri: change touch i2c parameters
  ARM: dts: imx6ull-colibri: use pull-down for adc pins
  ARM: dts: Add bosch acc board
  ARM: dts: imx: Add i.MXRT1050-EVK support
  ARM: dts: imx7d-smegw01: Add support for i.MX7D SMEGW01 board
  ARM: dts: imx6qdl-udoo: Disable USB host to work around boot issues
  ARM: dts: imx27: use new 'dma-channels' property
  ARM: dts: imx6qdl-phytec: Add LED labels
  ARM: dts: ls1021a: reduce the interrupt-map-mask
  ...

Link: https://lore.kernel.org/r/20220508033843.2773685-3-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'qcom-arm64-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 9 May 2022 21:26:14 +0000 (23:26 +0200)] 
Merge tag 'qcom-arm64-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt

Qualcomm ARM64 DT updates for v5.19

This adds MDIO bus description on the IPQ6018 platform.

On MSM8916 the BAM-DMUX WWAN network device is added and the Huawei
Ascend G7 gains sound card definition and clarified installation
instructions.

MSM8992 and MSM8994 continues to be worked on, gaining multimedia clock
controller, on-chip memory, watchdog and various cleanup changes. The
Xiaomi Mi 4C gains CPU regulators and fixes to the framebuffer
definition, while Huawei Nexus 6P gains eMMC support.

On MSM8996 the modem and sensor remtoeprocs are added and enabled in the
Dragonboard 820c and the Xiaomi devices.

On MSM8998 a few newly added clocks related to the sensor subsystem bus
are marked as protected by default and the OnePlus devices gains NFC.

The SC7180 platform and devices thereon are further polished and
limozeen moves to using edp-panel for EDID-based detection, over
statically defined panels.

On SC7280 GPI DMA, WiFi remoteproc and network device, LPASS audio
clocks, resets for SDCC controllers and a new CRD revision are added. A
supply glitch on the PCIe power and a current leak for Bluetooth during
suspend are corrected. The Herobrine board gains eDP support and the IDP
gains backlight. USB is marked wakeup capable.

On SDM845 the IPA, WLED based backlight and second WiFi channel are
enabled for Xiaomi Pocophone F1, the firmware name is modified to not
conflict with other boards.  On RB3 the CAN bus controller is added and
the WiFi calibration variant is defined to allow adding the board's
calibration information into linux-firmware.

SM6350 gains I2C busses, UFS and WiFi support, and the numbering of
uart9 is corrected.

On SM7225 and the Fairphone 4 UFS, WiFi and haptics are enabled.

On SM8150 PCIe, Ethernet and uSD card support is added, and enabled for
the SA8155p ADP board. The PDC interrupt controller is also added and
described as wakup interrupt parent for TLMM.

Camera subsystem and control interface are defined for SM8250. On the
Sony Xperia 1 II the audio amplifiers are enabled.

On SM8350 GPI DMA engines are added and linked to the I2C and SPI
serial engines. Surface Duo 2 gains battery charger support.

On SM8450 the two PCIe controller/PHYs are enabled, GPI DMA and QUP
serial engine instances are added. Remoteproc instances are enabled on
SM8450 HDK.

Last, but not least, a number of DeviceTree validation errors across
various boards are corrected.

* tag 'qcom-arm64-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (150 commits)
  arm64: dts: qcom: Only include sc7180.dtsi in sc7180-trogdor.dtsi
  arm64: dts: qcom: sc7180-trogdor: Simplify spi0/spi6 labeling
  arm64: dts: qcom: sc7180-trogdor: Simplify trackpad enabling
  arm64: dts: qcom: sc7280: eDP for herobrine boards
  arm64: dts: qcom: sa8155p-adp: Disable multiple Tx and Rx queues for ethernet IP
  arm64: dts: qcom: sm8150: Fix iommu sid value for SDC2 controller
  arm64: dts: qcom: sm8350-duo2: enable battery charger
  arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2
  arm64: dts: qcom: pm8350c: Add pwm support
  arm64: dts: qcom: sc7280-qcard: Configure CTS pin to bias-bus-hold for bluetooth
  arm64: dts: qcom: sc7280-idp: Configure CTS pin to bias-bus-hold for bluetooth
  arm64: dts: qcom: sc7180: Remove ipa interconnect node
  arm64: dts: qcom: sc7280-idp: Enable GPI DMAs
  arm64: dts: qcom: sc7280: Add GENI I2C/SPI DMA channels
  arm64: dts: qcom: sc7280: Add GPI DMAengines
  arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
  arm64: dts: qcom: db845c: Add support for MCP2517FD
  arm64: dts: qcom: qrb5165-rb5: Fix can-clock node name
  arm64: dts: qcom: sc7280: Add SAR sensors to herobrine crd
  arm64: dts: qcom: sm8250: camss: Add CCI definitions
  ...

Link: https://lore.kernel.org/r/20220509204451.325675-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'qcom-dts-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom...
Arnd Bergmann [Mon, 9 May 2022 21:21:54 +0000 (23:21 +0200)] 
Merge tag 'qcom-dts-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt

Qualcomm ARM DT updates for v5.19

This contains a long overdue overhaul of the MSM8974 DeviceTrees,
aligning the style, structure and naming with what we've learned since
the introduction of this platform.

On top of this the Sony Rhine platform gained I2C masters, NFC and
pstore support and the Fairphone 2 gained touchscreen support.

For the new SDX65 platform reserved-memory nodes, rpmpd, SPMI, CPU
clocks, SDHCI controller, SMMU and TCSR mutex was added. As was the
initial DeviceTree for the related PMX65 PMIC.

MSM8226 gained VADC and RTC support and support for the ASUS ZenWatch 2
was added.

* tag 'qcom-dts-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (62 commits)
  ARM: dts: qcom: msm8974-FP2: Add supplies for remoteprocs
  ARM: dts: qcom: msm8974-FP2: Configure charger
  ARM: dts: qcom: msm8974-FP2: Add support for touchscreen
  ARM: dts: qcom: sdx55: Remove ipa interconnect node
  ARM: dts: qcom: msm8974: Add missing license headers
  ARM: dts: qcom: msm8974-FP2: Add mmc* aliases
  ARM: dts: qcom: msm8974-FP2: We're msm8974pro
  ARM: dts: qcom-msm8974*: Remove unnecessary include
  ARM: dts: qcom-msm8974-rhine: Add pstore node
  ARM: dts: qcom-msm8974-rhine: Add NFC and enable I2C hosts
  ARM: dts: qcom-msm8974*: Clean up old GPIO declarations
  ARM: dts: qcom-msm8974*: Consolidate I2C/UART/SDHCI
  ARM: dts: qcom-msm8974*: Enable IMEM unconditionally
  ARM: dts: qcom-msm8974: Sort and clean up nodes
  ARM: dts: qcom-msm8974: Convert ADSP to a MMIO device
  ARM: dts: qcom-msm8974pro-*: Use the 8974pro name in DT filenames
  ARM: dts: qcom-msm8974pro: Use &labels
  ARM: dts: qcom-msm8974-castor: Use &labels
  ARM: dts: qcom-msm8974-{"hon","am"}ami: Commonize and modernize the DTs
  ARM: dts: qcom-msm8974-klte: Use &labels
  ...

Link: https://lore.kernel.org/r/20220509172125.313259-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'qcom-arm64-fixes-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 9 May 2022 21:16:40 +0000 (23:16 +0200)] 
Merge tag 'qcom-arm64-fixes-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm ARM64 DT fixes for v5.18

This disables the two Soundwire controllers as well as rx and tx macros
by default on the SM8250 platform to avoid crashes on devices where
these aren't available.

* tag 'qcom-arm64-fixes-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: dts: qcom: sm8250: don't enable rx/tx macro by default

Link: https://lore.kernel.org/r/20220509152310.306179-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'qcom-drivers-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 9 May 2022 21:14:05 +0000 (23:14 +0200)] 
Merge tag 'qcom-drivers-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers

Qualcomm driver updates for v5.19

This converts a wide range of Qualcomm-related DeviceTree bindings to
YAML, in order to improve our ability to validate the DeviceTree source.

The RPMh power-domain driver gains support for the modem platform SDX65,
the compute platform SC8280XP and the automotive platform SA8540p. While
LLCC gains support for SC8180X and SC8280XP and gains a
MODULE_DEVICE_TABLE() to make it functional as a module.

It adds a driver for configuring the SSC bus, providing Linux access to
the hardware blocks in the sensor subsystem.

The socinfo driver gets confusion related to MSM8974 Pro sorted out and
adds new ids for SM8540 and SC7280.

The SCM driver gains support for MSM8974.

Add missing of_node_put() in smp2p and smsm drivers.
Stop using iterator after list_for_each_entry() and define static
definitions as such, in the PDR driver.

* tag 'qcom-drivers-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (33 commits)
  soc: qcom: pdr: use static for servreg_* variables
  soc: qcom: llcc: Add sc8180x and sc8280xp configurations
  dt-bindings: arm: msm: Add sc8180x and sc8280xp LLCC compatibles
  soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains
  soc: qcom: rpmhpd: Don't warn about sparse rpmhpd arrays
  dt-bindings: power: rpmpd: Add sc8280xp RPMh power-domains
  spi: dt-bindings: qcom,spi-geni-qcom: convert to dtschema
  soc: qcom: socinfo: Sort out 8974PRO names
  dt-bindings: soc: qcom,smp2p: convert to dtschema
  dt-bindings: qcom: geni-se: Update UART schema reference
  dt-bindings: qcom: geni-se: Update I2C schema reference
  dt-bindings: soc: qcom,rpmh-rsc: convert to dtschema
  bus: add driver for initializing the SSC bus on (some) qcom SoCs
  dt-bindings: bus: add device tree bindings for qcom,ssc-block-bus
  dt-bindings: qcom: qcom,geni-se: refer to dtschema for SPI
  dt-bindings: soc: qcom,smd: convert to dtschema
  firmware: qcom_scm: Add compatible for MSM8976 SoC
  dt-bindings: firmware: qcom-scm: Document msm8976 bindings
  soc: qcom: smem: validate fields of shared structures
  soc: qcom: smem: map only partitions used by local HOST
  ...

Link: https://lore.kernel.org/r/20220509181839.316655-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'memory-controller-drv-tegra-5.19' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Mon, 9 May 2022 21:12:49 +0000 (23:12 +0200)] 
Merge tag 'memory-controller-drv-tegra-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.19 - Tegra SoC

Add support for Tegra234 memory controller and for logging memory
controller errors on Tegra186, Tegra194 and Tegra234.

* tag 'memory-controller-drv-tegra-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  memory: tegra: Add MC error logging on Tegra186 onward
  memory: tegra: Add memory controller channels support
  memory: tegra: Add APE memory clients for Tegra234
  memory: tegra: Add Tegra234 support

Link: https://lore.kernel.org/r/20220509160807.154187-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoASoC: SOF: sof-client: Update for different IPC versions
Mark Brown [Mon, 9 May 2022 21:12:23 +0000 (22:12 +0100)] 
ASoC: SOF: sof-client: Update for different IPC versions

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

The current IPC client infrastructure can only be used with IPC3.
This series carries updates for the core side of the client support to handle
IPC4 messages and updates the ipc message injector to be usable with IPC4.

The IPC flood test is only supported by SOF_IPC (IPC3), we are not going to
create the aux device for it at all if the firmware is using IPC4.

Regards,
Peter
---
Peter Ujfalusi (8):
  ASoC: SOF: sof-client: Add API to get the maximum IPC payload size
  ASoC: SOF: ipc-msg-injector: Query the maximum IPC payload size
  ASoC: SOF: sof-client-probes: Query the maximum IPC payload size
  ASoC: SOF: sof-client: Add API to get the ipc_type
  ASoC: SOF: sof-client: Add support IPC4 message sending
  ASoC: SOF: ipc-msg-injector: Separate the message sending
  ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages
  ASoC: SOF: sof-client: IPC flood test can only work with SOF_IPC

 sound/soc/sof/sof-client-ipc-msg-injector.c | 181 ++++++++++++++++++--
 sound/soc/sof/sof-client-probes.c           |   5 +-
 sound/soc/sof/sof-client.c                  |  66 ++++++-
 sound/soc/sof/sof-client.h                  |   2 +
 4 files changed, 227 insertions(+), 27 deletions(-)

--
2.36.0

4 years agoMerge tag 'imx-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawngu...
Arnd Bergmann [Mon, 9 May 2022 21:10:47 +0000 (23:10 +0200)] 
Merge tag 'imx-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers

i.MX drivers update for 5.19:

- A series from Lucas and Paul to update GPCv2 driver for i.MX8MP power
  domains, and add HSIO and HDMI block control support.

* tag 'imx-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: imx: fix semicolon.cocci warnings
  soc: imx: add i.MX8MP HDMI blk-ctrl
  soc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl
  soc: imx: add i.MX8MP HSIO blk-ctrl
  dt-bindings: power: imx8mp: add defines for HDMI blk-ctrl domains
  dt-bindings: soc: Add i.MX8MP media block control DT bindings
  soc: imx: imx8m-blk-ctrl: set power device name
  soc: imx: gpcv2: add support for i.MX8MP power domains
  soc: imx: gpcv2: add PGC control register indirection

Link: https://lore.kernel.org/r/20220508033843.2773685-2-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'ti-driver-soc-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 9 May 2022 21:09:09 +0000 (23:09 +0200)] 
Merge tag 'ti-driver-soc-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/drivers

TI Driver updates for v5.19

* wkup_m3: io isolation, voltage scaling, vtt regulator and a debug option to stop m3 in suspend.
* tisci: support for polled mode for system suspend, reset driver is now enabled for COMPILE_TEST
* knav, dma.. misc cleanups for IS_ERR, pm_run_time*, and various other fixups.

* tag 'ti-driver-soc-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: wkup_m3_ipc: Add debug option to halt m3 in suspend
  soc: ti: wkup_m3_ipc: Add support for i2c voltage scaling
  soc: ti: wkup_m3_ipc: Add support for IO Isolation
  soc: ti: knav_qmss_queue: Use IS_ERR instead of IS_ERR_OR_NULL when checking knav_queue_open() result
  soc: ti: pm33xx: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  firmware: ti_sci: Switch transport to polled mode during system suspend
  soc: ti: wkup_m3_ipc: Add support for toggling VTT regulator
  soc: ti: knav_qmss_queue: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
  soc: ti: knav_dma: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
  reset: ti-sci: Allow building under COMPILE_TEST
  soc: ti: ti_sci_pm_domains: Check for null return of devm_kcalloc
  soc: ti: omap_prm: Use of_device_get_match_data()
  soc: ti: pruss: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  soc: ti: replace usage of found with dedicated list iterator variable
  soc: ti: wkup_m3_ipc: fix platform_get_irq.cocci warning

Link: https://lore.kernel.org/r/20220507163424.pvqnwrxpoo73lmp2@debtless
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'hisi-armv7soc-for-5.19' of https://github.com/hisilicon/linux-hisi into...
Arnd Bergmann [Mon, 9 May 2022 21:07:41 +0000 (23:07 +0200)] 
Merge tag 'hisi-armv7soc-for-5.19' of https://github.com/hisilicon/linux-hisi into arm/soc

HiSilicon ARMv7 SoC updates for v5.19

- Add of_node_put to avoid the refcount leak

* tag 'hisi-armv7soc-for-5.19' of https://github.com/hisilicon/linux-hisi:
  ARM: hisi: Add missing of_node_put after of_find_compatible_node

Link: https://lore.kernel.org/r/62762DF0.30602@hisilicon.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'qcom-defconfig-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Mon, 9 May 2022 21:06:44 +0000 (23:06 +0200)] 
Merge tag 'qcom-defconfig-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig

Qualcomm ARM defconfig updates for v5.19

This enables the Qualcomm random number generator and hardware crypto
drivers, as well as DebugFS support, in the qcom defconfig.

* tag 'qcom-defconfig-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  ARM: qcom_defconfig: enable debug fs support
  ARM: qcom_defconfig: enable options for Qualcomm random number generator

Link: https://lore.kernel.org/r/20220509182209.317208-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'qcom-arm64-defconfig-for-5.19' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Mon, 9 May 2022 21:04:33 +0000 (23:04 +0200)] 
Merge tag 'qcom-arm64-defconfig-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig

Qualcomm ARM64 defconfig updates for v5.19

This enables the GPI DMA driver, providing access to I2C and SPI
controllers that are setup for shared ownership. The PCIe Gen2 PHY
provides PCI support on the QCS405 platform, among others. The PMIC
watchdog, concell and ADC5 ThermalMonitor drivers provides housekeeping
services on a range of different platforms.

The Display and Video clock controllers for SM8250 are enabled, as is
the audio RX/TX macros and the WCD9335 audio codec driver.

Lastly the Ath11k driver, used on a variety of modern boards and the
FastRPC driver, which provides an interface for computational offloading
on the Hexagon cores, are enabled.

All drivers, except the SM8250 Display and Video clock controller
drivers are enabled as modules. The two clock controllers provides
power-domains and must be builtin to reduce the risk of probe deferral
happening (and being ignored) after late initcall.

* tag 'qcom-arm64-defconfig-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: Enable Qualcomm GPI DMA Driver
  arm64: defconfig: Enable Qualcomm PCIe Gen2 PHY
  arm64: defconfig: Enable SM8250 video clock controller
  arm64: defconfig: Enable PM8916 watchdog driver
  arm64: defconfig: enable ath11k driver
  arm64: defconfig: Enable some Qualcomm drivers
  arm64: defconfig: reenable SM_DISPCC_8250
  arm64: defconfig: enable wcd9335 codec as module
  arm64: defconfig: enable Qualcomm RX and TX macro for SM8250 audio

Link: https://lore.kernel.org/r/20220509170158.311962-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'imx-defconfig-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawn...
Arnd Bergmann [Mon, 9 May 2022 21:03:39 +0000 (23:03 +0200)] 
Merge tag 'imx-defconfig-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig

i.MX defconfig update for 5.19:

- Enable the WM8524 codec driver as module in arm64 defconfig for audio
  support on imx8mn-evk board.
- Enable the ADC part of the STMPE MFD in imx_v6_v7_defconfig, as the
  SoM Apalis/Colibri iMX6 use the ADC of a STMPE 811.

* tag 'imx-defconfig-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: Enable the WM8524 codec driver
  ARM: imx_v6_v7_defconfig: Enable the ADC part of the STMPE MFD

Link: https://lore.kernel.org/r/20220508033843.2773685-5-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoMerge tag 'ti-k3-config-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 9 May 2022 21:01:00 +0000 (23:01 +0200)] 
Merge tag 'ti-k3-config-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/defconfig

TI K3 defconfig updates for v5.19

* Enable TIDSS and Display Port related configs
* Enable Cadence Torrent PHY for Display Port

* tag 'ti-k3-config-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: defconfig: Enable configs for DisplayPort on J721e

Link: https://lore.kernel.org/r/88cd734e-47a7-4307-c119-8f6ec6c40452@ti.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agomm/filemap: Hoist filler_t decision to the top of do_read_cache_folio()
Matthew Wilcox (Oracle) [Sun, 8 May 2022 19:07:11 +0000 (15:07 -0400)] 
mm/filemap: Hoist filler_t decision to the top of do_read_cache_folio()

Now that filler_t and aops->read_folio() have the same type, we can decide
which one to use at the top of the function, and cache ->read_folio in
the filler parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Change the type of filler_t
Matthew Wilcox (Oracle) [Mon, 2 May 2022 01:39:29 +0000 (21:39 -0400)] 
fs: Change the type of filler_t

By making filler_t the same as read_folio, we can use the same function
for both in gfs2.  We can push the use of folios down one more level
in jffs2 and nfs.  We also increase type safety for future users of the
various read_cache_page() family of functions by forcing the parameter
to be a pointer to struct file (or NULL).

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
4 years agonfs: Pass the file pointer to nfs_symlink_filler()
Matthew Wilcox (Oracle) [Sun, 1 May 2022 23:39:03 +0000 (19:39 -0400)] 
nfs: Pass the file pointer to nfs_symlink_filler()

In preparation for unifying the read_cache_page() and read_folio()
implementations, make nfs_symlink_filler() get the inode
from the page instead of passing it in from read_cache_page().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
4 years agojffs2: Pass the file pointer to jffs2_do_readpage_unlock()
Matthew Wilcox (Oracle) [Sun, 1 May 2022 23:39:03 +0000 (19:39 -0400)] 
jffs2: Pass the file pointer to jffs2_do_readpage_unlock()

In preparation for unifying the read_cache_page() and read_folio()
implementations, make jffs2_do_readpage_unlock() get the inode
from the page instead of passing it in from read_cache_page().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
4 years agomm,fs: Remove aops->readpage
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:53:28 +0000 (11:53 -0400)] 
mm,fs: Remove aops->readpage

With all implementations of aops->readpage converted to aops->read_folio,
we can stop checking whether it's set and remove the member from aops.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agomm: Convert swap_readpage to call read_folio instead of readpage
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:51:22 +0000 (11:51 -0400)] 
mm: Convert swap_readpage to call read_folio instead of readpage

This commit is split out so it can be dropped when resolving
conflicts with Neil Brown's series to stop calling ->readpage in
the swap code.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agovboxsf: Convert vboxsf to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
vboxsf: Convert vboxsf to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoudf: Convert adinicb and symlinks to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
udf: Convert adinicb and symlinks to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoubifs: Convert ubifs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
ubifs: Convert ubifs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agosquashfs: Convert squashfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
squashfs: Convert squashfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoromfs: Convert romfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
romfs: Convert romfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoorangefs: Convert orangefs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
orangefs: Convert orangefs to read_folio

This is a full conversion which should be large folio ready, although
I have not tested it.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoocfs2: Convert ocfs2 to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
ocfs2: Convert ocfs2 to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agontfs: Convert ntfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
ntfs: Convert ntfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agonfs: Convert nfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
nfs: Convert nfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agojfs: Convert metadata pages to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
jfs: Convert metadata pages to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agojffs2: Convert jffs2 to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
jffs2: Convert jffs2 to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoisofs: Convert symlinks and zisofs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
isofs: Convert symlinks and zisofs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agohpfs: Convert symlinks to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
hpfs: Convert symlinks to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agohostfs: Convert hostfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
hostfs: Convert hostfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofuse: Convert fuse to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
fuse: Convert fuse to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofreevxfs: Convert vxfs_immed to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
freevxfs: Convert vxfs_immed to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agof2fs: Convert f2fs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
f2fs: Convert f2fs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoext4: Convert ext4 to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
ext4: Convert ext4 to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoerofs: Convert erofs zdata to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
erofs: Convert erofs zdata to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoefs: Convert efs symlinks to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
efs: Convert efs symlinks to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoecryptfs: Convert ecryptfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
ecryptfs: Convert ecryptfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agocramfs: Convert cramfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
cramfs: Convert cramfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agocoda: Convert coda to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
coda: Convert coda to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agocifs: Convert cifs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
cifs: Convert cifs to read_folio

This is a "weak" conversion which converts straight back to using pages.
CIFS should probably be converted to use netfs_read_folio() by someone
familiar with it.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agobtrfs: Convert btrfs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
btrfs: Convert btrfs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agobefs: Convert befs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
befs: Convert befs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoafs: Convert afs_symlink_readpage to afs_symlink_read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:17:40 +0000 (11:17 -0400)] 
afs: Convert afs_symlink_readpage to afs_symlink_read_folio

This function mostly used folios already, and only a few minor changes
were needed.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agoaffs: Convert affs to read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)] 
affs: Convert affs to read_folio

This is a "weak" conversion which converts straight back to using pages.
A full conversion should be performed at some point, hopefully by
someone familiar with the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Convert simple_readpage to simple_read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:49:41 +0000 (11:49 -0400)] 
fs: Convert simple_readpage to simple_read_folio

This is a full folio conversion; it is prepared to handle folios of
arbitrary size.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Convert mpage_readpage to mpage_read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 15:47:39 +0000 (11:47 -0400)] 
fs: Convert mpage_readpage to mpage_read_folio

mpage_readpage still works in terms of pages, and has not been audited
for correctness with large folios, so include an assertion that the
filesystem is not passing it large folios.  Convert all the filesystems
to call mpage_read_folio() instead of mpage_readpage().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Convert block_read_full_page() to block_read_full_folio()
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 14:40:40 +0000 (10:40 -0400)] 
fs: Convert block_read_full_page() to block_read_full_folio()

This function is NOT converted to handle large folios, so include
an assert that the filesystem isn't passing one in.  Otherwise, use
the folio functions instead of the page functions, where they exist.
Convert all filesystems which use block_read_full_page().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Convert iomap_readpage to iomap_read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 12:54:32 +0000 (08:54 -0400)] 
fs: Convert iomap_readpage to iomap_read_folio

A straightforward conversion as iomap_readpage already worked in folios.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Convert netfs_readpage to netfs_read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 12:49:28 +0000 (08:49 -0400)] 
fs: Convert netfs_readpage to netfs_read_folio

This is straightforward because netfs already worked in terms of folios.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Add read_folio documentation
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 12:45:43 +0000 (08:45 -0400)] 
fs: Add read_folio documentation

Convert all the ->readpage documentation to ->read_folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agofs: Introduce aops->read_folio
Matthew Wilcox (Oracle) [Fri, 29 Apr 2022 12:43:23 +0000 (08:43 -0400)] 
fs: Introduce aops->read_folio

Change all the callers of ->readpage to call ->read_folio in preference,
if it exists.  This is a transitional duplication, and will be removed
by the end of the series.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
4 years agodm cache metadata: remove unnecessary variable in __dump_mapping
Guo Zhengkui [Wed, 4 May 2022 16:28:26 +0000 (00:28 +0800)] 
dm cache metadata: remove unnecessary variable in __dump_mapping

Fix the following coccicheck warning:

drivers/md/dm-cache-metadata.c:1512:5-6: Unneeded variable: "r".
Return "0" on line 1520.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
4 years agodm mpath: provide high-resolution timer to HST for bio-based
Gabriel Krisman Bertazi [Wed, 27 Apr 2022 16:57:10 +0000 (12:57 -0400)] 
dm mpath: provide high-resolution timer to HST for bio-based

The precision loss of reading IO start_time with jiffies_to_nsecs
instead of using a high resolution timer degrades HST path prediction
for BIO-based mpath on high load workloads.

Below, I show the utilization percentage of a 10 disk multipath with
asymmetrical disk access cost, while being exercised by a randwrite FIO
benchmark with high submission queue depth (depth=64).  It is possible
to see that the HST path selection degrades heavily for high-iops in
BIO-mpath, underutilizing the slower paths way beyond expected.  This
seems to be caused by the start_time truncation, which makes some IO to
seem much slower than it actually is.  In this scenario ST outperforms
HST for bio-mpath, but not for mq-mpath, which already uses ktime_get_ns().

The third column shows utilization with this patch applied.  It is easy
to see that now HST prediction is much closer to the ideal distribution
(calculated considering the real cost of each path).

|     |   ST | HST (orig) | HST(ktime) | Best |
| sdd | 0.17 |       0.20 |       0.17 | 0.18 |
| sde | 0.17 |       0.20 |       0.17 | 0.18 |
| sdf | 0.17 |       0.20 |       0.17 | 0.18 |
| sdg | 0.06 |       0.00 |       0.06 | 0.04 |
| sdh | 0.03 |       0.00 |       0.03 | 0.02 |
| sdi | 0.03 |       0.00 |       0.03 | 0.02 |
| sdj | 0.02 |       0.00 |       0.01 | 0.01 |
| sdk | 0.02 |       0.00 |       0.01 | 0.01 |
| sdl | 0.17 |       0.20 |       0.17 | 0.18 |
| sdm | 0.17 |       0.20 |       0.17 | 0.18 |

This issue was originally discussed [1] when we first merged HST, and
this patch was left as a low hanging fruit to be solved later.

Regarding the implementation, as suggested by Mike in that mail thread,
in order to avoid the overhead of ktime_get_ns for other selectors, this
patch adds a flag for the selector code to request the high-resolution
timer.

I tested this using the same benchmark used in the original HST submission.

Full test and benchmark scripts are available here:

  https://people.collabora.com/~krisman/HST-BIO-MPATH/

[1] https://lore.kernel.org/lkml/85tv0am9de.fsf@collabora.com/T/

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
[snitzer: cleaned up various implementation details]
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
4 years agoASoC: dt-bindings: mediatek: mt8192: Drop i2s-share properties
Nícolas F. R. A. Prado [Mon, 9 May 2022 18:56:25 +0000 (14:56 -0400)] 
ASoC: dt-bindings: mediatek: mt8192: Drop i2s-share properties

This reverts commit e056cf4341 ("ASoC: dt-bindings: mediatek: mt8192: Add
i2s-share properties") which was merged while the property name and
definition were still being discussed. Revert the commit for now and a
follow up commit will re-add the property after it is further discussed
and reviewed.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220509185625.580811-1-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: trace: The dtrace is only available with SOF_IPC
Peter Ujfalusi [Fri, 6 May 2022 13:02:29 +0000 (16:02 +0300)] 
ASoC: SOF: trace: The dtrace is only available with SOF_IPC

Currently the dtrace only supported with SOF_IPC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220506130229.23354-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: sam9g20_wm8731: Use dev_err_probe() for snd_soc_register_card()
Mark Brown [Fri, 6 May 2022 13:03:49 +0000 (14:03 +0100)] 
ASoC: sam9g20_wm8731: Use dev_err_probe() for snd_soc_register_card()

Log the error code when snd_soc_regster_card() fails, but fold in the
silencing of deferred probe errors.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20220506130349.451452-1-broonie@kernel.org
4 years agoASoC: mediatek: mt8195: Fix build warning without CONFIG_OF
YueHaibing [Mon, 9 May 2022 12:09:18 +0000 (20:09 +0800)] 
ASoC: mediatek: mt8195: Fix build warning without CONFIG_OF

sound/soc/mediatek/mt8195/mt8195-mt6359.c:1639:32: warning: ‘mt8195_mt6359_max98390_rt5682_card’ defined but not used [-Wunused-variable]
 1639 | static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-mt6359.c:1634:32: warning: ‘mt8195_mt6359_rt1011_rt5682_card’ defined but not used [-Wunused-variable]
 1634 | static struct mt8195_card_data mt8195_mt6359_rt1011_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-mt6359.c:1629:32: warning: ‘mt8195_mt6359_rt1019_rt5682_card’ defined but not used [-Wunused-variable]
 1629 | static struct mt8195_card_data mt8195_mt6359_rt1019_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since all users of this driver do need CONFIG_OF anyway, there is no
need to save a few bytes on kernel builds while CONFIG_OF disabled, so
just remove the #ifdef to fix this warning.

Fixes: 86a6b9c9dfff ("ASoC: mediatek: mt8195: add machine support for max98390 and rt5682")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20220509120918.9000-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: wm8940: add devicetree support
Lukasz Majewski [Mon, 9 May 2022 12:10:55 +0000 (14:10 +0200)] 
ASoC: wm8940: add devicetree support

This adds devicetree support to the wm8940 codec driver.
With a DT-based kernel, there is no board-specific setting
to select the driver so allow it to be manually chosen.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220509121055.31103-1-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agodoc: dts: Add device tree information regarding wm8940 codec
Lukasz Majewski [Mon, 9 May 2022 12:13:13 +0000 (14:13 +0200)] 
doc: dts: Add device tree information regarding wm8940 codec

This commit provides documentation entry for wm8940 codec.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220509121313.31216-1-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: mx51_ecspi_prepare_message(): skip writing MX51_ECSPI_CONFIG register...
Marc Kleine-Budde [Mon, 2 May 2022 17:54:57 +0000 (19:54 +0200)] 
spi: spi-imx: mx51_ecspi_prepare_message(): skip writing MX51_ECSPI_CONFIG register if unchanged

In mx51_ecspi_prepare_message() the MX51_ECSPI_CONFIG register is
setup for the current spi_message. After writing the register, there
is a delay to ensure that the changes hit the hardware.

This patch checks if the register MX51_ECSPI_CONFIG actually needs to
be changed. If the register content is unchanged the function is left
early, skipping the write to the hardware and the delay. This leads to
a small, but measurable performance increase. For a given workload
with small transfers on an imx6 single core the CPU load decreases
from 30% to ~27%.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-10-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: add PIO polling support
Marc Kleine-Budde [Mon, 2 May 2022 17:54:56 +0000 (19:54 +0200)] 
spi: spi-imx: add PIO polling support

The driver supports several modes, one of them is PIO/IRQ
"spi_imx_pio_transfer()". The data is exchanged with the IP core using
PIO, an IRQ is setup to signal empty/full FIFOs and the end of the
transfer. The IRQ and scheduling overhead for short transfers is
significant. Using polling instead of IRQs can be beneficial to reduce
the overall CPU load, especially on small transfer workloads.

On an imx6 single core, a given RX workload of the mcp251xfd driver
results in 40% CPU load. Using polling mode reduces the CPU load to
30%.

This patch adds PIO polling support to the driver. For transfers with
a duration of less than 30 µs the polling mode instead of IRQ based
PIO mode is used. 30 µs seems to be a good compromise, which is used
the by the SPI drivers for the raspberry Pi (spi-bcm2835,
spi-bcm2835), too.

Co-developed-by: David Jander <david@protonic.nl>
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-9-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: replace struct spi_imx_data::bitbang by pointer to struct spi_controller
Marc Kleine-Budde [Mon, 2 May 2022 17:54:55 +0000 (19:54 +0200)] 
spi: spi-imx: replace struct spi_imx_data::bitbang by pointer to struct spi_controller

There's no need to embed the struct spi_bitbang into our private
data (struct spi_imx_data), the spi core is flexible enough, so that
we only need a pointer to the allocated struct spi_controller.

This is also a preparation patch to add PIO based polling support to
the driver.

Co-developed-by: David Jander <david@protonic.nl>
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-8-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: complete conversion from master -> controller
Marc Kleine-Budde [Mon, 2 May 2022 17:54:54 +0000 (19:54 +0200)] 
spi: spi-imx: complete conversion from master -> controller

With patch:
8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"")
the SPI "master" was generalized to "controller". This patch completed
the conversion of the spi-imx driver by replacing the remaining
occurrences of master to controller.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-7-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: spi_imx_buf_rx_swap_u32(): replace open coded swahw32s()
Marc Kleine-Budde [Mon, 2 May 2022 17:54:53 +0000 (19:54 +0200)] 
spi: spi-imx: spi_imx_buf_rx_swap_u32(): replace open coded swahw32s()

This patch replaces an open coded swahw32s().

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-6-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: spi_imx_buf_rx_swap_u32(): fix sparse warning: use swab32s() instead...
Marc Kleine-Budde [Mon, 2 May 2022 17:54:52 +0000 (19:54 +0200)] 
spi: spi-imx: spi_imx_buf_rx_swap_u32(): fix sparse warning: use swab32s() instead of cpu_to_be32()

This patch fixes the following sparse warning by using a swab32s()
instead of a cpu_to_be32(). The driver is used on little endian
systems only and we really want to swap the bytes.

| drivers/spi/spi-imx.c:305:29: warning: incorrect type in assignment (different base types)
| drivers/spi/spi-imx.c:305:29:    expected unsigned int val
| drivers/spi/spi-imx.c:305:29:    got restricted __be32 [usertype]
| drivers/spi/spi-imx.c:361:21: warning: incorrect type in assignment (different base types)
| drivers/spi/spi-imx.c:361:21:    expected unsigned int [assigned] [usertype] val
| drivers/spi/spi-imx.c:361:21:    got restricted __be32 [usertype]

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-5-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: mx51_ecspi_intctrl(): prefer 'unsigned int' to bare use of 'unsigned'
Marc Kleine-Budde [Mon, 2 May 2022 17:54:51 +0000 (19:54 +0200)] 
spi: spi-imx: mx51_ecspi_intctrl(): prefer 'unsigned int' to bare use of 'unsigned'

This patch fixes the following checkpatch warning, by making val an
"unsigned int".

| WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
| +       unsigned val = 0;

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-4-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: avoid unnecessary line continuations
Marc Kleine-Budde [Mon, 2 May 2022 17:54:50 +0000 (19:54 +0200)] 
spi: spi-imx: avoid unnecessary line continuations

This patch fixes the following checkpatch warning by removing the
trailing backslash:

| WARNING: Avoid unnecessary line continuations
| +       spi_imx->bitbang.master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH \

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-3-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agospi: spi-imx: fix sparse warning: add identifier name to function definition
Marc Kleine-Budde [Mon, 2 May 2022 17:54:49 +0000 (19:54 +0200)] 
spi: spi-imx: fix sparse warning: add identifier name to function definition

This patch fixes the following and similar sparse warnings by adding
the missing identifier names to the function definitions:

| WARNING: function definition argument 'struct spi_imx_data *' should also have an identifier name
| #68: FILE: drivers/spi/spi-imx.c:68:
| +       int (*prepare_message)(struct spi_imx_data *, struct spi_message *);

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-2-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: sof-client: IPC flood test can only work with SOF_IPC
Peter Ujfalusi [Fri, 6 May 2022 13:26:47 +0000 (16:26 +0300)] 
ASoC: SOF: sof-client: IPC flood test can only work with SOF_IPC

Currently the ipc flood test is only supported with SOF_IPC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: ipc-msg-injector: Add support for IPC4 messages
Peter Ujfalusi [Fri, 6 May 2022 13:26:46 +0000 (16:26 +0300)] 
ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages

The IPC message representation of an IPC4 differs from the IPC3 version
significantly.

The message for IPC4 should be written to the debugfs file in this form:
0-7 IPC4 header (2x u32)
8-  additional payload, if any

The reply is given back in the same form.

The message size limitation is the same as with the IPC3, only messages
which can fit to the mailbox can be injected (and received).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: ipc-msg-injector: Separate the message sending
Peter Ujfalusi [Fri, 6 May 2022 13:26:45 +0000 (16:26 +0300)] 
ASoC: SOF: ipc-msg-injector: Separate the message sending

Move out the code for sending the IPC message into a separate helper
function in preparation for support for handling IPC4 communication.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: sof-client: Add support IPC4 message sending
Peter Ujfalusi [Fri, 6 May 2022 13:26:44 +0000 (16:26 +0300)] 
ASoC: SOF: sof-client: Add support IPC4 message sending

In order to be able to send an IPC4 message, the
sof_client_ipc_tx_message() needs to parse the tx message differently to
extract the size.

The IPC notification registration is done by providing the notification
type and the whole message is passed to the client when a match is found.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: sof-client: Add API to get the ipc_type
Peter Ujfalusi [Fri, 6 May 2022 13:26:43 +0000 (16:26 +0300)] 
ASoC: SOF: sof-client: Add API to get the ipc_type

Provide a way for the client drivers to query the ipc_type used by the
firmware.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: sof-client-probes: Query the maximum IPC payload size
Peter Ujfalusi [Fri, 6 May 2022 13:26:42 +0000 (16:26 +0300)] 
ASoC: SOF: sof-client-probes: Query the maximum IPC payload size

Instead of using the SOF_IPC_MSG_MAX_SIZE as the maximum payload size for
and IPC message, use the provided API to query it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: ipc-msg-injector: Query the maximum IPC payload size
Peter Ujfalusi [Fri, 6 May 2022 13:26:41 +0000 (16:26 +0300)] 
ASoC: SOF: ipc-msg-injector: Query the maximum IPC payload size

Instead of using the SOF_IPC_MSG_MAX_SIZE as the maximum payload size for
and IPC message, use the provided API to query it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoASoC: SOF: sof-client: Add API to get the maximum IPC payload size
Peter Ujfalusi [Fri, 6 May 2022 13:26:40 +0000 (16:26 +0300)] 
ASoC: SOF: sof-client: Add API to get the maximum IPC payload size

Provide a way for the client drivers to query the maximum payload size of
an IPC message.
Currently clients do not have access to this information and they can only
use the SOF_IPC_MSG_MAX_SIZE defined value.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>