From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751731AbdKVQGv (ORCPT ); Wed, 22 Nov 2017 11:06:51 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:53821 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259AbdKVQGt (ORCPT ); Wed, 22 Nov 2017 11:06:49 -0500 Message-ID: <1511366802.18523.119.camel@codethink.co.uk> Subject: Re: [PATCH 4.14 00/31] 4.14.1-stable review From: Ben Hutchings To: Guenter Roeck Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, shuahkh@osg.samsung.com, patches@kernelci.org, stable@vger.kernel.org Date: Wed, 22 Nov 2017 16:06:42 +0000 In-Reply-To: <20171121193845.GA9680@roeck-us.net> References: <20171119145951.136379453@linuxfoundation.org> <7bc1795a-a2f0-6837-19f0-93b21fca35ad@roeck-us.net> <1511277970.18523.113.camel@codethink.co.uk> <20171121163534.GA20401@kroah.com> <1511282778.18523.114.camel@codethink.co.uk> <20171121170914.GA21561@kroah.com> <1511291234.18523.116.camel@codethink.co.uk> <20171121193845.GA9680@roeck-us.net> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-11-21 at 11:38 -0800, Guenter Roeck wrote: > On Tue, Nov 21, 2017 at 07:07:14PM +0000, Ben Hutchings wrote: > > On Tue, 2017-11-21 at 18:09 +0100, Greg Kroah-Hartman wrote: > > > On Tue, Nov 21, 2017 at 04:46:18PM +0000, Ben Hutchings wrote: > > > > On Tue, 2017-11-21 at 17:35 +0100, Greg Kroah-Hartman wrote: > > > > > On Tue, Nov 21, 2017 at 03:26:10PM +0000, Ben Hutchings wrote: > > > > > > > > [...] > > > > > > Not all 32-bit configurations can provide cmpxchg64().  i40e's use of > > > > > > cmpxchg64() appears to be fixed by: > > > > > > > > > > > > b74f571f59a8 i40e/i40evf: organize and re-number feature flags > > > > > > b48be9978e4b i40e: fix flags declaration > > > > > > > > > > So without those patches, are any specific arches/configs broken for > > > > > 4.14? > > > > > > > > 32-bit parisc is. > > > > > > Ok, but that's a horrid hack on the i40e driver, it just happens to move > > > the bitfield to a 32bit variable.  Can't we just provide a "real" > > > cmpxchg64() for 32-bit parisc? > > > > No.  There is a generic implementation of cmpxchg64() but it is only > > suitable for non-SMP configurations. > > > > Dave implemented the following for sparc32 (in arch/sparc/lib/atomic32.c). > > u64 __cmpxchg_u64(u64 *ptr, u64 old, u64 new) > { > unsigned long flags; > u64 prev; > > spin_lock_irqsave(ATOMIC_HASH(ptr), flags); > if ((prev = *ptr) == old) > *ptr = new; > spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); > return prev; > } > EXPORT_SYMBOL(__cmpxchg_u64); > > Maybe something like this would work for other 32 bit architectures as well ? Yes, you're right, and we even have generic code for this in lib/atomic64.c - but only for atomic64_t, not u64. Ben. -- Ben Hutchings Software Developer, Codethink Ltd.