Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp833608imi; Fri, 22 Jul 2022 10:24:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tQ4pMFT/O5z3E4+8wwAxQhDW09IVPBsFalmGMUvi5K8iDM4YZVyV3of/Kols0TcWaQmaHq X-Received: by 2002:a17:907:2888:b0:72b:9449:fa8b with SMTP id em8-20020a170907288800b0072b9449fa8bmr700496ejc.334.1658510667950; Fri, 22 Jul 2022 10:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658510667; cv=none; d=google.com; s=arc-20160816; b=XHy0DacCsmDYJ6uRYLydGm4CqE5yMtukGp4vUv7980RJWQaAWvGbz7BfoLzr7/ndIO VfGs1xO2NJCsyUrIxWGRQKInsmMuBn7QDmQ+qgyLwHkAX7I+bogXWV+6y6azsr2CMR+4 HEBY7FjtEvkVNxu9ZJDsJo1NAPhUk8wHpi0KNMQ3/Fm9I6OcudDS/f75Csn81MTwIm7k NMEA6ajsCFX2CnxZllK7Yy/vUq1uHC75oPy3G5b7FDnlKNsCwSuWvRyooPAbhizGf4U8 zIHj6tvo8F35bcCggaGqmovIwYB3ry9Dz8JjWqxnYjbRQHbkVm6AQCenndKjep9cyPHw rO8A== 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=InzX/DfCQLqz30HoWAWZ3ROqebXtJKuV9wH47MDLuagywK6gigw6YbzaozUmtYzAmj AIVk2DFG6rn41P1teiDl6h0WJPSwre5msBcmMA0d8Rke2yTQ5yCHK8hqneR9WZwPhkcz 10waWDN/jrvSz9n/MZ4wOrkm0l6Pjoex5x+p/Oi1IjMOvt81VnA9pYB3gPYchakpMf3D kdeuZN8tX7ozov+viH005zztNg6+fV7+cQdep9wuBdAYg6y8cybV9bHXwsVnTsdMT1LF qVGfseGsdjspmIlVmGYVbK8wURKw9zT0TWmzHRWlA7pN6y+Q1eAdyz+8GxBmwiY1QSyB pAkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=bq+HPB5I; 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 g11-20020a170906348b00b0072edee8a633si6007715ejb.187.2022.07.22.10.24.02; Fri, 22 Jul 2022 10:24:27 -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=bq+HPB5I; 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 S236007AbiGVQvK (ORCPT + 99 others); Fri, 22 Jul 2022 12:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235918AbiGVQu6 (ORCPT ); Fri, 22 Jul 2022 12:50:58 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B01142A268 for ; Fri, 22 Jul 2022 09:50:57 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id y15so5007102plp.10 for ; Fri, 22 Jul 2022 09:50:57 -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=bq+HPB5ICJBE7xBIVRuNq+EPfcnoMUoLuXKksB72CK/VjmEbn4i9TVIwnfsu56z21Q DWM/ngg7QCZriV1iyAEKzNlWFWhvBhOc403GaQ/UGjb/oxQgJAOin4v+loO9HnjoV61T 0w9dvMzfQ+gJjANcmO76tv5n6MFedvhjDJR7Cg6ipQMVeC3CQhIzRvwr94/m0+rgCZtv 2fYvKpWmEiXHoWb+OJeCV1FmufOnEqTRgmPjYBW+GI3fWQBDj2f+e6YNSTT6I+Rm6Xco WVNrYVFdKaOSlxbZ3HM5FGX8qGT7dy527SffgvIrSp5C7hUAFYwkwyHvU8n8OUh77vHe GYAQ== 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=X6KBrFL5FahptepoawpZnmQ2DC6yOlsYUyEi8RFBzBUQZ6fOZCjQBSZAuQVzCt83pk DBCxhC2wUZeNtqwr0L3h3DnubzAT3iO0c+NfyJmZUb9+s5F6Z/wqxJhWuxwrFP9qXKWM 6OtMRCYuXIa6AmjxpNgt+lpSfdgPfbsLg2nE6laVUxOYN64RsYYA5poaeHdy9HmNrxmw iVK7jJQbQKoc7s7UN+qbTI/1+U68uoArYjRsUZHUbbV7+NFGZDCpGW5SJVrI+DnX6h1b ZW61NRBSvBwDosgZrOQvaNp9uHtscyBFPgmU0UnwYTs7Aoi+mXdemgfFBAYWYlllV4lr Vpyg== X-Gm-Message-State: AJIora/OGCsqRx4YDi37gLjfs9z+0ZHO3tvcsSOHiTjaHWHcboDxtSXg kRVJSvSxlWZU+DcKgkIYg92/2I5LXbGsSQ== X-Received: by 2002:a17:902:8f98:b0:16d:2a9:d5c7 with SMTP id z24-20020a1709028f9800b0016d02a9d5c7mr423460plo.5.1658508656994; Fri, 22 Jul 2022 09:50:56 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id s7-20020a170902ea0700b0016a3f9e4865sm4028476plg.148.2022.07.22.09.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 09:50:56 -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 , Rob Herring , Thomas Gleixner , Tsukasa OI , Wei Fu Subject: [PATCH v7 2/4] RISC-V: Enable sstc extension parsing from DT Date: Fri, 22 Jul 2022 09:50:45 -0700 Message-Id: <20220722165047.519994-3-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220722165047.519994-1-atishp@rivosinc.com> References: <20220722165047.519994-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