From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH 01/11] mini-os: Make some headers more rumpkernel-friendly Date: Thu, 26 Jun 2014 13:54:20 +0200 Message-ID: <20140626115420.GQ6046@type.bordeaux.inria.fr> References: <1403291090-8657-1-git-send-email-ian.jackson@eu.citrix.com> <1403291090-8657-2-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X08Fz-0001OB-2M for xen-devel@lists.xenproject.org; Thu, 26 Jun 2014 11:54:23 +0000 Content-Disposition: inline In-Reply-To: <1403291090-8657-2-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell List-Id: xen-devel@lists.xenproject.org Ian Jackson, le Fri 20 Jun 2014 20:04:40 +0100, a =E9crit : > Signed-off-by: Ian Jackson Acked-by: Samuel Thibault > --- > include/mini-os/os.h | 15 ++++++++++----- > include/mini-os/spinlock.h | 2 ++ > include/mini-os/x86/mm.h | 4 ++++ > include/mini-os/x86/spinlock.h | 3 +++ > 4 files changed, 19 insertions(+), 5 deletions(-) > = > diff --git a/include/mini-os/os.h b/include/mini-os/os.h > index 9938d31..675a2bf 100644 > --- a/include/mini-os/os.h > +++ b/include/mini-os/os.h > @@ -1,17 +1,20 @@ > #ifndef _MINIOS_OS_H_ > #define _MINIOS_OS_H_ > = > -#if __GNUC__ =3D=3D 2 && __GNUC_MINOR__ < 96 > -#define __builtin_expect(x, expected_value) (x) > -#endif > +#define smp_processor_id() 0 > #define unlikely(x) __builtin_expect((x),0) > #define likely(x) __builtin_expect((x),1) > = > -#define smp_processor_id() 0 > +#include > + > +#ifndef __RUMP_KERNEL__ > + > +#if __GNUC__ =3D=3D 2 && __GNUC_MINOR__ < 96 > +#define __builtin_expect(x, expected_value) (x) > +#endif > = > #ifndef __ASSEMBLY__ > #include > -#include > #include > #endif > = > @@ -21,4 +24,6 @@ > = > #include > = > +#endif /* !__RUMP_KERNEL__ */ > + > #endif /* _MINIOS_OS_H_ */ > diff --git a/include/mini-os/spinlock.h b/include/mini-os/spinlock.h > index 5e662bb..b87ffe5 100644 > --- a/include/mini-os/spinlock.h > +++ b/include/mini-os/spinlock.h > @@ -1,7 +1,9 @@ > #ifndef __MINIOS_ASM_SPINLOCK_H > #define __MINIOS_ASM_SPINLOCK_H > = > +#ifndef __RUMP_KERNEL__ > #include > +#endif > = > /* > * Your basic SMP spinlocks, allowing only a single CPU anywhere > diff --git a/include/mini-os/x86/mm.h b/include/mini-os/x86/mm.h > index e41ef74..2a73d08 100644 > --- a/include/mini-os/x86/mm.h > +++ b/include/mini-os/x86/mm.h > @@ -36,6 +36,8 @@ > #endif > #endif > = > +#ifndef __RUMP_KERNEL__ > + > #define L1_FRAME 1 > #define L2_FRAME 2 > #define L3_FRAME 3 > @@ -231,4 +233,6 @@ static __inline__ paddr_t machine_to_phys(maddr_t mac= hine) > pgentry_t *need_pgt(unsigned long addr); > int mfn_is_ram(unsigned long mfn); > = > +#endif /* !__RUMP_KERNEL__ */ > + > #endif /* _ARCH_MM_H_ */ > diff --git a/include/mini-os/x86/spinlock.h b/include/mini-os/x86/spinloc= k.h > index 4b8faf7..b22f2a4 100644 > --- a/include/mini-os/x86/spinlock.h > +++ b/include/mini-os/x86/spinlock.h > @@ -3,7 +3,10 @@ > #ifndef __ARCH_ASM_SPINLOCK_H > #define __ARCH_ASM_SPINLOCK_H > = > +#ifndef __RUMP_KERNEL__ > #include > +#endif > + > #include "os.h" > = > = > -- = > 1.7.10.4 > = > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > = -- = Samuel /* Halley */ (Halley's comment.)