aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-26 04:43:29 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-26 04:43:29 -0400
commit207ddd0a3a42e6273e3a26447b52e9d6d90d579d (patch)
treeeaff7cd129837826e1df0e78bb5f508aa25965b2
parentcf3d7c1ef418863376d556c48c214cb828623584 (diff)
[SPARC64]: Fix most sparse warnings in arch/sparc64/kernel/sys_sparc.c
Sparse still doesn't like the funny cast we make from a scalar to a "union semun" (which is correct by the C language and in particular works with the sparc64 calling conventions, but sparse doesn't grok that yet). Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/entry.h2
-rw-r--r--arch/sparc64/kernel/sys_sparc.c14
-rw-r--r--arch/sparc64/kernel/systbls.h45
3 files changed, 56 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/entry.h b/arch/sparc64/kernel/entry.h
index 4e238a11bdfe..129a2f133d67 100644
--- a/arch/sparc64/kernel/entry.h
+++ b/arch/sparc64/kernel/entry.h
@@ -14,6 +14,8 @@ extern void __init boot_cpu_id_too_large(int cpu);
14extern unsigned int dcache_parity_tl1_occurred; 14extern unsigned int dcache_parity_tl1_occurred;
15extern unsigned int icache_parity_tl1_occurred; 15extern unsigned int icache_parity_tl1_occurred;
16 16
17extern asmlinkage void update_perfctrs(void);
18extern asmlinkage void sparc_breakpoint(struct pt_regs *regs);
17extern void timer_interrupt(int irq, struct pt_regs *regs); 19extern void timer_interrupt(int irq, struct pt_regs *regs);
18 20
19extern asmlinkage void syscall_trace(struct pt_regs *regs, 21extern asmlinkage void syscall_trace(struct pt_regs *regs,
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 134d801579f9..f952745d0f3d 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -1,5 +1,4 @@
1/* $Id: sys_sparc.c,v 1.57 2002/02/09 19:49:30 davem Exp $ 1/* linux/arch/sparc64/kernel/sys_sparc.c
2 * linux/arch/sparc64/kernel/sys_sparc.c
3 * 2 *
4 * This file contains various random system calls that 3 * This file contains various random system calls that
5 * have a non-standard calling sequence on the Linux/sparc 4 * have a non-standard calling sequence on the Linux/sparc
@@ -30,6 +29,9 @@
30#include <asm/perfctr.h> 29#include <asm/perfctr.h>
31#include <asm/unistd.h> 30#include <asm/unistd.h>
32 31
32#include "entry.h"
33#include "systbls.h"
34
33/* #define DEBUG_UNIMP_SYSCALL */ 35/* #define DEBUG_UNIMP_SYSCALL */
34 36
35asmlinkage unsigned long sys_getpagesize(void) 37asmlinkage unsigned long sys_getpagesize(void)
@@ -445,7 +447,8 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
445 goto out; 447 goto out;
446 case SEMTIMEDOP: 448 case SEMTIMEDOP:
447 err = sys_semtimedop(first, ptr, (unsigned)second, 449 err = sys_semtimedop(first, ptr, (unsigned)second,
448 (const struct timespec __user *) fifth); 450 (const struct timespec __user *)
451 (unsigned long) fifth);
449 goto out; 452 goto out;
450 case SEMGET: 453 case SEMGET:
451 err = sys_semget(first, (int)second, (int)third); 454 err = sys_semget(first, (int)second, (int)third);
@@ -788,7 +791,7 @@ asmlinkage long sys_utrap_install(utrap_entry_t type,
788 } else { 791 } else {
789 if ((utrap_handler_t)current_thread_info()->utraps[type] != new_p && 792 if ((utrap_handler_t)current_thread_info()->utraps[type] != new_p &&
790 current_thread_info()->utraps[0] > 1) { 793 current_thread_info()->utraps[0] > 1) {
791 long *p = current_thread_info()->utraps; 794 unsigned long *p = current_thread_info()->utraps;
792 795
793 current_thread_info()->utraps = 796 current_thread_info()->utraps =
794 kmalloc((UT_TRAP_INSTRUCTION_31+1)*sizeof(long), 797 kmalloc((UT_TRAP_INSTRUCTION_31+1)*sizeof(long),
@@ -816,7 +819,8 @@ asmlinkage long sys_utrap_install(utrap_entry_t type,
816 return 0; 819 return 0;
817} 820}
818 821
819long sparc_memory_ordering(unsigned long model, struct pt_regs *regs) 822asmlinkage long sparc_memory_ordering(unsigned long model,
823 struct pt_regs *regs)
820{ 824{
821 if (model >= 3) 825 if (model >= 3)
822 return -EINVAL; 826 return -EINVAL;
diff --git a/arch/sparc64/kernel/systbls.h b/arch/sparc64/kernel/systbls.h
new file mode 100644
index 000000000000..3416182d1555
--- /dev/null
+++ b/arch/sparc64/kernel/systbls.h
@@ -0,0 +1,45 @@
1#ifndef _SYSTBLS_H
2#define _SYSTBLS_H
3
4#include <linux/kernel.h>
5#include <linux/types.h>
6#include <asm/utrap.h>
7
8extern asmlinkage unsigned long sys_getpagesize(void);
9extern asmlinkage unsigned long sparc_brk(unsigned long brk);
10extern asmlinkage long sparc_pipe(struct pt_regs *regs);
11extern asmlinkage long sys_ipc(unsigned int call, int first,
12 unsigned long second,
13 unsigned long third,
14 void __user *ptr, long fifth);
15extern asmlinkage long sparc64_newuname(struct new_utsname __user *name);
16extern asmlinkage long sparc64_personality(unsigned long personality);
17extern asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
18 unsigned long prot, unsigned long flags,
19 unsigned long fd, unsigned long off);
20extern asmlinkage long sys64_munmap(unsigned long addr, size_t len);
21extern asmlinkage unsigned long sys64_mremap(unsigned long addr,
22 unsigned long old_len,
23 unsigned long new_len,
24 unsigned long flags,
25 unsigned long new_addr);
26extern asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs);
27extern asmlinkage long sys_getdomainname(char __user *name, int len);
28extern asmlinkage long solaris_syscall(struct pt_regs *regs);
29extern asmlinkage long sunos_syscall(struct pt_regs *regs);
30extern asmlinkage long sys_utrap_install(utrap_entry_t type,
31 utrap_handler_t new_p,
32 utrap_handler_t new_d,
33 utrap_handler_t __user *old_p,
34 utrap_handler_t __user *old_d);
35extern asmlinkage long sparc_memory_ordering(unsigned long model,
36 struct pt_regs *regs);
37extern asmlinkage long sys_rt_sigaction(int sig,
38 const struct sigaction __user *act,
39 struct sigaction __user *oact,
40 void __user *restorer,
41 size_t sigsetsize);
42extern asmlinkage long sys_perfctr(int opcode, unsigned long arg0,
43 unsigned long arg1, unsigned long arg2);
44
45#endif /* _SYSTBLS_H */