linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cachestat: wire up cachestat for other architectures
@ 2023-05-10 19:58 Nhat Pham
  2023-05-11  3:23 ` Michael Ellerman
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Nhat Pham @ 2023-05-10 19:58 UTC (permalink / raw)
  To: akpm
  Cc: linux-mm, linux-api, kernel-team, linux-arch, hannes,
	richard.henderson, ink, mattst88, linux, geert, monstr, tsbogend,
	James.Bottomley, deller, mpe, npiggin, christophe.leroy, hca,
	gor, agordeev, borntraeger, svens, ysato, dalias, glaubitz,
	davem, chris, jcmvbkbc, linux-alpha, linux-kernel,
	linux-arm-kernel, linux-ia64, linux-m68k, linux-mips,
	linux-parisc, linuxppc-dev, linux-s390, linux-sh, sparclinux

cachestat is previously only wired in for x86 (and architectures using
the generic unistd.h table):

https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/

This patch wires cachestat in for all the other architectures.

Signed-off-by: Nhat Pham <nphamcs@gmail.com>
---
 arch/alpha/kernel/syscalls/syscall.tbl      | 1 +
 arch/arm/tools/syscall.tbl                  | 1 +
 arch/ia64/kernel/syscalls/syscall.tbl       | 1 +
 arch/m68k/kernel/syscalls/syscall.tbl       | 1 +
 arch/microblaze/kernel/syscalls/syscall.tbl | 1 +
 arch/mips/kernel/syscalls/syscall_n32.tbl   | 1 +
 arch/mips/kernel/syscalls/syscall_n64.tbl   | 1 +
 arch/mips/kernel/syscalls/syscall_o32.tbl   | 1 +
 arch/parisc/kernel/syscalls/syscall.tbl     | 1 +
 arch/powerpc/kernel/syscalls/syscall.tbl    | 1 +
 arch/s390/kernel/syscalls/syscall.tbl       | 1 +
 arch/sh/kernel/syscalls/syscall.tbl         | 1 +
 arch/sparc/kernel/syscalls/syscall.tbl      | 1 +
 arch/xtensa/kernel/syscalls/syscall.tbl     | 1 +
 14 files changed, 14 insertions(+)

diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl
index 8ebacf37a8cf..1f13995d00d7 100644
--- a/arch/alpha/kernel/syscalls/syscall.tbl
+++ b/arch/alpha/kernel/syscalls/syscall.tbl
@@ -490,3 +490,4 @@
 558	common	process_mrelease		sys_process_mrelease
 559	common  futex_waitv                     sys_futex_waitv
 560	common	set_mempolicy_home_node		sys_ni_syscall
+561	common	cachestat			sys_cachestat
diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl
index ac964612d8b0..8ebed8a13874 100644
--- a/arch/arm/tools/syscall.tbl
+++ b/arch/arm/tools/syscall.tbl
@@ -464,3 +464,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common	futex_waitv			sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl
index 72c929d9902b..f8c74ffeeefb 100644
--- a/arch/ia64/kernel/syscalls/syscall.tbl
+++ b/arch/ia64/kernel/syscalls/syscall.tbl
@@ -371,3 +371,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common  futex_waitv                     sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl
index b1f3940bc298..4f504783371f 100644
--- a/arch/m68k/kernel/syscalls/syscall.tbl
+++ b/arch/m68k/kernel/syscalls/syscall.tbl
@@ -450,3 +450,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common  futex_waitv                     sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl
index 820145e47350..858d22bf275c 100644
--- a/arch/microblaze/kernel/syscalls/syscall.tbl
+++ b/arch/microblaze/kernel/syscalls/syscall.tbl
@@ -456,3 +456,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common  futex_waitv                     sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl
index 253ff994ed2e..1976317d4e8b 100644
--- a/arch/mips/kernel/syscalls/syscall_n32.tbl
+++ b/arch/mips/kernel/syscalls/syscall_n32.tbl
@@ -389,3 +389,4 @@
 448	n32	process_mrelease		sys_process_mrelease
 449	n32	futex_waitv			sys_futex_waitv
 450	n32	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	n32	cachestat			sys_cachestat
diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl
index 3f1886ad9d80..cfda2511badf 100644
--- a/arch/mips/kernel/syscalls/syscall_n64.tbl
+++ b/arch/mips/kernel/syscalls/syscall_n64.tbl
@@ -365,3 +365,4 @@
 448	n64	process_mrelease		sys_process_mrelease
 449	n64	futex_waitv			sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	n64	cachestat			sys_cachestat
diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl
index 8f243e35a7b2..7692234c3768 100644
--- a/arch/mips/kernel/syscalls/syscall_o32.tbl
+++ b/arch/mips/kernel/syscalls/syscall_o32.tbl
@@ -438,3 +438,4 @@
 448	o32	process_mrelease		sys_process_mrelease
 449	o32	futex_waitv			sys_futex_waitv
 450	o32	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	o32	cachestat			sys_cachestat
diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
index 0e42fceb2d5e..3c71fad78318 100644
--- a/arch/parisc/kernel/syscalls/syscall.tbl
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@ -448,3 +448,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common	futex_waitv			sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl
index a0be127475b1..8c0b08b7a80e 100644
--- a/arch/powerpc/kernel/syscalls/syscall.tbl
+++ b/arch/powerpc/kernel/syscalls/syscall.tbl
@@ -537,3 +537,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common  futex_waitv                     sys_futex_waitv
 450 	nospu	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl
index 799147658dee..7df0329d46cb 100644
--- a/arch/s390/kernel/syscalls/syscall.tbl
+++ b/arch/s390/kernel/syscalls/syscall.tbl
@@ -453,3 +453,4 @@
 448  common	process_mrelease	sys_process_mrelease		sys_process_mrelease
 449  common	futex_waitv		sys_futex_waitv			sys_futex_waitv
 450  common	set_mempolicy_home_node	sys_set_mempolicy_home_node	sys_set_mempolicy_home_node
+451  common	cachestat		sys_cachestat			sys_cachestat
diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl
index 2de85c977f54..97377e8c5025 100644
--- a/arch/sh/kernel/syscalls/syscall.tbl
+++ b/arch/sh/kernel/syscalls/syscall.tbl
@@ -453,3 +453,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common  futex_waitv                     sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl
index 4398cc6fb68d..faa835f3c54a 100644
--- a/arch/sparc/kernel/syscalls/syscall.tbl
+++ b/arch/sparc/kernel/syscalls/syscall.tbl
@@ -496,3 +496,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common  futex_waitv                     sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl
index 52c94ab5c205..2b69c3c035b6 100644
--- a/arch/xtensa/kernel/syscalls/syscall.tbl
+++ b/arch/xtensa/kernel/syscalls/syscall.tbl
@@ -421,3 +421,4 @@
 448	common	process_mrelease		sys_process_mrelease
 449	common  futex_waitv                     sys_futex_waitv
 450	common	set_mempolicy_home_node		sys_set_mempolicy_home_node
+451	common	cachestat			sys_cachestat
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] cachestat: wire up cachestat for other architectures
  2023-05-10 19:58 [PATCH] cachestat: wire up cachestat for other architectures Nhat Pham
@ 2023-05-11  3:23 ` Michael Ellerman
  2023-05-11 19:34   ` Nhat Pham
  2023-05-11  7:01 ` Geert Uytterhoeven
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Michael Ellerman @ 2023-05-11  3:23 UTC (permalink / raw)
  To: Nhat Pham, akpm
  Cc: linux-mm, linux-api, kernel-team, linux-arch, hannes,
	richard.henderson, ink, mattst88, linux, geert, monstr, tsbogend,
	James.Bottomley, deller, npiggin, christophe.leroy, hca, gor,
	agordeev, borntraeger, svens, ysato, dalias, glaubitz, davem,
	chris, jcmvbkbc, linux-alpha, linux-kernel, linux-arm-kernel,
	linux-ia64, linux-m68k, linux-mips, linux-parisc, linuxppc-dev,
	linux-s390, linux-sh, sparclinux

Nhat Pham <nphamcs@gmail.com> writes:
> cachestat is previously only wired in for x86 (and architectures using
> the generic unistd.h table):
>
> https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/
>
> This patch wires cachestat in for all the other architectures.
>
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>
> ---
>  arch/alpha/kernel/syscalls/syscall.tbl      | 1 +
>  arch/arm/tools/syscall.tbl                  | 1 +
>  arch/ia64/kernel/syscalls/syscall.tbl       | 1 +
>  arch/m68k/kernel/syscalls/syscall.tbl       | 1 +
>  arch/microblaze/kernel/syscalls/syscall.tbl | 1 +
>  arch/mips/kernel/syscalls/syscall_n32.tbl   | 1 +
>  arch/mips/kernel/syscalls/syscall_n64.tbl   | 1 +
>  arch/mips/kernel/syscalls/syscall_o32.tbl   | 1 +
>  arch/parisc/kernel/syscalls/syscall.tbl     | 1 +
>  arch/powerpc/kernel/syscalls/syscall.tbl    | 1 +

With the change to the selftest (see my other mail), I tested this on
powerpc and all tests pass.

Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)


cheers


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] cachestat: wire up cachestat for other architectures
  2023-05-10 19:58 [PATCH] cachestat: wire up cachestat for other architectures Nhat Pham
  2023-05-11  3:23 ` Michael Ellerman
@ 2023-05-11  7:01 ` Geert Uytterhoeven
  2023-05-11  9:01   ` Nhat Pham
  2023-05-11  7:04 ` Arnd Bergmann
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2023-05-11  7:01 UTC (permalink / raw)
  To: Nhat Pham
  Cc: akpm, linux-mm, linux-api, kernel-team, linux-arch, hannes,
	richard.henderson, ink, mattst88, linux, monstr, tsbogend,
	James.Bottomley, deller, mpe, npiggin, christophe.leroy, hca,
	gor, agordeev, borntraeger, svens, ysato, dalias, glaubitz,
	davem, chris, jcmvbkbc, linux-alpha, linux-kernel,
	linux-arm-kernel, linux-ia64, linux-m68k, linux-mips,
	linux-parisc, linuxppc-dev, linux-s390, linux-sh, sparclinux

Hi Nat,

On Wed, May 10, 2023 at 9:58 PM Nhat Pham <nphamcs@gmail.com> wrote:
> cachestat is previously only wired in for x86 (and architectures using
> the generic unistd.h table):
>
> https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/
>
> This patch wires cachestat in for all the other architectures.
>
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>
> ---
>  arch/alpha/kernel/syscalls/syscall.tbl      | 1 +
>  arch/arm/tools/syscall.tbl                  | 1 +

Looking at the last addition of a syscall (commit 21b084fdf2a49ca1
("mm/mempolicy: wire up syscall set_mempolicy_home_node"), it looks
like you forgot to update arm64 in compat mode? Or is that not needed?

>  arch/ia64/kernel/syscalls/syscall.tbl       | 1 +
>  arch/m68k/kernel/syscalls/syscall.tbl       | 1 +

For m68k:
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

>  arch/microblaze/kernel/syscalls/syscall.tbl | 1 +
>  arch/mips/kernel/syscalls/syscall_n32.tbl   | 1 +
>  arch/mips/kernel/syscalls/syscall_n64.tbl   | 1 +
>  arch/mips/kernel/syscalls/syscall_o32.tbl   | 1 +
>  arch/parisc/kernel/syscalls/syscall.tbl     | 1 +
>  arch/powerpc/kernel/syscalls/syscall.tbl    | 1 +
>  arch/s390/kernel/syscalls/syscall.tbl       | 1 +
>  arch/sh/kernel/syscalls/syscall.tbl         | 1 +
>  arch/sparc/kernel/syscalls/syscall.tbl      | 1 +
>  arch/xtensa/kernel/syscalls/syscall.tbl     | 1 +
>  14 files changed, 14 insertions(+)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] cachestat: wire up cachestat for other architectures
  2023-05-10 19:58 [PATCH] cachestat: wire up cachestat for other architectures Nhat Pham
  2023-05-11  3:23 ` Michael Ellerman
  2023-05-11  7:01 ` Geert Uytterhoeven
@ 2023-05-11  7:04 ` Arnd Bergmann
  2023-05-11  9:30   ` Nhat Pham
  2023-05-11  7:57 ` Heiko Carstens
  2023-05-11  9:28 ` [PATCH] arm64: wire up cachestat for arm64 Nhat Pham
  4 siblings, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2023-05-11  7:04 UTC (permalink / raw)
  To: Nhat Pham, Andrew Morton
  Cc: linux-mm, linux-api, kernel-team, Linux-Arch, Johannes Weiner,
	Richard Henderson, Ivan Kokshaysky, Matt Turner, Russell King,
	Geert Uytterhoeven, Michal Simek, Thomas Bogendoerfer,
	James E . J . Bottomley, Helge Deller, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Heiko Carstens, gor,
	Alexander Gordeev, borntraeger, Sven Schnelle, Yoshinori Sato,
	Rich Felker, John Paul Adrian Glaubitz, David S . Miller, chris,
	Max Filippov, linux-alpha, linux-kernel, linux-arm-kernel,
	linux-ia64, linux-m68k, linux-mips, linux-parisc, linuxppc-dev,
	linux-s390, linux-sh, sparclinux

On Wed, May 10, 2023, at 21:58, Nhat Pham wrote:
> cachestat is previously only wired in for x86 (and architectures using
> the generic unistd.h table):
>
> https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/
>
> This patch wires cachestat in for all the other architectures.
>
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>

The changes you did here look good, but you missed one
file that has never been converted to the syscall.tbl format:
arch/arm64/include/asm/unistd32.h along with the __NR_compat_syscalls
definition in arch/arm64/include/asm/unistd.h, please add those
as well, and then

Reviewed-by: Arnd Bergmann <arnd@arndb.de>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] cachestat: wire up cachestat for other architectures
  2023-05-10 19:58 [PATCH] cachestat: wire up cachestat for other architectures Nhat Pham
                   ` (2 preceding siblings ...)
  2023-05-11  7:04 ` Arnd Bergmann
@ 2023-05-11  7:57 ` Heiko Carstens
  2023-05-11  9:28 ` [PATCH] arm64: wire up cachestat for arm64 Nhat Pham
  4 siblings, 0 replies; 13+ messages in thread
From: Heiko Carstens @ 2023-05-11  7:57 UTC (permalink / raw)
  To: Nhat Pham
  Cc: akpm, linux-mm, linux-api, kernel-team, linux-arch, hannes,
	richard.henderson, ink, mattst88, linux, geert, monstr, tsbogend,
	James.Bottomley, deller, mpe, npiggin, christophe.leroy, gor,
	agordeev, borntraeger, svens, ysato, dalias, glaubitz, davem,
	chris, jcmvbkbc, linux-alpha, linux-kernel, linux-arm-kernel,
	linux-ia64, linux-m68k, linux-mips, linux-parisc, linuxppc-dev,
	linux-s390, linux-sh, sparclinux

On Wed, May 10, 2023 at 12:58:06PM -0700, Nhat Pham wrote:
> cachestat is previously only wired in for x86 (and architectures using
> the generic unistd.h table):
> 
> https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/
> 
> This patch wires cachestat in for all the other architectures.
> 
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>
> ---
...
>  arch/s390/kernel/syscalls/syscall.tbl       | 1 +

Acked-by: Heiko Carstens <hca@linux.ibm.com> (s390)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] cachestat: wire up cachestat for other architectures
  2023-05-11  7:01 ` Geert Uytterhoeven
@ 2023-05-11  9:01   ` Nhat Pham
  0 siblings, 0 replies; 13+ messages in thread
From: Nhat Pham @ 2023-05-11  9:01 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: akpm, linux-mm, linux-api, kernel-team, linux-arch, hannes,
	richard.henderson, ink, mattst88, linux, monstr, tsbogend,
	James.Bottomley, deller, mpe, npiggin, christophe.leroy, hca,
	gor, agordeev, borntraeger, svens, ysato, dalias, glaubitz,
	davem, chris, jcmvbkbc, linux-alpha, linux-kernel,
	linux-arm-kernel, linux-ia64, linux-m68k, linux-mips,
	linux-parisc, linuxppc-dev, linux-s390, linux-sh, sparclinux

On Thu, May 11, 2023 at 12:01 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Nat,
>
> On Wed, May 10, 2023 at 9:58 PM Nhat Pham <nphamcs@gmail.com> wrote:
> > cachestat is previously only wired in for x86 (and architectures using
> > the generic unistd.h table):
> >
> > https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/
> >
> > This patch wires cachestat in for all the other architectures.
> >
> > Signed-off-by: Nhat Pham <nphamcs@gmail.com>
> > ---
> >  arch/alpha/kernel/syscalls/syscall.tbl      | 1 +
> >  arch/arm/tools/syscall.tbl                  | 1 +
>
> Looking at the last addition of a syscall (commit 21b084fdf2a49ca1
> ("mm/mempolicy: wire up syscall set_mempolicy_home_node"), it looks
> like you forgot to update arm64 in compat mode? Or is that not needed?

It does look like I missed that! Thanks for the reminder. I'll send a fixlet
shortly...

Best,
Nhat

>
> >  arch/ia64/kernel/syscalls/syscall.tbl       | 1 +
> >  arch/m68k/kernel/syscalls/syscall.tbl       | 1 +
>
> For m68k:
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> >  arch/microblaze/kernel/syscalls/syscall.tbl | 1 +
> >  arch/mips/kernel/syscalls/syscall_n32.tbl   | 1 +
> >  arch/mips/kernel/syscalls/syscall_n64.tbl   | 1 +
> >  arch/mips/kernel/syscalls/syscall_o32.tbl   | 1 +
> >  arch/parisc/kernel/syscalls/syscall.tbl     | 1 +
> >  arch/powerpc/kernel/syscalls/syscall.tbl    | 1 +
> >  arch/s390/kernel/syscalls/syscall.tbl       | 1 +
> >  arch/sh/kernel/syscalls/syscall.tbl         | 1 +
> >  arch/sparc/kernel/syscalls/syscall.tbl      | 1 +
> >  arch/xtensa/kernel/syscalls/syscall.tbl     | 1 +
> >  14 files changed, 14 insertions(+)
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] arm64: wire up cachestat for arm64
  2023-05-10 19:58 [PATCH] cachestat: wire up cachestat for other architectures Nhat Pham
                   ` (3 preceding siblings ...)
  2023-05-11  7:57 ` Heiko Carstens
@ 2023-05-11  9:28 ` Nhat Pham
  2023-05-11 10:29   ` Arnd Bergmann
  2023-05-12 10:42   ` Catalin Marinas
  4 siblings, 2 replies; 13+ messages in thread
From: Nhat Pham @ 2023-05-11  9:28 UTC (permalink / raw)
  To: akpm
  Cc: linux-api, kernel-team, linux-arch, hannes, linux-mm,
	linux-kernel, arnd, catalin.marinas, will, linux-arm-kernel

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 <nphamcs@gmail.com>
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
---
 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
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] cachestat: wire up cachestat for other architectures
  2023-05-11  7:04 ` Arnd Bergmann
@ 2023-05-11  9:30   ` Nhat Pham
  0 siblings, 0 replies; 13+ messages in thread
From: Nhat Pham @ 2023-05-11  9:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Morton, linux-mm, linux-api, kernel-team, Linux-Arch,
	Johannes Weiner, Richard Henderson, Ivan Kokshaysky, Matt Turner,
	Russell King, Geert Uytterhoeven, Michal Simek,
	Thomas Bogendoerfer, James E . J . Bottomley, Helge Deller,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Heiko Carstens, gor, Alexander Gordeev, borntraeger,
	Sven Schnelle, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, David S . Miller, chris, Max Filippov,
	linux-alpha, linux-kernel, linux-arm-kernel, linux-ia64,
	linux-m68k, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, sparclinux

On Thu, May 11, 2023 at 12:05 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, May 10, 2023, at 21:58, Nhat Pham wrote:
> > cachestat is previously only wired in for x86 (and architectures using
> > the generic unistd.h table):
> >
> > https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/
> >
> > This patch wires cachestat in for all the other architectures.
> >
> > Signed-off-by: Nhat Pham <nphamcs@gmail.com>
>
> The changes you did here look good, but you missed one
> file that has never been converted to the syscall.tbl format:
> arch/arm64/include/asm/unistd32.h along with the __NR_compat_syscalls
> definition in arch/arm64/include/asm/unistd.h, please add those
> as well, and then
>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>

Just sent a follow-up fixlet for this:

https://lore.kernel.org/linux-mm/20230511092843.3896327-1-nphamcs@gmail.com/T/#u

Thanks for the suggestion!


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: wire up cachestat for arm64
  2023-05-11  9:28 ` [PATCH] arm64: wire up cachestat for arm64 Nhat Pham
@ 2023-05-11 10:29   ` Arnd Bergmann
  2023-05-12 10:42   ` Catalin Marinas
  1 sibling, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2023-05-11 10:29 UTC (permalink / raw)
  To: Nhat Pham, Andrew Morton
  Cc: linux-api, kernel-team, Linux-Arch, Johannes Weiner, linux-mm,
	linux-kernel, Catalin Marinas, Will Deacon, linux-arm-kernel

On Thu, May 11, 2023, at 11:28, Nhat Pham wrote:
> 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 <nphamcs@gmail.com>
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] cachestat: wire up cachestat for other architectures
  2023-05-11  3:23 ` Michael Ellerman
@ 2023-05-11 19:34   ` Nhat Pham
  0 siblings, 0 replies; 13+ messages in thread
From: Nhat Pham @ 2023-05-11 19:34 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: akpm, linux-mm, linux-api, kernel-team, linux-arch, hannes,
	richard.henderson, ink, mattst88, linux, geert, monstr, tsbogend,
	James.Bottomley, deller, npiggin, christophe.leroy, hca, gor,
	agordeev, borntraeger, svens, ysato, dalias, glaubitz, davem,
	chris, jcmvbkbc, linux-alpha, linux-kernel, linux-arm-kernel,
	linux-ia64, linux-m68k, linux-mips, linux-parisc, linuxppc-dev,
	linux-s390, linux-sh, sparclinux

On Wed, May 10, 2023 at 8:23 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Nhat Pham <nphamcs@gmail.com> writes:
> > cachestat is previously only wired in for x86 (and architectures using
> > the generic unistd.h table):
> >
> > https://lore.kernel.org/lkml/20230503013608.2431726-1-nphamcs@gmail.com/
> >
> > This patch wires cachestat in for all the other architectures.
> >
> > Signed-off-by: Nhat Pham <nphamcs@gmail.com>
> > ---
> >  arch/alpha/kernel/syscalls/syscall.tbl      | 1 +
> >  arch/arm/tools/syscall.tbl                  | 1 +
> >  arch/ia64/kernel/syscalls/syscall.tbl       | 1 +
> >  arch/m68k/kernel/syscalls/syscall.tbl       | 1 +
> >  arch/microblaze/kernel/syscalls/syscall.tbl | 1 +
> >  arch/mips/kernel/syscalls/syscall_n32.tbl   | 1 +
> >  arch/mips/kernel/syscalls/syscall_n64.tbl   | 1 +
> >  arch/mips/kernel/syscalls/syscall_o32.tbl   | 1 +
> >  arch/parisc/kernel/syscalls/syscall.tbl     | 1 +
> >  arch/powerpc/kernel/syscalls/syscall.tbl    | 1 +
>
> With the change to the selftest (see my other mail), I tested this on
> powerpc and all tests pass.

Saw the change you proposed, Michael! It looks good to me.
Thanks for helping me make the selftest suite more robust :)

>
> Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
>
>
> cheers


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: wire up cachestat for arm64
  2023-05-11  9:28 ` [PATCH] arm64: wire up cachestat for arm64 Nhat Pham
  2023-05-11 10:29   ` Arnd Bergmann
@ 2023-05-12 10:42   ` Catalin Marinas
  2023-05-12 21:15     ` Andrew Morton
  1 sibling, 1 reply; 13+ messages in thread
From: Catalin Marinas @ 2023-05-12 10:42 UTC (permalink / raw)
  To: Nhat Pham
  Cc: akpm, linux-api, kernel-team, linux-arch, hannes, linux-mm,
	linux-kernel, arnd, will, linux-arm-kernel

On Thu, May 11, 2023 at 02:28:43AM -0700, Nhat Pham wrote:
> 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.

You may want to clarify that this is for compat support on arm64,
otherwise native support uses the generic syscall numbers already.

> 
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: wire up cachestat for arm64
  2023-05-12 10:42   ` Catalin Marinas
@ 2023-05-12 21:15     ` Andrew Morton
  2023-05-12 21:47       ` Nhat Pham
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Morton @ 2023-05-12 21:15 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Nhat Pham, linux-api, kernel-team, linux-arch, hannes, linux-mm,
	linux-kernel, arnd, will, linux-arm-kernel

On Fri, 12 May 2023 11:42:26 +0100 Catalin Marinas <catalin.marinas@arm.com> wrote:

> On Thu, May 11, 2023 at 02:28:43AM -0700, Nhat Pham wrote:
> > 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.
> 
> You may want to clarify that this is for compat support on arm64,
> otherwise native support uses the generic syscall numbers already.

Thanks, I updated the changelog thusly.  Note that this patch is
transitory - it will be squashed into "cachestat: wire up cachestat for
other architectures".



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: wire up cachestat for arm64
  2023-05-12 21:15     ` Andrew Morton
@ 2023-05-12 21:47       ` Nhat Pham
  0 siblings, 0 replies; 13+ messages in thread
From: Nhat Pham @ 2023-05-12 21:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Catalin Marinas, linux-api, kernel-team, linux-arch, hannes,
	linux-mm, linux-kernel, arnd, will, linux-arm-kernel

On Fri, May 12, 2023 at 2:15 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 12 May 2023 11:42:26 +0100 Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> > On Thu, May 11, 2023 at 02:28:43AM -0700, Nhat Pham wrote:
> > > 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.
> >
> > You may want to clarify that this is for compat support on arm64,
> > otherwise native support uses the generic syscall numbers already.
>
> Thanks, I updated the changelog thusly.  Note that this patch is
> transitory - it will be squashed into "cachestat: wire up cachestat for
> other architectures".

It's my expectation too - it makes sense to squash it to the other patch.
Thanks, Andrew!


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-05-12 21:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10 19:58 [PATCH] cachestat: wire up cachestat for other architectures Nhat Pham
2023-05-11  3:23 ` Michael Ellerman
2023-05-11 19:34   ` Nhat Pham
2023-05-11  7:01 ` Geert Uytterhoeven
2023-05-11  9:01   ` Nhat Pham
2023-05-11  7:04 ` Arnd Bergmann
2023-05-11  9:30   ` Nhat Pham
2023-05-11  7:57 ` Heiko Carstens
2023-05-11  9:28 ` [PATCH] arm64: wire up cachestat for arm64 Nhat Pham
2023-05-11 10:29   ` Arnd Bergmann
2023-05-12 10:42   ` Catalin Marinas
2023-05-12 21:15     ` Andrew Morton
2023-05-12 21:47       ` Nhat Pham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).