mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-04 18:49:41 +00:00
selftests/nolibc: simplify call to ioperm
Since commit 53fcfafa8c
("tools/nolibc/unistd: add syscall()") nolibc
has support for syscall(2).
Use it to get rid of some ifdef-ery.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
2d7481eb5d
commit
67eb617a8e
@ -1051,11 +1051,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
* exit with status code 2N+1 when N is written to 0x501. We
|
* exit with status code 2N+1 when N is written to 0x501. We
|
||||||
* hard-code the syscall here as it's arch-dependent.
|
* hard-code the syscall here as it's arch-dependent.
|
||||||
*/
|
*/
|
||||||
#if defined(_NOLIBC_SYS_H)
|
else if (syscall(__NR_ioperm, 0x501, 1, 1) == 0)
|
||||||
else if (my_syscall3(__NR_ioperm, 0x501, 1, 1) == 0)
|
|
||||||
#else
|
|
||||||
else if (ioperm(0x501, 1, 1) == 0)
|
|
||||||
#endif
|
|
||||||
__asm__ volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0));
|
__asm__ volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0));
|
||||||
/* if it does nothing, fall back to the regular panic */
|
/* if it does nothing, fall back to the regular panic */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user