From patchwork Tue Jun 21 19:16:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 902842 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5LJGtK9006309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Jun 2011 19:17:16 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ6RJ-0002l5-1L; Tue, 21 Jun 2011 19:16:45 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZ6RI-0002in-Mg; Tue, 21 Jun 2011 19:16:44 +0000 Received: from [2002:4e20:1eda::1] (helo=caramon.arm.linux.org.uk) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ6RE-0002iU-Cp for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 19:16:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=PvGtLBkaDlo2oy2pQNAeJJyUG+co6Cz52nDLQu1JukI=; b=f7466lwFKFh4pzoyGA5cAT6izdBQL+PsUfRjFPnGCDSQLCcvnFKfQyD1Q6CGqxvLUcw8tDNcCR/yfrxFUBaLXNhv3ebQ5FjZjbrmwFp3f17I8bb9C4tZbhiC6hDSUXCv4hcRaWA2ODR0mKfMYBCnqfMbeIkOF3XtyYqx0O5dR3k=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QZ6R0-0002t1-Kw; Tue, 21 Jun 2011 20:16:27 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1QZ6Qz-0008IU-6a; Tue, 21 Jun 2011 20:16:25 +0100 Date: Tue, 21 Jun 2011 20:16:24 +0100 From: Russell King - ARM Linux To: H Hartley Sweeten Subject: Re: [PATCH] ARM: quiet sparse noise due to __ARCH_WANT_SYS_RT_SIG(ACTION|SUSPEND) Message-ID: <20110621191624.GK23234@n2100.arm.linux.org.uk> References: <201106211209.46462.hartleys@visionengravers.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201106211209.46462.hartleys@visionengravers.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110621_151641_188123_CD2B16EB X-CRM114-Status: GOOD ( 19.63 ) X-Spam-Score: 1.2 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: tony.luck@intel.com, vapier@gentoo.org, Linux Kernel , mikpe@it.uu.se, ebiederm@xmission.com, ARM Kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 21 Jun 2011 19:17:16 +0000 (UTC) On Tue, Jun 21, 2011 at 12:09:45PM -0700, H Hartley Sweeten wrote: > ARM defines __ARCH_WANT_SYS_RT_SIG(ACTION|SUSPEND) which > produces the following sparse warnings in kernel/signal.c: > > warning: symbol 'sys_rt_sigaction' was not declared. Should it be static? > warning: symbol 'sys_rt_sigsuspend' was not declared. Should it be static? > > Since ARM doesn't include , due to different > calling conventions for some system calls, prototype the functions > in to quiet the noise. NAK. asm/unistd.h is an exported header. Please don't pollute it with kernel internal stuff. Instead, follow the hint in asm-generic and create a new header file to describe syscalls called... asm/syscalls.h. And.. the problem is a lot larger than you mention above: arch/arm/kernel/signal.c:68:16: warning: symbol 'sys_sigsuspend' was not declared. Should it be static? arch/arm/kernel/signal.c:84:1: warning: symbol 'sys_sigaction' was not declared. Should it be static? arch/arm/kernel/signal.c:328:16: warning: symbol 'sys_sigreturn' was not declared. Should it be static? arch/arm/kernel/signal.c:360:16: warning: symbol 'sys_rt_sigreturn' was not declared. Should it be static? arch/arm/kernel/sys_arm.c:34:16: warning: symbol 'sys_fork' was not declared. Should it be static? arch/arm/kernel/sys_arm.c:47:16: warning: symbol 'sys_clone' was not declared. Should it be static? arch/arm/kernel/sys_arm.c:57:16: warning: symbol 'sys_vfork' was not declared. Should it be static? arch/arm/kernel/sys_arm.c:65:16: warning: symbol 'sys_execve' was not declared. Should it be static? arch/arm/kernel/sys_arm.c:129:17: warning: symbol 'sys_arm_fadvise64_64' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:144:17: warning: symbol 'sys_oabi_stat64' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:154:17: warning: symbol 'sys_oabi_lstat64' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:164:17: warning: symbol 'sys_oabi_fstat64' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:174:17: warning: symbol 'sys_oabi_fstatat64' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:196:17: warning: symbol 'sys_oabi_fcntl64' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:249:17: warning: symbol 'sys_oabi_epoll_ctl' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:270:17: warning: symbol 'sys_oabi_epoll_wait' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:304:17: warning: symbol 'sys_oabi_semtimedop' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:343:17: warning: symbol 'sys_oabi_semop' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:349:16: warning: symbol 'sys_oabi_ipc' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:367:17: warning: symbol 'sys_oabi_bind' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:377:17: warning: symbol 'sys_oabi_connect' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:387:17: warning: symbol 'sys_oabi_sendto' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:400:17: warning: symbol 'sys_oabi_sendmsg' was not declared. Should it be static? arch/arm/kernel/sys_oabi-compat.c:426:17: warning: symbol 'sys_oabi_socketcall' was not declared. Should it be static? arch/arm/kernel/traps.c:464:16: warning: symbol 'arm_syscall' was not declared. Should it be static? So you actually need something like this (pasted, so whitespace damaged). I'll pull it out of my low priority queue and queue it up for the next merge window. diff --git a/arch/arm/include/asm/syscalls.h b/arch/arm/include/asm/syscalls.h new file mode 100644 index 0000000..e775746 --- /dev/null +++ b/arch/arm/include/asm/syscalls.h @@ -0,0 +1,60 @@ +#ifndef _ASM_ARM_SYSCALLS_H +#define _ASM_ARM_SYSCALLS_H + +#include +#include + +struct msghdr; +struct sockaddr; + +/* arch/arm/kernel/signal.c */ +asmlinkage int sys_sigsuspend(int, unsigned long, old_sigset_t); +asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, + struct old_sigaction __user *); +asmlinkage int sys_sigreturn(struct pt_regs *); +asmlinkage int sys_rt_sigreturn(struct pt_regs *); + +/* arch/arm/kernel/sys_arm.c */ +asmlinkage int sys_fork(struct pt_regs *); +asmlinkage int sys_clone(unsigned long, unsigned long, int __user *, int, + int __user *, struct pt_regs *); +asmlinkage int sys_vfork(struct pt_regs *); +asmlinkage int sys_execve(const char __user *, + const char __user *const __user *, + const char __user *const __user *, struct pt_regs *); +asmlinkage long sys_arm_fadvise64_64(int, int, loff_t, loff_t); + +/* arch/arm/kernel/sys_oabi-compat.c */ +struct oldabi_stat64; +asmlinkage long sys_oabi_stat64(const char __user *, + struct oldabi_stat64 __user *); +asmlinkage long sys_oabi_lstat64(const char __user *, + struct oldabi_stat64 __user *); +asmlinkage long sys_oabi_fstat64(unsigned long, struct oldabi_stat64 __user *);+asmlinkage long sys_oabi_fstatat64(int, const char __user *, + struct oldabi_stat64 __user *, int); +asmlinkage long sys_oabi_fcntl64(unsigned int, unsigned int, unsigned long); + +struct oabi_epoll_event; +asmlinkage long sys_oabi_epoll_ctl(int, int, int, + struct oabi_epoll_event __user *); +asmlinkage long sys_oabi_epoll_wait(int, struct oabi_epoll_event __user *, + int, int); + +struct oabi_sembuf; +asmlinkage long sys_oabi_semtimedop(int, struct oabi_sembuf __user *, unsigned,+ const struct timespec __user *); +asmlinkage long sys_oabi_semop(int, struct oabi_sembuf __user *, + unsigned); +asmlinkage int sys_oabi_ipc(uint, int, int, int, void __user *, long); +asmlinkage long sys_oabi_bind(int, struct sockaddr __user *, int); +asmlinkage long sys_oabi_connect(int, struct sockaddr __user *, int); +asmlinkage long sys_oabi_sendto(int, void __user *, size_t, unsigned, + struct sockaddr __user *, int); +asmlinkage long sys_oabi_sendmsg(int, struct msghdr __user *, unsigned); +asmlinkage long sys_oabi_socketcall(int, unsigned long __user *); + +/* arch/arm/kernel/traps.c */ +asmlinkage int arm_syscall(int, struct pt_regs *); + +#endif diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 0340224..9498fb5 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 62e7c61..5bda298 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c @@ -28,6 +28,8 @@ #include #include +#include + /* Fork a new task - this creates a new program thread. * This is called indirectly via a small wrapper */ diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index af0aaeb..e71a41c 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c @@ -85,6 +85,8 @@ #include #include +#include + struct oldabi_stat64 { unsigned long long st_dev; unsigned int __pad1; diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index d52eec2..d040421 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include