[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190527111152.16324-3-david@redhat.com>
Date: Mon, 27 May 2019 13:11:43 +0200
From: David Hildenbrand <david@...hat.com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, linux-ia64@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
akpm@...ux-foundation.org, Dan Williams <dan.j.williams@...el.com>,
Wei Yang <richard.weiyang@...il.com>,
Igor Mammedov <imammedo@...hat.com>,
David Hildenbrand <david@...hat.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Michal Hocko <mhocko@...e.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Oscar Salvador <osalvador@...e.com>
Subject: [PATCH v3 02/11] s390x/mm: Fail when an altmap is used for arch_add_memory()
ZONE_DEVICE is not yet supported, fail if an altmap is passed, so we
don't forget arch_add_memory()/arch_remove_memory() when unlocking
support.
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Michal Hocko <mhocko@...e.com>
Cc: Mike Rapoport <rppt@...ux.vnet.ibm.com>
Cc: David Hildenbrand <david@...hat.com>
Cc: Vasily Gorbik <gor@...ux.ibm.com>
Cc: Oscar Salvador <osalvador@...e.com>
Suggested-by: Dan Williams <dan.j.williams@...el.com>
Signed-off-by: David Hildenbrand <david@...hat.com>
---
arch/s390/mm/init.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 14d1eae9fe43..d552e330fbcc 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -226,6 +226,9 @@ int arch_add_memory(int nid, u64 start, u64 size,
unsigned long size_pages = PFN_DOWN(size);
int rc;
+ if (WARN_ON_ONCE(restrictions->altmap))
+ return -EINVAL;
+
rc = vmem_add_mapping(start, size);
if (rc)
return rc;
--
2.20.1
Powered by blists - more mailing lists