Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp836839imi; Thu, 21 Jul 2022 11:58:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1shhbHBLHLgZg/25/uU56eiJF2umOCuNUE4eRquvUjNTic0mUnElNsWBUncIGtRwesEp9aJ X-Received: by 2002:a17:907:9693:b0:72f:9cc:63d7 with SMTP id hd19-20020a170907969300b0072f09cc63d7mr28458583ejc.661.1658429892428; Thu, 21 Jul 2022 11:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658429892; cv=none; d=google.com; s=arc-20160816; b=dAEwRGyIJCCI9wDK1eF1y5Iy5PXGw+2fuD2tGSSLt/ZmEVcJoylK1wg0s3qGTLTjD0 Bz6rYroFHlCteZwyc7SK1iZB/8ROGBom8+xmp3gnTgv7IjmuFIRU4BjTKl2OBXPKKH+k D34lF1ZxIGZxj/Xj29uXmr/oEBzVCjBuEVuTUPefXZyZj4U4n4SaP/SoUfi49QJqDw3O coUhC9B+AjSk+lWSzu76wombtxfF7XAUgZT2eHesiZLffPHMoEYeFdpt1hkMSeP4meoR XypKH34UDntTgytD5FgtumyfCVux9CNx0671fOmbMt/JFk8m1kOZD3kq22adz0GuL+oT /R+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JO4EgaFLA+7AeATY37WXQlGJ9vdJOA0mjTrTo1yHUWU=; b=eKH22xR/aUSSHbv1IiB1BFdm2EojMHtN8UgmMZKaMp1A1EmW32hN0pcjeJLh32B0lV 9+bYQqobo4pBFyrCGCdHEgGsPIz8Fds5NB1SZpzRvoyTAjTnIOol5wl1ncIzio6og+T7 ZBNtgz3xkpc4+g46y0SPQW+EfG5RYUEiS1gK0Kh5Snf8ulZUsXFJBELDcAPieKSznsWK G1Bp9/zenGyYqepn3NLlwTq5t/l6f+WgGABZMU9ZOg1adB/kf6VgNWImmPqUBJWp5mcL bxQdHP7Om2tafJWsQHu3et3bVY5VmDLKn9t/VaPCDUqhqQYzWwEzyueG4mYm5wAlbwBq PXzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=riG2PtdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my38-20020a1709065a6600b0072b36dc02dfsi3038388ejc.262.2022.07.21.11.57.47; Thu, 21 Jul 2022 11:58:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=riG2PtdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbiGUSMg (ORCPT + 99 others); Thu, 21 Jul 2022 14:12:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbiGUSM1 (ORCPT ); Thu, 21 Jul 2022 14:12:27 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2F93E756 for ; Thu, 21 Jul 2022 11:12:26 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id o18so2348931pgu.9 for ; Thu, 21 Jul 2022 11:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JO4EgaFLA+7AeATY37WXQlGJ9vdJOA0mjTrTo1yHUWU=; b=riG2PtdLx0LlINs136KP5QyxDhqO+kVaZVCGH/J20pnAzCaWI0cNrw4ZKDVwIuQKzI s3DpyvOseHncIaaYhLOH8rx0kDgBjdmQ+VaSyFC5Te26GWSMTn/iDiwdMBSLbbySx1iz A/QtjMMVexwd7x+C6X+5Ka4WgCzL9oKKHK5fhduu7Y23VDfSJydWvcxzBlHNX0Y+JYow NlMMiIdZ8WTGaMGAdW+qWVbhP8ut+rKWjmzGrXNcbphrgxn9ziKf6TOmHxQcna3Xki3q g8zUDW456eefJqNCiXx4tF9aQ2VC3p4v6vcz4bF3Eb40szoNeVQvHZVgjCQsvw1DqLsg It4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JO4EgaFLA+7AeATY37WXQlGJ9vdJOA0mjTrTo1yHUWU=; b=0/6iqRLblQpQv7TJgvdxIInJrp7PC6wGOFUkMpmirfZAm84WpFYBirEDJD16L9+4j9 V0DJrUNUOcXDj0QK1SxTRwUYArWVa9XNphbiMMpPdf2wjxcF0heQr8uKzrvQjrjmHXxI htwDe8szNbBxcWELoBZ6xkhAJWLywHGb5GmRdtKWC/bli2qsgoG+ZeQrjj+KbtCdNdGL aaiKHeVKb6YtoQ6+I62M2qIrtpCeTG88o8ee9xBYRWkRCkwXVHSnS2bOSr2ew0jdWfRU NNhruiLu6XBiBMOB0FhUG4l2RZXp992GYpYZq3Ghiey41xyEIX1PsITmtiRlgYEEtDvi uPpA== X-Gm-Message-State: AJIora94zgN7k+AUsGr2YqszoBIm9urNxMbhZUbb4EIRKNjs19hoZP8t qOXWZbB29ZPJP7PuTYP6ycLC23H3waeFiw== X-Received: by 2002:a63:ff4c:0:b0:412:b100:786b with SMTP id s12-20020a63ff4c000000b00412b100786bmr39952104pgk.537.1658427145703; Thu, 21 Jul 2022 11:12:25 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b0016d3a354cffsm617358plm.89.2022.07.21.11.12.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 11:12:25 -0700 (PDT) From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Anup Patel , Albert Ou , Atish Patra , Daniel Lezcano , Guo Ren , Heiko Stuebner , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-riscv@lists.infradead.org, Palmer Dabbelt , Paolo Bonzini , Paul Walmsley , Thomas Gleixner , Tsukasa OI , Wei Fu Subject: [PATCH v6 2/4] RISC-V: Enable sstc extension parsing from DT Date: Thu, 21 Jul 2022 11:12:10 -0700 Message-Id: <20220721181212.3705138-3-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220721181212.3705138-1-atishp@rivosinc.com> References: <20220721181212.3705138-1-atishp@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ISA extension framework now allows parsing any multi-letter ISA extension. Enable that for sstc extension. Reviewed-by: Anup Patel Signed-off-by: Atish Patra --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpu.c | 1 + arch/riscv/kernel/cpufeature.c | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 4e2486881840..b186fff75198 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -53,6 +53,7 @@ extern unsigned long elf_hwcap; enum riscv_isa_ext_id { RISCV_ISA_EXT_SSCOFPMF = RISCV_ISA_EXT_BASE, RISCV_ISA_EXT_SVPBMT, + RISCV_ISA_EXT_SSTC, RISCV_ISA_EXT_ID_MAX = RISCV_ISA_EXT_MAX, }; diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index fba9e9f46a8c..0016d9337fe0 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -89,6 +89,7 @@ int riscv_of_parent_hartid(struct device_node *node) static struct riscv_isa_ext_data isa_ext_arr[] = { __RISCV_ISA_EXT_DATA(sscofpmf, RISCV_ISA_EXT_SSCOFPMF), __RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT), + __RISCV_ISA_EXT_DATA(sstc, RISCV_ISA_EXT_SSTC), __RISCV_ISA_EXT_DATA("", RISCV_ISA_EXT_MAX), }; diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 12b05ce164bb..034bdbd189d0 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -199,6 +199,7 @@ void __init riscv_fill_hwcap(void) } else { SET_ISA_EXT_MAP("sscofpmf", RISCV_ISA_EXT_SSCOFPMF); SET_ISA_EXT_MAP("svpbmt", RISCV_ISA_EXT_SVPBMT); + SET_ISA_EXT_MAP("sstc", RISCV_ISA_EXT_SSTC); } #undef SET_ISA_EXT_MAP } -- 2.25.1