You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/09/27 20:58:23 UTC

[GitHub] [mynewt-core] kasjer opened a new pull request, #2888: mcu/pic32mz: Add d-cache flushing functions

kasjer opened a new pull request, #2888:
URL: https://github.com/apache/mynewt-core/pull/2888

   Add D-cache flushing functions if L1 CACHE is present.


-- 
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@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2888: mcu/pic32mz: Add d-cache flushing functions

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on PR #2888:
URL: https://github.com/apache/mynewt-core/pull/2888#issuecomment-1260048430

   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


-- 
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@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] sjanc commented on a diff in pull request #2888: mcu/pic32mz: Add d-cache flushing functions

Posted by GitBox <gi...@apache.org>.
sjanc commented on code in PR #2888:
URL: https://github.com/apache/mynewt-core/pull/2888#discussion_r982853107


##########
hw/mcu/microchip/pic32mz/src/system_pic32.c:
##########
@@ -42,6 +42,27 @@ static inline int PLL_ODIV(int n)
 
 uint32_t SystemCoreClock;
 
+#if __PIC32_HAS_L1CACHE
+void
+dcache_flush_area(void *addr, int size)
+{
+    uint32_t a = (uint32_t)(addr) & ~3;
+    for (; size > 0; --size, a += 4) {
+        _cache(17, (void *)a);
+    }
+}
+
+void
+dcache_flush(void)
+{
+    for (int i = 0; i < 64; ++i) {

Review Comment:
   nitpicking : variables to be declared at beginning of function



-- 
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@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] kasjer merged pull request #2888: mcu/pic32mz: Add d-cache flushing functions

Posted by GitBox <gi...@apache.org>.
kasjer merged PR #2888:
URL: https://github.com/apache/mynewt-core/pull/2888


-- 
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@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] kasjer commented on a diff in pull request #2888: mcu/pic32mz: Add d-cache flushing functions

Posted by GitBox <gi...@apache.org>.
kasjer commented on code in PR #2888:
URL: https://github.com/apache/mynewt-core/pull/2888#discussion_r982892345


##########
hw/mcu/microchip/pic32mz/src/system_pic32.c:
##########
@@ -42,6 +42,27 @@ static inline int PLL_ODIV(int n)
 
 uint32_t SystemCoreClock;
 
+#if __PIC32_HAS_L1CACHE
+void
+dcache_flush_area(void *addr, int size)
+{
+    uint32_t a = (uint32_t)(addr) & ~3;
+    for (; size > 0; --size, a += 4) {
+        _cache(17, (void *)a);
+    }
+}
+
+void
+dcache_flush(void)
+{
+    for (int i = 0; i < 64; ++i) {

Review Comment:
   fixed



-- 
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@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2888: mcu/pic32mz: Add d-cache flushing functions

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on PR #2888:
URL: https://github.com/apache/mynewt-core/pull/2888#issuecomment-1261504138

   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


-- 
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@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org