Skip to content

Commit

Permalink
Merge tag 'dmaengine-6.7-rc1' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/vkoul/dmaengine

Pull dmaengine updates from Vinod Koul:

 - Big pile of __counted_by attribute annotations to several structures
   for bounds checking of flexible arrays at run-time

 - Another big pile platform remove callback returning void changes

 - Device tree device_get_match_data() usage and dropping
   of_match_device() calls

 - Minor driver updates to pxa, idxd fsl, hisi etc drivers

* tag 'dmaengine-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (106 commits)
  dmaengine: stm32-mdma: correct desc prep when channel running
  dmaengine: dw-axi-dmac: Add support DMAX_NUM_CHANNELS > 16
  dmaengine: xilinx: xilinx_dma: Fix kernel doc about xilinx_dma_remove()
  dmaengine: mmp_tdma: drop unused variable 'of_id'
  MAINTAINERS: Add entries for NXP(Freescale) eDMA drivers
  dmaengine: xilinx: xdma: Support cyclic transfers
  dmaengine: xilinx: xdma: Prepare the introduction of cyclic transfers
  dmaengine: Drop unnecessary of_match_device() calls
  dmaengine: Use device_get_match_data()
  dmaengine: pxa_dma: Annotate struct pxad_desc_sw with __counted_by
  dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()
  dmaengine: xilinx: xdma: Use resource_size() in xdma_probe()
  dmaengine: fsl-dpaa2-qdma: Remove redundant initialization owner in dpaa2_qdma_driver
  dmaengine: Remove unused declaration dma_chan_cleanup()
  dmaengine: mmp: fix Wvoid-pointer-to-enum-cast warning
  dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
  dmaengine: fsl-edma: Remove redundant dev_err() for platform_get_irq()
  dmaengine: ep93xx_dma: Annotate struct ep93xx_dma_engine with __counted_by
  dmaengine: idxd: add wq driver name support for accel-config user tool
  dmaengine: fsl-edma: Annotate struct struct fsl_edma_engine with __counted_by
  ...
  • Loading branch information
torvalds committed Nov 4, 2023
2 parents 2c40c1c + 03f25d5 commit d934aef
Show file tree
Hide file tree
Showing 83 changed files with 580 additions and 428 deletions.
6 changes: 6 additions & 0 deletions Documentation/ABI/stable/sysfs-driver-dma-idxd
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ Description: Shows the operation capability bits displayed in bitmap format
correlates to the operations allowed. It's visible only
on platforms that support the capability.

What: /sys/bus/dsa/devices/wq<m>.<n>/driver_name
Date: Sept 8, 2023
KernelVersion: 6.7.0
Contact: [email protected]
Description: Name of driver to be bounded to the wq.

What: /sys/bus/dsa/devices/engine<m>.<n>/group_id
Date: Oct 25, 2019
KernelVersion: 5.6.0
Expand Down
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/dma/qcom,gpi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ properties:
dma-channel-mask:
maxItems: 1

dma-coherent: true

required:
- compatible
- reg
Expand Down
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8338,6 +8338,14 @@ F: Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
F: drivers/spi/spi-fsl-dspi.c
F: include/linux/spi/spi-fsl-dspi.h

FREESCALE eDMA DRIVER
M: Frank Li <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
F: Documentation/devicetree/bindings/dma/fsl,edma.yaml
F: drivers/dma/fsl-edma*.*

FREESCALE ENETC ETHERNET DRIVERS
M: Claudiu Manoil <[email protected]>
M: Vladimir Oltean <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ config INTEL_IOATDMA

config K3_DMA
tristate "Hisilicon K3 DMA support"
depends on ARCH_HI3xxx || ARCH_HISI || COMPILE_TEST
depends on ARCH_HISI || COMPILE_TEST
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Expand Down
6 changes: 2 additions & 4 deletions drivers/dma/altera-msgdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ static int msgdma_probe(struct platform_device *pdev)
*
* Return: Always '0'
*/
static int msgdma_remove(struct platform_device *pdev)
static void msgdma_remove(struct platform_device *pdev)
{
struct msgdma_device *mdev = platform_get_drvdata(pdev);

Expand All @@ -933,8 +933,6 @@ static int msgdma_remove(struct platform_device *pdev)
msgdma_dev_remove(mdev);

dev_notice(&pdev->dev, "Altera mSGDMA driver removed\n");

return 0;
}

#ifdef CONFIG_OF
Expand All @@ -952,7 +950,7 @@ static struct platform_driver msgdma_driver = {
.of_match_table = of_match_ptr(msgdma_match),
},
.probe = msgdma_probe,
.remove = msgdma_remove,
.remove_new = msgdma_remove,
};

module_platform_driver(msgdma_driver);
Expand Down
8 changes: 3 additions & 5 deletions drivers/dma/apple-admac.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct admac_data {
int irq;
int irq_index;
int nchannels;
struct admac_chan channels[];
struct admac_chan channels[] __counted_by(nchannels);
};

struct admac_tx {
Expand Down Expand Up @@ -925,16 +925,14 @@ static int admac_probe(struct platform_device *pdev)
return err;
}

static int admac_remove(struct platform_device *pdev)
static void admac_remove(struct platform_device *pdev)
{
struct admac_data *ad = platform_get_drvdata(pdev);

of_dma_controller_free(pdev->dev.of_node);
dma_async_device_unregister(&ad->dma);
free_irq(ad->irq, ad);
reset_control_rearm(ad->rstc);

return 0;
}

static const struct of_device_id admac_of_match[] = {
Expand All @@ -949,7 +947,7 @@ static struct platform_driver apple_admac_driver = {
.of_match_table = admac_of_match,
},
.probe = admac_probe,
.remove = admac_remove,
.remove_new = admac_remove,
};
module_platform_driver(apple_admac_driver);

Expand Down
8 changes: 3 additions & 5 deletions drivers/dma/at_hdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ struct at_desc {
bool memset_buffer;
dma_addr_t memset_paddr;
int *memset_vaddr;
struct atdma_sg sg[];
struct atdma_sg sg[] __counted_by(sglen);
};

/*-- Channels --------------------------------------------------------*/
Expand Down Expand Up @@ -2100,7 +2100,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
return err;
}

static int at_dma_remove(struct platform_device *pdev)
static void at_dma_remove(struct platform_device *pdev)
{
struct at_dma *atdma = platform_get_drvdata(pdev);
struct dma_chan *chan, *_chan;
Expand All @@ -2122,8 +2122,6 @@ static int at_dma_remove(struct platform_device *pdev)
}

clk_disable_unprepare(atdma->clk);

return 0;
}

static void at_dma_shutdown(struct platform_device *pdev)
Expand Down Expand Up @@ -2242,7 +2240,7 @@ static const struct dev_pm_ops __maybe_unused at_dma_dev_pm_ops = {
};

static struct platform_driver at_dma_driver = {
.remove = at_dma_remove,
.remove_new = at_dma_remove,
.shutdown = at_dma_shutdown,
.id_table = atdma_devtypes,
.driver = {
Expand Down
6 changes: 2 additions & 4 deletions drivers/dma/at_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2431,7 +2431,7 @@ static int at_xdmac_probe(struct platform_device *pdev)
return ret;
}

static int at_xdmac_remove(struct platform_device *pdev)
static void at_xdmac_remove(struct platform_device *pdev)
{
struct at_xdmac *atxdmac = (struct at_xdmac *)platform_get_drvdata(pdev);
int i;
Expand All @@ -2452,8 +2452,6 @@ static int at_xdmac_remove(struct platform_device *pdev)
tasklet_kill(&atchan->tasklet);
at_xdmac_free_chan_resources(&atchan->chan);
}

return 0;
}

static const struct dev_pm_ops __maybe_unused atmel_xdmac_dev_pm_ops = {
Expand All @@ -2478,7 +2476,7 @@ MODULE_DEVICE_TABLE(of, atmel_xdmac_dt_ids);

static struct platform_driver at_xdmac_driver = {
.probe = at_xdmac_probe,
.remove = at_xdmac_remove,
.remove_new = at_xdmac_remove,
.driver = {
.name = "at_xdmac",
.of_match_table = of_match_ptr(atmel_xdmac_dt_ids),
Expand Down
6 changes: 2 additions & 4 deletions drivers/dma/bcm-sba-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ static int sba_probe(struct platform_device *pdev)
return ret;
}

static int sba_remove(struct platform_device *pdev)
static void sba_remove(struct platform_device *pdev)
{
struct sba_device *sba = platform_get_drvdata(pdev);

Expand All @@ -1745,8 +1745,6 @@ static int sba_remove(struct platform_device *pdev)
sba_freeup_channel_resources(sba);

mbox_free_channel(sba->mchan);

return 0;
}

static const struct of_device_id sba_of_match[] = {
Expand All @@ -1758,7 +1756,7 @@ MODULE_DEVICE_TABLE(of, sba_of_match);

static struct platform_driver sba_driver = {
.probe = sba_probe,
.remove = sba_remove,
.remove_new = sba_remove,
.driver = {
.name = "bcm-sba-raid",
.of_match_table = sba_of_match,
Expand Down
6 changes: 2 additions & 4 deletions drivers/dma/bcm2835-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,19 +1019,17 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
return rc;
}

static int bcm2835_dma_remove(struct platform_device *pdev)
static void bcm2835_dma_remove(struct platform_device *pdev)
{
struct bcm2835_dmadev *od = platform_get_drvdata(pdev);

dma_async_device_unregister(&od->ddev);
bcm2835_dma_free(od);

return 0;
}

static struct platform_driver bcm2835_dma_driver = {
.probe = bcm2835_dma_probe,
.remove = bcm2835_dma_remove,
.remove_new = bcm2835_dma_remove,
.driver = {
.name = "bcm2835-dma",
.of_match_table = of_match_ptr(bcm2835_dma_of_match),
Expand Down
6 changes: 2 additions & 4 deletions drivers/dma/bestcomm/bestcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ static int mpc52xx_bcom_probe(struct platform_device *op)
}


static int mpc52xx_bcom_remove(struct platform_device *op)
static void mpc52xx_bcom_remove(struct platform_device *op)
{
/* Clean up the engine */
bcom_engine_cleanup();
Expand All @@ -473,8 +473,6 @@ static int mpc52xx_bcom_remove(struct platform_device *op)
/* Release memory */
kfree(bcom_eng);
bcom_eng = NULL;

return 0;
}

static const struct of_device_id mpc52xx_bcom_of_match[] = {
Expand All @@ -488,7 +486,7 @@ MODULE_DEVICE_TABLE(of, mpc52xx_bcom_of_match);

static struct platform_driver mpc52xx_bcom_of_platform_driver = {
.probe = mpc52xx_bcom_probe,
.remove = mpc52xx_bcom_remove,
.remove_new = mpc52xx_bcom_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = mpc52xx_bcom_of_match,
Expand Down
11 changes: 4 additions & 7 deletions drivers/dma/dma-axi-dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct axi_dmac_desc {
unsigned int num_submitted;
unsigned int num_completed;
unsigned int num_sgs;
struct axi_dmac_sg sg[];
struct axi_dmac_sg sg[] __counted_by(num_sgs);
};

struct axi_dmac_chan {
Expand Down Expand Up @@ -484,12 +484,11 @@ static struct axi_dmac_desc *axi_dmac_alloc_desc(unsigned int num_sgs)
desc = kzalloc(struct_size(desc, sg, num_sgs), GFP_NOWAIT);
if (!desc)
return NULL;
desc->num_sgs = num_sgs;

for (i = 0; i < num_sgs; i++)
desc->sg[i].id = AXI_DMAC_SG_UNUSED;

desc->num_sgs = num_sgs;

return desc;
}

Expand Down Expand Up @@ -1029,7 +1028,7 @@ static int axi_dmac_probe(struct platform_device *pdev)
return ret;
}

static int axi_dmac_remove(struct platform_device *pdev)
static void axi_dmac_remove(struct platform_device *pdev)
{
struct axi_dmac *dmac = platform_get_drvdata(pdev);

Expand All @@ -1038,8 +1037,6 @@ static int axi_dmac_remove(struct platform_device *pdev)
tasklet_kill(&dmac->chan.vchan.task);
dma_async_device_unregister(&dmac->dma_dev);
clk_disable_unprepare(dmac->clk);

return 0;
}

static const struct of_device_id axi_dmac_of_match_table[] = {
Expand All @@ -1054,7 +1051,7 @@ static struct platform_driver axi_dmac_driver = {
.of_match_table = axi_dmac_of_match_table,
},
.probe = axi_dmac_probe,
.remove = axi_dmac_remove,
.remove_new = axi_dmac_remove,
};
module_platform_driver(axi_dmac_driver);

Expand Down
6 changes: 2 additions & 4 deletions drivers/dma/dma-jz4780.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ static int jz4780_dma_probe(struct platform_device *pdev)
return ret;
}

static int jz4780_dma_remove(struct platform_device *pdev)
static void jz4780_dma_remove(struct platform_device *pdev)
{
struct jz4780_dma_dev *jzdma = platform_get_drvdata(pdev);
int i;
Expand All @@ -1020,8 +1020,6 @@ static int jz4780_dma_remove(struct platform_device *pdev)

for (i = 0; i < jzdma->soc_data->nb_channels; i++)
tasklet_kill(&jzdma->chan[i].vchan.task);

return 0;
}

static const struct jz4780_dma_soc_data jz4740_dma_soc_data = {
Expand Down Expand Up @@ -1124,7 +1122,7 @@ MODULE_DEVICE_TABLE(of, jz4780_dma_dt_match);

static struct platform_driver jz4780_dma_driver = {
.probe = jz4780_dma_probe,
.remove = jz4780_dma_remove,
.remove_new = jz4780_dma_remove,
.driver = {
.name = "jz4780-dma",
.of_match_table = jz4780_dma_dt_match,
Expand Down
Loading

0 comments on commit d934aef

Please sign in to comment.