From patchwork Thu May 11 09:28:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nhat Pham X-Patchwork-Id: 13237719 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CCF6C77B7C for ; Thu, 11 May 2023 09:28:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 382006B0072; Thu, 11 May 2023 05:28:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3328D6B0074; Thu, 11 May 2023 05:28:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2219A6B0075; Thu, 11 May 2023 05:28:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 106F76B0072 for ; Thu, 11 May 2023 05:28:49 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id CC9E9120273 for ; Thu, 11 May 2023 09:28:48 +0000 (UTC) X-FDA: 80777449536.13.C3776D5 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf28.hostedemail.com (Postfix) with ESMTP id C5812C0003 for ; Thu, 11 May 2023 09:28:45 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=lSqSpkTe; spf=pass (imf28.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683797325; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5AKArW/9N1DM1cw/nq7oO3Ipc/BxTBMz8SQU51oi5QM=; b=Phwl/rlvLdJpMPTyV+dcAPxeoKA6VQnyTrLKmbl1Dd5C5FqaiqGQXsjLl5MyQxOUQgS/xv xIkRsN47Qvqq5mcpGDo2rr9c/HYwGwa5sq0NrOXNBpigggtfdMa2074zyWoGjDfUHXpPtn IAAyf/922uj0is4nBb7my9i03b6KAeM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683797325; a=rsa-sha256; cv=none; b=eQnek3H+rI27fibSTlm6L+s7XenuKFAL7Dva1YRIBVXGxILwsyRUM7pNJANxPK4iWbAVdm 4+ZHJY/oLNFFRCADdQ/Pb1F8sGF6JhQHjOGQ55+cz9FgmXpjP+nP06t5CKvqRnHaBZhY1t Eyd39G/LbK85lMA5WVMAhhug3vs0S8A= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=lSqSpkTe; spf=pass (imf28.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-64395e741fcso8597934b3a.2 for ; Thu, 11 May 2023 02:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683797324; x=1686389324; 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=5AKArW/9N1DM1cw/nq7oO3Ipc/BxTBMz8SQU51oi5QM=; b=lSqSpkTeYoe3tO29lldpVHbM32z393QYWP5lHnZIBWCvEarPeFYrVLxfqpKRFeiMH9 O/4rvObcKOyglqs8faTtrmcVYFQ8XJOPmtyKy2kiWHSt1RBmvearJPkZQEhcKNjXUV44 zPmk9SGD5swqjEFi8vzVyC7S7hRLhT8oymp0Nn+j0Lqb53GMv6htmJ3pwBf5TwaV1uFR bqB49lbtbgVPuSNA3cLK217LA3Bph6pGjOU+UaaDA/QzyAdGYXsakKnwD8no18SkjADS VxaC3PcxwjVwmU+nKQWSxICPOzqvM3jml+aMSgjVP8wtczWmTNUNx3u/IsGxy11QAZfk GwwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683797324; x=1686389324; 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=5AKArW/9N1DM1cw/nq7oO3Ipc/BxTBMz8SQU51oi5QM=; b=S9V+IPuBCvMK+aL1UpUMB27b9D3w5X/46MMLu6sKro4BAiEjHOFmUq6VftNxzlhXrN 6I1quzprxqujsTxTz2GSE7Btys99uS5A+MWXmkawa0P1juS2coiRWYWWZzQxPPckZbSE uFAiVjnMcnLVMErXpX/3LMp5Sd82cj3tFHwfKKwgXdFCIEz7r0dNW2Jz02EqOEX/DTPY /CMzVeMZSNRSzuxZnE7tmH1sfixJXjjN1oyQVE3Tfq4gPkYg31P0b3lA/Lw4fYsx7vcD fATrIAHw0ipuwiuboeuCwFfGdU8on1+GzCb0BGxeOAX5BDA5nu4jVNMMus77yvJCHqiH 83sQ== X-Gm-Message-State: AC+VfDzX4r0yWtRkXqOxWA93/qTwLZAGj6dXD0MoJtd4affL71RTyslb zu4UTP+UJE3YoHX0Fa0IrHQ= X-Google-Smtp-Source: ACHHUZ4kt2fEW6y1LT9sL5KAOXOvB6IxvXmm6lpgkO77jh+uBd0sq2MbCeuvBayswScpQ/VmBXnGwQ== X-Received: by 2002:a17:902:db0e:b0:1ab:12cf:9e1c with SMTP id m14-20020a170902db0e00b001ab12cf9e1cmr23993360plx.32.1683797324390; Thu, 11 May 2023 02:28:44 -0700 (PDT) Received: from localhost (fwdproxy-prn-019.fbsv.net. [2a03:2880:ff:13::face:b00c]) by smtp.gmail.com with ESMTPSA id 13-20020a170902e9cd00b001ab0669d84csm5407877plk.26.2023.05.11.02.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 02:28:44 -0700 (PDT) From: Nhat Pham To: akpm@linux-foundation.org Cc: linux-api@vger.kernel.org, kernel-team@meta.com, linux-arch@vger.kernel.org, hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, arnd@arndb.de, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: wire up cachestat for arm64 Date: Thu, 11 May 2023 02:28:43 -0700 Message-Id: <20230511092843.3896327-1-nphamcs@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230510195806.2902878-1-nphamcs@gmail.com> References: <20230510195806.2902878-1-nphamcs@gmail.com> MIME-Version: 1.0 X-Stat-Signature: oz4zqe8ritrxuudbhg1kja5ydmexj611 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: C5812C0003 X-HE-Tag: 1683797325-943841 X-HE-Meta: U2FsdGVkX1+jEHnV0u28iFpP319ITIPTVbRTiD9kX4Oikgp0xBbjef1JD0opNf2/y/n764HDjh2x0PBzT3HjTyjkCWCCqv2kvUHS5f6yIM4PyLgfHvyzI4bAFMEV+tPq1xUq1bR2SpyfYfm7rdmmZbHbmb6HfcGgid3cbiQtrDasFqT9M/4a08ifPestOEXRMSpB6h8sv/iw1k39uoKrbDQE9V5Wb7kyQix5PjICf/jGP2jHy6Hz4aI8id9xGK644yxeQVmkm/7JT+Ar+kHPlsZge3wxbDbW7rDPetGauqW1nJ9qylAMb4NtSWBr1J17sgVN8Uj7LK0GTNKad1O6bi/2npXFU4Cm4dkRARon9NeDscdb2LDs+3mzFVAnoLDo7/xafbV2BLv85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h2hlbW/xqt29F3Q X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: cachestat is a new syscall that was previously wired in for most architectures: https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/ https://lore.kernel.org/linux-mm/20230510195806.2902878-1-nphamcs@gmail.com/ However, those patches miss arm64, which has its own syscall table in arch/arm64. This patch wires cachestat in for arm64. Signed-off-by: Nhat Pham Suggested-by: Geert Uytterhoeven Suggested-by: Arnd Bergmann Reviewed-by: Arnd Bergmann Acked-by: Catalin Marinas --- arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 037feba03a51..64a514f90131 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -39,7 +39,7 @@ #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) -#define __NR_compat_syscalls 451 +#define __NR_compat_syscalls 452 #endif #define __ARCH_WANT_SYS_CLONE diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index 604a2053d006..d952a28463e0 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h @@ -907,6 +907,8 @@ __SYSCALL(__NR_process_mrelease, sys_process_mrelease) __SYSCALL(__NR_futex_waitv, sys_futex_waitv) #define __NR_set_mempolicy_home_node 450 __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) +#define __NR_cachestat 451 +__SYSCALL(__NR_cachestat, sys_cachestat) /* * Please add new compat syscalls above this comment and update