Commit graph

1,294,499 commits

Author SHA1 Message Date
Brent Lu
8d6114b81d
ASoC: Intel: bxt_da7219_max98357a: remove glk support
Remove glk platform support and use sof_da7219 machine driver instead
for existing glk boards with MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:12 +09:00
Brent Lu
f46b768b72
ASoC: Intel: sof_da7219: support MAX98357A on glk boards
For glk boards, MAX98357A speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name glkda7219max. Use
same name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:12 +09:00
Brent Lu
c7f9523d21
ASoC: Intel: sof_da7219: add glk_da7219_def for glk boards
Add the board config glk_da7219_def to da7219 machine driver for all
glk boards using default SSP port allocation (headphone codec on SSP2,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:11 +09:00
Brent Lu
35ca48662c
ASoC: Intel: bxt_da7219_max98357a: remove cml support
Remove cml platform support and use sof_da7219 machine driver instead
for existing cml boards with MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:10 +09:00
Brent Lu
e895d16f4e
ASoC: Intel: sof_da7219: support MAX98357A on cml boards
For cml boards, MAX98357A speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name cmlda7219max. Use
same name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:09 +09:00
Brent Lu
7873252c0e
ASoC: Intel: sof_da7219: support MAX98357A
Add support to Maxim MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:08 +09:00
Bard Liao
5b093b0b47
ASoC: Intel: sof_rt5682: add missing MAX98357A config
sof_rt5682 supports MAX98357A/MAX98360A amp. Select SND_SOC_MAX98357A
as needed.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:07 +09:00
Brent Lu
12e5fe68d0
ASoC: Intel: bxt_da7219_max98357a: remove MAX98390 support
Remove MAX98390 support and use sof_da7219 machine driver instead for
existing cml boards with MAX98390 speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:07 +09:00
Brent Lu
5a2bc761fa
ASoC: Intel: sof_da7219: support MAX98390 on cml boards
For cml boards, MAX98390 speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name cml_max98390_da7219.
Use same name for backward compatibility with existing devices on
market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:06 +09:00
Brent Lu
a0cf86d813
ASoC: Intel: sof_da7219: add cml_da7219_def for cml boards
Add the board config cml_da7219_def to da7219 machine driver for all
cml boards using default SSP port allocation (headphone codec on SSP0,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:05 +09:00
Brent Lu
b7654a7e21
ASoC: Intel: sof_da7219: support MAX98390
Add support to Maxim MAX98390 speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:04 +09:00
Brent Lu
3b3ed47526
ASoC: Intel: sof_maxim_common: support MAX98390 on cml boards
Add support for 2xMAX98390 speaker amplifier running in I2S mode for
existing cml boards.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:03 +09:00
Brent Lu
d2d377fc22
ASoC: Intel: nau8825/rt5682: move speaker widget to common modules
Two machine drivers sof_rt5682 and sof_nau8825 always register two
speaker widgets 'Left Spk' and 'Right Spk' regardless the actual
number of speakers. Move the widget registration to speaker common
modules to avoid useless speaker widgets for 1 or 4 speaker boards.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:02 +09:00
Pierre-Louis Bossart
fbd741f099
ASoC: cs35l56: fix usages of device_get_named_child_node()
The documentation for device_get_named_child_node() mentions this
important point:

"
The caller is responsible for calling fwnode_handle_put() on the
returned fwnode pointer.
"

Add fwnode_handle_put() to avoid leaked references.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152939.38471-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:56 +09:00
Pierre-Louis Bossart
e8a6a5ad73
ASoC: da7219-aad: fix usage of device_get_named_child_node()
The documentation for device_get_named_child_node() mentions this
important point:

"
The caller is responsible for calling fwnode_handle_put() on the
returned fwnode pointer.
"

Add fwnode_handle_put() to avoid a leaked reference.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426153033.38500-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:56 +09:00
Jerome Brunet
6db26f9ea4
ASoC: meson: cards: select SND_DYNAMIC_MINORS
Amlogic sound cards do create a lot of pcm interfaces, possibly more than
8. Some pcm interfaces are internal (like DPCM backends and c2c) and not
exposed to userspace.

Those interfaces still increase the number passed to snd_find_free_minor(),
which eventually exceeds 8 causing -EBUSY error on card registration if
CONFIG_SND_DYNAMIC_MINORS=n and the interface is exposed to userspace.

select CONFIG_SND_DYNAMIC_MINORS for Amlogic cards to avoid the problem.

Fixes: 7864a79f37 ("ASoC: meson: add axg sound card support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426134150.3053741-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:55 +09:00
Jerome Brunet
a5a89037d0
ASoC: meson: axg-tdm: add continuous clock support
Some devices may need the clocks running, even while paused.
Add support for this use case.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-5-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:50 +09:00
Jerome Brunet
f949ed458a
ASoC: meson: axg-tdm-interface: manage formatters in trigger
So far, the formatters have been reset/enabled using the .prepare()
callback. This was done in this callback because walking the formatters use
a mutex. A mutex is used because formatter handling require dealing
possibly slow clock operation.

With the support of non-atomic, .trigger() callback may be used which also
allows to properly enable and disable formatters on start but also
pause/resume.

This solve a random shift on TDMIN as well repeated samples on for TDMOUT.

Fixes: d60e4f1e4b ("ASoC: meson: add tdm interface driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-4-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:49 +09:00
Jerome Brunet
dcba52ace7
ASoC: meson: axg-card: make links nonatomic
Non atomic operations need to be performed in the trigger callback
of the TDM interfaces. Those are BEs but what matters is the nonatomic
flag of the FE in the DPCM context. Just set nonatomic for everything so,
at least, what is done is clear.

Fixes: 7864a79f37 ("ASoC: meson: add axg sound card support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-3-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:49 +09:00
Jerome Brunet
b11d26660d
ASoC: meson: axg-fifo: use threaded irq to check periods
With the AXG audio subsystem, there is a possible random channel shift on
TDM capture, when the slot number per lane is more than 2, and there is
more than one lane used.

The problem has been there since the introduction of the axg audio support
but such scenario is pretty uncommon. This is why there is no loud
complains about the problem.

Solving the problem require to make the links non-atomic and use the
trigger() callback to start FEs and BEs in the appropriate order.

This was tried in the past and reverted because it caused the block irq to
sleep while atomic. However, instead of reverting, the solution is to call
snd_pcm_period_elapsed() in a non atomic context.

Use the bottom half of a threaded IRQ to do so.

Fixes: 6dc4fa179f ("ASoC: meson: add axg fifo base driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-2-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:48 +09:00
Thorsten Blum
bd622532f7 m68k: amiga: Use str_plural() to fix Coccinelle warning
Fixes the following Coccinelle/coccicheck warning reported by
string_choices.cocci:

	opportunity for str_plural(zorro_num_autocon)

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20240412215704.204403-4-thorsten.blum@toblux.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2024-04-29 16:45:53 +02:00
Finn Thain
d301a71c76 macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"
The via-macii ADB driver calls request_irq() after disabling hard
interrupts. But disabling interrupts isn't necessary here because the
VIA shift register interrupt was masked during VIA1 initialization.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/419fcc09d0e563b425c419053d02236b044d86b0.1710298421.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2024-04-29 16:45:53 +02:00
Andy Shevchenko
d39d1677c3 zorro: Use helpers from ioport.h
We can use the DEFINE_RES_MEM_NAMED() macro and resource_contains()
helper instead of reimplementing them in the code. No functional change
intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230831121623.36293-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2024-04-29 16:45:53 +02:00
Arnd Bergmann
1d3454fafb Qualcomm Arm64 DeviceTree updates for v6.10
Support for Sony Xperia 1V, on the SM8550 platform, is added.
 
 On IPQ8074, UART6 is described and unused gpios from QPIC are removed.
 
 Backlight and touchscreen are described on Samsung Grand Prime devices.
 
 RGB LED is added to Sony Xperia "Yoshino" devices, on which the
 volume-up key definition is corrected as well.
 
 Light Pulse Generator node is added to PM6150L PMIC, and blocks related
 to USB Type-C on PM6150 are added.
 
 On QCS6490 Rb3Gen2 UFS storage, USB Type-C management, a couple of
 remoteprocs and both USB Type-C and native DisplayPort are enabled.
 For the related IDP display is enabled, and the PMIC volume and power
 buttons are described.
 The inline crypto engine is added for SC7280, and an additional turbo
 frequency is added to the MDP.
 
 USB Type-C port management is introduce for the QRB2210 RB1. WiFi
 firmware-name qualifier is added to both RB1 and RB2 boards.
 The LMH node is added for the QCM2290, to configure the thresholds as
 well as provide thermal pressure input.
 
 The regulator range is adjusted for SD-card IO on SA8155P ADP, to allow
 UHS modes.
 
 The unused DCC is disabled on SC7180, and unused PMIC gpio block is
 disabled on Trogdor.
 
 For Lenovo Flex 5G, on SC8180X, the GPU firmware path is aligned with
 agreed upon firmware structure. The frequency of the I2C bus for
 touchpad is brought up to mitigate missing events. A number of
 additional cleanups are introduced.
 
 For SC8280XP GICv3 ITS is wired up for PCIe. EAS properties ad
 introduced. A PS_HOLD-based restart node is introduced and acts as a
 fallback if other mechanisms are unavailable to restart the board.
 QFPROM is described, missing LMH interrupts for thermal pressure are
 added. The TCSR download mode register is added, to allow configuring
 if download mode should be entered on a crash.
 
 USB Type-C handling is introduce for Fairphone FP3 as well.
 
 On SM6350 crypto engine and DisplayPort controllers are introduced.
 
 WiFi is enabled on the SM8150 Hardware Development Kit (HDK)
 
 USB PD properties are added on Xiaomi Mi Pad 5 Pro devices.
 
 Interconnect paths are added for UFS on SM8350, to ensure the bus is
 voted for when the controller is operating.
 
 On SM8550 the DMA coherency properties are corrected for SMMU and a few
 consumers. Missing DWC3 quirks are added and the SNPS PHY parameters are
 adjusted. Fastrpc banks are marked non-secure as needed.
 
 The GPU description is introduced on SM8650, and enabled on the QRD. A
 missing reserved-memory node is added, as is a few missing fastrpc
 compute banks, and the non-secure-domain flag for other banks.
 
 On X1 Elite SPMI support is added, together with PMIC definitons. The
 link properties for DP3 are corrected, and audio-related resets are
 introduced. SoundWire properties are corrected.
 
 Nodes describing the PCIe bridge under the host controller is added
 for a bunch of platforms.
 
 The GPIO carrying orientation information for USB Type-C is added across
 Fairphone 5, Lenovo Flex 5G, Lenovo Thinkpad X13s, SM8350 and SM845
 HDKs.
 
 A few dtbTool-specific compatibles for msm8916 is dropped from the
 bindings.
 
 A number of DeviceTree binding validation issues are corrected.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmYtPN8VHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FUUgQALpnVSHS39IDVFOoUb6fEccSu1dI
 SDMm7kMzr6ZJjE1v8LiFsr/qz+DyXR6I4oQf7LEz6C+BbgDA2+ERnlecVmv/Fwpz
 i4eO2mpO29hxzr6tu+cLIjK5BJhlAeol/rGfL+PfHRBwfrxSzN3ZQmjAVMgJb7E0
 Lb0FTPQ3NDHEiWeQbSN8h+lHc6FcnHG4xf+IJD5a3U/x7fhPJRLU7Wb2yRDSQkLU
 Qb0Jg1Spsjs13dp3ICE0jcK+WYlzn9KqD2dP0/3cUOwLWb7ic6BV9gEbSPn2ALfK
 ZWqEyv2jbxfGd//0YN1gesssNaKeZCOE1xXJxu5R3h7qquyeTXlcCj1gyePCMTuz
 HSqi7WmJufruu8uZEhRj0I7+bT3EWUF1h1vt+d8fubSE2JANKDi4IDQPb2qs5DvA
 4aCuuD59F49pkRMkmTOcDzRnYv70IdyHhdSQ0+O233TXnJdE+5hq8s/5jHX4iviD
 e290Zrvm1sid+oiISh/edrN3DH+tea3TsNtWcrDB7v5MKX7pOOwuGnDSAhAmsWg6
 B4Hy+cMVFpZaeOpSgj77MaU+Ri9DDhS5PzRVaCEp0ya+uR/oOOHgSy/SFS0U+Ho/
 gmTPMDchIokHxLB+ySU1Sufb9KryZvv4/MokbKwDgag4xjgu/F5gWkHIS0tRSGtW
 x+FT1ZUKPTeOg0J9
 =j685
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvsikACgkQYKtH/8kJ
 UidI3A/9G4E77uhMmK+QjmElfWTkS85xmO8l62VzRFvSaqhvCpvtG43BIaqpFGHw
 T5BwTY7EHY0rezxeSQb7b02R7N1wGl4Jc7wzVyAkL/LH9aOX603qkYFQQP/eHtx4
 FKz1mifB0W59t0TbSmLtA+ToNXAhtaf6X8jn1lSQCSb0gmW9EiMMeOacRCohLIY4
 yUmvVGd/+oTfVG7Dus7ck/Cq6Nte8MR6wYj8gGObgfjKbB1Q9+p3dXmn/1y+mg7e
 CWYCt43ebt5Do1VJaVRZ0wbu/B+WQzWpB8mNjKLBMSlU6INdgy35fgED4SNvaNwH
 Bi+ySu0ZonoOVzowNQ52sEla1jz8UulXz5fWx3tSqvyTqVXVGbQCeG6ZM/W4oNTj
 cmBFPMzs51yAb/mi8uVVtEBHYg1gyYrqW6JStiswjsoZXxeDFy45CW+GYIljW0zz
 04S3ME9aK0DpAGZFS6U+f9BAhF9l/3JSmtA60ej1LxjapcsoHZSkhwjn9pIdcaCr
 K6LTdRn0Pz55mqgyvnOOltiQrRU/0KMfsRibMfNBG9JUqHuSolrJmIDbRe28yYl7
 QCMMFhPI/OAwoFzvzXDx6Q2bcWBQ7ZyW0bG2Cd7Q8u/Bnhsv6wuJjYBczLYSNQJG
 Xg0oVdEx6Opqcmk7gnNfCJ0MGZAEaZesIX/oUC30c2NSJoo4fpE=
 =f9Mf
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt

Qualcomm Arm64 DeviceTree updates for v6.10

Support for Sony Xperia 1V, on the SM8550 platform, is added.

On IPQ8074, UART6 is described and unused gpios from QPIC are removed.

Backlight and touchscreen are described on Samsung Grand Prime devices.

RGB LED is added to Sony Xperia "Yoshino" devices, on which the
volume-up key definition is corrected as well.

Light Pulse Generator node is added to PM6150L PMIC, and blocks related
to USB Type-C on PM6150 are added.

On QCS6490 Rb3Gen2 UFS storage, USB Type-C management, a couple of
remoteprocs and both USB Type-C and native DisplayPort are enabled.
For the related IDP display is enabled, and the PMIC volume and power
buttons are described.
The inline crypto engine is added for SC7280, and an additional turbo
frequency is added to the MDP.

USB Type-C port management is introduce for the QRB2210 RB1. WiFi
firmware-name qualifier is added to both RB1 and RB2 boards.
The LMH node is added for the QCM2290, to configure the thresholds as
well as provide thermal pressure input.

The regulator range is adjusted for SD-card IO on SA8155P ADP, to allow
UHS modes.

The unused DCC is disabled on SC7180, and unused PMIC gpio block is
disabled on Trogdor.

For Lenovo Flex 5G, on SC8180X, the GPU firmware path is aligned with
agreed upon firmware structure. The frequency of the I2C bus for
touchpad is brought up to mitigate missing events. A number of
additional cleanups are introduced.

For SC8280XP GICv3 ITS is wired up for PCIe. EAS properties ad
introduced. A PS_HOLD-based restart node is introduced and acts as a
fallback if other mechanisms are unavailable to restart the board.
QFPROM is described, missing LMH interrupts for thermal pressure are
added. The TCSR download mode register is added, to allow configuring
if download mode should be entered on a crash.

USB Type-C handling is introduce for Fairphone FP3 as well.

On SM6350 crypto engine and DisplayPort controllers are introduced.

WiFi is enabled on the SM8150 Hardware Development Kit (HDK)

USB PD properties are added on Xiaomi Mi Pad 5 Pro devices.

Interconnect paths are added for UFS on SM8350, to ensure the bus is
voted for when the controller is operating.

On SM8550 the DMA coherency properties are corrected for SMMU and a few
consumers. Missing DWC3 quirks are added and the SNPS PHY parameters are
adjusted. Fastrpc banks are marked non-secure as needed.

The GPU description is introduced on SM8650, and enabled on the QRD. A
missing reserved-memory node is added, as is a few missing fastrpc
compute banks, and the non-secure-domain flag for other banks.

On X1 Elite SPMI support is added, together with PMIC definitons. The
link properties for DP3 are corrected, and audio-related resets are
introduced. SoundWire properties are corrected.

Nodes describing the PCIe bridge under the host controller is added
for a bunch of platforms.

The GPIO carrying orientation information for USB Type-C is added across
Fairphone 5, Lenovo Flex 5G, Lenovo Thinkpad X13s, SM8350 and SM845
HDKs.

A few dtbTool-specific compatibles for msm8916 is dropped from the
bindings.

A number of DeviceTree binding validation issues are corrected.

* tag 'qcom-arm64-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (110 commits)
  dt-bindings: arm: qcom: Add Samsung Galaxy S5 China (kltechn)
  arm64: dts: qcom: qrb4210-rb1: add firmware-name qualifier to WiFi node
  arm64: dts: qcom: qrb2210-rb1: add firmware-name qualifier to WiFi node
  arm64: dts: qcom: ipq6018: Add PCIe bridge node
  arm64: dts: qcom: ipq8074: Add PCIe bridge node
  arm64: dts: qcom: msm8996: Add PCIe bridge node
  arm64: dts: qcom: sc8180x: Add PCIe bridge node
  arm64: dts: qcom: qcs404: Add PCIe bridge node
  arm64: dts: qcom: sc7280: Add PCIe bridge node
  arm64: dts: qcom: msm8998: Add PCIe bridge node
  arm64: dts: qcom: sc8280xp: Add PCIe bridge node
  arm64: dts: qcom: sa8775p: Add PCIe bridge node
  arm64: dts: qcom: sm8650: Add PCIe bridge node
  arm64: dts: qcom: sm8550: Add PCIe bridge node
  arm64: dts: qcom: sm8450: Add PCIe bridge node
  arm64: dts: qcom: sm8350: Add PCIe bridge node
  arm64: dts: qcom: sm8150: Add PCIe bridge node
  arm64: dts: qcom: sdm845: Add PCIe bridge node
  arm64: dts: qcom: sm8250: Add PCIe bridge node
  arm64: dts: qcom: sdm845-db845c: make pcie0_3p3v_dual always-on
  ...

Link: https://lore.kernel.org/r/20240427175951.1439887-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 16:43:52 +02:00
Arnd Bergmann
80a02b1763 Qualcomm Arm32 DeviceTree updates for v6.10
The QCA8074 PHY package found in IPQ4019 is properly described.
 
 The Sony Xperia Z2 Tablet is cleaned up and improved, vibrator support
 is added, upon support for Sony Xperia Z3 is added.
 
 Also based on MSM8974, support for Samsung Galaxy S5 China is introduced.
 The WiFi board type is added for these "klte" Samsung devices, to select
 appropriate NVRAM firmware file.
 
 Based on MSM8226, support for Motorola Moto G (2013) is added.
 
 Nodes representing the PCIe bridges under existing controllers are added
 for APQ8064, IPQ4019, IPQ8064, and SDX55.
 
 A number of fixes throughout to improve compliance with DeviceTree
 bindings.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmYtKW4VHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FPiMP/jycFJVF5Sb6rG2PcZsziU61pKuJ
 8e98uHzQAh8WNqWbK0J0n9zZVHfHmk6+uBLNechwq9vOwvokLbD9DtdhcO7bvnj3
 HsQXaiPFkGdBNuKYOkdN5ZQ/3JTWRlQZhYMOp6JMetbUVEtgvN+rWDxfSwWFeIzW
 XmFmOzUCeUipQ6SqLbOVq0PnNd+7W89w/UzhTKtC/NHS1nZEpmpmovcKl2Vwqr9Z
 GIf8vIxH1FfokFZK1VeNvePpMBJh85OX8jzAhc9HPp6y2FNkg/H0dcnEO3263/Bn
 WoRAQ2LDMnIHa4mf4nYiD4Wk8vnTw8/RtmzqUmvKQ/NRsHHzxJux7ec7tTAwHqBV
 jZtcoM0CIRAr/HtbZfxL88pDZA5QvUWxcfefnruq63eLPg62feMhyDxYdFZQJTGh
 JqVGSpr6WvW4SAiJRI6XAIvLBDoRkhw/W4d8M+ClszPi+lHiGsqiSKSsQ7Hab1hO
 cCaPABCdZ3f/8HlB6vpAuYrzCSjblR8+6ns2cb616/1uGt58I4NKPUkJ/zF5Us5P
 4gokYhkkVIw2pwlA5esq0J4beOA+ku2ROJB9XOXp88ZixTJXicyGA4w1eLt6yumn
 AoD7w30jzCCw141O6a7BY5S4UtIc5GPcnYwGjJQ/Imqzqi2C6PfVbQ2nJsrH26QG
 lco6AtcNSBSVQPN4
 =qXDI
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvr84ACgkQYKtH/8kJ
 Uifqyg/+N8lf8fxN1I6jcE7j1rUvEX0s6VypN8YfQfFZVI4v5qfjCwRUFs19sDF1
 7ItBUXIJTQvvC7N8u1WuvfsJ8FvAdeJ2+xC0KkyYFvu7PIpxvi8nEOyY7OV0bjLa
 cUXGlKfk4Dsb5ohUvkS7ELK1LsS0rEWIJskrjIuD0I960joSP9fgE3GUs+cRw6Wy
 TesK4H+0mztkgNDCIIBp1XHUgt6LFVrFxJ5wo8WYlwP+QKYcmtlMpYAdpHzJk3Wu
 ZAMGXY2MxzqCX1GTPzCFHYjoDRaVoMMVREmSvqy7121ZhxpQ4L1o6Z47YvgbzAE8
 weGXhAZrYKXpjrUo0UBm8fidob2RGfAOjt5AaKBbtUsldDkL9CNZMfscV+hQjHg9
 ooeLGVrWSs8wbIcPO/IPbCESLwpsGuH938csWVZ+HApoRe3Vv521WnRP9Tam7Ua2
 ST6I9VQ4bJT5v2oXTLNNHGA6qUvOXfbXd9hnMBe/qt631btxkmqCnY6FkoMUJgmD
 fH3Fcq/01TJjJcO7cnh0ygfNDScQ9E3WjC/IIG1MToFEMJRq948Egcw/Eqolh4g6
 uqTpDTyo5R+/kQki+7gD/2Qebljci4hCcMebOSji6nBRwkyJHKyh0c7TXsEkltfX
 1vyPkLZepa3xl4N/wDYl+XRiVwz340Qh1hJYH09Y36GwMHENxGc=
 =ejIZ
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm32-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt

Qualcomm Arm32 DeviceTree updates for v6.10

The QCA8074 PHY package found in IPQ4019 is properly described.

The Sony Xperia Z2 Tablet is cleaned up and improved, vibrator support
is added, upon support for Sony Xperia Z3 is added.

Also based on MSM8974, support for Samsung Galaxy S5 China is introduced.
The WiFi board type is added for these "klte" Samsung devices, to select
appropriate NVRAM firmware file.

Based on MSM8226, support for Motorola Moto G (2013) is added.

Nodes representing the PCIe bridges under existing controllers are added
for APQ8064, IPQ4019, IPQ8064, and SDX55.

A number of fixes throughout to improve compliance with DeviceTree
bindings.

* tag 'qcom-arm32-for-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (22 commits)
  ARM: dts: qcom: msm8974: Add DTS for Samsung Galaxy S5 China (kltechn)
  ARM: dts: qcom: msm8974-klte-common: Pin WiFi board type
  ARM: dts: qcom: msm8974: Split out common part of samsung-klte
  ARM: dts: qcom: sdx55: Add PCIe bridge node
  ARM: dts: qcom: apq8064: Add PCIe bridge node
  ARM: dts: qcom: ipq4019: Add PCIe bridge node
  ARM: dts: qcom: ipq8064: Add PCIe bridge node
  ARM: dts: qcom: msm8974-sony-shinano: Enable vibrator
  ARM: dts: qcom: ipq4019: add QCA8075 PHY Package nodes
  ARM: dts: qcom: Add support for Motorola Moto G (2013)
  dt-bindings: arm: qcom: Add Motorola Moto G (2013)
  ARM: dts: qcom: msm8974: Add empty chosen node
  ARM: dts: qcom: msm8974: Add @0 to memory node name
  ARM: dts: qcom: Add Sony Xperia Z3 smartphone
  ARM: dts: qcom: msm8974-sony-castor: Split into shinano-common
  ARM: dts: qcom: msm8916: idle-state compatible require the generic idle-state
  ARM: dts: qcom: include cpu in idle-state node names
  ARM: dts: qcom: msm8974pro-castor: Rename wifi node name
  ARM: dts: qcom: msm8974pro-castor: Add debounce-interval for keys
  ARM: dts: qcom: msm8974pro-castor: Remove camera button definitions
  ...

Link: https://lore.kernel.org/r/20240427163625.1432458-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 16:33:50 +02:00
Arnd Bergmann
b0a1bb4668 - new boards: RG35XX 2024, RG35XX-Plus, RG35XX-H
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCZiz8WAAKCRB0Ba7+DO8k
 k5GQAQCLGgZz+0KkH1O/nSNhgdkt7Wwv1KgontoCGGLSyiidUwD+L/CNvy5+w9EJ
 JMkyJJ+W3+NYBjdqX0kl1X2KFQWqkA4=
 =6QJc
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvr5oACgkQYKtH/8kJ
 UifdAhAAr5GYXQxnaYcZVOLGJRlipN/wGralpp15MJCycoajCGybG60xbIpkEoPQ
 BhY/x97ng9vRHkX2y5g1gGqs02lnan9pqj0YUzoohb2RrEvn2MpfSDbqxqR/d9Ht
 iWM594elw+c+6NAwQ+qzRD7fHx7ghDlph4FazibMFX8jhWP4ZpoEpATPBT6hkOiK
 yGekynxXfgRIGMQA2Q+sHjLhQiPTwvhFaIwNxLn1m73wPaJCf/fGxcVuFNpaqSQT
 lhspKJttVV5WV3yKChOQAPrY4WyNy0WAfgtcTwQYlt2nbACktya/VtoS3KbAhb9E
 lczHm1RBHbJmQuTxurV0bS0oSyAAiWbo77FwYxt7ms3ZiLEghORUeukVydlT0AdU
 sqoyjQ/36PRynXlDGaFtDHqmJRIzknldRmugFLyTd8mN3Z+bwXujMi1rwqmj213F
 uYgE/MWjEwEQDaT/ONqmTlo5e21wUz/WYeu2rugeU7PSoM4arRa+rTlP+OXaUSPD
 lkX1ALsj1b85oh7S/MwFEBgr83mHDQr497CV+y2JNsL3Yly0K6YKoWEx5AMbomrK
 PFYL18mD182UZxTAWCGzwU/nco21S7Haz4tzENKpHDAi/Eo6wInJNFGi4gjMlhX6
 XVDZeZGSLdAQp+ZlVCjzZAXeWmSSK64AmlpnptjEFT64efIM2X8=
 =gAnJ
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-for-6.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt

- new boards: RG35XX 2024, RG35XX-Plus, RG35XX-H

* tag 'sunxi-dt-for-6.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: h700: Add RG35XX-H DTS
  arm64: dts: allwinner: h700: Add RG35XX-Plus DTS
  arm64: dts: allwinner: h700: Add RG35XX 2024 DTS
  dt-bindings: arm: sunxi: document Anbernic RG35XX handheld gaming device variants

Link: https://lore.kernel.org/r/20240427133006.GA146501@jernej-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 16:32:58 +02:00
Arnd Bergmann
d4c74f6b02 arm64: tegra: Changes for v6.10-rc1
Adds the Security Engine devices found on Tegra234 and fixes RTC aliases
 by referencing them by label rather than path so that errors can be
 detected more easily.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmYr510ACgkQ3SOs138+
 s6GTCxAArVX27tDZoDRKuz4RYD2PYsZGynlRLOMuqgEASUEO6Caoy9S4U255Z1CC
 Z/jFGB9EKmCzOnwxbnYFRO3aNO0ITlnYTddr3GIjpsSQ65pJsvzm4MWnJO50IZIw
 QW5+jMvWHhRWGASwK/vdFm+Ii2COZgSowZl6QFZr3smebroDJHm4+GYZk5gmk76d
 QrK1MhtRLF05gRD+eVWt0p3JWPVMQ0d25hvCcWcCHrPVqaH+edUmpfh4qpIrKCvn
 bZGPYjuTPlW1YZq5FPc8ifINY/DpObz+yIvN4QtfDmmCwNtZp6HFtB7i1DVa+07q
 Ji3nd0+AhJnCWklTy5vgts4YHeyQWz8k/1U1rx+4bHxIXSwiXPZmFRxN86lkZ2dF
 aebAL/yWRse2KeRQZxaA2rkzZu4Ym7U5mvb0AOrrwV0Yhrnzswt3gWk5i2V3kZdm
 oZZEO5Kq9jgT8TJ5W7D8ZhK5HhRTkGpFIAdzN3euQuZzU39S73XSLIMRFWAXdMzc
 Jn9m14tw87KPNXrHBLugmFr0ed4DnvAGbdOezORNgQhceyD2YTrHkfmXw54KmWjk
 h8PPvulVEILsgx+RyNjub/vxUnI8lIfkas3XazWY/GCLwgj9QlexAPi8XC00RsbI
 tV31jWk59A3jpwZYcXfxr9iMAWJH0uprPkJQ8RdHFkIHj0HltLc=
 =Lfbf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvr1MACgkQYKtH/8kJ
 UieLwg//XtGEkMIZep9unJSuSTUp7zsaj+UFTtUSeoX09X/0/p1/VeiROY9iAJQE
 9ZLcv4mbxaWjBX1W8YRRL8UuMOLr+ZAZUQzVy5lgt9iqTtuZev0eIsdOLGk8jVe+
 bUsxKDxkHp6SpIuAxrRrjUEELXQ79dZ5BEBBZsA2BOjtaljSq3Yeuvcyr99smkoK
 UI1Xs+NgIhvsPzEopEP17GsHLEsxrdbS+9/eJ6yyLEzNSZ7bzJnTSok3YU+4xWVa
 uFXcP+H6vM2zIWIkh3gMRGISdEA0CljPPYwEASI/m/tYFEzFjhsdSWQyhtMs+Wu0
 c33EKC62l4H5nKuG/+X8G37RO83aIQSNPs22p5kC7zCddPJt+witzGbvQbj/yZF+
 TsBA+i8Nldbpe9B0PVx6hqXZbKroU1C7rW1NIcGuEE+Xnsi5ldg7zX95OqWmzok1
 XSmiqRkKvJrG4K/hH/9FquOdUG1Eo/G5mXwoTULY6b12ZPFAuY8phaDy2QLpjR4a
 e7ry7gCZdON4Ax0sy0/QfYlr9WWbVdvfGRLhAKDcWdWEnu1ab2tEJ/3VkhSPO4l0
 lwW743d9kCykD5A7+AWRFRWTUY8RT/jjicuKMNmwBZHvhVLDxRRre0LyK+27EYS1
 c/MXywH5JnU8d4rL38EQvbVoD9+vDPk2UEWtOK4w0OwVrXGRPlo=
 =BoMz
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.10-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt

arm64: tegra: Changes for v6.10-rc1

Adds the Security Engine devices found on Tegra234 and fixes RTC aliases
by referencing them by label rather than path so that errors can be
detected more easily.

* tag 'tegra-for-6.10-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: Add Tegra Security Engine DT nodes
  arm64: tegra: Correct Tegra132 I2C alias

Link: https://lore.kernel.org/r/20240426180519.3972626-4-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 16:31:47 +02:00
Arnd Bergmann
44923d845d ARM: tegra: Changes for v6.10-rc1
Adds support for EMC frequency scaling on PAZ100 devices with RAM code 1
 and cleans up deprecated device tree properties.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmYr5sQACgkQ3SOs138+
 s6FM+BAAjL0Sm9CoiicDYjJffzBNKkL5xlpZItZ+5d/eE7Y6Jhip3FTKsH+Zhe53
 NWcBXkT4jbnvEzlzWM2RbG5bAhDhdOqjFdnmSI+/5kJ7RGO5YtYAy6JPacppuekm
 thETddwzhpjtrpvsUE66NeFI6nmpXwrYO6Sldo9B8psNBOPq2WthZOTT6saBUdUg
 yKD8lIb+j8WnaDtMHpGoE87Vz8s+B1oXq+WRGc4SwzFbFBDrnjjf2XExmnqI30tT
 /cMVHxGGLZyB3fmo5t5/bT8eO2+pjaWTQW+vrozE8fVfxnKYRvMhCKnDA9vq2rKE
 h7VOt/T+xoeCgzndNpbs/TiYPVOcdXma/u4Xy2Q/kb4AusJdrdWtqCazV4fXxIED
 v67JShPLqWium6Yz3sf+pYZ8jHPdLDrKLUTNY8/VfJIwr4JqXISF+Xn018797XL9
 /cRng0cwtk5Vt3uoOELDXCFze0j/Xl5LfELqFg15n5cfmd9Nj3W9unQe8zOsW6yw
 oykSyJqfygG+tEytLyo7oy7zj2On7Unv/tfIyooxGUmuBHNMUak4ghLpq4xMKz+x
 ikPJMQewJunF6ChbJcSst/2oNShPOYCc6GB3rcDOQqASTGnogmVkNMkRshfK17dP
 oy2Ut7hUJk6bTUK9CvjKaazZc9sHBh8PYBfcl8/A6+Knj07THY4=
 =OlXA
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvrysACgkQYKtH/8kJ
 Uifx7BAAyVZbjy7825IWQJe9Kg/H5MoZg1RgY57RjkPhdZoEFUsOM2+vML//ZxF/
 kvzdAUPKx6GP/82MNlTcSThdpHuGaQshiDYOuk6WYGAJkhpKGih6Ys4SW3uTHFa8
 smjrzlp09JnUPcuMAtVRPBgkp5XGUM7Se8KSMMsziLotTbRcDN2v2kPkxvndnvJU
 pb3tCvHSubIiJnFNw/5Giv3e5hP3+NuFNqhnPX90mNKqmA/UnknGpXmnXGZyYwLl
 3PmGXYzoxmZ9gXsc24Co6dDE48b0g62UtWIKJz56a5R/e5wLVhyTHGpw/MM0C38U
 QtnIhXV81FMIPzSo81MF7M+9bYt6RX9yzFj/084uNOBfu8Om98cRCJ/SDnJbW9p5
 ZBt+NCQVLi8bHt5yoF+C+Qb0fhPK6/PRjbuYiXLE9IkiwtTV+ldlGDXgQGvJHoPB
 zItLV/h6QQSW2jEUNAiH8IEHT/kns73u8BUEGMmVQP89q5DyGNIattxOLkj8VpVv
 tm5VvKFuCUZ1jSF0jly0KeFvbgjRbDVisDsWaFPeVhBtJlUfzrmwIKqEUTEOxCvE
 MP1DYXpiYkLz8df9+VF0E0VtXNVakpan1yq6K+qM+UM7VRkzhui9Fzm+SX33DeQo
 mqfsJ2oWmybG34Vhn9cwm5/8/EUX2XGolbukPFDIjTC+0uhxveI=
 =+joY
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.10-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt

ARM: tegra: Changes for v6.10-rc1

Adds support for EMC frequency scaling on PAZ100 devices with RAM code 1
and cleans up deprecated device tree properties.

* tag 'tegra-for-6.10-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  ARM: tegra: tegra20-ac97: Replace deprecated "gpio" suffix
  ARM: tegra: paz00: Add emc-tables for ram-code 1

Link: https://lore.kernel.org/r/20240426180519.3972626-3-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 16:31:07 +02:00
Arnd Bergmann
83c9697436 dt-bindings: Changes for v6.10-rc1
Included is one change that adds the dma-coherent flag to the device
 tree json-schema for host1x on Tegra194 and Tegra234.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmYr5nQACgkQ3SOs138+
 s6HimhAAoCYt50NuL1A2nQwzlz/EaW9MoWef2r9Q5X9rk5nfXeGWhv35ANndDnVo
 OuvnQ7Hh96jk3N3BER7EUnbTT4lRypmzelUBoEv0FTHWfPQGgnXezlP3hj+HeKG0
 rAL7IZ6SUaiFOHQFjXzYT1Y998WrZeauXW6V408jeBMrzX4T6qeanVSbQ3TIr+ev
 lQE9U3ir3/KbcxKIeQttsr7Y1DNFQWKZHHIN5UL3ZsBsoA8VxE7nFGl3TykMgF5R
 wZBn8Iso6uSwZ7zMUcQpyCnjVlNSlWFA/UIHGZWRAUWDVrmr7Cjh3r8fV0Lb2UiY
 3YoZGbp9Rn5oYSp73RC3FDvXuI5jKzqb1cat1DXTHA9MewZevoAbIS63hiRz7g25
 J+SiNgIlqtm8FaRTcboMXRkhD04ofZxT3LoiPk2bJFcBRVA+c6xKHEYVnyKt5RS8
 QyAu+0Vpwdrq26sQYrAORXke/5MRSsmoy0Gz+uvxO8h1yFRu+ppfzRap5t2Yvx9o
 dvvsgUYMvkWW054F12hJf/oSpClHi5hI3hZhKqguxLOOyvU8EZheZE2kPK4nuLlr
 VMFxU0EULTtWE7z4X1zznMVVGQfaRXA5uPOI8L1EkSaXT9N2V156Kc5I91AqREi/
 oYPNsyhnxqbHYQNgPq3bwowQUcqV/KYIjfVeIEAD6FsQOzP6S5w=
 =jXQu
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvrvgACgkQYKtH/8kJ
 UifJJg//bPFr8PCaHqhRi8Q5KQEG+cAo2WPADOYPQzi0bkBXxUZIqTWt4mi2Ct7n
 v844iGrrnxjjIvF+RDyzDKkF85CZLCXSQD80vo9VXJm6Yp57NBAhAwG/aGM+xdF+
 HMV4dkjdNJtJ4c4wuFQtrfFsYk81lvP3ZuRP26XsVWqR66kyAm//WAhHhcEJEO0L
 de0vpeIaIS9wTxGTCjE82oBbtnUedDaZEkWjBKCMPsqCXJT6m/6W3Y7/jhi0S6OQ
 g3h/vwtUjFGeZ0Yzl/Z/wCNv8WZhxFaEp8Ifes1oVVgBzEw/lbhA3cRMoMMhO2hl
 gAeXXBOahzdYF50hY93qoC8ho5ZlQ1nEtQOKgbBAHDYyN4LU6uDZ1xppa3bbBkin
 Sgc9U76Y2zO73F+itdoBbrrJa2UXVB9sUEeMD80F4AIGm6sRVUJ+9OIzNNaE7awQ
 /UAILr3HEuVFJvYhNT1nAr4EbL9FxCyE+FVTZGOHoEHY5MViUt39suzwpj1EE72j
 N1+IDR98omCdva/Ul0XNY+VGiBiND+j7vAo9/zQHomj3VSJ6+2s4WmP9IdEVnfhn
 8lCg7OStf3JkQvlhOLD6XxzoNywvqAQiDhhxSag7J2dprfna3A9PGv2jsn8JWySm
 9Z3f+r3qhf2HM/cFRYdlwbQrRRx2hN5fV0VLnEbryapRSMtVJNA=
 =lDsr
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.10-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt

dt-bindings: Changes for v6.10-rc1

Included is one change that adds the dma-coherent flag to the device
tree json-schema for host1x on Tegra194 and Tegra234.

* tag 'tegra-for-6.10-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  dt-bindings: display: tegra: Allow dma-coherent on Tegra194 and later

Link: https://lore.kernel.org/r/20240426180519.3972626-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 16:30:15 +02:00
Shekhar Chauhan
bb442bfb9b drm/xe/xe2hpg: Add Wa_14021490052
Add Wa_14021490052 for Xe2HPG 20.01.

Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240424034247.1352755-1-shekhar.chauhan@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-04-29 07:04:39 -07:00
David Howells
120b878158 netfs: Use subreq_counter to allocate subreq debug_index values
Use the subreq_counter in netfs_io_request to allocate subrequest
debug_index values in read ops as well as write ops.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
2024-04-29 15:01:44 +01:00
David Howells
93bf1cc009 netfs: Make netfs_io_request::subreq_counter an atomic_t
Make the netfs_io_request::subreq_counter, used to generate values for
netfs_io_subrequest::debug_index, into an atomic_t so that it can be called
from the retry thread at the same time as the app thread issuing writes.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
2024-04-29 15:01:43 +01:00
David Howells
ae678317b9 netfs: Remove deprecated use of PG_private_2 as a second writeback flag
Remove the deprecated use of PG_private_2 in netfslib.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: Matthew Wilcox (Oracle) <willy@infradead.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
2024-04-29 15:01:43 +01:00
David Howells
2e9d7e4b98 mm: Remove the PG_fscache alias for PG_private_2
Remove the PG_fscache alias for PG_private_2 and use the latter directly.
Use of this flag for marking pages undergoing writing to the cache should
be considered deprecated and the folios should be marked dirty instead and
the write done in ->writepages().

Note that PG_private_2 itself should be considered deprecated and up for
future removal by the MM folks too.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: Matthew Wilcox (Oracle) <willy@infradead.org>
cc: Ilya Dryomov <idryomov@gmail.com>
cc: Xiubo Li <xiubli@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.com>
cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
cc: Shyam Prasad N <sprasad@microsoft.com>
cc: Tom Talpey <tom@talpey.com>
cc: Bharath SM <bharathsm@microsoft.com>
cc: Trond Myklebust <trond.myklebust@hammerspace.com>
cc: Anna Schumaker <anna@kernel.org>
cc: netfs@lists.linux.dev
cc: ceph-devel@vger.kernel.org
cc: linux-cifs@vger.kernel.org
cc: linux-nfs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
2024-04-29 15:01:42 +01:00
David Howells
2ff1e97587 netfs: Replace PG_fscache by setting folio->private and marking dirty
When dirty data is being written to the cache, setting/waiting on/clearing
the fscache flag is always done in tandem with setting/waiting on/clearing
the writeback flag.  The netfslib buffered write routines wait on and set
both flags and the write request cleanup clears both flags, so the fscache
flag is almost superfluous.

The reason it isn't superfluous is because the fscache flag is also used to
indicate that data just read from the server is being written to the cache.
The flag is used to prevent a race involving overlapping direct-I/O writes
to the cache.

Change this to indicate that a page is in need of being copied to the cache
by placing a magic value in folio->private and marking the folios dirty.
Then when the writeback code sees a folio marked in this way, it only
writes it to the cache and not to the server.

If a folio that has this magic value set is modified, the value is just
replaced and the folio will then be uplodaded too.

With this, PG_fscache is no longer required by the netfslib core, 9p and
afs.

Ceph and nfs, however, still need to use the old PG_fscache-based tracking.
To deal with this, a flag, NETFS_ICTX_USE_PGPRIV2, now has to be set on the
flags in the netfs_inode struct for those filesystems.  This reenables the
use of PG_fscache in that inode.  9p and afs use the netfslib write helpers
so get switched over; cifs, for the moment, does page-by-page manual access
to the cache, so doesn't use PG_fscache and is unaffected.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: Matthew Wilcox (Oracle) <willy@infradead.org>
cc: Eric Van Hensbergen <ericvh@kernel.org>
cc: Latchesar Ionkov <lucho@ionkov.net>
cc: Dominique Martinet <asmadeus@codewreck.org>
cc: Christian Schoenebeck <linux_oss@crudebyte.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Ilya Dryomov <idryomov@gmail.com>
cc: Xiubo Li <xiubli@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.com>
cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
cc: Shyam Prasad N <sprasad@microsoft.com>
cc: Tom Talpey <tom@talpey.com>
cc: Bharath SM <bharathsm@microsoft.com>
cc: Trond Myklebust <trond.myklebust@hammerspace.com>
cc: Anna Schumaker <anna@kernel.org>
cc: netfs@lists.linux.dev
cc: v9fs@lists.linux.dev
cc: linux-afs@lists.infradead.org
cc: ceph-devel@vger.kernel.org
cc: linux-cifs@vger.kernel.org
cc: linux-nfs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
2024-04-29 15:01:42 +01:00
David Howells
5f24162f87 netfs: Update i_blocks when write committed to pagecache
Update i_blocks when i_size is updated when we finish making a write to the
pagecache to reflect the amount of space we think will be consumed.

This maintains cifs commit dbfdff402d ("smb3:
update allocation size more accurately on write completion") which would
otherwise be removed by the cifs part of the netfs writeback rewrite.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: Steve French <sfrench@samba.org>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
2024-04-29 15:01:42 +01:00
Michael Ellerman
dda32e37d3 selftests/powerpc: Install tests in sub-directories
The sources for the powerpc selftests are arranged into sub-directories.
However when the tests are built and installed, the sub-directories are
squashed, losing the structure.

For example, with the current code the result of installing the selftests is:

  $ tree tools/testing/selftests/kselftest_install
  tools/testing/selftests/kselftest_install
  ├── kselftest
  │   ├── ktap_helpers.sh
  │   ├── module.sh
  │   ├── prefix.pl
  │   └── runner.sh
  ├── kselftest-list.txt
  ├── powerpc
  │   ├── alignment_handler
  │   ├── attr_test
  │   ├── back_to_back_ebbs_test
  │   ├── bad_accesses
  │   ├── bhrb_filter_map_test
  │   ├── bhrb_no_crash_wo_pmu_test
  │   ├── blacklisted_events_test
  │   ├── cache_shape
  │   ├── close_clears_pmcc_test
  │   ├── context_switch
  │   ├── copy_first_unaligned
  ...
  │   ├── settings
  ...
  │   └── wild_bctr
  └── run_kselftest.sh

All the powerpc tests are squashed into the single powerpc directory. In
particular, note that there is a single `settings` file, even though
there are multiple settings files in the powerpc selftest sources. One
of the settings files ends up installed, depending on install order,
even if they have different contents.

Similarly if there were two tests with the same name in different
sub-directories they would clobber each other.

Fix it by replicating the directory structure of the source tree into
the install directory. The result being for example:

  $ tree tools/testing/selftests/kselftest_install
  tools/testing/selftests/kselftest_install
  ├── kselftest
  │   ├── ktap_helpers.sh
  │   ├── module.sh
  │   ├── prefix.pl
  │   └── runner.sh
  ├── kselftest-list.txt
  ├── powerpc
  │   ├── alignment
  │   │   ├── alignment_handler
  │   │   └── copy_first_unaligned
  │   ├── benchmarks
  │   │   ├── context_switch
  │   │   ├── exec_target
  │   │   ├── fork
  │   │   ├── futex_bench
  │   │   ├── gettimeofday
  │   │   ├── mmap_bench
  │   │   ├── null_syscall
  │   │   └── settings
  ...
  │   ├── eeh
  │   │   ├── eeh-basic.sh
  │   │   ├── eeh-functions.sh
  │   │   └── settings
  ...
  │   └── vphn
  │       └── test-vphn
  └── run_kselftest.sh

Note multiple settings files in different sub-directories.

This change also has the effect of changing the names of the tests from
the point of view of the kselftest runner. Before the tests are named
eg:

  powerpc:copy_first_unaligned
  powerpc:cache_shape
  powerpc:reg_access_test

After, the test collection names include the sub-directory:

  powerpc/alignment:copy_first_unaligned
  powerpc/cache_shape:cache_shape
  powerpc/pmu/ebb:reg_access_test

That means whereas previously all powerpc tests could be run with:

  $ ./run_kselftest.sh -c powerpc

After the change it's necessary to pass a regex that matches all powerpc
entries, eg:

  $ ./run_kselftest.sh -c "powerpc.*"

The latter form also works before and after the change.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240422133453.1793988-2-mpe@ellerman.id.au
2024-04-29 23:54:43 +10:00
Michael Ellerman
822a04957c selftests/powerpc: Convert pmu Makefile to for loop style
The pmu Makefile has grown more sub directories over the years. Rather
than open coding the rules for each subdir, use for loops.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240422133453.1793988-1-mpe@ellerman.id.au
2024-04-29 23:54:43 +10:00
Madhavan Srinivasan
108e5e6833 selftests/powerpc: make sub-folders buildable on their own
Build breaks when executing make with run_tests for sub-folders
under powerpc. This is because, CFLAGS and GIT_VERSION macros are
defined in Makefile of toplevel powerpc folder.

  make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/mm'
  gcc     hugetlb_vs_thp_test.c ../harness.c ../utils.c  -o /home/maddy/selftest_output//hugetlb_vs_thp_test
  hugetlb_vs_thp_test.c:6:10: fatal error: utils.h: No such file or directory
      6 | #include "utils.h"
        |          ^~~~~~~~~
  compilation terminated.

Fix this by adding the flags.mk in each sub-folder Makefile. Also remove
the CFLAGS and GIT_VERSION macros from powerpc/ folder Makefile since
the same is definied in flags.mk

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240229093711.581230-3-maddy@linux.ibm.com
2024-04-29 23:54:42 +10:00
Alex Volkov
9789ea6ab6 media: IR remote control for AVerMedia TD310
Uses NEC defaults as other non-eeprom devices.

Link: https://lore.kernel.org/linux-media/2273969.FyfRTN5kjP@bootes
Signed-off-by: Alex Volkov <alex@bootes.sytes.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-04-29 14:53:50 +01:00
Madhavan Srinivasan
5553a79387 selftests/powerpc: Add flags.mk to support pmu buildable
When running `make -C powerpc/pmu run_tests` from top level selftests
directory, currently this error is being reported:

  make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/pmu'
  Makefile:40: warning: overriding recipe for target 'emit_tests'
  ../../lib.mk:111: warning: ignoring old recipe for target 'emit_tests'
  gcc -m64    count_instructions.c ../harness.c event.c lib.c ../utils.c loop.S  -o /home/maddy/selftest_output//count_instructions
  In file included from count_instructions.c:13:
  event.h:12:10: fatal error: utils.h: No such file or directory
  12 | #include "utils.h"
    |          ^~~~~~~~~
  compilation terminated.

This is due to missing of include path in CFLAGS. That is, CFLAGS and
GIT_VERSION macros are defined in the powerpc/ folder Makefile which
in this case is not involved.

To address the failure in case of executing specific sub-folder test
directly, a new rule file has been addded by the patch called "flags.mk"
under selftest/powerpc/ folder and is linked to all the Makefile of
powerpc/pmu sub-folders.

Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
[mpe: Fixup ifeq, make GIT_VERSION simply expanded to avoid re-executing git describe]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240229093711.581230-2-maddy@linux.ibm.com
2024-04-29 23:53:01 +10:00
Julia Lawall
6c688cf34c media: atomisp-mt9m114: adjust macro parameter name
The macro parameter name, sd, captures the field name in the third
argument of container_of.  Fortunately, the argument at all uses is
actually sd.  But change the macro parameter name anyway, for a little
added safety.

Link: https://lore.kernel.org/linux-media/20230315090904.20092-1-Julia.Lawall@inria.fr
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-04-29 14:51:36 +01:00
Madhavan Srinivasan
37496845c8 selftests/powerpc: Re-order *FLAGS to follow lib.mk
In some powerpc/ sub-folder Makefiles, CFLAGS are defined before lib.mk
include. Clean it up by re-ordering the flags to follow after the mk
include. This is needed to support sub-folders in powerpc/ buildable on
its own.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240229093711.581230-1-maddy@linux.ibm.com
2024-04-29 23:51:16 +10:00
Lidong Zhong
29247de4ad powerpc/pseries/vio: Don't return ENODEV if node or compatible missing
We noticed the following nuisance messages during boot process:

  vio vio: uevent: failed to send synthetic uevent
  vio 4000: uevent: failed to send synthetic uevent
  vio 4001: uevent: failed to send synthetic uevent
  vio 4002: uevent: failedto send synthetic uevent
  vio 4004: uevent: failed to send synthetic uevent

It's caused by either vio_register_device_node() failing to set
dev->of_node or the node is missing a "compatible" property. To match
the definition of modalias in modalias_show(), remove the return of
ENODEV in such cases. The failure messages is also suppressed with this
change.

Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240411020450.12725-1-lidong.zhong@suse.com
2024-04-29 23:51:16 +10:00
Nathan Lynch
ff2e185cf7 powerpc/pseries: Enforce hcall result buffer validity and size
plpar_hcall(), plpar_hcall9(), and related functions expect callers to
provide valid result buffers of certain minimum size. Currently this
is communicated only through comments in the code and the compiler has
no idea.

For example, if I write a bug like this:

  long retbuf[PLPAR_HCALL_BUFSIZE]; // should be PLPAR_HCALL9_BUFSIZE
  plpar_hcall9(H_ALLOCATE_VAS_WINDOW, retbuf, ...);

This compiles with no diagnostics emitted, but likely results in stack
corruption at runtime when plpar_hcall9() stores results past the end
of the array. (To be clear this is a contrived example and I have not
found a real instance yet.)

To make this class of error less likely, we can use explicitly-sized
array parameters instead of pointers in the declarations for the hcall
APIs. When compiled with -Warray-bounds[1], the code above now
provokes a diagnostic like this:

error: array argument is too small;
is of size 32, callee requires at least 72 [-Werror,-Warray-bounds]
   60 |                 plpar_hcall9(H_ALLOCATE_VAS_WINDOW, retbuf,
      |                 ^                                   ~~~~~~

[1] Enabled for LLVM builds but not GCC for now. See commit
    0da6e5fd6c ("gcc: disable '-Warray-bounds' for gcc-13 too") and
    related changes.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240408-pseries-hvcall-retbuf-v1-1-ebc73d7253cf@linux.ibm.com
2024-04-29 23:51:16 +10:00
Michael Ellerman
4ccae23609 powerpc/dart: Drop unnecessary call to kmemleak_no_scan()
Erhard reported that kmemleak was showing a warning at boot:

  kmemleak: Not scanning unknown object at 0xc00000007f000000
  CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.0-rc3-PMacG5+ #2
  Call Trace:
   .dump_stack_lvl+0x7c/0xc4 (unreliable)
   .kmemleak_no_scan+0xe0/0x100
   .iommu_init_early_dart+0x2f0/0x924
   .pmac_probe+0x1b0/0x20c
   .setup_arch+0x1b8/0x674
   .start_kernel+0xdc/0xb74
   start_here_common+0x1c/0x44
  DART table allocated at: (____ptrval____)

Which he bisected to a change in kmemleak, commit
23c2d497de ("mm: kmemleak: take a full lowmem check in kmemleak_*_phys()").

Because pmac_probe() is called before mem_topology_setup(), the min/
max PFN variables are still zero. That causes kmemleak_alloc_phys() to
ignore the allocation, because the checks against the PFN fail. Then
kmemleak_no_scan() can't find the allocation and prints warning.

Given that kmemleak_alloc_phys() is ignoring the allocation to begin
with, there's no need to call kmemleak_no_scan() at all, which avoids
the warning.

Reported-by: Erhard Furtner <erhard_f@mailbox.org>
Closes: https://lore.kernel.org/all/bug-216156-206035@https.bugzilla.kernel.org%2F/
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240419115913.3317575-1-mpe@ellerman.id.au
2024-04-29 23:51:16 +10:00
Ganesh Goudar
d1679b4fa1 powerpc/eeh: Permanently disable the removed device
When a device is hot removed on powernv, the hotplug driver clears
the device's state. However, on pseries, if a device is removed by
phyp after reaching the error threshold, the kernel remains unaware,
leading to the device not being torn down. This prevents necessary
remediation actions like failover.

Permanently disable the device if the presence check fails.

Also, in eeh_dev_check_failure in we may consider the error as false
positive if the device is hotpluged out as the get_state call returns
EEH_STATE_NOT_SUPPORT and we may end up not clearing the device state,
so log the event if the state is not moved to permanent failure state.

Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240422075737.1405551-1-ganeshgr@linux.ibm.com
2024-04-29 23:51:15 +10:00
Sourabh Jain
57e6700145 Documentation/powerpc: update fadump implementation details
The patch titled ("powerpc: make fadump resilient with memory add/remove
events") has made significant changes to the implementation of fadump,
particularly on elfcorehdr creation and fadump crash info header
structure. Therefore, updating the fadump implementation documentation
to reflect those changes.

Following updates are done to firmware assisted dump documentation:

1. The elfcorehdr is no longer stored after fadump HDR in the reserved
   dump area. Instead, the second kernel dynamically allocates memory
   for the elfcorehdr within the address range from 0 to the boot memory
   size. Therefore, update figures 1 and 2 of Memory Reservation during
   the first and second kernels to reflect this change.

2. A version field has been added to the fadump header to manage the
   future changes to fadump crash info header structure without changing
   the fadump header magic number in the future. Therefore, remove the
   corresponding TODO from the document.

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240422195932.1583833-4-sourabhjain@linux.ibm.com
2024-04-29 23:51:15 +10:00
Sourabh Jain
bc446c5aca powerpc/fadump: add hotplug_ready sysfs interface
The elfcorehdr describes the CPUs and memory of the crashed kernel to
the kernel that captures the dump, known as the second or fadump kernel.
The elfcorehdr needs to be updated if the system's memory changes due to
memory hotplug or online/offline events.

Currently, memory hotplug events are monitored in userspace by udev
rules, and fadump is re-registered, which recreates the elfcorehdr with
the latest available memory in the system.

However, the previous patch ("powerpc: make fadump resilient with memory
add/remove events") moved the creation of elfcorehdr to the second or
fadump kernel. This eliminates the need to regenerate the elfcorehdr
during memory hotplug or online/offline events.

Create a sysfs entry at /sys/kernel/fadump/hotplug_ready to let
userspace know that fadump re-registration is not required for memory
add/remove events.

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240422195932.1583833-3-sourabhjain@linux.ibm.com
2024-04-29 23:51:15 +10:00
Sourabh Jain
c6c5b14dac powerpc: make fadump resilient with memory add/remove events
Due to changes in memory resources caused by either memory hotplug or
online/offline events, the elfcorehdr, which describes the CPUs and
memory of the crashed kernel to the kernel that collects the dump (known
as second/fadump kernel), becomes outdated. Consequently, attempting
dump collection with an outdated elfcorehdr can lead to failed or
inaccurate dump collection.

Memory hotplug or online/offline events is referred as memory add/remove
events in reset of the commit message.

The current solution to address the aforementioned issue is as follows:
Monitor memory add/remove events in userspace using udev rules, and
re-register fadump whenever there are changes in memory resources. This
leads to the creation of a new elfcorehdr with updated system memory
information.

There are several notable issues associated with re-registering fadump
for every memory add/remove events.

1. Bulk memory add/remove events with udev-based fadump re-registration
   can lead to race conditions and, more importantly, it creates a wide
   window during which fadump is inactive until all memory add/remove
   events are settled.
2. Re-registering fadump for every memory add/remove event is
   inefficient.
3. The memory for elfcorehdr is allocated based on the memblock regions
   available during early boot and remains fixed thereafter. However, if
   elfcorehdr is later recreated with additional memblock regions, its
   size will increase, potentially leading to memory corruption.

Address the aforementioned challenges by shifting the creation of
elfcorehdr from the first kernel (also referred as the crashed kernel),
where it was created and frequently recreated for every memory
add/remove event, to the fadump kernel. As a result, the elfcorehdr only
needs to be created once, thus eliminating the necessity to re-register
fadump during memory add/remove events.

At present, the first kernel prepares fadump header and stores it in the
fadump reserved area. The fadump header includes the start address of
the elfcorehdr, crashing CPU details, and other relevant information. In
the event of a crash in the first kernel, the second/fadump boots and
accesses the fadump header prepared by the first kernel. It then
performs the following steps in a platform-specific function
[rtas|opal]_fadump_process:

1. Sanity check for fadump header
2. Update CPU notes in elfcorehdr

Along with the above, update the setup_fadump()/fadump.c to create
elfcorehdr and set its address to the global variable elfcorehdr_addr
for the vmcore module to process it in the second/fadump kernel.

Section below outlines the information required to create the elfcorehdr
and the changes made to make it available to the fadump kernel if it's
not already.

To create elfcorehdr, the following crashed kernel information is
required: CPU notes, vmcoreinfo, and memory ranges.

At present, the CPU notes are already prepared in the fadump kernel, so
no changes are needed in that regard. The fadump kernel has access to
all crashed kernel memory regions, including boot memory regions that
are relocated by firmware to fadump reserved areas, so no changes for
that either. However, it is necessary to add new members to the fadump
header, i.e., the 'fadump_crash_info_header' structure, in order to pass
the crashed kernel's vmcoreinfo address and its size to fadump kernel.

In addition to the vmcoreinfo address and size, there are a few other
attributes also added to the fadump_crash_info_header structure.

1. version:
   It stores the fadump header version, which is currently set to 1.
   This provides flexibility to update the fadump crash info header in
   the future without changing the magic number. For each change in the
   fadump header, the version will be increased. This will help the
   updated kernel determine how to handle kernel dumps from older
   kernels. The magic number remains relevant for checking fadump header
   corruption.

2. pt_regs_sz/cpu_mask_sz:
   Store size of pt_regs and cpu_mask structure of first kernel. These
   attributes are used to prevent dump processing if the sizes of
   pt_regs or cpu_mask structure differ between the first and fadump
   kernels.

Note: if either first/crashed kernel or second/fadump kernel do not have
the changes introduced here then kernel fail to collect the dump and
prints relevant error message on the console.

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240422195932.1583833-2-sourabhjain@linux.ibm.com
2024-04-29 23:51:15 +10:00