Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4394317ioa; Wed, 27 Apr 2022 02:54:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzy8bF9Dlbn10W8sPK30cpMcLj2uQjbxCiUSXaH7Yogssnfiswi9yvRmvY467dLqpqGSPo X-Received: by 2002:a17:902:aa09:b0:159:684:c50d with SMTP id be9-20020a170902aa0900b001590684c50dmr28267660plb.51.1651053296069; Wed, 27 Apr 2022 02:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053296; cv=none; d=google.com; s=arc-20160816; b=QnlRWusTxQ2mgIh3R81D8h02Pfm3IHGjywKUrU2cJnkmbIIIJsi0hG3IWMl09Ed3UU a9AMZ357oIjf8iVDplPkyjNBDOlImgGV8b/Rf8NztbrP9mA8FXHD8woNejC2qA2UI/LC gHSz/RV45uIwiYJGwX2MsRSseqrIY4WFrCzhSekVgf/KFmNJMmo+WqrG9NOb1Bh0C3gQ 52Tsj5+hQoXKfMsoWXjYuAtJS7MHlB0SlSMXEk2y2R79jxacK1ikq0F7DjO2QBTZIgcF J82SEZ62VbXTLTq+i+Cq7kDJ6bBRcB1e4Gea+ZKgb+ixyCkINVq/DI7a49rWfePcIato HYZg== 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=KslgnjbYCZy+RC57ZlL0pYo5UT2utIjDNcmnyodLbb4=; b=rgsxtzbdeXnIiMPK3Jn2hN5cZQROh1aP3lsTWfpq6XidxO2faEABTKfeWEbrqP3lbQ /6J8hu4r2qvgBlihRGzVVwi248t1XuExdTIoo0/Equ72i4UNGWXE/3Ergxc/z+KC/aaB clB5SSObZy12aS2/UzxNvAueE3ThuKUphkUWnJ2Y3hy+O08VG0zrZlQjT6tC8093UuxN E81VQjfvefWhJx1HrfGore05WWpiIoy01aAZUTF4Bh9oh/cAz+XejatI9akpCoi0s8q2 +9tKE2AuVObegzzXbtH/y5PfyU0mjxBVofL9PLXo+w1jewXQQ7SnqpYnRP2iUZdvM4SI EUKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=mlb9fCc5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h11-20020a63c00b000000b003aa494ca6dasi929308pgg.837.2022.04.27.02.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=mlb9fCc5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C1152B21BF; Wed, 27 Apr 2022 02:25:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353485AbiDZS4e (ORCPT + 99 others); Tue, 26 Apr 2022 14:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353063AbiDZS4W (ORCPT ); Tue, 26 Apr 2022 14:56:22 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EFFF1569F0 for ; Tue, 26 Apr 2022 11:53:11 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id h12so27361612plf.12 for ; Tue, 26 Apr 2022 11:53:11 -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=KslgnjbYCZy+RC57ZlL0pYo5UT2utIjDNcmnyodLbb4=; b=mlb9fCc5rb7zG7mTZaJ0VEWPjisdXFLSvYf5s+ONK4bMBESNNjkC9LspUvLeDIH7qg KJWqNCNtmrDhGwSK8WWziE2vvMlKPHdrhOkxTNKqVrH4bzYAGPS3JOAcgn9uJq2U7GIc rqsSRnlpOfMuOq6EQMF6XQB3zL1qkroK77mrAmkPgolCGxAEvrggowjCIMTKALEz7O5L T0apibn7Lov23G7OW7GMaHKpIMQhO9kHaeUhCdh6NwztivMdV78PW8DemC/NYlrXYNCa Tbvw8tsT61VlPxpax/4JEuuCl543oeV9N3N8bh+s/UR7NZ4AcjNRTV5pmDrO2xmEU0Yu 0vVg== 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=KslgnjbYCZy+RC57ZlL0pYo5UT2utIjDNcmnyodLbb4=; b=ANmAPPjOFgwHj57VeuHErYdozWzQ0FfHzwj2eeVSKz9gJS8oCZMzSfOucbJSnsjOJ/ qL0bL+1F067fh8EC783Hoa+S9alAMgYpK7m02x8/GhN/3FwegMsVw5gJKab5BGN8Ojxp vHEt05lCOfnnuql/wCAlo5T6aFmoW/yM1wEX0TUHyOFz98BuFlt3GZrPIUPvmcNC8+fc tX/SOEXxq8Ib2IvpIAeIcIWo5cjFyqA6tbY4O2pBI8CJOSPcq0xATi5DKxdOvvYFlsbA grmXyG1lNwb9mcGgu75qflPIb+h0DeT6kzgT/ntREWTx41v2vjRhAxFAHZFfuUiACbf/ tqeA== X-Gm-Message-State: AOAM530LTur7w15KoB4tugfaKgOnSpCff0mIOgqbu7gO1BfvVoV6elaK yxIRRUlYtPnO8KdCG94KQuPFVAOLJiLCgQ== X-Received: by 2002:a17:902:d645:b0:158:f267:83b1 with SMTP id y5-20020a170902d64500b00158f26783b1mr25064870plh.11.1650999190315; Tue, 26 Apr 2022 11:53:10 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id cl18-20020a17090af69200b001cd4989ff5asm3839664pjb.33.2022.04.26.11.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 11:53:09 -0700 (PDT) From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Atish Patra , Anup Patel , Damien Le Moal , devicetree@vger.kernel.org, Jisheng Zhang , Krzysztof Kozlowski , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley , Rob Herring Subject: [PATCH v3 2/4] RISC-V: Enable sstc extension parsing from DT Date: Tue, 26 Apr 2022 11:52:43 -0700 Message-Id: <20220426185245.281182-3-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220426185245.281182-1-atishp@rivosinc.com> References: <20220426185245.281182-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,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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. 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 0734e42f74f2..25915eb60d61 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -52,6 +52,7 @@ extern unsigned long elf_hwcap; */ enum riscv_isa_ext_id { RISCV_ISA_EXT_SSCOFPMF = RISCV_ISA_EXT_BASE, + 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 ccb617791e56..ca0e4c0db17e 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -88,6 +88,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(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 1b2d42d7f589..a214537c22f1 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -192,6 +192,7 @@ void __init riscv_fill_hwcap(void) set_bit(*ext - 'a', this_isa); } else { SET_ISA_EXT_MAP("sscofpmf", RISCV_ISA_EXT_SSCOFPMF); + SET_ISA_EXT_MAP("sstc", RISCV_ISA_EXT_SSTC); } #undef SET_ISA_EXT_MAP } -- 2.25.1