Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1267857ybv; Thu, 20 Feb 2020 16:45:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzlxHcahE66+ozOfZjA/a4qpCZXcnkSLlh8WOIaYleyeExNyemoyIBjQDSDdusNUwRTpxts X-Received: by 2002:a9d:5a09:: with SMTP id v9mr24743470oth.214.1582245941605; Thu, 20 Feb 2020 16:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582245941; cv=none; d=google.com; s=arc-20160816; b=1FJZDfrC0dcFlGXN/7yFwWW79htoN6hgzuH97++CqwHBHUIckvbJlE8zQ/DOMdRjgV CTFMycLnMh+Xo++WbmUfX6VtbwLY+g4XgrYKcHLCZKFZXTkVYU89bIC4LrArvOWZoRKh gvcC14GFdaHAPH5jMaxFpnzT0b2u38iS4PquMuQB2aDYFflZaKvTY9LyGTDb2xijoGb7 ndVs92+66jiw84AxQxzO7APlI8f5fK7F2Rmr0syx2ZloKwhJrrRLTHwGHaAxhLheTj5T jxmTLToUuOLjIE9uV41OtR0IJep9jbBrrXp32iEvDF35/BiPi4D+ImKnjn8+3P+AtFrL 6BbA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :wdcironportexception:ironport-sdr:ironport-sdr:ironport-sdr :dkim-signature; bh=tAWM7dWdA/8aexB1raQyducLjOaBSjNIJLOT+tCRpc0=; b=qI0xLfam+BWcrqA2Yy68vxuYCcRV9bYOkZ2ntfm/rWo0haicmI5YHSEtEpheueiplC wkmvE+h9K8M1BgYTzGvPzDVXDApNS6590AM32aSiISGaq1N04akBf3TAW/Ti4VUqy/FV RAmCbgN2k3ugGaknUx5qQoYgiHs7gw8iOBwXjc4gbgQNo1gVJIBVa0yyyqmTiqzcfbZ3 OpkYpXaNtDUX7pc1ms5fhJPUtqwowNr0tBFXYM4Y2Ky89sN/xgvZ5lkCnMYOYvKTa+X6 vBBCleqHraYRLPA/FVSUddrl1JsRAX7AY9+8pvThqonAay9j+d1uDex7XK543eRJxSxE 01Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Ac3Gh8O3; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q65si542328oic.123.2020.02.20.16.45.29; Thu, 20 Feb 2020 16:45:41 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Ac3Gh8O3; 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729734AbgBUApM (ORCPT + 99 others); Thu, 20 Feb 2020 19:45:12 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:5901 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729675AbgBUApD (ORCPT ); Thu, 20 Feb 2020 19:45:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1582245904; x=1613781904; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=37uvvoOiKvDtqugsaFLZ7LIIksjflF/Df/E9QV5jylU=; b=Ac3Gh8O3jBqzxRktwFO2lp7qzIRkk5v09X07IzgwF6ukGD+CIbY7JWOL fKoW5bTjNqkV0xqeoDMoLZvN+/A77X8SsCGF1Rc6u/cEQP3tJgWO0jIhm C20pcYq7VroAH+d+erz3Sg0h7veDKNZX2PSFWfhQAH3ZI4wURBF+dhLec tWRwTYToZuip81yIme2FwHHWMsbxHxDcav7Mz2m8lqDodLMOhSErCqVLq 1eNqaX2yvEM6iMFGXBL7QT9AnrezgTvZ8Mt/bAhIClqShLB1co74fmgQS TO7ZzHPu0BoXtdcwaYHdi5B5R0c19WN2CQiPFDLXNcEDvB7enwT9RyTkC g==; IronPort-SDR: jGOhXvproomBQ71okRbBAqDkysvNA+CFAhLDNDXVOhYY6Zet3nUXqOCdnHicLM0bu+kLmDTTJM rZTW2jeF6zR5+HUPRAJHOBTgFINpQ9WxNcxb8R3clmlVaodPM3W6DxezmEIxIp0RMfB6UHnMYD gZUMsQlVdVCxruZqtdYQF8ib7mhbhvuxPp0P/Z7cOjrUXZ3g98rKClIj9v9nkpGbjGKq6TjGxK rhsDov7UB0OkrtGpswi76Mk30zR5lTQrs8m8XeKiZSK78Jk7NsEth0vPuHRaChBELQbhaYB1is lKo= X-IronPort-AV: E=Sophos;i="5.70,466,1574092800"; d="scan'208";a="130852804" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2020 08:44:50 +0800 IronPort-SDR: NEiPOYofCCVEHI4Z/eu4XoaV++iZExlmdeV5uh4KYJq7KKPqfjVQ2nH+UuqyZRuDfpUPFZIKGh ndj8yzqXDSj+K4143TmnIjKDhRHbX27WfR0j1FHnYvoG+T4ob+42XNbQQNCVPj/i+VN7bXFc3o 85ug5w4mPXjXQPMBAo580gLTvb2UuaSB6qi0dw7W/FAsSk0Y/tm1xMoY+aa54pxVcUNyXEky7M aum71H61JXPNeWaHotR5ZoRdqh46Zm4+RMrfEuvneYlyrEpCybdUrN2qp9EKcwplf0njJ4oSU4 pthk2iCkUGEt83cj79Y9FgQ9 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2020 16:37:24 -0800 IronPort-SDR: cv3KQs6GxuvQneycJ3ZkjFHK11NakiFw9nfmzS6wDQDhSZDIe3W3g0X12a8FoXYvvENIKo+riC UAibA676YcT6Q/0eKCGSqO+6Q1p9c2dT4zUiePdDEcegmiEOcLylyQBlSkrvjKUZOoNeVvFnWo Hx6gmDQHn2cf/LGO4IME1AKQUlhm2BItiADXiTFQbvEShOp++lHtfG/Ox6HuNrps/l6QvdKnxH K9ZPhRkvfSLyqLxvZYdY/uNMtx+cFoTOYXdTy1WZ4nspNT33yoXxHW34mgn8D/HlbpnduNrsrH +U0= WDCIronportException: Internal Received: from yoda.sdcorp.global.sandisk.com (HELO yoda.int.fusionio.com) ([10.196.158.80]) by uls-op-cesaip01.wdc.com with ESMTP; 20 Feb 2020 16:44:49 -0800 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Albert Ou , Anup Patel , Borislav Petkov , Daniel Lezcano , "Eric W. Biederman" , Geert Uytterhoeven , Greg Kroah-Hartman , Heiko Carstens , Jason Cooper , Kees Cook , linux-riscv@lists.infradead.org, Mao Han , Marc Zyngier , Mike Rapoport , Nick Hu , Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Thomas Gleixner , Vincent Chen Subject: [PATCH v9 09/12] RISC-V: Add SBI HSM extension definitions Date: Thu, 20 Feb 2020 16:44:10 -0800 Message-Id: <20200221004413.12869-10-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200221004413.12869-1-atish.patra@wdc.com> References: <20200221004413.12869-1-atish.patra@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, + 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