xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: yuan li <liyuan462@gmail.com>
To: xen-devel@lists.xensource.com
Subject: including <linux/smp.h> in spinlock.h
Date: Sat, 5 Mar 2011 21:11:30 +0800	[thread overview]
Message-ID: <AANLkTi=PMfawzQ4cX30+7r6c3CuSsVB=SWrbFnqUtKRb@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2890 bytes --]

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 : )

[-- Attachment #1.2: Type: text/html, Size: 3110 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

                 reply	other threads:[~2011-03-05 13:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=PMfawzQ4cX30+7r6c3CuSsVB=SWrbFnqUtKRb@mail.gmail.com' \
    --to=liyuan462@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).