From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C028121E082 for ; Mon, 29 Dec 2025 01:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766971602; cv=none; b=q+x4+dyltTfKQJr4d9jESh/v4XYrRz4XV7kKp4HvZZqvSJBZBnIZY1CetS5oWwVhgdKABXX/2MYQ6Phm4o/OJp3u6LtGq4IAyW9m2KCvBFrjPWyCzN92s6wXpery0yoK0F3xN6zYzz+IWT6i+9uoEDl95CPffb+UBID53bPKJUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766971602; c=relaxed/simple; bh=6jVZfNQHfE3ib1e3i/fA6aFiwMFZ5z3vI7XwOplm+ho=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=X1lHp6m8zbOCZdZ8GYfRQAr++oIYC6Lslxjdx27YfgibU6Src3yJFNqwrFLbzEgcSgy+zJR+0ZOQYmsQkMflclz+pmjjcbEpV1gqy+NaIRMW4fAWwpMW61uhu90FashOWmvs6XklMcxgVY7sJ44yptccr5f0v5l04EzXtyCjjxA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b=A8M6WfqB; arc=none smtp.client-ip=209.85.160.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b="A8M6WfqB" Received: by mail-qt1-f193.google.com with SMTP id d75a77b69052e-4eda26a04bfso112633241cf.2 for ; Sun, 28 Dec 2025 17:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1766971600; x=1767576400; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rGBP3a20VsxawgAkzyf8iorKbTSNb1d+2RoMt317030=; b=A8M6WfqBopYAGSNk3ucI0K9YkgjGGKaNXi+6hHXGbRUzwqU3HybXxnja4OZ2A3n7Vg IO6jTazdH5gLhrP4UM8RKyq9J0RiswNDqQ3v6l6J9Gob7VBO1IFw1Zuj7wvVg8ikJSrV LVS6+7m0BLdHJ9tPAhH8+o/ff83MfEPji9MAAm9TctcYYEhjmcVMo+1m2e23frIxE/2+ eeHQJEWi/HxGG1L6CiTj+ts6vFemjob1baQDrT+vu/R4j4BViCdQonrjKglQbBkpgsQ/ PjGa9VH4qiEETBHozRF/PYK4o5TERGL4lkKvEjFdJ8EtV8NT4IraCbxZHhshOWRZlVGZ Sl2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766971600; x=1767576400; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rGBP3a20VsxawgAkzyf8iorKbTSNb1d+2RoMt317030=; b=D8ybAWmRVkiZS6gJpspXZinLxrPYlhb6RS/pjHiGCvqd7kOwBlD8bMWbEMhJJM33IN aQJrKUEmK8fIJGlhZ6zEMIQB0xd/qLVVczSIEuCrj1UhOnBzqI8La2fnBIZ6TfuKUszE Od4v5gnhko5K/TeLCPU8M1FKdFOIdoU6v7upXI1q4D/BNtUVc90r5m3cO+wddZNILpfs 5Bds/t53dyu5LJ90CZEDdEFD2BDDitNINNnfwHAs+tY7DX3qCO3ZjQQjW2V1Uu1IlmDP Gp93vdCmhwaJX/2LaLd8QANFn8gOEp7J7SizKZmBZshdP2AAQDlX1JK5HY5YIugiiMLt vtig== X-Forwarded-Encrypted: i=1; AJvYcCW6hqO5op314zBUiFHFllql7qZ9/OMn6aLOnFXWEuET8dRqYdq9rVbF38Kmmf1EaFGBImK9/8J9icVbM00=@vger.kernel.org X-Gm-Message-State: AOJu0YyaCVu2w24krfyKfugQYj6s5ErkH2vBZhoI0EWeBqB2PpHIXLdz CEgUhlMbS5Jp+Lw8KIhznEpaVjdLYzttheY0dCST+8gM1swUnE4hzG21UOv6WrSWVZg= X-Gm-Gg: AY/fxX5yLYKHlp90lMQ0fEhn1ZZg6yblpgSa67UfEPNg3Jb/Q7SiT9EUFXcYETDD2ll rLlvzx58I0khcgyjmiqMuNRVkzSK0lPY+8iC+Z0RAx+FOeiYHfDZ50zCsah70tF7kAvTfjan5fY +mS3Z3E1i4yPppgXkxZ+3XdwBXuXZ9HYvbxUGn3Z1nfjzNsTbUQ9yTPneBEibdD7Q054H8vf9gd GCl1WFKd77mA2islOwxSscFMzCXG+vs9e85zpys6oOTtvxVOUKnZyAp6Db5vOkEx+yrfmjsU0W3 NsdDjmdvBRZb1LdKoSWD7dVdxZajYbivlP8vMX41LkklmyYEbne5RkXJhQl6o2Bc4dECsY0yrYf gMHYlzws8UG2NMzuw65Cchfxsb7xDiCOgCOGsv0fMea/l1IYlFsnLTrOwfto/YEGPw8si2D5SAU ejT6dY7ePGaK01Wpue10BxkftmTLD6xtghpUkjNEf8Cueq8sY+5JY= X-Google-Smtp-Source: AGHT+IGEzqpbI6AbapIJlA3Uz+KnswrSFec0YE5rCA81t7vFfgvpfz5067CC+VvdDzEo7yRutO/rPA== X-Received: by 2002:a05:622a:230d:b0:4f1:e8f1:cbda with SMTP id d75a77b69052e-4f4abd839edmr436267011cf.54.1766971599661; Sun, 28 Dec 2025 17:26:39 -0800 (PST) Received: from [172.22.22.28] (c-75-72-117-212.hsd1.mn.comcast.net. [75.72.117.212]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4f4ac531fa8sm204081481cf.4.2025.12.28.17.26.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Dec 2025 17:26:39 -0800 (PST) Message-ID: Date: Sun, 28 Dec 2025 19:26:36 -0600 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 v2 07/13] dt-bindings: riscv: Add B ISA extension description To: Guodong Xu Cc: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan , Daniel Lezcano , Thomas Gleixner , Samuel Holland , Anup Patel , Greg Kroah-Hartman , Jiri Slaby , Lubomir Rintel , Yangyu Chen , Paul Walmsley , Heinrich Schuchardt , Kevin Meng Zhang , Andrew Jones , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, spacemit@lists.linux.dev, linux-serial@vger.kernel.org References: <20251222-k3-basic-dt-v2-0-3af3f3cd0f8a@riscstar.com> <20251222-k3-basic-dt-v2-7-3af3f3cd0f8a@riscstar.com> <20251222-stitch-preachy-3fab87fd6f0f@spud> <66c0676a-7920-4825-b916-3c00b1648a08@riscstar.com> <5979c8ef-b0fa-40c8-944d-96e226fbcbe8@riscstar.com> Content-Language: en-US From: Alex Elder In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/28/25 7:08 PM, Guodong Xu wrote: > On Mon, Dec 29, 2025 at 7:50 AM Alex Elder wrote: >> >> On 12/27/25 8:51 PM, Guodong Xu wrote: >>>> That's what I understand it to mean, anyway. >>>> https://github.com/riscv/riscv-b >>>> >>>> There's no point in supporting "b" in devicetree to represent >>>> the others if it also requires the others to be present. >>>> >>>> I think that, instead, "b", "zba", "zbb", and "zbs" should all >>>> be allowed. >>>> >>>> I might even go further and harden the requirement, saying that >>>> if you specify "b" you should*not* specify "zba", "zbb", or "zbs". >>> Historical reasons here. "b" came too late. The chip vendors have published >>> cores with "zba", "zbb", and "zbs"already. >>> >>> That's a migration bridge to require "b" must be listed >>> together with the other three. >> >> Are you saying "b" has already been included with "zba", "zbb", and >> "zbs" in an existing DTS file? > > > The risc-v ratification timeline is: > "b" was ratified in Apr/2024, which is about 2 years later than its > components zba/zbb/zbs (these were ratified in Jun/2021). > > I can do this in linux kernel, writing a dts file which contains only "b", > but no zba/zbb/zbs. The linux kernel can correctly extend "b" to zba/zbb/zbs. > ps: after I or somebody adds the logic into cpufeature.c. Yes, this part I understand. (Yes, do that...) > However, the problem is with the older software who reuse kernel's DTS files, > and recognizes only 'zba/zbb/zbs'. (If you search in the riscv/boot/dts, > you will notice a lot platforms supports zba/zbb/zbs.) > > When there is only "b", these older software may just disable the features > related to 'zba/zbb/zbs', because when they developed their feature, > "b" doesn't exist yet. Yes, old DTS files can and will continue to specify "zba+zbb+zbs". But those old DTS files are not expected to be changed to replace "zba+zbb+zbs" with just "h". Once "cpufeature.c" supports the "h" extension, the software supports either one: "h" or "zba+zbb+zbs". The key point I'm trying to make is that the binding should not require "zba+zbb+zbs" to supplied *on top of* the "h" in the list of CPU extensions. Only one or the other should be sufficient. And I think your binding was saying "if "h" then required "zba+zbb+zbs". > Hopefully I explained the logic clear this time. I think you have done your best. I hope I'm not just being dense. -Alex > BR, > Guodong > >> >> What I'm suggesting is that (unless someone has already done this in >> a DTS file), there is no reason to require "b" *and* the other three. >> You should allow either "b" *or* all of the other three, not both. >> That would support older platforms as well as newer ones that use >> the more concise "b" only. >> >> -Alex