Skip to content

Commit

Permalink
Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/viro/vfs

Pull alpha syscall cleanups from Al Viro:
 "A couple of SYSCALL_DEFINE conversions and removal of pointless (and
  bitrotted) piece stuck in ret_from_kernel_thread since the
  kernel_exceve/kernel_thread conversions six years ago"

* 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  alpha: get rid of pointless insn in ret_from_kernel_thread
  alpha: switch pci syscalls to SYSCALL_DEFINE
  • Loading branch information
Linus Torvalds committed Apr 7, 2018
2 parents 8844a50 + 206b1c6 commit bf6879d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion arch/alpha/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 7 additions & 8 deletions arch/alpha/kernel/pci-noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/sched.h>
#include <linux/dma-mapping.h>
#include <linux/scatterlist.h>
#include <linux/syscalls.h>

#include "proto.h"

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -84,19 +85,17 @@ 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;
else
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;
Expand Down
5 changes: 3 additions & 2 deletions arch/alpha/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/module.h>
#include <linux/cache.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <asm/machvec.h>

#include "proto.h"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bf6879d

Please sign in to comment.