[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] including <linux/smp.h> in spinlock.h


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: yuan li <liyuan462@xxxxxxxxx>
  • Date: Sat, 5 Mar 2011 21:11:30 +0800
  • Delivery-date: Tue, 08 Mar 2011 06:28:52 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=trqvA5qnD7rOqKmhz4SjFtFPPy/3WYtR5MQpyzm8s5wxOW90DsPw8WJYwofSJbuZ2+ McdBWlv/HlJIR/7sqzQGtxU5Qr/UPMh4pOqSrKWCQIThuE+BdK74WdZfKPybfqr1aSfQ McbRlA10yBE5gY/RcbTrdhhESQKEQmyu1wJn4=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

hi,

I'm trying to include the header file "<linux/smp.h>" in "linux-2.6.18-xen.hg/include/asm-x86_64/spinlock.h". By doing that, I hope I can refer to  the  function "smp_processor_id()" in "linux-2.6.18-xen.hg/include/asm-x86_64/spinlock.h".  But when I do that and compile xen, the following warning and error appear:

...
...
 CC [M]  fs/bfs/file.o
In file included from include2/asm/vsyscall.h:15,
                 from include2/asm/mach-xen/asm/fixmap.h:17,
                 from include2/asm/mach-xen/asm/smp.h:16,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/smp.h:18,
                 from include2/asm/spinlock.h:8,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/spinlock.h:86,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/wait.h:24,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/fs.h:226,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/fs/bfs/file.c:7:
/usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/seqlock.h: In function ‘write_seqlock’:
/usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/seqlock.h:59: warning: implicit declaration of function ‘spin_lock’
/usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/seqlock.h: In function ‘write_sequnlock’:
/usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/seqlock.h:68: warning: implicit declaration of function ‘spin_unlock’
/usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/seqlock.h: In function ‘write_tryseqlock’:
/usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/seqlock.h:73: warning: implicit declaration of function ‘spin_trylock’
  CC [M]  fs/bfs/dir.o
In file included from include2/asm/mach-xen/asm/fixmap.h:17,
                 from include2/asm/mach-xen/asm/smp.h:16,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/smp.h:18,
                 from include2/asm/spinlock.h:8,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/spinlock.h:86,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/seqlock.h:29,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/include/linux/time.h:7,
                 from /usr/src/xen-3.4.2/linux-2.6.18-xen.hg/fs/bfs/dir.c:8:
include2/asm/vsyscall.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__xtime_lock’
include2/asm/vsyscall.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xtime_lock’
make[8]: *** [fs/bfs/dir.o] Error 1
make[7]: *** [fs/bfs] Error 2
make[6]: *** [fs] Error 2
make[5]: *** [modules] Error 2
make[4]: *** [modules] Error 2
...
...

What's wrong?  I'll be very appreciated if you reply to me.

Xen: 3.4.2
Linux: 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

Thank you : )


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.