You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pussuw (via GitHub)" <gi...@apache.org> on 2024/04/24 11:36:36 UTC
[PR] arm64/imx9: Add DMA memory allocator [nuttx]
pussuw opened a new pull request, #12228:
URL: https://github.com/apache/nuttx/pull/12228
## Summary
Add a DMA memory allocator for iMX9. Can be used for FAT sector buffers, peripheral DMA buffers and so forth. Separate, properly aligned buffers are needed for cache line alignment.
## Impact
Add cache safe DMA buffers
## Testing
imx93-evk:nsh
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "pussuw (via GitHub)" <gi...@apache.org>.
pussuw commented on code in PR #12228:
URL: https://github.com/apache/nuttx/pull/12228#discussion_r1578153280
##########
arch/arm64/src/imx9/imx9_lpspi.c:
##########
@@ -1338,6 +1341,17 @@ static void imx9_lpspi_exchange(struct spi_dev_s *dev,
return;
}
+ /* Check if the transfer is too long */
+
+ if (nbytes > CONFIG_IMX9_LPSPI_DMA_BUFFER_SIZE)
+ {
+ /* Transfer is too long, revert to slow non-DMA method */
+
+ DEBUGPANIC();
Review Comment:
Sure, change to spiwarn() trace or something else ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "pussuw (via GitHub)" <gi...@apache.org>.
pussuw commented on code in PR #12228:
URL: https://github.com/apache/nuttx/pull/12228#discussion_r1577758558
##########
arch/arm64/src/imx9/imx9_lpspi.c:
##########
@@ -1338,6 +1341,17 @@ static void imx9_lpspi_exchange(struct spi_dev_s *dev,
return;
}
+ /* Check if the transfer is too long */
+
+ if (nbytes > CONFIG_IMX9_LPSPI_DMA_BUFFER_SIZE)
+ {
+ /* Transfer is too long, revert to slow non-DMA method */
+
+ DEBUGPANIC();
Review Comment:
It's just a debugpanic, so the developer notices that the DMA buffer size is too small. It has to be a run-time check. The non-DMA method is slow because it's just a polling / busylooping method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "simbit18 (via GitHub)" <gi...@apache.org>.
simbit18 commented on PR #12228:
URL: https://github.com/apache/nuttx/pull/12228#issuecomment-2075303281
@acassis https://www.githubstatus.com/
https://github.com/microsoft/linux-package-repositories/issues/130#issuecomment-2074910628
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12228:
URL: https://github.com/apache/nuttx/pull/12228#discussion_r1578852682
##########
arch/arm64/src/imx9/imx9_lpspi.c:
##########
@@ -1338,6 +1341,17 @@ static void imx9_lpspi_exchange(struct spi_dev_s *dev,
return;
}
+ /* Check if the transfer is too long */
+
+ if (nbytes > CONFIG_IMX9_LPSPI_DMA_BUFFER_SIZE)
+ {
+ /* Transfer is too long, revert to slow non-DMA method */
+
+ DEBUGPANIC();
Review Comment:
ok.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12228:
URL: https://github.com/apache/nuttx/pull/12228
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12228:
URL: https://github.com/apache/nuttx/pull/12228#discussion_r1578080855
##########
arch/arm64/src/imx9/imx9_lpspi.c:
##########
@@ -1338,6 +1341,17 @@ static void imx9_lpspi_exchange(struct spi_dev_s *dev,
return;
}
+ /* Check if the transfer is too long */
+
+ if (nbytes > CONFIG_IMX9_LPSPI_DMA_BUFFER_SIZE)
+ {
+ /* Transfer is too long, revert to slow non-DMA method */
+
+ DEBUGPANIC();
Review Comment:
so, should we change to warning?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12228:
URL: https://github.com/apache/nuttx/pull/12228#discussion_r1577752032
##########
arch/arm64/src/imx9/imx9_lpspi.c:
##########
@@ -1338,6 +1341,17 @@ static void imx9_lpspi_exchange(struct spi_dev_s *dev,
return;
}
+ /* Check if the transfer is too long */
+
+ if (nbytes > CONFIG_IMX9_LPSPI_DMA_BUFFER_SIZE)
+ {
+ /* Transfer is too long, revert to slow non-DMA method */
+
+ DEBUGPANIC();
Review Comment:
why panic?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arm64/imx9: Add DMA memory allocator [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12228:
URL: https://github.com/apache/nuttx/pull/12228#issuecomment-2075268089
@xiaoxiang781216 is there some way to fix it:
```
E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease' is no longer signed.
Error: Process completed with exit code 100.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org