aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/SPC563/hal_lld.h2
-rw-r--r--test/testheap.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/os/hal/platforms/SPC563/hal_lld.h b/os/hal/platforms/SPC563/hal_lld.h
index 52cd722a5..49943a098 100644
--- a/os/hal/platforms/SPC563/hal_lld.h
+++ b/os/hal/platforms/SPC563/hal_lld.h
@@ -144,7 +144,7 @@
BIUCR_MASTER0_PREFETCH | \
BIUCR_DPFEN | \
BIUCR_IPFEN | \
- BIUCR_PFLIM_ON_HITMISS | \
+ BIUCR_PFLIM_ON_MISS | \
BIUCR_BFEN)
#endif
diff --git a/test/testheap.c b/test/testheap.c
index 7d5c25610..84936babc 100644
--- a/test/testheap.c
+++ b/test/testheap.c
@@ -114,7 +114,10 @@ static void heap1_execute(void) {
chHeapFree(p1);
test_assert(5, chHeapStatus(&test_heap, &n) == 2, "invalid state");
p1 = chHeapAlloc(&test_heap, SIZE);
- test_assert(6, chHeapStatus(&test_heap, &n) == 1, "heap fragmented");
+ /* Note, the first situation happens when the alignment size is smaller
+ than the header size, the second in the other cases.*/
+ test_assert(6, (chHeapStatus(&test_heap, &n) == 1) ||
+ (chHeapStatus(&test_heap, &n) == 2), "heap fragmented");
chHeapFree(p2);
chHeapFree(p1);
test_assert(7, chHeapStatus(&test_heap, &n) == 1, "heap fragmented");