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

Stephen Rothwell posted 1 patch 3 months ago
linux-next: manual merge of the s390 tree with the mm-unstable tree
Posted by Stephen Rothwell 3 months ago
Hi all,

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

  include/linux/memory.h

between commit:

  074be77d684a ("mm: convert memory block states (MEM_*) macros to enum")

from the mm-unstable tree and commit:

  300709fbefd1 ("mm/memory_hotplug: Remove MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers")

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 include/linux/memory.h
index ca3eb1db6cc8,ba1515160894..000000000000
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@@ -64,21 -64,9 +64,19 @@@ struct memory_group 
  	};
  };
  
 +enum memory_block_state {
 +	/* These states are exposed to userspace as text strings in sysfs */
 +	MEM_ONLINE,		/* exposed to userspace */
 +	MEM_GOING_OFFLINE,	/* exposed to userspace */
 +	MEM_OFFLINE,		/* exposed to userspace */
 +	MEM_GOING_ONLINE,
 +	MEM_CANCEL_ONLINE,
 +	MEM_CANCEL_OFFLINE,
- 	MEM_PREPARE_ONLINE,
- 	MEM_FINISH_OFFLINE,
 +};
 +
  struct memory_block {
  	unsigned long start_section_nr;
 -	unsigned long state;		/* serialized by the dev->lock */
 +	enum memory_block_state state;	/* serialized by the dev->lock */
  	int online_type;		/* for passing data to online routine */
  	int nid;			/* NID for this memory block */
  	/*
@@@ -101,14 -89,15 +99,7 @@@ int arch_get_memory_phys_device(unsigne
  unsigned long memory_block_size_bytes(void);
  int set_memory_block_size_order(unsigned int order);
  
 -/* These states are exposed to userspace as text strings in sysfs */
 -#define	MEM_ONLINE		(1<<0) /* exposed to userspace */
 -#define	MEM_GOING_OFFLINE	(1<<1) /* exposed to userspace */
 -#define	MEM_OFFLINE		(1<<2) /* exposed to userspace */
 -#define	MEM_GOING_ONLINE	(1<<3)
 -#define	MEM_CANCEL_ONLINE	(1<<4)
 -#define	MEM_CANCEL_OFFLINE	(1<<5)
 -
  struct memory_notify {
- 	/*
- 	 * The altmap_start_pfn and altmap_nr_pages fields are designated for
- 	 * specifying the altmap range and are exclusively intended for use in
- 	 * MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers.
- 	 */
- 	unsigned long altmap_start_pfn;
- 	unsigned long altmap_nr_pages;
  	unsigned long start_pfn;
  	unsigned long nr_pages;
  };
Re: linux-next: manual merge of the s390 tree with the mm-unstable tree
Posted by Stephen Rothwell 2 months ago
Hi all,

On Mon, 3 Nov 2025 10:07:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the s390 tree got a conflict in:
> 
>   include/linux/memory.h
> 
> between commit:
> 
>   074be77d684a ("mm: convert memory block states (MEM_*) macros to enum")
> 
> from the mm-unstable tree and commit:
> 
>   300709fbefd1 ("mm/memory_hotplug: Remove MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers")
> 
> 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 include/linux/memory.h
> index ca3eb1db6cc8,ba1515160894..000000000000
> --- a/include/linux/memory.h
> +++ b/include/linux/memory.h
> @@@ -64,21 -64,9 +64,19 @@@ struct memory_group 
>   	};
>   };
>   
>  +enum memory_block_state {
>  +	/* These states are exposed to userspace as text strings in sysfs */
>  +	MEM_ONLINE,		/* exposed to userspace */
>  +	MEM_GOING_OFFLINE,	/* exposed to userspace */
>  +	MEM_OFFLINE,		/* exposed to userspace */
>  +	MEM_GOING_ONLINE,
>  +	MEM_CANCEL_ONLINE,
>  +	MEM_CANCEL_OFFLINE,
> - 	MEM_PREPARE_ONLINE,
> - 	MEM_FINISH_OFFLINE,
>  +};
>  +
>   struct memory_block {
>   	unsigned long start_section_nr;
>  -	unsigned long state;		/* serialized by the dev->lock */
>  +	enum memory_block_state state;	/* serialized by the dev->lock */
>   	int online_type;		/* for passing data to online routine */
>   	int nid;			/* NID for this memory block */
>   	/*
> @@@ -101,14 -89,15 +99,7 @@@ int arch_get_memory_phys_device(unsigne
>   unsigned long memory_block_size_bytes(void);
>   int set_memory_block_size_order(unsigned int order);
>   
>  -/* These states are exposed to userspace as text strings in sysfs */
>  -#define	MEM_ONLINE		(1<<0) /* exposed to userspace */
>  -#define	MEM_GOING_OFFLINE	(1<<1) /* exposed to userspace */
>  -#define	MEM_OFFLINE		(1<<2) /* exposed to userspace */
>  -#define	MEM_GOING_ONLINE	(1<<3)
>  -#define	MEM_CANCEL_ONLINE	(1<<4)
>  -#define	MEM_CANCEL_OFFLINE	(1<<5)
>  -
>   struct memory_notify {
> - 	/*
> - 	 * The altmap_start_pfn and altmap_nr_pages fields are designated for
> - 	 * specifying the altmap range and are exclusively intended for use in
> - 	 * MEM_PREPARE_ONLINE/MEM_FINISH_OFFLINE notifiers.
> - 	 */
> - 	unsigned long altmap_start_pfn;
> - 	unsigned long altmap_nr_pages;
>   	unsigned long start_pfn;
>   	unsigned long nr_pages;
>   };

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

-- 
Cheers,
Stephen Rothwell