Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp21663lqo; Wed, 15 May 2024 06:43:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8NgjEbT0/Yh9sfQaXXt17dqquewL6Z6nGT3b/7j70Tdvf2N0RKcIQSPlu3HjCv6xpzH8LWKf02PmrU3IYXD/vQXLn4WPub+ScKKuvRw== X-Google-Smtp-Source: AGHT+IHdUSyRNMKeyTF0v+fuu94ZbvGkWAx+FLW4oy/kyloPbT8mIr88B9k3NQnnSCoSvXsMBQDb X-Received: by 2002:a05:6a00:398e:b0:6f4:d079:bb2b with SMTP id d2e1a72fcca58-6f4e02adb90mr15663826b3a.9.1715780632177; Wed, 15 May 2024 06:43:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715780632; cv=pass; d=google.com; s=arc-20160816; b=VJ1Tr1uCPk877yrEK84m1IBkMbCtzfYbjBdo4FPyx7FQ/TRRCTt/fDr3O8FSpN9mQc Z0qdfaCE/gMOvL60pMt6uNl6iVWQHQafEgMx58VaNetAnhxSIiGCx0hvYl7I/sh817i0 KIgqnD0DWywc/YxO7AYgKPRJef55Qk2QkRsZ1tCw+AARKTf4nqzxY/Q/584VbMhgcXLM SVXwts5lGoLztDam9ydLPqAnuQiJaR0fF994KsqVpB0T7NJy4i+sFr4+O9niYDxEmo9g x6D6mKB5lf+zW2VY3kWak3a7igD4VhdY9wc+5/W+KWvoTISf2aQ1qTU1XqHXY1o8ISnM HUvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=bjJb6f9+vuBxhgkq+MilEM8GHNpkXKxOQ59E4iWB+RU=; fh=FgapjihWd3LQrhPPD8WX8f8B6W7E8HJE+R/RdyT2hMY=; b=igPrLhUPaG0d+aKWCCJuh+6SYGs5pjSaq9BzQj1M0P6agrJAQV8/NRpiNEXYhFhYro ZIeH9GmKO5omjtGbr4gJzFxEWvy9WfY+qh87sHGLZIapnuMxH/6foolNc0Bd9wC4s3sx tljqH90+DqyU69VFeb+7aHgwL+vgTjEIEIA9KxuwJRQL+LblRPN29139KjaY4CrKJf2h 8BVqcMdeCIdWRDdetslF22rKiJ/mDMdbXbqD9s9Es2CM8BjbrxUh0f/lROIb5UlPSLxp iIVOm4adsqQ9bcPIxMTZZxZJNa4kBWW4Qkv+Lsf7mvQW/tkbeyVKTKJjwuH+Xdw+fGvk hcXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-179929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179929-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-634115305e3si13424700a12.447.2024.05.15.06.43.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 06:43:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-179929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179929-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 11CD0B2241C for ; Wed, 15 May 2024 13:43:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 354DA13F006; Wed, 15 May 2024 13:43:12 +0000 (UTC) Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7559513E8B6; Wed, 15 May 2024 13:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.133.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715780591; cv=none; b=Pg73FKyuAVJVIWpze3beJJIMVHSUYpzCD0jSQz2gwu67flI+yhe8X/VRM9lDKGZhoLlMoaAtYeOt4CTKp56GXLzaFBzcUiFmpcdQ1qR/I9GDH9aRPxoUzjBtq3W7+rg7xCZd8EvOjIHZwmw2GJ8uH2Sv/44/UBH8piFwno2ABKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715780591; c=relaxed/simple; bh=qyG8CBA1LFfZoDjh2C5tAoYOWcPwQzqYhJHxMxFAF98=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=RTF6RS/fDP6fnHLlD7dGQEu9OwskoIY9/8+hbVXRzRuysdpWcVnTn5a1aTGNwbUw9GQWNtxq0Ef8VkJzTdKB7FXwYtYWKwRLgkjaint4Htn3NJgNG56rKGjWmVelIYpg8S/WUZ0+oyZKwYdee3WYZKjyZhOJhlL7dUPhznm6wLY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk; spf=none smtp.mailfrom=orcam.me.uk; arc=none smtp.client-ip=78.133.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id E81CB92009C; Wed, 15 May 2024 15:43:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id E22E792009B; Wed, 15 May 2024 14:43:06 +0100 (BST) Date: Wed, 15 May 2024 14:43:06 +0100 (BST) From: "Maciej W. Rozycki" To: Jiaxun Yang cc: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Guenter Roeck Subject: Re: [PATCH 6/8] MIPS: Limit MIPS_MT_SMP support by ISA reversion In-Reply-To: <7fc82f8b-df9d-45f5-8e82-27eac7b4b0ab@app.fastmail.com> Message-ID: References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> <20240202-llvm-msym32-v1-6-52f0631057d6@flygoat.com> <7fc82f8b-df9d-45f5-8e82-27eac7b4b0ab@app.fastmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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 On Wed, 15 May 2024, Jiaxun Yang wrote: > >> MIPS MT ASE is only available on ISA between Release 1 and Release 5. > > > > R2+ only actually, as also evident from Kconfig... > > Hi Maciej, > > Long time no see :-) It's not so easy to get rid of me. ;) > There is nothing stopping us to run R1 kernel on R2 hardware, given that > those features are all detected at boot time. I understand MT was introduced > at 34K which is R2. We can certainly choose to support R2 features at run time with R1 kernel configurations, but it's not what the change description says (left quoted above for reference). And the MT ASE, indeed first implemented with the 34K (for which I was a member of the product development team back at MIPS UK), is not a part of the R1 ISA specification set. > >> --- a/arch/mips/Kconfig > >> +++ b/arch/mips/Kconfig > >> @@ -2171,7 +2171,8 @@ config CPU_R4K_CACHE_TLB > >> config MIPS_MT_SMP > >> bool "MIPS MT SMP support (1 TC on each available VPE)" > >> default y > >> - depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MIPSR6 && !CPU_MICROMIPS > >> + depends on TARGET_ISA_REV > 0 && TARGET_ISA_REV < 6 > >> + depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MICROMIPS > >> select CPU_MIPSR2_IRQ_VI > >> select CPU_MIPSR2_IRQ_EI > > ^^^^^^ > > ... here. I wish people looked beyond the line they change, sigh... > > Both features (VI and VEIC) are probed at boot time. Selecting > them doesn't necessarily mean that CPU has those functions. Both are optional for R2+, so necessarily they need to be probed for, but they are not available in R1. The reverse dependency set here is another indication that the MT ASE is an R2+ feature. Maciej