WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] including <linux/smp.h> in spinlock.h
From: yuan li <liyuan462@xxxxxxxxx>
Date: Sat, 5 Mar 2011 21:11:30 +0800
Delivery-date: Tue, 08 Mar 2011 06:28:52 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=IxFnOLa9s59TKnVX2bZ40gFDtbIzh2NGOmCzlfAe2Gk=; b=w2lONhkKNh0RrmPsjWWHXtKe6qxzeEsA8uhdoiLxYcOFMCc3HVEj6woLmTkhL/ONT4 Te3YXtSsTguPe/FRmVkSHQdcdRwZXe8M+rCU1g8TgckSkMGWPIoWsJ8oc81fZ0jtD6ZN Nrv0PiK2es/8lqxW7KzS8dFmHnNEINDvsdHFQ=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] including <linux/smp.h> in spinlock.h, yuan li <=