From 6b70a92080be508e16b2f53efba39e5155eff809 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 2 Nov 2012 12:56:43 +0100 Subject: s390/memory hotplug: use pfmf instruction to initialize storage keys Move and rename init_storage_keys() to pageattr.c, so it can also be used from the sclp memory hotplug code in order to initialize storage keys. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- drivers/s390/char/sclp_cmd.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'drivers/s390/char') diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index 71ea923c322..0dfa88a3011 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c @@ -19,10 +19,11 @@ #include #include #include +#include #include -#include #include -#include +#include +#include #include "sclp.h" @@ -400,17 +401,15 @@ out: static int sclp_assign_storage(u16 rn) { - unsigned long long start, address; + unsigned long long start; int rc; rc = do_assign_storage(0x000d0001, rn); if (rc) - goto out; - start = address = rn2addr(rn); - for (; address < start + rzm; address += PAGE_SIZE) - page_set_storage_key(address, PAGE_DEFAULT_KEY, 0); -out: - return rc; + return rc; + start = rn2addr(rn); + storage_key_init_range(start, start + rzm); + return 0; } static int sclp_unassign_storage(u16 rn) -- cgit v1.2.3-70-g09d2