linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 41/41] powerpc: Fix build with CONFIG_MEMORY_HOTPLUG on some configs
Date: Tue,  5 Jul 2016 15:07:54 +1000	[thread overview]
Message-ID: <1467695274-14667-41-git-send-email-benh@kernel.crashing.org> (raw)
In-Reply-To: <1467695274-14667-36-git-send-email-benh@kernel.crashing.org>

For memory hotplug to work, the MMU code needs to provide the functions
create_section_mapping() and remove_section_mapping() to respectively
map and unmap portions of the linear mapping.

At the moment only hash64 provides these, so we provide weak stubs that
just error out. This fixes the build with configurations such as 64-bit
BookE with CONFIG_MEMORY_HOTPLUG enabled.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/mm/mem.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 2fd57fa..b0b8f25 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -116,6 +116,16 @@ int memory_add_physaddr_to_nid(u64 start)
 }
 #endif
 
+int __weak create_section_mapping(unsigned long start, unsigned long end)
+{
+	return -ENODEV;
+}
+
+int __weak remove_section_mapping(unsigned long start, unsigned long end)
+{
+	return -ENODEV;
+}
+
 int arch_add_memory(int nid, u64 start, u64 size, bool for_device)
 {
 	struct pglist_data *pgdata;
-- 
2.7.4

  parent reply	other threads:[~2016-07-05  5:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05  5:07 [PATCH 36/41] powerpc: Re-order setup_panic() Benjamin Herrenschmidt
2016-07-05  5:07 ` [PATCH 37/41] powerpc/64: Make a few boot functions __init Benjamin Herrenschmidt
2016-07-21 11:09   ` [37/41] " Michael Ellerman
2016-07-05  5:07 ` [PATCH 38/41] powerpc: Merge 32-bit and 64-bit setup_arch() Benjamin Herrenschmidt
2016-07-05  5:07 ` [PATCH 39/41] powerpc/mm: Fix build of Book3E/64 with 64K pages Benjamin Herrenschmidt
2016-07-08 14:22   ` [39/41] " Michael Ellerman
2016-07-05  5:07 ` [PATCH 40/41] powerpc/pci: Fix build of Book3E/64 without EEH Benjamin Herrenschmidt
2016-07-08 14:22   ` [40/41] " Michael Ellerman
2016-07-05  5:07 ` Benjamin Herrenschmidt [this message]
2016-07-08 14:22   ` [41/41] powerpc: Fix build with CONFIG_MEMORY_HOTPLUG on some configs Michael Ellerman

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=1467695274-14667-41-git-send-email-benh@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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: 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).