Received: by 2002:ab2:7853:0:b0:1fa:5c73:8e2d with SMTP id m19csp42378lqp; Thu, 30 May 2024 11:21:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWsqdL4QvKoFQZ2m3e91zrQ7bfEjBUOW003y7s105jwW11WA8n5f+wNUolEByfxnlhO+1Qq9uJC9/7J0U/tZLkX8i5UOEuS6+r9tPFH9w== X-Google-Smtp-Source: AGHT+IFXo/+MwK45jvCX/swiYiuuVU21NnEwVhi4biMIxx/jqoC/m+gfiQTsihN8/FgwXSfjXd6H X-Received: by 2002:a81:52c1:0:b0:60a:4a:18f7 with SMTP id 00721157ae682-62c6bc89259mr32123737b3.40.1717093308164; Thu, 30 May 2024 11:21:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717093308; cv=pass; d=google.com; s=arc-20160816; b=MTw1kHVsyfu4SwLXgxNiGVesosH0XlrQqv+Lb4w4giE92zbYR0R50+N3OjHp1XbaIB xCK4nA0wVRTFgknKX3XTNBCTTD40k/JTbgOdV+al9f6LYEdDGo5O3UXlnrckXs6aMq8z HCHncz+E/pHGKn3Kgg0xsXC+ZHOC6j1LAzP5F986zEze0PdQ8YITlPHpGWciHXdsy9Q4 g5WBFZ6MVuYcuFw/AhTsuvNAFZdFyhaBeqiqhvRB/TbGtLcq6RUkM5xxIVMzC2zNXidr saPPMek+i5nt7rdANo7Mw+LbEcc47WbThtSEN042zI+tDLD4LzKqKUpT9tWIx0j3ZDzh W3LA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=p60CQq4MDFSiaNz1Bf7BBR4Z1xVS94cT7PTyKs1bCeg=; fh=uYFzPKAg1iAwYoNWwJTjQ8PNgaDcYEPxK5wopmToQgA=; b=L+anta/EjkIrAOk3Keh9OFa2VPQ3m7mscvkIc78W17x33eCniyvwxzF1BuCoTmgg1Y hMCxDHekkit1RJiYLuwJ7txX7phXkjD4rYqZjz3rNX/ODlDbQKr0N3FOilfCuyPIlaqe jxTTJjLw2x9/O4lzIVAdWvvr3ORf3sUXKdtwIz2jbSkuOFPh4DrLqDCpXiHWN4UKIUOB Jn2So9bCqzqnfiP6QWzF9hEWuPTceqirzLy/wJO8e5ayoeceaUwNb0nRDWlFsyXdPyJg jrFkibxZmVxpVoEX+TOREaN/jPc0sC40RdIPA0OoxUIjjLLbAtJLFw5WDyb9A6kzuLbI et1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CHO0V89L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f32a7d6fsi10434685a.663.2024.05.30.11.21.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 11:21:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CHO0V89L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DADB51C22C41 for ; Thu, 30 May 2024 18:21:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F124F4D595; Thu, 30 May 2024 18:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CHO0V89L" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19EF645BE7; Thu, 30 May 2024 18:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717093302; cv=none; b=n7eQ2LYT1SXR1tXQ6lw69TDCZLBzJqkBLnE6tD1QZCPuqb+S010NU8iwFHEsMaZC003LRFed1FRRbJCpbceBvaXoN1XTzh8npC195kj58d1BzKzYeCYz7e5WtsAryi5Xuk7pqBjNBZtvpARZuxPY05h1v8PJy4OTjIhckd9Z6oE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717093302; c=relaxed/simple; bh=6dQOO04MinyW9E4u0n2nsSoky25+ryVk4N7a+/FDhrA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sSnyWMGxtWo+Q+w0ykxKyMUQVgSrd/nzkDliBlvFi2i348+kUF2GouEE+3KQR5P++qZouPqBNtSc1yiwdyX6fg5tAefH8dpHYHCDRP7D04NmUjnWYeuEntwN0QRuB/AK5KRjrv9WAdc1YKDaO1Q3BD16F4V7+S+g//0oWbL1lJ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CHO0V89L; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A4E2C2BBFC; Thu, 30 May 2024 18:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717093301; bh=6dQOO04MinyW9E4u0n2nsSoky25+ryVk4N7a+/FDhrA=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=CHO0V89LGzH5wFW93SZ9frknnlgZbTYyC0kuz5CuCNsartYushh+EUK85l3CaPFCL dAFds4FTeTS8nUelvZkafpGbWA81+jL+KgGNItHPgnMrVPWzUzIhm56CCTxsklCzjW IxooqP2t2iyr40g0K9VT5/H5NuDG1iIpjFB39QQZ89mnq1muVPnny3At9/7QBdZi/3 fOhBtN+aDuKiKZquVdjPScywGHppo3dkMLVcxFB0bpNa2MD8akLR00eGGZzaBbk4f2 uZ56gVc6LPAv6y9t2B6D9KpJ11jpwSRoxATs7txqITSvQ3mV9mF888ki5fpeFWfcai Bsr5BdcOeYR7w== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id D583ACE075F; Thu, 30 May 2024 11:21:40 -0700 (PDT) Date: Thu, 30 May 2024 11:21:40 -0700 From: "Paul E. McKenney" To: Arnd Bergmann Cc: Russell King , Naresh Kamboju , open list , Linux ARM , lkft-triage@lists.linaro.org, Linux Regressions , rcu , Dan Carpenter , Joel Fernandes , eeraj.upadhyay@kernel.org, John Ogness , Mark Brown Subject: Re: arm-linux-gnueabihf-ld: kernel/rcu/update.o:update.c:(.text+0x1cc4): more undefined references to `__bad_cmpxchg' follow Message-ID: <2e2038d2-00b5-4f54-884f-d04d7165bbf5@paulmck-laptop> Reply-To: paulmck@kernel.org References: <7f61cc11-7afe-46ac-9f07-62e0b9ab429f@app.fastmail.com> <5426b25f-9c25-4938-99e8-5cdea75e4d3b@paulmck-laptop> <214a33ac-d4fa-4d48-ad3c-ad8b00ae1a5e@paulmck-laptop> <38442e3d-1e43-4894-b126-b4258d331a32@app.fastmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <38442e3d-1e43-4894-b126-b4258d331a32@app.fastmail.com> On Thu, May 30, 2024 at 08:05:50PM +0200, Arnd Bergmann wrote: > On Thu, May 30, 2024, at 19:24, Paul E. McKenney wrote: > > On Thu, May 30, 2024 at 09:37:21AM -0700, Paul E. McKenney wrote: > >> On Thu, May 30, 2024 at 03:27:58PM +0200, Arnd Bergmann wrote: > > > And for an untested first attempt at a fix. > > > > What did I mess up this time? ;-) > > > > I think only the comment: > > > > > switch (size) { > > -#ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ > > +#ifdef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ > > + case 1: > > + oldval = cmpxchg_emu_u8((volatile u8 *)ptr, old, new); > > + break; > > +#else > > "min ARCH >= ARMv6K" now applies to the #else side, while the > #if side is the early ARMv6 (pre-v6K). Good catch! I plan to fold the following into the original with attribution. Thanx, Paul ------------------------------------------------------------------------ diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h index fd9b99f4dca46..34674a4118755 100644 --- a/arch/arm/include/asm/cmpxchg.h +++ b/arch/arm/include/asm/cmpxchg.h @@ -162,11 +162,11 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, prefetchw((const void *)ptr); switch (size) { -#ifdef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ +#ifdef CONFIG_CPU_V6 /* min ARCH < ARMv6K */ case 1: oldval = cmpxchg_emu_u8((volatile u8 *)ptr, old, new); break; -#else +#else /* min ARCH >= ARMv6K */ case 1: do { asm volatile("@ __cmpxchg1\n"