From d85deed4cb08e08caf1a007c317e8d7cbc912dc3 Mon Sep 17 00:00:00 2001 From: Sergey Shtylyov Date: Sat, 15 Oct 2022 00:22:27 +0300 Subject: ia64: ptrace: user_regset_copyin_ignore() always returns 0 user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Link: https://lkml.kernel.org/r/20221014212235.10770-6-s.shtylyov@omp.ru Signed-off-by: Sergey Shtylyov Cc: Brian Cain Cc: Catalin Marinas Cc: Christophe Leroy Cc: David S. Miller Cc: Dinh Nguyen Cc: Helge Deller Cc: James Bottomley Cc: Jonas Bonn Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oleg Nesterov Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton --- arch/ia64/kernel/ptrace.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index ab8aeb34d1d9..4c41912c550f 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c @@ -1481,12 +1481,10 @@ static void do_gpregs_set(struct unw_frame_info *info, void *arg) return; /* Skip r0 */ if (dst->pos < ELF_GR_OFFSET(1)) { - dst->ret = user_regset_copyin_ignore(&dst->pos, &dst->count, - &dst->u.set.kbuf, - &dst->u.set.ubuf, - 0, ELF_GR_OFFSET(1)); - if (dst->ret) - return; + user_regset_copyin_ignore(&dst->pos, &dst->count, + &dst->u.set.kbuf, &dst->u.set.ubuf, + 0, ELF_GR_OFFSET(1)); + dst->ret = 0; } while (dst->count && dst->pos < ELF_AR_END_OFFSET) { @@ -1560,11 +1558,11 @@ static void do_fpregs_set(struct unw_frame_info *info, void *arg) /* Skip pos 0 and 1 */ if (dst->count > 0 && dst->pos < ELF_FP_OFFSET(2)) { - dst->ret = user_regset_copyin_ignore(&dst->pos, &dst->count, - &dst->u.set.kbuf, - &dst->u.set.ubuf, - 0, ELF_FP_OFFSET(2)); - if (dst->count == 0 || dst->ret) + user_regset_copyin_ignore(&dst->pos, &dst->count, + &dst->u.set.kbuf, &dst->u.set.ubuf, + 0, ELF_FP_OFFSET(2)); + dst->ret = 0; + if (dst->count == 0) return; } -- cgit v1.2.1 From 1c6dbcc4dae761800df0c29a7147c3b6c38f0c8d Mon Sep 17 00:00:00 2001 From: ye xingchen Date: Thu, 20 Oct 2022 11:30:04 +0000 Subject: ia64: replace IS_ERR() with IS_ERR_VALUE() Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Link: https://lkml.kernel.org/r/20221020113004.400031-1-ye.xingchen@zte.com.cn Signed-off-by: ye xingchen Signed-off-by: Sergei Trofimovich Signed-off-by: Andrew Morton --- arch/ia64/kernel/sys_ia64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 215bf3f8cb20..f6a502e8f02c 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c @@ -140,7 +140,7 @@ asmlinkage unsigned long sys_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, long pgoff) { addr = ksys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); - if (!IS_ERR((void *) addr)) + if (!IS_ERR_VALUE(addr)) force_successful_syscall_return(); return addr; } @@ -152,7 +152,7 @@ sys_mmap (unsigned long addr, unsigned long len, int prot, int flags, int fd, lo return -EINVAL; addr = ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT); - if (!IS_ERR((void *) addr)) + if (!IS_ERR_VALUE(addr)) force_successful_syscall_return(); return addr; } @@ -162,7 +162,7 @@ ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, u unsigned long new_addr) { addr = sys_mremap(addr, old_len, new_len, flags, new_addr); - if (!IS_ERR((void *) addr)) + if (!IS_ERR_VALUE(addr)) force_successful_syscall_return(); return addr; } -- cgit v1.2.1 From b98db4776446b2d0050d7db10e948b3b6570b62c Mon Sep 17 00:00:00 2001 From: Gaosheng Cui Date: Wed, 14 Sep 2022 20:47:07 +0800 Subject: ia64/kprobes: remove orphan declarations from arch/ia64/include/asm/kprobes.h flush_register_stack() and invalidate_stacked_regs() have been removed since commit 0aeaf6b3a345 ("ia64/kprobes: Remove jprobe implementation"), so remove them. Link: https://lkml.kernel.org/r/20220914124707.1483471-1-cuigaosheng1@huawei.com Signed-off-by: Gaosheng Cui Cc: Ingo Molnar Cc: Masami Hiramatsu (Google) Signed-off-by: Andrew Morton --- arch/ia64/include/asm/kprobes.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/include/asm/kprobes.h b/arch/ia64/include/asm/kprobes.h index c5cf5e4fb338..9e956768946c 100644 --- a/arch/ia64/include/asm/kprobes.h +++ b/arch/ia64/include/asm/kprobes.h @@ -110,8 +110,6 @@ extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); extern int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, void *data); -extern void invalidate_stacked_regs(void); -extern void flush_register_stack(void); extern void arch_remove_kprobe(struct kprobe *p); #endif /* CONFIG_KPROBES */ -- cgit v1.2.1 From 33cd3003644b2f64a1b1c27e10ba2ed55792e1cc Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Thu, 13 Oct 2022 19:19:10 -0500 Subject: ia64: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions Remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions. Link: https://lkml.kernel.org/r/20221014001911.3342485-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton --- arch/ia64/include/asm/io.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/ia64') diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index ce66dfc0e719..83a492c8d298 100644 --- a/arch/ia64/include/asm/io.h +++ b/arch/ia64/include/asm/io.h @@ -23,10 +23,6 @@ #include #include -/* We don't use IO slowdowns on the ia64, but.. */ -#define __SLOW_DOWN_IO do { } while (0) -#define SLOW_DOWN_IO do { } while (0) - #define __IA64_UNCACHED_OFFSET RGN_BASE(RGN_UNCACHED) /* -- cgit v1.2.1