diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-06-25 17:04:17 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-07-06 13:41:51 -0400 |
commit | 0707ad30d10110aebc01a5a64fb63f4b32d20b73 (patch) | |
tree | 64d8ba73e605ac26e56808d1d77701b3f83cf8b2 /arch/tile/kernel/sys.c | |
parent | c78095bd8c77fca2619769ff8efb639fd100e373 (diff) | |
download | linux-0707ad30d10110aebc01a5a64fb63f4b32d20b73.tar.gz linux-0707ad30d10110aebc01a5a64fb63f4b32d20b73.tar.bz2 linux-0707ad30d10110aebc01a5a64fb63f4b32d20b73.zip |
arch/tile: Miscellaneous cleanup changes.
This commit is primarily changes caused by reviewing "sparse"
and "checkpatch" output on our sources, so is somewhat noisy, since
things like "printk() -> pr_err()" (or whatever) throughout the
codebase tend to get tedious to read. Rather than trying to tease
apart precisely which things changed due to which type of code
review, this commit includes various cleanups in the code:
- sparse: Add declarations in headers for globals.
- sparse: Fix __user annotations.
- sparse: Using gfp_t consistently instead of int.
- sparse: removing functions not actually used.
- checkpatch: Clean up printk() warnings by using pr_info(), etc.;
also avoid partial-line printks except in bootup code.
- checkpatch: Use exposed structs rather than typedefs.
- checkpatch: Change some C99 comments to C89 comments.
In addition, a couple of minor other changes are rolled in
to this commit:
- Add support for a "raise" instruction to cause SIGFPE, etc., to be raised.
- Remove some compat code that is unnecessary when we fully eliminate
some of the deprecated syscalls from the generic syscall ABI.
- Update the tile_defconfig to reflect current config contents.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/tile/kernel/sys.c')
-rw-r--r-- | arch/tile/kernel/sys.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/tile/kernel/sys.c b/arch/tile/kernel/sys.c index 0427978cea0a..f0f87eab8c39 100644 --- a/arch/tile/kernel/sys.c +++ b/arch/tile/kernel/sys.c @@ -27,11 +27,10 @@ #include <linux/mempolicy.h> #include <linux/binfmts.h> #include <linux/fs.h> -#include <linux/syscalls.h> +#include <linux/compat.h> #include <linux/uaccess.h> #include <linux/signal.h> #include <asm/syscalls.h> - #include <asm/pgtable.h> #include <asm/homecache.h> #include <arch/chip.h> @@ -74,10 +73,7 @@ int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, #endif /* 32-bit syscall wrappers */ -/* - * This API uses a 4KB-page-count offset into the file descriptor. - * It is likely not the right API to use on a 64-bit platform. - */ +/* Note: used by the compat code even in 64-bit Linux. */ SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, unsigned long, prot, unsigned long, flags, unsigned long, fd, unsigned long, off_4k) @@ -89,10 +85,7 @@ SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, off_4k >> PAGE_ADJUST); } -/* - * This API uses a byte offset into the file descriptor. - * It is likely not the right API to use on a 32-bit platform. - */ +#ifdef __tilegx__ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, unsigned long, prot, unsigned long, flags, unsigned long, fd, off_t, offset) @@ -102,6 +95,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); } +#endif /* Provide the actual syscall number to call mapping. */ @@ -116,6 +110,10 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, #define sys_sync_file_range sys_sync_file_range2 #endif +/* + * Note that we can't include <linux/unistd.h> here since the header + * guard will defeat us; <asm/unistd.h> checks for __SYSCALL as well. + */ void *sys_call_table[__NR_syscalls] = { [0 ... __NR_syscalls-1] = sys_ni_syscall, #include <asm/unistd.h> |