[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/5] xen/ppc: Implement atomic.h
- To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 5 Sep 2023 17:54:47 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mAW8ffXMYnsUL/t8juwJ+T0e9mNjFfmdRiuiTpcgFVk=; b=DomS4rD27PhsZibcxnjYiA1ifbRIzYl1LMQLCXiaWFiJ96lQ/t7HWxL7dzYu3+mWaYvHt2k/iYkSSvKuKPniVPNotuswILmXnfsxY4q1Z4/wilr6hGEGqYCQSGhe2bLs5cY166qvE6EUYzR2xw7wpg0YiQNPwmqDRJZHFasXIWgf87QWaIDNUMh6kQGI3Hywsy8mNtjpsLN7H3AuEgyr7B9tRlxqvROT8Tj9j4AcWDNQSLQdhNLfc8AYcHlanl3kXjZcpJBC3xMHlx4csNMChpn1RNok18aAyWwDIQLvUb/zGSP9fWrtned5NP8OI1YPivF/MFKCN7T15xLuCJ8aDw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BU8s4yaaIeufEBWII02wgYOpCQytQIfHDr1j+kNdMtosApAYYNz7HGEjLSpu18l9FH4bfUEBfYOdjDIU5Cyd4EbSD08TIP54E3Vsl9qQtTOIsGUYj8YbUZNkmx3BCQfA5PEi5bi0jjhulVBvIZyy/yDezwr4xIj6bJ4nQ1mIamnb99T1bBFk+HX37aKIMI2bBGvdYuzjYzYwuxHyTbGc03eVW+QVf6K060I792MdqNIir0IX0a+bvRuryvnVn5YQKGc8GnZ4wqezUz2jQYa9Nc7DoLwOg6t2mG4ktGMfTuttiMDyNNLUXPS90TZLvfg/QNyV+CTjWpBhd+776WoxLw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 05 Sep 2023 15:54:57 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 05.09.2023 16:58, Jan Beulich wrote:
> On 01.09.2023 20:25, Shawn Anastasio wrote:
>> +static inline atomic_t atomic_compareandswap(atomic_t old, atomic_t new,
>> + atomic_t *v)
>> +{
>> + atomic_t rc;
>> + rc.counter = __cmpxchg(&v->counter, old.counter, new.counter,
>> sizeof(int));
>
> I can't seem to be able to spot where __cmpxchg() is defined. (I really
> only wanted to check why it needs the 4th argument, which here rather
> would want to be e.g. sizeof(v->counter). If it can't be omitted.)
Found it in patch 3, which suggests an incorrect split of patches. May
not matter all that much of course if the headers aren't used before
enough of the machinery is in place. But then such broken connections
would be nice to mention in the description.
Jan
|