[klibc] syscalls: Fixup some of the -at syscall declarations

mknodat and mkdirat contain a spurious repeated parameter, linkat
is missing the final int flags parameter, symlinkat has the first
two parameters transposed, and fchmodat is missing the flags
parameter and is declared in the wrong header.

Also declarations are missing for utimensat and fchownat.

This patch fixes up these syscall declarations.

Originally-by: Neil Williams <codehelp@debian.org>
Originally-by: Anil Singhar <anil.singhar@linaro.org>
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[klibc] syscalls: Add syscalls needed by arm64

arm64 uses generic syscalls, and does not include the "noat",
"noflags", and "deprecated" syscalls.

This patch adds substitution functions for system calls not available
on arm64.

Originally-by: Neil Williams <codehelp@debian.org>
Originally-by: Anil Singhar <anil.singhar@linaro.org>
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[klibc] arm64: Add arm64 support

Based on work by Neil Williams (codehelp@debian.org) and Anil Singhar
(anil.singhar@linaro.org), this patch adds arm64 support.

Originally-by: Neil Williams <codehelp@debian.org>
Originally-by: Anil Singhar <anil.singhar@linaro.org>
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[klibc] arm64: remove useless <klibc/asmmacros.h> file

<klibc/asmmacros.h> is a file specific to arm32; the file is empty on
arm64 so we can just drop it.

Cc: Neil Williams <codehelp@debian.org>
Cc: Anil Singhar <anil.singhar@linaro.org>
Cc: Steve Capper <steve.capper@linaro.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[klibc] arm64: Fix struct stat

Use actual struct timespec fields in struct stat, and use the proper
__stdev64 macro for the dev_t fields.

Also fix bizarre formatting.

Cc: Neil Williams <codehelp@debian.org>
Cc: Anil Singhar <anil.singhar@linaro.org>
Cc: Steve Capper <steve.capper@linaro.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
[klibc] poll, select: fix style problems

Fix whitespace style problems in poll.c and select.c.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>