Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1445289rdb; Fri, 16 Feb 2024 17:05:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWfVNFSOxxnNpCyNcWw5z1oDfelxcSh6EE8+jfwM28PW1ekeYc1m1AnLg0MYMmoMPgusURb5e4rOGUQlUWOSXbBeu1iHx25/fKCZagyWQ== X-Google-Smtp-Source: AGHT+IEJi2Amy15LsDFVwfIJbt7O58/v3gAFiVwVja2VGUFywOXcXyGjG4tpocizA9STqMfeU6A/ X-Received: by 2002:a17:902:db0e:b0:1d9:b9da:ea8f with SMTP id m14-20020a170902db0e00b001d9b9daea8fmr8613942plx.2.1708131953252; Fri, 16 Feb 2024 17:05:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708131953; cv=pass; d=google.com; s=arc-20160816; b=dx3EOrdJE8OQMVu+31XRx169+udCAdQs+WA0mq2zfIKHZptmvGDE12CAjHaJvEzMVe qnkTAjcnD2Gu+mTW2DP54Vv4lwP0CnEFRn2MmV3Dkro3eSvuXz823j99v/XPhSokUezO cj3nxb3UFAJY/qqcLAfs7WQXy+s7ADuolndXn7rjOtVZ9AIaJBkEhwtgfsDmeiptr0UN aWCvd/+03VxaEFRGwYFngzyy+8AEqk7pVRvvAFqZxzYaak35vxHIUEBi2WxKx8S1CbRg rGcuEIIQH2eZj8NT8dAylG/Czn3lqRH6LNOyjg8wSeoSO5PJtPWgFHldUcR9jrNnWekN anTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cWbguiNHtTSYUYCLfEbpuKVHcWVD1RqHX9iqh/aIsVE=; fh=VCn6lt55QOKjzv0Hbz5VO3vbW0BxeXx0oGBGk4MoX4I=; b=ThNBAgVXbH1I84dYHA5iUXXdZWugiORafdsgCptnyPRZ1IBOeUdfkDuBkP9+xzaALu t8810q+n8mA0ErmoGIq25jdWz8FncO8bc823lQM6cmXtcu36iCv8kDx6mK8XFk9GQEgT FoAf6AAtnFhY24FbH00J6Y0KoCXTaxcElqsUBWRGrn8XemiAa+WTFfz8J5+BS1/LYa4x A7XRJxLDS8VJlussPL7KGe9ELxlIhk4dCwQOhiee5/gL+Ky8A/ZkzDg8T1Aj3QmI7HBL XR2JeO4421pQ2Ig/wmvpUPF7/LHKxNQtzqJITf8B6zCJKlJ6DbzGa1RtqfqLyY+8jz1H n2gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=15b4Ycma; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-69615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69615-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j2-20020a170902da8200b001d9727a7409si650788plx.551.2024.02.16.17.05.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:05:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=15b4Ycma; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-69615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69615-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E6736282FCD for ; Sat, 17 Feb 2024 01:05:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 150F93716E; Sat, 17 Feb 2024 00:59:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="15b4Ycma" Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51EB237707 for ; Sat, 17 Feb 2024 00:59:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131545; cv=none; b=KzMiPbeCR0wXlxbxb7Gi7AKiTxTs1KQN5WXgzENqTanTMU1vH6HqLsQrARg6m5izQyT8ZV/4LHGYJtijRGbuwwz5p0Ydn+arrP8wkFchzYShC7jdKcIP3pfsszEQbfv8Bscx7AUBHshNaLlae/SDe2NfSbRS+agzkonNr75wq8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131545; c=relaxed/simple; bh=6lKVIYDNOU41w+9SFv6M4hQwtiitlAdvXeYzgOV4WlM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=us3+AWSv6U1mK6v/29FffI8uGJ3AWszqvcwWiS+hIYJg31C+HyKF/hTh1hyed28IWnRDTAiphbtA1T0a+xOMN5Nff77cIq1xpaBf3SMbgTUHeC+04m5Sbi9rplN9R8QqvH3JIJTlBGYoRaY6z+p1t4rU8JIKG0/P/4I44Guc6QY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=15b4Ycma; arc=none smtp.client-ip=209.85.166.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-36423c819a3so11324905ab.0 for ; Fri, 16 Feb 2024 16:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1708131541; x=1708736341; darn=vger.kernel.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=cWbguiNHtTSYUYCLfEbpuKVHcWVD1RqHX9iqh/aIsVE=; b=15b4YcmaldKJshPz118OunfDLwsP68dHf26xNv+QRH7EHSkD/a4dQMd3lxOmIpzWbw dDhe/1YYq2h6WbKci7g6ZiT0Req8DeXWw/tEaHptSwa2kFKzhg9KZL5GKY6Zr4FGeCq/ iyvRQg3+7Ffua5lUIk43wLR0mBsif0RTk1oxmqzaytwApLbginPpG/090Ha4j1TCAMDj sZwcgC0DxfHupoTJ9ZDrXgIS5JKZQdguh6DiiHeSoHEbVgDUaL0sWoFaqQ0kCuwRyC1r zGu2AZ4Z4XALv3WHPwKqlLq2qd59mXX12Awm6YHs+UrRhaG2cIRrKhTgN42KkL3lr6P4 bsJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708131541; x=1708736341; 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=cWbguiNHtTSYUYCLfEbpuKVHcWVD1RqHX9iqh/aIsVE=; b=qInFNeg/0rPKlFw4vyLT9JoVfIUyzr0C5BCbYSIyprZBIon6yoK7yqcZzjiiIpCyfq uIlTu/IT32ag8RgGSrsDF9IODBO48A8CNe7Ntix8gA1G8oVNzmK+7zG79g3/xfs94c3V RxBjGB6gVLWt7kyp68ME8fj77+0KqkrbEXcfyn0RPqHehMuJUOYt1GmfBNH/5Z3sU6k9 WtDpTKaHYoDnTLH/qZPMYc75BGaRDqY+J4gGHhH9AqOVfzxfSIL5epk7hhlTrb5o3doi fQGPmYZe/3qjrFLRG0ApMwkRj67tYfcrQj6U4vB9ulReUh5npN9bByrEWuBSF92akxrM MWSA== X-Gm-Message-State: AOJu0YzACCkGcegPYNhcG/W3x0TmyOrvGrk06I0/zV8s8IgpDZ6ZrSja y0HJnhcQKCtIOTABq1zRl/6U/hS2KfPLX8xMl35GUXkQeqNYgvFJQFlRUXM1HSISEmPd0bQaPNx x X-Received: by 2002:a92:c5cd:0:b0:365:44:1edb with SMTP id s13-20020a92c5cd000000b0036500441edbmr4716100ilt.3.1708131541456; Fri, 16 Feb 2024 16:59:01 -0800 (PST) Received: from atishp.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d188-20020a6336c5000000b005dc89957e06sm487655pga.71.2024.02.16.16.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 16:59:01 -0800 (PST) From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Adrian Hunter , Alexander Shishkin , Alexandre Ghiti , Andrew Jones , Anup Patel , Arnaldo Carvalho de Melo , Atish Patra , Christian Brauner , =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Conor Dooley , devicetree@vger.kernel.org, Evan Green , Guo Ren , Heiko Stuebner , Ian Rogers , Ingo Molnar , James Clark , Jing Zhang , Jiri Olsa , Ji Sheng Teoh , John Garry , Jonathan Corbet , Kan Liang , Krzysztof Kozlowski , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, Ley Foon Tan , linux-doc@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Namhyung Kim , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rob Herring , Samuel Holland , Weilin Wang , Will Deacon , kaiwenxue1@gmail.com, Yang Jihong Subject: [PATCH RFC 18/20] tools arch uapi: Sync the uinstd.h header file for RISC-V Date: Fri, 16 Feb 2024 16:57:36 -0800 Message-Id: <20240217005738.3744121-19-atishp@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240217005738.3744121-1-atishp@rivosinc.com> References: <20240217005738.3744121-1-atishp@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The uninstd.h has been changed since it's last sync. Update it so that perf tool can use the new RISC-V specific syscall in perf tool. Signed-off-by: Atish Patra --- tools/arch/riscv/include/uapi/asm/unistd.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/arch/riscv/include/uapi/asm/unistd.h b/tools/arch/riscv/include/uapi/asm/unistd.h index f506cca520b0..950ab3fd4409 100644 --- a/tools/arch/riscv/include/uapi/asm/unistd.h +++ b/tools/arch/riscv/include/uapi/asm/unistd.h @@ -15,11 +15,14 @@ * along with this program. If not, see . */ -#ifdef __LP64__ +#if defined(__LP64__) && !defined(__SYSCALL_COMPAT) #define __ARCH_WANT_NEW_STAT #define __ARCH_WANT_SET_GET_RLIMIT #endif /* __LP64__ */ +#define __ARCH_WANT_SYS_CLONE3 +#define __ARCH_WANT_MEMFD_SECRET + #include /* @@ -40,3 +43,12 @@ #define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15) #endif __SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache) + +/* + * Allows userspace to query the kernel for CPU architecture and + * microarchitecture details across a given set of CPUs. + */ +#ifndef __NR_riscv_hwprobe +#define __NR_riscv_hwprobe (__NR_arch_specific_syscall + 14) +#endif +__SYSCALL(__NR_riscv_hwprobe, sys_riscv_hwprobe) -- 2.34.1