diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-03-11 06:34:38 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-04-02 14:16:12 -0400 |
commit | 66f4e88cc69da7d9ec4d68cf370cc69742d4af81 (patch) | |
tree | 9ba92c918c9aa2804e1413c82de7a4893a271fd3 /drivers/tty/vt | |
parent | c7b95d5156a9ee70f800bd2e47a9eba677be73e1 (diff) |
x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm()
Using this helper allows us to avoid the in-kernel calls to the
sys_ioperm() syscall. The ksys_ prefix denotes that this function is meant
as a drop-in replacement for the syscall. In particular, it uses the same
calling convention as sys_ioperm().
This patch is part of a series which removes in-kernel calls to syscalls.
On this basis, the syscall entry path can be streamlined. For details, see
http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: x86@kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index d61be307256a..a78ad10a119b 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c | |||
@@ -57,7 +57,7 @@ extern struct tty_driver *console_driver; | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifdef CONFIG_X86 | 59 | #ifdef CONFIG_X86 |
60 | #include <linux/syscalls.h> | 60 | #include <asm/syscalls.h> |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | static void complete_change_console(struct vc_data *vc); | 63 | static void complete_change_console(struct vc_data *vc); |
@@ -420,12 +420,12 @@ int vt_ioctl(struct tty_struct *tty, | |||
420 | ret = -EINVAL; | 420 | ret = -EINVAL; |
421 | break; | 421 | break; |
422 | } | 422 | } |
423 | ret = sys_ioperm(arg, 1, (cmd == KDADDIO)) ? -ENXIO : 0; | 423 | ret = ksys_ioperm(arg, 1, (cmd == KDADDIO)) ? -ENXIO : 0; |
424 | break; | 424 | break; |
425 | 425 | ||
426 | case KDENABIO: | 426 | case KDENABIO: |
427 | case KDDISABIO: | 427 | case KDDISABIO: |
428 | ret = sys_ioperm(GPFIRST, GPNUM, | 428 | ret = ksys_ioperm(GPFIRST, GPNUM, |
429 | (cmd == KDENABIO)) ? -ENXIO : 0; | 429 | (cmd == KDENABIO)) ? -ENXIO : 0; |
430 | break; | 430 | break; |
431 | #endif | 431 | #endif |