tree:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git do_fork_removal
head: e9b5f67188cec59c7cdacf196ab87832365a6d67
commit: 2f397dccefb5d1dad0303c04158f1aa3f89073cd [2/4] sparc: share process creation
helpers between sparc and sparc64
config: sparc-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2f397dccefb5d1dad0303c04158f1aa3f89073cd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
> arch/sparc/kernel/process.c:16:17: error: no previous prototype
for 'sparc_fork' [-Werror=missing-prototypes]
16 | asmlinkage long
sparc_fork(struct pt_regs *regs)
| ^~~~~~~~~~
> arch/sparc/kernel/process.c:39:17: error: no previous prototype
for 'sparc_vfork' [-Werror=missing-prototypes]
39 | asmlinkage long
sparc_vfork(struct pt_regs *regs)
| ^~~~~~~~~~~
> arch/sparc/kernel/process.c:64:17: error: no previous prototype
for 'sparc_clone' [-Werror=missing-prototypes]
64 | asmlinkage long
sparc_clone(struct pt_regs *regs)
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/sparc_fork +16 arch/sparc/kernel/process.c
15
16 asmlinkage long sparc_fork(struct pt_regs *regs)
17 {
18 unsigned long orig_i1 = regs->u_regs[UREG_I1];
19 long ret;
20 struct kernel_clone_args args = {
21 .exit_signal = SIGCHLD,
22 /* Reuse the parent's stack for the child. */
23 .stack = regs->u_regs[UREG_FP],
24 };
25
26 ret = _do_fork(&args);
27
28 /* If we get an error and potentially restart the system
29 * call, we're screwed because copy_thread_tls() clobbered
30 * the parent's %o1. So detect that case and restore it
31 * here.
32 */
33 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
34 regs->u_regs[UREG_I1] = orig_i1;
35
36 return ret;
37 }
38
39 asmlinkage long sparc_vfork(struct pt_regs *regs)
40 {
41 unsigned long orig_i1 = regs->u_regs[UREG_I1];
42 long ret;
43
44 struct kernel_clone_args args = {
45 .flags = CLONE_VFORK | CLONE_VM,
46 .exit_signal = SIGCHLD,
47 /* Reuse the parent's stack for the child. */
48 .stack = regs->u_regs[UREG_FP],
49 };
50
51 ret = _do_fork(&args);
52
53 /* If we get an error and potentially restart the system
54 * call, we're screwed because copy_thread_tls() clobbered
55 * the parent's %o1. So detect that case and restore it
56 * here.
57 */
58 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
59 regs->u_regs[UREG_I1] = orig_i1;
60
61 return ret;
62 }
63
64 asmlinkage long sparc_clone(struct pt_regs *regs)
65 {
66 unsigned long orig_i1 = regs->u_regs[UREG_I1];
67 unsigned int flags = lower_32_bits(regs->u_regs[UREG_I0]);
68 long ret;
69
70 struct kernel_clone_args args = {
71 .flags = (flags & ~CSIGNAL),
72 .exit_signal = (flags & CSIGNAL),
73 .tls = regs->u_regs[UREG_I3],
74 };
75
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org