tree:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
do_fork_removal_sparc
head: 60adc9458a9bf6bcfe8a40f625f8199887a1125a
commit: b45a1967bd8264555d612f6c66eaeb6e0f176e42 [2/3] sparc: share process creation
helpers between sparc and sparc64
config: sparc-defconfig (attached as .config)
compiler: sparc-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 b45a1967bd8264555d612f6c66eaeb6e0f176e42
# 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:18:17: error: conflicting types for
'sparc_fork'
18 | asmlinkage long sparc_fork(struct pt_regs *regs)
| ^~~~~~~~~~
In file included from arch/sparc/kernel/process.c:16:
arch/sparc/kernel/kernel.h:158:16: note: previous declaration of 'sparc_fork' was
here
158 | asmlinkage int sparc_fork(struct pt_regs *regs);
| ^~~~~~~~~~
> arch/sparc/kernel/process.c:41:17: error: conflicting types for
'sparc_vfork'
41 | asmlinkage long sparc_vfork(struct pt_regs *regs)
| ^~~~~~~~~~~
In file included from arch/sparc/kernel/process.c:16:
arch/sparc/kernel/kernel.h:159:16: note: previous declaration of 'sparc_vfork' was
here
159 | asmlinkage int sparc_vfork(struct pt_regs *regs);
| ^~~~~~~~~~~
> arch/sparc/kernel/process.c:66:17: error: conflicting types for
'sparc_clone'
66 | asmlinkage long sparc_clone(struct pt_regs *regs)
| ^~~~~~~~~~~
In file included from arch/sparc/kernel/process.c:16:
arch/sparc/kernel/kernel.h:157:16: note: previous declaration of 'sparc_clone' was
here
157 | asmlinkage int sparc_clone(struct pt_regs *regs);
| ^~~~~~~~~~~
vim +/sparc_fork +18 arch/sparc/kernel/process.c
17
18 asmlinkage long sparc_fork(struct pt_regs *regs)
19 {
20 unsigned long orig_i1 = regs->u_regs[UREG_I1];
21 long ret;
22 struct kernel_clone_args args = {
23 .exit_signal = SIGCHLD,
24 /* Reuse the parent's stack for the child. */
25 .stack = regs->u_regs[UREG_FP],
26 };
27
28 ret = _do_fork(&args);
29
30 /* If we get an error and potentially restart the system
31 * call, we're screwed because copy_thread_tls() clobbered
32 * the parent's %o1. So detect that case and restore it
33 * here.
34 */
35 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
36 regs->u_regs[UREG_I1] = orig_i1;
37
38 return ret;
39 }
40
41 asmlinkage long sparc_vfork(struct pt_regs *regs)
42 {
43 unsigned long orig_i1 = regs->u_regs[UREG_I1];
44 long ret;
45
46 struct kernel_clone_args args = {
47 .flags = CLONE_VFORK | CLONE_VM,
48 .exit_signal = SIGCHLD,
49 /* Reuse the parent's stack for the child. */
50 .stack = regs->u_regs[UREG_FP],
51 };
52
53 ret = _do_fork(&args);
54
55 /* If we get an error and potentially restart the system
56 * call, we're screwed because copy_thread_tls() clobbered
57 * the parent's %o1. So detect that case and restore it
58 * here.
59 */
60 if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
61 regs->u_regs[UREG_I1] = orig_i1;
62
63 return ret;
64 }
65
66 asmlinkage long sparc_clone(struct pt_regs *regs)
67 {
68 unsigned long orig_i1 = regs->u_regs[UREG_I1];
69 unsigned int flags = lower_32_bits(regs->u_regs[UREG_I0]);
70 long ret;
71
72 struct kernel_clone_args args = {
73 .flags = (flags & ~CSIGNAL),
74 .exit_signal = (flags & CSIGNAL),
75 .tls = regs->u_regs[UREG_I3],
76 };
77
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org