From patchwork Tue Dec 17 06:32:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13911239 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 6FD37E7717F for ; Tue, 17 Dec 2024 06:42:43 +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=zs3oH4NBTS6DMHHbdXq4FgYS4bObpmx8EyzA3CkiqQs=; b=OyxC9swaxEBviv 2CZZrQs1pT697aSFW8SjLn8sGUG/mLoWd5xzcJ9DMpy3maG2ktsJ6pIU+7jU928VEuGJVhViAVtYz Mtyhg+QhMIiFRS1vNtSBnljBrQW4TKz7LyZBs1pUtULo5G1NIWt0TucN5sf+Lr37mLDHm3bK2YZBs zIPqT5Knzri+E7L0mL82qbYJNIS4SHa0OJn34FAERTmQUiPhc0kMKk73DtKFwj/CXAYgRQ99Pc8et fx1QTOYtPEnb1E7CRXn5leA+yJl1G7R21OSOib7lyH7FK435v0SajrSp7HpSpeir6oj+2/tnUKzJi itmceZVmK/k+PYX+CCiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tNRHy-0000000CRWn-0HL0; Tue, 17 Dec 2024 06:42:38 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tNREp-0000000CQSS-00o5 for linux-riscv@lists.infradead.org; Tue, 17 Dec 2024 06:39:24 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7f71f2b1370so3003250a12.1 for ; Mon, 16 Dec 2024 22:39:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1734417562; x=1735022362; 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=euJl9W34MyY1TVJyYJNiwzcX7XKHzg3BpRu6zirxvZk=; b=Ogrm98J2lVSfOf8X5/RsjjS+MS1AkP1dLFnKv3kHK8KK8dHZeQ6GkQyLvIDEhqWXRK QHO3r7rKfifiruZy1F7U5Q5Z9L4TXEGOWIR228NJrfwKNqfK9IQSwbTugs71eXT0tu0M foQUuhGbh95ucx0VG98ftFqgCft97K41FyTjmScXajf0KG02/wwQcgoFACoLf9mbN8PR z7LiwFabrEqHNiRiVCjvjhWnX+KXaoG05nSTZ7e4i61yOqpTJhpk0xeVVA/YG5ZKjuCU UO2lvsfav7IKb4LwwHyqhbvGAYS44MsnCYb9pPFREZlIdMg36gIn5Q+9bKcldjY4pwmK CnNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734417562; x=1735022362; 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=euJl9W34MyY1TVJyYJNiwzcX7XKHzg3BpRu6zirxvZk=; b=H3bHQaCwDyFQwiYIwSMyJLUdtNRUSI+dScCQxfOaZcbSNENxjXzL1WB9W6fXucT3/6 k/zPgqyLXA4VeySFjRyrPGj1drmcsmX55FdEnEh9YJGUANxt0RgG2ERVh8t0qnPFOlEx xV/CPNfMIKBkp8MJFmnFfBDfNertrcJfG6By7ipWy3WX9fxSAhKAt4foC6X1IWBBRPFe kvFd9Ed5W9qai3ZnWsNPKuN3R7QvUefCV9Ioc7JHxPqd147m6fBKGX15gbUF/9ttlPvV oZTBFzSwtRRId/t1bkv4GVpcv7MDbzcf4nLPbFZCgZKQJqt9IRTOhlNKaGStO8+Xv0au 24rA== X-Forwarded-Encrypted: i=1; AJvYcCV0qVnuz5Qryp2hnUZBudp/uLXyObQ9yNR5jQ6o95yiw9ZavH/pBGj1WlKBnusUQmQZgXT3uhw6S5rt8A==@lists.infradead.org X-Gm-Message-State: AOJu0YycZnPKkSr/eLixcx0zCQ+zMSs9f+HCNYA1epmIBiVbPf11a3lV IOPK436uIbCWgXmlH/U2hkjfKTAdRxwp4T+uriQUN+RcHz45pVEXiINZZmicE8A= X-Gm-Gg: ASbGncsc8dJcSTnQM7aIp+V17lMD6CYncXIQ1wEYdG99HQXcU/oegs2QF+tU7zJUTWp RF74t82dsXQtqxjkVbKr25rmPGnC15qlEwvkp+MU+PE656jNdNGNHTYgoe8LOtgzxQkrioRrf9b U/kEh/9JujiC7OGjAJSHlffNoICsCciaWUm6iXvLX1FpYvNB3BDfaWXqb+OQ9RqF9OjNS3sh0ub YXKuXXWTaBsZpxlsT/KBzVKBC8ARH32VagRiMWV8VxDDEPHQtjMfXgNstEldHVBWn9emLDy X-Google-Smtp-Source: AGHT+IGqlnl/b+gh5FmvpZNT+WBF1msYf06NK1q7eNepM4VuIgvGGzEtp129msaKSOCVAB+ecLoVyw== X-Received: by 2002:a17:90b:2744:b0:2ef:33a4:ae6e with SMTP id 98e67ed59e1d1-2f2d7d9fd46mr4370548a91.12.1734417562182; Mon, 16 Dec 2024 22:39:22 -0800 (PST) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142d90d6bsm9179551a91.2.2024.12.16.22.39.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 22:39:21 -0800 (PST) From: Charlie Jenkins Date: Mon, 16 Dec 2024 22:32:47 -0800 Subject: [PATCH v3 02/16] perf tools: arc: Support generic syscall headers MIME-Version: 1.0 Message-Id: <20241216-perf_syscalltbl-v3-2-239f032481d5@rivosinc.com> References: <20241216-perf_syscalltbl-v3-0-239f032481d5@rivosinc.com> In-Reply-To: <20241216-perf_syscalltbl-v3-0-239f032481d5@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 , =?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 , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , 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.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2837; i=charlie@rivosinc.com; h=from:subject:message-id; bh=G5z4ZauX9QfJoBAuCbuGuwLJbsOqwLsh16GJRVCk8oE=; b=owGbwMvMwCHWx5hUnlvL8Y3xtFoSQ3qiTO+vlgO3Hd8++fViiVLG/IlH+7/5Pp7K4MmiKel2X aiKIWFbRykLgxgHg6yYIgvPtQbm1jv6ZUdFyybAzGFlAhnCwMUpABOJbmX4n6Qqum7v/HWGU0TK lj0Q0FOekfquOuv3QimdqgXvDh96e4Xhn8WStvWdm9++S/nnaXA8SPuaC1uTSdu/mMqt82V2nD+ swQIA 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-20241216_223923_080164_DACD5875 X-CRM114-Status: GOOD ( 13.35 ) 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 | 3 ++- 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, 10 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 6e4d0ef58ccb40da793f3ab8cca77d620d258bb4..d3c12c6ba6764e9a8b12acee603a0509154f2c74 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) + ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),) NO_SYSCALL_TABLE := 0 CFLAGS += -DGENERIC_SYSCALL_TABLE CFLAGS += -I$(OUTPUT)tools/perf/arch/$(SRCARCH)/include/generated diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index f5278ed9f778f928436693a14e016c5c3c5171c1..f717e4628d9e4632f53fed16524a659a3e4feea5 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -311,7 +311,8 @@ FEATURE_TESTS := all endif endif # architectures that use the generic syscall table -ifeq ($(SRCARCH),riscv) +generic_syscall_table_archs := riscv arc +ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),) 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 0000000000000000000000000000000000000000..11707c481a24ecf4e220e51eb1aca890fe929a13 --- /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 0000000000000000000000000000000000000000..391d30ab7a831b72d2ed3f2e7966fdbf558a9ed7 --- /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 0000000000000000000000000000000000000000..4c942821662d95216765b176a84d5fc7974e1064 --- /dev/null +++ b/tools/perf/arch/arc/include/syscall_table.h @@ -0,0 +1,2 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include