Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: manual merge of the xtensa tree with the sh tree
@ 2020-07-28  0:23 Stephen Rothwell
  0 siblings, 0 replies; only message 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] only message in thread

only message in thread, back to index

Thread overview: (only message) (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

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git