Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1508432ybv; Thu, 20 Feb 2020 22:05:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwXkIKEf/KAQS+PZPWXDJvGbQSlO7UT2ExFGQFzJL98n6wXLaEIhADFSUfVkJYWC2z21Iu7 X-Received: by 2002:a9d:7593:: with SMTP id s19mr25478693otk.219.1582265130468; Thu, 20 Feb 2020 22:05:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582265130; cv=none; d=google.com; s=arc-20160816; b=lO+81EXOoql6cQf4yr3s8oENz1SmlypMXfbf4lYlywUEiTp/002yT5MvB8m3qlguOh qoE2g8WBnOJL6Ss73QSHCqJXzwfT0xEh99kMmH0r08OHfi0gruDEtoiEAt4+kQ6EcIg+ jUEIBRd7nPX5AV0WeqCXov4hvdTn5/HNyOfhEtbgtWS0SoD68cdCVquTCi4G7mcIMXIT 0ZrLFGhvtNiwgOf8qfiOLeRmIUeh1WsnztZLeBC+YuoOlIreDDRNVh8dbNaFbAL3RzmY decrlExBoS66KEdyDkKIor8jVvMYukatIlKCmHRjovai+ec9p0ML48Mj5WwKInZgZNxw CQ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aqtAvwxT6JrwXsCKyiro+Lp0pOc/Ni4qRf2FDo8jA7I=; b=KQFZDVnbqjd8nCylm7JfnxJRlGxWayuzykxKXB3df0ykc2QRpuRTbKwfByQ8CfMDQH BzYrVFCSeinkX/7YVFJkX/UIrbIsU0wa7EDxllD+e0PKqCB3qoBuk1gIlNSEe/qI9qJP 7xg5fQxlRVMvx8mASY85SDgZdxGVw6vumgx3arRXmg99BKdLzbVOV2LI3jFQZ1K1dFCn y1wrPNq6ud2DOQJlDetnOCg/pE+Us4R/NvsxGVUgI+e6h3EtrtAuSmLsZLErLVbbarvZ laByp5ASR/I//xc0Zj98DH6cI+8WChusqueKE9Q878gb8A7P9sByqWpf/EMCSQhl8U7o Sy6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=k78bxUZh; 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 x20si300504oix.155.2020.02.20.22.05.17; Thu, 20 Feb 2020 22:05:30 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=k78bxUZh; 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 S1726100AbgBUGDz (ORCPT + 99 others); Fri, 21 Feb 2020 01:03:55 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37899 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbgBUGDy (ORCPT ); Fri, 21 Feb 2020 01:03:54 -0500 Received: by mail-wr1-f68.google.com with SMTP id e8so619864wrm.5 for ; Thu, 20 Feb 2020 22:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aqtAvwxT6JrwXsCKyiro+Lp0pOc/Ni4qRf2FDo8jA7I=; b=k78bxUZhB4k7Cc+JUEXD+nAd1mPCAv1V4W58+FtztDdj7Rs7vyd2zu2MHyjhqMI8Ti IPUICzblgtxDIA60pRkSRhgKpiGZbivYVHmk5FzLgEo23O7c3gwutPCqjLIGmGw8nKuQ n2s9xe2RhD8kyX09Jg1QMBvWv3q1aG5SUfawDmQuAg7Mj6Q0+r8MMTO9UY+mcYp8WQlc l6JrcYXFOL8gtYGTwKRclqO59hlX4+KG2Ngp8uicdiMobm15Ry91KQFUEjUctfXzJFmE BN+7qP7+ef3/LUCCD83C7N+GQF/HqipJTkBpBv36LRFeiJ/fD36AYZ3TMj/lwhVRjpwi ZS7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aqtAvwxT6JrwXsCKyiro+Lp0pOc/Ni4qRf2FDo8jA7I=; b=VC7rrnJPMAEuMePn8XUoW0gQRUYxVxmIHXTdYEKU6uzJHt0DFN2SpUHtNbTHJBaGLz 6WROtw+5uKHATyULNHDV0J/0G1M6F67wYOudS4kPBugBAj1qNQEOVhYsGio8jPJQ3ns4 254NujShwQAz4HqikqbNpHkdvj5obF3sT9GjWLVND/VOp3a8yb2reLbvcgWvrSlqxdt0 B//oMVngb2lRrOZ0YefuMid90l97ldZYcLlp4C+rBzFwO/Yv7t4nE2CkC61DMUwFZEvH 1bfskeCnGeklIhTkuJsuB6XfmRwxNk9gL0SKGtMbA7HMKf0bC/3beMsQcTapJnZKDzcf /cbw== X-Gm-Message-State: APjAAAWhvgPdmYB1IFzFuI/CQ8dUjroCE4nWV0HXU7qbpJqCJr9IaO21 gngRBCG/QAFhnp3gRIq48JvuYpjmZ1XAoVurq8Z8ww== X-Received: by 2002:adf:f28f:: with SMTP id k15mr45926753wro.230.1582265032524; Thu, 20 Feb 2020 22:03:52 -0800 (PST) MIME-Version: 1.0 References: <20200221004413.12869-1-atish.patra@wdc.com> <20200221004413.12869-10-atish.patra@wdc.com> In-Reply-To: <20200221004413.12869-10-atish.patra@wdc.com> From: Anup Patel Date: Fri, 21 Feb 2020 11:33:40 +0530 Message-ID: Subject: Re: [PATCH v9 09/12] RISC-V: Add SBI HSM extension definitions To: Atish Patra Cc: "linux-kernel@vger.kernel.org List" , Albert Ou , Borislav Petkov , Daniel Lezcano , "Eric W. Biederman" , Geert Uytterhoeven , Greg Kroah-Hartman , Heiko Carstens , Jason Cooper , Kees Cook , linux-riscv , Mao Han , Marc Zyngier , Mike Rapoport , Nick Hu , Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Thomas Gleixner , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 6:14 AM Atish Patra wrote: > > SBI specification defines HSM extension that allows to start/stop a hart > by a supervisor anytime. The specification is available at > > https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc > > Add those definitions here. > > Signed-off-by: Atish Patra > --- > arch/riscv/include/asm/sbi.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h > index abbf0a7d3b6e..0981a0c97eda 100644 > --- a/arch/riscv/include/asm/sbi.h > +++ b/arch/riscv/include/asm/sbi.h > @@ -26,6 +26,7 @@ enum sbi_ext_id { > SBI_EXT_TIME = 0x54494D45, > SBI_EXT_IPI = 0x735049, > SBI_EXT_RFENCE = 0x52464E43, > + SBI_EXT_HSM = 0x48534D, > }; > > enum sbi_ext_base_fid { > @@ -56,6 +57,19 @@ enum sbi_ext_rfence_fid { > SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID, > }; > > +enum sbi_ext_hsm_fid { > + SBI_EXT_HSM_HART_START = 0, > + SBI_EXT_HSM_HART_STOP, > + SBI_EXT_HSM_HART_STATUS, > +}; > + > +enum sbi_hsm_hart_status { > + SBI_HSM_HART_STATUS_AVAILABLE = 0, > + SBI_HSM_HART_STATUS_NOT_AVAILABLE, Rename "_AVAILABLE" to "_STARTED" and "_NOT_AVAILABLE" to "STOPPED" to match SBI v0.2-rc1 spec. > + SBI_HSM_HART_STATUS_START_PENDING, > + SBI_HSM_HART_STATUS_STOP_PENDING, > +}; > + > #define SBI_SPEC_VERSION_DEFAULT 0x1 > #define SBI_SPEC_VERSION_MAJOR_SHIFT 24 > #define SBI_SPEC_VERSION_MAJOR_MASK 0x7f > -- > 2.25.0 > Otherwise, looks good to me. Reviewed-by: Anup Patel Regards, Anup