From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>, xen-devel@lists.xenproject.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Keir Fraser <keir.fraser@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH 01/11] mini-os: Make some headers more rumpkernel-friendly
Date: Mon, 23 Jun 2014 11:32:27 +0100 [thread overview]
Message-ID: <53A8023B.6040300@citrix.com> (raw)
In-Reply-To: <1403291090-8657-2-git-send-email-ian.jackson@eu.citrix.com>
On 20/06/14 20:04, Ian Jackson wrote:
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> ---
> 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__ == 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)
Not relevant to the patch itself, but as identified in c/s e5545fb6d0,
these constructs are buggy.
>
> -#define smp_processor_id() 0
> +#include <mini-os/hypervisor.h>
> +
> +#ifndef __RUMP_KERNEL__
> +
> +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
> +#define __builtin_expect(x, expected_value) (x)
> +#endif
>
Do we honestly care about compilers this old?
~Andrew
> #ifndef __ASSEMBLY__
> #include <mini-os/types.h>
> -#include <mini-os/hypervisor.h>
> #include <mini-os/kernel.h>
> #endif
>
> @@ -21,4 +24,6 @@
>
> #include <mini-os/machine/os.h>
>
> +#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 <mini-os/lib.h>
> +#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 machine)
> 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/spinlock.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 <mini-os/lib.h>
> +#endif
> +
> #include "os.h"
>
>
next prev parent reply other threads:[~2014-06-23 10:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 19:04 [RFC PATCH 00/11] mini-os: xenbus changes for rump kernels Ian Jackson
2014-06-20 19:04 ` [PATCH 01/11] mini-os: Make some headers more rumpkernel-friendly Ian Jackson
2014-06-23 10:32 ` Andrew Cooper [this message]
2014-06-23 14:24 ` Ian Jackson
2014-06-26 11:54 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 02/11] mini-os: Provide <mini-os/queue.h> Ian Jackson
2014-06-26 11:59 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 03/11] mini-os/xenbus: Add missing locks to xb_write Ian Jackson
2014-06-26 12:04 ` Samuel Thibault
2014-06-30 12:47 ` Ian Jackson
2014-06-30 12:59 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 04/11] mini-os/xenbus: Change type of xenbus_event_queue Ian Jackson
2014-06-26 12:06 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 05/11] mini-os/xenbus: Use MINIOS_LIST for the list of watches Ian Jackson
2014-06-26 12:06 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 06/11] mini-os/xenbus: Rename xenbus_events to xenbus_default_watch_queue Ian Jackson
2014-06-26 12:07 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 07/11] mini-os/xenbus: Unify watch and reply queues Ian Jackson
2014-06-26 12:15 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 08/11] mini-os/xenbus: Expose lower-level interface Ian Jackson
2014-06-26 12:24 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 09/11] mini-os/xenbus: Sort out request and watch locking Ian Jackson
2014-06-26 12:16 ` Samuel Thibault
2014-06-20 19:04 ` [PATCH 10/11] mini-os/xenbus: Provide queue->wakeup hook Ian Jackson
2014-06-26 12:18 ` Samuel Thibault
2014-06-30 12:49 ` Ian Jackson
2014-06-20 19:04 ` [PATCH 11/11] mini-os/xenbus: Provide xenbus_free Ian Jackson
2014-06-26 12:24 ` Samuel Thibault
2014-06-23 10:25 ` [RFC PATCH 00/11] mini-os: xenbus changes for rump kernels George Dunlap
2014-06-23 14:27 ` Ian Jackson
2014-06-23 10:35 ` Andrew Cooper
2014-06-23 14:26 ` Ian Jackson
2014-06-27 11:52 ` Ian Campbell
2014-06-27 11:59 ` Samuel Thibault
2014-06-30 15:19 ` Ian Jackson
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=53A8023B.6040300@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir.fraser@citrix.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.