Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1240317
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2 2/2] dmaengine: tegra-adma: Add support for Tegra210 ADMA |
| Date | 2015-10-06 11:40 +0200 |
| Message-ID | <qgwT0-2d0-19@gated-at.bofh.it> (permalink) |
| References | <qgcUh-73G-3@gated-at.bofh.it> <qgcUh-73G-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Monday 05 October 2015 13:10:07 Jon Hunter wrote:
> Add support for the Tegra210 Audio DMA controller that is used for
> transferring data between system memory and the Audio sub-system.
> The driver only supports cyclic transfers because this is being solely
> used for audio.
>
> This driver is based upon the work by Dara Ramesh <dramesh@nvidia.com>.
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
This version looks much better!
Just one small comment:
> + slave_req = dma_spec->args[0];
> + slave_dir = dma_spec->args[1];
> +
> + if (slave_req == 0)
> + return NULL;
> +
> + switch (slave_dir) {
> + case ADMA_AHUB_TO_MEM:
> + if (slave_req > tdma->rx_requests)
> + return NULL;
> +
> + if (tdma->rx_requests_reserved & BIT(slave_req))
> + return NULL;
> +
> + tdma->rx_requests_reserved |= BIT(slave_req);
> + break;
The rx_requests_reserved logic looks racy, if you have more than
one concurrent request or release. Better use atomic_test_and_set()
here and turn the variable into an atomic_t.
Arbd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 0/2] Add support for Tegra210 ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-05 14:20 +0200
[PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-05 14:20 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Mark Rutland <mark.rutland@arm.com> - 2015-10-05 15:20 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-06 11:20 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-07 01:00 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-07 17:30 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-07 18:10 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Mark Rutland <mark.rutland@arm.com> - 2015-10-07 18:40 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-07 01:10 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-07 10:50 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-07 18:10 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-07 18:30 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-07 21:40 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-08 12:00 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-08 16:30 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-09 12:30 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-09 17:30 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-12 16:00 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Stephen Warren <swarren@wwwdotorg.org> - 2015-10-12 20:00 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-13 15:00 +0200
Re: [PATCH V2 1/2] Documentation: DT: Add binding documentation for NVIDIA ADMA Mark Rutland <mark.rutland@arm.com> - 2015-10-07 18:40 +0200
[PATCH V2 2/2] dmaengine: tegra-adma: Add support for Tegra210 ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-05 14:20 +0200
Re: [PATCH V2 2/2] dmaengine: tegra-adma: Add support for Tegra210 ADMA Arnd Bergmann <arnd@arndb.de> - 2015-10-06 11:40 +0200
Re: [PATCH V2 2/2] dmaengine: tegra-adma: Add support for Tegra210 ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-06 11:50 +0200
Re: [PATCH V2 2/2] dmaengine: tegra-adma: Add support for Tegra210 ADMA Vinod Koul <vinod.koul@intel.com> - 2015-10-14 13:30 +0200
Re: [PATCH V2 2/2] dmaengine: tegra-adma: Add support for Tegra210 ADMA Jon Hunter <jonathanh@nvidia.com> - 2015-10-14 15:40 +0200
csiph-web