diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-11-02 07:56:43 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-11-23 05:14:30 -0500 |
commit | 6b70a92080be508e16b2f53efba39e5155eff809 (patch) | |
tree | a8bce16cd2f31284a392b29b4054230afce87168 /drivers/s390 | |
parent | 1e466fcf3882e4c17c7df918185d0069cc334811 (diff) |
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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index 71ea923c322d..0dfa88a30118 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -19,10 +19,11 @@ | |||
19 | #include <linux/memory.h> | 19 | #include <linux/memory.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <asm/ctl_reg.h> | ||
22 | #include <asm/chpid.h> | 23 | #include <asm/chpid.h> |
23 | #include <asm/sclp.h> | ||
24 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
25 | #include <asm/ctl_reg.h> | 25 | #include <asm/page.h> |
26 | #include <asm/sclp.h> | ||
26 | 27 | ||
27 | #include "sclp.h" | 28 | #include "sclp.h" |
28 | 29 | ||
@@ -400,17 +401,15 @@ out: | |||
400 | 401 | ||
401 | static int sclp_assign_storage(u16 rn) | 402 | static int sclp_assign_storage(u16 rn) |
402 | { | 403 | { |
403 | unsigned long long start, address; | 404 | unsigned long long start; |
404 | int rc; | 405 | int rc; |
405 | 406 | ||
406 | rc = do_assign_storage(0x000d0001, rn); | 407 | rc = do_assign_storage(0x000d0001, rn); |
407 | if (rc) | 408 | if (rc) |
408 | goto out; | 409 | return rc; |
409 | start = address = rn2addr(rn); | 410 | start = rn2addr(rn); |
410 | for (; address < start + rzm; address += PAGE_SIZE) | 411 | storage_key_init_range(start, start + rzm); |
411 | page_set_storage_key(address, PAGE_DEFAULT_KEY, 0); | 412 | return 0; |
412 | out: | ||
413 | return rc; | ||
414 | } | 413 | } |
415 | 414 | ||
416 | static int sclp_unassign_storage(u16 rn) | 415 | static int sclp_unassign_storage(u16 rn) |