From: Greg Kroah-Hartman Date: Tue, 20 Sep 2022 16:47:21 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v5.19.11~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5ab516359ef0a1c7d8adba1ed096a8691e1b4d4;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: cifs-always-initialize-struct-msghdr-smb_msg-completely.patch cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch cifs-revalidate-mapping-when-doing-direct-writes.patch drm-amdgpu-don-t-enable-ltr-if-not-supported.patch drm-amdgpu-move-nbio-ih_doorbell_range-into-ih-code-for-vega.patch drm-amdgpu-move-nbio-sdma_doorbell_range-into-sdma-code-for-vega.patch of-device-fix-up-of_dma_configure_id-stub.patch parisc-allow-config_64bit-with-arch-parisc.patch tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch --- diff --git a/queue-5.15/cifs-always-initialize-struct-msghdr-smb_msg-completely.patch b/queue-5.15/cifs-always-initialize-struct-msghdr-smb_msg-completely.patch new file mode 100644 index 00000000000..1c3bfa27731 --- /dev/null +++ b/queue-5.15/cifs-always-initialize-struct-msghdr-smb_msg-completely.patch @@ -0,0 +1,97 @@ +From bedc8f76b3539ac4f952114b316bcc2251e808ce Mon Sep 17 00:00:00 2001 +From: Stefan Metzmacher +Date: Wed, 14 Sep 2022 05:25:47 +0200 +Subject: cifs: always initialize struct msghdr smb_msg completely + +From: Stefan Metzmacher + +commit bedc8f76b3539ac4f952114b316bcc2251e808ce upstream. + +So far we were just lucky because the uninitialized members +of struct msghdr are not used by default on a SOCK_STREAM tcp +socket. + +But as new things like msg_ubuf and sg_from_iter where added +recently, we should play on the safe side and avoid potention +problems in future. + +Signed-off-by: Stefan Metzmacher +Cc: stable@vger.kernel.org +Reviewed-by: Paulo Alcantara (SUSE) +Reviewed-by: Ronnie Sahlberg +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman +--- + fs/cifs/connect.c | 11 +++-------- + fs/cifs/transport.c | 6 +----- + 2 files changed, 4 insertions(+), 13 deletions(-) + +--- a/fs/cifs/connect.c ++++ b/fs/cifs/connect.c +@@ -519,9 +519,6 @@ cifs_readv_from_socket(struct TCP_Server + int length = 0; + int total_read; + +- smb_msg->msg_control = NULL; +- smb_msg->msg_controllen = 0; +- + for (total_read = 0; msg_data_left(smb_msg); total_read += length) { + try_to_freeze(); + +@@ -572,7 +569,7 @@ int + cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, + unsigned int to_read) + { +- struct msghdr smb_msg; ++ struct msghdr smb_msg = {}; + struct kvec iov = {.iov_base = buf, .iov_len = to_read}; + iov_iter_kvec(&smb_msg.msg_iter, READ, &iov, 1, to_read); + +@@ -582,15 +579,13 @@ cifs_read_from_socket(struct TCP_Server_ + ssize_t + cifs_discard_from_socket(struct TCP_Server_Info *server, size_t to_read) + { +- struct msghdr smb_msg; ++ struct msghdr smb_msg = {}; + + /* + * iov_iter_discard already sets smb_msg.type and count and iov_offset + * and cifs_readv_from_socket sets msg_control and msg_controllen + * so little to initialize in struct msghdr + */ +- smb_msg.msg_name = NULL; +- smb_msg.msg_namelen = 0; + iov_iter_discard(&smb_msg.msg_iter, READ, to_read); + + return cifs_readv_from_socket(server, &smb_msg); +@@ -600,7 +595,7 @@ int + cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *page, + unsigned int page_offset, unsigned int to_read) + { +- struct msghdr smb_msg; ++ struct msghdr smb_msg = {}; + struct bio_vec bv = { + .bv_page = page, .bv_len = to_read, .bv_offset = page_offset}; + iov_iter_bvec(&smb_msg.msg_iter, READ, &bv, 1, to_read); +--- a/fs/cifs/transport.c ++++ b/fs/cifs/transport.c +@@ -196,10 +196,6 @@ smb_send_kvec(struct TCP_Server_Info *se + + *sent = 0; + +- smb_msg->msg_name = NULL; +- smb_msg->msg_namelen = 0; +- smb_msg->msg_control = NULL; +- smb_msg->msg_controllen = 0; + if (server->noblocksnd) + smb_msg->msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL; + else +@@ -311,7 +307,7 @@ __smb_send_rqst(struct TCP_Server_Info * + sigset_t mask, oldmask; + size_t total_len = 0, sent, size; + struct socket *ssocket = server->ssocket; +- struct msghdr smb_msg; ++ struct msghdr smb_msg = {}; + __be32 rfc1002_marker; + + if (cifs_rdma_enabled(server)) { diff --git a/queue-5.15/cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch b/queue-5.15/cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch new file mode 100644 index 00000000000..c5071541296 --- /dev/null +++ b/queue-5.15/cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch @@ -0,0 +1,34 @@ +From 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 Mon Sep 17 00:00:00 2001 +From: Stefan Metzmacher +Date: Wed, 14 Sep 2022 05:25:46 +0200 +Subject: cifs: don't send down the destination address to sendmsg for a SOCK_STREAM + +From: Stefan Metzmacher + +commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 upstream. + +This is ignored anyway by the tcp layer. + +Signed-off-by: Stefan Metzmacher +Cc: stable@vger.kernel.org +Reviewed-by: Ronnie Sahlberg +Reviewed-by: Paulo Alcantara (SUSE) +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman +--- + fs/cifs/transport.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/cifs/transport.c ++++ b/fs/cifs/transport.c +@@ -196,8 +196,8 @@ smb_send_kvec(struct TCP_Server_Info *se + + *sent = 0; + +- smb_msg->msg_name = (struct sockaddr *) &server->dstaddr; +- smb_msg->msg_namelen = sizeof(struct sockaddr); ++ smb_msg->msg_name = NULL; ++ smb_msg->msg_namelen = 0; + smb_msg->msg_control = NULL; + smb_msg->msg_controllen = 0; + if (server->noblocksnd) diff --git a/queue-5.15/cifs-revalidate-mapping-when-doing-direct-writes.patch b/queue-5.15/cifs-revalidate-mapping-when-doing-direct-writes.patch new file mode 100644 index 00000000000..bb8ef6448bf --- /dev/null +++ b/queue-5.15/cifs-revalidate-mapping-when-doing-direct-writes.patch @@ -0,0 +1,37 @@ +From 7500a99281dfed2d4a84771c933bcb9e17af279b Mon Sep 17 00:00:00 2001 +From: Ronnie Sahlberg +Date: Mon, 12 Sep 2022 13:04:46 +1000 +Subject: cifs: revalidate mapping when doing direct writes + +From: Ronnie Sahlberg + +commit 7500a99281dfed2d4a84771c933bcb9e17af279b upstream. + +Kernel bugzilla: 216301 + +When doing direct writes we need to also invalidate the mapping in case +we have a cached copy of the affected page(s) in memory or else +subsequent reads of the data might return the old/stale content +before we wrote an update to the server. + +Cc: stable@vger.kernel.org +Reviewed-by: Paulo Alcantara (SUSE) +Signed-off-by: Ronnie Sahlberg +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman +--- + fs/cifs/file.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/fs/cifs/file.c ++++ b/fs/cifs/file.c +@@ -3318,6 +3318,9 @@ static ssize_t __cifs_writev( + + ssize_t cifs_direct_writev(struct kiocb *iocb, struct iov_iter *from) + { ++ struct file *file = iocb->ki_filp; ++ ++ cifs_revalidate_mapping(file->f_inode); + return __cifs_writev(iocb, from, true); + } + diff --git a/queue-5.15/drm-amdgpu-don-t-enable-ltr-if-not-supported.patch b/queue-5.15/drm-amdgpu-don-t-enable-ltr-if-not-supported.patch new file mode 100644 index 00000000000..0249d4252ec --- /dev/null +++ b/queue-5.15/drm-amdgpu-don-t-enable-ltr-if-not-supported.patch @@ -0,0 +1,164 @@ +From 6c20490663553cd7e07d8de8af482012329ab9d6 Mon Sep 17 00:00:00 2001 +From: Lijo Lazar +Date: Thu, 8 Sep 2022 08:28:57 +0530 +Subject: drm/amdgpu: Don't enable LTR if not supported + +From: Lijo Lazar + +commit 6c20490663553cd7e07d8de8af482012329ab9d6 upstream. + +As per PCIE Base Spec r4.0 Section 6.18 +'Software must not enable LTR in an Endpoint unless the Root Complex +and all intermediate Switches indicate support for LTR.' + +This fixes the Unsupported Request error reported through AER during +ASPM enablement. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=216455 + +The error was unnoticed before and got visible because of the commit +referenced below. This doesn't fix anything in the commit below, rather +fixes the issue in amdgpu exposed by the commit. The reference is only +to associate this commit with below one so that both go together. + +Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") + +Reported-by: Gustaw Smolarczyk +Signed-off-by: Lijo Lazar +Reviewed-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +Cc: stable@vger.kernel.org +Signed-off-by: Alex Deucher +--- + drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 9 ++++++++- + drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 9 ++++++++- + drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 9 ++++++++- + 3 files changed, 24 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c +@@ -366,6 +366,7 @@ static void nbio_v2_3_enable_aspm(struct + WREG32_PCIE(smnPCIE_LC_CNTL, data); + } + ++#ifdef CONFIG_PCIEASPM + static void nbio_v2_3_program_ltr(struct amdgpu_device *adev) + { + uint32_t def, data; +@@ -387,9 +388,11 @@ static void nbio_v2_3_program_ltr(struct + if (def != data) + WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); + } ++#endif + + static void nbio_v2_3_program_aspm(struct amdgpu_device *adev) + { ++#ifdef CONFIG_PCIEASPM + uint32_t def, data; + + def = data = RREG32_PCIE(smnPCIE_LC_CNTL); +@@ -445,7 +448,10 @@ static void nbio_v2_3_program_aspm(struc + if (def != data) + WREG32_PCIE(smnPCIE_LC_CNTL6, data); + +- nbio_v2_3_program_ltr(adev); ++ /* Don't bother about LTR if LTR is not enabled ++ * in the path */ ++ if (adev->pdev->ltr_path) ++ nbio_v2_3_program_ltr(adev); + + def = data = RREG32_SOC15(NBIO, 0, mmRCC_BIF_STRAP3); + data |= 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; +@@ -469,6 +475,7 @@ static void nbio_v2_3_program_aspm(struc + data &= ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; + if (def != data) + WREG32_PCIE(smnPCIE_LC_CNTL3, data); ++#endif + } + + static void nbio_v2_3_apply_lc_spc_mode_wa(struct amdgpu_device *adev) +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +@@ -278,6 +278,7 @@ static void nbio_v6_1_init_registers(str + WREG32_PCIE(smnPCIE_CI_CNTL, data); + } + ++#ifdef CONFIG_PCIEASPM + static void nbio_v6_1_program_ltr(struct amdgpu_device *adev) + { + uint32_t def, data; +@@ -299,9 +300,11 @@ static void nbio_v6_1_program_ltr(struct + if (def != data) + WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); + } ++#endif + + static void nbio_v6_1_program_aspm(struct amdgpu_device *adev) + { ++#ifdef CONFIG_PCIEASPM + uint32_t def, data; + + def = data = RREG32_PCIE(smnPCIE_LC_CNTL); +@@ -357,7 +360,10 @@ static void nbio_v6_1_program_aspm(struc + if (def != data) + WREG32_PCIE(smnPCIE_LC_CNTL6, data); + +- nbio_v6_1_program_ltr(adev); ++ /* Don't bother about LTR if LTR is not enabled ++ * in the path */ ++ if (adev->pdev->ltr_path) ++ nbio_v6_1_program_ltr(adev); + + def = data = RREG32_PCIE(smnRCC_BIF_STRAP3); + data |= 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; +@@ -381,6 +387,7 @@ static void nbio_v6_1_program_aspm(struc + data &= ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; + if (def != data) + WREG32_PCIE(smnPCIE_LC_CNTL3, data); ++#endif + } + + const struct amdgpu_nbio_funcs nbio_v6_1_funcs = { +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +@@ -630,6 +630,7 @@ const struct amdgpu_nbio_ras_funcs nbio_ + .ras_fini = amdgpu_nbio_ras_fini, + }; + ++#ifdef CONFIG_PCIEASPM + static void nbio_v7_4_program_ltr(struct amdgpu_device *adev) + { + uint32_t def, data; +@@ -651,9 +652,11 @@ static void nbio_v7_4_program_ltr(struct + if (def != data) + WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); + } ++#endif + + static void nbio_v7_4_program_aspm(struct amdgpu_device *adev) + { ++#ifdef CONFIG_PCIEASPM + uint32_t def, data; + + def = data = RREG32_PCIE(smnPCIE_LC_CNTL); +@@ -709,7 +712,10 @@ static void nbio_v7_4_program_aspm(struc + if (def != data) + WREG32_PCIE(smnPCIE_LC_CNTL6, data); + +- nbio_v7_4_program_ltr(adev); ++ /* Don't bother about LTR if LTR is not enabled ++ * in the path */ ++ if (adev->pdev->ltr_path) ++ nbio_v7_4_program_ltr(adev); + + def = data = RREG32_PCIE(smnRCC_BIF_STRAP3); + data |= 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; +@@ -733,6 +739,7 @@ static void nbio_v7_4_program_aspm(struc + data &= ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; + if (def != data) + WREG32_PCIE(smnPCIE_LC_CNTL3, data); ++#endif + } + + const struct amdgpu_nbio_funcs nbio_v7_4_funcs = { diff --git a/queue-5.15/drm-amdgpu-move-nbio-ih_doorbell_range-into-ih-code-for-vega.patch b/queue-5.15/drm-amdgpu-move-nbio-ih_doorbell_range-into-ih-code-for-vega.patch new file mode 100644 index 00000000000..7bfe41f7130 --- /dev/null +++ b/queue-5.15/drm-amdgpu-move-nbio-ih_doorbell_range-into-ih-code-for-vega.patch @@ -0,0 +1,81 @@ +From dc1d85cb790f2091eea074cee24a704b2d6c4a06 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 9 Sep 2022 11:47:20 -0400 +Subject: drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alex Deucher + +commit dc1d85cb790f2091eea074cee24a704b2d6c4a06 upstream. + +This mirrors what we do for other asics and this way we are +sure the ih doorbell range is properly initialized. + +There is a comment about the way doorbells on gfx9 work that +requires that they are initialized for other IPs before GFX +is initialized. In this case IH is initialized before GFX, +so there should be no issue. + +This is a prerequisite for fixing the Unsupported Request error +reported through AER during driver load. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=216373 + +The error was unnoticed before and got visible because of the commit +referenced below. This doesn't fix anything in the commit below, rather +fixes the issue in amdgpu exposed by the commit. The reference is only +to associate this commit with below one so that both go together. + +Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") + +Acked-by: Christian König +Reviewed-by: Lijo Lazar +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/soc15.c | 3 --- + drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 ++++ + drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 4 ++++ + 3 files changed, 8 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/soc15.c ++++ b/drivers/gpu/drm/amd/amdgpu/soc15.c +@@ -1429,9 +1429,6 @@ static void soc15_doorbell_range_init(st + ring->use_doorbell, ring->doorbell_index, + adev->doorbell_index.sdma_doorbell_range); + } +- +- adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, +- adev->irq.ih.doorbell_index); + } + } + +--- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c ++++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c +@@ -289,6 +289,10 @@ static int vega10_ih_irq_init(struct amd + } + } + ++ if (!amdgpu_sriov_vf(adev)) ++ adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, ++ adev->irq.ih.doorbell_index); ++ + pci_set_master(adev->pdev); + + /* enable interrupts */ +--- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c ++++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c +@@ -340,6 +340,10 @@ static int vega20_ih_irq_init(struct amd + } + } + ++ if (!amdgpu_sriov_vf(adev)) ++ adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, ++ adev->irq.ih.doorbell_index); ++ + pci_set_master(adev->pdev); + + /* enable interrupts */ diff --git a/queue-5.15/drm-amdgpu-move-nbio-sdma_doorbell_range-into-sdma-code-for-vega.patch b/queue-5.15/drm-amdgpu-move-nbio-sdma_doorbell_range-into-sdma-code-for-vega.patch new file mode 100644 index 00000000000..3bb5003c0d2 --- /dev/null +++ b/queue-5.15/drm-amdgpu-move-nbio-sdma_doorbell_range-into-sdma-code-for-vega.patch @@ -0,0 +1,96 @@ +From e3163bc8ffdfdb405e10530b140135b2ee487f89 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 9 Sep 2022 11:53:27 -0400 +Subject: drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alex Deucher + +commit e3163bc8ffdfdb405e10530b140135b2ee487f89 upstream. + +This mirrors what we do for other asics and this way we are +sure the sdma doorbell range is properly initialized. + +There is a comment about the way doorbells on gfx9 work that +requires that they are initialized for other IPs before GFX +is initialized. However, the statement says that it applies to +multimedia as well, but the VCN code currently initializes +doorbells after GFX and there are no known issues there. In my +testing at least I don't see any problems on SDMA. + +This is a prerequisite for fixing the Unsupported Request error +reported through AER during driver load. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=216373 + +The error was unnoticed before and got visible because of the commit +referenced below. This doesn't fix anything in the commit below, rather +fixes the issue in amdgpu exposed by the commit. The reference is only +to associate this commit with below one so that both go together. + +Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") + +Acked-by: Christian König +Reviewed-by: Lijo Lazar +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 +++++ + drivers/gpu/drm/amd/amdgpu/soc15.c | 22 ---------------------- + 2 files changed, 5 insertions(+), 22 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +@@ -1507,6 +1507,11 @@ static int sdma_v4_0_start(struct amdgpu + WREG32_SDMA(i, mmSDMA0_CNTL, temp); + + if (!amdgpu_sriov_vf(adev)) { ++ ring = &adev->sdma.instance[i].ring; ++ adev->nbio.funcs->sdma_doorbell_range(adev, i, ++ ring->use_doorbell, ring->doorbell_index, ++ adev->doorbell_index.sdma_doorbell_range); ++ + /* unhalt engine */ + temp = RREG32_SDMA(i, mmSDMA0_F32_CNTL); + temp = REG_SET_FIELD(temp, SDMA0_F32_CNTL, HALT, 0); +--- a/drivers/gpu/drm/amd/amdgpu/soc15.c ++++ b/drivers/gpu/drm/amd/amdgpu/soc15.c +@@ -1416,22 +1416,6 @@ static int soc15_common_sw_fini(void *ha + return 0; + } + +-static void soc15_doorbell_range_init(struct amdgpu_device *adev) +-{ +- int i; +- struct amdgpu_ring *ring; +- +- /* sdma/ih doorbell range are programed by hypervisor */ +- if (!amdgpu_sriov_vf(adev)) { +- for (i = 0; i < adev->sdma.num_instances; i++) { +- ring = &adev->sdma.instance[i].ring; +- adev->nbio.funcs->sdma_doorbell_range(adev, i, +- ring->use_doorbell, ring->doorbell_index, +- adev->doorbell_index.sdma_doorbell_range); +- } +- } +-} +- + static int soc15_common_hw_init(void *handle) + { + struct amdgpu_device *adev = (struct amdgpu_device *)handle; +@@ -1451,12 +1435,6 @@ static int soc15_common_hw_init(void *ha + + /* enable the doorbell aperture */ + soc15_enable_doorbell_aperture(adev, true); +- /* HW doorbell routing policy: doorbell writing not +- * in SDMA/IH/MM/ACV range will be routed to CP. So +- * we need to init SDMA/IH/MM/ACV doorbell range prior +- * to CP ip block init and ring test. +- */ +- soc15_doorbell_range_init(adev); + + return 0; + } diff --git a/queue-5.15/of-device-fix-up-of_dma_configure_id-stub.patch b/queue-5.15/of-device-fix-up-of_dma_configure_id-stub.patch new file mode 100644 index 00000000000..56f2a9d971c --- /dev/null +++ b/queue-5.15/of-device-fix-up-of_dma_configure_id-stub.patch @@ -0,0 +1,40 @@ +From 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Wed, 24 Aug 2022 17:32:56 +0200 +Subject: of/device: Fix up of_dma_configure_id() stub + +From: Thierry Reding + +commit 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 upstream. + +Since the stub version of of_dma_configure_id() was added in commit +a081bd4af4ce ("of/device: Add input id to of_dma_configure()"), it has +not matched the signature of the full function, leading to build failure +reports when code using this function is built on !OF configurations. + +Fixes: a081bd4af4ce ("of/device: Add input id to of_dma_configure()") +Cc: stable@vger.kernel.org +Signed-off-by: Thierry Reding +Reviewed-by: Frank Rowand +Acked-by: Lorenzo Pieralisi +Link: https://lore.kernel.org/r/20220824153256.1437483-1-thierry.reding@gmail.com +Signed-off-by: Rob Herring +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/of_device.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/include/linux/of_device.h ++++ b/include/linux/of_device.h +@@ -101,8 +101,9 @@ static inline struct device_node *of_cpu + } + + static inline int of_dma_configure_id(struct device *dev, +- struct device_node *np, +- bool force_dma) ++ struct device_node *np, ++ bool force_dma, ++ const u32 *id) + { + return 0; + } diff --git a/queue-5.15/parisc-allow-config_64bit-with-arch-parisc.patch b/queue-5.15/parisc-allow-config_64bit-with-arch-parisc.patch new file mode 100644 index 00000000000..e665dce717e --- /dev/null +++ b/queue-5.15/parisc-allow-config_64bit-with-arch-parisc.patch @@ -0,0 +1,56 @@ +From 805ce8614958c925877ba6b6dc26cdf9f8800474 Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Tue, 13 Sep 2022 08:51:10 +0200 +Subject: parisc: Allow CONFIG_64BIT with ARCH=parisc + +From: Helge Deller + +commit 805ce8614958c925877ba6b6dc26cdf9f8800474 upstream. + +The previous patch triggered a build failure for the debian kernel, +which has CONFIG_64BIT enabled, uses the CROSS_COMPILER environment +variable and uses ARCH=parisc to configure the kernel for 64-bit +support. + +This patch weakens the previous patch while keeping the recommended way +to configure the kernel with: + ARCH=parisc -> build 32-bit kernel + ARCH=parisc64 -> build 64-bit kernel +while adding the possibility for debian to configure a 64-bit kernel +even if ARCH=parisc is set (PA8X00 CPU has to be selected and +CONFIG_64BIT needs to be enabled). + +The downside of this patch is, that we now have a small window open +again where people may get it wrong: if they enable CONFIG_64BIT and try +to compile with a 32-bit compiler. + +Fixes: 3dcfb729b5f4 ("parisc: Make CONFIG_64BIT available for ARCH=parisc64 only") +Signed-off-by: Helge Deller +Cc: # 5.15+ +Signed-off-by: Greg Kroah-Hartman +--- + arch/parisc/Kconfig | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/arch/parisc/Kconfig ++++ b/arch/parisc/Kconfig +@@ -220,8 +220,18 @@ config MLONGCALLS + Enabling this option will probably slow down your kernel. + + config 64BIT +- def_bool "$(ARCH)" = "parisc64" ++ def_bool y if "$(ARCH)" = "parisc64" ++ bool "64-bit kernel" if "$(ARCH)" = "parisc" + depends on PA8X00 ++ help ++ Enable this if you want to support 64bit kernel on PA-RISC platform. ++ ++ At the moment, only people willing to use more than 2GB of RAM, ++ or having a 64bit-only capable PA-RISC machine should say Y here. ++ ++ Since there is no 64bit userland on PA-RISC, there is no point to ++ enable this option otherwise. The 64bit kernel is significantly bigger ++ and slower than the 32bit one. + + choice + prompt "Kernel page size" diff --git a/queue-5.15/series b/queue-5.15/series index 1ca1df7e15a..8383dbf67f6 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -15,3 +15,12 @@ drm-meson-fix-osd1-rgb-to-ycbcr-coefficient.patch block-blk_queue_enter-__bio_queue_enter-must-return-.patch parisc-ccio-dma-add-missing-iounmap-in-error-path-in.patch net-mvpp2-debugfs-fix-memory-leak-when-using-debugfs.patch +of-device-fix-up-of_dma_configure_id-stub.patch +cifs-revalidate-mapping-when-doing-direct-writes.patch +cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch +cifs-always-initialize-struct-msghdr-smb_msg-completely.patch +parisc-allow-config_64bit-with-arch-parisc.patch +tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch +drm-amdgpu-don-t-enable-ltr-if-not-supported.patch +drm-amdgpu-move-nbio-ih_doorbell_range-into-ih-code-for-vega.patch +drm-amdgpu-move-nbio-sdma_doorbell_range-into-sdma-code-for-vega.patch diff --git a/queue-5.15/tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch b/queue-5.15/tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch new file mode 100644 index 00000000000..340adf7770b --- /dev/null +++ b/queue-5.15/tools-include-uapi-fix-asm-errno.h-for-parisc-and-xtensa.patch @@ -0,0 +1,37 @@ +From 95363747a6f39e88a3052fcf6ce6237769495ce0 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Tue, 25 Aug 2020 23:27:40 +0100 +Subject: tools/include/uapi: Fix for parisc and xtensa + +From: Ben Hutchings + +commit 95363747a6f39e88a3052fcf6ce6237769495ce0 upstream. + +tools/include/uapi/asm/errno.h currently attempts to include +non-existent arch-specific errno.h header for xtensa. +Remove this case so that is used instead, +and add the missing arch-specific header for parisc. + +References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=ia64&ver=5.8.3-1%7Eexp1&stamp=1598340829&raw=1 +Signed-off-by: Ben Hutchings +Signed-off-by: Salvatore Bonaccorso +Cc: # 5.10+ +Signed-off-by: Helge Deller +Signed-off-by: Greg Kroah-Hartman +--- + tools/include/uapi/asm/errno.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/tools/include/uapi/asm/errno.h ++++ b/tools/include/uapi/asm/errno.h +@@ -9,8 +9,8 @@ + #include "../../../arch/alpha/include/uapi/asm/errno.h" + #elif defined(__mips__) + #include "../../../arch/mips/include/uapi/asm/errno.h" +-#elif defined(__xtensa__) +-#include "../../../arch/xtensa/include/uapi/asm/errno.h" ++#elif defined(__hppa__) ++#include "../../../arch/parisc/include/uapi/asm/errno.h" + #else + #include + #endif