Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1295660lqb; Thu, 30 May 2024 06:29:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/v3uZ3fJ3qdt3g2Ybc2hCKCwmdH2N4yIljbRmH4vc6bWUzuj43ZUv8cxcfZOgS1nCP8iFX9V8D9KL6tI+lv92rH1KbZ5fU6pxedosDQ== X-Google-Smtp-Source: AGHT+IHXON1LkECU4e8bTyiI0Zji2fmyNgQPGA9NXizSNoUpu2fnTw3wozZScqpTF8XCV2VIdUwp X-Received: by 2002:a50:9ecc:0:b0:57a:2eff:8ac with SMTP id 4fb4d7f45d1cf-57a2eff0a58mr61983a12.29.1717075746752; Thu, 30 May 2024 06:29:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717075746; cv=pass; d=google.com; s=arc-20160816; b=fXbAQDzgKTzMdXCwah4n2i5D1sPzHbu0RuAakknHhsUg1Kx/C1xSaGMqNGr0ZWI9Lo jkkOzxwvVBIejPejsklRlzO5TknQWdUL5Q8d5RDVhW25MgpCtDpaiATq+MKia7u2y25g Vx9uS5FyB0IQhLXGcJ/I/Nkwl5dXa3pcsYtstPHpX6NV2AkJCmIJL1OaFCr/Dg5N1EzC rF5N5uNUNciCzDrBCg+jaqMGZWunIcgJaQ8Q6rZuoZOYyAQcXEjlcg2r5dcXWDhjSj6g 7MIVeXz9L4QDO2X0kpvFFFpkfJGziS32ddqfdzoEKWtWkfRnjAML503Jr0hfSYWvJrxv Kjyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=+jLxTCnWUt1Hir5+sNhTu9b2ULSOzRhP7WDq2X303Q0=; fh=UXnQD6p2UzbqL+8aniUAxQdZ3L/wGsyahAGR7EY2g8c=; b=oPR2wZNRZJPEMJPVnW5KoJHIroOBKh2A3emoMtsrMjmSWOwWD7/HBbpvdMP0rWuVlD rKDVyKm9nvxf03RDhQko7emHdn5oruk/S1WEXSKP2wbwRlgSh2YzvXRonGHFFcQ64qgO HxcsQQ7jzNeBg06mDOF45T219bu30B0HvaXwwnoPVaVjIgEv5aQq+Fh+w0BM5QrHRHGn +9fs8CTf0zspdhn4b1QtOdpHYAya2aFws7tlikpmIUIsM4xhbT0OFgm+28p4QhKoArI5 Y/vxsPTAvJnWOzGjFPrStRDolv5IIjpWKn4VTrISHqrz/5C6waIotQqTS+DMXqN49qxa lb0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=aSVCkjnJ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Plt2uIiL; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-195421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57864b38394si6760051a12.661.2024.05.30.06.29.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 06:29:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=aSVCkjnJ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Plt2uIiL; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-195421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 49BBF1F22745 for ; Thu, 30 May 2024 13:29:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6205D17C210; Thu, 30 May 2024 13:28:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="aSVCkjnJ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Plt2uIiL" Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 AEE6417C201; Thu, 30 May 2024 13:28:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717075702; cv=none; b=qBduUiynnJ/WyjDg5mF7lxDiEOxLgst9iCKj3gSiNuwGZX5DbStV89ZvPACBxQMa0VC75kYwOlT5G9Pl32Xs+MNvqzOeWvwOfOyjcRJA6twj7wntjnRou7olm1+r7Z89KU1FH2Rn6Xi8dzqLDMQPcuugXe0CkZZb/GlsPtGlvgc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717075702; c=relaxed/simple; bh=O3BgrCQplvhzyHxO9g26AKv4H545ShPXLbjYP3FXx3E=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=MgrYKgHKr6V1K9U/vEM2vcL6ZI53uLxAicCdZ/PMEC6B8YF8oeauGys9x3/305k9X8D8zsdZGARQ7OSh9ZGVpCaKCX6BgEvQ9ESGqEeWXUS3UItI7CWjjJH/RcrCX6v0AeFJeQ0u2uoC7PhaX5HSy3RWR9wNT2Q58VIV8ZsRf7k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=aSVCkjnJ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Plt2uIiL; arc=none smtp.client-ip=103.168.172.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id BD19F13800F1; Thu, 30 May 2024 09:28:19 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 30 May 2024 09:28:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1717075699; x=1717162099; bh=+jLxTCnWUt 1Hir5+sNhTu9b2ULSOzRhP7WDq2X303Q0=; b=aSVCkjnJmR+ugbr/EoBmBDWeVl G7coT7DjI6MH4KQohhe5nGSeL4kl3L82kYzRaHaK72z206pDnhx7W9FOsvMlP3h3 Xzd2uNubWbVlGqsj1/XugNwp8iI9UPsPs7AqrOInfR7KZlY3g8LiEciPgBV14OeZ 2hnvZMEFqvzUSXqebeokk2m7HgRXUKVApSkLFOMYa/blLZLwm3oouhzIhawHbTH5 Oqvez7tBhpGH+NzU3t0M5UVh61vzbl11RF+GiAjb1cTxSTIlQ1S4NVWpEWDgi94n rt1YCyudsqMrzaQwMk36sO9KnmRHlvW/zzKIijzIr62mmCqzyTw0ZbYUZKew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717075699; x=1717162099; bh=+jLxTCnWUt1Hir5+sNhTu9b2ULSO zRhP7WDq2X303Q0=; b=Plt2uIiL7fKwDpzwEDVi4jQdDTnh2hOsqmssQEoyn5wd z3nNHZvdzW7cBVPM1ZO7Macpsbq1D1DjEsolEMwZdAXdSfZb00z/5r/mxM2MHI3D GPXOQOc68IndPWs40T/eDEMUwg1iiXAf6hcBbnhcpfAnt442KM6vjh2ztORgDsMX GyV+qI9ZevBRiis445z6Chs60V7f54v5f4nmZMbTqoPbbEILN5DYwcvDIFi+SzUl vCKyfVp0Zf5VNWhsoCW8n1+tVqu/kF9ZvdGgbjIgILhvf5DRd/zH7LcffeqOXjt9 IluzhtQ13Pbx/h1dw5snQ9PUisvAgi8BSzZ4CsKmgA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3A9A8B6008D; Thu, 30 May 2024 09:28:19 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-491-g033e30d24-fm-20240520.001-g033e30d2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <7f61cc11-7afe-46ac-9f07-62e0b9ab429f@app.fastmail.com> In-Reply-To: References: Date: Thu, 30 May 2024 15:27:58 +0200 From: "Arnd Bergmann" To: "Russell King" , "Naresh Kamboju" Cc: "open list" , "Linux ARM" , lkft-triage@lists.linaro.org, "Linux Regressions" , rcu , "Dan Carpenter" , "Paul E. McKenney" , "Joel Fernandes" , eeraj.upadhyay@kernel.org, "John Ogness" Subject: Re: arm-linux-gnueabihf-ld: kernel/rcu/update.o:update.c:(.text+0x1cc4): more undefined references to `__bad_cmpxchg' follow Content-Type: text/plain On Thu, May 30, 2024, at 14:26, Russell King (Oracle) wrote: > On Thu, May 30, 2024 at 05:50:52PM +0530, Naresh Kamboju wrote: >> The arm builds failed on Linux next with gcc-13 and clang-18. >> >> Config: arm imx_v6_v7_defconfig - failed >> >> Reported-by: Linux Kernel Functional Testing >> >> Build log: >> ----- >> arm-linux-gnueabihf-ld: kernel/rcu/update.o: in function >> `rcu_trc_cmpxchg_need_qs': >> update.c:(.text+0x348): undefined reference to `__bad_cmpxchg' >> arm-linux-gnueabihf-ld: kernel/rcu/update.o: in function >> `rcu_read_unlock_trace_special': >> update.c:(.text+0x41c): undefined reference to `__bad_cmpxchg' >> arm-linux-gnueabihf-ld: kernel/rcu/update.o: in function >> `trc_read_check_handler': >> update.c:(.text+0x4b0): undefined reference to `__bad_cmpxchg' >> arm-linux-gnueabihf-ld: kernel/rcu/update.o: in function `trc_inspect_reader': >> update.c:(.text+0x1518): undefined reference to `__bad_cmpxchg' >> arm-linux-gnueabihf-ld: update.c:(.text+0x1548): undefined reference >> to `__bad_cmpxchg' >> arm-linux-gnueabihf-ld: kernel/rcu/update.o:update.c:(.text+0x1cc4): >> more undefined references to `__bad_cmpxchg' follow >> make[3]: *** [/builds/linux/scripts/Makefile.vmlinux:34: vmlinux] Error 1 > > You get a reference to __bad_cmpxchg() when someone uses cmpxchg() on > a datatype that there are no CPU instructions to perform the atomic > compare-and-exchange. > > As we support 8-bit, 16-bit and 32-bit, I would expect that we're now > seeing cmpxchg() being used on 64-bit values, which are unsupportable > on 32-bit Arm. A 64-bit cmpxchg() would fail on most 32-bit architectures, other than armv6k+ and i686+. Since this one fails on an armv6 (non-6k) build, it's probably the added 8-bit cmpxchg() that Paul talked about using for RCU, though I don't see that in linux-next here. I htink we need to use the emulated cmpxchg8() in __cmpxchg() for this case, just like we do on other architectures that only have word size atomics. Arnd