Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6948206ybl; Wed, 15 Jan 2020 12:52:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxLldpMqLiUSQvCajkX9fnvvt/pZYUai8HuFu4JapQWi24pONa81rcl7K7bUsAv2TKsrc1E X-Received: by 2002:aca:4d4f:: with SMTP id a76mr1485121oib.26.1579121552669; Wed, 15 Jan 2020 12:52:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579121552; cv=none; d=google.com; s=arc-20160816; b=JAgHJws6QbDVmGju51YTWMvSf70gNQqXxPebmuoPzAuYw9kR7RB52nHpP3Hm0HFsA5 zIywX5y1CCb/exGhLrpp16yBas5ZDcoTwHqZkyiqW5sdVtmuYA8vPbx4rcziK38C3kXz JJ1UKSWPdsnaA1BS9pSagPV7RCYNsx4xBhMUOheaPaTCB2rvN0ZHml5uBQNrsEoGMgRK T39cn0VTB4cVLi2izo/dGbpR52h+9x1WlgpoTqTQSYZ1HlkhaOB98jKz4Cvf/YT2gCj+ PRgCo8ygOoZB0g1KCK5th7r6g6VXxpxfQh617iatlUike5fVW7nmg0VOEn0aNax+fWFk zL6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:references:in-reply-to:to:cc:subject:from:date :dkim-signature; bh=1Kq7E7yB24oMF+8U5r1ALJcHmpKEZz9xaZhS6OI6Yd4=; b=FWeumODu8G6ATcjrLewQTJrP6lnvBSOtDROXGB3aY4R+DHDnFcFtMnhRPuqIexAegc 4d2Bcf6Xk4TtikMlIGWJtBZix0Ep5jY6e9JrLpAOrhlJ8Gx7E5RTPsfUSFpo8i3bS7Yw Ue3ZFNbxOh1Uj2EIIXoP7+arnbgHu5pnT84fHCW2GC0Yqhs7S+TweGsJ/volpH4KGXOb YyKpSdGRu4mfXAXdzihYraQLm360LN0OvZE8FvPdVB+PJaja4+Jdv+VG5JN23XZ5CrgV SR1iEXCQcsMDqerKiJj+HrB7ejRlfPsA3GLnScssyCdhaIFsdk9ZjO8MMSy1JWAyhKcJ ihpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZRg8LUg4; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si9388706oij.38.2020.01.15.12.52.20; Wed, 15 Jan 2020 12:52:32 -0800 (PST) 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=pass header.i=@google.com header.s=20161025 header.b=ZRg8LUg4; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729242AbgAOUgE (ORCPT + 99 others); Wed, 15 Jan 2020 15:36:04 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:39101 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729117AbgAOUgE (ORCPT ); Wed, 15 Jan 2020 15:36:04 -0500 Received: by mail-pl1-f195.google.com with SMTP id g6so7316797plp.6 for ; Wed, 15 Jan 2020 12:36:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:subject:cc:to:in-reply-to:references:message-id :mime-version:content-transfer-encoding; bh=1Kq7E7yB24oMF+8U5r1ALJcHmpKEZz9xaZhS6OI6Yd4=; b=ZRg8LUg4vdi4RxUvpoJXMnuBXx2F26/54JF3ieqqhSeu7kjxGyhT3/oddQU+q8Z7s7 lPZa8OTSazVRRzSMR8O5oJUem5OpTjPZ8TBG8fqQlAxUi80tRp1f9DnexBuFtgR9j1Jp +hjK5uojBbqE0LgCgcb3JBW37j3ksV4VrI1nWftapInUH+PU/aHhvgspg9Q9rMFpCDVD g3+S9ykt3mK73wKLYpHXFBFszLEYgx+/tDIubNkMAhVmrkHyNo33UZs5HnaxiFNcDGMS aj6mybsFjceeC42Co5zGOEz3owBKFRAiHwkJRGDKX6+uBP/spgAmYSGlcUZ7lGeJUpe0 Iyyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:cc:to:in-reply-to:references :message-id:mime-version:content-transfer-encoding; bh=1Kq7E7yB24oMF+8U5r1ALJcHmpKEZz9xaZhS6OI6Yd4=; b=GngD7uORvhAdPuS9UrsLSlVSQjaaAdNHti9ZgFv5fdjEx0XPTNx393wfsNC4OI6DqZ FJuDXhN0ScLonUkjWRBFC+wlNjCrb3mAy1jHDoEHQBfUbpjzNcDRjviaC+3bnM+VNy6J M+yHij5e5JwprZc27Wq3gmx4+wbB4gZR5D9SV+tzfLRfDyVwe7hq5druFeAVtsE29/UQ b/tvn5QFUgKu+CTCwi5zaxWraOW6b82nl/B8RuUXmxyl0CErFovpdZTTKTlTE4LQxVgh iL72JA+sZ+x0rh4pW4ix6lmJiS22wjnG88Cak3KUkwCBUCmTgTti/iq6JBcE/R5W1bXr /cpg== X-Gm-Message-State: APjAAAXRVVEeERIHr5DW7xvuqtHPntGtxfV5MRaznIjOoW5P+/2/BLAL DFPVDdhnno7jrddKL/6ooOqG/CLzTz8= X-Received: by 2002:a17:902:9885:: with SMTP id s5mr28095711plp.217.1579120563073; Wed, 15 Jan 2020 12:36:03 -0800 (PST) Received: from localhost ([2620:0:1000:2514:7f69:cd98:a2a2:a03d]) by smtp.gmail.com with ESMTPSA id h11sm21070101pgv.38.2020.01.15.12.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 12:36:02 -0800 (PST) Date: Wed, 15 Jan 2020 12:36:02 -0800 (PST) X-Google-Original-Date: Wed, 15 Jan 2020 12:35:41 PST (-0800) From: Palmer Dabbelt X-Google-Original-From: Palmer Dabbelt Subject: Re: [PATCH v6 0/5] Add support for SBI v0.2 CC: linux-kernel@vger.kernel.org, Atish Patra , aou@eecs.berkeley.edu, anup@brainfault.org, linux-riscv@lists.infradead.org, rppt@linux.ibm.com, Paul Walmsley , tglx@linutronix.de, atishp@atishpatra.org To: Atish Patra In-Reply-To: <20191218213918.16676-1-atish.patra@wdc.com> References: <20191218213918.16676-1-atish.patra@wdc.com> Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Dec 2019 13:39:13 PST (-0800), Atish Patra wrote: > The Supervisor Binary Interface(SBI) specification[1] now defines a > base extension that provides extendability to add future extensions > while maintaining backward compatibility with previous versions. > The new version is defined as 0.2 and older version is marked as 0.1. > > > This series adds support v0.2 and a unified calling convention > implementation between 0.1 and 0.2. It also add other SBI v0.2 > functionality defined in [2]. The base support for SBI v0.2 is already > available in OpenSBI v0.5. This series needs additional patches[3] in > OpenSBI. > > Tested on both BBL, OpenSBI with/without the above patch series. > > [1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc > [2] https://github.com/riscv/riscv-sbi-doc/pull/27 > [3] http://lists.infradead.org/pipermail/opensbi/2019-November/000738.html > > Changes from v5->v6 > 1. Fixed few compilation issues around config. > 2. Fixed hart mask generation issues for RFENCE & IPI extensions. > > Changes from v4->v5 > 1. Fixed few minor comments related to static & inline. > 2. Make sure that every patch is boot tested individually. > > Changes from v3->v4. > 1. Rebased on for-next. > 2. Fixed issuses with checkpatch --strict. > 3. Unfied all IPI/fence related functions. > 4. Added Hfence related SBI calls. > > Changes from v2->v3. > 1. Moved v0.1 extensions to a new config. > 2. Added support for relacement extensions of v0.1 extensions. > > Changes from v1->v2 > 1. Removed the legacy calling convention. > 2. Moved all SBI related calls to sbi.c. > 3. Moved all SBI related macros to uapi. > > Atish Patra (5): > RISC-V: Mark existing SBI as 0.1 SBI. > RISC-V: Add basic support for SBI v0.2 > RISC-V: Add SBI v0.2 extension definitions > RISC-V: Introduce a new config for SBI v0.1 > RISC-V: Implement new SBI v0.2 extensions > > arch/riscv/Kconfig | 6 + > arch/riscv/include/asm/sbi.h | 178 +++++++----- > arch/riscv/kernel/sbi.c | 522 ++++++++++++++++++++++++++++++++++- > arch/riscv/kernel/setup.c | 2 + > 4 files changed, 635 insertions(+), 73 deletions(-) Thanks. I had a few comments on the spec, but this looks good given what's in the draft.