cachestat: wire up cachestat for other architectures
Subsystems (15)
PATCH 1/1 cachestat: wire up cachestat for other architectures
cachestat is previously only wired in for x86 (and architectures using the generic unistd.h table):
https://lore.kernel.org/lkml/[email protected]/
This patch wires cachestat in for all the other architectures.
--- 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(+)
arch/alpha/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/arm/tools/syscall.tbl +1 -0
@@ -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
arch/ia64/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/m68k/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/microblaze/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/mips/kernel/syscalls/syscall_n32.tbl +1 -0
@@ -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
arch/mips/kernel/syscalls/syscall_n64.tbl +1 -0
@@ -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
arch/mips/kernel/syscalls/syscall_o32.tbl +1 -0
@@ -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
arch/parisc/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/powerpc/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/s390/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/sh/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/sparc/kernel/syscalls/syscall.tbl +1 -0
@@ -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
arch/xtensa/kernel/syscalls/syscall.tbl +1 -0
@@ -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
Signature · 1 line
2.34.1
Quoted 8 lines · Nhat Pham
cachestat is previously only wired in for x86 (and architectures using the generic
unistd.htable):https://lore.kernel.org/lkml/[email protected]/
This patch wires cachestat in for all the other architectures.
Signed-off-by Nhat Pham <[email protected]>
Quoted 11 lines
--- 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.
cheers
Quoted 22 lines · On Wed, May 10, 2023 at 8:23 PM Michael Ellerman <[email protected]> wrote:
Quoted 8 lines · Nhat Pham
cachestat is previously only wired in for x86 (and architectures using the generic
unistd.htable):https://lore.kernel.org/lkml/[email protected]/
This patch wires cachestat in for all the other architectures.
Signed-off-by Nhat Pham <[email protected]>Quoted 11 lines
--- 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 +
Quoted 2 lines
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 :)
Quoted 5 lines
cheers
Hi Nat,
Quoted 11 lines · On Wed, May 10, 2023 at 9:58 PM Nhat Pham…
cachestat is previously only wired in for x86 (and architectures using the generic
unistd.htable):This patch wires cachestat in for all the other architectures.
Signed-off-by Nhat Pham <[email protected]>--- 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?
Quoted 2 lines
arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 +
For m68k:
Quoted 11 lines
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
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Quoted 11 lines · Geert Uytterhoeven
Hi Nat,
Quoted 7 lines · Nhat Pham
cachestat is previously only wired in for x86 (and architectures using the generic
unistd.htable):https://lore.kernel.org/lkml/[email protected]/
This patch wires cachestat in for all the other architectures.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Nhat Pham <[email protected]>--- 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 syscallset_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
Quoted 29 lines
Quoted 3 lines
arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 +For m68k:
Quoted 11 lines
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 -- [email protected]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
Quoted 8 lines · Nhat Pham
cachestat is previously only wired in for x86 (and architectures using the generic
unistd.htable):https://lore.kernel.org/lkml/[email protected]/
This patch wires cachestat in for all the other architectures.
Signed-off-by Nhat Pham <[email protected]>
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
Quoted 11 lines · On Thu, May 11, 2023 at 12:05 AM Arnd Bergmann…
Quoted 8 lines · Nhat Pham
cachestat is previously only wired in for x86 (and architectures using the generic
unistd.htable):This patch wires cachestat in for all the other architectures.
Signed-off-by Nhat Pham <[email protected]>
Quoted 7 lines
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.halong with the__NR_compat_syscallsdefinition inarch/arm64/include/asm/unistd.h, please add those as well, and thenReviewed-by Arnd Bergmann <[email protected]>
Just sent a follow-up fixlet for this:
Thanks for the suggestion!
Quoted 9 lines · Nhat Pham
cachestat is previously only wired in for x86 (and architectures using the generic
unistd.htable):https://lore.kernel.org/lkml/[email protected]/
This patch wires cachestat in for all the other architectures.
Signed-off-by Nhat Pham <[email protected]>---
...
Quoted 1 line
arch/s390/kernel/syscalls/syscall.tbl | 1 +
PATCH 1/1 arm64: wire up cachestat for arm64
In reply to Nhat Phamcachestat is a new syscall that was previously wired in for most architectures:
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/linux-mm/[email protected]/
However, those patches miss arm64, which has its own syscall table in arch/arm64. This patch wires cachestat in for arm64.
--- arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
arch/arm64/include/asm/unistd.h +1 -1
@@ -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
arch/arm64/include/asm/unistd32.h +2 -0
@@ -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
Signature · 1 line
2.34.1
Re: [PATCH] arm64: wire up cachestat for arm64
Quoted 6 lines · Nhat Pham
cachestat is a new syscall that was previously wired in for most architectures:
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/linux-mm/[email protected]/
Quoted 7 lines
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 <[email protected]>Suggested-by Geert Uytterhoeven <[email protected]>Suggested-by Arnd Bergmann <[email protected]>
Re: [PATCH] arm64: wire up cachestat for arm64
In reply to Nhat PhamQuoted 8 lines · Nhat Pham
cachestat is a new syscall that was previously wired in for most architectures:
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/linux-mm/[email protected]/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.
Quoted 4 lines
Signed-off-by Nhat Pham <[email protected]>Suggested-by Geert Uytterhoeven <[email protected]>Suggested-by Arnd Bergmann <[email protected]>
Andrew Morton
maintainerRe: [PATCH] arm64: wire up cachestat for arm64
Quoted 4 lines · On Fri, 12 May 2023 11:42:26 +0100 Catalin Marinas <[email protected]>…
Quoted 3 lines · Nhat Pham
cachestat is a new syscall that was previously wired in for most architectures:
Quoted 8 lines
Quoted 5 lines
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/linux-mm/[email protected]/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".
Re: [PATCH] arm64: wire up cachestat for arm64
Quoted 13 lines · Andrew Morton
Quoted 10 lines · On Fri, 12 May 2023 11:42:26 +0100 Catalin Marinas <[email protected]>…
Quoted 8 lines · Nhat Pham
cachestat is a new syscall that was previously wired in for most architectures:
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/linux-mm/[email protected]/However, those patches miss arm64, which has its own syscall table in
arch/arm64. This patch wires cachestat in for arm64.
Quoted 6 lines
Quoted 2 lines
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!