From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, Guenter Roeck <linux@roeck-us.net>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10 07/11] Revert "MIPS: Alchemy: fix dbdma2"
Date: Thu, 31 Aug 2023 13:09:59 +0200 [thread overview]
Message-ID: <20230831110830.744701188@linuxfoundation.org> (raw)
In-Reply-To: <20230831110830.455765526@linuxfoundation.org>
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This reverts commit 619672bf2d04cdc1bc3925defd0312c2ef11e5d0 which is
commit 2d645604f69f3a772d58ead702f9a8e84ab2b342 upstream.
It breaks the build, so should be dropped.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/5b30ff73-46cb-1d1e-3823-f175dbfbd91b@roeck-us.net
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/alchemy/common/dbdma.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
--- a/arch/mips/alchemy/common/dbdma.c
+++ b/arch/mips/alchemy/common/dbdma.c
@@ -30,7 +30,6 @@
*
*/
-#include <linux/dma-map-ops.h> /* for dma_default_coherent */
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -624,18 +623,17 @@ u32 au1xxx_dbdma_put_source(u32 chanid,
dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
/*
- * There is an erratum on certain Au1200/Au1550 revisions that could
- * result in "stale" data being DMA'ed. It has to do with the snoop
- * logic on the cache eviction buffer. dma_default_coherent is set
- * to false on these parts.
+ * There is an errata on the Au1200/Au1550 parts that could result
+ * in "stale" data being DMA'ed. It has to do with the snoop logic on
+ * the cache eviction buffer. DMA_NONCOHERENT is on by default for
+ * these parts. If it is fixed in the future, these dma_cache_inv will
+ * just be nothing more than empty macros. See io.h.
*/
- if (!dma_default_coherent)
- dma_cache_wback_inv(KSEG0ADDR(buf), nbytes);
+ dma_cache_wback_inv((unsigned long)buf, nbytes);
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
wmb(); /* drain writebuffer */
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
ctp->chan_ptr->ddma_dbell = 0;
- wmb(); /* force doorbell write out to dma engine */
/* Get next descriptor pointer. */
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
@@ -687,18 +685,17 @@ u32 au1xxx_dbdma_put_dest(u32 chanid, dm
dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
#endif
/*
- * There is an erratum on certain Au1200/Au1550 revisions that could
- * result in "stale" data being DMA'ed. It has to do with the snoop
- * logic on the cache eviction buffer. dma_default_coherent is set
- * to false on these parts.
+ * There is an errata on the Au1200/Au1550 parts that could result in
+ * "stale" data being DMA'ed. It has to do with the snoop logic on the
+ * cache eviction buffer. DMA_NONCOHERENT is on by default for these
+ * parts. If it is fixed in the future, these dma_cache_inv will just
+ * be nothing more than empty macros. See io.h.
*/
- if (!dma_default_coherent)
- dma_cache_inv(KSEG0ADDR(buf), nbytes);
+ dma_cache_inv((unsigned long)buf, nbytes);
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
wmb(); /* drain writebuffer */
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
ctp->chan_ptr->ddma_dbell = 0;
- wmb(); /* force doorbell write out to dma engine */
/* Get next descriptor pointer. */
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
next prev parent reply other threads:[~2023-08-31 11:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 11:09 [PATCH 5.10 00/11] 5.10.194-rc1 review Greg Kroah-Hartman
2023-08-31 11:09 ` [PATCH 5.10 01/11] module: Expose module_init_layout_section() Greg Kroah-Hartman
2023-08-31 11:09 ` [PATCH 5.10 02/11] arm64: module-plts: inline linux/moduleloader.h Greg Kroah-Hartman
2023-08-31 11:09 ` [PATCH 5.10 03/11] arm64: module: Use module_init_layout_section() to spot init sections Greg Kroah-Hartman
2023-08-31 11:09 ` [PATCH 5.10 04/11] ARM: " Greg Kroah-Hartman
2023-08-31 11:09 ` [PATCH 5.10 05/11] mhi: pci_generic: Fix implicit conversion warning Greg Kroah-Hartman
2023-08-31 11:09 ` [PATCH 5.10 06/11] Revert "drm/amdgpu: install stub fence into potential unused fence pointers" Greg Kroah-Hartman
2023-08-31 11:09 ` Greg Kroah-Hartman [this message]
2023-08-31 11:10 ` [PATCH 5.10 08/11] rcu: Prevent expedited GP from enabling tick on offline CPU Greg Kroah-Hartman
2023-08-31 11:10 ` [PATCH 5.10 09/11] rcu-tasks: Fix IPI failure handling in trc_wait_for_one_reader Greg Kroah-Hartman
2023-08-31 11:10 ` [PATCH 5.10 10/11] rcu-tasks: Wait for trc_read_check_handler() IPIs Greg Kroah-Hartman
2023-08-31 11:10 ` [PATCH 5.10 11/11] rcu-tasks: Add trc_inspect_reader() checks for exiting critical section Greg Kroah-Hartman
2023-08-31 20:22 ` [PATCH 5.10 00/11] 5.10.194-rc1 review Florian Fainelli
2023-09-01 9:28 ` Sudip Mukherjee (Codethink)
2023-09-01 11:59 ` Naresh Kamboju
2023-09-01 15:50 ` Shuah Khan
2023-09-01 19:58 ` Jon Hunter
2023-09-02 4:18 ` Guenter Roeck
2023-09-18 21:33 ` Naresh Kamboju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230831110830.744701188@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux@roeck-us.net \
--cc=patches@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.