Linux-Next Archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the risc-v tree with the powerpc tree
@ 2024-05-07  0:04 Stephen Rothwell
  2024-05-07  3:55 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2024-05-07  0:04 UTC (permalink / raw
  To: Palmer Dabbelt, Paul Walmsley, Michael Ellerman
  Cc: Benjamin Gray, Charlie Jenkins, Palmer Dabbelt,
	Linux Kernel Mailing List, Linux Next Mailing List, PowerPC

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

Hi all,

Today's linux-next merge of the risc-v tree got conflicts in:

  include/uapi/linux/prctl.h
  kernel/sys.c

between commit:

  628d701f2de5 ("powerpc/dexcr: Add DEXCR prctl interface")

from the powerpc tree and commit:

  6b9391b581fd ("riscv: Include riscv_set_icache_flush_ctx prctl")

from the risc-v 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 include/uapi/linux/prctl.h
index 713d28788df7,524d546d697b..000000000000
--- a/include/uapi/linux/prctl.h
+++ b/include/uapi/linux/prctl.h
@@@ -306,20 -306,10 +306,26 @@@ struct prctl_mm_map 
  # define PR_RISCV_V_VSTATE_CTRL_NEXT_MASK	0xc
  # define PR_RISCV_V_VSTATE_CTRL_MASK		0x1f
  
+ #define PR_RISCV_SET_ICACHE_FLUSH_CTX	71
+ # define PR_RISCV_CTX_SW_FENCEI_ON	0
+ # define PR_RISCV_CTX_SW_FENCEI_OFF	1
+ # define PR_RISCV_SCOPE_PER_PROCESS	0
+ # define PR_RISCV_SCOPE_PER_THREAD	1
+ 
 +/* PowerPC Dynamic Execution Control Register (DEXCR) controls */
 +#define PR_PPC_GET_DEXCR		72
 +#define PR_PPC_SET_DEXCR		73
 +/* DEXCR aspect to act on */
 +# define PR_PPC_DEXCR_SBHE		0 /* Speculative branch hint enable */
 +# define PR_PPC_DEXCR_IBRTPD		1 /* Indirect branch recurrent target prediction disable */
 +# define PR_PPC_DEXCR_SRAPD		2 /* Subroutine return address prediction disable */
 +# define PR_PPC_DEXCR_NPHIE		3 /* Non-privileged hash instruction enable */
 +/* Action to apply / return */
 +# define PR_PPC_DEXCR_CTRL_EDITABLE	 0x1 /* Aspect can be modified with PR_PPC_SET_DEXCR */
 +# define PR_PPC_DEXCR_CTRL_SET		 0x2 /* Set the aspect for this process */
 +# define PR_PPC_DEXCR_CTRL_CLEAR	 0x4 /* Clear the aspect for this process */
 +# define PR_PPC_DEXCR_CTRL_SET_ONEXEC	 0x8 /* Set the aspect on exec */
 +# define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC	0x10 /* Clear the aspect on exec */
 +# define PR_PPC_DEXCR_CTRL_MASK		0x1f
 +
  #endif /* _LINUX_PRCTL_H */
diff --cc kernel/sys.c
index f9c95410278c,1b7bda0722ca..000000000000
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@@ -146,12 -146,9 +146,15 @@@
  #ifndef RISCV_V_GET_CONTROL
  # define RISCV_V_GET_CONTROL()		(-EINVAL)
  #endif
+ #ifndef RISCV_SET_ICACHE_FLUSH_CTX
+ # define RISCV_SET_ICACHE_FLUSH_CTX(a, b)	(-EINVAL)
+ #endif
 +#ifndef PPC_GET_DEXCR_ASPECT
 +# define PPC_GET_DEXCR_ASPECT(a, b)	(-EINVAL)
 +#endif
 +#ifndef PPC_SET_DEXCR_ASPECT
 +# define PPC_SET_DEXCR_ASPECT(a, b, c)	(-EINVAL)
 +#endif
  
  /*
   * this is where the system-wide overflow UID and GID are defined, for

[-- 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 risc-v tree with the powerpc tree
  2024-05-07  0:04 linux-next: manual merge of the risc-v tree with the powerpc tree Stephen Rothwell
@ 2024-05-07  3:55 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2024-05-07  3:55 UTC (permalink / raw
  To: Stephen Rothwell, Palmer Dabbelt, Paul Walmsley
  Cc: Benjamin Gray, Charlie Jenkins, Palmer Dabbelt,
	Linux Kernel Mailing List, Linux Next Mailing List, PowerPC

Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi all,
>
> Today's linux-next merge of the risc-v tree got conflicts in:
>
>   include/uapi/linux/prctl.h
>   kernel/sys.c
>
> between commit:
>
>   628d701f2de5 ("powerpc/dexcr: Add DEXCR prctl interface")
>
> from the powerpc tree and commit:
>
>   6b9391b581fd ("riscv: Include riscv_set_icache_flush_ctx prctl")
>
> from the risc-v 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.

Thanks.

As you would have seen, I accounted for 71 being taken by
PR_RISCV_SET_ICACHE_FLUSH_CTX in my tree, so this is just a textual
conflict.

So should be nothing to do other than mention it to Linus.

cheers

> diff --cc include/uapi/linux/prctl.h
> index 713d28788df7,524d546d697b..000000000000
> --- a/include/uapi/linux/prctl.h
> +++ b/include/uapi/linux/prctl.h
> @@@ -306,20 -306,10 +306,26 @@@ struct prctl_mm_map 
>   # define PR_RISCV_V_VSTATE_CTRL_NEXT_MASK	0xc
>   # define PR_RISCV_V_VSTATE_CTRL_MASK		0x1f
>   
> + #define PR_RISCV_SET_ICACHE_FLUSH_CTX	71
> + # define PR_RISCV_CTX_SW_FENCEI_ON	0
> + # define PR_RISCV_CTX_SW_FENCEI_OFF	1
> + # define PR_RISCV_SCOPE_PER_PROCESS	0
> + # define PR_RISCV_SCOPE_PER_THREAD	1
> + 
>  +/* PowerPC Dynamic Execution Control Register (DEXCR) controls */
>  +#define PR_PPC_GET_DEXCR		72
>  +#define PR_PPC_SET_DEXCR		73
>  +/* DEXCR aspect to act on */
>  +# define PR_PPC_DEXCR_SBHE		0 /* Speculative branch hint enable */
>  +# define PR_PPC_DEXCR_IBRTPD		1 /* Indirect branch recurrent target prediction disable */
>  +# define PR_PPC_DEXCR_SRAPD		2 /* Subroutine return address prediction disable */
>  +# define PR_PPC_DEXCR_NPHIE		3 /* Non-privileged hash instruction enable */
>  +/* Action to apply / return */
>  +# define PR_PPC_DEXCR_CTRL_EDITABLE	 0x1 /* Aspect can be modified with PR_PPC_SET_DEXCR */
>  +# define PR_PPC_DEXCR_CTRL_SET		 0x2 /* Set the aspect for this process */
>  +# define PR_PPC_DEXCR_CTRL_CLEAR	 0x4 /* Clear the aspect for this process */
>  +# define PR_PPC_DEXCR_CTRL_SET_ONEXEC	 0x8 /* Set the aspect on exec */
>  +# define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC	0x10 /* Clear the aspect on exec */
>  +# define PR_PPC_DEXCR_CTRL_MASK		0x1f
>  +
>   #endif /* _LINUX_PRCTL_H */
> diff --cc kernel/sys.c
> index f9c95410278c,1b7bda0722ca..000000000000
> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@@ -146,12 -146,9 +146,15 @@@
>   #ifndef RISCV_V_GET_CONTROL
>   # define RISCV_V_GET_CONTROL()		(-EINVAL)
>   #endif
> + #ifndef RISCV_SET_ICACHE_FLUSH_CTX
> + # define RISCV_SET_ICACHE_FLUSH_CTX(a, b)	(-EINVAL)
> + #endif
>  +#ifndef PPC_GET_DEXCR_ASPECT
>  +# define PPC_GET_DEXCR_ASPECT(a, b)	(-EINVAL)
>  +#endif
>  +#ifndef PPC_SET_DEXCR_ASPECT
>  +# define PPC_SET_DEXCR_ASPECT(a, b, c)	(-EINVAL)
>  +#endif
>   
>   /*
>    * this is where the system-wide overflow UID and GID are defined, for

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

end of thread, other threads:[~2024-05-07  3:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07  0:04 linux-next: manual merge of the risc-v tree with the powerpc tree Stephen Rothwell
2024-05-07  3:55 ` Michael Ellerman

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 read-only IMAP folder(s) and NNTP newsgroup(s).