Commit 4e9e0302 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

use better heuristic for compile-time cache line size

parent 3b6c1d06
......@@ -57,3 +57,10 @@
/** Width of log output in characters */
#define LOG_WIDTH 80
#define LOG_HEIGHT 25
/* Hard-coded cache line size */
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
#define CACHELINE_SIZE 64
#else
#error "Unsupported architecture"
#endif
......@@ -52,10 +52,8 @@ int kernel_get_cacheline_size()
pclose(fp);
return ret == 1 ? size : -1;
#elif defined(__x86_64__) || defined(__i386__)
return 64; /** @todo fixme */
#else
#error "Unsupported architecture"
return CACHELINE_SIZE;
#endif
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment