Skip to contentSkip to conversation

fix PAGE_ALIGN build breakage

patch/rfc 2.6.26-git David Brownell 1 participant 1 message Jul 25, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

With this afternoon's GIT tree I saw builds failing on avr32, basically PAGE_ALIGN was used before it was available.

Appended are quick hacks that got it to work for me ... I'm not sure what the right fix would be though. Hence "RFC". ;)

- Dave

include/linux/mm.h +4 -3
@@ -36,14 +36,15 @@ extern int sysctl_legacy_va_layout;
 extern unsigned long mmap_min_addr;
 
 #include <asm/page.h>
+
+/* to align the pointer to the (next) page boundary */
+#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
+
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 
 #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
 
-/* to align the pointer to the (next) page boundary */
-#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
-
 /*
  * Linux kernel virtual memory manager primitives.
  * The idea being to have a "virtual" mm in the same way
include/linux/module.h +1 -0
@@ -16,6 +16,7 @@
 #include <linux/kobject.h>
 #include <linux/moduleparam.h>
 #include <linux/marker.h>
+#include <linux/mm.h>
 #include <asm/local.h>
 
 #include <asm/module.h>
include/linux/sched.h +1 -0
@@ -59,6 +59,7 @@ struct sched_param {
 #include <linux/errno.h>
 #include <linux/nodemask.h>
 #include <linux/mm_types.h>
+#include <linux/mm.h>
 
 #include <asm/system.h>
 #include <asm/page.h>