From e4eacd6b899abc5fa2a0b6d20d5c430feba96858 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 18 Mar 2018 12:58:18 -0400 Subject: alpha: switch pci syscalls to SYSCALL_DEFINE Signed-off-by: Al Viro --- arch/alpha/kernel/pci-noop.c | 15 +++++++-------- arch/alpha/kernel/pci.c | 5 +++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'arch/alpha') diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c index b995987b1557..b6ebb65127a8 100644 --- a/arch/alpha/kernel/pci-noop.c +++ b/arch/alpha/kernel/pci-noop.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "proto.h" @@ -46,8 +47,8 @@ alloc_resource(void) return alloc_bootmem(sizeof(struct resource)); } -asmlinkage long -sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn) +SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, bus, + unsigned long, dfn) { struct pci_controller *hose; @@ -84,9 +85,8 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn) return -EOPNOTSUPP; } -asmlinkage long -sys_pciconfig_read(unsigned long bus, unsigned long dfn, - unsigned long off, unsigned long len, void *buf) +SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn, + unsigned long, off, unsigned long, len, void __user *, buf) { if (!capable(CAP_SYS_ADMIN)) return -EPERM; @@ -94,9 +94,8 @@ sys_pciconfig_read(unsigned long bus, unsigned long dfn, return -ENODEV; } -asmlinkage long -sys_pciconfig_write(unsigned long bus, unsigned long dfn, - unsigned long off, unsigned long len, void *buf) +SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn, + unsigned long, off, unsigned long, len, void __user *, buf) { if (!capable(CAP_SYS_ADMIN)) return -EPERM; diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 2e86ebb680ae..c668c3b7a167 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "proto.h" @@ -409,8 +410,8 @@ alloc_resource(void) /* Provide information on locations of various I/O regions in physical memory. Do this on a per-card basis so that we choose the right hose. */ -asmlinkage long -sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn) +SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, bus, + unsigned long, dfn) { struct pci_controller *hose; struct pci_dev *dev; -- cgit v1.2.3 From 206b1c6012a8a3792948ed699f3973d7be13f6db Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 19 Mar 2018 14:29:17 -0400 Subject: alpha: get rid of pointless insn in ret_from_kernel_thread It used to clear a3, so that signal handling on return to userland would've passed zero r0 to do_work_pending(), preventing the syscall restart logics from triggering. It had been pointless all along, since we only go there after successful do_execve(). Which does clear regs->r0 on alpha, preventing the syscall restart logics just fine, no extra help needed. Good thing, that, since back in 2012 do_work_pending() has lost the second argument, shifting the registers used to pass that thing from a3 to a2. Commit that had done that adjusted the entry.S code accordingly, but missed that one. As the result, we were left with useless insn in ret_from_kernel_thread and confusing comment to go with it. Get rid of both... Signed-off-by: Al Viro --- arch/alpha/kernel/entry.S | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/alpha') diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index d92abb01c249..c64806a2daf5 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -785,7 +785,6 @@ ret_from_kernel_thread: mov $9, $27 mov $10, $16 jsr $26, ($9) - mov $31, $19 /* to disable syscall restarts */ br $31, ret_to_user .end ret_from_kernel_thread -- cgit v1.2.3