linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the xtensa tree with the sh tree
@ 2020-07-28  0:23 Stephen Rothwell
  2020-08-07  0:42 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2020-07-28  0:23 UTC (permalink / raw)
  To: Max Filippov, Rich Felker
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Michael Karcher

[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]

Hi all,

Today's linux-next merge of the xtensa tree got a conflict in:

  tools/testing/selftests/seccomp/seccomp_bpf.c

between commit:

  469023465e79 ("sh: Add SECCOMP_FILTER")

from the sh tree and commit:

  deccfc9ce639 ("selftests/seccomp: add xtensa support")

from the xtensa tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/seccomp/seccomp_bpf.c
index 06d994a34997,1b445c2e7fbe..000000000000
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@@ -124,8 -122,8 +124,10 @@@ struct seccomp_data 
  #  define __NR_seccomp 358
  # elif defined(__s390__)
  #  define __NR_seccomp 348
 +# elif defined(__sh__)
 +#  define __NR_seccomp 372
+ # elif defined(__xtensa__)
+ #  define __NR_seccomp 337
  # else
  #  warning "seccomp syscall number unknown for this architecture"
  #  define __NR_seccomp 0xffff
@@@ -1634,10 -1624,14 +1636,18 @@@ TEST_F(TRACE_poke, getpid_runs_normally
  # define SYSCALL_SYSCALL_NUM regs[4]
  # define SYSCALL_RET	regs[2]
  # define SYSCALL_NUM_RET_SHARE_REG
 +#elif defined(__sh__)
 +# define ARCH_REGS	struct pt_regs
 +# define SYSCALL_NUM	gpr[3]
 +# define SYSCALL_RET	gpr[0]
+ #elif defined(__xtensa__)
+ # define ARCH_REGS	struct user_pt_regs
+ # define SYSCALL_NUM	syscall
+ /*
+  * On xtensa syscall return value is in the register
+  * a2 of the current window which is not fixed.
+  */
+ #define SYSCALL_RET(reg) a[(reg).windowbase * 4 + 2]
  #else
  # error "Do not know how to find your architecture's registers and syscalls"
  #endif
@@@ -1710,7 -1704,7 +1720,7 @@@ void change_syscall(struct __test_metad
  
  #if defined(__x86_64__) || defined(__i386__) || defined(__powerpc__) || \
  	defined(__s390__) || defined(__hppa__) || defined(__riscv) || \
- 	defined(__csky__) || defined(__sh__)
 -	defined(__xtensa__)
++	defined(__csky__) || defined(__sh__) || defined(__xtensa__)
  	{
  		regs.SYSCALL_NUM = syscall;
  	}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-next: manual merge of the xtensa tree with the sh tree
  2020-07-28  0:23 linux-next: manual merge of the xtensa tree with the sh tree Stephen Rothwell
@ 2020-08-07  0:42 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2020-08-07  0:42 UTC (permalink / raw)
  To: Max Filippov, Rich Felker
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Michael Karcher

[-- Attachment #1: Type: text/plain, Size: 2661 bytes --]

Hi all,

On Tue, 28 Jul 2020 10:23:30 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the xtensa tree got a conflict in:
> 
>   tools/testing/selftests/seccomp/seccomp_bpf.c
> 
> between commit:
> 
>   469023465e79 ("sh: Add SECCOMP_FILTER")
> 
> from the sh tree and commit:
> 
>   deccfc9ce639 ("selftests/seccomp: add xtensa support")
> 
> from the xtensa tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc tools/testing/selftests/seccomp/seccomp_bpf.c
> index 06d994a34997,1b445c2e7fbe..000000000000
> --- a/tools/testing/selftests/seccomp/seccomp_bpf.c
> +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
> @@@ -124,8 -122,8 +124,10 @@@ struct seccomp_data 
>   #  define __NR_seccomp 358
>   # elif defined(__s390__)
>   #  define __NR_seccomp 348
>  +# elif defined(__sh__)
>  +#  define __NR_seccomp 372
> + # elif defined(__xtensa__)
> + #  define __NR_seccomp 337
>   # else
>   #  warning "seccomp syscall number unknown for this architecture"
>   #  define __NR_seccomp 0xffff
> @@@ -1634,10 -1624,14 +1636,18 @@@ TEST_F(TRACE_poke, getpid_runs_normally
>   # define SYSCALL_SYSCALL_NUM regs[4]
>   # define SYSCALL_RET	regs[2]
>   # define SYSCALL_NUM_RET_SHARE_REG
>  +#elif defined(__sh__)
>  +# define ARCH_REGS	struct pt_regs
>  +# define SYSCALL_NUM	gpr[3]
>  +# define SYSCALL_RET	gpr[0]
> + #elif defined(__xtensa__)
> + # define ARCH_REGS	struct user_pt_regs
> + # define SYSCALL_NUM	syscall
> + /*
> +  * On xtensa syscall return value is in the register
> +  * a2 of the current window which is not fixed.
> +  */
> + #define SYSCALL_RET(reg) a[(reg).windowbase * 4 + 2]
>   #else
>   # error "Do not know how to find your architecture's registers and syscalls"
>   #endif
> @@@ -1710,7 -1704,7 +1720,7 @@@ void change_syscall(struct __test_metad
>   
>   #if defined(__x86_64__) || defined(__i386__) || defined(__powerpc__) || \
>   	defined(__s390__) || defined(__hppa__) || defined(__riscv) || \
> - 	defined(__csky__) || defined(__sh__)
>  -	defined(__xtensa__)
> ++	defined(__csky__) || defined(__sh__) || defined(__xtensa__)
>   	{
>   		regs.SYSCALL_NUM = syscall;
>   	}

This is now a conflict between the sh tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-07  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  0:23 linux-next: manual merge of the xtensa tree with the sh tree Stephen Rothwell
2020-08-07  0:42 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).