Skip to contentSkip to conversation

x86,edac: fix for compiler error in traps.c

PATCH Doug Thompson 1 participant 1 message Apr 9, 2009

lore
Share & tools
lore
#0 lore raw
Quoted 66 lines · Andrew Morton

From: Andrew Morton <[email protected]>
Subject: Re: [PATCH] x86,edac: fix for compiler error in traps.c
To: "Steven Rostedt" <[email protected]>
Cc: "Ingo Molnar" <[email protected]>, "LKML" <[email protected]>, "Doug Thompson" <[email protected]>
Date: Wednesday, April 8, 2009, 6:48 PM

Quoted 4 lines · On Wed, 8 Apr 2009 20:06:53 -0400 (EDT) Steven Rostedt <[email protected]>…

Impact: compile fix

  I got this compile failure on both

tip/tracing/core as well as on

Quoted 4 lines

  v2.6.30-rc1.

    LD      .tmp_vmlinux1
  arch/x86/kernel/built-in.o: In function

`do_nmi':

Quoted 1 line

  (.text+0x3c18): undefined reference to

`edac_handler_set'

Quoted 1 line

  arch/x86/kernel/built-in.o: In function

`do_nmi':

Quoted 1 line

  (.text+0x3c48): undefined reference to

`edac_atomic_assert_error'

Quoted 2 lines

  make: *** [.tmp_vmlinux1] Error 1
  [root@bxrhel51 linux-trace.git]# grep

edac_handler_set

Quoted 1 line

  [root@bxrhel51 linux-trace.git]# Grep

edac_handler_set '*.[ch]'

Quoted 1 line

  find .  -name "*.[ch]" ! -type d  |

xargs grep  "edac_handler_set"

Quoted 1 line

  ./arch/x86/kernel/traps.c:    if

(edac_handler_set()) {

Quoted 1 line

  ./include/linux/edac.h:extern int

edac_handler_set(void);

Quoted 1 line

  ./drivers/edac/edac_stub.c:int

edac_handler_set(void)

Quoted 1 line

./drivers/edac/edac_stub.c:EXPORT_SYMBOL_GPL(edac_handler_set);

Review

Quoted 6 lines


This patch seems to fix it.

(quoted diff) +0 -0

b/drivers/edac/Makefile

Quoted 8 lines

index a5fdcf0..cc2bcb4 100644

drivers/edac/Makefile +0 -0
@@ -7,7 +7,7 @@
   #



-obj-$(CONFIG_EDAC)

        := edac_stub.o

Quoted 1 line

+obj-$(CONFIG_EDAC)

        += edac_stub.o

Quoted 1 line

  obj-$(CONFIG_EDAC_MM_EDAC)

    += edac_core.o

Quoted 2 lines


  edac_core-objs    := edac_mc.o

edac_device.o edac_mc_sysfs.o edac_pci_sysfs.o

OK, thanks, I'll send that Linuswards asap.

Quoted 8 lines

I guess it could/should be

    obj-y += edac_stub.o

because CONFIG_EDAC is known to be true in drivers/edac/.  But that's
just a consistency/style thing for Doug to scratch his head over ;)

I had determined (long ago) that := was a first instance initialization. I could be (probably was) wrong on that. I saw that in other files as well as reading the docs (me read em?).

edac_stub.o is targeted to be IN the kernel via the CONFIG_EDAC object file, since that is a boolean switch. It is a different builtin lib from the modules of edac. It is a relay set of functions and interfaces.

thanks for checking up on it

doug t