You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/23 13:05:42 UTC
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7174: stm32h7:SDMMA fix unaligned access for buffers not on 32 bit boundaries
pkarashchenko commented on code in PR #7174:
URL: https://github.com/apache/incubator-nuttx/pull/7174#discussion_r978625123
##########
arch/arm/src/stm32h7/stm32_sdmmc.c:
##########
@@ -381,10 +381,14 @@ struct stm32_dev_s
#if !defined(CONFIG_STM32H7_SDMMC_IDMA)
struct work_s cbfifo; /* Monitor for Lame FIFO */
#endif
- uint8_t rxfifo[FIFO_SIZE_IN_BYTES] /* To offload with IDMA */
- aligned_data(ARMV7M_DCACHE_LINESIZE);
-#if defined(CONFIG_ARMV7M_DCACHE) && defined(CONFIG_STM32H7_SDMMC_IDMA)
- bool unaligned_rx; /* read buffer is not cache-line aligned */
+ uint8_t rxfifo[FIFO_SIZE_IN_BYTES] /* To offload with IDMA and support un-alinged buffers */
+ __attribute__((aligned(ARMV7M_DCACHE_LINESIZE)));
Review Comment:
Maybe use a macro from compiler.h?
Or alloc and uint32_t arrays for rounded up size in bytes divided by 4.
--
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