From patchwork Mon Nov 4 21:06:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13862081 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 9F652D1BDF4 for ; Mon, 4 Nov 2024 21:09:06 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iGjNXNw2myTqif8my+JH/Iik5leppyx8s8dvbpjchTA=; b=tckjvG+i9X4pRT E+FkH0t7mGy5dChvatTiki4C0XpeO8nflCBjmge4+2+bbzQaJgwbJZDXk2JvRy04gUwjWvf1hjv5E BUROHZlUFj5i6WR9AOEp2q4ml17ItLyrXX0ReZRQcAcncFge4lsJDUEJ+72Y9js/SkIWeuiTA+BWP k3LOGYBpDQZ1KtpaiYYAguAHJCrD+qo+EFQjMKUi32ITY3+dOjpPfY+GEQHER5CajSl8C0yns14aa Tc0LMuPVF/64uzlmORVWPwhCfwLfxbPjfbICpI40kOxnd3QHPggpiV/M1MTsAw6uEsk/ai/hsSGnn fW9GP5Bh9YT9QQa0qRdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t84Jp-0000000F6Rh-458R; Mon, 04 Nov 2024 21:09:01 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t84Hg-0000000F5V3-0h9E for linux-riscv@lists.infradead.org; Mon, 04 Nov 2024 21:06:51 +0000 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-720d01caa66so3002298b3a.2 for ; Mon, 04 Nov 2024 13:06:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1730754407; x=1731359207; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IBYozqmP4kgDqCATVF4mr9l1mgqwfE3SxQIhbzP4kRk=; b=zLUI9uCacakvmlmRyUG3PGxm3w/9kxlvnzDoApCchlUs+eNf8MgyDX/gTG3OfitsW3 run8wLaq8TXRpqAIyKuGsSsLu+0qD5WrkVBPE6OKAJs+BtF3OJ72WBMPIiiyVt/KrJcQ eFE9QjdzZCV7fUQwgKhyLOIy+HM1n4af/du9HDDE7iKTpOrzGcgMpt9Ng1dFEFB1RZWc +kugYTtJOBMpPwW+gRHN6xeRMNguLv3B5EVNl5dzUnEHZGD+Clg67JyU20x8p0yNVyTR 4XqQmJjcYSbkqyR15dnGlnRCZnH1AdGkowbt8qXys35dO9cK7MdmdxJoo6vTWeQ3FuAI x+zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730754407; x=1731359207; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IBYozqmP4kgDqCATVF4mr9l1mgqwfE3SxQIhbzP4kRk=; b=d/dYnGjX1Tz6xyIRnOsnzJNWU1HfDp6Xs8dJQJ7Q2IzYhZKER0yPj2tasuWnalulus Gkwowl1ZDsXiHw+4QoAhNbhl6Jq2ITia98mecaa60U6GqMnN8zW+n6IAQD1KwuuayoDq eqv2zFky9GMfLou8eFLV28Tgj4XoHMgB6+eQD8o0qdnTw30Lh7dJ9o38yKFk1gXJ2aux SeiF5XMn1ko4t9n7uRjqFSGtuST9ZkFhMwBQzEEE+xUPWEYk0CNPTOCwggq4MxkOh8J/ pFhYAGeWKk/9SIl5HwOeU8Zv4bd3WDLqA6rBTS58I/prp7PGHWfzu35ar6QQLxsyIDys XcFg== X-Forwarded-Encrypted: i=1; AJvYcCW7pQAY+Zi6nxKjDh7VtBCBLeRAljcrw6JsKMAis1/3w6ZxFQ2y7yZK1W85/1ALhggts/mnAB0izBXy6A==@lists.infradead.org X-Gm-Message-State: AOJu0Yx1dMEoUh6J4ctYxweWadYiJky+HxLL5gnCf5WVfb2PnXZABzex WEIbzBeKpYBp/j7/vl7WPTStgDh0oqAqaEePJ3/R2FvasPdpPqy2SXhiG6zw330= X-Google-Smtp-Source: AGHT+IEw7Pl3WMMSXrcg/sNy1bE2C/ljw19KDpDHK234X+biDUyX9c1c/9FjwUYq0Fp1+rkwdwDnZQ== X-Received: by 2002:a05:6a20:d8a:b0:1c6:fb66:cfe with SMTP id adf61e73a8af0-1db91dbb56emr23905631637.21.1730754407516; Mon, 04 Nov 2024 13:06:47 -0800 (PST) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ee490e08f4sm7248293a12.40.2024.11.04.13.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2024 13:06:46 -0800 (PST) From: Charlie Jenkins Date: Mon, 04 Nov 2024 13:06:04 -0800 Subject: [PATCH RFT 02/16] perf tools: arc: Support generic syscall headers MIME-Version: 1.0 Message-Id: <20241104-perf_syscalltbl-v1-2-9adae5c761ef@rivosinc.com> References: <20241104-perf_syscalltbl-v1-0-9adae5c761ef@rivosinc.com> In-Reply-To: <20241104-perf_syscalltbl-v1-0-9adae5c761ef@rivosinc.com> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , =?utf-8?q?G=C3=BCnt?= =?utf-8?q?her_Noack?= , Christian Brauner , Guo Ren , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Jonathan Corbet , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, linux-csky@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2475; i=charlie@rivosinc.com; h=from:subject:message-id; bh=9RjTPFEQXXi8G0IerLZGozkA4RzgGbTlEP2CyRIRfeA=; b=owGbwMvMwCHWx5hUnlvL8Y3xtFoSQ7qmeZT/lrQPcgVSp866b5oottGWZXne8zlbMz/PXfP45 jJB/7jmjlIWBjEOBlkxRRaeaw3MrXf0y46Klk2AmcPKBDKEgYtTACbCkM/I8EGjLfRN5emCxfff Rt6svpYVp9S0KufSprL9ixpVVctvHWVk2Lp43dZb9d071xb2bZlirmHzr33jpYSkuarLqw/PaGT YywQA X-Developer-Key: i=charlie@rivosinc.com; a=openpgp; fpr=7D834FF11B1D8387E61C776FFB10D1F27D6B1354 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241104_130648_494590_EB9F076D X-CRM114-Status: GOOD ( 14.05 ) 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 Arc uses the generic syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins --- tools/perf/Makefile.config | 2 +- tools/perf/Makefile.perf | 2 +- tools/perf/arch/arc/entry/syscalls/Kbuild | 2 ++ tools/perf/arch/arc/entry/syscalls/Makefile.syscalls | 3 +++ tools/perf/arch/arc/include/syscall_table.h | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 6774b67d4668..504d762cc572 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -36,7 +36,7 @@ ifneq ($(NO_SYSCALL_TABLE),1) endif # architectures that use the generic syscall table scripts - ifeq ($(SRCARCH),riscv) + ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc)) NO_SYSCALL_TABLE := 0 CFLAGS += -DGENERIC_SYSCALL_TABLE CFLAGS += -I$(OUTPUT)arch/$(SRCARCH)/include/generated diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 18294b840121..02ff3f2fcf12 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -311,7 +311,7 @@ FEATURE_TESTS := all endif endif # architectures that use the generic syscall table -ifeq ($(SRCARCH),riscv) +ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc)) include $(srctree)/tools/perf/scripts/Makefile.syscalls endif include Makefile.config diff --git a/tools/perf/arch/arc/entry/syscalls/Kbuild b/tools/perf/arch/arc/entry/syscalls/Kbuild new file mode 100644 index 000000000000..11707c481a24 --- /dev/null +++ b/tools/perf/arch/arc/entry/syscalls/Kbuild @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +syscall-y += syscalls_32.h diff --git a/tools/perf/arch/arc/entry/syscalls/Makefile.syscalls b/tools/perf/arch/arc/entry/syscalls/Makefile.syscalls new file mode 100644 index 000000000000..391d30ab7a83 --- /dev/null +++ b/tools/perf/arch/arc/entry/syscalls/Makefile.syscalls @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +syscall_abis_32 += arc time32 renameat stat64 rlimit diff --git a/tools/perf/arch/arc/include/syscall_table.h b/tools/perf/arch/arc/include/syscall_table.h new file mode 100644 index 000000000000..4c942821662d --- /dev/null +++ b/tools/perf/arch/arc/include/syscall_table.h @@ -0,0 +1,2 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include