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] Suggested changes to xen/include from recent Linux

To: "Xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Suggested changes to xen/include from recent Linux
From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Date: Sat, 9 Apr 2005 13:42:58 -0700
Cc: Greg Edwards <edwardsg@xxxxxxx>
Delivery-date: Sun, 10 Apr 2005 17:36:30 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcU9RLarTWB/AByGR7qkyzoGXc+eOQ==
Thread-topic: Suggested changes to xen/include from recent Linux
As I mentioned at the xummit (spelling intended :-), a
Xen/ia64 contributor from SGI (Greg Edwards) is updating
the Xen/ia64 Linux dependencies from 2.6.7 to 2.6.11.
This is now working, but he identified a couple places
where it would make sense to modify common (include/xen)
files.  So, rather than just "fix" them in ia64-specific
files, I thought I would publish them for comment and to
see if they might/should go into include/xen:

1) In include/xen/spinlock.h:

Linux has started using the following define:

#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED

I see that the construct could be used throughout xen/arch/x86
as well... indeed there are TWO C files where a similar macro
is defined but called DECLARE_MUTEX.

I propose adding the macro.

2) In include/xen/types.h:

Starting in 2.6.9, there are some new type-checking attributes and
the following lines have been added to include/linux/types.h.  There's
some explanation of it here:

http://kerneltrap.org/node/3848  (search for __bitwise)

Since Jimi mentioned a need for bi-endian support in Xen/ppc, I thought
these might be added eventually anyway, so they could be added now
to include/xen/type.s.

I propose adding the lines (possibly including the comment verbatim?)

/*
 * Below are truly Linux-specific types that should never collide with
 * any application/library that wants linux/types.h.
 */

#ifdef __CHECKER__
#define __bitwise __attribute__((bitwise))
#else
#define __bitwise
#endif

typedef __u16 __bitwise __le16;
typedef __u16 __bitwise __be16;
typedef __u32 __bitwise __le32;
typedef __u32 __bitwise __be32;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;
#endif

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

<Prev in Thread] Current Thread [Next in Thread>