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: 13862080 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 616F7D1BDF3 for ; Mon, 4 Nov 2024 21:12:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=IBYozqmP4kgDqCATVF4mr9l1mgqwfE3SxQIhbzP4kRk=; b=TDsepaFEgx09YxxxAJFEbc4H5O PHBntkoho3iikmn7GDg3q7WET8DynUu3nANsSqOYsOeCAC+exMAPB8luPliCLoVWz2d3Fxq6Ub5Tc wJvyjpZylBM+nJDYUAxDX7R9r9sxiBdLJhVqEnSZ5Ks3AbbqIHohDQHme+X1f9IqkmaQPafIeEbKo EgrlJG7vFCxrH8X8cZkI8GaUUzLqi/RNKfBBHERwx2uq/6bKPb6ugYtzqTjtuGu6cclo/FCBqLxs9 mtUBCJMgdnc0G0ucb5RxdBzMkmY71zbMaFxEw2wyQMmtqNTTRTFoTmk+X98jpR9z1PnHLf6WdiacC ujCmF7sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t84NM-0000000F7Pl-0a9B; Mon, 04 Nov 2024 21:12:40 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t84Hg-0000000F5V2-3Wl1 for linux-arm-kernel@lists.infradead.org; Mon, 04 Nov 2024 21:06:52 +0000 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-720d01caa66so3002296b3a.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=G38t0suUnsqTrZdkRQo2yxP0HEJp3xdGoVTmxIMzk877Sj1e0wFnsSifZQ21RwcZaH Duujh72NijLzb+GXtHeCeQvg/gVlb6Cpvbs99qfsVQPIs3K7YrvPSv34bihAPgO+IMgO N3rhbGT7NUZrZtwOqToFQ1kQorIGhPqN9uC/QCQyKCGrtYaZRikczb8bGAIzRMIa8g0Q MWBvwDcEb5jtferxzrhI05nNTvyqrmfIbwxRdtUutqWjx9X60O7cRz7l5T5V4nDyTSZM BFiOPin1oVsohP3Tz/1kGgCqQDvCQusLD0ba80tRqc2noa5UWeyVnZ81shjeKdqEqezU qkfQ== X-Forwarded-Encrypted: i=1; AJvYcCXY8D0heQsDDtymYB2D7P5AwpIE00454NW+jqGkiujYmKWYGapthxm2DePuefcGmnQp9mQwuTChDC91LHnBg9L2@lists.infradead.org X-Gm-Message-State: AOJu0YyHAVOoaGrpGow+gu2NnmfGyXb11Z3fGNbhlEzn1Uvm+ubitRe5 e0X9d7+JnINIf4YhY73mbenkXGF8gX4GyNqXbOwW33IljflhtDwPYFTCWm1hPMQ= 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_996620_B1041BED X-CRM114-Status: GOOD ( 15.57 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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