xen-ia64-devel
[Xen-ia64-devel] RE: [PATCH 02/27] ia64/xen: introduce synch bitops whic
To: |
Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx> |
Subject: |
[Xen-ia64-devel] RE: [PATCH 02/27] ia64/xen: introduce synch bitops which is necessary for ia64/xen support. |
From: |
"Luck, Tony" <tony.luck@xxxxxxxxx> |
Date: |
Tue, 17 Jun 2008 16:24:10 -0700 |
Accept-language: |
en-US |
Acceptlanguage: |
en-US |
Cc: |
Fitzhardinge <jeremy@xxxxxxxx>, Jeremy, "virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx" <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Robin Holt <holt@xxxxxxx>, "xen-ia64-devel@xxxxxxxxxxxxxxxxxxx" <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx> |
Delivery-date: |
Tue, 17 Jun 2008 16:24:31 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
In-reply-to: |
<1213084043534-git-send-email-yamahata@xxxxxxxxxxxxx> |
List-help: |
<mailto:xen-ia64-devel-request@lists.xensource.com?subject=help> |
List-id: |
Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com> |
List-post: |
<mailto:xen-ia64-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<12130840433561-git-send-email-yamahata@xxxxxxxxxxxxx> <1213084043534-git-send-email-yamahata@xxxxxxxxxxxxx> |
Sender: |
xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx |
Thread-index: |
AcjKzpWBHbyWmYx/T1uL6W7F+ID/FwGAQljQ |
Thread-topic: |
[PATCH 02/27] ia64/xen: introduce synch bitops which is necessary for ia64/xen support. |
Just started digging through these ... part 01/27 was fine. But here
are a couple of comments for part 02/27
+/*
+ * Copyright 1992, Linus Torvalds.
+ * Heavily modified to provide guaranteed strong synchronisation
+ * when communicating with Xen or other guest OSes running on other CPUs.
+ */
Presumably Linus didn't write this in 1992. Perhaps this file
contains enough new material to warrant your own copyright?
+static inline int sync_const_test_bit(int nr, const volatile void *addr)
+{
+ return test_bit(nr, addr);
+}
+
+static inline int sync_var_test_bit(int nr, volatile void *addr)
+{
+ return test_bit(nr, addr);
+}
...
+#define sync_test_bit(nr,addr) \
+ (__builtin_constant_p(nr) ? \
+ sync_const_test_bit((nr), (addr)) : \
+ sync_var_test_bit((nr), (addr)))
What use is this? It doesn't matter whether "nr" is constant or
not you still end up using "test_bit" ... so why make the compiler
do all the extra work when you just mean this?
static inline int sync_test_bit(int nr, volatile void *addr)
{
return test_bit(nr, addr);
}
-Tony
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-ia64-devel] [PATCH 00/27] ia64/xen domU take 7, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 03/27] ia64/xen: increase IA64_MAX_RSVD_REGIONS., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 01/27] ia64: move function declaration, ia64_cpu_local_tick() from .c to .h, Isaku Yamahata
- [Xen-ia64-devel] [PATCH 04/27] ia64/xen: introduce definitions necessary for ia64/xen hypercalls., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 02/27] ia64/xen: introduce synch bitops which is necessary for ia64/xen support., Isaku Yamahata
- [Xen-ia64-devel] RE: [PATCH 02/27] ia64/xen: introduce synch bitops which is necessary for ia64/xen support.,
Luck, Tony <=
- [Xen-ia64-devel] [PATCH 06/27] ia64/xen: define NET_SKB_NET to 18 if xen., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 07/27] ia64/xen: define helper functions for xen related address conversion., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 05/27] ia64/xen: define several constants for ia64/xen., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 13/27] ia64/pv_ops/xen: elf note based xen startup., Isaku Yamahata
- [Xen-ia64-devel] [PATCH 09/27] ia64/xen: implement the arch specific part of xencomm., Isaku Yamahata
|
|
|