From patchwork Fri Nov 24 07:21:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 13467075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7FE15C636BD for ; Fri, 24 Nov 2023 07:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eTyLoXbxD/AnmQO/erj5nYzqD8fDPyHjJ9DMDH9ZB70=; b=LkoASPPpe4FoHl P/CKfzkmoyJZPRQDbBo7wA2kZlKGlR10dFRTwS65gpr1W4weMiHcTb6w1elo9+agPtrJ6/feLoaWe g4NA2gqiPaqwV8q6frADC0pnoryOIJPsTvv+lKV+fy4wrvaff4FFHchG1Lk8yzCwxd57FNHT2h4Xo aR/j4Sxd+Z1xhIRzjodxv3mcNmtdA7cxn8x0fnjRn/lBznzwU558qU0bR1V8C63nU0YjCGUZX0RIA mKIcJdSyj7L/LhQvidS5D5wr8xjN7rOvOt3qms/+arhhKMUbQZsU0CsgCdXMdHkHQezF2L9i5Lug5 warLZf9Dp2wkFtx+mKXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6QW0-006NMQ-0b; Fri, 24 Nov 2023 07:22:16 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6QVw-006NJz-30 for linux-riscv@lists.infradead.org; Fri, 24 Nov 2023 07:22:14 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a04196fc957so225989566b.2 for ; Thu, 23 Nov 2023 23:22:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700810529; x=1701415329; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VVy1jdSL9+WHb2B8ZDIGvqsG60+7Fk4VQGEPcFy9390=; b=JakcnK0joCfaOob1cbjm3dR0ZWPry6qVgBgt+WnB0ZImhv33MUQuf/bZ5JkaE5FRxz DD0txYi5sIf9VXd7h6d4E6EJjh05FRWU1Xl6TH+gI8/KA7f/8uwctoYC6qB2yPFBqUab SoDmUHIZ2Jpf15Y3nJWTlsz6U963u+GkD7Pr1vG9Z4GDU4FzS8GZXT+ScDAFb9URkBx+ K9/2YxVDxeD8e6BMBtjnbOvC1N3frPXBFLwb8KIDyZ1Fsc0YDH+VQ7pfbbxBp6TQFwno L2CrD/G7OCazOFoaAR9fmaPcESqKBGPh9fBcp9ucpaXuCbxncSYHrsT87P/He+GuFfB5 bZ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700810529; x=1701415329; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VVy1jdSL9+WHb2B8ZDIGvqsG60+7Fk4VQGEPcFy9390=; b=E2+rsfb5SM2XG3Qu02q43+belFhWoQ06Srw+LpYswh4jhLykxHOSoELKGRnQ2HKeiz 3VLEbO4j0hfuvs4PbIrkUcxEs4oedZ5R58606IBVIc9pJIgQRh5u2u9ImnH2rQFvH9qB CdmTtyidlFkeNjo3lzwYW6TywsR525khFIJu5tX5TaV2jyrjkeGRNy5MmZZkMhn7oZp6 qWuQ9nkXgHmmkwLZab5883fJ2+ciH0/q0XD7A4vDozd7XfVZVFDFSkR5dUAuRj56+0gK COPeJhfP4gwo7CxpQaEjJ5a7vCLhVesNsyiAqdTuZZVZUKQHoI+6SLbRhQv0faVvBWdJ djTA== X-Gm-Message-State: AOJu0YxtmM2pvu62sEnrs34/+dZxlaVNKoYxeC3bsdCDlIQgtcrtpOyt 5potcicwnBLBD/ar0+NTih7qGRCJyUgiedZtJIS/ajw4 X-Google-Smtp-Source: AGHT+IEBJIwqDHkFD4oZPvK9TF0KkUAPOFtohVZ/l5fTiA2CidjiZcnxjtG0jzodZ6Xfjt7CfSnlmA== X-Received: by 2002:a17:906:20d7:b0:9be:40ba:5f1 with SMTP id c23-20020a17090620d700b009be40ba05f1mr1349531ejc.60.1700810528651; Thu, 23 Nov 2023 23:22:08 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id q18-20020a1709060e5200b00992f2befcbcsm1709930eji.180.2023.11.23.23.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 23:22:07 -0800 (PST) From: Christoph Muellner To: linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Andrew Morton , Shuah Khan , Jonathan Corbet , Anup Patel , Philipp Tomsich , Andrew Jones , Guo Ren , Daniel Henrique Barboza , Conor Dooley , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Alan Stern , Andrea Parri , Will Deacon , Daniel Lustig , Peter Zijlstra Cc: =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [RFC PATCH 2/5] RISC-V: Expose Ssdtso via hwprobe API Date: Fri, 24 Nov 2023 08:21:39 +0100 Message-ID: <20231124072142.2786653-3-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231124072142.2786653-1-christoph.muellner@vrull.eu> References: <20231124072142.2786653-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231123_232212_968968_F1791137 X-CRM114-Status: GOOD ( 12.96 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Christoph Müllner This patch adds Ssdtso to the list of extensions which are announced to user-space using te hwprobe API. Signed-off-by: Christoph Müllner --- Documentation/arch/riscv/hwprobe.rst | 3 +++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 5 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 7b2384de471f..8de3349e0ca2 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -80,6 +80,9 @@ The following keys are defined: * :c:macro:`RISCV_HWPROBE_EXT_ZICBOZ`: The Zicboz extension is supported, as ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs. + * :c:macro:`RISCV_HWPROBE_EXT_ZICBOZ`: The Ssdtso extension is supported, as + in version v1.0-draft2 of the corresponding extension. + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index b659ffcfcdb4..ed450c64e6b2 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -30,6 +30,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZBB (1 << 4) #define RISCV_HWPROBE_EXT_ZBS (1 << 5) #define RISCV_HWPROBE_EXT_ZICBOZ (1 << 6) +#define RISCV_HWPROBE_EXT_SSDTSO (1 << 7) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c index c712037dbe10..c654f43b9699 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -162,6 +162,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZBB); EXT_KEY(ZBS); EXT_KEY(ZICBOZ); + EXT_KEY(SSDTSO); #undef EXT_KEY }