Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1043254lqj; Mon, 3 Jun 2024 08:33:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXv9A06Z6VbFo1rCmFQfYp+kboL5yBU1RJb4jRPml0/Bn02kSt20kTc7HKsrvCYeyUdacHOIM+Kqd2vGTByWyVCyjG6tP6bjLMR9W8jfQ== X-Google-Smtp-Source: AGHT+IFRZQ7Eddy4SV3hpFxYnwhF/0wUPCesmkW7VfKGFqfDc2Ka1YbL9we75OYHxJzO6YTS+EXm X-Received: by 2002:a05:6a00:929c:b0:6f8:c6e4:1829 with SMTP id d2e1a72fcca58-702478a3f56mr12980309b3a.25.1717428780346; Mon, 03 Jun 2024 08:33:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717428780; cv=pass; d=google.com; s=arc-20160816; b=D0mD17QddepDgsEKv2C/C1HLEvW8YrJjGDFzik9a8+LXw+/GqHvgqmW5HsZU6B//ve v0r3+7bzxxMlJKtbP9x53beceeHs8g8uFuFIqiIsLGbUwZEAAuXFzh9dzDxmVqTAzU8B AkrhDsWhldvznAdzJc5YT0xUCgMa2BhU0fQ78YE5nLl4h+zAw4JvKecq9WoqeyZSlZ5A oVrQ8fFiPTCwUZygf2qJY4xIDUlBBaq+PyLSrJtM36h4V7OfRe+vpHN3GcXfD0zzeEbn EYnQvg5IrOS2D3OQSm7Kx9mdQ8gF84V1xN0k/ftvtbi5J7pQBtINzUEjnBNgrP6C5A/O qZKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=fGJHl7Le6nz/qbWUoAOGH4qB+HrLawppzMlmd3N5izE=; fh=dkezj1943WJHVGmj9Rh/CNzEC3dtGC2DjDiBplpPVG4=; b=SU0zpCW4TfBXo6Z0CLCjYRrmM8PM2NkjgocK0r/JP6igKfFJQbudrYR56njltZXgEz LIkIxD6ULGJlxWT5TKBWLqbskPWRpBoFJ+k08hkI5r7Gg/YJ2bb+eWAqb2w4iQ4m1F4u lu5S5o3W7TgYiWinxxJinTWOpGKT1H3X+WaPw4P+EsS8KCxewIQ3q3Ek4gk2hGOySg0g 7lvlTxs4s91vKhvjAKrckxU3rRme8ZR4PB5+hxTAFw2UmWjo3OQUgHMNRYwBnlTJZ+cw O1QtnY1Ur9K+E0Uu8zTGUNFDUVLtcFijQ3IIX0ZIHZwvqDZrtzdMZBk2nM8BuS22uFHU U6Ug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-199367-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199367-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c359e09cadsi9974a12.378.2024.06.03.08.33.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 08:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199367-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-199367-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199367-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 533D5285F98 for ; Mon, 3 Jun 2024 15:31:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C79A8130A68; Mon, 3 Jun 2024 15:31:49 +0000 (UTC) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 442B0126F1F; Mon, 3 Jun 2024 15:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717428709; cv=none; b=lbv85T0kl/zN0T30xH3rJehz9mgzHQtE1fGefB0JhEn5L6DAQOTilccUu5AVV4U2DZMYHWDEshHO7WA6AjQCjr7aA1SVdjntuR+yAz89KZIlE1ZoteX7geBj1yEE8U/YLOmQe4ty3hiiYCRkJnvbWCJc8AhZlXaCgMDkBN1t2vA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717428709; c=relaxed/simple; bh=FGEu0jOGMounLvsZRMkDX/bZRfd7rOh4F+HLFoCmdYs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LQb0t66GQu5HANbs85IncgokFtwH4OvCk0RU2mWznz0rrGw9BiohBE3aVbi/ztyy/SXO8sfYNPdpT4RKc4J4+RNmAo3rTWRGUuH+se0OUtkr1Bg3IoXgT91ES7blvqEtMORvwp4YxuiZxNFGS1tu3JXW5dfOca/omGSy1mR6/a0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 9EA2820008; Mon, 3 Jun 2024 15:31:41 +0000 (UTC) Message-ID: Date: Mon, 3 Jun 2024 17:31:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/7] riscv: Implement cmpxchg8/16() using Zabha Content-Language: en-US To: Nathan Chancellor , Alexandre Ghiti , Conor Dooley Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Arnd Bergmann , Leonardo Bras , Guo Ren , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, llvm@lists.linux.dev References: <20240528151052.313031-1-alexghiti@rivosinc.com> <20240528151052.313031-3-alexghiti@rivosinc.com> <20240528193110.GA2196855@thelio-3990X> <20240529155749.GA1339768@thelio-3990X> From: Alexandre Ghiti In-Reply-To: <20240529155749.GA1339768@thelio-3990X> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr Hi Conor, Nathan, On 29/05/2024 17:57, Nathan Chancellor wrote: > On Wed, May 29, 2024 at 02:49:58PM +0200, Alexandre Ghiti wrote: >> Then I missed that, I should have checked the generated code. Is the >> extension version "1p0" in '-march=' only required for experimental >> extensions? > I think so, if my understanding of the message is correct. > >> But from Conor comment here [1], we should not enable extensions that >> are only experimental. In that case, we should be good with this. >> >> [1] https://lore.kernel.org/linux-riscv/20240528151052.313031-1-alexghiti@rivosinc.com/T/#mefb283477bce852f3713cbbb4ff002252281c9d5 > Yeah, I tend to agree with Conor on that front. I had not noticed that > part of the message when I was looking at other parts of this thread. I > could see an argument for allowing experimental extensions for > qualification purposes but I think it does create a bit of a support > nightmare, especially when there are breaking changes across revisions. > >>> config EXPERIMENTAL_EXTENSIONS >>> bool >>> >>> config TOOLCHAIN_HAS_ZABHA >>> def_bool y >>> select EXPERIMENTAL_EXETNSIONS if CC_IS_CLANG >>> ... >>> >>> config TOOLCHAIN_HAS_ZACAS >>> def_bool_y >>> # ZACAS was experimental until Clang 19: https://github.com/llvm/llvm-project/commit/95aab69c109adf29e183090c25dc95c773215746 >>> select EXPERIMENTAL_EXETNSIONS if CC_IS_CLANG && CLANG_VERSION < 190000 >>> ... >>> >>> Then in the Makefile: >>> >>> ifdef CONFIG_EXPERIMENTAL_EXTENSIONS >>> KBUILD_AFLAGS += -menable-experimental-extensions >>> KBUILD_CFLAGS += -menable-experimental-extensions >>> endif > Perhaps with that in mind, maybe EXPERIMENTAL_EXTENSIONS (or whatever) > should be a user selectable option and the TOOLCHAIN values depend on it > when the user has a clang version that does not support the ratified > version. > >> That's a good idea to me, let's see what Conor thinks [2] >> >> [2] https://lore.kernel.org/linux-riscv/20240528151052.313031-1-alexghiti@rivosinc.com/T/#m1d798dfc4c27e5b6d9e14117d81b577ace123322 > FWIW, I think your plan of removing support for the experimental version > of the extension and pushing to remove the experimental status in LLVM > (especially since it seems like it is ratified like zacas? > https://jira.riscv.org/browse/RVS-1685) is probably the best thing going > forward. If the LLVM folks are made aware soon, it should be easy to get > that change into clang-19, which is branching at the end of July I > believe. FYI, it was just merged https://github.com/llvm/llvm-project/pull/93831 Thanks again, Alex > >> Thanks for your thorough review! > Thanks for taking LLVM support into consideration :) > > Cheers, > Nathan > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv