Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp533999lqt; Mon, 18 Mar 2024 15:47:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWT4gWmm45OxfECGn7ri95xBUrqR1a6HAO37MrDMAagM/e07vGJgUXW+Xo/0h4qH7no0P6WgofpRrlhvQP8YfZNcK9GG0xOapprJKrLqA== X-Google-Smtp-Source: AGHT+IHooXfBVVLEi3z0zS4MEzVS7DwEbfAGE0UDm+ZgkjfiCvuvCiWX9lv6j5fLOmK+3YwntBHc X-Received: by 2002:a05:6a00:1482:b0:6e5:e1d6:fe9c with SMTP id v2-20020a056a00148200b006e5e1d6fe9cmr1182459pfu.2.1710802026831; Mon, 18 Mar 2024 15:47:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710802026; cv=pass; d=google.com; s=arc-20160816; b=rIctstwd8AqGfYuoI+qrVtR+o/54V5jZEQ2kOafOMZSorOAfXeUccHqNr+cc5D97l7 WOHBTXdxyeVGrHT0T4D6CyK7w1VTxTz0T4Fk7MrbwXVjbhEIFXC+pulm77CIplRhwnO3 EoPy1XTsQF7avKgyezEw52niCG6VLsvLZvt4TAcg9ItVluMh1FkpDez6JdQP0CzVO1Gu WoisFdnS2ifPCeufAloMPTV6OuEwNYb32lxsxaBjnsD7Q+IygZILoQBdZp7g1oVv8nft E8oyACnS6F361inR2Sa9761RWTlhMg1Tm1Wcg2wpSM/JXq28uEh/SIL6vZ8xcOMBQrR7 nYvw== 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:dkim-signature; bh=5Hl7mzFXoKsnD5jNzAKhdfpCR878Iekflp3ULzor2TY=; fh=spi48TcTPwZaVhHtjGMGG4cddCkkxOg7GTmQm8sqz/U=; b=oC165zSIsoascBtST6tNu7Xx85D+oKhg27bJZoq3MdT9G2/Gmye3uvAKca0szj17C+ 2z5gXYVoxyz5PxIAa67BH0+JrB0kssTmBx/F9a5xbMA2kP68uSp4bU2/Avj3RSS3JNok RsFIF9S07x/s1n7KiCKyf+kE1yGESzYfSGdmaQhN7BygZMHtfPKXWczEYtZEyNqIkeI4 DFVFgR7jZnMgxxl9FKUi+7Nz76vgKKS1LjCHNbZn/9KhkZ9fWHtazpk26fc21v9xGDDQ B1eah0Xh1256dHrPjymRqYhNsnh913slOdnynbJ0DlqrSvfHOjnySRmMEE0AdC2aPsSM XkxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=lZL97Ian; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-106765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106765-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 v8-20020a63f848000000b005dc4ec6cd2esi9003063pgj.767.2024.03.18.15.47.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 15:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106765-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; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=lZL97Ian; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-106765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106765-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 7ADE0282CBA for ; Mon, 18 Mar 2024 22:47:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B6825A7A6; Mon, 18 Mar 2024 22:47:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="lZL97Ian" Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (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 1FA645A7B1 for ; Mon, 18 Mar 2024 22:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710802020; cv=none; b=XCbbrbnhyenoDZqUoZ3uKf4rO0YKOXb2TC7m0AsTCX1u+yBv3oyL+AI8us2h46VFjU3IEAXddvU0t0fyMX4JWk8cviu3N4w3JXriOe1jXZyjc8g4VIEHkX0qEbvWlGd7UlMDUE8fSmfQ7EzP7v8m/0au5oKaZICol1d2MdY6REw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710802020; c=relaxed/simple; bh=gC5JZY2Pkww+xLInQHuOdSzKcBznebXtLZEluABsc/g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g7d2+5FYBpr5wltdWp2q5yY9P4FQJCT5HhJy8Ng54bXvQpQ2bI1tsGbqJ4lkv77zkC8Cnek844sJj3rPQTzXKVd95/714A3JsFLSVsNMcGnPHgdkUBxmSy2yC9i7j8Q33ED+zjCCEMZ2FT1N7/a0NDyg0nFQdG0Wkqg2jSUVRtI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=lZL97Ian; arc=none smtp.client-ip=209.85.161.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5a467dae51dso1587327eaf.1 for ; Mon, 18 Mar 2024 15:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1710802017; x=1711406817; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5Hl7mzFXoKsnD5jNzAKhdfpCR878Iekflp3ULzor2TY=; b=lZL97IanPWa1M+JCWZGzhhG+7POAKuc3dcbFi6xOZ9CquIEduVReO1YyO2RSC6cRbZ 86ZDokidCA2fox1MwDfQUgpMts2gIig09VTNa0x0KHSUso6BT+kY7LVdwMOfpha0j6Ah 9vA3coibDn7/kcGx3xOeiInMXJ29d0tkYsvh24N+1vOEIMd7ew+p+6QgwzT7gF3R8ss8 hLBqJ6qUd2pKW+Qfd3PS6WxV26T4QTw+0ym6PnkwnbSZmhFf9lu9xrLHWrGovMIF/pP8 h/Ms08RHoGjiXJHYdkhTaSIx42rfzfmbMTxDQ5jhBbxtYCcKoZWvuC5k6MxgSPIGTC8n 4o6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710802017; x=1711406817; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5Hl7mzFXoKsnD5jNzAKhdfpCR878Iekflp3ULzor2TY=; b=c78N8moReRtQ9fNz6nJpRfpuvkJ2aW0beYJxwZuEAytscS1fbTcT9Pbc8EYjtuisIz rwVdSP+DArZ76qzU95NGEf+YKqtrBzOW0rPR5NqqKyVdf/d5BZEMC65bIPVQh2458dNW tVoQPk7U8oE8iRO46dLjrvY9I9InT54Y7oJsoEvlxRnmby/Tgn63gt2Xrc2Tr4FdZGJT dJptEaSCVk2VM4QqLQv1clOXPJrgGKYVxwCEhMi6qMiUx+pfsdz+9mBeLq7f6UX/l52T 5p6K2StbKdz/aOW9M/+LCiyRfATtkVyjm88oRLUCll3kBKD1SmV0h3QfXF6K61qGZYQm AcoQ== X-Forwarded-Encrypted: i=1; AJvYcCXC0dAusxzhFTWVYL8nmW+BWiO1qxux20KCLpShI/JL0Y6IBiio8SXyOE6wPpO5Kg6hM3I+p1b1/C0nS2otjwcum9Are3OAOmI6/r/w X-Gm-Message-State: AOJu0YwKT8wjzCVddFGYlbMX+SLR+s45gWrZg59pQis5oqffZUQZc8+a SEatCAFi4/5pYrdrN3Rt6uL2R4AFV0Phd+YYyXYt7X0V884RXRGQp5IjnPtMedw= X-Received: by 2002:a05:6358:726:b0:17e:b7a0:2ecd with SMTP id e38-20020a056358072600b0017eb7a02ecdmr1071084rwj.0.1710802017033; Mon, 18 Mar 2024 15:46:57 -0700 (PDT) Received: from ?IPV6:2601:647:4180:9630::546? ([2601:647:4180:9630::546]) by smtp.gmail.com with ESMTPSA id z13-20020aa785cd000000b006e5597994c8sm8485049pfn.5.2024.03.18.15.46.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Mar 2024 15:46:56 -0700 (PDT) Message-ID: <2de56d8b-bc78-428b-9c09-4729b269fa41@rivosinc.com> Date: Mon, 18 Mar 2024 15:46:54 -0700 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] perf: RISC-V: fix IRQ detection on T-Head C908 Content-Language: en-US To: Andrew Jones , Inochi Amaoto Cc: Conor Dooley , Qingfang Deng , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Anup Patel , Will Deacon , Mark Rutland , Conor Dooley , Heiko Stuebner , Guo Ren , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240311063018.1886757-1-dqfext@gmail.com> <20240312-evil-resource-66370b68b9b4@spud> <20240315-73aa13079ef83a4559869084@orel> From: Atish Patra In-Reply-To: <20240315-73aa13079ef83a4559869084@orel> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/15/24 01:11, Andrew Jones wrote: > On Wed, Mar 13, 2024 at 09:31:26AM +0800, Inochi Amaoto wrote: > ... >> IMHO, it may be better to use a new DT property like "riscv,cpu-errata" or >> ",cpu-errata". It can achieve almost everything like using pseudo >> isa. And the only cost I think is a small amount code to parse this. >> > > What's the ACPI equivalent for this new DT property? If there isn't one, > then the cost is also to introduce something to the ACPI spec and add the > ACPI parsing code. > > I'd much rather we call specified behaviors "extensions", whether they > are vendor-specific or RVI standard, and then treat all extensions the > same way in hardware descriptions and Linux. It'd also be best if errata > in extension implementations were handled by replacing the extension in > the hardware description with a new name which is specifically for the > behavior Linux should expect. (Just because two extensions are almost the > same doesn't mean we should say we have one and then have some second > mechanism to say, "well, not really, instead of that, it's this". It's > cleaner to just remove the extension it doesn't properly implement from > its hardware description and create a name for the behavior it does have.) > > Errata in behaviors which don't have extension names (are hopefully few) > and are where mvendorid and friends would need to be checked, but then why > not create a pseudo extension name, as Conor suggests, so the rest of > Linux code can manage errata the same way it manages every other behavior? > > The growth rate of the ISA bitmap is worth thinking about, though, since > we have several copies of it (at least one "all harts" bitmap, one bitmap > for each hart, another one for each vcpu, and then there's nested virt...) > We don't have enough extensions to worry about it now, but we can > eventually try partitioning, using common maps for common bits, not > storing bits which can be inferred from other bits, etc. This is my biggest worry going forward. We already have a ever growing standard RVI extension list. On top of that we have genuine vendor extensions. IMHO, errata are bit different than extensions as there will be few vendor extensions in the future but many hardware erratas :) If we start calling every hardware errata as an pseudo ISA extensions, we will much bigger problem maintaining it in the future. We discussed this earlier during the Andes PMU extension series[1] as well. We have three types of extensions in discussions now. 1. standard RVI extensions 2. Vendor extensions a. Genuine vendor extension b. Vendor erratas which can be described as pseudo-extensions now Keeping all these within a single ISA bitmap space seems very odd to me. I think the feasible approach would be to partition the standard and vendor ISA extension space as you suggested. For 2.b, either we can start defining pseudo extensions or adding vendor/arch/impid checks. @Conor: You seems to prefer the earlier approach instead of adding the checks. Care to elaborate why do you think that's a better method compared to a simple check ? I agree that don't have the crystal ball and may be proven wrong in the future (I will be definitely happy about that!). But given the diversity of RISC-V ecosystem, I feel that may be our sad reality. [1] https://lore.kernel.org/linux-riscv/20240110073917.2398826-8-peterlin@andestech.com/ > > Thanks, > drew > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv