From: Fabian Frederick <fabf@skynet.be> To: Dan Williams <dan.j.williams@intel.com> Cc: fabf@skynet.be, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org Subject: [PATCH 7/8 linux-next] mm: warn about possible alignment problem Date: Fri, 2 Dec 2016 20:22:07 +0100 [thread overview] Message-ID: <1480706527-21274-1-git-send-email-fabf@skynet.be> (raw) Commit 5f29a77cd957 ("mm: fix mixed zone detection in devm_memremap_pages") Aligned resource limits before region_intersects() which breaks the following with false assertions on kernel command line: memmap=4M!700M "devm_memremap_pages attempted on mixed region [ mem 0x2bc00000-0x2bfffff flags 0x200]" Memory regions 0x100000-0x2bbfffff: usable 0x2bc000000-0x2bbfffff: persistent 0x2c0000000-0x2bffffff: usable resource start: 0x2bc00000 align start: 0x28000000 resource size: 0x3fffffff align size: 0x80000000 SECTION_SIZE: 0x8000000 Now we need aligned memmap declarations based on 128M in this case eg memmap=128!640M Signed-off-by: Fabian Frederick <fabf@skynet.be> --- kernel/memremap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index b501e39..1bb5eec 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -296,8 +296,8 @@ void *devm_memremap_pages(struct device *dev, struct resource *res, IORESOURCE_SYSTEM_RAM, IORES_DESC_NONE); if (is_ram == REGION_MIXED) { - WARN_ONCE(1, "%s attempted on mixed region %pr\n", - __func__, res); + WARN_ONCE(1, "%s attempted on mixed region %pr or arguments not aligned to section size: %#lx\n", + __func__, res, SECTION_SIZE); return ERR_PTR(-ENXIO); } -- 2.7.4 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: Fabian Frederick <fabf@skynet.be> To: Dan Williams <dan.j.williams@intel.com> Cc: linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org, fabf@skynet.be Subject: [PATCH 7/8 linux-next] mm: warn about possible alignment problem Date: Fri, 2 Dec 2016 20:22:07 +0100 [thread overview] Message-ID: <1480706527-21274-1-git-send-email-fabf@skynet.be> (raw) Commit 5f29a77cd957 ("mm: fix mixed zone detection in devm_memremap_pages") Aligned resource limits before region_intersects() which breaks the following with false assertions on kernel command line: memmap=4M!700M "devm_memremap_pages attempted on mixed region [ mem 0x2bc00000-0x2bfffff flags 0x200]" Memory regions 0x100000-0x2bbfffff: usable 0x2bc000000-0x2bbfffff: persistent 0x2c0000000-0x2bffffff: usable resource start: 0x2bc00000 align start: 0x28000000 resource size: 0x3fffffff align size: 0x80000000 SECTION_SIZE: 0x8000000 Now we need aligned memmap declarations based on 128M in this case eg memmap=128!640M Signed-off-by: Fabian Frederick <fabf@skynet.be> --- kernel/memremap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index b501e39..1bb5eec 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -296,8 +296,8 @@ void *devm_memremap_pages(struct device *dev, struct resource *res, IORESOURCE_SYSTEM_RAM, IORES_DESC_NONE); if (is_ram == REGION_MIXED) { - WARN_ONCE(1, "%s attempted on mixed region %pr\n", - __func__, res); + WARN_ONCE(1, "%s attempted on mixed region %pr or arguments not aligned to section size: %#lx\n", + __func__, res, SECTION_SIZE); return ERR_PTR(-ENXIO); } -- 2.7.4
next reply other threads:[~2016-12-02 19:22 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-02 19:22 Fabian Frederick [this message] 2016-12-02 19:22 ` [PATCH 7/8 linux-next] mm: warn about possible alignment problem Fabian Frederick 2016-12-02 19:52 ` Dan Williams 2016-12-02 19:52 ` Dan Williams
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=1480706527-21274-1-git-send-email-fabf@skynet.be \ --to=fabf@skynet.be \ --cc=dan.j.williams@intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nvdimm@lists.01.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.