linux-next: manual merge of the cxl tree with the tip tree

Mark Brown posted 1 patch 1 week, 4 days ago
linux-next: manual merge of the cxl tree with the tip tree
Posted by Mark Brown 1 week, 4 days ago
Hi all,

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

  arch/x86/kernel/e820.c

between commits:

  44f732f3ec827 ("x86/boot/e820: Clean up confusing and self-contradictory verbiage around E820 related resource allocations")
  dc043d6463bf5 ("x86/boot/e820: Standardize e820 table index variable names under 'idx'")

from the tip tree and commit:

  bc62f5b308cbd ("dax/hmem, e820, resource: Defer Soft Reserved insertion until hmem is ready")

from the cxl 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/x86/kernel/e820.c
index 97b54bd0f4822,69c050f50e186..0000000000000
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@@ -1171,20 -1146,23 +1171,23 @@@ __init static unsigned long ram_alignme
  
  #define MAX_RESOURCE_SIZE ((resource_size_t)-1)
  
 -void __init e820__reserve_resources_late(void)
 +__init void e820__reserve_resources_late(void)
  {
 -	int i;
 +	u32 idx;
  	struct resource *res;
  
- 	/*
- 	 * Register device address regions listed in the E820 map,
- 	 * these can be claimed by device drivers later on:
- 	 */
- 	res = e820_res;
- 	for (idx = 0; idx < e820_table->nr_entries; idx++) {
- 		if (!res->parent && res->end)
 -	for (i = 0, res = e820_res; i < e820_table->nr_entries; i++, res++) {
++	for (idx = 0, res = e820_res; idx < e820_table->nr_entries; idx++, res++) {
+ 		/* skip added or uninitialized resources */
+ 		if (res->parent || !res->end)
+ 			continue;
+ 
+ 		/* set aside soft-reserved resources for driver consideration */
+ 		if (res->desc == IORES_DESC_SOFT_RESERVED) {
+ 			insert_resource_expand_to_fit(&soft_reserve_resource, res);
+ 		} else {
+ 			/* publish the rest immediately */
  			insert_resource_expand_to_fit(&iomem_resource, res);
- 		res++;
+ 		}
  	}
  
  	/*
Re: linux-next: manual merge of the cxl tree with the tip tree
Posted by dan.j.williams@intel.com 1 week, 4 days ago
Mark Brown wrote:
> Hi all,
> 
> Today's linux-next merge of the cxl tree got a conflict in:
> 
>   arch/x86/kernel/e820.c
> 
> between commits:
> 
>   44f732f3ec827 ("x86/boot/e820: Clean up confusing and self-contradictory verbiage around E820 related resource allocations")
>   dc043d6463bf5 ("x86/boot/e820: Standardize e820 table index variable names under 'idx'")
> 
> from the tip tree and commit:
> 
>   bc62f5b308cbd ("dax/hmem, e820, resource: Defer Soft Reserved insertion until hmem is ready")
> 
> from the cxl tree.

Thanks for the fixup, Mark! Looks good.

Ingo, you were not copied on the thread where this originated:

http://lore.kernel.org/69443f707b025_1cee10022@dwillia2-mobl4.notmuch

Boris had some involvement on an earlier version of this, but so far no
one from the tip tree has acked this follow-up.

Please let Dave and I know if you have any concerns. We have it in -next
for soaking and testing, but happy to reroute if needed.