Commit graph

1185234 commits

Author SHA1 Message Date
Paolo Abeni
b9850ec002 netfilter pull request 23-05-03
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEN9lkrMBJgcdVAPub1V2XiooUIOQFAmRSv2sACgkQ1V2XiooU
 IOTSpxAAm9Q1CZZbgVkO/alY7VewfM3va+FxL5oeKKbghhy2vnDRQf4hF6TXkDn6
 Qd3e8WJyBGoRixb92cc/OQjDxTNUJN6oJYAlFh6vJ/xyCzcu0Dg95g4toX00BdZK
 1QWUy6XdClKKDfEXoxWCzv8eEuK+pLh6DB12+x30Jrj8qaRybbXoi3YGnMQf4W7h
 y7xi+/0A84UWwmDySrfj53/DPBV+TkGoP6D1ZyMobhI7d+9crhSP4I5JBtXTWVda
 gf4t2dtSKSBBiQXb/z4eEBXe7KaIPOYoVRUUncnho7N40U+rdpVe9D+VrWsPV271
 8eeiuZqLhJxgxsYP6ytIS8g9ZJ+yYxpGfTtpqG6RE9fI3LXnuzqBut8ggc1Xr5xN
 /kh28DMjgqrFBPLnpfAzU+qJATpaGCD/3sD4R+W4Et9CSK5lH9AyLlYKo6po9I4T
 V1aRxh0yXMuM2BHfpZIaFj3gZxgrKooYFnTFFpdNla5FK7PvjX0jLWVbWoM8Cozv
 f/meZv1WepqoXtb98Vo60T8f1KSsu7GArRuTKtBCajHUgxzHduxUOPYZeNAjuC6h
 4kVF2sAeCR4pDIQIBR555wmV8+tikbK9iHDqdO9Nr3R0t0KWpc8j3YjuVhvswyib
 qFzdUZc65n2aYemkxCs4p9LAEElPj/4TNotOc/zNvPQeuZcJkc4=
 =7FnG
 -----END PGP SIGNATURE-----

Merge tag 'nf-23-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf

Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains one Netfilter fix:

1) Restore 'ct state untracked' matching with CONFIG_RETPOLINE=y,
   from Florian Westphal.

* tag 'nf-23-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
  netfilter: nf_tables: fix ct untracked match breakage
====================

Link: https://lore.kernel.org/r/20230503201143.12310-1-pablo@netfilter.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-05-04 10:48:11 +02:00
Ruliang Lin
0d727e1856 ALSA: caiaq: input: Add error handling for unsupported input methods in snd_usb_caiaq_input_init
Smatch complains that:
snd_usb_caiaq_input_init() warn: missing error code 'ret'

This patch adds a new case to handle the situation where the
device does not support any input methods in the
`snd_usb_caiaq_input_init` function. It returns an `-EINVAL` error code
to indicate that no input methods are supported on the device.

Fixes: 523f1dce37 ("[ALSA] Add Native Instrument usb audio device support")
Signed-off-by: Ruliang Lin <u202112092@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Acked-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20230504065054.3309-1-u202112092@hust.edu.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-04 09:50:11 +02:00
Geraldo Nascimento
7501f47297 ALSA: usb-audio: Add quirk for Pioneer DDJ-800
One more Pioneer quirk, this time for DDJ-800, which is quite similar like
other DJ DDJ models but with slightly different EPs or channels.

Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>
Tested-by: Grégory Desor <gregory.desor@free.fr>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/ZFLLzgEcsSF5aIHG@geday
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-04 09:39:06 +02:00
Caleb Harper
e7477cb976 ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED
This patch adds support for the mute LED on the HP Pavilion Aero Laptop
13-be0xxx. The current behavior is that the LED does not turn on at any
time and does not indicate to the user whether the sound is muted.

The solution is to add a PCI quirk to properly recognize and support the
LED on this device.

This change has been tested on the device in question using modified
versions of kernels 6.0.7-6.2.12 on Arch Linux.

Signed-off-by: Caleb Harper <calebharp2005@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230503175026.6796-1-calebharp2005@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-04 09:36:25 +02:00
Devi Priya
d396133dce dt-bindings: mailbox: qcom: add compatible for IPQ9574 SoC
Add the mailbox compatible for IPQ9574 SoC.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 01:08:41 -05:00
Krzysztof Kozlowski
e172258870 mailbox: qcom-apcs-ipc: do not grow the of_device_id
Re-organize the compatible devices and add a comment to avoid unneeded
of_device_id growth with every new SoC.  These devices have quite a lot
of similarities and they can use only one compatible fallback for driver
binding.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:59:56 -05:00
Krzysztof Kozlowski
34d8775a0e dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks for few variants
Rework the compatibles of IPQ8074, SC7180, SC8180X and SM8150 as
compatible devices (same from Linux driver point of view).  This allows
smaller of_device_id table in the Linux driver and smaller
allOf:if:then: constraints.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:59:27 -05:00
AngeloGioacchino Del Regno
26e02e6c10 dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795
Add a compatible string for the MT6795 Helio X10 SoC using MT8173
binding and add a header for the MT6795's GCE mailbox.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:53:42 -05:00
Conor Dooley
5f84a056cf mailbox: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE
As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the
use of such symbols on other architectures, convert the Microchip FPGA
mailbox driver to use the new symbol.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:53:39 -05:00
Krzysztof Kozlowski
e2aa799311 mailbox: bcm-pdc: drop of_match_ptr for ID table
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/mailbox/bcm-pdc-mailbox.c:1474:34: error: ‘pdc_mbox_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:53:34 -05:00
Krzysztof Kozlowski
7490b8fb98 mailbox: rockchip: drop of_match_ptr for ID table
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/mailbox/rockchip-mailbox.c:158:34: error: ‘rockchip_mbox_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:53:32 -05:00
Lee Jones
2d1e952a2b mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
If a user can make copy_from_user() fail, there is a potential for
UAF/DF due to a lack of locking around the allocation, use and freeing
of the data buffers.

This issue is not theoretical.  I managed to author a POC for it:

    BUG: KASAN: double-free in kfree+0x5c/0xac
    Free of addr ffff29280be5de00 by task poc/356
    CPU: 1 PID: 356 Comm: poc Not tainted 6.1.0-00001-g961aa6552c04-dirty #20
    Hardware name: linux,dummy-virt (DT)
    Call trace:
     dump_backtrace.part.0+0xe0/0xf0
     show_stack+0x18/0x40
     dump_stack_lvl+0x64/0x80
     print_report+0x188/0x48c
     kasan_report_invalid_free+0xa0/0xc0
     ____kasan_slab_free+0x174/0x1b0
     __kasan_slab_free+0x18/0x24
     __kmem_cache_free+0x130/0x2e0
     kfree+0x5c/0xac
     mbox_test_message_write+0x208/0x29c
     full_proxy_write+0x90/0xf0
     vfs_write+0x154/0x440
     ksys_write+0xcc/0x180
     __arm64_sys_write+0x44/0x60
     invoke_syscall+0x60/0x190
     el0_svc_common.constprop.0+0x7c/0x160
     do_el0_svc+0x40/0xf0
     el0_svc+0x2c/0x6c
     el0t_64_sync_handler+0xf4/0x120
     el0t_64_sync+0x18c/0x190

    Allocated by task 356:
     kasan_save_stack+0x3c/0x70
     kasan_set_track+0x2c/0x40
     kasan_save_alloc_info+0x24/0x34
     __kasan_kmalloc+0xb8/0xc0
     kmalloc_trace+0x58/0x70
     mbox_test_message_write+0x6c/0x29c
     full_proxy_write+0x90/0xf0
     vfs_write+0x154/0x440
     ksys_write+0xcc/0x180
     __arm64_sys_write+0x44/0x60
     invoke_syscall+0x60/0x190
     el0_svc_common.constprop.0+0x7c/0x160
     do_el0_svc+0x40/0xf0
     el0_svc+0x2c/0x6c
     el0t_64_sync_handler+0xf4/0x120
     el0t_64_sync+0x18c/0x190

    Freed by task 357:
     kasan_save_stack+0x3c/0x70
     kasan_set_track+0x2c/0x40
     kasan_save_free_info+0x38/0x5c
     ____kasan_slab_free+0x13c/0x1b0
     __kasan_slab_free+0x18/0x24
     __kmem_cache_free+0x130/0x2e0
     kfree+0x5c/0xac
     mbox_test_message_write+0x208/0x29c
     full_proxy_write+0x90/0xf0
     vfs_write+0x154/0x440
     ksys_write+0xcc/0x180
     __arm64_sys_write+0x44/0x60
     invoke_syscall+0x60/0x190
     el0_svc_common.constprop.0+0x7c/0x160
     do_el0_svc+0x40/0xf0
     el0_svc+0x2c/0x6c
     el0t_64_sync_handler+0xf4/0x120
     el0t_64_sync+0x18c/0x190

Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:53:31 -05:00
Lee Jones
be88458585 mailbox: mailbox-test: Explicitly include header for spinlock support
Presently the support appears to be implied.

Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-05-04 00:53:28 -05:00
Paulo Alcantara
6be2ea33a4 cifs: avoid potential races when handling multiple dfs tcons
Now that a DFS tcon manages its own list of DFS referrals and
sessions, there is no point in having a single worker to refresh
referrals of all DFS tcons.  Make it faster and less prone to race
conditions when having several mounts by queueing a worker per DFS
tcon that will take care of refreshing only the DFS referrals related
to it.

Cc: stable@vger.kernel.org # v6.2+
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:29:47 -05:00
Paulo Alcantara
3dc9c433c9 cifs: protect access of TCP_Server_Info::{origin,leaf}_fullpath
Protect access of TCP_Server_Info::{origin,leaf}_fullpath when
matching DFS connections, and get rid of
TCP_Server_Info::current_fullpath while we're at it.

Cc: stable@vger.kernel.org # v6.2+
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:29:39 -05:00
Paulo Alcantara
ee20d7c610 cifs: fix potential race when tree connecting ipc
Protect access of TCP_Server_Info::hostname when building the ipc tree
name as it might get freed in cifsd thread and thus causing an
use-after-free bug in __tree_connect_dfs_target().  Also, while at it,
update status of IPC tcon on success and then avoid any extra tree
connects.

Cc: stable@vger.kernel.org # v6.2+
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:29:05 -05:00
Namjae Jeon
eb307d09fe ksmbd: call rcu_barrier() in ksmbd_server_exit()
racy issue is triggered the bug by racing between closing a connection
and rmmod. In ksmbd, rcu_barrier() is not called at module unload time,
so nothing prevents ksmbd from getting unloaded while it still has RCU
callbacks pending. It leads to trigger unintended execution of kernel
code locally and use to defeat protections such as Kernel Lockdown

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20477
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:02 -05:00
Namjae Jeon
30210947a3 ksmbd: fix racy issue under cocurrent smb2 tree disconnect
There is UAF issue under cocurrent smb2 tree disconnect.
This patch introduce TREE_CONN_EXPIRE flags for tcon to avoid cocurrent
access.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20592
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:02 -05:00
Namjae Jeon
abcc506a9a ksmbd: fix racy issue from smb2 close and logoff with multichannel
When smb client send concurrent smb2 close and logoff request
with multichannel connection, It can cause racy issue. logoff request
free tcon and can cause UAF issues in smb2 close. When receiving logoff
request with multichannel, ksmbd should wait until all remaning requests
complete as well as ones in the current connection, and then make
session expired.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20796 ZDI-CAN-20595
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:02 -05:00
Namjae Jeon
3353ab2df5 ksmbd: not allow guest user on multichannel
This patch return STATUS_NOT_SUPPORTED if binding session is guest.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20480
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:02 -05:00
Namjae Jeon
7b4323373d ksmbd: fix deadlock in ksmbd_find_crypto_ctx()
Deadlock is triggered by sending multiple concurrent session setup
requests. It should be reused after releasing when getting ctx for crypto.
Multiple consecutive ctx uses cause deadlock while waiting for releasing
due to the limited number of ctx.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20591
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:01 -05:00
Namjae Jeon
b096d97f47 ksmbd: block asynchronous requests when making a delay on session setup
ksmbd make a delay of 5 seconds on session setup to avoid dictionary
attacks. But the 5 seconds delay can be bypassed by using asynchronous
requests. This patch block all requests on current connection when
making a delay on sesstion setup failure.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20482
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:01 -05:00
Namjae Jeon
ea174a9189 ksmbd: destroy expired sessions
client can indefinitely send smb2 session setup requests with
the SessionId set to 0, thus indefinitely spawning new sessions,
and causing indefinite memory usage. This patch limit to the number
of sessions using expired timeout and session state.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20478
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:01 -05:00
Namjae Jeon
f5c779b7dd ksmbd: fix racy issue from session setup and logoff
This racy issue is triggered by sending concurrent session setup and
logoff requests. This patch does not set connection status as
KSMBD_SESS_GOOD if state is KSMBD_SESS_NEED_RECONNECT in session setup.
And relookup session to validate if session is deleted in logoff.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20481, ZDI-CAN-20590, ZDI-CAN-20596
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:01 -05:00
Namjae Jeon
3ac00a2ab6 ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem()
If share is , share->path is NULL and it cause NULL pointer
dereference issue.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20479
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:01 -05:00
Namjae Jeon
6d7cb549c2 ksmbd: fix memleak in session setup
If client send session setup request with unknown NTLMSSP message type,
session that does not included channel can be created. It will cause
session memleak. because ksmbd_sessions_deregister() does not destroy
session if channel is not included. This patch return error response if
client send the request unknown NTLMSSP message type.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20593
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-03 23:03:01 -05:00
Guchun Chen
1253685f0d drm/amdgpu: drop redundant sched job cleanup when cs is aborted
Once command submission failed due to userptr invalidation in
amdgpu_cs_submit, legacy code will perform cleanup of scheduler
job. However, it's not needed at all, as former commit has integrated
job cleanup stuff into amdgpu_job_free. Otherwise, because of double
free, a NULL pointer dereference will occur in such scenario.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2457
Fixes: f7d66fb2ea ("drm/amdgpu: cleanup scheduler job initialization v2")
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2023-05-03 23:10:02 -04:00
Samson Tam
682439fffa drm/amd/display: filter out invalid bits in pipe_fuses
[Why]
Reading pipe_fuses from register may have invalid bits set, which may
 affect the num_pipes erroneously.

[How]
Add read_pipes_fuses() call and filter bits based on expected number
 of pipes.

Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.1.x
2023-05-03 23:10:02 -04:00
Leo Chen
8f586cc16c drm/amd/display: Change default Z8 watermark values
[Why & How]
Previous Z8 watermark values were causing flickering and OTC underflow.
Updating Z8 watermark values based on the measurement.

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Leo Chen <sancchen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-05-03 23:10:02 -04:00
Horace Chen
100bd00881 drm/amdgpu: disable SDMA WPTR_POLL_ENABLE for SR-IOV
[Why]
This WPTR_POLL_ENABLE is a hardware contigious polling which will cause
FCLK and UCLK to keep on a high level.
Mostly its case can be covered by F32_WPTR_POLL_ENABLE which polls by
firmware.
So to save power, SR-IOV also needs to disable this bit

Signed-off-by: Horace Chen <horace.chen@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-05-03 23:10:02 -04:00
Chia-I Wu
2397e3d8d2 drm/amdgpu: add a missing lock for AMDGPU_SCHED
mgr->ctx_handles should be protected by mgr->lock.

v2: improve commit message
v3: add a Fixes tag

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Fixes: 52c6a62c64 ("drm/amdgpu: add interface for editing a foreign process's priority v3")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-05-03 23:10:02 -04:00
Hamza Mahfooz
922a76ba31 drm/amdgpu: fix an amdgpu_irq_put() issue in gmc_v9_0_hw_fini()
As made mention of in commit 08c677cb0b ("drm/amdgpu: fix
amdgpu_irq_put call trace in gmc_v10_0_hw_fini") and commit 13af556104
("drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v11_0_hw_fini"). It
is meaningless to call amdgpu_irq_put() for gmc.ecc_irq. So, remove it
from gmc_v9_0_hw_fini().

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522
Fixes: 3029c855d79f ("drm/amdgpu: Fix desktop freezed after gpu-reset")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2023-05-03 23:08:52 -04:00
Horatio Zhang
08c677cb0b drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v10_0_hw_fini
The gmc.ecc_irq is enabled by firmware per IFWI setting,
and the host driver is not privileged to enable/disable
the interrupt. So, it is meaningless to use the amdgpu_irq_put
function in gmc_v10_0_hw_fini, which also leads to the call
trace.

[   82.340264] Call Trace:
[   82.340265]  <TASK>
[   82.340269]  gmc_v10_0_hw_fini+0x83/0xa0 [amdgpu]
[   82.340447]  gmc_v10_0_suspend+0xe/0x20 [amdgpu]
[   82.340623]  amdgpu_device_ip_suspend_phase2+0x127/0x1c0 [amdgpu]
[   82.340789]  amdgpu_device_ip_suspend+0x3d/0x80 [amdgpu]
[   82.340955]  amdgpu_device_pre_asic_reset+0xdd/0x2b0 [amdgpu]
[   82.341122]  amdgpu_device_gpu_recover.cold+0x4dd/0xbb2 [amdgpu]
[   82.341359]  amdgpu_debugfs_reset_work+0x4c/0x70 [amdgpu]
[   82.341529]  process_one_work+0x21d/0x3f0
[   82.341535]  worker_thread+0x1fa/0x3c0
[   82.341538]  ? process_one_work+0x3f0/0x3f0
[   82.341540]  kthread+0xff/0x130
[   82.341544]  ? kthread_complete_and_exit+0x20/0x20
[   82.341547]  ret_from_fork+0x22/0x30

Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522
Fixes: c8b5a95b57 ("drm/amdgpu: Fix desktop freezed after gpu-reset")
Cc: stable@vger.kernel.org
2023-05-03 23:08:42 -04:00
Horatio Zhang
13af556104 drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v11_0_hw_fini
The gmc.ecc_irq is enabled by firmware per IFWI setting,
and the host driver is not privileged to enable/disable
the interrupt. So, it is meaningless to use the amdgpu_irq_put
function in gmc_v11_0_hw_fini, which also leads to the call
trace.

[  102.980303] Call Trace:
[  102.980303]  <TASK>
[  102.980304]  gmc_v11_0_hw_fini+0x54/0x90 [amdgpu]
[  102.980357]  gmc_v11_0_suspend+0xe/0x20 [amdgpu]
[  102.980409]  amdgpu_device_ip_suspend_phase2+0x240/0x460 [amdgpu]
[  102.980459]  amdgpu_device_ip_suspend+0x3d/0x80 [amdgpu]
[  102.980520]  amdgpu_device_pre_asic_reset+0xd9/0x490 [amdgpu]
[  102.980573]  amdgpu_device_gpu_recover.cold+0x548/0xce6 [amdgpu]
[  102.980687]  amdgpu_debugfs_reset_work+0x4c/0x70 [amdgpu]
[  102.980740]  process_one_work+0x21f/0x3f0
[  102.980741]  worker_thread+0x200/0x3e0
[  102.980742]  ? process_one_work+0x3f0/0x3f0
[  102.980743]  kthread+0xfd/0x130
[  102.980743]  ? kthread_complete_and_exit+0x20/0x20
[  102.980744]  ret_from_fork+0x22/0x30

Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522
Fixes: c8b5a95b57 ("drm/amdgpu: Fix desktop freezed after gpu-reset")
Cc: stable@vger.kernel.org
2023-05-03 23:07:58 -04:00
Shane Xiao
b03f38b9bd drm/amdgpu: Enable doorbell selfring after resize FB BAR
[Why]
The selfring doorbell aperture will change when resize FB
BAR successfully during gmc sw init, we should reorder
the sequence of enabling doorbell selfring aperture.

[How]
Move enable_doorbell_selfring_aperture from *_common_hw_init
to *_common_late_init.

This fixes the potential issue that GPU ring its own
doorbell when this device is in translated mode when
iommu is on.

v2: Remove *_enable_doorbell_aperture functions (Christian)
v3: Add comments to note that why we need enable doorbell
    selfring late (Christian)

Signed-off-by: Shane Xiao <shane.xiao@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Tested-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com>
Reviewed-by: Christian K�nig <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-05-03 22:44:06 -04:00
lyndonli
4eea7fb980 drm/amdgpu: Use the default reset when loading or reloading the driver
Below call trace and errors are observed when reloading
amdgpu driver with the module parameter reset_method=3.

It should do a default reset when loading or reloading the
driver, regardless of the module parameter reset_method.

v2: add comments inside and modify commit messages.

[  +2.180243] [drm] psp gfx command ID_LOAD_TOC(0x20) failed
and response status is (0x0)
[  +0.000011] [drm:psp_hw_start [amdgpu]] *ERROR* Failed to load toc
[  +0.000890] [drm:psp_hw_start [amdgpu]] *ERROR* PSP tmr init failed!
[  +0.020683] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to
clear memory with ring turned off.
[  +0.000003] RIP: 0010:amdgpu_bo_release_notify+0x1ef/0x210 [amdgpu]
[  +0.000004] Call Trace:
[  +0.000003]  <TASK>
[  +0.000008]  ttm_bo_release+0x2c4/0x330 [amdttm]
[  +0.000026]  amdttm_bo_put+0x3c/0x70 [amdttm]
[  +0.000020]  amdgpu_bo_free_kernel+0xe6/0x140 [amdgpu]
[  +0.000728]  psp_v11_0_ring_destroy+0x34/0x60 [amdgpu]
[  +0.000826]  psp_hw_init+0xe7/0x2f0 [amdgpu]
[  +0.000813]  amdgpu_device_fw_loading+0x1ad/0x2d0 [amdgpu]
[  +0.000731]  amdgpu_device_init.cold+0x108e/0x2002 [amdgpu]
[  +0.001071]  ? do_pci_enable_device+0xe1/0x110
[  +0.000011]  amdgpu_driver_load_kms+0x1a/0x160 [amdgpu]
[  +0.000729]  amdgpu_pci_probe+0x179/0x3a0 [amdgpu]

Signed-off-by: lyndonli <Lyndon.Li@amd.com>
Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-05-03 22:43:42 -04:00
lyndonli
74a4941514 drm/amdgpu: Fix mode2 reset for sienna cichlid
Before this change, sienna_cichlid_get_reset_handler will always
return NULL, although the module parameter reset_method is 3
when loading amdgpu driver.

Signed-off-by: lyndonli <Lyndon.Li@amd.com>
Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-05-03 22:43:12 -04:00
Linus Torvalds
1a5304fece parisc architecture updates and fixes for kernel v6.4-rc1:
- Calculate correct argument pointer in real64_call_asm()
 - Cleanup mmap implementation regarding color alignment (John David Anglin)
 - Spinlock fixes in panic path (Guilherme G. Piccoli)
 - build doc update for parisc64 (Randy Dunlap)
 - Ensure page alignment in flush functions
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZFK9AwAKCRD3ErUQojoP
 X8P8AP4tlAqimFyfTlzew01D4xgvlcbiAMZXtoMbJfrpJQyoJgD/QLqiTFcSoFPz
 iDKJ0x7g3+9Z3b7DGJ8HZOoQoLrlmQ8=
 =PIvc
 -----END PGP SIGNATURE-----

Merge tag 'parisc-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:
 "Two important fixes in here:

   - The argument pointer register was wrong when calling 64-bit
     firmware functions, which may cause random memory corruption or
     crashes.

   - Ensure page alignment in cache flush functions, otherwise not all
     memory might get flushed.

  The rest are cleanups (mmap implementation, panic path) and usual
  smaller updates.

  Summary:

   - Calculate correct argument pointer in real64_call_asm()

   - Cleanup mmap implementation regarding color alignment (John David
     Anglin)

   - Spinlock fixes in panic path (Guilherme G. Piccoli)

   - build doc update for parisc64 (Randy Dunlap)

   - Ensure page alignment in flush functions"

* tag 'parisc-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Fix argument pointer in real64_call_asm()
  parisc: Cleanup mmap implementation regarding color alignment
  parisc: Drop HP-UX constants and structs from grfioctl.h
  parisc: Ensure page alignment in flush functions
  parisc: Replace regular spinlock with spin_trylock on panic path
  parisc: update kbuild doc. aliases for parisc64
  parisc: Limit amount of kgdb breakpoints on parisc
2023-05-03 19:41:59 -07:00
Linus Torvalds
b408242872 modules-6.4-rc1 v2
There is only one fix by Arnd far for modules pending which came in after
 the first pull request. The issue was found as part of some late compile
 tests with 0-day. I take it 0-day does some secondary late builds with
 after some initial ones.
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCgAwFiEENnNq2KuOejlQLZofziMdCjCSiKcFAmRStMcSHG1jZ3JvZkBr
 ZXJuZWwub3JnAAoJEM4jHQowkoinIx0QAJaNXQNpbyIfLxtc1ILXMFH+o6H6M//D
 7FQVyZbz+Xc3dQAYsi7Ux/AhTZKEz1L6j1cGxPBVEHGiaVb4RDzVmdPk/kQpTjnl
 OdIdIPlMdLh1cuXl/sm1j5OW6gu9wxL13qxNuVfu/ADN09xRupuyruiXeA/8N2ca
 kaXgufMMipLx7NisecYJ21CFQeyVjxEkSvhzL1UBJLm6D+fS+0iWiL6V5Nc0hxpH
 RqZYZIK+KpBoTIYZbbR3+Gerev6gjbARh3/SY8WlfbQyKWG7eOULRBO8Urcs+x/a
 Kf3XAVma24tHF4M5vu9qW98w/ghNr7ytyI47o8XA+HfxA6BkKxPsWBumvOs0S5pW
 fT5YZ96oz85IfXipWy45xM+oZpcTxsnD7K6IYexDp7FO6458OkZazHED5djTboer
 e77GLkdSc+7gMZ2AB0EVSKb9iTrpsQV8pQgrzP0qj7Z99/2q9Rlsi1//3SKBNOAK
 mhQSbZ6m0rfdbA+wCS5efeA1roTZvHXJldHnsYyBzwcs7h5jLupqbKLiMKxpxxwk
 z1kdBcQa5jc3KlRGUkIXktay0eTLwGfIIA24p60Wi6cALHr9oISeLVZECxBz/0az
 NR6UUYrXSxvzU7dpyLPc+iOC8fbDdk50z02pASg9qjoc7yBJSkM+N/09AvBrQTyD
 0Wm3C0aw7XYh
 =JUoF
 -----END PGP SIGNATURE-----

Merge tag 'modules-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux

Pull modules fix from Luis Chamberlain:
 "One fix by Arnd far for modules which came in after the first pull
  request.

  The issue was found as part of some late compile tests with 0-day. I
  take it 0-day does some secondary late builds with after some initial
  ones"

* tag 'modules-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
  module: include internal.h in module/dups.c
2023-05-03 19:19:34 -07:00
Linus Torvalds
049a18f232 sysctl-6.4-rc1-v2
As mentioned on my first pull request for sysctl-next, for v6.4-rc1
 we're very close to being able to deprecating register_sysctl_paths().
 I was going to assess the situation after the first week of the merge
 window.
 
 That time is now and things are looking good. We only have one stragglers
 on the patch which had already an ACK for so I'm picking this up here now and
 the last patch is the one that uses an axe. Some careful eyeballing would
 be appreciated by others. If this doesn't get properly reviewed I can also
 just hold off on this in my tree for the next merge window. Either way is
 fine by me.
 
 I have boot tested the last patch and 0-day build completed successfully.
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCgAwFiEENnNq2KuOejlQLZofziMdCjCSiKcFAmRSsn0SHG1jZ3JvZkBr
 ZXJuZWwub3JnAAoJEM4jHQowkoinzzMQAK6ddUwQM32z6E2SY/Ku6ZDQJhVKxE+Y
 +HvghMqaGzr2eawEaASZzV6p//Q1aH4c2yaChyENa/O82QBXhbc2RBvdiAzQeJZx
 cUQ4C6Lc+BlpoB24Nes69F9j1LAEI5YXKMK911DKDu7LNNS7Ytxt1IOfM2RpyqRV
 6+9vOvAqCSh9EEjZeZDrMlsYhBA+t3YIkU6JFMX7Upc2P7m//57inLsZyUZBqnou
 t9sfC0d1lDTZXZ0vSIk534VhoxXe1MkYERKkAciEprxbdNnqcsi4WMXKdXG6Mcpy
 O1ZuUXqndAfhTSHLkqNidtuDP29TTvcdz5tDfwmaJ3JUTt0cDvlC2T7J9WyXDfCZ
 XsR8Ik0/vEH/j9rVabF9fQ8DeTSLe9AgpaItHd6/LWI8UESs5k/wYi9O+7lhCf2p
 JZpXl3G1itKA9ABMD1GUEtC5hfWTUxkTEgPkXbqFuKtCl0mI8lD3FPFRbuhYNLa8
 7R/6SN9h6/43C9Ffp2bY3c/gKQj51QlvGOSctahvdYSFkG8KXKhEnsDu0V6eLM9G
 QYrhvht8o9jbuKJKtEno9fjTlClVvXp5vARQQyy9OHyTuhU/Y8q2lH2BCZtFYZrM
 cpIFdfqB18tZmo7QfNHZPLfws2j3MqsbXFG8Q23BB7cJp1P5QdLJjmjnqbMq8xmk
 3kdRMZ2Xkfcx
 =8VOt
 -----END PGP SIGNATURE-----

Merge tag 'sysctl-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux

Pull more sysctl updates from Luis Chamberlain:
 "As mentioned on my first pull request for sysctl-next, for v6.4-rc1
  we're very close to being able to deprecating register_sysctl_paths().
  I was going to assess the situation after the first week of the merge
  window.

  That time is now and things are looking good. We only have one which
  had already an ACK for so I'm picking this up here now and the last
  patch is the one that uses an axe.

  I have boot tested the last patch and 0-day build completed
  successfully"

* tag 'sysctl-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
  sysctl: remove register_sysctl_paths()
  kernel: pid_namespace: simplify sysctls with register_sysctl()
2023-05-03 19:08:20 -07:00
Linus Torvalds
342528ff00 This pull request contains the following changes for UML:
- Make stub data pages configurable
 - Make it harder to mix user and kernel code by accident
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCAA0FiEEdgfidid8lnn52cLTZvlZhesYu8EFAmRSslcWHHJpY2hhcmRA
 c2lnbWEtc3Rhci5hdAAKCRBm+VmF6xi7wVbGEADWL/4rcVNqaD/b9V3bUXDkNhpG
 81Jc9fXcx3OXV87GsxfadiQI05UaOhTAMWJlsdKUF0/IW5tSQSZc0QcDNxTs6aS1
 NDkWvjk8s8OpbqdmV0cNKFmaeginrH4AuASajvNleU0BxX4ziqw6BPadih+wGVGz
 iVEd/M5YH2yet33pvD7Wzh3KZOPlo2OOKBqXzE6Snc3yoOiIfN95U8Cl23nxzMI4
 F235LS5m+4+GWIMkYs6+hlWEa8SxSnsH/beQJxAybtetSHRxsDXOHlEpDI9olxYI
 +OFNqsFLDyhyjib2Snwt8HMES9VmMfUUwT7ZK1cChXN8Quix3lXAyz6rpocmdnL/
 X1tzqWb1bz+yqrVRjtN3AGbcav+sQp4UWXsoExVsiz3lzaXfrbPvRZFucH2+SStK
 Wadyy2v2rHZKNq9sDLUBf5GJ0C4LrBAyT15ADim2L5/K7pZyI7AKSPcdU0Xc8m5y
 kMswml7FLaI+gsuKOBl7jySaoNDiVZFvQjsxd1+hn5cBNOcyBSt2rSErDw3geJgn
 pFzVkLtklfxMpHMm+bwXONBZMrXOBPNgo0gSkVrCVzO68x6j/MaBGLFazSqOKxbc
 UcVULhiomjIae4AcTomzOQx7oM1Xs3XuPo0x2RgJ3gMlCCZKoDNuqDgB3ZmPP/gq
 cbbHHveXEx7aMOPz0A==
 =Qb+I
 -----END PGP SIGNATURE-----

Merge tag 'uml-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux

Pull uml updates from Richard Weinberger:

 - Make stub data pages configurable

 - Make it harder to mix user and kernel code by accident

* tag 'uml-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
  um: make stub data pages size tweakable
  um: prevent user code in modules
  um: further clean up user_syms
  um: don't export printf()
  um: hostfs: define our own API boundary
  um: add __weak for exported functions
2023-05-03 19:02:03 -07:00
Linus Torvalds
9f2692326b This pull request contains updates for UBI and UBIFS
UBI:
 	- Fix error value for try_write_vid_and_data()
 	- Minor cleanups
 
 UBIFS:
 	- Fixes for various memory leaks
 	- Minor cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCAA0FiEEdgfidid8lnn52cLTZvlZhesYu8EFAmRSs7cWHHJpY2hhcmRA
 c2lnbWEtc3Rhci5hdAAKCRBm+VmF6xi7wcx4D/9zdLoaz3jv7P8vIMwHW/1Ewcjz
 Muvd5zPha31pjExK9Q90G8GzWX24rVUUXJPzO9zi88ayPiM0kD/lj4g8VD2a7E+G
 khK7K87ar9PitGeydzfByCed33tBaZ3XrDwOct2Byikdpl/lH6VQN4f6byKuAosA
 hSHw3c3Cf8XqnVq//mZTga9P+I0//gsTVBYMGEy4aaH5Ypi6kYz32GG5ERnYJpTG
 pRNon+CQWY6/+SfA1RAir2DqPU++Q5K50rErb1VQ2A/CdybbxgXZWUZ0zt3JHmdY
 CuoUSqIUFg/Abw57hDO+b+BbRMda2LHRO+xp/jCX325uQoBOnDhXQqr5g44kYFfI
 mxI1v/VZVmecyh5lYqxMoAEtHMOUOZGhOEiVgWNuQX8pl+9vUEd0gHuuo2d6woiI
 qM+W8kaZIWbBXnvQ8hzjMYuhWvMLpD2Lq2ZQCqkE/gNUgrdCk4D6G3fVd1x7Yypr
 iIbcg73xFyTurnIw20xqI03Acj0tbL3ofFMrxD6lS4y4drGPQxrKupN0jMTseHHB
 ZhxbB1zmYDntBCvQQSox3MCghFh4I5FSS5Dj6u6alAcmyctzOEbktC2hiGLtdGAH
 xhSKbflLogy8+W7GI4hhAOZNcBW3mqCFi1smlPSgo1m3a56gehw9tqoqBz5OLzGI
 BeusDNFBi1vgnGCsSw==
 =3ows
 -----END PGP SIGNATURE-----

Merge tag 'ubifs-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs

Pull UBI and UBIFS updates from Richard Weinberger:
 "UBI:

   - Fix error value for try_write_vid_and_data()

   - Minor cleanups

  UBIFS:

   - Fixes for various memory leaks

   - Minor cleanups"

* tag 'ubifs-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
  ubifs: Fix memleak when insert_old_idx() failed
  Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path"
  ubifs: Fix memory leak in do_rename
  ubifs: Free memory for tmpfile name
  ubi: Fix return value overwrite issue in try_write_vid_and_data()
  ubifs: Remove return in compr_exit()
  ubi: Simplify bool conversion
2023-05-03 18:58:59 -07:00
Hans de Goede
ec6f82b4c6
ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
The Nextbook Ares 8A tablet which has Android as factory OS, has a buggy
DSDT with both ESSX8316 and 10EC5651 ACPI devices.

This tablet actually uses an rt5651 codec, but the matching code ends up
picking the ESSX8316 device, add a quirk to ignote the ESSX8316 device
on this tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20230429104721.7176-1-hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-04 10:14:31 +09:00
Andrey Rakhmatullin
4a1b5bc73e
ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for acp6x
This is needed (and enough) to get the internal mic visible and working.

Signed-off-by: Andrey Rakhmatullin <wrar@wrar.name>
Message-Id: <20230501185134.34591-1-wrar@wrar.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-04 10:14:30 +09:00
Krzysztof Kozlowski
84822215ac
ASoC: codecs: wcd938x: fix accessing regmap on unattached devices
The WCD938x comes with three devices on two Linux drivers:
1. RX Soundwire device (wcd938x-sdw.c driver),
2. TX Soundwire device, which is used to access devices via regmap (also
   wcd938x-sdw.c driver),
3. platform device (wcd938x.c driver) - glue and component master,
   actually having most of the code using TX Soundwire device regmap.

When RX and TX Soundwire devices probe, the component master (platform
device) bind tries to write micbias configuration via TX Soundwire
regmap.  This might happen before TX Soundwire enumerates, so the regmap
access fails.  On Qualcomm SM8550 board with WCD9385:

  qcom-soundwire 6d30000.soundwire-controller: Qualcomm Soundwire controller v2.0.0 Registered
  wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:4 (ops wcd938x_sdw_component_ops)
  wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:3 (ops wcd938x_sdw_component_ops)
  qcom-soundwire 6ad0000.soundwire-controller: swrm_wait_for_wr_fifo_avail err write overflow

Fix the issue by:
1. Moving the regmap creation from platform device to TX Soundwire
   device.  The regmap settings are moved as-is with one difference:
   making the wcd938x_regmap_config const.
2. Using regmap in cache only mode till the actual TX Soundwire device
   enumerates and then sync the regmap cache.

Cc: <stable@vger.kernel.org> # v3.14+
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20230503144102.242240-1-krzysztof.kozlowski@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-04 10:14:30 +09:00
Linus Torvalds
fa31fc82fb More power management updates for 6.4-rc1
- Make test_resume work again after the changes that made hibernation
    open the snapshot device in exclusive mode (Chen Yu).
 
  - Clean up code in several places in intel_idle (Artem Bityutskiy).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmRSbLgSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxbvUP/3WeXEfulhN2FRuqmfqLtWNrpMwsoFpd
 9BQRokAQdKL3V2Q+YgdEH22+cB2LNAo5ty1+SHXjzsiExxBYWbKd6/AwOwwmFVPq
 I8uHS5pSqYQrZLI7eA1ZhFiTotePOpLyHpsHO3lezxXMlvEw30tY8g09WTH1F2Cz
 uzgTB1NTHRZaHWObrjvPkq3IERAbtF1xAQVPMtyWzs7IoCOlLxsKtHpfLBwGFYpZ
 1U7dbAFoGuQYjCUE9i1wbQdee9elRhPDJ6TGCx8rqtRRybxPZOdz1M947K/N5Q23
 OtK1HHfTIFHoi36sjwfEdZC89RGr7CI3hc5CAgexxwtsCw4gpIgvFoNXjCKW1q0J
 +C5ztCntxTGzWi37pnriV3I0NlTjTdEAoS2VDNRGlj0Vvrrx5S5H35qjoqD66N3a
 +zJ9eEYl5WGJlmZWxUvycJmS0PdPp755tmxrBRWqm7nr+oVJWKY8j2OKjlADCgoG
 k74zf1dp4zZJHIml1QpaRp0EsueiHs66Xu52VoFKyrAp0+ytYtnC1/SeKoYF4jDg
 PoTJmIT5ve8Nq8vwYbrg/z497J3bKHfbf1LPxDPNHVB6gx4Nv254qUNaM8oyic9j
 aHNwna6IAl+BshickaR0lUccJLnBAgPWyxnwFlfHaDbAGVtLNLSVFYlwr7xiUvlo
 t9eB4FZNGKMU
 =CwBd
 -----END PGP SIGNATURE-----

Merge tag 'pm-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management updates from Rafael Wysocki:
 "These fix a hibernation test mode regression and clean up the
  intel_idle driver.

  Specifics:

   - Make test_resume work again after the changes that made hibernation
     open the snapshot device in exclusive mode (Chen Yu)

   - Clean up code in several places in intel_idle (Artem Bityutskiy)"

* tag 'pm-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  intel_idle: mark few variables as __read_mostly
  intel_idle: do not sprinkle module parameter definitions around
  intel_idle: fix confusing message
  intel_idle: improve C-state flags handling robustness
  intel_idle: further intel_idle_init_cstates_icpu() cleanup
  intel_idle: clean up intel_idle_init_cstates_icpu()
  intel_idle: use pr_info() instead of printk()
  PM: hibernate: Do not get block device exclusively in test_resume mode
  PM: hibernate: Turn snapshot_test into global variable
2023-05-03 12:01:05 -07:00
Linus Torvalds
0153d8e695 More ACPI updates for 6.4-rc1
- Do not turn off unused power resources during initialization on the
    Toshiba Click Mini (Hans de Goede).
 
  - Support strings in device properties supplied by ACPI _DSM on Apple
    platforms (Hector Martin).
 
  - Add an ACPI device ID quirk for Lenovo Yoga Tablet 2 (Marius Hoch).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmRSbFMSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxPJ0QALaL7YQJQTw0MMzx0l4V/tFUjaMBxwK8
 WB4syZuZZfiDqEfUDq9PYW2MW1llpmko+T13xenYPU3DqsLEeHbeuuZBTJvzPlDl
 8/RXu7osHTmY+CCaq970P3lEAt5O6EvMOblBkVJQMtmV8sINwuhzAq0DNu5EOBEI
 u/nccgpnZciXcYEmaAQqgc7qekH7VTa/eWAddc1jr/h2JudztHmWuJl4ptlhO0es
 imZVmGjtuWLVvQaHV2rNAGFy9HVDz5ZbmlujhWPqeAQs2gOs3zXBYrjQFsEbhgUx
 5ONSSzVRKylwRnSC6TGXszXgX/lal04i/NutuAY1Or46rCjNTsPonjFhWWzyFzkS
 Afk/VMobZFbtTlGejx1GJtw5EN1HfbUylOdrdDA8Lzmihkp51YspcgtDqWNQDrF/
 VOAPwaaV24J/ZFTjftmBnke0vWQTGJ+RUvFlQUH0rQfvgnqyYW3Mxwy04JwpnUOm
 hfWoXO0gnl+IHvnEzRaszcd65SJ43nvaHYBOWjG9SvlpQyXAlfnFKtteqbTmo4Qi
 MuYEXPu5AQRi930Uga/G0TfNV0iHnLBnuCO/bh4A/96b9ODY25/RrhcHndBk4kFd
 6C+pYNNGsMvicgoi/Iuh25z6WbinC2TtmvrlrJFqeGuGiPGw/5KEmtGNVRySxagd
 zZXJlfZRotxi
 =XhG2
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI updates from Rafael Wysocki:
 "These add two ACPI-related quirks and extend support for Apple device
  properties supplied via ACPI _DSM.

  Specifics:

   - Do not turn off unused power resources during initialization on the
     Toshiba Click Mini (Hans de Goede)

   - Support strings in device properties supplied by ACPI _DSM on Apple
     platforms (Hector Martin)

   - Add an ACPI device ID quirk for Lenovo Yoga Tablet 2 (Marius Hoch)"

* tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: property: Support strings in Apple _DSM props
  ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001
  ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini
2023-05-03 11:49:57 -07:00
Linus Torvalds
667de5c684 More thermal control updates for 6.4-rc1
- Add compatible DT bindings for imx6sll and imx6ul to fix a dtbs check
    warning (Stefan Wahren).
 
  - Update the example in the DT bindings to reflect changes with the
    ADC node name for QCom TM and TM5 (Marijn Suijten).
 
  - Fix comments for the cpuidle_cooling_register() function to match the
    function prototype (Chenggang Wang).
 
  - Fix inconsistent temperature read and some Mediatek variant board
    reboot by reverting a change and handling the temperature
    differently (AngeloGioacchino Del Regno).
 
  - Fix a memory leak in the initialization error path for the Mediatek
    driver (Kang Chen).
 
  - Use of_address_to_resource() in the Mediatek driver (Rob Herring).
 
  - Fix unit address in the QCom tsens driver DT bindings (Krzysztof
    Kozlowski).
 
  - Clean up the step-wise thermal governor (Zhang Rui).
 
  - Introduce thermal_zone_device() for accessing the device field of
    struct thermal_zone_device and two drivers use it (Daniel Lezcano).
 
  - Clean up the ACPI thermal driver a bit (Daniel Lezcano).
 
  - Delete the thermal driver for Intel Menlow platforms that is not
    expected to have any users (Rafael Wysocki).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmRSa9kSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxlv8P/j84O8Sds7Zb5jA9r3RYtZ07iqMHjjV6
 EUjS+aZ33d2koQ+X2m+ZqJZ51XmbFMEmtz0jc7zoSwOReMYQhnf1dm/EFvEIJvej
 zNT1wFEhtLtVoMMsTygKywH6sTEbGCi5i+QybN+n96qOwYqI2LaSvfqygkGT9yGC
 b4H42o4S34JcV4Ofdhzd9H7p6AQheKBpvNfAF86DShVioNQZGY0KgOw73bpt+HO0
 9LASf5VN78rS++0JxoJ4tza0VMWM/UdkYmxpj4v2lq6GKUEQlu2XFGCjs3NBEaG8
 CMe4ZEqJXVgGsEwFmEgzzUi9doqFL7vQdRb9LHa/LdHBRF8Eba1VbNLHZQY0mMTZ
 4wgjdyXmuH9dt1cITNJG+ZPXC6xNbjydKgDG++hw7fZ3oOUZnZsndy1uc0Nl56ao
 pNurhxxOZIpMs/EqP8yv+4FKEk2fOQXFEC8Ppo+clKme4DWmK5/ICuiKi0eFzZcG
 kAS3wzeDgXGJyumPUP2/qIoMcKEVtbXypqlE55ILwC1DF5XE4TnMfWxVndMW52Qr
 ZYW3JcPFZdST8afFZ0yXKSF1zyXmrwG8qKCcIzO/7m0/UkHoTujrPJ0/0sQsdv9a
 nrG0P40ygVfHRCLDRjWp7VQrj0PSHdzYx/X82xkLmHxAPShJ+LuUm4dFOZ224y2b
 UnrEvlq+rVSW
 =/bW2
 -----END PGP SIGNATURE-----

Merge tag 'thermal-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more thermal control updates from Rafael Wysocki:
 "These are mostly cleanups on top of the previously merged thermal
  control changes plus some driver fixes and the removal of the Intel
  Menlow thermal driver.

  Specifics:

   - Add compatible DT bindings for imx6sll and imx6ul to fix a dtbs
     check warning (Stefan Wahren)

   - Update the example in the DT bindings to reflect changes with the
     ADC node name for QCom TM and TM5 (Marijn Suijten)

   - Fix comments for the cpuidle_cooling_register() function to match
     the function prototype (Chenggang Wang)

   - Fix inconsistent temperature read and some Mediatek variant board
     reboot by reverting a change and handling the temperature
     differently (AngeloGioacchino Del Regno)

   - Fix a memory leak in the initialization error path for the Mediatek
     driver (Kang Chen)

   - Use of_address_to_resource() in the Mediatek driver (Rob Herring)

   - Fix unit address in the QCom tsens driver DT bindings (Krzysztof
     Kozlowski)

   - Clean up the step-wise thermal governor (Zhang Rui)

   - Introduce thermal_zone_device() for accessing the device field of
     struct thermal_zone_device and two drivers use it (Daniel Lezcano)

   - Clean up the ACPI thermal driver a bit (Daniel Lezcano)

   - Delete the thermal driver for Intel Menlow platforms that is not
     expected to have any users (Rafael Wysocki)"

* tag 'thermal-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: intel: menlow: Get rid of this driver
  ACPI: thermal: Move to dedicated function sysfs extra attr creation
  ACPI: thermal: Use thermal_zone_device()
  thermal: intel: pch_thermal: Use thermal driver device to write a trace
  thermal: core: Encapsulate tz->device field
  thermal: gov_step_wise: Adjust code logic to match comment
  thermal: gov_step_wise: Delete obsolete comment
  dt-bindings: thermal: qcom-tsens: Correct unit address
  thermal/drivers/mediatek: Use of_address_to_resource()
  thermal/drivers/mediatek: Change clk_prepare_enable to devm_clk_get_enabled in mtk_thermal_probe
  thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe
  thermal/drivers/mediatek: Add temperature constraints to validate read
  Revert "thermal/drivers/mediatek: Add delay after thermal banks initialization"
  thermal/drivers/cpuidle_cooling: Delete unmatched comments
  dt-bindings: thermal: Use generic ADC node name in examples
  dt-bindings: imx-thermal: Add imx6sll and imx6ul compatible
2023-05-03 11:46:01 -07:00
Linus Torvalds
89b7fd5d7f pwm: Changes for v6.4-rc1
The bulk of this is trivial conversions to the new .remove_new()
 callback for drivers as part of Uwe's effort to clean that up.
 
 Other than that a driver is added for Apple devices and various small
 fixes are included for existing drivers.
 
 Last but not least, this finally gets rid of the old pwm_request() and
 pwm_free() APIs are removed since the last user was dropped in v6.3.
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmRSgJcZHHRoaWVycnku
 cmVkaW5nQGdtYWlsLmNvbQAKCRDdI6zXfz6zoUZzEACcLaLRRvAsgsrrnunQ1sNT
 y5Haep7FjYF8W0cn3MJbH4efdtW6mKJxMV7ZCvbPYXi79Q//4J3oeXV/miRcYTLf
 OqALvWKlaXJ3bbwddOdsxjqBBRDPfo3hMTZjSkfiTTbH1vIx3lD/nAdogrVHPBh+
 Ap6RMFqb5xnJtefxWNaQ6puWY6XjA9jznitQtMMEkjZqjQtqNd+QX149tFU3avwo
 0S4cjUB3FKiSctUXW5EZh3jNSDgB/TYmeslkpmnozkde9DK3ooYMRDMkV0jTaGSb
 EKPLWmLSoIDH+ghG7r5KGkE7x5mBELtBbW/KxXBFpro/x528VxYdTgAGOn54XWmn
 NcsWiMdReWmPbPDQzZcUBDn8boxyw4jtqsdwzu96G1KHdKcVH6EH00XcH+Pi9KG9
 HqPBMvqAjxAn3GK6SdfjGU1KmGB3MYCi4u+twAyycDOEMkxA+FzHSs+OD1a2iaK/
 AIYXMjZ4KdVIvIIjJzJttdkTOzt/R6xfn4okvlBzQpD34c7eyi6U+S24+I4yX4y5
 wGmZ52h5VvWaBXPaDPYaziyhfRn0nzBSVRXqV62jAusON/xcU6tc1L5YYX0GRNfv
 NG264HBAdlUVERs6XDqC+meKwFSzLEmt47pWCBCnOfck/KXLqdsM2tQtMTmI0p4l
 9vncNSofIexg/HcrdOFbug==
 =slCK
 -----END PGP SIGNATURE-----

Merge tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm

Pull pwm updates from Thierry Reding:
 "The bulk of this is trivial conversions to the new .remove_new()
  callback for drivers as part of Uwe's effort to clean that up.

  Other than that a driver is added for Apple devices and various small
  fixes are included for existing drivers.

  Last but not least, this finally gets rid of the old pwm_request() and
  pwm_free() APIs are removed since the last user was dropped in v6.3"

* tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (44 commits)
  pwm: Remove unused radix tree
  pwm: Delete deprecated functions pwm_request() and pwm_free()
  pwm: meson: Fix g12a ao clk81 name
  pwm: meson: Fix axg ao mux parents
  pwm: stm32: Enforce settings for PWM capture
  MAINTAINERS: Add entries for Apple PWM driver
  pwm: Add Apple PWM controller
  dt-bindings: pwm: Add Apple PWM controller
  pwm: mtk-disp: Configure double buffering before reading in .get_state()
  pwm: mtk-disp: Disable shadow registers before setting backlight values
  pwm: stm32-lp: Drop of_match_ptr for ID table
  pwm: rcar: Drop of_match_ptr for ID table
  dt-bindings: pwm: Convert Amlogic Meson PWM binding
  dt-bindings: pwm: mediatek: Add mediatek,mt7986 compatible
  pwm: xilinx: Convert to platform remove callback returning void
  pwm: vt8500: Convert to platform remove callback returning void
  pwm: tiehrpwm: Convert to platform remove callback returning void
  pwm: tiecap: Convert to platform remove callback returning void
  pwm: tegra: Convert to platform remove callback returning void
  pwm: sun4i: Convert to platform remove callback returning void
  ...
2023-05-03 11:25:01 -07:00
Linus Torvalds
4c9818d865 soundwire updates for 6.4-rc1
- Support for AMD soundwire controller
  - Intel driver updates to support future platforms
  - Core API sdw_nread/nwrite_no_pm updates to handle page boundaries
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmRSOS4ACgkQfBQHDyUj
 g0fV/BAAlmWN+6PwWO02Reyj6+JCFej10by7GIjCAOeD8QeAt89cgbuD4/FYufrH
 2P/KXbTGs2dBQPP1J62lvUqTsUoJ2wYZR3R0QkcDHmhso61m+XeQ9g6BTBowp5U7
 1+fEUhZUTVS7+8Zx8Cuy0DyV2oFITT1n6WxpT4XzDc3h5pY3MAp8T1t6JVfQoSPT
 UX6YEniENI/5qFS0pe1MuWXju5zF4gQ/p1sbyzuhh9X5bIA4RUeJJDcIlJv6WGki
 EqLyDOVp6KUxFXIk0W5k1K6jqJASNqrGeaEqKUIYW7ZqJE4lxGvQpcmZ89s++pYU
 SsqN3TM0XkW3BhXSP8tX3KWAkazyUIbsEeu707qPaZ+4hBmZ6eS5+maOpUw0ddML
 MHinR/uw/ZZOyUmfIoEmMFjEtMYUsXKqMhFketZ95GYwt1hRv3kihiUcUl1EasfK
 63UflB4v1TV258FKrZokAUt9M0Bs8a7qEEIzhfmv9910raLUtS0a1oFSDjIB0UAz
 2nYDAXyzs0sU+fcIflou0f2bPu8cDgy7FaMTm5wBnjWJMNtebWO2npFOW3yAkjw5
 auQtT3Ja+4ag9dcJIXMCdxzbbXSX8HK4aQ+d9Z4o8mhfFOJ/YM22JcseG92HKsQM
 jouDxw7oj+tixIdtgc4oYHEZqu9fkW9C8valkKrQ0R0gBeGx4s0=
 =u4rP
 -----END PGP SIGNATURE-----

Merge tag 'soundwire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire updates from Vinod Koul:
 "This features AMD soundwire controller driver, a bunch of Intel
  changes for future platform support, sdw API updates etc:

   - Support for AMD soundwire controller

   - Intel driver updates to support future platforms

   - Core API sdw_nread/nwrite_no_pm updates to handle page boundaries"

* tag 'soundwire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (38 commits)
  soundwire: intel_auxdevice: improve pm_prepare step
  soundwire: bus: Fix unbalanced pm_runtime_put() causing usage count underflow
  soundwire: intel: don't save hw_params for use in prepare
  soundwire: bus: Update sdw_nread/nwrite_no_pm to handle page boundaries
  soundwire: bus: Update kernel doc for no_pm functions
  soundwire: bus: Remove now outdated comments on no_pm IO
  soundwire: stream: uniquify dev_err() logs
  soundwire: stream: remove bus->dev from logs on multiple buses
  soundwire: amd: add pm_prepare callback and pm ops support
  soundwire: amd: handle SoundWire wake enable interrupt
  soundwire: amd: add runtime pm ops for AMD SoundWire manager driver
  soundwire: amd: add SoundWire manager interrupt handling
  soundwire: amd: enable build for AMD SoundWire manager driver
  soundwire: amd: register SoundWire manager dai ops
  soundwire: amd: Add support for AMD Manager driver
  soundwire: export sdw_compute_slave_ports() function
  soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed
  soundwire: bandwidth allocation: Use hweight32() to calculate set bits
  soundwire: qcom: gracefully handle too many ports in DT
  soundwire: qcom: define hardcoded version magic numbers
  ...
2023-05-03 11:21:07 -07:00