From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Andrew Morton <akpm@linux-foundation•org>,
Marek Szyprowski <m.szyprowski@samsung•com>,
Kyungmin Park <kyungmin.park@samsung•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard•com>,
Thierry Reding <treding@nvidia•com>
Subject: linux-next: manual merge of the akpm-current tree with the dma-mapping tree
Date: Tue, 28 Oct 2014 15:24:44 +1100 [thread overview]
Message-ID: <20141028152444.79bd9fe9@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm-current tree got a conflict in
mm/cma.c between commit 16195ddd4ebc ("mm: cma: Ensure that
reservations never cross the low/high mem boundary") from the
dma-mapping tree and commit 2a70e5a78672 ("mm/cma: ake kmemleak ignore
CMA regions") from the akpm-current tree.
I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
diff --cc mm/cma.c
index fde706e1284f,471fcfef043b..000000000000
--- a/mm/cma.c
+++ b/mm/cma.c
@@@ -278,30 -274,20 +278,35 @@@ int __init cma_declare_contiguous(phys_
goto err;
}
} else {
- phys_addr_t addr = memblock_alloc_range(size, alignment, base,
- limit);
+ phys_addr_t addr = 0;
+
+ /*
+ * All pages in the reserved area must come from the same zone.
+ * If the requested region crosses the low/high memory boundary,
+ * try allocating from high memory first and fall back to low
+ * memory in case of failure.
+ */
+ if (base < highmem_start && limit > highmem_start) {
+ addr = memblock_alloc_range(size, alignment,
+ highmem_start, limit);
+ limit = highmem_start;
+ }
+
if (!addr) {
- ret = -ENOMEM;
- goto err;
- } else {
- /*
- * kmemleak scans/reads tracked objects for pointers to
- * other objects but this address isn't mapped and
- * accessible
- */
- kmemleak_ignore(phys_to_virt(addr));
- base = addr;
+ addr = memblock_alloc_range(size, alignment, base,
+ limit);
+ if (!addr) {
+ ret = -ENOMEM;
+ goto err;
+ }
}
-
++ /*
++ * kmemleak scans/reads tracked objects for pointers to
++ * other objects but this address isn't mapped and
++ * accessible
++ */
++ kmemleak_ignore(phys_to_virt(addr));
+ base = addr;
}
ret = cma_init_reserved_mem(base, size, order_per_bit, res_cma);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2014-10-28 4:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 4:24 Stephen Rothwell [this message]
2014-10-28 6:29 ` linux-next: manual merge of the akpm-current tree with the dma-mapping tree Andrew Morton
2014-10-28 6:54 ` Marek Szyprowski
2014-10-28 20:26 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2018-05-10 6:39 Stephen Rothwell
2018-09-10 4:06 Stephen Rothwell
2019-06-03 5:01 Stephen Rothwell
2019-06-17 8:14 Stephen Rothwell
2019-06-17 8:15 ` Christoph Hellwig
2019-08-21 7:28 Stephen Rothwell
2019-09-16 2:46 Mark Brown
2020-09-16 4:11 Stephen Rothwell
2020-09-16 4:22 ` Song Bao Hua (Barry Song)
2020-09-16 4:35 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141028152444.79bd9fe9@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=akpm@linux-foundation$(echo .)org \
--cc=kyungmin.park@samsung$(echo .)com \
--cc=laurent.pinchart+renesas@ideasonboard$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=m.szyprowski@samsung$(echo .)com \
--cc=treding@nvidia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox