Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5650194ybl; Tue, 27 Aug 2019 07:49:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7vhtr3zAfRpo/vwatJf+J9+paTSIwKislsd/UiKzO2C+Sbh989QCQKlwgWTs1hZbTVW3M X-Received: by 2002:a17:90a:ac11:: with SMTP id o17mr9812080pjq.104.1566917369370; Tue, 27 Aug 2019 07:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566917369; cv=none; d=google.com; s=arc-20160816; b=F7qVPLRvfB76Fyn8pQK/a7HOX8fIJhwmvKuAj+Tpx0vfy62dupx6toBrojTtI9vyqP CNCyp2qo0jxfEX9K/jUQ2yUJTrk+SwJYH6Qnd/HECxquvMNA8P8tn6cVeI4QPI6awa9G ghScDeLQdomnw179vl+eodtbpewbhuqwe8wAcCUm1gEAlWLl+yc8IE8N5toGrKMYxmXN /+4dI0UjDcK5oXmuWi6oHLeoXbECp31/vUZOAxg7350v7m7+H9HAJNQuHv9ossxViaBo bgyBU3sP70w1I0gib6Mht8PykNILTqIbR5k4WRRQA+ink3LHZOcd2OMXzOqOigoaHrO1 bkXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DUDQG5TZbypFhWn8SYXtr7ARPttxIZNVZZiOPmrz2p0=; b=OHY5opVlTRA4j9H9cZknvwW+fzp2yP8aesKm1W2A9aCOga72OdC+EodPQp0tV6IsNf lMmssCgaGqbc0esp1P2VQlNeNHFnJSyNhn8I50M0WZbQb4wOfbQCkmp/sg38iUq5fhAE RWuxgY+Me5Azttba1vnexwcIk/5XDDPuAXUE8gpk+/bkJqeJsrbt6RhhIrccKTkkf+ys I447P3v2tdfUfzDtZvgbuYTfx5dIvfyz251MfxtVKc0iG4YRZFf3WyUEMU8Id7kNSCu5 mzPOhl3RcyTTzK5o4EjzU5I3TayUzS5yMPQxHMzpbFJQ9nPBLA/in1ywanbJYLxgpAZI taUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JIoZosSH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h189si12239741pgc.236.2019.08.27.07.49.13; Tue, 27 Aug 2019 07:49:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JIoZosSH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729925AbfH0OqZ (ORCPT + 99 others); Tue, 27 Aug 2019 10:46:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50338 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfH0OqZ (ORCPT ); Tue, 27 Aug 2019 10:46:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DUDQG5TZbypFhWn8SYXtr7ARPttxIZNVZZiOPmrz2p0=; b=JIoZosSHZEWfdznPJN54SIYlA YnujNP9yY/TnsrEm+xtKejudybZQdzbILANco4KcQkpGzlDOAj0ng23H4hHxSly8X1gQApR3ndOHl n0kLcbfcclAWk5ZPMkKhnGXrmW/Nvsf394t+nGYpvQODxCqABy28HqBZvSTeJLVGzbX1uelp9mhQE pl3MYlGo/wVE+sOXN0JviQy8UYiZMxwFpnnmL/fR0vi0LNwxkwds2SB0x6wDE3S7aqdZBU8aFTTQ9 VMdR12kGq0eAT2u7t/iwxg1ETMeoK3RwchFcyjy0Ap+Bj5qzvqmIoyXnuLmQNQT0zcPW4QaMn7cpQ NxzZQbPxg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i2cjo-0006Sj-Fw; Tue, 27 Aug 2019 14:46:24 +0000 Date: Tue, 27 Aug 2019 07:46:24 -0700 From: Christoph Hellwig To: Atish Patra Cc: linux-kernel@vger.kernel.org, Albert Ou , Alan Kao , Alexios Zavras , Anup Patel , Palmer Dabbelt , Mike Rapoport , Paul Walmsley , Gary Guo , Greg Kroah-Hartman , linux-riscv@lists.infradead.org, Thomas Gleixner Subject: Re: [RFC PATCH 0/2] Add support for SBI version to 0.2 Message-ID: <20190827144624.GA18535@infradead.org> References: <20190826233256.32383-1-atish.patra@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190826233256.32383-1-atish.patra@wdc.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 26, 2019 at 04:32:54PM -0700, Atish Patra wrote: > This patch series aims to add support for SBI specification version > v0.2. It doesn't break compatibility with any v0.1 implementation. > Internally, all the v0.1 calls are just renamed to legacy to be in > sync with specification [1]. > > The patches for v0.2 support in OpenSBI are available at > http://lists.infradead.org/pipermail/opensbi/2019-August/000422.html > > [1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc I really don't like the current design of that SBI 0.2 spec, and don't think implementing it as-is is helpful. For one the way how the extension id is placed creates a compatibilty problem, not allowing your to implement a backwards compatible sbi, which seems bad. Second just blindly moving all the existing calls to a single legacy extension doesn't seem useful. We need to differenciate the existing calls: (1) actually board specific and have not place in a cpu abstraction layer: getchar/putchar, these should just never be advertised in a non-legacy setup, and the drivers using them should not probe on a sbi 0.2+ system (2) useful for currently taped out cpus and in the long run for virtualization to avoid mmio traps: ipis, timers, tlb shootdown. These should stay backwards compatible, but for sbi 0.2 be negotiated individually (3) in theory useful, but given how much of a big hammer sfence.i not useful in theory: SBI_REMOTE_FENCE_I we can decide if we want to either not allow it for sbi 0.2+ or also negotiate it. I'd personally favor not advertising it and just use ipis to implement it. If we want useful acceleration of i-cache synchronization we'll need actual instructions that are much more fine grained in the future.