Skip to contentSkip to conversation

fix vm_events_fold_cpu() build breakage

PATCH In review Magnus Damm 3 participants 3 messages Dec 15, 2006 – Dec 17, 2006 MM core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix vm_events_fold_cpu() build breakage

fix vm_events_fold_cpu() build breakage

2.6.20-rc1 does not build properly if CONFIG_VM_EVENT_COUNTERS is set and CONFIG_HOTPLUG is unset:

  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1

mm/built-in.o: In function `page_alloc_cpu_notify':
page_alloc.c:(.text+0x56eb): undefined reference to `vm_events_fold_cpu'
make: *** [.tmp_vmlinux1] Error 1

---

Applies on top of linux-2.6.20-rc1.

 include/linux/vmstat.h |    4 ++++
 1 file changed, 4 insertions(+)
include/linux/vmstat.h +4 -0
@@ -73,7 +73,11 @@ static inline void count_vm_events(enum 
 }
 
 extern void all_vm_events(unsigned long *);
+#ifdef CONFIG_HOTPLUG
 extern void vm_events_fold_cpu(int cpu);
+#else
+#define vm_events_fold_cpu(x)	do { } while (0)
+#endif
 
 #else
 
#2 lore raw
Quoted 5 lines · Christoph Lameter
Quoted 1 line · Magnus Damm

fix vm_events_fold_cpu() build breakage

I've hit that one too. Can this fix be sent upstream quickly please?

Thanks,

Signature · 1 line
Jean Delvare