Hello list,
I'm trying to build a linux kernel module that uses xenstore to report
on the modules loaded into a DomU's kernel. When building against
the current unstable (changeset 15080:089696e0c603) I'm getting build
errors about not being able to find mach_mpspec.h and mach_apicdef.h
make -C /root/xen-unstable.hg/linux-2.6.18-xen O=/root/xen-
unstable.hg/build-linux-2.6.18-xen_x86_32 modules
CC [M] /root/lkim-old/kernel_modules/modreporter.o
In file included from include2/asm/mach-xen/asm/smp.h:17,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/smp.h:18,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/sched.h:63,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/module.h:9,
from /root/modreporter/modreporter.c:22:
include2/asm/mpspec.h:6:25: error: mach_mpspec.h: No such file or
directory
In file included from include2/asm/mach-xen/asm/smp.h:17,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/smp.h:18,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/sched.h:63,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/module.h:9,
from /root/modreporter/modreporter.c:22:
include2/asm/mpspec.h:8: error: ‘MAX_MP_BUSSES’ undeclared here (not
in a function)
include2/asm/mpspec.h:22: error: ‘MAX_IRQ_SOURCES’ undeclared here
(not in a function)
In file included from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/smp.h:18,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/sched.h:63,
from /root/xen-unstable.hg/linux-2.6.18-xen/include/
linux/module.h:9,
from /root/modreporter/modreporter.c:22:
include2/asm/mach-xen/asm/smp.h:75:26: error: mach_apicdef.h: No such
file or directory
Copying these files from mach-generic or mach-default allows the
build to proceed.
But on loading the module it receives an error trying to call
xenbus_mkdir.
Specifically it calls:
if((ret = xenbus_mkdir(t,"modules" , ""))){
printk(KERN_ERROR "modreporter: Error making \"modules\" directory:
%d.\n", ret);
}
It hits the error condition with error value -22 (-EINVAL).
I used xenstore's trace option, and a number of printk's in the
xenbus_mkdir path and determined
that the problem seems to be that xenbus_mkdir is not receiving the
string "modules" as it's argument
(it receives a NULL pointer which gets fed throughout the system
until the xenstored in dom0 refuses
to make the NULL directory).
Are these errors related?
I've tried building the same module on a non-SMP machine with xen-
unstable changeset . On this
machine it doesn't hit the errors about mach_mpspec.h and
mach_apicdef.h, and is able to create
the xenstore directory.
Thanks,
-aaron
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|