linux-next: manual merge of the s390 tree with the mm-stable tree

Stephen Rothwell posted 1 patch 1 week, 2 days ago
linux-next: manual merge of the s390 tree with the mm-stable tree
Posted by Stephen Rothwell 1 week, 2 days ago
Hi all,

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

  arch/s390/mm/pageattr.c

between commit:

  0c6378a71574 ("arch: introduce set_direct_map_valid_noflush()")

from the mm-stable tree and commit:

  2835f8bf5530 ("s390/pageattr: Implement missing kernel_page_present()")

from the s390 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 arch/s390/mm/pageattr.c
index 4c7ee74aa130,4a0f422cfeb6..000000000000
--- a/arch/s390/mm/pageattr.c
+++ b/arch/s390/mm/pageattr.c
@@@ -406,17 -407,21 +407,33 @@@ int set_direct_map_default_noflush(stru
  	return __set_memory((unsigned long)page_to_virt(page), 1, SET_MEMORY_DEF);
  }
  
 +int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
 +{
 +	unsigned long flags;
 +
 +	if (valid)
 +		flags = SET_MEMORY_DEF;
 +	else
 +		flags = SET_MEMORY_INV;
 +
 +	return __set_memory((unsigned long)page_to_virt(page), nr, flags);
 +}
++
+ bool kernel_page_present(struct page *page)
+ {
+ 	unsigned long addr;
+ 	unsigned int cc;
+ 
+ 	addr = (unsigned long)page_address(page);
+ 	asm volatile(
+ 		"	lra	%[addr],0(%[addr])\n"
+ 		CC_IPM(cc)
+ 		: CC_OUT(cc, cc), [addr] "+a" (addr)
+ 		:
+ 		: CC_CLOBBER);
+ 	return CC_TRANSFORM(cc) == 0;
+ }
+ 
  #if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
  
  static void ipte_range(pte_t *pte, unsigned long address, int nr)
Re: linux-next: manual merge of the s390 tree with the mm-stable tree
Posted by Stephen Rothwell 3 days ago
Hi all,

On Thu, 14 Nov 2024 10:16:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the s390 tree got a conflict in:
> 
>   arch/s390/mm/pageattr.c
> 
> between commit:
> 
>   0c6378a71574 ("arch: introduce set_direct_map_valid_noflush()")
> 
> from the mm-stable tree and commit:
> 
>   2835f8bf5530 ("s390/pageattr: Implement missing kernel_page_present()")
> 
> from the s390 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 arch/s390/mm/pageattr.c
> index 4c7ee74aa130,4a0f422cfeb6..000000000000
> --- a/arch/s390/mm/pageattr.c
> +++ b/arch/s390/mm/pageattr.c
> @@@ -406,17 -407,21 +407,33 @@@ int set_direct_map_default_noflush(stru
>   	return __set_memory((unsigned long)page_to_virt(page), 1, SET_MEMORY_DEF);
>   }
>   
>  +int set_direct_map_valid_noflush(struct page *page, unsigned nr, bool valid)
>  +{
>  +	unsigned long flags;
>  +
>  +	if (valid)
>  +		flags = SET_MEMORY_DEF;
>  +	else
>  +		flags = SET_MEMORY_INV;
>  +
>  +	return __set_memory((unsigned long)page_to_virt(page), nr, flags);
>  +}
> ++
> + bool kernel_page_present(struct page *page)
> + {
> + 	unsigned long addr;
> + 	unsigned int cc;
> + 
> + 	addr = (unsigned long)page_address(page);
> + 	asm volatile(
> + 		"	lra	%[addr],0(%[addr])\n"
> + 		CC_IPM(cc)
> + 		: CC_OUT(cc, cc), [addr] "+a" (addr)
> + 		:
> + 		: CC_CLOBBER);
> + 	return CC_TRANSFORM(cc) == 0;
> + }
> + 
>   #if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
>   
>   static void ipte_range(pte_t *pte, unsigned long address, int nr)

This is now a conflict between the mm-stable tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell