Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Infinite Loop in arm_dcache.c #14490

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions arch/arm/src/armv7-m/arm_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,12 @@
do
{
int32_t tmpways = ways;

do
{
sw = ((tmpways << wshift) | (sets << sshift));
putreg32(sw, NVIC_DCISW);
}
while (tmpways--);
while (tmpways > 0 && tmpways--)

Check failure on line 538 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

expected ';' before '}' token

Check failure on line 538 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

expected ';' before '}' token
}
while (sets--);

Expand Down Expand Up @@ -574,7 +573,7 @@
****************************************************************************/

#ifdef CONFIG_ARMV7M_DCACHE
void up_disable_dcache(void)

Check failure on line 576 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

expected 'while' before 'void'

Check failure on line 576 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

expected 'while' before 'void'
{
uint32_t ccsidr;
uint32_t ccr;
Expand Down Expand Up @@ -720,12 +719,12 @@
#ifdef CONFIG_ARMV7M_DCACHE
void up_invalidate_dcache_all(void)
{
uint32_t ccsidr;

Check warning on line 722 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

declaration of 'ccsidr' shadows a previous local [-Wshadow]
uint32_t sshift;

Check warning on line 723 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

declaration of 'sshift' shadows a previous local [-Wshadow]
uint32_t wshift;

Check warning on line 724 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

declaration of 'wshift' shadows a previous local [-Wshadow]
uint32_t sw;

Check warning on line 725 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

declaration of 'sw' shadows a previous local [-Wshadow]
uint32_t sets;

Check warning on line 726 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

declaration of 'sets' shadows a previous local [-Wshadow]
uint32_t ways;

Check warning on line 727 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

declaration of 'ways' shadows a previous local [-Wshadow]

/* Get the characteristics of the D-Cache */

Expand Down Expand Up @@ -871,7 +870,7 @@
****************************************************************************/

#ifdef CONFIG_ARMV7M_DCACHE
void up_clean_dcache_all(void)

Check warning on line 873 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

'up_clean_dcache_all' defined but not used [-Wunused-function]
{
#ifndef CONFIG_ARMV7M_DCACHE_WRITETHROUGH
uint32_t ccsidr;
Expand Down Expand Up @@ -949,7 +948,7 @@
****************************************************************************/

#ifdef CONFIG_ARMV7M_DCACHE
void up_flush_dcache(uintptr_t start, uintptr_t end)

Check warning on line 951 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

'up_flush_dcache' defined but not used [-Wunused-function]
{
#ifndef CONFIG_ARMV7M_DCACHE_WRITETHROUGH
uint32_t ccsidr;
Expand Down Expand Up @@ -1027,7 +1026,7 @@
****************************************************************************/

#ifdef CONFIG_ARMV7M_DCACHE
void up_flush_dcache_all(void)

Check warning on line 1029 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

'up_flush_dcache_all' defined but not used [-Wunused-function]
{
#ifndef CONFIG_ARMV7M_DCACHE_WRITETHROUGH
uint32_t ccsidr;
Expand Down Expand Up @@ -1101,7 +1100,7 @@
****************************************************************************/

#ifdef CONFIG_ARMV7M_ICACHE
void up_coherent_dcache(uintptr_t addr, size_t len)

Check warning on line 1103 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

'up_coherent_dcache' defined but not used [-Wunused-function]
{
uintptr_t end;

Expand All @@ -1117,5 +1116,5 @@

up_invalidate_icache_all();
}
}

Check failure on line 1119 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

expected declaration or statement at end of input

Check failure on line 1119 in arch/arm/src/armv7-m/arm_cache.c

View workflow job for this annotation

GitHub Actions / Linux (arm-13)

expected declaration or statement at end of input
#endif
Loading