From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Jennifer Herbert <jennifer.herbert@citrix.com>,
Tim Deegan <tim@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCHv6 1/3] xen: use ticket locks for spin locks
Date: Mon, 18 May 2015 16:33:36 +0100 [thread overview]
Message-ID: <555A0650.8010901@citrix.com> (raw)
In-Reply-To: <5559D821020000780007AFC2@mail.emea.novell.com>
On 18/05/15 11:16, Jan Beulich wrote:
>>>> On 14.05.15 at 13:21, <david.vrabel@citrix.com> wrote:
>> void _spin_lock(spinlock_t *lock)
>> {
>> + spinlock_tickets_t tickets = { .tail = 1, };
>
> This breaks the build on gcc 4.3.x (due to tail being a member of an
> unnamed structure member of a union).
I don't have a gcc that old to hand but isn't the error here that .tail
is part of the structure that isn't the first member of a union?
Does this fix your gcc 4.3 build?
--- a/xen/include/xen/spinlock.h
+++ b/xen/include/xen/spinlock.h
@@ -115,7 +115,7 @@ extern void spinlock_profile_reset(unsigned char key);
struct lock_profile_qhead { };
-#define SPIN_LOCK_UNLOCKED { { 0 }, 0xfffu, 0, _LOCK_DEBUG }
+#define SPIN_LOCK_UNLOCKED { {}, 0xfffu, 0, _LOCK_DEBUG }
#define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED
#define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))
@@ -125,11 +125,11 @@ struct lock_profile_qhead { };
#endif
typedef union {
- u32 head_tail;
struct {
u16 head;
u16 tail;
};
+ u32 head_tail;
} spinlock_tickets_t;
typedef struct spinlock {
next prev parent reply other threads:[~2015-05-18 15:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 11:21 [PATCHv6 0/3] Use ticket locks for spinlocks David Vrabel
2015-05-14 11:21 ` [PATCHv6 1/3] xen: use ticket locks for spin locks David Vrabel
2015-05-14 11:33 ` Tim Deegan
2015-05-18 10:16 ` Jan Beulich
2015-05-18 15:33 ` David Vrabel [this message]
2015-05-18 15:49 ` Jan Beulich
2015-05-19 10:27 ` David Vrabel
2015-05-19 10:38 ` Jan Beulich
2015-05-19 12:52 ` [PATCHv1] spinlock: fix build with older GCC David Vrabel
2015-05-14 11:21 ` [PATCHv6 2/3] x86, arm: remove asm/spinlock.h from all architectures David Vrabel
2015-05-14 11:21 ` [PATCHv6 3/3] x86: reduce struct hvm_domain size David Vrabel
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=555A0650.8010901@citrix.com \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=jennifer.herbert@citrix.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.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.