Skip to content

Commit 3eb8e8a

Browse files
committed
Merge: [RHEL 10.1] DMAEngine subsystem update
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/595 # Merge Request Required Information Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next branch ## Summary of Changes Update through v6.14 merge window. * Function level reset support for idxd * Various clean ups and fixes * ae4dma driver and ptdma support for ae4dma functionality ## Approved Development Ticket(s) JIRA: https://issues.redhat.com/browse/RHEL-47413 JIRA: https://issues.redhat.com/browse/RHEL-78703 Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com> Approved-by: Eder Zulian <ezulian@redhat.com> Approved-by: Eric Chanudet <echanude@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Julio Faracco <jfaracco@redhat.com>
2 parents 5672fa4 + cc07a95 commit 3eb8e8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+730
-263
lines changed

Documentation/driver-api/driver-model/devres.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ SERDEV
458458

459459
SLAVE DMA ENGINE
460460
devm_acpi_dma_controller_register()
461-
devm_acpi_dma_controller_free()
462461

463462
SPI
464463
devm_spi_alloc_master()

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,8 +1156,8 @@ F: tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py
11561156
AMD PTDMA DRIVER
11571157
M: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
11581158
L: dmaengine@vger.kernel.org
1159-
S: Maintained
1160-
F: drivers/dma/ptdma/
1159+
S: Supported
1160+
F: drivers/dma/amd/ptdma/
11611161

11621162
AMD QDMA DRIVER
11631163
M: Nishad Saraf <nishads@amd.com>

drivers/dma/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,6 @@ source "drivers/dma/bestcomm/Kconfig"
740740

741741
source "drivers/dma/mediatek/Kconfig"
742742

743-
source "drivers/dma/ptdma/Kconfig"
744-
745743
source "drivers/dma/qcom/Kconfig"
746744

747745
source "drivers/dma/dw/Kconfig"

drivers/dma/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ obj-$(CONFIG_DMATEST) += dmatest.o
1616
obj-$(CONFIG_ALTERA_MSGDMA) += altera-msgdma.o
1717
obj-$(CONFIG_AMBA_PL08X) += amba-pl08x.o
1818
obj-$(CONFIG_AMCC_PPC440SPE_ADMA) += ppc4xx/
19-
obj-$(CONFIG_AMD_PTDMA) += ptdma/
2019
obj-$(CONFIG_APPLE_ADMAC) += apple-admac.o
2120
obj-$(CONFIG_AT_HDMAC) += at_hdmac.o
2221
obj-$(CONFIG_AT_XDMAC) += at_xdmac.o

drivers/dma/acpi-dma.c

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@
99
* Mika Westerberg <mika.westerberg@linux.intel.com>
1010
*/
1111

12+
#include <linux/acpi.h>
13+
#include <linux/acpi_dma.h>
1214
#include <linux/device.h>
1315
#include <linux/dma-mapping.h>
1416
#include <linux/err.h>
15-
#include <linux/module.h>
17+
#include <linux/errno.h>
18+
#include <linux/export.h>
19+
#include <linux/ioport.h>
1620
#include <linux/kernel.h>
1721
#include <linux/list.h>
1822
#include <linux/mutex.h>
19-
#include <linux/slab.h>
20-
#include <linux/ioport.h>
21-
#include <linux/acpi.h>
22-
#include <linux/acpi_dma.h>
2323
#include <linux/property.h>
24+
#include <linux/slab.h>
25+
#include <linux/string.h>
26+
#include <linux/types.h>
2427

2528
static LIST_HEAD(acpi_dma_list);
2629
static DEFINE_MUTEX(acpi_dma_lock);
@@ -236,7 +239,7 @@ int acpi_dma_controller_free(struct device *dev)
236239
}
237240
EXPORT_SYMBOL_GPL(acpi_dma_controller_free);
238241

239-
static void devm_acpi_dma_release(struct device *dev, void *res)
242+
static void devm_acpi_dma_free(void *dev)
240243
{
241244
acpi_dma_controller_free(dev);
242245
}
@@ -259,37 +262,15 @@ int devm_acpi_dma_controller_register(struct device *dev,
259262
(struct acpi_dma_spec *, struct acpi_dma *),
260263
void *data)
261264
{
262-
void *res;
263265
int ret;
264266

265-
res = devres_alloc(devm_acpi_dma_release, 0, GFP_KERNEL);
266-
if (!res)
267-
return -ENOMEM;
268-
269267
ret = acpi_dma_controller_register(dev, acpi_dma_xlate, data);
270-
if (ret) {
271-
devres_free(res);
268+
if (ret)
272269
return ret;
273-
}
274-
devres_add(dev, res);
275-
return 0;
276-
}
277-
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_register);
278270

279-
/**
280-
* devm_acpi_dma_controller_free - resource managed acpi_dma_controller_free()
281-
* @dev: device that is unregistering as DMA controller
282-
*
283-
* Unregister a DMA controller registered with
284-
* devm_acpi_dma_controller_register(). Normally this function will not need to
285-
* be called and the resource management code will ensure that the resource is
286-
* freed.
287-
*/
288-
void devm_acpi_dma_controller_free(struct device *dev)
289-
{
290-
WARN_ON(devres_release(dev, devm_acpi_dma_release, NULL, NULL));
271+
return devm_add_action_or_reset(dev, devm_acpi_dma_free, dev);
291272
}
292-
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_free);
273+
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_register);
293274

294275
/**
295276
* acpi_dma_update_dma_spec - prepare dma specifier to pass to translation function

drivers/dma/altera-msgdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ static struct platform_driver msgdma_driver = {
954954
.of_match_table = of_match_ptr(msgdma_match),
955955
},
956956
.probe = msgdma_probe,
957-
.remove_new = msgdma_remove,
957+
.remove = msgdma_remove,
958958
};
959959

960960
module_platform_driver(msgdma_driver);

drivers/dma/amd/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2+
#
3+
config AMD_PTDMA
4+
tristate "AMD PassThru DMA Engine"
5+
depends on X86_64 && PCI
6+
select DMA_ENGINE
7+
select DMA_VIRTUAL_CHANNELS
8+
help
9+
Enable support for the AMD PTDMA controller. This controller
10+
provides DMA capabilities to perform high bandwidth memory to
11+
memory and IO copy operations. It performs DMA transfer through
12+
queue-based descriptor management. This DMA controller is intended
13+
to be used with AMD Non-Transparent Bridge devices and not for
14+
general purpose peripheral DMA.
215

316
config AMD_QDMA
417
tristate "AMD Queue-based DMA"

drivers/dma/amd/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3+
obj-$(CONFIG_AMD_PTDMA) += ptdma/
34
obj-$(CONFIG_AMD_QDMA) += qdma/
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)