Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5797341imw; Wed, 20 Jul 2022 12:46:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vBPkAonyw7sL55srb4p6JiaVjdOUz3lPwoYSyhbL9nxmGrq7rEQhyMJHToa5yc2P/ai5/3 X-Received: by 2002:a17:90a:5511:b0:1f2:2ad1:5c07 with SMTP id b17-20020a17090a551100b001f22ad15c07mr512953pji.235.1658346364001; Wed, 20 Jul 2022 12:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658346363; cv=none; d=google.com; s=arc-20160816; b=Ni5QNJFhx+30pLtyL4PXcw26Ej8Yi1zVZXXu60+GDqLX+uW5sYzYCQEi4kX+dpxQlk 7Fpfw0qLoO9r0Q0E6hDosiWbjl8O1fxzTpTbo//ErefHBc5nPRByDQ/zCKuuB4AhS5Jd yxJbxQomo8uOboWXdT2nu5wfJ+BWaMQfeJljwvufF1l0pMnEF8cJE0Cb14m5p6+rY2IM KLPYaVHTm23QiNwlG7NcsUty4dplm8JYjhdJvAe3C2G49Yy/ZnQjDoCpBywFL3N2ZJmA hlCQJgtX0IRmJVGedOvpZN6I3xMl9TYwvmYDiqVUqp3msHcqsJOVnT7N1wgwWTJCncXQ 8/nQ== 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=ZIQjhS5i9tXct0l83aF/nujza7MbLEBDLi1Q8x6VmKdab42BFrgVBdxbaKri9ZmkUQ Hs790Na78ffCI03NHIMVKip7fDEwScEbsvJ+FUQxqLFBm4cq6v6KcObNVevIUAXJuHCd o5HIiGfu885gT4eN5B79SjYHnRHfVyKUkHDfWW4rE7mRvD/8b3JgwIQSSKcJrGr/yuIr DR7TQ1HHhJAV/HX9ZiQ9JS0xwHF1VHzpP2kntJmqp2EpoPLh34GhyXxEBBNdUst2PKmx 1zLTfArMjEICw90OU33px5ZsoEorlMT6H4N4oFMXzhblnlDTnDLCfmC3MLRxhOgxRMZ9 EdPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=F5LLa+ft; 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 r26-20020a62e41a000000b0052ba76750e4si64225pfh.82.2022.07.20.12.45.48; Wed, 20 Jul 2022 12:46:03 -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=F5LLa+ft; 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 S233131AbiGTTX5 (ORCPT + 99 others); Wed, 20 Jul 2022 15:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229651AbiGTTXz (ORCPT ); Wed, 20 Jul 2022 15:23:55 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 236B654AF9 for ; Wed, 20 Jul 2022 12:23:55 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id h132so17257563pgc.10 for ; Wed, 20 Jul 2022 12:23:54 -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=F5LLa+fti1ldqbN1oggUaGJdciAVFKbR5+6Ynx5vr02UiAXfBtaiR4TNUGh61mbiif 5vLxqOMia10VhbKdBKIqxy5sEblKTJJa4VtjsiXYkFii4Q2uPdNcDVRb8KIeLlsHAxCa WZ4KsxXyIDoAk9i007nAyz7siGGxTWYsNVDVysgUKylfM7+DsiV8DJldr1DNH8gO4eez hHS3Su1nTW1d7iJMrIj02pzOyhUa1pMBjPAzaRxryW+O3nl9sOfCld2s35P+jvNRDkyL R0mhnBEUokGFEg/RTzciQ8x4Ob1he5KkVZPdBqu25kRxIW4gXnW8VV6BQ47vpAsuwvQ3 H4eQ== 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=STPZOjI5D87FF0SOy/DEAoQnrJEPWUBVIzlEcPaKFn7C5NNRD2BjFFT79RhyOkvCjA Epxe1qTLI7nXmoTFbckw396P0oCSAHxUbrR0zc1BihuctMBzTJBNnPcbwf4CoTHWdhsC x7X4Hmuw1RliH1bV8OTFGVMuZ7Untnbe5jA6FbfmNa1nvhCircdpAq1D4uaa592bLJ4S dObB71locPaQFf87tm0DOc3K9RxJ3jnJbPo2Lg+cX8bZlEhOxYL3UkIkgcBYxF3GlRaS 2cHfGFiw/NnI/WU6m5E9vIwJi4A04KTQhXT7J42mkyr2uMDzdONAD4cG/+1Le4nwScWB HdFg== X-Gm-Message-State: AJIora+4XXTylWfT+yDlMz0b+x6ej6R7rbblX9005Uqwi7pBw+Y0i4WJ nnkw2xWF3ks8dexx3O1rJv0budUfIPTEAA== X-Received: by 2002:a63:f91b:0:b0:40d:d291:1555 with SMTP id h27-20020a63f91b000000b0040dd2911555mr35543371pgi.399.1658345034349; Wed, 20 Jul 2022 12:23:54 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id y23-20020a17090264d700b0016d2e772550sm219902pli.175.2022.07.20.12.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 12:23:54 -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, Liu Shaohua , Niklas Cassel , Palmer Dabbelt , Paolo Bonzini , Paul Walmsley , Philipp Tomsich , Thomas Gleixner , Tsukasa OI , Wei Fu Subject: [PATCH v5 2/4] RISC-V: Enable sstc extension parsing from DT Date: Wed, 20 Jul 2022 12:23:40 -0700 Message-Id: <20220720192342.3428144-3-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220720192342.3428144-1-atishp@rivosinc.com> References: <20220720192342.3428144-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