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) |
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 @@ | |||
27 | #include <linux/mempolicy.h> | 27 | #include <linux/mempolicy.h> |
28 | #include <linux/binfmts.h> | 28 | #include <linux/binfmts.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/syscalls.h> | 30 | #include <linux/compat.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/signal.h> | 32 | #include <linux/signal.h> |
33 | #include <asm/syscalls.h> | 33 | #include <asm/syscalls.h> |
34 | |||
35 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
36 | #include <asm/homecache.h> | 35 | #include <asm/homecache.h> |
37 | #include <arch/chip.h> | 36 | #include <arch/chip.h> |
@@ -74,10 +73,7 @@ int sys32_fadvise64_64(int fd, u32 offset_lo, u32 offset_hi, | |||
74 | 73 | ||
75 | #endif /* 32-bit syscall wrappers */ | 74 | #endif /* 32-bit syscall wrappers */ |
76 | 75 | ||
77 | /* | 76 | /* Note: used by the compat code even in 64-bit Linux. */ |
78 | * This API uses a 4KB-page-count offset into the file descriptor. | ||
79 | * It is likely not the right API to use on a 64-bit platform. | ||
80 | */ | ||
81 | SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, | 77 | SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, |
82 | unsigned long, prot, unsigned long, flags, | 78 | unsigned long, prot, unsigned long, flags, |
83 | unsigned long, fd, unsigned long, off_4k) | 79 | unsigned long, fd, unsigned long, off_4k) |
@@ -89,10 +85,7 @@ SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, | |||
89 | off_4k >> PAGE_ADJUST); | 85 | off_4k >> PAGE_ADJUST); |
90 | } | 86 | } |
91 | 87 | ||
92 | /* | 88 | #ifdef __tilegx__ |
93 | * This API uses a byte offset into the file descriptor. | ||
94 | * It is likely not the right API to use on a 32-bit platform. | ||
95 | */ | ||
96 | SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | 89 | SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, |
97 | unsigned long, prot, unsigned long, flags, | 90 | unsigned long, prot, unsigned long, flags, |
98 | unsigned long, fd, off_t, offset) | 91 | unsigned long, fd, off_t, offset) |
@@ -102,6 +95,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | |||
102 | return sys_mmap_pgoff(addr, len, prot, flags, fd, | 95 | return sys_mmap_pgoff(addr, len, prot, flags, fd, |
103 | offset >> PAGE_SHIFT); | 96 | offset >> PAGE_SHIFT); |
104 | } | 97 | } |
98 | #endif | ||
105 | 99 | ||
106 | 100 | ||
107 | /* Provide the actual syscall number to call mapping. */ | 101 | /* Provide the actual syscall number to call mapping. */ |
@@ -116,6 +110,10 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, | |||
116 | #define sys_sync_file_range sys_sync_file_range2 | 110 | #define sys_sync_file_range sys_sync_file_range2 |
117 | #endif | 111 | #endif |
118 | 112 | ||
113 | /* | ||
114 | * Note that we can't include <linux/unistd.h> here since the header | ||
115 | * guard will defeat us; <asm/unistd.h> checks for __SYSCALL as well. | ||
116 | */ | ||
119 | void *sys_call_table[__NR_syscalls] = { | 117 | void *sys_call_table[__NR_syscalls] = { |
120 | [0 ... __NR_syscalls-1] = sys_ni_syscall, | 118 | [0 ... __NR_syscalls-1] = sys_ni_syscall, |
121 | #include <asm/unistd.h> | 119 | #include <asm/unistd.h> |