| 1 |
From 604ddad038bfa0ae6f447c2ff29fcd430cec8181 Mon Sep 17 00:00:00 2001 |
| 2 |
Message-Id: <604ddad038bfa0ae6f447c2ff29fcd430cec8181.1676539827.git.osandov@osandov.com> |
| 3 |
From: Heiko Carstens <[email protected]> |
| 4 |
Date: Mon, 13 Feb 2017 14:58:36 +0100 |
| 5 |
Subject: [PATCH] s390/mm: make memory_block_size_bytes available for |
| 6 |
!MEMORY_HOTPLUG |
| 7 |
|
| 8 |
Fix this compile error for !MEMORY_HOTPLUG && NUMA: |
| 9 |
arch/s390/built-in.o: In function `emu_setup_size_adjust': |
| 10 |
arch/s390/numa/mode_emu.c:477: undefined reference to `memory_block_size_bytes' |
| 11 |
|
| 12 |
Signed-off-by: Heiko Carstens <[email protected]> |
| 13 |
Signed-off-by: Martin Schwidefsky <[email protected]> |
| 14 |
--- |
| 15 |
arch/s390/mm/init.c | 18 +++++++++--------- |
| 16 |
1 file changed, 9 insertions(+), 9 deletions(-) |
| 17 |
|
| 18 |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c |
| 19 |
index ba0c8d18e10d4..ee5066718b212 100644 |
| 20 |
--- a/arch/s390/mm/init.c |
| 21 |
+++ b/arch/s390/mm/init.c |
| 22 |
@@ -151,6 +151,15 @@ void __init free_initrd_mem(unsigned long start, unsigned long end) |
| 23 |
} |
| 24 |
#endif |
| 25 |
|
| 26 |
+unsigned long memory_block_size_bytes(void) |
| 27 |
+{ |
| 28 |
+ /* |
| 29 |
+ * Make sure the memory block size is always greater |
| 30 |
+ * or equal than the memory increment size. |
| 31 |
+ */ |
| 32 |
+ return max_t(unsigned long, MIN_MEMORY_BLOCK_SIZE, sclp.rzm); |
| 33 |
+} |
| 34 |
+ |
| 35 |
#ifdef CONFIG_MEMORY_HOTPLUG |
| 36 |
int arch_add_memory(int nid, u64 start, u64 size, bool for_device) |
| 37 |
{ |
| 38 |
@@ -194,15 +203,6 @@ int arch_add_memory(int nid, u64 start, u64 size, bool for_device) |
| 39 |
return rc; |
| 40 |
} |
| 41 |
|
| 42 |
-unsigned long memory_block_size_bytes(void) |
| 43 |
-{ |
| 44 |
- /* |
| 45 |
- * Make sure the memory block size is always greater |
| 46 |
- * or equal than the memory increment size. |
| 47 |
- */ |
| 48 |
- return max_t(unsigned long, MIN_MEMORY_BLOCK_SIZE, sclp.rzm); |
| 49 |
-} |
| 50 |
- |
| 51 |
#ifdef CONFIG_MEMORY_HOTREMOVE |
| 52 |
int arch_remove_memory(u64 start, u64 size) |
| 53 |
{ |
| 54 |
-- |
| 55 |
2.30.2 |
| 56 |
|