[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211207173938.6d619ba6@canb.auug.org.au>
Date: Tue, 7 Dec 2021 17:39:38 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>
Cc: Christoph Hellwig <hch@....de>,
Joao Martins <joao.m.martins@...cle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: linux-next: manual merge of the akpm-current tree with the nvdimm
tree
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
mm/memremap.c
between commit:
b80892ca022e ("memremap: remove support for external pgmap refcounts")
from the nvdimm tree and commit:
30156644eb0d ("mm/memremap: add ZONE_DEVICE support for compound pages")
from the akpm-current 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 mm/memremap.c
index 643965da13a6,d591f3aa8884..000000000000
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@@ -110,8 -136,33 +136,9 @@@ bool pfn_zone_device_reserved(unsigned
}
#define for_each_device_pfn(pfn, map, i) \
- for (pfn = pfn_first(map, i); pfn < pfn_end(map, i); pfn = pfn_next(pfn))
+ for (pfn = pfn_first(map, i); pfn < pfn_end(map, i); \
+ pfn = pfn_next(map, pfn))
-static void dev_pagemap_kill(struct dev_pagemap *pgmap)
-{
- if (pgmap->ops && pgmap->ops->kill)
- pgmap->ops->kill(pgmap);
- else
- percpu_ref_kill(pgmap->ref);
-}
-
-static void dev_pagemap_cleanup(struct dev_pagemap *pgmap)
-{
- if (pgmap->ops && pgmap->ops->cleanup) {
- pgmap->ops->cleanup(pgmap);
- } else {
- wait_for_completion(&pgmap->done);
- percpu_ref_exit(pgmap->ref);
- }
- /*
- * Undo the pgmap ref assignment for the internal case as the
- * caller may re-enable the same pgmap.
- */
- if (pgmap->ref == &pgmap->internal_ref)
- pgmap->ref = NULL;
-}
-
static void pageunmap_range(struct dev_pagemap *pgmap, int range_id)
{
struct range *range = &pgmap->ranges[range_id];
@@@ -271,8 -322,7 +298,7 @@@ static int pagemap_range(struct dev_pag
memmap_init_zone_device(&NODE_DATA(nid)->node_zones[ZONE_DEVICE],
PHYS_PFN(range->start),
PHYS_PFN(range_len(range)), pgmap);
- percpu_ref_get_many(&pgmap->ref,
- pfn_end(pgmap, range_id) - pfn_first(pgmap, range_id));
- percpu_ref_get_many(pgmap->ref, pfn_len(pgmap, range_id));
++ percpu_ref_get_many(&pgmap->ref, pfn_len(pgmap, range_id));
return 0;
err_add_memory:
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists