kernel: Make CACHE_LINE_ALIGN visible in the whole kernel

This commit is contained in:
Pawel Dziepak
2013-11-25 00:35:15 +01:00
parent 26970784cd
commit 0e94a12f8e
4 changed files with 5 additions and 4 deletions
+2
View File
@@ -55,4 +55,6 @@ void arch_cpu_memory_read_write_barrier(void);
#include <arch_cpu.h> #include <arch_cpu.h>
#define CACHE_LINE_ALIGN __attribute__((aligned(CACHE_LINE_SIZE)))
#endif /* _KERNEL_ARCH_CPU_H */ #endif /* _KERNEL_ARCH_CPU_H */
@@ -26,6 +26,8 @@
#define CPU_MAX_CACHE_LEVEL 8 #define CPU_MAX_CACHE_LEVEL 8
#define CACHE_LINE_SIZE 64
// MSR registers (possibly Intel specific) // MSR registers (possibly Intel specific)
#define IA32_MSR_TSC 0x10 #define IA32_MSR_TSC 0x10
+1 -1
View File
@@ -86,7 +86,7 @@ typedef struct cpu_ent {
// arch-specific stuff // arch-specific stuff
arch_cpu_info arch; arch_cpu_info arch;
} cpu_ent __attribute__((aligned(64))); } cpu_ent CACHE_LINE_ALIGN;
//extern cpu_ent gCPU[MAX_BOOT_CPUS]; //extern cpu_ent gCPU[MAX_BOOT_CPUS];
@@ -18,9 +18,6 @@
#include "RunQueue.h" #include "RunQueue.h"
#define CACHE_LINE_ALIGN __attribute__((aligned(64)))
//#define TRACE_SCHEDULER //#define TRACE_SCHEDULER
#ifdef TRACE_SCHEDULER #ifdef TRACE_SCHEDULER
# define TRACE(...) dprintf_no_syslog(__VA_ARGS__) # define TRACE(...) dprintf_no_syslog(__VA_ARGS__)