39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
From 4fda899f78887c782ba1dc6613d0b7b635aee535 Mon Sep 17 00:00:00 2001
|
|
From: Gareth Lloyd <gareth@ignition-web.co.uk>
|
|
Date: Fri, 4 Jan 2019 13:58:58 +0000
|
|
Subject: [PATCH 22/25] Correct sysconf constants
|
|
|
|
Only level 1 distinguishes between data and intstruction cache
|
|
---
|
|
clearcache.c | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/clearcache.c b/clearcache.c
|
|
index 82469c1..146051c 100644
|
|
--- a/clearcache.c
|
|
+++ b/clearcache.c
|
|
@@ -14,14 +14,14 @@ unsigned cache_size(void)
|
|
#ifdef _SC_LEVEL1_DCACHE_SIZE
|
|
cs += sysconf(_SC_LEVEL1_DCACHE_SIZE);
|
|
#endif
|
|
-#ifdef _SC_LEVEL2_DCACHE_SIZE
|
|
- cs += sysconf(_SC_LEVEL2_DCACHE_SIZE);
|
|
+#ifdef _SC_LEVEL2_CACHE_SIZE
|
|
+ cs += sysconf(_SC_LEVEL2_CACHE_SIZE);
|
|
#endif
|
|
-#ifdef _SC_LEVEL3_DCACHE_SIZE
|
|
- cs += sysconf(_SC_LEVEL3_DCACHE_SIZE);
|
|
+#ifdef _SC_LEVEL3_CACHE_SIZE
|
|
+ cs += sysconf(_SC_LEVEL3_CACHE_SIZE);
|
|
#endif
|
|
-#ifdef _SC_LEVEL4_DCACHE_SIZE
|
|
- cs += sysconf(_SC_LEVEL4_DCACHE_SIZE);
|
|
+#ifdef _SC_LEVEL4_CACHE_SIZE
|
|
+ cs += sysconf(_SC_LEVEL4_CACHE_SIZE);
|
|
#endif
|
|
if (cs == 0) {
|
|
static int warned;
|
|
--
|
|
1.8.3.1
|
|
|