linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Anju T Sudhakar <anju@linux.vnet.ibm.com>,
	Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
	Reza Arbab <arbab@linux.vnet.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>
Subject: [RFC PATCH 1/4] powerpc/64s/radix: Fix memory hotplug section page table creation
Date: Tue, 23 Jul 2019 03:46:57 +1000	[thread overview]
Message-ID: <20190722174700.11483-2-npiggin@gmail.com> (raw)
In-Reply-To: <20190722174700.11483-1-npiggin@gmail.com>

create_physical_mapping expects physical addresses, but creating and
splitting these mappings after boot is supplying virtual (effective)
addresses. This can be hit by booting with limited memory then probing
new physical memory sections.

Cc: Reza Arbab <arbab@linux.vnet.ibm.com>
Fixes: 6cc27341b21a8 ("powerpc/mm: add radix__create_section_mapping()")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index b4ca9e95e678..c5cc16ab1954 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -902,7 +902,7 @@ int __meminit radix__create_section_mapping(unsigned long start, unsigned long e
 		return -1;
 	}
 
-	return create_physical_mapping(start, end, nid);
+	return create_physical_mapping(__pa(start), __pa(end), nid);
 }
 
 int __meminit radix__remove_section_mapping(unsigned long start, unsigned long end)
-- 
2.20.1


  reply	other threads:[~2019-07-22 17:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 17:46 [RFC PATCH 0/4] assorted virtual / physical address fixes Nicholas Piggin
2019-07-22 17:46 ` Nicholas Piggin [this message]
2019-07-23 10:52   ` [RFC PATCH 1/4] powerpc/64s/radix: Fix memory hotplug section page table creation Michael Ellerman
2019-07-24  1:18     ` Nicholas Piggin
2019-07-22 17:46 ` [RFC PATCH 2/4] powerpc/64s/radix: Fix memory hot-unplug page table split Nicholas Piggin
2019-07-22 17:46 ` [RFC PATCH 3/4] powerpc/perf: fix imc allocation failure Nicholas Piggin
2019-07-24  5:25   ` Anju T Sudhakar
2019-07-22 17:47 ` [RFC PATCH 4/4] powerpc/64: Add VIRTUAL_BUG_ON checks for __va and __pa addresses Nicholas Piggin

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=20190722174700.11483-2-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=anju@linux.vnet.ibm.com \
    --cc=arbab@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.vnet.ibm.com \
    /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: link
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;
as well as URLs for NNTP newsgroup(s).