Commit Graph

1169205 Commits (887185649c7ee8a9cc2d4e94de92bbbae6cd3747)

Author SHA1 Message Date
Andy Shevchenko 6a426eb418 usb: fotg210-udc: remove redundant error logging
A call to platform_get_irq() already prints an error on failure within
its own implementation. So printing another error based on its return
value in the caller is redundant and should be removed. The clean up
also makes if condition block braces unnecessary. Remove that as well.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230120154437.22025-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 18:12:58 +01:00
Andy Shevchenko 7159deb762 usb: fotg210-hcd: Don't shadow error codes in store()
kstrtox() along with regmap API can return different error codes based on
circumstances.

Don't shadow them when returning to the caller.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230120154437.22025-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 18:12:58 +01:00
Andy Shevchenko 861fa1c3fa usb: fotg210-hcd: use sysfs_emit() to instead of scnprintf()
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230120154437.22025-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 18:12:58 +01:00
Fabian Vogt c5d4297f0c fotg210-udc: Improve device initialization
Reset the device explicitly to get into a known state and also set the chip
enable bit. Additionally, mask interrupts which aren't handled.

Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230123073508.2350402-4-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 18:12:18 +01:00
Fabian Vogt 76d62981b5 fotg210-udc: Introduce and use a fotg210_ack_int function
This is in preparation of support for devices where interrupts are acked
differently.

Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230123073508.2350402-3-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 18:12:18 +01:00
Fabian Vogt e55f67391f fotg210-udc: Add missing completion handler
This is used when responding to GET_STATUS requests. Without this, it
crashes on completion.

Fixes: b84a8dee23 ("usb: gadget: add Faraday fotg210_udc driver")
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230123073508.2350402-2-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 18:12:18 +01:00
Alexander Stein 4ba2e7cd98 usb: host: ehci-fsl: Use DRV_NAME
"fsl-ehci" is used for both MODULE_ALIAS and driver name. As they have to
match use DRV_NAME in both locations.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20230123100007.1479090-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 18:11:49 +01:00
Arnd Bergmann 6e3347ecd4 Devicetree related changes for omaps for v6.3
Updates for am335x-nano, n900, and gta04 for the connected peripherals.
 Also few corrections for node names.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAmPP1rIRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXNXDw//ZYI+zmVVdCdeAL/zGyV0PuxHAkJ1EZjk
 oSa9/2k0mzY2R7qRjFXPQH6OLxbWhgiycNofTyUsmoUVI68Lc8tum09NyIHcR1b7
 jcBVaPvmv1VLSjH+bqre5+OQigzv2+RQJ0Q6kutQM5RpWFYFzz2rSh8rUdlYUEl8
 V7FNFL42a9zxKToLgBCcmvN0eSjFtaqQR9DbmL+h6elH2QuI1SpFSGZtKWqHS/nn
 rUqOwMXp9V8FQF7FKnOVzWdYi9RdhsnPahUkuVfXNX1i0WLp8VX90DaukOGPmsUr
 FRA2UaoRXAvFu9RurtkBrJb/93iulWh3pBqYROXPTxW7Wq0Gt8lf+/hUup81wQxS
 hnFUcyphIydhMy7jIICNCNBxLn1KOCTzIIBWoMDsNWyhJAYmj4uRvhOmsyY3o9H1
 UR2dZ1uLulRPmKd2H9hnHB6k2Y2Wd3hErSt4QoH3Rz+hwfYgmCG5VRKeCfnZ10Kf
 o6qO/8wL+knmV0efvqCj8HVf+pC3ie3y1gOKbUHpH7c7yE8aeF4l80usxPkmyEZj
 0lbz0S0C0zyLtLgTPkKL6eMuVrs8Ak8ziHMCy9UmN28Tt/4tY1pirYtrhHRr4Yi4
 YpTKw/cLYF0eZxh+9g44kEXc/aBlYLnA0xUDuZQk9MWfZkQFpyFqhD0B8kcAE94U
 UrUUs64/adc=
 =MAfY
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPQEHUACgkQmmx57+YA
 GNlAHA//dRH27vfRPwfPU6ULUS1zPG9I1fRxHGFiloNnCR3zmC0y8RtHkxlkHdRs
 /QwSL8SgG29xid2axD4hN//+gttTeG0OogdXnP9bGimv14z/eVc4xaWqHFrKtZem
 1HqFy83hWUqVzd4Nyqqz9jzsoGFI7I2rZMPN8czFmxgo5jBid/S+ubYekPdRNLf1
 wlq5+WLWlcJ3xzECJAVag3t0vlq6xEsz5z9GinQ1qFEf0fZFIVmt6q6srqfDghNC
 7vjeYYwcGwJQo2IcSwzt9tx2qCbn8VvIBkaw/nvwJBc34us/AuSHngBReKWKgTPZ
 TzQoKAWqD8x5raEJoKwHWV1Og/AxEY8rW1tS2BHnhcUFlTilRVxpBZfIdvKXYPyf
 PgAbbDSYj5ZnOaFTGsT4PuD06fvUsJ9EcZsPJLZZL8SRzuno3P4JQRfinqCU+uhZ
 N/E8u52r6tiOPJMTQbMj0RkI3BmxckjtmKvCMWvMxqu7e2gxdl+2B7lCAYQmPsU+
 oePkSqGFLXPRZCin3WGXSVEBG1nssUltJIa7Ioxw2Xis4VAFyahrlcQTqOs/vlpp
 upMGGXKNud0cT6Zul9AbdmY3ZyxhxPYMNsL4laxwctGQ5GTDmPbwKr61O85u6StA
 Ppp3/Wccgtag9hC/p1KGL+BdoVtsnAS7zGWNjt0Rh4UNNTK9nEE=
 =YpZD
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v6.3/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt

Devicetree related changes for omaps for v6.3

Updates for am335x-nano, n900, and gta04 for the connected peripherals.
Also few corrections for node names.

* tag 'omap-for-v6.3/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: omap: gta04a5: cleanup i2c node names
  ARM: dts: omap: gta04: add BNO055 IMU chip
  ARM: dts: n900: use iio driver for accelerometer
  ARM: dts: n900: rename accelerometer node
  ARM: dts: am335x-nano: Enable USB host
  ARM: dts: am335x-nano: Fix GPIO settings for MMC pins
  ARM: dts: am335x-nano: Enable I2C temperature sensor
  ARM: dts: am335x-nano: Enable RS485 mode for UART3 & 4
  ARM: dts: am335x-nano: Fix GPIO settings for RTS/CTS pins on UART3 & 4
  ARM: dts: ti: Fix pca954x i2c-mux node names
  ARM: dts: omap: Use new media bus type macros

Link: https://lore.kernel.org/r/pull-1674566471-434733@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:08:05 +01:00
Arnd Bergmann 6932b6ed40 Samsung DTS ARM64 changes for v6.3
1. Add L2 cache properties (Exynos, Tesla FSD).
 2. Tesla FSD: add Bosch MCAN (CAN bus), sound card (audio card with
    codec and I2S controllers), system controller nodes.
 3. Tesla FSD: correct pin pull up/down properties to match
    recommendation in user manual.
 4. Minor cleanups: use dedicated/specific sysreg compatibles, fix
    dtbs_check warnings, drop unsupported properties1
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmPNKlYQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD11sfD/4kiTRcx1oWwq3F8TZ2q/ST5yEGxxKyf8vk
 kwZvg84wzbRLarF6EcWjA7NKG2RbyO4sV4IZcmIK8dtUa8wzG0j9dvXM9umBO+hk
 YvYDhWmRQc/vCnHz1n47UfOEuVzf1G2vu2L3Kr9LA0alSezaANFwjCb/+DkbavzW
 MMHDTzijq+Dm+d6DCxfktrUUuVk0BKnvSjTHFsruxCu6NrUtrvFJSM1NRwY2Sud+
 Mo11SF0sd5ULBqpQ1DAv6UUxCvjHn77sgHNQ0ayRmtrrbYcYEElShmOEOJHcM143
 SpdOYFFb/znn0ZxmLrheoEoP3cUrAoi8nDbTXkkQcLLgPmAmgJEFbGM9dFmNc+sK
 9JQoOojaC3wVAyJ4oIN6drOz7lYmrd4LfEOHC1e1gphT4/3DvnLKal1EIL8W/oCR
 pFedC47n4jsz7fJyPwCVVAF7j4diuGxp3tzdYrXG4tBx9A5XN9wh0OQrHmodz9Li
 umbwnZyXof5oMnuJtNrTTGuKSmcsvHpi5xix32kC8DvcysRPnRZ40WNaSGxop+HR
 UwLUIgaDZgsGGQ29Ybg4bR/kPQwlVqD5CZkmqsSy5SKkh2JkJGrI9RF+8oE49/KY
 jUSVgj5Pq4VhJGB/x6jWEs4G1930Vl48kntJGv8qyAtH1FHUgd7QZHcXee25S/1S
 lSYL0Fue3A==
 =p+rN
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPQEEAACgkQmmx57+YA
 GNmI2A//aadtwZKvoxYHwBN64cDOzetfUbOcbc/B90QbZr8KQsIUjiB/lQ3z6NvX
 lB8o9tZPPVcebOSM1tNat6XLQVfw/Af8a+1NlxogGvQ/eAIlIMuTq3PAgZkcvA9j
 EQrlnVw1Ny+rGA10d/cxWXneo0iCVtDy8hFO6WmGPAVCAHGe2m5ur8DHy48kB4/v
 LbzuUfkmtS5Acah7EItum1XTNbojXD85JAVBySb9QBi2uxRiUx2CygoyG9haVF4E
 aKIytgnMs20KY0e1kEwFxr6dhassNCBJweTEbMHfSNxt8MtS8U+lDiaYAoJgBh9o
 TloTqho2CTVqN8Ut8rk18dF43WVWZXgflQUfnsEY5z6lNvvKfCBmD+KHLL5r8uOP
 N+n/PVCKHQYEwGT6E8T+Yq1BGtbBOzg3+eapyFZjrByp9Fk8abeqnIzmLisWiTMH
 LJ9D0AdwEbKf8L/RzmPuXEqM5BbBkcTG8KY44wMo6PvXKWE4j3KvUalW9zcRypqu
 F2ZG9rTEH+o43qoyaf106+SU3xkNSTnL2fNazwR+XL3sSdum/q4pYSKBVuLTDwmB
 /qK85hfGxFQTnggymUyd9tUyNLj8jNJlNX+BOeuL4DnP+XBbo+uc8nGptIscmoGO
 wYDbL91fqbSwznToC4qOM1wZDwfBrp0NQM0EogwvaUndIrbsqo8=
 =btPc
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt

Samsung DTS ARM64 changes for v6.3

1. Add L2 cache properties (Exynos, Tesla FSD).
2. Tesla FSD: add Bosch MCAN (CAN bus), sound card (audio card with
   codec and I2S controllers), system controller nodes.
3. Tesla FSD: correct pin pull up/down properties to match
   recommendation in user manual.
4. Minor cleanups: use dedicated/specific sysreg compatibles, fix
   dtbs_check warnings, drop unsupported properties1

* tag 'samsung-dt64-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: fsd: Add sound card node for Tesla FSD
  arm64: dts: fsd: Add codec node for Tesla FSD
  arm64: dts: fsd: Add I2S DAI node for Tesla FSD
  arm64: dts: exynos: drop unsupported I2C properties in Espresso
  arm64: dts: fsd: fix PUD values as per FSD HW UM
  arm64: dts: exynos: add dedicated SYSREG compatibles to Exynosautov9
  arm64: dts: exynos: add dedicated SYSREG compatibles to Exynos850
  arm64: dts: fsd: add sysreg device node
  arm64: dts: exynos: correct properties of MAX98504 in TM2
  arm64: dts: exynos: drop clock-frequency from CPU nodes in TM2
  arm64: dts: exynos: drop pwm-names from MAX77843 haptic in TM2
  arm64: dts: exynos: use 8-bit for SPI IR LED duty-cycle in TM2
  arm64: dts: exynos: add dedicated SYSREG compatibles to Exynos5433
  arm64: dts: fsd: Add MCAN device node
  arm64: dts: fsd: Update cache properties
  arm64: dts: exynos: Update cache properties

Link: https://lore.kernel.org/r/20230122122605.30720-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:07:12 +01:00
Arnd Bergmann 65edaea65d Minor improvements in ARM64 DTS for v6.3
1. Drop 0x from unit address (microchip).
 2. Align HDMI CEC and LED nodes with bindings (hisilicon).
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmPNKKsQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1xcKEACM8DtcOqyf3F6jy4d0R3UTPgNs+/n3rFL3
 KRFGHuu4/i8UNxxojf3A+U3lm5LeYzg5j8Yt/vCsUaTZ+HkAAzg+yqiiS2TrYXkx
 zFCo5kUjtgwGdSLUlctFSg8fI6/Nk2fiTpBKCJVFtNJaLztx5aLirfsQn59cCtQG
 0/486Gs5AESf2wKKi5M+OFCcTpplAZQv1qS8IgZJOQ2kx250YYWHID3yGtHVXBGE
 SK7cXSlzlWsetzBA6/hxuaCEwh1WiH7nnfX21A74AAhm/muyqA8AJDfVHzWxHJTy
 N+WRgs/HIxd6C+iDQe55kTI9Al0H7RPc+2D+av8W2B88YmS4IpCwIyEZ/YtjFoSr
 3fBqSD8EzPeOLl+OfeMb4JeIBnzeJcj3sm8xWGqtPZV73oQkjqEuElCHKFGT+/x+
 mCfez+tj8o0O77/qcVDrKQcPKHDHNwja+/GijaVUHmPOClgf+iOVDYAQumVzguTK
 nH550YDqmWWgkJe91mF+UGsYQ/FUgTDOszdjykP0/Ra4mU+aqYqEPgXVG0x/phnx
 dmLbxecd0K84kipnmmkqjY+Cy6uYL6L+A0YTvcYdyt1Oh76MSXbY+XpMtqfBVcyG
 6EWf0MHxURp6mnn7E5b87riAxBUB0tBoicn3imKWMqFK5hy/IqELbXob9mVU7jth
 sjTalDgoJg==
 =CzGE
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPQECIACgkQmmx57+YA
 GNk08hAAt3+SPQUpwlpuXLzeGV3+DxGa0hKCoWeFlYnsGbglEKhbIynk8WjfpMBr
 xv70AH0RJDb65bFLdteGv/MHRDptJuQildEkbANPrwSt1JzXjTMACpIBQEe2rH70
 bMTupNKOClp4AsMSfqfaWI5CJ5f22XhnC0aKnl7YAHBeps9P9hxERMBiefOXKQpO
 rWQGEirdq5eOg8hNoWDoV9xld4jGYenPsmm56CKhEPQoMhF5VEBhhzbB4/8h/ML3
 8gR3q66Uypv7OiZ3K2zCSAljutEk45+VxV3dbgBNB00Gz/HQazkgR/4NnrVCf2Up
 y/wVSVCiC7tyKWv1OMrNT27KN4w3MYDr/Wt9n712t8Zk4EwGCOCrpxt72zGiQmYf
 RJXkLbBZUzFyWBF4amdujHC8XLdHjCO8R1Pi5/f6RWMB/iCYDx7sVcuWdvmQpF2m
 4MaptvDd5ZZDg+rUm4simNXWgDD9peNbgVbPUIYprNp8qn3hPqO19R8+F37fM2jP
 2ftXGJeVdtqs0qKvJja7r5AOAWq+Cm4oR5ayX6MOAzXHZP+Meqokv0uR+HsFiX+r
 uW4YQN64q/2qsU70gpBXXKSZwe5BU1eyC5LdWJebxdb9ATehzwWaTjCI3F+dODVn
 ah8Htz0DELQx4SWeaEHYuU5QTpyuqSM1594MZ9Fb3db6rfx6zJk=
 =tGPw
 -----END PGP SIGNATURE-----

Merge tag 'dt64-cleanup-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt

Minor improvements in ARM64 DTS for v6.3

1. Drop 0x from unit address (microchip).
2. Align HDMI CEC and LED nodes with bindings (hisilicon).

* tag 'dt64-cleanup-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt:
  arm64: dts: hisilicon: align LED node names with dtschema
  arm64: dts: microchip: drop 0x from unit address

Link: https://lore.kernel.org/r/20230122121541.29312-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:06:42 +01:00
Arnd Bergmann bbabe541db AT91 device tree updates for 6.3:
It contains:
 - the addition of XISC (eXtended Image Sensor Controller) and CSI2DC (csi2
   demux controller) available in SAMA7G5
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCY8kV1gAKCRCejrg/N2X7
 /YXAAQCLrVSXn+lGYXoPujbjjyCN0gqsZp1ekFzdO1ZnY5nqxgD+PGYiZLcJVNjH
 zffcpXxl6SwFLyfCby4dXJJIHwwf0g0=
 =QX/1
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPQD+YACgkQmmx57+YA
 GNlfVA/8CCHvWZopIUM6GhvcO3wskVJlI2l5gjcoktw6hpPTGFB/HGKGC3Q/ayuf
 cNK93isM0VvrS40zOxPARx58E6uDhfUmQ9hsqQ9urbGmhvlfve+L6/vrkVMhPIb+
 JBEcuTKF8mJLvJcJ7Vd84JsrTE48+CbnHy2ccF2oHjhw8GObQ/8pE2gs+KCgc/4y
 gJuSF1EhiaFIJpMFGByLrgRvUSPAM9jnkT++hgvFKS3FYmXl7riVQpWzyYSzLXeX
 zQzjFYB7W+tKVfvaRpvmqlCcboxbTS5XAcoJ57arp2Ovgp1T3wahmY/OyTaV0BbC
 YSPU+Xc/5hcy9gE2Qn8pLzBsN/oMC5GnNqbCo5Nq6E6Kxn9VIiUatW5maJl068CP
 9Y7chyB3FxyifGeAmABWUab33m3b9DK3+ZqUoB5pO0icPXiGlXLh6MBzI2yZ7ukK
 SAHd5D2EY5NDm+AuWQV8t1x1/Lqbne+eYdR9nQJsND6NXl9kxKWZbhd3wCmF1ucv
 uJfN/n0rcbh+iC0tnRItd+3xqg+V0NRS6VyzmAxtkL8d0leqFMDEDnDFVwkExS39
 IOB4FDfVt8p/blFw4s6pK+m/FgO09gOTIFsPnrHMQVrVn6LgCVZR7yndBcMVTTKH
 WnuHeBYpxL44FNskDYGCul5V7+XtNT53yDahSRHa/m9hP6SsYW8=
 =Vvk6
 -----END PGP SIGNATURE-----

Merge tag 'at91-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt

AT91 device tree updates for 6.3:

It contains:
- the addition of XISC (eXtended Image Sensor Controller) and CSI2DC (csi2
  demux controller) available in SAMA7G5

* tag 'at91-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: dts: at91: sama7g5: add nodes for video capture

Link: https://lore.kernel.org/r/20230119112903.43257-1-claudiu.beznea@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:05:42 +01:00
Arnd Bergmann bd5a649bf3 Renesas DT updates for v6.3
- Enable watchdog and timer (OSTM) support for the RZ/Five SMARC EVK
     development board,
   - Add operating points for the Cortex-A55 CPU cores on the R-Car S4-8
     SoC,
   - Add display support for the R-Car V4H SoC and the White-Hawk
     development board,
   - Add eMMC and SDHI support for the RZ/V2M SoC,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCY8KpMgAKCRCKwlD9ZEnx
 cHYVAP95PYoFsrCBey0YgfFx7Gae0ehQG3FzfMXXmq8ZH1oXBwD+NkvC3oWuegOn
 MEs2EtfRvUMzMyY2t9Vd34ktvmxOpAQ=
 =EGFO
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPQD1kACgkQmmx57+YA
 GNkMtQ/8C+bEUeSMfWqfn5jqxhLAv3Vh/NlzbfVTJZQKC8oNvNUMdZ6DnCSoNc3Q
 I9t6AXtAfmRfCIKsFsPFK5JdQk/Hh9EeGH5Qdp6/7kP0RzOm3Ghm2ahjvrTVgwRo
 BCNWW6wL0q2dne/GWUgCREbFdASsXleg/DevAHyJtHxHbPQ8Qg+wLAXt/DIjKMDs
 rMCiFGlabFqn+lFKAGbkoVFvhWcxZ5MxbPhTQMAVnDapPQeCEEe5pnr5SvU29oAz
 Xo5OnLmPcToafgQwDZkj35GO6IMWnhvsRggLymw0Xe6SYz54zZa3Jv+d94hh26pG
 6U03v0XL9dia29vJd4OvlYS1pZRT1/IqoUcFfaH0I2+lbsqz7Tpmyu5taho5Iovu
 dUydGgs4VFwtWZfihkxoh4IzpGTHzGaCjrnlvwMN3XalkpmxtaptHMjBLBDkl1eR
 UsEABPVZNYQLm06ow6I9F8NhSQ6QyU8Ex1s/tG4c03iBQIB6/0iaZ2Oc1mx13lBJ
 cgEodH6OWgdxypA5NzZBUwr8Tgfizsekfv6XmFjMz6wbNaCS5WD5ah4BXEEiSADu
 pNbAm7lScfZAFaaQ5ixGQJXq2euVhXtIFfS5r/+HE6t8MLVnLCrmqgitmFGdJ+TU
 6haBRo7l15MRDjSzseOpHeXR8UBg8eDu41dlS0pkouiAg9vjYuk=
 =7zgr
 -----END PGP SIGNATURE-----

Merge tag 'renesas-dts-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt

Renesas DT updates for v6.3

  - Enable watchdog and timer (OSTM) support for the RZ/Five SMARC EVK
    development board,
  - Add operating points for the Cortex-A55 CPU cores on the R-Car S4-8
    SoC,
  - Add display support for the R-Car V4H SoC and the White-Hawk
    development board,
  - Add eMMC and SDHI support for the RZ/V2M SoC,
  - Miscellaneous fixes and improvements.

* tag 'renesas-dts-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: dts: renesas: condor-i: add HS400 support for eMMC
  arm64: boot: dts: r8a774[a/b/e]1-beacon: Consolidate sound clocks
  riscv: dts: renesas: rzfive-smarc-som: Enable OSTM nodes
  arm64: dts: renesas: ulcb-kf: Fix pca9548 i2c-mux node names
  arm64: dts: renesas: r9a09g011: Add eMMC and SDHI support
  arm64: dts: renesas: white-hawk-cpu: Add DP output support
  arm64: dts: renesas: r8a779g0: Add display related nodes
  arm64: dts: renesas: r8a779f0: Add CA55 operating points
  riscv: dts: renesas: rzfive-smarc-som: Enable WDT

Link: https://lore.kernel.org/r/cover.1673702293.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:03:21 +01:00
Arnd Bergmann 917601ebd6 Renesas ARM defconfig updates for v6.3
- Enable support for the Renesas RZ/G2L MIPI DSI, CSI-2, and Camera
     Receiving Unit drivers in the arm64 defconfig,
   - Refresh shmobile_defconfig for v6.1-rc5.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCY8KnaQAKCRCKwlD9ZEnx
 cE4+AP4+bJGw+REZ45iyVQxTjxduIFQio2xvDHTusW7Syzap0QEAml3pTP5/pxvZ
 ClQ98CSgN9wkL01CNNFiNYxu65uzrg4=
 =/I7O
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPQDugACgkQmmx57+YA
 GNkg1A//cDqOcy+N5krjvCiSGjbvnHLtlUOU9SWqwal7fNfnv9YfCExGafiOPQgr
 likcJjlzX6DjGR03/ZCJoa00S03blcs0JY6sb/KQyelMQyRrzgaFb5mGG6a7xTyz
 eshQJMx7hWp9815/J6NNwsCy5bS7sOAMIuaEFrsp3dg81Yj62IuuZs1ncRJkQEBo
 wP/G07iv0p5ZX+t2Ei9YMsoM7hJOxlzTbeY4q8KYDTZxU25EtxUionIAKbmzW8Xv
 c4YrrReBFzEqKsgjdx6wzD2TMfWnXCgM3k4XCeiWuMfk9+2+hymPDY81oygyQ4r5
 4e42GJEUSMf1JzUn4ZglTWLZPikUt/hZ73YfR6TDwil2Lky3LCq+3xI0OhdaWP1x
 vQkiJd+jK53sicsCGmt+03tG3eMVGhrk+DR02t6o5GHZzz4lMY0GrK1pqKZbrQbU
 EMtHKv4lR+04dU6rMFYzL5ihrq3OibNXW2br2bUBGawiQOcbbjdT7HKLkA3NRGzK
 H0LnS1Sbo50CJ5vHkjYVIWiooqHih9BIF6XHOptmcQxo0ptzMIU4Uy6o5mNYBm7G
 OZym8i2ZRstuCn9azPecLOtFQAW9mdBwqDPYbR2Uin4sMhRt8w42e81+MEzycFMb
 sZKDon7OqMvNNAmJn39rRgcKme6Abkxt9UxRc74wbDxwRuAYyvg=
 =p+tX
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm-defconfig-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig

Renesas ARM defconfig updates for v6.3

  - Enable support for the Renesas RZ/G2L MIPI DSI, CSI-2, and Camera
    Receiving Unit drivers in the arm64 defconfig,
  - Refresh shmobile_defconfig for v6.1-rc5.

* tag 'renesas-arm-defconfig-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: defconfig: Enable RZ/G2L MIPI CSI-2 and CRU support
  ARM: shmobile: defconfig: Refresh for v6.1-rc5
  arm64: defconfig: Enable Renesas RZ/G2L MIPI DSI driver

Link: https://lore.kernel.org/r/cover.1673702289.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:01:28 +01:00
Mark Brown d54dbdcfd4
ARM: multi_v5_defconfig: Enable I2C_GPIO
A GPIO based I2C bus is used by at least some Atmel reference boards,
including the AT91SAM9G20-EK which is in CI, enable the driver as a
module to improve test coverage and help users of systems that happen to
use it.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230109-arm-multi-v5-i2c-gpio-v1-1-78e191358548@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:00:55 +01:00
Mark Brown 74ab23d5a7
ARM: multi_v7_defconfig: Enable wm896x audio CODECs
The wm896x series of audio CODECs is used on a number of Freescale
reference designs, enable the drivers in multi_v7_defconfig to improve
testing coverage of those systems and their derivatives.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20230106-arm-wm896x-v1-1-441c564a9cd1@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-24 18:00:18 +01:00
Paolo Abeni d968117a7e Revert "Merge branch 'ethtool-mac-merge'"
This reverts commit 0ad999c1ee, reversing
changes made to e38553bdc3.

It was not intended for net.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-01-24 17:44:14 +01:00
Daniel Vetter b8f55f24bc drm-misc-next for $kernel-version:
UAPI Changes:
 
 Cross-subsystem Changes:
 
 Core Changes:
 
  * Cleanup unneeded include statements wrt <linux/fb.h>, <drm/drm_fb_helper.h>
    and <drm/drm_crtc_helper.h>
 
  * Remove unused helper DRM_DEBUG_KMS_RATELIMITED()
 
  * fbdev: Remove obsolete aperture field from struct fb_device, plus
    driver cleanups; Remove unused flag FBINFO_MISC_FIRMWARE
 
  * MIPI-DSI: Fix brightness, plus rsp. driver updates
 
  * scheduler: Deprecate drm_sched_resubmit_jobs()
 
  * ttm: Fix MIPS build; Remove ttm_bo_wait(); Documentation fixes
 
 Driver Changes:
 
  * Remove obsolete drivers for userspace modesetting i810, mga, r128,
    savage, sis, tdfx, via
 
  * bridge: Support CDNS DSI J721E, plus DT bindings; lt9611: Various
    fixes and improvements; sil902x: Various fixes; Fixes
 
  * nouveau: Removed support for legacy ioctls; Replace zero-size array;
    Cleanups
 
  * panel: Fixes
 
  * radeon: Use new DRM logging helpers
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmPJAq4ACgkQaA3BHVML
 eiNEIgf+I0R9KmX890K4usKG9LfPH/nIv+4Am6x4/4lv0PzN2vYGhoyPJG8cyNvs
 KFms+lTUJBBgHeTG8S8NU1qKWUlA78eYQz8S4dbaocchsAiPTHq4f5J45zbQWMGI
 P56iNAflaO2ETtb3CsH0P0TPsW2TpZC3dvZUYpAEQDli66Bn2BCPCYspt4scOhZX
 S9usD28sB6L9AnALcCUMLqF4DUsW4FC8Zz46hKVUFlQpN5dcC1b0x0gyclyWy0wh
 yi1fkqzBB3N44JOIFFwan/KxQttgvrc9Shllkqss525AhE+v3afkK2i9ZXgdckuU
 kLC09pn6yuxubYgS0vJEU1bsqiMs+Q==
 =WjQb
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-next-2023-01-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

drm-misc-next for $kernel-version:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:

 * Cleanup unneeded include statements wrt <linux/fb.h>, <drm/drm_fb_helper.h>
   and <drm/drm_crtc_helper.h>

 * Remove unused helper DRM_DEBUG_KMS_RATELIMITED()

 * fbdev: Remove obsolete aperture field from struct fb_device, plus
   driver cleanups; Remove unused flag FBINFO_MISC_FIRMWARE

 * MIPI-DSI: Fix brightness, plus rsp. driver updates

 * scheduler: Deprecate drm_sched_resubmit_jobs()

 * ttm: Fix MIPS build; Remove ttm_bo_wait(); Documentation fixes

Driver Changes:

 * Remove obsolete drivers for userspace modesetting i810, mga, r128,
   savage, sis, tdfx, via

 * bridge: Support CDNS DSI J721E, plus DT bindings; lt9611: Various
   fixes and improvements; sil902x: Various fixes; Fixes

 * nouveau: Removed support for legacy ioctls; Replace zero-size array;
   Cleanups

 * panel: Fixes

 * radeon: Use new DRM logging helpers

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/Y8kDk5YX7Yz3eRhM@linux-uq9g
2023-01-24 17:36:29 +01:00
Steven Rostedt (Google) 3bb06eb6e9 tracing: Make sure trace_printk() can output as soon as it can be used
Currently trace_printk() can be used as soon as early_trace_init() is
called from start_kernel(). But if a crash happens, and
"ftrace_dump_on_oops" is set on the kernel command line, all you get will
be:

  [    0.456075]   <idle>-0         0dN.2. 347519us : Unknown type 6
  [    0.456075]   <idle>-0         0dN.2. 353141us : Unknown type 6
  [    0.456075]   <idle>-0         0dN.2. 358684us : Unknown type 6

This is because the trace_printk() event (type 6) hasn't been registered
yet. That gets done via an early_initcall(), which may be early, but not
early enough.

Instead of registering the trace_printk() event (and other ftrace events,
which are not trace events) via an early_initcall(), have them registered at
the same time that trace_printk() can be used. This way, if there is a
crash before early_initcall(), then the trace_printk()s will actually be
useful.

Link: https://lkml.kernel.org/r/20230104161412.019f6c55@gandalf.local.home

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: e725c731e3 ("tracing: Split tracing initialization into two for early initialization")
Reported-by: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Tested-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-01-24 11:27:29 -05:00
Tvrtko Ursulin 9635adf854 Merge drm/drm-next into drm-intel-gt-next
Lets eradicate a silent conflict between drm-intel-next and
drm-intel-gt-next which added a duplicate function (try_firmware_load).

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2023-01-24 16:23:03 +00:00
Mark Rutland 8be9fbd534 ftrace: Export ftrace_free_filter() to modules
Setting filters on an ftrace ops results in some memory being allocated
for the filter hashes, which must be freed before the ops can be freed.
This can be done by removing every individual element of the hash by
calling ftrace_set_filter_ip() or ftrace_set_filter_ips() with `remove`
set, but this is somewhat error prone as it's easy to forget to remove
an element.

Make it easier to clean this up by exporting ftrace_free_filter(), which
can be used to clean up all of the filter hashes after an ftrace_ops has
been unregistered.

Using this, fix the ftrace-direct* samples to free hashes prior to being
unloaded. All other code either removes individual filters explicitly or
is built-in and already calls ftrace_free_filter().

Link: https://lkml.kernel.org/r/20230103124912.2948963-3-mark.rutland@arm.com

Cc: stable@vger.kernel.org
Cc: Florent Revest <revest@chromium.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: e1067a07cf ("ftrace/samples: Add module to test multi direct modify interface")
Fixes: 5fae941b9a ("ftrace/samples: Add multi direct interface test module")
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-01-24 11:20:58 -05:00
Dave Thaler 0eb9d19e22 bpf, docs: Fix modulo zero, division by zero, overflow, and underflow
Fix modulo zero, division by zero, overflow, and underflow. Also clarify how
a negative immediate value is used in unsigned division.

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230124001218.827-1-dthaler1968@googlemail.com
2023-01-24 16:46:40 +01:00
Hans Verkuil 89c08aef8f media: videobuf2: set q->streaming later
Commit a10b215325 ("media: vb2: add (un)prepare_streaming queue ops") moved
up the q->streaming = 1 assignment to before the call to vb2_start_streaming().

This does make sense since q->streaming indicates that VIDIOC_STREAMON is called,
and the call to start_streaming happens either at that time or later if
q->min_buffers_needed > 0. So q->streaming should be 1 before start_streaming
is called.

However, it turned out that some drivers use vb2_is_streaming() in buf_queue,
and if q->min_buffers_needed == 0, then that will now return true instead of
false.

So for the time being revert to the original behavior.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: a10b215325 ("media: vb2: add (un)prepare_streaming queue ops")
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-01-24 16:34:06 +01:00
Christian Brauner facd61053c
fuse: fixes after adapting to new posix acl api
This cycle we ported all filesystems to the new posix acl api. While
looking at further simplifications in this area to remove the last
remnants of the generic dummy posix acl handlers we realized that we
regressed fuse daemons that don't set FUSE_POSIX_ACL but still make use
of posix acls.

With the change to a dedicated posix acl api interacting with posix acls
doesn't go through the old xattr codepaths anymore and instead only
relies the get acl and set acl inode operations.

Before this change fuse daemons that don't set FUSE_POSIX_ACL were able
to get and set posix acl albeit with two caveats. First, that posix acls
aren't cached. And second, that they aren't used for permission checking
in the vfs.

We regressed that use-case as we currently refuse to retrieve any posix
acls if they aren't enabled via FUSE_POSIX_ACL. So older fuse daemons
would see a change in behavior.

We can restore the old behavior in multiple ways. We could change the
new posix acl api and look for a dedicated xattr handler and if we find
one prefer that over the dedicated posix acl api. That would break the
consistency of the new posix acl api so we would very much prefer not to
do that.

We could introduce a new ACL_*_CACHE sentinel that would instruct the
vfs permission checking codepath to not call into the filesystem and
ignore acls.

But a more straightforward fix for v6.2 is to do the same thing that
Overlayfs does and give fuse a separate get acl method for permission
checking. Overlayfs uses this to express different needs for vfs
permission lookup and acl based retrieval via the regular system call
path as well. Let fuse do the same for now. This way fuse can continue
to refuse to retrieve posix acls for daemons that don't set
FUSE_POSXI_ACL for permission checking while allowing a fuse server to
retrieve it via the usual system calls.

In the future, we could extend the get acl inode operation to not just
pass a simple boolean to indicate rcu lookup but instead make it a flag
argument. Then in addition to passing the information that this is an
rcu lookup to the filesystem we could also introduce a flag that tells
the filesystem that this is a request from the vfs to use these acls for
permission checking. Then fuse could refuse the get acl request for
permission checking when the daemon doesn't have FUSE_POSIX_ACL set in
the same get acl method. This would also help Overlayfs and allow us to
remove the second method for it as well.

But since that change is more invasive as we need to update the get acl
inode operation for multiple filesystems we should not do this as a fix
for v6.2. Instead we will do this for the v6.3 merge window.

Fwiw, since posix acls are now always correctly translated in the new
posix acl api we could also allow them to be used for daemons without
FUSE_POSIX_ACL that are not mounted on the host. But this is behavioral
change and again if dones should be done for v6.3. For now, let's just
restore the original behavior.

A nice side-effect of this change is that for fuse daemons with and
without FUSE_POSIX_ACL the same code is used for posix acls in a
backwards compatible way. This also means we can remove the legacy xattr
handlers completely. We've also added comments to explain the expected
behavior for daemons without FUSE_POSIX_ACL into the code.

Fixes: 318e66856d ("xattr: use posix acl api")
Signed-off-by: Seth Forshee (Digital Ocean) <sforshee@kernel.org>
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2023-01-24 16:33:37 +01:00
Daniel Vetter 045e8d102f Merge tag 'drm-intel-gt-next-2023-01-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Driver Changes:

Fixes/improvements/new stuff:

- Fix workarounds on Gen2-3 (Tvrtko Ursulin)
- Fix HuC delayed load memory leaks (Daniele Ceraolo Spurio)
- Fix a BUG caused by impendance mismatch in dma_fence_wait_timeout and GuC (Janusz Krzysztofik)
- Add DG2 workarounds Wa_18018764978 and Wa_18019271663 (Matt Atwood)
- Apply recommended L3 hashing mask tuning parameters (Gen12+) (Matt Roper)
- Improve suspend / resume times with VT-d scanout workaround active (Andi Shyti, Chris Wilson)
- Silence misleading "mailbox access failed" warning in snb_pcode_read (Ashutosh Dixit)
- Fix null pointer dereference on HSW perf/OA (Umesh Nerlige Ramappa)
- Avoid trampling the ring during buffer migration (and selftests) (Chris Wilson, Matthew Auld)
- Fix DG2 visual corruption on small BAR systems by not forgetting to copy CCS aux state (Matthew Auld)
- More fixing of DG2 visual corruption by not forgetting to copy CCS aux state of backup objects (Matthew Auld)
- Fix TLB invalidation for Gen12.50 video and compute engines (Andrzej Hajda)
- Limit Wa_22012654132 to just specific steppings (Matt Roper)
- Fix userspace crashes due eviction not working under lock contention after the object locking conversion (Matthew Auld)
- Avoid double free is user deploys a corrupt GuC firmware (John Harrison)
- Fix 32-bit builds by using "%zu" to format size_t (Nirmoy Das)
- Fix a possible BUG in TTM async unbind due not reserving enough fence slots (Nirmoy Das)
- Fix potential use after free by not exposing the GEM context id to userspace too early (Rob Clark)
- Show clamped PL1 limit to the user (hwmon) (Ashutosh Dixit)
- Workaround unreliable reset on Jasperlake (Chris Wilson)
- Cover rest of SVG unit MCR registers (Gustavo Sousa)
- Avoid PXP log spam on platforms which do not support the feature (Alan Previn)
- Re-disable RC6p on Sandy Bridge to avoid GPU hangs and visual glitches (Sasa Dragic)

Future platform enablement:

- Manage uncore->lock while waiting on MCR register (Matt Roper)
- Enable Idle Messaging for GSC CS (Vinay Belgaumkar)
- Only initialize GSC in tile 0 (José Roberto de Souza)
- Media GT and Render GT share common GGTT (Aravind Iddamsetty)
- Add dedicated MCR lock (Matt Roper)
- Implement recommended caching policy (PVC) (Wayne Boyer)
- Add hardware-level lock for steering (Matt Roper)
- Check full IP version when applying hw steering semaphore (Matt Roper)
- Enable GuC GGTT invalidation from the start (Daniele Ceraolo Spurio)
- MTL GSC firmware support (Daniele Ceraolo Spurio, Jonathan Cavitt)
- MTL OA support (Umesh Nerlige Ramappa)
- MTL initial gt workarounds (Matt Roper)

Driver refactors:

- Hold forcewake and MCR lock over PPAT setup (Matt Roper)
- Acquire fw before loop in intel_uncore_read64_2x32 (Umesh Nerlige Ramappa)
- GuC filename cleanups and use submission API version number (John Harrison)
- Promote pxp subsystem to top-level of i915 (Alan Previn)
- Finish proofing the code agains object size overflows (Chris Wilson, Gwan-gyeong Mun)
- Start adding module oriented dmesg output (John Harrison)

Miscellaneous:

- Correct kerneldoc for intel_gt_mcr_wait_for_reg() (Matt Roper)
- Bump up sample period for busy stats selftest (Umesh Nerlige Ramappa)
- Make GuC default_lists const data (Jani Nikula)
- Fix table order verification to check all FW types (John Harrison)
- Remove some limited use register access wrappers (Jani Nikula)
- Remove struct_member macro (Andrzej Hajda)
- Remove hardcoded value with a macro (Nirmoy Das)
- Use helper func to find out map type (Nirmoy Das)
- Fix a static analysis warning (John Harrison)
- Consolidate VMA active tracking helpers (Andrzej Hajda)
- Do not cover all future platforms in TLB invalidation (Tvrtko Ursulin)
- Replace zero-length arrays with flexible-array members (Gustavo A. R. Silva)
- Unwind hugepages to drop wakeref on error (Chris Wilson)
- Remove a couple of superfluous i915_drm.h includes (Jani Nikula)

Merges:

- Merge drm/drm-next into drm-intel-gt-next (Rodrigo Vivi)

danvet: Fix up merge conflict in intel_uc_fw.c, we ended up with 2
copies of try_firmware_load() somehow.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Y8fW2Ny1B1hZ5ZmF@tursulin-desk
2023-01-24 16:20:43 +01:00
Jon Hunter 320e0a7037 arm64: tegra: Populate the XUDC node for Tegra234
Populate the Tegra XUSB device controller (XUDC) node for Tegra234.

This is based upon a patch from Wayne Chang <waynec@nvidia.com>.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-24 14:53:10 +01:00
Jon Hunter f19bb95dc5 arm64: tegra: Add dma-coherent property for Tegra194 XUDC
DMA operations for XUSB device controller (XUDC) are coherent for
Tegra194 and so add the 'dma-coherent' property for this device.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-24 14:51:08 +01:00
Hans de Goede b0935f110c ACPI: video: Fix apple gmux detection
Some apple laptop models have an ACPI device with a HID of APP000B
and that device has an IO resource (so it does not describe the new
unsupported MMIO based gmux type), but there actually is no gmux
in the laptop at all.

The gmux_probe() function of the actual apple-gmux driver has code
to detect this, this code has been factored out into a new
apple_gmux_detect() helper in apple-gmux.h.

Use this new function to fix acpi_video_get_backlight_type() wrongly
returning apple_gmux as type on the following laptops:

MacBookPro5,4
https://pastebin.com/8Xjq7RhS

MacBookPro8,1
https://linux-hardware.org/?probe=e513cfbadb&log=dmesg

MacBookPro9,2
https://bugzilla.kernel.org/attachment.cgi?id=278961

MacBookPro10,2
https://lkml.org/lkml/2014/9/22/657

MacBookPro11,2
https://forums.fedora-fr.org/viewtopic.php?id=70142

MacBookPro11,4
https://raw.githubusercontent.com/im-0/investigate-card-reader-suspend-problem-on-mbp11.4/mast

Fixes: 21245df307 ("ACPI: video: Add Apple GMUX brightness control detection")
Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/
Reported-by: Emmanouil Kouroupakis <kartebi@gmail.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230124105754.62167-4-hdegoede@redhat.com
2023-01-24 13:41:57 +01:00
Hans de Goede d143908f80 platform/x86: apple-gmux: Add apple_gmux_detect() helper
Add a new (static inline) apple_gmux_detect() helper to apple-gmux.h
which can be used for gmux detection instead of apple_gmux_present().

The latter is not really reliable since an ACPI device with a HID
of APP000B is present on some devices without a gmux at all, as well
as on devices with a newer (unsupported) MMIO based gmux model.

This causes apple_gmux_present() to return false-positives on
a number of different Apple laptop models.

This new helper uses the same probing as the actual apple-gmux
driver, so that it does not return false positives.

To avoid code duplication the gmux_probe() function of the actual
driver is also moved over to using the new apple_gmux_detect() helper.

This avoids false positives (vs _HID + IO region detection) on:

MacBookPro5,4
https://pastebin.com/8Xjq7RhS

MacBookPro8,1
https://linux-hardware.org/?probe=e513cfbadb&log=dmesg

MacBookPro9,2
https://bugzilla.kernel.org/attachment.cgi?id=278961

MacBookPro10,2
https://lkml.org/lkml/2014/9/22/657

MacBookPro11,2
https://forums.fedora-fr.org/viewtopic.php?id=70142

MacBookPro11,4
https://raw.githubusercontent.com/im-0/investigate-card-reader-suspend-problem-on-mbp11.4/master/test-16/dmesg

Fixes: 21245df307 ("ACPI: video: Add Apple GMUX brightness control detection")
Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/
Reported-by: Emmanouil Kouroupakis <kartebi@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230124105754.62167-3-hdegoede@redhat.com
2023-01-24 13:41:57 +01:00
Hans de Goede 39f5a81f7a platform/x86: apple-gmux: Move port defines to apple-gmux.h
This is a preparation patch for adding a new static inline
apple_gmux_detect() helper which actually checks a supported
gmux is present, rather then only checking an ACPI device with
the HID is there as apple_gmux_present() does.

Fixes: 21245df307 ("ACPI: video: Add Apple GMUX brightness control detection")
Link: https://lore.kernel.org/platform-driver-x86/20230123113750.462144-1-hdegoede@redhat.com/
Reported-by: Emmanouil Kouroupakis <kartebi@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230124105754.62167-2-hdegoede@redhat.com
2023-01-24 13:41:57 +01:00
Hans de Goede ce95010ef6 platform/x86: hp-wmi: Fix cast to smaller integer type warning
Fix the following compiler warning:

drivers/platform/x86/hp/hp-wmi.c:551:24: warning: cast to smaller integer
   type 'enum hp_wmi_radio' from 'void *' [-Wvoid-pointer-to-enum-cast]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230123132824.660062-1-hdegoede@redhat.com
2023-01-24 13:41:13 +01:00
Mario Limonciello 062c1394cb platform/x86/amd: pmc: Add a module parameter to disable workarounds
Some users may want to live with the bugs that exist in platform
firmware and have workarounds in AMD PMC driver.

To allow them to bypass these workarounds, introduce a module
parameter.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230120191519.15926-2-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-01-24 13:41:13 +01:00
Mario Limonciello 8e60615e89 platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN
By default when the system is configured for low power idle in the FADT
the keyboard is set up as a wake source.  This matches the behavior that
Windows uses for Modern Standby as well.

It has been reported that a variety of AMD based designs there are
spurious wakeups are happening where two IRQ sources are active.

For example:
```
PM: Triggering wakeup from IRQ 9
PM: Triggering wakeup from IRQ 1
```

In these designs IRQ 9 is the ACPI SCI and IRQ 1 is the keyboard.
One way to trigger this problem is to suspend the laptop and then unplug
the AC adapter.  The SOC will be in a hardware sleep state and plugging
in the AC adapter returns control to the kernel's s2idle loop.

Normally if just IRQ 9 was active the s2idle loop would advance any EC
transactions and no other IRQ being active would cause the s2idle loop
to put the SOC back into hardware sleep state.

When this bug occurred IRQ 1 is also active even if no keyboard activity
occurred. This causes the s2idle loop to break and the system to wake.

This is a platform firmware bug triggering IRQ1 without keyboard activity.
This occurs in Windows as well, but Windows will enter "SW DRIPS" and
then with no activity enters back into "HW DRIPS" (hardware sleep state).

This issue affects Renoir, Lucienne, Cezanne, and Barcelo platforms. It
does not happen on newer systems such as Mendocino or Rembrandt.

It's been fixed in newer platform firmware.  To avoid triggering the bug
on older systems check the SMU F/W version and adjust the policy at suspend
time for s2idle wakeup from keyboard on these systems. A lot of thought
and experimentation has been given around the timing of disabling IRQ1,
and to make it work the "suspend" PM callback is restored.

Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reported-by: Xaver Hugl <xaver.hugl@gmail.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2115
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1951
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230120191519.15926-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-01-24 13:41:13 +01:00
Hans de Goede fdcc0602d6 platform/x86: asus-wmi: Fix kbd_dock_devid tablet-switch reporting
Commit 1ea0d3b467 ("platform/x86: asus-wmi: Simplify tablet-mode-switch
handling") unified the asus-wmi tablet-switch handling, but it did not take
into account that the value returned for the kbd_dock_devid WMI method is
inverted where as the other ones are not inverted.

This causes asus-wmi to report an inverted tablet-switch state for devices
which use the kbd_dock_devid, which causes libinput to ignore touchpad
events while the affected T10x model 2-in-1s are docked.

Add inverting of the return value in the kbd_dock_devid case to fix this.

Fixes: 1ea0d3b467 ("platform/x86: asus-wmi: Simplify tablet-mode-switch handling")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230120143441.527334-1-hdegoede@redhat.com
2023-01-24 13:41:13 +01:00
Kevin Kuriakose a410429a3b platform/x86: gigabyte-wmi: add support for B450M DS3H WIFI-CF
To the best of my knowledge this is the same board as the B450M DS3H-CF,
but with an added WiFi card. Name obtained using dmidecode, tested
with force_load on v6.1.6

Signed-off-by: Kevin Kuriakose <kevinmkuriakose@gmail.com>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230119150925.31962-1-kevinmkuriakose@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-01-24 13:41:13 +01:00
Rishit Bansal 3ee5447b20 platform/x86: hp-wmi: Handle Omen Key event
Add support to map the "HP Omen Key" to KEY_PROG2. Laptops in the HP
Omen Series open the HP Omen Command Center application on windows. But,
on linux it fails with the following message from the hp-wmi driver:

[ 5143.415714] hp_wmi: Unknown event_id - 29 - 0x21a5

Also adds support to map Fn+Esc to KEY_FN_ESC. This currently throws the
following message on the hp-wmi driver:

[ 6082.143785] hp_wmi: Unknown key code - 0x21a7

There is also a "Win-Lock" key on HP Omen Laptops which supports
Enabling and Disabling the Windows key, which trigger commands 0x21a4
and 0x121a4 respectively, but I wasn't able to find any KEY in input.h
to map this to.

Signed-off-by: Rishit Bansal <rishitbansal0@gmail.com>
Link: https://lore.kernel.org/r/20230120221214.24426-1-rishitbansal0@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-01-24 13:41:13 +01:00
Koba Ko 83bcf3e52e platform/x86: dell-wmi: Add a keymap for KEY_MUTE in type 0x0010 table
Some platforms send the speaker-mute key from EC. dell-wmi can't
recognize it.

Add a new keymap for KEY_MUTE in type 0x0010 table.

Signed-off-by: Koba Ko <koba.ko@canonical.com>
Link: https://lore.kernel.org/r/20230117123436.200440-1-koba.ko@canonical.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-01-24 13:41:13 +01:00
Neil Armstrong b1d908e6c7 dt-bindings: mmc: convert amlogic,meson-gx.txt to dt-schema
Convert the Amlogic SD / eMMC controller for S905/GXBB family SoCs
to dt-schema.

Take in account the used variant with amlogic,meson-gx-mmc.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v3-6-e28dd31e3bed@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-01-24 13:33:55 +01:00
Krzysztof Kozlowski bb065c6fe6 dt-bindings: mmc: correct pwrseq node names
Node names should be generic and should not contain underscores.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20230120085722.171965-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-01-24 13:31:28 +01:00
Krzysztof Kozlowski 1e52a7e679 dt-bindings: mmc: drop unneeded quotes
Cleanup by removing unneeded quotes from refs and redundant blank lines.
No functional impact except adjusting to preferred coding style.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> # for Renesas controllers
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230120085722.171965-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-01-24 13:30:30 +01:00
Luca Coelho 21e18febba drm/i915: update src and dst scaler limits for display ver 12 and 13
The bspec has been updated and now display versions 12 and 13 support
source width up to 5120 pixels, source height up to 8192 lines,
destination width up to 8192 and destination height up to 8192.

Update the code accordingly.

BSpec: 50441
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230113113905.130405-1-luciano.coelho@intel.com
2023-01-24 14:18:46 +02:00
Andreas Gruenbacher 63510d9f2f Merge branch 'iomap-for-next' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git 2023-01-24 12:51:39 +01:00
Ard Biesheuvel 6178617038 efi: arm64: enter with MMU and caches enabled
Instead of cleaning the entire loaded kernel image to the PoC and
disabling the MMU and caches before branching to the kernel's bare metal
entry point, we can leave the MMU and caches enabled, and rely on EFI's
cacheable 1:1 mapping of all of system RAM (which is mandated by the
spec) to populate the initial page tables.

This removes the need for managing coherency in software, which is
tedious and error prone.

Note that we still need to clean the executable region of the image to
the PoU if this is required for I/D coherency, but only if we actually
decided to move the image in memory, as otherwise, this will have been
taken care of by the loader.

This change affects both the builtin EFI stub as well as the zboot
decompressor, which now carries the entire EFI stub along with the
decompression code and the compressed image.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-7-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:51:08 +00:00
Ard Biesheuvel 3dcf60bbfd arm64: head: Clean the ID map and the HYP text to the PoC if needed
If we enter with the MMU and caches enabled, the bootloader may not have
performed any cache maintenance to the PoC. So clean the ID mapped page
to the PoC, to ensure that instruction and data accesses with the MMU
off see the correct data. For similar reasons, clean all the HYP text to
the PoC as well when entering at EL2 with the MMU and caches enabled.

Note that this means primary_entry() itself needs to be moved into the
ID map as well, as we will return from init_kernel_el() with the MMU and
caches off.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-6-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:51:08 +00:00
Ard Biesheuvel 32b135a7fa arm64: head: avoid cache invalidation when entering with the MMU on
If we enter with the MMU on, there is no need for explicit cache
invalidation for stores to memory, as they will be coherent with the
caches.

Let's take advantage of this, and create the ID map with the MMU still
enabled if that is how we entered, and avoid any cache invalidation
calls in that case.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-5-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:51:07 +00:00
Ard Biesheuvel 9d7c13e5dd arm64: head: record the MMU state at primary entry
Prepare for being able to deal with primary entry with the MMU and
caches enabled, by recording whether or not we entered with the MMU on
in register x19 and in a global variable. (Note that setting this
variable to '1' does not require cache invalidation, nor is it required
for storing the bootargs in that case, so omit the cache maintenance).

Since boot with the MMU and caches enabled is not permitted by the bare
metal boot protocol, ensure that a diagnostic is emitted and a taint bit
set if the MMU was found to be enabled on a non-EFI boot, and panic()
once the console is likely to be up. We will make an exception for EFI
boot later, which has strict requirements for the mapping of system
memory, permitting us to relax the boot protocol and hand over from the
EFI stub to the core kernel with MMU and caches left enabled.

While at it, add 'pre_disable_mmu_workaround' macro invocations to
init_kernel_el, as its manipulation of SCTLR_ELx may amount to disabling
of the MMU after subsequent patches.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-4-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:51:07 +00:00
Ard Biesheuvel af7249b317 arm64: kernel: move identity map out of .text mapping
Reorganize the ID map slightly so that only code that is executed with
the MMU off or via the 1:1 mapping remains. This allows us to move the
identity map out of the .text segment, as it will no longer need
executable permissions via the kernel mapping.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-3-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:51:07 +00:00
Ard Biesheuvel 82e4958800 arm64: head: Move all finalise_el2 calls to after __enable_mmu
In the primary boot path, finalise_el2() is called much later than on
the secondary boot or resume-from-suspend paths, and this does not
appear to be intentional.

Since we aim to do as little as possible before enabling the MMU and
caches, align secondary and resume with primary boot, and defer the call
to after the MMU is turned on. This also removes the need to clean
finalise_el2() to the PoC once we enable support for booting with the
MMU on.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230111102236.1430401-2-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:51:07 +00:00
Mark Rutland baaf553d3b arm64: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
This patch enables support for DYNAMIC_FTRACE_WITH_CALL_OPS on arm64.
This allows each ftrace callsite to provide an ftrace_ops to the common
ftrace trampoline, allowing each callsite to invoke distinct tracer
functions without the need to fall back to list processing or to
allocate custom trampolines for each callsite. This significantly speeds
up cases where multiple distinct trace functions are used and callsites
are mostly traced by a single tracer.

The main idea is to place a pointer to the ftrace_ops as a literal at a
fixed offset from the function entry point, which can be recovered by
the common ftrace trampoline. Using a 64-bit literal avoids branch range
limitations, and permits the ops to be swapped atomically without
special considerations that apply to code-patching. In future this will
also allow for the implementation of DYNAMIC_FTRACE_WITH_DIRECT_CALLS
without branch range limitations by using additional fields in struct
ftrace_ops.

As noted in the core patch adding support for
DYNAMIC_FTRACE_WITH_CALL_OPS, this approach allows for directly invoking
ftrace_ops::func even for ftrace_ops which are dynamically-allocated (or
part of a module), without going via ftrace_ops_list_func.

Currently, this approach is not compatible with CLANG_CFI, as the
presence/absence of pre-function NOPs changes the offset of the
pre-function type hash, and there's no existing mechanism to ensure a
consistent offset for instrumented and uninstrumented functions. When
CLANG_CFI is enabled, the existing scheme with a global ops->func
pointer is used, and there should be no functional change. I am
currently working with others to allow the two to work together in
future (though this will liekly require updated compiler support).

I've benchamrked this with the ftrace_ops sample module [1], which is
not currently upstream, but available at:

  https://lore.kernel.org/lkml/20230103124912.2948963-1-mark.rutland@arm.com
  git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git ftrace-ops-sample-20230109

Using that module I measured the total time taken for 100,000 calls to a
trivial instrumented function, with a number of tracers enabled with
relevant filters (which would apply to the instrumented function) and a
number of tracers enabled with irrelevant filters (which would not apply
to the instrumented function). I tested on an M1 MacBook Pro, running
under a HVF-accelerated QEMU VM (i.e. on real hardware).

Before this patch:

  Number of tracers     || Total time  | Per-call average time (ns)
  Relevant | Irrelevant || (ns)        | Total        | Overhead
  =========+============++=============+==============+============
         0 |          0 ||      94,583 |         0.95 |           -
         0 |          1 ||      93,709 |         0.94 |           -
         0 |          2 ||      93,666 |         0.94 |           -
         0 |         10 ||      93,709 |         0.94 |           -
         0 |        100 ||      93,792 |         0.94 |           -
  ---------+------------++-------------+--------------+------------
         1 |          1 ||   6,467,833 |        64.68 |       63.73
         1 |          2 ||   7,509,708 |        75.10 |       74.15
         1 |         10 ||  23,786,792 |       237.87 |      236.92
         1 |        100 || 106,432,500 |     1,064.43 |     1063.38
  ---------+------------++-------------+--------------+------------
         1 |          0 ||   1,431,875 |        14.32 |       13.37
         2 |          0 ||   6,456,334 |        64.56 |       63.62
        10 |          0 ||  22,717,000 |       227.17 |      226.22
       100 |          0 || 103,293,667 |      1032.94 |     1031.99
  ---------+------------++-------------+--------------+--------------

  Note: per-call overhead is estimated relative to the baseline case
  with 0 relevant tracers and 0 irrelevant tracers.

After this patch

  Number of tracers     || Total time  | Per-call average time (ns)
  Relevant | Irrelevant || (ns)        | Total        | Overhead
  =========+============++=============+==============+============
         0 |          0 ||      94,541 |         0.95 |           -
         0 |          1 ||      93,666 |         0.94 |           -
         0 |          2 ||      93,709 |         0.94 |           -
         0 |         10 ||      93,667 |         0.94 |           -
         0 |        100 ||      93,792 |         0.94 |           -
  ---------+------------++-------------+--------------+------------
         1 |          1 ||     281,000 |         2.81 |        1.86
         1 |          2 ||     281,042 |         2.81 |        1.87
         1 |         10 ||     280,958 |         2.81 |        1.86
         1 |        100 ||     281,250 |         2.81 |        1.87
  ---------+------------++-------------+--------------+------------
         1 |          0 ||     280,959 |         2.81 |        1.86
         2 |          0 ||   6,502,708 |        65.03 |       64.08
        10 |          0 ||  18,681,209 |       186.81 |      185.87
       100 |          0 || 103,550,458 |     1,035.50 |     1034.56
  ---------+------------++-------------+--------------+------------

  Note: per-call overhead is estimated relative to the baseline case
  with 0 relevant tracers and 0 irrelevant tracers.

As can be seen from the above:

a) Whenever there is a single relevant tracer function associated with a
   tracee, the overhead of invoking the tracer is constant, and does not
   scale with the number of tracers which are *not* associated with that
   tracee.

b) The overhead for a single relevant tracer has dropped to ~1/7 of the
   overhead prior to this series (from 13.37ns to 1.86ns). This is
   largely due to permitting calls to dynamically-allocated ftrace_ops
   without going through ftrace_ops_list_func.

I've run the ftrace selftests from v6.2-rc3, which reports:

| # of passed:  110
| # of failed:  0
| # of unresolved:  3
| # of untested:  0
| # of unsupported:  0
| # of xfailed:  1
| # of undefined(test bug):  0

... where the unresolved entries were the tests for DIRECT functions
(which are not supported), and the checkbashisms selftest (which is
irrelevant here):

| [8] Test ftrace direct functions against tracers        [UNRESOLVED]
| [9] Test ftrace direct functions against kprobes        [UNRESOLVED]
| [62] Meta-selftest: Checkbashisms       [UNRESOLVED]

... with all other tests passing (or failing as expected).

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Florent Revest <revest@chromium.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230123134603.1064407-9-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:49:43 +00:00
Mark Rutland 90955d778a arm64: ftrace: Update stale comment
In commit:

  26299b3f6b ("ftrace: arm64: move from REGS to ARGS")

... we folded ftrace_regs_entry into ftrace_caller, and
ftrace_regs_entry no longer exists.

Update the comment accordingly.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Florent Revest <revest@chromium.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230123134603.1064407-8-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:49:43 +00:00
Mark Rutland e4ecbe83fd arm64: patching: Add aarch64_insn_write_literal_u64()
In subsequent patches we'll need to atomically write to a
naturally-aligned 64-bit literal embedded within the kernel text.

Add a helper for this. For consistency with other text patching code we
use copy_to_kernel_nofault(), which is atomic for naturally-aligned
accesses up to 64-bits.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Florent Revest <revest@chromium.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230123134603.1064407-7-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-24 11:49:43 +00:00