Skip to contentSkip to conversation

fixes for oprofile on ppc64

PATCH New Anton Blanchard 1 participant 1 message Dec 2, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixes for oprofile on ppc64

Hi,

Here are a few fixes I needed when porting oprofile to ppc64:

- __PAGE_OFFSET isnt defined for all architectures, use PAGE_OFFSET instead
- include linux/cache.h everywhere we use ____cacheline_aligned etc. Otherwise we end up with a structure called ____cacheline_aligned and no alignment :(

Anton

===== drivers/oprofile/buffer_sync.c 1.4 vs edited =====

drivers/oprofile/buffer_sync.c +1 -1
@@ -245,7 +245,7 @@
  
 static inline int is_kernel(unsigned long val)
 {
-	return val > __PAGE_OFFSET;
+	return val > PAGE_OFFSET;
 }
 
 

===== drivers/oprofile/cpu_buffer.c 1.2 vs edited =====

drivers/oprofile/cpu_buffer.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/vmalloc.h>
 #include <linux/smp.h>
 #include <linux/errno.h>
+#include <linux/cache.h>
  
 #include "cpu_buffer.h"
 #include "oprof.h"

===== drivers/oprofile/cpu_buffer.h 1.1 vs edited =====

drivers/oprofile/cpu_buffer.h +1 -0
@@ -12,6 +12,7 @@
 
 #include <linux/types.h>
 #include <linux/spinlock.h>
+#include <linux/cache.h>
  
 struct task_struct;